From 9d84fd18b634fa79d7a6f521c3a3d896b12778dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:29:12 -0500 Subject: [PATCH 01/16] chore(deps): bump axios from 1.16.0 to 1.18.1 (#1499) Bumps [axios](https://github.com/axios/axios) from 1.16.0 to 1.18.1. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.16.0...v1.18.1) --- updated-dependencies: - dependency-name: axios dependency-version: 1.18.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bcdd6df7..4101369e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4009,16 +4009,42 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.0.tgz", - "integrity": "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz", + "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==", "license": "MIT", "dependencies": { "follow-redirects": "^1.16.0", "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", "proxy-from-env": "^2.1.0" } }, + "node_modules/axios/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/axios/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/b4a": { "version": "1.7.3", "license": "Apache-2.0", From 504c1b50ebbc4e3e4fc9e7e7891bd7a0cbcf3e57 Mon Sep 17 00:00:00 2001 From: Zbigniew Sobiecki Date: Tue, 28 Jul 2026 12:41:29 -0500 Subject: [PATCH 02/16] chore(security): clear high-severity prod audit findings blocking CI (#1513) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `npm audit --omit=dev --audit-level=high` (CI lint-and-test gate) was red on `dev`, blocking every open PR. Three high findings, two with no Dependabot PR: - js-yaml 4.2.0 -> ^4.3.0 (GHSA-52cp-r559-cp3m, direct dep) - brace-expansion -> ^5.0.8 (GHSA-mh99-v99m-4gvg has NO 2.x backport; only 5.0.8 is patched) - protobufjs override 7.6.4 -> ^7.6.5 (GHSA-j3f2-48v5-ccww, moderate) brace-expansion 5.x is a breaking change: 1.x/2.x did `module.exports = expand` (callable), 5.x exports `{ expand, EXPANSION_MAX, EXPANSION_MAX_LENGTH }`. Forcing it alone breaks every minimatch below v10 at runtime — verified: minimatch@5.1.9 (filelist) throws `expand is not a function`, minimatch@9.0.9 (rimraf, archiver-utils, llmist) throws `brace_expansion_1.default is not a function`. Only minimatch@10 calls the named `.expand()` export. So brace-expansion is pinned together with `minimatch: ^10.2.5`, deduping the tree to one modern copy that is compatible with it. Bumping the direct consumers instead does not work — filelist, llmist, rimraf and test-exclude pin old minimatch transitively and are not upgradeable from here. Verified: audit gate exits 0, build + typecheck clean, 10915 unit tests pass, and filelist brace globbing still resolves `package{.json,-lock.json}`. Co-authored-by: Claude Opus 5 (1M context) --- package-lock.json | 127 +++++++++------------------------------------- package.json | 9 ++-- 2 files changed, 30 insertions(+), 106 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4101369e..bf51c577 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "fastest-levenshtein": "^1.0.16", "hono": "^4.12.25", "jira.js": "^5.3.0", - "js-yaml": "^4.2.0", + "js-yaml": "^4.3.0", "llmist": "^16.0.4", "marklassian": "^1.1.0", "open": "^11.0.0", @@ -3853,21 +3853,6 @@ "version": "10.4.3", "license": "ISC" }, - "node_modules/archiver-utils/node_modules/minimatch": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", - "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.2" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/archiver-utils/node_modules/path-scurry": { "version": "1.11.1", "license": "BlueOak-1.0.0", @@ -4058,8 +4043,13 @@ } }, "node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } }, "node_modules/bare-events": { "version": "2.8.2", @@ -4145,12 +4135,15 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", - "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.8.tgz", + "integrity": "sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/buffer": { @@ -6157,18 +6150,6 @@ "minimatch": "^5.0.1" } }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", - "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/follow-redirects": { "version": "1.16.0", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", @@ -6979,9 +6960,9 @@ } }, "node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz", + "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==", "funding": [ { "type": "github", @@ -7342,21 +7323,6 @@ "node": ">=22.0.0" } }, - "node_modules/llmist/node_modules/minimatch": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", - "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.2" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/llmist/node_modules/zod": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", @@ -7606,12 +7572,12 @@ } }, "node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.5" + "brace-expansion": "^5.0.8" }, "engines": { "node": "18 || 20 || >=22" @@ -8330,9 +8296,9 @@ "license": "MIT" }, "node_modules/protobufjs": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.4.tgz", - "integrity": "sha512-RJJPTTpvFfHcWLkIa2JFWK4XvtSzS0yEWDmunqHXli1h3JlkbcQZXDZdcWxv+JK3Xsl5/UFDPZ0iGm7DAengYw==", + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.5.tgz", + "integrity": "sha512-/FPD0nUc9jH6rfFjji9IBqOz4pcSE3CsT1m7Ep6Mdb0LxSUMj8hgl6GomOvZzpNpAqqGaXA0P3VSrZLFzIhQrw==", "hasInstallScript": true, "license": "BSD-3-Clause", "dependencies": { @@ -8428,18 +8394,6 @@ "minimatch": "^5.1.0" } }, - "node_modules/readdir-glob/node_modules/minimatch": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", - "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/redis-errors": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", @@ -8567,21 +8521,6 @@ "version": "10.4.3", "license": "ISC" }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", - "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.2" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/rimraf/node_modules/path-scurry": { "version": "1.11.1", "license": "BlueOak-1.0.0", @@ -9065,22 +9004,6 @@ "dev": true, "license": "ISC" }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", - "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.2" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/test-exclude/node_modules/path-scurry": { "version": "1.11.1", "dev": true, diff --git a/package.json b/package.json index 3aa84cd0..93efb5e2 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "fastest-levenshtein": "^1.0.16", "hono": "^4.12.25", "jira.js": "^5.3.0", - "js-yaml": "^4.2.0", + "js-yaml": "^4.3.0", "llmist": "^16.0.4", "marklassian": "^1.1.0", "open": "^11.0.0", @@ -138,9 +138,10 @@ "overrides": { "lodash": "^4.18.1", "lodash-es": "^4.18.1", - "brace-expansion": "^2.0.3", + "brace-expansion": "^5.0.8", "axios": "^1.15.0", - "protobufjs": "^7.6.4", - "form-data": "^4.0.6" + "protobufjs": "^7.6.5", + "form-data": "^4.0.6", + "minimatch": "^10.2.5" } } From ca6ae64513421b4e2715e47132e9acb279827842 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:53:22 -0500 Subject: [PATCH 03/16] chore(deps): bump hono from 4.12.26 to 4.12.32 (#1502) Bumps [hono](https://github.com/honojs/hono) from 4.12.26 to 4.12.32. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.12.26...v4.12.32) --- updated-dependencies: - dependency-name: hono dependency-version: 4.12.32 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf51c577..1a40741a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "eta": "^4.5.0", "execa": "^9.6.1", "fastest-levenshtein": "^1.0.16", - "hono": "^4.12.25", + "hono": "^4.12.32", "jira.js": "^5.3.0", "js-yaml": "^4.3.0", "llmist": "^16.0.4", @@ -6491,9 +6491,9 @@ } }, "node_modules/hono": { - "version": "4.12.26", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.26.tgz", - "integrity": "sha512-uyZtpnYxM9CmQ7QsQknM4zN8EftNqhON1qYeIKM0Se67CCEe2c44xyGURwB0axX2fBDu1dqHrHAc1hmNT8ITkw==", + "version": "4.12.32", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.32.tgz", + "integrity": "sha512-XcuyW9qE2kJn07PkecMOBd5Vq/hMy7mmGw+idz1yblbg9N17ijJODrvPkn7/dwL3Kulj8LcRJ69DLOWf91dRUg==", "license": "MIT", "engines": { "node": ">=16.9.0" diff --git a/package.json b/package.json index 93efb5e2..fb79e8fa 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "eta": "^4.5.0", "execa": "^9.6.1", "fastest-levenshtein": "^1.0.16", - "hono": "^4.12.25", + "hono": "^4.12.32", "jira.js": "^5.3.0", "js-yaml": "^4.3.0", "llmist": "^16.0.4", From ce9f6802c902bc4bb365038521ce1d4819da35a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:54:44 -0500 Subject: [PATCH 04/16] chore(deps): bump @hono/node-server from 1.19.13 to 2.0.10 (#1500) Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.19.13 to 2.0.10. - [Release notes](https://github.com/honojs/node-server/releases) - [Commits](https://github.com/honojs/node-server/compare/v1.19.13...v2.0.10) --- updated-dependencies: - dependency-name: "@hono/node-server" dependency-version: 2.0.10 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1a40741a..a90e3bed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@anthropic-ai/claude-agent-sdk": "^0.3.185", - "@hono/node-server": "^1.19.13", + "@hono/node-server": "^2.0.10", "@hono/trpc-server": "^0.4.2", "@llmist/cli": "^16.0.3", "@oclif/core": "^4.8.0", @@ -2127,12 +2127,12 @@ } }, "node_modules/@hono/node-server": { - "version": "1.19.13", - "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.13.tgz", - "integrity": "sha512-TsQLe4i2gvoTtrHje625ngThGBySOgSK3Xo2XRYOdqGN1teR8+I7vchQC46uLJi8OF62YTYA3AhSpumtkhsaKQ==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.0.10.tgz", + "integrity": "sha512-ZcnNVhKTmyDJeg0UlnZjvM73JBsTAuhrH/J4fjwGOw59PwOW51r4J+p6CsKZWXdKSme4MFqU62CZMOsdDrU4CA==", "license": "MIT", "engines": { - "node": ">=18.14.1" + "node": ">=20" }, "peerDependencies": { "hono": "^4" diff --git a/package.json b/package.json index fb79e8fa..e72e718b 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "license": "MIT", "dependencies": { "@anthropic-ai/claude-agent-sdk": "^0.3.185", - "@hono/node-server": "^1.19.13", + "@hono/node-server": "^2.0.10", "@hono/trpc-server": "^0.4.2", "@llmist/cli": "^16.0.3", "@oclif/core": "^4.8.0", From 2ec180ac82efe34cc68b3eb012e27f97ec816d14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:55:01 -0500 Subject: [PATCH 05/16] chore(deps-dev): bump fast-uri from 3.1.2 to 3.1.4 (#1503) Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.2 to 3.1.4. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](https://github.com/fastify/fast-uri/compare/v3.1.2...v3.1.4) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a90e3bed..3dc43a3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6063,9 +6063,9 @@ "license": "MIT" }, "node_modules/fast-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", - "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.4.tgz", + "integrity": "sha512-8JnbkQ4juDyvYs4mgFGQqg4yCYtFDtUtmp2QIQq11ZZe5CFQ5wcqm1rqDgAh/QdMySuBnPzMUiJUNZG5N/AiQw==", "dev": true, "funding": [ { From 0bf4f5948970a09fd05372d8e871c9d46d335bab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:55:17 -0500 Subject: [PATCH 06/16] chore(deps): bump shell-quote and concurrently (#1504) Bumps [shell-quote](https://github.com/ljharb/shell-quote) to 1.9.0 and updates ancestor dependency [concurrently](https://github.com/open-cli-tools/concurrently). These dependencies need to be updated together. Updates `shell-quote` from 1.8.4 to 1.9.0 - [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/shell-quote/compare/v1.8.4...v1.9.0) Updates `concurrently` from 10.0.3 to 10.0.4 - [Release notes](https://github.com/open-cli-tools/concurrently/releases) - [Commits](https://github.com/open-cli-tools/concurrently/compare/v10.0.3...v10.0.4) --- updated-dependencies: - dependency-name: concurrently dependency-version: 10.0.4 dependency-type: direct:development - dependency-name: shell-quote dependency-version: 1.9.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3dc43a3b..6c330065 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,7 +64,7 @@ "@types/react-dom": "^19.2.3", "@vitest/coverage-v8": "^3.2.6", "commander": "^14.0.2", - "concurrently": "^10.0.3", + "concurrently": "^10.0.4", "drizzle-kit": "^0.31.9", "jsdom": "^28.1.0", "lefthook": "^1.10.10", @@ -4540,15 +4540,15 @@ } }, "node_modules/concurrently": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.3.tgz", - "integrity": "sha512-hc3LH4UaKWd/bbyDK/IGVa4RB6PtQ3CUYwtrkzqHn+wIG3Hr5fhpRlk0L/gCa8ZE1L/Ufj50Zho69cI5w8SQBA==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.4.tgz", + "integrity": "sha512-trZql+7l/0+WRAsAnEdctr4+iiOS6ZrViI6H8QWcCF9MFS/LT0dKpe8vluB1to6it+OxSI4VospFTIFMW8DJRw==", "dev": true, "license": "MIT", "dependencies": { "chalk": "5.6.2", "rxjs": "7.8.2", - "shell-quote": "1.8.4", + "shell-quote": "1.9.0", "supports-color": "10.2.2", "tree-kill": "1.2.2", "yargs": "18.0.0" @@ -8676,9 +8676,9 @@ } }, "node_modules/shell-quote": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.4.tgz", - "integrity": "sha512-VsC6n6vz1ihYYyZZwX7YZSF5l5x36ca17OC+a69h94YqB7X6XLwf+5MOgynYir2SLFUbl8gIYvBo8K8RoNQ6bQ==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.9.0.tgz", + "integrity": "sha512-Iov+JwFv/2HcTpcwNMKd8+IWNb8tboQJNQTkAY/LLVK7gGH9jy+LGkVqPxfekHl+yMmiqXszdGWXgkfml7hjqA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index e72e718b..c16b9b23 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "@types/react-dom": "^19.2.3", "@vitest/coverage-v8": "^3.2.6", "commander": "^14.0.2", - "concurrently": "^10.0.3", + "concurrently": "^10.0.4", "drizzle-kit": "^0.31.9", "jsdom": "^28.1.0", "lefthook": "^1.10.10", From cf0d0e3774ba8e36b9a806811e4b8a6e50c24bb3 Mon Sep 17 00:00:00 2001 From: Zbigniew Sobiecki Date: Tue, 28 Jul 2026 13:02:12 -0500 Subject: [PATCH 07/16] chore(deps): bump seroval 1.5.1 -> 1.5.6 in /web (#1514) Supersedes #1507. Dependabot's own lockfile regeneration for this bump was unusable: it dropped `@trpc/server@11.16.0` and downgraded/moved `react-is`, so `cd web && npm ci` failed the CI gate with EUSAGE (lock out of sync with package.json) on both the original branch and after an explicit rebase. Regenerated from dev's healthy lock with a scoped `npm update seroval seroval-plugins --package-lock-only` instead, which touches only the two transitive entries. seroval is transitive via @tanstack/react-router -> @tanstack/router-core, so package.json is intentionally unchanged. Verified: `cd web && npm ci --dry-run` in sync, `npm run build:web` succeeds. Co-authored-by: Claude Opus 5 (1M context) --- web/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index b26b3dc9..acac8af3 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -5683,18 +5683,18 @@ } }, "node_modules/seroval": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.5.1.tgz", - "integrity": "sha512-OwrZRZAfhHww0WEnKHDY8OM0U/Qs8OTfIDWhUD4BLpNJUfXK4cGmjiagGze086m+mhI+V2nD0gfbHEnJjb9STA==", + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.5.6.tgz", + "integrity": "sha512-rVQVWjjSvlINzaQPZH5JFqsqEsIWdTxY3iJZCnTL/5gQbXIRooVZKI60tVCkOVfzcRPejboxO2t0P89dg5mQaA==", "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/seroval-plugins": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.5.1.tgz", - "integrity": "sha512-4FbuZ/TMl02sqv0RTFexu0SP6V+ywaIe5bAWCCEik0fk17BhALgwvUDVF7e3Uvf9pxmwCEJsRPmlkUE6HdzLAw==", + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.5.6.tgz", + "integrity": "sha512-HXuLAX2pu/UByPpaeo/TaMfvMIi+1QqIoPJYCcAtU8QkVNwgR6MPlGuCQTErV1JwraaMbYaWVIBX7mppzGLATQ==", "license": "MIT", "engines": { "node": ">=10" From 8fa26b54a89969cd046512debb2e39d43f4c5542 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 13:16:44 -0500 Subject: [PATCH 08/16] chore(deps): bump postcss from 8.5.12 to 8.5.24 (#1510) Bumps [postcss](https://github.com/postcss/postcss) from 8.5.12 to 8.5.24. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.5.12...8.5.24) --- updated-dependencies: - dependency-name: postcss dependency-version: 8.5.24 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c330065..cf354801 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7663,9 +7663,9 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", "dev": true, "funding": [ { @@ -8152,9 +8152,9 @@ } }, "node_modules/postcss": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.12.tgz", - "integrity": "sha512-W62t/Se6rA0Az3DfCL0AqJwXuKwBeYg6nOaIgzP+xZ7N5BFCI7DYi1qs6ygUYT6rvfi6t9k65UMLJC+PHZpDAA==", + "version": "8.5.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.24.tgz", + "integrity": "sha512-8RyVklq0owXUTa4xlpzu4l9AaVKIdQvAcOHZWaMh98HgySsUtxRVf/chRe3dsSLqb6i40BzGRzEUddRaI+9TSw==", "dev": true, "funding": [ { @@ -8172,7 +8172,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.11", + "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, From 3534dec0e75928b868b6f97708112bc682df9f94 Mon Sep 17 00:00:00 2001 From: Zbigniew Sobiecki Date: Tue, 28 Jul 2026 13:25:30 -0500 Subject: [PATCH 09/16] chore(deps-dev): bump vite 6.4.2 -> 8.1.5 and @vitejs/plugin-react 4.5.2 -> 6.0.4 in /web (#1515) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supersedes #1511 (and #1410 before it). The bump itself is fine; Dependabot's lockfile regeneration for the web workspace is not. Its lock fails `npm ci` with EUSAGE — dropping `@trpc/server@11.16.0` and `react-is@19.2.8`, and pinning `@emnapi/*` 2.0.0-alpha prereleases that conflict with the resolved 1.x. Same defect that made #1507 unmergeable; an explicit `@dependabot rebase` did not fix it either. Regenerated the lock from dev's healthy state with a scoped `npm install --save-dev --package-lock-only` instead. vite 8 swaps Rollup for rolldown, hence the large lockfile delta (-1302/+314): the rollup toolchain drops out. Verified: `cd web && npm ci` in sync, `npm run typecheck` clean, and `npm run build:web` succeeds (2883 modules, bundle 1466 kB vs 1511 kB on vite 6). Co-authored-by: Claude Opus 5 (1M context) --- web/package-lock.json | 1612 ++++++++--------------------------------- web/package.json | 4 +- 2 files changed, 314 insertions(+), 1302 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index acac8af3..3042af2b 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -32,734 +32,47 @@ "@tailwindcss/vite": "^4.1.7", "@types/react": "^19.1.4", "@types/react-dom": "^19.1.5", - "@vitejs/plugin-react": "^4.5.2", + "@vitejs/plugin-react": "^6.0.4", "tailwindcss": "^4.1.7", "typescript": "^5.7.2", - "vite": "^6.4.2" + "vite": "^8.1.5" } }, - "node_modules/@babel/code-frame": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", - "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.29.7", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", - "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", - "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.7", - "@babel/helper-compilation-targets": "^7.29.7", - "@babel/helper-module-transforms": "^7.29.7", - "@babel/helpers": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/template": "^7.29.7", - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7", - "@jridgewell/remapping": "^2.3.5", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz", - "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7", - "@jridgewell/gen-mapping": "^0.3.12", - "@jridgewell/trace-mapping": "^0.3.28", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", - "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.29.7", - "@babel/helper-validator-option": "^7.29.7", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-globals": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", - "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", - "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", - "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7", - "@babel/traverse": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", - "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", - "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", - "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", - "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", - "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.29.7" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", - "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", - "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", - "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz", - "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.7", - "@babel/generator": "^7.29.7", - "@babel/helper-globals": "^7.29.7", - "@babel/parser": "^7.29.7", - "@babel/template": "^7.29.7", - "@babel/types": "^7.29.7", - "debug": "^4.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", - "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", - "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", - "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", - "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", - "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", - "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", - "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", - "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", - "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", - "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", - "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", - "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", - "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", - "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", - "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", - "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", - "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", - "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", - "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", - "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", - "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", - "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", - "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", - "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", - "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", - "cpu": [ - "arm64" - ], + "node_modules/@emnapi/core": { + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-alpha.3.tgz", + "integrity": "sha512-AZypUeJ/yByuxyS7BlSNRDOMLMlROYtjYdIAuBmJssVz1UJDSeYxLrdizhXCFYhedC5bqd/ASy8EuNXbVVXp9g==", "dev": true, "license": "MIT", "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" + "peer": true, + "dependencies": { + "@emnapi/wasi-threads": "2.0.1", + "tslib": "^2.4.0" } }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", - "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", - "cpu": [ - "ia32" - ], + "node_modules/@emnapi/runtime": { + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-alpha.3.tgz", + "integrity": "sha512-hFPAhMUjJD9BSyCANEISPOogeXC9Zo9ZQl7L6vKnaVsMkCtzznaW/naYypeyl0Gv5rYfWYsZbpixTMpjDJzQeA==", "dev": true, "license": "MIT", "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" + "peer": true, + "dependencies": { + "tslib": "^2.4.0" } }, - "node_modules/@esbuild/win32-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", - "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", - "cpu": [ - "x64" - ], + "node_modules/@emnapi/wasi-threads": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.0.1.tgz", + "integrity": "sha512-9DsSk+o5NBX0CCJT8s0EROGSGxjR/tKu6aBTaVyq+SjAEQH4XcdcRxPBRzsBLizTTJ49MJjF+jgu3qnO9GLQcQ==", "dev": true, "license": "MIT", "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" + "peer": true, + "dependencies": { + "tslib": "^2.4.0" } }, "node_modules/@floating-ui/core": { @@ -862,6 +175,38 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.0.tgz", + "integrity": "sha512-kDoONqMa+VnZ4vvvu/ZUurpJ4gkZU57e7g69qpNgWhYcZFPUHZM2CEMKm+cG6ufDVALbjMvfmMjFVqaK7uEMnA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^2.0.0-alpha.3", + "@emnapi/runtime": "^2.0.0-alpha.3" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.139.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.139.0.tgz", + "integrity": "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, "node_modules/@radix-ui/number": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz", @@ -2396,31 +1741,10 @@ "url": "https://opencollective.com/immer" } }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.0-beta.27", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", - "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.57.1.tgz", - "integrity": "sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.57.1.tgz", - "integrity": "sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w==", + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.5.tgz", + "integrity": "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==", "cpu": [ "arm64" ], @@ -2429,12 +1753,15 @@ "optional": true, "os": [ "android" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.57.1.tgz", - "integrity": "sha512-crNPrwJOrRxagUYeMn/DZwqN88SDmwaJ8Cvi/TN1HnWBU7GwknckyosC2gd0IqYRsHDEnXf328o9/HC6OkPgOg==", + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.5.tgz", + "integrity": "sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==", "cpu": [ "arm64" ], @@ -2443,12 +1770,15 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.57.1.tgz", - "integrity": "sha512-Ji8g8ChVbKrhFtig5QBV7iMaJrGtpHelkB3lsaKzadFBe58gmjfGXAOfI5FV0lYMH8wiqsxKQ1C9B0YTRXVy4w==", + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.5.tgz", + "integrity": "sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==", "cpu": [ "x64" ], @@ -2457,26 +1787,15 @@ "optional": true, "os": [ "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.57.1.tgz", - "integrity": "sha512-R+/WwhsjmwodAcz65guCGFRkMb4gKWTcIeLy60JJQbXrJ97BOXHxnkPFrP+YwFlaS0m+uWJTstrUA9o+UchFug==", - "cpu": [ - "arm64" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.57.1.tgz", - "integrity": "sha512-IEQTCHeiTOnAUC3IDQdzRAGj3jOAYNr9kBguI7MQAAZK3caezRrg0GxAb6Hchg4lxdZEI5Oq3iov/w/hnFWY9Q==", + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.5.tgz", + "integrity": "sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==", "cpu": [ "x64" ], @@ -2485,26 +1804,15 @@ "optional": true, "os": [ "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.57.1.tgz", - "integrity": "sha512-F8sWbhZ7tyuEfsmOxwc2giKDQzN3+kuBLPwwZGyVkLlKGdV1nvnNwYD0fKQ8+XS6hp9nY7B+ZeK01EBUE7aHaw==", - "cpu": [ - "arm" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.57.1.tgz", - "integrity": "sha512-rGfNUfn0GIeXtBP1wL5MnzSj98+PZe/AXaGBCRmT0ts80lU5CATYGxXukeTX39XBKsxzFpEeK+Mrp9faXOlmrw==", + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.5.tgz", + "integrity": "sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==", "cpu": [ "arm" ], @@ -2513,236 +1821,222 @@ "optional": true, "os": [ "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.57.1.tgz", - "integrity": "sha512-MMtej3YHWeg/0klK2Qodf3yrNzz6CGjo2UntLvk2RSPlhzgLvYEB3frRvbEF2wRKh1Z2fDIg9KRPe1fawv7C+g==", - "cpu": [ - "arm64" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.57.1.tgz", - "integrity": "sha512-1a/qhaaOXhqXGpMFMET9VqwZakkljWHLmZOX48R0I/YLbhdxr1m4gtG1Hq7++VhVUmf+L3sTAf9op4JlhQ5u1Q==", + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.5.tgz", + "integrity": "sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.57.1.tgz", - "integrity": "sha512-QWO6RQTZ/cqYtJMtxhkRkidoNGXc7ERPbZN7dVW5SdURuLeVU7lwKMpo18XdcmpWYd0qsP1bwKPf7DNSUinhvA==", - "cpu": [ - "loong64" + "libc": [ + "glibc" ], - "dev": true, "license": "MIT", "optional": true, "os": [ "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.57.1.tgz", - "integrity": "sha512-xpObYIf+8gprgWaPP32xiN5RVTi/s5FCR+XMXSKmhfoJjrpRAjCuuqQXyxUa/eJTdAE6eJ+KDKaoEqjZQxh3Gw==", - "cpu": [ - "loong64" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.57.1.tgz", - "integrity": "sha512-4BrCgrpZo4hvzMDKRqEaW1zeecScDCR+2nZ86ATLhAoJ5FQ+lbHVD3ttKe74/c7tNT9c6F2viwB3ufwp01Oh2w==", + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.5.tgz", + "integrity": "sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==", "cpu": [ - "ppc64" + "arm64" ], "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.57.1.tgz", - "integrity": "sha512-NOlUuzesGauESAyEYFSe3QTUguL+lvrN1HtwEEsU2rOwdUDeTMJdO5dUYl/2hKf9jWydJrO9OL/XSSf65R5+Xw==", - "cpu": [ - "ppc64" + "libc": [ + "musl" ], - "dev": true, "license": "MIT", "optional": true, "os": [ "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.57.1.tgz", - "integrity": "sha512-ptA88htVp0AwUUqhVghwDIKlvJMD/fmL/wrQj99PRHFRAG6Z5nbWoWG4o81Nt9FT+IuqUQi+L31ZKAFeJ5Is+A==", - "cpu": [ - "riscv64" ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.57.1.tgz", - "integrity": "sha512-S51t7aMMTNdmAMPpBg7OOsTdn4tySRQvklmL3RpDRyknk87+Sp3xaumlatU+ppQ+5raY7sSTcC2beGgvhENfuw==", + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.5.tgz", + "integrity": "sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==", "cpu": [ - "riscv64" + "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.57.1.tgz", - "integrity": "sha512-Bl00OFnVFkL82FHbEqy3k5CUCKH6OEJL54KCyx2oqsmZnFTR8IoNqBF+mjQVcRCT5sB6yOvK8A37LNm/kPJiZg==", + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.5.tgz", + "integrity": "sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.57.1.tgz", - "integrity": "sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg==", + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.5.tgz", + "integrity": "sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.57.1.tgz", - "integrity": "sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw==", + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.5.tgz", + "integrity": "sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.57.1.tgz", - "integrity": "sha512-H+hXEv9gdVQuDTgnqD+SQffoWoc0Of59AStSzTEj/feWTBAnSfSD3+Dql1ZruJQxmykT/JVY0dE8Ka7z0DH1hw==", + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.5.tgz", + "integrity": "sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==", "cpu": [ - "x64" + "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "openbsd" - ] + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.57.1.tgz", - "integrity": "sha512-4wYoDpNg6o/oPximyc/NG+mYUejZrCU2q+2w6YZqrAs2UcNUChIZXjtafAiiZSUc7On8v5NyNj34Kzj/Ltk6dQ==", + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.5.tgz", + "integrity": "sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==", "cpu": [ - "arm64" + "wasm32" ], "dev": true, "license": "MIT", "optional": true, - "os": [ - "openharmony" - ] + "dependencies": { + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "^1.1.6" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.57.1.tgz", - "integrity": "sha512-O54mtsV/6LW3P8qdTcamQmuC990HDfR71lo44oZMZlXU4tzLrbvTii87Ni9opq60ds0YzuAlEr/GNwuNluZyMQ==", - "cpu": [ - "arm64" - ], + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", + "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", "dev": true, "license": "MIT", "optional": true, - "os": [ - "win32" - ] + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.57.1.tgz", - "integrity": "sha512-P3dLS+IerxCT/7D2q2FYcRdWRl22dNbrbBEtxdWhXrfIMPP9lQhb5h4Du04mdl5Woq05jVCDPCMF7Ub0NAjIew==", - "cpu": [ - "ia32" - ], + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", + "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", "dev": true, "license": "MIT", "optional": true, - "os": [ - "win32" - ] + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.57.1.tgz", - "integrity": "sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ==", + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.5.tgz", + "integrity": "sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==", "cpu": [ - "x64" + "arm64" ], "dev": true, "license": "MIT", "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.57.1.tgz", - "integrity": "sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA==", + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.5.tgz", + "integrity": "sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==", "cpu": [ "x64" ], @@ -2751,7 +2045,17 @@ "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" }, "node_modules/@standard-schema/spec": { "version": "1.1.0", @@ -3276,49 +2580,15 @@ "typescript": ">=5.7.2" } }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", - "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "@babel/types": "^7.28.2" + "tslib": "^2.4.0" } }, "node_modules/@types/d3-array": { @@ -3470,24 +2740,29 @@ "license": "ISC" }, "node_modules/@vitejs/plugin-react": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", - "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.0.4.tgz", + "integrity": "sha512-XcCQz0TBpBgljhj0gMuuDj49i6Ytqh5q1osT/Gp5uAVJUCTWxyskk/l1jwYYiu2xcNHHipdMz40EGfM1VdamVg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/core": "^7.28.0", - "@babel/plugin-transform-react-jsx-self": "^7.27.1", - "@babel/plugin-transform-react-jsx-source": "^7.27.1", - "@rolldown/pluginutils": "1.0.0-beta.27", - "@types/babel__core": "^7.20.5", - "react-refresh": "^0.17.0" + "@rolldown/pluginutils": "^1.0.1" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": "^20.19.0 || >=22.12.0" }, "peerDependencies": { - "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", + "babel-plugin-react-compiler": "^1.0.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "@rolldown/plugin-babel": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + } } }, "node_modules/aria-hidden": { @@ -3512,74 +2787,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/baseline-browser-mapping": { - "version": "2.10.38", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.38.tgz", - "integrity": "sha512-31/02mVB4yuQU6adKk5SlY6m+mxDwUq5KZkyYgnLrrKl7TEm1+3PyDtDBz2kOv/wxZz41GHsvV1A/u6RmiyBvw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "baseline-browser-mapping": "dist/cli.cjs" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/browserslist": { - "version": "4.28.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", - "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "baseline-browser-mapping": "^2.10.12", - "caniuse-lite": "^1.0.30001782", - "electron-to-chromium": "^1.5.328", - "node-releases": "^2.0.36", - "update-browserslist-db": "^1.2.3" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001799", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001799.tgz", - "integrity": "sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, "node_modules/ccount": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", @@ -3677,13 +2884,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, "node_modules/cookie-es": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-2.0.1.tgz", @@ -3903,13 +3103,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/electron-to-chromium": { - "version": "1.5.376", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.376.tgz", - "integrity": "sha512-cUVA7/RvbFTEuw/i3obUwDTRIXojaxkResf+ibByPFxjc6XK3VNtcQXV0NSbAlJ0FMjcJGgftVVB4Qo184EXvA==", - "dev": true, - "license": "ISC" - }, "node_modules/enhanced-resolve": { "version": "5.20.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.1.tgz", @@ -3934,58 +3127,6 @@ "benchmarks" ] }, - "node_modules/esbuild": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", - "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.12", - "@esbuild/android-arm": "0.25.12", - "@esbuild/android-arm64": "0.25.12", - "@esbuild/android-x64": "0.25.12", - "@esbuild/darwin-arm64": "0.25.12", - "@esbuild/darwin-x64": "0.25.12", - "@esbuild/freebsd-arm64": "0.25.12", - "@esbuild/freebsd-x64": "0.25.12", - "@esbuild/linux-arm": "0.25.12", - "@esbuild/linux-arm64": "0.25.12", - "@esbuild/linux-ia32": "0.25.12", - "@esbuild/linux-loong64": "0.25.12", - "@esbuild/linux-mips64el": "0.25.12", - "@esbuild/linux-ppc64": "0.25.12", - "@esbuild/linux-riscv64": "0.25.12", - "@esbuild/linux-s390x": "0.25.12", - "@esbuild/linux-x64": "0.25.12", - "@esbuild/netbsd-arm64": "0.25.12", - "@esbuild/netbsd-x64": "0.25.12", - "@esbuild/openbsd-arm64": "0.25.12", - "@esbuild/openbsd-x64": "0.25.12", - "@esbuild/openharmony-arm64": "0.25.12", - "@esbuild/sunos-x64": "0.25.12", - "@esbuild/win32-arm64": "0.25.12", - "@esbuild/win32-ia32": "0.25.12", - "@esbuild/win32-x64": "0.25.12" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/estree-util-is-identifier-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-3.0.0.tgz", @@ -4041,16 +3182,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/get-nonce": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", @@ -4217,39 +3348,6 @@ "jiti": "lib/jiti-cli.mjs" } }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/lightningcss": { "version": "1.32.0", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", @@ -4521,16 +3619,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, "node_modules/lucide-react": { "version": "0.577.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.577.0.tgz", @@ -5152,9 +4240,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", "dev": true, "funding": [ { @@ -5180,16 +4268,6 @@ "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, - "node_modules/node-releases": { - "version": "2.0.48", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.48.tgz", - "integrity": "sha512-1uz8041X6LoI6ZSdZacM9lVY28vuzDlSKitnpbSNK0RfKoIJkX29NBPVEFXhnuSuEOA9Ww0xnPJ+ILWbGAv8DA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/parse-entities": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", @@ -5223,9 +4301,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", "dev": true, "license": "MIT", "engines": { @@ -5236,9 +4314,9 @@ } }, "node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "version": "8.5.24", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.24.tgz", + "integrity": "sha512-8RyVklq0owXUTa4xlpzu4l9AaVKIdQvAcOHZWaMh98HgySsUtxRVf/chRe3dsSLqb6i40BzGRzEUddRaI+9TSw==", "dev": true, "funding": [ { @@ -5256,7 +4334,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.11", + "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -5458,16 +4536,6 @@ } } }, - "node_modules/react-refresh": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", - "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/react-remove-scroll": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.7.2.tgz", @@ -5621,49 +4689,38 @@ "integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==", "license": "MIT" }, - "node_modules/rollup": { - "version": "4.57.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.57.1.tgz", - "integrity": "sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==", + "node_modules/rolldown": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.5.tgz", + "integrity": "sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.8" + "@oxc-project/types": "=0.139.0", + "@rolldown/pluginutils": "^1.0.0" }, "bin": { - "rollup": "dist/bin/rollup" + "rolldown": "bin/cli.mjs" }, "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" + "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.57.1", - "@rollup/rollup-android-arm64": "4.57.1", - "@rollup/rollup-darwin-arm64": "4.57.1", - "@rollup/rollup-darwin-x64": "4.57.1", - "@rollup/rollup-freebsd-arm64": "4.57.1", - "@rollup/rollup-freebsd-x64": "4.57.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.57.1", - "@rollup/rollup-linux-arm-musleabihf": "4.57.1", - "@rollup/rollup-linux-arm64-gnu": "4.57.1", - "@rollup/rollup-linux-arm64-musl": "4.57.1", - "@rollup/rollup-linux-loong64-gnu": "4.57.1", - "@rollup/rollup-linux-loong64-musl": "4.57.1", - "@rollup/rollup-linux-ppc64-gnu": "4.57.1", - "@rollup/rollup-linux-ppc64-musl": "4.57.1", - "@rollup/rollup-linux-riscv64-gnu": "4.57.1", - "@rollup/rollup-linux-riscv64-musl": "4.57.1", - "@rollup/rollup-linux-s390x-gnu": "4.57.1", - "@rollup/rollup-linux-x64-gnu": "4.57.1", - "@rollup/rollup-linux-x64-musl": "4.57.1", - "@rollup/rollup-openbsd-x64": "4.57.1", - "@rollup/rollup-openharmony-arm64": "4.57.1", - "@rollup/rollup-win32-arm64-msvc": "4.57.1", - "@rollup/rollup-win32-ia32-msvc": "4.57.1", - "@rollup/rollup-win32-x64-gnu": "4.57.1", - "@rollup/rollup-win32-x64-msvc": "4.57.1", - "fsevents": "~2.3.2" + "@rolldown/binding-android-arm64": "1.1.5", + "@rolldown/binding-darwin-arm64": "1.1.5", + "@rolldown/binding-darwin-x64": "1.1.5", + "@rolldown/binding-freebsd-x64": "1.1.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.5", + "@rolldown/binding-linux-arm64-gnu": "1.1.5", + "@rolldown/binding-linux-arm64-musl": "1.1.5", + "@rolldown/binding-linux-ppc64-gnu": "1.1.5", + "@rolldown/binding-linux-s390x-gnu": "1.1.5", + "@rolldown/binding-linux-x64-gnu": "1.1.5", + "@rolldown/binding-linux-x64-musl": "1.1.5", + "@rolldown/binding-openharmony-arm64": "1.1.5", + "@rolldown/binding-wasm32-wasi": "1.1.5", + "@rolldown/binding-win32-arm64-msvc": "1.1.5", + "@rolldown/binding-win32-x64-msvc": "1.1.5" } }, "node_modules/scheduler": { @@ -5672,16 +4729,6 @@ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", "license": "MIT" }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/seroval": { "version": "1.5.6", "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.5.6.tgz", @@ -5802,14 +4849,14 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", "dev": true, "license": "MIT", "dependencies": { "fdir": "^6.5.0", - "picomatch": "^4.0.3" + "picomatch": "^4.0.4" }, "engines": { "node": ">=12.0.0" @@ -5953,37 +5000,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/update-browserslist-db": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", - "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, "node_modules/use-callback-ref": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", @@ -6093,24 +5109,23 @@ } }, "node_modules/vite": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.2.tgz", - "integrity": "sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==", + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.5.tgz", + "integrity": "sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==", "dev": true, "license": "MIT", "dependencies": { - "esbuild": "^0.25.0", - "fdir": "^6.4.4", - "picomatch": "^4.0.2", - "postcss": "^8.5.3", - "rollup": "^4.34.9", - "tinyglobby": "^0.2.13" + "lightningcss": "^1.32.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.17", + "rolldown": "~1.1.5", + "tinyglobby": "^0.2.17" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + "node": "^20.19.0 || >=22.12.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -6119,14 +5134,15 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.3.0", + "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" @@ -6135,13 +5151,16 @@ "@types/node": { "optional": true }, - "jiti": { + "@vitejs/devtools": { "optional": true }, - "less": { + "esbuild": { "optional": true }, - "lightningcss": { + "jiti": { + "optional": true + }, + "less": { "optional": true }, "sass": { @@ -6167,13 +5186,6 @@ } } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", diff --git a/web/package.json b/web/package.json index 55bcd949..51add9e4 100644 --- a/web/package.json +++ b/web/package.json @@ -34,9 +34,9 @@ "@tailwindcss/vite": "^4.1.7", "@types/react": "^19.1.4", "@types/react-dom": "^19.1.5", - "@vitejs/plugin-react": "^4.5.2", + "@vitejs/plugin-react": "^6.0.4", "tailwindcss": "^4.1.7", "typescript": "^5.7.2", - "vite": "^6.4.2" + "vite": "^8.1.5" } } From 40165045ec7f6254ff74c4df17a7d314e9f72617 Mon Sep 17 00:00:00 2001 From: aaight Date: Tue, 28 Jul 2026 21:11:21 +0200 Subject: [PATCH 10/16] fix(debug): render source context in analysis prompt (#1516) Co-authored-by: Cascade Bot --- src/agents/definitions/debug.yaml | 2 +- src/triggers/shared/debug-runner.ts | 1 + .../agents/definitions/debug.yaml.test.ts | 51 +++++++++++++++++++ tests/unit/triggers/debug-runner.test.ts | 2 + 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 tests/unit/agents/definitions/debug.yaml.test.ts diff --git a/src/agents/definitions/debug.yaml b/src/agents/definitions/debug.yaml index 0408f046..3749810a 100644 --- a/src/agents/definitions/debug.yaml +++ b/src/agents/definitions/debug.yaml @@ -29,6 +29,6 @@ strategies: {} prompts: taskPrompt: | - Analyze and process the work item with ID: <%= it.workItemId %>. The work item data has been pre-loaded. + Analyze the pre-loaded run and session data for the <%= it.detectedAgentType ?? 'unknown' %> agent<% if (it.originalWorkItemId) { %>, associated with work item <%= it.originalWorkItemId %><% } else if (it.prNumber) { %>, associated with PR #<%= it.prNumber %><% } %>. Identify what happened, the root cause, and actionable recommendations. hint: Analyze the current issue fully before moving to the next. diff --git a/src/triggers/shared/debug-runner.ts b/src/triggers/shared/debug-runner.ts index fe140a0b..55b21cce 100644 --- a/src/triggers/shared/debug-runner.ts +++ b/src/triggers/shared/debug-runner.ts @@ -174,6 +174,7 @@ export async function triggerDebugAnalysis( originalWorkItemId: workItemId, originalWorkItemName: workItemId ? `Card ${workItemId}` : 'Unknown card', originalWorkItemUrl: workItemId ? resolveWorkItemUrl(workItemId) : '', + prNumber: run.prNumber ?? undefined, detectedAgentType: run.agentType, project, config, diff --git a/tests/unit/agents/definitions/debug.yaml.test.ts b/tests/unit/agents/definitions/debug.yaml.test.ts new file mode 100644 index 00000000..ee310a4e --- /dev/null +++ b/tests/unit/agents/definitions/debug.yaml.test.ts @@ -0,0 +1,51 @@ +import { afterEach, describe, expect, it } from 'vitest'; +import { + clearDefinitionCache, + loadBuiltinDefinition, +} from '../../../../src/agents/definitions/loader.js'; +import { + buildTaskPromptContext, + renderInlineTaskPrompt, +} from '../../../../src/agents/prompts/index.js'; + +describe('debug.yaml task prompt', () => { + afterEach(() => { + clearDefinitionCache(); + }); + + function render(input: Record): string { + const definition = loadBuiltinDefinition('debug'); + return renderInlineTaskPrompt(definition.prompts.taskPrompt, buildTaskPromptContext(input)); + } + + it('describes a PM-driven run using the original work item ID', () => { + const prompt = render({ + detectedAgentType: 'implementation', + originalWorkItemId: 'MNG-1761', + }); + + expect(prompt).toContain('implementation agent'); + expect(prompt).toContain('work item MNG-1761'); + expect(prompt).not.toContain('undefined'); + }); + + it('describes a PR-driven run using the PR number', () => { + const prompt = render({ + detectedAgentType: 'review', + prNumber: 1761, + }); + + expect(prompt).toContain('review agent'); + expect(prompt).toContain('PR #1761'); + expect(prompt).not.toContain('undefined'); + }); + + it('omits source identifiers when neither is available', () => { + const prompt = render({ detectedAgentType: 'debug' }); + + expect(prompt).toContain('debug agent'); + expect(prompt).not.toContain('work item'); + expect(prompt).not.toContain('PR #'); + expect(prompt).not.toContain('undefined'); + }); +}); diff --git a/tests/unit/triggers/debug-runner.test.ts b/tests/unit/triggers/debug-runner.test.ts index 38f80a89..cea92a79 100644 --- a/tests/unit/triggers/debug-runner.test.ts +++ b/tests/unit/triggers/debug-runner.test.ts @@ -73,6 +73,7 @@ describe('triggerDebugAnalysis', () => { id: 'run-1', agentType: 'implementation', status: 'failed', + prNumber: 42, } as ReturnType extends Promise ? NonNullable : never); vi.mocked(getRunLogs).mockResolvedValue({ @@ -98,6 +99,7 @@ describe('triggerDebugAnalysis', () => { 'debug', expect.objectContaining({ originalWorkItemId: 'card-1', + prNumber: 42, detectedAgentType: 'implementation', project: mockProject, config: mockConfig, From 7d9ec063a5c282e290e9cdc5f2fbdb744c1d2c13 Mon Sep 17 00:00:00 2001 From: aaight Date: Tue, 28 Jul 2026 21:29:21 +0200 Subject: [PATCH 11/16] test(codex): detect JSONL schema drift in CI (#1518) Co-authored-by: Cascade Bot --- Dockerfile.worker | 2 + package-lock.json | 7 +- package.json | 1 + .../codex_app_server_protocol.v2.schemas.json | 19611 ++++++++++++++++ .../fixtures/codex/0.145.0/exec-stream.jsonl | 4 + .../unit/backends/codex-event-schema.test.ts | 121 + 6 files changed, 19743 insertions(+), 3 deletions(-) create mode 100644 tests/fixtures/codex/0.145.0/codex_app_server_protocol.v2.schemas.json create mode 100644 tests/fixtures/codex/0.145.0/exec-stream.jsonl create mode 100644 tests/unit/backends/codex-event-schema.test.ts diff --git a/Dockerfile.worker b/Dockerfile.worker index 25b3ecec..087ed0db 100644 --- a/Dockerfile.worker +++ b/Dockerfile.worker @@ -72,6 +72,8 @@ RUN ARCH=$(dpkg --print-architecture) && \ # Install agent CLIs used by headless engines in worker jobs. # All three are explicitly pinned so worker image rebuilds are reproducible — # upstream CLI changes can introduce subtle behavioural drift in headless mode. +# When bumping Codex, regenerate tests/fixtures/codex// with +# `codex app-server generate-json-schema --out ` and record an exec JSONL stream. RUN npm install -g \ @anthropic-ai/claude-code@2.1.185 \ @openai/codex@0.145.0 \ diff --git a/package-lock.json b/package-lock.json index cf354801..03bac820 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,6 +63,7 @@ "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitest/coverage-v8": "^3.2.6", + "ajv": "^8.20.0", "commander": "^14.0.2", "concurrently": "^10.0.4", "drizzle-kit": "^0.31.9", @@ -3708,9 +3709,9 @@ } }, "node_modules/ajv": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", - "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index c16b9b23..0884689a 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,7 @@ "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitest/coverage-v8": "^3.2.6", + "ajv": "^8.20.0", "commander": "^14.0.2", "concurrently": "^10.0.4", "drizzle-kit": "^0.31.9", diff --git a/tests/fixtures/codex/0.145.0/codex_app_server_protocol.v2.schemas.json b/tests/fixtures/codex/0.145.0/codex_app_server_protocol.v2.schemas.json new file mode 100644 index 00000000..83b8bb85 --- /dev/null +++ b/tests/fixtures/codex/0.145.0/codex_app_server_protocol.v2.schemas.json @@ -0,0 +1,19611 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CodexAppServerProtocolV2", + "type": "object", + "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" + }, + "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-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" + } + ] + }, + "CapabilityRootLocation": { + "description": "Location used to resolve a selected capability root.", + "oneOf": [ + { + "description": "A path owned by an execution environment.", + "type": "object", + "required": [ + "environmentId", + "path", + "type" + ], + "properties": { + "environmentId": { + "type": "string" + }, + "path": { + "description": "Absolute path for the root in the selected environment.", + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "environment" + ], + "title": "EnvironmentCapabilityRootLocationType" + } + }, + "title": "EnvironmentCapabilityRootLocation" + } + ] + }, + "DynamicToolNamespaceTool": { + "oneOf": [ + { + "type": "object", + "required": [ + "description", + "inputSchema", + "name", + "type" + ], + "properties": { + "deferLoading": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "inputSchema": true, + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "function" + ], + "title": "FunctionDynamicToolNamespaceToolType" + } + }, + "title": "FunctionDynamicToolNamespaceTool" + } + ] + }, + "DynamicToolSpec": { + "oneOf": [ + { + "type": "object", + "required": [ + "description", + "inputSchema", + "name", + "type" + ], + "properties": { + "deferLoading": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "inputSchema": true, + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "function" + ], + "title": "FunctionDynamicToolSpecType" + } + }, + "title": "FunctionDynamicToolSpec" + }, + { + "type": "object", + "required": [ + "description", + "name", + "tools", + "type" + ], + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/definitions/DynamicToolNamespaceTool" + } + }, + "type": { + "type": "string", + "enum": [ + "namespace" + ], + "title": "NamespaceDynamicToolSpecType" + } + }, + "title": "NamespaceDynamicToolSpec" + } + ] + }, + "LegacyAppPathString": { + "type": "string" + }, + "MultiAgentMode": { + "description": "Controls the effective multi-agent delegation instructions for a turn. `custom` means the configured mode hint defines the policy instead of a built-in policy.", + "oneOf": [ + { + "type": "string", + "enum": [ + "explicitRequestOnly", + "proactive" + ] + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "CustomMultiAgentMode" + } + ] + }, + "Personality": { + "type": "string", + "enum": [ + "none", + "friendly", + "pragmatic" + ] + }, + "SandboxMode": { + "type": "string", + "enum": [ + "read-only", + "workspace-write", + "danger-full-access" + ] + }, + "SelectedCapabilityRoot": { + "description": "A user-selected root that can expose one or more runtime capabilities.", + "type": "object", + "required": [ + "id", + "location" + ], + "properties": { + "id": { + "description": "Stable identifier supplied by the capability selection platform.", + "type": "string" + }, + "location": { + "description": "Where the selected root can be resolved.", + "allOf": [ + { + "$ref": "#/definitions/CapabilityRootLocation" + } + ] + } + } + }, + "ThreadHistoryMode": { + "type": "string", + "enum": [ + "legacy", + "paginated" + ] + }, + "ThreadSource": { + "type": "string" + }, + "ThreadStartSource": { + "type": "string", + "enum": [ + "startup", + "clear" + ] + }, + "TurnEnvironmentParams": { + "type": "object", + "required": [ + "cwd", + "environmentId" + ], + "properties": { + "cwd": { + "$ref": "#/definitions/LegacyAppPathString" + }, + "environmentId": { + "type": "string" + }, + "runtimeWorkspaceRoots": { + "description": "Environment-native runtime workspace roots. Omitted defaults to `cwd`.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/LegacyAppPathString" + } + } + } + }, + "ThreadStartParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadStartParams", + "type": "object", + "properties": { + "serviceName": { + "type": [ + "string", + "null" + ] + }, + "approvalPolicy": { + "anyOf": [ + { + "$ref": "#/definitions/AskForApproval" + }, + { + "type": "null" + } + ] + }, + "approvalsReviewer": { + "description": "Override where approval requests are routed for review on this thread and subsequent turns.", + "anyOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + }, + { + "type": "null" + } + ] + }, + "baseInstructions": { + "type": [ + "string", + "null" + ] + }, + "config": { + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "cwd": { + "type": [ + "string", + "null" + ] + }, + "developerInstructions": { + "type": [ + "string", + "null" + ] + }, + "personality": { + "anyOf": [ + { + "$ref": "#/definitions/Personality" + }, + { + "type": "null" + } + ] + }, + "sandbox": { + "anyOf": [ + { + "$ref": "#/definitions/SandboxMode" + }, + { + "type": "null" + } + ] + }, + "ephemeral": { + "type": [ + "boolean", + "null" + ] + }, + "serviceTier": { + "type": [ + "string", + "null" + ] + }, + "threadSource": { + "description": "Optional client-supplied analytics source classification for this thread.", + "anyOf": [ + { + "$ref": "#/definitions/ThreadSource" + }, + { + "type": "null" + } + ] + }, + "sessionStartSource": { + "anyOf": [ + { + "$ref": "#/definitions/ThreadStartSource" + }, + { + "type": "null" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ] + }, + "modelProvider": { + "type": [ + "string", + "null" + ] + } + } + }, + "AgentMessageInputContent": { + "oneOf": [ + { + "type": "object", + "required": [ + "text", + "type" + ], + "properties": { + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "title": "InputTextAgentMessageInputContentType" + } + }, + "title": "InputTextAgentMessageInputContent" + }, + { + "type": "object", + "required": [ + "encrypted_content", + "type" + ], + "properties": { + "encrypted_content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "encrypted_content" + ], + "title": "EncryptedContentAgentMessageInputContentType" + } + }, + "title": "EncryptedContentAgentMessageInputContent" + } + ] + }, + "ContentItem": { + "oneOf": [ + { + "type": "object", + "required": [ + "text", + "type" + ], + "properties": { + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "title": "InputTextContentItemType" + } + }, + "title": "InputTextContentItem" + }, + { + "type": "object", + "required": [ + "image_url", + "type" + ], + "properties": { + "detail": { + "anyOf": [ + { + "$ref": "#/definitions/ImageDetail" + }, + { + "type": "null" + } + ] + }, + "image_url": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "input_image" + ], + "title": "InputImageContentItemType" + } + }, + "title": "InputImageContentItem" + }, + { + "type": "object", + "required": [ + "audio_url", + "type" + ], + "properties": { + "audio_url": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "input_audio" + ], + "title": "InputAudioContentItemType" + } + }, + "title": "InputAudioContentItem" + }, + { + "type": "object", + "required": [ + "text", + "type" + ], + "properties": { + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "output_text" + ], + "title": "OutputTextContentItemType" + } + }, + "title": "OutputTextContentItem" + } + ] + }, + "FunctionCallOutputBody": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/FunctionCallOutputContentItem" + } + } + ] + }, + "FunctionCallOutputContentItem": { + "description": "Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.", + "oneOf": [ + { + "type": "object", + "required": [ + "text", + "type" + ], + "properties": { + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "title": "InputTextFunctionCallOutputContentItemType" + } + }, + "title": "InputTextFunctionCallOutputContentItem" + }, + { + "type": "object", + "required": [ + "image_url", + "type" + ], + "properties": { + "detail": { + "anyOf": [ + { + "$ref": "#/definitions/ImageDetail" + }, + { + "type": "null" + } + ] + }, + "image_url": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "input_image" + ], + "title": "InputImageFunctionCallOutputContentItemType" + } + }, + "title": "InputImageFunctionCallOutputContentItem" + }, + { + "type": "object", + "required": [ + "audio_url", + "type" + ], + "properties": { + "audio_url": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "input_audio" + ], + "title": "InputAudioFunctionCallOutputContentItemType" + } + }, + "title": "InputAudioFunctionCallOutputContentItem" + }, + { + "type": "object", + "required": [ + "encrypted_content", + "type" + ], + "properties": { + "encrypted_content": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "encrypted_content" + ], + "title": "EncryptedContentFunctionCallOutputContentItemType" + } + }, + "title": "EncryptedContentFunctionCallOutputContentItem" + } + ] + }, + "ImageDetail": { + "type": "string", + "enum": [ + "auto", + "low", + "high", + "original" + ] + }, + "InternalChatMessageMetadataPassthrough": { + "description": "Internal Responses API passthrough metadata copied into underlying chat messages.\n\nResponses API strongly types this payload. Do not modify it without first getting API approval and making the corresponding Responses API change.", + "type": "object", + "properties": { + "turn_id": { + "type": [ + "string", + "null" + ] + } + } + }, + "LocalShellAction": { + "oneOf": [ + { + "type": "object", + "required": [ + "command", + "type" + ], + "properties": { + "command": { + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "string" + } + }, + "timeout_ms": { + "type": [ + "integer", + "null" + ], + "format": "uint64", + "minimum": 0.0 + }, + "type": { + "type": "string", + "enum": [ + "exec" + ], + "title": "ExecLocalShellActionType" + }, + "user": { + "type": [ + "string", + "null" + ] + }, + "working_directory": { + "type": [ + "string", + "null" + ] + } + }, + "title": "ExecLocalShellAction" + } + ] + }, + "LocalShellStatus": { + "type": "string", + "enum": [ + "completed", + "in_progress", + "incomplete" + ] + }, + "MessagePhase": { + "description": "Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.", + "oneOf": [ + { + "description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.", + "type": "string", + "enum": [ + "commentary" + ] + }, + { + "description": "The assistant's terminal answer text for the current turn.", + "type": "string", + "enum": [ + "final_answer" + ] + } + ] + }, + "ReasoningItemContent": { + "oneOf": [ + { + "type": "object", + "required": [ + "text", + "type" + ], + "properties": { + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "reasoning_text" + ], + "title": "ReasoningTextReasoningItemContentType" + } + }, + "title": "ReasoningTextReasoningItemContent" + }, + { + "type": "object", + "required": [ + "text", + "type" + ], + "properties": { + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "text" + ], + "title": "TextReasoningItemContentType" + } + }, + "title": "TextReasoningItemContent" + } + ] + }, + "ReasoningItemReasoningSummary": { + "oneOf": [ + { + "type": "object", + "required": [ + "text", + "type" + ], + "properties": { + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "summary_text" + ], + "title": "SummaryTextReasoningItemReasoningSummaryType" + } + }, + "title": "SummaryTextReasoningItemReasoningSummary" + } + ] + }, + "ResponseItem": { + "oneOf": [ + { + "type": "object", + "required": [ + "content", + "role", + "type" + ], + "properties": { + "content": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentItem" + } + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "phase": { + "anyOf": [ + { + "$ref": "#/definitions/MessagePhase" + }, + { + "type": "null" + } + ] + }, + "role": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "message" + ], + "title": "MessageResponseItemType" + } + }, + "title": "MessageResponseItem" + }, + { + "type": "object", + "required": [ + "author", + "content", + "recipient", + "type" + ], + "properties": { + "author": { + "type": "string" + }, + "content": { + "type": "array", + "items": { + "$ref": "#/definitions/AgentMessageInputContent" + } + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "recipient": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "agent_message" + ], + "title": "AgentMessageResponseItemType" + } + }, + "title": "AgentMessageResponseItem" + }, + { + "type": "object", + "required": [ + "summary", + "type" + ], + "properties": { + "content": { + "default": null, + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/ReasoningItemContent" + } + }, + "encrypted_content": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "summary": { + "type": "array", + "items": { + "$ref": "#/definitions/ReasoningItemReasoningSummary" + } + }, + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "title": "ReasoningResponseItemType" + } + }, + "title": "ReasoningResponseItem" + }, + { + "type": "object", + "required": [ + "action", + "status", + "type" + ], + "properties": { + "action": { + "$ref": "#/definitions/LocalShellAction" + }, + "call_id": { + "description": "Set when using the Responses API.", + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Legacy id field retained for compatibility with older payloads.", + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "status": { + "$ref": "#/definitions/LocalShellStatus" + }, + "type": { + "type": "string", + "enum": [ + "local_shell_call" + ], + "title": "LocalShellCallResponseItemType" + } + }, + "title": "LocalShellCallResponseItem" + }, + { + "type": "object", + "required": [ + "arguments", + "call_id", + "name", + "type" + ], + "properties": { + "arguments": { + "type": "string" + }, + "call_id": { + "type": "string" + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "function_call" + ], + "title": "FunctionCallResponseItemType" + } + }, + "title": "FunctionCallResponseItem" + }, + { + "type": "object", + "required": [ + "arguments", + "execution", + "type" + ], + "properties": { + "arguments": true, + "call_id": { + "type": [ + "string", + "null" + ] + }, + "execution": { + "type": "string" + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "tool_search_call" + ], + "title": "ToolSearchCallResponseItemType" + } + }, + "title": "ToolSearchCallResponseItem" + }, + { + "type": "object", + "required": [ + "call_id", + "output", + "type" + ], + "properties": { + "call_id": { + "type": "string" + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "output": { + "$ref": "#/definitions/FunctionCallOutputBody" + }, + "type": { + "type": "string", + "enum": [ + "function_call_output" + ], + "title": "FunctionCallOutputResponseItemType" + } + }, + "title": "FunctionCallOutputResponseItem" + }, + { + "type": "object", + "required": [ + "call_id", + "input", + "name", + "type" + ], + "properties": { + "call_id": { + "type": "string" + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "input": { + "type": "string" + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + }, + "status": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "custom_tool_call" + ], + "title": "CustomToolCallResponseItemType" + } + }, + "title": "CustomToolCallResponseItem" + }, + { + "type": "object", + "required": [ + "call_id", + "output", + "type" + ], + "properties": { + "call_id": { + "type": "string" + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "output": { + "$ref": "#/definitions/FunctionCallOutputBody" + }, + "type": { + "type": "string", + "enum": [ + "custom_tool_call_output" + ], + "title": "CustomToolCallOutputResponseItemType" + } + }, + "title": "CustomToolCallOutputResponseItem" + }, + { + "type": "object", + "required": [ + "execution", + "status", + "tools", + "type" + ], + "properties": { + "call_id": { + "type": [ + "string", + "null" + ] + }, + "execution": { + "type": "string" + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" + }, + "tools": { + "type": "array", + "items": true + }, + "type": { + "type": "string", + "enum": [ + "tool_search_output" + ], + "title": "ToolSearchOutputResponseItemType" + } + }, + "title": "ToolSearchOutputResponseItem" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "action": { + "anyOf": [ + { + "$ref": "#/definitions/ResponsesApiWebSearchAction" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "web_search_call" + ], + "title": "WebSearchCallResponseItemType" + } + }, + "title": "WebSearchCallResponseItem" + }, + { + "type": "object", + "required": [ + "result", + "status", + "type" + ], + "properties": { + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "result": { + "type": "string" + }, + "revised_prompt": { + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "image_generation_call" + ], + "title": "ImageGenerationCallResponseItemType" + } + }, + "title": "ImageGenerationCallResponseItem" + }, + { + "type": "object", + "required": [ + "encrypted_content", + "type" + ], + "properties": { + "encrypted_content": { + "type": "string" + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "compaction" + ], + "title": "CompactionResponseItemType" + } + }, + "title": "CompactionResponseItem" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "compaction_trigger" + ], + "title": "CompactionTriggerResponseItemType" + } + }, + "title": "CompactionTriggerResponseItem" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "encrypted_content": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": [ + "string", + "null" + ] + }, + "internal_chat_message_metadata_passthrough": { + "anyOf": [ + { + "$ref": "#/definitions/InternalChatMessageMetadataPassthrough" + }, + { + "type": "null" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "context_compaction" + ], + "title": "ContextCompactionResponseItemType" + } + }, + "title": "ContextCompactionResponseItem" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "other" + ], + "title": "OtherResponseItemType" + } + }, + "title": "OtherResponseItem" + } + ] + }, + "ResponsesApiWebSearchAction": { + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "queries": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchResponsesApiWebSearchActionType" + } + }, + "title": "SearchResponsesApiWebSearchAction" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "open_page" + ], + "title": "OpenPageResponsesApiWebSearchActionType" + }, + "url": { + "type": [ + "string", + "null" + ] + } + }, + "title": "OpenPageResponsesApiWebSearchAction" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "pattern": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "find_in_page" + ], + "title": "FindInPageResponsesApiWebSearchActionType" + }, + "url": { + "type": [ + "string", + "null" + ] + } + }, + "title": "FindInPageResponsesApiWebSearchAction" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "other" + ], + "title": "OtherResponsesApiWebSearchActionType" + } + }, + "title": "OtherResponsesApiWebSearchAction" + } + ] + }, + "SortDirection": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "ThreadResumeInitialTurnsPageParams": { + "type": "object", + "properties": { + "itemsView": { + "description": "How much item detail to include for each returned turn; defaults to summary.", + "anyOf": [ + { + "$ref": "#/definitions/TurnItemsView" + }, + { + "type": "null" + } + ] + }, + "limit": { + "description": "Optional turn page size.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "sortDirection": { + "description": "Optional turn pagination direction; defaults to descending.", + "anyOf": [ + { + "$ref": "#/definitions/SortDirection" + }, + { + "type": "null" + } + ] + } + } + }, + "TurnItemsView": { + "oneOf": [ + { + "description": "`items` was not loaded for this turn. The field is intentionally empty.", + "type": "string", + "enum": [ + "notLoaded" + ] + }, + { + "description": "`items` contains only a display summary for this turn.", + "type": "string", + "enum": [ + "summary" + ] + }, + { + "description": "`items` contains every ThreadItem available from persisted app-server history for this turn.", + "type": "string", + "enum": [ + "full" + ] + } + ] + }, + "ThreadResumeParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadResumeParams", + "description": "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nFor non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.\n\nIf thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "approvalPolicy": { + "anyOf": [ + { + "$ref": "#/definitions/AskForApproval" + }, + { + "type": "null" + } + ] + }, + "approvalsReviewer": { + "description": "Override where approval requests are routed for review on this thread and subsequent turns.", + "anyOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + }, + { + "type": "null" + } + ] + }, + "baseInstructions": { + "type": [ + "string", + "null" + ] + }, + "config": { + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "cwd": { + "type": [ + "string", + "null" + ] + }, + "developerInstructions": { + "type": [ + "string", + "null" + ] + }, + "personality": { + "anyOf": [ + { + "$ref": "#/definitions/Personality" + }, + { + "type": "null" + } + ] + }, + "serviceTier": { + "type": [ + "string", + "null" + ] + }, + "sandbox": { + "anyOf": [ + { + "$ref": "#/definitions/SandboxMode" + }, + { + "type": "null" + } + ] + }, + "model": { + "description": "Configuration overrides for the resumed thread, if any.", + "type": [ + "string", + "null" + ] + }, + "modelProvider": { + "type": [ + "string", + "null" + ] + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadForkParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadForkParams", + "description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.\n\nPrefer using thread_id whenever possible.", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "approvalPolicy": { + "anyOf": [ + { + "$ref": "#/definitions/AskForApproval" + }, + { + "type": "null" + } + ] + }, + "approvalsReviewer": { + "description": "Override where approval requests are routed for review on this thread and subsequent turns.", + "anyOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + }, + { + "type": "null" + } + ] + }, + "baseInstructions": { + "type": [ + "string", + "null" + ] + }, + "threadSource": { + "description": "Optional client-supplied analytics source classification for this forked thread.", + "anyOf": [ + { + "$ref": "#/definitions/ThreadSource" + }, + { + "type": "null" + } + ] + }, + "config": { + "type": [ + "object", + "null" + ], + "additionalProperties": true + }, + "cwd": { + "type": [ + "string", + "null" + ] + }, + "sandbox": { + "anyOf": [ + { + "$ref": "#/definitions/SandboxMode" + }, + { + "type": "null" + } + ] + }, + "developerInstructions": { + "type": [ + "string", + "null" + ] + }, + "ephemeral": { + "type": "boolean" + }, + "threadId": { + "type": "string" + }, + "lastTurnId": { + "description": "Optional last turn id to fork through, inclusive.\n\nWhen specified, turns after `last_turn_id` are omitted from the fork. The referenced turn cannot be in progress.", + "type": [ + "string", + "null" + ] + }, + "model": { + "description": "Configuration overrides for the forked thread, if any.", + "type": [ + "string", + "null" + ] + }, + "modelProvider": { + "type": [ + "string", + "null" + ] + }, + "serviceTier": { + "type": [ + "string", + "null" + ] + } + } + }, + "ThreadArchiveParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadArchiveParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "ThreadDeleteParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadDeleteParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "ThreadUnsubscribeParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadUnsubscribeParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "AccountLoginCompletedNotification": { + "$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" + } + } + }, + "WindowsSandboxSetupCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "WindowsSandboxSetupCompletedNotification", + "type": "object", + "required": [ + "mode", + "success" + ], + "properties": { + "error": { + "type": [ + "string", + "null" + ] + }, + "mode": { + "$ref": "#/definitions/WindowsSandboxSetupMode" + }, + "success": { + "type": "boolean" + } + } + }, + "ThreadSetNameParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadSetNameParams", + "type": "object", + "required": [ + "name", + "threadId" + ], + "properties": { + "name": { + "type": "string" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadGoalStatus": { + "type": "string", + "enum": [ + "active", + "paused", + "blocked", + "usageLimited", + "budgetLimited", + "complete" + ] + }, + "ThreadGoalSetParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadGoalSetParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "objective": { + "type": [ + "string", + "null" + ] + }, + "status": { + "anyOf": [ + { + "$ref": "#/definitions/ThreadGoalStatus" + }, + { + "type": "null" + } + ] + }, + "threadId": { + "type": "string" + }, + "tokenBudget": { + "type": [ + "integer", + "null" + ], + "format": "int64" + } + } + }, + "ThreadGoalGetParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadGoalGetParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "ThreadGoalClearParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadGoalClearParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "ThreadMetadataGitInfoUpdateParams": { + "type": "object", + "properties": { + "branch": { + "description": "Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.", + "type": [ + "string", + "null" + ] + }, + "originUrl": { + "description": "Omit to leave the stored origin URL unchanged, set to `null` to clear it, or provide a non-empty string to replace it.", + "type": [ + "string", + "null" + ] + }, + "sha": { + "description": "Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.", + "type": [ + "string", + "null" + ] + } + } + }, + "ThreadMetadataUpdateParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadMetadataUpdateParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "gitInfo": { + "description": "Patch the stored Git metadata for this thread. Omit a field to leave it unchanged, set it to `null` to clear it, or provide a string to replace the stored value.", + "anyOf": [ + { + "$ref": "#/definitions/ThreadMetadataGitInfoUpdateParams" + }, + { + "type": "null" + } + ] + }, + "threadId": { + "type": "string" + } + } + }, + "CollaborationMode": { + "description": "Collaboration mode for a Codex session.", + "type": "object", + "required": [ + "mode", + "settings" + ], + "properties": { + "mode": { + "$ref": "#/definitions/ModeKind" + }, + "settings": { + "$ref": "#/definitions/Settings" + } + } + }, + "ModeKind": { + "description": "Initial collaboration mode to use when the TUI starts.", + "type": "string", + "enum": [ + "plan", + "default" + ] + }, + "NetworkAccess": { + "type": "string", + "enum": [ + "restricted", + "enabled" + ] + }, + "ReasoningEffort": { + "description": "A non-empty reasoning effort value advertised by the model.", + "type": "string", + "minLength": 1 + }, + "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" + ] + } + ] + }, + "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" + } + ] + }, + "Settings": { + "description": "Settings for a collaboration mode.", + "type": "object", + "required": [ + "model" + ], + "properties": { + "developer_instructions": { + "type": [ + "string", + "null" + ] + }, + "model": { + "type": "string" + }, + "reasoning_effort": { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + } + } + }, + "WindowsWorldWritableWarningNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "WindowsWorldWritableWarningNotification", + "type": "object", + "required": [ + "extraCount", + "failedScan", + "samplePaths" + ], + "properties": { + "extraCount": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "failedScan": { + "type": "boolean" + }, + "samplePaths": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ThreadMemoryMode": { + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + }, + "ThreadRealtimeClosedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRealtimeClosedNotification", + "description": "EXPERIMENTAL - emitted when thread realtime transport closes.", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "reason": { + "type": [ + "string", + "null" + ] + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadUnarchiveParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadUnarchiveParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "ThreadCompactStartParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadCompactStartParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "ThreadShellCommandParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadShellCommandParams", + "type": "object", + "required": [ + "command", + "threadId" + ], + "properties": { + "command": { + "description": "Shell command string evaluated by the thread's configured shell. Unlike `command/exec`, this intentionally preserves shell syntax such as pipes, redirects, and quoting. This runs unsandboxed with full access rather than inheriting the thread sandbox policy.", + "type": "string" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadApproveGuardianDeniedActionParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadApproveGuardianDeniedActionParams", + "type": "object", + "required": [ + "event", + "threadId" + ], + "properties": { + "event": { + "description": "Serialized `codex_protocol::protocol::GuardianAssessmentEvent`." + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadRealtimeErrorNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRealtimeErrorNotification", + "description": "EXPERIMENTAL - emitted when thread realtime encounters an error.", + "type": "object", + "required": [ + "message", + "threadId" + ], + "properties": { + "message": { + "type": "string" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadRealtimeSdpNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRealtimeSdpNotification", + "description": "EXPERIMENTAL - emitted with the remote SDP for a WebRTC realtime session.", + "type": "object", + "required": [ + "sdp", + "threadId" + ], + "properties": { + "sdp": { + "type": "string" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadRealtimeOutputAudioDeltaNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRealtimeOutputAudioDeltaNotification", + "description": "EXPERIMENTAL - streamed output audio emitted by thread realtime.", + "type": "object", + "required": [ + "audio", + "threadId" + ], + "properties": { + "audio": { + "$ref": "#/definitions/ThreadRealtimeAudioChunk" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadRollbackParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRollbackParams", + "description": "DEPRECATED: `thread/rollback` will be removed soon.", + "type": "object", + "required": [ + "numTurns", + "threadId" + ], + "properties": { + "numTurns": { + "description": "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.", + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadListCwdFilter": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ThreadSortKey": { + "type": "string", + "enum": [ + "created_at", + "updated_at", + "recency_at" + ] + }, + "ThreadSourceKind": { + "type": "string", + "enum": [ + "cli", + "vscode", + "exec", + "appServer", + "subAgent", + "subAgentReview", + "subAgentCompact", + "subAgentThreadSpawn", + "subAgentOther", + "unknown" + ] + }, + "ThreadListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadListParams", + "type": "object", + "properties": { + "sourceKinds": { + "description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/ThreadSourceKind" + } + }, + "archived": { + "description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.", + "type": [ + "boolean", + "null" + ] + }, + "cursor": { + "description": "Opaque pagination cursor returned by a previous call.", + "type": [ + "string", + "null" + ] + }, + "cwd": { + "description": "Optional cwd filter or filters; when set, only threads whose session cwd exactly matches one of these paths are returned.", + "anyOf": [ + { + "$ref": "#/definitions/ThreadListCwdFilter" + }, + { + "type": "null" + } + ] + }, + "limit": { + "description": "Optional page size; defaults to a reasonable server-side value.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "modelProviders": { + "description": "Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "useStateDbOnly": { + "description": "If true, return from the state DB without scanning JSONL rollouts to repair thread metadata. Omitted or false preserves scan-and-repair behavior.", + "type": "boolean" + }, + "searchTerm": { + "description": "Optional substring filter for the extracted thread title.", + "type": [ + "string", + "null" + ] + }, + "sortDirection": { + "description": "Optional sort direction; defaults to descending (newest first).", + "anyOf": [ + { + "$ref": "#/definitions/SortDirection" + }, + { + "type": "null" + } + ] + }, + "sortKey": { + "description": "Optional sort key; defaults to created_at.", + "anyOf": [ + { + "$ref": "#/definitions/ThreadSortKey" + }, + { + "type": "null" + } + ] + } + } + }, + "ThreadRealtimeTranscriptDoneNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRealtimeTranscriptDoneNotification", + "description": "EXPERIMENTAL - final transcript text emitted when realtime completes a transcript part.", + "type": "object", + "required": [ + "role", + "text", + "threadId" + ], + "properties": { + "role": { + "type": "string" + }, + "text": { + "description": "Final complete text for the transcript part.", + "type": "string" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadRealtimeTranscriptDeltaNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRealtimeTranscriptDeltaNotification", + "description": "EXPERIMENTAL - flat transcript delta emitted whenever realtime transcript text changes.", + "type": "object", + "required": [ + "delta", + "role", + "threadId" + ], + "properties": { + "delta": { + "description": "Live transcript delta from the realtime event.", + "type": "string" + }, + "role": { + "type": "string" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadLoadedListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadLoadedListParams", + "type": "object", + "properties": { + "cursor": { + "description": "Opaque pagination cursor returned by a previous call.", + "type": [ + "string", + "null" + ] + }, + "limit": { + "description": "Optional page size; defaults to no limit.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + } + } + }, + "ThreadReadParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadReadParams", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "includeTurns": { + "description": "When true, include turns and their items from rollout history.", + "type": "boolean" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadRealtimeItemAddedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRealtimeItemAddedNotification", + "description": "EXPERIMENTAL - raw non-audio thread realtime item emitted by the backend.", + "type": "object", + "required": [ + "item", + "threadId" + ], + "properties": { + "item": true, + "threadId": { + "type": "string" + } + } + }, + "ThreadRealtimeStartedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRealtimeStartedNotification", + "description": "EXPERIMENTAL - emitted when thread realtime startup is accepted.", + "type": "object", + "required": [ + "threadId", + "version" + ], + "properties": { + "realtimeSessionId": { + "type": [ + "string", + "null" + ] + }, + "threadId": { + "type": "string" + }, + "version": { + "$ref": "#/definitions/RealtimeConversationVersion" + } + } + }, + "ThreadInjectItemsParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadInjectItemsParams", + "type": "object", + "required": [ + "items", + "threadId" + ], + "properties": { + "items": { + "description": "Raw Responses API items to append to the thread's model-visible history.", + "type": "array", + "items": true + }, + "threadId": { + "type": "string" + } + } + }, + "SkillsListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SkillsListParams", + "type": "object", + "properties": { + "cwds": { + "description": "When empty, defaults to the current session working directory.", + "type": "array", + "items": { + "type": "string" + } + }, + "forceReload": { + "description": "When true, bypass the skills cache and re-scan skills from disk.", + "type": "boolean" + } + } + }, + "SkillsExtraRootsSetParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SkillsExtraRootsSetParams", + "type": "object", + "required": [ + "extraRoots" + ], + "properties": { + "extraRoots": { + "type": "array", + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + } + } + }, + "HooksListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "HooksListParams", + "type": "object", + "properties": { + "cwds": { + "description": "When empty, defaults to the current session working directory.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "MarketplaceAddParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MarketplaceAddParams", + "type": "object", + "required": [ + "source" + ], + "properties": { + "refName": { + "type": [ + "string", + "null" + ] + }, + "source": { + "type": "string" + }, + "sparsePaths": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + } + }, + "MarketplaceRemoveParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MarketplaceRemoveParams", + "type": "object", + "required": [ + "marketplaceName" + ], + "properties": { + "marketplaceName": { + "type": "string" + } + } + }, + "MarketplaceUpgradeParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MarketplaceUpgradeParams", + "type": "object", + "properties": { + "marketplaceName": { + "type": [ + "string", + "null" + ] + } + } + }, + "PluginListMarketplaceKind": { + "type": "string", + "enum": [ + "local", + "vertical", + "workspace-directory", + "shared-with-me", + "created-by-me-remote" + ] + }, + "PluginListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginListParams", + "type": "object", + "properties": { + "cwds": { + "description": "Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + }, + "marketplaceKinds": { + "description": "Optional marketplace kind filter. When omitted, only local marketplaces are queried, plus the default remote catalog when enabled by feature flag.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/PluginListMarketplaceKind" + } + } + } + }, + "PluginInstalledParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginInstalledParams", + "type": "object", + "properties": { + "cwds": { + "description": "Optional working directories used to discover repo marketplaces.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + }, + "installSuggestionPluginNames": { + "description": "Additional uninstalled plugin names that should be returned when present locally. This is used by mention surfaces that intentionally expose install entrypoints.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + } + }, + "PluginReadParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginReadParams", + "type": "object", + "required": [ + "pluginName" + ], + "properties": { + "marketplacePath": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "pluginName": { + "type": "string" + }, + "remoteMarketplaceName": { + "type": [ + "string", + "null" + ] + } + } + }, + "PluginSkillReadParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginSkillReadParams", + "type": "object", + "required": [ + "remoteMarketplaceName", + "remotePluginId", + "skillName" + ], + "properties": { + "remoteMarketplaceName": { + "type": "string" + }, + "remotePluginId": { + "type": "string" + }, + "skillName": { + "type": "string" + } + } + }, + "PluginShareDiscoverability": { + "type": "string", + "enum": [ + "LISTED", + "UNLISTED", + "PRIVATE" + ] + }, + "PluginSharePrincipalType": { + "type": "string", + "enum": [ + "user", + "group", + "workspace" + ] + }, + "PluginShareTarget": { + "type": "object", + "required": [ + "principalId", + "principalType", + "role" + ], + "properties": { + "principalId": { + "type": "string" + }, + "principalType": { + "$ref": "#/definitions/PluginSharePrincipalType" + }, + "role": { + "$ref": "#/definitions/PluginShareTargetRole" + } + } + }, + "PluginShareTargetRole": { + "type": "string", + "enum": [ + "reader", + "editor" + ] + }, + "PluginShareSaveParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareSaveParams", + "type": "object", + "required": [ + "pluginPath" + ], + "properties": { + "discoverability": { + "anyOf": [ + { + "$ref": "#/definitions/PluginShareDiscoverability" + }, + { + "type": "null" + } + ] + }, + "pluginPath": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "remotePluginId": { + "type": [ + "string", + "null" + ] + }, + "shareTargets": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/PluginShareTarget" + } + } + } + }, + "PluginShareUpdateDiscoverability": { + "type": "string", + "enum": [ + "UNLISTED", + "PRIVATE", + "LISTED" + ] + }, + "PluginShareUpdateTargetsParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareUpdateTargetsParams", + "type": "object", + "required": [ + "discoverability", + "remotePluginId", + "shareTargets" + ], + "properties": { + "discoverability": { + "$ref": "#/definitions/PluginShareUpdateDiscoverability" + }, + "remotePluginId": { + "type": "string" + }, + "shareTargets": { + "type": "array", + "items": { + "$ref": "#/definitions/PluginShareTarget" + } + } + } + }, + "PluginShareListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareListParams", + "type": "object" + }, + "PluginShareCheckoutParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareCheckoutParams", + "type": "object", + "required": [ + "remotePluginId" + ], + "properties": { + "remotePluginId": { + "type": "string" + } + } + }, + "PluginShareDeleteParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareDeleteParams", + "type": "object", + "required": [ + "remotePluginId" + ], + "properties": { + "remotePluginId": { + "type": "string" + } + } + }, + "AppsReadParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AppsReadParams", + "description": "EXPERIMENTAL - read metadata for specific apps/connectors.", + "type": "object", + "required": [ + "appIds" + ], + "properties": { + "appIds": { + "description": "App ids to read. The server accepts at most 100 ids and deduplicates repeated ids while preserving their first-request order.", + "type": "array", + "items": { + "type": "string" + } + }, + "includeTools": { + "description": "When true, include display-only public tool summaries in the returned metadata.", + "type": "boolean" + } + } + }, + "AppsListParams": { + "$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" + ] + } + } + }, + "AppsInstalledParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AppsInstalledParams", + "description": "Read the committed installed connector runtime snapshot.", + "type": "object", + "properties": { + "forceRefresh": { + "description": "When true and Apps are permitted, refresh and publish the hosted connector runtime tool snapshot first.", + "type": "boolean" + }, + "threadId": { + "description": "Optional loaded thread id used to evaluate effective app configuration.", + "type": [ + "string", + "null" + ] + } + } + }, + "FsReadFileParams": { + "$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" + } + ] + } + } + }, + "FsWriteFileParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FsWriteFileParams", + "description": "Write a file on the host filesystem.", + "type": "object", + "required": [ + "dataBase64", + "path" + ], + "properties": { + "dataBase64": { + "description": "File contents encoded as base64.", + "type": "string" + }, + "path": { + "description": "Absolute path to write.", + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] + } + } + }, + "FsCreateDirectoryParams": { + "$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" + ] + } + } + }, + "FsGetMetadataParams": { + "$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" + } + ] + } + } + }, + "FsReadDirectoryParams": { + "$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" + } + ] + } + } + }, + "FsRemoveParams": { + "$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" + ] + } + } + }, + "FsCopyParams": { + "$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" + } + ] + } + } + }, + "FsWatchParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FsWatchParams", + "description": "Start filesystem watch notifications for an absolute path.", + "type": "object", + "required": [ + "path", + "watchId" + ], + "properties": { + "path": { + "description": "Absolute file or directory path to watch.", + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] + }, + "watchId": { + "description": "Connection-scoped watch identifier used for `fs/unwatch` and `fs/changed`.", + "type": "string" + } + } + }, + "FsUnwatchParams": { + "$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" + } + } + }, + "SkillsConfigWriteParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SkillsConfigWriteParams", + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "name": { + "description": "Name-based selector.", + "type": [ + "string", + "null" + ] + }, + "path": { + "description": "Path-based selector.", + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + } + } + }, + "PluginInstallParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginInstallParams", + "type": "object", + "required": [ + "pluginName" + ], + "properties": { + "marketplacePath": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "pluginName": { + "type": "string" + }, + "remoteMarketplaceName": { + "type": [ + "string", + "null" + ] + } + } + }, + "PluginUninstallParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginUninstallParams", + "type": "object", + "required": [ + "pluginId" + ], + "properties": { + "pluginId": { + "type": "string" + } + } + }, + "AdditionalContextEntry": { + "type": "object", + "required": [ + "kind", + "value" + ], + "properties": { + "kind": { + "$ref": "#/definitions/AdditionalContextKind" + }, + "value": { + "type": "string" + } + } + }, + "AdditionalContextKind": { + "type": "string", + "enum": [ + "untrusted", + "application" + ] + }, + "ByteRange": { + "type": "object", + "required": [ + "end", + "start" + ], + "properties": { + "end": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "start": { + "type": "integer", + "format": "uint", + "minimum": 0.0 + } + } + }, + "TextElement": { + "type": "object", + "required": [ + "byteRange" + ], + "properties": { + "byteRange": { + "description": "Byte range in the parent `text` buffer that this element occupies.", + "allOf": [ + { + "$ref": "#/definitions/ByteRange" + } + ] + }, + "placeholder": { + "description": "Optional human-readable placeholder for the element, displayed in the UI.", + "type": [ + "string", + "null" + ] + } + } + }, + "UserInput": { + "oneOf": [ + { + "type": "object", + "required": [ + "text", + "type" + ], + "properties": { + "text": { + "type": "string" + }, + "text_elements": { + "description": "UI-defined spans within `text` used to render or persist special elements.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/TextElement" + } + }, + "type": { + "type": "string", + "enum": [ + "text" + ], + "title": "TextUserInputType" + } + }, + "title": "TextUserInput" + }, + { + "type": "object", + "required": [ + "type", + "url" + ], + "properties": { + "detail": { + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/ImageDetail" + }, + { + "type": "null" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "image" + ], + "title": "ImageUserInputType" + }, + "url": { + "type": "string" + } + }, + "title": "ImageUserInput" + }, + { + "type": "object", + "required": [ + "path", + "type" + ], + "properties": { + "detail": { + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/ImageDetail" + }, + { + "type": "null" + } + ] + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "localImage" + ], + "title": "LocalImageUserInputType" + } + }, + "title": "LocalImageUserInput" + }, + { + "type": "object", + "required": [ + "type", + "url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "audio" + ], + "title": "AudioUserInputType" + }, + "url": { + "type": "string" + } + }, + "title": "AudioUserInput" + }, + { + "type": "object", + "required": [ + "path", + "type" + ], + "properties": { + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "localAudio" + ], + "title": "LocalAudioUserInputType" + } + }, + "title": "LocalAudioUserInput" + }, + { + "type": "object", + "required": [ + "name", + "path", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "skill" + ], + "title": "SkillUserInputType" + } + }, + "title": "SkillUserInput" + }, + { + "type": "object", + "required": [ + "name", + "path", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "mention" + ], + "title": "MentionUserInputType" + } + }, + "title": "MentionUserInput" + } + ] + }, + "TurnStartParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnStartParams", + "type": "object", + "required": [ + "input", + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + }, + "approvalPolicy": { + "description": "Override the approval policy for this turn and subsequent turns.", + "anyOf": [ + { + "$ref": "#/definitions/AskForApproval" + }, + { + "type": "null" + } + ] + }, + "approvalsReviewer": { + "description": "Override where approval requests are routed for review on this turn and subsequent turns.", + "anyOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + }, + { + "type": "null" + } + ] + }, + "clientUserMessageId": { + "type": [ + "string", + "null" + ] + }, + "serviceTier": { + "description": "Override the service tier for this turn and subsequent turns.", + "type": [ + "string", + "null" + ] + }, + "cwd": { + "description": "Override the working directory for this turn and subsequent turns.", + "type": [ + "string", + "null" + ] + }, + "effort": { + "description": "Override the reasoning effort for this turn and subsequent turns.", + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + }, + "sandboxPolicy": { + "description": "Override the sandbox policy for this turn and subsequent turns.", + "anyOf": [ + { + "$ref": "#/definitions/SandboxPolicy" + }, + { + "type": "null" + } + ] + }, + "input": { + "type": "array", + "items": { + "$ref": "#/definitions/UserInput" + } + }, + "model": { + "description": "Override the model for this turn and subsequent turns.", + "type": [ + "string", + "null" + ] + }, + "summary": { + "description": "Override the reasoning summary for this turn and subsequent turns.", + "anyOf": [ + { + "$ref": "#/definitions/ReasoningSummary" + }, + { + "type": "null" + } + ] + }, + "outputSchema": { + "description": "Optional JSON Schema used to constrain the final assistant message for this turn." + }, + "personality": { + "description": "Override the personality for this turn and subsequent turns.", + "anyOf": [ + { + "$ref": "#/definitions/Personality" + }, + { + "type": "null" + } + ] + } + } + }, + "TurnSteerParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnSteerParams", + "type": "object", + "required": [ + "expectedTurnId", + "input", + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + }, + "clientUserMessageId": { + "type": [ + "string", + "null" + ] + }, + "expectedTurnId": { + "description": "Required active turn id precondition. The request fails when it does not match the currently active turn.", + "type": "string" + }, + "input": { + "type": "array", + "items": { + "$ref": "#/definitions/UserInput" + } + } + } + }, + "TurnInterruptParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnInterruptParams", + "type": "object", + "required": [ + "threadId", + "turnId" + ], + "properties": { + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "CodexResponseHandoffMode": { + "type": "string", + "enum": [ + "thinking", + "commentary", + "bemTags" + ] + }, + "ConversationTextRole": { + "type": "string", + "enum": [ + "user", + "developer", + "assistant" + ] + }, + "RealtimeConversationVersion": { + "type": "string", + "enum": [ + "v1", + "v2", + "v3" + ] + }, + "RealtimeOutputModality": { + "type": "string", + "enum": [ + "text", + "audio" + ] + }, + "RealtimeVoice": { + "type": "string", + "enum": [ + "alloy", + "arbor", + "ash", + "ballad", + "breeze", + "cedar", + "coral", + "cove", + "echo", + "ember", + "juniper", + "maple", + "marin", + "sage", + "shimmer", + "sol", + "spruce", + "vale", + "verse" + ] + }, + "ThreadRealtimeInitialItem": { + "description": "EXPERIMENTAL - role-bearing text item included when a realtime V3 session starts.", + "type": "object", + "required": [ + "role", + "text" + ], + "properties": { + "role": { + "$ref": "#/definitions/ConversationTextRole" + }, + "text": { + "type": "string" + } + } + }, + "ThreadRealtimeStartTransport": { + "description": "EXPERIMENTAL - transport used by thread realtime.", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "websocket" + ], + "title": "WebsocketThreadRealtimeStartTransportType" + } + }, + "title": "WebsocketThreadRealtimeStartTransport" + }, + { + "type": "object", + "required": [ + "sdp", + "type" + ], + "properties": { + "sdp": { + "description": "SDP offer generated by a WebRTC RTCPeerConnection after configuring audio and the realtime events data channel.", + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "webrtc" + ], + "title": "WebrtcThreadRealtimeStartTransportType" + } + }, + "title": "WebrtcThreadRealtimeStartTransport" + } + ] + }, + "ConfigWarningNotification": { + "$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" + } + } + }, + "ThreadRealtimeAudioChunk": { + "description": "EXPERIMENTAL - thread realtime audio chunk.", + "type": "object", + "required": [ + "data", + "numChannels", + "sampleRate" + ], + "properties": { + "data": { + "type": "string" + }, + "itemId": { + "type": [ + "string", + "null" + ] + }, + "numChannels": { + "type": "integer", + "format": "uint16", + "minimum": 0.0 + }, + "sampleRate": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "samplesPerChannel": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + } + } + }, + "TextRange": { + "type": "object", + "required": [ + "end", + "start" + ], + "properties": { + "end": { + "$ref": "#/definitions/TextPosition" + }, + "start": { + "$ref": "#/definitions/TextPosition" + } + } + }, + "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 + } + } + }, + "DeprecationNoticeNotification": { + "$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" + } + } + }, + "GuardianWarningNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GuardianWarningNotification", + "type": "object", + "required": [ + "message", + "threadId" + ], + "properties": { + "message": { + "description": "Concise guardian warning message for the user.", + "type": "string" + }, + "threadId": { + "description": "Thread target for the guardian warning.", + "type": "string" + } + } + }, + "WarningNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "WarningNotification", + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "description": "Concise warning message for the user.", + "type": "string" + }, + "threadId": { + "description": "Optional thread target when the warning applies to a specific thread.", + "type": [ + "string", + "null" + ] + } + } + }, + "ReviewDelivery": { + "type": "string", + "enum": [ + "inline", + "detached" + ] + }, + "ReviewTarget": { + "oneOf": [ + { + "description": "Review the working tree: staged, unstaged, and untracked files.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "uncommittedChanges" + ], + "title": "UncommittedChangesReviewTargetType" + } + }, + "title": "UncommittedChangesReviewTarget" + }, + { + "description": "Review changes between the current branch and the given base branch.", + "type": "object", + "required": [ + "branch", + "type" + ], + "properties": { + "branch": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "baseBranch" + ], + "title": "BaseBranchReviewTargetType" + } + }, + "title": "BaseBranchReviewTarget" + }, + { + "description": "Review the changes introduced by a specific commit.", + "type": "object", + "required": [ + "sha", + "type" + ], + "properties": { + "sha": { + "type": "string" + }, + "title": { + "description": "Optional human-readable label (e.g., commit subject) for UIs.", + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "commit" + ], + "title": "CommitReviewTargetType" + } + }, + "title": "CommitReviewTarget" + }, + { + "description": "Arbitrary instructions, equivalent to the old free-form prompt.", + "type": "object", + "required": [ + "instructions", + "type" + ], + "properties": { + "instructions": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "custom" + ], + "title": "CustomReviewTargetType" + } + }, + "title": "CustomReviewTarget" + } + ] + }, + "ReviewStartParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ReviewStartParams", + "type": "object", + "required": [ + "target", + "threadId" + ], + "properties": { + "delivery": { + "description": "Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`).", + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/ReviewDelivery" + }, + { + "type": "null" + } + ] + }, + "target": { + "$ref": "#/definitions/ReviewTarget" + }, + "threadId": { + "type": "string" + } + } + }, + "ModelListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModelListParams", + "type": "object", + "properties": { + "cursor": { + "description": "Opaque pagination cursor returned by a previous call.", + "type": [ + "string", + "null" + ] + }, + "includeHidden": { + "description": "When true, include models that are hidden from the default picker list.", + "type": [ + "boolean", + "null" + ] + }, + "limit": { + "description": "Optional page size; defaults to a reasonable server-side value.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + } + } + }, + "ModelProviderCapabilitiesReadParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModelProviderCapabilitiesReadParams", + "type": "object" + }, + "ExperimentalFeatureListParams": { + "$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" + ] + } + } + }, + "PermissionProfileListParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PermissionProfileListParams", + "type": "object", + "properties": { + "cursor": { + "description": "Opaque pagination cursor returned by a previous call.", + "type": [ + "string", + "null" + ] + }, + "cwd": { + "description": "Optional working directory to resolve project config layers.", + "type": [ + "string", + "null" + ] + }, + "limit": { + "description": "Optional page size; defaults to the full result set.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + } + } + }, + "ExperimentalFeatureEnablementSetParams": { + "$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" + } + } + } + }, + "RemoteControlEnableParams": { + "type": "object", + "properties": { + "ephemeral": { + "type": "boolean" + } + } + }, + "ModelSafetyBufferingUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModelSafetyBufferingUpdatedNotification", + "type": "object", + "required": [ + "model", + "reasons", + "showBufferingUi", + "threadId", + "turnId", + "useCases" + ], + "properties": { + "fasterModel": { + "type": [ + "string", + "null" + ] + }, + "model": { + "type": "string" + }, + "reasons": { + "type": "array", + "items": { + "type": "string" + } + }, + "showBufferingUi": { + "type": "boolean" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + }, + "useCases": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "RemoteControlDisableParams": { + "type": "object", + "properties": { + "ephemeral": { + "type": "boolean" + } + } + }, + "TurnModerationMetadataNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnModerationMetadataNotification", + "type": "object", + "required": [ + "metadata", + "threadId", + "turnId" + ], + "properties": { + "metadata": true, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "ModelVerificationNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModelVerificationNotification", + "type": "object", + "required": [ + "threadId", + "turnId", + "verifications" + ], + "properties": { + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + }, + "verifications": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelVerification" + } + } + } + }, + "ModelVerification": { + "type": "string", + "enum": [ + "trustedAccessForCyber" + ] + }, + "ModelReroutedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModelReroutedNotification", + "type": "object", + "required": [ + "fromModel", + "reason", + "threadId", + "toModel", + "turnId" + ], + "properties": { + "fromModel": { + "type": "string" + }, + "reason": { + "$ref": "#/definitions/ModelRerouteReason" + }, + "threadId": { + "type": "string" + }, + "toModel": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "ModelRerouteReason": { + "type": "string", + "enum": [ + "highRiskCyberActivity" + ] + }, + "ContextCompactedNotification": { + "$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" + } + } + }, + "ReasoningTextDeltaNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ReasoningTextDeltaNotification", + "type": "object", + "required": [ + "contentIndex", + "delta", + "itemId", + "threadId", + "turnId" + ], + "properties": { + "contentIndex": { + "type": "integer", + "format": "int64" + }, + "delta": { + "type": "string" + }, + "itemId": { + "type": "string" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "ReasoningSummaryPartAddedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ReasoningSummaryPartAddedNotification", + "type": "object", + "required": [ + "itemId", + "summaryIndex", + "threadId", + "turnId" + ], + "properties": { + "itemId": { + "type": "string" + }, + "summaryIndex": { + "type": "integer", + "format": "int64" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "ReasoningSummaryTextDeltaNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ReasoningSummaryTextDeltaNotification", + "type": "object", + "required": [ + "delta", + "itemId", + "summaryIndex", + "threadId", + "turnId" + ], + "properties": { + "delta": { + "type": "string" + }, + "itemId": { + "type": "string" + }, + "summaryIndex": { + "type": "integer", + "format": "int64" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "FsChangedNotification": { + "$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" + } + } + }, + "ExternalAgentConfigImportCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExternalAgentConfigImportCompletedNotification", + "type": "object", + "required": [ + "importId", + "itemTypeResults" + ], + "properties": { + "importId": { + "type": "string" + }, + "itemTypeResults": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentConfigImportTypeResult" + } + } + } + }, + "McpServerOauthLoginParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpServerOauthLoginParams", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "scopes": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "threadId": { + "type": [ + "string", + "null" + ] + }, + "timeoutSecs": { + "type": [ + "integer", + "null" + ], + "format": "int64" + } + } + }, + "McpServerStatusDetail": { + "type": "string", + "enum": [ + "full", + "toolsAndAuthOnly" + ] + }, + "ListMcpServerStatusParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ListMcpServerStatusParams", + "type": "object", + "properties": { + "cursor": { + "description": "Opaque pagination cursor returned by a previous call.", + "type": [ + "string", + "null" + ] + }, + "detail": { + "description": "Controls how much MCP inventory data to fetch for each server. Defaults to `Full` when omitted.", + "anyOf": [ + { + "$ref": "#/definitions/McpServerStatusDetail" + }, + { + "type": "null" + } + ] + }, + "limit": { + "description": "Optional page size; defaults to a server-defined value.", + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "threadId": { + "type": [ + "string", + "null" + ] + } + } + }, + "McpResourceReadParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpResourceReadParams", + "type": "object", + "required": [ + "server", + "uri" + ], + "properties": { + "server": { + "type": "string" + }, + "threadId": { + "type": [ + "string", + "null" + ] + }, + "uri": { + "type": "string" + } + } + }, + "McpServerToolCallParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpServerToolCallParams", + "type": "object", + "required": [ + "server", + "threadId", + "tool" + ], + "properties": { + "_meta": true, + "arguments": true, + "server": { + "type": "string" + }, + "threadId": { + "type": "string" + }, + "tool": { + "type": "string" + } + } + }, + "WindowsSandboxSetupMode": { + "type": "string", + "enum": [ + "elevated", + "unelevated" + ] + }, + "WindowsSandboxSetupStartParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "WindowsSandboxSetupStartParams", + "type": "object", + "required": [ + "mode" + ], + "properties": { + "cwd": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "mode": { + "$ref": "#/definitions/WindowsSandboxSetupMode" + } + } + }, + "LoginAppBrand": { + "type": "string", + "enum": [ + "codex", + "chatgpt" + ] + }, + "LoginAccountParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "LoginAccountParams", + "oneOf": [ + { + "type": "object", + "required": [ + "apiKey", + "type" + ], + "properties": { + "apiKey": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "apiKey" + ], + "title": "ApiKeyv2::LoginAccountParamsType" + } + }, + "title": "ApiKeyv2::LoginAccountParams" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "appBrand": { + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/LoginAppBrand" + }, + { + "type": "null" + } + ] + }, + "codexStreamlinedLogin": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "chatgpt" + ], + "title": "Chatgptv2::LoginAccountParamsType" + }, + "useHostedLoginSuccessPage": { + "type": "boolean" + } + }, + "title": "Chatgptv2::LoginAccountParams" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "chatgptDeviceCode" + ], + "title": "ChatgptDeviceCodev2::LoginAccountParamsType" + } + }, + "title": "ChatgptDeviceCodev2::LoginAccountParams" + }, + { + "description": "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE. The access token must contain the same scopes that Codex-managed ChatGPT auth tokens have.", + "type": "object", + "required": [ + "accessToken", + "chatgptAccountId", + "type" + ], + "properties": { + "accessToken": { + "description": "Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.", + "type": "string" + }, + "chatgptAccountId": { + "description": "Workspace/account identifier supplied by the client.", + "type": "string" + }, + "chatgptPlanType": { + "description": "Optional plan type supplied by the client.\n\nWhen `null`, Codex attempts to derive the plan type from access-token claims. If unavailable, the plan defaults to `unknown`.", + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "chatgptAuthTokens" + ], + "title": "ChatgptAuthTokensv2::LoginAccountParamsType" + } + }, + "title": "ChatgptAuthTokensv2::LoginAccountParams" + }, + { + "description": "[UNSTABLE] Managed Amazon Bedrock login is experimental.", + "type": "object", + "required": [ + "apiKey", + "region", + "type" + ], + "properties": { + "apiKey": { + "type": "string" + }, + "region": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "amazonBedrock" + ], + "title": "AmazonBedrockv2::LoginAccountParamsType" + } + }, + "title": "AmazonBedrockv2::LoginAccountParams" + } + ] + }, + "CancelLoginAccountParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CancelLoginAccountParams", + "type": "object", + "required": [ + "loginId" + ], + "properties": { + "loginId": { + "type": "string" + } + } + }, + "ConsumeAccountRateLimitResetCreditParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConsumeAccountRateLimitResetCreditParams", + "type": "object", + "required": [ + "idempotencyKey" + ], + "properties": { + "creditId": { + "description": "Opaque reset-credit identifier to redeem. When omitted, the backend selects the next available credit.", + "type": [ + "string", + "null" + ] + }, + "idempotencyKey": { + "description": "Identifies one logical reset attempt. A UUID is recommended; reuse the same value when retrying that attempt.", + "type": "string" + } + } + }, + "AddCreditsNudgeCreditType": { + "type": "string", + "enum": [ + "credits", + "usage_limit" + ] + }, + "SendAddCreditsNudgeEmailParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SendAddCreditsNudgeEmailParams", + "type": "object", + "required": [ + "creditType" + ], + "properties": { + "creditType": { + "$ref": "#/definitions/AddCreditsNudgeCreditType" + } + } + }, + "FeedbackUploadParams": { + "$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" + ] + } + } + }, + "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 + } + } + }, + "CommandExecParams": { + "$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" + } + } + }, + "CommandExecWriteParams": { + "$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" + } + } + }, + "CommandExecTerminateParams": { + "$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" + } + } + }, + "CommandExecResizeParams": { + "$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" + } + ] + } + } + }, + "ProcessTerminalSize": { + "description": "PTY size in character cells for `process/spawn` 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 + } + } + }, + "ExternalAgentConfigImportProgressNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExternalAgentConfigImportProgressNotification", + "type": "object", + "required": [ + "importId", + "itemTypeResults" + ], + "properties": { + "importId": { + "type": "string" + }, + "itemTypeResults": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentConfigImportTypeResult" + } + } + } + }, + "ExternalAgentConfigImportTypeResult": { + "type": "object", + "required": [ + "failures", + "itemType", + "successes" + ], + "properties": { + "failures": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentConfigImportItemTypeFailure" + } + }, + "itemType": { + "$ref": "#/definitions/ExternalAgentConfigMigrationItemType" + }, + "successes": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentConfigImportItemTypeSuccess" + } + } + } + }, + "RemoteControlStatusChangedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RemoteControlStatusChangedNotification", + "description": "Current remote-control connection status and remote identity exposed to clients.", + "type": "object", + "required": [ + "installationId", + "serverName", + "status" + ], + "properties": { + "environmentId": { + "type": [ + "string", + "null" + ] + }, + "installationId": { + "type": "string" + }, + "serverName": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/RemoteControlConnectionStatus" + } + } + }, + "AppListUpdatedNotification": { + "$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" + } + } + } + }, + "ConfigReadParams": { + "$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" + } + } + }, + "ExternalAgentConfigDetectParams": { + "$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 directory.", + "type": "boolean" + }, + "migrationSource": { + "description": "Optional migration-source selector. Missing or unrecognized values use the default source.", + "type": [ + "string", + "null" + ] + }, + "source": { + "description": "Deprecated field retained for compatibility. This field is ignored; use `migrationSource` to select the migration source.", + "type": [ + "string", + "null" + ] + } + } + }, + "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", + "MEMORY", + "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" + } + }, + "memory": { + "type": "array", + "items": { + "type": "string" + } + }, + "plugins": { + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/PluginsMigration" + } + }, + "sessions": { + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/SessionMigration" + } + }, + "skills": { + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/SkillMigration" + } + }, + "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" + ] + } + } + }, + "SkillMigration": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "SubagentMigration": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "ExternalAgentConfigImportParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExternalAgentConfigImportParams", + "type": "object", + "required": [ + "migrationItems" + ], + "properties": { + "migrationItems": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentConfigMigrationItem" + } + }, + "migrationSource": { + "description": "Migration-source selector used to produce the migration items. Pass the same value to detection and import; missing or unrecognized values use the default source.", + "type": [ + "string", + "null" + ] + }, + "source": { + "description": "Optional identifier for the product that initiated the import.", + "type": [ + "string", + "null" + ] + } + } + }, + "MergeStrategy": { + "type": "string", + "enum": [ + "replace", + "upsert" + ] + }, + "ConfigValueWriteParams": { + "$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 + } + }, + "ConfigEdit": { + "type": "object", + "required": [ + "keyPath", + "mergeStrategy", + "value" + ], + "properties": { + "keyPath": { + "type": "string" + }, + "mergeStrategy": { + "$ref": "#/definitions/MergeStrategy" + }, + "value": true + } + }, + "ConfigBatchWriteParams": { + "$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" + } + } + }, + "GetAccountParams": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GetAccountParams", + "type": "object", + "properties": { + "refreshToken": { + "description": "When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.", + "type": "boolean" + } + } + }, + "ActivePermissionProfile": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "extends": { + "description": "Parent profile identifier from the selected permissions profile's `extends` setting, when present.", + "default": null, + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Identifier from `default_permissions` or the implicit built-in default, such as `:workspace` or a user-defined `[permissions.]` profile.", + "type": "string" + } + } + }, + "AgentPath": { + "type": "string" + }, + "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", + "sessionBudgetExceeded", + "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" + } + ] + }, + "CollabAgentState": { + "type": "object", + "required": [ + "status" + ], + "properties": { + "message": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/CollabAgentStatus" + } + } + }, + "CollabAgentStatus": { + "type": "string", + "enum": [ + "pendingInit", + "running", + "interrupted", + "completed", + "errored", + "shutdown", + "notFound" + ] + }, + "CollabAgentTool": { + "type": "string", + "enum": [ + "spawnAgent", + "sendInput", + "resumeAgent", + "wait", + "closeAgent" + ] + }, + "CollabAgentToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, + "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" + } + ] + }, + "CommandExecutionSource": { + "type": "string", + "enum": [ + "agent", + "userShell", + "unifiedExecStartup", + "unifiedExecInteraction" + ] + }, + "CommandExecutionStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] + }, + "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" + }, + { + "type": "object", + "required": [ + "audioUrl", + "type" + ], + "properties": { + "audioUrl": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "inputAudio" + ], + "title": "InputAudioDynamicToolCallOutputContentItemType" + } + }, + "title": "InputAudioDynamicToolCallOutputContentItem" + } + ] + }, + "DynamicToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, + "FileUpdateChange": { + "type": "object", + "required": [ + "diff", + "kind", + "path" + ], + "properties": { + "diff": { + "type": "string" + }, + "kind": { + "$ref": "#/definitions/PatchChangeKind" + }, + "path": { + "type": "string" + } + } + }, + "GitInfo": { + "type": "object", + "properties": { + "branch": { + "type": [ + "string", + "null" + ] + }, + "originUrl": { + "type": [ + "string", + "null" + ] + }, + "sha": { + "type": [ + "string", + "null" + ] + } + } + }, + "HookPromptFragment": { + "type": "object", + "required": [ + "hookRunId", + "text" + ], + "properties": { + "hookRunId": { + "type": "string" + }, + "text": { + "type": "string" + } + } + }, + "McpToolCallAppContext": { + "type": "object", + "required": [ + "connectorId" + ], + "properties": { + "actionName": { + "type": [ + "string", + "null" + ] + }, + "appName": { + "type": [ + "string", + "null" + ] + }, + "connectorId": { + "type": "string" + }, + "linkId": { + "type": [ + "string", + "null" + ] + }, + "resourceUri": { + "type": [ + "string", + "null" + ] + } + } + }, + "McpToolCallError": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + }, + "McpToolCallResult": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "_meta": true, + "content": { + "type": "array", + "items": true + }, + "structuredContent": true + } + }, + "McpToolCallStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed" + ] + }, + "MemoryCitation": { + "type": "object", + "required": [ + "entries", + "threadIds" + ], + "properties": { + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/MemoryCitationEntry" + } + }, + "threadIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "MemoryCitationEntry": { + "type": "object", + "required": [ + "lineEnd", + "lineStart", + "note", + "path" + ], + "properties": { + "lineEnd": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "lineStart": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "note": { + "type": "string" + }, + "path": { + "type": "string" + } + } + }, + "NonSteerableTurnKind": { + "type": "string", + "enum": [ + "review", + "compact" + ] + }, + "PatchApplyStatus": { + "type": "string", + "enum": [ + "inProgress", + "completed", + "failed", + "declined" + ] + }, + "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" + } + ] + }, + "SessionSource": { + "oneOf": [ + { + "type": "string", + "enum": [ + "cli", + "vscode", + "exec", + "appServer", + "unknown" + ] + }, + { + "type": "object", + "required": [ + "custom" + ], + "properties": { + "custom": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "CustomSessionSource" + }, + { + "type": "object", + "required": [ + "subAgent" + ], + "properties": { + "subAgent": { + "$ref": "#/definitions/SubAgentSource" + } + }, + "additionalProperties": false, + "title": "SubAgentSessionSource" + } + ] + }, + "SubAgentActivityKind": { + "type": "string", + "enum": [ + "started", + "interacted", + "interrupted" + ] + }, + "SubAgentSource": { + "oneOf": [ + { + "type": "string", + "enum": [ + "review", + "compact", + "memory_consolidation" + ] + }, + { + "type": "object", + "required": [ + "thread_spawn" + ], + "properties": { + "thread_spawn": { + "type": "object", + "required": [ + "depth", + "parent_thread_id" + ], + "properties": { + "agent_nickname": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "agent_path": { + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/AgentPath" + }, + { + "type": "null" + } + ] + }, + "agent_role": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "depth": { + "type": "integer", + "format": "int32" + }, + "parent_thread_id": { + "$ref": "#/definitions/ThreadId" + } + } + } + }, + "additionalProperties": false, + "title": "ThreadSpawnSubAgentSource" + }, + { + "type": "object", + "required": [ + "other" + ], + "properties": { + "other": { + "type": "string" + } + }, + "additionalProperties": false, + "title": "OtherSubAgentSource" + } + ] + }, + "Thread": { + "type": "object", + "required": [ + "cliVersion", + "createdAt", + "cwd", + "ephemeral", + "id", + "modelProvider", + "preview", + "sessionId", + "source", + "status", + "turns", + "updatedAt" + ], + "properties": { + "agentNickname": { + "description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.", + "type": [ + "string", + "null" + ] + }, + "agentRole": { + "description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.", + "type": [ + "string", + "null" + ] + }, + "threadSource": { + "description": "Optional analytics source classification for this thread.", + "anyOf": [ + { + "$ref": "#/definitions/ThreadSource" + }, + { + "type": "null" + } + ] + }, + "cliVersion": { + "description": "Version of the CLI that created the thread.", + "type": "string" + }, + "createdAt": { + "description": "Unix timestamp (in seconds) when the thread was created.", + "type": "integer", + "format": "int64" + }, + "cwd": { + "description": "Working directory captured for the thread.", + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] + }, + "ephemeral": { + "description": "Whether the thread is ephemeral and should not be materialized on disk.", + "type": "boolean" + }, + "updatedAt": { + "description": "Unix timestamp (in seconds) when the thread was last updated.", + "type": "integer", + "format": "int64" + }, + "forkedFromId": { + "description": "Source thread id when this thread was created by forking another thread.", + "type": [ + "string", + "null" + ] + }, + "gitInfo": { + "description": "Optional Git metadata captured when the thread was created.", + "anyOf": [ + { + "$ref": "#/definitions/GitInfo" + }, + { + "type": "null" + } + ] + }, + "turns": { + "description": "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.", + "type": "array", + "items": { + "$ref": "#/definitions/Turn" + } + }, + "id": { + "description": "Identifier for this thread. Codex-generated thread IDs are UUIDv7.", + "type": "string" + }, + "modelProvider": { + "description": "Model provider used for this thread (for example, 'openai').", + "type": "string" + }, + "name": { + "description": "Optional user-facing thread title.", + "type": [ + "string", + "null" + ] + }, + "parentThreadId": { + "description": "The ID of the parent thread. This will only be set if this thread is a subagent.", + "type": [ + "string", + "null" + ] + }, + "path": { + "description": "[UNSTABLE] Path to the thread on disk.", + "type": [ + "string", + "null" + ] + }, + "preview": { + "description": "Usually the first user message in the thread, if available.", + "type": "string" + }, + "recencyAt": { + "description": "Unix timestamp (in seconds) used for thread recency ordering.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "sessionId": { + "description": "Session id shared by threads that belong to the same session tree.", + "type": "string" + }, + "source": { + "description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).", + "allOf": [ + { + "$ref": "#/definitions/SessionSource" + } + ] + }, + "status": { + "description": "Current runtime status for the thread.", + "allOf": [ + { + "$ref": "#/definitions/ThreadStatus" + } + ] + } + } + }, + "ThreadActiveFlag": { + "type": "string", + "enum": [ + "waitingOnApproval", + "waitingOnUserInput" + ] + }, + "ThreadExtra": { + "description": "Extra app-server data for a thread.", + "type": "object" + }, + "ThreadId": { + "type": "string" + }, + "ThreadItem": { + "oneOf": [ + { + "type": "object", + "required": [ + "content", + "id", + "type" + ], + "properties": { + "clientId": { + "type": [ + "string", + "null" + ] + }, + "content": { + "type": "array", + "items": { + "$ref": "#/definitions/UserInput" + } + }, + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "userMessage" + ], + "title": "UserMessageThreadItemType" + } + }, + "title": "UserMessageThreadItem" + }, + { + "type": "object", + "required": [ + "fragments", + "id", + "type" + ], + "properties": { + "fragments": { + "type": "array", + "items": { + "$ref": "#/definitions/HookPromptFragment" + } + }, + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "hookPrompt" + ], + "title": "HookPromptThreadItemType" + } + }, + "title": "HookPromptThreadItem" + }, + { + "type": "object", + "required": [ + "id", + "text", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "memoryCitation": { + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/MemoryCitation" + }, + { + "type": "null" + } + ] + }, + "phase": { + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/MessagePhase" + }, + { + "type": "null" + } + ] + }, + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "agentMessage" + ], + "title": "AgentMessageThreadItemType" + } + }, + "title": "AgentMessageThreadItem" + }, + { + "description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.", + "type": "object", + "required": [ + "id", + "text", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "plan" + ], + "title": "PlanThreadItemType" + } + }, + "title": "PlanThreadItem" + }, + { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "content": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "summary": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "title": "ReasoningThreadItemType" + } + }, + "title": "ReasoningThreadItem" + }, + { + "type": "object", + "required": [ + "command", + "commandActions", + "cwd", + "id", + "status", + "type" + ], + "properties": { + "aggregatedOutput": { + "description": "The command's output, aggregated from stdout and stderr.", + "type": [ + "string", + "null" + ] + }, + "command": { + "description": "The command to be executed.", + "type": "string" + }, + "commandActions": { + "description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.", + "type": "array", + "items": { + "$ref": "#/definitions/CommandAction" + } + }, + "cwd": { + "description": "The command's working directory.", + "allOf": [ + { + "$ref": "#/definitions/LegacyAppPathString" + } + ] + }, + "durationMs": { + "description": "The duration of the command execution in milliseconds.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "exitCode": { + "description": "The command's exit code.", + "type": [ + "integer", + "null" + ], + "format": "int32" + }, + "id": { + "type": "string" + }, + "processId": { + "description": "Identifier for the underlying PTY process (when available).", + "type": [ + "string", + "null" + ] + }, + "source": { + "default": "agent", + "allOf": [ + { + "$ref": "#/definitions/CommandExecutionSource" + } + ] + }, + "status": { + "$ref": "#/definitions/CommandExecutionStatus" + }, + "type": { + "type": "string", + "enum": [ + "commandExecution" + ], + "title": "CommandExecutionThreadItemType" + } + }, + "title": "CommandExecutionThreadItem" + }, + { + "type": "object", + "required": [ + "changes", + "id", + "status", + "type" + ], + "properties": { + "changes": { + "type": "array", + "items": { + "$ref": "#/definitions/FileUpdateChange" + } + }, + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/PatchApplyStatus" + }, + "type": { + "type": "string", + "enum": [ + "fileChange" + ], + "title": "FileChangeThreadItemType" + } + }, + "title": "FileChangeThreadItem" + }, + { + "type": "object", + "required": [ + "arguments", + "id", + "server", + "status", + "tool", + "type" + ], + "properties": { + "appContext": { + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallAppContext" + }, + { + "type": "null" + } + ] + }, + "arguments": true, + "durationMs": { + "description": "The duration of the MCP tool call in milliseconds.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "error": { + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallError" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" + }, + "mcpAppResourceUri": { + "description": "Deprecated: use `appContext.resourceUri` instead.", + "type": [ + "string", + "null" + ] + }, + "pluginId": { + "type": [ + "string", + "null" + ] + }, + "result": { + "anyOf": [ + { + "$ref": "#/definitions/McpToolCallResult" + }, + { + "type": "null" + } + ] + }, + "server": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/McpToolCallStatus" + }, + "tool": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "mcpToolCall" + ], + "title": "McpToolCallThreadItemType" + } + }, + "title": "McpToolCallThreadItem" + }, + { + "type": "object", + "required": [ + "arguments", + "id", + "status", + "tool", + "type" + ], + "properties": { + "arguments": true, + "contentItems": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/DynamicToolCallOutputContentItem" + } + }, + "durationMs": { + "description": "The duration of the dynamic tool call in milliseconds.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "id": { + "type": "string" + }, + "namespace": { + "type": [ + "string", + "null" + ] + }, + "status": { + "$ref": "#/definitions/DynamicToolCallStatus" + }, + "success": { + "type": [ + "boolean", + "null" + ] + }, + "tool": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "dynamicToolCall" + ], + "title": "DynamicToolCallThreadItemType" + } + }, + "title": "DynamicToolCallThreadItem" + }, + { + "type": "object", + "required": [ + "agentsStates", + "id", + "receiverThreadIds", + "senderThreadId", + "status", + "tool", + "type" + ], + "properties": { + "agentsStates": { + "description": "Last known status of the target agents, when available.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CollabAgentState" + } + }, + "id": { + "description": "Unique identifier for this collab tool call.", + "type": "string" + }, + "model": { + "description": "Model requested for the spawned agent, when applicable.", + "type": [ + "string", + "null" + ] + }, + "prompt": { + "description": "Prompt text sent as part of the collab tool call, when available.", + "type": [ + "string", + "null" + ] + }, + "reasoningEffort": { + "description": "Reasoning effort requested for the spawned agent, when applicable.", + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + }, + "receiverThreadIds": { + "description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", + "type": "array", + "items": { + "type": "string" + } + }, + "senderThreadId": { + "description": "Thread ID of the agent issuing the collab request.", + "type": "string" + }, + "status": { + "description": "Current status of the collab tool call.", + "allOf": [ + { + "$ref": "#/definitions/CollabAgentToolCallStatus" + } + ] + }, + "tool": { + "description": "Name of the collab tool that was invoked.", + "allOf": [ + { + "$ref": "#/definitions/CollabAgentTool" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "collabAgentToolCall" + ], + "title": "CollabAgentToolCallThreadItemType" + } + }, + "title": "CollabAgentToolCallThreadItem" + }, + { + "type": "object", + "required": [ + "agentPath", + "agentThreadId", + "id", + "kind", + "type" + ], + "properties": { + "agentPath": { + "type": "string" + }, + "agentThreadId": { + "type": "string" + }, + "id": { + "type": "string" + }, + "kind": { + "$ref": "#/definitions/SubAgentActivityKind" + }, + "type": { + "type": "string", + "enum": [ + "subAgentActivity" + ], + "title": "SubAgentActivityThreadItemType" + } + }, + "title": "SubAgentActivityThreadItem" + }, + { + "type": "object", + "required": [ + "id", + "query", + "type" + ], + "properties": { + "action": { + "anyOf": [ + { + "$ref": "#/definitions/WebSearchAction" + }, + { + "type": "null" + } + ] + }, + "id": { + "type": "string" + }, + "query": { + "type": "string" + }, + "results": { + "description": "Structured search results returned out-of-band by standalone web search.\n\nThese stay as opaque JSON at the extension/app-server boundary so new result fields and result types can pass through without a Codex release.", + "default": null, + "type": [ + "array", + "null" + ], + "items": true + }, + "type": { + "type": "string", + "enum": [ + "webSearch" + ], + "title": "WebSearchThreadItemType" + } + }, + "title": "WebSearchThreadItem" + }, + { + "type": "object", + "required": [ + "id", + "path", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/LegacyAppPathString" + }, + "type": { + "type": "string", + "enum": [ + "imageView" + ], + "title": "ImageViewThreadItemType" + } + }, + "title": "ImageViewThreadItem" + }, + { + "description": "Display item emitted by the interruptible `clock.sleep` tool.", + "type": "object", + "required": [ + "durationMs", + "id", + "type" + ], + "properties": { + "durationMs": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "sleep" + ], + "title": "SleepThreadItemType" + } + }, + "title": "SleepThreadItem" + }, + { + "type": "object", + "required": [ + "id", + "result", + "status", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "result": { + "type": "string" + }, + "revisedPrompt": { + "type": [ + "string", + "null" + ] + }, + "savedPath": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "status": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "imageGeneration" + ], + "title": "ImageGenerationThreadItemType" + } + }, + "title": "ImageGenerationThreadItem" + }, + { + "type": "object", + "required": [ + "id", + "review", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "enteredReviewMode" + ], + "title": "EnteredReviewModeThreadItemType" + } + }, + "title": "EnteredReviewModeThreadItem" + }, + { + "type": "object", + "required": [ + "id", + "review", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "review": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "exitedReviewMode" + ], + "title": "ExitedReviewModeThreadItemType" + } + }, + "title": "ExitedReviewModeThreadItem" + }, + { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "contextCompaction" + ], + "title": "ContextCompactionThreadItemType" + } + }, + "title": "ContextCompactionThreadItem" + } + ] + }, + "ThreadStatus": { + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "notLoaded" + ], + "title": "NotLoadedThreadStatusType" + } + }, + "title": "NotLoadedThreadStatus" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "idle" + ], + "title": "IdleThreadStatusType" + } + }, + "title": "IdleThreadStatus" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "systemError" + ], + "title": "SystemErrorThreadStatusType" + } + }, + "title": "SystemErrorThreadStatus" + }, + { + "type": "object", + "required": [ + "activeFlags", + "type" + ], + "properties": { + "activeFlags": { + "type": "array", + "items": { + "$ref": "#/definitions/ThreadActiveFlag" + } + }, + "type": { + "type": "string", + "enum": [ + "active" + ], + "title": "ActiveThreadStatusType" + } + }, + "title": "ActiveThreadStatus" + } + ] + }, + "Turn": { + "type": "object", + "required": [ + "id", + "items", + "status" + ], + "properties": { + "completedAt": { + "description": "Unix timestamp (in seconds) when the turn completed.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "durationMs": { + "description": "Duration between turn start and completion in milliseconds, if known.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "error": { + "description": "Only populated when the Turn's status is failed.", + "anyOf": [ + { + "$ref": "#/definitions/TurnError" + }, + { + "type": "null" + } + ] + }, + "id": { + "description": "Identifier for this turn. Codex-generated turn IDs are UUIDv7.", + "type": "string" + }, + "items": { + "description": "Thread items currently included in this turn payload.", + "type": "array", + "items": { + "$ref": "#/definitions/ThreadItem" + } + }, + "itemsView": { + "description": "Describes how much of `items` has been loaded for this turn.", + "default": "full", + "allOf": [ + { + "$ref": "#/definitions/TurnItemsView" + } + ] + }, + "startedAt": { + "description": "Unix timestamp (in seconds) when the turn started.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "status": { + "$ref": "#/definitions/TurnStatus" + } + } + }, + "TurnError": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "additionalDetails": { + "default": null, + "type": [ + "string", + "null" + ] + }, + "codexErrorInfo": { + "anyOf": [ + { + "$ref": "#/definitions/CodexErrorInfo" + }, + { + "type": "null" + } + ] + }, + "message": { + "type": "string" + } + } + }, + "TurnStatus": { + "type": "string", + "enum": [ + "completed", + "interrupted", + "failed", + "inProgress" + ] + }, + "WebSearchAction": { + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "queries": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "query": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "search" + ], + "title": "SearchWebSearchActionType" + } + }, + "title": "SearchWebSearchAction" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openPage" + ], + "title": "OpenPageWebSearchActionType" + }, + "url": { + "type": [ + "string", + "null" + ] + } + }, + "title": "OpenPageWebSearchAction" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "pattern": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "findInPage" + ], + "title": "FindInPageWebSearchActionType" + }, + "url": { + "type": [ + "string", + "null" + ] + } + }, + "title": "FindInPageWebSearchAction" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "other" + ], + "title": "OtherWebSearchActionType" + } + }, + "title": "OtherWebSearchAction" + } + ] + }, + "ThreadStartResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadStartResponse", + "type": "object", + "required": [ + "approvalPolicy", + "approvalsReviewer", + "cwd", + "model", + "modelProvider", + "sandbox", + "thread" + ], + "properties": { + "sandbox": { + "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.", + "allOf": [ + { + "$ref": "#/definitions/SandboxPolicy" + } + ] + }, + "approvalPolicy": { + "$ref": "#/definitions/AskForApproval" + }, + "approvalsReviewer": { + "description": "Reviewer currently used for approval requests on this thread.", + "allOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + } + ] + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "instructionSources": { + "description": "Environment-native paths to instruction source files currently loaded for this thread.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/LegacyAppPathString" + } + }, + "model": { + "type": "string" + }, + "modelProvider": { + "type": "string" + }, + "serviceTier": { + "type": [ + "string", + "null" + ] + }, + "reasoningEffort": { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + }, + "thread": { + "$ref": "#/definitions/Thread" + } + } + }, + "TurnsPage": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "backwardsCursor": { + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Turn" + } + }, + "nextCursor": { + "type": [ + "string", + "null" + ] + } + } + }, + "ThreadResumeResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadResumeResponse", + "type": "object", + "required": [ + "approvalPolicy", + "approvalsReviewer", + "cwd", + "model", + "modelProvider", + "sandbox", + "thread" + ], + "properties": { + "serviceTier": { + "type": [ + "string", + "null" + ] + }, + "approvalPolicy": { + "$ref": "#/definitions/AskForApproval" + }, + "approvalsReviewer": { + "description": "Reviewer currently used for approval requests on this thread.", + "allOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + } + ] + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "thread": { + "$ref": "#/definitions/Thread" + }, + "instructionSources": { + "description": "Environment-native paths to instruction source files currently loaded for this thread.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/LegacyAppPathString" + } + }, + "sandbox": { + "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.", + "allOf": [ + { + "$ref": "#/definitions/SandboxPolicy" + } + ] + }, + "model": { + "type": "string" + }, + "modelProvider": { + "type": "string" + }, + "reasoningEffort": { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + } + } + }, + "ThreadForkResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadForkResponse", + "type": "object", + "required": [ + "approvalPolicy", + "approvalsReviewer", + "cwd", + "model", + "modelProvider", + "sandbox", + "thread" + ], + "properties": { + "sandbox": { + "description": "Legacy sandbox policy retained for compatibility. Experimental clients should prefer `activePermissionProfile` for profile provenance.", + "allOf": [ + { + "$ref": "#/definitions/SandboxPolicy" + } + ] + }, + "approvalPolicy": { + "$ref": "#/definitions/AskForApproval" + }, + "approvalsReviewer": { + "description": "Reviewer currently used for approval requests on this thread.", + "allOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + } + ] + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "instructionSources": { + "description": "Environment-native paths to instruction source files currently loaded for this thread.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/LegacyAppPathString" + } + }, + "model": { + "type": "string" + }, + "modelProvider": { + "type": "string" + }, + "thread": { + "$ref": "#/definitions/Thread" + }, + "reasoningEffort": { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + }, + "serviceTier": { + "type": [ + "string", + "null" + ] + } + } + }, + "ThreadArchiveResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadArchiveResponse", + "type": "object" + }, + "ThreadDeleteResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadDeleteResponse", + "type": "object" + }, + "ThreadUnsubscribeStatus": { + "type": "string", + "enum": [ + "notLoaded", + "notSubscribed", + "unsubscribed" + ] + }, + "ThreadUnsubscribeResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadUnsubscribeResponse", + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/definitions/ThreadUnsubscribeStatus" + } + } + }, + "AccountRateLimitsUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AccountRateLimitsUpdatedNotification", + "description": "Sparse rolling rate-limit update.\n\nClients should merge available values into the most recent `account/rateLimits/read` response or refetch that snapshot. Nullable account metadata may be unavailable in a rolling update and does not clear a previously observed value.", + "type": "object", + "required": [ + "rateLimits" + ], + "properties": { + "rateLimits": { + "$ref": "#/definitions/RateLimitSnapshot" + } + } + }, + "AccountUpdatedNotification": { + "$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" + } + ] + } + } + }, + "ThreadSetNameResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadSetNameResponse", + "type": "object" + }, + "ThreadGoal": { + "type": "object", + "required": [ + "createdAt", + "objective", + "status", + "threadId", + "timeUsedSeconds", + "tokensUsed", + "updatedAt" + ], + "properties": { + "createdAt": { + "type": "integer", + "format": "int64" + }, + "objective": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/ThreadGoalStatus" + }, + "threadId": { + "type": "string" + }, + "timeUsedSeconds": { + "type": "integer", + "format": "int64" + }, + "tokenBudget": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "tokensUsed": { + "type": "integer", + "format": "int64" + }, + "updatedAt": { + "type": "integer", + "format": "int64" + } + } + }, + "ThreadGoalSetResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadGoalSetResponse", + "type": "object", + "required": [ + "goal" + ], + "properties": { + "goal": { + "$ref": "#/definitions/ThreadGoal" + } + } + }, + "ThreadGoalGetResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadGoalGetResponse", + "type": "object", + "properties": { + "goal": { + "anyOf": [ + { + "$ref": "#/definitions/ThreadGoal" + }, + { + "type": "null" + } + ] + } + } + }, + "ThreadGoalClearResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadGoalClearResponse", + "type": "object", + "required": [ + "cleared" + ], + "properties": { + "cleared": { + "type": "boolean" + } + } + }, + "ThreadMetadataUpdateResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadMetadataUpdateResponse", + "type": "object", + "required": [ + "thread" + ], + "properties": { + "thread": { + "$ref": "#/definitions/Thread" + } + } + }, + "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": "Backend auth supplied as request headers.", + "type": "string", + "enum": [ + "headers" + ] + }, + { + "description": "Programmatic Codex auth backed by a registered Agent Identity.", + "type": "string", + "enum": [ + "agentIdentity" + ] + }, + { + "description": "Programmatic Codex auth backed by a personal access token.", + "type": "string", + "enum": [ + "personalAccessToken" + ] + }, + { + "description": "Amazon Bedrock bearer token managed by Codex.", + "type": "string", + "enum": [ + "bedrockApiKey" + ] + } + ] + }, + "McpServerStatusUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpServerStatusUpdatedNotification", + "type": "object", + "required": [ + "name", + "status" + ], + "properties": { + "error": { + "type": [ + "string", + "null" + ] + }, + "failureReason": { + "anyOf": [ + { + "$ref": "#/definitions/McpServerStartupFailureReason" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/McpServerStartupState" + }, + "threadId": { + "type": [ + "string", + "null" + ] + } + } + }, + "McpServerStartupState": { + "type": "string", + "enum": [ + "starting", + "ready", + "failed", + "cancelled" + ] + }, + "ThreadUnarchiveResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadUnarchiveResponse", + "type": "object", + "required": [ + "thread" + ], + "properties": { + "thread": { + "$ref": "#/definitions/Thread" + } + } + }, + "ThreadCompactStartResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadCompactStartResponse", + "type": "object" + }, + "ThreadShellCommandResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadShellCommandResponse", + "type": "object" + }, + "ThreadApproveGuardianDeniedActionResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadApproveGuardianDeniedActionResponse", + "type": "object" + }, + "McpServerStartupFailureReason": { + "type": "string", + "enum": [ + "reauthenticationRequired" + ] + }, + "McpServerOauthLoginCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpServerOauthLoginCompletedNotification", + "type": "object", + "required": [ + "name", + "success" + ], + "properties": { + "error": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "success": { + "type": "boolean" + }, + "threadId": { + "type": [ + "string", + "null" + ] + } + } + }, + "McpToolCallProgressNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpToolCallProgressNotification", + "type": "object", + "required": [ + "itemId", + "message", + "threadId", + "turnId" + ], + "properties": { + "itemId": { + "type": "string" + }, + "message": { + "type": "string" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "ServerRequestResolvedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ServerRequestResolvedNotification", + "type": "object", + "required": [ + "requestId", + "threadId" + ], + "properties": { + "requestId": { + "$ref": "#/definitions/RequestId" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadRollbackResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadRollbackResponse", + "type": "object", + "required": [ + "thread" + ], + "properties": { + "thread": { + "description": "The updated thread after applying the rollback, with `turns` populated.\n\nThe ThreadItems stored in each Turn are lossy since we explicitly do not persist all agent interactions, such as command executions. This is the same behavior as `thread/resume`.", + "allOf": [ + { + "$ref": "#/definitions/Thread" + } + ] + } + } + }, + "ThreadListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadListResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "backwardsCursor": { + "description": "Opaque cursor to pass as `cursor` when reversing `sortDirection`. This is only populated when the page contains at least one thread. Use it with the opposite `sortDirection`; for timestamp sorts it anchors at the start of the page timestamp so same-second updates are not skipped.", + "type": [ + "string", + "null" + ] + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Thread" + } + }, + "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" + ] + } + } + }, + "ThreadSearchResult": { + "type": "object", + "required": [ + "snippet", + "thread" + ], + "properties": { + "snippet": { + "type": "string" + }, + "thread": { + "$ref": "#/definitions/Thread" + } + } + }, + "RequestId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ] + }, + "FileChangePatchUpdatedNotification": { + "$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" + } + } + }, + "FileChangeOutputDeltaNotification": { + "$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" + } + } + }, + "TerminalInteractionNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TerminalInteractionNotification", + "type": "object", + "required": [ + "itemId", + "processId", + "stdin", + "threadId", + "turnId" + ], + "properties": { + "itemId": { + "type": "string" + }, + "processId": { + "type": "string" + }, + "stdin": { + "type": "string" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "ThreadLoadedListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadLoadedListResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "description": "Thread ids for sessions currently loaded in memory.", + "type": "array", + "items": { + "type": "string" + } + }, + "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" + ] + } + } + }, + "ThreadReadResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadReadResponse", + "type": "object", + "required": [ + "thread" + ], + "properties": { + "thread": { + "$ref": "#/definitions/Thread" + } + } + }, + "CommandExecutionOutputDeltaNotification": { + "$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" + } + } + }, + "ThreadItemEntry": { + "type": "object", + "required": [ + "item", + "turnId" + ], + "properties": { + "item": { + "$ref": "#/definitions/ThreadItem" + }, + "turnId": { + "description": "Turn containing this item.", + "type": "string" + } + } + }, + "ProcessExitedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ProcessExitedNotification", + "description": "Final process exit notification for `process/spawn`.", + "type": "object", + "required": [ + "exitCode", + "processHandle", + "stderr", + "stderrCapReached", + "stdout", + "stdoutCapReached" + ], + "properties": { + "exitCode": { + "description": "Process exit code.", + "type": "integer", + "format": "int32" + }, + "processHandle": { + "description": "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", + "type": "string" + }, + "stderr": { + "description": "Buffered stderr capture.\n\nEmpty when stderr was streamed via `process/outputDelta`.", + "type": "string" + }, + "stderrCapReached": { + "description": "Whether stderr reached `outputBytesCap`.\n\nIn streaming mode, stderr is empty and cap state is also reported on the final stderr `process/outputDelta` notification.", + "type": "boolean" + }, + "stdout": { + "description": "Buffered stdout capture.\n\nEmpty when stdout was streamed via `process/outputDelta`.", + "type": "string" + }, + "stdoutCapReached": { + "description": "Whether stdout reached `outputBytesCap`.\n\nIn streaming mode, stdout is empty and cap state is also reported on the final stdout `process/outputDelta` notification.", + "type": "boolean" + } + } + }, + "ThreadInjectItemsResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadInjectItemsResponse", + "type": "object" + }, + "SkillDependencies": { + "type": "object", + "required": [ + "tools" + ], + "properties": { + "tools": { + "type": "array", + "items": { + "$ref": "#/definitions/SkillToolDependency" + } + } + } + }, + "SkillErrorInfo": { + "type": "object", + "required": [ + "message", + "path" + ], + "properties": { + "message": { + "type": "string" + }, + "path": { + "type": "string" + } + } + }, + "SkillInterface": { + "type": "object", + "properties": { + "brandColor": { + "type": [ + "string", + "null" + ] + }, + "defaultPrompt": { + "type": [ + "string", + "null" + ] + }, + "displayName": { + "type": [ + "string", + "null" + ] + }, + "iconLarge": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "iconSmall": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "shortDescription": { + "type": [ + "string", + "null" + ] + } + } + }, + "SkillMetadata": { + "type": "object", + "required": [ + "description", + "enabled", + "name", + "path", + "scope" + ], + "properties": { + "dependencies": { + "anyOf": [ + { + "$ref": "#/definitions/SkillDependencies" + }, + { + "type": "null" + } + ] + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "interface": { + "anyOf": [ + { + "$ref": "#/definitions/SkillInterface" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "scope": { + "$ref": "#/definitions/SkillScope" + }, + "shortDescription": { + "description": "Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.", + "type": [ + "string", + "null" + ] + } + } + }, + "SkillScope": { + "type": "string", + "enum": [ + "user", + "repo", + "system", + "admin" + ] + }, + "SkillToolDependency": { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "command": { + "type": [ + "string", + "null" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "transport": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string" + }, + "url": { + "type": [ + "string", + "null" + ] + }, + "value": { + "type": "string" + } + } + }, + "SkillsListEntry": { + "type": "object", + "required": [ + "cwd", + "errors", + "skills" + ], + "properties": { + "cwd": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/SkillErrorInfo" + } + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/definitions/SkillMetadata" + } + } + } + }, + "SkillsListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SkillsListResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/SkillsListEntry" + } + } + } + }, + "SkillsExtraRootsSetResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SkillsExtraRootsSetResponse", + "type": "object" + }, + "HookErrorInfo": { + "type": "object", + "required": [ + "message", + "path" + ], + "properties": { + "message": { + "type": "string" + }, + "path": { + "type": "string" + } + } + }, + "HookEventName": { + "type": "string", + "enum": [ + "preToolUse", + "permissionRequest", + "postToolUse", + "preCompact", + "postCompact", + "sessionStart", + "sessionEnd", + "userPromptSubmit", + "subagentStart", + "subagentStop", + "stop" + ] + }, + "HookHandlerType": { + "type": "string", + "enum": [ + "command", + "prompt", + "agent" + ] + }, + "HookMetadata": { + "type": "object", + "required": [ + "currentHash", + "displayOrder", + "enabled", + "eventName", + "handlerType", + "isManaged", + "key", + "source", + "sourcePath", + "timeoutSec", + "trustStatus" + ], + "properties": { + "additionalContextLimit": { + "description": "Configured `additionalContext` spill threshold. `null` uses 2,500 tokens; `0` disables spilling.", + "type": [ + "integer", + "null" + ], + "format": "uint", + "minimum": 0.0 + }, + "command": { + "type": [ + "string", + "null" + ] + }, + "currentHash": { + "type": "string" + }, + "displayOrder": { + "type": "integer", + "format": "int64" + }, + "enabled": { + "type": "boolean" + }, + "eventName": { + "$ref": "#/definitions/HookEventName" + }, + "handlerType": { + "$ref": "#/definitions/HookHandlerType" + }, + "isManaged": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "matcher": { + "type": [ + "string", + "null" + ] + }, + "pluginId": { + "type": [ + "string", + "null" + ] + }, + "source": { + "$ref": "#/definitions/HookSource" + }, + "sourcePath": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "statusMessage": { + "type": [ + "string", + "null" + ] + }, + "timeoutSec": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "trustStatus": { + "$ref": "#/definitions/HookTrustStatus" + } + } + }, + "HookSource": { + "type": "string", + "enum": [ + "system", + "user", + "project", + "mdm", + "sessionFlags", + "plugin", + "cloudRequirements", + "cloudManagedConfig", + "legacyManagedConfigFile", + "legacyManagedConfigMdm", + "unknown" + ] + }, + "HookTrustStatus": { + "type": "string", + "enum": [ + "managed", + "untrusted", + "trusted", + "modified" + ] + }, + "HooksListEntry": { + "type": "object", + "required": [ + "cwd", + "errors", + "hooks", + "warnings" + ], + "properties": { + "cwd": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/HookErrorInfo" + } + }, + "hooks": { + "type": "array", + "items": { + "$ref": "#/definitions/HookMetadata" + } + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "HooksListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "HooksListResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/HooksListEntry" + } + } + } + }, + "MarketplaceAddResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MarketplaceAddResponse", + "type": "object", + "required": [ + "alreadyAdded", + "installedRoot", + "marketplaceName" + ], + "properties": { + "alreadyAdded": { + "type": "boolean" + }, + "installedRoot": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "marketplaceName": { + "type": "string" + } + } + }, + "MarketplaceRemoveResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MarketplaceRemoveResponse", + "type": "object", + "required": [ + "marketplaceName" + ], + "properties": { + "installedRoot": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "marketplaceName": { + "type": "string" + } + } + }, + "MarketplaceUpgradeErrorInfo": { + "type": "object", + "required": [ + "marketplaceName", + "message" + ], + "properties": { + "marketplaceName": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "MarketplaceUpgradeResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MarketplaceUpgradeResponse", + "type": "object", + "required": [ + "errors", + "selectedMarketplaces", + "upgradedRoots" + ], + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/MarketplaceUpgradeErrorInfo" + } + }, + "selectedMarketplaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "upgradedRoots": { + "type": "array", + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + } + } + }, + "MarketplaceInterface": { + "type": "object", + "properties": { + "displayName": { + "type": [ + "string", + "null" + ] + } + } + }, + "MarketplaceLoadErrorInfo": { + "type": "object", + "required": [ + "marketplacePath", + "message" + ], + "properties": { + "marketplacePath": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "message": { + "type": "string" + } + } + }, + "PluginAuthPolicy": { + "type": "string", + "enum": [ + "ON_INSTALL", + "ON_USE" + ] + }, + "PluginAvailability": { + "oneOf": [ + { + "type": "string", + "enum": [ + "DISABLED_BY_ADMIN" + ] + }, + { + "description": "Plugin-service currently sends `\"ENABLED\"` for available remote plugins. Codex app-server exposes `\"AVAILABLE\"` in its API; the alias keeps decoding compatible with that upstream response.", + "type": "string", + "enum": [ + "AVAILABLE" + ] + } + ] + }, + "PluginInstallPolicy": { + "type": "string", + "enum": [ + "NOT_AVAILABLE", + "AVAILABLE", + "INSTALLED_BY_DEFAULT" + ] + }, + "PluginInstallPolicySource": { + "type": "string", + "enum": [ + "WORKSPACE_SETTING", + "IMPLICIT_CANONICAL_APP" + ] + }, + "PluginInterface": { + "type": "object", + "required": [ + "capabilities", + "screenshotUrls", + "screenshots" + ], + "properties": { + "brandColor": { + "type": [ + "string", + "null" + ] + }, + "capabilities": { + "type": "array", + "items": { + "type": "string" + } + }, + "category": { + "type": [ + "string", + "null" + ] + }, + "composerIcon": { + "description": "Local composer icon path, resolved from the installed plugin package.", + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "composerIconUrl": { + "description": "Remote composer icon URL from the plugin catalog.", + "type": [ + "string", + "null" + ] + }, + "defaultPrompt": { + "description": "Starter prompts for the plugin. Capped at 3 entries with a maximum of 128 characters per entry.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "developerName": { + "type": [ + "string", + "null" + ] + }, + "displayName": { + "type": [ + "string", + "null" + ] + }, + "logo": { + "description": "Local logo path, resolved from the installed plugin package.", + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "logoDark": { + "description": "Local dark-mode logo path, resolved from the installed plugin package.", + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "logoUrl": { + "description": "Remote logo URL from the plugin catalog.", + "type": [ + "string", + "null" + ] + }, + "logoUrlDark": { + "description": "Remote dark-mode logo URL from the plugin catalog.", + "type": [ + "string", + "null" + ] + }, + "longDescription": { + "type": [ + "string", + "null" + ] + }, + "privacyPolicyUrl": { + "type": [ + "string", + "null" + ] + }, + "screenshotUrls": { + "description": "Remote screenshot URLs from the plugin catalog.", + "type": "array", + "items": { + "type": "string" + } + }, + "screenshots": { + "description": "Local screenshot paths, resolved from the installed plugin package.", + "type": "array", + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + }, + "shortDescription": { + "type": [ + "string", + "null" + ] + }, + "termsOfServiceUrl": { + "type": [ + "string", + "null" + ] + }, + "websiteUrl": { + "type": [ + "string", + "null" + ] + } + } + }, + "PluginMarketplaceEntry": { + "type": "object", + "required": [ + "name", + "plugins" + ], + "properties": { + "interface": { + "anyOf": [ + { + "$ref": "#/definitions/MarketplaceInterface" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "path": { + "description": "Local marketplace file path when the marketplace is backed by a local file. Remote-only catalog marketplaces do not have a local path.", + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "plugins": { + "type": "array", + "items": { + "$ref": "#/definitions/PluginSummary" + } + } + } + }, + "PluginShareContext": { + "type": "object", + "required": [ + "remotePluginId" + ], + "properties": { + "creatorAccountUserId": { + "type": [ + "string", + "null" + ] + }, + "creatorName": { + "type": [ + "string", + "null" + ] + }, + "discoverability": { + "anyOf": [ + { + "$ref": "#/definitions/PluginShareDiscoverability" + }, + { + "type": "null" + } + ] + }, + "remotePluginId": { + "type": "string" + }, + "remoteVersion": { + "description": "Version of the remote shared plugin release when available.", + "default": null, + "type": [ + "string", + "null" + ] + }, + "sharePrincipals": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/PluginSharePrincipal" + } + }, + "shareUrl": { + "type": [ + "string", + "null" + ] + } + } + }, + "PluginSharePrincipal": { + "type": "object", + "required": [ + "name", + "principalId", + "principalType", + "role" + ], + "properties": { + "name": { + "type": "string" + }, + "principalId": { + "type": "string" + }, + "principalType": { + "$ref": "#/definitions/PluginSharePrincipalType" + }, + "role": { + "$ref": "#/definitions/PluginSharePrincipalRole" + } + } + }, + "PluginSharePrincipalRole": { + "type": "string", + "enum": [ + "reader", + "editor", + "owner" + ] + }, + "PluginSource": { + "oneOf": [ + { + "type": "object", + "required": [ + "path", + "type" + ], + "properties": { + "path": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "type": { + "type": "string", + "enum": [ + "local" + ], + "title": "LocalPluginSourceType" + } + }, + "title": "LocalPluginSource" + }, + { + "type": "object", + "required": [ + "type", + "url" + ], + "properties": { + "path": { + "type": [ + "string", + "null" + ] + }, + "refName": { + "type": [ + "string", + "null" + ] + }, + "sha": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "git" + ], + "title": "GitPluginSourceType" + }, + "url": { + "type": "string" + } + }, + "title": "GitPluginSource" + }, + { + "type": "object", + "required": [ + "package", + "type" + ], + "properties": { + "package": { + "type": "string" + }, + "registry": { + "description": "Optional HTTPS registry URL. Authentication stays in the user's npm config.", + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "npm" + ], + "title": "NpmPluginSourceType" + }, + "version": { + "description": "Optional npm version or version range.", + "type": [ + "string", + "null" + ] + } + }, + "title": "NpmPluginSource" + }, + { + "description": "The plugin is available in the remote catalog. Download metadata is kept server-side and is not exposed through the app-server API.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "remote" + ], + "title": "RemotePluginSourceType" + } + }, + "title": "RemotePluginSource" + } + ] + }, + "PluginSummary": { + "type": "object", + "required": [ + "authPolicy", + "enabled", + "id", + "installPolicy", + "installed", + "name", + "source" + ], + "properties": { + "authPolicy": { + "$ref": "#/definitions/PluginAuthPolicy" + }, + "availability": { + "description": "Availability state for installing and using the plugin.", + "default": "AVAILABLE", + "allOf": [ + { + "$ref": "#/definitions/PluginAvailability" + } + ] + }, + "enabled": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "installPolicy": { + "$ref": "#/definitions/PluginInstallPolicy" + }, + "installPolicySource": { + "anyOf": [ + { + "$ref": "#/definitions/PluginInstallPolicySource" + }, + { + "type": "null" + } + ] + }, + "installed": { + "type": "boolean" + }, + "interface": { + "anyOf": [ + { + "$ref": "#/definitions/PluginInterface" + }, + { + "type": "null" + } + ] + }, + "keywords": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "localVersion": { + "description": "Version of the locally materialized plugin package when available.", + "default": null, + "type": [ + "string", + "null" + ] + }, + "mustShowInstallationInterstitial": { + "default": null, + "type": [ + "boolean", + "null" + ] + }, + "name": { + "type": "string" + }, + "remotePluginId": { + "description": "Backend remote plugin identifier when available.", + "type": [ + "string", + "null" + ] + }, + "shareContext": { + "description": "Remote sharing context associated with this plugin when available.", + "anyOf": [ + { + "$ref": "#/definitions/PluginShareContext" + }, + { + "type": "null" + } + ] + }, + "source": { + "$ref": "#/definitions/PluginSource" + }, + "version": { + "description": "Version advertised by the remote marketplace backend when available.", + "default": null, + "type": [ + "string", + "null" + ] + } + } + }, + "PluginListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginListResponse", + "type": "object", + "required": [ + "marketplaces" + ], + "properties": { + "featuredPluginIds": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "marketplaceLoadErrors": { + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/MarketplaceLoadErrorInfo" + } + }, + "marketplaces": { + "type": "array", + "items": { + "$ref": "#/definitions/PluginMarketplaceEntry" + } + } + } + }, + "PluginInstalledResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginInstalledResponse", + "type": "object", + "required": [ + "marketplaces" + ], + "properties": { + "marketplaceLoadErrors": { + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/MarketplaceLoadErrorInfo" + } + }, + "marketplaces": { + "type": "array", + "items": { + "$ref": "#/definitions/PluginMarketplaceEntry" + } + } + } + }, + "AppSummary": { + "description": "EXPERIMENTAL - app metadata summary for plugin responses.", + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "category": { + "type": [ + "string", + "null" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": "string" + }, + "installUrl": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + } + } + }, + "AppTemplateSummary": { + "type": "object", + "required": [ + "materializedAppIds", + "name", + "templateId" + ], + "properties": { + "canonicalConnectorId": { + "type": [ + "string", + "null" + ] + }, + "category": { + "type": [ + "string", + "null" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "logoUrl": { + "type": [ + "string", + "null" + ] + }, + "logoUrlDark": { + "type": [ + "string", + "null" + ] + }, + "materializedAppIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "reason": { + "anyOf": [ + { + "$ref": "#/definitions/AppTemplateUnavailableReason" + }, + { + "type": "null" + } + ] + }, + "templateId": { + "type": "string" + } + } + }, + "AppTemplateUnavailableReason": { + "type": "string", + "enum": [ + "NOT_CONFIGURED_FOR_WORKSPACE", + "NO_ACTIVE_WORKSPACE" + ] + }, + "PluginDetail": { + "type": "object", + "required": [ + "appTemplates", + "apps", + "hooks", + "marketplaceName", + "mcpServers", + "skills", + "summary" + ], + "properties": { + "appTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/AppTemplateSummary" + } + }, + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/AppSummary" + } + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "hooks": { + "type": "array", + "items": { + "$ref": "#/definitions/PluginHookSummary" + } + }, + "marketplaceName": { + "type": "string" + }, + "marketplacePath": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "mcpServers": { + "type": "array", + "items": { + "type": "string" + } + }, + "scheduledTasks": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/ScheduledTaskSummary" + } + }, + "shareUrl": { + "type": [ + "string", + "null" + ] + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/definitions/SkillSummary" + } + }, + "summary": { + "$ref": "#/definitions/PluginSummary" + } + } + }, + "PluginHookSummary": { + "type": "object", + "required": [ + "eventName", + "key" + ], + "properties": { + "eventName": { + "$ref": "#/definitions/HookEventName" + }, + "key": { + "type": "string" + } + } + }, + "ScheduledTaskSchedule": { + "oneOf": [ + { + "type": "object", + "required": [ + "intervalHours", + "type" + ], + "properties": { + "days": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/ScheduledTaskWeekday" + } + }, + "intervalHours": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "type": { + "type": "string", + "enum": [ + "hourly" + ], + "title": "HourlyScheduledTaskScheduleType" + } + }, + "title": "HourlyScheduledTaskSchedule" + }, + { + "type": "object", + "required": [ + "time", + "type" + ], + "properties": { + "time": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "daily" + ], + "title": "DailyScheduledTaskScheduleType" + } + }, + "title": "DailyScheduledTaskSchedule" + }, + { + "type": "object", + "required": [ + "time", + "type" + ], + "properties": { + "time": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "weekdays" + ], + "title": "WeekdaysScheduledTaskScheduleType" + } + }, + "title": "WeekdaysScheduledTaskSchedule" + }, + { + "type": "object", + "required": [ + "days", + "time", + "type" + ], + "properties": { + "days": { + "type": "array", + "items": { + "$ref": "#/definitions/ScheduledTaskWeekday" + } + }, + "time": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "weekly" + ], + "title": "WeeklyScheduledTaskScheduleType" + } + }, + "title": "WeeklyScheduledTaskSchedule" + } + ] + }, + "ScheduledTaskSummary": { + "type": "object", + "required": [ + "key", + "name", + "prompt", + "schedule" + ], + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "schedule": { + "$ref": "#/definitions/ScheduledTaskSchedule" + } + } + }, + "ScheduledTaskWeekday": { + "type": "string", + "enum": [ + "MO", + "TU", + "WE", + "TH", + "FR", + "SA", + "SU" + ] + }, + "SkillSummary": { + "type": "object", + "required": [ + "description", + "enabled", + "name" + ], + "properties": { + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "interface": { + "anyOf": [ + { + "$ref": "#/definitions/SkillInterface" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "path": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "shortDescription": { + "type": [ + "string", + "null" + ] + } + } + }, + "PluginReadResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginReadResponse", + "type": "object", + "required": [ + "plugin" + ], + "properties": { + "plugin": { + "$ref": "#/definitions/PluginDetail" + } + } + }, + "PluginSkillReadResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginSkillReadResponse", + "type": "object", + "properties": { + "contents": { + "type": [ + "string", + "null" + ] + } + } + }, + "PluginShareSaveResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareSaveResponse", + "type": "object", + "required": [ + "remotePluginId", + "shareUrl" + ], + "properties": { + "remotePluginId": { + "type": "string" + }, + "shareUrl": { + "type": "string" + } + } + }, + "PluginShareUpdateTargetsResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareUpdateTargetsResponse", + "type": "object", + "required": [ + "discoverability", + "principals" + ], + "properties": { + "discoverability": { + "$ref": "#/definitions/PluginShareDiscoverability" + }, + "principals": { + "type": "array", + "items": { + "$ref": "#/definitions/PluginSharePrincipal" + } + } + } + }, + "PluginShareListItem": { + "type": "object", + "required": [ + "plugin" + ], + "properties": { + "localPluginPath": { + "anyOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + }, + { + "type": "null" + } + ] + }, + "plugin": { + "$ref": "#/definitions/PluginSummary" + } + } + }, + "PluginShareListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareListResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/PluginShareListItem" + } + } + } + }, + "PluginShareCheckoutResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareCheckoutResponse", + "type": "object", + "required": [ + "marketplaceName", + "marketplacePath", + "pluginId", + "pluginName", + "pluginPath", + "remotePluginId" + ], + "properties": { + "marketplaceName": { + "type": "string" + }, + "marketplacePath": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "pluginId": { + "type": "string" + }, + "pluginName": { + "type": "string" + }, + "pluginPath": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "remotePluginId": { + "type": "string" + }, + "remoteVersion": { + "type": [ + "string", + "null" + ] + } + } + }, + "PluginShareDeleteResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginShareDeleteResponse", + "type": "object" + }, + "AppToolSummary": { + "description": "EXPERIMENTAL - metadata returned by app/read.", + "type": "object", + "required": [ + "description", + "name" + ], + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "title": { + "type": [ + "string", + "null" + ] + } + } + }, + "ConnectorMetadata": { + "description": "EXPERIMENTAL - metadata returned by app/read.", + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "distributionChannel": { + "type": [ + "string", + "null" + ] + }, + "iconUrl": { + "type": [ + "string", + "null" + ] + }, + "iconUrlDark": { + "type": [ + "string", + "null" + ] + }, + "id": { + "type": "string" + }, + "installUrl": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "pluginDisplayNames": { + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "toolSummaries": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/AppToolSummary" + } + } + } + }, + "AppsReadResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AppsReadResponse", + "description": "EXPERIMENTAL - app/read response.", + "type": "object", + "required": [ + "apps", + "missingAppIds" + ], + "properties": { + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/ConnectorMetadata" + } + }, + "missingAppIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "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" + ] + }, + "iconAssets": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "string" + } + }, + "iconDarkAssets": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "string" + } + }, + "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" + } + } + }, + "AppsListResponse": { + "$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" + ] + } + } + }, + "InstalledApp": { + "description": "Installed connector runtime state.", + "type": "object", + "required": [ + "callable", + "enabled", + "id" + ], + "properties": { + "callable": { + "description": "Whether the connector is enabled and has a non-synthetic, model-visible tool allowed by effective MCP and app/tool policy in the committed runtime snapshot.", + "type": "boolean" + }, + "enabled": { + "description": "Effective enabled state after applying global, workspace, local, and managed configuration at read time.", + "type": "boolean" + }, + "id": { + "type": "string" + }, + "runtimeName": { + "description": "Best-effort name carried by the runtime tool catalog. Canonical app metadata remains owned by `app/read`.", + "type": [ + "string", + "null" + ] + } + } + }, + "AppsInstalledResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "AppsInstalledResponse", + "description": "The installed connectors in one committed runtime snapshot.", + "type": "object", + "required": [ + "apps" + ], + "properties": { + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/InstalledApp" + } + } + } + }, + "FsReadFileResponse": { + "$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" + } + } + }, + "FsWriteFileResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FsWriteFileResponse", + "description": "Successful response for `fs/writeFile`.", + "type": "object" + }, + "FsCreateDirectoryResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FsCreateDirectoryResponse", + "description": "Successful response for `fs/createDirectory`.", + "type": "object" + }, + "FsGetMetadataResponse": { + "$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" + } + } + }, + "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" + } + } + }, + "FsReadDirectoryResponse": { + "$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" + } + } + } + }, + "FsRemoveResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FsRemoveResponse", + "description": "Successful response for `fs/remove`.", + "type": "object" + }, + "FsCopyResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FsCopyResponse", + "description": "Successful response for `fs/copy`.", + "type": "object" + }, + "FsWatchResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FsWatchResponse", + "description": "Successful response for `fs/watch`.", + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "description": "Canonicalized path associated with the watch.", + "allOf": [ + { + "$ref": "#/definitions/AbsolutePathBuf" + } + ] + } + } + }, + "FsUnwatchResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FsUnwatchResponse", + "description": "Successful response for `fs/unwatch`.", + "type": "object" + }, + "SkillsConfigWriteResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SkillsConfigWriteResponse", + "type": "object", + "required": [ + "effectiveEnabled" + ], + "properties": { + "effectiveEnabled": { + "type": "boolean" + } + } + }, + "PluginInstallResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginInstallResponse", + "type": "object", + "required": [ + "appsNeedingAuth", + "authPolicy" + ], + "properties": { + "appsNeedingAuth": { + "type": "array", + "items": { + "$ref": "#/definitions/AppSummary" + } + }, + "authPolicy": { + "$ref": "#/definitions/PluginAuthPolicy" + } + } + }, + "PluginUninstallResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PluginUninstallResponse", + "type": "object" + }, + "TurnStartResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnStartResponse", + "type": "object", + "required": [ + "turn" + ], + "properties": { + "turn": { + "$ref": "#/definitions/Turn" + } + } + }, + "TurnSteerResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnSteerResponse", + "type": "object", + "required": [ + "turnId" + ], + "properties": { + "turnId": { + "type": "string" + } + } + }, + "TurnInterruptResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnInterruptResponse", + "type": "object" + }, + "ProcessOutputDeltaNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ProcessOutputDeltaNotification", + "description": "Base64-encoded output chunk emitted for a streaming `process/spawn` request.", + "type": "object", + "required": [ + "capReached", + "deltaBase64", + "processHandle", + "stream" + ], + "properties": { + "capReached": { + "description": "True on the final streamed chunk for this stream when output was truncated by `outputBytesCap`.", + "type": "boolean" + }, + "deltaBase64": { + "description": "Base64-encoded output bytes.", + "type": "string" + }, + "processHandle": { + "description": "Client-supplied, connection-scoped `processHandle` from `process/spawn`.", + "type": "string" + }, + "stream": { + "description": "Output stream this chunk belongs to.", + "allOf": [ + { + "$ref": "#/definitions/ProcessOutputStream" + } + ] + } + } + }, + "ProcessOutputStream": { + "description": "Stream label for `process/outputDelta` notifications.", + "oneOf": [ + { + "description": "stdout stream. PTY mode multiplexes terminal output here.", + "type": "string", + "enum": [ + "stdout" + ] + }, + { + "description": "stderr stream.", + "type": "string", + "enum": [ + "stderr" + ] + } + ] + }, + "CommandExecOutputDeltaNotification": { + "$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" + } + ] + } + } + }, + "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" + ] + } + ] + }, + "PlanDeltaNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PlanDeltaNotification", + "description": "EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content.", + "type": "object", + "required": [ + "delta", + "itemId", + "threadId", + "turnId" + ], + "properties": { + "delta": { + "type": "string" + }, + "itemId": { + "type": "string" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "RealtimeVoicesList": { + "type": "object", + "required": [ + "defaultV1", + "defaultV2", + "v1", + "v2" + ], + "properties": { + "defaultV1": { + "$ref": "#/definitions/RealtimeVoice" + }, + "defaultV2": { + "$ref": "#/definitions/RealtimeVoice" + }, + "v1": { + "type": "array", + "items": { + "$ref": "#/definitions/RealtimeVoice" + } + }, + "v2": { + "type": "array", + "items": { + "$ref": "#/definitions/RealtimeVoice" + } + } + } + }, + "AgentMessageDeltaNotification": { + "$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" + } + } + }, + "ReviewStartResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ReviewStartResponse", + "type": "object", + "required": [ + "reviewThreadId", + "turn" + ], + "properties": { + "reviewThreadId": { + "description": "Identifies the thread where the review runs.\n\nFor inline reviews, this is the original thread id. For detached reviews, this is the id of the new review thread.", + "type": "string" + }, + "turn": { + "$ref": "#/definitions/Turn" + } + } + }, + "InputModality": { + "description": "Canonical user-input modality tags advertised by a model.", + "oneOf": [ + { + "description": "Plain text turns and tool payloads.", + "type": "string", + "enum": [ + "text" + ] + }, + { + "description": "Image attachments included in user turns.", + "type": "string", + "enum": [ + "image" + ] + }, + { + "description": "Audio attachments included in user turns.", + "type": "string", + "enum": [ + "audio" + ] + } + ] + }, + "Model": { + "type": "object", + "required": [ + "defaultReasoningEffort", + "description", + "displayName", + "hidden", + "id", + "isDefault", + "model", + "supportedReasoningEfforts" + ], + "properties": { + "additionalSpeedTiers": { + "description": "Deprecated: use `serviceTiers` instead.", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "availabilityNux": { + "anyOf": [ + { + "$ref": "#/definitions/ModelAvailabilityNux" + }, + { + "type": "null" + } + ] + }, + "defaultReasoningEffort": { + "$ref": "#/definitions/ReasoningEffort" + }, + "defaultServiceTier": { + "description": "Catalog default service tier id for this model, when one is configured.", + "default": null, + "type": [ + "string", + "null" + ] + }, + "description": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "hidden": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "inputModalities": { + "default": [ + "text", + "image" + ], + "type": "array", + "items": { + "$ref": "#/definitions/InputModality" + } + }, + "isDefault": { + "type": "boolean" + }, + "model": { + "type": "string" + }, + "serviceTiers": { + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/ModelServiceTier" + } + }, + "supportedReasoningEfforts": { + "type": "array", + "items": { + "$ref": "#/definitions/ReasoningEffortOption" + } + }, + "supportsPersonality": { + "default": false, + "type": "boolean" + }, + "upgrade": { + "type": [ + "string", + "null" + ] + }, + "upgradeInfo": { + "anyOf": [ + { + "$ref": "#/definitions/ModelUpgradeInfo" + }, + { + "type": "null" + } + ] + } + } + }, + "ModelAvailabilityNux": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + }, + "ModelServiceTier": { + "type": "object", + "required": [ + "description", + "id", + "name" + ], + "properties": { + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "ModelUpgradeInfo": { + "type": "object", + "required": [ + "model" + ], + "properties": { + "migrationMarkdown": { + "type": [ + "string", + "null" + ] + }, + "model": { + "type": "string" + }, + "modelLink": { + "type": [ + "string", + "null" + ] + }, + "upgradeCopy": { + "type": [ + "string", + "null" + ] + } + } + }, + "ReasoningEffortOption": { + "type": "object", + "required": [ + "description", + "reasoningEffort" + ], + "properties": { + "description": { + "type": "string" + }, + "reasoningEffort": { + "$ref": "#/definitions/ReasoningEffort" + } + } + }, + "ModelListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModelListResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Model" + } + }, + "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" + ] + } + } + }, + "ModelProviderCapabilitiesReadResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ModelProviderCapabilitiesReadResponse", + "type": "object", + "required": [ + "imageGeneration", + "namespaceTools", + "webSearch" + ], + "properties": { + "imageGeneration": { + "type": "boolean" + }, + "namespaceTools": { + "type": "boolean" + }, + "webSearch": { + "type": "boolean" + } + } + }, + "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" + ] + } + ] + }, + "ExperimentalFeatureListResponse": { + "$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" + ] + } + } + }, + "PermissionProfileSummary": { + "type": "object", + "required": [ + "allowed", + "id" + ], + "properties": { + "allowed": { + "description": "Whether the effective requirements allow selecting this profile.", + "type": "boolean" + }, + "description": { + "description": "Optional user-facing description for display in clients.", + "type": [ + "string", + "null" + ] + }, + "id": { + "description": "Available permission profile identifier.", + "type": "string" + } + } + }, + "PermissionProfileListResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PermissionProfileListResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/PermissionProfileSummary" + } + }, + "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" + ] + } + } + }, + "ExperimentalFeatureEnablementSetResponse": { + "$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" + } + } + } + }, + "RemoteControlConnectionStatus": { + "type": "string", + "enum": [ + "disabled", + "connecting", + "connected", + "errored" + ] + }, + "RawResponseCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RawResponseCompletedNotification", + "description": "Internal-only notification containing the exact usage from one upstream Responses API completion.", + "type": "object", + "required": [ + "responseId", + "threadId", + "turnId" + ], + "properties": { + "responseId": { + "type": "string" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + }, + "usage": { + "anyOf": [ + { + "$ref": "#/definitions/TokenUsageBreakdown" + }, + { + "type": "null" + } + ] + } + } + }, + "RawResponseItemCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RawResponseItemCompletedNotification", + "type": "object", + "required": [ + "item", + "threadId", + "turnId" + ], + "properties": { + "item": { + "$ref": "#/definitions/ResponseItem" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "ItemCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ItemCompletedNotification", + "type": "object", + "required": [ + "completedAtMs", + "item", + "threadId", + "turnId" + ], + "properties": { + "completedAtMs": { + "description": "Unix timestamp (in milliseconds) when this item lifecycle completed.", + "type": "integer", + "format": "int64" + }, + "item": { + "$ref": "#/definitions/ThreadItem" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "ItemGuardianApprovalReviewCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ItemGuardianApprovalReviewCompletedNotification", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", + "type": "object", + "required": [ + "action", + "completedAtMs", + "decisionSource", + "review", + "reviewId", + "startedAtMs", + "threadId", + "turnId" + ], + "properties": { + "action": { + "$ref": "#/definitions/GuardianApprovalReviewAction" + }, + "completedAtMs": { + "description": "Unix timestamp (in milliseconds) when this review completed.", + "type": "integer", + "format": "int64" + }, + "decisionSource": { + "$ref": "#/definitions/AutoReviewDecisionSource" + }, + "review": { + "$ref": "#/definitions/GuardianApprovalReview" + }, + "reviewId": { + "description": "Stable identifier for this review.", + "type": "string" + }, + "startedAtMs": { + "description": "Unix timestamp (in milliseconds) when this review started.", + "type": "integer", + "format": "int64" + }, + "targetItemId": { + "description": "Identifier for the reviewed item or tool call when one exists.\n\nIn most cases, one review maps to one target item. The exceptions are - execve reviews, where a single command may contain multiple execve calls to review (only possible when using the shell_zsh_fork feature) - network policy reviews, where there is no target item\n\nA network call is triggered by a CommandExecution item, so having a target_item_id set to the CommandExecution item would be misleading because the review is about the network call, not the command execution. Therefore, target_item_id is set to None for network policy reviews.", + "type": [ + "string", + "null" + ] + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "AutoReviewDecisionSource": { + "description": "[UNSTABLE] Source that produced a terminal approval auto-review decision.", + "type": "string", + "enum": [ + "agent" + ] + }, + "ItemGuardianApprovalReviewStartedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ItemGuardianApprovalReviewStartedNotification", + "description": "[UNSTABLE] Temporary notification payload for approval auto-review. This shape is expected to change soon.", + "type": "object", + "required": [ + "action", + "review", + "reviewId", + "startedAtMs", + "threadId", + "turnId" + ], + "properties": { + "action": { + "$ref": "#/definitions/GuardianApprovalReviewAction" + }, + "review": { + "$ref": "#/definitions/GuardianApprovalReview" + }, + "reviewId": { + "description": "Stable identifier for this review.", + "type": "string" + }, + "startedAtMs": { + "description": "Unix timestamp (in milliseconds) when this review started.", + "type": "integer", + "format": "int64" + }, + "targetItemId": { + "description": "Identifier for the reviewed item or tool call when one exists.\n\nIn most cases, one review maps to one target item. The exceptions are - execve reviews, where a single command may contain multiple execve calls to review (only possible when using the shell_zsh_fork feature) - network policy reviews, where there is no target item\n\nA network call is triggered by a CommandExecution item, so having a target_item_id set to the CommandExecution item would be misleading because the review is about the network call, not the command execution. Therefore, target_item_id is set to None for network policy reviews.", + "type": [ + "string", + "null" + ] + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "RequestPermissionProfile": { + "type": "object", + "properties": { + "fileSystem": { + "anyOf": [ + { + "$ref": "#/definitions/AdditionalFileSystemPermissions" + }, + { + "type": "null" + } + ] + }, + "network": { + "anyOf": [ + { + "$ref": "#/definitions/AdditionalNetworkPermissions" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "NetworkApprovalProtocol": { + "type": "string", + "enum": [ + "http", + "https", + "socks5Tcp", + "socks5Udp" + ] + }, + "CollaborationModeMask": { + "description": "EXPERIMENTAL - collaboration mode preset metadata for clients.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "mode": { + "anyOf": [ + { + "$ref": "#/definitions/ModeKind" + }, + { + "type": "null" + } + ] + }, + "model": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "reasoning_effort": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + }, + { + "type": "null" + } + ] + } + } + }, + "GuardianUserAuthorization": { + "description": "[UNSTABLE] Authorization level assigned by approval auto-review.", + "type": "string", + "enum": [ + "unknown", + "low", + "medium", + "high" + ] + }, + "GuardianRiskLevel": { + "description": "[UNSTABLE] Risk level assigned by approval auto-review.", + "type": "string", + "enum": [ + "low", + "medium", + "high", + "critical" + ] + }, + "GuardianCommandSource": { + "type": "string", + "enum": [ + "shell", + "unifiedExec" + ] + }, + "GuardianApprovalReviewStatus": { + "description": "[UNSTABLE] Lifecycle state for an approval auto-review.", + "type": "string", + "enum": [ + "inProgress", + "approved", + "denied", + "timedOut", + "aborted" + ] + }, + "GuardianApprovalReviewAction": { + "oneOf": [ + { + "type": "object", + "required": [ + "command", + "cwd", + "source", + "type" + ], + "properties": { + "command": { + "type": "string" + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "source": { + "$ref": "#/definitions/GuardianCommandSource" + }, + "type": { + "type": "string", + "enum": [ + "command" + ], + "title": "CommandGuardianApprovalReviewActionType" + } + }, + "title": "CommandGuardianApprovalReviewAction" + }, + { + "type": "object", + "required": [ + "argv", + "cwd", + "program", + "source", + "type" + ], + "properties": { + "argv": { + "type": "array", + "items": { + "type": "string" + } + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "program": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/GuardianCommandSource" + }, + "type": { + "type": "string", + "enum": [ + "execve" + ], + "title": "ExecveGuardianApprovalReviewActionType" + } + }, + "title": "ExecveGuardianApprovalReviewAction" + }, + { + "type": "object", + "required": [ + "cwd", + "files", + "type" + ], + "properties": { + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/definitions/AbsolutePathBuf" + } + }, + "type": { + "type": "string", + "enum": [ + "applyPatch" + ], + "title": "ApplyPatchGuardianApprovalReviewActionType" + } + }, + "title": "ApplyPatchGuardianApprovalReviewAction" + }, + { + "type": "object", + "required": [ + "host", + "port", + "protocol", + "target", + "type" + ], + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "uint16", + "minimum": 0.0 + }, + "protocol": { + "$ref": "#/definitions/NetworkApprovalProtocol" + }, + "target": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "networkAccess" + ], + "title": "NetworkAccessGuardianApprovalReviewActionType" + } + }, + "title": "NetworkAccessGuardianApprovalReviewAction" + }, + { + "type": "object", + "required": [ + "server", + "toolName", + "type" + ], + "properties": { + "connectorId": { + "type": [ + "string", + "null" + ] + }, + "connectorName": { + "type": [ + "string", + "null" + ] + }, + "server": { + "type": "string" + }, + "toolName": { + "type": "string" + }, + "toolTitle": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "mcpToolCall" + ], + "title": "McpToolCallGuardianApprovalReviewActionType" + } + }, + "title": "McpToolCallGuardianApprovalReviewAction" + }, + { + "type": "object", + "required": [ + "permissions", + "type" + ], + "properties": { + "permissions": { + "$ref": "#/definitions/RequestPermissionProfile" + }, + "reason": { + "type": [ + "string", + "null" + ] + }, + "type": { + "type": "string", + "enum": [ + "requestPermissions" + ], + "title": "RequestPermissionsGuardianApprovalReviewActionType" + } + }, + "title": "RequestPermissionsGuardianApprovalReviewAction" + } + ] + }, + "GuardianApprovalReview": { + "description": "[UNSTABLE] Temporary approval auto-review payload used by `item/autoApprovalReview/*` notifications. This shape is expected to change soon.", + "type": "object", + "required": [ + "status" + ], + "properties": { + "rationale": { + "type": [ + "string", + "null" + ] + }, + "riskLevel": { + "anyOf": [ + { + "$ref": "#/definitions/GuardianRiskLevel" + }, + { + "type": "null" + } + ] + }, + "status": { + "$ref": "#/definitions/GuardianApprovalReviewStatus" + }, + "userAuthorization": { + "anyOf": [ + { + "$ref": "#/definitions/GuardianUserAuthorization" + }, + { + "type": "null" + } + ] + } + } + }, + "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": { + "anyOf": [ + { + "$ref": "#/definitions/LegacyAppPathString" + }, + { + "type": "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": { + "anyOf": [ + { + "$ref": "#/definitions/LegacyAppPathString" + }, + { + "type": "null" + } + ] + } + } + } + ] + }, + "FileSystemSandboxEntry": { + "type": "object", + "required": [ + "access", + "path" + ], + "properties": { + "access": { + "$ref": "#/definitions/FileSystemAccessMode" + }, + "path": { + "$ref": "#/definitions/FileSystemPath" + } + } + }, + "McpServerOauthLoginResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpServerOauthLoginResponse", + "type": "object", + "required": [ + "authorizationUrl" + ], + "properties": { + "authorizationUrl": { + "type": "string" + } + } + }, + "McpServerRefreshResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpServerRefreshResponse", + "type": "object" + }, + "McpAuthStatus": { + "type": "string", + "enum": [ + "unsupported", + "notLoggedIn", + "bearerToken", + "oAuth" + ] + }, + "McpServerInfo": { + "description": "Presentation metadata advertised by an initialized MCP server.", + "type": "object", + "required": [ + "name", + "version" + ], + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "icons": { + "type": [ + "array", + "null" + ], + "items": true + }, + "name": { + "type": "string" + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "version": { + "type": "string" + }, + "websiteUrl": { + "type": [ + "string", + "null" + ] + } + } + }, + "McpServerStatus": { + "type": "object", + "required": [ + "authStatus", + "name", + "resourceTemplates", + "resources", + "tools" + ], + "properties": { + "authStatus": { + "$ref": "#/definitions/McpAuthStatus" + }, + "name": { + "type": "string" + }, + "resourceTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceTemplate" + } + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/Resource" + } + }, + "serverInfo": { + "anyOf": [ + { + "$ref": "#/definitions/McpServerInfo" + }, + { + "type": "null" + } + ] + }, + "tools": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Tool" + } + } + } + }, + "Resource": { + "description": "A known resource that the server is capable of reading.", + "type": "object", + "required": [ + "name", + "uri" + ], + "properties": { + "_meta": true, + "annotations": true, + "description": { + "type": [ + "string", + "null" + ] + }, + "icons": { + "type": [ + "array", + "null" + ], + "items": true + }, + "mimeType": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "size": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "uri": { + "type": "string" + } + } + }, + "ResourceTemplate": { + "description": "A template description for resources available on the server.", + "type": "object", + "required": [ + "name", + "uriTemplate" + ], + "properties": { + "annotations": true, + "description": { + "type": [ + "string", + "null" + ] + }, + "mimeType": { + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "uriTemplate": { + "type": "string" + } + } + }, + "Tool": { + "description": "Definition for a tool the client can call.", + "type": "object", + "required": [ + "inputSchema", + "name" + ], + "properties": { + "_meta": true, + "annotations": true, + "description": { + "type": [ + "string", + "null" + ] + }, + "icons": { + "type": [ + "array", + "null" + ], + "items": true + }, + "inputSchema": true, + "name": { + "type": "string" + }, + "outputSchema": true, + "title": { + "type": [ + "string", + "null" + ] + } + } + }, + "ListMcpServerStatusResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ListMcpServerStatusResponse", + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/McpServerStatus" + } + }, + "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" + ] + } + } + }, + "ResourceContent": { + "description": "Contents returned when reading a resource from an MCP server.", + "anyOf": [ + { + "type": "object", + "required": [ + "text", + "uri" + ], + "properties": { + "_meta": true, + "mimeType": { + "type": [ + "string", + "null" + ] + }, + "text": { + "type": "string" + }, + "uri": { + "description": "The URI of this resource.", + "type": "string" + } + } + }, + { + "type": "object", + "required": [ + "blob", + "uri" + ], + "properties": { + "_meta": true, + "blob": { + "type": "string" + }, + "mimeType": { + "type": [ + "string", + "null" + ] + }, + "uri": { + "description": "The URI of this resource.", + "type": "string" + } + } + } + ] + }, + "McpResourceReadResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpResourceReadResponse", + "type": "object", + "required": [ + "contents" + ], + "properties": { + "contents": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceContent" + } + } + } + }, + "McpServerToolCallResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "McpServerToolCallResponse", + "type": "object", + "required": [ + "content" + ], + "properties": { + "_meta": true, + "content": { + "type": "array", + "items": true + }, + "isError": { + "type": [ + "boolean", + "null" + ] + }, + "structuredContent": true + } + }, + "WindowsSandboxSetupStartResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "WindowsSandboxSetupStartResponse", + "type": "object", + "required": [ + "started" + ], + "properties": { + "started": { + "type": "boolean" + } + } + }, + "WindowsSandboxReadiness": { + "type": "string", + "enum": [ + "ready", + "notConfigured", + "updateRequired" + ] + }, + "WindowsSandboxReadinessResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "WindowsSandboxReadinessResponse", + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/definitions/WindowsSandboxReadiness" + } + } + }, + "LoginAccountResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "LoginAccountResponse", + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ], + "title": "ApiKeyv2::LoginAccountResponseType" + } + }, + "title": "ApiKeyv2::LoginAccountResponse" + }, + { + "type": "object", + "required": [ + "authUrl", + "loginId", + "type" + ], + "properties": { + "authUrl": { + "description": "URL the client should open in a browser to initiate the OAuth flow.", + "type": "string" + }, + "loginId": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "chatgpt" + ], + "title": "Chatgptv2::LoginAccountResponseType" + } + }, + "title": "Chatgptv2::LoginAccountResponse" + }, + { + "type": "object", + "required": [ + "loginId", + "type", + "userCode", + "verificationUrl" + ], + "properties": { + "loginId": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "chatgptDeviceCode" + ], + "title": "ChatgptDeviceCodev2::LoginAccountResponseType" + }, + "userCode": { + "description": "One-time code the user must enter after signing in.", + "type": "string" + }, + "verificationUrl": { + "description": "URL the client should open in a browser to complete device code authorization.", + "type": "string" + } + }, + "title": "ChatgptDeviceCodev2::LoginAccountResponse" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "chatgptAuthTokens" + ], + "title": "ChatgptAuthTokensv2::LoginAccountResponseType" + } + }, + "title": "ChatgptAuthTokensv2::LoginAccountResponse" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "amazonBedrock" + ], + "title": "AmazonBedrockv2::LoginAccountResponseType" + } + }, + "title": "AmazonBedrockv2::LoginAccountResponse" + } + ] + }, + "CancelLoginAccountStatus": { + "type": "string", + "enum": [ + "canceled", + "notFound" + ] + }, + "CancelLoginAccountResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CancelLoginAccountResponse", + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/definitions/CancelLoginAccountStatus" + } + } + }, + "LogoutAccountResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "LogoutAccountResponse", + "type": "object" + }, + "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" + ] + }, + "RateLimitResetCredit": { + "type": "object", + "required": [ + "grantedAt", + "id", + "resetType", + "status" + ], + "properties": { + "description": { + "description": "Backend-provided display description for this credit, or `null` when unavailable.", + "type": [ + "string", + "null" + ] + }, + "expiresAt": { + "description": "Unix timestamp in seconds when the credit expires, or `null` if it does not expire.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "grantedAt": { + "description": "Unix timestamp in seconds when the credit was granted.", + "type": "integer", + "format": "int64" + }, + "id": { + "description": "Opaque backend identifier for this reset credit.", + "type": "string" + }, + "resetType": { + "$ref": "#/definitions/RateLimitResetType" + }, + "status": { + "$ref": "#/definitions/RateLimitResetCreditStatus" + }, + "title": { + "description": "Backend-provided display title for this credit, or `null` when unavailable.", + "type": [ + "string", + "null" + ] + } + } + }, + "RateLimitResetCreditStatus": { + "type": "string", + "enum": [ + "available", + "redeeming", + "redeemed", + "unknown" + ] + }, + "RateLimitResetCreditsSummary": { + "type": "object", + "required": [ + "availableCount" + ], + "properties": { + "availableCount": { + "type": "integer", + "format": "int64" + }, + "credits": { + "description": "Detail rows for available reset credits, when the backend provides them.\n\n`null` means only `availableCount` is known, while an empty array means details were fetched and no available credits were returned. The backend may cap this list, so its length can be less than `availableCount`.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/RateLimitResetCredit" + } + } + } + }, + "RateLimitResetType": { + "type": "string", + "enum": [ + "codexRateLimits", + "unknown" + ] + }, + "RateLimitSnapshot": { + "type": "object", + "properties": { + "credits": { + "anyOf": [ + { + "$ref": "#/definitions/CreditsSnapshot" + }, + { + "type": "null" + } + ] + }, + "individualLimit": { + "anyOf": [ + { + "$ref": "#/definitions/SpendControlLimitSnapshot" + }, + { + "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" + } + ] + }, + "spendControlReached": { + "description": "Backend-reported spend-control state. `None` is unavailable, not a sparse-update recovery.", + "type": [ + "boolean", + "null" + ] + } + } + }, + "RateLimitWindow": { + "type": "object", + "required": [ + "usedPercent" + ], + "properties": { + "resetsAt": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "usedPercent": { + "type": "integer", + "format": "int32" + }, + "windowDurationMins": { + "type": [ + "integer", + "null" + ], + "format": "int64" + } + } + }, + "SpendControlLimitSnapshot": { + "type": "object", + "required": [ + "limit", + "remainingPercent", + "resetsAt", + "used" + ], + "properties": { + "limit": { + "type": "string" + }, + "remainingPercent": { + "type": "integer", + "format": "int32" + }, + "resetsAt": { + "type": "integer", + "format": "int64" + }, + "used": { + "type": "string" + } + } + }, + "GetAccountRateLimitsResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GetAccountRateLimitsResponse", + "type": "object", + "required": [ + "rateLimits" + ], + "properties": { + "rateLimitResetCredits": { + "anyOf": [ + { + "$ref": "#/definitions/RateLimitResetCreditsSummary" + }, + { + "type": "null" + } + ] + }, + "rateLimits": { + "description": "Backward-compatible single-bucket view; mirrors the historical payload.", + "allOf": [ + { + "$ref": "#/definitions/RateLimitSnapshot" + } + ] + }, + "rateLimitsByLimitId": { + "description": "Multi-bucket view keyed by metered `limit_id` (for example, `codex`).", + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/definitions/RateLimitSnapshot" + } + } + } + }, + "ConsumeAccountRateLimitResetCreditOutcome": { + "oneOf": [ + { + "description": "A reset credit was consumed and the eligible rate-limit windows were reset.", + "type": "string", + "enum": [ + "reset" + ] + }, + { + "description": "No current rate-limit window is eligible for a reset.", + "type": "string", + "enum": [ + "nothingToReset" + ] + }, + { + "description": "The account has no earned reset credits available.", + "type": "string", + "enum": [ + "noCredit" + ] + }, + { + "description": "The same idempotency key already completed a reset successfully.", + "type": "string", + "enum": [ + "alreadyRedeemed" + ] + } + ] + }, + "ConsumeAccountRateLimitResetCreditResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConsumeAccountRateLimitResetCreditResponse", + "type": "object", + "required": [ + "outcome" + ], + "properties": { + "outcome": { + "$ref": "#/definitions/ConsumeAccountRateLimitResetCreditOutcome" + } + } + }, + "AccountTokenUsageDailyBucket": { + "type": "object", + "required": [ + "startDate", + "tokens" + ], + "properties": { + "startDate": { + "type": "string" + }, + "tokens": { + "type": "integer", + "format": "int64" + } + } + }, + "AccountTokenUsageSummary": { + "type": "object", + "properties": { + "currentStreakDays": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "lifetimeTokens": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "longestRunningTurnSec": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "longestStreakDays": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "peakDailyTokens": { + "type": [ + "integer", + "null" + ], + "format": "int64" + } + } + }, + "GetAccountTokenUsageResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GetAccountTokenUsageResponse", + "type": "object", + "required": [ + "summary" + ], + "properties": { + "dailyUsageBuckets": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/AccountTokenUsageDailyBucket" + } + }, + "summary": { + "$ref": "#/definitions/AccountTokenUsageSummary" + } + } + }, + "WorkspaceMessage": { + "type": "object", + "required": [ + "messageBody", + "messageId", + "messageType" + ], + "properties": { + "archivedAt": { + "description": "Unix timestamp (in seconds) when the message was archived.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "createdAt": { + "description": "Unix timestamp (in seconds) when the message was created.", + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "messageBody": { + "type": "string" + }, + "messageId": { + "type": "string" + }, + "messageType": { + "$ref": "#/definitions/WorkspaceMessageType" + } + } + }, + "WorkspaceMessageType": { + "type": "string", + "enum": [ + "headline", + "announcement", + "unknown" + ] + }, + "GetWorkspaceMessagesResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GetWorkspaceMessagesResponse", + "type": "object", + "required": [ + "featureEnabled", + "messages" + ], + "properties": { + "featureEnabled": { + "description": "Whether the workspace-message backend route is available for this client.", + "type": "boolean" + }, + "messages": { + "description": "Active workspace messages returned by the backend.", + "type": "array", + "items": { + "$ref": "#/definitions/WorkspaceMessage" + } + } + } + }, + "AddCreditsNudgeEmailStatus": { + "type": "string", + "enum": [ + "sent", + "cooldown_active" + ] + }, + "SendAddCreditsNudgeEmailResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SendAddCreditsNudgeEmailResponse", + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/definitions/AddCreditsNudgeEmailStatus" + } + } + }, + "FeedbackUploadResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FeedbackUploadResponse", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "CommandExecResponse": { + "$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" + } + } + }, + "CommandExecWriteResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CommandExecWriteResponse", + "description": "Empty success response for `command/exec/write`.", + "type": "object" + }, + "CommandExecTerminateResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CommandExecTerminateResponse", + "description": "Empty success response for `command/exec/terminate`.", + "type": "object" + }, + "CommandExecResizeResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CommandExecResizeResponse", + "description": "Empty success response for `command/exec/resize`.", + "type": "object" + }, + "FileSystemPath": { + "oneOf": [ + { + "type": "object", + "required": [ + "path", + "type" + ], + "properties": { + "path": { + "$ref": "#/definitions/LegacyAppPathString" + }, + "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" + } + ] + }, + "FileSystemAccessMode": { + "type": "string", + "enum": [ + "read", + "write", + "deny" + ] + }, + "AdditionalNetworkPermissions": { + "type": "object", + "properties": { + "enabled": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "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/LegacyAppPathString" + } + }, + "write": { + "description": "This will be removed in favor of `entries`.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/LegacyAppPathString" + } + } + } + }, + "AnalyticsConfig": { + "type": "object", + "properties": { + "enabled": { + "type": [ + "boolean", + "null" + ] + } + }, + "additionalProperties": true + }, + "AppConfig": { + "type": "object", + "properties": { + "approvals_reviewer": { + "anyOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + }, + { + "type": "null" + } + ] + }, + "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", + "writes", + "approve" + ] + }, + "AppToolConfig": { + "type": "object", + "properties": { + "approval_mode": { + "anyOf": [ + { + "$ref": "#/definitions/AppToolApproval" + }, + { + "type": "null" + } + ] + }, + "enabled": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "AppToolsConfig": { + "type": "object" + }, + "AppsConfig": { + "type": "object", + "properties": { + "_default": { + "default": null, + "anyOf": [ + { + "$ref": "#/definitions/AppsDefaultConfig" + }, + { + "type": "null" + } + ] + } + } + }, + "AppsDefaultConfig": { + "type": "object", + "properties": { + "approvals_reviewer": { + "anyOf": [ + { + "$ref": "#/definitions/ApprovalsReviewer" + }, + { + "type": "null" + } + ] + }, + "default_tools_approval_mode": { + "anyOf": [ + { + "$ref": "#/definitions/AppToolApproval" + }, + { + "type": "null" + } + ] + }, + "destructive_enabled": { + "default": true, + "type": "boolean" + }, + "enabled": { + "default": true, + "type": "boolean" + }, + "open_world_enabled": { + "default": true, + "type": "boolean" + } + } + }, + "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": "Enterprise-managed config layer delivered by the cloud config bundle.", + "type": "object", + "required": [ + "id", + "name", + "type" + ], + "properties": { + "id": { + "description": "Stable identifier for the delivered layer.", + "type": "string" + }, + "name": { + "description": "Admin-facing name for the delivered layer. This is surfaced in diagnostics so users know which cloud layer needs administrator attention.", + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "enterpriseManaged" + ], + "title": "EnterpriseManagedConfigLayerSourceType" + } + }, + "title": "EnterpriseManagedConfigLayerSource" + }, + { + "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" + ] + }, + "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", + "indexed", + "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 + }, + "ConfigReadResponse": { + "$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" + } + } + } + }, + "ExternalAgentConfigDetectResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExternalAgentConfigDetectResponse", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentConfigMigrationItem" + } + } + } + }, + "ExternalAgentConfigImportResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExternalAgentConfigImportResponse", + "type": "object", + "required": [ + "importId" + ], + "properties": { + "importId": { + "type": "string" + } + } + }, + "ExternalAgentConfigImportHistory": { + "type": "object", + "required": [ + "completedAtMs", + "failures", + "importId", + "successes" + ], + "properties": { + "completedAtMs": { + "type": "integer", + "format": "int64" + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentConfigImportItemTypeFailure" + } + }, + "importId": { + "type": "string" + }, + "successes": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentConfigImportItemTypeSuccess" + } + } + } + }, + "ExternalAgentConfigImportItemTypeFailure": { + "type": "object", + "required": [ + "failureStage", + "itemType", + "message" + ], + "properties": { + "cwd": { + "type": [ + "string", + "null" + ] + }, + "errorType": { + "type": [ + "string", + "null" + ] + }, + "failureStage": { + "type": "string" + }, + "itemType": { + "$ref": "#/definitions/ExternalAgentConfigMigrationItemType" + }, + "message": { + "type": "string" + }, + "source": { + "type": [ + "string", + "null" + ] + }, + "subErrorType": { + "type": [ + "string", + "null" + ] + } + } + }, + "ExternalAgentConfigImportItemTypeSuccess": { + "type": "object", + "required": [ + "itemType" + ], + "properties": { + "cwd": { + "type": [ + "string", + "null" + ] + }, + "itemType": { + "$ref": "#/definitions/ExternalAgentConfigMigrationItemType" + }, + "source": { + "type": [ + "string", + "null" + ] + }, + "target": { + "type": [ + "string", + "null" + ] + } + } + }, + "ExternalAgentImportedConnectorCandidate": { + "type": "object", + "required": [ + "name", + "sessionCount", + "source" + ], + "properties": { + "name": { + "type": "string" + }, + "sessionCount": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "source": { + "$ref": "#/definitions/ExternalAgentImportedConnectorSource" + } + } + }, + "ExternalAgentImportedConnectorSource": { + "type": "string", + "enum": [ + "remoteMcpServersConfig" + ] + }, + "ExternalAgentConfigImportHistoriesReadResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExternalAgentConfigImportHistoriesReadResponse", + "type": "object", + "required": [ + "connectors", + "data" + ], + "properties": { + "connectors": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentImportedConnectorCandidate" + } + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/ExternalAgentConfigImportHistory" + } + } + } + }, + "OverriddenMetadata": { + "type": "object", + "required": [ + "effectiveValue", + "message", + "overridingLayer" + ], + "properties": { + "effectiveValue": true, + "message": { + "type": "string" + }, + "overridingLayer": { + "$ref": "#/definitions/ConfigLayerMetadata" + } + } + }, + "WriteStatus": { + "type": "string", + "enum": [ + "ok", + "okOverridden" + ] + }, + "ConfigWriteResponse": { + "$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" + } + } + }, + "ComputerUseRequirements": { + "type": "object", + "properties": { + "allowLockedComputerUse": { + "type": [ + "boolean", + "null" + ] + } + } + }, + "ConfigRequirements": { + "type": "object", + "properties": { + "allowAppshots": { + "type": [ + "boolean", + "null" + ] + }, + "allowManagedHooksOnly": { + "type": [ + "boolean", + "null" + ] + }, + "allowRemoteControl": { + "type": [ + "boolean", + "null" + ] + }, + "allowedApprovalPolicies": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/AskForApproval" + } + }, + "models": { + "anyOf": [ + { + "$ref": "#/definitions/ModelsRequirements" + }, + { + "type": "null" + } + ] + }, + "allowedPermissionProfiles": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "boolean" + } + }, + "allowedSandboxModes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/SandboxMode" + } + }, + "allowedWebSearchModes": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/WebSearchMode" + } + }, + "allowedWindowsSandboxImplementations": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/WindowsSandboxSetupMode" + } + }, + "computerUse": { + "anyOf": [ + { + "$ref": "#/definitions/ComputerUseRequirements" + }, + { + "type": "null" + } + ] + }, + "defaultPermissions": { + "type": [ + "string", + "null" + ] + }, + "enforceResidency": { + "anyOf": [ + { + "$ref": "#/definitions/ResidencyRequirement" + }, + { + "type": "null" + } + ] + }, + "featureRequirements": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "boolean" + } + } + } + }, + "ConfiguredHookHandler": { + "oneOf": [ + { + "type": "object", + "required": [ + "async", + "command", + "type" + ], + "properties": { + "additionalContextLimit": { + "description": "Approximate token threshold for spilling this hook's `additionalContext` to disk. `null` uses 2,500 tokens; `0` disables spilling for this hook. The threshold is evaluated against the original context; a spilled preview also includes recovery metadata.", + "type": [ + "integer", + "null" + ], + "format": "uint", + "minimum": 0.0 + }, + "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" + } + }, + "SessionEnd": { + "default": [], + "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" + ] + } + } + }, + "ModelsRequirements": { + "type": "object", + "properties": { + "newThread": { + "anyOf": [ + { + "$ref": "#/definitions/NewThreadModelDefaults" + }, + { + "type": "null" + } + ] + } + } + }, + "NetworkDomainPermission": { + "type": "string", + "enum": [ + "allow", + "deny" + ] + }, + "NetworkRequirements": { + "type": "object", + "properties": { + "allowLocalBinding": { + "type": [ + "boolean", + "null" + ] + }, + "allowUnixSockets": { + "description": "Legacy compatibility view derived from `unix_sockets`.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "allowUpstreamProxy": { + "type": [ + "boolean", + "null" + ] + }, + "allowedDomains": { + "description": "Legacy compatibility view derived from `domains`.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "dangerouslyAllowAllUnixSockets": { + "type": [ + "boolean", + "null" + ] + }, + "dangerouslyAllowNonLoopbackProxy": { + "type": [ + "boolean", + "null" + ] + }, + "deniedDomains": { + "description": "Legacy compatibility view derived from `domains`.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "domains": { + "description": "Canonical network permission map for `experimental_network`.", + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/definitions/NetworkDomainPermission" + } + }, + "enabled": { + "type": [ + "boolean", + "null" + ] + }, + "httpPort": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0.0 + }, + "managedAllowedDomainsOnly": { + "description": "When true, only managed allowlist entries are respected while managed network enforcement is active.", + "type": [ + "boolean", + "null" + ] + }, + "socksPort": { + "type": [ + "integer", + "null" + ], + "format": "uint16", + "minimum": 0.0 + }, + "unixSockets": { + "description": "Canonical unix socket permission map for `experimental_network`.", + "type": [ + "object", + "null" + ], + "additionalProperties": { + "$ref": "#/definitions/NetworkUnixSocketPermission" + } + } + } + }, + "NetworkUnixSocketPermission": { + "type": "string", + "enum": [ + "allow", + "deny" + ] + }, + "NewThreadModelDefaults": { + "type": "object", + "properties": { + "model": { + "type": [ + "string", + "null" + ] + }, + "modelReasoningEffort": { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + }, + "serviceTier": { + "type": [ + "string", + "null" + ] + } + } + }, + "ResidencyRequirement": { + "type": "string", + "enum": [ + "us" + ] + }, + "ConfigRequirementsReadResponse": { + "$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" + } + ] + } + } + }, + "Account": { + "oneOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ], + "title": "ApiKeyAccountType" + } + }, + "title": "ApiKeyAccount" + }, + { + "type": "object", + "required": [ + "email", + "planType", + "type" + ], + "properties": { + "email": { + "type": [ + "string", + "null" + ] + }, + "planType": { + "$ref": "#/definitions/PlanType" + }, + "type": { + "type": "string", + "enum": [ + "chatgpt" + ], + "title": "ChatgptAccountType" + } + }, + "title": "ChatgptAccount" + }, + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "amazonBedrock" + ], + "title": "AmazonBedrockAccountType" + }, + "usesCodexManagedCredentials": { + "default": false, + "type": "boolean" + } + }, + "title": "AmazonBedrockAccount" + } + ] + }, + "GetAccountResponse": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GetAccountResponse", + "type": "object", + "required": [ + "requiresOpenaiAuth" + ], + "properties": { + "account": { + "anyOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] + }, + "requiresOpenaiAuth": { + "type": "boolean" + } + } + }, + "ErrorNotification": { + "$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" + } + } + }, + "ThreadStartedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadStartedNotification", + "type": "object", + "required": [ + "thread" + ], + "properties": { + "thread": { + "$ref": "#/definitions/Thread" + } + } + }, + "ThreadStatusChangedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadStatusChangedNotification", + "type": "object", + "required": [ + "status", + "threadId" + ], + "properties": { + "status": { + "$ref": "#/definitions/ThreadStatus" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadArchivedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadArchivedNotification", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "ThreadDeletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadDeletedNotification", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "ThreadUnarchivedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadUnarchivedNotification", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "ThreadClosedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadClosedNotification", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "SkillsChangedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "SkillsChangedNotification", + "description": "Notification emitted when watched local skill files change.\n\nTreat this as an invalidation signal and re-run `skills/list` with the client's current parameters when refreshed skill metadata is needed.", + "type": "object" + }, + "ThreadNameUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadNameUpdatedNotification", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + }, + "threadName": { + "type": [ + "string", + "null" + ] + } + } + }, + "ThreadGoalUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadGoalUpdatedNotification", + "type": "object", + "required": [ + "goal", + "threadId" + ], + "properties": { + "goal": { + "$ref": "#/definitions/ThreadGoal" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": [ + "string", + "null" + ] + } + } + }, + "ThreadGoalClearedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadGoalClearedNotification", + "type": "object", + "required": [ + "threadId" + ], + "properties": { + "threadId": { + "type": "string" + } + } + }, + "EnvironmentConnectionNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "EnvironmentConnectionNotification", + "type": "object", + "required": [ + "environmentId", + "threadId" + ], + "properties": { + "environmentId": { + "type": "string" + }, + "threadId": { + "type": "string" + } + } + }, + "ThreadSettings": { + "type": "object", + "required": [ + "approvalPolicy", + "approvalsReviewer", + "collaborationMode", + "cwd", + "model", + "modelProvider", + "sandboxPolicy" + ], + "properties": { + "activePermissionProfile": { + "anyOf": [ + { + "$ref": "#/definitions/ActivePermissionProfile" + }, + { + "type": "null" + } + ] + }, + "approvalPolicy": { + "$ref": "#/definitions/AskForApproval" + }, + "approvalsReviewer": { + "$ref": "#/definitions/ApprovalsReviewer" + }, + "collaborationMode": { + "$ref": "#/definitions/CollaborationMode" + }, + "cwd": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "effort": { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningEffort" + }, + { + "type": "null" + } + ] + }, + "model": { + "type": "string" + }, + "modelProvider": { + "type": "string" + }, + "summary": { + "anyOf": [ + { + "$ref": "#/definitions/ReasoningSummary" + }, + { + "type": "null" + } + ] + }, + "personality": { + "anyOf": [ + { + "$ref": "#/definitions/Personality" + }, + { + "type": "null" + } + ] + }, + "sandboxPolicy": { + "$ref": "#/definitions/SandboxPolicy" + }, + "serviceTier": { + "type": [ + "string", + "null" + ] + } + } + }, + "ThreadSettingsUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadSettingsUpdatedNotification", + "type": "object", + "required": [ + "threadId", + "threadSettings" + ], + "properties": { + "threadId": { + "type": "string" + }, + "threadSettings": { + "$ref": "#/definitions/ThreadSettings" + } + } + }, + "ThreadTokenUsage": { + "type": "object", + "required": [ + "last", + "total" + ], + "properties": { + "last": { + "$ref": "#/definitions/TokenUsageBreakdown" + }, + "modelContextWindow": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "total": { + "$ref": "#/definitions/TokenUsageBreakdown" + } + } + }, + "TokenUsageBreakdown": { + "type": "object", + "required": [ + "cachedInputTokens", + "inputTokens", + "outputTokens", + "reasoningOutputTokens", + "totalTokens" + ], + "properties": { + "cacheWriteInputTokens": { + "default": 0, + "type": "integer", + "format": "int64" + }, + "cachedInputTokens": { + "type": "integer", + "format": "int64" + }, + "inputTokens": { + "type": "integer", + "format": "int64" + }, + "outputTokens": { + "type": "integer", + "format": "int64" + }, + "reasoningOutputTokens": { + "type": "integer", + "format": "int64" + }, + "totalTokens": { + "type": "integer", + "format": "int64" + } + } + }, + "ThreadTokenUsageUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ThreadTokenUsageUpdatedNotification", + "type": "object", + "required": [ + "threadId", + "tokenUsage", + "turnId" + ], + "properties": { + "threadId": { + "type": "string" + }, + "tokenUsage": { + "$ref": "#/definitions/ThreadTokenUsage" + }, + "turnId": { + "type": "string" + } + } + }, + "TurnStartedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnStartedNotification", + "type": "object", + "required": [ + "threadId", + "turn" + ], + "properties": { + "threadId": { + "type": "string" + }, + "turn": { + "$ref": "#/definitions/Turn" + } + } + }, + "HookExecutionMode": { + "type": "string", + "enum": [ + "sync", + "async" + ] + }, + "HookOutputEntry": { + "type": "object", + "required": [ + "kind", + "text" + ], + "properties": { + "kind": { + "$ref": "#/definitions/HookOutputEntryKind" + }, + "text": { + "type": "string" + } + } + }, + "HookOutputEntryKind": { + "type": "string", + "enum": [ + "warning", + "stop", + "feedback", + "context", + "error" + ] + }, + "HookRunStatus": { + "type": "string", + "enum": [ + "running", + "completed", + "failed", + "blocked", + "stopped" + ] + }, + "HookRunSummary": { + "type": "object", + "required": [ + "displayOrder", + "entries", + "eventName", + "executionMode", + "handlerType", + "id", + "scope", + "sourcePath", + "startedAt", + "status" + ], + "properties": { + "completedAt": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "displayOrder": { + "type": "integer", + "format": "int64" + }, + "durationMs": { + "type": [ + "integer", + "null" + ], + "format": "int64" + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/HookOutputEntry" + } + }, + "eventName": { + "$ref": "#/definitions/HookEventName" + }, + "executionMode": { + "$ref": "#/definitions/HookExecutionMode" + }, + "handlerType": { + "$ref": "#/definitions/HookHandlerType" + }, + "id": { + "type": "string" + }, + "scope": { + "$ref": "#/definitions/HookScope" + }, + "source": { + "default": "unknown", + "allOf": [ + { + "$ref": "#/definitions/HookSource" + } + ] + }, + "sourcePath": { + "$ref": "#/definitions/AbsolutePathBuf" + }, + "startedAt": { + "type": "integer", + "format": "int64" + }, + "status": { + "$ref": "#/definitions/HookRunStatus" + }, + "statusMessage": { + "type": [ + "string", + "null" + ] + } + } + }, + "HookScope": { + "type": "string", + "enum": [ + "thread", + "turn" + ] + }, + "HookStartedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "HookStartedNotification", + "type": "object", + "required": [ + "run", + "threadId" + ], + "properties": { + "run": { + "$ref": "#/definitions/HookRunSummary" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": [ + "string", + "null" + ] + } + } + }, + "TurnCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnCompletedNotification", + "type": "object", + "required": [ + "threadId", + "turn" + ], + "properties": { + "threadId": { + "type": "string" + }, + "turn": { + "$ref": "#/definitions/Turn" + } + } + }, + "HookCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "HookCompletedNotification", + "type": "object", + "required": [ + "run", + "threadId" + ], + "properties": { + "run": { + "$ref": "#/definitions/HookRunSummary" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": [ + "string", + "null" + ] + } + } + }, + "TurnDiffUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnDiffUpdatedNotification", + "description": "Notification that the turn-level unified diff has changed. Contains the latest aggregated diff across all file changes in the turn.", + "type": "object", + "required": [ + "diff", + "threadId", + "turnId" + ], + "properties": { + "diff": { + "type": "string" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "TurnPlanStep": { + "type": "object", + "required": [ + "status", + "step" + ], + "properties": { + "status": { + "$ref": "#/definitions/TurnPlanStepStatus" + }, + "step": { + "type": "string" + } + } + }, + "TurnPlanStepStatus": { + "type": "string", + "enum": [ + "pending", + "inProgress", + "completed" + ] + }, + "TurnPlanUpdatedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TurnPlanUpdatedNotification", + "type": "object", + "required": [ + "plan", + "threadId", + "turnId" + ], + "properties": { + "explanation": { + "type": [ + "string", + "null" + ] + }, + "plan": { + "type": "array", + "items": { + "$ref": "#/definitions/TurnPlanStep" + } + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "ItemStartedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ItemStartedNotification", + "type": "object", + "required": [ + "item", + "startedAtMs", + "threadId", + "turnId" + ], + "properties": { + "item": { + "$ref": "#/definitions/ThreadItem" + }, + "startedAtMs": { + "description": "Unix timestamp (in milliseconds) when this item lifecycle started.", + "type": "integer", + "format": "int64" + }, + "threadId": { + "type": "string" + }, + "turnId": { + "type": "string" + } + } + }, + "FuzzyFileSearchParams": { + "$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" + } + } + } + }, + "ClientInfo": { + "type": "object", + "required": [ + "name", + "version" + ], + "properties": { + "name": { + "type": "string" + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "version": { + "type": "string" + } + } + }, + "FuzzyFileSearchSessionUpdatedNotification": { + "$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" + } + } + }, + "FuzzyFileSearchSessionCompletedNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FuzzyFileSearchSessionCompletedNotification", + "type": "object", + "required": [ + "sessionId" + ], + "properties": { + "sessionId": { + "type": "string" + } + } + }, + "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 + } + } + }, + "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" + }, + "mcpServerOpenaiFormElicitation": { + "description": "Allow downstream MCP servers to request OpenAI extended form elicitations.", + "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" + } + } + }, + "InitializeParams": { + "$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" + } + } + }, + "ClientRequest": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ClientRequest", + "description": "Request from the client to the server.", + "oneOf": [ + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "initialize" + ], + "title": "InitializeRequestMethod" + }, + "params": { + "$ref": "#/definitions/InitializeParams" + } + }, + "title": "InitializeRequest" + }, + { + "description": "NEW APIs", + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/start" + ], + "title": "Thread/startRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadStartParams" + } + }, + "title": "Thread/startRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/resume" + ], + "title": "Thread/resumeRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadResumeParams" + } + }, + "title": "Thread/resumeRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/fork" + ], + "title": "Thread/forkRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadForkParams" + } + }, + "title": "Thread/forkRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/archive" + ], + "title": "Thread/archiveRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadArchiveParams" + } + }, + "title": "Thread/archiveRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/delete" + ], + "title": "Thread/deleteRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadDeleteParams" + } + }, + "title": "Thread/deleteRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/unsubscribe" + ], + "title": "Thread/unsubscribeRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadUnsubscribeParams" + } + }, + "title": "Thread/unsubscribeRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/name/set" + ], + "title": "Thread/name/setRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadSetNameParams" + } + }, + "title": "Thread/name/setRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/goal/set" + ], + "title": "Thread/goal/setRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadGoalSetParams" + } + }, + "title": "Thread/goal/setRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/goal/get" + ], + "title": "Thread/goal/getRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadGoalGetParams" + } + }, + "title": "Thread/goal/getRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/goal/clear" + ], + "title": "Thread/goal/clearRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadGoalClearParams" + } + }, + "title": "Thread/goal/clearRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/metadata/update" + ], + "title": "Thread/metadata/updateRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadMetadataUpdateParams" + } + }, + "title": "Thread/metadata/updateRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/unarchive" + ], + "title": "Thread/unarchiveRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadUnarchiveParams" + } + }, + "title": "Thread/unarchiveRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/compact/start" + ], + "title": "Thread/compact/startRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadCompactStartParams" + } + }, + "title": "Thread/compact/startRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/shellCommand" + ], + "title": "Thread/shellCommandRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadShellCommandParams" + } + }, + "title": "Thread/shellCommandRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/approveGuardianDeniedAction" + ], + "title": "Thread/approveGuardianDeniedActionRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadApproveGuardianDeniedActionParams" + } + }, + "title": "Thread/approveGuardianDeniedActionRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/rollback" + ], + "title": "Thread/rollbackRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadRollbackParams" + } + }, + "title": "Thread/rollbackRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/list" + ], + "title": "Thread/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadListParams" + } + }, + "title": "Thread/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/loaded/list" + ], + "title": "Thread/loaded/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadLoadedListParams" + } + }, + "title": "Thread/loaded/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/read" + ], + "title": "Thread/readRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadReadParams" + } + }, + "title": "Thread/readRequest" + }, + { + "description": "Append raw Responses API items to the thread history without starting a user turn.", + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "thread/inject_items" + ], + "title": "Thread/injectItemsRequestMethod" + }, + "params": { + "$ref": "#/definitions/ThreadInjectItemsParams" + } + }, + "title": "Thread/injectItemsRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "skills/list" + ], + "title": "Skills/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/SkillsListParams" + } + }, + "title": "Skills/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "skills/extraRoots/set" + ], + "title": "Skills/extraRoots/setRequestMethod" + }, + "params": { + "$ref": "#/definitions/SkillsExtraRootsSetParams" + } + }, + "title": "Skills/extraRoots/setRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "hooks/list" + ], + "title": "Hooks/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/HooksListParams" + } + }, + "title": "Hooks/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "marketplace/add" + ], + "title": "Marketplace/addRequestMethod" + }, + "params": { + "$ref": "#/definitions/MarketplaceAddParams" + } + }, + "title": "Marketplace/addRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "marketplace/remove" + ], + "title": "Marketplace/removeRequestMethod" + }, + "params": { + "$ref": "#/definitions/MarketplaceRemoveParams" + } + }, + "title": "Marketplace/removeRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "marketplace/upgrade" + ], + "title": "Marketplace/upgradeRequestMethod" + }, + "params": { + "$ref": "#/definitions/MarketplaceUpgradeParams" + } + }, + "title": "Marketplace/upgradeRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/list" + ], + "title": "Plugin/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginListParams" + } + }, + "title": "Plugin/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/installed" + ], + "title": "Plugin/installedRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginInstalledParams" + } + }, + "title": "Plugin/installedRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/read" + ], + "title": "Plugin/readRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginReadParams" + } + }, + "title": "Plugin/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/skill/read" + ], + "title": "Plugin/skill/readRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginSkillReadParams" + } + }, + "title": "Plugin/skill/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/share/save" + ], + "title": "Plugin/share/saveRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginShareSaveParams" + } + }, + "title": "Plugin/share/saveRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/share/updateTargets" + ], + "title": "Plugin/share/updateTargetsRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginShareUpdateTargetsParams" + } + }, + "title": "Plugin/share/updateTargetsRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/share/list" + ], + "title": "Plugin/share/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginShareListParams" + } + }, + "title": "Plugin/share/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/share/checkout" + ], + "title": "Plugin/share/checkoutRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginShareCheckoutParams" + } + }, + "title": "Plugin/share/checkoutRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/share/delete" + ], + "title": "Plugin/share/deleteRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginShareDeleteParams" + } + }, + "title": "Plugin/share/deleteRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "app/read" + ], + "title": "App/readRequestMethod" + }, + "params": { + "$ref": "#/definitions/AppsReadParams" + } + }, + "title": "App/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "app/list" + ], + "title": "App/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/AppsListParams" + } + }, + "title": "App/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "app/installed" + ], + "title": "App/installedRequestMethod" + }, + "params": { + "$ref": "#/definitions/AppsInstalledParams" + } + }, + "title": "App/installedRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fs/readFile" + ], + "title": "Fs/readFileRequestMethod" + }, + "params": { + "$ref": "#/definitions/FsReadFileParams" + } + }, + "title": "Fs/readFileRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fs/writeFile" + ], + "title": "Fs/writeFileRequestMethod" + }, + "params": { + "$ref": "#/definitions/FsWriteFileParams" + } + }, + "title": "Fs/writeFileRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fs/createDirectory" + ], + "title": "Fs/createDirectoryRequestMethod" + }, + "params": { + "$ref": "#/definitions/FsCreateDirectoryParams" + } + }, + "title": "Fs/createDirectoryRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fs/getMetadata" + ], + "title": "Fs/getMetadataRequestMethod" + }, + "params": { + "$ref": "#/definitions/FsGetMetadataParams" + } + }, + "title": "Fs/getMetadataRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fs/readDirectory" + ], + "title": "Fs/readDirectoryRequestMethod" + }, + "params": { + "$ref": "#/definitions/FsReadDirectoryParams" + } + }, + "title": "Fs/readDirectoryRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fs/remove" + ], + "title": "Fs/removeRequestMethod" + }, + "params": { + "$ref": "#/definitions/FsRemoveParams" + } + }, + "title": "Fs/removeRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fs/copy" + ], + "title": "Fs/copyRequestMethod" + }, + "params": { + "$ref": "#/definitions/FsCopyParams" + } + }, + "title": "Fs/copyRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fs/watch" + ], + "title": "Fs/watchRequestMethod" + }, + "params": { + "$ref": "#/definitions/FsWatchParams" + } + }, + "title": "Fs/watchRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fs/unwatch" + ], + "title": "Fs/unwatchRequestMethod" + }, + "params": { + "$ref": "#/definitions/FsUnwatchParams" + } + }, + "title": "Fs/unwatchRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "skills/config/write" + ], + "title": "Skills/config/writeRequestMethod" + }, + "params": { + "$ref": "#/definitions/SkillsConfigWriteParams" + } + }, + "title": "Skills/config/writeRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/install" + ], + "title": "Plugin/installRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginInstallParams" + } + }, + "title": "Plugin/installRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "plugin/uninstall" + ], + "title": "Plugin/uninstallRequestMethod" + }, + "params": { + "$ref": "#/definitions/PluginUninstallParams" + } + }, + "title": "Plugin/uninstallRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "turn/start" + ], + "title": "Turn/startRequestMethod" + }, + "params": { + "$ref": "#/definitions/TurnStartParams" + } + }, + "title": "Turn/startRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "turn/steer" + ], + "title": "Turn/steerRequestMethod" + }, + "params": { + "$ref": "#/definitions/TurnSteerParams" + } + }, + "title": "Turn/steerRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "turn/interrupt" + ], + "title": "Turn/interruptRequestMethod" + }, + "params": { + "$ref": "#/definitions/TurnInterruptParams" + } + }, + "title": "Turn/interruptRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "review/start" + ], + "title": "Review/startRequestMethod" + }, + "params": { + "$ref": "#/definitions/ReviewStartParams" + } + }, + "title": "Review/startRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "model/list" + ], + "title": "Model/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/ModelListParams" + } + }, + "title": "Model/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "modelProvider/capabilities/read" + ], + "title": "ModelProvider/capabilities/readRequestMethod" + }, + "params": { + "$ref": "#/definitions/ModelProviderCapabilitiesReadParams" + } + }, + "title": "ModelProvider/capabilities/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "experimentalFeature/list" + ], + "title": "ExperimentalFeature/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/ExperimentalFeatureListParams" + } + }, + "title": "ExperimentalFeature/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "permissionProfile/list" + ], + "title": "PermissionProfile/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/PermissionProfileListParams" + } + }, + "title": "PermissionProfile/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "experimentalFeature/enablement/set" + ], + "title": "ExperimentalFeature/enablement/setRequestMethod" + }, + "params": { + "$ref": "#/definitions/ExperimentalFeatureEnablementSetParams" + } + }, + "title": "ExperimentalFeature/enablement/setRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "mcpServer/oauth/login" + ], + "title": "McpServer/oauth/loginRequestMethod" + }, + "params": { + "$ref": "#/definitions/McpServerOauthLoginParams" + } + }, + "title": "McpServer/oauth/loginRequest" + }, + { + "type": "object", + "required": [ + "id", + "method" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "config/mcpServer/reload" + ], + "title": "Config/mcpServer/reloadRequestMethod" + }, + "params": { + "type": "null" + } + }, + "title": "Config/mcpServer/reloadRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "mcpServerStatus/list" + ], + "title": "McpServerStatus/listRequestMethod" + }, + "params": { + "$ref": "#/definitions/ListMcpServerStatusParams" + } + }, + "title": "McpServerStatus/listRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "mcpServer/resource/read" + ], + "title": "McpServer/resource/readRequestMethod" + }, + "params": { + "$ref": "#/definitions/McpResourceReadParams" + } + }, + "title": "McpServer/resource/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "mcpServer/tool/call" + ], + "title": "McpServer/tool/callRequestMethod" + }, + "params": { + "$ref": "#/definitions/McpServerToolCallParams" + } + }, + "title": "McpServer/tool/callRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "windowsSandbox/setupStart" + ], + "title": "WindowsSandbox/setupStartRequestMethod" + }, + "params": { + "$ref": "#/definitions/WindowsSandboxSetupStartParams" + } + }, + "title": "WindowsSandbox/setupStartRequest" + }, + { + "type": "object", + "required": [ + "id", + "method" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "windowsSandbox/readiness" + ], + "title": "WindowsSandbox/readinessRequestMethod" + }, + "params": { + "type": "null" + } + }, + "title": "WindowsSandbox/readinessRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "account/login/start" + ], + "title": "Account/login/startRequestMethod" + }, + "params": { + "$ref": "#/definitions/LoginAccountParams" + } + }, + "title": "Account/login/startRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "account/login/cancel" + ], + "title": "Account/login/cancelRequestMethod" + }, + "params": { + "$ref": "#/definitions/CancelLoginAccountParams" + } + }, + "title": "Account/login/cancelRequest" + }, + { + "type": "object", + "required": [ + "id", + "method" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "account/logout" + ], + "title": "Account/logoutRequestMethod" + }, + "params": { + "type": "null" + } + }, + "title": "Account/logoutRequest" + }, + { + "type": "object", + "required": [ + "id", + "method" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "account/rateLimits/read" + ], + "title": "Account/rateLimits/readRequestMethod" + }, + "params": { + "type": "null" + } + }, + "title": "Account/rateLimits/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "account/rateLimitResetCredit/consume" + ], + "title": "Account/rateLimitResetCredit/consumeRequestMethod" + }, + "params": { + "$ref": "#/definitions/ConsumeAccountRateLimitResetCreditParams" + } + }, + "title": "Account/rateLimitResetCredit/consumeRequest" + }, + { + "type": "object", + "required": [ + "id", + "method" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "account/usage/read" + ], + "title": "Account/usage/readRequestMethod" + }, + "params": { + "type": "null" + } + }, + "title": "Account/usage/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "account/workspaceMessages/read" + ], + "title": "Account/workspaceMessages/readRequestMethod" + }, + "params": { + "type": "null" + } + }, + "title": "Account/workspaceMessages/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "account/sendAddCreditsNudgeEmail" + ], + "title": "Account/sendAddCreditsNudgeEmailRequestMethod" + }, + "params": { + "$ref": "#/definitions/SendAddCreditsNudgeEmailParams" + } + }, + "title": "Account/sendAddCreditsNudgeEmailRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "feedback/upload" + ], + "title": "Feedback/uploadRequestMethod" + }, + "params": { + "$ref": "#/definitions/FeedbackUploadParams" + } + }, + "title": "Feedback/uploadRequest" + }, + { + "description": "Execute a standalone command (argv vector) under the server's sandbox.", + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "command/exec" + ], + "title": "Command/execRequestMethod" + }, + "params": { + "$ref": "#/definitions/CommandExecParams" + } + }, + "title": "Command/execRequest" + }, + { + "description": "Write stdin bytes to a running `command/exec` session or close stdin.", + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "command/exec/write" + ], + "title": "Command/exec/writeRequestMethod" + }, + "params": { + "$ref": "#/definitions/CommandExecWriteParams" + } + }, + "title": "Command/exec/writeRequest" + }, + { + "description": "Terminate a running `command/exec` session by client-supplied `processId`.", + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "command/exec/terminate" + ], + "title": "Command/exec/terminateRequestMethod" + }, + "params": { + "$ref": "#/definitions/CommandExecTerminateParams" + } + }, + "title": "Command/exec/terminateRequest" + }, + { + "description": "Resize a running PTY-backed `command/exec` session by client-supplied `processId`.", + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "command/exec/resize" + ], + "title": "Command/exec/resizeRequestMethod" + }, + "params": { + "$ref": "#/definitions/CommandExecResizeParams" + } + }, + "title": "Command/exec/resizeRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "config/read" + ], + "title": "Config/readRequestMethod" + }, + "params": { + "$ref": "#/definitions/ConfigReadParams" + } + }, + "title": "Config/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "externalAgentConfig/detect" + ], + "title": "ExternalAgentConfig/detectRequestMethod" + }, + "params": { + "$ref": "#/definitions/ExternalAgentConfigDetectParams" + } + }, + "title": "ExternalAgentConfig/detectRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "externalAgentConfig/import" + ], + "title": "ExternalAgentConfig/importRequestMethod" + }, + "params": { + "$ref": "#/definitions/ExternalAgentConfigImportParams" + } + }, + "title": "ExternalAgentConfig/importRequest" + }, + { + "type": "object", + "required": [ + "id", + "method" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "externalAgentConfig/import/readHistories" + ], + "title": "ExternalAgentConfig/import/readHistoriesRequestMethod" + }, + "params": { + "type": "null" + } + }, + "title": "ExternalAgentConfig/import/readHistoriesRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "config/value/write" + ], + "title": "Config/value/writeRequestMethod" + }, + "params": { + "$ref": "#/definitions/ConfigValueWriteParams" + } + }, + "title": "Config/value/writeRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "config/batchWrite" + ], + "title": "Config/batchWriteRequestMethod" + }, + "params": { + "$ref": "#/definitions/ConfigBatchWriteParams" + } + }, + "title": "Config/batchWriteRequest" + }, + { + "type": "object", + "required": [ + "id", + "method" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "configRequirements/read" + ], + "title": "ConfigRequirements/readRequestMethod" + }, + "params": { + "type": "null" + } + }, + "title": "ConfigRequirements/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "account/read" + ], + "title": "Account/readRequestMethod" + }, + "params": { + "$ref": "#/definitions/GetAccountParams" + } + }, + "title": "Account/readRequest" + }, + { + "type": "object", + "required": [ + "id", + "method", + "params" + ], + "properties": { + "id": { + "$ref": "#/definitions/RequestId" + }, + "method": { + "type": "string", + "enum": [ + "fuzzyFileSearch" + ], + "title": "FuzzyFileSearchRequestMethod" + }, + "params": { + "$ref": "#/definitions/FuzzyFileSearchParams" + } + }, + "title": "FuzzyFileSearchRequest" + } + ] + }, + "ServerNotification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ServerNotification", + "description": "Notification sent from the server to the client.", + "oneOf": [ + { + "description": "NEW NOTIFICATIONS", + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "error" + ], + "title": "ErrorNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ErrorNotification" + } + }, + "title": "ErrorNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/started" + ], + "title": "Thread/startedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadStartedNotification" + } + }, + "title": "Thread/startedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/status/changed" + ], + "title": "Thread/status/changedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadStatusChangedNotification" + } + }, + "title": "Thread/status/changedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/archived" + ], + "title": "Thread/archivedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadArchivedNotification" + } + }, + "title": "Thread/archivedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/deleted" + ], + "title": "Thread/deletedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadDeletedNotification" + } + }, + "title": "Thread/deletedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/unarchived" + ], + "title": "Thread/unarchivedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadUnarchivedNotification" + } + }, + "title": "Thread/unarchivedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/closed" + ], + "title": "Thread/closedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadClosedNotification" + } + }, + "title": "Thread/closedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "skills/changed" + ], + "title": "Skills/changedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/SkillsChangedNotification" + } + }, + "title": "Skills/changedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/name/updated" + ], + "title": "Thread/name/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadNameUpdatedNotification" + } + }, + "title": "Thread/name/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/goal/updated" + ], + "title": "Thread/goal/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadGoalUpdatedNotification" + } + }, + "title": "Thread/goal/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/goal/cleared" + ], + "title": "Thread/goal/clearedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadGoalClearedNotification" + } + }, + "title": "Thread/goal/clearedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/environment/connected" + ], + "title": "Thread/environment/connectedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/EnvironmentConnectionNotification" + } + }, + "title": "Thread/environment/connectedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/environment/disconnected" + ], + "title": "Thread/environment/disconnectedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/EnvironmentConnectionNotification" + } + }, + "title": "Thread/environment/disconnectedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/settings/updated" + ], + "title": "Thread/settings/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadSettingsUpdatedNotification" + } + }, + "title": "Thread/settings/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/tokenUsage/updated" + ], + "title": "Thread/tokenUsage/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadTokenUsageUpdatedNotification" + } + }, + "title": "Thread/tokenUsage/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "turn/started" + ], + "title": "Turn/startedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/TurnStartedNotification" + } + }, + "title": "Turn/startedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "hook/started" + ], + "title": "Hook/startedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/HookStartedNotification" + } + }, + "title": "Hook/startedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "turn/completed" + ], + "title": "Turn/completedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/TurnCompletedNotification" + } + }, + "title": "Turn/completedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "hook/completed" + ], + "title": "Hook/completedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/HookCompletedNotification" + } + }, + "title": "Hook/completedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "turn/diff/updated" + ], + "title": "Turn/diff/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/TurnDiffUpdatedNotification" + } + }, + "title": "Turn/diff/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "turn/plan/updated" + ], + "title": "Turn/plan/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/TurnPlanUpdatedNotification" + } + }, + "title": "Turn/plan/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/started" + ], + "title": "Item/startedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ItemStartedNotification" + } + }, + "title": "Item/startedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/autoApprovalReview/started" + ], + "title": "Item/autoApprovalReview/startedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ItemGuardianApprovalReviewStartedNotification" + } + }, + "title": "Item/autoApprovalReview/startedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/autoApprovalReview/completed" + ], + "title": "Item/autoApprovalReview/completedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ItemGuardianApprovalReviewCompletedNotification" + } + }, + "title": "Item/autoApprovalReview/completedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/completed" + ], + "title": "Item/completedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ItemCompletedNotification" + } + }, + "title": "Item/completedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/agentMessage/delta" + ], + "title": "Item/agentMessage/deltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/AgentMessageDeltaNotification" + } + }, + "title": "Item/agentMessage/deltaNotification" + }, + { + "description": "EXPERIMENTAL - proposed plan streaming deltas for plan items.", + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/plan/delta" + ], + "title": "Item/plan/deltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/PlanDeltaNotification" + } + }, + "title": "Item/plan/deltaNotification" + }, + { + "description": "Stream base64-encoded stdout/stderr chunks for a running `command/exec` session.", + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "command/exec/outputDelta" + ], + "title": "Command/exec/outputDeltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/CommandExecOutputDeltaNotification" + } + }, + "title": "Command/exec/outputDeltaNotification" + }, + { + "description": "Stream base64-encoded stdout/stderr chunks for a running `process/spawn` session.", + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "process/outputDelta" + ], + "title": "Process/outputDeltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ProcessOutputDeltaNotification" + } + }, + "title": "Process/outputDeltaNotification" + }, + { + "description": "Final exit notification for a `process/spawn` session.", + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "process/exited" + ], + "title": "Process/exitedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ProcessExitedNotification" + } + }, + "title": "Process/exitedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/commandExecution/outputDelta" + ], + "title": "Item/commandExecution/outputDeltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/CommandExecutionOutputDeltaNotification" + } + }, + "title": "Item/commandExecution/outputDeltaNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/commandExecution/terminalInteraction" + ], + "title": "Item/commandExecution/terminalInteractionNotificationMethod" + }, + "params": { + "$ref": "#/definitions/TerminalInteractionNotification" + } + }, + "title": "Item/commandExecution/terminalInteractionNotification" + }, + { + "description": "Deprecated legacy apply_patch output stream notification.", + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/fileChange/outputDelta" + ], + "title": "Item/fileChange/outputDeltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/FileChangeOutputDeltaNotification" + } + }, + "title": "Item/fileChange/outputDeltaNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/fileChange/patchUpdated" + ], + "title": "Item/fileChange/patchUpdatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/FileChangePatchUpdatedNotification" + } + }, + "title": "Item/fileChange/patchUpdatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "serverRequest/resolved" + ], + "title": "ServerRequest/resolvedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ServerRequestResolvedNotification" + } + }, + "title": "ServerRequest/resolvedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/mcpToolCall/progress" + ], + "title": "Item/mcpToolCall/progressNotificationMethod" + }, + "params": { + "$ref": "#/definitions/McpToolCallProgressNotification" + } + }, + "title": "Item/mcpToolCall/progressNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "mcpServer/oauthLogin/completed" + ], + "title": "McpServer/oauthLogin/completedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/McpServerOauthLoginCompletedNotification" + } + }, + "title": "McpServer/oauthLogin/completedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "mcpServer/startupStatus/updated" + ], + "title": "McpServer/startupStatus/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/McpServerStatusUpdatedNotification" + } + }, + "title": "McpServer/startupStatus/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "account/updated" + ], + "title": "Account/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/AccountUpdatedNotification" + } + }, + "title": "Account/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "account/rateLimits/updated" + ], + "title": "Account/rateLimits/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/AccountRateLimitsUpdatedNotification" + } + }, + "title": "Account/rateLimits/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "app/list/updated" + ], + "title": "App/list/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/AppListUpdatedNotification" + } + }, + "title": "App/list/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "remoteControl/status/changed" + ], + "title": "RemoteControl/status/changedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/RemoteControlStatusChangedNotification" + } + }, + "title": "RemoteControl/status/changedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "externalAgentConfig/import/progress" + ], + "title": "ExternalAgentConfig/import/progressNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ExternalAgentConfigImportProgressNotification" + } + }, + "title": "ExternalAgentConfig/import/progressNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "externalAgentConfig/import/completed" + ], + "title": "ExternalAgentConfig/import/completedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ExternalAgentConfigImportCompletedNotification" + } + }, + "title": "ExternalAgentConfig/import/completedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "fs/changed" + ], + "title": "Fs/changedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/FsChangedNotification" + } + }, + "title": "Fs/changedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/reasoning/summaryTextDelta" + ], + "title": "Item/reasoning/summaryTextDeltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ReasoningSummaryTextDeltaNotification" + } + }, + "title": "Item/reasoning/summaryTextDeltaNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/reasoning/summaryPartAdded" + ], + "title": "Item/reasoning/summaryPartAddedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ReasoningSummaryPartAddedNotification" + } + }, + "title": "Item/reasoning/summaryPartAddedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "item/reasoning/textDelta" + ], + "title": "Item/reasoning/textDeltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ReasoningTextDeltaNotification" + } + }, + "title": "Item/reasoning/textDeltaNotification" + }, + { + "description": "Deprecated: Use `ContextCompaction` item type instead.", + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/compacted" + ], + "title": "Thread/compactedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ContextCompactedNotification" + } + }, + "title": "Thread/compactedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "model/rerouted" + ], + "title": "Model/reroutedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ModelReroutedNotification" + } + }, + "title": "Model/reroutedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "model/verification" + ], + "title": "Model/verificationNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ModelVerificationNotification" + } + }, + "title": "Model/verificationNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "turn/moderationMetadata" + ], + "title": "Turn/moderationMetadataNotificationMethod" + }, + "params": { + "$ref": "#/definitions/TurnModerationMetadataNotification" + } + }, + "title": "Turn/moderationMetadataNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "model/safetyBuffering/updated" + ], + "title": "Model/safetyBuffering/updatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ModelSafetyBufferingUpdatedNotification" + } + }, + "title": "Model/safetyBuffering/updatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "warning" + ], + "title": "WarningNotificationMethod" + }, + "params": { + "$ref": "#/definitions/WarningNotification" + } + }, + "title": "WarningNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "guardianWarning" + ], + "title": "GuardianWarningNotificationMethod" + }, + "params": { + "$ref": "#/definitions/GuardianWarningNotification" + } + }, + "title": "GuardianWarningNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "deprecationNotice" + ], + "title": "DeprecationNoticeNotificationMethod" + }, + "params": { + "$ref": "#/definitions/DeprecationNoticeNotification" + } + }, + "title": "DeprecationNoticeNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "configWarning" + ], + "title": "ConfigWarningNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ConfigWarningNotification" + } + }, + "title": "ConfigWarningNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "fuzzyFileSearch/sessionUpdated" + ], + "title": "FuzzyFileSearch/sessionUpdatedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/FuzzyFileSearchSessionUpdatedNotification" + } + }, + "title": "FuzzyFileSearch/sessionUpdatedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "fuzzyFileSearch/sessionCompleted" + ], + "title": "FuzzyFileSearch/sessionCompletedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/FuzzyFileSearchSessionCompletedNotification" + } + }, + "title": "FuzzyFileSearch/sessionCompletedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/realtime/started" + ], + "title": "Thread/realtime/startedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadRealtimeStartedNotification" + } + }, + "title": "Thread/realtime/startedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/realtime/itemAdded" + ], + "title": "Thread/realtime/itemAddedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadRealtimeItemAddedNotification" + } + }, + "title": "Thread/realtime/itemAddedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/realtime/transcript/delta" + ], + "title": "Thread/realtime/transcript/deltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadRealtimeTranscriptDeltaNotification" + } + }, + "title": "Thread/realtime/transcript/deltaNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/realtime/transcript/done" + ], + "title": "Thread/realtime/transcript/doneNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadRealtimeTranscriptDoneNotification" + } + }, + "title": "Thread/realtime/transcript/doneNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/realtime/outputAudio/delta" + ], + "title": "Thread/realtime/outputAudio/deltaNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadRealtimeOutputAudioDeltaNotification" + } + }, + "title": "Thread/realtime/outputAudio/deltaNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/realtime/sdp" + ], + "title": "Thread/realtime/sdpNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadRealtimeSdpNotification" + } + }, + "title": "Thread/realtime/sdpNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/realtime/error" + ], + "title": "Thread/realtime/errorNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadRealtimeErrorNotification" + } + }, + "title": "Thread/realtime/errorNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "thread/realtime/closed" + ], + "title": "Thread/realtime/closedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/ThreadRealtimeClosedNotification" + } + }, + "title": "Thread/realtime/closedNotification" + }, + { + "description": "Notifies the user of world-writable directories on Windows, which cannot be protected by the sandbox.", + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "windows/worldWritableWarning" + ], + "title": "Windows/worldWritableWarningNotificationMethod" + }, + "params": { + "$ref": "#/definitions/WindowsWorldWritableWarningNotification" + } + }, + "title": "Windows/worldWritableWarningNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "windowsSandbox/setupCompleted" + ], + "title": "WindowsSandbox/setupCompletedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/WindowsSandboxSetupCompletedNotification" + } + }, + "title": "WindowsSandbox/setupCompletedNotification" + }, + { + "type": "object", + "required": [ + "method", + "params" + ], + "properties": { + "method": { + "type": "string", + "enum": [ + "account/login/completed" + ], + "title": "Account/login/completedNotificationMethod" + }, + "params": { + "$ref": "#/definitions/AccountLoginCompletedNotification" + } + }, + "title": "Account/login/completedNotification" + } + ], + "properties": { + "emittedAtMs": { + "description": "Unix timestamp (in milliseconds) when app-server emitted this notification.", + "format": "int64", + "type": "integer" + } + } + } + } +} \ No newline at end of file diff --git a/tests/fixtures/codex/0.145.0/exec-stream.jsonl b/tests/fixtures/codex/0.145.0/exec-stream.jsonl new file mode 100644 index 00000000..a0cd48ee --- /dev/null +++ b/tests/fixtures/codex/0.145.0/exec-stream.jsonl @@ -0,0 +1,4 @@ +{"type":"thread.started","thread_id":"019faa26-c310-79a3-8a69-9bb5793238c3"} +{"type":"turn.started"} +{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"schema fixture"}} +{"type":"turn.completed","usage":{"input_tokens":22058,"cached_input_tokens":0,"cache_write_input_tokens":0,"output_tokens":6,"reasoning_output_tokens":0}} diff --git a/tests/unit/backends/codex-event-schema.test.ts b/tests/unit/backends/codex-event-schema.test.ts new file mode 100644 index 00000000..de341c68 --- /dev/null +++ b/tests/unit/backends/codex-event-schema.test.ts @@ -0,0 +1,121 @@ +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; + +import Ajv, { type ErrorObject, type ValidateFunction } from 'ajv'; +import { describe, expect, it } from 'vitest'; + +import { parseCodexEvent } from '../../../src/backends/codex/jsonlParser.js'; + +type JsonRecord = Record; + +const FIXTURE_DIR = resolve('tests/fixtures/codex/0.145.0'); +const SCHEMA_PATH = resolve(FIXTURE_DIR, 'codex_app_server_protocol.v2.schemas.json'); +const STREAM_PATH = resolve(FIXTURE_DIR, 'exec-stream.jsonl'); + +const schema = JSON.parse(readFileSync(SCHEMA_PATH, 'utf8')) as { + definitions: Record; +}; +const events = readFileSync(STREAM_PATH, 'utf8') + .trim() + .split('\n') + .map((line) => JSON.parse(line) as JsonRecord); + +const ajv = new Ajv({ allErrors: true, strict: false, validateFormats: false }); + +function validatorFor(definition: string): ValidateFunction { + return ajv.compile({ + $ref: `#/definitions/${definition}`, + definitions: schema.definitions, + }); +} + +const validateThreadItem = validatorFor('ThreadItem'); +const validateUsage = validatorFor('TokenUsageBreakdown'); + +function formatErrors(errors: ErrorObject[] | null | undefined): string { + return ( + errors + ?.map((error) => `${error.instancePath || '/'} ${error.message ?? 'is invalid'}`) + .join('\n') ?? 'unknown schema validation error' + ); +} + +function expectSchemaMatch(validate: ValidateFunction, value: unknown, context: string): void { + expect(validate(value), `${context}\n${formatErrors(validate.errors)}`).toBe(true); +} + +describe('Codex exec JSONL schema drift', () => { + it('replays the pinned CLI stream through jsonlParser', () => { + expect(events.map((event) => parseCodexEvent(event))).toEqual([ + { textParts: [], toolCall: null, usage: null, error: undefined }, + { textParts: [], toolCall: null, usage: null, error: undefined }, + { + textParts: ['schema fixture'], + toolCall: null, + usage: null, + error: undefined, + }, + { + textParts: [], + toolCall: null, + usage: { + inputTokens: 22058, + outputTokens: 6, + cachedTokens: 0, + reasoningTokens: 0, + }, + error: undefined, + }, + ]); + }); + + it('matches shared event and item models generated by the pinned CLI', () => { + expect(events.map((event) => event.type)).toEqual([ + 'thread.started', + 'turn.started', + 'item.completed', + 'turn.completed', + ]); + + for (const event of events) { + switch (event.type) { + case 'thread.started': + expect(event).toEqual({ + type: 'thread.started', + thread_id: expect.any(String), + }); + break; + case 'turn.started': + expect(event).toEqual({ type: 'turn.started' }); + break; + case 'item.completed': { + const item = event.item as JsonRecord; + expectSchemaMatch( + validateThreadItem, + { ...item, type: item.type === 'agent_message' ? 'agentMessage' : item.type }, + 'item.completed diverged from generated ThreadItem', + ); + break; + } + case 'turn.completed': { + const usage = event.usage as JsonRecord; + expectSchemaMatch( + validateUsage, + { + inputTokens: usage.input_tokens, + cachedInputTokens: usage.cached_input_tokens, + cacheWriteInputTokens: usage.cache_write_input_tokens, + outputTokens: usage.output_tokens, + reasoningOutputTokens: usage.reasoning_output_tokens, + totalTokens: (usage.input_tokens as number) + (usage.output_tokens as number), + }, + 'turn.completed usage diverged from generated TokenUsageBreakdown', + ); + break; + } + default: + expect.fail(`Unrecognized Codex event type in fixture: ${String(event.type)}`); + } + } + }); +}); From 4c5ae9b35b22c6e654f4004c73c9fdd8d7103514 Mon Sep 17 00:00:00 2001 From: aaight Date: Tue, 28 Jul 2026 21:49:08 +0200 Subject: [PATCH 12/16] feat(codex): add structured completion reports (#1519) Co-authored-by: Cascade Bot --- src/backends/codex/index.ts | 59 +++++++++++++++++++--- src/backends/codex/outputSchema.ts | 40 +++++++++++++++ tests/unit/backends/codex.test.ts | 81 ++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 6 deletions(-) create mode 100644 src/backends/codex/outputSchema.ts diff --git a/src/backends/codex/index.ts b/src/backends/codex/index.ts index bce968c1..40450bd6 100644 --- a/src/backends/codex/index.ts +++ b/src/backends/codex/index.ts @@ -1,5 +1,5 @@ import { spawn } from 'node:child_process'; -import { existsSync, readFileSync, unlinkSync } from 'node:fs'; +import { existsSync, readFileSync, unlinkSync, writeFileSync } from 'node:fs'; import { mkdir, readFile, writeFile } from 'node:fs/promises'; import { homedir, tmpdir } from 'node:os'; import { join } from 'node:path'; @@ -19,6 +19,7 @@ import type { AgentEngineResult, AgentExecutionPlan, LogWriter } from '../types. import type { UsageSummary } from './jsonlParser.js'; import { extractUsage, parseCodexEvent } from './jsonlParser.js'; import { CODEX_MODEL_IDS, DEFAULT_CODEX_MODEL } from './models.js'; +import { CODEX_COMPLETION_OUTPUT_SCHEMA, parseCodexCompletionReport } from './outputSchema.js'; import { assertHeadlessCodexSettings, CodexSettingsSchema, @@ -439,6 +440,7 @@ export function buildArgs( settings: ReturnType, model: string, lastMessagePath: string, + outputSchemaPath: string, ): string[] { const args = [ 'exec', @@ -453,6 +455,8 @@ export function buildArgs( settings.sandboxMode, '-o', lastMessagePath, + '--output-schema', + outputSchemaPath, '-c', `approval_policy=${tomlString(settings.approvalPolicy)}`, ]; @@ -620,6 +624,31 @@ function classifyShellCorruption( }); } +function resolveCompletionOutput( + rawOutput: string, + streamedOutput: string, +): { + finalOutput: string; + prUrl: string | undefined; + prEvidence: ReturnType['prEvidence']; + structuredPrClaim: string | undefined; +} { + const completionReport = parseCodexCompletionReport(rawOutput); + const finalOutput = completionReport?.summary ?? rawOutput; + let { prUrl, prEvidence } = completionReport?.prUrl + ? extractAndBuildPrEvidence(completionReport.prUrl) + : extractAndBuildPrEvidence(finalOutput); + if (!prUrl) { + ({ prUrl, prEvidence } = extractAndBuildPrEvidence(streamedOutput)); + } + return { + finalOutput, + prUrl, + prEvidence, + structuredPrClaim: completionReport?.prUrl ?? undefined, + }; +} + /** * Codex CLI backend for CASCADE. * @@ -747,9 +776,17 @@ export class CodexEngine extends NativeToolEngine { tmpdir(), `cascade-codex-last-message-${process.pid}-${Date.now()}.txt`, ); + const outputSchemaPath = join( + tmpdir(), + `cascade-codex-output-schema-${process.pid}-${Date.now()}.json`, + ); + writeFileSync(outputSchemaPath, JSON.stringify(CODEX_COMPLETION_OUTPUT_SCHEMA), { + encoding: 'utf-8', + mode: 0o600, + }); const prompt = buildPrompt(systemPrompt, taskPrompt); const env = this.buildEnv(strippedSecrets, input.cliToolsDir, input.nativeToolShimDir); - const args = buildArgs(input, settings, model, lastMessagePath); + const args = buildArgs(input, settings, model, lastMessagePath, outputSchemaPath); input.logWriter('INFO', 'Starting Codex execution', { agentType: input.agentType, @@ -846,14 +883,23 @@ export class CodexEngine extends NativeToolEngine { }); }); - const finalOutput = + const rawFinalOutput = existsSync(lastMessagePath) && readFileSync(lastMessagePath, 'utf-8').trim() ? readFileSync(lastMessagePath, 'utf-8').trim() : rawTextParts.join('\n').trim(); + const streamedOutput = rawTextParts.join('\n'); + const { finalOutput, prUrl, prEvidence, structuredPrClaim } = resolveCompletionOutput( + rawFinalOutput, + streamedOutput, + ); const stderrOutput = stderrChunks.join('').trim(); - let { prUrl, prEvidence } = extractAndBuildPrEvidence(finalOutput); - if (!prUrl) { - ({ prUrl, prEvidence } = extractAndBuildPrEvidence(rawTextParts.join('\n'))); + + if (structuredPrClaim) { + input.logWriter('INFO', 'Codex structured completion claimed PR creation', { + prUrl: structuredPrClaim, + authoritative: false, + hint: 'The native-tool PR sidecar remains the sole authority for completion gating', + }); } input.logWriter('DEBUG', 'Codex process exited', { @@ -925,6 +971,7 @@ export class CodexEngine extends NativeToolEngine { }); } finally { CodexEngine._cleanupLastMessagePath(lastMessagePath); + CodexEngine._cleanupLastMessagePath(outputSchemaPath); // When called directly (not via adapter), afterExecute won't be invoked. // Perform cleanup here so direct callers (e.g. tests) still behave correctly. if (!this._adapterLifecycleActive) { diff --git a/src/backends/codex/outputSchema.ts b/src/backends/codex/outputSchema.ts new file mode 100644 index 00000000..a6bfca4b --- /dev/null +++ b/src/backends/codex/outputSchema.ts @@ -0,0 +1,40 @@ +export const CODEX_COMPLETION_OUTPUT_SCHEMA = { + type: 'object', + additionalProperties: false, + properties: { + status: { type: 'string', enum: ['completed', 'failed'] }, + prUrl: { type: ['string', 'null'] }, + summary: { type: 'string' }, + }, + required: ['status', 'prUrl', 'summary'], +} as const; + +export interface CodexCompletionReport { + status: 'completed' | 'failed'; + prUrl: string | null; + summary: string; +} + +/** + * Parse the schema-conforming last message defensively. Turn failures and + * corrupted output can still leave a missing or partial file. + */ +export function parseCodexCompletionReport(raw: string): CodexCompletionReport | undefined { + try { + const parsed: unknown = JSON.parse(raw); + if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return undefined; + + const report = parsed as Record; + if (report.status !== 'completed' && report.status !== 'failed') return undefined; + if (report.prUrl !== null && typeof report.prUrl !== 'string') return undefined; + if (typeof report.summary !== 'string') return undefined; + + return { + status: report.status, + prUrl: report.prUrl, + summary: report.summary, + }; + } catch { + return undefined; + } +} diff --git a/tests/unit/backends/codex.test.ts b/tests/unit/backends/codex.test.ts index 547092f7..38f6499f 100644 --- a/tests/unit/backends/codex.test.ts +++ b/tests/unit/backends/codex.test.ts @@ -50,6 +50,10 @@ import { resolveCodexModel, } from '../../../src/backends/codex/index.js'; import { DEFAULT_CODEX_MODEL } from '../../../src/backends/codex/models.js'; +import { + CODEX_COMPLETION_OUTPUT_SCHEMA, + parseCodexCompletionReport, +} from '../../../src/backends/codex/outputSchema.js'; import { assertHeadlessCodexSettings, resolveCodexSettings, @@ -480,6 +484,7 @@ describe('buildArgs', () => { { ...baseSettings, webSearch: false }, 'model-x', '/tmp/last.json', + '/tmp/output-schema.json', ); expect(args).not.toContain('--search'); expect(args).not.toContain('search=true'); @@ -491,10 +496,53 @@ describe('buildArgs', () => { { ...baseSettings, webSearch: true }, 'model-x', '/tmp/last.json', + '/tmp/output-schema.json', ); expect(args).toContain('--enable'); expect(args).toContain('web_search'); }); + + it('passes the structured completion schema to codex exec', () => { + const args = buildArgs( + makeInput(), + { ...baseSettings, webSearch: false }, + 'model-x', + '/tmp/last.json', + '/tmp/output-schema.json', + ); + expect(args[args.indexOf('--output-schema') + 1]).toBe('/tmp/output-schema.json'); + }); +}); + +describe('structured completion output', () => { + it('defines a strict schema for status, PR claim, and prose summary', () => { + expect(CODEX_COMPLETION_OUTPUT_SCHEMA).toMatchObject({ + type: 'object', + additionalProperties: false, + required: ['status', 'prUrl', 'summary'], + }); + }); + + it('parses a schema-conforming report', () => { + expect( + parseCodexCompletionReport( + JSON.stringify({ + status: 'completed', + prUrl: 'https://github.com/owner/repo/pull/123', + summary: 'Implemented and tested the change.', + }), + ), + ).toEqual({ + status: 'completed', + prUrl: 'https://github.com/owner/repo/pull/123', + summary: 'Implemented and tested the change.', + }); + }); + + it('returns undefined for malformed or invalid reports', () => { + expect(parseCodexCompletionReport('not json')).toBeUndefined(); + expect(parseCodexCompletionReport('{"status":"completed","prUrl":null}')).toBeUndefined(); + }); }); describe('buildEnv', () => { @@ -577,6 +625,39 @@ describe('CodexEngine', () => { expect(readFileSync(join(workspaceDir, 'codex.log'), 'utf-8')).toContain('codex'); }); + it('uses the structured summary and treats its PR URL as non-authoritative text evidence', async () => { + mockSpawn.mockImplementation((_cmd: string, args: string[]) => { + const outputPath = args[args.indexOf('-o') + 1]; + const schemaPath = args[args.indexOf('--output-schema') + 1]; + expect(JSON.parse(readFileSync(schemaPath, 'utf-8'))).toEqual(CODEX_COMPLETION_OUTPUT_SCHEMA); + return createMockChild({ + onBeforeClose: () => { + writeFileSync( + outputPath, + JSON.stringify({ + status: 'completed', + prUrl: 'https://github.com/owner/repo/pull/456', + summary: 'Implemented the structured completion report.', + }), + 'utf-8', + ); + }, + }); + }); + + const input = makeInput({ repoDir: workspaceDir }); + const result = await new CodexEngine().execute(input); + + expect(result.output).toBe('Implemented the structured completion report.'); + expect(result.prUrl).toBe('https://github.com/owner/repo/pull/456'); + expect(result.prEvidence).toEqual({ source: 'text', authoritative: false }); + expect(input.logWriter).toHaveBeenCalledWith( + 'INFO', + 'Codex structured completion claimed PR creation', + expect.objectContaining({ authoritative: false }), + ); + }); + it('fails fast when approval policy is not automation-safe', async () => { const engine = new CodexEngine(); const input = makeInput({ From 7415c23673c596e74614dac6ea4651bcab0f752a Mon Sep 17 00:00:00 2001 From: aaight Date: Tue, 28 Jul 2026 22:06:43 +0200 Subject: [PATCH 13/16] fix(codex): use single-run API key auth and hermetic exec (#1520) Co-authored-by: Cascade Bot --- src/backends/codex/env.ts | 2 +- src/backends/codex/index.ts | 86 +++++++++++++------------------ tests/unit/backends/codex.test.ts | 70 ++++++++++++++++--------- 3 files changed, 84 insertions(+), 74 deletions(-) diff --git a/src/backends/codex/env.ts b/src/backends/codex/env.ts index 5740ad66..095f70a1 100644 --- a/src/backends/codex/env.ts +++ b/src/backends/codex/env.ts @@ -16,7 +16,7 @@ const ALLOWED_ENV_EXACT = new Set([ ...SHARED_ALLOWED_ENV_EXACT, // Codex auth - 'OPENAI_API_KEY', + 'CODEX_API_KEY', ]); export function buildEnv( diff --git a/src/backends/codex/index.ts b/src/backends/codex/index.ts index 40450bd6..3ebd14c2 100644 --- a/src/backends/codex/index.ts +++ b/src/backends/codex/index.ts @@ -446,6 +446,8 @@ export function buildArgs( 'exec', '--json', '--ephemeral', + '--ignore-user-config', + '--ignore-rules', '--skip-git-repo-check', '-C', input.repoDir, @@ -472,44 +474,45 @@ export function buildArgs( return args; } -/** - * Build the auth.json contents that `codex login --with-api-key` writes for a - * bare OpenAI API key. Codex authenticates ONLY from ~/.codex/auth.json — it does - * NOT read OPENAI_API_KEY from the environment — so a bare API key must be - * materialised into this file for codex to send a bearer token. - */ -function synthesizeApiKeyAuthJson(apiKey: string): string { - return JSON.stringify({ auth_mode: 'apikey', OPENAI_API_KEY: apiKey }); +function isValidJson(value: string | undefined): value is string { + if (!value) return false; + try { + JSON.parse(value); + return true; + } catch { + return false; + } +} + +function buildCodexSubprocessSecrets( + projectSecrets: Record | undefined, +): Record | undefined { + if (!projectSecrets) return undefined; + + const subprocessSecrets = Object.fromEntries( + Object.entries(projectSecrets).filter( + ([key]) => key !== 'CODEX_AUTH_JSON' && key !== 'OPENAI_API_KEY', + ), + ); + if (!isValidJson(projectSecrets.CODEX_AUTH_JSON) && projectSecrets.OPENAI_API_KEY) { + subprocessSecrets.CODEX_API_KEY = projectSecrets.OPENAI_API_KEY; + } + return subprocessSecrets; } /** - * Write ~/.codex/auth.json so Codex can authenticate. Supports BOTH auth modes, - * mirroring claude-code's ANTHROPIC_API_KEY / CLAUDE_CODE_OAUTH_TOKEN duality: - * - subscription token via CODEX_AUTH_JSON (ChatGPT Plus/Pro), written verbatim; - * - bare API key via OPENAI_API_KEY, synthesized into the apikey auth.json shape. - * - * Returns the written JSON string ONLY for the subscription path, so the caller - * (captureRefreshedToken) can persist a token the Codex CLI rotated mid-run. The - * API-key path returns undefined: API keys never rotate, and returning undefined - * guarantees the synthesized blob is never written back into the CODEX_AUTH_JSON - * credential slot. CODEX_AUTH_JSON takes precedence when both are configured. + * Write ~/.codex/auth.json for ChatGPT subscription auth. API-key runs use the + * Codex CLI's single-run CODEX_API_KEY environment variable instead and never + * touch the persistent auth file. */ async function writeCodexAuthFile( projectSecrets: Record | undefined, logWriter: LogWriter, ): Promise { const authJson = projectSecrets?.CODEX_AUTH_JSON; - const apiKey = projectSecrets?.OPENAI_API_KEY; - // 1. Subscription token wins when present and valid JSON. if (authJson) { - let valid = true; - try { - JSON.parse(authJson); - } catch { - valid = false; - } - if (valid) { + if (isValidJson(authJson)) { await mkdir(CODEX_AUTH_DIR, { recursive: true }); await writeFile(CODEX_AUTH_FILE, authJson, { mode: 0o600 }); logWriter('INFO', 'Writing ~/.codex/auth.json for subscription auth', {}); @@ -522,18 +525,9 @@ async function writeCodexAuthFile( ); } - // 2. Bare OpenAI API key — synthesize the apikey auth.json codex requires. - if (apiKey) { - await mkdir(CODEX_AUTH_DIR, { recursive: true }); - await writeFile(CODEX_AUTH_FILE, synthesizeApiKeyAuthJson(apiKey), { mode: 0o600 }); - logWriter('INFO', 'Writing ~/.codex/auth.json for API key auth', {}); - return undefined; // API keys do not rotate — nothing to capture - } - - // 3. Neither configured. logWriter( 'DEBUG', - 'No CODEX_AUTH_JSON or OPENAI_API_KEY credential — codex auth not configured', + 'No valid CODEX_AUTH_JSON credential — subscription auth file not written', {}, ); return undefined; @@ -548,10 +542,7 @@ async function captureRefreshedToken( originalJson: string | undefined, logWriter: LogWriter, ): Promise { - // originalJson is undefined on the API-key path (writeCodexAuthFile returns - // undefined there) and when no auth was configured — so a synthesized apikey - // auth.json is never persisted back into the CODEX_AUTH_JSON credential slot. - // Only a rotated subscription token is captured. + // Only subscription auth has an original file to compare and capture. if (!originalJson) return; let newJson: string; @@ -675,7 +666,7 @@ export class CodexEngine extends NativeToolEngine { return new Set([ ...SHARED_ALLOWED_ENV_EXACT, // Codex auth - 'OPENAI_API_KEY', + 'CODEX_API_KEY', ]); } @@ -765,12 +756,9 @@ export class CodexEngine extends NativeToolEngine { ? this._originalAuthJson : await writeCodexAuthFile(input.projectSecrets, input.logWriter); - // Strip CODEX_AUTH_JSON from env — it's written to disk, not passed to the subprocess - const strippedSecrets: Record | undefined = input.projectSecrets - ? Object.fromEntries( - Object.entries(input.projectSecrets).filter(([k]) => k !== 'CODEX_AUTH_JSON'), - ) - : undefined; + // Subscription auth stays file-backed. API-key auth is scoped to this + // subprocess via CODEX_API_KEY and does not persist in ~/.codex/auth.json. + const subprocessSecrets = buildCodexSubprocessSecrets(input.projectSecrets); const lastMessagePath = join( tmpdir(), @@ -785,7 +773,7 @@ export class CodexEngine extends NativeToolEngine { mode: 0o600, }); const prompt = buildPrompt(systemPrompt, taskPrompt); - const env = this.buildEnv(strippedSecrets, input.cliToolsDir, input.nativeToolShimDir); + const env = this.buildEnv(subprocessSecrets, input.cliToolsDir, input.nativeToolShimDir); const args = buildArgs(input, settings, model, lastMessagePath, outputSchemaPath); input.logWriter('INFO', 'Starting Codex execution', { diff --git a/tests/unit/backends/codex.test.ts b/tests/unit/backends/codex.test.ts index 38f6499f..13dcea78 100644 --- a/tests/unit/backends/codex.test.ts +++ b/tests/unit/backends/codex.test.ts @@ -512,6 +512,18 @@ describe('buildArgs', () => { ); expect(args[args.indexOf('--output-schema') + 1]).toBe('/tmp/output-schema.json'); }); + + it('ignores user config and execpolicy rules for hermetic execution', () => { + const args = buildArgs( + makeInput(), + { ...baseSettings, webSearch: false }, + 'model-x', + '/tmp/last.json', + '/tmp/output-schema.json', + ); + expect(args).toContain('--ignore-user-config'); + expect(args).toContain('--ignore-rules'); + }); }); describe('structured completion output', () => { @@ -546,10 +558,12 @@ describe('structured completion output', () => { }); describe('buildEnv', () => { - it('passes through OPENAI_API_KEY and project secrets', () => { + it('allows Codex auth variables and project secrets', () => { process.env.OPENAI_API_KEY = 'host-key'; + process.env.CODEX_API_KEY = 'codex-host-key'; const env = buildEnv({ CASCADE_AGENT_TYPE: 'implementation' }); - expect(env.OPENAI_API_KEY).toBe('host-key'); + expect(env.OPENAI_API_KEY).toBeUndefined(); + expect(env.CODEX_API_KEY).toBe('codex-host-key'); expect(env.CASCADE_AGENT_TYPE).toBe('implementation'); }); }); @@ -569,6 +583,7 @@ describe('CodexEngine', () => { afterEach(() => { rmSync(workspaceDir, { recursive: true, force: true }); Reflect.deleteProperty(process.env, 'OPENAI_API_KEY'); + Reflect.deleteProperty(process.env, 'CODEX_API_KEY'); }); it('executes codex CLI and parses JSONL activity', async () => { @@ -1336,7 +1351,8 @@ describe('Codex subscription auth', () => { await engine.execute(input); expect(capturedEnv?.CODEX_AUTH_JSON).toBeUndefined(); - expect(capturedEnv?.OPENAI_API_KEY).toBe('sk-test'); + expect(capturedEnv?.OPENAI_API_KEY).toBeUndefined(); + expect(capturedEnv?.CODEX_API_KEY).toBeUndefined(); }); it('writes refreshed token to project_credentials when auth.json is updated by Codex CLI', async () => { @@ -1391,14 +1407,17 @@ describe('Codex subscription auth', () => { ); }); - // --- Bare OpenAI API key auth (synthesized auth.json) --- - // Codex does NOT read OPENAI_API_KEY from the environment; it authenticates - // only from ~/.codex/auth.json. cascade must synthesize the apikey auth.json - // shape that `codex login --with-api-key` writes so a bare key authenticates. + // --- Bare OpenAI API key auth (single-run CODEX_API_KEY) --- const API_KEY = 'sk-proj-test-key-123'; - const SYNTHESIZED_AUTH = JSON.stringify({ auth_mode: 'apikey', OPENAI_API_KEY: API_KEY }); - it('synthesizes apikey auth.json from OPENAI_API_KEY when CODEX_AUTH_JSON is absent', async () => { + it('injects CODEX_API_KEY without writing auth.json when CODEX_AUTH_JSON is absent', async () => { + let capturedEnv: Record | undefined; + mockSpawn.mockImplementation( + (_cmd: string, _args: string[], options: { env?: Record }) => { + capturedEnv = options.env; + return createMockChild({ exitCode: 0 }); + }, + ); const engine = new CodexEngine(); const input = makeInput({ repoDir: workspaceDir, @@ -1407,16 +1426,16 @@ describe('Codex subscription auth', () => { await engine.execute(input); - expect(mockWriteFile).toHaveBeenCalledWith( + expect(mockWriteFile).not.toHaveBeenCalledWith( expect.stringContaining('auth.json'), - SYNTHESIZED_AUTH, - { mode: 0o600 }, + expect.anything(), + expect.anything(), ); + expect(capturedEnv?.OPENAI_API_KEY).toBeUndefined(); + expect(capturedEnv?.CODEX_API_KEY).toBe(API_KEY); }); - it('never persists the synthesized API-key auth.json back into CODEX_AUTH_JSON', async () => { - // Even if the on-disk auth.json "changes" after the run, the API-key path - // must never write it into the subscription credential slot. + it('never persists API-key auth back into CODEX_AUTH_JSON', async () => { mockReadFile.mockResolvedValue( JSON.stringify({ auth_mode: 'apikey', OPENAI_API_KEY: 'sk-proj-rotated' }), ); @@ -1444,11 +1463,6 @@ describe('Codex subscription auth', () => { expect(mockWriteFile).toHaveBeenCalledWith(expect.stringContaining('auth.json'), AUTH_JSON, { mode: 0o600, }); - expect(mockWriteFile).not.toHaveBeenCalledWith( - expect.stringContaining('auth.json'), - SYNTHESIZED_AUTH, - { mode: 0o600 }, - ); }); it('writes no auth.json when neither CODEX_AUTH_JSON nor OPENAI_API_KEY is set', async () => { @@ -1464,7 +1478,14 @@ describe('Codex subscription auth', () => { ); }); - it('falls back to the synthesized API-key auth.json when CODEX_AUTH_JSON is invalid JSON', async () => { + it('falls back to CODEX_API_KEY when CODEX_AUTH_JSON is invalid JSON', async () => { + let capturedEnv: Record | undefined; + mockSpawn.mockImplementation( + (_cmd: string, _args: string[], options: { env?: Record }) => { + capturedEnv = options.env; + return createMockChild({ exitCode: 0 }); + }, + ); const engine = new CodexEngine(); const input = makeInput({ repoDir: workspaceDir, @@ -1473,11 +1494,12 @@ describe('Codex subscription auth', () => { await engine.execute(input); - expect(mockWriteFile).toHaveBeenCalledWith( + expect(mockWriteFile).not.toHaveBeenCalledWith( expect.stringContaining('auth.json'), - SYNTHESIZED_AUTH, - { mode: 0o600 }, + expect.anything(), + expect.anything(), ); + expect(capturedEnv?.CODEX_API_KEY).toBe(API_KEY); expect(input.logWriter).toHaveBeenCalledWith( 'WARN', expect.stringContaining('not valid JSON'), From c7fb8e001f4a28377af8b48394ce708decd24ccc Mon Sep 17 00:00:00 2001 From: aaight Date: Tue, 28 Jul 2026 22:27:27 +0200 Subject: [PATCH 14/16] fix(codex): resume completion continuation turns (#1521) Co-authored-by: Cascade Bot --- src/backends/codex/index.ts | 421 ++++++++++-------- src/backends/codex/jsonlParser.ts | 12 + .../unit/backends/codex-event-schema.test.ts | 8 +- tests/unit/backends/codex.test.ts | 93 ++++ 4 files changed, 351 insertions(+), 183 deletions(-) diff --git a/src/backends/codex/index.ts b/src/backends/codex/index.ts index 3ebd14c2..9952536f 100644 --- a/src/backends/codex/index.ts +++ b/src/backends/codex/index.ts @@ -9,6 +9,7 @@ import { writeProjectCredential } from '../../db/repositories/credentialsReposit import { calculateCost } from '../../utils/llmMetrics.js'; import { CODEX_ENGINE_DEFINITION } from '../catalog.js'; import { cleanupContextFiles } from '../shared/contextFiles.js'; +import { runContinuationLoop } from '../shared/continuationLoop.js'; import { appendEngineLog } from '../shared/engineLog.js'; import { buildEngineResult, extractAndBuildPrEvidence } from '../shared/engineResult.js'; import { SHARED_ALLOWED_ENV_EXACT } from '../shared/envFilter.js'; @@ -72,6 +73,14 @@ type CodexCumulativeUsage = { reasoningTokens: number; }; +type CodexRunState = { + iterationCount: number; + llmCallCount: number; + cost?: number; + sessionId?: string; + cumulativeUsage: CodexCumulativeUsage; +}; + type CodexLineContext = { input: AgentExecutionPlan; model: string; @@ -85,6 +94,8 @@ type CodexLineContext = { currentTurn: CodexTurnAccumulator; /** Previous turn's cumulative usage — used to compute per-turn deltas. */ cumulativeUsage: CodexCumulativeUsage; + /** Shared across subprocesses so continuation turns can resume this rollout. */ + runState: CodexRunState; }; function tomlString(value: string): string { @@ -309,6 +320,10 @@ async function handleStructuralEvent( return true; } if (eventType === 'turn.started' || eventType === 'thread.started') { + if (eventType === 'thread.started') { + const { threadId } = parseCodexEvent(parsed); + if (threadId) context.runState.sessionId = threadId; + } // Reset turn accumulator at the start of each new turn context.currentTurn = { textSummary: [], usage: null }; return true; @@ -435,17 +450,106 @@ function buildPrompt(systemPrompt: string, taskPrompt: string): string { return `## System Instructions\n${systemPrompt}\n\n## Task\n${taskPrompt}`; } +function buildCodexTurnResult(options: { + input: AgentExecutionPlan; + runState: CodexRunState; + startTime: number; + exitCode: number; + lastMessagePath: string; + rawTextParts: string[]; + stderrChunks: string[]; + finalError?: string; + turnCost?: number; + toolCallCount: number; +}): { result: AgentEngineResult; toolCallCount: number } { + const { + input, + runState, + startTime, + exitCode, + lastMessagePath, + rawTextParts, + stderrChunks, + finalError, + turnCost, + toolCallCount, + } = options; + const fileOutput = + existsSync(lastMessagePath) && readFileSync(lastMessagePath, 'utf-8').trim() + ? readFileSync(lastMessagePath, 'utf-8').trim() + : rawTextParts.join('\n').trim(); + const { finalOutput, prUrl, prEvidence, structuredPrClaim } = resolveCompletionOutput( + fileOutput, + rawTextParts.join('\n'), + ); + const stderrOutput = stderrChunks.join('').trim(); + + if (structuredPrClaim) { + input.logWriter('INFO', 'Codex structured completion claimed PR creation', { + prUrl: structuredPrClaim, + authoritative: false, + hint: 'The native-tool PR sidecar remains the sole authority for completion gating', + }); + } + input.logWriter('DEBUG', 'Codex process exited', { + exitCode, + iterationCount: runState.iterationCount, + llmCallCount: runState.llmCallCount, + finalOutputLength: finalOutput.length, + }); + if (stderrOutput) input.logWriter('WARN', 'Codex stderr output', { stderr: stderrOutput }); + + const shellCorruptionResult = classifyShellCorruption( + stderrOutput, + exitCode, + prUrl, + prEvidence, + finalOutput, + turnCost, + input.logWriter, + ); + if (shellCorruptionResult) return { result: shellCorruptionResult, toolCallCount }; + + const result = + exitCode !== 0 + ? buildEngineResult({ + success: false, + output: finalOutput, + error: finalError ?? stderrOutput ?? `Codex exited with code ${exitCode}`, + cost: turnCost, + prUrl, + prEvidence, + }) + : buildEngineResult({ + success: true, + output: finalOutput, + cost: turnCost, + prUrl, + prEvidence, + }); + if (result.success) { + input.logWriter('INFO', 'Codex execution completed', { + turns: runState.iterationCount, + cost: runState.cost ?? null, + prUrl: prUrl ?? null, + durationMs: Date.now() - startTime, + }); + } + return { result, toolCallCount }; +} + export function buildArgs( input: AgentExecutionPlan, settings: ReturnType, model: string, lastMessagePath: string, outputSchemaPath: string, + sessionId?: string, ): string[] { const args = [ 'exec', + ...(sessionId ? ['resume', sessionId] : []), '--json', - '--ephemeral', '--ignore-user-config', '--ignore-rules', '--skip-git-repo-check', @@ -760,21 +864,18 @@ export class CodexEngine extends NativeToolEngine { // subprocess via CODEX_API_KEY and does not persist in ~/.codex/auth.json. const subprocessSecrets = buildCodexSubprocessSecrets(input.projectSecrets); - const lastMessagePath = join( - tmpdir(), - `cascade-codex-last-message-${process.pid}-${Date.now()}.txt`, - ); - const outputSchemaPath = join( - tmpdir(), - `cascade-codex-output-schema-${process.pid}-${Date.now()}.json`, - ); - writeFileSync(outputSchemaPath, JSON.stringify(CODEX_COMPLETION_OUTPUT_SCHEMA), { - encoding: 'utf-8', - mode: 0o600, - }); - const prompt = buildPrompt(systemPrompt, taskPrompt); const env = this.buildEnv(subprocessSecrets, input.cliToolsDir, input.nativeToolShimDir); - const args = buildArgs(input, settings, model, lastMessagePath, outputSchemaPath); + const initialPrompt = buildPrompt(systemPrompt, taskPrompt); + const runState: CodexRunState = { + iterationCount: 0, + llmCallCount: 0, + cumulativeUsage: { + inputTokens: 0, + outputTokens: 0, + cachedTokens: 0, + reasoningTokens: 0, + }, + }; input.logWriter('INFO', 'Starting Codex execution', { agentType: input.agentType, @@ -786,180 +887,135 @@ export class CodexEngine extends NativeToolEngine { hasOffloadedContext, }); - appendEngineLog( - input.engineLogPath, - `$ codex ${args.map((arg) => JSON.stringify(arg)).join(' ')}\n`, - ); - - let iterationCount = 0; - let llmCallCount = 0; - let cost: number | undefined; - const rawTextParts: string[] = []; - const stderrChunks: string[] = []; - let finalError: string | undefined; - try { - const exitCode = await new Promise((resolve, reject) => { - const child = spawn('codex', args, { - cwd: input.repoDir, - env, - stdio: ['pipe', 'pipe', 'pipe'], - }); - let lineQueue = Promise.resolve(); - let streamFailed = false; - const lineContext: CodexLineContext = { - input, - model, - maxIterations: input.maxIterations, - rawTextParts, - iterationCount, - llmCallCount, - cost, - finalError, - currentTurn: { textSummary: [], usage: null }, - cumulativeUsage: { - inputTokens: 0, - outputTokens: 0, - cachedTokens: 0, - reasoningTokens: 0, - }, - }; - - child.once('error', (error) => { - reject( - error instanceof Error && 'code' in error && error.code === 'ENOENT' - ? new Error( - 'Codex CLI not found in PATH. Install `@openai/codex` in the worker image.', - ) - : error, + return await runContinuationLoop({ + initialPrompt, + completionRequirements: input.completionRequirements, + logWriter: input.logWriter, + engineLabel: 'Codex', + executeTurn: async ({ promptText }) => { + const lastMessagePath = join( + tmpdir(), + `cascade-codex-last-message-${process.pid}-${Date.now()}.txt`, + ); + const outputSchemaPath = join( + tmpdir(), + `cascade-codex-output-schema-${process.pid}-${Date.now()}.json`, + ); + writeFileSync(outputSchemaPath, JSON.stringify(CODEX_COMPLETION_OUTPUT_SCHEMA), { + encoding: 'utf-8', + mode: 0o600, + }); + const args = buildArgs( + input, + settings, + model, + lastMessagePath, + outputSchemaPath, + runState.sessionId, + ); + const rawTextParts: string[] = []; + const stderrChunks: string[] = []; + let finalError: string | undefined; + const costBeforeTurn = runState.cost ?? 0; + const llmCallsBeforeTurn = runState.llmCallCount; + let turnToolCallCount = 0; + + appendEngineLog( + input.engineLogPath, + `$ codex ${args.map((arg) => JSON.stringify(arg)).join(' ')}\n`, ); - }); - const stdout = createInterface({ input: child.stdout }); - stdout.on('line', (line) => { - lineQueue = lineQueue - .then(() => processStdoutLine(lineContext, line)) - .catch((error) => { - streamFailed = true; - reject(error); + try { + const exitCode = await new Promise((resolve, reject) => { + const child = spawn('codex', args, { + cwd: input.repoDir, + env, + stdio: ['pipe', 'pipe', 'pipe'], + }); + let lineQueue = Promise.resolve(); + let streamFailed = false; + const lineContext: CodexLineContext = { + input, + model, + maxIterations: input.maxIterations, + rawTextParts, + iterationCount: runState.iterationCount, + llmCallCount: runState.llmCallCount, + cost: runState.cost, + finalError, + currentTurn: { textSummary: [], usage: null }, + cumulativeUsage: runState.cumulativeUsage, + runState, + }; + + child.once('error', (error) => { + reject( + error instanceof Error && 'code' in error && error.code === 'ENOENT' + ? new Error( + 'Codex CLI not found in PATH. Install `@openai/codex` in the worker image.', + ) + : error, + ); + }); + + const stdout = createInterface({ input: child.stdout }); + stdout.on('line', (line) => { + lineQueue = lineQueue + .then(() => processStdoutLine(lineContext, line)) + .catch((error) => { + streamFailed = true; + reject(error); + }); + }); + + child.stderr.on('data', (chunk: Buffer | string) => { + const text = chunk.toString(); + stderrChunks.push(text); + appendEngineLog(input.engineLogPath, text); + const trimmed = text.trim(); + if (trimmed) input.logWriter('DEBUG', 'Codex stderr', { stderr: trimmed }); + }); + + child.stdin.write(promptText); + child.stdin.end(); + + child.once('close', (code) => { + void lineQueue + .then(() => { + runState.iterationCount = lineContext.iterationCount; + runState.llmCallCount = lineContext.llmCallCount; + runState.cost = lineContext.cost; + runState.cumulativeUsage = lineContext.cumulativeUsage; + finalError = lineContext.finalError; + turnToolCallCount = lineContext.llmCallCount - llmCallsBeforeTurn; + if (!streamFailed) resolve(code ?? 1); + }) + .catch(reject); + }); }); - }); - - child.stderr.on('data', (chunk: Buffer | string) => { - const text = chunk.toString(); - stderrChunks.push(text); - appendEngineLog(input.engineLogPath, text); - const trimmed = text.trim(); - if (trimmed) input.logWriter('DEBUG', 'Codex stderr', { stderr: trimmed }); - }); - - child.stdin.write(prompt); - child.stdin.end(); - - child.once('close', (code) => { - void lineQueue - .then(() => { - iterationCount = lineContext.iterationCount; - llmCallCount = lineContext.llmCallCount; - cost = lineContext.cost; - finalError = lineContext.finalError; - if (!streamFailed) { - resolve(code ?? 1); - } - }) - .catch(reject); - }); - }); - - const rawFinalOutput = - existsSync(lastMessagePath) && readFileSync(lastMessagePath, 'utf-8').trim() - ? readFileSync(lastMessagePath, 'utf-8').trim() - : rawTextParts.join('\n').trim(); - const streamedOutput = rawTextParts.join('\n'); - const { finalOutput, prUrl, prEvidence, structuredPrClaim } = resolveCompletionOutput( - rawFinalOutput, - streamedOutput, - ); - const stderrOutput = stderrChunks.join('').trim(); - - if (structuredPrClaim) { - input.logWriter('INFO', 'Codex structured completion claimed PR creation', { - prUrl: structuredPrClaim, - authoritative: false, - hint: 'The native-tool PR sidecar remains the sole authority for completion gating', - }); - } - input.logWriter('DEBUG', 'Codex process exited', { - exitCode, - iterationCount, - llmCallCount, - finalOutputLength: finalOutput.length, - }); - - if (stderrOutput) { - input.logWriter('WARN', 'Codex stderr output', { stderr: stderrOutput }); - } - - // Prod regression 2026-05-09 (runs 8b000cd6, d8e31665): codex's - // persistent bash session breaks with `ERROR - // codex_core::tools::router: error=write_stdin failed: stdin is - // closed for this session`. Once that signal fires, every - // subsequent command in the session inherits a corrupted stdout - // buffer (lint output from one command bleeding into the next, - // sidecar writes racing). We observed this leading to silent run - // failures with PR-creation evidence missing despite a real PR - // existing on GitHub. Codex itself exits cleanly (exit=0) — the - // stderr signal is the only evidence the session was corrupted. - // - // MNG-718 follow-up (run f801342b, 2026-05-11): the signal can - // also fire LATE, at session-close, after all real work has been - // captured. That run opened PR #1350, ran the full verification - // suite, and filed a follow-up friction ticket — yet was marked - // failed, costing cascade the post-completion review dispatch - // and surfacing a misleading "agent failed" comment. Split the - // two cases by whether success evidence (prUrl + finalOutput) - // was captured before the signal: late → WARN + success, early - // → ERROR + fail. - const shellCorruptionResult = classifyShellCorruption( - stderrOutput, - exitCode, - prUrl, - prEvidence, - finalOutput, - cost, - input.logWriter, - ); - if (shellCorruptionResult) return shellCorruptionResult; - - if (exitCode !== 0) { - return buildEngineResult({ - success: false, - output: finalOutput, - error: finalError ?? stderrOutput ?? `Codex exited with code ${exitCode}`, - cost, - prUrl, - prEvidence, - }); - } - - input.logWriter('INFO', 'Codex execution completed', { - turns: iterationCount, - cost: cost ?? null, - prUrl: prUrl ?? null, - durationMs: Date.now() - startTime, - }); - - return buildEngineResult({ - success: true, - output: finalOutput, - cost, - prUrl, - prEvidence, + const turnCost = + runState.cost === undefined ? undefined : runState.cost - costBeforeTurn; + return buildCodexTurnResult({ + input, + runState, + startTime, + exitCode, + lastMessagePath, + rawTextParts, + stderrChunks, + finalError, + turnCost, + toolCallCount: turnToolCallCount, + }); + } finally { + CodexEngine._cleanupLastMessagePath(lastMessagePath); + CodexEngine._cleanupLastMessagePath(outputSchemaPath); + } + }, }); } finally { - CodexEngine._cleanupLastMessagePath(lastMessagePath); - CodexEngine._cleanupLastMessagePath(outputSchemaPath); // When called directly (not via adapter), afterExecute won't be invoked. // Perform cleanup here so direct callers (e.g. tests) still behave correctly. if (!this._adapterLifecycleActive) { @@ -978,6 +1034,7 @@ export class CodexEngine extends NativeToolEngine { export { extractErrorMessage, extractTextParts, + extractThreadId, extractToolCall, extractUsage, } from './jsonlParser.js'; diff --git a/src/backends/codex/jsonlParser.ts b/src/backends/codex/jsonlParser.ts index 08f35447..0228b479 100644 --- a/src/backends/codex/jsonlParser.ts +++ b/src/backends/codex/jsonlParser.ts @@ -13,6 +13,7 @@ export type ParsedCodexEvent = { textParts: string[]; toolCall: ToolCall | null; usage: UsageSummary | null; + threadId?: string; error?: string; }; export type UsageSummary = { @@ -196,11 +197,22 @@ export function extractErrorMessage(event: JsonRecord): string | undefined { return undefined; } +/** Extracts the resumable session id emitted by the thread.started event. */ +export function extractThreadId(event: JsonRecord): string | undefined { + return event.type === 'thread.started' && + typeof event.thread_id === 'string' && + event.thread_id.trim() + ? event.thread_id + : undefined; +} + export function parseCodexEvent(event: JsonRecord): ParsedCodexEvent { + const threadId = extractThreadId(event); return { textParts: extractTextParts(event), toolCall: extractToolCall(event), usage: extractUsage(event), + ...(threadId ? { threadId } : {}), error: extractErrorMessage(event), }; } diff --git a/tests/unit/backends/codex-event-schema.test.ts b/tests/unit/backends/codex-event-schema.test.ts index de341c68..d5867426 100644 --- a/tests/unit/backends/codex-event-schema.test.ts +++ b/tests/unit/backends/codex-event-schema.test.ts @@ -47,7 +47,13 @@ function expectSchemaMatch(validate: ValidateFunction, value: unknown, context: describe('Codex exec JSONL schema drift', () => { it('replays the pinned CLI stream through jsonlParser', () => { expect(events.map((event) => parseCodexEvent(event))).toEqual([ - { textParts: [], toolCall: null, usage: null, error: undefined }, + { + textParts: [], + toolCall: null, + usage: null, + threadId: events[0].thread_id, + error: undefined, + }, { textParts: [], toolCall: null, usage: null, error: undefined }, { textParts: ['schema fixture'], diff --git a/tests/unit/backends/codex.test.ts b/tests/unit/backends/codex.test.ts index 13dcea78..6a999a03 100644 --- a/tests/unit/backends/codex.test.ts +++ b/tests/unit/backends/codex.test.ts @@ -45,6 +45,7 @@ import { CodexEngine, extractErrorMessage, extractTextParts, + extractThreadId, extractToolCall, extractUsage, resolveCodexModel, @@ -210,6 +211,13 @@ describe('extractErrorMessage', () => { }); }); +describe('extractThreadId', () => { + it('extracts a resumable id only from thread.started', () => { + expect(extractThreadId({ type: 'thread.started', thread_id: 'th_abc' })).toBe('th_abc'); + expect(extractThreadId({ type: 'turn.started', thread_id: 'th_abc' })).toBeUndefined(); + }); +}); + describe('extractToolCall', () => { it('handles tool_use event with input', () => { expect(extractToolCall({ type: 'tool_use', name: 'bash', input: { cmd: 'ls' } })).toEqual({ @@ -524,6 +532,27 @@ describe('buildArgs', () => { expect(args).toContain('--ignore-user-config'); expect(args).toContain('--ignore-rules'); }); + + it('persists the initial rollout and resumes it on continuation turns', () => { + const initialArgs = buildArgs( + makeInput(), + { ...baseSettings, webSearch: false }, + 'model-x', + '/tmp/last.json', + '/tmp/output-schema.json', + ); + const resumeArgs = buildArgs( + makeInput(), + { ...baseSettings, webSearch: false }, + 'model-x', + '/tmp/last.json', + '/tmp/output-schema.json', + 'th_abc', + ); + + expect(initialArgs).not.toContain('--ephemeral'); + expect(resumeArgs.slice(0, 4)).toEqual(['exec', 'resume', 'th_abc', '--json']); + }); }); describe('structured completion output', () => { @@ -640,6 +669,70 @@ describe('CodexEngine', () => { expect(readFileSync(join(workspaceDir, 'codex.log'), 'utf-8')).toContain('codex'); }); + it('resumes the captured thread and preserves cumulative usage accounting', async () => { + const prSidecarPath = join(workspaceDir, 'pr-sidecar.json'); + mockSpawn + .mockImplementationOnce((_cmd: string, args: string[]) => { + expect(args).not.toContain('resume'); + const outputPath = args[args.indexOf('-o') + 1]; + return createMockChild({ + stdoutLines: [ + JSON.stringify({ type: 'thread.started', thread_id: 'th_resume_123' }), + JSON.stringify({ + type: 'turn.completed', + usage: { input_tokens: 100, output_tokens: 50 }, + }), + ], + onBeforeClose: () => writeFileSync(outputPath, 'Initial turn done', 'utf-8'), + }); + }) + .mockImplementationOnce((_cmd: string, args: string[]) => { + expect(args.slice(0, 4)).toEqual(['exec', 'resume', 'th_resume_123', '--json']); + const outputPath = args[args.indexOf('-o') + 1]; + return createMockChild({ + stdoutLines: [ + JSON.stringify({ + type: 'turn.completed', + usage: { input_tokens: 150, output_tokens: 70 }, + }), + ], + onBeforeClose: () => { + writeFileSync(outputPath, 'Continuation done', 'utf-8'); + writeFileSync( + prSidecarPath, + JSON.stringify({ prUrl: 'https://github.com/owner/repo/pull/789' }), + 'utf-8', + ); + }, + }); + }); + + const result = await new CodexEngine().execute( + makeInput({ + repoDir: workspaceDir, + runId: 'run-resume', + completionRequirements: { + requiresPR: true, + prSidecarPath, + maxContinuationTurns: 1, + }, + }), + ); + + expect(result.success).toBe(true); + expect(result.prUrl).toBe('https://github.com/owner/repo/pull/789'); + expect(mockSpawn).toHaveBeenCalledTimes(2); + const costRows = mockStoreLlmCall.mock.calls.map( + ([call]) => JSON.parse((call as { response: string }).response) as Record, + ); + expect(costRows[0]).toMatchObject({ + delta: { inputTokens: 100, outputTokens: 50 }, + }); + expect(costRows[1]).toMatchObject({ + delta: { inputTokens: 50, outputTokens: 20 }, + }); + }); + it('uses the structured summary and treats its PR URL as non-authoritative text evidence', async () => { mockSpawn.mockImplementation((_cmd: string, args: string[]) => { const outputPath = args[args.indexOf('-o') + 1]; From ff8547611fb34a8375b0e24afd2b607be0c95f6f Mon Sep 17 00:00:00 2001 From: aaight Date: Wed, 29 Jul 2026 00:22:05 +0200 Subject: [PATCH 15/16] fix(codex): enforce blockGitPush with PreToolUse hook (#1517) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(codex): enforce blockGitPush with PreToolUse hook * fix(codex): default blockGitPush to true for claude-code parity The codex PreToolUse git-push deny hook inverted claude-code's default: claude-code resolves `options?.blockGitPush ?? true` (undefined blocks), while the plan carries the raw `profile.finishHooks.blockGitPush` with no default. Only the four PR-branch agents set it (all to false); every other agent — including implementation and review, the MNG-1755 targets — leaves it undefined. The codex path treated undefined as "do not block", so the deny hook was materialized for zero shipped agents. - writeCodexHooksFile: resolve `const shouldBlock = blockGitPush ?? true` - buildArgs: gate `--dangerously-bypass-hook-trust` on `input.blockGitPush ?? true` - guard the generated hook's `JSON.parse(input)` so unparseable/empty stdin fails open (allow) instead of throwing non-zero with undefined behavior - tests: pin undefined→block for both surfaces + fail-open parse guard Co-Authored-By: Claude Opus 4.8 --------- Co-authored-by: Cascade Bot Co-authored-by: Claude Opus 4.8 --- src/backends/codex/index.ts | 94 +++++++++++++++- tests/unit/backends/codex.test.ts | 179 ++++++++++++++++++++++++++++++ 2 files changed, 268 insertions(+), 5 deletions(-) diff --git a/src/backends/codex/index.ts b/src/backends/codex/index.ts index 9952536f..9004b3cb 100644 --- a/src/backends/codex/index.ts +++ b/src/backends/codex/index.ts @@ -1,6 +1,6 @@ import { spawn } from 'node:child_process'; import { existsSync, readFileSync, unlinkSync, writeFileSync } from 'node:fs'; -import { mkdir, readFile, writeFile } from 'node:fs/promises'; +import { mkdir, readFile, rm, writeFile } from 'node:fs/promises'; import { homedir, tmpdir } from 'node:os'; import { join } from 'node:path'; import { createInterface } from 'node:readline'; @@ -29,6 +29,78 @@ import { const CODEX_AUTH_DIR = join(homedir(), '.codex'); const CODEX_AUTH_FILE = join(CODEX_AUTH_DIR, 'auth.json'); +const CODEX_HOOKS_FILE = join(CODEX_AUTH_DIR, 'hooks.json'); +const CODEX_BLOCK_GIT_PUSH_HOOK_FILE = join(CODEX_AUTH_DIR, 'cascade-block-git-push.cjs'); + +const BLOCK_GIT_PUSH_REASON = + 'Push is blocked for this agent; use the cascade-tools scm create-pr flow.'; + +const BLOCK_GIT_PUSH_HOOK = `let input = ''; +process.stdin.setEncoding('utf8'); +process.stdin.on('data', (chunk) => { input += chunk; }); +process.stdin.on('end', () => { + let payload; + try { + payload = JSON.parse(input); + } catch { + // Empty / non-JSON stdin means we cannot read the command. Codex serializes this + // envelope itself, so the agent cannot forge a malformed payload to smuggle a push; + // a parse failure signals a codex payload-format mismatch, not an evasion attempt. + // Fail open (allow) rather than deny-blocking every Bash call and bricking the run — + // git-push blocking resumes on the next well-formed payload. This is a deliberate + // decision so the process never throws / exits non-zero on unexpected input. + return; + } + const command = payload?.tool_input?.command ?? ''; + if (/\\bgit\\s+push\\b/.test(command)) { + process.stdout.write(JSON.stringify({ + hookSpecificOutput: { + hookEventName: 'PreToolUse', + permissionDecision: 'deny', + permissionDecisionReason: ${JSON.stringify(BLOCK_GIT_PUSH_REASON)} + } + })); + } +}); +`; + +async function writeCodexHooksFile(blockGitPush: boolean | undefined): Promise { + // Mirror claude-code's default (buildPreToolUseHooks: `options?.blockGitPush ?? true`): + // an undefined blockGitPush blocks by default, so the deny hook is materialized for + // implementation / review (the MNG-1755 targets) and every other agent. Only the four + // PR-branch agents opt out with an explicit `blockGitPush: false`. + const shouldBlock = blockGitPush ?? true; + if (!shouldBlock) return; + + await mkdir(CODEX_AUTH_DIR, { recursive: true }); + await writeFile(CODEX_BLOCK_GIT_PUSH_HOOK_FILE, BLOCK_GIT_PUSH_HOOK, { mode: 0o700 }); + await writeFile( + CODEX_HOOKS_FILE, + JSON.stringify({ + hooks: { + PreToolUse: [ + { + matcher: 'Bash', + hooks: [ + { + type: 'command', + command: `node ${JSON.stringify(CODEX_BLOCK_GIT_PUSH_HOOK_FILE)}`, + }, + ], + }, + ], + }, + }), + { mode: 0o600 }, + ); +} + +async function cleanupCodexHooksFiles(): Promise { + await Promise.all([ + rm(CODEX_HOOKS_FILE, { force: true }), + rm(CODEX_BLOCK_GIT_PUSH_HOOK_FILE, { force: true }), + ]); +} /** * Codex's persistent-bash-session corruption signal. When this stderr message @@ -573,6 +645,13 @@ export function buildArgs( if (settings.webSearch) { args.push('--enable', 'web_search'); } + if (input.blockGitPush ?? true) { + // CASCADE owns and rewrites this per-run hook, so no interactive trust prompt is possible + // or necessary in the headless worker. Mirror claude-code's default-block semantics: an + // undefined blockGitPush blocks (so the per-run hook is written and its trust must be + // bypassed) for every agent except the four PR-branch opt-outs that set blockGitPush: false. + args.push('--dangerously-bypass-hook-trust'); + } args.push('-'); return args; @@ -796,6 +875,7 @@ export class CodexEngine extends NativeToolEngine { async beforeExecute(plan: AgentExecutionPlan): Promise { this._adapterLifecycleActive = true; this._originalAuthJson = await writeCodexAuthFile(plan.projectSecrets, plan.logWriter); + await writeCodexHooksFile(plan.blockGitPush); } /** @@ -803,10 +883,14 @@ export class CodexEngine extends NativeToolEngine { * refreshed Codex auth token back to the project credentials. */ async afterExecute(plan: AgentExecutionPlan, result: AgentEngineResult): Promise { - await super.afterExecute(plan, result); - await captureRefreshedToken(plan.project.id, this._originalAuthJson, plan.logWriter); - this._originalAuthJson = undefined; - this._adapterLifecycleActive = false; + try { + await super.afterExecute(plan, result); + await captureRefreshedToken(plan.project.id, this._originalAuthJson, plan.logWriter); + } finally { + await cleanupCodexHooksFiles(); + this._originalAuthJson = undefined; + this._adapterLifecycleActive = false; + } } /** Remove temp file created by execute() — best-effort, ignores errors. */ diff --git a/tests/unit/backends/codex.test.ts b/tests/unit/backends/codex.test.ts index 6a999a03..243ae1ac 100644 --- a/tests/unit/backends/codex.test.ts +++ b/tests/unit/backends/codex.test.ts @@ -11,6 +11,7 @@ const mockWriteProjectCredential = vi.fn<() => Promise>(); const mockWriteFile = vi.fn<() => Promise>(); const mockMkdir = vi.fn<() => Promise>(); const mockReadFile = vi.fn<() => Promise>(); +const mockRm = vi.fn<() => Promise>(); vi.mock('node:child_process', () => ({ spawn: (...args: unknown[]) => mockSpawn(...args), @@ -20,6 +21,7 @@ vi.mock('node:fs/promises', () => ({ mkdir: (...args: unknown[]) => mockMkdir(...args), writeFile: (...args: unknown[]) => mockWriteFile(...args), readFile: (...args: unknown[]) => mockReadFile(...args), + rm: (...args: unknown[]) => mockRm(...args), })); vi.mock('../../../src/db/repositories/credentialsRepository.js', () => ({ @@ -510,6 +512,36 @@ describe('buildArgs', () => { expect(args).toContain('web_search'); }); + it('bypasses interactive hook trust unless blockGitPush is explicitly false (claude-code parity)', () => { + const enabledArgs = buildArgs( + makeInput({ blockGitPush: true }), + { ...baseSettings, webSearch: false }, + 'model-x', + '/tmp/last.json', + '/tmp/output-schema.json', + ); + const disabledArgs = buildArgs( + makeInput({ blockGitPush: false }), + { ...baseSettings, webSearch: false }, + 'model-x', + '/tmp/last.json', + '/tmp/output-schema.json', + ); + // Undefined must resolve to block (`input.blockGitPush ?? true`) — mirrors claude-code's + // `options?.blockGitPush ?? true`, so implementation / review still bypass hook trust. + const defaultArgs = buildArgs( + makeInput({ blockGitPush: undefined }), + { ...baseSettings, webSearch: false }, + 'model-x', + '/tmp/last.json', + '/tmp/output-schema.json', + ); + + expect(enabledArgs).toContain('--dangerously-bypass-hook-trust'); + expect(disabledArgs).not.toContain('--dangerously-bypass-hook-trust'); + expect(defaultArgs).toContain('--dangerously-bypass-hook-trust'); + }); + it('passes the structured completion schema to codex exec', () => { const args = buildArgs( makeInput(), @@ -606,6 +638,7 @@ describe('CodexEngine', () => { mockMkdir.mockResolvedValue(undefined); mockWriteFile.mockResolvedValue(undefined); mockReadFile.mockRejectedValue(Object.assign(new Error('ENOENT'), { code: 'ENOENT' })); + mockRm.mockResolvedValue(undefined); mockWriteProjectCredential.mockResolvedValue(undefined); }); @@ -1782,6 +1815,148 @@ describe('CodexEngine lifecycle hooks', () => { }); }); + it('beforeExecute writes a PreToolUse git-push deny hook when blockGitPush is enabled', async () => { + const engine = new CodexEngine(); + const input = makeInput({ + repoDir: workspaceDir, + blockGitPush: true, + }); + + await engine.beforeExecute(input); + + const hooksWrite = mockWriteFile.mock.calls.find(([path]) => + String(path).endsWith('hooks.json'), + ); + expect(hooksWrite).toBeDefined(); + expect(JSON.parse(String(hooksWrite?.[1]))).toEqual({ + hooks: { + PreToolUse: [ + { + matcher: 'Bash', + hooks: [ + { + type: 'command', + command: expect.stringContaining('cascade-block-git-push.cjs'), + }, + ], + }, + ], + }, + }); + + const hookScriptWrite = mockWriteFile.mock.calls.find(([path]) => + String(path).endsWith('cascade-block-git-push.cjs'), + ); + expect(hookScriptWrite?.[1]).toContain('/\\bgit\\s+push\\b/'); + expect(hookScriptWrite?.[1]).toContain('cascade-tools scm create-pr flow'); + }); + + it.each([ + 'git push', + 'git push origin HEAD', + 'cd /tmp/repo && git push origin feature/x', + ])('generated PreToolUse hook denies compound push command: %s', async (command) => { + const engine = new CodexEngine(); + await engine.beforeExecute(makeInput({ repoDir: workspaceDir, blockGitPush: true })); + const script = String( + mockWriteFile.mock.calls.find(([path]) => + String(path).endsWith('cascade-block-git-push.cjs'), + )?.[1], + ); + const stdin = new EventEmitter() as EventEmitter & { setEncoding: ReturnType }; + stdin.setEncoding = vi.fn(); + const write = vi.fn(); + + new Function('process', script)({ stdin, stdout: { write } }); + stdin.emit('data', JSON.stringify({ tool_input: { command } })); + stdin.emit('end'); + + expect(JSON.parse(String(write.mock.calls[0]?.[0]))).toEqual({ + hookSpecificOutput: { + hookEventName: 'PreToolUse', + permissionDecision: 'deny', + permissionDecisionReason: expect.stringContaining('cascade-tools scm create-pr'), + }, + }); + }); + + it('generated PreToolUse hook allows non-push git commands', async () => { + const engine = new CodexEngine(); + await engine.beforeExecute(makeInput({ repoDir: workspaceDir, blockGitPush: true })); + const script = String( + mockWriteFile.mock.calls.find(([path]) => + String(path).endsWith('cascade-block-git-push.cjs'), + )?.[1], + ); + const stdin = new EventEmitter() as EventEmitter & { setEncoding: ReturnType }; + stdin.setEncoding = vi.fn(); + const write = vi.fn(); + + new Function('process', script)({ stdin, stdout: { write } }); + stdin.emit('data', JSON.stringify({ tool_input: { command: 'git status' } })); + stdin.emit('end'); + + expect(write).not.toHaveBeenCalled(); + }); + + it.each([ + '', + 'not json{', + '{"tool_input": ', + ])('generated PreToolUse hook fails open without throwing on unparseable stdin: %j', async (rawInput) => { + const engine = new CodexEngine(); + await engine.beforeExecute(makeInput({ repoDir: workspaceDir, blockGitPush: true })); + const script = String( + mockWriteFile.mock.calls.find(([path]) => + String(path).endsWith('cascade-block-git-push.cjs'), + )?.[1], + ); + const stdin = new EventEmitter() as EventEmitter & { + setEncoding: ReturnType; + }; + stdin.setEncoding = vi.fn(); + const write = vi.fn(); + + new Function('process', script)({ stdin, stdout: { write } }); + stdin.emit('data', rawInput); + // The guard must swallow the JSON.parse error — emitting 'end' must not throw + // (an unguarded parse would exit the hook non-zero and produce undefined behavior). + expect(() => stdin.emit('end')).not.toThrow(); + expect(write).not.toHaveBeenCalled(); + }); + + it('beforeExecute writes the git-push deny hook by default when blockGitPush is unset (claude-code parity)', async () => { + const engine = new CodexEngine(); + // implementation / review leave blockGitPush undefined; the codex path must default to + // block (`blockGitPush ?? true`) just like claude-code, so the deny hook is materialized. + const input = makeInput({ repoDir: workspaceDir, blockGitPush: undefined }); + + await engine.beforeExecute(input); + + expect(mockWriteFile.mock.calls.some(([path]) => String(path).endsWith('hooks.json'))).toBe( + true, + ); + expect( + mockWriteFile.mock.calls.some(([path]) => + String(path).endsWith('cascade-block-git-push.cjs'), + ), + ).toBe(true); + }); + + it('beforeExecute does not write hooks when blockGitPush is disabled', async () => { + const engine = new CodexEngine(); + const input = makeInput({ + repoDir: workspaceDir, + blockGitPush: false, + }); + + await engine.beforeExecute(input); + + expect(mockWriteFile.mock.calls.some(([path]) => String(path).endsWith('hooks.json'))).toBe( + false, + ); + }); + it('afterExecute writes refreshed token to project_credentials', async () => { const refreshedJson = JSON.stringify({ accessToken: 'tok_NEW', refreshToken: 'ref_xyz' }); mockReadFile.mockResolvedValue(refreshedJson); @@ -1808,6 +1983,10 @@ describe('CodexEngine lifecycle hooks', () => { const plan = makeInput({ repoDir: workspaceDir }); await expect(engine.afterExecute(plan, { success: true, output: '' })).resolves.not.toThrow(); + expect(mockRm).toHaveBeenCalledWith(expect.stringContaining('hooks.json'), { force: true }); + expect(mockRm).toHaveBeenCalledWith(expect.stringContaining('cascade-block-git-push.cjs'), { + force: true, + }); }); it('adapter lifecycle: execute does not double-capture token when adapter calls afterExecute', async () => { From 7900816c6b6b90bb0ab006966aaeffe76978baa1 Mon Sep 17 00:00:00 2001 From: Zbigniew Sobiecki Date: Fri, 31 Jul 2026 01:05:40 -0700 Subject: [PATCH 16/16] fix: enforce update-channel PM posting gate for native-tool engines (#1522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: enforce update-channel PM posting gate for native-tool engines native-tool engines (Codex, Claude Code, OpenCode) bypassed the filterPostingGadgetNames channel gate because the implementation agent's task-prompt template unconditionally instructed the agent to call PostComment, and NATIVE_TOOL_EXECUTION_RULES told it to translate gadget names into cascade-tools CLI calls — so cascade-tools pm post-comment was invoked via bash regardless of the configured update channel. Two-layer fix: - Prompt suppression: resolve update channel before template rendering and inject pmPostingEnabled into promptContext; implementation.eta now omits the "Post Summary Comment" step when PM posting is disabled. - CLI runtime gate: inject CASCADE_UPDATE_CHANNEL into subprocess env via augmentProjectSecrets; cascade-tools pm post-comment checks this env var and returns a structured skipped response when PM posting is disabled. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_011ZaMpedeE8PXsix84cWsq1 * fix: complete update-channel PM posting gate (layer 1 + fail-closed layer 2) Addresses review feedback on PR #1522: - implementation.eta: gate Phase-4 step 10 ("Post summary comment") on pmPostingEnabled, matching the already-gated "Post Summary Comment" section, so layer-1 prompt suppression is complete under scm-only/none. - post-comment.ts: resolve the channel via env-then-/tmp-file fallback (resolveUpdateChannelFromEnv), mirroring the sibling create-pr-review gate. claude-code (the default engine) can strip custom env vars from bash subprocesses, which made the env-only gate fail OPEN. The orchestrator now writes UPDATE_CHANNEL_FILE unconditionally so the CLI gate — the engine-wide defense for every PM-posting agent — holds even when CASCADE_UPDATE_CHANNEL is dropped. - updateChannel.ts: add UPDATE_CHANNEL_ENV_VAR + UPDATE_CHANNEL_FILE constants; secretBuilder.ts uses the constant for the env-var key. - Tests: template gating (implementation-pm-posting.test.ts), CLI skip branch + file-fallback precedence (pm-commands.test.ts), promptContext flag + channel file write (secretOrchestrator.test.ts). Co-Authored-By: Claude Opus 4.8 * test(update-channel): pin CASCADE_UPDATE_CHANNEL injection + narrow comment Follow-up on the update-channel PM-posting gate addressing two remaining review points not covered by the prior commit: - Narrow the augmentProjectSecrets comment to `pm post-comment` and flag the SCM posting commands (scm post-pr-comment / create-pr-review / update-pr-comment / reply-to-review-comment) as a follow-up, so it no longer overstates current bash-gate coverage (review nitpick). - Add secretBuilder.test.ts coverage pinning CASCADE_UPDATE_CHANNEL injection (default `both`, `scm-only`, and per-agent-type resolution) — the reviewer flagged this env var as untested (toMatchObject pinned nothing). Co-Authored-By: Claude Opus 4.8 * docs(secretBuilder): narrow CASCADE_UPDATE_CHANNEL comment to pm post-comment The comment referenced `scm post-pr-comment` alongside "enforce the channel gate," which read as if SCM CLI posting is gated on CASCADE_UPDATE_CHANNEL. Only `pm post-comment` reads the var. Reword to state that explicitly and frame the SCM commands as a not-yet-gated, out-of-scope follow-up so the comment matches actual coverage. Co-Authored-By: Claude Opus 4.8 --------- Co-authored-by: Claude Sonnet 4.6 Co-authored-by: Cascade Bot --- src/agents/prompts/index.ts | 5 + .../prompts/templates/implementation.eta | 4 + src/backends/secretBuilder.ts | 15 ++ src/backends/secretOrchestrator.ts | 30 +++- src/cli/pm/post-comment.ts | 47 ++++++ src/config/updateChannel.ts | 22 +++ .../prompts/implementation-pm-posting.test.ts | 56 +++++++ tests/unit/backends/adapter.test.ts | 2 + tests/unit/backends/secretBuilder.test.ts | 22 +++ .../unit/backends/secretOrchestrator.test.ts | 128 ++++++++++++++- tests/unit/cli/pm/pm-commands.test.ts | 148 +++++++++++++++++- 11 files changed, 475 insertions(+), 4 deletions(-) create mode 100644 tests/unit/agents/prompts/implementation-pm-posting.test.ts diff --git a/src/agents/prompts/index.ts b/src/agents/prompts/index.ts index 89afd8f8..3e0be9d1 100644 --- a/src/agents/prompts/index.ts +++ b/src/agents/prompts/index.ts @@ -86,6 +86,11 @@ export interface PromptContext { // (reviews are downgraded to advisory COMMENT submissions by the tool layer). commentOnlyReview?: boolean; + // false when the project's update channel disables PM posting (scm-only / none). + // Used by templates to suppress PM-comment instructions so agents don't call + // `cascade-tools pm post-comment` via bash even after the tool is filtered. + pmPostingEnabled?: boolean; + // Future extensibility [key: string]: unknown; } diff --git a/src/agents/prompts/templates/implementation.eta b/src/agents/prompts/templates/implementation.eta index aeeab7e9..d75e0913 100644 --- a/src/agents/prompts/templates/implementation.eta +++ b/src/agents/prompts/templates/implementation.eta @@ -37,7 +37,9 @@ You are an expert software engineer implementing features and fixing issues base - **FORBIDDEN**: Do NOT run `gh pr create` or `git push` via Tmux — they will FAIL - IMPORTANT: DO NOT PROCEED FURTHER UNTIL YOU HAVE CONFIRMED the CreatePR output shows a `prUrl`. 9. **Mark acceptance criteria complete** using UpdateChecklistItem for each criterion you've implemented +<% if (it.pmPostingEnabled !== false) { %> 10. **Post summary comment** on the <%= it.workItemNoun || 'card' %> describing what was implemented and linking to the PR +<% } %> <%~ include("partials/task-tracking") %> @@ -66,6 +68,7 @@ Use `UpdateChecklistItem` to mark each completed acceptance criterion: 1. Read the <%= it.workItemNoun || 'card' %> again to get checklist item IDs 2. For each criterion you've implemented, call `UpdateChecklistItem` with state="complete" +<% if (it.pmPostingEnabled !== false) { %> ### 2. Post Summary Comment Use `PostComment` to post a summary on the <%= it.workItemNoun || 'card' %> once you know the real PR url/number from CreatePR output: @@ -90,6 +93,7 @@ Use `PostComment` to post a summary on the <%= it.workItemNoun || 'card' %> once ### Notes - [Any issues encountered or things to be aware of] ``` +<% } %> ## Rules diff --git a/src/backends/secretBuilder.ts b/src/backends/secretBuilder.ts index 5c445209..27e9bbf7 100644 --- a/src/backends/secretBuilder.ts +++ b/src/backends/secretBuilder.ts @@ -5,6 +5,7 @@ import { REVIEW_EVENT_POLICY_ENV_VAR, resolveReviewEventPolicy, } from '../config/reviewEventPolicy.js'; +import { resolveUpdateChannel, UPDATE_CHANNEL_ENV_VAR } from '../config/updateChannel.js'; import { getPersonaToken } from '../github/personas.js'; import { getJiraConfig, getLinearConfig, getTrelloConfig } from '../pm/config.js'; import type { AgentInput, ProjectConfig } from '../types/index.js'; @@ -150,6 +151,20 @@ export async function augmentProjectSecrets( projectSecrets.CASCADE_PM_TYPE = project.pm.type; } + // Inject the resolved update channel so the `cascade-tools pm post-comment` + // CLI can enforce the PM-posting gate even when invoked via bash, bypassing + // the in-process filterPostingGadgetNames filter. The orchestrator also writes + // this value to UPDATE_CHANNEL_FILE as a fallback for the claude-code + // subprocess-env-stripping case (see secretOrchestrator.ts). + // + // Scope: `pm post-comment` is the ONLY cascade-tools command that reads this + // var. The SCM posting commands (`scm post-pr-comment`, `update-pr-comment`, + // `reply-to-review-comment`, `create-pr-review`) do NOT gate on it, so the + // symmetric bash bypass still exists on the SCM side for `pm-only`/`none` + // agents. Adding the equivalent SCM CLI gate is a tracked follow-up, out of + // scope for this PM-focused change. + projectSecrets[UPDATE_CHANNEL_ENV_VAR] = resolveUpdateChannel(project, agentType); + return projectSecrets; } diff --git a/src/backends/secretOrchestrator.ts b/src/backends/secretOrchestrator.ts index d70d4a68..13c4e07f 100644 --- a/src/backends/secretOrchestrator.ts +++ b/src/backends/secretOrchestrator.ts @@ -18,7 +18,12 @@ import { REVIEW_EVENT_POLICY_FILE, resolveReviewEventPolicy, } from '../config/reviewEventPolicy.js'; -import { filterPostingGadgetNames, resolveUpdateChannel } from '../config/updateChannel.js'; +import { + filterPostingGadgetNames, + isPmPostingEnabled, + resolveUpdateChannel, + UPDATE_CHANNEL_FILE, +} from '../config/updateChannel.js'; import { loadPartials } from '../db/repositories/partialsRepository.js'; import { withGitHubToken } from '../github/client.js'; import { getSentryIntegrationConfig } from '../sentry/integration.js'; @@ -101,6 +106,14 @@ export async function buildExecutionPlan( resolveReviewEventPolicy(project, agentType), ); + // Resolve the update channel early so the task-prompt template can suppress + // PM-posting instructions when PM posting is disabled. Without this, native-tool + // agents (Codex / Claude Code) read "Use PostComment to post a summary" from the + // task prompt and call `cascade-tools pm post-comment` via bash even though the + // PostComment tool manifest has been filtered out of availableTools. + const updateChannel = resolveUpdateChannel(project, agentType); + promptContext.pmPostingEnabled = isPmPostingEnabled(updateChannel); + // Load DB partials for template include resolution let dbPartials: Map | undefined; try { @@ -169,6 +182,19 @@ export async function buildExecutionPlan( // Non-fatal — env-var mechanism remains the primary path } + // Write the resolved update channel to a well-known file for the same reason: + // cascade-tools posting commands (e.g. `pm post-comment`) must be able to read + // the channel even when CASCADE_UPDATE_CHANNEL is stripped from the bash + // subprocess env by the claude-code binary. Written UNCONDITIONALLY with the + // run's resolved channel (`updateChannel`, resolved above) so the file always + // reflects the current run and self-corrects on /tmp reuse. The CLI's + // env > file > default precedence is unchanged. + try { + writeFileSync(UPDATE_CHANNEL_FILE, updateChannel, 'utf-8'); + } catch { + // Non-fatal — env-var mechanism remains the primary path + } + // Inject pre-seeded progress comment ID so the subprocess finds it at startup injectProgressCommentId( projectSecrets, @@ -224,7 +250,7 @@ export async function buildExecutionPlan( // integration-availability filtering already done by profile.filterTools(): // an enabled channel against an absent tool simply has nothing to drop. const availableTools = profile.filterTools(getToolManifests(), integrationChecker); - const updateChannel = resolveUpdateChannel(project, agentType); + // updateChannel was already resolved above for promptContext injection; reuse it here. const allowedToolNames = new Set( filterPostingGadgetNames( availableTools.map((tool) => tool.name), diff --git a/src/cli/pm/post-comment.ts b/src/cli/pm/post-comment.ts index c0c1339e..51a4a9fa 100644 --- a/src/cli/pm/post-comment.ts +++ b/src/cli/pm/post-comment.ts @@ -1,7 +1,54 @@ +import { readFileSync } from 'node:fs'; +import { + DEFAULT_UPDATE_CHANNEL, + isPmPostingEnabled, + UPDATE_CHANNEL_ENV_VAR, + UPDATE_CHANNEL_FILE, + type UpdateChannel, + UpdateChannelSchema, +} from '../../config/updateChannel.js'; import { postComment } from '../../gadgets/pm/core/postComment.js'; import { postCommentDef } from '../../gadgets/pm/definitions.js'; import { createCLICommand } from '../../gadgets/shared/cliCommandFactory.js'; +/** + * Resolve the update channel for this run. + * + * Checks two sources in order: + * 1. `CASCADE_UPDATE_CHANNEL` env var — injected into the subprocess env dict by + * `augmentProjectSecrets`. May be stripped by the claude subprocess chain. + * 2. Channel file written to `/tmp/cascade-update-channel` by the worker process + * before the agent starts — survives subprocess env filtering. + * + * Absent/invalid in both sources → {@link DEFAULT_UPDATE_CHANNEL} (`both`). This + * mirrors the sibling `create-pr-review` gate (`resolveEventPolicyFromEnv`): the + * env var alone is not trusted under claude-code, which is the default engine and + * is known to drop custom env vars from bash subprocesses (@anthropic-ai/claude-code + * ≤ 2.1.185). Without the file fallback this gate would fail OPEN and post anyway. + */ +function resolveUpdateChannelFromEnv(): UpdateChannel { + const envParsed = UpdateChannelSchema.safeParse(process.env[UPDATE_CHANNEL_ENV_VAR]); + if (envParsed.success) return envParsed.data; + + try { + const fileParsed = UpdateChannelSchema.safeParse( + readFileSync(UPDATE_CHANNEL_FILE, 'utf-8').trim(), + ); + if (fileParsed.success) return fileParsed.data; + } catch { + // File absent or unreadable → default + } + + return DEFAULT_UPDATE_CHANNEL; +} + export default createCLICommand(postCommentDef, async (params) => { + // Honor the update channel injected by the orchestrator. When PM posting is + // disabled (scm-only / none), return a structured skip so the agent sees a + // clear explanation rather than silently posting anyway. + const channel = resolveUpdateChannelFromEnv(); + if (!isPmPostingEnabled(channel)) { + return { skipped: true, reason: `PM posting disabled by update channel (${channel})` }; + } return postComment(params.workItemId as string, params.text as string); }); diff --git a/src/config/updateChannel.ts b/src/config/updateChannel.ts index 24b3feba..97f1ee19 100644 --- a/src/config/updateChannel.ts +++ b/src/config/updateChannel.ts @@ -34,6 +34,28 @@ export const DEFAULT_UPDATE_CHANNEL: UpdateChannel = 'both'; /** Zod enum for validating persisted / API-supplied channel values. */ export const UpdateChannelSchema = z.enum(UPDATE_CHANNELS); +/** + * Worker env var carrying the resolved update channel to `cascade-tools` + * subprocesses (the native-tool engine path). Injected for every run by + * `augmentProjectSecrets` so the CLI gate (e.g. `cascade-tools pm post-comment`) + * can enforce the channel even when a posting command is invoked via bash, + * bypassing the in-process {@link filterPostingGadgetNames} filter. + */ +export const UPDATE_CHANNEL_ENV_VAR = 'CASCADE_UPDATE_CHANNEL'; + +/** + * Channel file written by the worker process before the agent starts. Used as a + * fallback when {@link UPDATE_CHANNEL_ENV_VAR} is stripped by the claude + * subprocess chain (observed with @anthropic-ai/claude-code ≤ 2.1.185 — the + * bun-compiled binary does not forward all custom env vars to bash subprocesses, + * which is exactly why the sibling review-event-policy gate added a file + * fallback too). The path is fixed inside the ephemeral worker container's /tmp, + * so there is no cross-run collision. Written UNCONDITIONALLY with the run's + * resolved channel so the file always reflects the current run and self-corrects + * if a /tmp path is ever reused. + */ +export const UPDATE_CHANNEL_FILE = '/tmp/cascade-update-channel'; + /** * Minimal structural shape that {@link resolveUpdateChannel} reads from a * project. diff --git a/tests/unit/agents/prompts/implementation-pm-posting.test.ts b/tests/unit/agents/prompts/implementation-pm-posting.test.ts new file mode 100644 index 00000000..3cafa977 --- /dev/null +++ b/tests/unit/agents/prompts/implementation-pm-posting.test.ts @@ -0,0 +1,56 @@ +import { beforeAll, describe, expect, it, vi } from 'vitest'; + +// Mock resolveKnownAgentTypes so validTypes is populated without DB +vi.mock('../../../../src/agents/definitions/index.js', () => ({ + resolveKnownAgentTypes: vi.fn().mockResolvedValue(['implementation']), +})); + +import { getSystemPrompt, initPrompts } from '../../../../src/agents/prompts/index.js'; + +beforeAll(async () => { + await initPrompts(); +}); + +/** + * The implementation.eta template forks on `it.pmPostingEnabled` — when the + * project's update channel disables PM posting (scm-only / none) the agent must + * NOT be instructed to post a summary comment on the work item. Otherwise a + * native-tool agent reads the instruction and calls `cascade-tools pm + * post-comment` via bash even though the PostComment tool manifest was filtered + * out of availableTools. Both the Phase-4 task step (step 10) and the dedicated + * "Post Summary Comment" completion section must be suppressed together. + */ +describe('implementation prompt — PM-posting suppression fork', () => { + describe('default render (pmPostingEnabled absent/true)', () => { + for (const context of [undefined, { pmPostingEnabled: true }]) { + const label = context === undefined ? 'absent' : 'true'; + it(`keeps the summary-comment instructions when the flag is ${label}`, () => { + const prompt = getSystemPrompt('implementation', context); + // Step 10 in the Phase-4 task list + expect(prompt).toContain('**Post summary comment**'); + // The dedicated "Post Summary Comment" completion section + expect(prompt).toContain('### 2. Post Summary Comment'); + expect(prompt).toContain('Use `PostComment` to post a summary'); + }); + } + }); + + describe('pm-posting-disabled render (pmPostingEnabled false)', () => { + it('drops the Phase-4 summary-comment step (step 10)', () => { + const prompt = getSystemPrompt('implementation', { pmPostingEnabled: false }); + expect(prompt).not.toContain('**Post summary comment**'); + }); + + it('drops the dedicated Post Summary Comment completion section', () => { + const prompt = getSystemPrompt('implementation', { pmPostingEnabled: false }); + expect(prompt).not.toContain('### 2. Post Summary Comment'); + expect(prompt).not.toContain('Use `PostComment` to post a summary'); + }); + + it('still keeps the non-PM completion steps (PR creation, acceptance criteria)', () => { + const prompt = getSystemPrompt('implementation', { pmPostingEnabled: false }); + expect(prompt).toContain('**Create a PR**'); + expect(prompt).toContain('**Mark acceptance criteria complete**'); + }); + }); +}); diff --git a/tests/unit/backends/adapter.test.ts b/tests/unit/backends/adapter.test.ts index 1a55df66..ec041105 100644 --- a/tests/unit/backends/adapter.test.ts +++ b/tests/unit/backends/adapter.test.ts @@ -761,6 +761,7 @@ describe('executeWithEngine', () => { CASCADE_TRELLO_LABELS: '{}', CASCADE_AGENT_TYPE: 'implementation', CASCADE_PM_TYPE: 'trello', + CASCADE_UPDATE_CHANNEL: 'both', CASCADE_FRICTION_SIDECAR_PATH: expect.stringMatching( /cascade-friction-sidecar-\d+-\d+\.jsonl$/, ), @@ -820,6 +821,7 @@ describe('executeWithEngine', () => { CASCADE_TRELLO_LABELS: '{}', CASCADE_AGENT_TYPE: 'implementation', CASCADE_PM_TYPE: 'trello', + CASCADE_UPDATE_CHANNEL: 'both', CASCADE_FRICTION_SIDECAR_PATH: expect.stringMatching( /cascade-friction-sidecar-\d+-\d+\.jsonl$/, ), diff --git a/tests/unit/backends/secretBuilder.test.ts b/tests/unit/backends/secretBuilder.test.ts index 84b9c26d..49a2a9cc 100644 --- a/tests/unit/backends/secretBuilder.test.ts +++ b/tests/unit/backends/secretBuilder.test.ts @@ -111,6 +111,28 @@ describe('augmentProjectSecrets', () => { expect(secrets.CASCADE_REVIEW_EVENT_POLICY).toBeUndefined(); }); + it('injects CASCADE_UPDATE_CHANNEL with the default channel (both) when none is configured', async () => { + const project = makeProject(); + const secrets = await augmentProjectSecrets(project, 'implementation', {} as AgentInput); + expect(secrets.CASCADE_UPDATE_CHANNEL).toBe('both'); + }); + + it('injects CASCADE_UPDATE_CHANNEL=scm-only when the agent channel disables PM posting', async () => { + const project = makeProject({ agentUpdateChannels: { implementation: 'scm-only' } }); + const secrets = await augmentProjectSecrets(project, 'implementation', {} as AgentInput); + expect(secrets.CASCADE_UPDATE_CHANNEL).toBe('scm-only'); + }); + + it('resolves CASCADE_UPDATE_CHANNEL for the agent type being built', async () => { + // review is disabled but implementation is pm-only — building 'implementation' + // must read the implementation entry, not review's. + const project = makeProject({ + agentUpdateChannels: { review: 'none', implementation: 'pm-only' }, + }); + const secrets = await augmentProjectSecrets(project, 'implementation', {} as AgentInput); + expect(secrets.CASCADE_UPDATE_CHANNEL).toBe('pm-only'); + }); + it('injects work item and PR runtime metadata from agent input', async () => { const project = makeProject(); const secrets = await augmentProjectSecrets(project, 'review', { diff --git a/tests/unit/backends/secretOrchestrator.test.ts b/tests/unit/backends/secretOrchestrator.test.ts index 29143ea4..ee84a0df 100644 --- a/tests/unit/backends/secretOrchestrator.test.ts +++ b/tests/unit/backends/secretOrchestrator.test.ts @@ -84,7 +84,7 @@ import { } from '../../../src/backends/secretOrchestrator.js'; import type { AgentEngine } from '../../../src/backends/types.js'; import { REVIEW_EVENT_POLICY_FILE } from '../../../src/config/reviewEventPolicy.js'; -import type { UpdateChannel } from '../../../src/config/updateChannel.js'; +import { UPDATE_CHANNEL_FILE, type UpdateChannel } from '../../../src/config/updateChannel.js'; import { getSentryIntegrationConfig } from '../../../src/sentry/integration.js'; import type { AgentInput, CascadeConfig, ProjectConfig } from '../../../src/types/index.js'; import { getDashboardUrl } from '../../../src/utils/runLink.js'; @@ -373,6 +373,70 @@ describe('buildExecutionPlan', () => { }); }); + // The task-prompt template (implementation.eta) forks on pmPostingEnabled to + // suppress the summary-comment instructions when PM posting is disabled, so a + // native-tool agent is never told to call `cascade-tools pm post-comment`. + describe('update channel prompt flag', () => { + it('sets promptContext.pmPostingEnabled=true under the default channel (both)', async () => { + mockBuildPromptContext.mockReturnValueOnce({}); + + await buildExecutionPlan( + 'implementation', + makeInput(makeProject(), 'manual'), + '/repo', + noopLogWriter, + noopAgentLogger, + undefined, + false, + 'claude-code', + engine, + ); + + const promptContext = vi.mocked(resolveModelConfig).mock.calls[0][0].promptContext; + expect(promptContext.pmPostingEnabled).toBe(true); + }); + + it('sets promptContext.pmPostingEnabled=false when the channel disables PM posting (scm-only)', async () => { + mockBuildPromptContext.mockReturnValueOnce({}); + const project = makeProject({ agentUpdateChannels: { implementation: 'scm-only' } }); + + await buildExecutionPlan( + 'implementation', + makeInput(project, 'manual'), + '/repo', + noopLogWriter, + noopAgentLogger, + undefined, + false, + 'claude-code', + engine, + ); + + const promptContext = vi.mocked(resolveModelConfig).mock.calls[0][0].promptContext; + expect(promptContext.pmPostingEnabled).toBe(false); + }); + + it('sets promptContext.pmPostingEnabled=false under the none channel', async () => { + mockBuildPromptContext.mockReturnValueOnce({}); + const project = makeProject({ agentUpdateChannels: { implementation: 'none' } }); + + await buildExecutionPlan( + 'implementation', + makeInput(project, 'manual'), + '/repo', + noopLogWriter, + noopAgentLogger, + undefined, + false, + 'claude-code', + engine, + ); + + const promptContext = vi.mocked(resolveModelConfig).mock.calls[0][0].promptContext; + expect(promptContext.pmPostingEnabled).toBe(false); + }); + }); + // The review-event-policy file is written UNCONDITIONALLY with the run's // resolved policy so it self-corrects if a /tmp path is ever reused. The CLI's // env > file > default precedence still holds (see resolveEventPolicyFromEnv). @@ -434,6 +498,68 @@ describe('buildExecutionPlan', () => { }); }); + // The update-channel file is the /tmp fallback the cascade-tools posting CLI + // reads when CASCADE_UPDATE_CHANNEL is stripped from the bash subprocess env by + // claude-code. Written UNCONDITIONALLY with the run's resolved channel — same + // self-correcting contract as the review-event-policy file above. + describe('update channel file write', () => { + it('writes the resolved channel (both) unconditionally under the default', async () => { + await buildExecutionPlan( + 'implementation', + makeInput(makeProject(), 'manual'), + '/repo', + noopLogWriter, + noopAgentLogger, + undefined, + false, + 'claude-code', + engine, + ); + + expect(mockWriteFileSync).toHaveBeenCalledWith(UPDATE_CHANNEL_FILE, 'both', 'utf-8'); + }); + + it('writes the per-agent channel when configured (scm-only)', async () => { + const project = makeProject({ agentUpdateChannels: { implementation: 'scm-only' } }); + + await buildExecutionPlan( + 'implementation', + makeInput(project, 'manual'), + '/repo', + noopLogWriter, + noopAgentLogger, + undefined, + false, + 'claude-code', + engine, + ); + + expect(mockWriteFileSync).toHaveBeenCalledWith(UPDATE_CHANNEL_FILE, 'scm-only', 'utf-8'); + }); + + it('writes the channel for the agent type being built (not another agent)', async () => { + // review is 'none' but implementation is 'both' — building implementation + // must write implementation's channel, not review's. + const project = makeProject({ + agentUpdateChannels: { review: 'none', implementation: 'both' }, + }); + + await buildExecutionPlan( + 'implementation', + makeInput(project, 'manual'), + '/repo', + noopLogWriter, + noopAgentLogger, + undefined, + false, + 'claude-code', + engine, + ); + + expect(mockWriteFileSync).toHaveBeenCalledWith(UPDATE_CHANNEL_FILE, 'both', 'utf-8'); + }); + }); + // MNG-1685: the native-tool engine family (claude-code/codex/opencode) renders // plan.availableTools into the system-prompt tool list, so dropping the disabled // posting tool manifests here is the authoritative gate for that family. diff --git a/tests/unit/cli/pm/pm-commands.test.ts b/tests/unit/cli/pm/pm-commands.test.ts index 5c34f9d9..bbf68107 100644 --- a/tests/unit/cli/pm/pm-commands.test.ts +++ b/tests/unit/cli/pm/pm-commands.test.ts @@ -12,7 +12,11 @@ * - post-comment (basic param-passing) */ -import { afterEach, describe, expect, it, vi } from 'vitest'; +import { rmSync, writeFileSync } from 'node:fs'; + +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; + +import { UPDATE_CHANNEL_FILE } from '../../../../src/config/updateChannel.js'; // --------------------------------------------------------------------------- // Mock credential-scoping dependencies (same as file-input-flags.test.ts) @@ -972,3 +976,145 @@ describe('PM CLI runtime failure envelopes (MNG-1428)', () => { expect(output.error).toEqual({ type: 'runtime', message: 'Provider 404' }); }); }); + +// --------------------------------------------------------------------------- +// post-comment update-channel gate (MNG-1687) +// +// `cascade-tools pm post-comment` must honor the per-agent update channel even +// when invoked via bash — the native-tool prompt-suppression layer only silences +// implementation.eta, so this CLI gate is the engine-wide defense for every +// PM-posting agent. It resolves the channel from CASCADE_UPDATE_CHANNEL, then +// falls back to the /tmp channel file (claude-code drops custom env vars from +// bash subprocesses), then defaults to `both` (post). When PM posting is +// disabled it returns a structured `{ skipped: true, reason }` instead of posting. +// --------------------------------------------------------------------------- +describe('PostComment command — update channel gate', () => { + let originalChannelEnv: string | undefined; + + beforeEach(() => { + originalChannelEnv = process.env.CASCADE_UPDATE_CHANNEL; + Reflect.deleteProperty(process.env, 'CASCADE_UPDATE_CHANNEL'); + try { + rmSync(UPDATE_CHANNEL_FILE, { force: true }); + } catch { + /* no-op */ + } + // Re-establish a resolved implementation (a prior test may have set a reject). + vi.mocked(postComment).mockResolvedValue({ id: 'comment-1' } as never); + }); + + afterEach(() => { + try { + rmSync(UPDATE_CHANNEL_FILE, { force: true }); + } catch { + /* no-op */ + } + if (originalChannelEnv !== undefined) { + process.env.CASCADE_UPDATE_CHANNEL = originalChannelEnv; + } else { + Reflect.deleteProperty(process.env, 'CASCADE_UPDATE_CHANNEL'); + } + }); + + it("posts when the channel is 'both' (env var)", async () => { + process.env.CASCADE_UPDATE_CHANNEL = 'both'; + const cmd = new PostComment( + ['--workItemId', 'card-1', '--text', 'Hi'], + makeMockConfig() as never, + ); + const logSpy = vi.spyOn(cmd, 'log'); + await cmd.run(); + + expect(postComment).toHaveBeenCalledWith('card-1', 'Hi'); + const output = JSON.parse(logSpy.mock.calls[0][0] as string); + expect(output.success).toBe(true); + expect(output.data).toEqual({ id: 'comment-1' }); + }); + + it('posts when no channel is configured (env absent, no file → defaults to both)', async () => { + const cmd = new PostComment( + ['--workItemId', 'card-1', '--text', 'Hi'], + makeMockConfig() as never, + ); + await cmd.run(); + + expect(postComment).toHaveBeenCalledWith('card-1', 'Hi'); + }); + + it("skips (does not post) when the channel is 'scm-only' (env var)", async () => { + process.env.CASCADE_UPDATE_CHANNEL = 'scm-only'; + const cmd = new PostComment( + ['--workItemId', 'card-1', '--text', 'Hi'], + makeMockConfig() as never, + ); + const logSpy = vi.spyOn(cmd, 'log'); + await cmd.run(); + + expect(postComment).not.toHaveBeenCalled(); + const output = JSON.parse(logSpy.mock.calls[0][0] as string); + expect(output.success).toBe(true); + expect(output.data).toEqual({ + skipped: true, + reason: 'PM posting disabled by update channel (scm-only)', + }); + }); + + it("skips when the channel is 'none' (env var)", async () => { + process.env.CASCADE_UPDATE_CHANNEL = 'none'; + const cmd = new PostComment( + ['--workItemId', 'card-1', '--text', 'Hi'], + makeMockConfig() as never, + ); + const logSpy = vi.spyOn(cmd, 'log'); + await cmd.run(); + + expect(postComment).not.toHaveBeenCalled(); + const output = JSON.parse(logSpy.mock.calls[0][0] as string); + expect(output.data).toEqual({ + skipped: true, + reason: 'PM posting disabled by update channel (none)', + }); + }); + + it('falls back to the channel file when the env var is stripped (scm-only)', async () => { + // Simulates the claude-code subprocess dropping CASCADE_UPDATE_CHANNEL: + // the env var is absent, but the orchestrator wrote the /tmp channel file. + writeFileSync(UPDATE_CHANNEL_FILE, 'scm-only', 'utf-8'); + const cmd = new PostComment( + ['--workItemId', 'card-1', '--text', 'Hi'], + makeMockConfig() as never, + ); + const logSpy = vi.spyOn(cmd, 'log'); + await cmd.run(); + + expect(postComment).not.toHaveBeenCalled(); + const output = JSON.parse(logSpy.mock.calls[0][0] as string); + expect(output.data).toEqual({ + skipped: true, + reason: 'PM posting disabled by update channel (scm-only)', + }); + }); + + it('env var wins over the channel file when both are present', async () => { + process.env.CASCADE_UPDATE_CHANNEL = 'both'; + writeFileSync(UPDATE_CHANNEL_FILE, 'scm-only', 'utf-8'); + const cmd = new PostComment( + ['--workItemId', 'card-1', '--text', 'Hi'], + makeMockConfig() as never, + ); + await cmd.run(); + + expect(postComment).toHaveBeenCalledWith('card-1', 'Hi'); + }); + + it('defaults to both (posts) when the channel file holds invalid content', async () => { + writeFileSync(UPDATE_CHANNEL_FILE, 'garbage-not-a-channel', 'utf-8'); + const cmd = new PostComment( + ['--workItemId', 'card-1', '--text', 'Hi'], + makeMockConfig() as never, + ); + await cmd.run(); + + expect(postComment).toHaveBeenCalledWith('card-1', 'Hi'); + }); +});