From 216013b8fb53fd016bdba509aa9dd6b5978fe02d Mon Sep 17 00:00:00 2001 From: sdcoffey Date: Mon, 9 Mar 2026 19:50:07 -0700 Subject: [PATCH] add python toolchain for datamodel-code-generator --- .../app-server-protocol/python/.gitignore | 1 + .../app-server-protocol/python/pyproject.toml | 8 + codex-rs/app-server-protocol/python/uv.lock | 590 + .../codex_app_server_protocol/models.py | 11721 ++++++++------- .../codex_app_server_protocol/v2/models.py | 11829 ++++++++-------- .../app-server-protocol/src/bin/export.rs | 13 +- .../src/bin/write_schema_fixtures.rs | 5 + codex-rs/app-server-protocol/src/export.rs | 138 +- codex-rs/app-server-protocol/src/lib.rs | 2 + .../src/schema_fixtures.rs | 18 +- .../tests/schema_fixtures.rs | 8 + codex-rs/cli/src/main.rs | 12 +- 12 files changed, 12540 insertions(+), 11805 deletions(-) create mode 100644 codex-rs/app-server-protocol/python/.gitignore create mode 100644 codex-rs/app-server-protocol/python/pyproject.toml create mode 100644 codex-rs/app-server-protocol/python/uv.lock diff --git a/codex-rs/app-server-protocol/python/.gitignore b/codex-rs/app-server-protocol/python/.gitignore new file mode 100644 index 0000000000..21d0b898ff --- /dev/null +++ b/codex-rs/app-server-protocol/python/.gitignore @@ -0,0 +1 @@ +.venv/ diff --git a/codex-rs/app-server-protocol/python/pyproject.toml b/codex-rs/app-server-protocol/python/pyproject.toml new file mode 100644 index 0000000000..d7e852eb21 --- /dev/null +++ b/codex-rs/app-server-protocol/python/pyproject.toml @@ -0,0 +1,8 @@ +[project] +name = "codex-app-server-protocol-python-codegen" +version = "0.1.0" +requires-python = ">=3.11" +dependencies = [ + "datamodel-code-generator>=0.54.1", + "ruff>=0.12.0", +] diff --git a/codex-rs/app-server-protocol/python/uv.lock b/codex-rs/app-server-protocol/python/uv.lock new file mode 100644 index 0000000000..ace2c1450c --- /dev/null +++ b/codex-rs/app-server-protocol/python/uv.lock @@ -0,0 +1,590 @@ +version = 1 +revision = 3 +requires-python = ">=3.11" + +[[package]] +name = "annotated-types" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, +] + +[[package]] +name = "argcomplete" +version = "3.6.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/61/0b9ae6399dd4a58d8c1b1dc5a27d6f2808023d0b5dd3104bb99f45a33ff6/argcomplete-3.6.3.tar.gz", hash = "sha256:62e8ed4fd6a45864acc8235409461b72c9a28ee785a2011cc5eb78318786c89c", size = 73754, upload-time = "2025-10-20T03:33:34.741Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/74/f5/9373290775639cb67a2fce7f629a1c240dce9f12fe927bc32b2736e16dfc/argcomplete-3.6.3-py3-none-any.whl", hash = "sha256:f5007b3a600ccac5d25bbce33089211dfd49eab4a7718da3f10e3082525a92ce", size = 43846, upload-time = "2025-10-20T03:33:33.021Z" }, +] + +[[package]] +name = "black" +version = "26.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "mypy-extensions" }, + { name = "packaging" }, + { name = "pathspec" }, + { name = "platformdirs" }, + { name = "pytokens" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/11/5f/25b7b149b8b7d3b958efa4faa56446560408c0f2651108a517526de0320a/black-26.3.0.tar.gz", hash = "sha256:4d438dfdba1c807c6c7c63c4f15794dda0820d2222e7c4105042ac9ddfc5dd0b", size = 664127, upload-time = "2026-03-06T17:42:33.7Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f9/ec/e4db9f2b2db8226ae20d48b589c69fd64477657bf241c8ccaea3bc4feafa/black-26.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3da07abe65732483e915ab7f9c7c50332c293056436e9519373775d62539607c", size = 1851905, upload-time = "2026-03-06T17:46:15.447Z" }, + { url = "https://files.pythonhosted.org/packages/62/2c/ccecfcbd6a0610ecf554e852a146f053eaeb5b281dd9cb634338518c765e/black-26.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fc9fd683ccabc3dc9791b93db494d93b5c6c03b105453b76d71e5474e9dfa6e7", size = 1689299, upload-time = "2026-03-06T17:46:17.396Z" }, + { url = "https://files.pythonhosted.org/packages/1a/53/8dcb860242012d6da9c6b1b930c3e4c947eb42feb1fc70f2a4e7332c90c5/black-26.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e2c7e2c5ee09ff575869258b2c07064c952637918fc5e15f6ebd45e45eae0aa", size = 1753902, upload-time = "2026-03-06T17:46:19.592Z" }, + { url = "https://files.pythonhosted.org/packages/5d/21/f37b3efcc8cf2d01ec9eb5466598aa53bed2292db236723ac4571e24c4de/black-26.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:a849286bfc3054eaeb233b6df9056fcf969ee18bf7ecb71b0257e838a0f05e6d", size = 1413841, upload-time = "2026-03-06T17:46:20.981Z" }, + { url = "https://files.pythonhosted.org/packages/eb/74/e70f5f2a74301d8f10276b90715699d51d7db1c3dd79cf13966d32ba7b18/black-26.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:c93c83af43cda73ed8265d001214779ab245fa7a861a75b3e43828f4fb1f5657", size = 1220105, upload-time = "2026-03-06T17:46:23.269Z" }, + { url = "https://files.pythonhosted.org/packages/1d/76/b21711045b7f4c4f1774048d0b34dd10a265c42255658b251ce3303ae3c7/black-26.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c2b1e5eec220b419e3591a0aaa6351bd3a9c01fe6291fbaf76d84308eb7a2ede", size = 1895944, upload-time = "2026-03-06T17:46:24.841Z" }, + { url = "https://files.pythonhosted.org/packages/f2/c3/8c56e73283326bc92a36101c660228fff09a2403a57a03cacf3f7f84cf62/black-26.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1bab64de70bccc992432bee56cdffbe004ceeaa07352127c386faa87e81f9261", size = 1718669, upload-time = "2026-03-06T17:46:26.639Z" }, + { url = "https://files.pythonhosted.org/packages/7b/8b/712a3ae8f17c1f3cd6f9ac2fffb167a27192f5c7aba68724e8c4ab8474ad/black-26.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5b6c5f734290803b7b26493ffd734b02b72e6c90d82d45ac4d5b862b9bdf7720", size = 1794844, upload-time = "2026-03-06T17:46:28.334Z" }, + { url = "https://files.pythonhosted.org/packages/ba/5b/ee955040e446df86473287dd24dc69c80dd05e02cc358bca90e22059f7b1/black-26.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:7c767396af15b54e1a6aae99ddf241ae97e589f666b1d22c4b6618282a04e4ca", size = 1420461, upload-time = "2026-03-06T17:46:29.965Z" }, + { url = "https://files.pythonhosted.org/packages/12/77/40b8bd44f032bb34c9ebf47ffc5bb47a2520d29e0a4b8a780ab515223b5a/black-26.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:765fd6ddd00f35c55250fdc6b790c272d54ac3f44da719cc42df428269b45980", size = 1229667, upload-time = "2026-03-06T17:46:31.654Z" }, + { url = "https://files.pythonhosted.org/packages/28/c3/21a834ce3de02c64221243f2adac63fa3c3f441efdb3adbf4136b33dfeb0/black-26.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:59754fd8f43ef457be190594c07a52c999e22cb1534dc5344bff1d46fdf1027d", size = 1895195, upload-time = "2026-03-06T17:46:33.12Z" }, + { url = "https://files.pythonhosted.org/packages/1c/f9/212d9697dd78362dadb778d4616b74c8c2cf7f2e4a55aac2adeb0576f2e9/black-26.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1fd94cfee67b8d336761a0b08629a25938e4a491c440951ce517a7209c99b5ff", size = 1718472, upload-time = "2026-03-06T17:46:34.576Z" }, + { url = "https://files.pythonhosted.org/packages/a2/dd/da980b2f512441375b73cb511f38a2c3db4be83ccaa1302b8d39c9fa2dff/black-26.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6f7b3e653a90ca1ef4e821c20f8edaee80b649c38d2532ed2e9073a9534b14a7", size = 1793741, upload-time = "2026-03-06T17:46:36.261Z" }, + { url = "https://files.pythonhosted.org/packages/93/11/cd69ae8826fe3bc6eaf525c8c557266d522b258154a2968eb46d6d25fac7/black-26.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:f8fb9d7c2496adc83614856e1f6e55a9ce4b7ae7fc7f45b46af9189ddb493464", size = 1422522, upload-time = "2026-03-06T17:46:37.607Z" }, + { url = "https://files.pythonhosted.org/packages/75/f5/647cf50255203eb286be197925e86eedc101d5409147505db3e463229228/black-26.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:e8618c1d06838f56afbcb3ffa1aa16436cec62b86b38c7b32ca86f53948ffb91", size = 1231807, upload-time = "2026-03-06T17:46:39.072Z" }, + { url = "https://files.pythonhosted.org/packages/ff/77/b197e701f15fd694d20d8ee0001efa2e29eba917aa7c3610ff7b10ae0f88/black-26.3.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d0c6f64ead44f4369c66f1339ecf68e99b40f2e44253c257f7807c5a3ef0ca32", size = 1889209, upload-time = "2026-03-06T17:46:40.453Z" }, + { url = "https://files.pythonhosted.org/packages/93/85/b4d4924ac898adc2e39fc7a923bed99797535bc16dea4bc63944c3903c2b/black-26.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ed6f0809134e51ec4a7509e069cdfa42bf996bd0fd1df6d3146b907f36e28893", size = 1720830, upload-time = "2026-03-06T17:46:42.009Z" }, + { url = "https://files.pythonhosted.org/packages/00/b1/5c0bf29fe5b43fcc6f3e8480c6566d21a02d4e702b3846944e7daa06dea9/black-26.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc6ac0ea5dd5fa6311ca82edfa3620cba0ed0426022d10d2d5d39aedbf3e1958", size = 1787676, upload-time = "2026-03-06T17:46:43.382Z" }, + { url = "https://files.pythonhosted.org/packages/b8/ce/cc8cf14806c144d6a16512272c537d5450f50675d3e8c038705430e90fd9/black-26.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:884bc0aefa96adabcba0b77b10e9775fd52d4b766e88c44dc6f41f7c82787fc8", size = 1445406, upload-time = "2026-03-06T17:46:44.948Z" }, + { url = "https://files.pythonhosted.org/packages/cf/bb/049ea0fad9f8bdec7b647948adcf74bb720bd71dcb213decd553e05b2699/black-26.3.0-cp314-cp314-win_arm64.whl", hash = "sha256:be3bd02aab5c4ab03703172f5530ddc8fc8b5b7bb8786230e84c9e011cee9ca1", size = 1257945, upload-time = "2026-03-06T17:46:46.432Z" }, + { url = "https://files.pythonhosted.org/packages/39/d7/7360654ba4f8b41afcaeb5aca973cfea5591da75aff79b0a8ae0bb8883f6/black-26.3.0-py3-none-any.whl", hash = "sha256:e825d6b121910dff6f04d7691f826d2449327e8e71c26254c030c4f3d2311985", size = 206848, upload-time = "2026-03-06T17:42:31.133Z" }, +] + +[[package]] +name = "click" +version = "8.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" }, +] + +[[package]] +name = "codex-app-server-protocol-python-codegen" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "datamodel-code-generator" }, + { name = "ruff" }, +] + +[package.metadata] +requires-dist = [ + { name = "datamodel-code-generator", specifier = ">=0.54.1" }, + { name = "ruff", specifier = ">=0.12.0" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "datamodel-code-generator" +version = "0.54.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "argcomplete" }, + { name = "black" }, + { name = "genson" }, + { name = "inflect" }, + { name = "isort" }, + { name = "jinja2" }, + { name = "packaging" }, + { name = "pydantic" }, + { name = "pyyaml" }, + { name = "tomli", marker = "python_full_version < '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/79/4b/6a63ea00c65402576e05e8cc963349ffe58db07d8c8183ab51488dbfb67a/datamodel_code_generator-0.54.1.tar.gz", hash = "sha256:dd9eb7594f94a8b85d7e410f4d997a443cf7a52a1dcc049fae6cf35660f18803", size = 829716, upload-time = "2026-03-04T04:15:02.582Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/ce/8a8aadbb2fb428109949d0f7a42232d1d452dab0b8550f6e8c5843afa93d/datamodel_code_generator-0.54.1-py3-none-any.whl", hash = "sha256:67c59ff2368eb2ec96ba11441bc8957bb68a71459dd37275a78ea90238ad5f01", size = 264344, upload-time = "2026-03-04T04:15:00.721Z" }, +] + +[[package]] +name = "genson" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c5/cf/2303c8ad276dcf5ee2ad6cf69c4338fd86ef0f471a5207b069adf7a393cf/genson-1.3.0.tar.gz", hash = "sha256:e02db9ac2e3fd29e65b5286f7135762e2cd8a986537c075b06fc5f1517308e37", size = 34919, upload-time = "2024-05-15T22:08:49.123Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f8/5c/e226de133afd8bb267ec27eead9ae3d784b95b39a287ed404caab39a5f50/genson-1.3.0-py3-none-any.whl", hash = "sha256:468feccd00274cc7e4c09e84b08704270ba8d95232aa280f65b986139cec67f7", size = 21470, upload-time = "2024-05-15T22:08:47.056Z" }, +] + +[[package]] +name = "inflect" +version = "7.5.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "more-itertools" }, + { name = "typeguard" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/78/c6/943357d44a21fd995723d07ccaddd78023eace03c1846049a2645d4324a3/inflect-7.5.0.tar.gz", hash = "sha256:faf19801c3742ed5a05a8ce388e0d8fe1a07f8d095c82201eb904f5d27ad571f", size = 73751, upload-time = "2024-12-28T17:11:18.897Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/eb/427ed2b20a38a4ee29f24dbe4ae2dafab198674fe9a85e3d6adf9e5f5f41/inflect-7.5.0-py3-none-any.whl", hash = "sha256:2aea70e5e70c35d8350b8097396ec155ffd68def678c7ff97f51aa69c1d92344", size = 35197, upload-time = "2024-12-28T17:11:15.931Z" }, +] + +[[package]] +name = "isort" +version = "8.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ef/7c/ec4ab396d31b3b395e2e999c8f46dec78c5e29209fac49d1f4dace04041d/isort-8.0.1.tar.gz", hash = "sha256:171ac4ff559cdc060bcfff550bc8404a486fee0caab245679c2abe7cb253c78d", size = 769592, upload-time = "2026-02-28T10:08:20.685Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3e/95/c7c34aa53c16353c56d0b802fba48d5f5caa2cdee7958acbcb795c830416/isort-8.0.1-py3-none-any.whl", hash = "sha256:28b89bc70f751b559aeca209e6120393d43fbe2490de0559662be7a9787e3d75", size = 89733, upload-time = "2026-02-28T10:08:19.466Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, + { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, + { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, + { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" }, + { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" }, + { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" }, + { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" }, + { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" }, + { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" }, + { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" }, + { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" }, + { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, + { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, + { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, + { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, + { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, + { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, + { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, + { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, + { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, + { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, + { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, + { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, + { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, + { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, + { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, + { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, + { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, + { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, + { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, + { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, + { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, + { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, + { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, + { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, + { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, + { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, + { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, + { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, + { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, + { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, + { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, + { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" }, + { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" }, + { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" }, + { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" }, + { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" }, + { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" }, + { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" }, + { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" }, + { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" }, + { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" }, + { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" }, + { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" }, + { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" }, + { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" }, + { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" }, + { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" }, + { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" }, + { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" }, + { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" }, + { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, +] + +[[package]] +name = "more-itertools" +version = "10.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz", hash = "sha256:f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd", size = 137431, upload-time = "2025-09-02T15:23:11.018Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a4/8e/469e5a4a2f5855992e425f3cb33804cc07bf18d48f2db061aec61ce50270/more_itertools-10.8.0-py3-none-any.whl", hash = "sha256:52d4362373dcf7c52546bc4af9a86ee7c4579df9a8dc268be0a2f949d376cc9b", size = 69667, upload-time = "2025-09-02T15:23:09.635Z" }, +] + +[[package]] +name = "mypy-extensions" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, +] + +[[package]] +name = "packaging" +version = "26.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4", size = 143416, upload-time = "2026-01-21T20:50:39.064Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, +] + +[[package]] +name = "pathspec" +version = "1.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200, upload-time = "2026-01-27T03:59:46.938Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" }, +] + +[[package]] +name = "platformdirs" +version = "4.9.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/19/56/8d4c30c8a1d07013911a8fdbd8f89440ef9f08d07a1b50ab8ca8be5a20f9/platformdirs-4.9.4.tar.gz", hash = "sha256:1ec356301b7dc906d83f371c8f487070e99d3ccf9e501686456394622a01a934", size = 28737, upload-time = "2026-03-05T18:34:13.271Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/63/d7/97f7e3a6abb67d8080dd406fd4df842c2be0efaf712d1c899c32a075027c/platformdirs-4.9.4-py3-none-any.whl", hash = "sha256:68a9a4619a666ea6439f2ff250c12a853cd1cbd5158d258bd824a7df6be2f868", size = 21216, upload-time = "2026-03-05T18:34:12.172Z" }, +] + +[[package]] +name = "pydantic" +version = "2.12.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-types" }, + { name = "pydantic-core" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" }, +] + +[[package]] +name = "pydantic-core" +version = "2.41.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e8/72/74a989dd9f2084b3d9530b0915fdda64ac48831c30dbf7c72a41a5232db8/pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6", size = 2105873, upload-time = "2025-11-04T13:39:31.373Z" }, + { url = "https://files.pythonhosted.org/packages/12/44/37e403fd9455708b3b942949e1d7febc02167662bf1a7da5b78ee1ea2842/pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b", size = 1899826, upload-time = "2025-11-04T13:39:32.897Z" }, + { url = "https://files.pythonhosted.org/packages/33/7f/1d5cab3ccf44c1935a359d51a8a2a9e1a654b744b5e7f80d41b88d501eec/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a", size = 1917869, upload-time = "2025-11-04T13:39:34.469Z" }, + { url = "https://files.pythonhosted.org/packages/6e/6a/30d94a9674a7fe4f4744052ed6c5e083424510be1e93da5bc47569d11810/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8", size = 2063890, upload-time = "2025-11-04T13:39:36.053Z" }, + { url = "https://files.pythonhosted.org/packages/50/be/76e5d46203fcb2750e542f32e6c371ffa9b8ad17364cf94bb0818dbfb50c/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e", size = 2229740, upload-time = "2025-11-04T13:39:37.753Z" }, + { url = "https://files.pythonhosted.org/packages/d3/ee/fed784df0144793489f87db310a6bbf8118d7b630ed07aa180d6067e653a/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1", size = 2350021, upload-time = "2025-11-04T13:39:40.94Z" }, + { url = "https://files.pythonhosted.org/packages/c8/be/8fed28dd0a180dca19e72c233cbf58efa36df055e5b9d90d64fd1740b828/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b", size = 2066378, upload-time = "2025-11-04T13:39:42.523Z" }, + { url = "https://files.pythonhosted.org/packages/b0/3b/698cf8ae1d536a010e05121b4958b1257f0b5522085e335360e53a6b1c8b/pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b", size = 2175761, upload-time = "2025-11-04T13:39:44.553Z" }, + { url = "https://files.pythonhosted.org/packages/b8/ba/15d537423939553116dea94ce02f9c31be0fa9d0b806d427e0308ec17145/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284", size = 2146303, upload-time = "2025-11-04T13:39:46.238Z" }, + { url = "https://files.pythonhosted.org/packages/58/7f/0de669bf37d206723795f9c90c82966726a2ab06c336deba4735b55af431/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594", size = 2340355, upload-time = "2025-11-04T13:39:48.002Z" }, + { url = "https://files.pythonhosted.org/packages/e5/de/e7482c435b83d7e3c3ee5ee4451f6e8973cff0eb6007d2872ce6383f6398/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e", size = 2319875, upload-time = "2025-11-04T13:39:49.705Z" }, + { url = "https://files.pythonhosted.org/packages/fe/e6/8c9e81bb6dd7560e33b9053351c29f30c8194b72f2d6932888581f503482/pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b", size = 1987549, upload-time = "2025-11-04T13:39:51.842Z" }, + { url = "https://files.pythonhosted.org/packages/11/66/f14d1d978ea94d1bc21fc98fcf570f9542fe55bfcc40269d4e1a21c19bf7/pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe", size = 2011305, upload-time = "2025-11-04T13:39:53.485Z" }, + { url = "https://files.pythonhosted.org/packages/56/d8/0e271434e8efd03186c5386671328154ee349ff0354d83c74f5caaf096ed/pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f", size = 1972902, upload-time = "2025-11-04T13:39:56.488Z" }, + { url = "https://files.pythonhosted.org/packages/5f/5d/5f6c63eebb5afee93bcaae4ce9a898f3373ca23df3ccaef086d0233a35a7/pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7", size = 2110990, upload-time = "2025-11-04T13:39:58.079Z" }, + { url = "https://files.pythonhosted.org/packages/aa/32/9c2e8ccb57c01111e0fd091f236c7b371c1bccea0fa85247ac55b1e2b6b6/pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0", size = 1896003, upload-time = "2025-11-04T13:39:59.956Z" }, + { url = "https://files.pythonhosted.org/packages/68/b8/a01b53cb0e59139fbc9e4fda3e9724ede8de279097179be4ff31f1abb65a/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69", size = 1919200, upload-time = "2025-11-04T13:40:02.241Z" }, + { url = "https://files.pythonhosted.org/packages/38/de/8c36b5198a29bdaade07b5985e80a233a5ac27137846f3bc2d3b40a47360/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75", size = 2052578, upload-time = "2025-11-04T13:40:04.401Z" }, + { url = "https://files.pythonhosted.org/packages/00/b5/0e8e4b5b081eac6cb3dbb7e60a65907549a1ce035a724368c330112adfdd/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05", size = 2208504, upload-time = "2025-11-04T13:40:06.072Z" }, + { url = "https://files.pythonhosted.org/packages/77/56/87a61aad59c7c5b9dc8caad5a41a5545cba3810c3e828708b3d7404f6cef/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc", size = 2335816, upload-time = "2025-11-04T13:40:07.835Z" }, + { url = "https://files.pythonhosted.org/packages/0d/76/941cc9f73529988688a665a5c0ecff1112b3d95ab48f81db5f7606f522d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c", size = 2075366, upload-time = "2025-11-04T13:40:09.804Z" }, + { url = "https://files.pythonhosted.org/packages/d3/43/ebef01f69baa07a482844faaa0a591bad1ef129253ffd0cdaa9d8a7f72d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5", size = 2171698, upload-time = "2025-11-04T13:40:12.004Z" }, + { url = "https://files.pythonhosted.org/packages/b1/87/41f3202e4193e3bacfc2c065fab7706ebe81af46a83d3e27605029c1f5a6/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c", size = 2132603, upload-time = "2025-11-04T13:40:13.868Z" }, + { url = "https://files.pythonhosted.org/packages/49/7d/4c00df99cb12070b6bccdef4a195255e6020a550d572768d92cc54dba91a/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294", size = 2329591, upload-time = "2025-11-04T13:40:15.672Z" }, + { url = "https://files.pythonhosted.org/packages/cc/6a/ebf4b1d65d458f3cda6a7335d141305dfa19bdc61140a884d165a8a1bbc7/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1", size = 2319068, upload-time = "2025-11-04T13:40:17.532Z" }, + { url = "https://files.pythonhosted.org/packages/49/3b/774f2b5cd4192d5ab75870ce4381fd89cf218af999515baf07e7206753f0/pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d", size = 1985908, upload-time = "2025-11-04T13:40:19.309Z" }, + { url = "https://files.pythonhosted.org/packages/86/45/00173a033c801cacf67c190fef088789394feaf88a98a7035b0e40d53dc9/pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815", size = 2020145, upload-time = "2025-11-04T13:40:21.548Z" }, + { url = "https://files.pythonhosted.org/packages/f9/22/91fbc821fa6d261b376a3f73809f907cec5ca6025642c463d3488aad22fb/pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3", size = 1976179, upload-time = "2025-11-04T13:40:23.393Z" }, + { url = "https://files.pythonhosted.org/packages/87/06/8806241ff1f70d9939f9af039c6c35f2360cf16e93c2ca76f184e76b1564/pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9", size = 2120403, upload-time = "2025-11-04T13:40:25.248Z" }, + { url = "https://files.pythonhosted.org/packages/94/02/abfa0e0bda67faa65fef1c84971c7e45928e108fe24333c81f3bfe35d5f5/pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34", size = 1896206, upload-time = "2025-11-04T13:40:27.099Z" }, + { url = "https://files.pythonhosted.org/packages/15/df/a4c740c0943e93e6500f9eb23f4ca7ec9bf71b19e608ae5b579678c8d02f/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0", size = 1919307, upload-time = "2025-11-04T13:40:29.806Z" }, + { url = "https://files.pythonhosted.org/packages/9a/e3/6324802931ae1d123528988e0e86587c2072ac2e5394b4bc2bc34b61ff6e/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33", size = 2063258, upload-time = "2025-11-04T13:40:33.544Z" }, + { url = "https://files.pythonhosted.org/packages/c9/d4/2230d7151d4957dd79c3044ea26346c148c98fbf0ee6ebd41056f2d62ab5/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e", size = 2214917, upload-time = "2025-11-04T13:40:35.479Z" }, + { url = "https://files.pythonhosted.org/packages/e6/9f/eaac5df17a3672fef0081b6c1bb0b82b33ee89aa5cec0d7b05f52fd4a1fa/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2", size = 2332186, upload-time = "2025-11-04T13:40:37.436Z" }, + { url = "https://files.pythonhosted.org/packages/cf/4e/35a80cae583a37cf15604b44240e45c05e04e86f9cfd766623149297e971/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586", size = 2073164, upload-time = "2025-11-04T13:40:40.289Z" }, + { url = "https://files.pythonhosted.org/packages/bf/e3/f6e262673c6140dd3305d144d032f7bd5f7497d3871c1428521f19f9efa2/pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d", size = 2179146, upload-time = "2025-11-04T13:40:42.809Z" }, + { url = "https://files.pythonhosted.org/packages/75/c7/20bd7fc05f0c6ea2056a4565c6f36f8968c0924f19b7d97bbfea55780e73/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740", size = 2137788, upload-time = "2025-11-04T13:40:44.752Z" }, + { url = "https://files.pythonhosted.org/packages/3a/8d/34318ef985c45196e004bc46c6eab2eda437e744c124ef0dbe1ff2c9d06b/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e", size = 2340133, upload-time = "2025-11-04T13:40:46.66Z" }, + { url = "https://files.pythonhosted.org/packages/9c/59/013626bf8c78a5a5d9350d12e7697d3d4de951a75565496abd40ccd46bee/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858", size = 2324852, upload-time = "2025-11-04T13:40:48.575Z" }, + { url = "https://files.pythonhosted.org/packages/1a/d9/c248c103856f807ef70c18a4f986693a46a8ffe1602e5d361485da502d20/pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36", size = 1994679, upload-time = "2025-11-04T13:40:50.619Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8b/341991b158ddab181cff136acd2552c9f35bd30380422a639c0671e99a91/pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11", size = 2019766, upload-time = "2025-11-04T13:40:52.631Z" }, + { url = "https://files.pythonhosted.org/packages/73/7d/f2f9db34af103bea3e09735bb40b021788a5e834c81eedb541991badf8f5/pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd", size = 1981005, upload-time = "2025-11-04T13:40:54.734Z" }, + { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622, upload-time = "2025-11-04T13:40:56.68Z" }, + { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725, upload-time = "2025-11-04T13:40:58.807Z" }, + { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040, upload-time = "2025-11-04T13:41:00.853Z" }, + { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691, upload-time = "2025-11-04T13:41:03.504Z" }, + { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897, upload-time = "2025-11-04T13:41:05.804Z" }, + { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302, upload-time = "2025-11-04T13:41:07.809Z" }, + { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877, upload-time = "2025-11-04T13:41:09.827Z" }, + { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680, upload-time = "2025-11-04T13:41:12.379Z" }, + { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960, upload-time = "2025-11-04T13:41:14.627Z" }, + { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102, upload-time = "2025-11-04T13:41:16.868Z" }, + { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039, upload-time = "2025-11-04T13:41:18.934Z" }, + { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126, upload-time = "2025-11-04T13:41:21.418Z" }, + { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489, upload-time = "2025-11-04T13:41:24.076Z" }, + { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288, upload-time = "2025-11-04T13:41:26.33Z" }, + { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255, upload-time = "2025-11-04T13:41:28.569Z" }, + { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760, upload-time = "2025-11-04T13:41:31.055Z" }, + { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092, upload-time = "2025-11-04T13:41:33.21Z" }, + { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385, upload-time = "2025-11-04T13:41:35.508Z" }, + { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832, upload-time = "2025-11-04T13:41:37.732Z" }, + { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585, upload-time = "2025-11-04T13:41:40Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078, upload-time = "2025-11-04T13:41:42.323Z" }, + { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914, upload-time = "2025-11-04T13:41:45.221Z" }, + { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560, upload-time = "2025-11-04T13:41:47.474Z" }, + { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244, upload-time = "2025-11-04T13:41:49.992Z" }, + { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955, upload-time = "2025-11-04T13:41:54.079Z" }, + { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, + { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, + { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, + { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" }, + { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" }, + { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" }, + { url = "https://files.pythonhosted.org/packages/2e/1b/687711069de7efa6af934e74f601e2a4307365e8fdc404703afc453eab26/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad", size = 2138905, upload-time = "2025-11-04T13:42:47.156Z" }, + { url = "https://files.pythonhosted.org/packages/09/32/59b0c7e63e277fa7911c2fc70ccfb45ce4b98991e7ef37110663437005af/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd", size = 2110495, upload-time = "2025-11-04T13:42:49.689Z" }, + { url = "https://files.pythonhosted.org/packages/aa/81/05e400037eaf55ad400bcd318c05bb345b57e708887f07ddb2d20e3f0e98/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc", size = 1915388, upload-time = "2025-11-04T13:42:52.215Z" }, + { url = "https://files.pythonhosted.org/packages/6e/0d/e3549b2399f71d56476b77dbf3cf8937cec5cd70536bdc0e374a421d0599/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56", size = 1942879, upload-time = "2025-11-04T13:42:56.483Z" }, + { url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" }, + { url = "https://files.pythonhosted.org/packages/5f/9b/1b3f0e9f9305839d7e84912f9e8bfbd191ed1b1ef48083609f0dabde978c/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26", size = 2101980, upload-time = "2025-11-04T13:43:25.97Z" }, + { url = "https://files.pythonhosted.org/packages/a4/ed/d71fefcb4263df0da6a85b5d8a7508360f2f2e9b3bf5814be9c8bccdccc1/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808", size = 1923865, upload-time = "2025-11-04T13:43:28.763Z" }, + { url = "https://files.pythonhosted.org/packages/ce/3a/626b38db460d675f873e4444b4bb030453bbe7b4ba55df821d026a0493c4/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc", size = 2134256, upload-time = "2025-11-04T13:43:31.71Z" }, + { url = "https://files.pythonhosted.org/packages/83/d9/8412d7f06f616bbc053d30cb4e5f76786af3221462ad5eee1f202021eb4e/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1", size = 2174762, upload-time = "2025-11-04T13:43:34.744Z" }, + { url = "https://files.pythonhosted.org/packages/55/4c/162d906b8e3ba3a99354e20faa1b49a85206c47de97a639510a0e673f5da/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84", size = 2143141, upload-time = "2025-11-04T13:43:37.701Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f2/f11dd73284122713f5f89fc940f370d035fa8e1e078d446b3313955157fe/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770", size = 2330317, upload-time = "2025-11-04T13:43:40.406Z" }, + { url = "https://files.pythonhosted.org/packages/88/9d/b06ca6acfe4abb296110fb1273a4d848a0bfb2ff65f3ee92127b3244e16b/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f", size = 2316992, upload-time = "2025-11-04T13:43:43.602Z" }, + { url = "https://files.pythonhosted.org/packages/36/c7/cfc8e811f061c841d7990b0201912c3556bfeb99cdcb7ed24adc8d6f8704/pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51", size = 2145302, upload-time = "2025-11-04T13:43:46.64Z" }, +] + +[[package]] +name = "pytokens" +version = "0.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b6/34/b4e015b99031667a7b960f888889c5bd34ef585c85e1cb56a594b92836ac/pytokens-0.4.1.tar.gz", hash = "sha256:292052fe80923aae2260c073f822ceba21f3872ced9a68bb7953b348e561179a", size = 23015, upload-time = "2026-01-30T01:03:45.924Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3d/92/790ebe03f07b57e53b10884c329b9a1a308648fc083a6d4a39a10a28c8fc/pytokens-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d70e77c55ae8380c91c0c18dea05951482e263982911fc7410b1ffd1dadd3440", size = 160864, upload-time = "2026-01-30T01:02:57.882Z" }, + { url = "https://files.pythonhosted.org/packages/13/25/a4f555281d975bfdd1eba731450e2fe3a95870274da73fb12c40aeae7625/pytokens-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a58d057208cb9075c144950d789511220b07636dd2e4708d5645d24de666bdc", size = 248565, upload-time = "2026-01-30T01:02:59.912Z" }, + { url = "https://files.pythonhosted.org/packages/17/50/bc0394b4ad5b1601be22fa43652173d47e4c9efbf0044c62e9a59b747c56/pytokens-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b49750419d300e2b5a3813cf229d4e5a4c728dae470bcc89867a9ad6f25a722d", size = 260824, upload-time = "2026-01-30T01:03:01.471Z" }, + { url = "https://files.pythonhosted.org/packages/4e/54/3e04f9d92a4be4fc6c80016bc396b923d2a6933ae94b5f557c939c460ee0/pytokens-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9907d61f15bf7261d7e775bd5d7ee4d2930e04424bab1972591918497623a16", size = 264075, upload-time = "2026-01-30T01:03:04.143Z" }, + { url = "https://files.pythonhosted.org/packages/d1/1b/44b0326cb5470a4375f37988aea5d61b5cc52407143303015ebee94abfd6/pytokens-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:ee44d0f85b803321710f9239f335aafe16553b39106384cef8e6de40cb4ef2f6", size = 103323, upload-time = "2026-01-30T01:03:05.412Z" }, + { url = "https://files.pythonhosted.org/packages/41/5d/e44573011401fb82e9d51e97f1290ceb377800fb4eed650b96f4753b499c/pytokens-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:140709331e846b728475786df8aeb27d24f48cbcf7bcd449f8de75cae7a45083", size = 160663, upload-time = "2026-01-30T01:03:06.473Z" }, + { url = "https://files.pythonhosted.org/packages/f0/e6/5bbc3019f8e6f21d09c41f8b8654536117e5e211a85d89212d59cbdab381/pytokens-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d6c4268598f762bc8e91f5dbf2ab2f61f7b95bdc07953b602db879b3c8c18e1", size = 255626, upload-time = "2026-01-30T01:03:08.177Z" }, + { url = "https://files.pythonhosted.org/packages/bf/3c/2d5297d82286f6f3d92770289fd439956b201c0a4fc7e72efb9b2293758e/pytokens-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:24afde1f53d95348b5a0eb19488661147285ca4dd7ed752bbc3e1c6242a304d1", size = 269779, upload-time = "2026-01-30T01:03:09.756Z" }, + { url = "https://files.pythonhosted.org/packages/20/01/7436e9ad693cebda0551203e0bf28f7669976c60ad07d6402098208476de/pytokens-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5ad948d085ed6c16413eb5fec6b3e02fa00dc29a2534f088d3302c47eb59adf9", size = 268076, upload-time = "2026-01-30T01:03:10.957Z" }, + { url = "https://files.pythonhosted.org/packages/2e/df/533c82a3c752ba13ae7ef238b7f8cdd272cf1475f03c63ac6cf3fcfb00b6/pytokens-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:3f901fe783e06e48e8cbdc82d631fca8f118333798193e026a50ce1b3757ea68", size = 103552, upload-time = "2026-01-30T01:03:12.066Z" }, + { url = "https://files.pythonhosted.org/packages/cb/dc/08b1a080372afda3cceb4f3c0a7ba2bde9d6a5241f1edb02a22a019ee147/pytokens-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8bdb9d0ce90cbf99c525e75a2fa415144fd570a1ba987380190e8b786bc6ef9b", size = 160720, upload-time = "2026-01-30T01:03:13.843Z" }, + { url = "https://files.pythonhosted.org/packages/64/0c/41ea22205da480837a700e395507e6a24425151dfb7ead73343d6e2d7ffe/pytokens-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5502408cab1cb18e128570f8d598981c68a50d0cbd7c61312a90507cd3a1276f", size = 254204, upload-time = "2026-01-30T01:03:14.886Z" }, + { url = "https://files.pythonhosted.org/packages/e0/d2/afe5c7f8607018beb99971489dbb846508f1b8f351fcefc225fcf4b2adc0/pytokens-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:29d1d8fb1030af4d231789959f21821ab6325e463f0503a61d204343c9b355d1", size = 268423, upload-time = "2026-01-30T01:03:15.936Z" }, + { url = "https://files.pythonhosted.org/packages/68/d4/00ffdbd370410c04e9591da9220a68dc1693ef7499173eb3e30d06e05ed1/pytokens-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:970b08dd6b86058b6dc07efe9e98414f5102974716232d10f32ff39701e841c4", size = 266859, upload-time = "2026-01-30T01:03:17.458Z" }, + { url = "https://files.pythonhosted.org/packages/a7/c9/c3161313b4ca0c601eeefabd3d3b576edaa9afdefd32da97210700e47652/pytokens-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:9bd7d7f544d362576be74f9d5901a22f317efc20046efe2034dced238cbbfe78", size = 103520, upload-time = "2026-01-30T01:03:18.652Z" }, + { url = "https://files.pythonhosted.org/packages/8f/a7/b470f672e6fc5fee0a01d9e75005a0e617e162381974213a945fcd274843/pytokens-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4a14d5f5fc78ce85e426aa159489e2d5961acf0e47575e08f35584009178e321", size = 160821, upload-time = "2026-01-30T01:03:19.684Z" }, + { url = "https://files.pythonhosted.org/packages/80/98/e83a36fe8d170c911f864bfded690d2542bfcfacb9c649d11a9e6eb9dc41/pytokens-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97f50fd18543be72da51dd505e2ed20d2228c74e0464e4262e4899797803d7fa", size = 254263, upload-time = "2026-01-30T01:03:20.834Z" }, + { url = "https://files.pythonhosted.org/packages/0f/95/70d7041273890f9f97a24234c00b746e8da86df462620194cef1d411ddeb/pytokens-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dc74c035f9bfca0255c1af77ddd2d6ae8419012805453e4b0e7513e17904545d", size = 268071, upload-time = "2026-01-30T01:03:21.888Z" }, + { url = "https://files.pythonhosted.org/packages/da/79/76e6d09ae19c99404656d7db9c35dfd20f2086f3eb6ecb496b5b31163bad/pytokens-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f66a6bbe741bd431f6d741e617e0f39ec7257ca1f89089593479347cc4d13324", size = 271716, upload-time = "2026-01-30T01:03:23.633Z" }, + { url = "https://files.pythonhosted.org/packages/79/37/482e55fa1602e0a7ff012661d8c946bafdc05e480ea5a32f4f7e336d4aa9/pytokens-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:b35d7e5ad269804f6697727702da3c517bb8a5228afa450ab0fa787732055fc9", size = 104539, upload-time = "2026-01-30T01:03:24.788Z" }, + { url = "https://files.pythonhosted.org/packages/30/e8/20e7db907c23f3d63b0be3b8a4fd1927f6da2395f5bcc7f72242bb963dfe/pytokens-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:8fcb9ba3709ff77e77f1c7022ff11d13553f3c30299a9fe246a166903e9091eb", size = 168474, upload-time = "2026-01-30T01:03:26.428Z" }, + { url = "https://files.pythonhosted.org/packages/d6/81/88a95ee9fafdd8f5f3452107748fd04c24930d500b9aba9738f3ade642cc/pytokens-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:79fc6b8699564e1f9b521582c35435f1bd32dd06822322ec44afdeba666d8cb3", size = 290473, upload-time = "2026-01-30T01:03:27.415Z" }, + { url = "https://files.pythonhosted.org/packages/cf/35/3aa899645e29b6375b4aed9f8d21df219e7c958c4c186b465e42ee0a06bf/pytokens-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d31b97b3de0f61571a124a00ffe9a81fb9939146c122c11060725bd5aea79975", size = 303485, upload-time = "2026-01-30T01:03:28.558Z" }, + { url = "https://files.pythonhosted.org/packages/52/a0/07907b6ff512674d9b201859f7d212298c44933633c946703a20c25e9d81/pytokens-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:967cf6e3fd4adf7de8fc73cd3043754ae79c36475c1c11d514fc72cf5490094a", size = 306698, upload-time = "2026-01-30T01:03:29.653Z" }, + { url = "https://files.pythonhosted.org/packages/39/2a/cbbf9250020a4a8dd53ba83a46c097b69e5eb49dd14e708f496f548c6612/pytokens-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:584c80c24b078eec1e227079d56dc22ff755e0ba8654d8383b2c549107528918", size = 116287, upload-time = "2026-01-30T01:03:30.912Z" }, + { url = "https://files.pythonhosted.org/packages/c6/78/397db326746f0a342855b81216ae1f0a32965deccfd7c830a2dbc66d2483/pytokens-0.4.1-py3-none-any.whl", hash = "sha256:26cef14744a8385f35d0e095dc8b3a7583f6c953c2e3d269c7f82484bf5ad2de", size = 13729, upload-time = "2026-01-30T01:03:45.029Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, +] + +[[package]] +name = "ruff" +version = "0.15.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/77/9b/840e0039e65fcf12758adf684d2289024d6140cde9268cc59887dc55189c/ruff-0.15.5.tar.gz", hash = "sha256:7c3601d3b6d76dce18c5c824fc8d06f4eef33d6df0c21ec7799510cde0f159a2", size = 4574214, upload-time = "2026-03-05T20:06:34.946Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/47/20/5369c3ce21588c708bcbe517a8fbe1a8dfdb5dfd5137e14790b1da71612c/ruff-0.15.5-py3-none-linux_armv6l.whl", hash = "sha256:4ae44c42281f42e3b06b988e442d344a5b9b72450ff3c892e30d11b29a96a57c", size = 10478185, upload-time = "2026-03-05T20:06:29.093Z" }, + { url = "https://files.pythonhosted.org/packages/44/ed/e81dd668547da281e5dce710cf0bc60193f8d3d43833e8241d006720e42b/ruff-0.15.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6edd3792d408ebcf61adabc01822da687579a1a023f297618ac27a5b51ef0080", size = 10859201, upload-time = "2026-03-05T20:06:32.632Z" }, + { url = "https://files.pythonhosted.org/packages/c4/8f/533075f00aaf19b07c5cd6aa6e5d89424b06b3b3f4583bfa9c640a079059/ruff-0.15.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:89f463f7c8205a9f8dea9d658d59eff49db05f88f89cc3047fb1a02d9f344010", size = 10184752, upload-time = "2026-03-05T20:06:40.312Z" }, + { url = "https://files.pythonhosted.org/packages/66/0e/ba49e2c3fa0395b3152bad634c7432f7edfc509c133b8f4529053ff024fb/ruff-0.15.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba786a8295c6574c1116704cf0b9e6563de3432ac888d8f83685654fe528fd65", size = 10534857, upload-time = "2026-03-05T20:06:19.581Z" }, + { url = "https://files.pythonhosted.org/packages/59/71/39234440f27a226475a0659561adb0d784b4d247dfe7f43ffc12dd02e288/ruff-0.15.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fd4b801e57955fe9f02b31d20375ab3a5c4415f2e5105b79fb94cf2642c91440", size = 10309120, upload-time = "2026-03-05T20:06:00.435Z" }, + { url = "https://files.pythonhosted.org/packages/f5/87/4140aa86a93df032156982b726f4952aaec4a883bb98cb6ef73c347da253/ruff-0.15.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:391f7c73388f3d8c11b794dbbc2959a5b5afe66642c142a6effa90b45f6f5204", size = 11047428, upload-time = "2026-03-05T20:05:51.867Z" }, + { url = "https://files.pythonhosted.org/packages/5a/f7/4953e7e3287676f78fbe85e3a0ca414c5ca81237b7575bdadc00229ac240/ruff-0.15.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8dc18f30302e379fe1e998548b0f5e9f4dff907f52f73ad6da419ea9c19d66c8", size = 11914251, upload-time = "2026-03-05T20:06:22.887Z" }, + { url = "https://files.pythonhosted.org/packages/77/46/0f7c865c10cf896ccf5a939c3e84e1cfaeed608ff5249584799a74d33835/ruff-0.15.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1cc6e7f90087e2d27f98dc34ed1b3ab7c8f0d273cc5431415454e22c0bd2a681", size = 11333801, upload-time = "2026-03-05T20:05:57.168Z" }, + { url = "https://files.pythonhosted.org/packages/d3/01/a10fe54b653061585e655f5286c2662ebddb68831ed3eaebfb0eb08c0a16/ruff-0.15.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1cb7169f53c1ddb06e71a9aebd7e98fc0fea936b39afb36d8e86d36ecc2636a", size = 11206821, upload-time = "2026-03-05T20:06:03.441Z" }, + { url = "https://files.pythonhosted.org/packages/7a/0d/2132ceaf20c5e8699aa83da2706ecb5c5dcdf78b453f77edca7fb70f8a93/ruff-0.15.5-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:9b037924500a31ee17389b5c8c4d88874cc6ea8e42f12e9c61a3d754ff72f1ca", size = 11133326, upload-time = "2026-03-05T20:06:25.655Z" }, + { url = "https://files.pythonhosted.org/packages/72/cb/2e5259a7eb2a0f87c08c0fe5bf5825a1e4b90883a52685524596bfc93072/ruff-0.15.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:65bb414e5b4eadd95a8c1e4804f6772bbe8995889f203a01f77ddf2d790929dd", size = 10510820, upload-time = "2026-03-05T20:06:37.79Z" }, + { url = "https://files.pythonhosted.org/packages/ff/20/b67ce78f9e6c59ffbdb5b4503d0090e749b5f2d31b599b554698a80d861c/ruff-0.15.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d20aa469ae3b57033519c559e9bc9cd9e782842e39be05b50e852c7c981fa01d", size = 10302395, upload-time = "2026-03-05T20:05:54.504Z" }, + { url = "https://files.pythonhosted.org/packages/5f/e5/719f1acccd31b720d477751558ed74e9c88134adcc377e5e886af89d3072/ruff-0.15.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:15388dd28c9161cdb8eda68993533acc870aa4e646a0a277aa166de9ad5a8752", size = 10754069, upload-time = "2026-03-05T20:06:06.422Z" }, + { url = "https://files.pythonhosted.org/packages/c3/9c/d1db14469e32d98f3ca27079dbd30b7b44dbb5317d06ab36718dee3baf03/ruff-0.15.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b30da330cbd03bed0c21420b6b953158f60c74c54c5f4c1dabbdf3a57bf355d2", size = 11304315, upload-time = "2026-03-05T20:06:10.867Z" }, + { url = "https://files.pythonhosted.org/packages/28/3a/950367aee7c69027f4f422059227b290ed780366b6aecee5de5039d50fa8/ruff-0.15.5-py3-none-win32.whl", hash = "sha256:732e5ee1f98ba5b3679029989a06ca39a950cced52143a0ea82a2102cb592b74", size = 10551676, upload-time = "2026-03-05T20:06:13.705Z" }, + { url = "https://files.pythonhosted.org/packages/b8/00/bf077a505b4e649bdd3c47ff8ec967735ce2544c8e4a43aba42ee9bf935d/ruff-0.15.5-py3-none-win_amd64.whl", hash = "sha256:821d41c5fa9e19117616c35eaa3f4b75046ec76c65e7ae20a333e9a8696bc7fe", size = 11678972, upload-time = "2026-03-05T20:06:45.379Z" }, + { url = "https://files.pythonhosted.org/packages/fe/4e/cd76eca6db6115604b7626668e891c9dd03330384082e33662fb0f113614/ruff-0.15.5-py3-none-win_arm64.whl", hash = "sha256:b498d1c60d2fe5c10c45ec3f698901065772730b411f164ae270bb6bfcc4740b", size = 10965572, upload-time = "2026-03-05T20:06:16.984Z" }, +] + +[[package]] +name = "tomli" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/82/30/31573e9457673ab10aa432461bee537ce6cef177667deca369efb79df071/tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c", size = 17477, upload-time = "2026-01-11T11:22:38.165Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/d9/3dc2289e1f3b32eb19b9785b6a006b28ee99acb37d1d47f78d4c10e28bf8/tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867", size = 153663, upload-time = "2026-01-11T11:21:45.27Z" }, + { url = "https://files.pythonhosted.org/packages/51/32/ef9f6845e6b9ca392cd3f64f9ec185cc6f09f0a2df3db08cbe8809d1d435/tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9", size = 148469, upload-time = "2026-01-11T11:21:46.873Z" }, + { url = "https://files.pythonhosted.org/packages/d6/c2/506e44cce89a8b1b1e047d64bd495c22c9f71f21e05f380f1a950dd9c217/tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95", size = 236039, upload-time = "2026-01-11T11:21:48.503Z" }, + { url = "https://files.pythonhosted.org/packages/b3/40/e1b65986dbc861b7e986e8ec394598187fa8aee85b1650b01dd925ca0be8/tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76", size = 243007, upload-time = "2026-01-11T11:21:49.456Z" }, + { url = "https://files.pythonhosted.org/packages/9c/6f/6e39ce66b58a5b7ae572a0f4352ff40c71e8573633deda43f6a379d56b3e/tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d", size = 240875, upload-time = "2026-01-11T11:21:50.755Z" }, + { url = "https://files.pythonhosted.org/packages/aa/ad/cb089cb190487caa80204d503c7fd0f4d443f90b95cf4ef5cf5aa0f439b0/tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576", size = 246271, upload-time = "2026-01-11T11:21:51.81Z" }, + { url = "https://files.pythonhosted.org/packages/0b/63/69125220e47fd7a3a27fd0de0c6398c89432fec41bc739823bcc66506af6/tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a", size = 96770, upload-time = "2026-01-11T11:21:52.647Z" }, + { url = "https://files.pythonhosted.org/packages/1e/0d/a22bb6c83f83386b0008425a6cd1fa1c14b5f3dd4bad05e98cf3dbbf4a64/tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa", size = 107626, upload-time = "2026-01-11T11:21:53.459Z" }, + { url = "https://files.pythonhosted.org/packages/2f/6d/77be674a3485e75cacbf2ddba2b146911477bd887dda9d8c9dfb2f15e871/tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614", size = 94842, upload-time = "2026-01-11T11:21:54.831Z" }, + { url = "https://files.pythonhosted.org/packages/3c/43/7389a1869f2f26dba52404e1ef13b4784b6b37dac93bac53457e3ff24ca3/tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1", size = 154894, upload-time = "2026-01-11T11:21:56.07Z" }, + { url = "https://files.pythonhosted.org/packages/e9/05/2f9bf110b5294132b2edf13fe6ca6ae456204f3d749f623307cbb7a946f2/tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8", size = 149053, upload-time = "2026-01-11T11:21:57.467Z" }, + { url = "https://files.pythonhosted.org/packages/e8/41/1eda3ca1abc6f6154a8db4d714a4d35c4ad90adc0bcf700657291593fbf3/tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a", size = 243481, upload-time = "2026-01-11T11:21:58.661Z" }, + { url = "https://files.pythonhosted.org/packages/d2/6d/02ff5ab6c8868b41e7d4b987ce2b5f6a51d3335a70aa144edd999e055a01/tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1", size = 251720, upload-time = "2026-01-11T11:22:00.178Z" }, + { url = "https://files.pythonhosted.org/packages/7b/57/0405c59a909c45d5b6f146107c6d997825aa87568b042042f7a9c0afed34/tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b", size = 247014, upload-time = "2026-01-11T11:22:01.238Z" }, + { url = "https://files.pythonhosted.org/packages/2c/0e/2e37568edd944b4165735687cbaf2fe3648129e440c26d02223672ee0630/tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51", size = 251820, upload-time = "2026-01-11T11:22:02.727Z" }, + { url = "https://files.pythonhosted.org/packages/5a/1c/ee3b707fdac82aeeb92d1a113f803cf6d0f37bdca0849cb489553e1f417a/tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729", size = 97712, upload-time = "2026-01-11T11:22:03.777Z" }, + { url = "https://files.pythonhosted.org/packages/69/13/c07a9177d0b3bab7913299b9278845fc6eaaca14a02667c6be0b0a2270c8/tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da", size = 108296, upload-time = "2026-01-11T11:22:04.86Z" }, + { url = "https://files.pythonhosted.org/packages/18/27/e267a60bbeeee343bcc279bb9e8fbed0cbe224bc7b2a3dc2975f22809a09/tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3", size = 94553, upload-time = "2026-01-11T11:22:05.854Z" }, + { url = "https://files.pythonhosted.org/packages/34/91/7f65f9809f2936e1f4ce6268ae1903074563603b2a2bd969ebbda802744f/tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0", size = 154915, upload-time = "2026-01-11T11:22:06.703Z" }, + { url = "https://files.pythonhosted.org/packages/20/aa/64dd73a5a849c2e8f216b755599c511badde80e91e9bc2271baa7b2cdbb1/tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e", size = 149038, upload-time = "2026-01-11T11:22:07.56Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8a/6d38870bd3d52c8d1505ce054469a73f73a0fe62c0eaf5dddf61447e32fa/tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4", size = 242245, upload-time = "2026-01-11T11:22:08.344Z" }, + { url = "https://files.pythonhosted.org/packages/59/bb/8002fadefb64ab2669e5b977df3f5e444febea60e717e755b38bb7c41029/tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e", size = 250335, upload-time = "2026-01-11T11:22:09.951Z" }, + { url = "https://files.pythonhosted.org/packages/a5/3d/4cdb6f791682b2ea916af2de96121b3cb1284d7c203d97d92d6003e91c8d/tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c", size = 245962, upload-time = "2026-01-11T11:22:11.27Z" }, + { url = "https://files.pythonhosted.org/packages/f2/4a/5f25789f9a460bd858ba9756ff52d0830d825b458e13f754952dd15fb7bb/tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f", size = 250396, upload-time = "2026-01-11T11:22:12.325Z" }, + { url = "https://files.pythonhosted.org/packages/aa/2f/b73a36fea58dfa08e8b3a268750e6853a6aac2a349241a905ebd86f3047a/tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86", size = 97530, upload-time = "2026-01-11T11:22:13.865Z" }, + { url = "https://files.pythonhosted.org/packages/3b/af/ca18c134b5d75de7e8dc551c5234eaba2e8e951f6b30139599b53de9c187/tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87", size = 108227, upload-time = "2026-01-11T11:22:15.224Z" }, + { url = "https://files.pythonhosted.org/packages/22/c3/b386b832f209fee8073c8138ec50f27b4460db2fdae9ffe022df89a57f9b/tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132", size = 94748, upload-time = "2026-01-11T11:22:16.009Z" }, + { url = "https://files.pythonhosted.org/packages/f3/c4/84047a97eb1004418bc10bdbcfebda209fca6338002eba2dc27cc6d13563/tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6", size = 154725, upload-time = "2026-01-11T11:22:17.269Z" }, + { url = "https://files.pythonhosted.org/packages/a8/5d/d39038e646060b9d76274078cddf146ced86dc2b9e8bbf737ad5983609a0/tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc", size = 148901, upload-time = "2026-01-11T11:22:18.287Z" }, + { url = "https://files.pythonhosted.org/packages/73/e5/383be1724cb30f4ce44983d249645684a48c435e1cd4f8b5cded8a816d3c/tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66", size = 243375, upload-time = "2026-01-11T11:22:19.154Z" }, + { url = "https://files.pythonhosted.org/packages/31/f0/bea80c17971c8d16d3cc109dc3585b0f2ce1036b5f4a8a183789023574f2/tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d", size = 250639, upload-time = "2026-01-11T11:22:20.168Z" }, + { url = "https://files.pythonhosted.org/packages/2c/8f/2853c36abbb7608e3f945d8a74e32ed3a74ee3a1f468f1ffc7d1cb3abba6/tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702", size = 246897, upload-time = "2026-01-11T11:22:21.544Z" }, + { url = "https://files.pythonhosted.org/packages/49/f0/6c05e3196ed5337b9fe7ea003e95fd3819a840b7a0f2bf5a408ef1dad8ed/tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8", size = 254697, upload-time = "2026-01-11T11:22:23.058Z" }, + { url = "https://files.pythonhosted.org/packages/f3/f5/2922ef29c9f2951883525def7429967fc4d8208494e5ab524234f06b688b/tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776", size = 98567, upload-time = "2026-01-11T11:22:24.033Z" }, + { url = "https://files.pythonhosted.org/packages/7b/31/22b52e2e06dd2a5fdbc3ee73226d763b184ff21fc24e20316a44ccc4d96b/tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475", size = 108556, upload-time = "2026-01-11T11:22:25.378Z" }, + { url = "https://files.pythonhosted.org/packages/48/3d/5058dff3255a3d01b705413f64f4306a141a8fd7a251e5a495e3f192a998/tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2", size = 96014, upload-time = "2026-01-11T11:22:26.138Z" }, + { url = "https://files.pythonhosted.org/packages/b8/4e/75dab8586e268424202d3a1997ef6014919c941b50642a1682df43204c22/tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9", size = 163339, upload-time = "2026-01-11T11:22:27.143Z" }, + { url = "https://files.pythonhosted.org/packages/06/e3/b904d9ab1016829a776d97f163f183a48be6a4deb87304d1e0116a349519/tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0", size = 159490, upload-time = "2026-01-11T11:22:28.399Z" }, + { url = "https://files.pythonhosted.org/packages/e3/5a/fc3622c8b1ad823e8ea98a35e3c632ee316d48f66f80f9708ceb4f2a0322/tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df", size = 269398, upload-time = "2026-01-11T11:22:29.345Z" }, + { url = "https://files.pythonhosted.org/packages/fd/33/62bd6152c8bdd4c305ad9faca48f51d3acb2df1f8791b1477d46ff86e7f8/tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d", size = 276515, upload-time = "2026-01-11T11:22:30.327Z" }, + { url = "https://files.pythonhosted.org/packages/4b/ff/ae53619499f5235ee4211e62a8d7982ba9e439a0fb4f2f351a93d67c1dd2/tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f", size = 273806, upload-time = "2026-01-11T11:22:32.56Z" }, + { url = "https://files.pythonhosted.org/packages/47/71/cbca7787fa68d4d0a9f7072821980b39fbb1b6faeb5f5cf02f4a5559fa28/tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b", size = 281340, upload-time = "2026-01-11T11:22:33.505Z" }, + { url = "https://files.pythonhosted.org/packages/f5/00/d595c120963ad42474cf6ee7771ad0d0e8a49d0f01e29576ee9195d9ecdf/tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087", size = 108106, upload-time = "2026-01-11T11:22:34.451Z" }, + { url = "https://files.pythonhosted.org/packages/de/69/9aa0c6a505c2f80e519b43764f8b4ba93b5a0bbd2d9a9de6e2b24271b9a5/tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd", size = 120504, upload-time = "2026-01-11T11:22:35.764Z" }, + { url = "https://files.pythonhosted.org/packages/b3/9f/f1668c281c58cfae01482f7114a4b88d345e4c140386241a1a24dcc9e7bc/tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4", size = 99561, upload-time = "2026-01-11T11:22:36.624Z" }, + { url = "https://files.pythonhosted.org/packages/23/d1/136eb2cb77520a31e1f64cbae9d33ec6df0d78bdf4160398e86eec8a8754/tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a", size = 14477, upload-time = "2026-01-11T11:22:37.446Z" }, +] + +[[package]] +name = "typeguard" +version = "4.5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2b/e8/66e25efcc18542d58706ce4e50415710593721aae26e794ab1dec34fb66f/typeguard-4.5.1.tar.gz", hash = "sha256:f6f8ecbbc819c9bc749983cc67c02391e16a9b43b8b27f15dc70ed7c4a007274", size = 80121, upload-time = "2026-02-19T16:09:03.392Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/91/88/b55b3117287a8540b76dbdd87733808d4d01c8067a3b339408c250bb3600/typeguard-4.5.1-py3-none-any.whl", hash = "sha256:44d2bf329d49a244110a090b55f5f91aa82d9a9834ebfd30bcc73651e4a8cc40", size = 36745, upload-time = "2026-02-19T16:09:01.6Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, +] + +[[package]] +name = "typing-inspection" +version = "0.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, +] diff --git a/codex-rs/app-server-protocol/schema/python/codex_app_server_protocol/models.py b/codex-rs/app-server-protocol/schema/python/codex_app_server_protocol/models.py index 0b69e9d7c2..c6669e5ab6 100644 --- a/codex-rs/app-server-protocol/schema/python/codex_app_server_protocol/models.py +++ b/codex-rs/app-server-protocol/schema/python/codex_app_server_protocol/models.py @@ -2,12 +2,9 @@ # filename: codex_app_server_protocol.python.schemas.json from __future__ import annotations - -from enum import StrEnum +from pydantic import BaseModel as _BaseModel, ConfigDict, Field, RootModel from typing import Any, Literal - -from pydantic import BaseModel as _BaseModel -from pydantic import ConfigDict, Field, RootModel +from enum import StrEnum class BaseModel(_BaseModel): @@ -18,29 +15,179 @@ class CodexAppServerProtocol(BaseModel): pass -class RequestId(RootModel[str | int]): - root: str | int = Field(..., title='RequestId') +class AbsolutePathBuf(RootModel[str]): + root: str = Field( + ..., + 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.", + ) -class JSONRPCErrorError(BaseModel): - code: int - data: Any | None = None - message: str +class AccountLoginCompletedNotification(BaseModel): + error: str | None = None + login_id: str | None = Field(default=None, alias="loginId") + success: bool -class JSONRPCNotification(BaseModel): - method: str - params: Any | None = None +class AdditionalFileSystemPermissions(BaseModel): + read: list[AbsolutePathBuf] | None = None + write: list[AbsolutePathBuf] | None = None -class JSONRPCResponse(BaseModel): - id: RequestId - result: Any +class AdditionalNetworkPermissions(BaseModel): + enabled: bool | None = None -class W3cTraceContext(BaseModel): - traceparent: str | None = None - tracestate: str | None = None +class TextAgentMessageContentType(RootModel[Literal["Text"]]): + root: Literal["Text"] = Field(..., title="TextAgentMessageContentType") + + +class TextAgentMessageContent(BaseModel): + text: str + type: TextAgentMessageContentType = Field(..., title="TextAgentMessageContentType") + + +class AgentMessageContent(RootModel[TextAgentMessageContent]): + root: TextAgentMessageContent + + +class AgentMessageDeltaNotification(BaseModel): + delta: str + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class CompletedAgentStatus(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + completed: str | None + + +class ErroredAgentStatus(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + errored: str + + +class AgentStatus( + RootModel[ + Literal["pending_init"] + | Literal["running"] + | CompletedAgentStatus + | ErroredAgentStatus + | Literal["shutdown"] + | Literal["not_found"] + ] +): + root: ( + Literal["pending_init"] + | Literal["running"] + | CompletedAgentStatus + | ErroredAgentStatus + | Literal["shutdown"] + | Literal["not_found"] + ) = Field(..., description="Agent lifecycle status, derived from emitted events.") + + +class AppBranding(BaseModel): + category: str | None = None + developer: str | None = None + is_discoverable_app: bool = Field(..., alias="isDiscoverableApp") + privacy_policy: str | None = Field(default=None, alias="privacyPolicy") + terms_of_service: str | None = Field(default=None, alias="termsOfService") + website: str | None = None + + +class AppReview(BaseModel): + status: str + + +class AppScreenshot(BaseModel): + file_id: str | None = Field(default=None, alias="fileId") + url: str | None = None + user_prompt: str = Field(..., alias="userPrompt") + + +class AppsListParams(BaseModel): + cursor: str | None = Field( + default=None, + description="Opaque pagination cursor returned by a previous call.", + ) + force_refetch: bool | None = Field( + default=None, + alias="forceRefetch", + description="When true, bypass app caches and fetch the latest data from sources.", + ) + limit: int | None = Field( + default=None, + description="Optional page size; defaults to a reasonable server-side value.", + ge=0, + ) + thread_id: str | None = Field( + default=None, + alias="threadId", + description="Optional thread id used to evaluate app feature gating from that thread's config.", + ) + + +class AskForApproval1(StrEnum): + untrusted = "untrusted" + on_failure = "on-failure" + on_request = "on-request" + never = "never" + + +class Reject(BaseModel): + mcp_elicitations: bool + rules: bool + sandbox_approval: bool + + +class RejectAskForApproval(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + reject: Reject + + +class AskForApproval(RootModel[AskForApproval1 | RejectAskForApproval]): + root: AskForApproval1 | RejectAskForApproval + + +class AuthMode( + RootModel[Literal["apikey"] | Literal["chatgpt"] | Literal["chatgptAuthTokens"]] +): + root: Literal["apikey"] | Literal["chatgpt"] | Literal["chatgptAuthTokens"] = Field( + ..., description="Authentication mode for OpenAI-backed providers." + ) + + +class ByteRange(BaseModel): + end: int = Field(..., ge=0) + start: int = Field(..., ge=0) + + +class CallToolResult(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + content: list[Any] + is_error: bool | None = Field(default=None, alias="isError") + structured_content: Any | None = Field(None, alias="structuredContent") + + +class CancelLoginAccountParams(BaseModel): + login_id: str = Field(..., alias="loginId") + + +class ChatgptAuthTokensRefreshReason(RootModel[Literal["unauthorized"]]): + root: Literal["unauthorized"] + + +class ChatgptAuthTokensRefreshResponse(BaseModel): + access_token: str = Field(..., alias="accessToken") + chatgpt_account_id: str = Field(..., alias="chatgptAccountId") + chatgpt_plan_type: str | None = Field(default=None, alias="chatgptPlanType") class ClientInfo(BaseModel): @@ -49,3046 +196,363 @@ class ClientInfo(BaseModel): version: str -class FuzzyFileSearchParams(BaseModel): - cancellation_token: str | None = Field(default=None, alias='cancellationToken') - query: str - roots: list[str] - - -class ChatgptAuthTokensRefreshResponse(BaseModel): - access_token: str = Field(..., alias='accessToken') - chatgpt_account_id: str = Field(..., alias='chatgptAccountId') - chatgpt_plan_type: str | None = Field(default=None, alias='chatgptPlanType') - - -class InitializeCapabilities(BaseModel): - experimental_api: bool | None = Field( - default=False, - alias='experimentalApi', - description='Opt into receiving experimental API methods and fields.', - ) - opt_out_notification_methods: list[str] | None = Field( - default=None, - alias='optOutNotificationMethods', - description='Exact notification method names that should be suppressed for this connection (for example `codex/event/session_configured`).', - ) - - -class InitializeParams(BaseModel): - capabilities: InitializeCapabilities | None = None - client_info: ClientInfo = Field(..., alias='clientInfo') - - -class InitializeClientRequestMethod(RootModel[Literal['initialize']]): - root: Literal['initialize'] = Field(..., title='InitializeClientRequestMethod') - - -class InitializeClientRequest(BaseModel): - id: RequestId - method: InitializeClientRequestMethod = Field( - ..., title='InitializeClientRequestMethod' - ) - params: InitializeParams - - -class ThreadStartClientRequestMethod(RootModel[Literal['thread/start']]): - root: Literal['thread/start'] = Field(..., title='Thread/startClientRequestMethod') - - -class ThreadResumeClientRequestMethod(RootModel[Literal['thread/resume']]): - root: Literal['thread/resume'] = Field( - ..., title='Thread/resumeClientRequestMethod' - ) - - -class ThreadForkClientRequestMethod(RootModel[Literal['thread/fork']]): - root: Literal['thread/fork'] = Field(..., title='Thread/forkClientRequestMethod') - - -class ThreadArchiveClientRequestMethod(RootModel[Literal['thread/archive']]): - root: Literal['thread/archive'] = Field( - ..., title='Thread/archiveClientRequestMethod' - ) - - -class ThreadUnsubscribeClientRequestMethod(RootModel[Literal['thread/unsubscribe']]): - root: Literal['thread/unsubscribe'] = Field( - ..., title='Thread/unsubscribeClientRequestMethod' - ) - - -class ThreadNameSetClientRequestMethod(RootModel[Literal['thread/name/set']]): - root: Literal['thread/name/set'] = Field( - ..., title='Thread/name/setClientRequestMethod' - ) - - -class ThreadMetadataUpdateClientRequestMethod( - RootModel[Literal['thread/metadata/update']] -): - root: Literal['thread/metadata/update'] = Field( - ..., title='Thread/metadata/updateClientRequestMethod' - ) - - -class ThreadUnarchiveClientRequestMethod(RootModel[Literal['thread/unarchive']]): - root: Literal['thread/unarchive'] = Field( - ..., title='Thread/unarchiveClientRequestMethod' - ) - - -class ThreadCompactStartClientRequestMethod(RootModel[Literal['thread/compact/start']]): - root: Literal['thread/compact/start'] = Field( - ..., title='Thread/compact/startClientRequestMethod' - ) - - -class ThreadRollbackClientRequestMethod(RootModel[Literal['thread/rollback']]): - root: Literal['thread/rollback'] = Field( - ..., title='Thread/rollbackClientRequestMethod' - ) - - -class ThreadListClientRequestMethod(RootModel[Literal['thread/list']]): - root: Literal['thread/list'] = Field(..., title='Thread/listClientRequestMethod') - - -class ThreadLoadedListClientRequestMethod(RootModel[Literal['thread/loaded/list']]): - root: Literal['thread/loaded/list'] = Field( - ..., title='Thread/loaded/listClientRequestMethod' - ) - - -class ThreadReadClientRequestMethod(RootModel[Literal['thread/read']]): - root: Literal['thread/read'] = Field(..., title='Thread/readClientRequestMethod') - - -class SkillsListClientRequestMethod(RootModel[Literal['skills/list']]): - root: Literal['skills/list'] = Field(..., title='Skills/listClientRequestMethod') - - -class PluginListClientRequestMethod(RootModel[Literal['plugin/list']]): - root: Literal['plugin/list'] = Field(..., title='Plugin/listClientRequestMethod') - - -class SkillsRemoteListClientRequestMethod(RootModel[Literal['skills/remote/list']]): - root: Literal['skills/remote/list'] = Field( - ..., title='Skills/remote/listClientRequestMethod' - ) - - -class SkillsRemoteExportClientRequestMethod(RootModel[Literal['skills/remote/export']]): - root: Literal['skills/remote/export'] = Field( - ..., title='Skills/remote/exportClientRequestMethod' - ) - - -class AppListClientRequestMethod(RootModel[Literal['app/list']]): - root: Literal['app/list'] = Field(..., title='App/listClientRequestMethod') - - -class SkillsConfigWriteClientRequestMethod(RootModel[Literal['skills/config/write']]): - root: Literal['skills/config/write'] = Field( - ..., title='Skills/config/writeClientRequestMethod' - ) - - -class PluginInstallClientRequestMethod(RootModel[Literal['plugin/install']]): - root: Literal['plugin/install'] = Field( - ..., title='Plugin/installClientRequestMethod' - ) - - -class TurnStartClientRequestMethod(RootModel[Literal['turn/start']]): - root: Literal['turn/start'] = Field(..., title='Turn/startClientRequestMethod') - - -class TurnSteerClientRequestMethod(RootModel[Literal['turn/steer']]): - root: Literal['turn/steer'] = Field(..., title='Turn/steerClientRequestMethod') - - -class TurnInterruptClientRequestMethod(RootModel[Literal['turn/interrupt']]): - root: Literal['turn/interrupt'] = Field( - ..., title='Turn/interruptClientRequestMethod' - ) - - -class ReviewStartClientRequestMethod(RootModel[Literal['review/start']]): - root: Literal['review/start'] = Field(..., title='Review/startClientRequestMethod') - - -class ModelListClientRequestMethod(RootModel[Literal['model/list']]): - root: Literal['model/list'] = Field(..., title='Model/listClientRequestMethod') - - -class ExperimentalFeatureListClientRequestMethod( - RootModel[Literal['experimentalFeature/list']] -): - root: Literal['experimentalFeature/list'] = Field( - ..., title='ExperimentalFeature/listClientRequestMethod' - ) - - -class McpServerOauthLoginClientRequestMethod( - RootModel[Literal['mcpServer/oauth/login']] -): - root: Literal['mcpServer/oauth/login'] = Field( - ..., title='McpServer/oauth/loginClientRequestMethod' - ) - - -class ConfigMcpServerReloadClientRequestMethod( - RootModel[Literal['config/mcpServer/reload']] -): - root: Literal['config/mcpServer/reload'] = Field( - ..., title='Config/mcpServer/reloadClientRequestMethod' - ) - - -class ConfigMcpServerReloadClientRequest(BaseModel): - id: RequestId - method: ConfigMcpServerReloadClientRequestMethod = Field( - ..., title='Config/mcpServer/reloadClientRequestMethod' - ) - params: None = None - - -class McpServerStatusListClientRequestMethod( - RootModel[Literal['mcpServerStatus/list']] -): - root: Literal['mcpServerStatus/list'] = Field( - ..., title='McpServerStatus/listClientRequestMethod' - ) - - -class WindowsSandboxSetupStartClientRequestMethod( - RootModel[Literal['windowsSandbox/setupStart']] -): - root: Literal['windowsSandbox/setupStart'] = Field( - ..., title='WindowsSandbox/setupStartClientRequestMethod' - ) - - -class AccountLoginStartClientRequestMethod(RootModel[Literal['account/login/start']]): - root: Literal['account/login/start'] = Field( - ..., title='Account/login/startClientRequestMethod' - ) - - -class AccountLoginCancelClientRequestMethod(RootModel[Literal['account/login/cancel']]): - root: Literal['account/login/cancel'] = Field( - ..., title='Account/login/cancelClientRequestMethod' - ) - - -class AccountLogoutClientRequestMethod(RootModel[Literal['account/logout']]): - root: Literal['account/logout'] = Field( - ..., title='Account/logoutClientRequestMethod' - ) - - -class AccountLogoutClientRequest(BaseModel): - id: RequestId - method: AccountLogoutClientRequestMethod = Field( - ..., title='Account/logoutClientRequestMethod' - ) - params: None = None - - -class AccountRateLimitsReadClientRequestMethod( - RootModel[Literal['account/rateLimits/read']] -): - root: Literal['account/rateLimits/read'] = Field( - ..., title='Account/rateLimits/readClientRequestMethod' - ) - - -class AccountRateLimitsReadClientRequest(BaseModel): - id: RequestId - method: AccountRateLimitsReadClientRequestMethod = Field( - ..., title='Account/rateLimits/readClientRequestMethod' - ) - params: None = None - - -class FeedbackUploadClientRequestMethod(RootModel[Literal['feedback/upload']]): - root: Literal['feedback/upload'] = Field( - ..., title='Feedback/uploadClientRequestMethod' - ) - - -class CommandExecClientRequestMethod(RootModel[Literal['command/exec']]): - root: Literal['command/exec'] = Field(..., title='Command/execClientRequestMethod') - - -class CommandExecWriteClientRequestMethod(RootModel[Literal['command/exec/write']]): - root: Literal['command/exec/write'] = Field( - ..., title='Command/exec/writeClientRequestMethod' - ) - - -class CommandExecTerminateClientRequestMethod( - RootModel[Literal['command/exec/terminate']] -): - root: Literal['command/exec/terminate'] = Field( - ..., title='Command/exec/terminateClientRequestMethod' - ) - - -class CommandExecResizeClientRequestMethod(RootModel[Literal['command/exec/resize']]): - root: Literal['command/exec/resize'] = Field( - ..., title='Command/exec/resizeClientRequestMethod' - ) - - -class ConfigReadClientRequestMethod(RootModel[Literal['config/read']]): - root: Literal['config/read'] = Field(..., title='Config/readClientRequestMethod') - - -class ExternalAgentConfigDetectClientRequestMethod( - RootModel[Literal['externalAgentConfig/detect']] -): - root: Literal['externalAgentConfig/detect'] = Field( - ..., title='ExternalAgentConfig/detectClientRequestMethod' - ) - - -class ExternalAgentConfigImportClientRequestMethod( - RootModel[Literal['externalAgentConfig/import']] -): - root: Literal['externalAgentConfig/import'] = Field( - ..., title='ExternalAgentConfig/importClientRequestMethod' - ) - - -class ConfigValueWriteClientRequestMethod(RootModel[Literal['config/value/write']]): - root: Literal['config/value/write'] = Field( - ..., title='Config/value/writeClientRequestMethod' - ) - - -class ConfigBatchWriteClientRequestMethod(RootModel[Literal['config/batchWrite']]): - root: Literal['config/batchWrite'] = Field( - ..., title='Config/batchWriteClientRequestMethod' - ) - - -class ConfigRequirementsReadClientRequestMethod( - RootModel[Literal['configRequirements/read']] -): - root: Literal['configRequirements/read'] = Field( - ..., title='ConfigRequirements/readClientRequestMethod' - ) - - -class ConfigRequirementsReadClientRequest(BaseModel): - id: RequestId - method: ConfigRequirementsReadClientRequestMethod = Field( - ..., title='ConfigRequirements/readClientRequestMethod' - ) - params: None = None - - -class AccountReadClientRequestMethod(RootModel[Literal['account/read']]): - root: Literal['account/read'] = Field(..., title='Account/readClientRequestMethod') - - -class FuzzyFileSearchClientRequestMethod(RootModel[Literal['fuzzyFileSearch']]): - root: Literal['fuzzyFileSearch'] = Field( - ..., title='FuzzyFileSearchClientRequestMethod' - ) - - -class FuzzyFileSearchClientRequest(BaseModel): - id: RequestId - method: FuzzyFileSearchClientRequestMethod = Field( - ..., title='FuzzyFileSearchClientRequestMethod' - ) - params: FuzzyFileSearchParams - - -class AdditionalNetworkPermissions(BaseModel): - enabled: bool | None = None - - -class ChatgptAuthTokensRefreshReason(RootModel[Literal['unauthorized']]): - root: Literal['unauthorized'] - - -class AcceptWithExecpolicyAmendment(BaseModel): - execpolicy_amendment: list[str] - - -class AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - accept_with_execpolicy_amendment: AcceptWithExecpolicyAmendment = Field( - ..., alias='acceptWithExecpolicyAmendment' - ) - - -class CommandExecutionRequestApprovalSkillMetadata(BaseModel): - path_to_skills_md: str = Field(..., alias='pathToSkillsMd') - - -class DynamicToolCallParams(BaseModel): - arguments: Any - call_id: str = Field(..., alias='callId') - thread_id: str = Field(..., alias='threadId') - tool: str - turn_id: str = Field(..., alias='turnId') - - -class AddFileChangeType(RootModel[Literal['add']]): - root: Literal['add'] = Field(..., title='AddFileChangeType') - - -class AddFileChange(BaseModel): - content: str - type: AddFileChangeType = Field(..., title='AddFileChangeType') - - -class DeleteFileChangeType(RootModel[Literal['delete']]): - root: Literal['delete'] = Field(..., title='DeleteFileChangeType') - - -class DeleteFileChange(BaseModel): - content: str - type: DeleteFileChangeType = Field(..., title='DeleteFileChangeType') - - -class UpdateFileChangeType(RootModel[Literal['update']]): - root: Literal['update'] = Field(..., title='UpdateFileChangeType') - - -class UpdateFileChange(BaseModel): - move_path: str | None = None - type: UpdateFileChangeType = Field(..., title='UpdateFileChangeType') - unified_diff: str - - -class FileChange(RootModel[AddFileChange | DeleteFileChange | UpdateFileChange]): - root: AddFileChange | DeleteFileChange | UpdateFileChange - - -class FileChangeRequestApprovalParams(BaseModel): - grant_root: str | None = Field( - default=None, - alias='grantRoot', - description='[UNSTABLE] When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).', - ) - item_id: str = Field(..., alias='itemId') - reason: str | None = Field( - default=None, - description='Optional explanatory reason (e.g. request for extra write access).', - ) - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class MacOsAutomationPermission1(StrEnum): - none = 'none' - all = 'all' - - -class BundleIdsMacOsAutomationPermission(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - bundle_ids: list[str] - - -class MacOsAutomationPermission( - RootModel[MacOsAutomationPermission1 | BundleIdsMacOsAutomationPermission] -): - root: MacOsAutomationPermission1 | BundleIdsMacOsAutomationPermission - - -class MacOsPreferencesPermission(StrEnum): - none = 'none' - read_only = 'read_only' - read_write = 'read_write' - - -class McpElicitationArrayType(RootModel[Literal['array']]): - root: Literal['array'] - - -class McpElicitationBooleanType(RootModel[Literal['boolean']]): - root: Literal['boolean'] - - -class McpElicitationConstOption(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - const: str - title: str - - -class McpElicitationNumberType(StrEnum): - number = 'number' - integer = 'integer' - - -class McpElicitationObjectType(RootModel[Literal['object']]): - root: Literal['object'] - - -class McpElicitationStringFormat(StrEnum): - email = 'email' - uri = 'uri' - date = 'date' - date_time = 'date-time' - - -class McpElicitationStringType(RootModel[Literal['string']]): - root: Literal['string'] - - -class McpElicitationTitledEnumItems(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - any_of: list[McpElicitationConstOption] = Field(..., alias='anyOf') - - -class McpElicitationTitledMultiSelectEnumSchema(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - default: list[str] | None = None - description: str | None = None - items: McpElicitationTitledEnumItems - max_items: int | None = Field(default=None, alias='maxItems', ge=0) - min_items: int | None = Field(default=None, alias='minItems', ge=0) - title: str | None = None - type: McpElicitationArrayType - - -class McpElicitationTitledSingleSelectEnumSchema(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - default: str | None = None - description: str | None = None - one_of: list[McpElicitationConstOption] = Field(..., alias='oneOf') - title: str | None = None - type: McpElicitationStringType - - -class McpElicitationUntitledEnumItems(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - enum: list[str] - type: McpElicitationStringType - - -class McpElicitationUntitledMultiSelectEnumSchema(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - default: list[str] | None = None - description: str | None = None - items: McpElicitationUntitledEnumItems - max_items: int | None = Field(default=None, alias='maxItems', ge=0) - min_items: int | None = Field(default=None, alias='minItems', ge=0) - title: str | None = None - type: McpElicitationArrayType - - -class McpElicitationUntitledSingleSelectEnumSchema(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - default: str | None = None - description: str | None = None - enum: list[str] - title: str | None = None - type: McpElicitationStringType - - -class McpServerElicitationRequestParams2(BaseModel): - server_name: str = Field(..., alias='serverName') - thread_id: str = Field(..., alias='threadId') - turn_id: str | None = Field( - default=None, - alias='turnId', - description='Active Codex turn when this elicitation was observed, if app-server could correlate one.\n\nThis is nullable because MCP models elicitation as a standalone server-to-client request identified by the MCP server request id. It may be triggered during a turn, but turn context is app-server correlation rather than part of the protocol identity of the elicitation itself.', - ) - field_meta: Any | None = Field(None, alias='_meta') - elicitation_id: str = Field(..., alias='elicitationId') - message: str - mode: Literal['url'] - url: str - - -class NetworkApprovalProtocol(StrEnum): - http = 'http' - https = 'https' - socks5_tcp = 'socks5Tcp' - socks5_udp = 'socks5Udp' - - -class NetworkPolicyRuleAction(StrEnum): - allow = 'allow' - deny = 'deny' - - -class ReadParsedCommandType(RootModel[Literal['read']]): - root: Literal['read'] = Field(..., title='ReadParsedCommandType') - - -class ReadParsedCommand(BaseModel): - cmd: str - name: str - path: str = Field( - ..., - description='(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path.', - ) - type: ReadParsedCommandType = Field(..., title='ReadParsedCommandType') - - -class ListFilesParsedCommandType(RootModel[Literal['list_files']]): - root: Literal['list_files'] = Field(..., title='ListFilesParsedCommandType') - - -class ListFilesParsedCommand(BaseModel): - cmd: str - path: str | None = None - type: ListFilesParsedCommandType = Field(..., title='ListFilesParsedCommandType') - - -class SearchParsedCommandType(RootModel[Literal['search']]): - root: Literal['search'] = Field(..., title='SearchParsedCommandType') - - -class SearchParsedCommand(BaseModel): - cmd: str - path: str | None = None - query: str | None = None - type: SearchParsedCommandType = Field(..., title='SearchParsedCommandType') - - -class UnknownParsedCommandType(RootModel[Literal['unknown']]): - root: Literal['unknown'] = Field(..., title='UnknownParsedCommandType') - - -class UnknownParsedCommand(BaseModel): - cmd: str - type: UnknownParsedCommandType = Field(..., title='UnknownParsedCommandType') - - -class ParsedCommand( - RootModel[ - ReadParsedCommand - | ListFilesParsedCommand - | SearchParsedCommand - | UnknownParsedCommand - ] -): - root: ( - ReadParsedCommand - | ListFilesParsedCommand - | SearchParsedCommand - | UnknownParsedCommand - ) - - -class ToolRequestUserInputOption(BaseModel): - description: str - label: str - - -class ToolRequestUserInputQuestion(BaseModel): - header: str - id: str - is_other: bool | None = Field(default=False, alias='isOther') - is_secret: bool | None = Field(default=False, alias='isSecret') - options: list[ToolRequestUserInputOption] | None = None - question: str - - -class ItemCommandExecutionRequestApprovalServerRequestMethod( - RootModel[Literal['item/commandExecution/requestApproval']] -): - root: Literal['item/commandExecution/requestApproval'] = Field( - ..., title='Item/commandExecution/requestApprovalServerRequestMethod' - ) - - -class ItemFileChangeRequestApprovalServerRequestMethod( - RootModel[Literal['item/fileChange/requestApproval']] -): - root: Literal['item/fileChange/requestApproval'] = Field( - ..., title='Item/fileChange/requestApprovalServerRequestMethod' - ) - - -class ItemFileChangeRequestApprovalServerRequest(BaseModel): - id: RequestId - method: ItemFileChangeRequestApprovalServerRequestMethod = Field( - ..., title='Item/fileChange/requestApprovalServerRequestMethod' - ) - params: FileChangeRequestApprovalParams - - -class ItemToolRequestUserInputServerRequestMethod( - RootModel[Literal['item/tool/requestUserInput']] -): - root: Literal['item/tool/requestUserInput'] = Field( - ..., title='Item/tool/requestUserInputServerRequestMethod' - ) - - -class McpServerElicitationRequestServerRequestMethod( - RootModel[Literal['mcpServer/elicitation/request']] -): - root: Literal['mcpServer/elicitation/request'] = Field( - ..., title='McpServer/elicitation/requestServerRequestMethod' - ) - - -class ItemPermissionsRequestApprovalServerRequestMethod( - RootModel[Literal['item/permissions/requestApproval']] -): - root: Literal['item/permissions/requestApproval'] = Field( - ..., title='Item/permissions/requestApprovalServerRequestMethod' - ) - - -class ItemToolCallServerRequestMethod(RootModel[Literal['item/tool/call']]): - root: Literal['item/tool/call'] = Field( - ..., title='Item/tool/callServerRequestMethod' - ) - - -class ItemToolCallServerRequest(BaseModel): - id: RequestId - method: ItemToolCallServerRequestMethod = Field( - ..., title='Item/tool/callServerRequestMethod' - ) - params: DynamicToolCallParams - - -class AccountChatgptAuthTokensRefreshServerRequestMethod( - RootModel[Literal['account/chatgptAuthTokens/refresh']] -): - root: Literal['account/chatgptAuthTokens/refresh'] = Field( - ..., title='Account/chatgptAuthTokens/refreshServerRequestMethod' - ) - - -class ApplyPatchApprovalServerRequestMethod(RootModel[Literal['applyPatchApproval']]): - root: Literal['applyPatchApproval'] = Field( - ..., title='ApplyPatchApprovalServerRequestMethod' - ) - - -class ExecCommandApprovalServerRequestMethod(RootModel[Literal['execCommandApproval']]): - root: Literal['execCommandApproval'] = Field( - ..., title='ExecCommandApprovalServerRequestMethod' - ) - - -class InitializedClientNotificationMethod(RootModel[Literal['initialized']]): - root: Literal['initialized'] = Field( - ..., title='InitializedClientNotificationMethod' +class InitializedClientNotificationMethod(RootModel[Literal["initialized"]]): + root: Literal["initialized"] = Field( + ..., title="InitializedClientNotificationMethod" ) class InitializedClientNotification(BaseModel): method: InitializedClientNotificationMethod = Field( - ..., title='InitializedClientNotificationMethod' + ..., title="InitializedClientNotificationMethod" ) class ClientNotification(RootModel[InitializedClientNotification]): - root: InitializedClientNotification = Field(..., title='ClientNotification') + root: InitializedClientNotification = Field(..., title="ClientNotification") -class Indice(RootModel[int]): - root: int = Field(..., ge=0) +class InitializeClientRequestMethod(RootModel[Literal["initialize"]]): + root: Literal["initialize"] = Field(..., title="InitializeClientRequestMethod") -class FuzzyFileSearchResult(BaseModel): - file_name: str - indices: list[Indice] | None = None - path: str - root: str - score: int = Field(..., ge=0) +class ThreadStartClientRequestMethod(RootModel[Literal["thread/start"]]): + root: Literal["thread/start"] = Field(..., title="Thread/startClientRequestMethod") -class FuzzyFileSearchSessionCompletedNotification(BaseModel): - session_id: str = Field(..., alias='sessionId') - - -class FuzzyFileSearchSessionUpdatedNotification(BaseModel): - files: list[FuzzyFileSearchResult] - query: str - session_id: str = Field(..., alias='sessionId') - - -class ErrorServerNotificationMethod(RootModel[Literal['error']]): - root: Literal['error'] = Field(..., title='ErrorServerNotificationMethod') - - -class ThreadStartedServerNotificationMethod(RootModel[Literal['thread/started']]): - root: Literal['thread/started'] = Field( - ..., title='Thread/startedServerNotificationMethod' +class ThreadResumeClientRequestMethod(RootModel[Literal["thread/resume"]]): + root: Literal["thread/resume"] = Field( + ..., title="Thread/resumeClientRequestMethod" ) -class ThreadStatusChangedServerNotificationMethod( - RootModel[Literal['thread/status/changed']] +class ThreadForkClientRequestMethod(RootModel[Literal["thread/fork"]]): + root: Literal["thread/fork"] = Field(..., title="Thread/forkClientRequestMethod") + + +class ThreadArchiveClientRequestMethod(RootModel[Literal["thread/archive"]]): + root: Literal["thread/archive"] = Field( + ..., title="Thread/archiveClientRequestMethod" + ) + + +class ThreadUnsubscribeClientRequestMethod(RootModel[Literal["thread/unsubscribe"]]): + root: Literal["thread/unsubscribe"] = Field( + ..., title="Thread/unsubscribeClientRequestMethod" + ) + + +class ThreadNameSetClientRequestMethod(RootModel[Literal["thread/name/set"]]): + root: Literal["thread/name/set"] = Field( + ..., title="Thread/name/setClientRequestMethod" + ) + + +class ThreadMetadataUpdateClientRequestMethod( + RootModel[Literal["thread/metadata/update"]] ): - root: Literal['thread/status/changed'] = Field( - ..., title='Thread/status/changedServerNotificationMethod' + root: Literal["thread/metadata/update"] = Field( + ..., title="Thread/metadata/updateClientRequestMethod" ) -class ThreadArchivedServerNotificationMethod(RootModel[Literal['thread/archived']]): - root: Literal['thread/archived'] = Field( - ..., title='Thread/archivedServerNotificationMethod' +class ThreadUnarchiveClientRequestMethod(RootModel[Literal["thread/unarchive"]]): + root: Literal["thread/unarchive"] = Field( + ..., title="Thread/unarchiveClientRequestMethod" ) -class ThreadUnarchivedServerNotificationMethod(RootModel[Literal['thread/unarchived']]): - root: Literal['thread/unarchived'] = Field( - ..., title='Thread/unarchivedServerNotificationMethod' +class ThreadCompactStartClientRequestMethod(RootModel[Literal["thread/compact/start"]]): + root: Literal["thread/compact/start"] = Field( + ..., title="Thread/compact/startClientRequestMethod" ) -class ThreadClosedServerNotificationMethod(RootModel[Literal['thread/closed']]): - root: Literal['thread/closed'] = Field( - ..., title='Thread/closedServerNotificationMethod' +class ThreadRollbackClientRequestMethod(RootModel[Literal["thread/rollback"]]): + root: Literal["thread/rollback"] = Field( + ..., title="Thread/rollbackClientRequestMethod" ) -class SkillsChangedServerNotificationMethod(RootModel[Literal['skills/changed']]): - root: Literal['skills/changed'] = Field( - ..., title='Skills/changedServerNotificationMethod' +class ThreadListClientRequestMethod(RootModel[Literal["thread/list"]]): + root: Literal["thread/list"] = Field(..., title="Thread/listClientRequestMethod") + + +class ThreadLoadedListClientRequestMethod(RootModel[Literal["thread/loaded/list"]]): + root: Literal["thread/loaded/list"] = Field( + ..., title="Thread/loaded/listClientRequestMethod" ) -class ThreadNameUpdatedServerNotificationMethod( - RootModel[Literal['thread/name/updated']] +class ThreadReadClientRequestMethod(RootModel[Literal["thread/read"]]): + root: Literal["thread/read"] = Field(..., title="Thread/readClientRequestMethod") + + +class SkillsListClientRequestMethod(RootModel[Literal["skills/list"]]): + root: Literal["skills/list"] = Field(..., title="Skills/listClientRequestMethod") + + +class PluginListClientRequestMethod(RootModel[Literal["plugin/list"]]): + root: Literal["plugin/list"] = Field(..., title="Plugin/listClientRequestMethod") + + +class SkillsRemoteListClientRequestMethod(RootModel[Literal["skills/remote/list"]]): + root: Literal["skills/remote/list"] = Field( + ..., title="Skills/remote/listClientRequestMethod" + ) + + +class SkillsRemoteExportClientRequestMethod(RootModel[Literal["skills/remote/export"]]): + root: Literal["skills/remote/export"] = Field( + ..., title="Skills/remote/exportClientRequestMethod" + ) + + +class AppListClientRequestMethod(RootModel[Literal["app/list"]]): + root: Literal["app/list"] = Field(..., title="App/listClientRequestMethod") + + +class SkillsConfigWriteClientRequestMethod(RootModel[Literal["skills/config/write"]]): + root: Literal["skills/config/write"] = Field( + ..., title="Skills/config/writeClientRequestMethod" + ) + + +class PluginInstallClientRequestMethod(RootModel[Literal["plugin/install"]]): + root: Literal["plugin/install"] = Field( + ..., title="Plugin/installClientRequestMethod" + ) + + +class TurnStartClientRequestMethod(RootModel[Literal["turn/start"]]): + root: Literal["turn/start"] = Field(..., title="Turn/startClientRequestMethod") + + +class TurnSteerClientRequestMethod(RootModel[Literal["turn/steer"]]): + root: Literal["turn/steer"] = Field(..., title="Turn/steerClientRequestMethod") + + +class TurnInterruptClientRequestMethod(RootModel[Literal["turn/interrupt"]]): + root: Literal["turn/interrupt"] = Field( + ..., title="Turn/interruptClientRequestMethod" + ) + + +class ReviewStartClientRequestMethod(RootModel[Literal["review/start"]]): + root: Literal["review/start"] = Field(..., title="Review/startClientRequestMethod") + + +class ModelListClientRequestMethod(RootModel[Literal["model/list"]]): + root: Literal["model/list"] = Field(..., title="Model/listClientRequestMethod") + + +class ExperimentalFeatureListClientRequestMethod( + RootModel[Literal["experimentalFeature/list"]] ): - root: Literal['thread/name/updated'] = Field( - ..., title='Thread/name/updatedServerNotificationMethod' + root: Literal["experimentalFeature/list"] = Field( + ..., title="ExperimentalFeature/listClientRequestMethod" ) -class ThreadTokenUsageUpdatedServerNotificationMethod( - RootModel[Literal['thread/tokenUsage/updated']] +class McpServerOauthLoginClientRequestMethod( + RootModel[Literal["mcpServer/oauth/login"]] ): - root: Literal['thread/tokenUsage/updated'] = Field( - ..., title='Thread/tokenUsage/updatedServerNotificationMethod' + root: Literal["mcpServer/oauth/login"] = Field( + ..., title="McpServer/oauth/loginClientRequestMethod" ) -class TurnStartedServerNotificationMethod(RootModel[Literal['turn/started']]): - root: Literal['turn/started'] = Field( - ..., title='Turn/startedServerNotificationMethod' - ) - - -class TurnCompletedServerNotificationMethod(RootModel[Literal['turn/completed']]): - root: Literal['turn/completed'] = Field( - ..., title='Turn/completedServerNotificationMethod' - ) - - -class TurnDiffUpdatedServerNotificationMethod(RootModel[Literal['turn/diff/updated']]): - root: Literal['turn/diff/updated'] = Field( - ..., title='Turn/diff/updatedServerNotificationMethod' - ) - - -class TurnPlanUpdatedServerNotificationMethod(RootModel[Literal['turn/plan/updated']]): - root: Literal['turn/plan/updated'] = Field( - ..., title='Turn/plan/updatedServerNotificationMethod' - ) - - -class ItemStartedServerNotificationMethod(RootModel[Literal['item/started']]): - root: Literal['item/started'] = Field( - ..., title='Item/startedServerNotificationMethod' - ) - - -class ItemCompletedServerNotificationMethod(RootModel[Literal['item/completed']]): - root: Literal['item/completed'] = Field( - ..., title='Item/completedServerNotificationMethod' - ) - - -class ItemAgentMessageDeltaServerNotificationMethod( - RootModel[Literal['item/agentMessage/delta']] +class ConfigMcpServerReloadClientRequestMethod( + RootModel[Literal["config/mcpServer/reload"]] ): - root: Literal['item/agentMessage/delta'] = Field( - ..., title='Item/agentMessage/deltaServerNotificationMethod' + root: Literal["config/mcpServer/reload"] = Field( + ..., title="Config/mcpServer/reloadClientRequestMethod" ) -class ItemPlanDeltaServerNotificationMethod(RootModel[Literal['item/plan/delta']]): - root: Literal['item/plan/delta'] = Field( - ..., title='Item/plan/deltaServerNotificationMethod' - ) - - -class CommandExecOutputDeltaServerNotificationMethod( - RootModel[Literal['command/exec/outputDelta']] +class McpServerStatusListClientRequestMethod( + RootModel[Literal["mcpServerStatus/list"]] ): - root: Literal['command/exec/outputDelta'] = Field( - ..., title='Command/exec/outputDeltaServerNotificationMethod' + root: Literal["mcpServerStatus/list"] = Field( + ..., title="McpServerStatus/listClientRequestMethod" ) -class ItemCommandExecutionOutputDeltaServerNotificationMethod( - RootModel[Literal['item/commandExecution/outputDelta']] +class WindowsSandboxSetupStartClientRequestMethod( + RootModel[Literal["windowsSandbox/setupStart"]] ): - root: Literal['item/commandExecution/outputDelta'] = Field( - ..., title='Item/commandExecution/outputDeltaServerNotificationMethod' + root: Literal["windowsSandbox/setupStart"] = Field( + ..., title="WindowsSandbox/setupStartClientRequestMethod" ) -class ItemCommandExecutionTerminalInteractionServerNotificationMethod( - RootModel[Literal['item/commandExecution/terminalInteraction']] +class AccountLoginStartClientRequestMethod(RootModel[Literal["account/login/start"]]): + root: Literal["account/login/start"] = Field( + ..., title="Account/login/startClientRequestMethod" + ) + + +class AccountLoginCancelClientRequestMethod(RootModel[Literal["account/login/cancel"]]): + root: Literal["account/login/cancel"] = Field( + ..., title="Account/login/cancelClientRequestMethod" + ) + + +class AccountLogoutClientRequestMethod(RootModel[Literal["account/logout"]]): + root: Literal["account/logout"] = Field( + ..., title="Account/logoutClientRequestMethod" + ) + + +class AccountRateLimitsReadClientRequestMethod( + RootModel[Literal["account/rateLimits/read"]] ): - root: Literal['item/commandExecution/terminalInteraction'] = Field( - ..., title='Item/commandExecution/terminalInteractionServerNotificationMethod' + root: Literal["account/rateLimits/read"] = Field( + ..., title="Account/rateLimits/readClientRequestMethod" ) -class ItemFileChangeOutputDeltaServerNotificationMethod( - RootModel[Literal['item/fileChange/outputDelta']] +class FeedbackUploadClientRequestMethod(RootModel[Literal["feedback/upload"]]): + root: Literal["feedback/upload"] = Field( + ..., title="Feedback/uploadClientRequestMethod" + ) + + +class CommandExecClientRequestMethod(RootModel[Literal["command/exec"]]): + root: Literal["command/exec"] = Field(..., title="Command/execClientRequestMethod") + + +class CommandExecWriteClientRequestMethod(RootModel[Literal["command/exec/write"]]): + root: Literal["command/exec/write"] = Field( + ..., title="Command/exec/writeClientRequestMethod" + ) + + +class CommandExecTerminateClientRequestMethod( + RootModel[Literal["command/exec/terminate"]] ): - root: Literal['item/fileChange/outputDelta'] = Field( - ..., title='Item/fileChange/outputDeltaServerNotificationMethod' + root: Literal["command/exec/terminate"] = Field( + ..., title="Command/exec/terminateClientRequestMethod" ) -class ServerRequestResolvedServerNotificationMethod( - RootModel[Literal['serverRequest/resolved']] +class CommandExecResizeClientRequestMethod(RootModel[Literal["command/exec/resize"]]): + root: Literal["command/exec/resize"] = Field( + ..., title="Command/exec/resizeClientRequestMethod" + ) + + +class ConfigReadClientRequestMethod(RootModel[Literal["config/read"]]): + root: Literal["config/read"] = Field(..., title="Config/readClientRequestMethod") + + +class ExternalAgentConfigDetectClientRequestMethod( + RootModel[Literal["externalAgentConfig/detect"]] ): - root: Literal['serverRequest/resolved'] = Field( - ..., title='ServerRequest/resolvedServerNotificationMethod' + root: Literal["externalAgentConfig/detect"] = Field( + ..., title="ExternalAgentConfig/detectClientRequestMethod" ) -class ItemMcpToolCallProgressServerNotificationMethod( - RootModel[Literal['item/mcpToolCall/progress']] +class ExternalAgentConfigImportClientRequestMethod( + RootModel[Literal["externalAgentConfig/import"]] ): - root: Literal['item/mcpToolCall/progress'] = Field( - ..., title='Item/mcpToolCall/progressServerNotificationMethod' + root: Literal["externalAgentConfig/import"] = Field( + ..., title="ExternalAgentConfig/importClientRequestMethod" ) -class McpServerOauthLoginCompletedServerNotificationMethod( - RootModel[Literal['mcpServer/oauthLogin/completed']] +class ConfigValueWriteClientRequestMethod(RootModel[Literal["config/value/write"]]): + root: Literal["config/value/write"] = Field( + ..., title="Config/value/writeClientRequestMethod" + ) + + +class ConfigBatchWriteClientRequestMethod(RootModel[Literal["config/batchWrite"]]): + root: Literal["config/batchWrite"] = Field( + ..., title="Config/batchWriteClientRequestMethod" + ) + + +class ConfigRequirementsReadClientRequestMethod( + RootModel[Literal["configRequirements/read"]] ): - root: Literal['mcpServer/oauthLogin/completed'] = Field( - ..., title='McpServer/oauthLogin/completedServerNotificationMethod' + root: Literal["configRequirements/read"] = Field( + ..., title="ConfigRequirements/readClientRequestMethod" ) -class AccountUpdatedServerNotificationMethod(RootModel[Literal['account/updated']]): - root: Literal['account/updated'] = Field( - ..., title='Account/updatedServerNotificationMethod' - ) - - -class AccountRateLimitsUpdatedServerNotificationMethod( - RootModel[Literal['account/rateLimits/updated']] -): - root: Literal['account/rateLimits/updated'] = Field( - ..., title='Account/rateLimits/updatedServerNotificationMethod' - ) - - -class AppListUpdatedServerNotificationMethod(RootModel[Literal['app/list/updated']]): - root: Literal['app/list/updated'] = Field( - ..., title='App/list/updatedServerNotificationMethod' - ) - - -class ItemReasoningSummaryTextDeltaServerNotificationMethod( - RootModel[Literal['item/reasoning/summaryTextDelta']] -): - root: Literal['item/reasoning/summaryTextDelta'] = Field( - ..., title='Item/reasoning/summaryTextDeltaServerNotificationMethod' - ) - - -class ItemReasoningSummaryPartAddedServerNotificationMethod( - RootModel[Literal['item/reasoning/summaryPartAdded']] -): - root: Literal['item/reasoning/summaryPartAdded'] = Field( - ..., title='Item/reasoning/summaryPartAddedServerNotificationMethod' - ) - - -class ItemReasoningTextDeltaServerNotificationMethod( - RootModel[Literal['item/reasoning/textDelta']] -): - root: Literal['item/reasoning/textDelta'] = Field( - ..., title='Item/reasoning/textDeltaServerNotificationMethod' - ) - - -class ThreadCompactedServerNotificationMethod(RootModel[Literal['thread/compacted']]): - root: Literal['thread/compacted'] = Field( - ..., title='Thread/compactedServerNotificationMethod' - ) - - -class ModelReroutedServerNotificationMethod(RootModel[Literal['model/rerouted']]): - root: Literal['model/rerouted'] = Field( - ..., title='Model/reroutedServerNotificationMethod' - ) - - -class DeprecationNoticeServerNotificationMethod( - RootModel[Literal['deprecationNotice']] -): - root: Literal['deprecationNotice'] = Field( - ..., title='DeprecationNoticeServerNotificationMethod' - ) - - -class ConfigWarningServerNotificationMethod(RootModel[Literal['configWarning']]): - root: Literal['configWarning'] = Field( - ..., title='ConfigWarningServerNotificationMethod' - ) - - -class FuzzyFileSearchSessionUpdatedServerNotificationMethod( - RootModel[Literal['fuzzyFileSearch/sessionUpdated']] -): - root: Literal['fuzzyFileSearch/sessionUpdated'] = Field( - ..., title='FuzzyFileSearch/sessionUpdatedServerNotificationMethod' - ) - - -class FuzzyFileSearchSessionUpdatedServerNotification(BaseModel): - method: FuzzyFileSearchSessionUpdatedServerNotificationMethod = Field( - ..., title='FuzzyFileSearch/sessionUpdatedServerNotificationMethod' - ) - params: FuzzyFileSearchSessionUpdatedNotification - - -class FuzzyFileSearchSessionCompletedServerNotificationMethod( - RootModel[Literal['fuzzyFileSearch/sessionCompleted']] -): - root: Literal['fuzzyFileSearch/sessionCompleted'] = Field( - ..., title='FuzzyFileSearch/sessionCompletedServerNotificationMethod' - ) - - -class FuzzyFileSearchSessionCompletedServerNotification(BaseModel): - method: FuzzyFileSearchSessionCompletedServerNotificationMethod = Field( - ..., title='FuzzyFileSearch/sessionCompletedServerNotificationMethod' - ) - params: FuzzyFileSearchSessionCompletedNotification - - -class ThreadRealtimeStartedServerNotificationMethod( - RootModel[Literal['thread/realtime/started']] -): - root: Literal['thread/realtime/started'] = Field( - ..., title='Thread/realtime/startedServerNotificationMethod' - ) - - -class ThreadRealtimeItemAddedServerNotificationMethod( - RootModel[Literal['thread/realtime/itemAdded']] -): - root: Literal['thread/realtime/itemAdded'] = Field( - ..., title='Thread/realtime/itemAddedServerNotificationMethod' - ) - - -class ThreadRealtimeOutputAudioDeltaServerNotificationMethod( - RootModel[Literal['thread/realtime/outputAudio/delta']] -): - root: Literal['thread/realtime/outputAudio/delta'] = Field( - ..., title='Thread/realtime/outputAudio/deltaServerNotificationMethod' - ) - - -class ThreadRealtimeErrorServerNotificationMethod( - RootModel[Literal['thread/realtime/error']] -): - root: Literal['thread/realtime/error'] = Field( - ..., title='Thread/realtime/errorServerNotificationMethod' - ) - - -class ThreadRealtimeClosedServerNotificationMethod( - RootModel[Literal['thread/realtime/closed']] -): - root: Literal['thread/realtime/closed'] = Field( - ..., title='Thread/realtime/closedServerNotificationMethod' - ) - - -class WindowsWorldWritableWarningServerNotificationMethod( - RootModel[Literal['windows/worldWritableWarning']] -): - root: Literal['windows/worldWritableWarning'] = Field( - ..., title='Windows/worldWritableWarningServerNotificationMethod' - ) - - -class WindowsSandboxSetupCompletedServerNotificationMethod( - RootModel[Literal['windowsSandbox/setupCompleted']] -): - root: Literal['windowsSandbox/setupCompleted'] = Field( - ..., title='WindowsSandbox/setupCompletedServerNotificationMethod' - ) - - -class AccountLoginCompletedServerNotificationMethod( - RootModel[Literal['account/login/completed']] -): - root: Literal['account/login/completed'] = Field( - ..., title='Account/login/completedServerNotificationMethod' - ) - - -class TextAgentMessageContentType(RootModel[Literal['Text']]): - root: Literal['Text'] = Field(..., title='TextAgentMessageContentType') - - -class TextAgentMessageContent(BaseModel): - text: str - type: TextAgentMessageContentType = Field(..., title='TextAgentMessageContentType') - - -class AgentMessageContent(RootModel[TextAgentMessageContent]): - root: TextAgentMessageContent - - -class CompletedAgentStatus(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - completed: str | None - - -class ErroredAgentStatus(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - errored: str - - -class AgentStatus( - RootModel[ - Literal['pending_init'] - | Literal['running'] - | CompletedAgentStatus - | ErroredAgentStatus - | Literal['shutdown'] - | Literal['not_found'] - ] -): - root: ( - Literal['pending_init'] - | Literal['running'] - | CompletedAgentStatus - | ErroredAgentStatus - | Literal['shutdown'] - | Literal['not_found'] - ) = Field(..., description='Agent lifecycle status, derived from emitted events.') - - -class CallToolResult(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - content: list[Any] - is_error: bool | None = Field(default=None, alias='isError') - structured_content: Any | None = Field(None, alias='structuredContent') - - -class CustomPrompt(BaseModel): - argument_hint: str | None = None - content: str - description: str | None = None - name: str - path: str - - -class Duration(BaseModel): - nanos: int = Field(..., ge=0) - secs: int = Field(..., ge=0) - - -class ElicitationRequest1(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - message: str - mode: Literal['form'] - requested_schema: Any - - -class ElicitationRequest2(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - elicitation_id: str - message: str - mode: Literal['url'] - url: str - - -class ElicitationRequest(RootModel[ElicitationRequest1 | ElicitationRequest2]): - root: ElicitationRequest1 | ElicitationRequest2 - - -class ExecApprovalRequestSkillMetadata(BaseModel): - path_to_skills_md: str - - -class ExecCommandSource(StrEnum): - agent = 'agent' - user_shell = 'user_shell' - unified_exec_startup = 'unified_exec_startup' - unified_exec_interaction = 'unified_exec_interaction' - - -class ExecCommandStatus(StrEnum): - completed = 'completed' - failed = 'failed' - declined = 'declined' - - -class ExecOutputStream(StrEnum): - stdout = 'stdout' - stderr = 'stderr' - - -class HistoryEntry(BaseModel): - conversation_id: str - text: str - ts: int = Field(..., ge=0) - - -class MacOsSeatbeltProfileExtensions(BaseModel): - macos_accessibility: bool | None = False - macos_automation: MacOsAutomationPermission | None = Field( - default_factory=lambda: MacOsAutomationPermission('none') - ) - macos_calendar: bool | None = False - macos_preferences: MacOsPreferencesPermission | None = 'read_only' - - -class McpInvocation(BaseModel): - arguments: Any | None = Field( - default=None, description='Arguments to the tool call.' - ) - server: str = Field( - ..., description='Name of the MCP server as defined in the config.' - ) - tool: str = Field(..., description='Name of the tool as given by the MCP server.') - - -class McpStartupFailure(BaseModel): - error: str - server: str - - -class StartingMcpStartupStatus(BaseModel): - state: Literal['starting'] - - -class ReadyMcpStartupStatus(BaseModel): - state: Literal['ready'] - - -class McpStartupStatus1(BaseModel): - error: str - state: Literal['failed'] - - -class CancelledMcpStartupStatus(BaseModel): - state: Literal['cancelled'] - - -class McpStartupStatus( - RootModel[ - StartingMcpStartupStatus - | ReadyMcpStartupStatus - | McpStartupStatus1 - | CancelledMcpStartupStatus - ] -): - root: ( - StartingMcpStartupStatus - | ReadyMcpStartupStatus - | McpStartupStatus1 - | CancelledMcpStartupStatus - ) - - -class NetworkPermissions(BaseModel): - enabled: bool | None = None - - -class RealtimeAudioFrame(BaseModel): - data: str - num_channels: int = Field(..., ge=0) - sample_rate: int = Field(..., ge=0) - samples_per_channel: int | None = Field(default=None, ge=0) - - -class SessionUpdated(BaseModel): - instructions: str | None = None - session_id: str - - -class SessionUpdatedRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - session_updated: SessionUpdated = Field(..., alias='SessionUpdated') - - -class AudioOutRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - audio_out: RealtimeAudioFrame = Field(..., alias='AudioOut') - - -class ConversationItemAddedRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - conversation_item_added: Any = Field(..., alias='ConversationItemAdded') - - -class ConversationItemDone(BaseModel): - item_id: str - - -class ConversationItemDoneRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - conversation_item_done: ConversationItemDone = Field( - ..., alias='ConversationItemDone' - ) - - -class ErrorRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - error: str = Field(..., alias='Error') - - -class RealtimeHandoffMessage(BaseModel): - role: str - text: str - - -class RealtimeHandoffRequested(BaseModel): - handoff_id: str - input_transcript: str - item_id: str - messages: list[RealtimeHandoffMessage] - - -class RejectConfig(BaseModel): - mcp_elicitations: bool = Field(..., description='Reject MCP elicitation prompts.') - rules: bool = Field( - ..., description='Reject prompts triggered by execpolicy `prompt` rules.' - ) - sandbox_approval: bool = Field( - ..., description='Reject approval prompts related to sandbox escalation.' - ) - - -class RequestUserInputQuestionOption(BaseModel): - description: str - label: str - - -class OkResultOfCallToolResultOrString(BaseModel): - ok: CallToolResult = Field(..., alias='Ok') - - -class ErrResultOfCallToolResultOrString(BaseModel): - err: str = Field(..., alias='Err') - - -class ResultOfCallToolResultOrString( - RootModel[OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString] -): - root: OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString - - -class ApprovedExecpolicyAmendment(BaseModel): - proposed_execpolicy_amendment: list[str] - - -class ApprovedExecpolicyAmendmentReviewDecision(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - approved_execpolicy_amendment: ApprovedExecpolicyAmendment - - -class ReviewLineRange(BaseModel): - end: int = Field(..., ge=0) - start: int = Field(..., ge=0) - - -class SessionNetworkProxyRuntime(BaseModel): - http_addr: str - socks_addr: str - - -class StepStatus(StrEnum): - pending = 'pending' - in_progress = 'in_progress' - completed = 'completed' - - -class TokenUsage(BaseModel): - cached_input_tokens: int - input_tokens: int - output_tokens: int - reasoning_output_tokens: int - total_tokens: int - - -class TokenUsageInfo(BaseModel): - last_token_usage: TokenUsage - model_context_window: int | None = None - total_token_usage: TokenUsage - - -class TurnAbortReason(StrEnum): - interrupted = 'interrupted' - replaced = 'replaced' - review_ended = 'review_ended' - - -class UserMessageTurnItemType(RootModel[Literal['UserMessage']]): - root: Literal['UserMessage'] = Field(..., title='UserMessageTurnItemType') - - -class AgentMessageTurnItemType(RootModel[Literal['AgentMessage']]): - root: Literal['AgentMessage'] = Field(..., title='AgentMessageTurnItemType') - - -class PlanTurnItemType(RootModel[Literal['Plan']]): - root: Literal['Plan'] = Field(..., title='PlanTurnItemType') - - -class PlanTurnItem(BaseModel): - id: str - text: str - type: PlanTurnItemType = Field(..., title='PlanTurnItemType') - - -class ReasoningTurnItemType(RootModel[Literal['Reasoning']]): - root: Literal['Reasoning'] = Field(..., title='ReasoningTurnItemType') - - -class ReasoningTurnItem(BaseModel): - id: str - raw_content: list[str] | None = [] - summary_text: list[str] - type: ReasoningTurnItemType = Field(..., title='ReasoningTurnItemType') - - -class WebSearchTurnItemType(RootModel[Literal['WebSearch']]): - root: Literal['WebSearch'] = Field(..., title='WebSearchTurnItemType') - - -class ImageGenerationTurnItemType(RootModel[Literal['ImageGeneration']]): - root: Literal['ImageGeneration'] = Field(..., title='ImageGenerationTurnItemType') - - -class ImageGenerationTurnItem(BaseModel): - id: str - result: str - revised_prompt: str | None = None - saved_path: str | None = None - status: str - type: ImageGenerationTurnItemType = Field(..., title='ImageGenerationTurnItemType') - - -class ContextCompactionTurnItemType(RootModel[Literal['ContextCompaction']]): - root: Literal['ContextCompaction'] = Field( - ..., title='ContextCompactionTurnItemType' - ) - - -class ContextCompactionTurnItem(BaseModel): - id: str - type: ContextCompactionTurnItemType = Field( - ..., title='ContextCompactionTurnItemType' - ) - - -class ErrorEventMsgType(RootModel[Literal['error']]): - root: Literal['error'] = Field(..., title='ErrorEventMsgType') - - -class WarningEventMsgType(RootModel[Literal['warning']]): - root: Literal['warning'] = Field(..., title='WarningEventMsgType') - - -class WarningEventMsg(BaseModel): - message: str - type: WarningEventMsgType = Field(..., title='WarningEventMsgType') - - -class RealtimeConversationStartedEventMsgType( - RootModel[Literal['realtime_conversation_started']] -): - root: Literal['realtime_conversation_started'] = Field( - ..., title='RealtimeConversationStartedEventMsgType' - ) - - -class RealtimeConversationStartedEventMsg(BaseModel): - session_id: str | None = None - type: RealtimeConversationStartedEventMsgType = Field( - ..., title='RealtimeConversationStartedEventMsgType' - ) - - -class RealtimeConversationRealtimeEventMsgType( - RootModel[Literal['realtime_conversation_realtime']] -): - root: Literal['realtime_conversation_realtime'] = Field( - ..., title='RealtimeConversationRealtimeEventMsgType' - ) - - -class RealtimeConversationClosedEventMsgType( - RootModel[Literal['realtime_conversation_closed']] -): - root: Literal['realtime_conversation_closed'] = Field( - ..., title='RealtimeConversationClosedEventMsgType' - ) - - -class RealtimeConversationClosedEventMsg(BaseModel): - reason: str | None = None - type: RealtimeConversationClosedEventMsgType = Field( - ..., title='RealtimeConversationClosedEventMsgType' - ) - - -class ModelRerouteEventMsgType(RootModel[Literal['model_reroute']]): - root: Literal['model_reroute'] = Field(..., title='ModelRerouteEventMsgType') - - -class ContextCompactedEventMsgType(RootModel[Literal['context_compacted']]): - root: Literal['context_compacted'] = Field( - ..., title='ContextCompactedEventMsgType' - ) - - -class ContextCompactedEventMsg(BaseModel): - type: ContextCompactedEventMsgType = Field( - ..., title='ContextCompactedEventMsgType' - ) - - -class ThreadRolledBackEventMsgType(RootModel[Literal['thread_rolled_back']]): - root: Literal['thread_rolled_back'] = Field( - ..., title='ThreadRolledBackEventMsgType' - ) - - -class ThreadRolledBackEventMsg(BaseModel): - num_turns: int = Field( - ..., description='Number of user turns that were removed from context.', ge=0 - ) - type: ThreadRolledBackEventMsgType = Field( - ..., title='ThreadRolledBackEventMsgType' - ) - - -class TaskStartedEventMsgType(RootModel[Literal['task_started']]): - root: Literal['task_started'] = Field(..., title='TaskStartedEventMsgType') - - -class TaskCompleteEventMsgType(RootModel[Literal['task_complete']]): - root: Literal['task_complete'] = Field(..., title='TaskCompleteEventMsgType') - - -class TaskCompleteEventMsg(BaseModel): - last_agent_message: str | None = None - turn_id: str - type: TaskCompleteEventMsgType = Field(..., title='TaskCompleteEventMsgType') - - -class TokenCountEventMsgType(RootModel[Literal['token_count']]): - root: Literal['token_count'] = Field(..., title='TokenCountEventMsgType') - - -class AgentMessageEventMsgType(RootModel[Literal['agent_message']]): - root: Literal['agent_message'] = Field(..., title='AgentMessageEventMsgType') - - -class UserMessageEventMsgType(RootModel[Literal['user_message']]): - root: Literal['user_message'] = Field(..., title='UserMessageEventMsgType') - - -class AgentMessageDeltaEventMsgType(RootModel[Literal['agent_message_delta']]): - root: Literal['agent_message_delta'] = Field( - ..., title='AgentMessageDeltaEventMsgType' - ) - - -class AgentMessageDeltaEventMsg(BaseModel): - delta: str - type: AgentMessageDeltaEventMsgType = Field( - ..., title='AgentMessageDeltaEventMsgType' - ) - - -class AgentReasoningEventMsgType(RootModel[Literal['agent_reasoning']]): - root: Literal['agent_reasoning'] = Field(..., title='AgentReasoningEventMsgType') - - -class AgentReasoningEventMsg(BaseModel): - text: str - type: AgentReasoningEventMsgType = Field(..., title='AgentReasoningEventMsgType') - - -class AgentReasoningDeltaEventMsgType(RootModel[Literal['agent_reasoning_delta']]): - root: Literal['agent_reasoning_delta'] = Field( - ..., title='AgentReasoningDeltaEventMsgType' - ) - - -class AgentReasoningDeltaEventMsg(BaseModel): - delta: str - type: AgentReasoningDeltaEventMsgType = Field( - ..., title='AgentReasoningDeltaEventMsgType' - ) - - -class AgentReasoningRawContentEventMsgType( - RootModel[Literal['agent_reasoning_raw_content']] -): - root: Literal['agent_reasoning_raw_content'] = Field( - ..., title='AgentReasoningRawContentEventMsgType' - ) - - -class AgentReasoningRawContentEventMsg(BaseModel): - text: str - type: AgentReasoningRawContentEventMsgType = Field( - ..., title='AgentReasoningRawContentEventMsgType' - ) - - -class AgentReasoningRawContentDeltaEventMsgType( - RootModel[Literal['agent_reasoning_raw_content_delta']] -): - root: Literal['agent_reasoning_raw_content_delta'] = Field( - ..., title='AgentReasoningRawContentDeltaEventMsgType' - ) - - -class AgentReasoningRawContentDeltaEventMsg(BaseModel): - delta: str - type: AgentReasoningRawContentDeltaEventMsgType = Field( - ..., title='AgentReasoningRawContentDeltaEventMsgType' - ) - - -class AgentReasoningSectionBreakEventMsgType( - RootModel[Literal['agent_reasoning_section_break']] -): - root: Literal['agent_reasoning_section_break'] = Field( - ..., title='AgentReasoningSectionBreakEventMsgType' - ) - - -class AgentReasoningSectionBreakEventMsg(BaseModel): - item_id: str | None = '' - summary_index: int | None = 0 - type: AgentReasoningSectionBreakEventMsgType = Field( - ..., title='AgentReasoningSectionBreakEventMsgType' - ) - - -class SessionConfiguredEventMsgType(RootModel[Literal['session_configured']]): - root: Literal['session_configured'] = Field( - ..., title='SessionConfiguredEventMsgType' - ) - - -class ThreadNameUpdatedEventMsgType(RootModel[Literal['thread_name_updated']]): - root: Literal['thread_name_updated'] = Field( - ..., title='ThreadNameUpdatedEventMsgType' - ) - - -class McpStartupUpdateEventMsgType(RootModel[Literal['mcp_startup_update']]): - root: Literal['mcp_startup_update'] = Field( - ..., title='McpStartupUpdateEventMsgType' - ) - - -class McpStartupUpdateEventMsg(BaseModel): - server: str = Field(..., description='Server name being started.') - status: McpStartupStatus = Field(..., description='Current startup status.') - type: McpStartupUpdateEventMsgType = Field( - ..., title='McpStartupUpdateEventMsgType' - ) - - -class McpStartupCompleteEventMsgType(RootModel[Literal['mcp_startup_complete']]): - root: Literal['mcp_startup_complete'] = Field( - ..., title='McpStartupCompleteEventMsgType' - ) - - -class McpStartupCompleteEventMsg(BaseModel): - cancelled: list[str] - failed: list[McpStartupFailure] - ready: list[str] - type: McpStartupCompleteEventMsgType = Field( - ..., title='McpStartupCompleteEventMsgType' - ) - - -class McpToolCallBeginEventMsgType(RootModel[Literal['mcp_tool_call_begin']]): - root: Literal['mcp_tool_call_begin'] = Field( - ..., title='McpToolCallBeginEventMsgType' - ) - - -class McpToolCallBeginEventMsg(BaseModel): - call_id: str = Field( - ..., - description='Identifier so this can be paired with the McpToolCallEnd event.', - ) - invocation: McpInvocation - type: McpToolCallBeginEventMsgType = Field( - ..., title='McpToolCallBeginEventMsgType' - ) - - -class McpToolCallEndEventMsgType(RootModel[Literal['mcp_tool_call_end']]): - root: Literal['mcp_tool_call_end'] = Field(..., title='McpToolCallEndEventMsgType') - - -class McpToolCallEndEventMsg(BaseModel): - call_id: str = Field( - ..., - description='Identifier for the corresponding McpToolCallBegin that finished.', - ) - duration: Duration - invocation: McpInvocation - result: ResultOfCallToolResultOrString = Field( - ..., description='Result of the tool call. Note this could be an error.' - ) - type: McpToolCallEndEventMsgType = Field(..., title='McpToolCallEndEventMsgType') - - -class WebSearchBeginEventMsgType(RootModel[Literal['web_search_begin']]): - root: Literal['web_search_begin'] = Field(..., title='WebSearchBeginEventMsgType') - - -class WebSearchBeginEventMsg(BaseModel): - call_id: str - type: WebSearchBeginEventMsgType = Field(..., title='WebSearchBeginEventMsgType') - - -class WebSearchEndEventMsgType(RootModel[Literal['web_search_end']]): - root: Literal['web_search_end'] = Field(..., title='WebSearchEndEventMsgType') - - -class ImageGenerationBeginEventMsgType(RootModel[Literal['image_generation_begin']]): - root: Literal['image_generation_begin'] = Field( - ..., title='ImageGenerationBeginEventMsgType' - ) - - -class ImageGenerationBeginEventMsg(BaseModel): - call_id: str - type: ImageGenerationBeginEventMsgType = Field( - ..., title='ImageGenerationBeginEventMsgType' - ) - - -class ImageGenerationEndEventMsgType(RootModel[Literal['image_generation_end']]): - root: Literal['image_generation_end'] = Field( - ..., title='ImageGenerationEndEventMsgType' - ) - - -class ImageGenerationEndEventMsg(BaseModel): - call_id: str - result: str - revised_prompt: str | None = None - saved_path: str | None = None - status: str - type: ImageGenerationEndEventMsgType = Field( - ..., title='ImageGenerationEndEventMsgType' - ) - - -class ExecCommandBeginEventMsgType(RootModel[Literal['exec_command_begin']]): - root: Literal['exec_command_begin'] = Field( - ..., title='ExecCommandBeginEventMsgType' - ) - - -class ExecCommandBeginEventMsg(BaseModel): - call_id: str = Field( - ..., - description='Identifier so this can be paired with the ExecCommandEnd event.', - ) - command: list[str] = Field(..., description='The command to be executed.') - cwd: str = Field( - ..., - description="The command's working directory if not the default cwd for the agent.", - ) - interaction_input: str | None = Field( - default=None, - description='Raw input sent to a unified exec session (if this is an interaction event).', - ) - parsed_cmd: list[ParsedCommand] - process_id: str | None = Field( - default=None, - description='Identifier for the underlying PTY process (when available).', - ) - source: ExecCommandSource | None = Field( - default='agent', - description='Where the command originated. Defaults to Agent for backward compatibility.', - ) - turn_id: str = Field(..., description='Turn ID that this command belongs to.') - type: ExecCommandBeginEventMsgType = Field( - ..., title='ExecCommandBeginEventMsgType' - ) - - -class ExecCommandOutputDeltaEventMsgType( - RootModel[Literal['exec_command_output_delta']] -): - root: Literal['exec_command_output_delta'] = Field( - ..., title='ExecCommandOutputDeltaEventMsgType' - ) - - -class ExecCommandOutputDeltaEventMsg(BaseModel): - call_id: str = Field( - ..., description='Identifier for the ExecCommandBegin that produced this chunk.' - ) - chunk: str = Field( - ..., description='Raw bytes from the stream (may not be valid UTF-8).' - ) - stream: ExecOutputStream = Field( - ..., description='Which stream produced this chunk.' - ) - type: ExecCommandOutputDeltaEventMsgType = Field( - ..., title='ExecCommandOutputDeltaEventMsgType' - ) - - -class TerminalInteractionEventMsgType(RootModel[Literal['terminal_interaction']]): - root: Literal['terminal_interaction'] = Field( - ..., title='TerminalInteractionEventMsgType' - ) - - -class TerminalInteractionEventMsg(BaseModel): - call_id: str = Field( - ..., description='Identifier for the ExecCommandBegin that produced this chunk.' - ) - process_id: str = Field( - ..., description='Process id associated with the running command.' - ) - stdin: str = Field(..., description='Stdin sent to the running session.') - type: TerminalInteractionEventMsgType = Field( - ..., title='TerminalInteractionEventMsgType' - ) - - -class ExecCommandEndEventMsgType(RootModel[Literal['exec_command_end']]): - root: Literal['exec_command_end'] = Field(..., title='ExecCommandEndEventMsgType') - - -class ExecCommandEndEventMsg(BaseModel): - aggregated_output: str | None = Field( - default='', description='Captured aggregated output' - ) - call_id: str = Field( - ..., description='Identifier for the ExecCommandBegin that finished.' - ) - command: list[str] = Field(..., description='The command that was executed.') - cwd: str = Field( - ..., - description="The command's working directory if not the default cwd for the agent.", - ) - duration: Duration = Field( - ..., description='The duration of the command execution.' - ) - exit_code: int = Field(..., description="The command's exit code.") - formatted_output: str = Field( - ..., description='Formatted output from the command, as seen by the model.' - ) - interaction_input: str | None = Field( - default=None, - description='Raw input sent to a unified exec session (if this is an interaction event).', - ) - parsed_cmd: list[ParsedCommand] - process_id: str | None = Field( - default=None, - description='Identifier for the underlying PTY process (when available).', - ) - source: ExecCommandSource | None = Field( - default='agent', - description='Where the command originated. Defaults to Agent for backward compatibility.', - ) - status: ExecCommandStatus = Field( - ..., description='Completion status for this command execution.' - ) - stderr: str = Field(..., description='Captured stderr') - stdout: str = Field(..., description='Captured stdout') - turn_id: str = Field(..., description='Turn ID that this command belongs to.') - type: ExecCommandEndEventMsgType = Field(..., title='ExecCommandEndEventMsgType') - - -class ViewImageToolCallEventMsgType(RootModel[Literal['view_image_tool_call']]): - root: Literal['view_image_tool_call'] = Field( - ..., title='ViewImageToolCallEventMsgType' - ) - - -class ViewImageToolCallEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the originating tool call.') - path: str = Field(..., description='Local filesystem path provided to the tool.') - type: ViewImageToolCallEventMsgType = Field( - ..., title='ViewImageToolCallEventMsgType' - ) - - -class ExecApprovalRequestEventMsgType(RootModel[Literal['exec_approval_request']]): - root: Literal['exec_approval_request'] = Field( - ..., title='ExecApprovalRequestEventMsgType' - ) - - -class RequestPermissionsEventMsgType(RootModel[Literal['request_permissions']]): - root: Literal['request_permissions'] = Field( - ..., title='RequestPermissionsEventMsgType' - ) - - -class RequestUserInputEventMsgType(RootModel[Literal['request_user_input']]): - root: Literal['request_user_input'] = Field( - ..., title='RequestUserInputEventMsgType' - ) - - -class DynamicToolCallRequestEventMsgType( - RootModel[Literal['dynamic_tool_call_request']] -): - root: Literal['dynamic_tool_call_request'] = Field( - ..., title='DynamicToolCallRequestEventMsgType' - ) - - -class DynamicToolCallRequestEventMsg(BaseModel): - arguments: Any - call_id: str = Field(..., alias='callId') - tool: str - turn_id: str = Field(..., alias='turnId') - type: DynamicToolCallRequestEventMsgType = Field( - ..., title='DynamicToolCallRequestEventMsgType' - ) - - -class DynamicToolCallResponseEventMsgType( - RootModel[Literal['dynamic_tool_call_response']] -): - root: Literal['dynamic_tool_call_response'] = Field( - ..., title='DynamicToolCallResponseEventMsgType' - ) - - -class ElicitationRequestEventMsgType(RootModel[Literal['elicitation_request']]): - root: Literal['elicitation_request'] = Field( - ..., title='ElicitationRequestEventMsgType' - ) - - -class ElicitationRequestEventMsg(BaseModel): - id: RequestId - request: ElicitationRequest - server_name: str - turn_id: str | None = Field( - default=None, - description='Turn ID that this elicitation belongs to, when known.', - ) - type: ElicitationRequestEventMsgType = Field( - ..., title='ElicitationRequestEventMsgType' - ) - - -class ApplyPatchApprovalRequestEventMsgType( - RootModel[Literal['apply_patch_approval_request']] -): - root: Literal['apply_patch_approval_request'] = Field( - ..., title='ApplyPatchApprovalRequestEventMsgType' - ) - - -class ApplyPatchApprovalRequestEventMsg(BaseModel): - call_id: str = Field( - ..., - description='Responses API call id for the associated patch apply call, if available.', - ) - changes: dict[str, FileChange] - grant_root: str | None = Field( - default=None, - description='When set, the agent is asking the user to allow writes under this root for the remainder of the session.', - ) - reason: str | None = Field( - default=None, - description='Optional explanatory reason (e.g. request for extra write access).', - ) - turn_id: str | None = Field( - default='', - description='Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility with older senders.', - ) - type: ApplyPatchApprovalRequestEventMsgType = Field( - ..., title='ApplyPatchApprovalRequestEventMsgType' - ) - - -class DeprecationNoticeEventMsgType(RootModel[Literal['deprecation_notice']]): - root: Literal['deprecation_notice'] = Field( - ..., title='DeprecationNoticeEventMsgType' - ) - - -class DeprecationNoticeEventMsg(BaseModel): - details: str | None = Field( - default=None, - description='Optional extra guidance, such as migration steps or rationale.', - ) - summary: str = Field(..., description='Concise summary of what is deprecated.') - type: DeprecationNoticeEventMsgType = Field( - ..., title='DeprecationNoticeEventMsgType' - ) - - -class BackgroundEventEventMsgType(RootModel[Literal['background_event']]): - root: Literal['background_event'] = Field(..., title='BackgroundEventEventMsgType') - - -class BackgroundEventEventMsg(BaseModel): - message: str - type: BackgroundEventEventMsgType = Field(..., title='BackgroundEventEventMsgType') - - -class UndoStartedEventMsgType(RootModel[Literal['undo_started']]): - root: Literal['undo_started'] = Field(..., title='UndoStartedEventMsgType') - - -class UndoStartedEventMsg(BaseModel): - message: str | None = None - type: UndoStartedEventMsgType = Field(..., title='UndoStartedEventMsgType') - - -class UndoCompletedEventMsgType(RootModel[Literal['undo_completed']]): - root: Literal['undo_completed'] = Field(..., title='UndoCompletedEventMsgType') - - -class UndoCompletedEventMsg(BaseModel): - message: str | None = None - success: bool - type: UndoCompletedEventMsgType = Field(..., title='UndoCompletedEventMsgType') - - -class StreamErrorEventMsgType(RootModel[Literal['stream_error']]): - root: Literal['stream_error'] = Field(..., title='StreamErrorEventMsgType') - - -class PatchApplyBeginEventMsgType(RootModel[Literal['patch_apply_begin']]): - root: Literal['patch_apply_begin'] = Field(..., title='PatchApplyBeginEventMsgType') - - -class PatchApplyBeginEventMsg(BaseModel): - auto_approved: bool = Field( - ..., - description='If true, there was no ApplyPatchApprovalRequest for this patch.', - ) - call_id: str = Field( - ..., - description='Identifier so this can be paired with the PatchApplyEnd event.', - ) - changes: dict[str, FileChange] = Field( - ..., description='The changes to be applied.' - ) - turn_id: str | None = Field( - default='', - description='Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.', - ) - type: PatchApplyBeginEventMsgType = Field(..., title='PatchApplyBeginEventMsgType') - - -class PatchApplyEndEventMsgType(RootModel[Literal['patch_apply_end']]): - root: Literal['patch_apply_end'] = Field(..., title='PatchApplyEndEventMsgType') - - -class TurnDiffEventMsgType(RootModel[Literal['turn_diff']]): - root: Literal['turn_diff'] = Field(..., title='TurnDiffEventMsgType') - - -class TurnDiffEventMsg(BaseModel): - type: TurnDiffEventMsgType = Field(..., title='TurnDiffEventMsgType') - unified_diff: str - - -class GetHistoryEntryResponseEventMsgType( - RootModel[Literal['get_history_entry_response']] -): - root: Literal['get_history_entry_response'] = Field( - ..., title='GetHistoryEntryResponseEventMsgType' - ) - - -class GetHistoryEntryResponseEventMsg(BaseModel): - entry: HistoryEntry | None = Field( - default=None, - description='The entry at the requested offset, if available and parseable.', - ) - log_id: int = Field(..., ge=0) - offset: int = Field(..., ge=0) - type: GetHistoryEntryResponseEventMsgType = Field( - ..., title='GetHistoryEntryResponseEventMsgType' - ) - - -class McpListToolsResponseEventMsgType(RootModel[Literal['mcp_list_tools_response']]): - root: Literal['mcp_list_tools_response'] = Field( - ..., title='McpListToolsResponseEventMsgType' - ) - - -class ListCustomPromptsResponseEventMsgType( - RootModel[Literal['list_custom_prompts_response']] -): - root: Literal['list_custom_prompts_response'] = Field( - ..., title='ListCustomPromptsResponseEventMsgType' - ) - - -class ListCustomPromptsResponseEventMsg(BaseModel): - custom_prompts: list[CustomPrompt] - type: ListCustomPromptsResponseEventMsgType = Field( - ..., title='ListCustomPromptsResponseEventMsgType' - ) - - -class ListSkillsResponseEventMsgType(RootModel[Literal['list_skills_response']]): - root: Literal['list_skills_response'] = Field( - ..., title='ListSkillsResponseEventMsgType' - ) - - -class ListRemoteSkillsResponseEventMsgType( - RootModel[Literal['list_remote_skills_response']] -): - root: Literal['list_remote_skills_response'] = Field( - ..., title='ListRemoteSkillsResponseEventMsgType' - ) - - -class RemoteSkillDownloadedEventMsgType(RootModel[Literal['remote_skill_downloaded']]): - root: Literal['remote_skill_downloaded'] = Field( - ..., title='RemoteSkillDownloadedEventMsgType' - ) - - -class RemoteSkillDownloadedEventMsg(BaseModel): - id: str - name: str - path: str - type: RemoteSkillDownloadedEventMsgType = Field( - ..., title='RemoteSkillDownloadedEventMsgType' - ) - - -class SkillsUpdateAvailableEventMsgType(RootModel[Literal['skills_update_available']]): - root: Literal['skills_update_available'] = Field( - ..., title='SkillsUpdateAvailableEventMsgType' - ) - - -class SkillsUpdateAvailableEventMsg(BaseModel): - type: SkillsUpdateAvailableEventMsgType = Field( - ..., title='SkillsUpdateAvailableEventMsgType' - ) - - -class PlanUpdateEventMsgType(RootModel[Literal['plan_update']]): - root: Literal['plan_update'] = Field(..., title='PlanUpdateEventMsgType') - - -class TurnAbortedEventMsgType(RootModel[Literal['turn_aborted']]): - root: Literal['turn_aborted'] = Field(..., title='TurnAbortedEventMsgType') - - -class TurnAbortedEventMsg(BaseModel): - reason: TurnAbortReason - turn_id: str | None = None - type: TurnAbortedEventMsgType = Field(..., title='TurnAbortedEventMsgType') - - -class ShutdownCompleteEventMsgType(RootModel[Literal['shutdown_complete']]): - root: Literal['shutdown_complete'] = Field( - ..., title='ShutdownCompleteEventMsgType' - ) - - -class ShutdownCompleteEventMsg(BaseModel): - type: ShutdownCompleteEventMsgType = Field( - ..., title='ShutdownCompleteEventMsgType' - ) - - -class EnteredReviewModeEventMsgType(RootModel[Literal['entered_review_mode']]): - root: Literal['entered_review_mode'] = Field( - ..., title='EnteredReviewModeEventMsgType' - ) - - -class ExitedReviewModeEventMsgType(RootModel[Literal['exited_review_mode']]): - root: Literal['exited_review_mode'] = Field( - ..., title='ExitedReviewModeEventMsgType' - ) - - -class RawResponseItemEventMsgType(RootModel[Literal['raw_response_item']]): - root: Literal['raw_response_item'] = Field(..., title='RawResponseItemEventMsgType') - - -class ItemStartedEventMsgType(RootModel[Literal['item_started']]): - root: Literal['item_started'] = Field(..., title='ItemStartedEventMsgType') - - -class ItemCompletedEventMsgType(RootModel[Literal['item_completed']]): - root: Literal['item_completed'] = Field(..., title='ItemCompletedEventMsgType') - - -class AgentMessageContentDeltaEventMsgType( - RootModel[Literal['agent_message_content_delta']] -): - root: Literal['agent_message_content_delta'] = Field( - ..., title='AgentMessageContentDeltaEventMsgType' - ) - - -class AgentMessageContentDeltaEventMsg(BaseModel): - delta: str - item_id: str - thread_id: str - turn_id: str - type: AgentMessageContentDeltaEventMsgType = Field( - ..., title='AgentMessageContentDeltaEventMsgType' - ) - - -class PlanDeltaEventMsgType(RootModel[Literal['plan_delta']]): - root: Literal['plan_delta'] = Field(..., title='PlanDeltaEventMsgType') - - -class PlanDeltaEventMsg(BaseModel): - delta: str - item_id: str - thread_id: str - turn_id: str - type: PlanDeltaEventMsgType = Field(..., title='PlanDeltaEventMsgType') - - -class ReasoningContentDeltaEventMsgType(RootModel[Literal['reasoning_content_delta']]): - root: Literal['reasoning_content_delta'] = Field( - ..., title='ReasoningContentDeltaEventMsgType' - ) - - -class ReasoningContentDeltaEventMsg(BaseModel): - delta: str - item_id: str - summary_index: int | None = 0 - thread_id: str - turn_id: str - type: ReasoningContentDeltaEventMsgType = Field( - ..., title='ReasoningContentDeltaEventMsgType' - ) - - -class ReasoningRawContentDeltaEventMsgType( - RootModel[Literal['reasoning_raw_content_delta']] -): - root: Literal['reasoning_raw_content_delta'] = Field( - ..., title='ReasoningRawContentDeltaEventMsgType' - ) - - -class ReasoningRawContentDeltaEventMsg(BaseModel): - content_index: int | None = 0 - delta: str - item_id: str - thread_id: str - turn_id: str - type: ReasoningRawContentDeltaEventMsgType = Field( - ..., title='ReasoningRawContentDeltaEventMsgType' - ) +class AccountReadClientRequestMethod(RootModel[Literal["account/read"]]): + root: Literal["account/read"] = Field(..., title="Account/readClientRequestMethod") -class CollabAgentSpawnBeginEventMsgType(RootModel[Literal['collab_agent_spawn_begin']]): - root: Literal['collab_agent_spawn_begin'] = Field( - ..., title='CollabAgentSpawnBeginEventMsgType' +class FuzzyFileSearchClientRequestMethod(RootModel[Literal["fuzzyFileSearch"]]): + root: Literal["fuzzyFileSearch"] = Field( + ..., title="FuzzyFileSearchClientRequestMethod" ) -class CollabAgentSpawnEndEventMsgType(RootModel[Literal['collab_agent_spawn_end']]): - root: Literal['collab_agent_spawn_end'] = Field( - ..., title='CollabAgentSpawnEndEventMsgType' - ) - - -class CollabAgentInteractionBeginEventMsgType( - RootModel[Literal['collab_agent_interaction_begin']] -): - root: Literal['collab_agent_interaction_begin'] = Field( - ..., title='CollabAgentInteractionBeginEventMsgType' - ) - - -class CollabAgentInteractionEndEventMsgType( - RootModel[Literal['collab_agent_interaction_end']] -): - root: Literal['collab_agent_interaction_end'] = Field( - ..., title='CollabAgentInteractionEndEventMsgType' - ) - - -class CollabWaitingBeginEventMsgType(RootModel[Literal['collab_waiting_begin']]): - root: Literal['collab_waiting_begin'] = Field( - ..., title='CollabWaitingBeginEventMsgType' - ) - - -class CollabWaitingEndEventMsgType(RootModel[Literal['collab_waiting_end']]): - root: Literal['collab_waiting_end'] = Field( - ..., title='CollabWaitingEndEventMsgType' - ) - - -class CollabCloseBeginEventMsgType(RootModel[Literal['collab_close_begin']]): - root: Literal['collab_close_begin'] = Field( - ..., title='CollabCloseBeginEventMsgType' - ) - - -class CollabCloseEndEventMsgType(RootModel[Literal['collab_close_end']]): - root: Literal['collab_close_end'] = Field(..., title='CollabCloseEndEventMsgType') - - -class CollabResumeBeginEventMsgType(RootModel[Literal['collab_resume_begin']]): - root: Literal['collab_resume_begin'] = Field( - ..., title='CollabResumeBeginEventMsgType' - ) - - -class CollabResumeEndEventMsgType(RootModel[Literal['collab_resume_end']]): - root: Literal['collab_resume_end'] = Field(..., title='CollabResumeEndEventMsgType') - - -class GrantedMacOsPermissions(BaseModel): - accessibility: bool | None = None - automations: MacOsAutomationPermission | None = None - calendar: bool | None = None - preferences: MacOsPreferencesPermission | None = None - - -class InitializeResponse(BaseModel): - user_agent: str = Field(..., alias='userAgent') - - -class FuzzyFileSearchResponse(BaseModel): - files: list[FuzzyFileSearchResult] - - -class FileChangeApprovalDecision( - RootModel[ - Literal['accept'] - | Literal['acceptForSession'] - | Literal['decline'] - | Literal['cancel'] - ] -): - root: ( - Literal['accept'] - | Literal['acceptForSession'] - | Literal['decline'] - | Literal['cancel'] - ) - - -class FileChangeRequestApprovalResponse(BaseModel): - decision: FileChangeApprovalDecision - - -class ToolRequestUserInputAnswer(BaseModel): - answers: list[str] - - -class ToolRequestUserInputResponse(BaseModel): - answers: dict[str, ToolRequestUserInputAnswer] - - -class McpServerElicitationAction(StrEnum): - accept = 'accept' - decline = 'decline' - cancel = 'cancel' - - -class McpServerElicitationRequestResponse(BaseModel): - field_meta: Any | None = Field( - default=None, - alias='_meta', - description='Optional client metadata for form-mode action handling.', - ) - action: McpServerElicitationAction - content: Any | None = Field( - default=None, - description='Structured user input for accepted elicitations, mirroring RMCP `CreateElicitationResult`.\n\nThis is nullable because decline/cancel responses have no content.', - ) - - -class NotLoadedThreadStatusType(RootModel[Literal['notLoaded']]): - root: Literal['notLoaded'] = Field(..., title='NotLoadedThreadStatusType') - - -class NotLoadedThreadStatus(BaseModel): - type: NotLoadedThreadStatusType = Field(..., title='NotLoadedThreadStatusType') - - -class IdleThreadStatusType(RootModel[Literal['idle']]): - root: Literal['idle'] = Field(..., title='IdleThreadStatusType') - - -class IdleThreadStatus(BaseModel): - type: IdleThreadStatusType = Field(..., title='IdleThreadStatusType') - - -class SystemErrorThreadStatusType(RootModel[Literal['systemError']]): - root: Literal['systemError'] = Field(..., title='SystemErrorThreadStatusType') - - -class SystemErrorThreadStatus(BaseModel): - type: SystemErrorThreadStatusType = Field(..., title='SystemErrorThreadStatusType') - - -class ActiveThreadStatusType(RootModel[Literal['active']]): - root: Literal['active'] = Field(..., title='ActiveThreadStatusType') - - -class ThreadActiveFlag(StrEnum): - waiting_on_approval = 'waitingOnApproval' - waiting_on_user_input = 'waitingOnUserInput' - - -class ReasoningSummaryPartAddedNotification(BaseModel): - item_id: str = Field(..., alias='itemId') - summary_index: int = Field(..., alias='summaryIndex') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class UserMessageThreadItemType(RootModel[Literal['userMessage']]): - root: Literal['userMessage'] = Field(..., title='UserMessageThreadItemType') - - -class AgentMessageThreadItemType(RootModel[Literal['agentMessage']]): - root: Literal['agentMessage'] = Field(..., title='AgentMessageThreadItemType') - - -class PlanThreadItemType(RootModel[Literal['plan']]): - root: Literal['plan'] = Field(..., title='PlanThreadItemType') - - -class PlanThreadItem(BaseModel): - id: str - text: str - type: PlanThreadItemType = Field(..., title='PlanThreadItemType') - - -class ReasoningThreadItemType(RootModel[Literal['reasoning']]): - root: Literal['reasoning'] = Field(..., title='ReasoningThreadItemType') - - -class ReasoningThreadItem(BaseModel): - content: list[str] | None = [] - id: str - summary: list[str] | None = [] - type: ReasoningThreadItemType = Field(..., title='ReasoningThreadItemType') - - -class CommandExecutionThreadItemType(RootModel[Literal['commandExecution']]): - root: Literal['commandExecution'] = Field( - ..., title='CommandExecutionThreadItemType' - ) - - -class FileChangeThreadItemType(RootModel[Literal['fileChange']]): - root: Literal['fileChange'] = Field(..., title='FileChangeThreadItemType') - - -class McpToolCallThreadItemType(RootModel[Literal['mcpToolCall']]): - root: Literal['mcpToolCall'] = Field(..., title='McpToolCallThreadItemType') - - -class DynamicToolCallThreadItemType(RootModel[Literal['dynamicToolCall']]): - root: Literal['dynamicToolCall'] = Field(..., title='DynamicToolCallThreadItemType') - - -class CollabAgentToolCallThreadItemType(RootModel[Literal['collabAgentToolCall']]): - root: Literal['collabAgentToolCall'] = Field( - ..., title='CollabAgentToolCallThreadItemType' - ) - - -class WebSearchThreadItemType(RootModel[Literal['webSearch']]): - root: Literal['webSearch'] = Field(..., title='WebSearchThreadItemType') - - -class ImageViewThreadItemType(RootModel[Literal['imageView']]): - root: Literal['imageView'] = Field(..., title='ImageViewThreadItemType') - - -class ImageViewThreadItem(BaseModel): - id: str - path: str - type: ImageViewThreadItemType = Field(..., title='ImageViewThreadItemType') - - -class ImageGenerationThreadItemType(RootModel[Literal['imageGeneration']]): - root: Literal['imageGeneration'] = Field(..., title='ImageGenerationThreadItemType') - - -class ImageGenerationThreadItem(BaseModel): - id: str - result: str - revised_prompt: str | None = Field(default=None, alias='revisedPrompt') - status: str - type: ImageGenerationThreadItemType = Field( - ..., title='ImageGenerationThreadItemType' - ) - - -class EnteredReviewModeThreadItemType(RootModel[Literal['enteredReviewMode']]): - root: Literal['enteredReviewMode'] = Field( - ..., title='EnteredReviewModeThreadItemType' - ) - - -class EnteredReviewModeThreadItem(BaseModel): - id: str - review: str - type: EnteredReviewModeThreadItemType = Field( - ..., title='EnteredReviewModeThreadItemType' - ) - - -class ExitedReviewModeThreadItemType(RootModel[Literal['exitedReviewMode']]): - root: Literal['exitedReviewMode'] = Field( - ..., title='ExitedReviewModeThreadItemType' - ) - - -class ExitedReviewModeThreadItem(BaseModel): - id: str - review: str - type: ExitedReviewModeThreadItemType = Field( - ..., title='ExitedReviewModeThreadItemType' - ) - - -class ContextCompactionThreadItemType(RootModel[Literal['contextCompaction']]): - root: Literal['contextCompaction'] = Field( - ..., title='ContextCompactionThreadItemType' - ) - - -class ContextCompactionThreadItem(BaseModel): - id: str - type: ContextCompactionThreadItemType = Field( - ..., title='ContextCompactionThreadItemType' - ) - - -class CollabAgentToolCallStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' - - -class InputTextDynamicToolCallOutputContentItemType(RootModel[Literal['inputText']]): - root: Literal['inputText'] = Field( - ..., title='InputTextDynamicToolCallOutputContentItemType' - ) - - -class InputTextDynamicToolCallOutputContentItem(BaseModel): - text: str - type: InputTextDynamicToolCallOutputContentItemType = Field( - ..., title='InputTextDynamicToolCallOutputContentItemType' - ) - - -class InputImageDynamicToolCallOutputContentItemType(RootModel[Literal['inputImage']]): - root: Literal['inputImage'] = Field( - ..., title='InputImageDynamicToolCallOutputContentItemType' - ) - - -class InputImageDynamicToolCallOutputContentItem(BaseModel): - image_url: str = Field(..., alias='imageUrl') - type: InputImageDynamicToolCallOutputContentItemType = Field( - ..., title='InputImageDynamicToolCallOutputContentItemType' - ) - - -class DynamicToolCallOutputContentItem( - RootModel[ - InputTextDynamicToolCallOutputContentItem - | InputImageDynamicToolCallOutputContentItem - ] -): - root: ( - InputTextDynamicToolCallOutputContentItem - | InputImageDynamicToolCallOutputContentItem - ) - - -class MessagePhase(RootModel[Literal['commentary'] | Literal['final_answer']]): - root: Literal['commentary'] | Literal['final_answer'] = Field( - ..., - 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.', - ) - - -class McpToolCallError(BaseModel): - message: str - - -class McpToolCallStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' - - -class DynamicToolCallStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' - - -class CollabAgentStatus(StrEnum): - pending_init = 'pendingInit' - running = 'running' - completed = 'completed' - errored = 'errored' - shutdown = 'shutdown' - not_found = 'notFound' - - -class ReadCommandActionType(RootModel[Literal['read']]): - root: Literal['read'] = Field(..., title='ReadCommandActionType') - - -class ReadCommandAction(BaseModel): - command: str - name: str - path: str - type: ReadCommandActionType = Field(..., title='ReadCommandActionType') - - -class ListFilesCommandActionType(RootModel[Literal['listFiles']]): - root: Literal['listFiles'] = Field(..., title='ListFilesCommandActionType') - - -class ListFilesCommandAction(BaseModel): - command: str - path: str | None = None - type: ListFilesCommandActionType = Field(..., title='ListFilesCommandActionType') - - -class SearchCommandActionType(RootModel[Literal['search']]): - root: Literal['search'] = Field(..., title='SearchCommandActionType') - - -class SearchCommandAction(BaseModel): - command: str - path: str | None = None - query: str | None = None - type: SearchCommandActionType = Field(..., title='SearchCommandActionType') - - -class UnknownCommandActionType(RootModel[Literal['unknown']]): - root: Literal['unknown'] = Field(..., title='UnknownCommandActionType') - - -class UnknownCommandAction(BaseModel): - command: str - type: UnknownCommandActionType = Field(..., title='UnknownCommandActionType') - - -class CommandAction( - RootModel[ - ReadCommandAction - | ListFilesCommandAction - | SearchCommandAction - | UnknownCommandAction - ] -): - root: ( - ReadCommandAction - | ListFilesCommandAction - | SearchCommandAction - | UnknownCommandAction - ) - - -class CollabAgentTool(StrEnum): - spawn_agent = 'spawnAgent' - send_input = 'sendInput' - resume_agent = 'resumeAgent' - wait = 'wait' - close_agent = 'closeAgent' - - -class CommandExecutionStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' - declined = 'declined' - - -class TextUserInputType(RootModel[Literal['text']]): - root: Literal['text'] = Field(..., title='TextUserInputType') - - -class ImageUserInputType(RootModel[Literal['image']]): - root: Literal['image'] = Field(..., title='ImageUserInputType') - - -class ImageUserInput(BaseModel): - type: ImageUserInputType = Field(..., title='ImageUserInputType') - url: str - - -class LocalImageUserInputType(RootModel[Literal['localImage']]): - root: Literal['localImage'] = Field(..., title='LocalImageUserInputType') - - -class LocalImageUserInput(BaseModel): - path: str - type: LocalImageUserInputType = Field(..., title='LocalImageUserInputType') - - -class SkillUserInputType(RootModel[Literal['skill']]): - root: Literal['skill'] = Field(..., title='SkillUserInputType') - - -class SkillUserInput(BaseModel): - name: str - path: str - type: SkillUserInputType = Field(..., title='SkillUserInputType') - - -class MentionUserInputType(RootModel[Literal['mention']]): - root: Literal['mention'] = Field(..., title='MentionUserInputType') - - -class MentionUserInput(BaseModel): - name: str - path: str - type: MentionUserInputType = Field(..., title='MentionUserInputType') - - -class ByteRange(BaseModel): - end: int = Field(..., ge=0) - start: int = Field(..., ge=0) - - -class PatchApplyStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' - declined = 'declined' - - -class SearchWebSearchActionType(RootModel[Literal['search']]): - root: Literal['search'] = Field(..., title='SearchWebSearchActionType') - - -class SearchWebSearchAction(BaseModel): - queries: list[str] | None = None - query: str | None = None - type: SearchWebSearchActionType = Field(..., title='SearchWebSearchActionType') - - -class OpenPageWebSearchActionType(RootModel[Literal['openPage']]): - root: Literal['openPage'] = Field(..., title='OpenPageWebSearchActionType') - - -class OpenPageWebSearchAction(BaseModel): - type: OpenPageWebSearchActionType = Field(..., title='OpenPageWebSearchActionType') - url: str | None = None - - -class FindInPageWebSearchActionType(RootModel[Literal['findInPage']]): - root: Literal['findInPage'] = Field(..., title='FindInPageWebSearchActionType') - - -class FindInPageWebSearchAction(BaseModel): - pattern: str | None = None - type: FindInPageWebSearchActionType = Field( - ..., title='FindInPageWebSearchActionType' - ) - url: str | None = None - - -class OtherWebSearchActionType(RootModel[Literal['other']]): - root: Literal['other'] = Field(..., title='OtherWebSearchActionType') - - -class OtherWebSearchAction(BaseModel): - type: OtherWebSearchActionType = Field(..., title='OtherWebSearchActionType') - - -class WebSearchAction( - RootModel[ - SearchWebSearchAction - | OpenPageWebSearchAction - | FindInPageWebSearchAction - | OtherWebSearchAction - ] -): - root: ( - SearchWebSearchAction - | OpenPageWebSearchAction - | FindInPageWebSearchAction - | OtherWebSearchAction - ) - - -class AddPatchChangeKindType(RootModel[Literal['add']]): - root: Literal['add'] = Field(..., title='AddPatchChangeKindType') - - -class AddPatchChangeKind(BaseModel): - type: AddPatchChangeKindType = Field(..., title='AddPatchChangeKindType') - - -class DeletePatchChangeKindType(RootModel[Literal['delete']]): - root: Literal['delete'] = Field(..., title='DeletePatchChangeKindType') - - -class DeletePatchChangeKind(BaseModel): - type: DeletePatchChangeKindType = Field(..., title='DeletePatchChangeKindType') - - -class UpdatePatchChangeKindType(RootModel[Literal['update']]): - root: Literal['update'] = Field(..., title='UpdatePatchChangeKindType') - - -class UpdatePatchChangeKind(BaseModel): - move_path: str | None = None - type: UpdatePatchChangeKindType = Field(..., title='UpdatePatchChangeKindType') - - -class PatchChangeKind( - RootModel[AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind] -): - root: AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind - - -class McpToolCallResult(BaseModel): - content: list[Any] - structured_content: Any | None = Field(None, alias='structuredContent') - - -class CommandExecTerminalSize(BaseModel): - cols: int = Field(..., description='Terminal width in character cells.', ge=0) - rows: int = Field(..., description='Terminal height in character cells.', ge=0) - - -class ModelListParams(BaseModel): - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - include_hidden: bool | None = Field( - default=None, - alias='includeHidden', - description='When true, include models that are hidden from the default picker list.', - ) - limit: int | None = Field( - default=None, - description='Optional page size; defaults to a reasonable server-side value.', - ge=0, - ) - - -class AbsolutePathBuf(RootModel[str]): - root: str = Field( - ..., - 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.', - ) - - -class ModeKind(StrEnum): - plan = 'plan' - default = 'default' - - -class McpServerOauthLoginParams(BaseModel): - name: str - scopes: list[str] | None = None - timeout_secs: int | None = Field(default=None, alias='timeoutSecs') - - -class AgentMessageDeltaNotification(BaseModel): - delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class SkillsChangedNotification(BaseModel): - pass - - -class AppsListParams(BaseModel): - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - force_refetch: bool | None = Field( - default=None, - alias='forceRefetch', - description='When true, bypass app caches and fetch the latest data from sources.', - ) - limit: int | None = Field( - default=None, - description='Optional page size; defaults to a reasonable server-side value.', - ge=0, - ) - thread_id: str | None = Field( - default=None, - alias='threadId', - description="Optional thread id used to evaluate app feature gating from that thread's config.", - ) - - -class CreditsSnapshot(BaseModel): - balance: str | None = None - has_credits: bool = Field(..., alias='hasCredits') - unlimited: bool - - -class RateLimitWindow(BaseModel): - resets_at: int | None = Field(default=None, alias='resetsAt') - used_percent: int = Field(..., alias='usedPercent') - window_duration_mins: int | None = Field(default=None, alias='windowDurationMins') - - -class PlanType(StrEnum): - free = 'free' - go = 'go' - plus = 'plus' - pro = 'pro' - team = 'team' - business = 'business' - enterprise = 'enterprise' - edu = 'edu' - unknown = 'unknown' - - class CodexErrorInfo1(StrEnum): - context_window_exceeded = 'contextWindowExceeded' - usage_limit_exceeded = 'usageLimitExceeded' - server_overloaded = 'serverOverloaded' - internal_server_error = 'internalServerError' - unauthorized = 'unauthorized' - bad_request = 'badRequest' - thread_rollback_failed = 'threadRollbackFailed' - sandbox_error = 'sandboxError' - other = 'other' + context_window_exceeded = "contextWindowExceeded" + usage_limit_exceeded = "usageLimitExceeded" + server_overloaded = "serverOverloaded" + internal_server_error = "internalServerError" + unauthorized = "unauthorized" + bad_request = "badRequest" + thread_rollback_failed = "threadRollbackFailed" + sandbox_error = "sandboxError" + other = "other" class HttpConnectionFailed(BaseModel): - http_status_code: int | None = Field(default=None, alias='httpStatusCode', ge=0) + http_status_code: int | None = Field(default=None, alias="httpStatusCode", ge=0) class HttpConnectionFailedCodexErrorInfo(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) http_connection_failed: HttpConnectionFailed = Field( - ..., alias='httpConnectionFailed' + ..., alias="httpConnectionFailed" ) class ResponseStreamConnectionFailed(BaseModel): - http_status_code: int | None = Field(default=None, alias='httpStatusCode', ge=0) + http_status_code: int | None = Field(default=None, alias="httpStatusCode", ge=0) class ResponseStreamConnectionFailedCodexErrorInfo(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) response_stream_connection_failed: ResponseStreamConnectionFailed = Field( - ..., alias='responseStreamConnectionFailed' + ..., alias="responseStreamConnectionFailed" ) class ResponseStreamDisconnected(BaseModel): - http_status_code: int | None = Field(default=None, alias='httpStatusCode', ge=0) + http_status_code: int | None = Field(default=None, alias="httpStatusCode", ge=0) class ResponseStreamDisconnectedCodexErrorInfo(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) response_stream_disconnected: ResponseStreamDisconnected = Field( - ..., alias='responseStreamDisconnected' + ..., alias="responseStreamDisconnected" ) class ResponseTooManyFailedAttempts(BaseModel): - http_status_code: int | None = Field(default=None, alias='httpStatusCode', ge=0) + http_status_code: int | None = Field(default=None, alias="httpStatusCode", ge=0) class ResponseTooManyFailedAttemptsCodexErrorInfo(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) response_too_many_failed_attempts: ResponseTooManyFailedAttempts = Field( - ..., alias='responseTooManyFailedAttempts' + ..., alias="responseTooManyFailedAttempts" ) @@ -3109,148 +573,1374 @@ class CodexErrorInfo( | ResponseTooManyFailedAttemptsCodexErrorInfo ) = Field( ..., - 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.', + 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.", ) -class WindowsWorldWritableWarningNotification(BaseModel): - extra_count: int = Field(..., alias='extraCount', ge=0) - failed_scan: bool = Field(..., alias='failedScan') - sample_paths: list[str] = Field(..., alias='samplePaths') +class CollabAgentStatus(StrEnum): + pending_init = "pendingInit" + running = "running" + completed = "completed" + errored = "errored" + shutdown = "shutdown" + not_found = "notFound" -class ThreadLoadedListParams(BaseModel): - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - limit: int | None = Field( - default=None, description='Optional page size; defaults to no limit.', ge=0 +class CollabAgentTool(StrEnum): + spawn_agent = "spawnAgent" + send_input = "sendInput" + resume_agent = "resumeAgent" + wait = "wait" + close_agent = "closeAgent" + + +class CollabAgentToolCallStatus(StrEnum): + in_progress = "inProgress" + completed = "completed" + failed = "failed" + + +class ReadCommandActionType(RootModel[Literal["read"]]): + root: Literal["read"] = Field(..., title="ReadCommandActionType") + + +class ReadCommandAction(BaseModel): + command: str + name: str + path: str + type: ReadCommandActionType = Field(..., title="ReadCommandActionType") + + +class ListFilesCommandActionType(RootModel[Literal["listFiles"]]): + root: Literal["listFiles"] = Field(..., title="ListFilesCommandActionType") + + +class ListFilesCommandAction(BaseModel): + command: str + path: str | None = None + type: ListFilesCommandActionType = Field(..., title="ListFilesCommandActionType") + + +class SearchCommandActionType(RootModel[Literal["search"]]): + root: Literal["search"] = Field(..., title="SearchCommandActionType") + + +class SearchCommandAction(BaseModel): + command: str + path: str | None = None + query: str | None = None + type: SearchCommandActionType = Field(..., title="SearchCommandActionType") + + +class UnknownCommandActionType(RootModel[Literal["unknown"]]): + root: Literal["unknown"] = Field(..., title="UnknownCommandActionType") + + +class UnknownCommandAction(BaseModel): + command: str + type: UnknownCommandActionType = Field(..., title="UnknownCommandActionType") + + +class CommandAction( + RootModel[ + ReadCommandAction + | ListFilesCommandAction + | SearchCommandAction + | UnknownCommandAction + ] +): + root: ( + ReadCommandAction + | ListFilesCommandAction + | SearchCommandAction + | UnknownCommandAction ) -class ThreadRealtimeAudioChunk(BaseModel): - data: str - num_channels: int = Field(..., alias='numChannels', ge=0) - sample_rate: int = Field(..., alias='sampleRate', ge=0) - samples_per_channel: int | None = Field( - default=None, alias='samplesPerChannel', ge=0 +class CommandExecOutputStream(RootModel[Literal["stdout"] | Literal["stderr"]]): + root: Literal["stdout"] | Literal["stderr"] = Field( + ..., description="Stream label for `command/exec/outputDelta` notifications." ) -class TurnError(BaseModel): - additional_details: str | None = Field(default=None, alias='additionalDetails') - codex_error_info: CodexErrorInfo | None = Field( - default=None, alias='codexErrorInfo' - ) - message: str - - -class TurnStatus(StrEnum): - completed = 'completed' - interrupted = 'interrupted' - failed = 'failed' - in_progress = 'inProgress' - - -class SessionSource1(StrEnum): - cli = 'cli' - vscode = 'vscode' - exec = 'exec' - app_server = 'appServer' - unknown = 'unknown' - - -class SubAgentSource1(StrEnum): - review = 'review' - compact = 'compact' - memory_consolidation = 'memory_consolidation' - - -class OtherSubAgentSource(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - other: str - - -class ThreadId(RootModel[str]): - root: str - - -class GitInfo(BaseModel): - branch: str | None = None - origin_url: str | None = Field(default=None, alias='originUrl') - sha: str | None = None - - -class ExternalAgentConfigMigrationItemType(StrEnum): - agents_md = 'AGENTS_MD' - config = 'CONFIG' - skills = 'SKILLS' - mcp_server_config = 'MCP_SERVER_CONFIG' - - -class SkillsListExtraRootsForCwd(BaseModel): - cwd: str - extra_user_roots: list[str] = Field(..., alias='extraUserRoots') +class CommandExecTerminalSize(BaseModel): + cols: int = Field(..., description="Terminal width in character cells.", ge=0) + rows: int = Field(..., description="Terminal height in character cells.", ge=0) class CommandExecTerminateParams(BaseModel): process_id: str = Field( ..., - alias='processId', - description='Client-supplied, connection-scoped `processId` from the original `command/exec` request.', + alias="processId", + description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.", ) -class ApiKeyv2LoginAccountParamsType(RootModel[Literal['apiKey']]): - root: Literal['apiKey'] = Field(..., title='ApiKeyv2::LoginAccountParamsType') +class CommandExecWriteParams(BaseModel): + close_stdin: bool | None = Field( + default=None, + alias="closeStdin", + description="Close stdin after writing `deltaBase64`, if present.", + ) + delta_base64: str | None = Field( + default=None, + alias="deltaBase64", + description="Optional base64-encoded stdin bytes to write.", + ) + process_id: str = Field( + ..., + alias="processId", + description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.", + ) + + +class AcceptWithExecpolicyAmendment(BaseModel): + execpolicy_amendment: list[str] + + +class AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + accept_with_execpolicy_amendment: AcceptWithExecpolicyAmendment = Field( + ..., alias="acceptWithExecpolicyAmendment" + ) + + +class CommandExecutionOutputDeltaNotification(BaseModel): + delta: str + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class CommandExecutionRequestApprovalSkillMetadata(BaseModel): + path_to_skills_md: str = Field(..., alias="pathToSkillsMd") + + +class CommandExecutionStatus(StrEnum): + in_progress = "inProgress" + completed = "completed" + failed = "failed" + declined = "declined" + + +class ConfigReadParams(BaseModel): + cwd: str | None = Field( + default=None, + 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).", + ) + include_layers: bool | None = Field(default=False, alias="includeLayers") + + +class InputTextContentItemType(RootModel[Literal["input_text"]]): + root: Literal["input_text"] = Field(..., title="InputTextContentItemType") + + +class InputTextContentItem(BaseModel): + text: str + type: InputTextContentItemType = Field(..., title="InputTextContentItemType") + + +class InputImageContentItemType(RootModel[Literal["input_image"]]): + root: Literal["input_image"] = Field(..., title="InputImageContentItemType") + + +class InputImageContentItem(BaseModel): + image_url: str + type: InputImageContentItemType = Field(..., title="InputImageContentItemType") + + +class OutputTextContentItemType(RootModel[Literal["output_text"]]): + root: Literal["output_text"] = Field(..., title="OutputTextContentItemType") + + +class OutputTextContentItem(BaseModel): + text: str + type: OutputTextContentItemType = Field(..., title="OutputTextContentItemType") + + +class ContentItem( + RootModel[InputTextContentItem | InputImageContentItem | OutputTextContentItem] +): + root: InputTextContentItem | InputImageContentItem | OutputTextContentItem + + +class ContextCompactedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class CreditsSnapshot(BaseModel): + balance: str | None = None + has_credits: bool = Field(..., alias="hasCredits") + unlimited: bool + + +class CustomPrompt(BaseModel): + argument_hint: str | None = None + content: str + description: str | None = None + name: str + path: str + + +class DeprecationNoticeNotification(BaseModel): + details: str | None = Field( + default=None, + description="Optional extra guidance, such as migration steps or rationale.", + ) + summary: str = Field(..., description="Concise summary of what is deprecated.") + + +class Duration(BaseModel): + nanos: int = Field(..., ge=0) + secs: int = Field(..., ge=0) + + +class InputTextDynamicToolCallOutputContentItemType(RootModel[Literal["inputText"]]): + root: Literal["inputText"] = Field( + ..., title="InputTextDynamicToolCallOutputContentItemType" + ) + + +class InputTextDynamicToolCallOutputContentItem(BaseModel): + text: str + type: InputTextDynamicToolCallOutputContentItemType = Field( + ..., title="InputTextDynamicToolCallOutputContentItemType" + ) + + +class InputImageDynamicToolCallOutputContentItemType(RootModel[Literal["inputImage"]]): + root: Literal["inputImage"] = Field( + ..., title="InputImageDynamicToolCallOutputContentItemType" + ) + + +class InputImageDynamicToolCallOutputContentItem(BaseModel): + image_url: str = Field(..., alias="imageUrl") + type: InputImageDynamicToolCallOutputContentItemType = Field( + ..., title="InputImageDynamicToolCallOutputContentItemType" + ) + + +class DynamicToolCallOutputContentItem( + RootModel[ + InputTextDynamicToolCallOutputContentItem + | InputImageDynamicToolCallOutputContentItem + ] +): + root: ( + InputTextDynamicToolCallOutputContentItem + | InputImageDynamicToolCallOutputContentItem + ) + + +class DynamicToolCallParams(BaseModel): + arguments: Any + call_id: str = Field(..., alias="callId") + thread_id: str = Field(..., alias="threadId") + tool: str + turn_id: str = Field(..., alias="turnId") + + +class DynamicToolCallResponse(BaseModel): + content_items: list[DynamicToolCallOutputContentItem] = Field( + ..., alias="contentItems" + ) + success: bool + + +class DynamicToolCallStatus(StrEnum): + in_progress = "inProgress" + completed = "completed" + failed = "failed" + + +class ElicitationRequest1(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + message: str + mode: Literal["form"] + requested_schema: Any + + +class ElicitationRequest2(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + elicitation_id: str + message: str + mode: Literal["url"] + url: str + + +class ElicitationRequest(RootModel[ElicitationRequest1 | ElicitationRequest2]): + root: ElicitationRequest1 | ElicitationRequest2 + + +class ErrorEventMsgType(RootModel[Literal["error"]]): + root: Literal["error"] = Field(..., title="ErrorEventMsgType") + + +class ErrorEventMsg(BaseModel): + codex_error_info: CodexErrorInfo | None = None + message: str + type: ErrorEventMsgType = Field(..., title="ErrorEventMsgType") + + +class WarningEventMsgType(RootModel[Literal["warning"]]): + root: Literal["warning"] = Field(..., title="WarningEventMsgType") + + +class WarningEventMsg(BaseModel): + message: str + type: WarningEventMsgType = Field(..., title="WarningEventMsgType") + + +class RealtimeConversationStartedEventMsgType( + RootModel[Literal["realtime_conversation_started"]] +): + root: Literal["realtime_conversation_started"] = Field( + ..., title="RealtimeConversationStartedEventMsgType" + ) + + +class RealtimeConversationStartedEventMsg(BaseModel): + session_id: str | None = None + type: RealtimeConversationStartedEventMsgType = Field( + ..., title="RealtimeConversationStartedEventMsgType" + ) + + +class RealtimeConversationRealtimeEventMsgType( + RootModel[Literal["realtime_conversation_realtime"]] +): + root: Literal["realtime_conversation_realtime"] = Field( + ..., title="RealtimeConversationRealtimeEventMsgType" + ) + + +class RealtimeConversationClosedEventMsgType( + RootModel[Literal["realtime_conversation_closed"]] +): + root: Literal["realtime_conversation_closed"] = Field( + ..., title="RealtimeConversationClosedEventMsgType" + ) + + +class RealtimeConversationClosedEventMsg(BaseModel): + reason: str | None = None + type: RealtimeConversationClosedEventMsgType = Field( + ..., title="RealtimeConversationClosedEventMsgType" + ) + + +class ModelRerouteEventMsgType(RootModel[Literal["model_reroute"]]): + root: Literal["model_reroute"] = Field(..., title="ModelRerouteEventMsgType") + + +class ContextCompactedEventMsgType(RootModel[Literal["context_compacted"]]): + root: Literal["context_compacted"] = Field( + ..., title="ContextCompactedEventMsgType" + ) + + +class ContextCompactedEventMsg(BaseModel): + type: ContextCompactedEventMsgType = Field( + ..., title="ContextCompactedEventMsgType" + ) + + +class ThreadRolledBackEventMsgType(RootModel[Literal["thread_rolled_back"]]): + root: Literal["thread_rolled_back"] = Field( + ..., title="ThreadRolledBackEventMsgType" + ) + + +class ThreadRolledBackEventMsg(BaseModel): + num_turns: int = Field( + ..., description="Number of user turns that were removed from context.", ge=0 + ) + type: ThreadRolledBackEventMsgType = Field( + ..., title="ThreadRolledBackEventMsgType" + ) + + +class TaskStartedEventMsgType(RootModel[Literal["task_started"]]): + root: Literal["task_started"] = Field(..., title="TaskStartedEventMsgType") + + +class TaskCompleteEventMsgType(RootModel[Literal["task_complete"]]): + root: Literal["task_complete"] = Field(..., title="TaskCompleteEventMsgType") + + +class TaskCompleteEventMsg(BaseModel): + last_agent_message: str | None = None + turn_id: str + type: TaskCompleteEventMsgType = Field(..., title="TaskCompleteEventMsgType") + + +class TokenCountEventMsgType(RootModel[Literal["token_count"]]): + root: Literal["token_count"] = Field(..., title="TokenCountEventMsgType") + + +class AgentMessageEventMsgType(RootModel[Literal["agent_message"]]): + root: Literal["agent_message"] = Field(..., title="AgentMessageEventMsgType") + + +class UserMessageEventMsgType(RootModel[Literal["user_message"]]): + root: Literal["user_message"] = Field(..., title="UserMessageEventMsgType") + + +class AgentMessageDeltaEventMsgType(RootModel[Literal["agent_message_delta"]]): + root: Literal["agent_message_delta"] = Field( + ..., title="AgentMessageDeltaEventMsgType" + ) + + +class AgentMessageDeltaEventMsg(BaseModel): + delta: str + type: AgentMessageDeltaEventMsgType = Field( + ..., title="AgentMessageDeltaEventMsgType" + ) + + +class AgentReasoningEventMsgType(RootModel[Literal["agent_reasoning"]]): + root: Literal["agent_reasoning"] = Field(..., title="AgentReasoningEventMsgType") + + +class AgentReasoningEventMsg(BaseModel): + text: str + type: AgentReasoningEventMsgType = Field(..., title="AgentReasoningEventMsgType") + + +class AgentReasoningDeltaEventMsgType(RootModel[Literal["agent_reasoning_delta"]]): + root: Literal["agent_reasoning_delta"] = Field( + ..., title="AgentReasoningDeltaEventMsgType" + ) + + +class AgentReasoningDeltaEventMsg(BaseModel): + delta: str + type: AgentReasoningDeltaEventMsgType = Field( + ..., title="AgentReasoningDeltaEventMsgType" + ) + + +class AgentReasoningRawContentEventMsgType( + RootModel[Literal["agent_reasoning_raw_content"]] +): + root: Literal["agent_reasoning_raw_content"] = Field( + ..., title="AgentReasoningRawContentEventMsgType" + ) + + +class AgentReasoningRawContentEventMsg(BaseModel): + text: str + type: AgentReasoningRawContentEventMsgType = Field( + ..., title="AgentReasoningRawContentEventMsgType" + ) + + +class AgentReasoningRawContentDeltaEventMsgType( + RootModel[Literal["agent_reasoning_raw_content_delta"]] +): + root: Literal["agent_reasoning_raw_content_delta"] = Field( + ..., title="AgentReasoningRawContentDeltaEventMsgType" + ) + + +class AgentReasoningRawContentDeltaEventMsg(BaseModel): + delta: str + type: AgentReasoningRawContentDeltaEventMsgType = Field( + ..., title="AgentReasoningRawContentDeltaEventMsgType" + ) + + +class AgentReasoningSectionBreakEventMsgType( + RootModel[Literal["agent_reasoning_section_break"]] +): + root: Literal["agent_reasoning_section_break"] = Field( + ..., title="AgentReasoningSectionBreakEventMsgType" + ) + + +class AgentReasoningSectionBreakEventMsg(BaseModel): + item_id: str | None = "" + summary_index: int | None = 0 + type: AgentReasoningSectionBreakEventMsgType = Field( + ..., title="AgentReasoningSectionBreakEventMsgType" + ) + + +class SessionConfiguredEventMsgType(RootModel[Literal["session_configured"]]): + root: Literal["session_configured"] = Field( + ..., title="SessionConfiguredEventMsgType" + ) + + +class ThreadNameUpdatedEventMsgType(RootModel[Literal["thread_name_updated"]]): + root: Literal["thread_name_updated"] = Field( + ..., title="ThreadNameUpdatedEventMsgType" + ) + + +class McpStartupUpdateEventMsgType(RootModel[Literal["mcp_startup_update"]]): + root: Literal["mcp_startup_update"] = Field( + ..., title="McpStartupUpdateEventMsgType" + ) + + +class McpStartupCompleteEventMsgType(RootModel[Literal["mcp_startup_complete"]]): + root: Literal["mcp_startup_complete"] = Field( + ..., title="McpStartupCompleteEventMsgType" + ) + + +class McpToolCallBeginEventMsgType(RootModel[Literal["mcp_tool_call_begin"]]): + root: Literal["mcp_tool_call_begin"] = Field( + ..., title="McpToolCallBeginEventMsgType" + ) + + +class McpToolCallEndEventMsgType(RootModel[Literal["mcp_tool_call_end"]]): + root: Literal["mcp_tool_call_end"] = Field(..., title="McpToolCallEndEventMsgType") + + +class WebSearchBeginEventMsgType(RootModel[Literal["web_search_begin"]]): + root: Literal["web_search_begin"] = Field(..., title="WebSearchBeginEventMsgType") + + +class WebSearchBeginEventMsg(BaseModel): + call_id: str + type: WebSearchBeginEventMsgType = Field(..., title="WebSearchBeginEventMsgType") + + +class WebSearchEndEventMsgType(RootModel[Literal["web_search_end"]]): + root: Literal["web_search_end"] = Field(..., title="WebSearchEndEventMsgType") + + +class ImageGenerationBeginEventMsgType(RootModel[Literal["image_generation_begin"]]): + root: Literal["image_generation_begin"] = Field( + ..., title="ImageGenerationBeginEventMsgType" + ) + + +class ImageGenerationBeginEventMsg(BaseModel): + call_id: str + type: ImageGenerationBeginEventMsgType = Field( + ..., title="ImageGenerationBeginEventMsgType" + ) + + +class ImageGenerationEndEventMsgType(RootModel[Literal["image_generation_end"]]): + root: Literal["image_generation_end"] = Field( + ..., title="ImageGenerationEndEventMsgType" + ) + + +class ImageGenerationEndEventMsg(BaseModel): + call_id: str + result: str + revised_prompt: str | None = None + saved_path: str | None = None + status: str + type: ImageGenerationEndEventMsgType = Field( + ..., title="ImageGenerationEndEventMsgType" + ) + + +class ExecCommandBeginEventMsgType(RootModel[Literal["exec_command_begin"]]): + root: Literal["exec_command_begin"] = Field( + ..., title="ExecCommandBeginEventMsgType" + ) + + +class ExecCommandOutputDeltaEventMsgType( + RootModel[Literal["exec_command_output_delta"]] +): + root: Literal["exec_command_output_delta"] = Field( + ..., title="ExecCommandOutputDeltaEventMsgType" + ) + + +class TerminalInteractionEventMsgType(RootModel[Literal["terminal_interaction"]]): + root: Literal["terminal_interaction"] = Field( + ..., title="TerminalInteractionEventMsgType" + ) + + +class TerminalInteractionEventMsg(BaseModel): + call_id: str = Field( + ..., description="Identifier for the ExecCommandBegin that produced this chunk." + ) + process_id: str = Field( + ..., description="Process id associated with the running command." + ) + stdin: str = Field(..., description="Stdin sent to the running session.") + type: TerminalInteractionEventMsgType = Field( + ..., title="TerminalInteractionEventMsgType" + ) + + +class ExecCommandEndEventMsgType(RootModel[Literal["exec_command_end"]]): + root: Literal["exec_command_end"] = Field(..., title="ExecCommandEndEventMsgType") + + +class ViewImageToolCallEventMsgType(RootModel[Literal["view_image_tool_call"]]): + root: Literal["view_image_tool_call"] = Field( + ..., title="ViewImageToolCallEventMsgType" + ) + + +class ViewImageToolCallEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the originating tool call.") + path: str = Field(..., description="Local filesystem path provided to the tool.") + type: ViewImageToolCallEventMsgType = Field( + ..., title="ViewImageToolCallEventMsgType" + ) + + +class ExecApprovalRequestEventMsgType(RootModel[Literal["exec_approval_request"]]): + root: Literal["exec_approval_request"] = Field( + ..., title="ExecApprovalRequestEventMsgType" + ) + + +class RequestPermissionsEventMsgType(RootModel[Literal["request_permissions"]]): + root: Literal["request_permissions"] = Field( + ..., title="RequestPermissionsEventMsgType" + ) + + +class RequestUserInputEventMsgType(RootModel[Literal["request_user_input"]]): + root: Literal["request_user_input"] = Field( + ..., title="RequestUserInputEventMsgType" + ) + + +class DynamicToolCallRequestEventMsgType( + RootModel[Literal["dynamic_tool_call_request"]] +): + root: Literal["dynamic_tool_call_request"] = Field( + ..., title="DynamicToolCallRequestEventMsgType" + ) + + +class DynamicToolCallRequestEventMsg(BaseModel): + arguments: Any + call_id: str = Field(..., alias="callId") + tool: str + turn_id: str = Field(..., alias="turnId") + type: DynamicToolCallRequestEventMsgType = Field( + ..., title="DynamicToolCallRequestEventMsgType" + ) + + +class DynamicToolCallResponseEventMsgType( + RootModel[Literal["dynamic_tool_call_response"]] +): + root: Literal["dynamic_tool_call_response"] = Field( + ..., title="DynamicToolCallResponseEventMsgType" + ) + + +class DynamicToolCallResponseEventMsg(BaseModel): + arguments: Any = Field(..., description="Dynamic tool call arguments.") + call_id: str = Field( + ..., description="Identifier for the corresponding DynamicToolCallRequest." + ) + content_items: list[DynamicToolCallOutputContentItem] = Field( + ..., description="Dynamic tool response content items." + ) + duration: Duration = Field( + ..., description="The duration of the dynamic tool call." + ) + error: str | None = Field( + default=None, + description="Optional error text when the tool call failed before producing a response.", + ) + success: bool = Field(..., description="Whether the tool call succeeded.") + tool: str = Field(..., description="Dynamic tool name.") + turn_id: str = Field( + ..., description="Turn ID that this dynamic tool call belongs to." + ) + type: DynamicToolCallResponseEventMsgType = Field( + ..., title="DynamicToolCallResponseEventMsgType" + ) + + +class ElicitationRequestEventMsgType(RootModel[Literal["elicitation_request"]]): + root: Literal["elicitation_request"] = Field( + ..., title="ElicitationRequestEventMsgType" + ) + + +class ApplyPatchApprovalRequestEventMsgType( + RootModel[Literal["apply_patch_approval_request"]] +): + root: Literal["apply_patch_approval_request"] = Field( + ..., title="ApplyPatchApprovalRequestEventMsgType" + ) + + +class DeprecationNoticeEventMsgType(RootModel[Literal["deprecation_notice"]]): + root: Literal["deprecation_notice"] = Field( + ..., title="DeprecationNoticeEventMsgType" + ) + + +class DeprecationNoticeEventMsg(BaseModel): + details: str | None = Field( + default=None, + description="Optional extra guidance, such as migration steps or rationale.", + ) + summary: str = Field(..., description="Concise summary of what is deprecated.") + type: DeprecationNoticeEventMsgType = Field( + ..., title="DeprecationNoticeEventMsgType" + ) + + +class BackgroundEventEventMsgType(RootModel[Literal["background_event"]]): + root: Literal["background_event"] = Field(..., title="BackgroundEventEventMsgType") + + +class BackgroundEventEventMsg(BaseModel): + message: str + type: BackgroundEventEventMsgType = Field(..., title="BackgroundEventEventMsgType") + + +class UndoStartedEventMsgType(RootModel[Literal["undo_started"]]): + root: Literal["undo_started"] = Field(..., title="UndoStartedEventMsgType") + + +class UndoStartedEventMsg(BaseModel): + message: str | None = None + type: UndoStartedEventMsgType = Field(..., title="UndoStartedEventMsgType") + + +class UndoCompletedEventMsgType(RootModel[Literal["undo_completed"]]): + root: Literal["undo_completed"] = Field(..., title="UndoCompletedEventMsgType") + + +class UndoCompletedEventMsg(BaseModel): + message: str | None = None + success: bool + type: UndoCompletedEventMsgType = Field(..., title="UndoCompletedEventMsgType") + + +class StreamErrorEventMsgType(RootModel[Literal["stream_error"]]): + root: Literal["stream_error"] = Field(..., title="StreamErrorEventMsgType") + + +class StreamErrorEventMsg(BaseModel): + additional_details: str | None = Field( + default=None, + description="Optional details about the underlying stream failure (often the same human-readable message that is surfaced as the terminal error if retries are exhausted).", + ) + codex_error_info: CodexErrorInfo | None = None + message: str + type: StreamErrorEventMsgType = Field(..., title="StreamErrorEventMsgType") + + +class PatchApplyBeginEventMsgType(RootModel[Literal["patch_apply_begin"]]): + root: Literal["patch_apply_begin"] = Field(..., title="PatchApplyBeginEventMsgType") + + +class PatchApplyEndEventMsgType(RootModel[Literal["patch_apply_end"]]): + root: Literal["patch_apply_end"] = Field(..., title="PatchApplyEndEventMsgType") + + +class TurnDiffEventMsgType(RootModel[Literal["turn_diff"]]): + root: Literal["turn_diff"] = Field(..., title="TurnDiffEventMsgType") + + +class TurnDiffEventMsg(BaseModel): + type: TurnDiffEventMsgType = Field(..., title="TurnDiffEventMsgType") + unified_diff: str + + +class GetHistoryEntryResponseEventMsgType( + RootModel[Literal["get_history_entry_response"]] +): + root: Literal["get_history_entry_response"] = Field( + ..., title="GetHistoryEntryResponseEventMsgType" + ) + + +class McpListToolsResponseEventMsgType(RootModel[Literal["mcp_list_tools_response"]]): + root: Literal["mcp_list_tools_response"] = Field( + ..., title="McpListToolsResponseEventMsgType" + ) + + +class ListCustomPromptsResponseEventMsgType( + RootModel[Literal["list_custom_prompts_response"]] +): + root: Literal["list_custom_prompts_response"] = Field( + ..., title="ListCustomPromptsResponseEventMsgType" + ) + + +class ListCustomPromptsResponseEventMsg(BaseModel): + custom_prompts: list[CustomPrompt] + type: ListCustomPromptsResponseEventMsgType = Field( + ..., title="ListCustomPromptsResponseEventMsgType" + ) + + +class ListSkillsResponseEventMsgType(RootModel[Literal["list_skills_response"]]): + root: Literal["list_skills_response"] = Field( + ..., title="ListSkillsResponseEventMsgType" + ) + + +class ListRemoteSkillsResponseEventMsgType( + RootModel[Literal["list_remote_skills_response"]] +): + root: Literal["list_remote_skills_response"] = Field( + ..., title="ListRemoteSkillsResponseEventMsgType" + ) + + +class RemoteSkillDownloadedEventMsgType(RootModel[Literal["remote_skill_downloaded"]]): + root: Literal["remote_skill_downloaded"] = Field( + ..., title="RemoteSkillDownloadedEventMsgType" + ) + + +class RemoteSkillDownloadedEventMsg(BaseModel): + id: str + name: str + path: str + type: RemoteSkillDownloadedEventMsgType = Field( + ..., title="RemoteSkillDownloadedEventMsgType" + ) + + +class SkillsUpdateAvailableEventMsgType(RootModel[Literal["skills_update_available"]]): + root: Literal["skills_update_available"] = Field( + ..., title="SkillsUpdateAvailableEventMsgType" + ) + + +class SkillsUpdateAvailableEventMsg(BaseModel): + type: SkillsUpdateAvailableEventMsgType = Field( + ..., title="SkillsUpdateAvailableEventMsgType" + ) + + +class PlanUpdateEventMsgType(RootModel[Literal["plan_update"]]): + root: Literal["plan_update"] = Field(..., title="PlanUpdateEventMsgType") + + +class TurnAbortedEventMsgType(RootModel[Literal["turn_aborted"]]): + root: Literal["turn_aborted"] = Field(..., title="TurnAbortedEventMsgType") + + +class ShutdownCompleteEventMsgType(RootModel[Literal["shutdown_complete"]]): + root: Literal["shutdown_complete"] = Field( + ..., title="ShutdownCompleteEventMsgType" + ) + + +class ShutdownCompleteEventMsg(BaseModel): + type: ShutdownCompleteEventMsgType = Field( + ..., title="ShutdownCompleteEventMsgType" + ) + + +class EnteredReviewModeEventMsgType(RootModel[Literal["entered_review_mode"]]): + root: Literal["entered_review_mode"] = Field( + ..., title="EnteredReviewModeEventMsgType" + ) + + +class ExitedReviewModeEventMsgType(RootModel[Literal["exited_review_mode"]]): + root: Literal["exited_review_mode"] = Field( + ..., title="ExitedReviewModeEventMsgType" + ) + + +class RawResponseItemEventMsgType(RootModel[Literal["raw_response_item"]]): + root: Literal["raw_response_item"] = Field(..., title="RawResponseItemEventMsgType") + + +class ItemStartedEventMsgType(RootModel[Literal["item_started"]]): + root: Literal["item_started"] = Field(..., title="ItemStartedEventMsgType") + + +class ItemCompletedEventMsgType(RootModel[Literal["item_completed"]]): + root: Literal["item_completed"] = Field(..., title="ItemCompletedEventMsgType") + + +class AgentMessageContentDeltaEventMsgType( + RootModel[Literal["agent_message_content_delta"]] +): + root: Literal["agent_message_content_delta"] = Field( + ..., title="AgentMessageContentDeltaEventMsgType" + ) + + +class AgentMessageContentDeltaEventMsg(BaseModel): + delta: str + item_id: str + thread_id: str + turn_id: str + type: AgentMessageContentDeltaEventMsgType = Field( + ..., title="AgentMessageContentDeltaEventMsgType" + ) + + +class PlanDeltaEventMsgType(RootModel[Literal["plan_delta"]]): + root: Literal["plan_delta"] = Field(..., title="PlanDeltaEventMsgType") + + +class PlanDeltaEventMsg(BaseModel): + delta: str + item_id: str + thread_id: str + turn_id: str + type: PlanDeltaEventMsgType = Field(..., title="PlanDeltaEventMsgType") + + +class ReasoningContentDeltaEventMsgType(RootModel[Literal["reasoning_content_delta"]]): + root: Literal["reasoning_content_delta"] = Field( + ..., title="ReasoningContentDeltaEventMsgType" + ) + + +class ReasoningContentDeltaEventMsg(BaseModel): + delta: str + item_id: str + summary_index: int | None = 0 + thread_id: str + turn_id: str + type: ReasoningContentDeltaEventMsgType = Field( + ..., title="ReasoningContentDeltaEventMsgType" + ) + + +class ReasoningRawContentDeltaEventMsgType( + RootModel[Literal["reasoning_raw_content_delta"]] +): + root: Literal["reasoning_raw_content_delta"] = Field( + ..., title="ReasoningRawContentDeltaEventMsgType" + ) + + +class ReasoningRawContentDeltaEventMsg(BaseModel): + content_index: int | None = 0 + delta: str + item_id: str + thread_id: str + turn_id: str + type: ReasoningRawContentDeltaEventMsgType = Field( + ..., title="ReasoningRawContentDeltaEventMsgType" + ) + + +class CollabAgentSpawnBeginEventMsgType(RootModel[Literal["collab_agent_spawn_begin"]]): + root: Literal["collab_agent_spawn_begin"] = Field( + ..., title="CollabAgentSpawnBeginEventMsgType" + ) + + +class CollabAgentSpawnEndEventMsgType(RootModel[Literal["collab_agent_spawn_end"]]): + root: Literal["collab_agent_spawn_end"] = Field( + ..., title="CollabAgentSpawnEndEventMsgType" + ) + + +class CollabAgentInteractionBeginEventMsgType( + RootModel[Literal["collab_agent_interaction_begin"]] +): + root: Literal["collab_agent_interaction_begin"] = Field( + ..., title="CollabAgentInteractionBeginEventMsgType" + ) + + +class CollabAgentInteractionEndEventMsgType( + RootModel[Literal["collab_agent_interaction_end"]] +): + root: Literal["collab_agent_interaction_end"] = Field( + ..., title="CollabAgentInteractionEndEventMsgType" + ) + + +class CollabWaitingBeginEventMsgType(RootModel[Literal["collab_waiting_begin"]]): + root: Literal["collab_waiting_begin"] = Field( + ..., title="CollabWaitingBeginEventMsgType" + ) + + +class CollabWaitingEndEventMsgType(RootModel[Literal["collab_waiting_end"]]): + root: Literal["collab_waiting_end"] = Field( + ..., title="CollabWaitingEndEventMsgType" + ) + + +class CollabCloseBeginEventMsgType(RootModel[Literal["collab_close_begin"]]): + root: Literal["collab_close_begin"] = Field( + ..., title="CollabCloseBeginEventMsgType" + ) + + +class CollabCloseEndEventMsgType(RootModel[Literal["collab_close_end"]]): + root: Literal["collab_close_end"] = Field(..., title="CollabCloseEndEventMsgType") + + +class CollabResumeBeginEventMsgType(RootModel[Literal["collab_resume_begin"]]): + root: Literal["collab_resume_begin"] = Field( + ..., title="CollabResumeBeginEventMsgType" + ) + + +class CollabResumeEndEventMsgType(RootModel[Literal["collab_resume_end"]]): + root: Literal["collab_resume_end"] = Field(..., title="CollabResumeEndEventMsgType") + + +class ExecApprovalRequestSkillMetadata(BaseModel): + path_to_skills_md: str + + +class ExecCommandSource(StrEnum): + agent = "agent" + user_shell = "user_shell" + unified_exec_startup = "unified_exec_startup" + unified_exec_interaction = "unified_exec_interaction" + + +class ExecCommandStatus(StrEnum): + completed = "completed" + failed = "failed" + declined = "declined" + + +class ExecOutputStream(StrEnum): + stdout = "stdout" + stderr = "stderr" + + +class ExperimentalFeatureListParams(BaseModel): + cursor: str | None = Field( + default=None, + description="Opaque pagination cursor returned by a previous call.", + ) + limit: int | None = Field( + default=None, + description="Optional page size; defaults to a reasonable server-side value.", + ge=0, + ) + + +class ExternalAgentConfigDetectParams(BaseModel): + cwds: list[str] | None = Field( + default=None, + description="Zero or more working directories to include for repo-scoped detection.", + ) + include_home: bool | None = Field( + default=None, + alias="includeHome", + description="If true, include detection under the user's home (~/.claude, ~/.codex, etc.).", + ) + + +class ExternalAgentConfigMigrationItemType(StrEnum): + agents_md = "AGENTS_MD" + config = "CONFIG" + skills = "SKILLS" + mcp_server_config = "MCP_SERVER_CONFIG" + + +class FeedbackUploadParams(BaseModel): + classification: str + extra_log_files: list[str] | None = Field(default=None, alias="extraLogFiles") + include_logs: bool = Field(..., alias="includeLogs") + reason: str | None = None + thread_id: str | None = Field(default=None, alias="threadId") + + +class AddFileChangeType(RootModel[Literal["add"]]): + root: Literal["add"] = Field(..., title="AddFileChangeType") + + +class AddFileChange(BaseModel): + content: str + type: AddFileChangeType = Field(..., title="AddFileChangeType") + + +class DeleteFileChangeType(RootModel[Literal["delete"]]): + root: Literal["delete"] = Field(..., title="DeleteFileChangeType") + + +class DeleteFileChange(BaseModel): + content: str + type: DeleteFileChangeType = Field(..., title="DeleteFileChangeType") + + +class UpdateFileChangeType(RootModel[Literal["update"]]): + root: Literal["update"] = Field(..., title="UpdateFileChangeType") + + +class UpdateFileChange(BaseModel): + move_path: str | None = None + type: UpdateFileChangeType = Field(..., title="UpdateFileChangeType") + unified_diff: str + + +class FileChange(RootModel[AddFileChange | DeleteFileChange | UpdateFileChange]): + root: AddFileChange | DeleteFileChange | UpdateFileChange + + +class FileChangeApprovalDecision( + RootModel[ + Literal["accept"] + | Literal["acceptForSession"] + | Literal["decline"] + | Literal["cancel"] + ] +): + root: ( + Literal["accept"] + | Literal["acceptForSession"] + | Literal["decline"] + | Literal["cancel"] + ) + + +class FileChangeOutputDeltaNotification(BaseModel): + delta: str + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class FileChangeRequestApprovalParams(BaseModel): + grant_root: str | None = Field( + default=None, + alias="grantRoot", + description="[UNSTABLE] When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).", + ) + item_id: str = Field(..., alias="itemId") + reason: str | None = Field( + default=None, + description="Optional explanatory reason (e.g. request for extra write access).", + ) + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class FileChangeRequestApprovalResponse(BaseModel): + decision: FileChangeApprovalDecision + + +class FileSystemPermissions(BaseModel): + read: list[AbsolutePathBuf] | None = None + write: list[AbsolutePathBuf] | None = None + + +class InputTextFunctionCallOutputContentItemType(RootModel[Literal["input_text"]]): + root: Literal["input_text"] = Field( + ..., title="InputTextFunctionCallOutputContentItemType" + ) + + +class InputTextFunctionCallOutputContentItem(BaseModel): + text: str + type: InputTextFunctionCallOutputContentItemType = Field( + ..., title="InputTextFunctionCallOutputContentItemType" + ) + + +class InputImageFunctionCallOutputContentItemType(RootModel[Literal["input_image"]]): + root: Literal["input_image"] = Field( + ..., title="InputImageFunctionCallOutputContentItemType" + ) + + +class FuzzyFileSearchParams(BaseModel): + cancellation_token: str | None = Field(default=None, alias="cancellationToken") + query: str + roots: list[str] + + +class Indice(RootModel[int]): + root: int = Field(..., ge=0) + + +class FuzzyFileSearchResult(BaseModel): + file_name: str + indices: list[Indice] | None = None + path: str + root: str + score: int = Field(..., ge=0) + + +class FuzzyFileSearchSessionCompletedNotification(BaseModel): + session_id: str = Field(..., alias="sessionId") + + +class FuzzyFileSearchSessionUpdatedNotification(BaseModel): + files: list[FuzzyFileSearchResult] + query: str + session_id: str = Field(..., alias="sessionId") + + +class GetAccountParams(BaseModel): + refresh_token: bool | None = Field( + default=False, + alias="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`.", + ) + + +class GhostCommit(BaseModel): + id: str + parent: str | None = None + preexisting_untracked_dirs: list[str] + preexisting_untracked_files: list[str] + + +class GitInfo(BaseModel): + branch: str | None = None + origin_url: str | None = Field(default=None, alias="originUrl") + sha: str | None = None + + +class HazelnutScope(StrEnum): + example = "example" + workspace_shared = "workspace-shared" + all_shared = "all-shared" + personal = "personal" + + +class HistoryEntry(BaseModel): + conversation_id: str + text: str + ts: int = Field(..., ge=0) + + +class ImageDetail(StrEnum): + auto = "auto" + low = "low" + high = "high" + original = "original" + + +class InitializeCapabilities(BaseModel): + experimental_api: bool | None = Field( + default=False, + alias="experimentalApi", + description="Opt into receiving experimental API methods and fields.", + ) + opt_out_notification_methods: list[str] | None = Field( + default=None, + alias="optOutNotificationMethods", + description="Exact notification method names that should be suppressed for this connection (for example `codex/event/session_configured`).", + ) + + +class InitializeParams(BaseModel): + capabilities: InitializeCapabilities | None = None + client_info: ClientInfo = Field(..., alias="clientInfo") + + +class InitializeResponse(BaseModel): + user_agent: str = Field(..., alias="userAgent") + + +class JSONRPCErrorError(BaseModel): + code: int + data: Any | None = None + message: str + + +class JSONRPCNotification(BaseModel): + method: str + params: Any | None = None + + +class ListMcpServerStatusParams(BaseModel): + cursor: str | None = Field( + default=None, + description="Opaque pagination cursor returned by a previous call.", + ) + limit: int | None = Field( + default=None, + description="Optional page size; defaults to a server-defined value.", + ge=0, + ) + + +class ExecLocalShellActionType(RootModel[Literal["exec"]]): + root: Literal["exec"] = Field(..., title="ExecLocalShellActionType") + + +class ExecLocalShellAction(BaseModel): + command: list[str] + env: dict[str, Any] | None = None + timeout_ms: int | None = Field(default=None, ge=0) + type: ExecLocalShellActionType = Field(..., title="ExecLocalShellActionType") + user: str | None = None + working_directory: str | None = None + + +class LocalShellAction(RootModel[ExecLocalShellAction]): + root: ExecLocalShellAction + + +class LocalShellStatus(StrEnum): + completed = "completed" + in_progress = "in_progress" + incomplete = "incomplete" + + +class ApiKeyv2LoginAccountParamsType(RootModel[Literal["apiKey"]]): + root: Literal["apiKey"] = Field(..., title="ApiKeyv2::LoginAccountParamsType") class ApiKeyv2LoginAccountParams(BaseModel): - api_key: str = Field(..., alias='apiKey') + api_key: str = Field(..., alias="apiKey") type: ApiKeyv2LoginAccountParamsType = Field( - ..., title='ApiKeyv2::LoginAccountParamsType' + ..., title="ApiKeyv2::LoginAccountParamsType" ) -class Chatgptv2LoginAccountParamsType(RootModel[Literal['chatgpt']]): - root: Literal['chatgpt'] = Field(..., title='Chatgptv2::LoginAccountParamsType') +class Chatgptv2LoginAccountParamsType(RootModel[Literal["chatgpt"]]): + root: Literal["chatgpt"] = Field(..., title="Chatgptv2::LoginAccountParamsType") class Chatgptv2LoginAccountParams(BaseModel): type: Chatgptv2LoginAccountParamsType = Field( - ..., title='Chatgptv2::LoginAccountParamsType' + ..., title="Chatgptv2::LoginAccountParamsType" ) class ChatgptAuthTokensv2LoginAccountParamsType( - RootModel[Literal['chatgptAuthTokens']] + RootModel[Literal["chatgptAuthTokens"]] ): - root: Literal['chatgptAuthTokens'] = Field( - ..., title='ChatgptAuthTokensv2::LoginAccountParamsType' + root: Literal["chatgptAuthTokens"] = Field( + ..., title="ChatgptAuthTokensv2::LoginAccountParamsType" ) class ChatgptAuthTokensv2LoginAccountParams(BaseModel): access_token: str = Field( ..., - alias='accessToken', - description='Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.', + alias="accessToken", + description="Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.", ) chatgpt_account_id: str = Field( ..., - alias='chatgptAccountId', - description='Workspace/account identifier supplied by the client.', + alias="chatgptAccountId", + description="Workspace/account identifier supplied by the client.", ) chatgpt_plan_type: str | None = Field( default=None, - alias='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`.', + alias="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: ChatgptAuthTokensv2LoginAccountParamsType = Field( - ..., title='ChatgptAuthTokensv2::LoginAccountParamsType' + ..., title="ChatgptAuthTokensv2::LoginAccountParamsType" ) @@ -3265,229 +1955,508 @@ class LoginAccountParams( ApiKeyv2LoginAccountParams | Chatgptv2LoginAccountParams | ChatgptAuthTokensv2LoginAccountParams - ) = Field(..., title='LoginAccountParams') + ) = Field(..., title="LoginAccountParams") -class SandboxMode(StrEnum): - read_only = 'read-only' - workspace_write = 'workspace-write' - danger_full_access = 'danger-full-access' +class MacOsAutomationPermission1(StrEnum): + none = "none" + all = "all" -class AskForApproval1(StrEnum): - untrusted = 'untrusted' - on_failure = 'on-failure' - on_request = 'on-request' - never = 'never' - - -class Reject(BaseModel): - mcp_elicitations: bool - rules: bool - sandbox_approval: bool - - -class RejectAskForApproval(BaseModel): +class BundleIdsMacOsAutomationPermission(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) - reject: Reject + bundle_ids: list[str] -class AskForApproval(RootModel[AskForApproval1 | RejectAskForApproval]): - root: AskForApproval1 | RejectAskForApproval +class MacOsAutomationPermission( + RootModel[MacOsAutomationPermission1 | BundleIdsMacOsAutomationPermission] +): + root: MacOsAutomationPermission1 | BundleIdsMacOsAutomationPermission -class ServiceTier(StrEnum): - fast = 'fast' - flex = 'flex' +class MacOsPreferencesPermission(StrEnum): + none = "none" + read_only = "read_only" + read_write = "read_write" -class DeprecationNoticeNotification(BaseModel): - details: str | None = Field( +class MacOsSeatbeltProfileExtensions(BaseModel): + macos_accessibility: bool | None = False + macos_automation: MacOsAutomationPermission | None = Field( + default_factory=lambda: MacOsAutomationPermission("none") + ) + macos_calendar: bool | None = False + macos_preferences: MacOsPreferencesPermission | None = "read_only" + + +class McpAuthStatus(StrEnum): + unsupported = "unsupported" + not_logged_in = "notLoggedIn" + bearer_token = "bearerToken" + o_auth = "oAuth" + + +class McpElicitationArrayType(RootModel[Literal["array"]]): + root: Literal["array"] + + +class McpElicitationBooleanType(RootModel[Literal["boolean"]]): + root: Literal["boolean"] + + +class McpElicitationConstOption(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + const: str + title: str + + +class McpElicitationNumberType(StrEnum): + number = "number" + integer = "integer" + + +class McpElicitationObjectType(RootModel[Literal["object"]]): + root: Literal["object"] + + +class McpElicitationStringFormat(StrEnum): + email = "email" + uri = "uri" + date = "date" + date_time = "date-time" + + +class McpElicitationStringType(RootModel[Literal["string"]]): + root: Literal["string"] + + +class McpElicitationTitledEnumItems(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + any_of: list[McpElicitationConstOption] = Field(..., alias="anyOf") + + +class McpElicitationTitledMultiSelectEnumSchema(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + default: list[str] | None = None + description: str | None = None + items: McpElicitationTitledEnumItems + max_items: int | None = Field(default=None, alias="maxItems", ge=0) + min_items: int | None = Field(default=None, alias="minItems", ge=0) + title: str | None = None + type: McpElicitationArrayType + + +class McpElicitationTitledSingleSelectEnumSchema(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + default: str | None = None + description: str | None = None + one_of: list[McpElicitationConstOption] = Field(..., alias="oneOf") + title: str | None = None + type: McpElicitationStringType + + +class McpElicitationUntitledEnumItems(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + enum: list[str] + type: McpElicitationStringType + + +class McpElicitationUntitledMultiSelectEnumSchema(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + default: list[str] | None = None + description: str | None = None + items: McpElicitationUntitledEnumItems + max_items: int | None = Field(default=None, alias="maxItems", ge=0) + min_items: int | None = Field(default=None, alias="minItems", ge=0) + title: str | None = None + type: McpElicitationArrayType + + +class McpElicitationUntitledSingleSelectEnumSchema(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + default: str | None = None + description: str | None = None + enum: list[str] + title: str | None = None + type: McpElicitationStringType + + +class McpInvocation(BaseModel): + arguments: Any | None = Field( + default=None, description="Arguments to the tool call." + ) + server: str = Field( + ..., description="Name of the MCP server as defined in the config." + ) + tool: str = Field(..., description="Name of the tool as given by the MCP server.") + + +class McpServerElicitationAction(StrEnum): + accept = "accept" + decline = "decline" + cancel = "cancel" + + +class McpServerElicitationRequestParams2(BaseModel): + server_name: str = Field(..., alias="serverName") + thread_id: str = Field(..., alias="threadId") + turn_id: str | None = Field( default=None, - description='Optional extra guidance, such as migration steps or rationale.', + alias="turnId", + description="Active Codex turn when this elicitation was observed, if app-server could correlate one.\n\nThis is nullable because MCP models elicitation as a standalone server-to-client request identified by the MCP server request id. It may be triggered during a turn, but turn context is app-server correlation rather than part of the protocol identity of the elicitation itself.", ) - summary: str = Field(..., description='Concise summary of what is deprecated.') - - -class ThreadRealtimeErrorNotification(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + elicitation_id: str = Field(..., alias="elicitationId") message: str - thread_id: str = Field(..., alias='threadId') + mode: Literal["url"] + url: str -class ServerRequestResolvedNotification(BaseModel): - request_id: RequestId = Field(..., alias='requestId') - thread_id: str = Field(..., alias='threadId') - - -class SkillsConfigWriteParams(BaseModel): - enabled: bool - path: str - - -class ThreadNameUpdatedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - thread_name: str | None = Field(default=None, alias='threadName') - - -class ThreadArchivedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class GetAccountParams(BaseModel): - refresh_token: bool | None = Field( - default=False, - alias='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`.', - ) - - -class ErrorNotification(BaseModel): - error: TurnError - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - will_retry: bool = Field(..., alias='willRetry') - - -class ThreadMetadataGitInfoUpdateParams(BaseModel): - branch: str | None = Field( +class McpServerElicitationRequestResponse(BaseModel): + field_meta: Any | None = Field( default=None, - description='Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.', + alias="_meta", + description="Optional client metadata for form-mode action handling.", ) - origin_url: str | None = Field( + action: McpServerElicitationAction + content: Any | None = Field( default=None, - alias='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.', - ) - sha: str | None = Field( - default=None, - description='Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.', + description="Structured user input for accepted elicitations, mirroring RMCP `CreateElicitationResult`.\n\nThis is nullable because decline/cancel responses have no content.", ) -class Personality(StrEnum): - none = 'none' - friendly = 'friendly' - pragmatic = 'pragmatic' +class McpServerOauthLoginCompletedNotification(BaseModel): + error: str | None = None + name: str + success: bool -class ThreadRealtimeItemAddedNotification(BaseModel): - item: Any - thread_id: str = Field(..., alias='threadId') +class McpServerOauthLoginParams(BaseModel): + name: str + scopes: list[str] | None = None + timeout_secs: int | None = Field(default=None, alias="timeoutSecs") -class TokenUsageBreakdown(BaseModel): - cached_input_tokens: int = Field(..., alias='cachedInputTokens') - input_tokens: int = Field(..., alias='inputTokens') - output_tokens: int = Field(..., alias='outputTokens') - reasoning_output_tokens: int = Field(..., alias='reasoningOutputTokens') - total_tokens: int = Field(..., alias='totalTokens') +class McpStartupFailure(BaseModel): + error: str + server: str -class ThreadUnsubscribeParams(BaseModel): - thread_id: str = Field(..., alias='threadId') +class StartingMcpStartupStatus(BaseModel): + state: Literal["starting"] -class ContextCompactedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') +class ReadyMcpStartupStatus(BaseModel): + state: Literal["ready"] -class SkillsRemoteWriteParams(BaseModel): - hazelnut_id: str = Field(..., alias='hazelnutId') +class McpStartupStatus1(BaseModel): + error: str + state: Literal["failed"] -class FeedbackUploadParams(BaseModel): - classification: str - extra_log_files: list[str] | None = Field(default=None, alias='extraLogFiles') - include_logs: bool = Field(..., alias='includeLogs') - reason: str | None = None - thread_id: str | None = Field(default=None, alias='threadId') +class CancelledMcpStartupStatus(BaseModel): + state: Literal["cancelled"] + + +class McpStartupStatus( + RootModel[ + StartingMcpStartupStatus + | ReadyMcpStartupStatus + | McpStartupStatus1 + | CancelledMcpStartupStatus + ] +): + root: ( + StartingMcpStartupStatus + | ReadyMcpStartupStatus + | McpStartupStatus1 + | CancelledMcpStartupStatus + ) + + +class McpToolCallError(BaseModel): + message: str + + +class McpToolCallProgressNotification(BaseModel): + item_id: str = Field(..., alias="itemId") + message: str + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class McpToolCallResult(BaseModel): + content: list[Any] + structured_content: Any | None = Field(None, alias="structuredContent") + + +class McpToolCallStatus(StrEnum): + in_progress = "inProgress" + completed = "completed" + failed = "failed" class MergeStrategy(StrEnum): - replace = 'replace' - upsert = 'upsert' + replace = "replace" + upsert = "upsert" -class ThreadUnarchivedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class ReasoningEffort(StrEnum): - none = 'none' - minimal = 'minimal' - low = 'low' - medium = 'medium' - high = 'high' - xhigh = 'xhigh' - - -class ReasoningSummary1(StrEnum): - auto = 'auto' - concise = 'concise' - detailed = 'detailed' - - -class ReasoningSummary(RootModel[ReasoningSummary1 | Literal['none']]): - root: ReasoningSummary1 | Literal['none'] = Field( +class MessagePhase(RootModel[Literal["commentary"] | Literal["final_answer"]]): + root: Literal["commentary"] | Literal["final_answer"] = Field( ..., - 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", + 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.', ) -class DangerFullAccessSandboxPolicyType(RootModel[Literal['dangerFullAccess']]): - root: Literal['dangerFullAccess'] = Field( - ..., title='DangerFullAccessSandboxPolicyType' +class ModeKind(StrEnum): + plan = "plan" + default = "default" + + +class ModelListParams(BaseModel): + cursor: str | None = Field( + default=None, + description="Opaque pagination cursor returned by a previous call.", + ) + include_hidden: bool | None = Field( + default=None, + alias="includeHidden", + description="When true, include models that are hidden from the default picker list.", + ) + limit: int | None = Field( + default=None, + description="Optional page size; defaults to a reasonable server-side value.", + ge=0, ) -class DangerFullAccessSandboxPolicy(BaseModel): - type: DangerFullAccessSandboxPolicyType = Field( - ..., title='DangerFullAccessSandboxPolicyType' +class ModelRerouteReason(RootModel[Literal["highRiskCyberActivity"]]): + root: Literal["highRiskCyberActivity"] + + +class ModelReroutedNotification(BaseModel): + from_model: str = Field(..., alias="fromModel") + reason: ModelRerouteReason + thread_id: str = Field(..., alias="threadId") + to_model: str = Field(..., alias="toModel") + turn_id: str = Field(..., alias="turnId") + + +class NetworkAccess(StrEnum): + restricted = "restricted" + enabled = "enabled" + + +class NetworkApprovalProtocol(StrEnum): + http = "http" + https = "https" + socks5_tcp = "socks5Tcp" + socks5_udp = "socks5Udp" + + +class NetworkPermissions(BaseModel): + enabled: bool | None = None + + +class NetworkPolicyRuleAction(StrEnum): + allow = "allow" + deny = "deny" + + +class ReadParsedCommandType(RootModel[Literal["read"]]): + root: Literal["read"] = Field(..., title="ReadParsedCommandType") + + +class ReadParsedCommand(BaseModel): + cmd: str + name: str + path: str = Field( + ..., + description="(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path.", + ) + type: ReadParsedCommandType = Field(..., title="ReadParsedCommandType") + + +class ListFilesParsedCommandType(RootModel[Literal["list_files"]]): + root: Literal["list_files"] = Field(..., title="ListFilesParsedCommandType") + + +class ListFilesParsedCommand(BaseModel): + cmd: str + path: str | None = None + type: ListFilesParsedCommandType = Field(..., title="ListFilesParsedCommandType") + + +class SearchParsedCommandType(RootModel[Literal["search"]]): + root: Literal["search"] = Field(..., title="SearchParsedCommandType") + + +class SearchParsedCommand(BaseModel): + cmd: str + path: str | None = None + query: str | None = None + type: SearchParsedCommandType = Field(..., title="SearchParsedCommandType") + + +class UnknownParsedCommandType(RootModel[Literal["unknown"]]): + root: Literal["unknown"] = Field(..., title="UnknownParsedCommandType") + + +class UnknownParsedCommand(BaseModel): + cmd: str + type: UnknownParsedCommandType = Field(..., title="UnknownParsedCommandType") + + +class ParsedCommand( + RootModel[ + ReadParsedCommand + | ListFilesParsedCommand + | SearchParsedCommand + | UnknownParsedCommand + ] +): + root: ( + ReadParsedCommand + | ListFilesParsedCommand + | SearchParsedCommand + | UnknownParsedCommand ) -class ReadOnlySandboxPolicyType(RootModel[Literal['readOnly']]): - root: Literal['readOnly'] = Field(..., title='ReadOnlySandboxPolicyType') +class PatchApplyStatus(StrEnum): + in_progress = "inProgress" + completed = "completed" + failed = "failed" + declined = "declined" -class ExternalSandboxSandboxPolicyType(RootModel[Literal['externalSandbox']]): - root: Literal['externalSandbox'] = Field( - ..., title='ExternalSandboxSandboxPolicyType' +class AddPatchChangeKindType(RootModel[Literal["add"]]): + root: Literal["add"] = Field(..., title="AddPatchChangeKindType") + + +class AddPatchChangeKind(BaseModel): + type: AddPatchChangeKindType = Field(..., title="AddPatchChangeKindType") + + +class DeletePatchChangeKindType(RootModel[Literal["delete"]]): + root: Literal["delete"] = Field(..., title="DeletePatchChangeKindType") + + +class DeletePatchChangeKind(BaseModel): + type: DeletePatchChangeKindType = Field(..., title="DeletePatchChangeKindType") + + +class UpdatePatchChangeKindType(RootModel[Literal["update"]]): + root: Literal["update"] = Field(..., title="UpdatePatchChangeKindType") + + +class UpdatePatchChangeKind(BaseModel): + move_path: str | None = None + type: UpdatePatchChangeKindType = Field(..., title="UpdatePatchChangeKindType") + + +class PatchChangeKind( + RootModel[AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind] +): + root: AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind + + +class PermissionProfile(BaseModel): + file_system: FileSystemPermissions | None = None + macos: MacOsSeatbeltProfileExtensions | None = None + network: NetworkPermissions | None = None + + +class Personality(StrEnum): + none = "none" + friendly = "friendly" + pragmatic = "pragmatic" + + +class PlanDeltaNotification(BaseModel): + delta: str + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class PlanType(StrEnum): + free = "free" + go = "go" + plus = "plus" + pro = "pro" + team = "team" + business = "business" + enterprise = "enterprise" + edu = "edu" + unknown = "unknown" + + +class PluginInstallParams(BaseModel): + marketplace_path: AbsolutePathBuf = Field(..., alias="marketplacePath") + plugin_name: str = Field(..., alias="pluginName") + + +class PluginListParams(BaseModel): + cwds: list[AbsolutePathBuf] | None = Field( + default=None, + description="Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.", ) -class WorkspaceWriteSandboxPolicyType(RootModel[Literal['workspaceWrite']]): - root: Literal['workspaceWrite'] = Field( - ..., title='WorkspaceWriteSandboxPolicyType' - ) +class ProductSurface(StrEnum): + chatgpt = "chatgpt" + codex = "codex" + api = "api" + atlas = "atlas" -class RestrictedReadOnlyAccessType(RootModel[Literal['restricted']]): - root: Literal['restricted'] = Field(..., title='RestrictedReadOnlyAccessType') +class RateLimitWindow(BaseModel): + resets_at: int | None = Field(default=None, alias="resetsAt") + used_percent: int = Field(..., alias="usedPercent") + window_duration_mins: int | None = Field(default=None, alias="windowDurationMins") + + +class RestrictedReadOnlyAccessType(RootModel[Literal["restricted"]]): + root: Literal["restricted"] = Field(..., title="RestrictedReadOnlyAccessType") class RestrictedReadOnlyAccess(BaseModel): include_platform_defaults: bool | None = Field( - default=True, alias='includePlatformDefaults' + default=True, alias="includePlatformDefaults" ) readable_roots: list[AbsolutePathBuf] | None = Field( - default_factory=list, alias='readableRoots' + default_factory=list, alias="readableRoots" ) type: RestrictedReadOnlyAccessType = Field( - ..., title='RestrictedReadOnlyAccessType' + ..., title="RestrictedReadOnlyAccessType" ) -class FullAccessReadOnlyAccessType(RootModel[Literal['fullAccess']]): - root: Literal['fullAccess'] = Field(..., title='FullAccessReadOnlyAccessType') +class FullAccessReadOnlyAccessType(RootModel[Literal["fullAccess"]]): + root: Literal["fullAccess"] = Field(..., title="FullAccessReadOnlyAccessType") class FullAccessReadOnlyAccess(BaseModel): type: FullAccessReadOnlyAccessType = Field( - ..., title='FullAccessReadOnlyAccessType' + ..., title="FullAccessReadOnlyAccessType" ) @@ -3495,161 +2464,173 @@ class ReadOnlyAccess(RootModel[RestrictedReadOnlyAccess | FullAccessReadOnlyAcce root: RestrictedReadOnlyAccess | FullAccessReadOnlyAccess -class NetworkAccess(StrEnum): - restricted = 'restricted' - enabled = 'enabled' +class RealtimeAudioFrame(BaseModel): + data: str + num_channels: int = Field(..., ge=0) + sample_rate: int = Field(..., ge=0) + samples_per_channel: int | None = Field(default=None, ge=0) -class TurnDiffUpdatedNotification(BaseModel): - diff: str - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') +class SessionUpdated(BaseModel): + instructions: str | None = None + session_id: str -class WindowsSandboxSetupMode(StrEnum): - elevated = 'elevated' - unelevated = 'unelevated' - - -class PluginInstallParams(BaseModel): - marketplace_path: AbsolutePathBuf = Field(..., alias='marketplacePath') - plugin_name: str = Field(..., alias='pluginName') - - -class AccountLoginCompletedNotification(BaseModel): - error: str | None = None - login_id: str | None = Field(default=None, alias='loginId') - success: bool - - -class CommandExecWriteParams(BaseModel): - close_stdin: bool | None = Field( - default=None, - alias='closeStdin', - description='Close stdin after writing `deltaBase64`, if present.', +class SessionUpdatedRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", ) - delta_base64: str | None = Field( - default=None, - alias='deltaBase64', - description='Optional base64-encoded stdin bytes to write.', + session_updated: SessionUpdated = Field(..., alias="SessionUpdated") + + +class AudioOutRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", ) - process_id: str = Field( - ..., - alias='processId', - description='Client-supplied, connection-scoped `processId` from the original `command/exec` request.', + audio_out: RealtimeAudioFrame = Field(..., alias="AudioOut") + + +class ConversationItemAddedRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + conversation_item_added: Any = Field(..., alias="ConversationItemAdded") + + +class ConversationItemDone(BaseModel): + item_id: str + + +class ConversationItemDoneRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + conversation_item_done: ConversationItemDone = Field( + ..., alias="ConversationItemDone" ) -class AuthMode( - RootModel[Literal['apikey'] | Literal['chatgpt'] | Literal['chatgptAuthTokens']] +class ErrorRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + error: str = Field(..., alias="Error") + + +class RealtimeHandoffMessage(BaseModel): + role: str + text: str + + +class RealtimeHandoffRequested(BaseModel): + handoff_id: str + input_transcript: str + item_id: str + messages: list[RealtimeHandoffMessage] + + +class ReasoningEffort(StrEnum): + none = "none" + minimal = "minimal" + low = "low" + medium = "medium" + high = "high" + xhigh = "xhigh" + + +class ReasoningTextReasoningItemContentType(RootModel[Literal["reasoning_text"]]): + root: Literal["reasoning_text"] = Field( + ..., title="ReasoningTextReasoningItemContentType" + ) + + +class ReasoningTextReasoningItemContent(BaseModel): + text: str + type: ReasoningTextReasoningItemContentType = Field( + ..., title="ReasoningTextReasoningItemContentType" + ) + + +class TextReasoningItemContentType(RootModel[Literal["text"]]): + root: Literal["text"] = Field(..., title="TextReasoningItemContentType") + + +class TextReasoningItemContent(BaseModel): + text: str + type: TextReasoningItemContentType = Field( + ..., title="TextReasoningItemContentType" + ) + + +class ReasoningItemContent( + RootModel[ReasoningTextReasoningItemContent | TextReasoningItemContent] ): - root: Literal['apikey'] | Literal['chatgpt'] | Literal['chatgptAuthTokens'] = Field( - ..., description='Authentication mode for OpenAI-backed providers.' + root: ReasoningTextReasoningItemContent | TextReasoningItemContent + + +class SummaryTextReasoningItemReasoningSummaryType(RootModel[Literal["summary_text"]]): + root: Literal["summary_text"] = Field( + ..., title="SummaryTextReasoningItemReasoningSummaryType" ) -class ThreadRollbackParams(BaseModel): - num_turns: int = Field( +class SummaryTextReasoningItemReasoningSummary(BaseModel): + text: str + type: SummaryTextReasoningItemReasoningSummaryType = Field( + ..., title="SummaryTextReasoningItemReasoningSummaryType" + ) + + +class ReasoningItemReasoningSummary( + RootModel[SummaryTextReasoningItemReasoningSummary] +): + root: SummaryTextReasoningItemReasoningSummary + + +class ReasoningSummary1(StrEnum): + auto = "auto" + concise = "concise" + detailed = "detailed" + + +class ReasoningSummary(RootModel[ReasoningSummary1 | Literal["none"]]): + root: ReasoningSummary1 | Literal["none"] = Field( ..., - alias='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.", - ge=0, + 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", ) - thread_id: str = Field(..., alias='threadId') + + +class ReasoningSummaryPartAddedNotification(BaseModel): + item_id: str = Field(..., alias="itemId") + summary_index: int = Field(..., alias="summaryIndex") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") class ReasoningSummaryTextDeltaNotification(BaseModel): delta: str - item_id: str = Field(..., alias='itemId') - summary_index: int = Field(..., alias='summaryIndex') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') + item_id: str = Field(..., alias="itemId") + summary_index: int = Field(..., alias="summaryIndex") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") -class Tool(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - annotations: Any | None = None - description: str | None = None - icons: list[Any] | None = None - input_schema: Any = Field(..., alias='inputSchema') - name: str - output_schema: Any | None = Field(None, alias='outputSchema') - title: str | None = None - - -class UncommittedChangesReviewTargetType(RootModel[Literal['uncommittedChanges']]): - root: Literal['uncommittedChanges'] = Field( - ..., title='UncommittedChangesReviewTargetType' - ) - - -class UncommittedChangesReviewTarget(BaseModel): - type: UncommittedChangesReviewTargetType = Field( - ..., title='UncommittedChangesReviewTargetType' - ) - - -class BaseBranchReviewTargetType(RootModel[Literal['baseBranch']]): - root: Literal['baseBranch'] = Field(..., title='BaseBranchReviewTargetType') - - -class BaseBranchReviewTarget(BaseModel): - branch: str - type: BaseBranchReviewTargetType = Field(..., title='BaseBranchReviewTargetType') - - -class CommitReviewTargetType(RootModel[Literal['commit']]): - root: Literal['commit'] = Field(..., title='CommitReviewTargetType') - - -class CommitReviewTarget(BaseModel): - sha: str - title: str | None = Field( - default=None, - description='Optional human-readable label (e.g., commit subject) for UIs.', - ) - type: CommitReviewTargetType = Field(..., title='CommitReviewTargetType') - - -class CustomReviewTargetType(RootModel[Literal['custom']]): - root: Literal['custom'] = Field(..., title='CustomReviewTargetType') - - -class CustomReviewTarget(BaseModel): - instructions: str - type: CustomReviewTargetType = Field(..., title='CustomReviewTargetType') - - -class ReviewTarget( - RootModel[ - UncommittedChangesReviewTarget - | BaseBranchReviewTarget - | CommitReviewTarget - | CustomReviewTarget - ] -): - root: ( - UncommittedChangesReviewTarget - | BaseBranchReviewTarget - | CommitReviewTarget - | CustomReviewTarget - ) - - -class ReviewDelivery(StrEnum): - inline = 'inline' - detached = 'detached' - - -class ModelRerouteReason(RootModel[Literal['highRiskCyberActivity']]): - root: Literal['highRiskCyberActivity'] - - -class FileChangeOutputDeltaNotification(BaseModel): +class ReasoningTextDeltaNotification(BaseModel): + content_index: int = Field(..., alias="contentIndex") delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class RejectConfig(BaseModel): + mcp_elicitations: bool = Field(..., description="Reject MCP elicitation prompts.") + rules: bool = Field( + ..., description="Reject prompts triggered by execpolicy `prompt` rules." + ) + sandbox_approval: bool = Field( + ..., description="Reject approval prompts related to sandbox escalation." + ) class RemoteSkillSummary(BaseModel): @@ -3658,51 +2639,84 @@ class RemoteSkillSummary(BaseModel): name: str -class ConfigValueWriteParams(BaseModel): - expected_version: str | None = Field(default=None, alias='expectedVersion') - file_path: str | None = Field( +class RequestId(RootModel[str | int]): + root: str | int = Field(..., title="RequestId") + + +class RequestUserInputQuestionOption(BaseModel): + description: str + label: str + + +class Resource(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + annotations: Any | None = None + description: str | None = None + icons: list[Any] | None = None + mime_type: str | None = Field(default=None, alias="mimeType") + name: str + size: int | None = None + title: str | None = None + uri: str + + +class ResourceTemplate(BaseModel): + annotations: Any | None = None + description: str | None = None + mime_type: str | None = Field(default=None, alias="mimeType") + name: str + title: str | None = None + uri_template: str = Field(..., alias="uriTemplate") + + +class MessageResponseItemType(RootModel[Literal["message"]]): + root: Literal["message"] = Field(..., title="MessageResponseItemType") + + +class MessageResponseItem(BaseModel): + content: list[ContentItem] + end_turn: bool | None = None + id: str | None = None + phase: MessagePhase | None = None + role: str + type: MessageResponseItemType = Field(..., title="MessageResponseItemType") + + +class ReasoningResponseItemType(RootModel[Literal["reasoning"]]): + root: Literal["reasoning"] = Field(..., title="ReasoningResponseItemType") + + +class ReasoningResponseItem(BaseModel): + content: list[ReasoningItemContent] | None = None + encrypted_content: str | None = None + id: str + summary: list[ReasoningItemReasoningSummary] + type: ReasoningResponseItemType = Field(..., title="ReasoningResponseItemType") + + +class LocalShellCallResponseItemType(RootModel[Literal["local_shell_call"]]): + root: Literal["local_shell_call"] = Field( + ..., title="LocalShellCallResponseItemType" + ) + + +class LocalShellCallResponseItem(BaseModel): + action: LocalShellAction + call_id: str | None = Field( + default=None, description="Set when using the Responses API." + ) + id: str | None = Field( default=None, - alias='filePath', - description="Path to the config file to write; defaults to the user's `config.toml` when omitted.", + description="Legacy id field retained for compatibility with older payloads.", ) - key_path: str = Field(..., alias='keyPath') - merge_strategy: MergeStrategy = Field(..., alias='mergeStrategy') - value: Any - - -class ThreadStartParams(BaseModel): - approval_policy: AskForApproval | None = Field(default=None, alias='approvalPolicy') - base_instructions: str | None = Field(default=None, alias='baseInstructions') - config: dict[str, Any] | None = None - cwd: str | None = None - developer_instructions: str | None = Field( - default=None, alias='developerInstructions' - ) - service_tier: ServiceTier | None = Field(default=None, alias='serviceTier') - ephemeral: bool | None = None - sandbox: SandboxMode | None = None - personality: Personality | None = None - model: str | None = None - model_provider: str | None = Field(default=None, alias='modelProvider') - service_name: str | None = Field(default=None, alias='serviceName') - - -class MessageResponseItemType(RootModel[Literal['message']]): - root: Literal['message'] = Field(..., title='MessageResponseItemType') - - -class ReasoningResponseItemType(RootModel[Literal['reasoning']]): - root: Literal['reasoning'] = Field(..., title='ReasoningResponseItemType') - - -class LocalShellCallResponseItemType(RootModel[Literal['local_shell_call']]): - root: Literal['local_shell_call'] = Field( - ..., title='LocalShellCallResponseItemType' + status: LocalShellStatus + type: LocalShellCallResponseItemType = Field( + ..., title="LocalShellCallResponseItemType" ) -class FunctionCallResponseItemType(RootModel[Literal['function_call']]): - root: Literal['function_call'] = Field(..., title='FunctionCallResponseItemType') +class FunctionCallResponseItemType(RootModel[Literal["function_call"]]): + root: Literal["function_call"] = Field(..., title="FunctionCallResponseItemType") class FunctionCallResponseItem(BaseModel): @@ -3711,19 +2725,19 @@ class FunctionCallResponseItem(BaseModel): id: str | None = None name: str type: FunctionCallResponseItemType = Field( - ..., title='FunctionCallResponseItemType' + ..., title="FunctionCallResponseItemType" ) -class FunctionCallOutputResponseItemType(RootModel[Literal['function_call_output']]): - root: Literal['function_call_output'] = Field( - ..., title='FunctionCallOutputResponseItemType' +class FunctionCallOutputResponseItemType(RootModel[Literal["function_call_output"]]): + root: Literal["function_call_output"] = Field( + ..., title="FunctionCallOutputResponseItemType" ) -class CustomToolCallResponseItemType(RootModel[Literal['custom_tool_call']]): - root: Literal['custom_tool_call'] = Field( - ..., title='CustomToolCallResponseItemType' +class CustomToolCallResponseItemType(RootModel[Literal["custom_tool_call"]]): + root: Literal["custom_tool_call"] = Field( + ..., title="CustomToolCallResponseItemType" ) @@ -3734,25 +2748,25 @@ class CustomToolCallResponseItem(BaseModel): name: str status: str | None = None type: CustomToolCallResponseItemType = Field( - ..., title='CustomToolCallResponseItemType' + ..., title="CustomToolCallResponseItemType" ) class CustomToolCallOutputResponseItemType( - RootModel[Literal['custom_tool_call_output']] + RootModel[Literal["custom_tool_call_output"]] ): - root: Literal['custom_tool_call_output'] = Field( - ..., title='CustomToolCallOutputResponseItemType' + root: Literal["custom_tool_call_output"] = Field( + ..., title="CustomToolCallOutputResponseItemType" ) -class WebSearchCallResponseItemType(RootModel[Literal['web_search_call']]): - root: Literal['web_search_call'] = Field(..., title='WebSearchCallResponseItemType') +class WebSearchCallResponseItemType(RootModel[Literal["web_search_call"]]): + root: Literal["web_search_call"] = Field(..., title="WebSearchCallResponseItemType") -class ImageGenerationCallResponseItemType(RootModel[Literal['image_generation_call']]): - root: Literal['image_generation_call'] = Field( - ..., title='ImageGenerationCallResponseItemType' +class ImageGenerationCallResponseItemType(RootModel[Literal["image_generation_call"]]): + root: Literal["image_generation_call"] = Field( + ..., title="ImageGenerationCallResponseItemType" ) @@ -3762,77 +2776,84 @@ class ImageGenerationCallResponseItem(BaseModel): revised_prompt: str | None = None status: str type: ImageGenerationCallResponseItemType = Field( - ..., title='ImageGenerationCallResponseItemType' + ..., title="ImageGenerationCallResponseItemType" ) -class GhostSnapshotResponseItemType(RootModel[Literal['ghost_snapshot']]): - root: Literal['ghost_snapshot'] = Field(..., title='GhostSnapshotResponseItemType') +class GhostSnapshotResponseItemType(RootModel[Literal["ghost_snapshot"]]): + root: Literal["ghost_snapshot"] = Field(..., title="GhostSnapshotResponseItemType") -class CompactionResponseItemType(RootModel[Literal['compaction']]): - root: Literal['compaction'] = Field(..., title='CompactionResponseItemType') +class GhostSnapshotResponseItem(BaseModel): + ghost_commit: GhostCommit + type: GhostSnapshotResponseItemType = Field( + ..., title="GhostSnapshotResponseItemType" + ) + + +class CompactionResponseItemType(RootModel[Literal["compaction"]]): + root: Literal["compaction"] = Field(..., title="CompactionResponseItemType") class CompactionResponseItem(BaseModel): encrypted_content: str - type: CompactionResponseItemType = Field(..., title='CompactionResponseItemType') + type: CompactionResponseItemType = Field(..., title="CompactionResponseItemType") -class OtherResponseItemType(RootModel[Literal['other']]): - root: Literal['other'] = Field(..., title='OtherResponseItemType') +class OtherResponseItemType(RootModel[Literal["other"]]): + root: Literal["other"] = Field(..., title="OtherResponseItemType") class OtherResponseItem(BaseModel): - type: OtherResponseItemType = Field(..., title='OtherResponseItemType') + type: OtherResponseItemType = Field(..., title="OtherResponseItemType") -class SearchResponsesApiWebSearchActionType(RootModel[Literal['search']]): - root: Literal['search'] = Field(..., title='SearchResponsesApiWebSearchActionType') +class SearchResponsesApiWebSearchActionType(RootModel[Literal["search"]]): + root: Literal["search"] = Field(..., title="SearchResponsesApiWebSearchActionType") class SearchResponsesApiWebSearchAction(BaseModel): queries: list[str] | None = None query: str | None = None type: SearchResponsesApiWebSearchActionType = Field( - ..., title='SearchResponsesApiWebSearchActionType' + ..., title="SearchResponsesApiWebSearchActionType" ) -class OpenPageResponsesApiWebSearchActionType(RootModel[Literal['open_page']]): - root: Literal['open_page'] = Field( - ..., title='OpenPageResponsesApiWebSearchActionType' +class OpenPageResponsesApiWebSearchActionType(RootModel[Literal["open_page"]]): + root: Literal["open_page"] = Field( + ..., title="OpenPageResponsesApiWebSearchActionType" ) class OpenPageResponsesApiWebSearchAction(BaseModel): type: OpenPageResponsesApiWebSearchActionType = Field( - ..., title='OpenPageResponsesApiWebSearchActionType' + ..., title="OpenPageResponsesApiWebSearchActionType" ) url: str | None = None -class FindInPageResponsesApiWebSearchActionType(RootModel[Literal['find_in_page']]): - root: Literal['find_in_page'] = Field( - ..., title='FindInPageResponsesApiWebSearchActionType' +class FindInPageResponsesApiWebSearchActionType(RootModel[Literal["find_in_page"]]): + root: Literal["find_in_page"] = Field( + ..., title="FindInPageResponsesApiWebSearchActionType" ) class FindInPageResponsesApiWebSearchAction(BaseModel): pattern: str | None = None type: FindInPageResponsesApiWebSearchActionType = Field( - ..., title='FindInPageResponsesApiWebSearchActionType' + ..., title="FindInPageResponsesApiWebSearchActionType" ) url: str | None = None -class OtherResponsesApiWebSearchActionType(RootModel[Literal['other']]): - root: Literal['other'] = Field(..., title='OtherResponsesApiWebSearchActionType') +class OtherResponsesApiWebSearchActionType(RootModel[Literal["other"]]): + root: Literal["other"] = Field(..., title="OtherResponsesApiWebSearchActionType") class OtherResponsesApiWebSearchAction(BaseModel): type: OtherResponsesApiWebSearchActionType = Field( - ..., title='OtherResponsesApiWebSearchActionType' + ..., title="OtherResponsesApiWebSearchActionType" ) @@ -3852,154 +2873,707 @@ class ResponsesApiWebSearchAction( ) -class LocalShellStatus(StrEnum): - completed = 'completed' - in_progress = 'in_progress' - incomplete = 'incomplete' +class OkResultOfCallToolResultOrString(BaseModel): + ok: CallToolResult = Field(..., alias="Ok") -class SummaryTextReasoningItemReasoningSummaryType(RootModel[Literal['summary_text']]): - root: Literal['summary_text'] = Field( - ..., title='SummaryTextReasoningItemReasoningSummaryType' - ) +class ErrResultOfCallToolResultOrString(BaseModel): + err: str = Field(..., alias="Err") -class SummaryTextReasoningItemReasoningSummary(BaseModel): - text: str - type: SummaryTextReasoningItemReasoningSummaryType = Field( - ..., title='SummaryTextReasoningItemReasoningSummaryType' - ) - - -class ReasoningItemReasoningSummary( - RootModel[SummaryTextReasoningItemReasoningSummary] +class ResultOfCallToolResultOrString( + RootModel[OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString] ): - root: SummaryTextReasoningItemReasoningSummary + root: OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString -class InputTextContentItemType(RootModel[Literal['input_text']]): - root: Literal['input_text'] = Field(..., title='InputTextContentItemType') +class ApprovedExecpolicyAmendment(BaseModel): + proposed_execpolicy_amendment: list[str] -class InputTextContentItem(BaseModel): - text: str - type: InputTextContentItemType = Field(..., title='InputTextContentItemType') +class ApprovedExecpolicyAmendmentReviewDecision(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + approved_execpolicy_amendment: ApprovedExecpolicyAmendment -class InputImageContentItemType(RootModel[Literal['input_image']]): - root: Literal['input_image'] = Field(..., title='InputImageContentItemType') +class ReviewDelivery(StrEnum): + inline = "inline" + detached = "detached" -class InputImageContentItem(BaseModel): - image_url: str - type: InputImageContentItemType = Field(..., title='InputImageContentItemType') +class ReviewLineRange(BaseModel): + end: int = Field(..., ge=0) + start: int = Field(..., ge=0) -class OutputTextContentItemType(RootModel[Literal['output_text']]): - root: Literal['output_text'] = Field(..., title='OutputTextContentItemType') +class UncommittedChangesReviewTargetType(RootModel[Literal["uncommittedChanges"]]): + root: Literal["uncommittedChanges"] = Field( + ..., title="UncommittedChangesReviewTargetType" + ) -class OutputTextContentItem(BaseModel): - text: str - type: OutputTextContentItemType = Field(..., title='OutputTextContentItemType') +class UncommittedChangesReviewTarget(BaseModel): + type: UncommittedChangesReviewTargetType = Field( + ..., title="UncommittedChangesReviewTargetType" + ) -class ContentItem( - RootModel[InputTextContentItem | InputImageContentItem | OutputTextContentItem] +class BaseBranchReviewTargetType(RootModel[Literal["baseBranch"]]): + root: Literal["baseBranch"] = Field(..., title="BaseBranchReviewTargetType") + + +class BaseBranchReviewTarget(BaseModel): + branch: str + type: BaseBranchReviewTargetType = Field(..., title="BaseBranchReviewTargetType") + + +class CommitReviewTargetType(RootModel[Literal["commit"]]): + root: Literal["commit"] = Field(..., title="CommitReviewTargetType") + + +class CommitReviewTarget(BaseModel): + sha: str + title: str | None = Field( + default=None, + description="Optional human-readable label (e.g., commit subject) for UIs.", + ) + type: CommitReviewTargetType = Field(..., title="CommitReviewTargetType") + + +class CustomReviewTargetType(RootModel[Literal["custom"]]): + root: Literal["custom"] = Field(..., title="CustomReviewTargetType") + + +class CustomReviewTarget(BaseModel): + instructions: str + type: CustomReviewTargetType = Field(..., title="CustomReviewTargetType") + + +class ReviewTarget( + RootModel[ + UncommittedChangesReviewTarget + | BaseBranchReviewTarget + | CommitReviewTarget + | CustomReviewTarget + ] ): - root: InputTextContentItem | InputImageContentItem | OutputTextContentItem - - -class ReasoningTextReasoningItemContentType(RootModel[Literal['reasoning_text']]): - root: Literal['reasoning_text'] = Field( - ..., title='ReasoningTextReasoningItemContentType' + root: ( + UncommittedChangesReviewTarget + | BaseBranchReviewTarget + | CommitReviewTarget + | CustomReviewTarget ) -class ReasoningTextReasoningItemContent(BaseModel): - text: str - type: ReasoningTextReasoningItemContentType = Field( - ..., title='ReasoningTextReasoningItemContentType' +class SandboxMode(StrEnum): + read_only = "read-only" + workspace_write = "workspace-write" + danger_full_access = "danger-full-access" + + +class DangerFullAccessSandboxPolicyType(RootModel[Literal["dangerFullAccess"]]): + root: Literal["dangerFullAccess"] = Field( + ..., title="DangerFullAccessSandboxPolicyType" ) -class TextReasoningItemContentType(RootModel[Literal['text']]): - root: Literal['text'] = Field(..., title='TextReasoningItemContentType') - - -class TextReasoningItemContent(BaseModel): - text: str - type: TextReasoningItemContentType = Field( - ..., title='TextReasoningItemContentType' +class DangerFullAccessSandboxPolicy(BaseModel): + type: DangerFullAccessSandboxPolicyType = Field( + ..., title="DangerFullAccessSandboxPolicyType" ) -class ReasoningItemContent( - RootModel[ReasoningTextReasoningItemContent | TextReasoningItemContent] +class ReadOnlySandboxPolicyType(RootModel[Literal["readOnly"]]): + root: Literal["readOnly"] = Field(..., title="ReadOnlySandboxPolicyType") + + +class ReadOnlySandboxPolicy(BaseModel): + access: ReadOnlyAccess | None = Field( + default_factory=lambda: ReadOnlyAccess({"type": "fullAccess"}) + ) + network_access: bool | None = Field(default=False, alias="networkAccess") + type: ReadOnlySandboxPolicyType = Field(..., title="ReadOnlySandboxPolicyType") + + +class ExternalSandboxSandboxPolicyType(RootModel[Literal["externalSandbox"]]): + root: Literal["externalSandbox"] = Field( + ..., title="ExternalSandboxSandboxPolicyType" + ) + + +class ExternalSandboxSandboxPolicy(BaseModel): + network_access: NetworkAccess | None = Field( + default="restricted", alias="networkAccess" + ) + type: ExternalSandboxSandboxPolicyType = Field( + ..., title="ExternalSandboxSandboxPolicyType" + ) + + +class WorkspaceWriteSandboxPolicyType(RootModel[Literal["workspaceWrite"]]): + root: Literal["workspaceWrite"] = Field( + ..., title="WorkspaceWriteSandboxPolicyType" + ) + + +class WorkspaceWriteSandboxPolicy(BaseModel): + exclude_slash_tmp: bool | None = Field(default=False, alias="excludeSlashTmp") + exclude_tmpdir_env_var: bool | None = Field( + default=False, alias="excludeTmpdirEnvVar" + ) + network_access: bool | None = Field(default=False, alias="networkAccess") + read_only_access: ReadOnlyAccess | None = Field( + default_factory=lambda: ReadOnlyAccess({"type": "fullAccess"}), + alias="readOnlyAccess", + ) + type: WorkspaceWriteSandboxPolicyType = Field( + ..., title="WorkspaceWriteSandboxPolicyType" + ) + writable_roots: list[AbsolutePathBuf] | None = Field( + default_factory=list, alias="writableRoots" + ) + + +class SandboxPolicy( + RootModel[ + DangerFullAccessSandboxPolicy + | ReadOnlySandboxPolicy + | ExternalSandboxSandboxPolicy + | WorkspaceWriteSandboxPolicy + ] ): - root: ReasoningTextReasoningItemContent | TextReasoningItemContent - - -class ExecLocalShellActionType(RootModel[Literal['exec']]): - root: Literal['exec'] = Field(..., title='ExecLocalShellActionType') - - -class ExecLocalShellAction(BaseModel): - command: list[str] - env: dict[str, Any] | None = None - timeout_ms: int | None = Field(default=None, ge=0) - type: ExecLocalShellActionType = Field(..., title='ExecLocalShellActionType') - user: str | None = None - working_directory: str | None = None - - -class LocalShellAction(RootModel[ExecLocalShellAction]): - root: ExecLocalShellAction - - -class GhostCommit(BaseModel): - id: str - parent: str | None = None - preexisting_untracked_dirs: list[str] - preexisting_untracked_files: list[str] - - -class InputTextFunctionCallOutputContentItemType(RootModel[Literal['input_text']]): - root: Literal['input_text'] = Field( - ..., title='InputTextFunctionCallOutputContentItemType' + root: ( + DangerFullAccessSandboxPolicy + | ReadOnlySandboxPolicy + | ExternalSandboxSandboxPolicy + | WorkspaceWriteSandboxPolicy ) -class InputTextFunctionCallOutputContentItem(BaseModel): - text: str - type: InputTextFunctionCallOutputContentItemType = Field( - ..., title='InputTextFunctionCallOutputContentItemType' +class ErrorServerNotificationMethod(RootModel[Literal["error"]]): + root: Literal["error"] = Field(..., title="ErrorServerNotificationMethod") + + +class ThreadStartedServerNotificationMethod(RootModel[Literal["thread/started"]]): + root: Literal["thread/started"] = Field( + ..., title="Thread/startedServerNotificationMethod" ) -class InputImageFunctionCallOutputContentItemType(RootModel[Literal['input_image']]): - root: Literal['input_image'] = Field( - ..., title='InputImageFunctionCallOutputContentItemType' +class ThreadStatusChangedServerNotificationMethod( + RootModel[Literal["thread/status/changed"]] +): + root: Literal["thread/status/changed"] = Field( + ..., title="Thread/status/changedServerNotificationMethod" ) -class ImageDetail(StrEnum): - auto = 'auto' - low = 'low' - high = 'high' - original = 'original' +class ThreadArchivedServerNotificationMethod(RootModel[Literal["thread/archived"]]): + root: Literal["thread/archived"] = Field( + ..., title="Thread/archivedServerNotificationMethod" + ) -class ThreadRealtimeStartedNotification(BaseModel): - session_id: str | None = Field(default=None, alias='sessionId') - thread_id: str = Field(..., alias='threadId') +class ThreadUnarchivedServerNotificationMethod(RootModel[Literal["thread/unarchived"]]): + root: Literal["thread/unarchived"] = Field( + ..., title="Thread/unarchivedServerNotificationMethod" + ) -class McpToolCallProgressNotification(BaseModel): - item_id: str = Field(..., alias='itemId') - message: str - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') +class ThreadClosedServerNotificationMethod(RootModel[Literal["thread/closed"]]): + root: Literal["thread/closed"] = Field( + ..., title="Thread/closedServerNotificationMethod" + ) + + +class SkillsChangedServerNotificationMethod(RootModel[Literal["skills/changed"]]): + root: Literal["skills/changed"] = Field( + ..., title="Skills/changedServerNotificationMethod" + ) + + +class ThreadNameUpdatedServerNotificationMethod( + RootModel[Literal["thread/name/updated"]] +): + root: Literal["thread/name/updated"] = Field( + ..., title="Thread/name/updatedServerNotificationMethod" + ) + + +class ThreadTokenUsageUpdatedServerNotificationMethod( + RootModel[Literal["thread/tokenUsage/updated"]] +): + root: Literal["thread/tokenUsage/updated"] = Field( + ..., title="Thread/tokenUsage/updatedServerNotificationMethod" + ) + + +class TurnStartedServerNotificationMethod(RootModel[Literal["turn/started"]]): + root: Literal["turn/started"] = Field( + ..., title="Turn/startedServerNotificationMethod" + ) + + +class TurnCompletedServerNotificationMethod(RootModel[Literal["turn/completed"]]): + root: Literal["turn/completed"] = Field( + ..., title="Turn/completedServerNotificationMethod" + ) + + +class TurnDiffUpdatedServerNotificationMethod(RootModel[Literal["turn/diff/updated"]]): + root: Literal["turn/diff/updated"] = Field( + ..., title="Turn/diff/updatedServerNotificationMethod" + ) + + +class TurnPlanUpdatedServerNotificationMethod(RootModel[Literal["turn/plan/updated"]]): + root: Literal["turn/plan/updated"] = Field( + ..., title="Turn/plan/updatedServerNotificationMethod" + ) + + +class ItemStartedServerNotificationMethod(RootModel[Literal["item/started"]]): + root: Literal["item/started"] = Field( + ..., title="Item/startedServerNotificationMethod" + ) + + +class ItemCompletedServerNotificationMethod(RootModel[Literal["item/completed"]]): + root: Literal["item/completed"] = Field( + ..., title="Item/completedServerNotificationMethod" + ) + + +class ItemAgentMessageDeltaServerNotificationMethod( + RootModel[Literal["item/agentMessage/delta"]] +): + root: Literal["item/agentMessage/delta"] = Field( + ..., title="Item/agentMessage/deltaServerNotificationMethod" + ) + + +class ItemAgentMessageDeltaServerNotification(BaseModel): + method: ItemAgentMessageDeltaServerNotificationMethod = Field( + ..., title="Item/agentMessage/deltaServerNotificationMethod" + ) + params: AgentMessageDeltaNotification + + +class ItemPlanDeltaServerNotificationMethod(RootModel[Literal["item/plan/delta"]]): + root: Literal["item/plan/delta"] = Field( + ..., title="Item/plan/deltaServerNotificationMethod" + ) + + +class ItemPlanDeltaServerNotification(BaseModel): + method: ItemPlanDeltaServerNotificationMethod = Field( + ..., title="Item/plan/deltaServerNotificationMethod" + ) + params: PlanDeltaNotification + + +class CommandExecOutputDeltaServerNotificationMethod( + RootModel[Literal["command/exec/outputDelta"]] +): + root: Literal["command/exec/outputDelta"] = Field( + ..., title="Command/exec/outputDeltaServerNotificationMethod" + ) + + +class ItemCommandExecutionOutputDeltaServerNotificationMethod( + RootModel[Literal["item/commandExecution/outputDelta"]] +): + root: Literal["item/commandExecution/outputDelta"] = Field( + ..., title="Item/commandExecution/outputDeltaServerNotificationMethod" + ) + + +class ItemCommandExecutionOutputDeltaServerNotification(BaseModel): + method: ItemCommandExecutionOutputDeltaServerNotificationMethod = Field( + ..., title="Item/commandExecution/outputDeltaServerNotificationMethod" + ) + params: CommandExecutionOutputDeltaNotification + + +class ItemCommandExecutionTerminalInteractionServerNotificationMethod( + RootModel[Literal["item/commandExecution/terminalInteraction"]] +): + root: Literal["item/commandExecution/terminalInteraction"] = Field( + ..., title="Item/commandExecution/terminalInteractionServerNotificationMethod" + ) + + +class ItemFileChangeOutputDeltaServerNotificationMethod( + RootModel[Literal["item/fileChange/outputDelta"]] +): + root: Literal["item/fileChange/outputDelta"] = Field( + ..., title="Item/fileChange/outputDeltaServerNotificationMethod" + ) + + +class ItemFileChangeOutputDeltaServerNotification(BaseModel): + method: ItemFileChangeOutputDeltaServerNotificationMethod = Field( + ..., title="Item/fileChange/outputDeltaServerNotificationMethod" + ) + params: FileChangeOutputDeltaNotification + + +class ServerRequestResolvedServerNotificationMethod( + RootModel[Literal["serverRequest/resolved"]] +): + root: Literal["serverRequest/resolved"] = Field( + ..., title="ServerRequest/resolvedServerNotificationMethod" + ) + + +class ItemMcpToolCallProgressServerNotificationMethod( + RootModel[Literal["item/mcpToolCall/progress"]] +): + root: Literal["item/mcpToolCall/progress"] = Field( + ..., title="Item/mcpToolCall/progressServerNotificationMethod" + ) + + +class ItemMcpToolCallProgressServerNotification(BaseModel): + method: ItemMcpToolCallProgressServerNotificationMethod = Field( + ..., title="Item/mcpToolCall/progressServerNotificationMethod" + ) + params: McpToolCallProgressNotification + + +class McpServerOauthLoginCompletedServerNotificationMethod( + RootModel[Literal["mcpServer/oauthLogin/completed"]] +): + root: Literal["mcpServer/oauthLogin/completed"] = Field( + ..., title="McpServer/oauthLogin/completedServerNotificationMethod" + ) + + +class McpServerOauthLoginCompletedServerNotification(BaseModel): + method: McpServerOauthLoginCompletedServerNotificationMethod = Field( + ..., title="McpServer/oauthLogin/completedServerNotificationMethod" + ) + params: McpServerOauthLoginCompletedNotification + + +class AccountUpdatedServerNotificationMethod(RootModel[Literal["account/updated"]]): + root: Literal["account/updated"] = Field( + ..., title="Account/updatedServerNotificationMethod" + ) + + +class AccountRateLimitsUpdatedServerNotificationMethod( + RootModel[Literal["account/rateLimits/updated"]] +): + root: Literal["account/rateLimits/updated"] = Field( + ..., title="Account/rateLimits/updatedServerNotificationMethod" + ) + + +class AppListUpdatedServerNotificationMethod(RootModel[Literal["app/list/updated"]]): + root: Literal["app/list/updated"] = Field( + ..., title="App/list/updatedServerNotificationMethod" + ) + + +class ItemReasoningSummaryTextDeltaServerNotificationMethod( + RootModel[Literal["item/reasoning/summaryTextDelta"]] +): + root: Literal["item/reasoning/summaryTextDelta"] = Field( + ..., title="Item/reasoning/summaryTextDeltaServerNotificationMethod" + ) + + +class ItemReasoningSummaryTextDeltaServerNotification(BaseModel): + method: ItemReasoningSummaryTextDeltaServerNotificationMethod = Field( + ..., title="Item/reasoning/summaryTextDeltaServerNotificationMethod" + ) + params: ReasoningSummaryTextDeltaNotification + + +class ItemReasoningSummaryPartAddedServerNotificationMethod( + RootModel[Literal["item/reasoning/summaryPartAdded"]] +): + root: Literal["item/reasoning/summaryPartAdded"] = Field( + ..., title="Item/reasoning/summaryPartAddedServerNotificationMethod" + ) + + +class ItemReasoningSummaryPartAddedServerNotification(BaseModel): + method: ItemReasoningSummaryPartAddedServerNotificationMethod = Field( + ..., title="Item/reasoning/summaryPartAddedServerNotificationMethod" + ) + params: ReasoningSummaryPartAddedNotification + + +class ItemReasoningTextDeltaServerNotificationMethod( + RootModel[Literal["item/reasoning/textDelta"]] +): + root: Literal["item/reasoning/textDelta"] = Field( + ..., title="Item/reasoning/textDeltaServerNotificationMethod" + ) + + +class ItemReasoningTextDeltaServerNotification(BaseModel): + method: ItemReasoningTextDeltaServerNotificationMethod = Field( + ..., title="Item/reasoning/textDeltaServerNotificationMethod" + ) + params: ReasoningTextDeltaNotification + + +class ThreadCompactedServerNotificationMethod(RootModel[Literal["thread/compacted"]]): + root: Literal["thread/compacted"] = Field( + ..., title="Thread/compactedServerNotificationMethod" + ) + + +class ThreadCompactedServerNotification(BaseModel): + method: ThreadCompactedServerNotificationMethod = Field( + ..., title="Thread/compactedServerNotificationMethod" + ) + params: ContextCompactedNotification + + +class ModelReroutedServerNotificationMethod(RootModel[Literal["model/rerouted"]]): + root: Literal["model/rerouted"] = Field( + ..., title="Model/reroutedServerNotificationMethod" + ) + + +class ModelReroutedServerNotification(BaseModel): + method: ModelReroutedServerNotificationMethod = Field( + ..., title="Model/reroutedServerNotificationMethod" + ) + params: ModelReroutedNotification + + +class DeprecationNoticeServerNotificationMethod( + RootModel[Literal["deprecationNotice"]] +): + root: Literal["deprecationNotice"] = Field( + ..., title="DeprecationNoticeServerNotificationMethod" + ) + + +class DeprecationNoticeServerNotification(BaseModel): + method: DeprecationNoticeServerNotificationMethod = Field( + ..., title="DeprecationNoticeServerNotificationMethod" + ) + params: DeprecationNoticeNotification + + +class ConfigWarningServerNotificationMethod(RootModel[Literal["configWarning"]]): + root: Literal["configWarning"] = Field( + ..., title="ConfigWarningServerNotificationMethod" + ) + + +class FuzzyFileSearchSessionUpdatedServerNotificationMethod( + RootModel[Literal["fuzzyFileSearch/sessionUpdated"]] +): + root: Literal["fuzzyFileSearch/sessionUpdated"] = Field( + ..., title="FuzzyFileSearch/sessionUpdatedServerNotificationMethod" + ) + + +class FuzzyFileSearchSessionUpdatedServerNotification(BaseModel): + method: FuzzyFileSearchSessionUpdatedServerNotificationMethod = Field( + ..., title="FuzzyFileSearch/sessionUpdatedServerNotificationMethod" + ) + params: FuzzyFileSearchSessionUpdatedNotification + + +class FuzzyFileSearchSessionCompletedServerNotificationMethod( + RootModel[Literal["fuzzyFileSearch/sessionCompleted"]] +): + root: Literal["fuzzyFileSearch/sessionCompleted"] = Field( + ..., title="FuzzyFileSearch/sessionCompletedServerNotificationMethod" + ) + + +class FuzzyFileSearchSessionCompletedServerNotification(BaseModel): + method: FuzzyFileSearchSessionCompletedServerNotificationMethod = Field( + ..., title="FuzzyFileSearch/sessionCompletedServerNotificationMethod" + ) + params: FuzzyFileSearchSessionCompletedNotification + + +class ThreadRealtimeStartedServerNotificationMethod( + RootModel[Literal["thread/realtime/started"]] +): + root: Literal["thread/realtime/started"] = Field( + ..., title="Thread/realtime/startedServerNotificationMethod" + ) + + +class ThreadRealtimeItemAddedServerNotificationMethod( + RootModel[Literal["thread/realtime/itemAdded"]] +): + root: Literal["thread/realtime/itemAdded"] = Field( + ..., title="Thread/realtime/itemAddedServerNotificationMethod" + ) + + +class ThreadRealtimeOutputAudioDeltaServerNotificationMethod( + RootModel[Literal["thread/realtime/outputAudio/delta"]] +): + root: Literal["thread/realtime/outputAudio/delta"] = Field( + ..., title="Thread/realtime/outputAudio/deltaServerNotificationMethod" + ) + + +class ThreadRealtimeErrorServerNotificationMethod( + RootModel[Literal["thread/realtime/error"]] +): + root: Literal["thread/realtime/error"] = Field( + ..., title="Thread/realtime/errorServerNotificationMethod" + ) + + +class ThreadRealtimeClosedServerNotificationMethod( + RootModel[Literal["thread/realtime/closed"]] +): + root: Literal["thread/realtime/closed"] = Field( + ..., title="Thread/realtime/closedServerNotificationMethod" + ) + + +class WindowsWorldWritableWarningServerNotificationMethod( + RootModel[Literal["windows/worldWritableWarning"]] +): + root: Literal["windows/worldWritableWarning"] = Field( + ..., title="Windows/worldWritableWarningServerNotificationMethod" + ) + + +class WindowsSandboxSetupCompletedServerNotificationMethod( + RootModel[Literal["windowsSandbox/setupCompleted"]] +): + root: Literal["windowsSandbox/setupCompleted"] = Field( + ..., title="WindowsSandbox/setupCompletedServerNotificationMethod" + ) + + +class AccountLoginCompletedServerNotificationMethod( + RootModel[Literal["account/login/completed"]] +): + root: Literal["account/login/completed"] = Field( + ..., title="Account/login/completedServerNotificationMethod" + ) + + +class AccountLoginCompletedServerNotification(BaseModel): + method: AccountLoginCompletedServerNotificationMethod = Field( + ..., title="Account/login/completedServerNotificationMethod" + ) + params: AccountLoginCompletedNotification + + +class ItemCommandExecutionRequestApprovalServerRequestMethod( + RootModel[Literal["item/commandExecution/requestApproval"]] +): + root: Literal["item/commandExecution/requestApproval"] = Field( + ..., title="Item/commandExecution/requestApprovalServerRequestMethod" + ) + + +class ItemFileChangeRequestApprovalServerRequestMethod( + RootModel[Literal["item/fileChange/requestApproval"]] +): + root: Literal["item/fileChange/requestApproval"] = Field( + ..., title="Item/fileChange/requestApprovalServerRequestMethod" + ) + + +class ItemFileChangeRequestApprovalServerRequest(BaseModel): + id: RequestId + method: ItemFileChangeRequestApprovalServerRequestMethod = Field( + ..., title="Item/fileChange/requestApprovalServerRequestMethod" + ) + params: FileChangeRequestApprovalParams + + +class ItemToolRequestUserInputServerRequestMethod( + RootModel[Literal["item/tool/requestUserInput"]] +): + root: Literal["item/tool/requestUserInput"] = Field( + ..., title="Item/tool/requestUserInputServerRequestMethod" + ) + + +class McpServerElicitationRequestServerRequestMethod( + RootModel[Literal["mcpServer/elicitation/request"]] +): + root: Literal["mcpServer/elicitation/request"] = Field( + ..., title="McpServer/elicitation/requestServerRequestMethod" + ) + + +class ItemPermissionsRequestApprovalServerRequestMethod( + RootModel[Literal["item/permissions/requestApproval"]] +): + root: Literal["item/permissions/requestApproval"] = Field( + ..., title="Item/permissions/requestApprovalServerRequestMethod" + ) + + +class ItemToolCallServerRequestMethod(RootModel[Literal["item/tool/call"]]): + root: Literal["item/tool/call"] = Field( + ..., title="Item/tool/callServerRequestMethod" + ) + + +class ItemToolCallServerRequest(BaseModel): + id: RequestId + method: ItemToolCallServerRequestMethod = Field( + ..., title="Item/tool/callServerRequestMethod" + ) + params: DynamicToolCallParams + + +class AccountChatgptAuthTokensRefreshServerRequestMethod( + RootModel[Literal["account/chatgptAuthTokens/refresh"]] +): + root: Literal["account/chatgptAuthTokens/refresh"] = Field( + ..., title="Account/chatgptAuthTokens/refreshServerRequestMethod" + ) + + +class ApplyPatchApprovalServerRequestMethod(RootModel[Literal["applyPatchApproval"]]): + root: Literal["applyPatchApproval"] = Field( + ..., title="ApplyPatchApprovalServerRequestMethod" + ) + + +class ExecCommandApprovalServerRequestMethod(RootModel[Literal["execCommandApproval"]]): + root: Literal["execCommandApproval"] = Field( + ..., title="ExecCommandApprovalServerRequestMethod" + ) + + +class ServerRequestResolvedNotification(BaseModel): + request_id: RequestId = Field(..., alias="requestId") + thread_id: str = Field(..., alias="threadId") + + +class ServiceTier(StrEnum): + fast = "fast" + flex = "flex" + + +class SessionNetworkProxyRuntime(BaseModel): + http_addr: str + socks_addr: str + + +class SessionSource1(StrEnum): + cli = "cli" + vscode = "vscode" + exec = "exec" + app_server = "appServer" + unknown = "unknown" class SkillErrorInfo(BaseModel): @@ -4007,20 +3581,20 @@ class SkillErrorInfo(BaseModel): path: str -class SkillScope(StrEnum): - user = 'user' - repo = 'repo' - system = 'system' - admin = 'admin' - - class SkillInterface(BaseModel): - brand_color: str | None = Field(default=None, alias='brandColor') - default_prompt: str | None = Field(default=None, alias='defaultPrompt') - display_name: str | None = Field(default=None, alias='displayName') - icon_large: str | None = Field(default=None, alias='iconLarge') - icon_small: str | None = Field(default=None, alias='iconSmall') - short_description: str | None = Field(default=None, alias='shortDescription') + brand_color: str | None = Field(default=None, alias="brandColor") + default_prompt: str | None = Field(default=None, alias="defaultPrompt") + display_name: str | None = Field(default=None, alias="displayName") + icon_large: str | None = Field(default=None, alias="iconLarge") + icon_small: str | None = Field(default=None, alias="iconSmall") + short_description: str | None = Field(default=None, alias="shortDescription") + + +class SkillScope(StrEnum): + user = "user" + repo = "repo" + system = "system" + admin = "admin" class SkillToolDependency(BaseModel): @@ -4032,232 +3606,1974 @@ class SkillToolDependency(BaseModel): value: str -class CommandExecOutputStream(RootModel[Literal['stdout'] | Literal['stderr']]): - root: Literal['stdout'] | Literal['stderr'] = Field( - ..., description='Stream label for `command/exec/outputDelta` notifications.' - ) +class SkillsChangedNotification(BaseModel): + pass -class ExternalAgentConfigDetectParams(BaseModel): +class SkillsConfigWriteParams(BaseModel): + enabled: bool + path: str + + +class SkillsListExtraRootsForCwd(BaseModel): + cwd: str + extra_user_roots: list[str] = Field(..., alias="extraUserRoots") + + +class SkillsListParams(BaseModel): cwds: list[str] | None = Field( default=None, - description='Zero or more working directories to include for repo-scoped detection.', + description="When empty, defaults to the current session working directory.", ) - include_home: bool | None = Field( + force_reload: bool | None = Field( default=None, - alias='includeHome', - description="If true, include detection under the user's home (~/.claude, ~/.codex, etc.).", + alias="forceReload", + description="When true, bypass the skills cache and re-scan skills from disk.", ) - - -class McpAuthStatus(StrEnum): - unsupported = 'unsupported' - not_logged_in = 'notLoggedIn' - bearer_token = 'bearerToken' - o_auth = 'oAuth' - - -class ConfigReadParams(BaseModel): - cwd: str | None = Field( + per_cwd_extra_user_roots: list[SkillsListExtraRootsForCwd] | None = Field( default=None, - 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).', + alias="perCwdExtraUserRoots", + description="Optional per-cwd extra roots to scan as user-scoped skills.", ) - include_layers: bool | None = Field(default=False, alias='includeLayers') -class ThreadUnarchiveParams(BaseModel): - thread_id: str = Field(..., alias='threadId') +class SkillsRemoteReadParams(BaseModel): + enabled: bool | None = False + hazelnut_scope: HazelnutScope | None = Field( + default="example", alias="hazelnutScope" + ) + product_surface: ProductSurface | None = Field( + default="codex", alias="productSurface" + ) -class ThreadSourceKind(StrEnum): - cli = 'cli' - vscode = 'vscode' - exec = 'exec' - app_server = 'appServer' - sub_agent = 'subAgent' - sub_agent_review = 'subAgentReview' - sub_agent_compact = 'subAgentCompact' - sub_agent_thread_spawn = 'subAgentThreadSpawn' - sub_agent_other = 'subAgentOther' - unknown = 'unknown' +class SkillsRemoteWriteParams(BaseModel): + hazelnut_id: str = Field(..., alias="hazelnutId") -class ThreadSortKey(StrEnum): - created_at = 'created_at' - updated_at = 'updated_at' +class StepStatus(StrEnum): + pending = "pending" + in_progress = "in_progress" + completed = "completed" -class ListMcpServerStatusParams(BaseModel): - cursor: str | None = Field( +class SubAgentSource1(StrEnum): + review = "review" + compact = "compact" + memory_consolidation = "memory_consolidation" + + +class OtherSubAgentSource(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + other: str + + +class TerminalInteractionNotification(BaseModel): + item_id: str = Field(..., alias="itemId") + process_id: str = Field(..., alias="processId") + stdin: str + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class TextElement(BaseModel): + byte_range: ByteRange = Field( + ..., + alias="byteRange", + description="Byte range in the parent `text` buffer that this element occupies.", + ) + placeholder: str | None = Field( default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - limit: int | None = Field( - default=None, - description='Optional page size; defaults to a server-defined value.', - ge=0, + description="Optional human-readable placeholder for the element, displayed in the UI.", ) -class ThreadSetNameParams(BaseModel): - name: str - thread_id: str = Field(..., alias='threadId') +class TextPosition(BaseModel): + column: int = Field( + ..., description="1-based column number (in Unicode scalar values).", ge=0 + ) + line: int = Field(..., description="1-based line number.", ge=0) -class McpServerOauthLoginCompletedNotification(BaseModel): - error: str | None = None - name: str - success: bool +class TextRange(BaseModel): + end: TextPosition + start: TextPosition -class AppScreenshot(BaseModel): - file_id: str | None = Field(default=None, alias='fileId') - url: str | None = None - user_prompt: str = Field(..., alias='userPrompt') - - -class AppReview(BaseModel): - status: str - - -class AppBranding(BaseModel): - category: str | None = None - developer: str | None = None - is_discoverable_app: bool = Field(..., alias='isDiscoverableApp') - privacy_policy: str | None = Field(default=None, alias='privacyPolicy') - terms_of_service: str | None = Field(default=None, alias='termsOfService') - website: str | None = None - - -class WindowsSandboxSetupCompletedNotification(BaseModel): - error: str | None = None - mode: WindowsSandboxSetupMode - success: bool - - -class Resource(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - annotations: Any | None = None - description: str | None = None - icons: list[Any] | None = None - mime_type: str | None = Field(default=None, alias='mimeType') - name: str - size: int | None = None - title: str | None = None - uri: str - - -class PlanDeltaNotification(BaseModel): - delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') +class ThreadActiveFlag(StrEnum): + waiting_on_approval = "waitingOnApproval" + waiting_on_user_input = "waitingOnUserInput" class ThreadArchiveParams(BaseModel): - thread_id: str = Field(..., alias='threadId') + thread_id: str = Field(..., alias="threadId") -class ReasoningTextDeltaNotification(BaseModel): - content_index: int = Field(..., alias='contentIndex') - delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') +class ThreadArchivedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") -class TurnPlanStepStatus(StrEnum): - pending = 'pending' - in_progress = 'inProgress' - completed = 'completed' +class ThreadClosedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") -class TurnInterruptParams(BaseModel): - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') +class ThreadCompactStartParams(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadForkParams(BaseModel): + approval_policy: AskForApproval | None = Field(default=None, alias="approvalPolicy") + base_instructions: str | None = Field(default=None, alias="baseInstructions") + config: dict[str, Any] | None = None + cwd: str | None = None + developer_instructions: str | None = Field( + default=None, alias="developerInstructions" + ) + model: str | None = Field( + default=None, + description="Configuration overrides for the forked thread, if any.", + ) + model_provider: str | None = Field(default=None, alias="modelProvider") + sandbox: SandboxMode | None = None + service_tier: ServiceTier | None = Field(default=None, alias="serviceTier") + thread_id: str = Field(..., alias="threadId") + + +class ThreadId(RootModel[str]): + root: str + + +class UserMessageThreadItemType(RootModel[Literal["userMessage"]]): + root: Literal["userMessage"] = Field(..., title="UserMessageThreadItemType") + + +class AgentMessageThreadItemType(RootModel[Literal["agentMessage"]]): + root: Literal["agentMessage"] = Field(..., title="AgentMessageThreadItemType") + + +class AgentMessageThreadItem(BaseModel): + id: str + phase: MessagePhase | None = None + text: str + type: AgentMessageThreadItemType = Field(..., title="AgentMessageThreadItemType") + + +class PlanThreadItemType(RootModel[Literal["plan"]]): + root: Literal["plan"] = Field(..., title="PlanThreadItemType") + + +class PlanThreadItem(BaseModel): + id: str + text: str + type: PlanThreadItemType = Field(..., title="PlanThreadItemType") + + +class ReasoningThreadItemType(RootModel[Literal["reasoning"]]): + root: Literal["reasoning"] = Field(..., title="ReasoningThreadItemType") + + +class ReasoningThreadItem(BaseModel): + content: list[str] | None = [] + id: str + summary: list[str] | None = [] + type: ReasoningThreadItemType = Field(..., title="ReasoningThreadItemType") + + +class CommandExecutionThreadItemType(RootModel[Literal["commandExecution"]]): + root: Literal["commandExecution"] = Field( + ..., title="CommandExecutionThreadItemType" + ) + + +class CommandExecutionThreadItem(BaseModel): + aggregated_output: str | None = Field( + default=None, + alias="aggregatedOutput", + description="The command's output, aggregated from stdout and stderr.", + ) + command: str = Field(..., description="The command to be executed.") + command_actions: list[CommandAction] = Field( + ..., + alias="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.", + ) + cwd: str = Field(..., description="The command's working directory.") + duration_ms: int | None = Field( + default=None, + alias="durationMs", + description="The duration of the command execution in milliseconds.", + ) + exit_code: int | None = Field( + default=None, alias="exitCode", description="The command's exit code." + ) + id: str + process_id: str | None = Field( + default=None, + alias="processId", + description="Identifier for the underlying PTY process (when available).", + ) + status: CommandExecutionStatus + type: CommandExecutionThreadItemType = Field( + ..., title="CommandExecutionThreadItemType" + ) + + +class FileChangeThreadItemType(RootModel[Literal["fileChange"]]): + root: Literal["fileChange"] = Field(..., title="FileChangeThreadItemType") + + +class McpToolCallThreadItemType(RootModel[Literal["mcpToolCall"]]): + root: Literal["mcpToolCall"] = Field(..., title="McpToolCallThreadItemType") + + +class McpToolCallThreadItem(BaseModel): + arguments: Any + duration_ms: int | None = Field( + default=None, + alias="durationMs", + description="The duration of the MCP tool call in milliseconds.", + ) + error: McpToolCallError | None = None + id: str + result: McpToolCallResult | None = None + server: str + status: McpToolCallStatus + tool: str + type: McpToolCallThreadItemType = Field(..., title="McpToolCallThreadItemType") + + +class DynamicToolCallThreadItemType(RootModel[Literal["dynamicToolCall"]]): + root: Literal["dynamicToolCall"] = Field(..., title="DynamicToolCallThreadItemType") + + +class DynamicToolCallThreadItem(BaseModel): + arguments: Any + content_items: list[DynamicToolCallOutputContentItem] | None = Field( + default=None, alias="contentItems" + ) + duration_ms: int | None = Field( + default=None, + alias="durationMs", + description="The duration of the dynamic tool call in milliseconds.", + ) + id: str + status: DynamicToolCallStatus + success: bool | None = None + tool: str + type: DynamicToolCallThreadItemType = Field( + ..., title="DynamicToolCallThreadItemType" + ) + + +class CollabAgentToolCallThreadItemType(RootModel[Literal["collabAgentToolCall"]]): + root: Literal["collabAgentToolCall"] = Field( + ..., title="CollabAgentToolCallThreadItemType" + ) + + +class WebSearchThreadItemType(RootModel[Literal["webSearch"]]): + root: Literal["webSearch"] = Field(..., title="WebSearchThreadItemType") + + +class ImageViewThreadItemType(RootModel[Literal["imageView"]]): + root: Literal["imageView"] = Field(..., title="ImageViewThreadItemType") + + +class ImageViewThreadItem(BaseModel): + id: str + path: str + type: ImageViewThreadItemType = Field(..., title="ImageViewThreadItemType") + + +class ImageGenerationThreadItemType(RootModel[Literal["imageGeneration"]]): + root: Literal["imageGeneration"] = Field(..., title="ImageGenerationThreadItemType") + + +class ImageGenerationThreadItem(BaseModel): + id: str + result: str + revised_prompt: str | None = Field(default=None, alias="revisedPrompt") + status: str + type: ImageGenerationThreadItemType = Field( + ..., title="ImageGenerationThreadItemType" + ) + + +class EnteredReviewModeThreadItemType(RootModel[Literal["enteredReviewMode"]]): + root: Literal["enteredReviewMode"] = Field( + ..., title="EnteredReviewModeThreadItemType" + ) + + +class EnteredReviewModeThreadItem(BaseModel): + id: str + review: str + type: EnteredReviewModeThreadItemType = Field( + ..., title="EnteredReviewModeThreadItemType" + ) + + +class ExitedReviewModeThreadItemType(RootModel[Literal["exitedReviewMode"]]): + root: Literal["exitedReviewMode"] = Field( + ..., title="ExitedReviewModeThreadItemType" + ) + + +class ExitedReviewModeThreadItem(BaseModel): + id: str + review: str + type: ExitedReviewModeThreadItemType = Field( + ..., title="ExitedReviewModeThreadItemType" + ) + + +class ContextCompactionThreadItemType(RootModel[Literal["contextCompaction"]]): + root: Literal["contextCompaction"] = Field( + ..., title="ContextCompactionThreadItemType" + ) + + +class ContextCompactionThreadItem(BaseModel): + id: str + type: ContextCompactionThreadItemType = Field( + ..., title="ContextCompactionThreadItemType" + ) + + +class ThreadLoadedListParams(BaseModel): + cursor: str | None = Field( + default=None, + description="Opaque pagination cursor returned by a previous call.", + ) + limit: int | None = Field( + default=None, description="Optional page size; defaults to no limit.", ge=0 + ) + + +class ThreadMetadataGitInfoUpdateParams(BaseModel): + branch: str | None = Field( + default=None, + description="Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.", + ) + origin_url: str | None = Field( + default=None, + alias="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.", + ) + sha: str | None = Field( + default=None, + description="Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.", + ) + + +class ThreadMetadataUpdateParams(BaseModel): + git_info: ThreadMetadataGitInfoUpdateParams | None = Field( + default=None, + alias="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.", + ) + thread_id: str = Field(..., alias="threadId") + + +class ThreadNameUpdatedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + thread_name: str | None = Field(default=None, alias="threadName") class ThreadReadParams(BaseModel): include_turns: bool | None = Field( default=False, - alias='includeTurns', - description='When true, include turns and their items from rollout history.', + alias="includeTurns", + description="When true, include turns and their items from rollout history.", ) - thread_id: str = Field(..., alias='threadId') + thread_id: str = Field(..., alias="threadId") -class ExperimentalFeatureListParams(BaseModel): - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', +class ThreadRealtimeAudioChunk(BaseModel): + data: str + num_channels: int = Field(..., alias="numChannels", ge=0) + sample_rate: int = Field(..., alias="sampleRate", ge=0) + samples_per_channel: int | None = Field( + default=None, alias="samplesPerChannel", ge=0 ) - limit: int | None = Field( - default=None, - description='Optional page size; defaults to a reasonable server-side value.', - ge=0, - ) - - -class HazelnutScope(StrEnum): - example = 'example' - workspace_shared = 'workspace-shared' - all_shared = 'all-shared' - personal = 'personal' - - -class ProductSurface(StrEnum): - chatgpt = 'chatgpt' - codex = 'codex' - api = 'api' - atlas = 'atlas' - - -class CancelLoginAccountParams(BaseModel): - login_id: str = Field(..., alias='loginId') - - -class ThreadCompactStartParams(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class TextPosition(BaseModel): - column: int = Field( - ..., description='1-based column number (in Unicode scalar values).', ge=0 - ) - line: int = Field(..., description='1-based line number.', ge=0) - - -class CommandExecutionOutputDeltaNotification(BaseModel): - delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class ThreadClosedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class ResourceTemplate(BaseModel): - annotations: Any | None = None - description: str | None = None - mime_type: str | None = Field(default=None, alias='mimeType') - name: str - title: str | None = None - uri_template: str = Field(..., alias='uriTemplate') - - -class TerminalInteractionNotification(BaseModel): - item_id: str = Field(..., alias='itemId') - process_id: str = Field(..., alias='processId') - stdin: str - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') class ThreadRealtimeClosedNotification(BaseModel): reason: str | None = None - thread_id: str = Field(..., alias='threadId') + thread_id: str = Field(..., alias="threadId") + + +class ThreadRealtimeErrorNotification(BaseModel): + message: str + thread_id: str = Field(..., alias="threadId") + + +class ThreadRealtimeItemAddedNotification(BaseModel): + item: Any + thread_id: str = Field(..., alias="threadId") + + +class ThreadRealtimeOutputAudioDeltaNotification(BaseModel): + audio: ThreadRealtimeAudioChunk + thread_id: str = Field(..., alias="threadId") + + +class ThreadRealtimeStartedNotification(BaseModel): + session_id: str | None = Field(default=None, alias="sessionId") + thread_id: str = Field(..., alias="threadId") + + +class ThreadResumeParams(BaseModel): + approval_policy: AskForApproval | None = Field(default=None, alias="approvalPolicy") + base_instructions: str | None = Field(default=None, alias="baseInstructions") + config: dict[str, Any] | None = None + cwd: str | None = None + developer_instructions: str | None = Field( + default=None, alias="developerInstructions" + ) + model: str | None = Field( + default=None, + description="Configuration overrides for the resumed thread, if any.", + ) + model_provider: str | None = Field(default=None, alias="modelProvider") + personality: Personality | None = None + sandbox: SandboxMode | None = None + service_tier: ServiceTier | None = Field(default=None, alias="serviceTier") + thread_id: str = Field(..., alias="threadId") + + +class ThreadRollbackParams(BaseModel): + num_turns: int = Field( + ..., + alias="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.", + ge=0, + ) + thread_id: str = Field(..., alias="threadId") + + +class ThreadSetNameParams(BaseModel): + name: str + thread_id: str = Field(..., alias="threadId") + + +class ThreadSortKey(StrEnum): + created_at = "created_at" + updated_at = "updated_at" + + +class ThreadSourceKind(StrEnum): + cli = "cli" + vscode = "vscode" + exec = "exec" + app_server = "appServer" + sub_agent = "subAgent" + sub_agent_review = "subAgentReview" + sub_agent_compact = "subAgentCompact" + sub_agent_thread_spawn = "subAgentThreadSpawn" + sub_agent_other = "subAgentOther" + unknown = "unknown" + + +class ThreadStartParams(BaseModel): + approval_policy: AskForApproval | None = Field(default=None, alias="approvalPolicy") + base_instructions: str | None = Field(default=None, alias="baseInstructions") + config: dict[str, Any] | None = None + cwd: str | None = None + developer_instructions: str | None = Field( + default=None, alias="developerInstructions" + ) + ephemeral: bool | None = None + model: str | None = None + model_provider: str | None = Field(default=None, alias="modelProvider") + personality: Personality | None = None + sandbox: SandboxMode | None = None + service_name: str | None = Field(default=None, alias="serviceName") + service_tier: ServiceTier | None = Field(default=None, alias="serviceTier") + + +class NotLoadedThreadStatusType(RootModel[Literal["notLoaded"]]): + root: Literal["notLoaded"] = Field(..., title="NotLoadedThreadStatusType") + + +class NotLoadedThreadStatus(BaseModel): + type: NotLoadedThreadStatusType = Field(..., title="NotLoadedThreadStatusType") + + +class IdleThreadStatusType(RootModel[Literal["idle"]]): + root: Literal["idle"] = Field(..., title="IdleThreadStatusType") + + +class IdleThreadStatus(BaseModel): + type: IdleThreadStatusType = Field(..., title="IdleThreadStatusType") + + +class SystemErrorThreadStatusType(RootModel[Literal["systemError"]]): + root: Literal["systemError"] = Field(..., title="SystemErrorThreadStatusType") + + +class SystemErrorThreadStatus(BaseModel): + type: SystemErrorThreadStatusType = Field(..., title="SystemErrorThreadStatusType") + + +class ActiveThreadStatusType(RootModel[Literal["active"]]): + root: Literal["active"] = Field(..., title="ActiveThreadStatusType") + + +class ActiveThreadStatus(BaseModel): + active_flags: list[ThreadActiveFlag] = Field(..., alias="activeFlags") + type: ActiveThreadStatusType = Field(..., title="ActiveThreadStatusType") + + +class ThreadStatus( + RootModel[ + NotLoadedThreadStatus + | IdleThreadStatus + | SystemErrorThreadStatus + | ActiveThreadStatus + ] +): + root: ( + NotLoadedThreadStatus + | IdleThreadStatus + | SystemErrorThreadStatus + | ActiveThreadStatus + ) + + +class ThreadStatusChangedNotification(BaseModel): + status: ThreadStatus + thread_id: str = Field(..., alias="threadId") + + +class ThreadUnarchiveParams(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadUnarchivedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadUnsubscribeParams(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class TokenUsage(BaseModel): + cached_input_tokens: int + input_tokens: int + output_tokens: int + reasoning_output_tokens: int + total_tokens: int + + +class TokenUsageBreakdown(BaseModel): + cached_input_tokens: int = Field(..., alias="cachedInputTokens") + input_tokens: int = Field(..., alias="inputTokens") + output_tokens: int = Field(..., alias="outputTokens") + reasoning_output_tokens: int = Field(..., alias="reasoningOutputTokens") + total_tokens: int = Field(..., alias="totalTokens") + + +class TokenUsageInfo(BaseModel): + last_token_usage: TokenUsage + model_context_window: int | None = None + total_token_usage: TokenUsage + + +class Tool(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + annotations: Any | None = None + description: str | None = None + icons: list[Any] | None = None + input_schema: Any = Field(..., alias="inputSchema") + name: str + output_schema: Any | None = Field(None, alias="outputSchema") + title: str | None = None + + +class ToolRequestUserInputAnswer(BaseModel): + answers: list[str] + + +class ToolRequestUserInputOption(BaseModel): + description: str + label: str + + +class ToolRequestUserInputQuestion(BaseModel): + header: str + id: str + is_other: bool | None = Field(default=False, alias="isOther") + is_secret: bool | None = Field(default=False, alias="isSecret") + options: list[ToolRequestUserInputOption] | None = None + question: str + + +class ToolRequestUserInputResponse(BaseModel): + answers: dict[str, ToolRequestUserInputAnswer] + + +class TurnAbortReason(StrEnum): + interrupted = "interrupted" + replaced = "replaced" + review_ended = "review_ended" + + +class TurnDiffUpdatedNotification(BaseModel): + diff: str + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class TurnError(BaseModel): + additional_details: str | None = Field(default=None, alias="additionalDetails") + codex_error_info: CodexErrorInfo | None = Field( + default=None, alias="codexErrorInfo" + ) + message: str + + +class TurnInterruptParams(BaseModel): + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class UserMessageTurnItemType(RootModel[Literal["UserMessage"]]): + root: Literal["UserMessage"] = Field(..., title="UserMessageTurnItemType") + + +class AgentMessageTurnItemType(RootModel[Literal["AgentMessage"]]): + root: Literal["AgentMessage"] = Field(..., title="AgentMessageTurnItemType") + + +class AgentMessageTurnItem(BaseModel): + content: list[AgentMessageContent] + id: str + phase: MessagePhase | None = Field( + default=None, + description="Optional phase metadata carried through from `ResponseItem::Message`.\n\nThis is currently used by TUI rendering to distinguish mid-turn commentary from a final answer and avoid status-indicator jitter.", + ) + type: AgentMessageTurnItemType = Field(..., title="AgentMessageTurnItemType") + + +class PlanTurnItemType(RootModel[Literal["Plan"]]): + root: Literal["Plan"] = Field(..., title="PlanTurnItemType") + + +class PlanTurnItem(BaseModel): + id: str + text: str + type: PlanTurnItemType = Field(..., title="PlanTurnItemType") + + +class ReasoningTurnItemType(RootModel[Literal["Reasoning"]]): + root: Literal["Reasoning"] = Field(..., title="ReasoningTurnItemType") + + +class ReasoningTurnItem(BaseModel): + id: str + raw_content: list[str] | None = [] + summary_text: list[str] + type: ReasoningTurnItemType = Field(..., title="ReasoningTurnItemType") + + +class WebSearchTurnItemType(RootModel[Literal["WebSearch"]]): + root: Literal["WebSearch"] = Field(..., title="WebSearchTurnItemType") + + +class WebSearchTurnItem(BaseModel): + action: ResponsesApiWebSearchAction + id: str + query: str + type: WebSearchTurnItemType = Field(..., title="WebSearchTurnItemType") + + +class ImageGenerationTurnItemType(RootModel[Literal["ImageGeneration"]]): + root: Literal["ImageGeneration"] = Field(..., title="ImageGenerationTurnItemType") + + +class ImageGenerationTurnItem(BaseModel): + id: str + result: str + revised_prompt: str | None = None + saved_path: str | None = None + status: str + type: ImageGenerationTurnItemType = Field(..., title="ImageGenerationTurnItemType") + + +class ContextCompactionTurnItemType(RootModel[Literal["ContextCompaction"]]): + root: Literal["ContextCompaction"] = Field( + ..., title="ContextCompactionTurnItemType" + ) + + +class ContextCompactionTurnItem(BaseModel): + id: str + type: ContextCompactionTurnItemType = Field( + ..., title="ContextCompactionTurnItemType" + ) + + +class TurnPlanStepStatus(StrEnum): + pending = "pending" + in_progress = "inProgress" + completed = "completed" + + +class TurnStatus(StrEnum): + completed = "completed" + interrupted = "interrupted" + failed = "failed" + in_progress = "inProgress" + + +class TextUserInputType(RootModel[Literal["text"]]): + root: Literal["text"] = Field(..., title="TextUserInputType") + + +class TextUserInput(BaseModel): + text: str + text_elements: list[TextElement] | None = Field( + default_factory=list, + description="UI-defined spans within `text` used to render or persist special elements.", + ) + type: TextUserInputType = Field(..., title="TextUserInputType") + + +class ImageUserInputType(RootModel[Literal["image"]]): + root: Literal["image"] = Field(..., title="ImageUserInputType") + + +class ImageUserInput(BaseModel): + type: ImageUserInputType = Field(..., title="ImageUserInputType") + url: str + + +class LocalImageUserInputType(RootModel[Literal["localImage"]]): + root: Literal["localImage"] = Field(..., title="LocalImageUserInputType") + + +class LocalImageUserInput(BaseModel): + path: str + type: LocalImageUserInputType = Field(..., title="LocalImageUserInputType") + + +class SkillUserInputType(RootModel[Literal["skill"]]): + root: Literal["skill"] = Field(..., title="SkillUserInputType") + + +class SkillUserInput(BaseModel): + name: str + path: str + type: SkillUserInputType = Field(..., title="SkillUserInputType") + + +class MentionUserInputType(RootModel[Literal["mention"]]): + root: Literal["mention"] = Field(..., title="MentionUserInputType") + + +class MentionUserInput(BaseModel): + name: str + path: str + type: MentionUserInputType = Field(..., title="MentionUserInputType") + + +class UserInput( + RootModel[ + TextUserInput + | ImageUserInput + | LocalImageUserInput + | SkillUserInput + | MentionUserInput + ] +): + root: ( + TextUserInput + | ImageUserInput + | LocalImageUserInput + | SkillUserInput + | MentionUserInput + ) + + +class W3cTraceContext(BaseModel): + traceparent: str | None = None + tracestate: str | None = None + + +class SearchWebSearchActionType(RootModel[Literal["search"]]): + root: Literal["search"] = Field(..., title="SearchWebSearchActionType") + + +class SearchWebSearchAction(BaseModel): + queries: list[str] | None = None + query: str | None = None + type: SearchWebSearchActionType = Field(..., title="SearchWebSearchActionType") + + +class OpenPageWebSearchActionType(RootModel[Literal["openPage"]]): + root: Literal["openPage"] = Field(..., title="OpenPageWebSearchActionType") + + +class OpenPageWebSearchAction(BaseModel): + type: OpenPageWebSearchActionType = Field(..., title="OpenPageWebSearchActionType") + url: str | None = None + + +class FindInPageWebSearchActionType(RootModel[Literal["findInPage"]]): + root: Literal["findInPage"] = Field(..., title="FindInPageWebSearchActionType") + + +class FindInPageWebSearchAction(BaseModel): + pattern: str | None = None + type: FindInPageWebSearchActionType = Field( + ..., title="FindInPageWebSearchActionType" + ) + url: str | None = None + + +class OtherWebSearchActionType(RootModel[Literal["other"]]): + root: Literal["other"] = Field(..., title="OtherWebSearchActionType") + + +class OtherWebSearchAction(BaseModel): + type: OtherWebSearchActionType = Field(..., title="OtherWebSearchActionType") + + +class WebSearchAction( + RootModel[ + SearchWebSearchAction + | OpenPageWebSearchAction + | FindInPageWebSearchAction + | OtherWebSearchAction + ] +): + root: ( + SearchWebSearchAction + | OpenPageWebSearchAction + | FindInPageWebSearchAction + | OtherWebSearchAction + ) + + +class WindowsSandboxSetupMode(StrEnum): + elevated = "elevated" + unelevated = "unelevated" + + +class WindowsSandboxSetupStartParams(BaseModel): + cwd: AbsolutePathBuf | None = None + mode: WindowsSandboxSetupMode + + +class WindowsWorldWritableWarningNotification(BaseModel): + extra_count: int = Field(..., alias="extraCount", ge=0) + failed_scan: bool = Field(..., alias="failedScan") + sample_paths: list[str] = Field(..., alias="samplePaths") + + +class AccountUpdatedNotification(BaseModel): + auth_mode: AuthMode | None = Field(default=None, alias="authMode") + plan_type: PlanType | None = Field(default=None, alias="planType") + + +class AdditionalMacOsPermissions(BaseModel): + accessibility: bool + automations: MacOsAutomationPermission + calendar: bool + preferences: MacOsPreferencesPermission + + +class AdditionalPermissionProfile(BaseModel): + file_system: AdditionalFileSystemPermissions | None = Field( + default=None, alias="fileSystem" + ) + macos: AdditionalMacOsPermissions | None = None + network: AdditionalNetworkPermissions | None = None + + +class AppMetadata(BaseModel): + categories: list[str] | None = None + developer: str | None = None + first_party_requires_install: bool | None = Field( + default=None, alias="firstPartyRequiresInstall" + ) + first_party_type: str | None = Field(default=None, alias="firstPartyType") + review: AppReview | None = None + screenshots: list[AppScreenshot] | None = None + seo_description: str | None = Field(default=None, alias="seoDescription") + show_in_composer_when_unlinked: bool | None = Field( + default=None, alias="showInComposerWhenUnlinked" + ) + sub_categories: list[str] | None = Field(default=None, alias="subCategories") + version: str | None = None + version_id: str | None = Field(default=None, alias="versionId") + version_notes: str | None = Field(default=None, alias="versionNotes") + + +class ApplyPatchApprovalParams(BaseModel): + call_id: str = Field( + ..., + alias="callId", + description="Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent] and [codex_protocol::protocol::PatchApplyEndEvent].", + ) + conversation_id: ThreadId = Field(..., alias="conversationId") + file_changes: dict[str, FileChange] = Field(..., alias="fileChanges") + grant_root: str | None = Field( + default=None, + alias="grantRoot", + description="When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).", + ) + reason: str | None = Field( + default=None, + description="Optional explanatory reason (e.g. request for extra write access).", + ) + + +class ChatgptAuthTokensRefreshParams(BaseModel): + previous_account_id: str | None = Field( + default=None, + alias="previousAccountId", + description="Workspace/account identifier that Codex was previously using.\n\nClients that manage multiple accounts/workspaces can use this as a hint to refresh the token for the correct workspace.\n\nThis may be `null` when the prior auth state did not include a workspace identifier (`chatgpt_account_id`).", + ) + reason: ChatgptAuthTokensRefreshReason + + +class InitializeClientRequest(BaseModel): + id: RequestId + method: InitializeClientRequestMethod = Field( + ..., title="InitializeClientRequestMethod" + ) + params: InitializeParams + + +class ThreadStartClientRequest(BaseModel): + id: RequestId + method: ThreadStartClientRequestMethod = Field( + ..., title="Thread/startClientRequestMethod" + ) + params: ThreadStartParams + + +class ThreadResumeClientRequest(BaseModel): + id: RequestId + method: ThreadResumeClientRequestMethod = Field( + ..., title="Thread/resumeClientRequestMethod" + ) + params: ThreadResumeParams + + +class ThreadForkClientRequest(BaseModel): + id: RequestId + method: ThreadForkClientRequestMethod = Field( + ..., title="Thread/forkClientRequestMethod" + ) + params: ThreadForkParams + + +class ThreadArchiveClientRequest(BaseModel): + id: RequestId + method: ThreadArchiveClientRequestMethod = Field( + ..., title="Thread/archiveClientRequestMethod" + ) + params: ThreadArchiveParams + + +class ThreadUnsubscribeClientRequest(BaseModel): + id: RequestId + method: ThreadUnsubscribeClientRequestMethod = Field( + ..., title="Thread/unsubscribeClientRequestMethod" + ) + params: ThreadUnsubscribeParams + + +class ThreadNameSetClientRequest(BaseModel): + id: RequestId + method: ThreadNameSetClientRequestMethod = Field( + ..., title="Thread/name/setClientRequestMethod" + ) + params: ThreadSetNameParams + + +class ThreadMetadataUpdateClientRequest(BaseModel): + id: RequestId + method: ThreadMetadataUpdateClientRequestMethod = Field( + ..., title="Thread/metadata/updateClientRequestMethod" + ) + params: ThreadMetadataUpdateParams + + +class ThreadUnarchiveClientRequest(BaseModel): + id: RequestId + method: ThreadUnarchiveClientRequestMethod = Field( + ..., title="Thread/unarchiveClientRequestMethod" + ) + params: ThreadUnarchiveParams + + +class ThreadCompactStartClientRequest(BaseModel): + id: RequestId + method: ThreadCompactStartClientRequestMethod = Field( + ..., title="Thread/compact/startClientRequestMethod" + ) + params: ThreadCompactStartParams + + +class ThreadRollbackClientRequest(BaseModel): + id: RequestId + method: ThreadRollbackClientRequestMethod = Field( + ..., title="Thread/rollbackClientRequestMethod" + ) + params: ThreadRollbackParams + + +class ThreadLoadedListClientRequest(BaseModel): + id: RequestId + method: ThreadLoadedListClientRequestMethod = Field( + ..., title="Thread/loaded/listClientRequestMethod" + ) + params: ThreadLoadedListParams + + +class ThreadReadClientRequest(BaseModel): + id: RequestId + method: ThreadReadClientRequestMethod = Field( + ..., title="Thread/readClientRequestMethod" + ) + params: ThreadReadParams + + +class SkillsListClientRequest(BaseModel): + id: RequestId + method: SkillsListClientRequestMethod = Field( + ..., title="Skills/listClientRequestMethod" + ) + params: SkillsListParams + + +class PluginListClientRequest(BaseModel): + id: RequestId + method: PluginListClientRequestMethod = Field( + ..., title="Plugin/listClientRequestMethod" + ) + params: PluginListParams + + +class SkillsRemoteListClientRequest(BaseModel): + id: RequestId + method: SkillsRemoteListClientRequestMethod = Field( + ..., title="Skills/remote/listClientRequestMethod" + ) + params: SkillsRemoteReadParams + + +class SkillsRemoteExportClientRequest(BaseModel): + id: RequestId + method: SkillsRemoteExportClientRequestMethod = Field( + ..., title="Skills/remote/exportClientRequestMethod" + ) + params: SkillsRemoteWriteParams + + +class AppListClientRequest(BaseModel): + id: RequestId + method: AppListClientRequestMethod = Field(..., title="App/listClientRequestMethod") + params: AppsListParams + + +class SkillsConfigWriteClientRequest(BaseModel): + id: RequestId + method: SkillsConfigWriteClientRequestMethod = Field( + ..., title="Skills/config/writeClientRequestMethod" + ) + params: SkillsConfigWriteParams + + +class PluginInstallClientRequest(BaseModel): + id: RequestId + method: PluginInstallClientRequestMethod = Field( + ..., title="Plugin/installClientRequestMethod" + ) + params: PluginInstallParams + + +class TurnInterruptClientRequest(BaseModel): + id: RequestId + method: TurnInterruptClientRequestMethod = Field( + ..., title="Turn/interruptClientRequestMethod" + ) + params: TurnInterruptParams + + +class ModelListClientRequest(BaseModel): + id: RequestId + method: ModelListClientRequestMethod = Field( + ..., title="Model/listClientRequestMethod" + ) + params: ModelListParams + + +class ExperimentalFeatureListClientRequest(BaseModel): + id: RequestId + method: ExperimentalFeatureListClientRequestMethod = Field( + ..., title="ExperimentalFeature/listClientRequestMethod" + ) + params: ExperimentalFeatureListParams + + +class McpServerOauthLoginClientRequest(BaseModel): + id: RequestId + method: McpServerOauthLoginClientRequestMethod = Field( + ..., title="McpServer/oauth/loginClientRequestMethod" + ) + params: McpServerOauthLoginParams + + +class ConfigMcpServerReloadClientRequest(BaseModel): + id: RequestId + method: ConfigMcpServerReloadClientRequestMethod = Field( + ..., title="Config/mcpServer/reloadClientRequestMethod" + ) + params: None = None + + +class McpServerStatusListClientRequest(BaseModel): + id: RequestId + method: McpServerStatusListClientRequestMethod = Field( + ..., title="McpServerStatus/listClientRequestMethod" + ) + params: ListMcpServerStatusParams + + +class WindowsSandboxSetupStartClientRequest(BaseModel): + id: RequestId + method: WindowsSandboxSetupStartClientRequestMethod = Field( + ..., title="WindowsSandbox/setupStartClientRequestMethod" + ) + params: WindowsSandboxSetupStartParams + + +class AccountLoginStartClientRequest(BaseModel): + id: RequestId + method: AccountLoginStartClientRequestMethod = Field( + ..., title="Account/login/startClientRequestMethod" + ) + params: LoginAccountParams + + +class AccountLoginCancelClientRequest(BaseModel): + id: RequestId + method: AccountLoginCancelClientRequestMethod = Field( + ..., title="Account/login/cancelClientRequestMethod" + ) + params: CancelLoginAccountParams + + +class AccountLogoutClientRequest(BaseModel): + id: RequestId + method: AccountLogoutClientRequestMethod = Field( + ..., title="Account/logoutClientRequestMethod" + ) + params: None = None + + +class AccountRateLimitsReadClientRequest(BaseModel): + id: RequestId + method: AccountRateLimitsReadClientRequestMethod = Field( + ..., title="Account/rateLimits/readClientRequestMethod" + ) + params: None = None + + +class FeedbackUploadClientRequest(BaseModel): + id: RequestId + method: FeedbackUploadClientRequestMethod = Field( + ..., title="Feedback/uploadClientRequestMethod" + ) + params: FeedbackUploadParams + + +class CommandExecWriteClientRequest(BaseModel): + id: RequestId + method: CommandExecWriteClientRequestMethod = Field( + ..., title="Command/exec/writeClientRequestMethod" + ) + params: CommandExecWriteParams + + +class CommandExecTerminateClientRequest(BaseModel): + id: RequestId + method: CommandExecTerminateClientRequestMethod = Field( + ..., title="Command/exec/terminateClientRequestMethod" + ) + params: CommandExecTerminateParams + + +class ConfigReadClientRequest(BaseModel): + id: RequestId + method: ConfigReadClientRequestMethod = Field( + ..., title="Config/readClientRequestMethod" + ) + params: ConfigReadParams + + +class ExternalAgentConfigDetectClientRequest(BaseModel): + id: RequestId + method: ExternalAgentConfigDetectClientRequestMethod = Field( + ..., title="ExternalAgentConfig/detectClientRequestMethod" + ) + params: ExternalAgentConfigDetectParams + + +class ConfigRequirementsReadClientRequest(BaseModel): + id: RequestId + method: ConfigRequirementsReadClientRequestMethod = Field( + ..., title="ConfigRequirements/readClientRequestMethod" + ) + params: None = None + + +class AccountReadClientRequest(BaseModel): + id: RequestId + method: AccountReadClientRequestMethod = Field( + ..., title="Account/readClientRequestMethod" + ) + params: GetAccountParams + + +class FuzzyFileSearchClientRequest(BaseModel): + id: RequestId + method: FuzzyFileSearchClientRequestMethod = Field( + ..., title="FuzzyFileSearchClientRequestMethod" + ) + params: FuzzyFileSearchParams + + +class CollabAgentRef(BaseModel): + agent_nickname: str | None = Field( + default=None, + description="Optional nickname assigned to an AgentControl-spawned sub-agent.", + ) + agent_role: str | None = Field( + default=None, + description="Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.", + ) + thread_id: ThreadId = Field(..., description="Thread ID of the receiver/new agent.") + + +class CollabAgentState(BaseModel): + message: str | None = None + status: CollabAgentStatus + + +class CollabAgentStatusEntry(BaseModel): + agent_nickname: str | None = Field( + default=None, + description="Optional nickname assigned to an AgentControl-spawned sub-agent.", + ) + agent_role: str | None = Field( + default=None, + description="Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.", + ) + status: AgentStatus = Field(..., description="Last known status of the agent.") + thread_id: ThreadId = Field(..., description="Thread ID of the receiver/new agent.") + + +class CommandExecOutputDeltaNotification(BaseModel): + cap_reached: bool = Field( + ..., + alias="capReached", + description="`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.", + ) + delta_base64: str = Field( + ..., alias="deltaBase64", description="Base64-encoded output bytes." + ) + process_id: str = Field( + ..., + alias="processId", + description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.", + ) + stream: CommandExecOutputStream = Field( + ..., description="Output stream for this chunk." + ) + + +class CommandExecParams(BaseModel): + command: list[str] = Field( + ..., description="Command argv vector. Empty arrays are rejected." + ) + cwd: str | None = Field( + default=None, + description="Optional working directory. Defaults to the server cwd.", + ) + disable_output_cap: bool | None = Field( + default=None, + alias="disableOutputCap", + description="Disable stdout/stderr capture truncation for this request.\n\nCannot be combined with `outputBytesCap`.", + ) + disable_timeout: bool | None = Field( + default=None, + alias="disableTimeout", + description="Disable the timeout entirely for this request.\n\nCannot be combined with `timeoutMs`.", + ) + env: dict[str, Any] | None = Field( + default=None, + 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.", + ) + output_bytes_cap: int | None = Field( + default=None, + alias="outputBytesCap", + description="Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.", + ge=0, + ) + process_id: str | None = Field( + default=None, + alias="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.", + ) + sandbox_policy: SandboxPolicy | None = Field( + default=None, + alias="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.", + ) + size: CommandExecTerminalSize | None = Field( + default=None, + description="Optional initial PTY size in character cells. Only valid when `tty` is true.", + ) + stream_stdin: bool | None = Field( + default=None, + alias="streamStdin", + description="Allow follow-up `command/exec/write` requests to write stdin bytes.\n\nRequires a client-supplied `processId`.", + ) + stream_stdout_stderr: bool | None = Field( + default=None, + alias="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`.", + ) + timeout_ms: int | None = Field( + default=None, + alias="timeoutMs", + description="Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.", + ) + tty: bool | None = Field( + default=None, + description="Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.", + ) + + +class CommandExecResizeParams(BaseModel): + process_id: str = Field( + ..., + alias="processId", + description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.", + ) + size: CommandExecTerminalSize = Field( + ..., description="New PTY size in character cells." + ) + + +class ConfigEdit(BaseModel): + key_path: str = Field(..., alias="keyPath") + merge_strategy: MergeStrategy = Field(..., alias="mergeStrategy") + value: Any + + +class ConfigValueWriteParams(BaseModel): + expected_version: str | None = Field(default=None, alias="expectedVersion") + file_path: str | None = Field( + default=None, + alias="filePath", + description="Path to the config file to write; defaults to the user's `config.toml` when omitted.", + ) + key_path: str = Field(..., alias="keyPath") + merge_strategy: MergeStrategy = Field(..., alias="mergeStrategy") + value: Any + + +class ConfigWarningNotification(BaseModel): + details: str | None = Field( + default=None, description="Optional extra guidance or error details." + ) + path: str | None = Field( + default=None, + description="Optional path to the config file that triggered the warning.", + ) + range: TextRange | None = Field( + default=None, + description="Optional range for the error location inside the config file.", + ) + summary: str = Field(..., description="Concise summary of the warning.") + + +class ErrorNotification(BaseModel): + error: TurnError + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + will_retry: bool = Field(..., alias="willRetry") + + +class ModelRerouteEventMsg(BaseModel): + from_model: str + reason: ModelRerouteReason + to_model: str + type: ModelRerouteEventMsgType = Field(..., title="ModelRerouteEventMsgType") + + +class TaskStartedEventMsg(BaseModel): + collaboration_mode_kind: ModeKind | None = "default" + model_context_window: int | None = None + turn_id: str + type: TaskStartedEventMsgType = Field(..., title="TaskStartedEventMsgType") + + +class AgentMessageEventMsg(BaseModel): + message: str + phase: MessagePhase | None = None + type: AgentMessageEventMsgType = Field(..., title="AgentMessageEventMsgType") + + +class UserMessageEventMsg(BaseModel): + images: list[str] | None = Field( + default=None, + description="Image URLs sourced from `UserInput::Image`. These are safe to replay in legacy UI history events and correspond to images sent to the model.", + ) + local_images: list[str] | None = Field( + default=[], + description="Local file paths sourced from `UserInput::LocalImage`. These are kept so the UI can reattach images when editing history, and should not be sent to the model or treated as API-ready URLs.", + ) + message: str + text_elements: list[TextElement] | None = Field( + default_factory=list, + description="UI-defined spans within `message` used to render or persist special elements.", + ) + type: UserMessageEventMsgType = Field(..., title="UserMessageEventMsgType") + + +class ThreadNameUpdatedEventMsg(BaseModel): + thread_id: ThreadId + thread_name: str | None = None + type: ThreadNameUpdatedEventMsgType = Field( + ..., title="ThreadNameUpdatedEventMsgType" + ) + + +class McpStartupUpdateEventMsg(BaseModel): + server: str = Field(..., description="Server name being started.") + status: McpStartupStatus = Field(..., description="Current startup status.") + type: McpStartupUpdateEventMsgType = Field( + ..., title="McpStartupUpdateEventMsgType" + ) + + +class McpStartupCompleteEventMsg(BaseModel): + cancelled: list[str] + failed: list[McpStartupFailure] + ready: list[str] + type: McpStartupCompleteEventMsgType = Field( + ..., title="McpStartupCompleteEventMsgType" + ) + + +class McpToolCallBeginEventMsg(BaseModel): + call_id: str = Field( + ..., + description="Identifier so this can be paired with the McpToolCallEnd event.", + ) + invocation: McpInvocation + type: McpToolCallBeginEventMsgType = Field( + ..., title="McpToolCallBeginEventMsgType" + ) + + +class McpToolCallEndEventMsg(BaseModel): + call_id: str = Field( + ..., + description="Identifier for the corresponding McpToolCallBegin that finished.", + ) + duration: Duration + invocation: McpInvocation + result: ResultOfCallToolResultOrString = Field( + ..., description="Result of the tool call. Note this could be an error." + ) + type: McpToolCallEndEventMsgType = Field(..., title="McpToolCallEndEventMsgType") + + +class WebSearchEndEventMsg(BaseModel): + action: ResponsesApiWebSearchAction + call_id: str + query: str + type: WebSearchEndEventMsgType = Field(..., title="WebSearchEndEventMsgType") + + +class ExecCommandBeginEventMsg(BaseModel): + call_id: str = Field( + ..., + description="Identifier so this can be paired with the ExecCommandEnd event.", + ) + command: list[str] = Field(..., description="The command to be executed.") + cwd: str = Field( + ..., + description="The command's working directory if not the default cwd for the agent.", + ) + interaction_input: str | None = Field( + default=None, + description="Raw input sent to a unified exec session (if this is an interaction event).", + ) + parsed_cmd: list[ParsedCommand] + process_id: str | None = Field( + default=None, + description="Identifier for the underlying PTY process (when available).", + ) + source: ExecCommandSource | None = Field( + default="agent", + description="Where the command originated. Defaults to Agent for backward compatibility.", + ) + turn_id: str = Field(..., description="Turn ID that this command belongs to.") + type: ExecCommandBeginEventMsgType = Field( + ..., title="ExecCommandBeginEventMsgType" + ) + + +class ExecCommandOutputDeltaEventMsg(BaseModel): + call_id: str = Field( + ..., description="Identifier for the ExecCommandBegin that produced this chunk." + ) + chunk: str = Field( + ..., description="Raw bytes from the stream (may not be valid UTF-8)." + ) + stream: ExecOutputStream = Field( + ..., description="Which stream produced this chunk." + ) + type: ExecCommandOutputDeltaEventMsgType = Field( + ..., title="ExecCommandOutputDeltaEventMsgType" + ) + + +class ExecCommandEndEventMsg(BaseModel): + aggregated_output: str | None = Field( + default="", description="Captured aggregated output" + ) + call_id: str = Field( + ..., description="Identifier for the ExecCommandBegin that finished." + ) + command: list[str] = Field(..., description="The command that was executed.") + cwd: str = Field( + ..., + description="The command's working directory if not the default cwd for the agent.", + ) + duration: Duration = Field( + ..., description="The duration of the command execution." + ) + exit_code: int = Field(..., description="The command's exit code.") + formatted_output: str = Field( + ..., description="Formatted output from the command, as seen by the model." + ) + interaction_input: str | None = Field( + default=None, + description="Raw input sent to a unified exec session (if this is an interaction event).", + ) + parsed_cmd: list[ParsedCommand] + process_id: str | None = Field( + default=None, + description="Identifier for the underlying PTY process (when available).", + ) + source: ExecCommandSource | None = Field( + default="agent", + description="Where the command originated. Defaults to Agent for backward compatibility.", + ) + status: ExecCommandStatus = Field( + ..., description="Completion status for this command execution." + ) + stderr: str = Field(..., description="Captured stderr") + stdout: str = Field(..., description="Captured stdout") + turn_id: str = Field(..., description="Turn ID that this command belongs to.") + type: ExecCommandEndEventMsgType = Field(..., title="ExecCommandEndEventMsgType") + + +class RequestPermissionsEventMsg(BaseModel): + call_id: str = Field( + ..., + description="Responses API call id for the associated tool call, if available.", + ) + permissions: PermissionProfile + reason: str | None = None + turn_id: str | None = Field( + default="", + description="Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.", + ) + type: RequestPermissionsEventMsgType = Field( + ..., title="RequestPermissionsEventMsgType" + ) + + +class ElicitationRequestEventMsg(BaseModel): + id: RequestId + request: ElicitationRequest + server_name: str + turn_id: str | None = Field( + default=None, + description="Turn ID that this elicitation belongs to, when known.", + ) + type: ElicitationRequestEventMsgType = Field( + ..., title="ElicitationRequestEventMsgType" + ) + + +class ApplyPatchApprovalRequestEventMsg(BaseModel): + call_id: str = Field( + ..., + description="Responses API call id for the associated patch apply call, if available.", + ) + changes: dict[str, FileChange] + grant_root: str | None = Field( + default=None, + description="When set, the agent is asking the user to allow writes under this root for the remainder of the session.", + ) + reason: str | None = Field( + default=None, + description="Optional explanatory reason (e.g. request for extra write access).", + ) + turn_id: str | None = Field( + default="", + description="Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility with older senders.", + ) + type: ApplyPatchApprovalRequestEventMsgType = Field( + ..., title="ApplyPatchApprovalRequestEventMsgType" + ) + + +class PatchApplyBeginEventMsg(BaseModel): + auto_approved: bool = Field( + ..., + description="If true, there was no ApplyPatchApprovalRequest for this patch.", + ) + call_id: str = Field( + ..., + description="Identifier so this can be paired with the PatchApplyEnd event.", + ) + changes: dict[str, FileChange] = Field( + ..., description="The changes to be applied." + ) + turn_id: str | None = Field( + default="", + description="Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.", + ) + type: PatchApplyBeginEventMsgType = Field(..., title="PatchApplyBeginEventMsgType") + + +class PatchApplyEndEventMsg(BaseModel): + call_id: str = Field( + ..., description="Identifier for the PatchApplyBegin that finished." + ) + changes: dict[str, FileChange] | None = Field( + default_factory=lambda: FileChange({}), + description="The changes that were applied (mirrors PatchApplyBeginEvent::changes).", + ) + status: PatchApplyStatus = Field( + ..., description="Completion status for this patch application." + ) + stderr: str = Field( + ..., description="Captured stderr (parser errors, IO failures, etc.)." + ) + stdout: str = Field( + ..., description="Captured stdout (summary printed by apply_patch)." + ) + success: bool = Field( + ..., description="Whether the patch was applied successfully." + ) + turn_id: str | None = Field( + default="", + description="Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.", + ) + type: PatchApplyEndEventMsgType = Field(..., title="PatchApplyEndEventMsgType") + + +class GetHistoryEntryResponseEventMsg(BaseModel): + entry: HistoryEntry | None = Field( + default=None, + description="The entry at the requested offset, if available and parseable.", + ) + log_id: int = Field(..., ge=0) + offset: int = Field(..., ge=0) + type: GetHistoryEntryResponseEventMsgType = Field( + ..., title="GetHistoryEntryResponseEventMsgType" + ) + + +class McpListToolsResponseEventMsg(BaseModel): + auth_statuses: dict[str, McpAuthStatus] = Field( + ..., description="Authentication status for each configured MCP server." + ) + resource_templates: dict[str, list[ResourceTemplate]] = Field( + ..., description="Known resource templates grouped by server name." + ) + resources: dict[str, list[Resource]] = Field( + ..., description="Known resources grouped by server name." + ) + tools: dict[str, Tool] = Field( + ..., description="Fully qualified tool name -> tool definition." + ) + type: McpListToolsResponseEventMsgType = Field( + ..., title="McpListToolsResponseEventMsgType" + ) + + +class ListRemoteSkillsResponseEventMsg(BaseModel): + skills: list[RemoteSkillSummary] + type: ListRemoteSkillsResponseEventMsgType = Field( + ..., title="ListRemoteSkillsResponseEventMsgType" + ) + + +class TurnAbortedEventMsg(BaseModel): + reason: TurnAbortReason + turn_id: str | None = None + type: TurnAbortedEventMsgType = Field(..., title="TurnAbortedEventMsgType") + + +class EnteredReviewModeEventMsg(BaseModel): + target: ReviewTarget + type: EnteredReviewModeEventMsgType = Field( + ..., title="EnteredReviewModeEventMsgType" + ) + user_facing_hint: str | None = None + + +class CollabAgentSpawnBeginEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the collab tool call.") + prompt: str = Field( + ..., + description="Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.", + ) + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + type: CollabAgentSpawnBeginEventMsgType = Field( + ..., title="CollabAgentSpawnBeginEventMsgType" + ) + + +class CollabAgentSpawnEndEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the collab tool call.") + new_agent_nickname: str | None = Field( + default=None, description="Optional nickname assigned to the new agent." + ) + new_agent_role: str | None = Field( + default=None, description="Optional role assigned to the new agent." + ) + new_thread_id: ThreadId | None = Field( + default=None, + description="Thread ID of the newly spawned agent, if it was created.", + ) + prompt: str = Field( + ..., + description="Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.", + ) + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + status: AgentStatus = Field( + ..., + description="Last known status of the new agent reported to the sender agent.", + ) + type: CollabAgentSpawnEndEventMsgType = Field( + ..., title="CollabAgentSpawnEndEventMsgType" + ) + + +class CollabAgentInteractionBeginEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the collab tool call.") + prompt: str = Field( + ..., + description="Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.", + ) + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + type: CollabAgentInteractionBeginEventMsgType = Field( + ..., title="CollabAgentInteractionBeginEventMsgType" + ) + + +class CollabAgentInteractionEndEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the collab tool call.") + prompt: str = Field( + ..., + description="Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.", + ) + receiver_agent_nickname: str | None = Field( + default=None, description="Optional nickname assigned to the receiver agent." + ) + receiver_agent_role: str | None = Field( + default=None, description="Optional role assigned to the receiver agent." + ) + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + status: AgentStatus = Field( + ..., + description="Last known status of the receiver agent reported to the sender agent.", + ) + type: CollabAgentInteractionEndEventMsgType = Field( + ..., title="CollabAgentInteractionEndEventMsgType" + ) + + +class CollabWaitingBeginEventMsg(BaseModel): + call_id: str = Field(..., description="ID of the waiting call.") + receiver_agents: list[CollabAgentRef] | None = Field( + default=None, description="Optional nicknames/roles for receivers." + ) + receiver_thread_ids: list[ThreadId] = Field( + ..., description="Thread ID of the receivers." + ) + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + type: CollabWaitingBeginEventMsgType = Field( + ..., title="CollabWaitingBeginEventMsgType" + ) + + +class CollabWaitingEndEventMsg(BaseModel): + agent_statuses: list[CollabAgentStatusEntry] | None = Field( + default=None, + description="Optional receiver metadata paired with final statuses.", + ) + call_id: str = Field(..., description="ID of the waiting call.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + statuses: dict[str, AgentStatus] = Field( + ..., + description="Last known status of the receiver agents reported to the sender agent.", + ) + type: CollabWaitingEndEventMsgType = Field( + ..., title="CollabWaitingEndEventMsgType" + ) + + +class CollabCloseBeginEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the collab tool call.") + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + type: CollabCloseBeginEventMsgType = Field( + ..., title="CollabCloseBeginEventMsgType" + ) + + +class CollabCloseEndEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the collab tool call.") + receiver_agent_nickname: str | None = Field( + default=None, description="Optional nickname assigned to the receiver agent." + ) + receiver_agent_role: str | None = Field( + default=None, description="Optional role assigned to the receiver agent." + ) + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + status: AgentStatus = Field( + ..., + description="Last known status of the receiver agent reported to the sender agent before the close.", + ) + type: CollabCloseEndEventMsgType = Field(..., title="CollabCloseEndEventMsgType") + + +class CollabResumeBeginEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the collab tool call.") + receiver_agent_nickname: str | None = Field( + default=None, description="Optional nickname assigned to the receiver agent." + ) + receiver_agent_role: str | None = Field( + default=None, description="Optional role assigned to the receiver agent." + ) + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + type: CollabResumeBeginEventMsgType = Field( + ..., title="CollabResumeBeginEventMsgType" + ) + + +class CollabResumeEndEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the collab tool call.") + receiver_agent_nickname: str | None = Field( + default=None, description="Optional nickname assigned to the receiver agent." + ) + receiver_agent_role: str | None = Field( + default=None, description="Optional role assigned to the receiver agent." + ) + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") + status: AgentStatus = Field( + ..., + description="Last known status of the receiver agent reported to the sender agent after resume.", + ) + type: CollabResumeEndEventMsgType = Field(..., title="CollabResumeEndEventMsgType") + + +class ExecCommandApprovalParams(BaseModel): + approval_id: str | None = Field( + default=None, + alias="approvalId", + description="Identifier for this specific approval callback.", + ) + call_id: str = Field( + ..., + alias="callId", + description="Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent] and [codex_protocol::protocol::ExecCommandEndEvent].", + ) + command: list[str] + conversation_id: ThreadId = Field(..., alias="conversationId") + cwd: str + parsed_cmd: list[ParsedCommand] = Field(..., alias="parsedCmd") + reason: str | None = None + + +class ExternalAgentConfigMigrationItem(BaseModel): + cwd: str | None = Field( + default=None, + description="Null or empty means home-scoped migration; non-empty means repo-scoped migration.", + ) + description: str + item_type: ExternalAgentConfigMigrationItemType = Field(..., alias="itemType") + + +class FileUpdateChange(BaseModel): + diff: str + kind: PatchChangeKind + path: str + + +class InputImageFunctionCallOutputContentItem(BaseModel): + detail: ImageDetail | None = None + image_url: str + type: InputImageFunctionCallOutputContentItemType = Field( + ..., title="InputImageFunctionCallOutputContentItemType" + ) + + +class FunctionCallOutputContentItem( + RootModel[ + InputTextFunctionCallOutputContentItem | InputImageFunctionCallOutputContentItem + ] +): + root: ( + InputTextFunctionCallOutputContentItem | InputImageFunctionCallOutputContentItem + ) = Field( + ..., + 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.", + ) + + +class FuzzyFileSearchResponse(BaseModel): + files: list[FuzzyFileSearchResult] + + +class GrantedMacOsPermissions(BaseModel): + accessibility: bool | None = None + automations: MacOsAutomationPermission | None = None + calendar: bool | None = None + preferences: MacOsPreferencesPermission | None = None + + +class GrantedPermissionProfile(BaseModel): + file_system: AdditionalFileSystemPermissions | None = Field( + default=None, alias="fileSystem" + ) + macos: GrantedMacOsPermissions | None = None + network: AdditionalNetworkPermissions | None = None class JSONRPCError(BaseModel): @@ -4270,303 +5586,18 @@ class JSONRPCRequest(BaseModel): method: str params: Any | None = None trace: W3cTraceContext | None = Field( - default=None, description='Optional W3C Trace Context for distributed tracing.' + default=None, description="Optional W3C Trace Context for distributed tracing." ) -class JSONRPCMessage( - RootModel[JSONRPCRequest | JSONRPCNotification | JSONRPCResponse | JSONRPCError] -): - root: JSONRPCRequest | JSONRPCNotification | JSONRPCResponse | JSONRPCError = Field( - ..., - description='Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.', - title='JSONRPCMessage', - ) - - -class ThreadStartClientRequest(BaseModel): +class JSONRPCResponse(BaseModel): id: RequestId - method: ThreadStartClientRequestMethod = Field( - ..., title='Thread/startClientRequestMethod' - ) - params: ThreadStartParams - - -class ThreadArchiveClientRequest(BaseModel): - id: RequestId - method: ThreadArchiveClientRequestMethod = Field( - ..., title='Thread/archiveClientRequestMethod' - ) - params: ThreadArchiveParams - - -class ThreadUnsubscribeClientRequest(BaseModel): - id: RequestId - method: ThreadUnsubscribeClientRequestMethod = Field( - ..., title='Thread/unsubscribeClientRequestMethod' - ) - params: ThreadUnsubscribeParams - - -class ThreadNameSetClientRequest(BaseModel): - id: RequestId - method: ThreadNameSetClientRequestMethod = Field( - ..., title='Thread/name/setClientRequestMethod' - ) - params: ThreadSetNameParams - - -class ThreadUnarchiveClientRequest(BaseModel): - id: RequestId - method: ThreadUnarchiveClientRequestMethod = Field( - ..., title='Thread/unarchiveClientRequestMethod' - ) - params: ThreadUnarchiveParams - - -class ThreadCompactStartClientRequest(BaseModel): - id: RequestId - method: ThreadCompactStartClientRequestMethod = Field( - ..., title='Thread/compact/startClientRequestMethod' - ) - params: ThreadCompactStartParams - - -class ThreadRollbackClientRequest(BaseModel): - id: RequestId - method: ThreadRollbackClientRequestMethod = Field( - ..., title='Thread/rollbackClientRequestMethod' - ) - params: ThreadRollbackParams - - -class ThreadLoadedListClientRequest(BaseModel): - id: RequestId - method: ThreadLoadedListClientRequestMethod = Field( - ..., title='Thread/loaded/listClientRequestMethod' - ) - params: ThreadLoadedListParams - - -class ThreadReadClientRequest(BaseModel): - id: RequestId - method: ThreadReadClientRequestMethod = Field( - ..., title='Thread/readClientRequestMethod' - ) - params: ThreadReadParams - - -class SkillsRemoteExportClientRequest(BaseModel): - id: RequestId - method: SkillsRemoteExportClientRequestMethod = Field( - ..., title='Skills/remote/exportClientRequestMethod' - ) - params: SkillsRemoteWriteParams - - -class AppListClientRequest(BaseModel): - id: RequestId - method: AppListClientRequestMethod = Field(..., title='App/listClientRequestMethod') - params: AppsListParams - - -class SkillsConfigWriteClientRequest(BaseModel): - id: RequestId - method: SkillsConfigWriteClientRequestMethod = Field( - ..., title='Skills/config/writeClientRequestMethod' - ) - params: SkillsConfigWriteParams - - -class PluginInstallClientRequest(BaseModel): - id: RequestId - method: PluginInstallClientRequestMethod = Field( - ..., title='Plugin/installClientRequestMethod' - ) - params: PluginInstallParams - - -class TurnInterruptClientRequest(BaseModel): - id: RequestId - method: TurnInterruptClientRequestMethod = Field( - ..., title='Turn/interruptClientRequestMethod' - ) - params: TurnInterruptParams - - -class ModelListClientRequest(BaseModel): - id: RequestId - method: ModelListClientRequestMethod = Field( - ..., title='Model/listClientRequestMethod' - ) - params: ModelListParams - - -class ExperimentalFeatureListClientRequest(BaseModel): - id: RequestId - method: ExperimentalFeatureListClientRequestMethod = Field( - ..., title='ExperimentalFeature/listClientRequestMethod' - ) - params: ExperimentalFeatureListParams - - -class McpServerOauthLoginClientRequest(BaseModel): - id: RequestId - method: McpServerOauthLoginClientRequestMethod = Field( - ..., title='McpServer/oauth/loginClientRequestMethod' - ) - params: McpServerOauthLoginParams - - -class McpServerStatusListClientRequest(BaseModel): - id: RequestId - method: McpServerStatusListClientRequestMethod = Field( - ..., title='McpServerStatus/listClientRequestMethod' - ) - params: ListMcpServerStatusParams - - -class AccountLoginStartClientRequest(BaseModel): - id: RequestId - method: AccountLoginStartClientRequestMethod = Field( - ..., title='Account/login/startClientRequestMethod' - ) - params: LoginAccountParams - - -class AccountLoginCancelClientRequest(BaseModel): - id: RequestId - method: AccountLoginCancelClientRequestMethod = Field( - ..., title='Account/login/cancelClientRequestMethod' - ) - params: CancelLoginAccountParams - - -class FeedbackUploadClientRequest(BaseModel): - id: RequestId - method: FeedbackUploadClientRequestMethod = Field( - ..., title='Feedback/uploadClientRequestMethod' - ) - params: FeedbackUploadParams - - -class CommandExecWriteClientRequest(BaseModel): - id: RequestId - method: CommandExecWriteClientRequestMethod = Field( - ..., title='Command/exec/writeClientRequestMethod' - ) - params: CommandExecWriteParams - - -class CommandExecTerminateClientRequest(BaseModel): - id: RequestId - method: CommandExecTerminateClientRequestMethod = Field( - ..., title='Command/exec/terminateClientRequestMethod' - ) - params: CommandExecTerminateParams - - -class ConfigReadClientRequest(BaseModel): - id: RequestId - method: ConfigReadClientRequestMethod = Field( - ..., title='Config/readClientRequestMethod' - ) - params: ConfigReadParams - - -class ExternalAgentConfigDetectClientRequest(BaseModel): - id: RequestId - method: ExternalAgentConfigDetectClientRequestMethod = Field( - ..., title='ExternalAgentConfig/detectClientRequestMethod' - ) - params: ExternalAgentConfigDetectParams - - -class ConfigValueWriteClientRequest(BaseModel): - id: RequestId - method: ConfigValueWriteClientRequestMethod = Field( - ..., title='Config/value/writeClientRequestMethod' - ) - params: ConfigValueWriteParams - - -class AccountReadClientRequest(BaseModel): - id: RequestId - method: AccountReadClientRequestMethod = Field( - ..., title='Account/readClientRequestMethod' - ) - params: GetAccountParams - - -class AdditionalFileSystemPermissions(BaseModel): - read: list[AbsolutePathBuf] | None = None - write: list[AbsolutePathBuf] | None = None - - -class AdditionalMacOsPermissions(BaseModel): - accessibility: bool - automations: MacOsAutomationPermission - calendar: bool - preferences: MacOsPreferencesPermission - - -class AdditionalPermissionProfile(BaseModel): - file_system: AdditionalFileSystemPermissions | None = Field( - default=None, alias='fileSystem' - ) - macos: AdditionalMacOsPermissions | None = None - network: AdditionalNetworkPermissions | None = None - - -class ApplyPatchApprovalParams(BaseModel): - call_id: str = Field( - ..., - alias='callId', - description='Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent] and [codex_protocol::protocol::PatchApplyEndEvent].', - ) - conversation_id: ThreadId = Field(..., alias='conversationId') - file_changes: dict[str, FileChange] = Field(..., alias='fileChanges') - grant_root: str | None = Field( - default=None, - alias='grantRoot', - description='When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).', - ) - reason: str | None = Field( - default=None, - description='Optional explanatory reason (e.g. request for extra write access).', - ) - - -class ChatgptAuthTokensRefreshParams(BaseModel): - previous_account_id: str | None = Field( - default=None, - alias='previousAccountId', - description='Workspace/account identifier that Codex was previously using.\n\nClients that manage multiple accounts/workspaces can use this as a hint to refresh the token for the correct workspace.\n\nThis may be `null` when the prior auth state did not include a workspace identifier (`chatgpt_account_id`).', - ) - reason: ChatgptAuthTokensRefreshReason - - -class ExecCommandApprovalParams(BaseModel): - approval_id: str | None = Field( - default=None, - alias='approvalId', - description='Identifier for this specific approval callback.', - ) - call_id: str = Field( - ..., - alias='callId', - description='Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent] and [codex_protocol::protocol::ExecCommandEndEvent].', - ) - command: list[str] - conversation_id: ThreadId = Field(..., alias='conversationId') - cwd: str - parsed_cmd: list[ParsedCommand] = Field(..., alias='parsedCmd') - reason: str | None = None + result: Any class McpElicitationBooleanSchema(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) default: bool | None = None description: str | None = None @@ -4576,12 +5607,12 @@ class McpElicitationBooleanSchema(BaseModel): class McpElicitationLegacyTitledEnumSchema(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) default: str | None = None description: str | None = None enum: list[str] - enum_names: list[str] | None = Field(default=None, alias='enumNames') + enum_names: list[str] | None = Field(default=None, alias="enumNames") title: str | None = None type: McpElicitationStringType @@ -4600,7 +5631,7 @@ class McpElicitationMultiSelectEnumSchema( class McpElicitationNumberSchema(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) default: float | None = None description: str | None = None @@ -4624,13 +5655,13 @@ class McpElicitationSingleSelectEnumSchema( class McpElicitationStringSchema(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) default: str | None = None description: str | None = None format: McpElicitationStringFormat | None = None - max_length: int | None = Field(default=None, alias='maxLength', ge=0) - min_length: int | None = Field(default=None, alias='minLength', ge=0) + max_length: int | None = Field(default=None, alias="maxLength", ge=0) + min_length: int | None = Field(default=None, alias="minLength", ge=0) title: str | None = None type: McpElicitationStringType @@ -4646,298 +5677,39 @@ class NetworkPolicyAmendment(BaseModel): class PermissionsRequestApprovalParams(BaseModel): - item_id: str = Field(..., alias='itemId') + item_id: str = Field(..., alias="itemId") permissions: AdditionalPermissionProfile reason: str | None = None - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") -class ToolRequestUserInputParams(BaseModel): - item_id: str = Field(..., alias='itemId') - questions: list[ToolRequestUserInputQuestion] - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class ItemToolRequestUserInputServerRequest(BaseModel): - id: RequestId - method: ItemToolRequestUserInputServerRequestMethod = Field( - ..., title='Item/tool/requestUserInputServerRequestMethod' - ) - params: ToolRequestUserInputParams - - -class ItemPermissionsRequestApprovalServerRequest(BaseModel): - id: RequestId - method: ItemPermissionsRequestApprovalServerRequestMethod = Field( - ..., title='Item/permissions/requestApprovalServerRequestMethod' - ) - params: PermissionsRequestApprovalParams - - -class AccountChatgptAuthTokensRefreshServerRequest(BaseModel): - id: RequestId - method: AccountChatgptAuthTokensRefreshServerRequestMethod = Field( - ..., title='Account/chatgptAuthTokens/refreshServerRequestMethod' - ) - params: ChatgptAuthTokensRefreshParams - - -class ApplyPatchApprovalServerRequest(BaseModel): - id: RequestId - method: ApplyPatchApprovalServerRequestMethod = Field( - ..., title='ApplyPatchApprovalServerRequestMethod' - ) - params: ApplyPatchApprovalParams - - -class ExecCommandApprovalServerRequest(BaseModel): - id: RequestId - method: ExecCommandApprovalServerRequestMethod = Field( - ..., title='ExecCommandApprovalServerRequestMethod' - ) - params: ExecCommandApprovalParams - - -class ErrorServerNotification(BaseModel): - method: ErrorServerNotificationMethod = Field( - ..., title='ErrorServerNotificationMethod' - ) - params: ErrorNotification - - -class ThreadArchivedServerNotification(BaseModel): - method: ThreadArchivedServerNotificationMethod = Field( - ..., title='Thread/archivedServerNotificationMethod' - ) - params: ThreadArchivedNotification - - -class ThreadUnarchivedServerNotification(BaseModel): - method: ThreadUnarchivedServerNotificationMethod = Field( - ..., title='Thread/unarchivedServerNotificationMethod' - ) - params: ThreadUnarchivedNotification - - -class ThreadClosedServerNotification(BaseModel): - method: ThreadClosedServerNotificationMethod = Field( - ..., title='Thread/closedServerNotificationMethod' - ) - params: ThreadClosedNotification - - -class SkillsChangedServerNotification(BaseModel): - method: SkillsChangedServerNotificationMethod = Field( - ..., title='Skills/changedServerNotificationMethod' - ) - params: SkillsChangedNotification - - -class ThreadNameUpdatedServerNotification(BaseModel): - method: ThreadNameUpdatedServerNotificationMethod = Field( - ..., title='Thread/name/updatedServerNotificationMethod' - ) - params: ThreadNameUpdatedNotification - - -class TurnDiffUpdatedServerNotification(BaseModel): - method: TurnDiffUpdatedServerNotificationMethod = Field( - ..., title='Turn/diff/updatedServerNotificationMethod' - ) - params: TurnDiffUpdatedNotification - - -class ItemAgentMessageDeltaServerNotification(BaseModel): - method: ItemAgentMessageDeltaServerNotificationMethod = Field( - ..., title='Item/agentMessage/deltaServerNotificationMethod' - ) - params: AgentMessageDeltaNotification - - -class ItemPlanDeltaServerNotification(BaseModel): - method: ItemPlanDeltaServerNotificationMethod = Field( - ..., title='Item/plan/deltaServerNotificationMethod' - ) - params: PlanDeltaNotification - - -class ItemCommandExecutionOutputDeltaServerNotification(BaseModel): - method: ItemCommandExecutionOutputDeltaServerNotificationMethod = Field( - ..., title='Item/commandExecution/outputDeltaServerNotificationMethod' - ) - params: CommandExecutionOutputDeltaNotification - - -class ItemCommandExecutionTerminalInteractionServerNotification(BaseModel): - method: ItemCommandExecutionTerminalInteractionServerNotificationMethod = Field( - ..., title='Item/commandExecution/terminalInteractionServerNotificationMethod' - ) - params: TerminalInteractionNotification - - -class ItemFileChangeOutputDeltaServerNotification(BaseModel): - method: ItemFileChangeOutputDeltaServerNotificationMethod = Field( - ..., title='Item/fileChange/outputDeltaServerNotificationMethod' - ) - params: FileChangeOutputDeltaNotification - - -class ServerRequestResolvedServerNotification(BaseModel): - method: ServerRequestResolvedServerNotificationMethod = Field( - ..., title='ServerRequest/resolvedServerNotificationMethod' - ) - params: ServerRequestResolvedNotification - - -class ItemMcpToolCallProgressServerNotification(BaseModel): - method: ItemMcpToolCallProgressServerNotificationMethod = Field( - ..., title='Item/mcpToolCall/progressServerNotificationMethod' - ) - params: McpToolCallProgressNotification - - -class McpServerOauthLoginCompletedServerNotification(BaseModel): - method: McpServerOauthLoginCompletedServerNotificationMethod = Field( - ..., title='McpServer/oauthLogin/completedServerNotificationMethod' - ) - params: McpServerOauthLoginCompletedNotification - - -class ItemReasoningSummaryTextDeltaServerNotification(BaseModel): - method: ItemReasoningSummaryTextDeltaServerNotificationMethod = Field( - ..., title='Item/reasoning/summaryTextDeltaServerNotificationMethod' - ) - params: ReasoningSummaryTextDeltaNotification - - -class ItemReasoningSummaryPartAddedServerNotification(BaseModel): - method: ItemReasoningSummaryPartAddedServerNotificationMethod = Field( - ..., title='Item/reasoning/summaryPartAddedServerNotificationMethod' - ) - params: ReasoningSummaryPartAddedNotification - - -class ItemReasoningTextDeltaServerNotification(BaseModel): - method: ItemReasoningTextDeltaServerNotificationMethod = Field( - ..., title='Item/reasoning/textDeltaServerNotificationMethod' - ) - params: ReasoningTextDeltaNotification - - -class ThreadCompactedServerNotification(BaseModel): - method: ThreadCompactedServerNotificationMethod = Field( - ..., title='Thread/compactedServerNotificationMethod' - ) - params: ContextCompactedNotification - - -class DeprecationNoticeServerNotification(BaseModel): - method: DeprecationNoticeServerNotificationMethod = Field( - ..., title='DeprecationNoticeServerNotificationMethod' - ) - params: DeprecationNoticeNotification - - -class ThreadRealtimeStartedServerNotification(BaseModel): - method: ThreadRealtimeStartedServerNotificationMethod = Field( - ..., title='Thread/realtime/startedServerNotificationMethod' - ) - params: ThreadRealtimeStartedNotification - - -class ThreadRealtimeItemAddedServerNotification(BaseModel): - method: ThreadRealtimeItemAddedServerNotificationMethod = Field( - ..., title='Thread/realtime/itemAddedServerNotificationMethod' - ) - params: ThreadRealtimeItemAddedNotification - - -class ThreadRealtimeErrorServerNotification(BaseModel): - method: ThreadRealtimeErrorServerNotificationMethod = Field( - ..., title='Thread/realtime/errorServerNotificationMethod' - ) - params: ThreadRealtimeErrorNotification - - -class ThreadRealtimeClosedServerNotification(BaseModel): - method: ThreadRealtimeClosedServerNotificationMethod = Field( - ..., title='Thread/realtime/closedServerNotificationMethod' - ) - params: ThreadRealtimeClosedNotification - - -class WindowsWorldWritableWarningServerNotification(BaseModel): - method: WindowsWorldWritableWarningServerNotificationMethod = Field( - ..., title='Windows/worldWritableWarningServerNotificationMethod' - ) - params: WindowsWorldWritableWarningNotification - - -class WindowsSandboxSetupCompletedServerNotification(BaseModel): - method: WindowsSandboxSetupCompletedServerNotificationMethod = Field( - ..., title='WindowsSandbox/setupCompletedServerNotificationMethod' - ) - params: WindowsSandboxSetupCompletedNotification - - -class AccountLoginCompletedServerNotification(BaseModel): - method: AccountLoginCompletedServerNotificationMethod = Field( - ..., title='Account/login/completedServerNotificationMethod' - ) - params: AccountLoginCompletedNotification - - -class CollabAgentRef(BaseModel): - agent_nickname: str | None = Field( - default=None, - description='Optional nickname assigned to an AgentControl-spawned sub-agent.', - ) - agent_role: str | None = Field( - default=None, - description='Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.', - ) - thread_id: ThreadId = Field(..., description='Thread ID of the receiver/new agent.') - - -class CollabAgentStatusEntry(BaseModel): - agent_nickname: str | None = Field( - default=None, - description='Optional nickname assigned to an AgentControl-spawned sub-agent.', - ) - agent_role: str | None = Field( - default=None, - description='Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.', - ) - status: AgentStatus = Field(..., description='Last known status of the agent.') - thread_id: ThreadId = Field(..., description='Thread ID of the receiver/new agent.') - - -class FileSystemPermissions(BaseModel): - read: list[AbsolutePathBuf] | None = None - write: list[AbsolutePathBuf] | None = None - - -class PermissionProfile(BaseModel): - file_system: FileSystemPermissions | None = None - macos: MacOsSeatbeltProfileExtensions | None = None - network: NetworkPermissions | None = None +class PermissionsRequestApprovalResponse(BaseModel): + permissions: GrantedPermissionProfile class PlanItemArg(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) status: StepStatus step: str +class RateLimitSnapshot(BaseModel): + credits: CreditsSnapshot | None = None + limit_id: str | None = Field(default=None, alias="limitId") + limit_name: str | None = Field(default=None, alias="limitName") + plan_type: PlanType | None = Field(default=None, alias="planType") + primary: RateLimitWindow | None = None + secondary: RateLimitWindow | None = None + + class HandoffRequestedRealtimeEvent(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) - handoff_requested: RealtimeHandoffRequested = Field(..., alias='HandoffRequested') + handoff_requested: RealtimeHandoffRequested = Field(..., alias="HandoffRequested") class RealtimeEvent( @@ -4963,12 +5735,21 @@ class RealtimeEvent( class RequestUserInputQuestion(BaseModel): header: str id: str - is_other: bool | None = Field(default=False, alias='isOther') - is_secret: bool | None = Field(default=False, alias='isSecret') + is_other: bool | None = Field(default=False, alias="isOther") + is_secret: bool | None = Field(default=False, alias="isSecret") options: list[RequestUserInputQuestionOption] | None = None question: str +class WebSearchCallResponseItem(BaseModel): + action: ResponsesApiWebSearchAction | None = None + id: str | None = None + status: str | None = None + type: WebSearchCallResponseItemType = Field( + ..., title="WebSearchCallResponseItemType" + ) + + class ReviewCodeLocation(BaseModel): absolute_file_path: str line_range: ReviewLineRange @@ -4980,28 +5761,28 @@ class NetworkPolicyAmendment1(BaseModel): class NetworkPolicyAmendmentReviewDecision(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) network_policy_amendment: NetworkPolicyAmendment1 class ReviewDecision( RootModel[ - Literal['approved'] + Literal["approved"] | ApprovedExecpolicyAmendmentReviewDecision - | Literal['approved_for_session'] + | Literal["approved_for_session"] | NetworkPolicyAmendmentReviewDecision - | Literal['denied'] - | Literal['abort'] + | Literal["denied"] + | Literal["abort"] ] ): root: ( - Literal['approved'] + Literal["approved"] | ApprovedExecpolicyAmendmentReviewDecision - | Literal['approved_for_session'] + | Literal["approved_for_session"] | NetworkPolicyAmendmentReviewDecision - | Literal['denied'] - | Literal['abort'] + | Literal["denied"] + | Literal["abort"] ) = Field(..., description="User's decision in response to an ExecApprovalRequest.") @@ -5020,594 +5801,203 @@ class ReviewOutputEvent(BaseModel): overall_explanation: str -class AgentMessageTurnItem(BaseModel): - content: list[AgentMessageContent] - id: str - phase: MessagePhase | None = Field( +class ReviewStartParams(BaseModel): + delivery: ReviewDelivery | None = Field( default=None, - description='Optional phase metadata carried through from `ResponseItem::Message`.\n\nThis is currently used by TUI rendering to distinguish mid-turn commentary from a final answer and avoid status-indicator jitter.', + description="Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`).", ) - type: AgentMessageTurnItemType = Field(..., title='AgentMessageTurnItemType') - - -class WebSearchTurnItem(BaseModel): - action: ResponsesApiWebSearchAction - id: str - query: str - type: WebSearchTurnItemType = Field(..., title='WebSearchTurnItemType') - - -class ErrorEventMsg(BaseModel): - codex_error_info: CodexErrorInfo | None = None - message: str - type: ErrorEventMsgType = Field(..., title='ErrorEventMsgType') - - -class RealtimeConversationRealtimeEventMsg(BaseModel): - payload: RealtimeEvent - type: RealtimeConversationRealtimeEventMsgType = Field( - ..., title='RealtimeConversationRealtimeEventMsgType' - ) - - -class ModelRerouteEventMsg(BaseModel): - from_model: str - reason: ModelRerouteReason - to_model: str - type: ModelRerouteEventMsgType = Field(..., title='ModelRerouteEventMsgType') - - -class TaskStartedEventMsg(BaseModel): - collaboration_mode_kind: ModeKind | None = 'default' - model_context_window: int | None = None - turn_id: str - type: TaskStartedEventMsgType = Field(..., title='TaskStartedEventMsgType') - - -class AgentMessageEventMsg(BaseModel): - message: str - phase: MessagePhase | None = None - type: AgentMessageEventMsgType = Field(..., title='AgentMessageEventMsgType') - - -class ThreadNameUpdatedEventMsg(BaseModel): - thread_id: ThreadId - thread_name: str | None = None - type: ThreadNameUpdatedEventMsgType = Field( - ..., title='ThreadNameUpdatedEventMsgType' - ) - - -class WebSearchEndEventMsg(BaseModel): - action: ResponsesApiWebSearchAction - call_id: str - query: str - type: WebSearchEndEventMsgType = Field(..., title='WebSearchEndEventMsgType') - - -class ExecApprovalRequestEventMsg(BaseModel): - additional_permissions: PermissionProfile | None = Field( - default=None, - description='Optional additional filesystem permissions requested for this command.', - ) - approval_id: str | None = Field( - default=None, - description='Identifier for this specific approval callback.\n\nWhen absent, the approval is for the command item itself (`call_id`). This is present for subcommand approvals (via execve intercept).', - ) - available_decisions: list[ReviewDecision] | None = Field( - default=None, - description='Ordered list of decisions the client may present for this prompt.\n\nWhen absent, clients should derive the legacy default set from the other fields on this request.', - ) - call_id: str = Field( - ..., description='Identifier for the associated command execution item.' - ) - command: list[str] = Field(..., description='The command to be executed.') - cwd: str = Field(..., description="The command's working directory.") - network_approval_context: NetworkApprovalContext | None = Field( - default=None, - description='Optional network context for a blocked request that can be approved.', - ) - parsed_cmd: list[ParsedCommand] - proposed_execpolicy_amendment: list[str] | None = Field( - default=None, - description='Proposed execpolicy amendment that can be applied to allow future runs.', - ) - proposed_network_policy_amendments: list[NetworkPolicyAmendment] | None = Field( - default=None, - description='Proposed network policy amendments (for example allow/deny this host in future).', - ) - reason: str | None = Field( - default=None, - description='Optional human-readable reason for the approval (e.g. retry without sandbox).', - ) - skill_metadata: ExecApprovalRequestSkillMetadata | None = Field( - default=None, - description='Optional skill metadata when the approval was triggered by a skill script.', - ) - turn_id: str | None = Field( - default='', - description='Turn ID that this command belongs to. Uses `#[serde(default)]` for backwards compatibility.', - ) - type: ExecApprovalRequestEventMsgType = Field( - ..., title='ExecApprovalRequestEventMsgType' - ) - - -class RequestPermissionsEventMsg(BaseModel): - call_id: str = Field( - ..., - description='Responses API call id for the associated tool call, if available.', - ) - permissions: PermissionProfile - reason: str | None = None - turn_id: str | None = Field( - default='', - description='Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.', - ) - type: RequestPermissionsEventMsgType = Field( - ..., title='RequestPermissionsEventMsgType' - ) - - -class RequestUserInputEventMsg(BaseModel): - call_id: str = Field( - ..., - description='Responses API call id for the associated tool call, if available.', - ) - questions: list[RequestUserInputQuestion] - turn_id: str | None = Field( - default='', - description='Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.', - ) - type: RequestUserInputEventMsgType = Field( - ..., title='RequestUserInputEventMsgType' - ) - - -class DynamicToolCallResponseEventMsg(BaseModel): - arguments: Any = Field(..., description='Dynamic tool call arguments.') - call_id: str = Field( - ..., description='Identifier for the corresponding DynamicToolCallRequest.' - ) - content_items: list[DynamicToolCallOutputContentItem] = Field( - ..., description='Dynamic tool response content items.' - ) - duration: Duration = Field( - ..., description='The duration of the dynamic tool call.' - ) - error: str | None = Field( - default=None, - description='Optional error text when the tool call failed before producing a response.', - ) - success: bool = Field(..., description='Whether the tool call succeeded.') - tool: str = Field(..., description='Dynamic tool name.') - turn_id: str = Field( - ..., description='Turn ID that this dynamic tool call belongs to.' - ) - type: DynamicToolCallResponseEventMsgType = Field( - ..., title='DynamicToolCallResponseEventMsgType' - ) - - -class StreamErrorEventMsg(BaseModel): - additional_details: str | None = Field( - default=None, - description='Optional details about the underlying stream failure (often the same human-readable message that is surfaced as the terminal error if retries are exhausted).', - ) - codex_error_info: CodexErrorInfo | None = None - message: str - type: StreamErrorEventMsgType = Field(..., title='StreamErrorEventMsgType') - - -class PatchApplyEndEventMsg(BaseModel): - call_id: str = Field( - ..., description='Identifier for the PatchApplyBegin that finished.' - ) - changes: dict[str, FileChange] | None = Field( - default_factory=lambda: FileChange({}), - description='The changes that were applied (mirrors PatchApplyBeginEvent::changes).', - ) - status: PatchApplyStatus = Field( - ..., description='Completion status for this patch application.' - ) - stderr: str = Field( - ..., description='Captured stderr (parser errors, IO failures, etc.).' - ) - stdout: str = Field( - ..., description='Captured stdout (summary printed by apply_patch).' - ) - success: bool = Field( - ..., description='Whether the patch was applied successfully.' - ) - turn_id: str | None = Field( - default='', - description='Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.', - ) - type: PatchApplyEndEventMsgType = Field(..., title='PatchApplyEndEventMsgType') - - -class McpListToolsResponseEventMsg(BaseModel): - auth_statuses: dict[str, McpAuthStatus] = Field( - ..., description='Authentication status for each configured MCP server.' - ) - resource_templates: dict[str, list[ResourceTemplate]] = Field( - ..., description='Known resource templates grouped by server name.' - ) - resources: dict[str, list[Resource]] = Field( - ..., description='Known resources grouped by server name.' - ) - tools: dict[str, Tool] = Field( - ..., description='Fully qualified tool name -> tool definition.' - ) - type: McpListToolsResponseEventMsgType = Field( - ..., title='McpListToolsResponseEventMsgType' - ) - - -class ListRemoteSkillsResponseEventMsg(BaseModel): - skills: list[RemoteSkillSummary] - type: ListRemoteSkillsResponseEventMsgType = Field( - ..., title='ListRemoteSkillsResponseEventMsgType' - ) - - -class PlanUpdateEventMsg(BaseModel): - explanation: str | None = Field( - default=None, - description='Arguments for the `update_plan` todo/checklist tool (not plan mode).', - ) - plan: list[PlanItemArg] - type: PlanUpdateEventMsgType = Field(..., title='PlanUpdateEventMsgType') - - -class EnteredReviewModeEventMsg(BaseModel): target: ReviewTarget - type: EnteredReviewModeEventMsgType = Field( - ..., title='EnteredReviewModeEventMsgType' - ) - user_facing_hint: str | None = None + thread_id: str = Field(..., alias="threadId") -class ExitedReviewModeEventMsg(BaseModel): - review_output: ReviewOutputEvent | None = None - type: ExitedReviewModeEventMsgType = Field( - ..., title='ExitedReviewModeEventMsgType' +class ErrorServerNotification(BaseModel): + method: ErrorServerNotificationMethod = Field( + ..., title="ErrorServerNotificationMethod" ) + params: ErrorNotification -class CollabAgentSpawnBeginEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') - prompt: str = Field( - ..., - description='Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.', - ) - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - type: CollabAgentSpawnBeginEventMsgType = Field( - ..., title='CollabAgentSpawnBeginEventMsgType' +class ThreadStatusChangedServerNotification(BaseModel): + method: ThreadStatusChangedServerNotificationMethod = Field( + ..., title="Thread/status/changedServerNotificationMethod" ) + params: ThreadStatusChangedNotification -class CollabAgentSpawnEndEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') - new_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the new agent.' - ) - new_agent_role: str | None = Field( - default=None, description='Optional role assigned to the new agent.' - ) - new_thread_id: ThreadId | None = Field( - default=None, - description='Thread ID of the newly spawned agent, if it was created.', - ) - prompt: str = Field( - ..., - description='Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.', - ) - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - status: AgentStatus = Field( - ..., - description='Last known status of the new agent reported to the sender agent.', - ) - type: CollabAgentSpawnEndEventMsgType = Field( - ..., title='CollabAgentSpawnEndEventMsgType' +class ThreadArchivedServerNotification(BaseModel): + method: ThreadArchivedServerNotificationMethod = Field( + ..., title="Thread/archivedServerNotificationMethod" ) + params: ThreadArchivedNotification -class CollabAgentInteractionBeginEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') - prompt: str = Field( - ..., - description='Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.', - ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - type: CollabAgentInteractionBeginEventMsgType = Field( - ..., title='CollabAgentInteractionBeginEventMsgType' +class ThreadUnarchivedServerNotification(BaseModel): + method: ThreadUnarchivedServerNotificationMethod = Field( + ..., title="Thread/unarchivedServerNotificationMethod" ) + params: ThreadUnarchivedNotification -class CollabAgentInteractionEndEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') - prompt: str = Field( - ..., - description='Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.', - ) - receiver_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the receiver agent.' - ) - receiver_agent_role: str | None = Field( - default=None, description='Optional role assigned to the receiver agent.' - ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - status: AgentStatus = Field( - ..., - description='Last known status of the receiver agent reported to the sender agent.', - ) - type: CollabAgentInteractionEndEventMsgType = Field( - ..., title='CollabAgentInteractionEndEventMsgType' +class ThreadClosedServerNotification(BaseModel): + method: ThreadClosedServerNotificationMethod = Field( + ..., title="Thread/closedServerNotificationMethod" ) + params: ThreadClosedNotification -class CollabWaitingBeginEventMsg(BaseModel): - call_id: str = Field(..., description='ID of the waiting call.') - receiver_agents: list[CollabAgentRef] | None = Field( - default=None, description='Optional nicknames/roles for receivers.' +class SkillsChangedServerNotification(BaseModel): + method: SkillsChangedServerNotificationMethod = Field( + ..., title="Skills/changedServerNotificationMethod" ) - receiver_thread_ids: list[ThreadId] = Field( - ..., description='Thread ID of the receivers.' + params: SkillsChangedNotification + + +class ThreadNameUpdatedServerNotification(BaseModel): + method: ThreadNameUpdatedServerNotificationMethod = Field( + ..., title="Thread/name/updatedServerNotificationMethod" ) - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - type: CollabWaitingBeginEventMsgType = Field( - ..., title='CollabWaitingBeginEventMsgType' + params: ThreadNameUpdatedNotification + + +class TurnDiffUpdatedServerNotification(BaseModel): + method: TurnDiffUpdatedServerNotificationMethod = Field( + ..., title="Turn/diff/updatedServerNotificationMethod" ) + params: TurnDiffUpdatedNotification -class CollabWaitingEndEventMsg(BaseModel): - agent_statuses: list[CollabAgentStatusEntry] | None = Field( - default=None, - description='Optional receiver metadata paired with final statuses.', +class CommandExecOutputDeltaServerNotification(BaseModel): + method: CommandExecOutputDeltaServerNotificationMethod = Field( + ..., title="Command/exec/outputDeltaServerNotificationMethod" ) - call_id: str = Field(..., description='ID of the waiting call.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - statuses: dict[str, AgentStatus] = Field( - ..., - description='Last known status of the receiver agents reported to the sender agent.', + params: CommandExecOutputDeltaNotification + + +class ItemCommandExecutionTerminalInteractionServerNotification(BaseModel): + method: ItemCommandExecutionTerminalInteractionServerNotificationMethod = Field( + ..., title="Item/commandExecution/terminalInteractionServerNotificationMethod" ) - type: CollabWaitingEndEventMsgType = Field( - ..., title='CollabWaitingEndEventMsgType' + params: TerminalInteractionNotification + + +class ServerRequestResolvedServerNotification(BaseModel): + method: ServerRequestResolvedServerNotificationMethod = Field( + ..., title="ServerRequest/resolvedServerNotificationMethod" ) + params: ServerRequestResolvedNotification -class CollabCloseBeginEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - type: CollabCloseBeginEventMsgType = Field( - ..., title='CollabCloseBeginEventMsgType' +class AccountUpdatedServerNotification(BaseModel): + method: AccountUpdatedServerNotificationMethod = Field( + ..., title="Account/updatedServerNotificationMethod" ) + params: AccountUpdatedNotification -class CollabCloseEndEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') - receiver_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the receiver agent.' +class ConfigWarningServerNotification(BaseModel): + method: ConfigWarningServerNotificationMethod = Field( + ..., title="ConfigWarningServerNotificationMethod" ) - receiver_agent_role: str | None = Field( - default=None, description='Optional role assigned to the receiver agent.' + params: ConfigWarningNotification + + +class ThreadRealtimeStartedServerNotification(BaseModel): + method: ThreadRealtimeStartedServerNotificationMethod = Field( + ..., title="Thread/realtime/startedServerNotificationMethod" ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - status: AgentStatus = Field( - ..., - description='Last known status of the receiver agent reported to the sender agent before the close.', + params: ThreadRealtimeStartedNotification + + +class ThreadRealtimeItemAddedServerNotification(BaseModel): + method: ThreadRealtimeItemAddedServerNotificationMethod = Field( + ..., title="Thread/realtime/itemAddedServerNotificationMethod" ) - type: CollabCloseEndEventMsgType = Field(..., title='CollabCloseEndEventMsgType') + params: ThreadRealtimeItemAddedNotification -class CollabResumeBeginEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') - receiver_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the receiver agent.' +class ThreadRealtimeOutputAudioDeltaServerNotification(BaseModel): + method: ThreadRealtimeOutputAudioDeltaServerNotificationMethod = Field( + ..., title="Thread/realtime/outputAudio/deltaServerNotificationMethod" ) - receiver_agent_role: str | None = Field( - default=None, description='Optional role assigned to the receiver agent.' + params: ThreadRealtimeOutputAudioDeltaNotification + + +class ThreadRealtimeErrorServerNotification(BaseModel): + method: ThreadRealtimeErrorServerNotificationMethod = Field( + ..., title="Thread/realtime/errorServerNotificationMethod" ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - type: CollabResumeBeginEventMsgType = Field( - ..., title='CollabResumeBeginEventMsgType' + params: ThreadRealtimeErrorNotification + + +class ThreadRealtimeClosedServerNotification(BaseModel): + method: ThreadRealtimeClosedServerNotificationMethod = Field( + ..., title="Thread/realtime/closedServerNotificationMethod" ) + params: ThreadRealtimeClosedNotification -class CollabResumeEndEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') - receiver_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the receiver agent.' +class WindowsWorldWritableWarningServerNotification(BaseModel): + method: WindowsWorldWritableWarningServerNotificationMethod = Field( + ..., title="Windows/worldWritableWarningServerNotificationMethod" ) - receiver_agent_role: str | None = Field( - default=None, description='Optional role assigned to the receiver agent.' + params: WindowsWorldWritableWarningNotification + + +class ItemPermissionsRequestApprovalServerRequest(BaseModel): + id: RequestId + method: ItemPermissionsRequestApprovalServerRequestMethod = Field( + ..., title="Item/permissions/requestApprovalServerRequestMethod" ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') - status: AgentStatus = Field( - ..., - description='Last known status of the receiver agent reported to the sender agent after resume.', + params: PermissionsRequestApprovalParams + + +class AccountChatgptAuthTokensRefreshServerRequest(BaseModel): + id: RequestId + method: AccountChatgptAuthTokensRefreshServerRequestMethod = Field( + ..., title="Account/chatgptAuthTokens/refreshServerRequestMethod" ) - type: CollabResumeEndEventMsgType = Field(..., title='CollabResumeEndEventMsgType') + params: ChatgptAuthTokensRefreshParams -class DynamicToolCallResponse(BaseModel): - content_items: list[DynamicToolCallOutputContentItem] = Field( - ..., alias='contentItems' +class ApplyPatchApprovalServerRequest(BaseModel): + id: RequestId + method: ApplyPatchApprovalServerRequestMethod = Field( + ..., title="ApplyPatchApprovalServerRequestMethod" ) - success: bool + params: ApplyPatchApprovalParams -class GrantedPermissionProfile(BaseModel): - file_system: AdditionalFileSystemPermissions | None = Field( - default=None, alias='fileSystem' +class ExecCommandApprovalServerRequest(BaseModel): + id: RequestId + method: ExecCommandApprovalServerRequestMethod = Field( + ..., title="ExecCommandApprovalServerRequestMethod" ) - macos: GrantedMacOsPermissions | None = None - network: AdditionalNetworkPermissions | None = None + params: ExecCommandApprovalParams -class ActiveThreadStatus(BaseModel): - active_flags: list[ThreadActiveFlag] = Field(..., alias='activeFlags') - type: ActiveThreadStatusType = Field(..., title='ActiveThreadStatusType') +class SkillDependencies(BaseModel): + tools: list[SkillToolDependency] -class ThreadStatus( - RootModel[ - NotLoadedThreadStatus - | IdleThreadStatus - | SystemErrorThreadStatus - | ActiveThreadStatus - ] -): - root: ( - NotLoadedThreadStatus - | IdleThreadStatus - | SystemErrorThreadStatus - | ActiveThreadStatus - ) - - -class AgentMessageThreadItem(BaseModel): - id: str - phase: MessagePhase | None = None - text: str - type: AgentMessageThreadItemType = Field(..., title='AgentMessageThreadItemType') - - -class CommandExecutionThreadItem(BaseModel): - aggregated_output: str | None = Field( - default=None, - alias='aggregatedOutput', - description="The command's output, aggregated from stdout and stderr.", - ) - command: str = Field(..., description='The command to be executed.') - command_actions: list[CommandAction] = Field( - ..., - alias='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.', - ) - cwd: str = Field(..., description="The command's working directory.") - duration_ms: int | None = Field( - default=None, - alias='durationMs', - description='The duration of the command execution in milliseconds.', - ) - exit_code: int | None = Field( - default=None, alias='exitCode', description="The command's exit code." - ) - id: str - process_id: str | None = Field( - default=None, - alias='processId', - description='Identifier for the underlying PTY process (when available).', - ) - status: CommandExecutionStatus - type: CommandExecutionThreadItemType = Field( - ..., title='CommandExecutionThreadItemType' - ) - - -class McpToolCallThreadItem(BaseModel): - arguments: Any - duration_ms: int | None = Field( - default=None, - alias='durationMs', - description='The duration of the MCP tool call in milliseconds.', - ) - error: McpToolCallError | None = None - id: str - result: McpToolCallResult | None = None - server: str - status: McpToolCallStatus - tool: str - type: McpToolCallThreadItemType = Field(..., title='McpToolCallThreadItemType') - - -class DynamicToolCallThreadItem(BaseModel): - arguments: Any - content_items: list[DynamicToolCallOutputContentItem] | None = Field( - default=None, alias='contentItems' - ) - duration_ms: int | None = Field( - default=None, - alias='durationMs', - description='The duration of the dynamic tool call in milliseconds.', - ) - id: str - status: DynamicToolCallStatus - success: bool | None = None - tool: str - type: DynamicToolCallThreadItemType = Field( - ..., title='DynamicToolCallThreadItemType' - ) - - -class WebSearchThreadItem(BaseModel): - action: WebSearchAction | None = None - id: str - query: str - type: WebSearchThreadItemType = Field(..., title='WebSearchThreadItemType') - - -class CollabAgentState(BaseModel): - message: str | None = None - status: CollabAgentStatus - - -class TextElement(BaseModel): - byte_range: ByteRange = Field( - ..., - alias='byteRange', - description='Byte range in the parent `text` buffer that this element occupies.', - ) - placeholder: str | None = Field( - default=None, - description='Optional human-readable placeholder for the element, displayed in the UI.', - ) - - -class FileUpdateChange(BaseModel): - diff: str - kind: PatchChangeKind +class SkillMetadata(BaseModel): + dependencies: SkillDependencies | None = None + description: str + enabled: bool + interface: SkillInterface | None = None + name: str path: str - - -class CommandExecResizeParams(BaseModel): - process_id: str = Field( - ..., - alias='processId', - description='Client-supplied, connection-scoped `processId` from the original `command/exec` request.', - ) - size: CommandExecTerminalSize = Field( - ..., description='New PTY size in character cells.' - ) - - -class PluginListParams(BaseModel): - cwds: list[AbsolutePathBuf] | None = Field( + scope: SkillScope + short_description: str | None = Field( default=None, - description='Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.', + alias="shortDescription", + description="Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.", ) -class RateLimitSnapshot(BaseModel): - credits: CreditsSnapshot | None = None - limit_id: str | None = Field(default=None, alias='limitId') - limit_name: str | None = Field(default=None, alias='limitName') - plan_type: PlanType | None = Field(default=None, alias='planType') - primary: RateLimitWindow | None = None - secondary: RateLimitWindow | None = None - - -class ThreadRealtimeOutputAudioDeltaNotification(BaseModel): - audio: ThreadRealtimeAudioChunk - thread_id: str = Field(..., alias='threadId') +class SkillsListEntry(BaseModel): + cwd: str + errors: list[SkillErrorInfo] + skills: list[SkillMetadata] class ThreadSpawn(BaseModel): @@ -5619,7 +6009,7 @@ class ThreadSpawn(BaseModel): class ThreadSpawnSubAgentSource(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) thread_spawn: ThreadSpawn @@ -5630,383 +6020,197 @@ class SubAgentSource( root: SubAgentSource1 | ThreadSpawnSubAgentSource | OtherSubAgentSource -class ExternalAgentConfigMigrationItem(BaseModel): - cwd: str | None = Field( - default=None, - description='Null or empty means home-scoped migration; non-empty means repo-scoped migration.', - ) - description: str - item_type: ExternalAgentConfigMigrationItemType = Field(..., alias='itemType') - - -class SkillsListParams(BaseModel): - cwds: list[str] | None = Field( - default=None, - description='When empty, defaults to the current session working directory.', - ) - force_reload: bool | None = Field( - default=None, - alias='forceReload', - description='When true, bypass the skills cache and re-scan skills from disk.', - ) - per_cwd_extra_user_roots: list[SkillsListExtraRootsForCwd] | None = Field( - default=None, - alias='perCwdExtraUserRoots', - description='Optional per-cwd extra roots to scan as user-scoped skills.', - ) - - -class ThreadForkParams(BaseModel): - approval_policy: AskForApproval | None = Field(default=None, alias='approvalPolicy') - base_instructions: str | None = Field(default=None, alias='baseInstructions') - config: dict[str, Any] | None = None - cwd: str | None = None - developer_instructions: str | None = Field( - default=None, alias='developerInstructions' - ) - model: str | None = Field( - default=None, - description='Configuration overrides for the forked thread, if any.', - ) - model_provider: str | None = Field(default=None, alias='modelProvider') - thread_id: str = Field(..., alias='threadId') - service_tier: ServiceTier | None = Field(default=None, alias='serviceTier') - sandbox: SandboxMode | None = None - - -class ThreadMetadataUpdateParams(BaseModel): - git_info: ThreadMetadataGitInfoUpdateParams | None = Field( - default=None, - alias='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.', - ) - thread_id: str = Field(..., alias='threadId') - - -class ThreadResumeParams(BaseModel): - approval_policy: AskForApproval | None = Field(default=None, alias='approvalPolicy') - base_instructions: str | None = Field(default=None, alias='baseInstructions') - config: dict[str, Any] | None = None - cwd: str | None = None - developer_instructions: str | None = Field( - default=None, alias='developerInstructions' - ) - thread_id: str = Field(..., alias='threadId') - model: str | None = Field( - default=None, - description='Configuration overrides for the resumed thread, if any.', - ) - model_provider: str | None = Field(default=None, alias='modelProvider') - service_tier: ServiceTier | None = Field(default=None, alias='serviceTier') - sandbox: SandboxMode | None = None - personality: Personality | None = None - - -class ThreadTokenUsage(BaseModel): - last: TokenUsageBreakdown - model_context_window: int | None = Field(default=None, alias='modelContextWindow') - total: TokenUsageBreakdown - - -class ConfigEdit(BaseModel): - key_path: str = Field(..., alias='keyPath') - merge_strategy: MergeStrategy = Field(..., alias='mergeStrategy') - value: Any - - -class ReadOnlySandboxPolicy(BaseModel): - access: ReadOnlyAccess | None = Field( - default_factory=lambda: ReadOnlyAccess({'type': 'fullAccess'}) - ) - network_access: bool | None = Field(default=False, alias='networkAccess') - type: ReadOnlySandboxPolicyType = Field(..., title='ReadOnlySandboxPolicyType') - - -class ExternalSandboxSandboxPolicy(BaseModel): - network_access: NetworkAccess | None = Field( - default='restricted', alias='networkAccess' - ) - type: ExternalSandboxSandboxPolicyType = Field( - ..., title='ExternalSandboxSandboxPolicyType' - ) - - -class WorkspaceWriteSandboxPolicy(BaseModel): - exclude_slash_tmp: bool | None = Field(default=False, alias='excludeSlashTmp') - exclude_tmpdir_env_var: bool | None = Field( - default=False, alias='excludeTmpdirEnvVar' - ) - network_access: bool | None = Field(default=False, alias='networkAccess') - read_only_access: ReadOnlyAccess | None = Field( - default_factory=lambda: ReadOnlyAccess({'type': 'fullAccess'}), - alias='readOnlyAccess', - ) - type: WorkspaceWriteSandboxPolicyType = Field( - ..., title='WorkspaceWriteSandboxPolicyType' - ) - writable_roots: list[AbsolutePathBuf] | None = Field( - default_factory=list, alias='writableRoots' - ) - - -class SandboxPolicy( - RootModel[ - DangerFullAccessSandboxPolicy - | ReadOnlySandboxPolicy - | ExternalSandboxSandboxPolicy - | WorkspaceWriteSandboxPolicy - ] -): - root: ( - DangerFullAccessSandboxPolicy - | ReadOnlySandboxPolicy - | ExternalSandboxSandboxPolicy - | WorkspaceWriteSandboxPolicy - ) - - -class WindowsSandboxSetupStartParams(BaseModel): - cwd: AbsolutePathBuf | None = None - mode: WindowsSandboxSetupMode - - -class AccountUpdatedNotification(BaseModel): - auth_mode: AuthMode | None = Field(default=None, alias='authMode') - plan_type: PlanType | None = Field(default=None, alias='planType') - - -class ReviewStartParams(BaseModel): - delivery: ReviewDelivery | None = Field( - default=None, - description='Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`).', - ) - target: ReviewTarget - thread_id: str = Field(..., alias='threadId') - - -class ModelReroutedNotification(BaseModel): - from_model: str = Field(..., alias='fromModel') - reason: ModelRerouteReason - thread_id: str = Field(..., alias='threadId') - to_model: str = Field(..., alias='toModel') - turn_id: str = Field(..., alias='turnId') - - -class MessageResponseItem(BaseModel): - content: list[ContentItem] - end_turn: bool | None = None - id: str | None = None - phase: MessagePhase | None = None - role: str - type: MessageResponseItemType = Field(..., title='MessageResponseItemType') - - -class ReasoningResponseItem(BaseModel): - content: list[ReasoningItemContent] | None = None - encrypted_content: str | None = None +class UserMessageThreadItem(BaseModel): + content: list[UserInput] id: str - summary: list[ReasoningItemReasoningSummary] - type: ReasoningResponseItemType = Field(..., title='ReasoningResponseItemType') + type: UserMessageThreadItemType = Field(..., title="UserMessageThreadItemType") -class LocalShellCallResponseItem(BaseModel): - action: LocalShellAction - call_id: str | None = Field( - default=None, description='Set when using the Responses API.' +class FileChangeThreadItem(BaseModel): + changes: list[FileUpdateChange] + id: str + status: PatchApplyStatus + type: FileChangeThreadItemType = Field(..., title="FileChangeThreadItemType") + + +class CollabAgentToolCallThreadItem(BaseModel): + agents_states: dict[str, CollabAgentState] = Field( + ..., + alias="agentsStates", + description="Last known status of the target agents, when available.", ) - id: str | None = Field( + id: str = Field(..., description="Unique identifier for this collab tool call.") + prompt: str | None = Field( default=None, - description='Legacy id field retained for compatibility with older payloads.', + description="Prompt text sent as part of the collab tool call, when available.", ) - status: LocalShellStatus - type: LocalShellCallResponseItemType = Field( - ..., title='LocalShellCallResponseItemType' + receiver_thread_ids: list[str] = Field( + ..., + alias="receiverThreadIds", + description="Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", + ) + sender_thread_id: str = Field( + ..., + alias="senderThreadId", + description="Thread ID of the agent issuing the collab request.", + ) + status: CollabAgentToolCallStatus = Field( + ..., description="Current status of the collab tool call." + ) + tool: CollabAgentTool = Field( + ..., description="Name of the collab tool that was invoked." + ) + type: CollabAgentToolCallThreadItemType = Field( + ..., title="CollabAgentToolCallThreadItemType" ) -class WebSearchCallResponseItem(BaseModel): - action: ResponsesApiWebSearchAction | None = None - id: str | None = None - status: str | None = None - type: WebSearchCallResponseItemType = Field( - ..., title='WebSearchCallResponseItemType' - ) +class WebSearchThreadItem(BaseModel): + action: WebSearchAction | None = None + id: str + query: str + type: WebSearchThreadItemType = Field(..., title="WebSearchThreadItemType") -class GhostSnapshotResponseItem(BaseModel): - ghost_commit: GhostCommit - type: GhostSnapshotResponseItemType = Field( - ..., title='GhostSnapshotResponseItemType' - ) - - -class InputImageFunctionCallOutputContentItem(BaseModel): - detail: ImageDetail | None = None - image_url: str - type: InputImageFunctionCallOutputContentItemType = Field( - ..., title='InputImageFunctionCallOutputContentItemType' - ) - - -class FunctionCallOutputContentItem( +class ThreadItem( RootModel[ - InputTextFunctionCallOutputContentItem | InputImageFunctionCallOutputContentItem + UserMessageThreadItem + | AgentMessageThreadItem + | PlanThreadItem + | ReasoningThreadItem + | CommandExecutionThreadItem + | FileChangeThreadItem + | McpToolCallThreadItem + | DynamicToolCallThreadItem + | CollabAgentToolCallThreadItem + | WebSearchThreadItem + | ImageViewThreadItem + | ImageGenerationThreadItem + | EnteredReviewModeThreadItem + | ExitedReviewModeThreadItem + | ContextCompactionThreadItem ] ): root: ( - InputTextFunctionCallOutputContentItem | InputImageFunctionCallOutputContentItem - ) = Field( - ..., - 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.', - ) - - -class SkillDependencies(BaseModel): - tools: list[SkillToolDependency] - - -class AccountRateLimitsUpdatedNotification(BaseModel): - rate_limits: RateLimitSnapshot = Field(..., alias='rateLimits') - - -class CommandExecOutputDeltaNotification(BaseModel): - cap_reached: bool = Field( - ..., - alias='capReached', - description='`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.', - ) - delta_base64: str = Field( - ..., alias='deltaBase64', description='Base64-encoded output bytes.' - ) - process_id: str = Field( - ..., - alias='processId', - description='Client-supplied, connection-scoped `processId` from the original `command/exec` request.', - ) - stream: CommandExecOutputStream = Field( - ..., description='Output stream for this chunk.' + UserMessageThreadItem + | AgentMessageThreadItem + | PlanThreadItem + | ReasoningThreadItem + | CommandExecutionThreadItem + | FileChangeThreadItem + | McpToolCallThreadItem + | DynamicToolCallThreadItem + | CollabAgentToolCallThreadItem + | WebSearchThreadItem + | ImageViewThreadItem + | ImageGenerationThreadItem + | EnteredReviewModeThreadItem + | ExitedReviewModeThreadItem + | ContextCompactionThreadItem ) class ThreadListParams(BaseModel): archived: bool | None = Field( default=None, - description='Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.', + description="Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.", ) cursor: str | None = Field( default=None, - description='Opaque pagination cursor returned by a previous call.', + description="Opaque pagination cursor returned by a previous call.", ) cwd: str | None = Field( default=None, - description='Optional cwd filter; when set, only threads whose session cwd exactly matches this path are returned.', + description="Optional cwd filter; when set, only threads whose session cwd exactly matches this path are returned.", ) limit: int | None = Field( default=None, - description='Optional page size; defaults to a reasonable server-side value.', + description="Optional page size; defaults to a reasonable server-side value.", ge=0, ) model_providers: list[str] | None = Field( default=None, - alias='modelProviders', - description='Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.', + alias="modelProviders", + description="Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.", ) search_term: str | None = Field( default=None, - alias='searchTerm', - description='Optional substring filter for the extracted thread title.', + alias="searchTerm", + description="Optional substring filter for the extracted thread title.", ) sort_key: ThreadSortKey | None = Field( default=None, - alias='sortKey', - description='Optional sort key; defaults to created_at.', + alias="sortKey", + description="Optional sort key; defaults to created_at.", ) source_kinds: list[ThreadSourceKind] | None = Field( default=None, - alias='sourceKinds', - description='Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.', + alias="sourceKinds", + description="Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.", ) -class AppMetadata(BaseModel): - categories: list[str] | None = None - developer: str | None = None - first_party_requires_install: bool | None = Field( - default=None, alias='firstPartyRequiresInstall' - ) - first_party_type: str | None = Field(default=None, alias='firstPartyType') - review: AppReview | None = None - screenshots: list[AppScreenshot] | None = None - seo_description: str | None = Field(default=None, alias='seoDescription') - show_in_composer_when_unlinked: bool | None = Field( - default=None, alias='showInComposerWhenUnlinked' - ) - sub_categories: list[str] | None = Field(default=None, alias='subCategories') - version: str | None = None - version_id: str | None = Field(default=None, alias='versionId') - version_notes: str | None = Field(default=None, alias='versionNotes') +class ThreadTokenUsage(BaseModel): + last: TokenUsageBreakdown + model_context_window: int | None = Field(default=None, alias="modelContextWindow") + total: TokenUsageBreakdown -class CommandExecParams(BaseModel): - command: list[str] = Field( - ..., description='Command argv vector. Empty arrays are rejected.' +class ThreadTokenUsageUpdatedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + token_usage: ThreadTokenUsage = Field(..., alias="tokenUsage") + turn_id: str = Field(..., alias="turnId") + + +class ToolRequestUserInputParams(BaseModel): + item_id: str = Field(..., alias="itemId") + questions: list[ToolRequestUserInputQuestion] + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class Turn(BaseModel): + error: TurnError | None = Field( + default=None, description="Only populated when the Turn's status is failed." ) - cwd: str | None = Field( - default=None, - description='Optional working directory. Defaults to the server cwd.', + id: str + items: list[ThreadItem] = Field( + ..., + description="Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", ) - disable_output_cap: bool | None = Field( - default=None, - alias='disableOutputCap', - description='Disable stdout/stderr capture truncation for this request.\n\nCannot be combined with `outputBytesCap`.', - ) - disable_timeout: bool | None = Field( - default=None, - alias='disableTimeout', - description='Disable the timeout entirely for this request.\n\nCannot be combined with `timeoutMs`.', - ) - env: dict[str, Any] | None = Field( - default=None, - 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.', - ) - output_bytes_cap: int | None = Field( - default=None, - alias='outputBytesCap', - description='Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.', - ge=0, - ) - process_id: str | None = Field( - default=None, - alias='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.', - ) - sandbox_policy: SandboxPolicy | None = Field( - default=None, - alias='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.", - ) - size: CommandExecTerminalSize | None = Field( - default=None, - description='Optional initial PTY size in character cells. Only valid when `tty` is true.', - ) - stream_stdin: bool | None = Field( - default=None, - alias='streamStdin', - description='Allow follow-up `command/exec/write` requests to write stdin bytes.\n\nRequires a client-supplied `processId`.', - ) - stream_stdout_stderr: bool | None = Field( - default=None, - alias='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`.', - ) - timeout_ms: int | None = Field( - default=None, - alias='timeoutMs', - description='Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.', - ) - tty: bool | None = Field( - default=None, - description='Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.', + status: TurnStatus + + +class TurnCompletedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + turn: Turn + + +class UserMessageTurnItem(BaseModel): + content: list[UserInput] + id: str + type: UserMessageTurnItemType = Field(..., title="UserMessageTurnItemType") + + +class TurnItem( + RootModel[ + UserMessageTurnItem + | AgentMessageTurnItem + | PlanTurnItem + | ReasoningTurnItem + | WebSearchTurnItem + | ImageGenerationTurnItem + | ContextCompactionTurnItem + ] +): + root: ( + UserMessageTurnItem + | AgentMessageTurnItem + | PlanTurnItem + | ReasoningTurnItem + | WebSearchTurnItem + | ImageGenerationTurnItem + | ContextCompactionTurnItem ) @@ -6015,105 +6219,149 @@ class TurnPlanStep(BaseModel): step: str -class SkillsRemoteReadParams(BaseModel): - enabled: bool | None = False - hazelnut_scope: HazelnutScope | None = Field( - default='example', alias='hazelnutScope' +class TurnPlanUpdatedNotification(BaseModel): + explanation: str | None = None + plan: list[TurnPlanStep] + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class TurnStartParams(BaseModel): + approval_policy: AskForApproval | None = Field( + default=None, + alias="approvalPolicy", + description="Override the approval policy for this turn and subsequent turns.", ) - product_surface: ProductSurface | None = Field( - default='codex', alias='productSurface' + cwd: str | None = Field( + default=None, + description="Override the working directory for this turn and subsequent turns.", + ) + effort: ReasoningEffort | None = Field( + default=None, + description="Override the reasoning effort for this turn and subsequent turns.", + ) + input: list[UserInput] + model: str | None = Field( + default=None, + description="Override the model for this turn and subsequent turns.", + ) + output_schema: Any | None = Field( + default=None, + alias="outputSchema", + description="Optional JSON Schema used to constrain the final assistant message for this turn.", + ) + personality: Personality | None = Field( + default=None, + description="Override the personality for this turn and subsequent turns.", + ) + sandbox_policy: SandboxPolicy | None = Field( + default=None, + alias="sandboxPolicy", + description="Override the sandbox policy for this turn and subsequent turns.", + ) + service_tier: ServiceTier | None = Field( + default=None, + alias="serviceTier", + description="Override the service tier for this turn and subsequent turns.", + ) + summary: ReasoningSummary | None = Field( + default=None, + description="Override the reasoning summary for this turn and subsequent turns.", + ) + thread_id: str = Field(..., alias="threadId") + + +class TurnStartedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + turn: Turn + + +class TurnSteerParams(BaseModel): + expected_turn_id: str = Field( + ..., + alias="expectedTurnId", + description="Required active turn id precondition. The request fails when it does not match the currently active turn.", + ) + input: list[UserInput] + thread_id: str = Field(..., alias="threadId") + + +class WindowsSandboxSetupCompletedNotification(BaseModel): + error: str | None = None + mode: WindowsSandboxSetupMode + success: bool + + +class AccountRateLimitsUpdatedNotification(BaseModel): + rate_limits: RateLimitSnapshot = Field(..., alias="rateLimits") + + +class AppInfo(BaseModel): + app_metadata: AppMetadata | None = Field(default=None, alias="appMetadata") + branding: AppBranding | None = None + description: str | None = None + distribution_channel: str | None = Field(default=None, alias="distributionChannel") + id: str + install_url: str | None = Field(default=None, alias="installUrl") + is_accessible: bool | None = Field(default=False, alias="isAccessible") + is_enabled: bool | None = Field( + default=True, + alias="isEnabled", + description="Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```", + ) + labels: dict[str, Any] | None = None + logo_url: str | None = Field(default=None, alias="logoUrl") + logo_url_dark: str | None = Field(default=None, alias="logoUrlDark") + name: str + plugin_display_names: list[str] | None = Field( + default=[], alias="pluginDisplayNames" ) -class TextRange(BaseModel): - end: TextPosition - start: TextPosition - - -class ExecCommandApprovalResponse(BaseModel): - decision: ReviewDecision +class AppListUpdatedNotification(BaseModel): + data: list[AppInfo] class ApplyPatchApprovalResponse(BaseModel): decision: ReviewDecision -class ThreadResumeClientRequest(BaseModel): - id: RequestId - method: ThreadResumeClientRequestMethod = Field( - ..., title='Thread/resumeClientRequestMethod' - ) - params: ThreadResumeParams - - -class ThreadForkClientRequest(BaseModel): - id: RequestId - method: ThreadForkClientRequestMethod = Field( - ..., title='Thread/forkClientRequestMethod' - ) - params: ThreadForkParams - - -class ThreadMetadataUpdateClientRequest(BaseModel): - id: RequestId - method: ThreadMetadataUpdateClientRequestMethod = Field( - ..., title='Thread/metadata/updateClientRequestMethod' - ) - params: ThreadMetadataUpdateParams - - class ThreadListClientRequest(BaseModel): id: RequestId method: ThreadListClientRequestMethod = Field( - ..., title='Thread/listClientRequestMethod' + ..., title="Thread/listClientRequestMethod" ) params: ThreadListParams -class SkillsListClientRequest(BaseModel): +class TurnStartClientRequest(BaseModel): id: RequestId - method: SkillsListClientRequestMethod = Field( - ..., title='Skills/listClientRequestMethod' + method: TurnStartClientRequestMethod = Field( + ..., title="Turn/startClientRequestMethod" ) - params: SkillsListParams + params: TurnStartParams -class PluginListClientRequest(BaseModel): +class TurnSteerClientRequest(BaseModel): id: RequestId - method: PluginListClientRequestMethod = Field( - ..., title='Plugin/listClientRequestMethod' + method: TurnSteerClientRequestMethod = Field( + ..., title="Turn/steerClientRequestMethod" ) - params: PluginListParams - - -class SkillsRemoteListClientRequest(BaseModel): - id: RequestId - method: SkillsRemoteListClientRequestMethod = Field( - ..., title='Skills/remote/listClientRequestMethod' - ) - params: SkillsRemoteReadParams + params: TurnSteerParams class ReviewStartClientRequest(BaseModel): id: RequestId method: ReviewStartClientRequestMethod = Field( - ..., title='Review/startClientRequestMethod' + ..., title="Review/startClientRequestMethod" ) params: ReviewStartParams -class WindowsSandboxSetupStartClientRequest(BaseModel): - id: RequestId - method: WindowsSandboxSetupStartClientRequestMethod = Field( - ..., title='WindowsSandbox/setupStartClientRequestMethod' - ) - params: WindowsSandboxSetupStartParams - - class CommandExecClientRequest(BaseModel): id: RequestId method: CommandExecClientRequestMethod = Field( - ..., title='Command/execClientRequestMethod' + ..., title="Command/execClientRequestMethod" ) params: CommandExecParams @@ -6121,80 +6369,261 @@ class CommandExecClientRequest(BaseModel): class CommandExecResizeClientRequest(BaseModel): id: RequestId method: CommandExecResizeClientRequestMethod = Field( - ..., title='Command/exec/resizeClientRequestMethod' + ..., title="Command/exec/resizeClientRequestMethod" ) params: CommandExecResizeParams +class ConfigValueWriteClientRequest(BaseModel): + id: RequestId + method: ConfigValueWriteClientRequestMethod = Field( + ..., title="Config/value/writeClientRequestMethod" + ) + params: ConfigValueWriteParams + + class ApplyNetworkPolicyAmendment(BaseModel): network_policy_amendment: NetworkPolicyAmendment class ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) apply_network_policy_amendment: ApplyNetworkPolicyAmendment = Field( - ..., alias='applyNetworkPolicyAmendment' + ..., alias="applyNetworkPolicyAmendment" ) class CommandExecutionApprovalDecision( RootModel[ - Literal['accept'] - | Literal['acceptForSession'] + Literal["accept"] + | Literal["acceptForSession"] | AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision | ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision - | Literal['decline'] - | Literal['cancel'] + | Literal["decline"] + | Literal["cancel"] ] ): root: ( - Literal['accept'] - | Literal['acceptForSession'] + Literal["accept"] + | Literal["acceptForSession"] | AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision | ApplyNetworkPolicyAmendmentCommandExecutionApprovalDecision - | Literal['decline'] - | Literal['cancel'] + | Literal["decline"] + | Literal["cancel"] ) class CommandExecutionRequestApprovalParams(BaseModel): - thread_id: str = Field(..., alias='threadId') approval_id: str | None = Field( default=None, - alias='approvalId', - description='Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing.', + alias="approvalId", + description="Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing.", ) - turn_id: str = Field(..., alias='turnId') - command: str | None = Field(default=None, description='The command to be executed.') + command: str | None = Field(default=None, description="The command to be executed.") command_actions: list[CommandAction] | None = Field( default=None, - alias='commandActions', - description='Best-effort parsed command actions for friendly display.', + alias="commandActions", + description="Best-effort parsed command actions for friendly display.", ) cwd: str | None = Field( default=None, description="The command's working directory." ) - item_id: str = Field(..., alias='itemId') + item_id: str = Field(..., alias="itemId") network_approval_context: NetworkApprovalContext | None = Field( default=None, - alias='networkApprovalContext', - description='Optional context for a managed-network approval prompt.', + alias="networkApprovalContext", + description="Optional context for a managed-network approval prompt.", ) proposed_execpolicy_amendment: list[str] | None = Field( default=None, - alias='proposedExecpolicyAmendment', - description='Optional proposed execpolicy amendment to allow similar commands without prompting.', + alias="proposedExecpolicyAmendment", + description="Optional proposed execpolicy amendment to allow similar commands without prompting.", ) proposed_network_policy_amendments: list[NetworkPolicyAmendment] | None = Field( default=None, - alias='proposedNetworkPolicyAmendments', - description='Optional proposed network policy amendments (allow/deny host) for future requests.', + alias="proposedNetworkPolicyAmendments", + description="Optional proposed network policy amendments (allow/deny host) for future requests.", ) reason: str | None = Field( default=None, - description='Optional explanatory reason (e.g. request for network access).', + description="Optional explanatory reason (e.g. request for network access).", + ) + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class CommandExecutionRequestApprovalResponse(BaseModel): + decision: CommandExecutionApprovalDecision + + +class ConfigBatchWriteParams(BaseModel): + edits: list[ConfigEdit] + expected_version: str | None = Field(default=None, alias="expectedVersion") + file_path: str | None = Field( + default=None, + alias="filePath", + description="Path to the config file to write; defaults to the user's `config.toml` when omitted.", + ) + reload_user_config: bool | None = Field( + default=None, + alias="reloadUserConfig", + description="When true, hot-reload the updated user config into all loaded threads after writing.", + ) + + +class RealtimeConversationRealtimeEventMsg(BaseModel): + payload: RealtimeEvent + type: RealtimeConversationRealtimeEventMsgType = Field( + ..., title="RealtimeConversationRealtimeEventMsgType" + ) + + +class TokenCountEventMsg(BaseModel): + info: TokenUsageInfo | None = None + rate_limits: RateLimitSnapshot | None = None + type: TokenCountEventMsgType = Field(..., title="TokenCountEventMsgType") + + +class ExecApprovalRequestEventMsg(BaseModel): + additional_permissions: PermissionProfile | None = Field( + default=None, + description="Optional additional filesystem permissions requested for this command.", + ) + approval_id: str | None = Field( + default=None, + description="Identifier for this specific approval callback.\n\nWhen absent, the approval is for the command item itself (`call_id`). This is present for subcommand approvals (via execve intercept).", + ) + available_decisions: list[ReviewDecision] | None = Field( + default=None, + description="Ordered list of decisions the client may present for this prompt.\n\nWhen absent, clients should derive the legacy default set from the other fields on this request.", + ) + call_id: str = Field( + ..., description="Identifier for the associated command execution item." + ) + command: list[str] = Field(..., description="The command to be executed.") + cwd: str = Field(..., description="The command's working directory.") + network_approval_context: NetworkApprovalContext | None = Field( + default=None, + description="Optional network context for a blocked request that can be approved.", + ) + parsed_cmd: list[ParsedCommand] + proposed_execpolicy_amendment: list[str] | None = Field( + default=None, + description="Proposed execpolicy amendment that can be applied to allow future runs.", + ) + proposed_network_policy_amendments: list[NetworkPolicyAmendment] | None = Field( + default=None, + description="Proposed network policy amendments (for example allow/deny this host in future).", + ) + reason: str | None = Field( + default=None, + description="Optional human-readable reason for the approval (e.g. retry without sandbox).", + ) + skill_metadata: ExecApprovalRequestSkillMetadata | None = Field( + default=None, + description="Optional skill metadata when the approval was triggered by a skill script.", + ) + turn_id: str | None = Field( + default="", + description="Turn ID that this command belongs to. Uses `#[serde(default)]` for backwards compatibility.", + ) + type: ExecApprovalRequestEventMsgType = Field( + ..., title="ExecApprovalRequestEventMsgType" + ) + + +class RequestUserInputEventMsg(BaseModel): + call_id: str = Field( + ..., + description="Responses API call id for the associated tool call, if available.", + ) + questions: list[RequestUserInputQuestion] + turn_id: str | None = Field( + default="", + description="Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.", + ) + type: RequestUserInputEventMsgType = Field( + ..., title="RequestUserInputEventMsgType" + ) + + +class ListSkillsResponseEventMsg(BaseModel): + skills: list[SkillsListEntry] + type: ListSkillsResponseEventMsgType = Field( + ..., title="ListSkillsResponseEventMsgType" + ) + + +class PlanUpdateEventMsg(BaseModel): + explanation: str | None = Field( + default=None, + description="Arguments for the `update_plan` todo/checklist tool (not plan mode).", + ) + plan: list[PlanItemArg] + type: PlanUpdateEventMsgType = Field(..., title="PlanUpdateEventMsgType") + + +class ExitedReviewModeEventMsg(BaseModel): + review_output: ReviewOutputEvent | None = None + type: ExitedReviewModeEventMsgType = Field( + ..., title="ExitedReviewModeEventMsgType" + ) + + +class ItemStartedEventMsg(BaseModel): + item: TurnItem + thread_id: ThreadId + turn_id: str + type: ItemStartedEventMsgType = Field(..., title="ItemStartedEventMsgType") + + +class ItemCompletedEventMsg(BaseModel): + item: TurnItem + thread_id: ThreadId + turn_id: str + type: ItemCompletedEventMsgType = Field(..., title="ItemCompletedEventMsgType") + + +class ExecCommandApprovalResponse(BaseModel): + decision: ReviewDecision + + +class ExternalAgentConfigImportParams(BaseModel): + migration_items: list[ExternalAgentConfigMigrationItem] = Field( + ..., alias="migrationItems" + ) + + +class FunctionCallOutputBody(RootModel[str | list[FunctionCallOutputContentItem]]): + root: str | list[FunctionCallOutputContentItem] + + +class FunctionCallOutputPayload(BaseModel): + body: FunctionCallOutputBody + success: bool | None = None + + +class ItemCompletedNotification(BaseModel): + item: ThreadItem + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class ItemStartedNotification(BaseModel): + item: ThreadItem + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class JSONRPCMessage( + RootModel[JSONRPCRequest | JSONRPCNotification | JSONRPCResponse | JSONRPCError] +): + root: JSONRPCRequest | JSONRPCNotification | JSONRPCResponse | JSONRPCError = Field( + ..., + description="Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.", + title="JSONRPCMessage", ) @@ -6230,48 +6659,167 @@ class McpElicitationPrimitiveSchema( class McpElicitationSchema(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) - field_schema: str | None = Field(default=None, alias='$schema') + field_schema: str | None = Field(default=None, alias="$schema") properties: dict[str, McpElicitationPrimitiveSchema] required: list[str] | None = None type: McpElicitationObjectType class McpServerElicitationRequestParams1(BaseModel): - server_name: str = Field(..., alias='serverName') - thread_id: str = Field(..., alias='threadId') + server_name: str = Field(..., alias="serverName") + thread_id: str = Field(..., alias="threadId") turn_id: str | None = Field( default=None, - alias='turnId', - description='Active Codex turn when this elicitation was observed, if app-server could correlate one.\n\nThis is nullable because MCP models elicitation as a standalone server-to-client request identified by the MCP server request id. It may be triggered during a turn, but turn context is app-server correlation rather than part of the protocol identity of the elicitation itself.', + alias="turnId", + description="Active Codex turn when this elicitation was observed, if app-server could correlate one.\n\nThis is nullable because MCP models elicitation as a standalone server-to-client request identified by the MCP server request id. It may be triggered during a turn, but turn context is app-server correlation rather than part of the protocol identity of the elicitation itself.", ) - field_meta: Any | None = Field(None, alias='_meta') + field_meta: Any | None = Field(None, alias="_meta") message: str - mode: Literal['form'] - requested_schema: McpElicitationSchema = Field(..., alias='requestedSchema') + mode: Literal["form"] + requested_schema: McpElicitationSchema = Field(..., alias="requestedSchema") class McpServerElicitationRequestParams( RootModel[McpServerElicitationRequestParams1 | McpServerElicitationRequestParams2] ): root: McpServerElicitationRequestParams1 | McpServerElicitationRequestParams2 = ( - Field(..., title='McpServerElicitationRequestParams') + Field(..., title="McpServerElicitationRequestParams") ) +class FunctionCallOutputResponseItem(BaseModel): + call_id: str + output: FunctionCallOutputPayload + type: FunctionCallOutputResponseItemType = Field( + ..., title="FunctionCallOutputResponseItemType" + ) + + +class CustomToolCallOutputResponseItem(BaseModel): + call_id: str + output: FunctionCallOutputPayload + type: CustomToolCallOutputResponseItemType = Field( + ..., title="CustomToolCallOutputResponseItemType" + ) + + +class ResponseItem( + RootModel[ + MessageResponseItem + | ReasoningResponseItem + | LocalShellCallResponseItem + | FunctionCallResponseItem + | FunctionCallOutputResponseItem + | CustomToolCallResponseItem + | CustomToolCallOutputResponseItem + | WebSearchCallResponseItem + | ImageGenerationCallResponseItem + | GhostSnapshotResponseItem + | CompactionResponseItem + | OtherResponseItem + ] +): + root: ( + MessageResponseItem + | ReasoningResponseItem + | LocalShellCallResponseItem + | FunctionCallResponseItem + | FunctionCallOutputResponseItem + | CustomToolCallResponseItem + | CustomToolCallOutputResponseItem + | WebSearchCallResponseItem + | ImageGenerationCallResponseItem + | GhostSnapshotResponseItem + | CompactionResponseItem + | OtherResponseItem + ) + + +class ThreadTokenUsageUpdatedServerNotification(BaseModel): + method: ThreadTokenUsageUpdatedServerNotificationMethod = Field( + ..., title="Thread/tokenUsage/updatedServerNotificationMethod" + ) + params: ThreadTokenUsageUpdatedNotification + + +class TurnStartedServerNotification(BaseModel): + method: TurnStartedServerNotificationMethod = Field( + ..., title="Turn/startedServerNotificationMethod" + ) + params: TurnStartedNotification + + +class TurnCompletedServerNotification(BaseModel): + method: TurnCompletedServerNotificationMethod = Field( + ..., title="Turn/completedServerNotificationMethod" + ) + params: TurnCompletedNotification + + +class TurnPlanUpdatedServerNotification(BaseModel): + method: TurnPlanUpdatedServerNotificationMethod = Field( + ..., title="Turn/plan/updatedServerNotificationMethod" + ) + params: TurnPlanUpdatedNotification + + +class ItemStartedServerNotification(BaseModel): + method: ItemStartedServerNotificationMethod = Field( + ..., title="Item/startedServerNotificationMethod" + ) + params: ItemStartedNotification + + +class ItemCompletedServerNotification(BaseModel): + method: ItemCompletedServerNotificationMethod = Field( + ..., title="Item/completedServerNotificationMethod" + ) + params: ItemCompletedNotification + + +class AccountRateLimitsUpdatedServerNotification(BaseModel): + method: AccountRateLimitsUpdatedServerNotificationMethod = Field( + ..., title="Account/rateLimits/updatedServerNotificationMethod" + ) + params: AccountRateLimitsUpdatedNotification + + +class AppListUpdatedServerNotification(BaseModel): + method: AppListUpdatedServerNotificationMethod = Field( + ..., title="App/list/updatedServerNotificationMethod" + ) + params: AppListUpdatedNotification + + +class WindowsSandboxSetupCompletedServerNotification(BaseModel): + method: WindowsSandboxSetupCompletedServerNotificationMethod = Field( + ..., title="WindowsSandbox/setupCompletedServerNotificationMethod" + ) + params: WindowsSandboxSetupCompletedNotification + + class ItemCommandExecutionRequestApprovalServerRequest(BaseModel): id: RequestId method: ItemCommandExecutionRequestApprovalServerRequestMethod = Field( - ..., title='Item/commandExecution/requestApprovalServerRequestMethod' + ..., title="Item/commandExecution/requestApprovalServerRequestMethod" ) params: CommandExecutionRequestApprovalParams +class ItemToolRequestUserInputServerRequest(BaseModel): + id: RequestId + method: ItemToolRequestUserInputServerRequestMethod = Field( + ..., title="Item/tool/requestUserInputServerRequestMethod" + ) + params: ToolRequestUserInputParams + + class McpServerElicitationRequestServerRequest(BaseModel): id: RequestId method: McpServerElicitationRequestServerRequestMethod = Field( - ..., title='McpServer/elicitation/requestServerRequestMethod' + ..., title="McpServer/elicitation/requestServerRequestMethod" ) params: McpServerElicitationRequestParams @@ -6301,324 +6849,94 @@ class ServerRequest( | ExecCommandApprovalServerRequest ) = Field( ..., - description='Request initiated from the server and sent to the client.', - title='ServerRequest', - ) - - -class CommandExecOutputDeltaServerNotification(BaseModel): - method: CommandExecOutputDeltaServerNotificationMethod = Field( - ..., title='Command/exec/outputDeltaServerNotificationMethod' - ) - params: CommandExecOutputDeltaNotification - - -class AccountUpdatedServerNotification(BaseModel): - method: AccountUpdatedServerNotificationMethod = Field( - ..., title='Account/updatedServerNotificationMethod' - ) - params: AccountUpdatedNotification - - -class AccountRateLimitsUpdatedServerNotification(BaseModel): - method: AccountRateLimitsUpdatedServerNotificationMethod = Field( - ..., title='Account/rateLimits/updatedServerNotificationMethod' - ) - params: AccountRateLimitsUpdatedNotification - - -class ModelReroutedServerNotification(BaseModel): - method: ModelReroutedServerNotificationMethod = Field( - ..., title='Model/reroutedServerNotificationMethod' - ) - params: ModelReroutedNotification - - -class ThreadRealtimeOutputAudioDeltaServerNotification(BaseModel): - method: ThreadRealtimeOutputAudioDeltaServerNotificationMethod = Field( - ..., title='Thread/realtime/outputAudio/deltaServerNotificationMethod' - ) - params: ThreadRealtimeOutputAudioDeltaNotification - - -class TokenCountEventMsg(BaseModel): - info: TokenUsageInfo | None = None - rate_limits: RateLimitSnapshot | None = None - type: TokenCountEventMsgType = Field(..., title='TokenCountEventMsgType') - - -class UserMessageEventMsg(BaseModel): - images: list[str] | None = Field( - default=None, - description='Image URLs sourced from `UserInput::Image`. These are safe to replay in legacy UI history events and correspond to images sent to the model.', - ) - local_images: list[str] | None = Field( - default=[], - description='Local file paths sourced from `UserInput::LocalImage`. These are kept so the UI can reattach images when editing history, and should not be sent to the model or treated as API-ready URLs.', - ) - message: str - text_elements: list[TextElement] | None = Field( - default_factory=list, - description='UI-defined spans within `message` used to render or persist special elements.', - ) - type: UserMessageEventMsgType = Field(..., title='UserMessageEventMsgType') - - -class PermissionsRequestApprovalResponse(BaseModel): - permissions: GrantedPermissionProfile - - -class CommandExecutionRequestApprovalResponse(BaseModel): - decision: CommandExecutionApprovalDecision - - -class ThreadStatusChangedNotification(BaseModel): - status: ThreadStatus - thread_id: str = Field(..., alias='threadId') - - -class FileChangeThreadItem(BaseModel): - changes: list[FileUpdateChange] - id: str - status: PatchApplyStatus - type: FileChangeThreadItemType = Field(..., title='FileChangeThreadItemType') - - -class CollabAgentToolCallThreadItem(BaseModel): - agents_states: dict[str, CollabAgentState] = Field( - ..., - alias='agentsStates', - description='Last known status of the target agents, when available.', - ) - id: str = Field(..., description='Unique identifier for this collab tool call.') - prompt: str | None = Field( - default=None, - description='Prompt text sent as part of the collab tool call, when available.', - ) - receiver_thread_ids: list[str] = Field( - ..., - alias='receiverThreadIds', - description='Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.', - ) - sender_thread_id: str = Field( - ..., - alias='senderThreadId', - description='Thread ID of the agent issuing the collab request.', - ) - status: CollabAgentToolCallStatus = Field( - ..., description='Current status of the collab tool call.' - ) - tool: CollabAgentTool = Field( - ..., description='Name of the collab tool that was invoked.' - ) - type: CollabAgentToolCallThreadItemType = Field( - ..., title='CollabAgentToolCallThreadItemType' - ) - - -class TextUserInput(BaseModel): - text: str - text_elements: list[TextElement] | None = Field( - default_factory=list, - description='UI-defined spans within `text` used to render or persist special elements.', - ) - type: TextUserInputType = Field(..., title='TextUserInputType') - - -class UserInput( - RootModel[ - TextUserInput - | ImageUserInput - | LocalImageUserInput - | SkillUserInput - | MentionUserInput - ] -): - root: ( - TextUserInput - | ImageUserInput - | LocalImageUserInput - | SkillUserInput - | MentionUserInput + description="Request initiated from the server and sent to the client.", + title="ServerRequest", ) class SubAgentSessionSource(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) - sub_agent: SubAgentSource = Field(..., alias='subAgent') + sub_agent: SubAgentSource = Field(..., alias="subAgent") class SessionSource(RootModel[SessionSource1 | SubAgentSessionSource]): root: SessionSource1 | SubAgentSessionSource -class ExternalAgentConfigImportParams(BaseModel): - migration_items: list[ExternalAgentConfigMigrationItem] = Field( - ..., alias='migrationItems' - ) - - -class ThreadTokenUsageUpdatedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - token_usage: ThreadTokenUsage = Field(..., alias='tokenUsage') - turn_id: str = Field(..., alias='turnId') - - -class ConfigBatchWriteParams(BaseModel): - edits: list[ConfigEdit] - expected_version: str | None = Field(default=None, alias='expectedVersion') - file_path: str | None = Field( +class Thread(BaseModel): + agent_nickname: str | None = Field( default=None, - alias='filePath', - description="Path to the config file to write; defaults to the user's `config.toml` when omitted.", + alias="agentNickname", + description="Optional random unique nickname assigned to an AgentControl-spawned sub-agent.", ) - reload_user_config: bool | None = Field( + agent_role: str | None = Field( default=None, - alias='reloadUserConfig', - description='When true, hot-reload the updated user config into all loaded threads after writing.', + alias="agentRole", + description="Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.", ) - - -class TurnStartParams(BaseModel): - approval_policy: AskForApproval | None = Field( - default=None, - alias='approvalPolicy', - description='Override the approval policy for this turn and subsequent turns.', - ) - thread_id: str = Field(..., alias='threadId') - cwd: str | None = Field( - default=None, - description='Override the working directory for this turn and subsequent turns.', - ) - effort: ReasoningEffort | None = Field( - default=None, - description='Override the reasoning effort for this turn and subsequent turns.', - ) - input: list[UserInput] - model: str | None = Field( - default=None, - description='Override the model for this turn and subsequent turns.', - ) - output_schema: Any | None = Field( - default=None, - alias='outputSchema', - description='Optional JSON Schema used to constrain the final assistant message for this turn.', - ) - personality: Personality | None = Field( - default=None, - description='Override the personality for this turn and subsequent turns.', - ) - sandbox_policy: SandboxPolicy | None = Field( - default=None, - alias='sandboxPolicy', - description='Override the sandbox policy for this turn and subsequent turns.', - ) - service_tier: ServiceTier | None = Field( - default=None, - alias='serviceTier', - description='Override the service tier for this turn and subsequent turns.', - ) - summary: ReasoningSummary | None = Field( - default=None, - description='Override the reasoning summary for this turn and subsequent turns.', - ) - - -class FunctionCallOutputBody(RootModel[str | list[FunctionCallOutputContentItem]]): - root: str | list[FunctionCallOutputContentItem] - - -class SkillMetadata(BaseModel): - dependencies: SkillDependencies | None = None - description: str - enabled: bool - interface: SkillInterface | None = None - name: str - path: str - scope: SkillScope - short_description: str | None = Field( - default=None, - alias='shortDescription', - description='Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.', - ) - - -class AppInfo(BaseModel): - app_metadata: AppMetadata | None = Field(default=None, alias='appMetadata') - branding: AppBranding | None = None - description: str | None = None - distribution_channel: str | None = Field(default=None, alias='distributionChannel') - id: str - install_url: str | None = Field(default=None, alias='installUrl') - is_accessible: bool | None = Field(default=False, alias='isAccessible') - is_enabled: bool | None = Field( - default=True, - alias='isEnabled', - description='Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```', - ) - labels: dict[str, Any] | None = None - logo_url: str | None = Field(default=None, alias='logoUrl') - logo_url_dark: str | None = Field(default=None, alias='logoUrlDark') - name: str - plugin_display_names: list[str] | None = Field( - default=[], alias='pluginDisplayNames' - ) - - -class TurnPlanUpdatedNotification(BaseModel): - explanation: str | None = None - plan: list[TurnPlanStep] - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class TurnSteerParams(BaseModel): - expected_turn_id: str = Field( + cli_version: str = Field( ..., - alias='expectedTurnId', - description='Required active turn id precondition. The request fails when it does not match the currently active turn.', + alias="cliVersion", + description="Version of the CLI that created the thread.", ) - input: list[UserInput] - thread_id: str = Field(..., alias='threadId') - - -class ConfigWarningNotification(BaseModel): - details: str | None = Field( - default=None, description='Optional extra guidance or error details.' + created_at: int = Field( + ..., + alias="createdAt", + description="Unix timestamp (in seconds) when the thread was created.", + ) + cwd: str = Field(..., description="Working directory captured for the thread.") + ephemeral: bool = Field( + ..., + description="Whether the thread is ephemeral and should not be materialized on disk.", + ) + git_info: GitInfo | None = Field( + default=None, + alias="gitInfo", + description="Optional Git metadata captured when the thread was created.", + ) + id: str + model_provider: str = Field( + ..., + alias="modelProvider", + description="Model provider used for this thread (for example, 'openai').", + ) + name: str | None = Field( + default=None, description="Optional user-facing thread title." ) path: str | None = Field( - default=None, - description='Optional path to the config file that triggered the warning.', + default=None, description="[UNSTABLE] Path to the thread on disk." ) - range: TextRange | None = Field( - default=None, - description='Optional range for the error location inside the config file.', + preview: str = Field( + ..., description="Usually the first user message in the thread, if available." + ) + source: SessionSource = Field( + ..., + description="Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).", + ) + status: ThreadStatus = Field( + ..., description="Current runtime status for the thread." + ) + turns: list[Turn] = Field( + ..., + 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.", + ) + updated_at: int = Field( + ..., + alias="updatedAt", + description="Unix timestamp (in seconds) when the thread was last updated.", ) - summary: str = Field(..., description='Concise summary of the warning.') -class TurnStartClientRequest(BaseModel): - id: RequestId - method: TurnStartClientRequestMethod = Field( - ..., title='Turn/startClientRequestMethod' - ) - params: TurnStartParams - - -class TurnSteerClientRequest(BaseModel): - id: RequestId - method: TurnSteerClientRequestMethod = Field( - ..., title='Turn/steerClientRequestMethod' - ) - params: TurnSteerParams +class ThreadStartedNotification(BaseModel): + thread: Thread class ExternalAgentConfigImportClientRequest(BaseModel): id: RequestId method: ExternalAgentConfigImportClientRequestMethod = Field( - ..., title='ExternalAgentConfig/importClientRequestMethod' + ..., title="ExternalAgentConfig/importClientRequestMethod" ) params: ExternalAgentConfigImportParams @@ -6626,7 +6944,7 @@ class ExternalAgentConfigImportClientRequest(BaseModel): class ConfigBatchWriteClientRequest(BaseModel): id: RequestId method: ConfigBatchWriteClientRequestMethod = Field( - ..., title='Config/batchWriteClientRequestMethod' + ..., title="Config/batchWriteClientRequestMethod" ) params: ConfigBatchWriteParams @@ -6733,339 +7051,18 @@ class ClientRequest( | AccountReadClientRequest | FuzzyFileSearchClientRequest ) = Field( - ..., description='Request from the client to the server.', title='ClientRequest' + ..., description="Request from the client to the server.", title="ClientRequest" ) -class ThreadStatusChangedServerNotification(BaseModel): - method: ThreadStatusChangedServerNotificationMethod = Field( - ..., title='Thread/status/changedServerNotificationMethod' - ) - params: ThreadStatusChangedNotification - - -class ThreadTokenUsageUpdatedServerNotification(BaseModel): - method: ThreadTokenUsageUpdatedServerNotificationMethod = Field( - ..., title='Thread/tokenUsage/updatedServerNotificationMethod' - ) - params: ThreadTokenUsageUpdatedNotification - - -class TurnPlanUpdatedServerNotification(BaseModel): - method: TurnPlanUpdatedServerNotificationMethod = Field( - ..., title='Turn/plan/updatedServerNotificationMethod' - ) - params: TurnPlanUpdatedNotification - - -class ConfigWarningServerNotification(BaseModel): - method: ConfigWarningServerNotificationMethod = Field( - ..., title='ConfigWarningServerNotificationMethod' - ) - params: ConfigWarningNotification - - -class UserMessageTurnItem(BaseModel): - content: list[UserInput] - id: str - type: UserMessageTurnItemType = Field(..., title='UserMessageTurnItemType') - - -class TurnItem( - RootModel[ - UserMessageTurnItem - | AgentMessageTurnItem - | PlanTurnItem - | ReasoningTurnItem - | WebSearchTurnItem - | ImageGenerationTurnItem - | ContextCompactionTurnItem - ] -): - root: ( - UserMessageTurnItem - | AgentMessageTurnItem - | PlanTurnItem - | ReasoningTurnItem - | WebSearchTurnItem - | ImageGenerationTurnItem - | ContextCompactionTurnItem - ) - - -class ItemStartedEventMsg(BaseModel): - item: TurnItem - thread_id: ThreadId - turn_id: str - type: ItemStartedEventMsgType = Field(..., title='ItemStartedEventMsgType') - - -class ItemCompletedEventMsg(BaseModel): - item: TurnItem - thread_id: ThreadId - turn_id: str - type: ItemCompletedEventMsgType = Field(..., title='ItemCompletedEventMsgType') - - -class UserMessageThreadItem(BaseModel): - content: list[UserInput] - id: str - type: UserMessageThreadItemType = Field(..., title='UserMessageThreadItemType') - - -class ThreadItem( - RootModel[ - UserMessageThreadItem - | AgentMessageThreadItem - | PlanThreadItem - | ReasoningThreadItem - | CommandExecutionThreadItem - | FileChangeThreadItem - | McpToolCallThreadItem - | DynamicToolCallThreadItem - | CollabAgentToolCallThreadItem - | WebSearchThreadItem - | ImageViewThreadItem - | ImageGenerationThreadItem - | EnteredReviewModeThreadItem - | ExitedReviewModeThreadItem - | ContextCompactionThreadItem - ] -): - root: ( - UserMessageThreadItem - | AgentMessageThreadItem - | PlanThreadItem - | ReasoningThreadItem - | CommandExecutionThreadItem - | FileChangeThreadItem - | McpToolCallThreadItem - | DynamicToolCallThreadItem - | CollabAgentToolCallThreadItem - | WebSearchThreadItem - | ImageViewThreadItem - | ImageGenerationThreadItem - | EnteredReviewModeThreadItem - | ExitedReviewModeThreadItem - | ContextCompactionThreadItem - ) - - -class Turn(BaseModel): - error: TurnError | None = Field( - default=None, description="Only populated when the Turn's status is failed." - ) - id: str - items: list[ThreadItem] = Field( - ..., - description='Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.', - ) - status: TurnStatus - - -class FunctionCallOutputPayload(BaseModel): - body: FunctionCallOutputBody - success: bool | None = None - - -class SkillsListEntry(BaseModel): - cwd: str - errors: list[SkillErrorInfo] - skills: list[SkillMetadata] - - -class AppListUpdatedNotification(BaseModel): - data: list[AppInfo] - - -class TurnCompletedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - turn: Turn - - -class ItemCompletedNotification(BaseModel): - item: ThreadItem - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class TurnStartedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - turn: Turn - - -class TurnStartedServerNotification(BaseModel): - method: TurnStartedServerNotificationMethod = Field( - ..., title='Turn/startedServerNotificationMethod' - ) - params: TurnStartedNotification - - -class TurnCompletedServerNotification(BaseModel): - method: TurnCompletedServerNotificationMethod = Field( - ..., title='Turn/completedServerNotificationMethod' - ) - params: TurnCompletedNotification - - -class ItemCompletedServerNotification(BaseModel): - method: ItemCompletedServerNotificationMethod = Field( - ..., title='Item/completedServerNotificationMethod' - ) - params: ItemCompletedNotification - - -class AppListUpdatedServerNotification(BaseModel): - method: AppListUpdatedServerNotificationMethod = Field( - ..., title='App/list/updatedServerNotificationMethod' - ) - params: AppListUpdatedNotification - - -class ListSkillsResponseEventMsg(BaseModel): - skills: list[SkillsListEntry] - type: ListSkillsResponseEventMsgType = Field( - ..., title='ListSkillsResponseEventMsgType' - ) - - -class ItemStartedNotification(BaseModel): - item: ThreadItem - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class Thread(BaseModel): - agent_nickname: str | None = Field( - default=None, - alias='agentNickname', - description='Optional random unique nickname assigned to an AgentControl-spawned sub-agent.', - ) - agent_role: str | None = Field( - default=None, - alias='agentRole', - description='Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.', - ) - cli_version: str = Field( - ..., - alias='cliVersion', - description='Version of the CLI that created the thread.', - ) - created_at: int = Field( - ..., - alias='createdAt', - description='Unix timestamp (in seconds) when the thread was created.', - ) - cwd: str = Field(..., description='Working directory captured for the thread.') - ephemeral: bool = Field( - ..., - description='Whether the thread is ephemeral and should not be materialized on disk.', - ) - git_info: GitInfo | None = Field( - default=None, - alias='gitInfo', - description='Optional Git metadata captured when the thread was created.', - ) - id: str - model_provider: str = Field( - ..., - alias='modelProvider', - description="Model provider used for this thread (for example, 'openai').", - ) - name: str | None = Field( - default=None, description='Optional user-facing thread title.' - ) - path: str | None = Field( - default=None, description='[UNSTABLE] Path to the thread on disk.' - ) - preview: str = Field( - ..., description='Usually the first user message in the thread, if available.' - ) - source: SessionSource = Field( - ..., - description='Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).', - ) - status: ThreadStatus = Field( - ..., description='Current runtime status for the thread.' - ) - turns: list[Turn] = Field( - ..., - 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.', - ) - updated_at: int = Field( - ..., - alias='updatedAt', - description='Unix timestamp (in seconds) when the thread was last updated.', - ) - - -class FunctionCallOutputResponseItem(BaseModel): - call_id: str - output: FunctionCallOutputPayload - type: FunctionCallOutputResponseItemType = Field( - ..., title='FunctionCallOutputResponseItemType' - ) - - -class CustomToolCallOutputResponseItem(BaseModel): - call_id: str - output: FunctionCallOutputPayload - type: CustomToolCallOutputResponseItemType = Field( - ..., title='CustomToolCallOutputResponseItemType' - ) - - -class ResponseItem( - RootModel[ - MessageResponseItem - | ReasoningResponseItem - | LocalShellCallResponseItem - | FunctionCallResponseItem - | FunctionCallOutputResponseItem - | CustomToolCallResponseItem - | CustomToolCallOutputResponseItem - | WebSearchCallResponseItem - | ImageGenerationCallResponseItem - | GhostSnapshotResponseItem - | CompactionResponseItem - | OtherResponseItem - ] -): - root: ( - MessageResponseItem - | ReasoningResponseItem - | LocalShellCallResponseItem - | FunctionCallResponseItem - | FunctionCallOutputResponseItem - | CustomToolCallResponseItem - | CustomToolCallOutputResponseItem - | WebSearchCallResponseItem - | ImageGenerationCallResponseItem - | GhostSnapshotResponseItem - | CompactionResponseItem - | OtherResponseItem - ) - - -class ItemStartedServerNotification(BaseModel): - method: ItemStartedServerNotificationMethod = Field( - ..., title='Item/startedServerNotificationMethod' - ) - params: ItemStartedNotification - - class RawResponseItemEventMsg(BaseModel): item: ResponseItem - type: RawResponseItemEventMsgType = Field(..., title='RawResponseItemEventMsgType') - - -class ThreadStartedNotification(BaseModel): - thread: Thread + type: RawResponseItemEventMsgType = Field(..., title="RawResponseItemEventMsgType") class ThreadStartedServerNotification(BaseModel): method: ThreadStartedServerNotificationMethod = Field( - ..., title='Thread/startedServerNotificationMethod' + ..., title="Thread/startedServerNotificationMethod" ) params: ThreadStartedNotification @@ -7165,37 +7162,37 @@ class ServerNotification( | AccountLoginCompletedServerNotification ) = Field( ..., - description='Notification sent from the server to the client.', - title='ServerNotification', + description="Notification sent from the server to the client.", + title="ServerNotification", ) class SessionConfiguredEventMsg(BaseModel): approval_policy: AskForApproval = Field( - ..., description='When to escalate for approval for execution' + ..., description="When to escalate for approval for execution" ) cwd: str = Field( ..., - description='Working directory that should be treated as the *root* of the session.', + description="Working directory that should be treated as the *root* of the session.", ) forked_from_id: ThreadId | None = None history_entry_count: int = Field( - ..., description='Current number of entries in the history log.', ge=0 + ..., description="Current number of entries in the history log.", ge=0 ) history_log_id: int = Field( ..., - description='Identifier of the history log file (inode on Unix, 0 otherwise).', + description="Identifier of the history log file (inode on Unix, 0 otherwise).", ge=0, ) initial_messages: list[EventMsg] | None = Field( default=None, - description='Optional initial messages (as events) for resumed sessions. When present, UIs can use these to seed the history.', + description="Optional initial messages (as events) for resumed sessions. When present, UIs can use these to seed the history.", ) - model: str = Field(..., description='Tell the client what model is being queried.') + model: str = Field(..., description="Tell the client what model is being queried.") model_provider_id: str network_proxy: SessionNetworkProxyRuntime | None = Field( default=None, - description='Runtime proxy bind addresses, when the managed proxy was started for this session.', + description="Runtime proxy bind addresses, when the managed proxy was started for this session.", ) reasoning_effort: ReasoningEffort | None = Field( default=None, @@ -7203,18 +7200,18 @@ class SessionConfiguredEventMsg(BaseModel): ) rollout_path: str | None = Field( default=None, - description='Path in which the rollout is stored. Can be `None` for ephemeral threads', + description="Path in which the rollout is stored. Can be `None` for ephemeral threads", ) sandbox_policy: SandboxPolicy = Field( - ..., description='How to sandbox commands executed in the system' + ..., description="How to sandbox commands executed in the system" ) service_tier: ServiceTier | None = None session_id: ThreadId thread_name: str | None = Field( - default=None, description='Optional user-facing thread name (may be unset).' + default=None, description="Optional user-facing thread name (may be unset)." ) type: SessionConfiguredEventMsgType = Field( - ..., title='SessionConfiguredEventMsgType' + ..., title="SessionConfiguredEventMsgType" ) @@ -7381,8 +7378,8 @@ class EventMsg( | CollabResumeEndEventMsg ) = Field( ..., - description='Response event from the agent NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.', - title='EventMsg', + description="Response event from the agent NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.", + title="EventMsg", ) diff --git a/codex-rs/app-server-protocol/schema/python/codex_app_server_protocol/v2/models.py b/codex-rs/app-server-protocol/schema/python/codex_app_server_protocol/v2/models.py index 20c7b6a99d..885e55da1a 100644 --- a/codex-rs/app-server-protocol/schema/python/codex_app_server_protocol/v2/models.py +++ b/codex-rs/app-server-protocol/schema/python/codex_app_server_protocol/v2/models.py @@ -2,12 +2,9 @@ # filename: codex_app_server_protocol.v2.schemas.json from __future__ import annotations - -from enum import StrEnum +from pydantic import BaseModel as _BaseModel, ConfigDict, Field, RootModel from typing import Any, Literal - -from pydantic import BaseModel as _BaseModel -from pydantic import ConfigDict, Field, RootModel +from enum import StrEnum class BaseModel(_BaseModel): @@ -18,11 +15,166 @@ class CodexAppServerProtocolV2(BaseModel): pass +class AbsolutePathBuf(RootModel[str]): + root: str = Field( + ..., + 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.", + ) + + +class ApiKeyAccountType(RootModel[Literal["apiKey"]]): + root: Literal["apiKey"] = Field(..., title="ApiKeyAccountType") + + +class ApiKeyAccount(BaseModel): + type: ApiKeyAccountType = Field(..., title="ApiKeyAccountType") + + +class ChatgptAccountType(RootModel[Literal["chatgpt"]]): + root: Literal["chatgpt"] = Field(..., title="ChatgptAccountType") + + +class AccountLoginCompletedNotification(BaseModel): + error: str | None = None + login_id: str | None = Field(default=None, alias="loginId") + success: bool + + +class TextAgentMessageContentType(RootModel[Literal["Text"]]): + root: Literal["Text"] = Field(..., title="TextAgentMessageContentType") + + +class TextAgentMessageContent(BaseModel): + text: str + type: TextAgentMessageContentType = Field(..., title="TextAgentMessageContentType") + + +class AgentMessageContent(RootModel[TextAgentMessageContent]): + root: TextAgentMessageContent + + +class AgentMessageDeltaNotification(BaseModel): + delta: str + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class CompletedAgentStatus(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + completed: str | None + + +class ErroredAgentStatus(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + errored: str + + +class AgentStatus( + RootModel[ + Literal["pending_init"] + | Literal["running"] + | CompletedAgentStatus + | ErroredAgentStatus + | Literal["shutdown"] + | Literal["not_found"] + ] +): + root: ( + Literal["pending_init"] + | Literal["running"] + | CompletedAgentStatus + | ErroredAgentStatus + | Literal["shutdown"] + | Literal["not_found"] + ) = Field(..., description="Agent lifecycle status, derived from emitted events.") + + +class AnalyticsConfig(BaseModel): + model_config = ConfigDict( + extra="allow", + ) + enabled: bool | None = None + + +class AppBranding(BaseModel): + category: str | None = None + developer: str | None = None + is_discoverable_app: bool = Field(..., alias="isDiscoverableApp") + privacy_policy: str | None = Field(default=None, alias="privacyPolicy") + terms_of_service: str | None = Field(default=None, alias="termsOfService") + website: str | None = None + + +class AppReview(BaseModel): + status: str + + +class AppScreenshot(BaseModel): + file_id: str | None = Field(default=None, alias="fileId") + url: str | None = None + user_prompt: str = Field(..., alias="userPrompt") + + +class AppSummary(BaseModel): + description: str | None = None + id: str + install_url: str | None = Field(default=None, alias="installUrl") + name: str + + +class AppToolApproval(StrEnum): + auto = "auto" + prompt = "prompt" + approve = "approve" + + +class AppToolConfig(BaseModel): + approval_mode: AppToolApproval | None = None + enabled: bool | None = None + + +class AppToolsConfig(BaseModel): + pass + + +class AppsDefaultConfig(BaseModel): + destructive_enabled: bool | None = True + enabled: bool | None = True + open_world_enabled: bool | None = True + + +class AppsListParams(BaseModel): + cursor: str | None = Field( + default=None, + description="Opaque pagination cursor returned by a previous call.", + ) + force_refetch: bool | None = Field( + default=None, + alias="forceRefetch", + description="When true, bypass app caches and fetch the latest data from sources.", + ) + limit: int | None = Field( + default=None, + description="Optional page size; defaults to a reasonable server-side value.", + ge=0, + ) + thread_id: str | None = Field( + default=None, + alias="threadId", + description="Optional thread id used to evaluate app feature gating from that thread's config.", + ) + + class AskForApproval1(StrEnum): - untrusted = 'untrusted' - on_failure = 'on-failure' - on_request = 'on-request' - never = 'never' + untrusted = "untrusted" + on_failure = "on-failure" + on_request = "on-request" + never = "never" class Reject(BaseModel): @@ -33,7 +185,7 @@ class Reject(BaseModel): class RejectAskForApproval(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) reject: Reject @@ -42,1440 +194,382 @@ class AskForApproval(RootModel[AskForApproval1 | RejectAskForApproval]): root: AskForApproval1 | RejectAskForApproval -class DynamicToolSpec(BaseModel): - description: str - input_schema: Any = Field(..., alias='inputSchema') - name: str - - -class Personality(StrEnum): - none = 'none' - friendly = 'friendly' - pragmatic = 'pragmatic' - - -class SandboxMode(StrEnum): - read_only = 'read-only' - workspace_write = 'workspace-write' - danger_full_access = 'danger-full-access' - - -class ServiceTier(StrEnum): - fast = 'fast' - flex = 'flex' - - -class ThreadStartParams(BaseModel): - approval_policy: AskForApproval | None = Field(default=None, alias='approvalPolicy') - base_instructions: str | None = Field(default=None, alias='baseInstructions') - config: dict[str, Any] | None = None - cwd: str | None = None - developer_instructions: str | None = Field( - default=None, alias='developerInstructions' - ) - service_tier: ServiceTier | None = Field(default=None, alias='serviceTier') - ephemeral: bool | None = None - sandbox: SandboxMode | None = None - personality: Personality | None = None - model: str | None = None - model_provider: str | None = Field(default=None, alias='modelProvider') - service_name: str | None = Field(default=None, alias='serviceName') - - -class InputTextContentItemType(RootModel[Literal['input_text']]): - root: Literal['input_text'] = Field(..., title='InputTextContentItemType') - - -class InputTextContentItem(BaseModel): - text: str - type: InputTextContentItemType = Field(..., title='InputTextContentItemType') - - -class InputImageContentItemType(RootModel[Literal['input_image']]): - root: Literal['input_image'] = Field(..., title='InputImageContentItemType') - - -class InputImageContentItem(BaseModel): - image_url: str - type: InputImageContentItemType = Field(..., title='InputImageContentItemType') - - -class OutputTextContentItemType(RootModel[Literal['output_text']]): - root: Literal['output_text'] = Field(..., title='OutputTextContentItemType') - - -class OutputTextContentItem(BaseModel): - text: str - type: OutputTextContentItemType = Field(..., title='OutputTextContentItemType') - - -class ContentItem( - RootModel[InputTextContentItem | InputImageContentItem | OutputTextContentItem] +class AuthMode( + RootModel[Literal["apikey"] | Literal["chatgpt"] | Literal["chatgptAuthTokens"]] ): - root: InputTextContentItem | InputImageContentItem | OutputTextContentItem - - -class InputTextFunctionCallOutputContentItemType(RootModel[Literal['input_text']]): - root: Literal['input_text'] = Field( - ..., title='InputTextFunctionCallOutputContentItemType' + root: Literal["apikey"] | Literal["chatgpt"] | Literal["chatgptAuthTokens"] = Field( + ..., description="Authentication mode for OpenAI-backed providers." ) -class InputTextFunctionCallOutputContentItem(BaseModel): - text: str - type: InputTextFunctionCallOutputContentItemType = Field( - ..., title='InputTextFunctionCallOutputContentItemType' - ) - - -class InputImageFunctionCallOutputContentItemType(RootModel[Literal['input_image']]): - root: Literal['input_image'] = Field( - ..., title='InputImageFunctionCallOutputContentItemType' - ) - - -class GhostCommit(BaseModel): - id: str - parent: str | None = None - preexisting_untracked_dirs: list[str] - preexisting_untracked_files: list[str] - - -class ImageDetail(StrEnum): - auto = 'auto' - low = 'low' - high = 'high' - original = 'original' - - -class ExecLocalShellActionType(RootModel[Literal['exec']]): - root: Literal['exec'] = Field(..., title='ExecLocalShellActionType') - - -class ExecLocalShellAction(BaseModel): - command: list[str] - env: dict[str, Any] | None = None - timeout_ms: int | None = Field(default=None, ge=0) - type: ExecLocalShellActionType = Field(..., title='ExecLocalShellActionType') - user: str | None = None - working_directory: str | None = None - - -class LocalShellAction(RootModel[ExecLocalShellAction]): - root: ExecLocalShellAction - - -class LocalShellStatus(StrEnum): - completed = 'completed' - in_progress = 'in_progress' - incomplete = 'incomplete' - - -class MessagePhase(RootModel[Literal['commentary'] | Literal['final_answer']]): - root: Literal['commentary'] | Literal['final_answer'] = Field( - ..., - 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.', - ) - - -class ReasoningTextReasoningItemContentType(RootModel[Literal['reasoning_text']]): - root: Literal['reasoning_text'] = Field( - ..., title='ReasoningTextReasoningItemContentType' - ) - - -class ReasoningTextReasoningItemContent(BaseModel): - text: str - type: ReasoningTextReasoningItemContentType = Field( - ..., title='ReasoningTextReasoningItemContentType' - ) - - -class TextReasoningItemContentType(RootModel[Literal['text']]): - root: Literal['text'] = Field(..., title='TextReasoningItemContentType') - - -class TextReasoningItemContent(BaseModel): - text: str - type: TextReasoningItemContentType = Field( - ..., title='TextReasoningItemContentType' - ) - - -class ReasoningItemContent( - RootModel[ReasoningTextReasoningItemContent | TextReasoningItemContent] -): - root: ReasoningTextReasoningItemContent | TextReasoningItemContent - - -class SummaryTextReasoningItemReasoningSummaryType(RootModel[Literal['summary_text']]): - root: Literal['summary_text'] = Field( - ..., title='SummaryTextReasoningItemReasoningSummaryType' - ) - - -class SummaryTextReasoningItemReasoningSummary(BaseModel): - text: str - type: SummaryTextReasoningItemReasoningSummaryType = Field( - ..., title='SummaryTextReasoningItemReasoningSummaryType' - ) - - -class ReasoningItemReasoningSummary( - RootModel[SummaryTextReasoningItemReasoningSummary] -): - root: SummaryTextReasoningItemReasoningSummary - - -class MessageResponseItemType(RootModel[Literal['message']]): - root: Literal['message'] = Field(..., title='MessageResponseItemType') - - -class MessageResponseItem(BaseModel): - content: list[ContentItem] - end_turn: bool | None = None - id: str | None = None - phase: MessagePhase | None = None - role: str - type: MessageResponseItemType = Field(..., title='MessageResponseItemType') - - -class ReasoningResponseItemType(RootModel[Literal['reasoning']]): - root: Literal['reasoning'] = Field(..., title='ReasoningResponseItemType') - - -class ReasoningResponseItem(BaseModel): - content: list[ReasoningItemContent] | None = None - encrypted_content: str | None = None - id: str - summary: list[ReasoningItemReasoningSummary] - type: ReasoningResponseItemType = Field(..., title='ReasoningResponseItemType') - - -class LocalShellCallResponseItemType(RootModel[Literal['local_shell_call']]): - root: Literal['local_shell_call'] = Field( - ..., title='LocalShellCallResponseItemType' - ) - - -class LocalShellCallResponseItem(BaseModel): - action: LocalShellAction - call_id: str | None = Field( - default=None, description='Set when using the Responses API.' - ) - id: str | None = Field( - default=None, - description='Legacy id field retained for compatibility with older payloads.', - ) - status: LocalShellStatus - type: LocalShellCallResponseItemType = Field( - ..., title='LocalShellCallResponseItemType' - ) - - -class FunctionCallResponseItemType(RootModel[Literal['function_call']]): - root: Literal['function_call'] = Field(..., title='FunctionCallResponseItemType') - - -class FunctionCallResponseItem(BaseModel): - arguments: str - call_id: str - id: str | None = None - name: str - type: FunctionCallResponseItemType = Field( - ..., title='FunctionCallResponseItemType' - ) - - -class FunctionCallOutputResponseItemType(RootModel[Literal['function_call_output']]): - root: Literal['function_call_output'] = Field( - ..., title='FunctionCallOutputResponseItemType' - ) - - -class CustomToolCallResponseItemType(RootModel[Literal['custom_tool_call']]): - root: Literal['custom_tool_call'] = Field( - ..., title='CustomToolCallResponseItemType' - ) - - -class CustomToolCallResponseItem(BaseModel): - call_id: str - id: str | None = None - input: str - name: str - status: str | None = None - type: CustomToolCallResponseItemType = Field( - ..., title='CustomToolCallResponseItemType' - ) - - -class CustomToolCallOutputResponseItemType( - RootModel[Literal['custom_tool_call_output']] -): - root: Literal['custom_tool_call_output'] = Field( - ..., title='CustomToolCallOutputResponseItemType' - ) - - -class WebSearchCallResponseItemType(RootModel[Literal['web_search_call']]): - root: Literal['web_search_call'] = Field(..., title='WebSearchCallResponseItemType') - - -class ImageGenerationCallResponseItemType(RootModel[Literal['image_generation_call']]): - root: Literal['image_generation_call'] = Field( - ..., title='ImageGenerationCallResponseItemType' - ) - - -class ImageGenerationCallResponseItem(BaseModel): - id: str - result: str - revised_prompt: str | None = None - status: str - type: ImageGenerationCallResponseItemType = Field( - ..., title='ImageGenerationCallResponseItemType' - ) - - -class GhostSnapshotResponseItemType(RootModel[Literal['ghost_snapshot']]): - root: Literal['ghost_snapshot'] = Field(..., title='GhostSnapshotResponseItemType') - - -class GhostSnapshotResponseItem(BaseModel): - ghost_commit: GhostCommit - type: GhostSnapshotResponseItemType = Field( - ..., title='GhostSnapshotResponseItemType' - ) - - -class CompactionResponseItemType(RootModel[Literal['compaction']]): - root: Literal['compaction'] = Field(..., title='CompactionResponseItemType') - - -class CompactionResponseItem(BaseModel): - encrypted_content: str - type: CompactionResponseItemType = Field(..., title='CompactionResponseItemType') - - -class OtherResponseItemType(RootModel[Literal['other']]): - root: Literal['other'] = Field(..., title='OtherResponseItemType') - - -class OtherResponseItem(BaseModel): - type: OtherResponseItemType = Field(..., title='OtherResponseItemType') - - -class SearchResponsesApiWebSearchActionType(RootModel[Literal['search']]): - root: Literal['search'] = Field(..., title='SearchResponsesApiWebSearchActionType') - - -class SearchResponsesApiWebSearchAction(BaseModel): - queries: list[str] | None = None - query: str | None = None - type: SearchResponsesApiWebSearchActionType = Field( - ..., title='SearchResponsesApiWebSearchActionType' - ) - - -class OpenPageResponsesApiWebSearchActionType(RootModel[Literal['open_page']]): - root: Literal['open_page'] = Field( - ..., title='OpenPageResponsesApiWebSearchActionType' - ) - - -class OpenPageResponsesApiWebSearchAction(BaseModel): - type: OpenPageResponsesApiWebSearchActionType = Field( - ..., title='OpenPageResponsesApiWebSearchActionType' - ) - url: str | None = None - - -class FindInPageResponsesApiWebSearchActionType(RootModel[Literal['find_in_page']]): - root: Literal['find_in_page'] = Field( - ..., title='FindInPageResponsesApiWebSearchActionType' - ) - - -class FindInPageResponsesApiWebSearchAction(BaseModel): - pattern: str | None = None - type: FindInPageResponsesApiWebSearchActionType = Field( - ..., title='FindInPageResponsesApiWebSearchActionType' - ) - url: str | None = None - - -class OtherResponsesApiWebSearchActionType(RootModel[Literal['other']]): - root: Literal['other'] = Field(..., title='OtherResponsesApiWebSearchActionType') - - -class OtherResponsesApiWebSearchAction(BaseModel): - type: OtherResponsesApiWebSearchActionType = Field( - ..., title='OtherResponsesApiWebSearchActionType' - ) - - -class ResponsesApiWebSearchAction( - RootModel[ - SearchResponsesApiWebSearchAction - | OpenPageResponsesApiWebSearchAction - | FindInPageResponsesApiWebSearchAction - | OtherResponsesApiWebSearchAction - ] -): - root: ( - SearchResponsesApiWebSearchAction - | OpenPageResponsesApiWebSearchAction - | FindInPageResponsesApiWebSearchAction - | OtherResponsesApiWebSearchAction - ) - - -class ThreadResumeParams(BaseModel): - approval_policy: AskForApproval | None = Field(default=None, alias='approvalPolicy') - base_instructions: str | None = Field(default=None, alias='baseInstructions') - config: dict[str, Any] | None = None - cwd: str | None = None - developer_instructions: str | None = Field( - default=None, alias='developerInstructions' - ) - thread_id: str = Field(..., alias='threadId') - model: str | None = Field( - default=None, - description='Configuration overrides for the resumed thread, if any.', - ) - model_provider: str | None = Field(default=None, alias='modelProvider') - service_tier: ServiceTier | None = Field(default=None, alias='serviceTier') - sandbox: SandboxMode | None = None - personality: Personality | None = None - - -class ThreadForkParams(BaseModel): - approval_policy: AskForApproval | None = Field(default=None, alias='approvalPolicy') - base_instructions: str | None = Field(default=None, alias='baseInstructions') - config: dict[str, Any] | None = None - cwd: str | None = None - developer_instructions: str | None = Field( - default=None, alias='developerInstructions' - ) - model: str | None = Field( - default=None, - description='Configuration overrides for the forked thread, if any.', - ) - model_provider: str | None = Field(default=None, alias='modelProvider') - thread_id: str = Field(..., alias='threadId') - service_tier: ServiceTier | None = Field(default=None, alias='serviceTier') - sandbox: SandboxMode | None = None - - -class ThreadArchiveParams(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class ThreadUnsubscribeParams(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class ThreadSetNameParams(BaseModel): - name: str - thread_id: str = Field(..., alias='threadId') - - -class ThreadMetadataGitInfoUpdateParams(BaseModel): - branch: str | None = Field( - default=None, - description='Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.', - ) - origin_url: str | None = Field( - default=None, - alias='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.', - ) - sha: str | None = Field( - default=None, - description='Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.', - ) - - -class ThreadMetadataUpdateParams(BaseModel): - git_info: ThreadMetadataGitInfoUpdateParams | None = Field( - default=None, - alias='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.', - ) - thread_id: str = Field(..., alias='threadId') - - -class ThreadUnarchiveParams(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class ThreadCompactStartParams(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class AccountLoginCompletedNotification(BaseModel): - error: str | None = None - login_id: str | None = Field(default=None, alias='loginId') - success: bool - - -class ThreadRollbackParams(BaseModel): - num_turns: int = Field( - ..., - alias='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.", - ge=0, - ) - thread_id: str = Field(..., alias='threadId') - - -class ThreadSortKey(StrEnum): - created_at = 'created_at' - updated_at = 'updated_at' - - -class ThreadSourceKind(StrEnum): - cli = 'cli' - vscode = 'vscode' - exec = 'exec' - app_server = 'appServer' - sub_agent = 'subAgent' - sub_agent_review = 'subAgentReview' - sub_agent_compact = 'subAgentCompact' - sub_agent_thread_spawn = 'subAgentThreadSpawn' - sub_agent_other = 'subAgentOther' - unknown = 'unknown' - - -class ThreadListParams(BaseModel): - archived: bool | None = Field( - default=None, - description='Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.', - ) - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - cwd: str | None = Field( - default=None, - description='Optional cwd filter; when set, only threads whose session cwd exactly matches this path are returned.', - ) - limit: int | None = Field( - default=None, - description='Optional page size; defaults to a reasonable server-side value.', - ge=0, - ) - model_providers: list[str] | None = Field( - default=None, - alias='modelProviders', - description='Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.', - ) - search_term: str | None = Field( - default=None, - alias='searchTerm', - description='Optional substring filter for the extracted thread title.', - ) - sort_key: ThreadSortKey | None = Field( - default=None, - alias='sortKey', - description='Optional sort key; defaults to created_at.', - ) - source_kinds: list[ThreadSourceKind] | None = Field( - default=None, - alias='sourceKinds', - description='Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.', - ) - - -class ThreadLoadedListParams(BaseModel): - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - limit: int | None = Field( - default=None, description='Optional page size; defaults to no limit.', ge=0 - ) - - -class ThreadReadParams(BaseModel): - include_turns: bool | None = Field( - default=False, - alias='includeTurns', - description='When true, include turns and their items from rollout history.', - ) - thread_id: str = Field(..., alias='threadId') - - -class SkillsListExtraRootsForCwd(BaseModel): - cwd: str - extra_user_roots: list[str] = Field(..., alias='extraUserRoots') - - -class SkillsListParams(BaseModel): - cwds: list[str] | None = Field( - default=None, - description='When empty, defaults to the current session working directory.', - ) - force_reload: bool | None = Field( - default=None, - alias='forceReload', - description='When true, bypass the skills cache and re-scan skills from disk.', - ) - per_cwd_extra_user_roots: list[SkillsListExtraRootsForCwd] | None = Field( - default=None, - alias='perCwdExtraUserRoots', - description='Optional per-cwd extra roots to scan as user-scoped skills.', - ) - - -class AbsolutePathBuf(RootModel[str]): - root: str = Field( - ..., - 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.', - ) - - -class PluginListParams(BaseModel): - cwds: list[AbsolutePathBuf] | None = Field( - default=None, - description='Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.', - ) - - -class HazelnutScope(StrEnum): - example = 'example' - workspace_shared = 'workspace-shared' - all_shared = 'all-shared' - personal = 'personal' - - -class ProductSurface(StrEnum): - chatgpt = 'chatgpt' - codex = 'codex' - api = 'api' - atlas = 'atlas' - - -class SkillsRemoteReadParams(BaseModel): - enabled: bool | None = False - hazelnut_scope: HazelnutScope | None = Field( - default='example', alias='hazelnutScope' - ) - product_surface: ProductSurface | None = Field( - default='codex', alias='productSurface' - ) - - -class SkillsRemoteWriteParams(BaseModel): - hazelnut_id: str = Field(..., alias='hazelnutId') - - -class AppsListParams(BaseModel): - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - force_refetch: bool | None = Field( - default=None, - alias='forceRefetch', - description='When true, bypass app caches and fetch the latest data from sources.', - ) - limit: int | None = Field( - default=None, - description='Optional page size; defaults to a reasonable server-side value.', - ge=0, - ) - thread_id: str | None = Field( - default=None, - alias='threadId', - description="Optional thread id used to evaluate app feature gating from that thread's config.", - ) - - -class SkillsConfigWriteParams(BaseModel): - enabled: bool - path: str - - -class PluginInstallParams(BaseModel): - marketplace_path: AbsolutePathBuf = Field(..., alias='marketplacePath') - plugin_name: str = Field(..., alias='pluginName') - - class ByteRange(BaseModel): end: int = Field(..., ge=0) start: int = Field(..., ge=0) -class ModeKind(StrEnum): - plan = 'plan' - default = 'default' - - -class NetworkAccess(StrEnum): - restricted = 'restricted' - enabled = 'enabled' - - -class RestrictedReadOnlyAccessType(RootModel[Literal['restricted']]): - root: Literal['restricted'] = Field(..., title='RestrictedReadOnlyAccessType') - - -class RestrictedReadOnlyAccess(BaseModel): - include_platform_defaults: bool | None = Field( - default=True, alias='includePlatformDefaults' - ) - readable_roots: list[AbsolutePathBuf] | None = Field( - default_factory=list, alias='readableRoots' - ) - type: RestrictedReadOnlyAccessType = Field( - ..., title='RestrictedReadOnlyAccessType' - ) - - -class FullAccessReadOnlyAccessType(RootModel[Literal['fullAccess']]): - root: Literal['fullAccess'] = Field(..., title='FullAccessReadOnlyAccessType') - - -class FullAccessReadOnlyAccess(BaseModel): - type: FullAccessReadOnlyAccessType = Field( - ..., title='FullAccessReadOnlyAccessType' - ) - - -class ReadOnlyAccess(RootModel[RestrictedReadOnlyAccess | FullAccessReadOnlyAccess]): - root: RestrictedReadOnlyAccess | FullAccessReadOnlyAccess - - -class ReasoningEffort(StrEnum): - none = 'none' - minimal = 'minimal' - low = 'low' - medium = 'medium' - high = 'high' - xhigh = 'xhigh' - - -class ReasoningSummary1(StrEnum): - auto = 'auto' - concise = 'concise' - detailed = 'detailed' - - -class ReasoningSummary(RootModel[ReasoningSummary1 | Literal['none']]): - root: ReasoningSummary1 | Literal['none'] = Field( - ..., - 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", - ) - - -class DangerFullAccessSandboxPolicyType(RootModel[Literal['dangerFullAccess']]): - root: Literal['dangerFullAccess'] = Field( - ..., title='DangerFullAccessSandboxPolicyType' - ) - - -class DangerFullAccessSandboxPolicy(BaseModel): - type: DangerFullAccessSandboxPolicyType = Field( - ..., title='DangerFullAccessSandboxPolicyType' - ) - - -class ReadOnlySandboxPolicyType(RootModel[Literal['readOnly']]): - root: Literal['readOnly'] = Field(..., title='ReadOnlySandboxPolicyType') - - -class ReadOnlySandboxPolicy(BaseModel): - access: ReadOnlyAccess | None = Field( - default_factory=lambda: ReadOnlyAccess({'type': 'fullAccess'}) - ) - network_access: bool | None = Field(default=False, alias='networkAccess') - type: ReadOnlySandboxPolicyType = Field(..., title='ReadOnlySandboxPolicyType') - - -class ExternalSandboxSandboxPolicyType(RootModel[Literal['externalSandbox']]): - root: Literal['externalSandbox'] = Field( - ..., title='ExternalSandboxSandboxPolicyType' - ) - - -class ExternalSandboxSandboxPolicy(BaseModel): - network_access: NetworkAccess | None = Field( - default='restricted', alias='networkAccess' - ) - type: ExternalSandboxSandboxPolicyType = Field( - ..., title='ExternalSandboxSandboxPolicyType' - ) - - -class WorkspaceWriteSandboxPolicyType(RootModel[Literal['workspaceWrite']]): - root: Literal['workspaceWrite'] = Field( - ..., title='WorkspaceWriteSandboxPolicyType' - ) - - -class WorkspaceWriteSandboxPolicy(BaseModel): - exclude_slash_tmp: bool | None = Field(default=False, alias='excludeSlashTmp') - exclude_tmpdir_env_var: bool | None = Field( - default=False, alias='excludeTmpdirEnvVar' - ) - network_access: bool | None = Field(default=False, alias='networkAccess') - read_only_access: ReadOnlyAccess | None = Field( - default_factory=lambda: ReadOnlyAccess({'type': 'fullAccess'}), - alias='readOnlyAccess', - ) - type: WorkspaceWriteSandboxPolicyType = Field( - ..., title='WorkspaceWriteSandboxPolicyType' - ) - writable_roots: list[AbsolutePathBuf] | None = Field( - default_factory=list, alias='writableRoots' - ) - - -class SandboxPolicy( - RootModel[ - DangerFullAccessSandboxPolicy - | ReadOnlySandboxPolicy - | ExternalSandboxSandboxPolicy - | WorkspaceWriteSandboxPolicy - ] -): - root: ( - DangerFullAccessSandboxPolicy - | ReadOnlySandboxPolicy - | ExternalSandboxSandboxPolicy - | WorkspaceWriteSandboxPolicy - ) - - -class Settings(BaseModel): - developer_instructions: str | None = None - model: str - reasoning_effort: ReasoningEffort | None = None - - -class TextElement(BaseModel): - byte_range: ByteRange = Field( - ..., - alias='byteRange', - description='Byte range in the parent `text` buffer that this element occupies.', - ) - placeholder: str | None = Field( - default=None, - description='Optional human-readable placeholder for the element, displayed in the UI.', - ) - - -class TextUserInputType(RootModel[Literal['text']]): - root: Literal['text'] = Field(..., title='TextUserInputType') - - -class TextUserInput(BaseModel): - text: str - text_elements: list[TextElement] | None = Field( - default_factory=list, - description='UI-defined spans within `text` used to render or persist special elements.', - ) - type: TextUserInputType = Field(..., title='TextUserInputType') - - -class ImageUserInputType(RootModel[Literal['image']]): - root: Literal['image'] = Field(..., title='ImageUserInputType') - - -class ImageUserInput(BaseModel): - type: ImageUserInputType = Field(..., title='ImageUserInputType') - url: str - - -class LocalImageUserInputType(RootModel[Literal['localImage']]): - root: Literal['localImage'] = Field(..., title='LocalImageUserInputType') - - -class LocalImageUserInput(BaseModel): - path: str - type: LocalImageUserInputType = Field(..., title='LocalImageUserInputType') - - -class SkillUserInputType(RootModel[Literal['skill']]): - root: Literal['skill'] = Field(..., title='SkillUserInputType') - - -class SkillUserInput(BaseModel): - name: str - path: str - type: SkillUserInputType = Field(..., title='SkillUserInputType') - - -class MentionUserInputType(RootModel[Literal['mention']]): - root: Literal['mention'] = Field(..., title='MentionUserInputType') - - -class MentionUserInput(BaseModel): - name: str - path: str - type: MentionUserInputType = Field(..., title='MentionUserInputType') - - -class UserInput( - RootModel[ - TextUserInput - | ImageUserInput - | LocalImageUserInput - | SkillUserInput - | MentionUserInput - ] -): - root: ( - TextUserInput - | ImageUserInput - | LocalImageUserInput - | SkillUserInput - | MentionUserInput - ) - - -class TurnStartParams(BaseModel): - approval_policy: AskForApproval | None = Field( - default=None, - alias='approvalPolicy', - description='Override the approval policy for this turn and subsequent turns.', - ) - thread_id: str = Field(..., alias='threadId') - cwd: str | None = Field( - default=None, - description='Override the working directory for this turn and subsequent turns.', - ) - effort: ReasoningEffort | None = Field( - default=None, - description='Override the reasoning effort for this turn and subsequent turns.', - ) - input: list[UserInput] - model: str | None = Field( - default=None, - description='Override the model for this turn and subsequent turns.', - ) - output_schema: Any | None = Field( - default=None, - alias='outputSchema', - description='Optional JSON Schema used to constrain the final assistant message for this turn.', - ) - personality: Personality | None = Field( - default=None, - description='Override the personality for this turn and subsequent turns.', - ) - sandbox_policy: SandboxPolicy | None = Field( - default=None, - alias='sandboxPolicy', - description='Override the sandbox policy for this turn and subsequent turns.', - ) - service_tier: ServiceTier | None = Field( - default=None, - alias='serviceTier', - description='Override the service tier for this turn and subsequent turns.', - ) - summary: ReasoningSummary | None = Field( - default=None, - description='Override the reasoning summary for this turn and subsequent turns.', - ) - - -class TurnSteerParams(BaseModel): - expected_turn_id: str = Field( - ..., - alias='expectedTurnId', - description='Required active turn id precondition. The request fails when it does not match the currently active turn.', - ) - input: list[UserInput] - thread_id: str = Field(..., alias='threadId') - - -class TurnInterruptParams(BaseModel): - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class ThreadRealtimeAudioChunk(BaseModel): - data: str - num_channels: int = Field(..., alias='numChannels', ge=0) - sample_rate: int = Field(..., alias='sampleRate', ge=0) - samples_per_channel: int | None = Field( - default=None, alias='samplesPerChannel', ge=0 - ) - - -class WindowsWorldWritableWarningNotification(BaseModel): - extra_count: int = Field(..., alias='extraCount', ge=0) - failed_scan: bool = Field(..., alias='failedScan') - sample_paths: list[str] = Field(..., alias='samplePaths') - - -class ThreadRealtimeClosedNotification(BaseModel): - reason: str | None = None - thread_id: str = Field(..., alias='threadId') - - -class ThreadRealtimeErrorNotification(BaseModel): - message: str - thread_id: str = Field(..., alias='threadId') - - -class ReviewDelivery(StrEnum): - inline = 'inline' - detached = 'detached' - - -class UncommittedChangesReviewTargetType(RootModel[Literal['uncommittedChanges']]): - root: Literal['uncommittedChanges'] = Field( - ..., title='UncommittedChangesReviewTargetType' - ) - - -class UncommittedChangesReviewTarget(BaseModel): - type: UncommittedChangesReviewTargetType = Field( - ..., title='UncommittedChangesReviewTargetType' - ) - - -class BaseBranchReviewTargetType(RootModel[Literal['baseBranch']]): - root: Literal['baseBranch'] = Field(..., title='BaseBranchReviewTargetType') - - -class BaseBranchReviewTarget(BaseModel): - branch: str - type: BaseBranchReviewTargetType = Field(..., title='BaseBranchReviewTargetType') - - -class CommitReviewTargetType(RootModel[Literal['commit']]): - root: Literal['commit'] = Field(..., title='CommitReviewTargetType') - - -class CommitReviewTarget(BaseModel): - sha: str - title: str | None = Field( - default=None, - description='Optional human-readable label (e.g., commit subject) for UIs.', - ) - type: CommitReviewTargetType = Field(..., title='CommitReviewTargetType') - - -class CustomReviewTargetType(RootModel[Literal['custom']]): - root: Literal['custom'] = Field(..., title='CustomReviewTargetType') - - -class CustomReviewTarget(BaseModel): - instructions: str - type: CustomReviewTargetType = Field(..., title='CustomReviewTargetType') - - -class ReviewTarget( - RootModel[ - UncommittedChangesReviewTarget - | BaseBranchReviewTarget - | CommitReviewTarget - | CustomReviewTarget - ] -): - root: ( - UncommittedChangesReviewTarget - | BaseBranchReviewTarget - | CommitReviewTarget - | CustomReviewTarget - ) - - -class ReviewStartParams(BaseModel): - delivery: ReviewDelivery | None = Field( - default=None, - description='Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`).', - ) - target: ReviewTarget - thread_id: str = Field(..., alias='threadId') - - -class ModelListParams(BaseModel): - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - include_hidden: bool | None = Field( - default=None, - alias='includeHidden', - description='When true, include models that are hidden from the default picker list.', - ) - limit: int | None = Field( - default=None, - description='Optional page size; defaults to a reasonable server-side value.', - ge=0, - ) - - -class ExperimentalFeatureListParams(BaseModel): - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - limit: int | None = Field( - default=None, - description='Optional page size; defaults to a reasonable server-side value.', - ge=0, - ) - - -class ThreadRealtimeOutputAudioDeltaNotification(BaseModel): - audio: ThreadRealtimeAudioChunk - thread_id: str = Field(..., alias='threadId') - - -class ThreadRealtimeItemAddedNotification(BaseModel): - item: Any - thread_id: str = Field(..., alias='threadId') - - -class McpServerOauthLoginParams(BaseModel): - name: str - scopes: list[str] | None = None - timeout_secs: int | None = Field(default=None, alias='timeoutSecs') - - -class ListMcpServerStatusParams(BaseModel): - cursor: str | None = Field( - default=None, - description='Opaque pagination cursor returned by a previous call.', - ) - limit: int | None = Field( - default=None, - description='Optional page size; defaults to a server-defined value.', - ge=0, - ) - - -class WindowsSandboxSetupMode(StrEnum): - elevated = 'elevated' - unelevated = 'unelevated' - - -class WindowsSandboxSetupStartParams(BaseModel): - cwd: AbsolutePathBuf | None = None - mode: WindowsSandboxSetupMode - - -class ApiKeyv2LoginAccountParamsType(RootModel[Literal['apiKey']]): - root: Literal['apiKey'] = Field(..., title='ApiKeyv2::LoginAccountParamsType') - - -class ApiKeyv2LoginAccountParams(BaseModel): - api_key: str = Field(..., alias='apiKey') - type: ApiKeyv2LoginAccountParamsType = Field( - ..., title='ApiKeyv2::LoginAccountParamsType' - ) - - -class Chatgptv2LoginAccountParamsType(RootModel[Literal['chatgpt']]): - root: Literal['chatgpt'] = Field(..., title='Chatgptv2::LoginAccountParamsType') - - -class Chatgptv2LoginAccountParams(BaseModel): - type: Chatgptv2LoginAccountParamsType = Field( - ..., title='Chatgptv2::LoginAccountParamsType' - ) - - -class ChatgptAuthTokensv2LoginAccountParamsType( - RootModel[Literal['chatgptAuthTokens']] -): - root: Literal['chatgptAuthTokens'] = Field( - ..., title='ChatgptAuthTokensv2::LoginAccountParamsType' - ) - - -class ChatgptAuthTokensv2LoginAccountParams(BaseModel): - access_token: str = Field( - ..., - alias='accessToken', - description='Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.', - ) - chatgpt_account_id: str = Field( - ..., - alias='chatgptAccountId', - description='Workspace/account identifier supplied by the client.', - ) - chatgpt_plan_type: str | None = Field( - default=None, - alias='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: ChatgptAuthTokensv2LoginAccountParamsType = Field( - ..., title='ChatgptAuthTokensv2::LoginAccountParamsType' - ) - - -class LoginAccountParams( - RootModel[ - ApiKeyv2LoginAccountParams - | Chatgptv2LoginAccountParams - | ChatgptAuthTokensv2LoginAccountParams - ] -): - root: ( - ApiKeyv2LoginAccountParams - | Chatgptv2LoginAccountParams - | ChatgptAuthTokensv2LoginAccountParams - ) = Field(..., title='LoginAccountParams') +class CallToolResult(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + content: list[Any] + is_error: bool | None = Field(default=None, alias="isError") + structured_content: Any | None = Field(None, alias="structuredContent") class CancelLoginAccountParams(BaseModel): - login_id: str = Field(..., alias='loginId') + login_id: str = Field(..., alias="loginId") -class FeedbackUploadParams(BaseModel): - classification: str - extra_log_files: list[str] | None = Field(default=None, alias='extraLogFiles') - include_logs: bool = Field(..., alias='includeLogs') - reason: str | None = None - thread_id: str | None = Field(default=None, alias='threadId') +class CancelLoginAccountStatus(StrEnum): + canceled = "canceled" + not_found = "notFound" -class CommandExecTerminalSize(BaseModel): - cols: int = Field(..., description='Terminal width in character cells.', ge=0) - rows: int = Field(..., description='Terminal height in character cells.', ge=0) +class ClientInfo(BaseModel): + name: str + title: str | None = None + version: str -class CommandExecParams(BaseModel): - command: list[str] = Field( - ..., description='Command argv vector. Empty arrays are rejected.' - ) - cwd: str | None = Field( - default=None, - description='Optional working directory. Defaults to the server cwd.', - ) - disable_output_cap: bool | None = Field( - default=None, - alias='disableOutputCap', - description='Disable stdout/stderr capture truncation for this request.\n\nCannot be combined with `outputBytesCap`.', - ) - disable_timeout: bool | None = Field( - default=None, - alias='disableTimeout', - description='Disable the timeout entirely for this request.\n\nCannot be combined with `timeoutMs`.', - ) - env: dict[str, Any] | None = Field( - default=None, - 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.', - ) - output_bytes_cap: int | None = Field( - default=None, - alias='outputBytesCap', - description='Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.', - ge=0, - ) - process_id: str | None = Field( - default=None, - alias='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.', - ) - sandbox_policy: SandboxPolicy | None = Field( - default=None, - alias='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.", - ) - size: CommandExecTerminalSize | None = Field( - default=None, - description='Optional initial PTY size in character cells. Only valid when `tty` is true.', - ) - stream_stdin: bool | None = Field( - default=None, - alias='streamStdin', - description='Allow follow-up `command/exec/write` requests to write stdin bytes.\n\nRequires a client-supplied `processId`.', - ) - stream_stdout_stderr: bool | None = Field( - default=None, - alias='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`.', - ) - timeout_ms: int | None = Field( - default=None, - alias='timeoutMs', - description='Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.', - ) - tty: bool | None = Field( - default=None, - description='Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.', +class InitializeClientRequestMethod(RootModel[Literal["initialize"]]): + root: Literal["initialize"] = Field(..., title="InitializeClientRequestMethod") + + +class ThreadStartClientRequestMethod(RootModel[Literal["thread/start"]]): + root: Literal["thread/start"] = Field(..., title="Thread/startClientRequestMethod") + + +class ThreadResumeClientRequestMethod(RootModel[Literal["thread/resume"]]): + root: Literal["thread/resume"] = Field( + ..., title="Thread/resumeClientRequestMethod" ) -class CommandExecWriteParams(BaseModel): - close_stdin: bool | None = Field( - default=None, - alias='closeStdin', - description='Close stdin after writing `deltaBase64`, if present.', - ) - delta_base64: str | None = Field( - default=None, - alias='deltaBase64', - description='Optional base64-encoded stdin bytes to write.', - ) - process_id: str = Field( - ..., - alias='processId', - description='Client-supplied, connection-scoped `processId` from the original `command/exec` request.', +class ThreadForkClientRequestMethod(RootModel[Literal["thread/fork"]]): + root: Literal["thread/fork"] = Field(..., title="Thread/forkClientRequestMethod") + + +class ThreadArchiveClientRequestMethod(RootModel[Literal["thread/archive"]]): + root: Literal["thread/archive"] = Field( + ..., title="Thread/archiveClientRequestMethod" ) -class CommandExecTerminateParams(BaseModel): - process_id: str = Field( - ..., - alias='processId', - description='Client-supplied, connection-scoped `processId` from the original `command/exec` request.', +class ThreadUnsubscribeClientRequestMethod(RootModel[Literal["thread/unsubscribe"]]): + root: Literal["thread/unsubscribe"] = Field( + ..., title="Thread/unsubscribeClientRequestMethod" ) -class CommandExecResizeParams(BaseModel): - process_id: str = Field( - ..., - alias='processId', - description='Client-supplied, connection-scoped `processId` from the original `command/exec` request.', - ) - size: CommandExecTerminalSize = Field( - ..., description='New PTY size in character cells.' +class ThreadNameSetClientRequestMethod(RootModel[Literal["thread/name/set"]]): + root: Literal["thread/name/set"] = Field( + ..., title="Thread/name/setClientRequestMethod" ) -class ConfigReadParams(BaseModel): - cwd: str | None = Field( - default=None, - 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).', - ) - include_layers: bool | None = Field(default=False, alias='includeLayers') - - -class ExternalAgentConfigDetectParams(BaseModel): - cwds: list[str] | None = Field( - default=None, - description='Zero or more working directories to include for repo-scoped detection.', - ) - include_home: bool | None = Field( - default=None, - alias='includeHome', - description="If true, include detection under the user's home (~/.claude, ~/.codex, etc.).", +class ThreadMetadataUpdateClientRequestMethod( + RootModel[Literal["thread/metadata/update"]] +): + root: Literal["thread/metadata/update"] = Field( + ..., title="Thread/metadata/updateClientRequestMethod" ) -class ExternalAgentConfigMigrationItemType(StrEnum): - agents_md = 'AGENTS_MD' - config = 'CONFIG' - skills = 'SKILLS' - mcp_server_config = 'MCP_SERVER_CONFIG' - - -class MergeStrategy(StrEnum): - replace = 'replace' - upsert = 'upsert' - - -class ConfigValueWriteParams(BaseModel): - expected_version: str | None = Field(default=None, alias='expectedVersion') - file_path: str | None = Field( - default=None, - alias='filePath', - description="Path to the config file to write; defaults to the user's `config.toml` when omitted.", - ) - key_path: str = Field(..., alias='keyPath') - merge_strategy: MergeStrategy = Field(..., alias='mergeStrategy') - value: Any - - -class ConfigEdit(BaseModel): - key_path: str = Field(..., alias='keyPath') - merge_strategy: MergeStrategy = Field(..., alias='mergeStrategy') - value: Any - - -class ConfigBatchWriteParams(BaseModel): - edits: list[ConfigEdit] - expected_version: str | None = Field(default=None, alias='expectedVersion') - file_path: str | None = Field( - default=None, - alias='filePath', - description="Path to the config file to write; defaults to the user's `config.toml` when omitted.", - ) - reload_user_config: bool | None = Field( - default=None, - alias='reloadUserConfig', - description='When true, hot-reload the updated user config into all loaded threads after writing.', +class ThreadUnarchiveClientRequestMethod(RootModel[Literal["thread/unarchive"]]): + root: Literal["thread/unarchive"] = Field( + ..., title="Thread/unarchiveClientRequestMethod" ) -class GetAccountParams(BaseModel): - refresh_token: bool | None = Field( - default=False, - alias='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`.', +class ThreadCompactStartClientRequestMethod(RootModel[Literal["thread/compact/start"]]): + root: Literal["thread/compact/start"] = Field( + ..., title="Thread/compact/startClientRequestMethod" + ) + + +class ThreadRollbackClientRequestMethod(RootModel[Literal["thread/rollback"]]): + root: Literal["thread/rollback"] = Field( + ..., title="Thread/rollbackClientRequestMethod" + ) + + +class ThreadListClientRequestMethod(RootModel[Literal["thread/list"]]): + root: Literal["thread/list"] = Field(..., title="Thread/listClientRequestMethod") + + +class ThreadLoadedListClientRequestMethod(RootModel[Literal["thread/loaded/list"]]): + root: Literal["thread/loaded/list"] = Field( + ..., title="Thread/loaded/listClientRequestMethod" + ) + + +class ThreadReadClientRequestMethod(RootModel[Literal["thread/read"]]): + root: Literal["thread/read"] = Field(..., title="Thread/readClientRequestMethod") + + +class SkillsListClientRequestMethod(RootModel[Literal["skills/list"]]): + root: Literal["skills/list"] = Field(..., title="Skills/listClientRequestMethod") + + +class PluginListClientRequestMethod(RootModel[Literal["plugin/list"]]): + root: Literal["plugin/list"] = Field(..., title="Plugin/listClientRequestMethod") + + +class SkillsRemoteListClientRequestMethod(RootModel[Literal["skills/remote/list"]]): + root: Literal["skills/remote/list"] = Field( + ..., title="Skills/remote/listClientRequestMethod" + ) + + +class SkillsRemoteExportClientRequestMethod(RootModel[Literal["skills/remote/export"]]): + root: Literal["skills/remote/export"] = Field( + ..., title="Skills/remote/exportClientRequestMethod" + ) + + +class AppListClientRequestMethod(RootModel[Literal["app/list"]]): + root: Literal["app/list"] = Field(..., title="App/listClientRequestMethod") + + +class SkillsConfigWriteClientRequestMethod(RootModel[Literal["skills/config/write"]]): + root: Literal["skills/config/write"] = Field( + ..., title="Skills/config/writeClientRequestMethod" + ) + + +class PluginInstallClientRequestMethod(RootModel[Literal["plugin/install"]]): + root: Literal["plugin/install"] = Field( + ..., title="Plugin/installClientRequestMethod" + ) + + +class TurnStartClientRequestMethod(RootModel[Literal["turn/start"]]): + root: Literal["turn/start"] = Field(..., title="Turn/startClientRequestMethod") + + +class TurnSteerClientRequestMethod(RootModel[Literal["turn/steer"]]): + root: Literal["turn/steer"] = Field(..., title="Turn/steerClientRequestMethod") + + +class TurnInterruptClientRequestMethod(RootModel[Literal["turn/interrupt"]]): + root: Literal["turn/interrupt"] = Field( + ..., title="Turn/interruptClientRequestMethod" + ) + + +class ReviewStartClientRequestMethod(RootModel[Literal["review/start"]]): + root: Literal["review/start"] = Field(..., title="Review/startClientRequestMethod") + + +class ModelListClientRequestMethod(RootModel[Literal["model/list"]]): + root: Literal["model/list"] = Field(..., title="Model/listClientRequestMethod") + + +class ExperimentalFeatureListClientRequestMethod( + RootModel[Literal["experimentalFeature/list"]] +): + root: Literal["experimentalFeature/list"] = Field( + ..., title="ExperimentalFeature/listClientRequestMethod" + ) + + +class McpServerOauthLoginClientRequestMethod( + RootModel[Literal["mcpServer/oauth/login"]] +): + root: Literal["mcpServer/oauth/login"] = Field( + ..., title="McpServer/oauth/loginClientRequestMethod" + ) + + +class ConfigMcpServerReloadClientRequestMethod( + RootModel[Literal["config/mcpServer/reload"]] +): + root: Literal["config/mcpServer/reload"] = Field( + ..., title="Config/mcpServer/reloadClientRequestMethod" + ) + + +class McpServerStatusListClientRequestMethod( + RootModel[Literal["mcpServerStatus/list"]] +): + root: Literal["mcpServerStatus/list"] = Field( + ..., title="McpServerStatus/listClientRequestMethod" + ) + + +class WindowsSandboxSetupStartClientRequestMethod( + RootModel[Literal["windowsSandbox/setupStart"]] +): + root: Literal["windowsSandbox/setupStart"] = Field( + ..., title="WindowsSandbox/setupStartClientRequestMethod" + ) + + +class AccountLoginStartClientRequestMethod(RootModel[Literal["account/login/start"]]): + root: Literal["account/login/start"] = Field( + ..., title="Account/login/startClientRequestMethod" + ) + + +class AccountLoginCancelClientRequestMethod(RootModel[Literal["account/login/cancel"]]): + root: Literal["account/login/cancel"] = Field( + ..., title="Account/login/cancelClientRequestMethod" + ) + + +class AccountLogoutClientRequestMethod(RootModel[Literal["account/logout"]]): + root: Literal["account/logout"] = Field( + ..., title="Account/logoutClientRequestMethod" + ) + + +class AccountRateLimitsReadClientRequestMethod( + RootModel[Literal["account/rateLimits/read"]] +): + root: Literal["account/rateLimits/read"] = Field( + ..., title="Account/rateLimits/readClientRequestMethod" + ) + + +class FeedbackUploadClientRequestMethod(RootModel[Literal["feedback/upload"]]): + root: Literal["feedback/upload"] = Field( + ..., title="Feedback/uploadClientRequestMethod" + ) + + +class CommandExecClientRequestMethod(RootModel[Literal["command/exec"]]): + root: Literal["command/exec"] = Field(..., title="Command/execClientRequestMethod") + + +class CommandExecWriteClientRequestMethod(RootModel[Literal["command/exec/write"]]): + root: Literal["command/exec/write"] = Field( + ..., title="Command/exec/writeClientRequestMethod" + ) + + +class CommandExecTerminateClientRequestMethod( + RootModel[Literal["command/exec/terminate"]] +): + root: Literal["command/exec/terminate"] = Field( + ..., title="Command/exec/terminateClientRequestMethod" + ) + + +class CommandExecResizeClientRequestMethod(RootModel[Literal["command/exec/resize"]]): + root: Literal["command/exec/resize"] = Field( + ..., title="Command/exec/resizeClientRequestMethod" + ) + + +class ConfigReadClientRequestMethod(RootModel[Literal["config/read"]]): + root: Literal["config/read"] = Field(..., title="Config/readClientRequestMethod") + + +class ExternalAgentConfigDetectClientRequestMethod( + RootModel[Literal["externalAgentConfig/detect"]] +): + root: Literal["externalAgentConfig/detect"] = Field( + ..., title="ExternalAgentConfig/detectClientRequestMethod" + ) + + +class ExternalAgentConfigImportClientRequestMethod( + RootModel[Literal["externalAgentConfig/import"]] +): + root: Literal["externalAgentConfig/import"] = Field( + ..., title="ExternalAgentConfig/importClientRequestMethod" + ) + + +class ConfigValueWriteClientRequestMethod(RootModel[Literal["config/value/write"]]): + root: Literal["config/value/write"] = Field( + ..., title="Config/value/writeClientRequestMethod" + ) + + +class ConfigBatchWriteClientRequestMethod(RootModel[Literal["config/batchWrite"]]): + root: Literal["config/batchWrite"] = Field( + ..., title="Config/batchWriteClientRequestMethod" + ) + + +class ConfigRequirementsReadClientRequestMethod( + RootModel[Literal["configRequirements/read"]] +): + root: Literal["configRequirements/read"] = Field( + ..., title="ConfigRequirements/readClientRequestMethod" + ) + + +class AccountReadClientRequestMethod(RootModel[Literal["account/read"]]): + root: Literal["account/read"] = Field(..., title="Account/readClientRequestMethod") + + +class FuzzyFileSearchClientRequestMethod(RootModel[Literal["fuzzyFileSearch"]]): + root: Literal["fuzzyFileSearch"] = Field( + ..., title="FuzzyFileSearchClientRequestMethod" ) class CodexErrorInfo1(StrEnum): - context_window_exceeded = 'contextWindowExceeded' - usage_limit_exceeded = 'usageLimitExceeded' - server_overloaded = 'serverOverloaded' - internal_server_error = 'internalServerError' - unauthorized = 'unauthorized' - bad_request = 'badRequest' - thread_rollback_failed = 'threadRollbackFailed' - sandbox_error = 'sandboxError' - other = 'other' + context_window_exceeded = "contextWindowExceeded" + usage_limit_exceeded = "usageLimitExceeded" + server_overloaded = "serverOverloaded" + internal_server_error = "internalServerError" + unauthorized = "unauthorized" + bad_request = "badRequest" + thread_rollback_failed = "threadRollbackFailed" + sandbox_error = "sandboxError" + other = "other" class HttpConnectionFailed(BaseModel): - http_status_code: int | None = Field(default=None, alias='httpStatusCode', ge=0) + http_status_code: int | None = Field(default=None, alias="httpStatusCode", ge=0) class HttpConnectionFailedCodexErrorInfo(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) http_connection_failed: HttpConnectionFailed = Field( - ..., alias='httpConnectionFailed' + ..., alias="httpConnectionFailed" ) class ResponseStreamConnectionFailed(BaseModel): - http_status_code: int | None = Field(default=None, alias='httpStatusCode', ge=0) + http_status_code: int | None = Field(default=None, alias="httpStatusCode", ge=0) class ResponseStreamConnectionFailedCodexErrorInfo(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) response_stream_connection_failed: ResponseStreamConnectionFailed = Field( - ..., alias='responseStreamConnectionFailed' + ..., alias="responseStreamConnectionFailed" ) class ResponseStreamDisconnected(BaseModel): - http_status_code: int | None = Field(default=None, alias='httpStatusCode', ge=0) + http_status_code: int | None = Field(default=None, alias="httpStatusCode", ge=0) class ResponseStreamDisconnectedCodexErrorInfo(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) response_stream_disconnected: ResponseStreamDisconnected = Field( - ..., alias='responseStreamDisconnected' + ..., alias="responseStreamDisconnected" ) class ResponseTooManyFailedAttempts(BaseModel): - http_status_code: int | None = Field(default=None, alias='httpStatusCode', ge=0) + http_status_code: int | None = Field(default=None, alias="httpStatusCode", ge=0) class ResponseTooManyFailedAttemptsCodexErrorInfo(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) response_too_many_failed_attempts: ResponseTooManyFailedAttempts = Field( - ..., alias='responseTooManyFailedAttempts' + ..., alias="responseTooManyFailedAttempts" ) @@ -1496,72 +590,72 @@ class CodexErrorInfo( | ResponseTooManyFailedAttemptsCodexErrorInfo ) = Field( ..., - 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.', + 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.", ) class CollabAgentStatus(StrEnum): - pending_init = 'pendingInit' - running = 'running' - completed = 'completed' - errored = 'errored' - shutdown = 'shutdown' - not_found = 'notFound' + pending_init = "pendingInit" + running = "running" + completed = "completed" + errored = "errored" + shutdown = "shutdown" + not_found = "notFound" class CollabAgentTool(StrEnum): - spawn_agent = 'spawnAgent' - send_input = 'sendInput' - resume_agent = 'resumeAgent' - wait = 'wait' - close_agent = 'closeAgent' + spawn_agent = "spawnAgent" + send_input = "sendInput" + resume_agent = "resumeAgent" + wait = "wait" + close_agent = "closeAgent" class CollabAgentToolCallStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' + in_progress = "inProgress" + completed = "completed" + failed = "failed" -class ReadCommandActionType(RootModel[Literal['read']]): - root: Literal['read'] = Field(..., title='ReadCommandActionType') +class ReadCommandActionType(RootModel[Literal["read"]]): + root: Literal["read"] = Field(..., title="ReadCommandActionType") class ReadCommandAction(BaseModel): command: str name: str path: str - type: ReadCommandActionType = Field(..., title='ReadCommandActionType') + type: ReadCommandActionType = Field(..., title="ReadCommandActionType") -class ListFilesCommandActionType(RootModel[Literal['listFiles']]): - root: Literal['listFiles'] = Field(..., title='ListFilesCommandActionType') +class ListFilesCommandActionType(RootModel[Literal["listFiles"]]): + root: Literal["listFiles"] = Field(..., title="ListFilesCommandActionType") class ListFilesCommandAction(BaseModel): command: str path: str | None = None - type: ListFilesCommandActionType = Field(..., title='ListFilesCommandActionType') + type: ListFilesCommandActionType = Field(..., title="ListFilesCommandActionType") -class SearchCommandActionType(RootModel[Literal['search']]): - root: Literal['search'] = Field(..., title='SearchCommandActionType') +class SearchCommandActionType(RootModel[Literal["search"]]): + root: Literal["search"] = Field(..., title="SearchCommandActionType") class SearchCommandAction(BaseModel): command: str path: str | None = None query: str | None = None - type: SearchCommandActionType = Field(..., title='SearchCommandActionType') + type: SearchCommandActionType = Field(..., title="SearchCommandActionType") -class UnknownCommandActionType(RootModel[Literal['unknown']]): - root: Literal['unknown'] = Field(..., title='UnknownCommandActionType') +class UnknownCommandActionType(RootModel[Literal["unknown"]]): + root: Literal["unknown"] = Field(..., title="UnknownCommandActionType") class UnknownCommandAction(BaseModel): command: str - type: UnknownCommandActionType = Field(..., title='UnknownCommandActionType') + type: UnknownCommandActionType = Field(..., title="UnknownCommandActionType") class CommandAction( @@ -1580,853 +674,60 @@ class CommandAction( ) -class CommandExecutionStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' - declined = 'declined' - - -class InputTextDynamicToolCallOutputContentItemType(RootModel[Literal['inputText']]): - root: Literal['inputText'] = Field( - ..., title='InputTextDynamicToolCallOutputContentItemType' +class CommandExecOutputStream(RootModel[Literal["stdout"] | Literal["stderr"]]): + root: Literal["stdout"] | Literal["stderr"] = Field( + ..., description="Stream label for `command/exec/outputDelta` notifications." ) -class InputTextDynamicToolCallOutputContentItem(BaseModel): - text: str - type: InputTextDynamicToolCallOutputContentItemType = Field( - ..., title='InputTextDynamicToolCallOutputContentItemType' - ) - - -class InputImageDynamicToolCallOutputContentItemType(RootModel[Literal['inputImage']]): - root: Literal['inputImage'] = Field( - ..., title='InputImageDynamicToolCallOutputContentItemType' - ) - - -class InputImageDynamicToolCallOutputContentItem(BaseModel): - image_url: str = Field(..., alias='imageUrl') - type: InputImageDynamicToolCallOutputContentItemType = Field( - ..., title='InputImageDynamicToolCallOutputContentItemType' - ) - - -class DynamicToolCallOutputContentItem( - RootModel[ - InputTextDynamicToolCallOutputContentItem - | InputImageDynamicToolCallOutputContentItem - ] -): - root: ( - InputTextDynamicToolCallOutputContentItem - | InputImageDynamicToolCallOutputContentItem - ) - - -class DynamicToolCallStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' - - -class GitInfo(BaseModel): - branch: str | None = None - origin_url: str | None = Field(default=None, alias='originUrl') - sha: str | None = None - - -class McpToolCallError(BaseModel): - message: str - - -class McpToolCallResult(BaseModel): - content: list[Any] - structured_content: Any | None = Field(None, alias='structuredContent') - - -class McpToolCallStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' - - -class PatchApplyStatus(StrEnum): - in_progress = 'inProgress' - completed = 'completed' - failed = 'failed' - declined = 'declined' - - -class AddPatchChangeKindType(RootModel[Literal['add']]): - root: Literal['add'] = Field(..., title='AddPatchChangeKindType') - - -class AddPatchChangeKind(BaseModel): - type: AddPatchChangeKindType = Field(..., title='AddPatchChangeKindType') - - -class DeletePatchChangeKindType(RootModel[Literal['delete']]): - root: Literal['delete'] = Field(..., title='DeletePatchChangeKindType') - - -class DeletePatchChangeKind(BaseModel): - type: DeletePatchChangeKindType = Field(..., title='DeletePatchChangeKindType') - - -class UpdatePatchChangeKindType(RootModel[Literal['update']]): - root: Literal['update'] = Field(..., title='UpdatePatchChangeKindType') - - -class UpdatePatchChangeKind(BaseModel): - move_path: str | None = None - type: UpdatePatchChangeKindType = Field(..., title='UpdatePatchChangeKindType') - - -class PatchChangeKind( - RootModel[AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind] -): - root: AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind - - -class SessionSource1(StrEnum): - cli = 'cli' - vscode = 'vscode' - exec = 'exec' - app_server = 'appServer' - unknown = 'unknown' - - -class SubAgentSource1(StrEnum): - review = 'review' - compact = 'compact' - memory_consolidation = 'memory_consolidation' - - -class OtherSubAgentSource(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - other: str - - -class ThreadActiveFlag(StrEnum): - waiting_on_approval = 'waitingOnApproval' - waiting_on_user_input = 'waitingOnUserInput' - - -class ThreadId(RootModel[str]): - root: str - - -class UserMessageThreadItemType(RootModel[Literal['userMessage']]): - root: Literal['userMessage'] = Field(..., title='UserMessageThreadItemType') - - -class UserMessageThreadItem(BaseModel): - content: list[UserInput] - id: str - type: UserMessageThreadItemType = Field(..., title='UserMessageThreadItemType') - - -class AgentMessageThreadItemType(RootModel[Literal['agentMessage']]): - root: Literal['agentMessage'] = Field(..., title='AgentMessageThreadItemType') - - -class AgentMessageThreadItem(BaseModel): - id: str - phase: MessagePhase | None = None - text: str - type: AgentMessageThreadItemType = Field(..., title='AgentMessageThreadItemType') - - -class PlanThreadItemType(RootModel[Literal['plan']]): - root: Literal['plan'] = Field(..., title='PlanThreadItemType') - - -class PlanThreadItem(BaseModel): - id: str - text: str - type: PlanThreadItemType = Field(..., title='PlanThreadItemType') - - -class ReasoningThreadItemType(RootModel[Literal['reasoning']]): - root: Literal['reasoning'] = Field(..., title='ReasoningThreadItemType') - - -class ReasoningThreadItem(BaseModel): - content: list[str] | None = [] - id: str - summary: list[str] | None = [] - type: ReasoningThreadItemType = Field(..., title='ReasoningThreadItemType') - - -class CommandExecutionThreadItemType(RootModel[Literal['commandExecution']]): - root: Literal['commandExecution'] = Field( - ..., title='CommandExecutionThreadItemType' - ) - - -class CommandExecutionThreadItem(BaseModel): - aggregated_output: str | None = Field( - default=None, - alias='aggregatedOutput', - description="The command's output, aggregated from stdout and stderr.", - ) - command: str = Field(..., description='The command to be executed.') - command_actions: list[CommandAction] = Field( - ..., - alias='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.', - ) - cwd: str = Field(..., description="The command's working directory.") - duration_ms: int | None = Field( - default=None, - alias='durationMs', - description='The duration of the command execution in milliseconds.', - ) - exit_code: int | None = Field( - default=None, alias='exitCode', description="The command's exit code." - ) - id: str - process_id: str | None = Field( - default=None, - alias='processId', - description='Identifier for the underlying PTY process (when available).', - ) - status: CommandExecutionStatus - type: CommandExecutionThreadItemType = Field( - ..., title='CommandExecutionThreadItemType' - ) - - -class FileChangeThreadItemType(RootModel[Literal['fileChange']]): - root: Literal['fileChange'] = Field(..., title='FileChangeThreadItemType') - - -class McpToolCallThreadItemType(RootModel[Literal['mcpToolCall']]): - root: Literal['mcpToolCall'] = Field(..., title='McpToolCallThreadItemType') - - -class McpToolCallThreadItem(BaseModel): - arguments: Any - duration_ms: int | None = Field( - default=None, - alias='durationMs', - description='The duration of the MCP tool call in milliseconds.', - ) - error: McpToolCallError | None = None - id: str - result: McpToolCallResult | None = None - server: str - status: McpToolCallStatus - tool: str - type: McpToolCallThreadItemType = Field(..., title='McpToolCallThreadItemType') - - -class DynamicToolCallThreadItemType(RootModel[Literal['dynamicToolCall']]): - root: Literal['dynamicToolCall'] = Field(..., title='DynamicToolCallThreadItemType') - - -class DynamicToolCallThreadItem(BaseModel): - arguments: Any - content_items: list[DynamicToolCallOutputContentItem] | None = Field( - default=None, alias='contentItems' - ) - duration_ms: int | None = Field( - default=None, - alias='durationMs', - description='The duration of the dynamic tool call in milliseconds.', - ) - id: str - status: DynamicToolCallStatus - success: bool | None = None - tool: str - type: DynamicToolCallThreadItemType = Field( - ..., title='DynamicToolCallThreadItemType' - ) - - -class CollabAgentToolCallThreadItemType(RootModel[Literal['collabAgentToolCall']]): - root: Literal['collabAgentToolCall'] = Field( - ..., title='CollabAgentToolCallThreadItemType' - ) - - -class WebSearchThreadItemType(RootModel[Literal['webSearch']]): - root: Literal['webSearch'] = Field(..., title='WebSearchThreadItemType') - - -class ImageViewThreadItemType(RootModel[Literal['imageView']]): - root: Literal['imageView'] = Field(..., title='ImageViewThreadItemType') - - -class ImageViewThreadItem(BaseModel): - id: str - path: str - type: ImageViewThreadItemType = Field(..., title='ImageViewThreadItemType') - - -class ImageGenerationThreadItemType(RootModel[Literal['imageGeneration']]): - root: Literal['imageGeneration'] = Field(..., title='ImageGenerationThreadItemType') - - -class ImageGenerationThreadItem(BaseModel): - id: str - result: str - revised_prompt: str | None = Field(default=None, alias='revisedPrompt') - status: str - type: ImageGenerationThreadItemType = Field( - ..., title='ImageGenerationThreadItemType' - ) - - -class EnteredReviewModeThreadItemType(RootModel[Literal['enteredReviewMode']]): - root: Literal['enteredReviewMode'] = Field( - ..., title='EnteredReviewModeThreadItemType' - ) - - -class EnteredReviewModeThreadItem(BaseModel): - id: str - review: str - type: EnteredReviewModeThreadItemType = Field( - ..., title='EnteredReviewModeThreadItemType' - ) - - -class ExitedReviewModeThreadItemType(RootModel[Literal['exitedReviewMode']]): - root: Literal['exitedReviewMode'] = Field( - ..., title='ExitedReviewModeThreadItemType' - ) - - -class ExitedReviewModeThreadItem(BaseModel): - id: str - review: str - type: ExitedReviewModeThreadItemType = Field( - ..., title='ExitedReviewModeThreadItemType' - ) - - -class ContextCompactionThreadItemType(RootModel[Literal['contextCompaction']]): - root: Literal['contextCompaction'] = Field( - ..., title='ContextCompactionThreadItemType' - ) - - -class ContextCompactionThreadItem(BaseModel): - id: str - type: ContextCompactionThreadItemType = Field( - ..., title='ContextCompactionThreadItemType' - ) - - -class NotLoadedThreadStatusType(RootModel[Literal['notLoaded']]): - root: Literal['notLoaded'] = Field(..., title='NotLoadedThreadStatusType') - - -class NotLoadedThreadStatus(BaseModel): - type: NotLoadedThreadStatusType = Field(..., title='NotLoadedThreadStatusType') - - -class IdleThreadStatusType(RootModel[Literal['idle']]): - root: Literal['idle'] = Field(..., title='IdleThreadStatusType') - - -class IdleThreadStatus(BaseModel): - type: IdleThreadStatusType = Field(..., title='IdleThreadStatusType') - - -class SystemErrorThreadStatusType(RootModel[Literal['systemError']]): - root: Literal['systemError'] = Field(..., title='SystemErrorThreadStatusType') - - -class SystemErrorThreadStatus(BaseModel): - type: SystemErrorThreadStatusType = Field(..., title='SystemErrorThreadStatusType') - - -class ActiveThreadStatusType(RootModel[Literal['active']]): - root: Literal['active'] = Field(..., title='ActiveThreadStatusType') - - -class ActiveThreadStatus(BaseModel): - active_flags: list[ThreadActiveFlag] = Field(..., alias='activeFlags') - type: ActiveThreadStatusType = Field(..., title='ActiveThreadStatusType') - - -class ThreadStatus( - RootModel[ - NotLoadedThreadStatus - | IdleThreadStatus - | SystemErrorThreadStatus - | ActiveThreadStatus - ] -): - root: ( - NotLoadedThreadStatus - | IdleThreadStatus - | SystemErrorThreadStatus - | ActiveThreadStatus - ) - - -class TurnError(BaseModel): - additional_details: str | None = Field(default=None, alias='additionalDetails') - codex_error_info: CodexErrorInfo | None = Field( - default=None, alias='codexErrorInfo' - ) - message: str - - -class TurnStatus(StrEnum): - completed = 'completed' - interrupted = 'interrupted' - failed = 'failed' - in_progress = 'inProgress' - - -class SearchWebSearchActionType(RootModel[Literal['search']]): - root: Literal['search'] = Field(..., title='SearchWebSearchActionType') - - -class SearchWebSearchAction(BaseModel): - queries: list[str] | None = None - query: str | None = None - type: SearchWebSearchActionType = Field(..., title='SearchWebSearchActionType') - - -class OpenPageWebSearchActionType(RootModel[Literal['openPage']]): - root: Literal['openPage'] = Field(..., title='OpenPageWebSearchActionType') - - -class OpenPageWebSearchAction(BaseModel): - type: OpenPageWebSearchActionType = Field(..., title='OpenPageWebSearchActionType') - url: str | None = None - - -class FindInPageWebSearchActionType(RootModel[Literal['findInPage']]): - root: Literal['findInPage'] = Field(..., title='FindInPageWebSearchActionType') - - -class FindInPageWebSearchAction(BaseModel): - pattern: str | None = None - type: FindInPageWebSearchActionType = Field( - ..., title='FindInPageWebSearchActionType' - ) - url: str | None = None - - -class OtherWebSearchActionType(RootModel[Literal['other']]): - root: Literal['other'] = Field(..., title='OtherWebSearchActionType') - - -class OtherWebSearchAction(BaseModel): - type: OtherWebSearchActionType = Field(..., title='OtherWebSearchActionType') - - -class WebSearchAction( - RootModel[ - SearchWebSearchAction - | OpenPageWebSearchAction - | FindInPageWebSearchAction - | OtherWebSearchAction - ] -): - root: ( - SearchWebSearchAction - | OpenPageWebSearchAction - | FindInPageWebSearchAction - | OtherWebSearchAction - ) - - -class ThreadArchiveResponse(BaseModel): +class CommandExecResizeResponse(BaseModel): pass -class ThreadUnsubscribeStatus(StrEnum): - not_loaded = 'notLoaded' - not_subscribed = 'notSubscribed' - unsubscribed = 'unsubscribed' - - -class ThreadUnsubscribeResponse(BaseModel): - status: ThreadUnsubscribeStatus - - -class ThreadSetNameResponse(BaseModel): - pass - - -class ThreadCompactStartResponse(BaseModel): - pass - - -class ThreadRealtimeStartedNotification(BaseModel): - session_id: str | None = Field(default=None, alias='sessionId') - thread_id: str = Field(..., alias='threadId') - - -class ThreadLoadedListResponse(BaseModel): - data: list[str] = Field( - ..., description='Thread ids for sessions currently loaded in memory.' - ) - next_cursor: str | None = Field( - default=None, - alias='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.', - ) - - -class SkillErrorInfo(BaseModel): - message: str - path: str - - -class SkillInterface(BaseModel): - brand_color: str | None = Field(default=None, alias='brandColor') - default_prompt: str | None = Field(default=None, alias='defaultPrompt') - display_name: str | None = Field(default=None, alias='displayName') - icon_large: str | None = Field(default=None, alias='iconLarge') - icon_small: str | None = Field(default=None, alias='iconSmall') - short_description: str | None = Field(default=None, alias='shortDescription') - - -class SkillScope(StrEnum): - user = 'user' - repo = 'repo' - system = 'system' - admin = 'admin' - - -class SkillToolDependency(BaseModel): - command: str | None = None - description: str | None = None - transport: str | None = None - type: str - url: str | None = None - value: str - - -class PluginInterface(BaseModel): - brand_color: str | None = Field(default=None, alias='brandColor') - capabilities: list[str] - category: str | None = None - composer_icon: AbsolutePathBuf | None = Field(default=None, alias='composerIcon') - default_prompt: str | None = Field(default=None, alias='defaultPrompt') - developer_name: str | None = Field(default=None, alias='developerName') - display_name: str | None = Field(default=None, alias='displayName') - logo: AbsolutePathBuf | None = None - long_description: str | None = Field(default=None, alias='longDescription') - privacy_policy_url: str | None = Field(default=None, alias='privacyPolicyUrl') - screenshots: list[AbsolutePathBuf] - short_description: str | None = Field(default=None, alias='shortDescription') - terms_of_service_url: str | None = Field(default=None, alias='termsOfServiceUrl') - website_url: str | None = Field(default=None, alias='websiteUrl') - - -class LocalPluginSourceType(RootModel[Literal['local']]): - root: Literal['local'] = Field(..., title='LocalPluginSourceType') - - -class LocalPluginSource(BaseModel): - path: AbsolutePathBuf - type: LocalPluginSourceType = Field(..., title='LocalPluginSourceType') - - -class PluginSource(RootModel[LocalPluginSource]): - root: LocalPluginSource - - -class PluginSummary(BaseModel): - enabled: bool - id: str - installed: bool - interface: PluginInterface | None = None - name: str - source: PluginSource - - -class RemoteSkillSummary(BaseModel): - description: str - id: str - name: str - - -class SkillsRemoteReadResponse(BaseModel): - data: list[RemoteSkillSummary] - - -class SkillsRemoteWriteResponse(BaseModel): - id: str - path: str - - -class AppBranding(BaseModel): - category: str | None = None - developer: str | None = None - is_discoverable_app: bool = Field(..., alias='isDiscoverableApp') - privacy_policy: str | None = Field(default=None, alias='privacyPolicy') - terms_of_service: str | None = Field(default=None, alias='termsOfService') - website: str | None = None - - -class AppReview(BaseModel): - status: str - - -class AppScreenshot(BaseModel): - file_id: str | None = Field(default=None, alias='fileId') - url: str | None = None - user_prompt: str = Field(..., alias='userPrompt') - - -class SkillsConfigWriteResponse(BaseModel): - effective_enabled: bool = Field(..., alias='effectiveEnabled') - - -class AppSummary(BaseModel): - description: str | None = None - id: str - install_url: str | None = Field(default=None, alias='installUrl') - name: str - - -class PluginInstallResponse(BaseModel): - apps_needing_auth: list[AppSummary] = Field(..., alias='appsNeedingAuth') - - -class TurnSteerResponse(BaseModel): - turn_id: str = Field(..., alias='turnId') - - -class TurnInterruptResponse(BaseModel): - pass - - -class TextPosition(BaseModel): - column: int = Field( - ..., description='1-based column number (in Unicode scalar values).', ge=0 - ) - line: int = Field(..., description='1-based line number.', ge=0) - - -class DeprecationNoticeNotification(BaseModel): - details: str | None = Field( - default=None, - description='Optional extra guidance, such as migration steps or rationale.', - ) - summary: str = Field(..., description='Concise summary of what is deprecated.') - - -class InputModality(RootModel[Literal['text'] | Literal['image']]): - root: Literal['text'] | Literal['image'] = Field( - ..., description='Canonical user-input modality tags advertised by a model.' - ) - - -class ModelAvailabilityNux(BaseModel): - message: str - - -class ModelUpgradeInfo(BaseModel): - migration_markdown: str | None = Field(default=None, alias='migrationMarkdown') - model: str - model_link: str | None = Field(default=None, alias='modelLink') - upgrade_copy: str | None = Field(default=None, alias='upgradeCopy') - - -class ReasoningEffortOption(BaseModel): - description: str - reasoning_effort: ReasoningEffort = Field(..., alias='reasoningEffort') - - -class ExperimentalFeatureStage( - RootModel[ - Literal['beta'] - | Literal['underDevelopment'] - | Literal['stable'] - | Literal['deprecated'] - | Literal['removed'] - ] -): - root: ( - Literal['beta'] - | Literal['underDevelopment'] - | Literal['stable'] - | Literal['deprecated'] - | Literal['removed'] - ) - - -class CollaborationModeMask(BaseModel): - mode: ModeKind | None = None - model: str | None = None - name: str - reasoning_effort: ReasoningEffort | None = None - - -class ModelRerouteReason(RootModel[Literal['highRiskCyberActivity']]): - root: Literal['highRiskCyberActivity'] - - -class McpServerOauthLoginResponse(BaseModel): - authorization_url: str = Field(..., alias='authorizationUrl') - - -class McpServerRefreshResponse(BaseModel): - pass - - -class McpAuthStatus(StrEnum): - unsupported = 'unsupported' - not_logged_in = 'notLoggedIn' - bearer_token = 'bearerToken' - o_auth = 'oAuth' - - -class Resource(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - annotations: Any | None = None - description: str | None = None - icons: list[Any] | None = None - mime_type: str | None = Field(default=None, alias='mimeType') - name: str - size: int | None = None - title: str | None = None - uri: str - - -class ResourceTemplate(BaseModel): - annotations: Any | None = None - description: str | None = None - mime_type: str | None = Field(default=None, alias='mimeType') - name: str - title: str | None = None - uri_template: str = Field(..., alias='uriTemplate') - - -class Tool(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - annotations: Any | None = None - description: str | None = None - icons: list[Any] | None = None - input_schema: Any = Field(..., alias='inputSchema') - name: str - output_schema: Any | None = Field(None, alias='outputSchema') - title: str | None = None - - -class WindowsSandboxSetupStartResponse(BaseModel): - started: bool - - -class ApiKeyv2LoginAccountResponseType(RootModel[Literal['apiKey']]): - root: Literal['apiKey'] = Field(..., title='ApiKeyv2::LoginAccountResponseType') - - -class ApiKeyv2LoginAccountResponse(BaseModel): - type: ApiKeyv2LoginAccountResponseType = Field( - ..., title='ApiKeyv2::LoginAccountResponseType' - ) - - -class Chatgptv2LoginAccountResponseType(RootModel[Literal['chatgpt']]): - root: Literal['chatgpt'] = Field(..., title='Chatgptv2::LoginAccountResponseType') - - -class Chatgptv2LoginAccountResponse(BaseModel): - auth_url: str = Field( - ..., - alias='authUrl', - description='URL the client should open in a browser to initiate the OAuth flow.', - ) - login_id: str = Field(..., alias='loginId') - type: Chatgptv2LoginAccountResponseType = Field( - ..., title='Chatgptv2::LoginAccountResponseType' - ) - - -class ChatgptAuthTokensv2LoginAccountResponseType( - RootModel[Literal['chatgptAuthTokens']] -): - root: Literal['chatgptAuthTokens'] = Field( - ..., title='ChatgptAuthTokensv2::LoginAccountResponseType' - ) - - -class ChatgptAuthTokensv2LoginAccountResponse(BaseModel): - type: ChatgptAuthTokensv2LoginAccountResponseType = Field( - ..., title='ChatgptAuthTokensv2::LoginAccountResponseType' - ) - - -class LoginAccountResponse( - RootModel[ - ApiKeyv2LoginAccountResponse - | Chatgptv2LoginAccountResponse - | ChatgptAuthTokensv2LoginAccountResponse - ] -): - root: ( - ApiKeyv2LoginAccountResponse - | Chatgptv2LoginAccountResponse - | ChatgptAuthTokensv2LoginAccountResponse - ) = Field(..., title='LoginAccountResponse') - - -class CancelLoginAccountStatus(StrEnum): - canceled = 'canceled' - not_found = 'notFound' - - -class CancelLoginAccountResponse(BaseModel): - status: CancelLoginAccountStatus - - -class LogoutAccountResponse(BaseModel): - pass - - -class CreditsSnapshot(BaseModel): - balance: str | None = None - has_credits: bool = Field(..., alias='hasCredits') - unlimited: bool - - -class PlanType(StrEnum): - free = 'free' - go = 'go' - plus = 'plus' - pro = 'pro' - team = 'team' - business = 'business' - enterprise = 'enterprise' - edu = 'edu' - unknown = 'unknown' - - -class RateLimitWindow(BaseModel): - resets_at: int | None = Field(default=None, alias='resetsAt') - used_percent: int = Field(..., alias='usedPercent') - window_duration_mins: int | None = Field(default=None, alias='windowDurationMins') - - -class FeedbackUploadResponse(BaseModel): - thread_id: str = Field(..., alias='threadId') - - class CommandExecResponse(BaseModel): - exit_code: int = Field(..., alias='exitCode', description='Process exit code.') + exit_code: int = Field(..., alias="exitCode", description="Process exit code.") stderr: str = Field( ..., - description='Buffered stderr capture.\n\nEmpty when stderr was streamed via `command/exec/outputDelta`.', + description="Buffered stderr capture.\n\nEmpty when stderr was streamed via `command/exec/outputDelta`.", ) stdout: str = Field( ..., - description='Buffered stdout capture.\n\nEmpty when stdout was streamed via `command/exec/outputDelta`.', + description="Buffered stdout capture.\n\nEmpty when stdout was streamed via `command/exec/outputDelta`.", + ) + + +class CommandExecTerminalSize(BaseModel): + cols: int = Field(..., description="Terminal width in character cells.", ge=0) + rows: int = Field(..., description="Terminal height in character cells.", ge=0) + + +class CommandExecTerminateParams(BaseModel): + process_id: str = Field( + ..., + alias="processId", + description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.", + ) + + +class CommandExecTerminateResponse(BaseModel): + pass + + +class CommandExecWriteParams(BaseModel): + close_stdin: bool | None = Field( + default=None, + alias="closeStdin", + description="Close stdin after writing `deltaBase64`, if present.", + ) + delta_base64: str | None = Field( + default=None, + alias="deltaBase64", + description="Optional base64-encoded stdin bytes to write.", + ) + process_id: str = Field( + ..., + alias="processId", + description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.", ) @@ -2434,66 +735,44 @@ class CommandExecWriteResponse(BaseModel): pass -class CommandExecTerminateResponse(BaseModel): - pass +class CommandExecutionOutputDeltaNotification(BaseModel): + delta: str + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") -class CommandExecResizeResponse(BaseModel): - pass +class CommandExecutionStatus(StrEnum): + in_progress = "inProgress" + completed = "completed" + failed = "failed" + declined = "declined" -class AnalyticsConfig(BaseModel): - model_config = ConfigDict( - extra='allow', - ) - enabled: bool | None = None - - -class AppToolApproval(StrEnum): - auto = 'auto' - prompt = 'prompt' - approve = 'approve' - - -class AppToolConfig(BaseModel): - approval_mode: AppToolApproval | None = None - enabled: bool | None = None - - -class AppToolsConfig(BaseModel): - pass - - -class AppsDefaultConfig(BaseModel): - destructive_enabled: bool | None = True - enabled: bool | None = True - open_world_enabled: bool | None = True - - -class MdmConfigLayerSourceType(RootModel[Literal['mdm']]): - root: Literal['mdm'] = Field(..., title='MdmConfigLayerSourceType') +class MdmConfigLayerSourceType(RootModel[Literal["mdm"]]): + root: Literal["mdm"] = Field(..., title="MdmConfigLayerSourceType") class MdmConfigLayerSource(BaseModel): domain: str key: str - type: MdmConfigLayerSourceType = Field(..., title='MdmConfigLayerSourceType') + type: MdmConfigLayerSourceType = Field(..., title="MdmConfigLayerSourceType") -class SystemConfigLayerSourceType(RootModel[Literal['system']]): - root: Literal['system'] = Field(..., title='SystemConfigLayerSourceType') +class SystemConfigLayerSourceType(RootModel[Literal["system"]]): + root: Literal["system"] = Field(..., title="SystemConfigLayerSourceType") class SystemConfigLayerSource(BaseModel): file: AbsolutePathBuf = Field( ..., - description='This is the path to the system config.toml file, though it is not guaranteed to exist.', + description="This is the path to the system config.toml file, though it is not guaranteed to exist.", ) - type: SystemConfigLayerSourceType = Field(..., title='SystemConfigLayerSourceType') + type: SystemConfigLayerSourceType = Field(..., title="SystemConfigLayerSourceType") -class UserConfigLayerSourceType(RootModel[Literal['user']]): - root: Literal['user'] = Field(..., title='UserConfigLayerSourceType') +class UserConfigLayerSourceType(RootModel[Literal["user"]]): + root: Literal["user"] = Field(..., title="UserConfigLayerSourceType") class UserConfigLayerSource(BaseModel): @@ -2501,58 +780,58 @@ class UserConfigLayerSource(BaseModel): ..., description="This is the path to the user's config.toml file, though it is not guaranteed to exist.", ) - type: UserConfigLayerSourceType = Field(..., title='UserConfigLayerSourceType') + type: UserConfigLayerSourceType = Field(..., title="UserConfigLayerSourceType") -class ProjectConfigLayerSourceType(RootModel[Literal['project']]): - root: Literal['project'] = Field(..., title='ProjectConfigLayerSourceType') +class ProjectConfigLayerSourceType(RootModel[Literal["project"]]): + root: Literal["project"] = Field(..., title="ProjectConfigLayerSourceType") class ProjectConfigLayerSource(BaseModel): - dot_codex_folder: AbsolutePathBuf = Field(..., alias='dotCodexFolder') + dot_codex_folder: AbsolutePathBuf = Field(..., alias="dotCodexFolder") type: ProjectConfigLayerSourceType = Field( - ..., title='ProjectConfigLayerSourceType' + ..., title="ProjectConfigLayerSourceType" ) -class SessionFlagsConfigLayerSourceType(RootModel[Literal['sessionFlags']]): - root: Literal['sessionFlags'] = Field( - ..., title='SessionFlagsConfigLayerSourceType' +class SessionFlagsConfigLayerSourceType(RootModel[Literal["sessionFlags"]]): + root: Literal["sessionFlags"] = Field( + ..., title="SessionFlagsConfigLayerSourceType" ) class SessionFlagsConfigLayerSource(BaseModel): type: SessionFlagsConfigLayerSourceType = Field( - ..., title='SessionFlagsConfigLayerSourceType' + ..., title="SessionFlagsConfigLayerSourceType" ) class LegacyManagedConfigTomlFromFileConfigLayerSourceType( - RootModel[Literal['legacyManagedConfigTomlFromFile']] + RootModel[Literal["legacyManagedConfigTomlFromFile"]] ): - root: Literal['legacyManagedConfigTomlFromFile'] = Field( - ..., title='LegacyManagedConfigTomlFromFileConfigLayerSourceType' + root: Literal["legacyManagedConfigTomlFromFile"] = Field( + ..., title="LegacyManagedConfigTomlFromFileConfigLayerSourceType" ) class LegacyManagedConfigTomlFromFileConfigLayerSource(BaseModel): file: AbsolutePathBuf type: LegacyManagedConfigTomlFromFileConfigLayerSourceType = Field( - ..., title='LegacyManagedConfigTomlFromFileConfigLayerSourceType' + ..., title="LegacyManagedConfigTomlFromFileConfigLayerSourceType" ) class LegacyManagedConfigTomlFromMdmConfigLayerSourceType( - RootModel[Literal['legacyManagedConfigTomlFromMdm']] + RootModel[Literal["legacyManagedConfigTomlFromMdm"]] ): - root: Literal['legacyManagedConfigTomlFromMdm'] = Field( - ..., title='LegacyManagedConfigTomlFromMdmConfigLayerSourceType' + root: Literal["legacyManagedConfigTomlFromMdm"] = Field( + ..., title="LegacyManagedConfigTomlFromMdmConfigLayerSourceType" ) class LegacyManagedConfigTomlFromMdmConfigLayerSource(BaseModel): type: LegacyManagedConfigTomlFromMdmConfigLayerSourceType = Field( - ..., title='LegacyManagedConfigTomlFromMdmConfigLayerSourceType' + ..., title="LegacyManagedConfigTomlFromMdmConfigLayerSourceType" ) @@ -2578,560 +857,56 @@ class ConfigLayerSource( ) -class ForcedLoginMethod(StrEnum): - chatgpt = 'chatgpt' - api = 'api' - - -class SandboxWorkspaceWrite(BaseModel): - exclude_slash_tmp: bool | None = False - exclude_tmpdir_env_var: bool | None = False - network_access: bool | None = False - writable_roots: list[str] | None = [] - - -class Verbosity(StrEnum): - low = 'low' - medium = 'medium' - high = 'high' - - -class WebSearchContextSize(StrEnum): - low = 'low' - medium = 'medium' - high = 'high' - - -class WebSearchLocation(BaseModel): - model_config = ConfigDict( - extra='forbid', +class ConfigReadParams(BaseModel): + cwd: str | None = Field( + default=None, + 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).", ) - city: str | None = None - country: str | None = None - region: str | None = None - timezone: str | None = None + include_layers: bool | None = Field(default=False, alias="includeLayers") -class WebSearchMode(StrEnum): - disabled = 'disabled' - cached = 'cached' - live = 'live' +class InputTextContentItemType(RootModel[Literal["input_text"]]): + root: Literal["input_text"] = Field(..., title="InputTextContentItemType") -class WebSearchToolConfig(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - allowed_domains: list[str] | None = None - context_size: WebSearchContextSize | None = None - location: WebSearchLocation | None = None +class InputTextContentItem(BaseModel): + text: str + type: InputTextContentItemType = Field(..., title="InputTextContentItemType") -class ExternalAgentConfigImportResponse(BaseModel): - pass +class InputImageContentItemType(RootModel[Literal["input_image"]]): + root: Literal["input_image"] = Field(..., title="InputImageContentItemType") -class WriteStatus(StrEnum): - ok = 'ok' - ok_overridden = 'okOverridden' +class InputImageContentItem(BaseModel): + image_url: str + type: InputImageContentItemType = Field(..., title="InputImageContentItemType") -class NetworkRequirements(BaseModel): - allow_local_binding: bool | None = Field(default=None, alias='allowLocalBinding') - allow_unix_sockets: list[str] | None = Field(default=None, alias='allowUnixSockets') - allow_upstream_proxy: bool | None = Field(default=None, alias='allowUpstreamProxy') - allowed_domains: list[str] | None = Field(default=None, alias='allowedDomains') - dangerously_allow_all_unix_sockets: bool | None = Field( - default=None, alias='dangerouslyAllowAllUnixSockets' - ) - dangerously_allow_non_loopback_proxy: bool | None = Field( - default=None, alias='dangerouslyAllowNonLoopbackProxy' - ) - denied_domains: list[str] | None = Field(default=None, alias='deniedDomains') - enabled: bool | None = None - http_port: int | None = Field(default=None, alias='httpPort', ge=0) - socks_port: int | None = Field(default=None, alias='socksPort', ge=0) +class OutputTextContentItemType(RootModel[Literal["output_text"]]): + root: Literal["output_text"] = Field(..., title="OutputTextContentItemType") -class ResidencyRequirement(RootModel[Literal['us']]): - root: Literal['us'] +class OutputTextContentItem(BaseModel): + text: str + type: OutputTextContentItemType = Field(..., title="OutputTextContentItemType") -class ApiKeyAccountType(RootModel[Literal['apiKey']]): - root: Literal['apiKey'] = Field(..., title='ApiKeyAccountType') - - -class ApiKeyAccount(BaseModel): - type: ApiKeyAccountType = Field(..., title='ApiKeyAccountType') - - -class ChatgptAccountType(RootModel[Literal['chatgpt']]): - root: Literal['chatgpt'] = Field(..., title='ChatgptAccountType') - - -class ChatgptAccount(BaseModel): - email: str - plan_type: PlanType = Field(..., alias='planType') - type: ChatgptAccountType = Field(..., title='ChatgptAccountType') - - -class Account(RootModel[ApiKeyAccount | ChatgptAccount]): - root: ApiKeyAccount | ChatgptAccount - - -class GetAccountResponse(BaseModel): - account: Account | None = None - requires_openai_auth: bool = Field(..., alias='requiresOpenaiAuth') - - -class ErrorNotification(BaseModel): - error: TurnError - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - will_retry: bool = Field(..., alias='willRetry') - - -class ThreadStatusChangedNotification(BaseModel): - status: ThreadStatus - thread_id: str = Field(..., alias='threadId') - - -class ThreadArchivedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class ThreadUnarchivedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class ThreadClosedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - - -class SkillsChangedNotification(BaseModel): - pass - - -class ThreadNameUpdatedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - thread_name: str | None = Field(default=None, alias='threadName') - - -class TokenUsageBreakdown(BaseModel): - cached_input_tokens: int = Field(..., alias='cachedInputTokens') - input_tokens: int = Field(..., alias='inputTokens') - output_tokens: int = Field(..., alias='outputTokens') - reasoning_output_tokens: int = Field(..., alias='reasoningOutputTokens') - total_tokens: int = Field(..., alias='totalTokens') - - -class TurnDiffUpdatedNotification(BaseModel): - diff: str - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class TurnPlanStepStatus(StrEnum): - pending = 'pending' - in_progress = 'inProgress' - completed = 'completed' - - -class AgentMessageDeltaNotification(BaseModel): - delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class PlanDeltaNotification(BaseModel): - delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class CommandExecOutputStream(RootModel[Literal['stdout'] | Literal['stderr']]): - root: Literal['stdout'] | Literal['stderr'] = Field( - ..., description='Stream label for `command/exec/outputDelta` notifications.' - ) - - -class CommandExecOutputDeltaNotification(BaseModel): - cap_reached: bool = Field( - ..., - alias='capReached', - description='`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.', - ) - delta_base64: str = Field( - ..., alias='deltaBase64', description='Base64-encoded output bytes.' - ) - process_id: str = Field( - ..., - alias='processId', - description='Client-supplied, connection-scoped `processId` from the original `command/exec` request.', - ) - stream: CommandExecOutputStream = Field( - ..., description='Output stream for this chunk.' - ) - - -class CommandExecutionOutputDeltaNotification(BaseModel): - delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class TerminalInteractionNotification(BaseModel): - item_id: str = Field(..., alias='itemId') - process_id: str = Field(..., alias='processId') - stdin: str - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class FileChangeOutputDeltaNotification(BaseModel): - delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class RequestId(RootModel[str | int]): - root: str | int - - -class ServerRequestResolvedNotification(BaseModel): - request_id: RequestId = Field(..., alias='requestId') - thread_id: str = Field(..., alias='threadId') - - -class McpToolCallProgressNotification(BaseModel): - item_id: str = Field(..., alias='itemId') - message: str - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class McpServerOauthLoginCompletedNotification(BaseModel): - error: str | None = None - name: str - success: bool - - -class AuthMode( - RootModel[Literal['apikey'] | Literal['chatgpt'] | Literal['chatgptAuthTokens']] +class ContentItem( + RootModel[InputTextContentItem | InputImageContentItem | OutputTextContentItem] ): - root: Literal['apikey'] | Literal['chatgpt'] | Literal['chatgptAuthTokens'] = Field( - ..., description='Authentication mode for OpenAI-backed providers.' - ) - - -class AccountUpdatedNotification(BaseModel): - auth_mode: AuthMode | None = Field(default=None, alias='authMode') - plan_type: PlanType | None = Field(default=None, alias='planType') - - -class ReasoningSummaryTextDeltaNotification(BaseModel): - delta: str - item_id: str = Field(..., alias='itemId') - summary_index: int = Field(..., alias='summaryIndex') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class ReasoningSummaryPartAddedNotification(BaseModel): - item_id: str = Field(..., alias='itemId') - summary_index: int = Field(..., alias='summaryIndex') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class ReasoningTextDeltaNotification(BaseModel): - content_index: int = Field(..., alias='contentIndex') - delta: str - item_id: str = Field(..., alias='itemId') - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') + root: InputTextContentItem | InputImageContentItem | OutputTextContentItem class ContextCompactedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") -class TextAgentMessageContentType(RootModel[Literal['Text']]): - root: Literal['Text'] = Field(..., title='TextAgentMessageContentType') - - -class TextAgentMessageContent(BaseModel): - text: str - type: TextAgentMessageContentType = Field(..., title='TextAgentMessageContentType') - - -class AgentMessageContent(RootModel[TextAgentMessageContent]): - root: TextAgentMessageContent - - -class RealtimeAudioFrame(BaseModel): - data: str - num_channels: int = Field(..., ge=0) - sample_rate: int = Field(..., ge=0) - samples_per_channel: int | None = Field(default=None, ge=0) - - -class NetworkPolicyRuleAction(StrEnum): - allow = 'allow' - deny = 'deny' - - -class RealtimeHandoffMessage(BaseModel): - role: str - text: str - - -class ErrResultOfCallToolResultOrString(BaseModel): - err: str = Field(..., alias='Err') - - -class NetworkPermissions(BaseModel): - enabled: bool | None = None - - -class ApprovedExecpolicyAmendment(BaseModel): - proposed_execpolicy_amendment: list[str] - - -class ApprovedExecpolicyAmendmentReviewDecision(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - approved_execpolicy_amendment: ApprovedExecpolicyAmendment - - -class ReviewLineRange(BaseModel): - end: int = Field(..., ge=0) - start: int = Field(..., ge=0) - - -class ElicitationRequest1(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - message: str - mode: Literal['form'] - requested_schema: Any - - -class ElicitationRequest2(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - elicitation_id: str - message: str - mode: Literal['url'] - url: str - - -class ElicitationRequest(RootModel[ElicitationRequest1 | ElicitationRequest2]): - root: ElicitationRequest1 | ElicitationRequest2 - - -class ExecOutputStream(StrEnum): - stdout = 'stdout' - stderr = 'stderr' - - -class ExecCommandStatus(StrEnum): - completed = 'completed' - failed = 'failed' - declined = 'declined' - - -class NetworkApprovalProtocol(StrEnum): - http = 'http' - https = 'https' - socks5_tcp = 'socks5Tcp' - socks5_udp = 'socks5Udp' - - -class CollabAgentRef(BaseModel): - agent_nickname: str | None = Field( - default=None, - description='Optional nickname assigned to an AgentControl-spawned sub-agent.', - ) - agent_role: str | None = Field( - default=None, - description='Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.', - ) - thread_id: ThreadId = Field(..., description='Thread ID of the receiver/new agent.') - - -class InitializeCapabilities(BaseModel): - experimental_api: bool | None = Field( - default=False, - alias='experimentalApi', - description='Opt into receiving experimental API methods and fields.', - ) - opt_out_notification_methods: list[str] | None = Field( - default=None, - alias='optOutNotificationMethods', - description='Exact notification method names that should be suppressed for this connection (for example `codex/event/session_configured`).', - ) - - -class ClientInfo(BaseModel): - name: str - title: str | None = None - version: str - - -class NetworkApprovalContext(BaseModel): - host: str - protocol: NetworkApprovalProtocol - - -class SessionUpdated(BaseModel): - instructions: str | None = None - session_id: str - - -class SessionUpdatedRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - session_updated: SessionUpdated = Field(..., alias='SessionUpdated') - - -class AudioOutRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - audio_out: RealtimeAudioFrame = Field(..., alias='AudioOut') - - -class ConversationItemAddedRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - conversation_item_added: Any = Field(..., alias='ConversationItemAdded') - - -class ConversationItemDone(BaseModel): - item_id: str - - -class ConversationItemDoneRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - conversation_item_done: ConversationItemDone = Field( - ..., alias='ConversationItemDone' - ) - - -class ErrorRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - error: str = Field(..., alias='Error') - - -class ExecApprovalRequestSkillMetadata(BaseModel): - path_to_skills_md: str - - -class ExecCommandSource(StrEnum): - agent = 'agent' - user_shell = 'user_shell' - unified_exec_startup = 'unified_exec_startup' - unified_exec_interaction = 'unified_exec_interaction' - - -class StepStatus(StrEnum): - pending = 'pending' - in_progress = 'in_progress' - completed = 'completed' - - -class Duration(BaseModel): - nanos: int = Field(..., ge=0) - secs: int = Field(..., ge=0) - - -class MacOsAutomationPermission1(StrEnum): - none = 'none' - all = 'all' - - -class BundleIdsMacOsAutomationPermission(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - bundle_ids: list[str] - - -class MacOsAutomationPermission( - RootModel[MacOsAutomationPermission1 | BundleIdsMacOsAutomationPermission] -): - root: MacOsAutomationPermission1 | BundleIdsMacOsAutomationPermission - - -class ReadParsedCommandType(RootModel[Literal['read']]): - root: Literal['read'] = Field(..., title='ReadParsedCommandType') - - -class ReadParsedCommand(BaseModel): - cmd: str - name: str - path: str = Field( - ..., - description='(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path.', - ) - type: ReadParsedCommandType = Field(..., title='ReadParsedCommandType') - - -class ListFilesParsedCommandType(RootModel[Literal['list_files']]): - root: Literal['list_files'] = Field(..., title='ListFilesParsedCommandType') - - -class ListFilesParsedCommand(BaseModel): - cmd: str - path: str | None = None - type: ListFilesParsedCommandType = Field(..., title='ListFilesParsedCommandType') - - -class SearchParsedCommandType(RootModel[Literal['search']]): - root: Literal['search'] = Field(..., title='SearchParsedCommandType') - - -class SearchParsedCommand(BaseModel): - cmd: str - path: str | None = None - query: str | None = None - type: SearchParsedCommandType = Field(..., title='SearchParsedCommandType') - - -class UnknownParsedCommandType(RootModel[Literal['unknown']]): - root: Literal['unknown'] = Field(..., title='UnknownParsedCommandType') - - -class UnknownParsedCommand(BaseModel): - cmd: str - type: UnknownParsedCommandType = Field(..., title='UnknownParsedCommandType') - - -class ParsedCommand( - RootModel[ - ReadParsedCommand - | ListFilesParsedCommand - | SearchParsedCommand - | UnknownParsedCommand - ] -): - root: ( - ReadParsedCommand - | ListFilesParsedCommand - | SearchParsedCommand - | UnknownParsedCommand - ) +class CreditsSnapshot(BaseModel): + balance: str | None = None + has_credits: bool = Field(..., alias="hasCredits") + unlimited: bool class CustomPrompt(BaseModel): @@ -3142,37 +917,922 @@ class CustomPrompt(BaseModel): path: str -class FuzzyFileSearchParams(BaseModel): - cancellation_token: str | None = Field(default=None, alias='cancellationToken') - query: str - roots: list[str] +class DeprecationNoticeNotification(BaseModel): + details: str | None = Field( + default=None, + description="Optional extra guidance, such as migration steps or rationale.", + ) + summary: str = Field(..., description="Concise summary of what is deprecated.") -class AddFileChangeType(RootModel[Literal['add']]): - root: Literal['add'] = Field(..., title='AddFileChangeType') +class Duration(BaseModel): + nanos: int = Field(..., ge=0) + secs: int = Field(..., ge=0) + + +class InputTextDynamicToolCallOutputContentItemType(RootModel[Literal["inputText"]]): + root: Literal["inputText"] = Field( + ..., title="InputTextDynamicToolCallOutputContentItemType" + ) + + +class InputTextDynamicToolCallOutputContentItem(BaseModel): + text: str + type: InputTextDynamicToolCallOutputContentItemType = Field( + ..., title="InputTextDynamicToolCallOutputContentItemType" + ) + + +class InputImageDynamicToolCallOutputContentItemType(RootModel[Literal["inputImage"]]): + root: Literal["inputImage"] = Field( + ..., title="InputImageDynamicToolCallOutputContentItemType" + ) + + +class InputImageDynamicToolCallOutputContentItem(BaseModel): + image_url: str = Field(..., alias="imageUrl") + type: InputImageDynamicToolCallOutputContentItemType = Field( + ..., title="InputImageDynamicToolCallOutputContentItemType" + ) + + +class DynamicToolCallOutputContentItem( + RootModel[ + InputTextDynamicToolCallOutputContentItem + | InputImageDynamicToolCallOutputContentItem + ] +): + root: ( + InputTextDynamicToolCallOutputContentItem + | InputImageDynamicToolCallOutputContentItem + ) + + +class DynamicToolCallStatus(StrEnum): + in_progress = "inProgress" + completed = "completed" + failed = "failed" + + +class DynamicToolSpec(BaseModel): + description: str + input_schema: Any = Field(..., alias="inputSchema") + name: str + + +class ElicitationRequest1(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + message: str + mode: Literal["form"] + requested_schema: Any + + +class ElicitationRequest2(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + elicitation_id: str + message: str + mode: Literal["url"] + url: str + + +class ElicitationRequest(RootModel[ElicitationRequest1 | ElicitationRequest2]): + root: ElicitationRequest1 | ElicitationRequest2 + + +class ErrorEventMsgType(RootModel[Literal["error"]]): + root: Literal["error"] = Field(..., title="ErrorEventMsgType") + + +class ErrorEventMsg(BaseModel): + codex_error_info: CodexErrorInfo | None = None + message: str + type: ErrorEventMsgType = Field(..., title="ErrorEventMsgType") + + +class WarningEventMsgType(RootModel[Literal["warning"]]): + root: Literal["warning"] = Field(..., title="WarningEventMsgType") + + +class WarningEventMsg(BaseModel): + message: str + type: WarningEventMsgType = Field(..., title="WarningEventMsgType") + + +class RealtimeConversationStartedEventMsgType( + RootModel[Literal["realtime_conversation_started"]] +): + root: Literal["realtime_conversation_started"] = Field( + ..., title="RealtimeConversationStartedEventMsgType" + ) + + +class RealtimeConversationStartedEventMsg(BaseModel): + session_id: str | None = None + type: RealtimeConversationStartedEventMsgType = Field( + ..., title="RealtimeConversationStartedEventMsgType" + ) + + +class RealtimeConversationRealtimeEventMsgType( + RootModel[Literal["realtime_conversation_realtime"]] +): + root: Literal["realtime_conversation_realtime"] = Field( + ..., title="RealtimeConversationRealtimeEventMsgType" + ) + + +class RealtimeConversationClosedEventMsgType( + RootModel[Literal["realtime_conversation_closed"]] +): + root: Literal["realtime_conversation_closed"] = Field( + ..., title="RealtimeConversationClosedEventMsgType" + ) + + +class RealtimeConversationClosedEventMsg(BaseModel): + reason: str | None = None + type: RealtimeConversationClosedEventMsgType = Field( + ..., title="RealtimeConversationClosedEventMsgType" + ) + + +class ModelRerouteEventMsgType(RootModel[Literal["model_reroute"]]): + root: Literal["model_reroute"] = Field(..., title="ModelRerouteEventMsgType") + + +class ContextCompactedEventMsgType(RootModel[Literal["context_compacted"]]): + root: Literal["context_compacted"] = Field( + ..., title="ContextCompactedEventMsgType" + ) + + +class ContextCompactedEventMsg(BaseModel): + type: ContextCompactedEventMsgType = Field( + ..., title="ContextCompactedEventMsgType" + ) + + +class ThreadRolledBackEventMsgType(RootModel[Literal["thread_rolled_back"]]): + root: Literal["thread_rolled_back"] = Field( + ..., title="ThreadRolledBackEventMsgType" + ) + + +class ThreadRolledBackEventMsg(BaseModel): + num_turns: int = Field( + ..., description="Number of user turns that were removed from context.", ge=0 + ) + type: ThreadRolledBackEventMsgType = Field( + ..., title="ThreadRolledBackEventMsgType" + ) + + +class TaskStartedEventMsgType(RootModel[Literal["task_started"]]): + root: Literal["task_started"] = Field(..., title="TaskStartedEventMsgType") + + +class TaskCompleteEventMsgType(RootModel[Literal["task_complete"]]): + root: Literal["task_complete"] = Field(..., title="TaskCompleteEventMsgType") + + +class TaskCompleteEventMsg(BaseModel): + last_agent_message: str | None = None + turn_id: str + type: TaskCompleteEventMsgType = Field(..., title="TaskCompleteEventMsgType") + + +class TokenCountEventMsgType(RootModel[Literal["token_count"]]): + root: Literal["token_count"] = Field(..., title="TokenCountEventMsgType") + + +class AgentMessageEventMsgType(RootModel[Literal["agent_message"]]): + root: Literal["agent_message"] = Field(..., title="AgentMessageEventMsgType") + + +class UserMessageEventMsgType(RootModel[Literal["user_message"]]): + root: Literal["user_message"] = Field(..., title="UserMessageEventMsgType") + + +class AgentMessageDeltaEventMsgType(RootModel[Literal["agent_message_delta"]]): + root: Literal["agent_message_delta"] = Field( + ..., title="AgentMessageDeltaEventMsgType" + ) + + +class AgentMessageDeltaEventMsg(BaseModel): + delta: str + type: AgentMessageDeltaEventMsgType = Field( + ..., title="AgentMessageDeltaEventMsgType" + ) + + +class AgentReasoningEventMsgType(RootModel[Literal["agent_reasoning"]]): + root: Literal["agent_reasoning"] = Field(..., title="AgentReasoningEventMsgType") + + +class AgentReasoningEventMsg(BaseModel): + text: str + type: AgentReasoningEventMsgType = Field(..., title="AgentReasoningEventMsgType") + + +class AgentReasoningDeltaEventMsgType(RootModel[Literal["agent_reasoning_delta"]]): + root: Literal["agent_reasoning_delta"] = Field( + ..., title="AgentReasoningDeltaEventMsgType" + ) + + +class AgentReasoningDeltaEventMsg(BaseModel): + delta: str + type: AgentReasoningDeltaEventMsgType = Field( + ..., title="AgentReasoningDeltaEventMsgType" + ) + + +class AgentReasoningRawContentEventMsgType( + RootModel[Literal["agent_reasoning_raw_content"]] +): + root: Literal["agent_reasoning_raw_content"] = Field( + ..., title="AgentReasoningRawContentEventMsgType" + ) + + +class AgentReasoningRawContentEventMsg(BaseModel): + text: str + type: AgentReasoningRawContentEventMsgType = Field( + ..., title="AgentReasoningRawContentEventMsgType" + ) + + +class AgentReasoningRawContentDeltaEventMsgType( + RootModel[Literal["agent_reasoning_raw_content_delta"]] +): + root: Literal["agent_reasoning_raw_content_delta"] = Field( + ..., title="AgentReasoningRawContentDeltaEventMsgType" + ) + + +class AgentReasoningRawContentDeltaEventMsg(BaseModel): + delta: str + type: AgentReasoningRawContentDeltaEventMsgType = Field( + ..., title="AgentReasoningRawContentDeltaEventMsgType" + ) + + +class AgentReasoningSectionBreakEventMsgType( + RootModel[Literal["agent_reasoning_section_break"]] +): + root: Literal["agent_reasoning_section_break"] = Field( + ..., title="AgentReasoningSectionBreakEventMsgType" + ) + + +class AgentReasoningSectionBreakEventMsg(BaseModel): + item_id: str | None = "" + summary_index: int | None = 0 + type: AgentReasoningSectionBreakEventMsgType = Field( + ..., title="AgentReasoningSectionBreakEventMsgType" + ) + + +class SessionConfiguredEventMsgType(RootModel[Literal["session_configured"]]): + root: Literal["session_configured"] = Field( + ..., title="SessionConfiguredEventMsgType" + ) + + +class ThreadNameUpdatedEventMsgType(RootModel[Literal["thread_name_updated"]]): + root: Literal["thread_name_updated"] = Field( + ..., title="ThreadNameUpdatedEventMsgType" + ) + + +class McpStartupUpdateEventMsgType(RootModel[Literal["mcp_startup_update"]]): + root: Literal["mcp_startup_update"] = Field( + ..., title="McpStartupUpdateEventMsgType" + ) + + +class McpStartupCompleteEventMsgType(RootModel[Literal["mcp_startup_complete"]]): + root: Literal["mcp_startup_complete"] = Field( + ..., title="McpStartupCompleteEventMsgType" + ) + + +class McpToolCallBeginEventMsgType(RootModel[Literal["mcp_tool_call_begin"]]): + root: Literal["mcp_tool_call_begin"] = Field( + ..., title="McpToolCallBeginEventMsgType" + ) + + +class McpToolCallEndEventMsgType(RootModel[Literal["mcp_tool_call_end"]]): + root: Literal["mcp_tool_call_end"] = Field(..., title="McpToolCallEndEventMsgType") + + +class WebSearchBeginEventMsgType(RootModel[Literal["web_search_begin"]]): + root: Literal["web_search_begin"] = Field(..., title="WebSearchBeginEventMsgType") + + +class WebSearchBeginEventMsg(BaseModel): + call_id: str + type: WebSearchBeginEventMsgType = Field(..., title="WebSearchBeginEventMsgType") + + +class WebSearchEndEventMsgType(RootModel[Literal["web_search_end"]]): + root: Literal["web_search_end"] = Field(..., title="WebSearchEndEventMsgType") + + +class ImageGenerationBeginEventMsgType(RootModel[Literal["image_generation_begin"]]): + root: Literal["image_generation_begin"] = Field( + ..., title="ImageGenerationBeginEventMsgType" + ) + + +class ImageGenerationBeginEventMsg(BaseModel): + call_id: str + type: ImageGenerationBeginEventMsgType = Field( + ..., title="ImageGenerationBeginEventMsgType" + ) + + +class ImageGenerationEndEventMsgType(RootModel[Literal["image_generation_end"]]): + root: Literal["image_generation_end"] = Field( + ..., title="ImageGenerationEndEventMsgType" + ) + + +class ImageGenerationEndEventMsg(BaseModel): + call_id: str + result: str + revised_prompt: str | None = None + saved_path: str | None = None + status: str + type: ImageGenerationEndEventMsgType = Field( + ..., title="ImageGenerationEndEventMsgType" + ) + + +class ExecCommandBeginEventMsgType(RootModel[Literal["exec_command_begin"]]): + root: Literal["exec_command_begin"] = Field( + ..., title="ExecCommandBeginEventMsgType" + ) + + +class ExecCommandOutputDeltaEventMsgType( + RootModel[Literal["exec_command_output_delta"]] +): + root: Literal["exec_command_output_delta"] = Field( + ..., title="ExecCommandOutputDeltaEventMsgType" + ) + + +class TerminalInteractionEventMsgType(RootModel[Literal["terminal_interaction"]]): + root: Literal["terminal_interaction"] = Field( + ..., title="TerminalInteractionEventMsgType" + ) + + +class TerminalInteractionEventMsg(BaseModel): + call_id: str = Field( + ..., description="Identifier for the ExecCommandBegin that produced this chunk." + ) + process_id: str = Field( + ..., description="Process id associated with the running command." + ) + stdin: str = Field(..., description="Stdin sent to the running session.") + type: TerminalInteractionEventMsgType = Field( + ..., title="TerminalInteractionEventMsgType" + ) + + +class ExecCommandEndEventMsgType(RootModel[Literal["exec_command_end"]]): + root: Literal["exec_command_end"] = Field(..., title="ExecCommandEndEventMsgType") + + +class ViewImageToolCallEventMsgType(RootModel[Literal["view_image_tool_call"]]): + root: Literal["view_image_tool_call"] = Field( + ..., title="ViewImageToolCallEventMsgType" + ) + + +class ViewImageToolCallEventMsg(BaseModel): + call_id: str = Field(..., description="Identifier for the originating tool call.") + path: str = Field(..., description="Local filesystem path provided to the tool.") + type: ViewImageToolCallEventMsgType = Field( + ..., title="ViewImageToolCallEventMsgType" + ) + + +class ExecApprovalRequestEventMsgType(RootModel[Literal["exec_approval_request"]]): + root: Literal["exec_approval_request"] = Field( + ..., title="ExecApprovalRequestEventMsgType" + ) + + +class RequestPermissionsEventMsgType(RootModel[Literal["request_permissions"]]): + root: Literal["request_permissions"] = Field( + ..., title="RequestPermissionsEventMsgType" + ) + + +class RequestUserInputEventMsgType(RootModel[Literal["request_user_input"]]): + root: Literal["request_user_input"] = Field( + ..., title="RequestUserInputEventMsgType" + ) + + +class DynamicToolCallRequestEventMsgType( + RootModel[Literal["dynamic_tool_call_request"]] +): + root: Literal["dynamic_tool_call_request"] = Field( + ..., title="DynamicToolCallRequestEventMsgType" + ) + + +class DynamicToolCallRequestEventMsg(BaseModel): + arguments: Any + call_id: str = Field(..., alias="callId") + tool: str + turn_id: str = Field(..., alias="turnId") + type: DynamicToolCallRequestEventMsgType = Field( + ..., title="DynamicToolCallRequestEventMsgType" + ) + + +class DynamicToolCallResponseEventMsgType( + RootModel[Literal["dynamic_tool_call_response"]] +): + root: Literal["dynamic_tool_call_response"] = Field( + ..., title="DynamicToolCallResponseEventMsgType" + ) + + +class DynamicToolCallResponseEventMsg(BaseModel): + arguments: Any = Field(..., description="Dynamic tool call arguments.") + call_id: str = Field( + ..., description="Identifier for the corresponding DynamicToolCallRequest." + ) + content_items: list[DynamicToolCallOutputContentItem] = Field( + ..., description="Dynamic tool response content items." + ) + duration: Duration = Field( + ..., description="The duration of the dynamic tool call." + ) + error: str | None = Field( + default=None, + description="Optional error text when the tool call failed before producing a response.", + ) + success: bool = Field(..., description="Whether the tool call succeeded.") + tool: str = Field(..., description="Dynamic tool name.") + turn_id: str = Field( + ..., description="Turn ID that this dynamic tool call belongs to." + ) + type: DynamicToolCallResponseEventMsgType = Field( + ..., title="DynamicToolCallResponseEventMsgType" + ) + + +class ElicitationRequestEventMsgType(RootModel[Literal["elicitation_request"]]): + root: Literal["elicitation_request"] = Field( + ..., title="ElicitationRequestEventMsgType" + ) + + +class ApplyPatchApprovalRequestEventMsgType( + RootModel[Literal["apply_patch_approval_request"]] +): + root: Literal["apply_patch_approval_request"] = Field( + ..., title="ApplyPatchApprovalRequestEventMsgType" + ) + + +class DeprecationNoticeEventMsgType(RootModel[Literal["deprecation_notice"]]): + root: Literal["deprecation_notice"] = Field( + ..., title="DeprecationNoticeEventMsgType" + ) + + +class DeprecationNoticeEventMsg(BaseModel): + details: str | None = Field( + default=None, + description="Optional extra guidance, such as migration steps or rationale.", + ) + summary: str = Field(..., description="Concise summary of what is deprecated.") + type: DeprecationNoticeEventMsgType = Field( + ..., title="DeprecationNoticeEventMsgType" + ) + + +class BackgroundEventEventMsgType(RootModel[Literal["background_event"]]): + root: Literal["background_event"] = Field(..., title="BackgroundEventEventMsgType") + + +class BackgroundEventEventMsg(BaseModel): + message: str + type: BackgroundEventEventMsgType = Field(..., title="BackgroundEventEventMsgType") + + +class UndoStartedEventMsgType(RootModel[Literal["undo_started"]]): + root: Literal["undo_started"] = Field(..., title="UndoStartedEventMsgType") + + +class UndoStartedEventMsg(BaseModel): + message: str | None = None + type: UndoStartedEventMsgType = Field(..., title="UndoStartedEventMsgType") + + +class UndoCompletedEventMsgType(RootModel[Literal["undo_completed"]]): + root: Literal["undo_completed"] = Field(..., title="UndoCompletedEventMsgType") + + +class UndoCompletedEventMsg(BaseModel): + message: str | None = None + success: bool + type: UndoCompletedEventMsgType = Field(..., title="UndoCompletedEventMsgType") + + +class StreamErrorEventMsgType(RootModel[Literal["stream_error"]]): + root: Literal["stream_error"] = Field(..., title="StreamErrorEventMsgType") + + +class StreamErrorEventMsg(BaseModel): + additional_details: str | None = Field( + default=None, + description="Optional details about the underlying stream failure (often the same human-readable message that is surfaced as the terminal error if retries are exhausted).", + ) + codex_error_info: CodexErrorInfo | None = None + message: str + type: StreamErrorEventMsgType = Field(..., title="StreamErrorEventMsgType") + + +class PatchApplyBeginEventMsgType(RootModel[Literal["patch_apply_begin"]]): + root: Literal["patch_apply_begin"] = Field(..., title="PatchApplyBeginEventMsgType") + + +class PatchApplyEndEventMsgType(RootModel[Literal["patch_apply_end"]]): + root: Literal["patch_apply_end"] = Field(..., title="PatchApplyEndEventMsgType") + + +class TurnDiffEventMsgType(RootModel[Literal["turn_diff"]]): + root: Literal["turn_diff"] = Field(..., title="TurnDiffEventMsgType") + + +class TurnDiffEventMsg(BaseModel): + type: TurnDiffEventMsgType = Field(..., title="TurnDiffEventMsgType") + unified_diff: str + + +class GetHistoryEntryResponseEventMsgType( + RootModel[Literal["get_history_entry_response"]] +): + root: Literal["get_history_entry_response"] = Field( + ..., title="GetHistoryEntryResponseEventMsgType" + ) + + +class McpListToolsResponseEventMsgType(RootModel[Literal["mcp_list_tools_response"]]): + root: Literal["mcp_list_tools_response"] = Field( + ..., title="McpListToolsResponseEventMsgType" + ) + + +class ListCustomPromptsResponseEventMsgType( + RootModel[Literal["list_custom_prompts_response"]] +): + root: Literal["list_custom_prompts_response"] = Field( + ..., title="ListCustomPromptsResponseEventMsgType" + ) + + +class ListCustomPromptsResponseEventMsg(BaseModel): + custom_prompts: list[CustomPrompt] + type: ListCustomPromptsResponseEventMsgType = Field( + ..., title="ListCustomPromptsResponseEventMsgType" + ) + + +class ListSkillsResponseEventMsgType(RootModel[Literal["list_skills_response"]]): + root: Literal["list_skills_response"] = Field( + ..., title="ListSkillsResponseEventMsgType" + ) + + +class ListRemoteSkillsResponseEventMsgType( + RootModel[Literal["list_remote_skills_response"]] +): + root: Literal["list_remote_skills_response"] = Field( + ..., title="ListRemoteSkillsResponseEventMsgType" + ) + + +class RemoteSkillDownloadedEventMsgType(RootModel[Literal["remote_skill_downloaded"]]): + root: Literal["remote_skill_downloaded"] = Field( + ..., title="RemoteSkillDownloadedEventMsgType" + ) + + +class RemoteSkillDownloadedEventMsg(BaseModel): + id: str + name: str + path: str + type: RemoteSkillDownloadedEventMsgType = Field( + ..., title="RemoteSkillDownloadedEventMsgType" + ) + + +class SkillsUpdateAvailableEventMsgType(RootModel[Literal["skills_update_available"]]): + root: Literal["skills_update_available"] = Field( + ..., title="SkillsUpdateAvailableEventMsgType" + ) + + +class SkillsUpdateAvailableEventMsg(BaseModel): + type: SkillsUpdateAvailableEventMsgType = Field( + ..., title="SkillsUpdateAvailableEventMsgType" + ) + + +class PlanUpdateEventMsgType(RootModel[Literal["plan_update"]]): + root: Literal["plan_update"] = Field(..., title="PlanUpdateEventMsgType") + + +class TurnAbortedEventMsgType(RootModel[Literal["turn_aborted"]]): + root: Literal["turn_aborted"] = Field(..., title="TurnAbortedEventMsgType") + + +class ShutdownCompleteEventMsgType(RootModel[Literal["shutdown_complete"]]): + root: Literal["shutdown_complete"] = Field( + ..., title="ShutdownCompleteEventMsgType" + ) + + +class ShutdownCompleteEventMsg(BaseModel): + type: ShutdownCompleteEventMsgType = Field( + ..., title="ShutdownCompleteEventMsgType" + ) + + +class EnteredReviewModeEventMsgType(RootModel[Literal["entered_review_mode"]]): + root: Literal["entered_review_mode"] = Field( + ..., title="EnteredReviewModeEventMsgType" + ) + + +class ExitedReviewModeEventMsgType(RootModel[Literal["exited_review_mode"]]): + root: Literal["exited_review_mode"] = Field( + ..., title="ExitedReviewModeEventMsgType" + ) + + +class RawResponseItemEventMsgType(RootModel[Literal["raw_response_item"]]): + root: Literal["raw_response_item"] = Field(..., title="RawResponseItemEventMsgType") + + +class ItemStartedEventMsgType(RootModel[Literal["item_started"]]): + root: Literal["item_started"] = Field(..., title="ItemStartedEventMsgType") + + +class ItemCompletedEventMsgType(RootModel[Literal["item_completed"]]): + root: Literal["item_completed"] = Field(..., title="ItemCompletedEventMsgType") + + +class AgentMessageContentDeltaEventMsgType( + RootModel[Literal["agent_message_content_delta"]] +): + root: Literal["agent_message_content_delta"] = Field( + ..., title="AgentMessageContentDeltaEventMsgType" + ) + + +class AgentMessageContentDeltaEventMsg(BaseModel): + delta: str + item_id: str + thread_id: str + turn_id: str + type: AgentMessageContentDeltaEventMsgType = Field( + ..., title="AgentMessageContentDeltaEventMsgType" + ) + + +class PlanDeltaEventMsgType(RootModel[Literal["plan_delta"]]): + root: Literal["plan_delta"] = Field(..., title="PlanDeltaEventMsgType") + + +class PlanDeltaEventMsg(BaseModel): + delta: str + item_id: str + thread_id: str + turn_id: str + type: PlanDeltaEventMsgType = Field(..., title="PlanDeltaEventMsgType") + + +class ReasoningContentDeltaEventMsgType(RootModel[Literal["reasoning_content_delta"]]): + root: Literal["reasoning_content_delta"] = Field( + ..., title="ReasoningContentDeltaEventMsgType" + ) + + +class ReasoningContentDeltaEventMsg(BaseModel): + delta: str + item_id: str + summary_index: int | None = 0 + thread_id: str + turn_id: str + type: ReasoningContentDeltaEventMsgType = Field( + ..., title="ReasoningContentDeltaEventMsgType" + ) + + +class ReasoningRawContentDeltaEventMsgType( + RootModel[Literal["reasoning_raw_content_delta"]] +): + root: Literal["reasoning_raw_content_delta"] = Field( + ..., title="ReasoningRawContentDeltaEventMsgType" + ) + + +class ReasoningRawContentDeltaEventMsg(BaseModel): + content_index: int | None = 0 + delta: str + item_id: str + thread_id: str + turn_id: str + type: ReasoningRawContentDeltaEventMsgType = Field( + ..., title="ReasoningRawContentDeltaEventMsgType" + ) + + +class CollabAgentSpawnBeginEventMsgType(RootModel[Literal["collab_agent_spawn_begin"]]): + root: Literal["collab_agent_spawn_begin"] = Field( + ..., title="CollabAgentSpawnBeginEventMsgType" + ) + + +class CollabAgentSpawnEndEventMsgType(RootModel[Literal["collab_agent_spawn_end"]]): + root: Literal["collab_agent_spawn_end"] = Field( + ..., title="CollabAgentSpawnEndEventMsgType" + ) + + +class CollabAgentInteractionBeginEventMsgType( + RootModel[Literal["collab_agent_interaction_begin"]] +): + root: Literal["collab_agent_interaction_begin"] = Field( + ..., title="CollabAgentInteractionBeginEventMsgType" + ) + + +class CollabAgentInteractionEndEventMsgType( + RootModel[Literal["collab_agent_interaction_end"]] +): + root: Literal["collab_agent_interaction_end"] = Field( + ..., title="CollabAgentInteractionEndEventMsgType" + ) + + +class CollabWaitingBeginEventMsgType(RootModel[Literal["collab_waiting_begin"]]): + root: Literal["collab_waiting_begin"] = Field( + ..., title="CollabWaitingBeginEventMsgType" + ) + + +class CollabWaitingEndEventMsgType(RootModel[Literal["collab_waiting_end"]]): + root: Literal["collab_waiting_end"] = Field( + ..., title="CollabWaitingEndEventMsgType" + ) + + +class CollabCloseBeginEventMsgType(RootModel[Literal["collab_close_begin"]]): + root: Literal["collab_close_begin"] = Field( + ..., title="CollabCloseBeginEventMsgType" + ) + + +class CollabCloseEndEventMsgType(RootModel[Literal["collab_close_end"]]): + root: Literal["collab_close_end"] = Field(..., title="CollabCloseEndEventMsgType") + + +class CollabResumeBeginEventMsgType(RootModel[Literal["collab_resume_begin"]]): + root: Literal["collab_resume_begin"] = Field( + ..., title="CollabResumeBeginEventMsgType" + ) + + +class CollabResumeEndEventMsgType(RootModel[Literal["collab_resume_end"]]): + root: Literal["collab_resume_end"] = Field(..., title="CollabResumeEndEventMsgType") + + +class ExecApprovalRequestSkillMetadata(BaseModel): + path_to_skills_md: str + + +class ExecCommandSource(StrEnum): + agent = "agent" + user_shell = "user_shell" + unified_exec_startup = "unified_exec_startup" + unified_exec_interaction = "unified_exec_interaction" + + +class ExecCommandStatus(StrEnum): + completed = "completed" + failed = "failed" + declined = "declined" + + +class ExecOutputStream(StrEnum): + stdout = "stdout" + stderr = "stderr" + + +class ExperimentalFeatureListParams(BaseModel): + cursor: str | None = Field( + default=None, + description="Opaque pagination cursor returned by a previous call.", + ) + limit: int | None = Field( + default=None, + description="Optional page size; defaults to a reasonable server-side value.", + ge=0, + ) + + +class ExperimentalFeatureStage( + RootModel[ + Literal["beta"] + | Literal["underDevelopment"] + | Literal["stable"] + | Literal["deprecated"] + | Literal["removed"] + ] +): + root: ( + Literal["beta"] + | Literal["underDevelopment"] + | Literal["stable"] + | Literal["deprecated"] + | Literal["removed"] + ) + + +class ExternalAgentConfigDetectParams(BaseModel): + cwds: list[str] | None = Field( + default=None, + description="Zero or more working directories to include for repo-scoped detection.", + ) + include_home: bool | None = Field( + default=None, + alias="includeHome", + description="If true, include detection under the user's home (~/.claude, ~/.codex, etc.).", + ) + + +class ExternalAgentConfigImportResponse(BaseModel): + pass + + +class ExternalAgentConfigMigrationItemType(StrEnum): + agents_md = "AGENTS_MD" + config = "CONFIG" + skills = "SKILLS" + mcp_server_config = "MCP_SERVER_CONFIG" + + +class FeedbackUploadParams(BaseModel): + classification: str + extra_log_files: list[str] | None = Field(default=None, alias="extraLogFiles") + include_logs: bool = Field(..., alias="includeLogs") + reason: str | None = None + thread_id: str | None = Field(default=None, alias="threadId") + + +class FeedbackUploadResponse(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class AddFileChangeType(RootModel[Literal["add"]]): + root: Literal["add"] = Field(..., title="AddFileChangeType") class AddFileChange(BaseModel): content: str - type: AddFileChangeType = Field(..., title='AddFileChangeType') + type: AddFileChangeType = Field(..., title="AddFileChangeType") -class DeleteFileChangeType(RootModel[Literal['delete']]): - root: Literal['delete'] = Field(..., title='DeleteFileChangeType') +class DeleteFileChangeType(RootModel[Literal["delete"]]): + root: Literal["delete"] = Field(..., title="DeleteFileChangeType") class DeleteFileChange(BaseModel): content: str - type: DeleteFileChangeType = Field(..., title='DeleteFileChangeType') + type: DeleteFileChangeType = Field(..., title="DeleteFileChangeType") -class UpdateFileChangeType(RootModel[Literal['update']]): - root: Literal['update'] = Field(..., title='UpdateFileChangeType') +class UpdateFileChangeType(RootModel[Literal["update"]]): + root: Literal["update"] = Field(..., title="UpdateFileChangeType") class UpdateFileChange(BaseModel): move_path: str | None = None - type: UpdateFileChangeType = Field(..., title='UpdateFileChangeType') + type: UpdateFileChangeType = Field(..., title="UpdateFileChangeType") unified_diff: str @@ -3180,22 +1840,46 @@ class FileChange(RootModel[AddFileChange | DeleteFileChange | UpdateFileChange]) root: AddFileChange | DeleteFileChange | UpdateFileChange -class MacOsPreferencesPermission(StrEnum): - none = 'none' - read_only = 'read_only' - read_write = 'read_write' +class FileChangeOutputDeltaNotification(BaseModel): + delta: str + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") -class McpStartupFailure(BaseModel): - error: str - server: str +class FileSystemPermissions(BaseModel): + read: list[AbsolutePathBuf] | None = None + write: list[AbsolutePathBuf] | None = None -class RealtimeHandoffRequested(BaseModel): - handoff_id: str - input_transcript: str - item_id: str - messages: list[RealtimeHandoffMessage] +class ForcedLoginMethod(StrEnum): + chatgpt = "chatgpt" + api = "api" + + +class InputTextFunctionCallOutputContentItemType(RootModel[Literal["input_text"]]): + root: Literal["input_text"] = Field( + ..., title="InputTextFunctionCallOutputContentItemType" + ) + + +class InputTextFunctionCallOutputContentItem(BaseModel): + text: str + type: InputTextFunctionCallOutputContentItemType = Field( + ..., title="InputTextFunctionCallOutputContentItemType" + ) + + +class InputImageFunctionCallOutputContentItemType(RootModel[Literal["input_image"]]): + root: Literal["input_image"] = Field( + ..., title="InputImageFunctionCallOutputContentItemType" + ) + + +class FuzzyFileSearchParams(BaseModel): + cancellation_token: str | None = Field(default=None, alias="cancellationToken") + query: str + roots: list[str] class Indice(RootModel[int]): @@ -3210,9 +1894,42 @@ class FuzzyFileSearchResult(BaseModel): score: int = Field(..., ge=0) -class FileSystemPermissions(BaseModel): - read: list[AbsolutePathBuf] | None = None - write: list[AbsolutePathBuf] | None = None +class FuzzyFileSearchSessionCompletedNotification(BaseModel): + session_id: str = Field(..., alias="sessionId") + + +class FuzzyFileSearchSessionUpdatedNotification(BaseModel): + files: list[FuzzyFileSearchResult] + query: str + session_id: str = Field(..., alias="sessionId") + + +class GetAccountParams(BaseModel): + refresh_token: bool | None = Field( + default=False, + alias="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`.", + ) + + +class GhostCommit(BaseModel): + id: str + parent: str | None = None + preexisting_untracked_dirs: list[str] + preexisting_untracked_files: list[str] + + +class GitInfo(BaseModel): + branch: str | None = None + origin_url: str | None = Field(default=None, alias="originUrl") + sha: str | None = None + + +class HazelnutScope(StrEnum): + example = "example" + workspace_shared = "workspace-shared" + all_shared = "all-shared" + personal = "personal" class HistoryEntry(BaseModel): @@ -3221,164 +1938,284 @@ class HistoryEntry(BaseModel): ts: int = Field(..., ge=0) -class CompletedAgentStatus(BaseModel): - model_config = ConfigDict( - extra='forbid', +class ImageDetail(StrEnum): + auto = "auto" + low = "low" + high = "high" + original = "original" + + +class InitializeCapabilities(BaseModel): + experimental_api: bool | None = Field( + default=False, + alias="experimentalApi", + description="Opt into receiving experimental API methods and fields.", ) - completed: str | None - - -class ErroredAgentStatus(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - errored: str - - -class AgentStatus( - RootModel[ - Literal['pending_init'] - | Literal['running'] - | CompletedAgentStatus - | ErroredAgentStatus - | Literal['shutdown'] - | Literal['not_found'] - ] -): - root: ( - Literal['pending_init'] - | Literal['running'] - | CompletedAgentStatus - | ErroredAgentStatus - | Literal['shutdown'] - | Literal['not_found'] - ) = Field(..., description='Agent lifecycle status, derived from emitted events.') - - -class UserMessageTurnItemType(RootModel[Literal['UserMessage']]): - root: Literal['UserMessage'] = Field(..., title='UserMessageTurnItemType') - - -class UserMessageTurnItem(BaseModel): - content: list[UserInput] - id: str - type: UserMessageTurnItemType = Field(..., title='UserMessageTurnItemType') - - -class AgentMessageTurnItemType(RootModel[Literal['AgentMessage']]): - root: Literal['AgentMessage'] = Field(..., title='AgentMessageTurnItemType') - - -class AgentMessageTurnItem(BaseModel): - content: list[AgentMessageContent] - id: str - phase: MessagePhase | None = Field( + opt_out_notification_methods: list[str] | None = Field( default=None, - description='Optional phase metadata carried through from `ResponseItem::Message`.\n\nThis is currently used by TUI rendering to distinguish mid-turn commentary from a final answer and avoid status-indicator jitter.', - ) - type: AgentMessageTurnItemType = Field(..., title='AgentMessageTurnItemType') - - -class PlanTurnItemType(RootModel[Literal['Plan']]): - root: Literal['Plan'] = Field(..., title='PlanTurnItemType') - - -class PlanTurnItem(BaseModel): - id: str - text: str - type: PlanTurnItemType = Field(..., title='PlanTurnItemType') - - -class ReasoningTurnItemType(RootModel[Literal['Reasoning']]): - root: Literal['Reasoning'] = Field(..., title='ReasoningTurnItemType') - - -class ReasoningTurnItem(BaseModel): - id: str - raw_content: list[str] | None = [] - summary_text: list[str] - type: ReasoningTurnItemType = Field(..., title='ReasoningTurnItemType') - - -class WebSearchTurnItemType(RootModel[Literal['WebSearch']]): - root: Literal['WebSearch'] = Field(..., title='WebSearchTurnItemType') - - -class WebSearchTurnItem(BaseModel): - action: ResponsesApiWebSearchAction - id: str - query: str - type: WebSearchTurnItemType = Field(..., title='WebSearchTurnItemType') - - -class ImageGenerationTurnItemType(RootModel[Literal['ImageGeneration']]): - root: Literal['ImageGeneration'] = Field(..., title='ImageGenerationTurnItemType') - - -class ImageGenerationTurnItem(BaseModel): - id: str - result: str - revised_prompt: str | None = None - saved_path: str | None = None - status: str - type: ImageGenerationTurnItemType = Field(..., title='ImageGenerationTurnItemType') - - -class ContextCompactionTurnItemType(RootModel[Literal['ContextCompaction']]): - root: Literal['ContextCompaction'] = Field( - ..., title='ContextCompactionTurnItemType' + alias="optOutNotificationMethods", + description="Exact notification method names that should be suppressed for this connection (for example `codex/event/session_configured`).", ) -class ContextCompactionTurnItem(BaseModel): - id: str - type: ContextCompactionTurnItemType = Field( - ..., title='ContextCompactionTurnItemType' +class InitializeParams(BaseModel): + capabilities: InitializeCapabilities | None = None + client_info: ClientInfo = Field(..., alias="clientInfo") + + +class InputModality(RootModel[Literal["text"] | Literal["image"]]): + root: Literal["text"] | Literal["image"] = Field( + ..., description="Canonical user-input modality tags advertised by a model." ) -class TurnItem( +class ListMcpServerStatusParams(BaseModel): + cursor: str | None = Field( + default=None, + description="Opaque pagination cursor returned by a previous call.", + ) + limit: int | None = Field( + default=None, + description="Optional page size; defaults to a server-defined value.", + ge=0, + ) + + +class ExecLocalShellActionType(RootModel[Literal["exec"]]): + root: Literal["exec"] = Field(..., title="ExecLocalShellActionType") + + +class ExecLocalShellAction(BaseModel): + command: list[str] + env: dict[str, Any] | None = None + timeout_ms: int | None = Field(default=None, ge=0) + type: ExecLocalShellActionType = Field(..., title="ExecLocalShellActionType") + user: str | None = None + working_directory: str | None = None + + +class LocalShellAction(RootModel[ExecLocalShellAction]): + root: ExecLocalShellAction + + +class LocalShellStatus(StrEnum): + completed = "completed" + in_progress = "in_progress" + incomplete = "incomplete" + + +class ApiKeyv2LoginAccountParamsType(RootModel[Literal["apiKey"]]): + root: Literal["apiKey"] = Field(..., title="ApiKeyv2::LoginAccountParamsType") + + +class ApiKeyv2LoginAccountParams(BaseModel): + api_key: str = Field(..., alias="apiKey") + type: ApiKeyv2LoginAccountParamsType = Field( + ..., title="ApiKeyv2::LoginAccountParamsType" + ) + + +class Chatgptv2LoginAccountParamsType(RootModel[Literal["chatgpt"]]): + root: Literal["chatgpt"] = Field(..., title="Chatgptv2::LoginAccountParamsType") + + +class Chatgptv2LoginAccountParams(BaseModel): + type: Chatgptv2LoginAccountParamsType = Field( + ..., title="Chatgptv2::LoginAccountParamsType" + ) + + +class ChatgptAuthTokensv2LoginAccountParamsType( + RootModel[Literal["chatgptAuthTokens"]] +): + root: Literal["chatgptAuthTokens"] = Field( + ..., title="ChatgptAuthTokensv2::LoginAccountParamsType" + ) + + +class ChatgptAuthTokensv2LoginAccountParams(BaseModel): + access_token: str = Field( + ..., + alias="accessToken", + description="Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.", + ) + chatgpt_account_id: str = Field( + ..., + alias="chatgptAccountId", + description="Workspace/account identifier supplied by the client.", + ) + chatgpt_plan_type: str | None = Field( + default=None, + alias="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: ChatgptAuthTokensv2LoginAccountParamsType = Field( + ..., title="ChatgptAuthTokensv2::LoginAccountParamsType" + ) + + +class LoginAccountParams( RootModel[ - UserMessageTurnItem - | AgentMessageTurnItem - | PlanTurnItem - | ReasoningTurnItem - | WebSearchTurnItem - | ImageGenerationTurnItem - | ContextCompactionTurnItem + ApiKeyv2LoginAccountParams + | Chatgptv2LoginAccountParams + | ChatgptAuthTokensv2LoginAccountParams ] ): root: ( - UserMessageTurnItem - | AgentMessageTurnItem - | PlanTurnItem - | ReasoningTurnItem - | WebSearchTurnItem - | ImageGenerationTurnItem - | ContextCompactionTurnItem + ApiKeyv2LoginAccountParams + | Chatgptv2LoginAccountParams + | ChatgptAuthTokensv2LoginAccountParams + ) = Field(..., title="LoginAccountParams") + + +class ApiKeyv2LoginAccountResponseType(RootModel[Literal["apiKey"]]): + root: Literal["apiKey"] = Field(..., title="ApiKeyv2::LoginAccountResponseType") + + +class ApiKeyv2LoginAccountResponse(BaseModel): + type: ApiKeyv2LoginAccountResponseType = Field( + ..., title="ApiKeyv2::LoginAccountResponseType" ) -class SessionNetworkProxyRuntime(BaseModel): - http_addr: str - socks_addr: str +class Chatgptv2LoginAccountResponseType(RootModel[Literal["chatgpt"]]): + root: Literal["chatgpt"] = Field(..., title="Chatgptv2::LoginAccountResponseType") + + +class Chatgptv2LoginAccountResponse(BaseModel): + auth_url: str = Field( + ..., + alias="authUrl", + description="URL the client should open in a browser to initiate the OAuth flow.", + ) + login_id: str = Field(..., alias="loginId") + type: Chatgptv2LoginAccountResponseType = Field( + ..., title="Chatgptv2::LoginAccountResponseType" + ) + + +class ChatgptAuthTokensv2LoginAccountResponseType( + RootModel[Literal["chatgptAuthTokens"]] +): + root: Literal["chatgptAuthTokens"] = Field( + ..., title="ChatgptAuthTokensv2::LoginAccountResponseType" + ) + + +class ChatgptAuthTokensv2LoginAccountResponse(BaseModel): + type: ChatgptAuthTokensv2LoginAccountResponseType = Field( + ..., title="ChatgptAuthTokensv2::LoginAccountResponseType" + ) + + +class LoginAccountResponse( + RootModel[ + ApiKeyv2LoginAccountResponse + | Chatgptv2LoginAccountResponse + | ChatgptAuthTokensv2LoginAccountResponse + ] +): + root: ( + ApiKeyv2LoginAccountResponse + | Chatgptv2LoginAccountResponse + | ChatgptAuthTokensv2LoginAccountResponse + ) = Field(..., title="LoginAccountResponse") + + +class LogoutAccountResponse(BaseModel): + pass + + +class MacOsAutomationPermission1(StrEnum): + none = "none" + all = "all" + + +class BundleIdsMacOsAutomationPermission(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + bundle_ids: list[str] + + +class MacOsAutomationPermission( + RootModel[MacOsAutomationPermission1 | BundleIdsMacOsAutomationPermission] +): + root: MacOsAutomationPermission1 | BundleIdsMacOsAutomationPermission + + +class MacOsPreferencesPermission(StrEnum): + none = "none" + read_only = "read_only" + read_write = "read_write" + + +class MacOsSeatbeltProfileExtensions(BaseModel): + macos_accessibility: bool | None = False + macos_automation: MacOsAutomationPermission | None = Field( + default_factory=lambda: MacOsAutomationPermission("none") + ) + macos_calendar: bool | None = False + macos_preferences: MacOsPreferencesPermission | None = "read_only" + + +class McpAuthStatus(StrEnum): + unsupported = "unsupported" + not_logged_in = "notLoggedIn" + bearer_token = "bearerToken" + o_auth = "oAuth" + + +class McpInvocation(BaseModel): + arguments: Any | None = Field( + default=None, description="Arguments to the tool call." + ) + server: str = Field( + ..., description="Name of the MCP server as defined in the config." + ) + tool: str = Field(..., description="Name of the tool as given by the MCP server.") + + +class McpServerOauthLoginCompletedNotification(BaseModel): + error: str | None = None + name: str + success: bool + + +class McpServerOauthLoginParams(BaseModel): + name: str + scopes: list[str] | None = None + timeout_secs: int | None = Field(default=None, alias="timeoutSecs") + + +class McpServerOauthLoginResponse(BaseModel): + authorization_url: str = Field(..., alias="authorizationUrl") + + +class McpServerRefreshResponse(BaseModel): + pass + + +class McpStartupFailure(BaseModel): + error: str + server: str class StartingMcpStartupStatus(BaseModel): - state: Literal['starting'] + state: Literal["starting"] class ReadyMcpStartupStatus(BaseModel): - state: Literal['ready'] + state: Literal["ready"] class McpStartupStatus1(BaseModel): error: str - state: Literal['failed'] + state: Literal["failed"] class CancelledMcpStartupStatus(BaseModel): - state: Literal['cancelled'] + state: Literal["cancelled"] class McpStartupStatus( @@ -3397,21 +2234,522 @@ class McpStartupStatus( ) -class FuzzyFileSearchSessionCompletedNotification(BaseModel): - session_id: str = Field(..., alias='sessionId') +class McpToolCallError(BaseModel): + message: str -class CollabAgentStatusEntry(BaseModel): - agent_nickname: str | None = Field( - default=None, - description='Optional nickname assigned to an AgentControl-spawned sub-agent.', +class McpToolCallProgressNotification(BaseModel): + item_id: str = Field(..., alias="itemId") + message: str + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class McpToolCallResult(BaseModel): + content: list[Any] + structured_content: Any | None = Field(None, alias="structuredContent") + + +class McpToolCallStatus(StrEnum): + in_progress = "inProgress" + completed = "completed" + failed = "failed" + + +class MergeStrategy(StrEnum): + replace = "replace" + upsert = "upsert" + + +class MessagePhase(RootModel[Literal["commentary"] | Literal["final_answer"]]): + root: Literal["commentary"] | Literal["final_answer"] = Field( + ..., + 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.', ) - agent_role: str | None = Field( + + +class ModeKind(StrEnum): + plan = "plan" + default = "default" + + +class ModelAvailabilityNux(BaseModel): + message: str + + +class ModelListParams(BaseModel): + cursor: str | None = Field( default=None, - description='Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.', + description="Opaque pagination cursor returned by a previous call.", ) - status: AgentStatus = Field(..., description='Last known status of the agent.') - thread_id: ThreadId = Field(..., description='Thread ID of the receiver/new agent.') + include_hidden: bool | None = Field( + default=None, + alias="includeHidden", + description="When true, include models that are hidden from the default picker list.", + ) + limit: int | None = Field( + default=None, + description="Optional page size; defaults to a reasonable server-side value.", + ge=0, + ) + + +class ModelRerouteReason(RootModel[Literal["highRiskCyberActivity"]]): + root: Literal["highRiskCyberActivity"] + + +class ModelReroutedNotification(BaseModel): + from_model: str = Field(..., alias="fromModel") + reason: ModelRerouteReason + thread_id: str = Field(..., alias="threadId") + to_model: str = Field(..., alias="toModel") + turn_id: str = Field(..., alias="turnId") + + +class ModelUpgradeInfo(BaseModel): + migration_markdown: str | None = Field(default=None, alias="migrationMarkdown") + model: str + model_link: str | None = Field(default=None, alias="modelLink") + upgrade_copy: str | None = Field(default=None, alias="upgradeCopy") + + +class NetworkAccess(StrEnum): + restricted = "restricted" + enabled = "enabled" + + +class NetworkApprovalProtocol(StrEnum): + http = "http" + https = "https" + socks5_tcp = "socks5Tcp" + socks5_udp = "socks5Udp" + + +class NetworkPermissions(BaseModel): + enabled: bool | None = None + + +class NetworkPolicyRuleAction(StrEnum): + allow = "allow" + deny = "deny" + + +class NetworkRequirements(BaseModel): + allow_local_binding: bool | None = Field(default=None, alias="allowLocalBinding") + allow_unix_sockets: list[str] | None = Field(default=None, alias="allowUnixSockets") + allow_upstream_proxy: bool | None = Field(default=None, alias="allowUpstreamProxy") + allowed_domains: list[str] | None = Field(default=None, alias="allowedDomains") + dangerously_allow_all_unix_sockets: bool | None = Field( + default=None, alias="dangerouslyAllowAllUnixSockets" + ) + dangerously_allow_non_loopback_proxy: bool | None = Field( + default=None, alias="dangerouslyAllowNonLoopbackProxy" + ) + denied_domains: list[str] | None = Field(default=None, alias="deniedDomains") + enabled: bool | None = None + http_port: int | None = Field(default=None, alias="httpPort", ge=0) + socks_port: int | None = Field(default=None, alias="socksPort", ge=0) + + +class ReadParsedCommandType(RootModel[Literal["read"]]): + root: Literal["read"] = Field(..., title="ReadParsedCommandType") + + +class ReadParsedCommand(BaseModel): + cmd: str + name: str + path: str = Field( + ..., + description="(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path.", + ) + type: ReadParsedCommandType = Field(..., title="ReadParsedCommandType") + + +class ListFilesParsedCommandType(RootModel[Literal["list_files"]]): + root: Literal["list_files"] = Field(..., title="ListFilesParsedCommandType") + + +class ListFilesParsedCommand(BaseModel): + cmd: str + path: str | None = None + type: ListFilesParsedCommandType = Field(..., title="ListFilesParsedCommandType") + + +class SearchParsedCommandType(RootModel[Literal["search"]]): + root: Literal["search"] = Field(..., title="SearchParsedCommandType") + + +class SearchParsedCommand(BaseModel): + cmd: str + path: str | None = None + query: str | None = None + type: SearchParsedCommandType = Field(..., title="SearchParsedCommandType") + + +class UnknownParsedCommandType(RootModel[Literal["unknown"]]): + root: Literal["unknown"] = Field(..., title="UnknownParsedCommandType") + + +class UnknownParsedCommand(BaseModel): + cmd: str + type: UnknownParsedCommandType = Field(..., title="UnknownParsedCommandType") + + +class ParsedCommand( + RootModel[ + ReadParsedCommand + | ListFilesParsedCommand + | SearchParsedCommand + | UnknownParsedCommand + ] +): + root: ( + ReadParsedCommand + | ListFilesParsedCommand + | SearchParsedCommand + | UnknownParsedCommand + ) + + +class PatchApplyStatus(StrEnum): + in_progress = "inProgress" + completed = "completed" + failed = "failed" + declined = "declined" + + +class AddPatchChangeKindType(RootModel[Literal["add"]]): + root: Literal["add"] = Field(..., title="AddPatchChangeKindType") + + +class AddPatchChangeKind(BaseModel): + type: AddPatchChangeKindType = Field(..., title="AddPatchChangeKindType") + + +class DeletePatchChangeKindType(RootModel[Literal["delete"]]): + root: Literal["delete"] = Field(..., title="DeletePatchChangeKindType") + + +class DeletePatchChangeKind(BaseModel): + type: DeletePatchChangeKindType = Field(..., title="DeletePatchChangeKindType") + + +class UpdatePatchChangeKindType(RootModel[Literal["update"]]): + root: Literal["update"] = Field(..., title="UpdatePatchChangeKindType") + + +class UpdatePatchChangeKind(BaseModel): + move_path: str | None = None + type: UpdatePatchChangeKindType = Field(..., title="UpdatePatchChangeKindType") + + +class PatchChangeKind( + RootModel[AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind] +): + root: AddPatchChangeKind | DeletePatchChangeKind | UpdatePatchChangeKind + + +class PermissionProfile(BaseModel): + file_system: FileSystemPermissions | None = None + macos: MacOsSeatbeltProfileExtensions | None = None + network: NetworkPermissions | None = None + + +class Personality(StrEnum): + none = "none" + friendly = "friendly" + pragmatic = "pragmatic" + + +class PlanDeltaNotification(BaseModel): + delta: str + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class PlanType(StrEnum): + free = "free" + go = "go" + plus = "plus" + pro = "pro" + team = "team" + business = "business" + enterprise = "enterprise" + edu = "edu" + unknown = "unknown" + + +class PluginInstallParams(BaseModel): + marketplace_path: AbsolutePathBuf = Field(..., alias="marketplacePath") + plugin_name: str = Field(..., alias="pluginName") + + +class PluginInstallResponse(BaseModel): + apps_needing_auth: list[AppSummary] = Field(..., alias="appsNeedingAuth") + + +class PluginInterface(BaseModel): + brand_color: str | None = Field(default=None, alias="brandColor") + capabilities: list[str] + category: str | None = None + composer_icon: AbsolutePathBuf | None = Field(default=None, alias="composerIcon") + default_prompt: str | None = Field(default=None, alias="defaultPrompt") + developer_name: str | None = Field(default=None, alias="developerName") + display_name: str | None = Field(default=None, alias="displayName") + logo: AbsolutePathBuf | None = None + long_description: str | None = Field(default=None, alias="longDescription") + privacy_policy_url: str | None = Field(default=None, alias="privacyPolicyUrl") + screenshots: list[AbsolutePathBuf] + short_description: str | None = Field(default=None, alias="shortDescription") + terms_of_service_url: str | None = Field(default=None, alias="termsOfServiceUrl") + website_url: str | None = Field(default=None, alias="websiteUrl") + + +class PluginListParams(BaseModel): + cwds: list[AbsolutePathBuf] | None = Field( + default=None, + description="Optional working directories used to discover repo marketplaces. When omitted, only home-scoped marketplaces and the official curated marketplace are considered.", + ) + + +class LocalPluginSourceType(RootModel[Literal["local"]]): + root: Literal["local"] = Field(..., title="LocalPluginSourceType") + + +class LocalPluginSource(BaseModel): + path: AbsolutePathBuf + type: LocalPluginSourceType = Field(..., title="LocalPluginSourceType") + + +class PluginSource(RootModel[LocalPluginSource]): + root: LocalPluginSource + + +class PluginSummary(BaseModel): + enabled: bool + id: str + installed: bool + interface: PluginInterface | None = None + name: str + source: PluginSource + + +class ProductSurface(StrEnum): + chatgpt = "chatgpt" + codex = "codex" + api = "api" + atlas = "atlas" + + +class RateLimitWindow(BaseModel): + resets_at: int | None = Field(default=None, alias="resetsAt") + used_percent: int = Field(..., alias="usedPercent") + window_duration_mins: int | None = Field(default=None, alias="windowDurationMins") + + +class RestrictedReadOnlyAccessType(RootModel[Literal["restricted"]]): + root: Literal["restricted"] = Field(..., title="RestrictedReadOnlyAccessType") + + +class RestrictedReadOnlyAccess(BaseModel): + include_platform_defaults: bool | None = Field( + default=True, alias="includePlatformDefaults" + ) + readable_roots: list[AbsolutePathBuf] | None = Field( + default_factory=list, alias="readableRoots" + ) + type: RestrictedReadOnlyAccessType = Field( + ..., title="RestrictedReadOnlyAccessType" + ) + + +class FullAccessReadOnlyAccessType(RootModel[Literal["fullAccess"]]): + root: Literal["fullAccess"] = Field(..., title="FullAccessReadOnlyAccessType") + + +class FullAccessReadOnlyAccess(BaseModel): + type: FullAccessReadOnlyAccessType = Field( + ..., title="FullAccessReadOnlyAccessType" + ) + + +class ReadOnlyAccess(RootModel[RestrictedReadOnlyAccess | FullAccessReadOnlyAccess]): + root: RestrictedReadOnlyAccess | FullAccessReadOnlyAccess + + +class RealtimeAudioFrame(BaseModel): + data: str + num_channels: int = Field(..., ge=0) + sample_rate: int = Field(..., ge=0) + samples_per_channel: int | None = Field(default=None, ge=0) + + +class SessionUpdated(BaseModel): + instructions: str | None = None + session_id: str + + +class SessionUpdatedRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + session_updated: SessionUpdated = Field(..., alias="SessionUpdated") + + +class AudioOutRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + audio_out: RealtimeAudioFrame = Field(..., alias="AudioOut") + + +class ConversationItemAddedRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + conversation_item_added: Any = Field(..., alias="ConversationItemAdded") + + +class ConversationItemDone(BaseModel): + item_id: str + + +class ConversationItemDoneRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + conversation_item_done: ConversationItemDone = Field( + ..., alias="ConversationItemDone" + ) + + +class ErrorRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + error: str = Field(..., alias="Error") + + +class RealtimeHandoffMessage(BaseModel): + role: str + text: str + + +class RealtimeHandoffRequested(BaseModel): + handoff_id: str + input_transcript: str + item_id: str + messages: list[RealtimeHandoffMessage] + + +class ReasoningEffort(StrEnum): + none = "none" + minimal = "minimal" + low = "low" + medium = "medium" + high = "high" + xhigh = "xhigh" + + +class ReasoningEffortOption(BaseModel): + description: str + reasoning_effort: ReasoningEffort = Field(..., alias="reasoningEffort") + + +class ReasoningTextReasoningItemContentType(RootModel[Literal["reasoning_text"]]): + root: Literal["reasoning_text"] = Field( + ..., title="ReasoningTextReasoningItemContentType" + ) + + +class ReasoningTextReasoningItemContent(BaseModel): + text: str + type: ReasoningTextReasoningItemContentType = Field( + ..., title="ReasoningTextReasoningItemContentType" + ) + + +class TextReasoningItemContentType(RootModel[Literal["text"]]): + root: Literal["text"] = Field(..., title="TextReasoningItemContentType") + + +class TextReasoningItemContent(BaseModel): + text: str + type: TextReasoningItemContentType = Field( + ..., title="TextReasoningItemContentType" + ) + + +class ReasoningItemContent( + RootModel[ReasoningTextReasoningItemContent | TextReasoningItemContent] +): + root: ReasoningTextReasoningItemContent | TextReasoningItemContent + + +class SummaryTextReasoningItemReasoningSummaryType(RootModel[Literal["summary_text"]]): + root: Literal["summary_text"] = Field( + ..., title="SummaryTextReasoningItemReasoningSummaryType" + ) + + +class SummaryTextReasoningItemReasoningSummary(BaseModel): + text: str + type: SummaryTextReasoningItemReasoningSummaryType = Field( + ..., title="SummaryTextReasoningItemReasoningSummaryType" + ) + + +class ReasoningItemReasoningSummary( + RootModel[SummaryTextReasoningItemReasoningSummary] +): + root: SummaryTextReasoningItemReasoningSummary + + +class ReasoningSummary1(StrEnum): + auto = "auto" + concise = "concise" + detailed = "detailed" + + +class ReasoningSummary(RootModel[ReasoningSummary1 | Literal["none"]]): + root: ReasoningSummary1 | Literal["none"] = Field( + ..., + 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", + ) + + +class ReasoningSummaryPartAddedNotification(BaseModel): + item_id: str = Field(..., alias="itemId") + summary_index: int = Field(..., alias="summaryIndex") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class ReasoningSummaryTextDeltaNotification(BaseModel): + delta: str + item_id: str = Field(..., alias="itemId") + summary_index: int = Field(..., alias="summaryIndex") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class ReasoningTextDeltaNotification(BaseModel): + content_index: int = Field(..., alias="contentIndex") + delta: str + item_id: str = Field(..., alias="itemId") + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class RemoteSkillSummary(BaseModel): + description: str + id: str + name: str + + +class RequestId(RootModel[str | int]): + root: str | int class RequestUserInputQuestionOption(BaseModel): @@ -3419,22 +2757,1493 @@ class RequestUserInputQuestionOption(BaseModel): label: str -class CallToolResult(BaseModel): - field_meta: Any | None = Field(None, alias='_meta') - content: list[Any] - is_error: bool | None = Field(default=None, alias='isError') - structured_content: Any | None = Field(None, alias='structuredContent') +class ResidencyRequirement(RootModel[Literal["us"]]): + root: Literal["us"] -class TurnAbortReason(StrEnum): - interrupted = 'interrupted' - replaced = 'replaced' - review_ended = 'review_ended' +class Resource(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + annotations: Any | None = None + description: str | None = None + icons: list[Any] | None = None + mime_type: str | None = Field(default=None, alias="mimeType") + name: str + size: int | None = None + title: str | None = None + uri: str -class NetworkPolicyAmendment(BaseModel): - action: NetworkPolicyRuleAction - host: str +class ResourceTemplate(BaseModel): + annotations: Any | None = None + description: str | None = None + mime_type: str | None = Field(default=None, alias="mimeType") + name: str + title: str | None = None + uri_template: str = Field(..., alias="uriTemplate") + + +class MessageResponseItemType(RootModel[Literal["message"]]): + root: Literal["message"] = Field(..., title="MessageResponseItemType") + + +class MessageResponseItem(BaseModel): + content: list[ContentItem] + end_turn: bool | None = None + id: str | None = None + phase: MessagePhase | None = None + role: str + type: MessageResponseItemType = Field(..., title="MessageResponseItemType") + + +class ReasoningResponseItemType(RootModel[Literal["reasoning"]]): + root: Literal["reasoning"] = Field(..., title="ReasoningResponseItemType") + + +class ReasoningResponseItem(BaseModel): + content: list[ReasoningItemContent] | None = None + encrypted_content: str | None = None + id: str + summary: list[ReasoningItemReasoningSummary] + type: ReasoningResponseItemType = Field(..., title="ReasoningResponseItemType") + + +class LocalShellCallResponseItemType(RootModel[Literal["local_shell_call"]]): + root: Literal["local_shell_call"] = Field( + ..., title="LocalShellCallResponseItemType" + ) + + +class LocalShellCallResponseItem(BaseModel): + action: LocalShellAction + call_id: str | None = Field( + default=None, description="Set when using the Responses API." + ) + id: str | None = Field( + default=None, + description="Legacy id field retained for compatibility with older payloads.", + ) + status: LocalShellStatus + type: LocalShellCallResponseItemType = Field( + ..., title="LocalShellCallResponseItemType" + ) + + +class FunctionCallResponseItemType(RootModel[Literal["function_call"]]): + root: Literal["function_call"] = Field(..., title="FunctionCallResponseItemType") + + +class FunctionCallResponseItem(BaseModel): + arguments: str + call_id: str + id: str | None = None + name: str + type: FunctionCallResponseItemType = Field( + ..., title="FunctionCallResponseItemType" + ) + + +class FunctionCallOutputResponseItemType(RootModel[Literal["function_call_output"]]): + root: Literal["function_call_output"] = Field( + ..., title="FunctionCallOutputResponseItemType" + ) + + +class CustomToolCallResponseItemType(RootModel[Literal["custom_tool_call"]]): + root: Literal["custom_tool_call"] = Field( + ..., title="CustomToolCallResponseItemType" + ) + + +class CustomToolCallResponseItem(BaseModel): + call_id: str + id: str | None = None + input: str + name: str + status: str | None = None + type: CustomToolCallResponseItemType = Field( + ..., title="CustomToolCallResponseItemType" + ) + + +class CustomToolCallOutputResponseItemType( + RootModel[Literal["custom_tool_call_output"]] +): + root: Literal["custom_tool_call_output"] = Field( + ..., title="CustomToolCallOutputResponseItemType" + ) + + +class WebSearchCallResponseItemType(RootModel[Literal["web_search_call"]]): + root: Literal["web_search_call"] = Field(..., title="WebSearchCallResponseItemType") + + +class ImageGenerationCallResponseItemType(RootModel[Literal["image_generation_call"]]): + root: Literal["image_generation_call"] = Field( + ..., title="ImageGenerationCallResponseItemType" + ) + + +class ImageGenerationCallResponseItem(BaseModel): + id: str + result: str + revised_prompt: str | None = None + status: str + type: ImageGenerationCallResponseItemType = Field( + ..., title="ImageGenerationCallResponseItemType" + ) + + +class GhostSnapshotResponseItemType(RootModel[Literal["ghost_snapshot"]]): + root: Literal["ghost_snapshot"] = Field(..., title="GhostSnapshotResponseItemType") + + +class GhostSnapshotResponseItem(BaseModel): + ghost_commit: GhostCommit + type: GhostSnapshotResponseItemType = Field( + ..., title="GhostSnapshotResponseItemType" + ) + + +class CompactionResponseItemType(RootModel[Literal["compaction"]]): + root: Literal["compaction"] = Field(..., title="CompactionResponseItemType") + + +class CompactionResponseItem(BaseModel): + encrypted_content: str + type: CompactionResponseItemType = Field(..., title="CompactionResponseItemType") + + +class OtherResponseItemType(RootModel[Literal["other"]]): + root: Literal["other"] = Field(..., title="OtherResponseItemType") + + +class OtherResponseItem(BaseModel): + type: OtherResponseItemType = Field(..., title="OtherResponseItemType") + + +class SearchResponsesApiWebSearchActionType(RootModel[Literal["search"]]): + root: Literal["search"] = Field(..., title="SearchResponsesApiWebSearchActionType") + + +class SearchResponsesApiWebSearchAction(BaseModel): + queries: list[str] | None = None + query: str | None = None + type: SearchResponsesApiWebSearchActionType = Field( + ..., title="SearchResponsesApiWebSearchActionType" + ) + + +class OpenPageResponsesApiWebSearchActionType(RootModel[Literal["open_page"]]): + root: Literal["open_page"] = Field( + ..., title="OpenPageResponsesApiWebSearchActionType" + ) + + +class OpenPageResponsesApiWebSearchAction(BaseModel): + type: OpenPageResponsesApiWebSearchActionType = Field( + ..., title="OpenPageResponsesApiWebSearchActionType" + ) + url: str | None = None + + +class FindInPageResponsesApiWebSearchActionType(RootModel[Literal["find_in_page"]]): + root: Literal["find_in_page"] = Field( + ..., title="FindInPageResponsesApiWebSearchActionType" + ) + + +class FindInPageResponsesApiWebSearchAction(BaseModel): + pattern: str | None = None + type: FindInPageResponsesApiWebSearchActionType = Field( + ..., title="FindInPageResponsesApiWebSearchActionType" + ) + url: str | None = None + + +class OtherResponsesApiWebSearchActionType(RootModel[Literal["other"]]): + root: Literal["other"] = Field(..., title="OtherResponsesApiWebSearchActionType") + + +class OtherResponsesApiWebSearchAction(BaseModel): + type: OtherResponsesApiWebSearchActionType = Field( + ..., title="OtherResponsesApiWebSearchActionType" + ) + + +class ResponsesApiWebSearchAction( + RootModel[ + SearchResponsesApiWebSearchAction + | OpenPageResponsesApiWebSearchAction + | FindInPageResponsesApiWebSearchAction + | OtherResponsesApiWebSearchAction + ] +): + root: ( + SearchResponsesApiWebSearchAction + | OpenPageResponsesApiWebSearchAction + | FindInPageResponsesApiWebSearchAction + | OtherResponsesApiWebSearchAction + ) + + +class OkResultOfCallToolResultOrString(BaseModel): + ok: CallToolResult = Field(..., alias="Ok") + + +class ErrResultOfCallToolResultOrString(BaseModel): + err: str = Field(..., alias="Err") + + +class ResultOfCallToolResultOrString( + RootModel[OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString] +): + root: OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString + + +class ApprovedExecpolicyAmendment(BaseModel): + proposed_execpolicy_amendment: list[str] + + +class ApprovedExecpolicyAmendmentReviewDecision(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + approved_execpolicy_amendment: ApprovedExecpolicyAmendment + + +class ReviewDelivery(StrEnum): + inline = "inline" + detached = "detached" + + +class ReviewLineRange(BaseModel): + end: int = Field(..., ge=0) + start: int = Field(..., ge=0) + + +class UncommittedChangesReviewTargetType(RootModel[Literal["uncommittedChanges"]]): + root: Literal["uncommittedChanges"] = Field( + ..., title="UncommittedChangesReviewTargetType" + ) + + +class UncommittedChangesReviewTarget(BaseModel): + type: UncommittedChangesReviewTargetType = Field( + ..., title="UncommittedChangesReviewTargetType" + ) + + +class BaseBranchReviewTargetType(RootModel[Literal["baseBranch"]]): + root: Literal["baseBranch"] = Field(..., title="BaseBranchReviewTargetType") + + +class BaseBranchReviewTarget(BaseModel): + branch: str + type: BaseBranchReviewTargetType = Field(..., title="BaseBranchReviewTargetType") + + +class CommitReviewTargetType(RootModel[Literal["commit"]]): + root: Literal["commit"] = Field(..., title="CommitReviewTargetType") + + +class CommitReviewTarget(BaseModel): + sha: str + title: str | None = Field( + default=None, + description="Optional human-readable label (e.g., commit subject) for UIs.", + ) + type: CommitReviewTargetType = Field(..., title="CommitReviewTargetType") + + +class CustomReviewTargetType(RootModel[Literal["custom"]]): + root: Literal["custom"] = Field(..., title="CustomReviewTargetType") + + +class CustomReviewTarget(BaseModel): + instructions: str + type: CustomReviewTargetType = Field(..., title="CustomReviewTargetType") + + +class ReviewTarget( + RootModel[ + UncommittedChangesReviewTarget + | BaseBranchReviewTarget + | CommitReviewTarget + | CustomReviewTarget + ] +): + root: ( + UncommittedChangesReviewTarget + | BaseBranchReviewTarget + | CommitReviewTarget + | CustomReviewTarget + ) + + +class SandboxMode(StrEnum): + read_only = "read-only" + workspace_write = "workspace-write" + danger_full_access = "danger-full-access" + + +class DangerFullAccessSandboxPolicyType(RootModel[Literal["dangerFullAccess"]]): + root: Literal["dangerFullAccess"] = Field( + ..., title="DangerFullAccessSandboxPolicyType" + ) + + +class DangerFullAccessSandboxPolicy(BaseModel): + type: DangerFullAccessSandboxPolicyType = Field( + ..., title="DangerFullAccessSandboxPolicyType" + ) + + +class ReadOnlySandboxPolicyType(RootModel[Literal["readOnly"]]): + root: Literal["readOnly"] = Field(..., title="ReadOnlySandboxPolicyType") + + +class ReadOnlySandboxPolicy(BaseModel): + access: ReadOnlyAccess | None = Field( + default_factory=lambda: ReadOnlyAccess({"type": "fullAccess"}) + ) + network_access: bool | None = Field(default=False, alias="networkAccess") + type: ReadOnlySandboxPolicyType = Field(..., title="ReadOnlySandboxPolicyType") + + +class ExternalSandboxSandboxPolicyType(RootModel[Literal["externalSandbox"]]): + root: Literal["externalSandbox"] = Field( + ..., title="ExternalSandboxSandboxPolicyType" + ) + + +class ExternalSandboxSandboxPolicy(BaseModel): + network_access: NetworkAccess | None = Field( + default="restricted", alias="networkAccess" + ) + type: ExternalSandboxSandboxPolicyType = Field( + ..., title="ExternalSandboxSandboxPolicyType" + ) + + +class WorkspaceWriteSandboxPolicyType(RootModel[Literal["workspaceWrite"]]): + root: Literal["workspaceWrite"] = Field( + ..., title="WorkspaceWriteSandboxPolicyType" + ) + + +class WorkspaceWriteSandboxPolicy(BaseModel): + exclude_slash_tmp: bool | None = Field(default=False, alias="excludeSlashTmp") + exclude_tmpdir_env_var: bool | None = Field( + default=False, alias="excludeTmpdirEnvVar" + ) + network_access: bool | None = Field(default=False, alias="networkAccess") + read_only_access: ReadOnlyAccess | None = Field( + default_factory=lambda: ReadOnlyAccess({"type": "fullAccess"}), + alias="readOnlyAccess", + ) + type: WorkspaceWriteSandboxPolicyType = Field( + ..., title="WorkspaceWriteSandboxPolicyType" + ) + writable_roots: list[AbsolutePathBuf] | None = Field( + default_factory=list, alias="writableRoots" + ) + + +class SandboxPolicy( + RootModel[ + DangerFullAccessSandboxPolicy + | ReadOnlySandboxPolicy + | ExternalSandboxSandboxPolicy + | WorkspaceWriteSandboxPolicy + ] +): + root: ( + DangerFullAccessSandboxPolicy + | ReadOnlySandboxPolicy + | ExternalSandboxSandboxPolicy + | WorkspaceWriteSandboxPolicy + ) + + +class SandboxWorkspaceWrite(BaseModel): + exclude_slash_tmp: bool | None = False + exclude_tmpdir_env_var: bool | None = False + network_access: bool | None = False + writable_roots: list[str] | None = [] + + +class ErrorServerNotificationMethod(RootModel[Literal["error"]]): + root: Literal["error"] = Field(..., title="ErrorServerNotificationMethod") + + +class ThreadStartedServerNotificationMethod(RootModel[Literal["thread/started"]]): + root: Literal["thread/started"] = Field( + ..., title="Thread/startedServerNotificationMethod" + ) + + +class ThreadStatusChangedServerNotificationMethod( + RootModel[Literal["thread/status/changed"]] +): + root: Literal["thread/status/changed"] = Field( + ..., title="Thread/status/changedServerNotificationMethod" + ) + + +class ThreadArchivedServerNotificationMethod(RootModel[Literal["thread/archived"]]): + root: Literal["thread/archived"] = Field( + ..., title="Thread/archivedServerNotificationMethod" + ) + + +class ThreadUnarchivedServerNotificationMethod(RootModel[Literal["thread/unarchived"]]): + root: Literal["thread/unarchived"] = Field( + ..., title="Thread/unarchivedServerNotificationMethod" + ) + + +class ThreadClosedServerNotificationMethod(RootModel[Literal["thread/closed"]]): + root: Literal["thread/closed"] = Field( + ..., title="Thread/closedServerNotificationMethod" + ) + + +class SkillsChangedServerNotificationMethod(RootModel[Literal["skills/changed"]]): + root: Literal["skills/changed"] = Field( + ..., title="Skills/changedServerNotificationMethod" + ) + + +class ThreadNameUpdatedServerNotificationMethod( + RootModel[Literal["thread/name/updated"]] +): + root: Literal["thread/name/updated"] = Field( + ..., title="Thread/name/updatedServerNotificationMethod" + ) + + +class ThreadTokenUsageUpdatedServerNotificationMethod( + RootModel[Literal["thread/tokenUsage/updated"]] +): + root: Literal["thread/tokenUsage/updated"] = Field( + ..., title="Thread/tokenUsage/updatedServerNotificationMethod" + ) + + +class TurnStartedServerNotificationMethod(RootModel[Literal["turn/started"]]): + root: Literal["turn/started"] = Field( + ..., title="Turn/startedServerNotificationMethod" + ) + + +class TurnCompletedServerNotificationMethod(RootModel[Literal["turn/completed"]]): + root: Literal["turn/completed"] = Field( + ..., title="Turn/completedServerNotificationMethod" + ) + + +class TurnDiffUpdatedServerNotificationMethod(RootModel[Literal["turn/diff/updated"]]): + root: Literal["turn/diff/updated"] = Field( + ..., title="Turn/diff/updatedServerNotificationMethod" + ) + + +class TurnPlanUpdatedServerNotificationMethod(RootModel[Literal["turn/plan/updated"]]): + root: Literal["turn/plan/updated"] = Field( + ..., title="Turn/plan/updatedServerNotificationMethod" + ) + + +class ItemStartedServerNotificationMethod(RootModel[Literal["item/started"]]): + root: Literal["item/started"] = Field( + ..., title="Item/startedServerNotificationMethod" + ) + + +class ItemCompletedServerNotificationMethod(RootModel[Literal["item/completed"]]): + root: Literal["item/completed"] = Field( + ..., title="Item/completedServerNotificationMethod" + ) + + +class ItemAgentMessageDeltaServerNotificationMethod( + RootModel[Literal["item/agentMessage/delta"]] +): + root: Literal["item/agentMessage/delta"] = Field( + ..., title="Item/agentMessage/deltaServerNotificationMethod" + ) + + +class ItemAgentMessageDeltaServerNotification(BaseModel): + method: ItemAgentMessageDeltaServerNotificationMethod = Field( + ..., title="Item/agentMessage/deltaServerNotificationMethod" + ) + params: AgentMessageDeltaNotification + + +class ItemPlanDeltaServerNotificationMethod(RootModel[Literal["item/plan/delta"]]): + root: Literal["item/plan/delta"] = Field( + ..., title="Item/plan/deltaServerNotificationMethod" + ) + + +class ItemPlanDeltaServerNotification(BaseModel): + method: ItemPlanDeltaServerNotificationMethod = Field( + ..., title="Item/plan/deltaServerNotificationMethod" + ) + params: PlanDeltaNotification + + +class CommandExecOutputDeltaServerNotificationMethod( + RootModel[Literal["command/exec/outputDelta"]] +): + root: Literal["command/exec/outputDelta"] = Field( + ..., title="Command/exec/outputDeltaServerNotificationMethod" + ) + + +class ItemCommandExecutionOutputDeltaServerNotificationMethod( + RootModel[Literal["item/commandExecution/outputDelta"]] +): + root: Literal["item/commandExecution/outputDelta"] = Field( + ..., title="Item/commandExecution/outputDeltaServerNotificationMethod" + ) + + +class ItemCommandExecutionOutputDeltaServerNotification(BaseModel): + method: ItemCommandExecutionOutputDeltaServerNotificationMethod = Field( + ..., title="Item/commandExecution/outputDeltaServerNotificationMethod" + ) + params: CommandExecutionOutputDeltaNotification + + +class ItemCommandExecutionTerminalInteractionServerNotificationMethod( + RootModel[Literal["item/commandExecution/terminalInteraction"]] +): + root: Literal["item/commandExecution/terminalInteraction"] = Field( + ..., title="Item/commandExecution/terminalInteractionServerNotificationMethod" + ) + + +class ItemFileChangeOutputDeltaServerNotificationMethod( + RootModel[Literal["item/fileChange/outputDelta"]] +): + root: Literal["item/fileChange/outputDelta"] = Field( + ..., title="Item/fileChange/outputDeltaServerNotificationMethod" + ) + + +class ItemFileChangeOutputDeltaServerNotification(BaseModel): + method: ItemFileChangeOutputDeltaServerNotificationMethod = Field( + ..., title="Item/fileChange/outputDeltaServerNotificationMethod" + ) + params: FileChangeOutputDeltaNotification + + +class ServerRequestResolvedServerNotificationMethod( + RootModel[Literal["serverRequest/resolved"]] +): + root: Literal["serverRequest/resolved"] = Field( + ..., title="ServerRequest/resolvedServerNotificationMethod" + ) + + +class ItemMcpToolCallProgressServerNotificationMethod( + RootModel[Literal["item/mcpToolCall/progress"]] +): + root: Literal["item/mcpToolCall/progress"] = Field( + ..., title="Item/mcpToolCall/progressServerNotificationMethod" + ) + + +class ItemMcpToolCallProgressServerNotification(BaseModel): + method: ItemMcpToolCallProgressServerNotificationMethod = Field( + ..., title="Item/mcpToolCall/progressServerNotificationMethod" + ) + params: McpToolCallProgressNotification + + +class McpServerOauthLoginCompletedServerNotificationMethod( + RootModel[Literal["mcpServer/oauthLogin/completed"]] +): + root: Literal["mcpServer/oauthLogin/completed"] = Field( + ..., title="McpServer/oauthLogin/completedServerNotificationMethod" + ) + + +class McpServerOauthLoginCompletedServerNotification(BaseModel): + method: McpServerOauthLoginCompletedServerNotificationMethod = Field( + ..., title="McpServer/oauthLogin/completedServerNotificationMethod" + ) + params: McpServerOauthLoginCompletedNotification + + +class AccountUpdatedServerNotificationMethod(RootModel[Literal["account/updated"]]): + root: Literal["account/updated"] = Field( + ..., title="Account/updatedServerNotificationMethod" + ) + + +class AccountRateLimitsUpdatedServerNotificationMethod( + RootModel[Literal["account/rateLimits/updated"]] +): + root: Literal["account/rateLimits/updated"] = Field( + ..., title="Account/rateLimits/updatedServerNotificationMethod" + ) + + +class AppListUpdatedServerNotificationMethod(RootModel[Literal["app/list/updated"]]): + root: Literal["app/list/updated"] = Field( + ..., title="App/list/updatedServerNotificationMethod" + ) + + +class ItemReasoningSummaryTextDeltaServerNotificationMethod( + RootModel[Literal["item/reasoning/summaryTextDelta"]] +): + root: Literal["item/reasoning/summaryTextDelta"] = Field( + ..., title="Item/reasoning/summaryTextDeltaServerNotificationMethod" + ) + + +class ItemReasoningSummaryTextDeltaServerNotification(BaseModel): + method: ItemReasoningSummaryTextDeltaServerNotificationMethod = Field( + ..., title="Item/reasoning/summaryTextDeltaServerNotificationMethod" + ) + params: ReasoningSummaryTextDeltaNotification + + +class ItemReasoningSummaryPartAddedServerNotificationMethod( + RootModel[Literal["item/reasoning/summaryPartAdded"]] +): + root: Literal["item/reasoning/summaryPartAdded"] = Field( + ..., title="Item/reasoning/summaryPartAddedServerNotificationMethod" + ) + + +class ItemReasoningSummaryPartAddedServerNotification(BaseModel): + method: ItemReasoningSummaryPartAddedServerNotificationMethod = Field( + ..., title="Item/reasoning/summaryPartAddedServerNotificationMethod" + ) + params: ReasoningSummaryPartAddedNotification + + +class ItemReasoningTextDeltaServerNotificationMethod( + RootModel[Literal["item/reasoning/textDelta"]] +): + root: Literal["item/reasoning/textDelta"] = Field( + ..., title="Item/reasoning/textDeltaServerNotificationMethod" + ) + + +class ItemReasoningTextDeltaServerNotification(BaseModel): + method: ItemReasoningTextDeltaServerNotificationMethod = Field( + ..., title="Item/reasoning/textDeltaServerNotificationMethod" + ) + params: ReasoningTextDeltaNotification + + +class ThreadCompactedServerNotificationMethod(RootModel[Literal["thread/compacted"]]): + root: Literal["thread/compacted"] = Field( + ..., title="Thread/compactedServerNotificationMethod" + ) + + +class ThreadCompactedServerNotification(BaseModel): + method: ThreadCompactedServerNotificationMethod = Field( + ..., title="Thread/compactedServerNotificationMethod" + ) + params: ContextCompactedNotification + + +class ModelReroutedServerNotificationMethod(RootModel[Literal["model/rerouted"]]): + root: Literal["model/rerouted"] = Field( + ..., title="Model/reroutedServerNotificationMethod" + ) + + +class ModelReroutedServerNotification(BaseModel): + method: ModelReroutedServerNotificationMethod = Field( + ..., title="Model/reroutedServerNotificationMethod" + ) + params: ModelReroutedNotification + + +class DeprecationNoticeServerNotificationMethod( + RootModel[Literal["deprecationNotice"]] +): + root: Literal["deprecationNotice"] = Field( + ..., title="DeprecationNoticeServerNotificationMethod" + ) + + +class DeprecationNoticeServerNotification(BaseModel): + method: DeprecationNoticeServerNotificationMethod = Field( + ..., title="DeprecationNoticeServerNotificationMethod" + ) + params: DeprecationNoticeNotification + + +class ConfigWarningServerNotificationMethod(RootModel[Literal["configWarning"]]): + root: Literal["configWarning"] = Field( + ..., title="ConfigWarningServerNotificationMethod" + ) + + +class FuzzyFileSearchSessionUpdatedServerNotificationMethod( + RootModel[Literal["fuzzyFileSearch/sessionUpdated"]] +): + root: Literal["fuzzyFileSearch/sessionUpdated"] = Field( + ..., title="FuzzyFileSearch/sessionUpdatedServerNotificationMethod" + ) + + +class FuzzyFileSearchSessionUpdatedServerNotification(BaseModel): + method: FuzzyFileSearchSessionUpdatedServerNotificationMethod = Field( + ..., title="FuzzyFileSearch/sessionUpdatedServerNotificationMethod" + ) + params: FuzzyFileSearchSessionUpdatedNotification + + +class FuzzyFileSearchSessionCompletedServerNotificationMethod( + RootModel[Literal["fuzzyFileSearch/sessionCompleted"]] +): + root: Literal["fuzzyFileSearch/sessionCompleted"] = Field( + ..., title="FuzzyFileSearch/sessionCompletedServerNotificationMethod" + ) + + +class FuzzyFileSearchSessionCompletedServerNotification(BaseModel): + method: FuzzyFileSearchSessionCompletedServerNotificationMethod = Field( + ..., title="FuzzyFileSearch/sessionCompletedServerNotificationMethod" + ) + params: FuzzyFileSearchSessionCompletedNotification + + +class ThreadRealtimeStartedServerNotificationMethod( + RootModel[Literal["thread/realtime/started"]] +): + root: Literal["thread/realtime/started"] = Field( + ..., title="Thread/realtime/startedServerNotificationMethod" + ) + + +class ThreadRealtimeItemAddedServerNotificationMethod( + RootModel[Literal["thread/realtime/itemAdded"]] +): + root: Literal["thread/realtime/itemAdded"] = Field( + ..., title="Thread/realtime/itemAddedServerNotificationMethod" + ) + + +class ThreadRealtimeOutputAudioDeltaServerNotificationMethod( + RootModel[Literal["thread/realtime/outputAudio/delta"]] +): + root: Literal["thread/realtime/outputAudio/delta"] = Field( + ..., title="Thread/realtime/outputAudio/deltaServerNotificationMethod" + ) + + +class ThreadRealtimeErrorServerNotificationMethod( + RootModel[Literal["thread/realtime/error"]] +): + root: Literal["thread/realtime/error"] = Field( + ..., title="Thread/realtime/errorServerNotificationMethod" + ) + + +class ThreadRealtimeClosedServerNotificationMethod( + RootModel[Literal["thread/realtime/closed"]] +): + root: Literal["thread/realtime/closed"] = Field( + ..., title="Thread/realtime/closedServerNotificationMethod" + ) + + +class WindowsWorldWritableWarningServerNotificationMethod( + RootModel[Literal["windows/worldWritableWarning"]] +): + root: Literal["windows/worldWritableWarning"] = Field( + ..., title="Windows/worldWritableWarningServerNotificationMethod" + ) + + +class WindowsSandboxSetupCompletedServerNotificationMethod( + RootModel[Literal["windowsSandbox/setupCompleted"]] +): + root: Literal["windowsSandbox/setupCompleted"] = Field( + ..., title="WindowsSandbox/setupCompletedServerNotificationMethod" + ) + + +class AccountLoginCompletedServerNotificationMethod( + RootModel[Literal["account/login/completed"]] +): + root: Literal["account/login/completed"] = Field( + ..., title="Account/login/completedServerNotificationMethod" + ) + + +class AccountLoginCompletedServerNotification(BaseModel): + method: AccountLoginCompletedServerNotificationMethod = Field( + ..., title="Account/login/completedServerNotificationMethod" + ) + params: AccountLoginCompletedNotification + + +class ServerRequestResolvedNotification(BaseModel): + request_id: RequestId = Field(..., alias="requestId") + thread_id: str = Field(..., alias="threadId") + + +class ServiceTier(StrEnum): + fast = "fast" + flex = "flex" + + +class SessionNetworkProxyRuntime(BaseModel): + http_addr: str + socks_addr: str + + +class SessionSource1(StrEnum): + cli = "cli" + vscode = "vscode" + exec = "exec" + app_server = "appServer" + unknown = "unknown" + + +class Settings(BaseModel): + developer_instructions: str | None = None + model: str + reasoning_effort: ReasoningEffort | None = None + + +class SkillErrorInfo(BaseModel): + message: str + path: str + + +class SkillInterface(BaseModel): + brand_color: str | None = Field(default=None, alias="brandColor") + default_prompt: str | None = Field(default=None, alias="defaultPrompt") + display_name: str | None = Field(default=None, alias="displayName") + icon_large: str | None = Field(default=None, alias="iconLarge") + icon_small: str | None = Field(default=None, alias="iconSmall") + short_description: str | None = Field(default=None, alias="shortDescription") + + +class SkillScope(StrEnum): + user = "user" + repo = "repo" + system = "system" + admin = "admin" + + +class SkillToolDependency(BaseModel): + command: str | None = None + description: str | None = None + transport: str | None = None + type: str + url: str | None = None + value: str + + +class SkillsChangedNotification(BaseModel): + pass + + +class SkillsConfigWriteParams(BaseModel): + enabled: bool + path: str + + +class SkillsConfigWriteResponse(BaseModel): + effective_enabled: bool = Field(..., alias="effectiveEnabled") + + +class SkillsListExtraRootsForCwd(BaseModel): + cwd: str + extra_user_roots: list[str] = Field(..., alias="extraUserRoots") + + +class SkillsListParams(BaseModel): + cwds: list[str] | None = Field( + default=None, + description="When empty, defaults to the current session working directory.", + ) + force_reload: bool | None = Field( + default=None, + alias="forceReload", + description="When true, bypass the skills cache and re-scan skills from disk.", + ) + per_cwd_extra_user_roots: list[SkillsListExtraRootsForCwd] | None = Field( + default=None, + alias="perCwdExtraUserRoots", + description="Optional per-cwd extra roots to scan as user-scoped skills.", + ) + + +class SkillsRemoteReadParams(BaseModel): + enabled: bool | None = False + hazelnut_scope: HazelnutScope | None = Field( + default="example", alias="hazelnutScope" + ) + product_surface: ProductSurface | None = Field( + default="codex", alias="productSurface" + ) + + +class SkillsRemoteReadResponse(BaseModel): + data: list[RemoteSkillSummary] + + +class SkillsRemoteWriteParams(BaseModel): + hazelnut_id: str = Field(..., alias="hazelnutId") + + +class SkillsRemoteWriteResponse(BaseModel): + id: str + path: str + + +class StepStatus(StrEnum): + pending = "pending" + in_progress = "in_progress" + completed = "completed" + + +class SubAgentSource1(StrEnum): + review = "review" + compact = "compact" + memory_consolidation = "memory_consolidation" + + +class OtherSubAgentSource(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + other: str + + +class TerminalInteractionNotification(BaseModel): + item_id: str = Field(..., alias="itemId") + process_id: str = Field(..., alias="processId") + stdin: str + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class TextElement(BaseModel): + byte_range: ByteRange = Field( + ..., + alias="byteRange", + description="Byte range in the parent `text` buffer that this element occupies.", + ) + placeholder: str | None = Field( + default=None, + description="Optional human-readable placeholder for the element, displayed in the UI.", + ) + + +class TextPosition(BaseModel): + column: int = Field( + ..., description="1-based column number (in Unicode scalar values).", ge=0 + ) + line: int = Field(..., description="1-based line number.", ge=0) + + +class TextRange(BaseModel): + end: TextPosition + start: TextPosition + + +class ThreadActiveFlag(StrEnum): + waiting_on_approval = "waitingOnApproval" + waiting_on_user_input = "waitingOnUserInput" + + +class ThreadArchiveParams(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadArchiveResponse(BaseModel): + pass + + +class ThreadArchivedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadClosedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadCompactStartParams(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadCompactStartResponse(BaseModel): + pass + + +class ThreadForkParams(BaseModel): + approval_policy: AskForApproval | None = Field(default=None, alias="approvalPolicy") + base_instructions: str | None = Field(default=None, alias="baseInstructions") + config: dict[str, Any] | None = None + cwd: str | None = None + developer_instructions: str | None = Field( + default=None, alias="developerInstructions" + ) + model: str | None = Field( + default=None, + description="Configuration overrides for the forked thread, if any.", + ) + model_provider: str | None = Field(default=None, alias="modelProvider") + sandbox: SandboxMode | None = None + service_tier: ServiceTier | None = Field(default=None, alias="serviceTier") + thread_id: str = Field(..., alias="threadId") + + +class ThreadId(RootModel[str]): + root: str + + +class UserMessageThreadItemType(RootModel[Literal["userMessage"]]): + root: Literal["userMessage"] = Field(..., title="UserMessageThreadItemType") + + +class AgentMessageThreadItemType(RootModel[Literal["agentMessage"]]): + root: Literal["agentMessage"] = Field(..., title="AgentMessageThreadItemType") + + +class AgentMessageThreadItem(BaseModel): + id: str + phase: MessagePhase | None = None + text: str + type: AgentMessageThreadItemType = Field(..., title="AgentMessageThreadItemType") + + +class PlanThreadItemType(RootModel[Literal["plan"]]): + root: Literal["plan"] = Field(..., title="PlanThreadItemType") + + +class PlanThreadItem(BaseModel): + id: str + text: str + type: PlanThreadItemType = Field(..., title="PlanThreadItemType") + + +class ReasoningThreadItemType(RootModel[Literal["reasoning"]]): + root: Literal["reasoning"] = Field(..., title="ReasoningThreadItemType") + + +class ReasoningThreadItem(BaseModel): + content: list[str] | None = [] + id: str + summary: list[str] | None = [] + type: ReasoningThreadItemType = Field(..., title="ReasoningThreadItemType") + + +class CommandExecutionThreadItemType(RootModel[Literal["commandExecution"]]): + root: Literal["commandExecution"] = Field( + ..., title="CommandExecutionThreadItemType" + ) + + +class CommandExecutionThreadItem(BaseModel): + aggregated_output: str | None = Field( + default=None, + alias="aggregatedOutput", + description="The command's output, aggregated from stdout and stderr.", + ) + command: str = Field(..., description="The command to be executed.") + command_actions: list[CommandAction] = Field( + ..., + alias="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.", + ) + cwd: str = Field(..., description="The command's working directory.") + duration_ms: int | None = Field( + default=None, + alias="durationMs", + description="The duration of the command execution in milliseconds.", + ) + exit_code: int | None = Field( + default=None, alias="exitCode", description="The command's exit code." + ) + id: str + process_id: str | None = Field( + default=None, + alias="processId", + description="Identifier for the underlying PTY process (when available).", + ) + status: CommandExecutionStatus + type: CommandExecutionThreadItemType = Field( + ..., title="CommandExecutionThreadItemType" + ) + + +class FileChangeThreadItemType(RootModel[Literal["fileChange"]]): + root: Literal["fileChange"] = Field(..., title="FileChangeThreadItemType") + + +class McpToolCallThreadItemType(RootModel[Literal["mcpToolCall"]]): + root: Literal["mcpToolCall"] = Field(..., title="McpToolCallThreadItemType") + + +class McpToolCallThreadItem(BaseModel): + arguments: Any + duration_ms: int | None = Field( + default=None, + alias="durationMs", + description="The duration of the MCP tool call in milliseconds.", + ) + error: McpToolCallError | None = None + id: str + result: McpToolCallResult | None = None + server: str + status: McpToolCallStatus + tool: str + type: McpToolCallThreadItemType = Field(..., title="McpToolCallThreadItemType") + + +class DynamicToolCallThreadItemType(RootModel[Literal["dynamicToolCall"]]): + root: Literal["dynamicToolCall"] = Field(..., title="DynamicToolCallThreadItemType") + + +class DynamicToolCallThreadItem(BaseModel): + arguments: Any + content_items: list[DynamicToolCallOutputContentItem] | None = Field( + default=None, alias="contentItems" + ) + duration_ms: int | None = Field( + default=None, + alias="durationMs", + description="The duration of the dynamic tool call in milliseconds.", + ) + id: str + status: DynamicToolCallStatus + success: bool | None = None + tool: str + type: DynamicToolCallThreadItemType = Field( + ..., title="DynamicToolCallThreadItemType" + ) + + +class CollabAgentToolCallThreadItemType(RootModel[Literal["collabAgentToolCall"]]): + root: Literal["collabAgentToolCall"] = Field( + ..., title="CollabAgentToolCallThreadItemType" + ) + + +class WebSearchThreadItemType(RootModel[Literal["webSearch"]]): + root: Literal["webSearch"] = Field(..., title="WebSearchThreadItemType") + + +class ImageViewThreadItemType(RootModel[Literal["imageView"]]): + root: Literal["imageView"] = Field(..., title="ImageViewThreadItemType") + + +class ImageViewThreadItem(BaseModel): + id: str + path: str + type: ImageViewThreadItemType = Field(..., title="ImageViewThreadItemType") + + +class ImageGenerationThreadItemType(RootModel[Literal["imageGeneration"]]): + root: Literal["imageGeneration"] = Field(..., title="ImageGenerationThreadItemType") + + +class ImageGenerationThreadItem(BaseModel): + id: str + result: str + revised_prompt: str | None = Field(default=None, alias="revisedPrompt") + status: str + type: ImageGenerationThreadItemType = Field( + ..., title="ImageGenerationThreadItemType" + ) + + +class EnteredReviewModeThreadItemType(RootModel[Literal["enteredReviewMode"]]): + root: Literal["enteredReviewMode"] = Field( + ..., title="EnteredReviewModeThreadItemType" + ) + + +class EnteredReviewModeThreadItem(BaseModel): + id: str + review: str + type: EnteredReviewModeThreadItemType = Field( + ..., title="EnteredReviewModeThreadItemType" + ) + + +class ExitedReviewModeThreadItemType(RootModel[Literal["exitedReviewMode"]]): + root: Literal["exitedReviewMode"] = Field( + ..., title="ExitedReviewModeThreadItemType" + ) + + +class ExitedReviewModeThreadItem(BaseModel): + id: str + review: str + type: ExitedReviewModeThreadItemType = Field( + ..., title="ExitedReviewModeThreadItemType" + ) + + +class ContextCompactionThreadItemType(RootModel[Literal["contextCompaction"]]): + root: Literal["contextCompaction"] = Field( + ..., title="ContextCompactionThreadItemType" + ) + + +class ContextCompactionThreadItem(BaseModel): + id: str + type: ContextCompactionThreadItemType = Field( + ..., title="ContextCompactionThreadItemType" + ) + + +class ThreadLoadedListParams(BaseModel): + cursor: str | None = Field( + default=None, + description="Opaque pagination cursor returned by a previous call.", + ) + limit: int | None = Field( + default=None, description="Optional page size; defaults to no limit.", ge=0 + ) + + +class ThreadLoadedListResponse(BaseModel): + data: list[str] = Field( + ..., description="Thread ids for sessions currently loaded in memory." + ) + next_cursor: str | None = Field( + default=None, + alias="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.", + ) + + +class ThreadMetadataGitInfoUpdateParams(BaseModel): + branch: str | None = Field( + default=None, + description="Omit to leave the stored branch unchanged, set to `null` to clear it, or provide a non-empty string to replace it.", + ) + origin_url: str | None = Field( + default=None, + alias="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.", + ) + sha: str | None = Field( + default=None, + description="Omit to leave the stored commit unchanged, set to `null` to clear it, or provide a non-empty string to replace it.", + ) + + +class ThreadMetadataUpdateParams(BaseModel): + git_info: ThreadMetadataGitInfoUpdateParams | None = Field( + default=None, + alias="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.", + ) + thread_id: str = Field(..., alias="threadId") + + +class ThreadNameUpdatedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + thread_name: str | None = Field(default=None, alias="threadName") + + +class ThreadReadParams(BaseModel): + include_turns: bool | None = Field( + default=False, + alias="includeTurns", + description="When true, include turns and their items from rollout history.", + ) + thread_id: str = Field(..., alias="threadId") + + +class ThreadRealtimeAudioChunk(BaseModel): + data: str + num_channels: int = Field(..., alias="numChannels", ge=0) + sample_rate: int = Field(..., alias="sampleRate", ge=0) + samples_per_channel: int | None = Field( + default=None, alias="samplesPerChannel", ge=0 + ) + + +class ThreadRealtimeClosedNotification(BaseModel): + reason: str | None = None + thread_id: str = Field(..., alias="threadId") + + +class ThreadRealtimeErrorNotification(BaseModel): + message: str + thread_id: str = Field(..., alias="threadId") + + +class ThreadRealtimeItemAddedNotification(BaseModel): + item: Any + thread_id: str = Field(..., alias="threadId") + + +class ThreadRealtimeOutputAudioDeltaNotification(BaseModel): + audio: ThreadRealtimeAudioChunk + thread_id: str = Field(..., alias="threadId") + + +class ThreadRealtimeStartedNotification(BaseModel): + session_id: str | None = Field(default=None, alias="sessionId") + thread_id: str = Field(..., alias="threadId") + + +class ThreadResumeParams(BaseModel): + approval_policy: AskForApproval | None = Field(default=None, alias="approvalPolicy") + base_instructions: str | None = Field(default=None, alias="baseInstructions") + config: dict[str, Any] | None = None + cwd: str | None = None + developer_instructions: str | None = Field( + default=None, alias="developerInstructions" + ) + model: str | None = Field( + default=None, + description="Configuration overrides for the resumed thread, if any.", + ) + model_provider: str | None = Field(default=None, alias="modelProvider") + personality: Personality | None = None + sandbox: SandboxMode | None = None + service_tier: ServiceTier | None = Field(default=None, alias="serviceTier") + thread_id: str = Field(..., alias="threadId") + + +class ThreadRollbackParams(BaseModel): + num_turns: int = Field( + ..., + alias="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.", + ge=0, + ) + thread_id: str = Field(..., alias="threadId") + + +class ThreadSetNameParams(BaseModel): + name: str + thread_id: str = Field(..., alias="threadId") + + +class ThreadSetNameResponse(BaseModel): + pass + + +class ThreadSortKey(StrEnum): + created_at = "created_at" + updated_at = "updated_at" + + +class ThreadSourceKind(StrEnum): + cli = "cli" + vscode = "vscode" + exec = "exec" + app_server = "appServer" + sub_agent = "subAgent" + sub_agent_review = "subAgentReview" + sub_agent_compact = "subAgentCompact" + sub_agent_thread_spawn = "subAgentThreadSpawn" + sub_agent_other = "subAgentOther" + unknown = "unknown" + + +class ThreadStartParams(BaseModel): + approval_policy: AskForApproval | None = Field(default=None, alias="approvalPolicy") + base_instructions: str | None = Field(default=None, alias="baseInstructions") + config: dict[str, Any] | None = None + cwd: str | None = None + developer_instructions: str | None = Field( + default=None, alias="developerInstructions" + ) + ephemeral: bool | None = None + model: str | None = None + model_provider: str | None = Field(default=None, alias="modelProvider") + personality: Personality | None = None + sandbox: SandboxMode | None = None + service_name: str | None = Field(default=None, alias="serviceName") + service_tier: ServiceTier | None = Field(default=None, alias="serviceTier") + + +class NotLoadedThreadStatusType(RootModel[Literal["notLoaded"]]): + root: Literal["notLoaded"] = Field(..., title="NotLoadedThreadStatusType") + + +class NotLoadedThreadStatus(BaseModel): + type: NotLoadedThreadStatusType = Field(..., title="NotLoadedThreadStatusType") + + +class IdleThreadStatusType(RootModel[Literal["idle"]]): + root: Literal["idle"] = Field(..., title="IdleThreadStatusType") + + +class IdleThreadStatus(BaseModel): + type: IdleThreadStatusType = Field(..., title="IdleThreadStatusType") + + +class SystemErrorThreadStatusType(RootModel[Literal["systemError"]]): + root: Literal["systemError"] = Field(..., title="SystemErrorThreadStatusType") + + +class SystemErrorThreadStatus(BaseModel): + type: SystemErrorThreadStatusType = Field(..., title="SystemErrorThreadStatusType") + + +class ActiveThreadStatusType(RootModel[Literal["active"]]): + root: Literal["active"] = Field(..., title="ActiveThreadStatusType") + + +class ActiveThreadStatus(BaseModel): + active_flags: list[ThreadActiveFlag] = Field(..., alias="activeFlags") + type: ActiveThreadStatusType = Field(..., title="ActiveThreadStatusType") + + +class ThreadStatus( + RootModel[ + NotLoadedThreadStatus + | IdleThreadStatus + | SystemErrorThreadStatus + | ActiveThreadStatus + ] +): + root: ( + NotLoadedThreadStatus + | IdleThreadStatus + | SystemErrorThreadStatus + | ActiveThreadStatus + ) + + +class ThreadStatusChangedNotification(BaseModel): + status: ThreadStatus + thread_id: str = Field(..., alias="threadId") + + +class ThreadUnarchiveParams(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadUnarchivedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadUnsubscribeParams(BaseModel): + thread_id: str = Field(..., alias="threadId") + + +class ThreadUnsubscribeStatus(StrEnum): + not_loaded = "notLoaded" + not_subscribed = "notSubscribed" + unsubscribed = "unsubscribed" class TokenUsage(BaseModel): @@ -3445,285 +4254,962 @@ class TokenUsage(BaseModel): total_tokens: int -class McpInvocation(BaseModel): - arguments: Any | None = Field( - default=None, description='Arguments to the tool call.' +class TokenUsageBreakdown(BaseModel): + cached_input_tokens: int = Field(..., alias="cachedInputTokens") + input_tokens: int = Field(..., alias="inputTokens") + output_tokens: int = Field(..., alias="outputTokens") + reasoning_output_tokens: int = Field(..., alias="reasoningOutputTokens") + total_tokens: int = Field(..., alias="totalTokens") + + +class TokenUsageInfo(BaseModel): + last_token_usage: TokenUsage + model_context_window: int | None = None + total_token_usage: TokenUsage + + +class Tool(BaseModel): + field_meta: Any | None = Field(None, alias="_meta") + annotations: Any | None = None + description: str | None = None + icons: list[Any] | None = None + input_schema: Any = Field(..., alias="inputSchema") + name: str + output_schema: Any | None = Field(None, alias="outputSchema") + title: str | None = None + + +class TurnAbortReason(StrEnum): + interrupted = "interrupted" + replaced = "replaced" + review_ended = "review_ended" + + +class TurnDiffUpdatedNotification(BaseModel): + diff: str + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class TurnError(BaseModel): + additional_details: str | None = Field(default=None, alias="additionalDetails") + codex_error_info: CodexErrorInfo | None = Field( + default=None, alias="codexErrorInfo" ) - server: str = Field( - ..., description='Name of the MCP server as defined in the config.' - ) - tool: str = Field(..., description='Name of the tool as given by the MCP server.') - - -class ErrorEventMsgType(RootModel[Literal['error']]): - root: Literal['error'] = Field(..., title='ErrorEventMsgType') - - -class ErrorEventMsg(BaseModel): - codex_error_info: CodexErrorInfo | None = None message: str - type: ErrorEventMsgType = Field(..., title='ErrorEventMsgType') -class WarningEventMsgType(RootModel[Literal['warning']]): - root: Literal['warning'] = Field(..., title='WarningEventMsgType') +class TurnInterruptParams(BaseModel): + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") -class WarningEventMsg(BaseModel): - message: str - type: WarningEventMsgType = Field(..., title='WarningEventMsgType') +class TurnInterruptResponse(BaseModel): + pass -class RealtimeConversationStartedEventMsgType( - RootModel[Literal['realtime_conversation_started']] +class UserMessageTurnItemType(RootModel[Literal["UserMessage"]]): + root: Literal["UserMessage"] = Field(..., title="UserMessageTurnItemType") + + +class AgentMessageTurnItemType(RootModel[Literal["AgentMessage"]]): + root: Literal["AgentMessage"] = Field(..., title="AgentMessageTurnItemType") + + +class AgentMessageTurnItem(BaseModel): + content: list[AgentMessageContent] + id: str + phase: MessagePhase | None = Field( + default=None, + description="Optional phase metadata carried through from `ResponseItem::Message`.\n\nThis is currently used by TUI rendering to distinguish mid-turn commentary from a final answer and avoid status-indicator jitter.", + ) + type: AgentMessageTurnItemType = Field(..., title="AgentMessageTurnItemType") + + +class PlanTurnItemType(RootModel[Literal["Plan"]]): + root: Literal["Plan"] = Field(..., title="PlanTurnItemType") + + +class PlanTurnItem(BaseModel): + id: str + text: str + type: PlanTurnItemType = Field(..., title="PlanTurnItemType") + + +class ReasoningTurnItemType(RootModel[Literal["Reasoning"]]): + root: Literal["Reasoning"] = Field(..., title="ReasoningTurnItemType") + + +class ReasoningTurnItem(BaseModel): + id: str + raw_content: list[str] | None = [] + summary_text: list[str] + type: ReasoningTurnItemType = Field(..., title="ReasoningTurnItemType") + + +class WebSearchTurnItemType(RootModel[Literal["WebSearch"]]): + root: Literal["WebSearch"] = Field(..., title="WebSearchTurnItemType") + + +class WebSearchTurnItem(BaseModel): + action: ResponsesApiWebSearchAction + id: str + query: str + type: WebSearchTurnItemType = Field(..., title="WebSearchTurnItemType") + + +class ImageGenerationTurnItemType(RootModel[Literal["ImageGeneration"]]): + root: Literal["ImageGeneration"] = Field(..., title="ImageGenerationTurnItemType") + + +class ImageGenerationTurnItem(BaseModel): + id: str + result: str + revised_prompt: str | None = None + saved_path: str | None = None + status: str + type: ImageGenerationTurnItemType = Field(..., title="ImageGenerationTurnItemType") + + +class ContextCompactionTurnItemType(RootModel[Literal["ContextCompaction"]]): + root: Literal["ContextCompaction"] = Field( + ..., title="ContextCompactionTurnItemType" + ) + + +class ContextCompactionTurnItem(BaseModel): + id: str + type: ContextCompactionTurnItemType = Field( + ..., title="ContextCompactionTurnItemType" + ) + + +class TurnPlanStepStatus(StrEnum): + pending = "pending" + in_progress = "inProgress" + completed = "completed" + + +class TurnStatus(StrEnum): + completed = "completed" + interrupted = "interrupted" + failed = "failed" + in_progress = "inProgress" + + +class TurnSteerResponse(BaseModel): + turn_id: str = Field(..., alias="turnId") + + +class TextUserInputType(RootModel[Literal["text"]]): + root: Literal["text"] = Field(..., title="TextUserInputType") + + +class TextUserInput(BaseModel): + text: str + text_elements: list[TextElement] | None = Field( + default_factory=list, + description="UI-defined spans within `text` used to render or persist special elements.", + ) + type: TextUserInputType = Field(..., title="TextUserInputType") + + +class ImageUserInputType(RootModel[Literal["image"]]): + root: Literal["image"] = Field(..., title="ImageUserInputType") + + +class ImageUserInput(BaseModel): + type: ImageUserInputType = Field(..., title="ImageUserInputType") + url: str + + +class LocalImageUserInputType(RootModel[Literal["localImage"]]): + root: Literal["localImage"] = Field(..., title="LocalImageUserInputType") + + +class LocalImageUserInput(BaseModel): + path: str + type: LocalImageUserInputType = Field(..., title="LocalImageUserInputType") + + +class SkillUserInputType(RootModel[Literal["skill"]]): + root: Literal["skill"] = Field(..., title="SkillUserInputType") + + +class SkillUserInput(BaseModel): + name: str + path: str + type: SkillUserInputType = Field(..., title="SkillUserInputType") + + +class MentionUserInputType(RootModel[Literal["mention"]]): + root: Literal["mention"] = Field(..., title="MentionUserInputType") + + +class MentionUserInput(BaseModel): + name: str + path: str + type: MentionUserInputType = Field(..., title="MentionUserInputType") + + +class UserInput( + RootModel[ + TextUserInput + | ImageUserInput + | LocalImageUserInput + | SkillUserInput + | MentionUserInput + ] ): - root: Literal['realtime_conversation_started'] = Field( - ..., title='RealtimeConversationStartedEventMsgType' + root: ( + TextUserInput + | ImageUserInput + | LocalImageUserInput + | SkillUserInput + | MentionUserInput ) -class RealtimeConversationStartedEventMsg(BaseModel): - session_id: str | None = None - type: RealtimeConversationStartedEventMsgType = Field( - ..., title='RealtimeConversationStartedEventMsgType' +class Verbosity(StrEnum): + low = "low" + medium = "medium" + high = "high" + + +class SearchWebSearchActionType(RootModel[Literal["search"]]): + root: Literal["search"] = Field(..., title="SearchWebSearchActionType") + + +class SearchWebSearchAction(BaseModel): + queries: list[str] | None = None + query: str | None = None + type: SearchWebSearchActionType = Field(..., title="SearchWebSearchActionType") + + +class OpenPageWebSearchActionType(RootModel[Literal["openPage"]]): + root: Literal["openPage"] = Field(..., title="OpenPageWebSearchActionType") + + +class OpenPageWebSearchAction(BaseModel): + type: OpenPageWebSearchActionType = Field(..., title="OpenPageWebSearchActionType") + url: str | None = None + + +class FindInPageWebSearchActionType(RootModel[Literal["findInPage"]]): + root: Literal["findInPage"] = Field(..., title="FindInPageWebSearchActionType") + + +class FindInPageWebSearchAction(BaseModel): + pattern: str | None = None + type: FindInPageWebSearchActionType = Field( + ..., title="FindInPageWebSearchActionType" ) + url: str | None = None -class RealtimeConversationRealtimeEventMsgType( - RootModel[Literal['realtime_conversation_realtime']] +class OtherWebSearchActionType(RootModel[Literal["other"]]): + root: Literal["other"] = Field(..., title="OtherWebSearchActionType") + + +class OtherWebSearchAction(BaseModel): + type: OtherWebSearchActionType = Field(..., title="OtherWebSearchActionType") + + +class WebSearchAction( + RootModel[ + SearchWebSearchAction + | OpenPageWebSearchAction + | FindInPageWebSearchAction + | OtherWebSearchAction + ] ): - root: Literal['realtime_conversation_realtime'] = Field( - ..., title='RealtimeConversationRealtimeEventMsgType' + root: ( + SearchWebSearchAction + | OpenPageWebSearchAction + | FindInPageWebSearchAction + | OtherWebSearchAction ) -class RealtimeConversationClosedEventMsgType( - RootModel[Literal['realtime_conversation_closed']] -): - root: Literal['realtime_conversation_closed'] = Field( - ..., title='RealtimeConversationClosedEventMsgType' +class WebSearchContextSize(StrEnum): + low = "low" + medium = "medium" + high = "high" + + +class WebSearchLocation(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + city: str | None = None + country: str | None = None + region: str | None = None + timezone: str | None = None + + +class WebSearchMode(StrEnum): + disabled = "disabled" + cached = "cached" + live = "live" + + +class WebSearchToolConfig(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + allowed_domains: list[str] | None = None + context_size: WebSearchContextSize | None = None + location: WebSearchLocation | None = None + + +class WindowsSandboxSetupMode(StrEnum): + elevated = "elevated" + unelevated = "unelevated" + + +class WindowsSandboxSetupStartParams(BaseModel): + cwd: AbsolutePathBuf | None = None + mode: WindowsSandboxSetupMode + + +class WindowsSandboxSetupStartResponse(BaseModel): + started: bool + + +class WindowsWorldWritableWarningNotification(BaseModel): + extra_count: int = Field(..., alias="extraCount", ge=0) + failed_scan: bool = Field(..., alias="failedScan") + sample_paths: list[str] = Field(..., alias="samplePaths") + + +class WriteStatus(StrEnum): + ok = "ok" + ok_overridden = "okOverridden" + + +class ChatgptAccount(BaseModel): + email: str + plan_type: PlanType = Field(..., alias="planType") + type: ChatgptAccountType = Field(..., title="ChatgptAccountType") + + +class Account(RootModel[ApiKeyAccount | ChatgptAccount]): + root: ApiKeyAccount | ChatgptAccount + + +class AccountUpdatedNotification(BaseModel): + auth_mode: AuthMode | None = Field(default=None, alias="authMode") + plan_type: PlanType | None = Field(default=None, alias="planType") + + +class AppConfig(BaseModel): + default_tools_approval_mode: AppToolApproval | None = None + default_tools_enabled: bool | None = None + destructive_enabled: bool | None = None + enabled: bool | None = True + open_world_enabled: bool | None = None + tools: AppToolsConfig | None = None + + +class AppMetadata(BaseModel): + categories: list[str] | None = None + developer: str | None = None + first_party_requires_install: bool | None = Field( + default=None, alias="firstPartyRequiresInstall" + ) + first_party_type: str | None = Field(default=None, alias="firstPartyType") + review: AppReview | None = None + screenshots: list[AppScreenshot] | None = None + seo_description: str | None = Field(default=None, alias="seoDescription") + show_in_composer_when_unlinked: bool | None = Field( + default=None, alias="showInComposerWhenUnlinked" + ) + sub_categories: list[str] | None = Field(default=None, alias="subCategories") + version: str | None = None + version_id: str | None = Field(default=None, alias="versionId") + version_notes: str | None = Field(default=None, alias="versionNotes") + + +class AppsConfig(BaseModel): + field_default: AppsDefaultConfig | None = Field(default=None, alias="_default") + + +class CancelLoginAccountResponse(BaseModel): + status: CancelLoginAccountStatus + + +class InitializeClientRequest(BaseModel): + id: RequestId + method: InitializeClientRequestMethod = Field( + ..., title="InitializeClientRequestMethod" + ) + params: InitializeParams + + +class ThreadStartClientRequest(BaseModel): + id: RequestId + method: ThreadStartClientRequestMethod = Field( + ..., title="Thread/startClientRequestMethod" + ) + params: ThreadStartParams + + +class ThreadResumeClientRequest(BaseModel): + id: RequestId + method: ThreadResumeClientRequestMethod = Field( + ..., title="Thread/resumeClientRequestMethod" + ) + params: ThreadResumeParams + + +class ThreadForkClientRequest(BaseModel): + id: RequestId + method: ThreadForkClientRequestMethod = Field( + ..., title="Thread/forkClientRequestMethod" + ) + params: ThreadForkParams + + +class ThreadArchiveClientRequest(BaseModel): + id: RequestId + method: ThreadArchiveClientRequestMethod = Field( + ..., title="Thread/archiveClientRequestMethod" + ) + params: ThreadArchiveParams + + +class ThreadUnsubscribeClientRequest(BaseModel): + id: RequestId + method: ThreadUnsubscribeClientRequestMethod = Field( + ..., title="Thread/unsubscribeClientRequestMethod" + ) + params: ThreadUnsubscribeParams + + +class ThreadNameSetClientRequest(BaseModel): + id: RequestId + method: ThreadNameSetClientRequestMethod = Field( + ..., title="Thread/name/setClientRequestMethod" + ) + params: ThreadSetNameParams + + +class ThreadMetadataUpdateClientRequest(BaseModel): + id: RequestId + method: ThreadMetadataUpdateClientRequestMethod = Field( + ..., title="Thread/metadata/updateClientRequestMethod" + ) + params: ThreadMetadataUpdateParams + + +class ThreadUnarchiveClientRequest(BaseModel): + id: RequestId + method: ThreadUnarchiveClientRequestMethod = Field( + ..., title="Thread/unarchiveClientRequestMethod" + ) + params: ThreadUnarchiveParams + + +class ThreadCompactStartClientRequest(BaseModel): + id: RequestId + method: ThreadCompactStartClientRequestMethod = Field( + ..., title="Thread/compact/startClientRequestMethod" + ) + params: ThreadCompactStartParams + + +class ThreadRollbackClientRequest(BaseModel): + id: RequestId + method: ThreadRollbackClientRequestMethod = Field( + ..., title="Thread/rollbackClientRequestMethod" + ) + params: ThreadRollbackParams + + +class ThreadLoadedListClientRequest(BaseModel): + id: RequestId + method: ThreadLoadedListClientRequestMethod = Field( + ..., title="Thread/loaded/listClientRequestMethod" + ) + params: ThreadLoadedListParams + + +class ThreadReadClientRequest(BaseModel): + id: RequestId + method: ThreadReadClientRequestMethod = Field( + ..., title="Thread/readClientRequestMethod" + ) + params: ThreadReadParams + + +class SkillsListClientRequest(BaseModel): + id: RequestId + method: SkillsListClientRequestMethod = Field( + ..., title="Skills/listClientRequestMethod" + ) + params: SkillsListParams + + +class PluginListClientRequest(BaseModel): + id: RequestId + method: PluginListClientRequestMethod = Field( + ..., title="Plugin/listClientRequestMethod" + ) + params: PluginListParams + + +class SkillsRemoteListClientRequest(BaseModel): + id: RequestId + method: SkillsRemoteListClientRequestMethod = Field( + ..., title="Skills/remote/listClientRequestMethod" + ) + params: SkillsRemoteReadParams + + +class SkillsRemoteExportClientRequest(BaseModel): + id: RequestId + method: SkillsRemoteExportClientRequestMethod = Field( + ..., title="Skills/remote/exportClientRequestMethod" + ) + params: SkillsRemoteWriteParams + + +class AppListClientRequest(BaseModel): + id: RequestId + method: AppListClientRequestMethod = Field(..., title="App/listClientRequestMethod") + params: AppsListParams + + +class SkillsConfigWriteClientRequest(BaseModel): + id: RequestId + method: SkillsConfigWriteClientRequestMethod = Field( + ..., title="Skills/config/writeClientRequestMethod" + ) + params: SkillsConfigWriteParams + + +class PluginInstallClientRequest(BaseModel): + id: RequestId + method: PluginInstallClientRequestMethod = Field( + ..., title="Plugin/installClientRequestMethod" + ) + params: PluginInstallParams + + +class TurnInterruptClientRequest(BaseModel): + id: RequestId + method: TurnInterruptClientRequestMethod = Field( + ..., title="Turn/interruptClientRequestMethod" + ) + params: TurnInterruptParams + + +class ModelListClientRequest(BaseModel): + id: RequestId + method: ModelListClientRequestMethod = Field( + ..., title="Model/listClientRequestMethod" + ) + params: ModelListParams + + +class ExperimentalFeatureListClientRequest(BaseModel): + id: RequestId + method: ExperimentalFeatureListClientRequestMethod = Field( + ..., title="ExperimentalFeature/listClientRequestMethod" + ) + params: ExperimentalFeatureListParams + + +class McpServerOauthLoginClientRequest(BaseModel): + id: RequestId + method: McpServerOauthLoginClientRequestMethod = Field( + ..., title="McpServer/oauth/loginClientRequestMethod" + ) + params: McpServerOauthLoginParams + + +class ConfigMcpServerReloadClientRequest(BaseModel): + id: RequestId + method: ConfigMcpServerReloadClientRequestMethod = Field( + ..., title="Config/mcpServer/reloadClientRequestMethod" + ) + params: None = None + + +class McpServerStatusListClientRequest(BaseModel): + id: RequestId + method: McpServerStatusListClientRequestMethod = Field( + ..., title="McpServerStatus/listClientRequestMethod" + ) + params: ListMcpServerStatusParams + + +class WindowsSandboxSetupStartClientRequest(BaseModel): + id: RequestId + method: WindowsSandboxSetupStartClientRequestMethod = Field( + ..., title="WindowsSandbox/setupStartClientRequestMethod" + ) + params: WindowsSandboxSetupStartParams + + +class AccountLoginStartClientRequest(BaseModel): + id: RequestId + method: AccountLoginStartClientRequestMethod = Field( + ..., title="Account/login/startClientRequestMethod" + ) + params: LoginAccountParams + + +class AccountLoginCancelClientRequest(BaseModel): + id: RequestId + method: AccountLoginCancelClientRequestMethod = Field( + ..., title="Account/login/cancelClientRequestMethod" + ) + params: CancelLoginAccountParams + + +class AccountLogoutClientRequest(BaseModel): + id: RequestId + method: AccountLogoutClientRequestMethod = Field( + ..., title="Account/logoutClientRequestMethod" + ) + params: None = None + + +class AccountRateLimitsReadClientRequest(BaseModel): + id: RequestId + method: AccountRateLimitsReadClientRequestMethod = Field( + ..., title="Account/rateLimits/readClientRequestMethod" + ) + params: None = None + + +class FeedbackUploadClientRequest(BaseModel): + id: RequestId + method: FeedbackUploadClientRequestMethod = Field( + ..., title="Feedback/uploadClientRequestMethod" + ) + params: FeedbackUploadParams + + +class CommandExecWriteClientRequest(BaseModel): + id: RequestId + method: CommandExecWriteClientRequestMethod = Field( + ..., title="Command/exec/writeClientRequestMethod" + ) + params: CommandExecWriteParams + + +class CommandExecTerminateClientRequest(BaseModel): + id: RequestId + method: CommandExecTerminateClientRequestMethod = Field( + ..., title="Command/exec/terminateClientRequestMethod" + ) + params: CommandExecTerminateParams + + +class ConfigReadClientRequest(BaseModel): + id: RequestId + method: ConfigReadClientRequestMethod = Field( + ..., title="Config/readClientRequestMethod" + ) + params: ConfigReadParams + + +class ExternalAgentConfigDetectClientRequest(BaseModel): + id: RequestId + method: ExternalAgentConfigDetectClientRequestMethod = Field( + ..., title="ExternalAgentConfig/detectClientRequestMethod" + ) + params: ExternalAgentConfigDetectParams + + +class ConfigRequirementsReadClientRequest(BaseModel): + id: RequestId + method: ConfigRequirementsReadClientRequestMethod = Field( + ..., title="ConfigRequirements/readClientRequestMethod" + ) + params: None = None + + +class AccountReadClientRequest(BaseModel): + id: RequestId + method: AccountReadClientRequestMethod = Field( + ..., title="Account/readClientRequestMethod" + ) + params: GetAccountParams + + +class FuzzyFileSearchClientRequest(BaseModel): + id: RequestId + method: FuzzyFileSearchClientRequestMethod = Field( + ..., title="FuzzyFileSearchClientRequestMethod" + ) + params: FuzzyFileSearchParams + + +class CollabAgentRef(BaseModel): + agent_nickname: str | None = Field( + default=None, + description="Optional nickname assigned to an AgentControl-spawned sub-agent.", + ) + agent_role: str | None = Field( + default=None, + description="Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.", + ) + thread_id: ThreadId = Field(..., description="Thread ID of the receiver/new agent.") + + +class CollabAgentState(BaseModel): + message: str | None = None + status: CollabAgentStatus + + +class CollabAgentStatusEntry(BaseModel): + agent_nickname: str | None = Field( + default=None, + description="Optional nickname assigned to an AgentControl-spawned sub-agent.", + ) + agent_role: str | None = Field( + default=None, + description="Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.", + ) + status: AgentStatus = Field(..., description="Last known status of the agent.") + thread_id: ThreadId = Field(..., description="Thread ID of the receiver/new agent.") + + +class CollaborationMode(BaseModel): + mode: ModeKind + settings: Settings + + +class CollaborationModeMask(BaseModel): + mode: ModeKind | None = None + model: str | None = None + name: str + reasoning_effort: ReasoningEffort | None = None + + +class CommandExecOutputDeltaNotification(BaseModel): + cap_reached: bool = Field( + ..., + alias="capReached", + description="`true` on the final streamed chunk for a stream when `outputBytesCap` truncated later output on that stream.", + ) + delta_base64: str = Field( + ..., alias="deltaBase64", description="Base64-encoded output bytes." + ) + process_id: str = Field( + ..., + alias="processId", + description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.", + ) + stream: CommandExecOutputStream = Field( + ..., description="Output stream for this chunk." ) -class RealtimeConversationClosedEventMsg(BaseModel): - reason: str | None = None - type: RealtimeConversationClosedEventMsgType = Field( - ..., title='RealtimeConversationClosedEventMsgType' +class CommandExecParams(BaseModel): + command: list[str] = Field( + ..., description="Command argv vector. Empty arrays are rejected." + ) + cwd: str | None = Field( + default=None, + description="Optional working directory. Defaults to the server cwd.", + ) + disable_output_cap: bool | None = Field( + default=None, + alias="disableOutputCap", + description="Disable stdout/stderr capture truncation for this request.\n\nCannot be combined with `outputBytesCap`.", + ) + disable_timeout: bool | None = Field( + default=None, + alias="disableTimeout", + description="Disable the timeout entirely for this request.\n\nCannot be combined with `timeoutMs`.", + ) + env: dict[str, Any] | None = Field( + default=None, + 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.", + ) + output_bytes_cap: int | None = Field( + default=None, + alias="outputBytesCap", + description="Optional per-stream stdout/stderr capture cap in bytes.\n\nWhen omitted, the server default applies. Cannot be combined with `disableOutputCap`.", + ge=0, + ) + process_id: str | None = Field( + default=None, + alias="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.", + ) + sandbox_policy: SandboxPolicy | None = Field( + default=None, + alias="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.", + ) + size: CommandExecTerminalSize | None = Field( + default=None, + description="Optional initial PTY size in character cells. Only valid when `tty` is true.", + ) + stream_stdin: bool | None = Field( + default=None, + alias="streamStdin", + description="Allow follow-up `command/exec/write` requests to write stdin bytes.\n\nRequires a client-supplied `processId`.", + ) + stream_stdout_stderr: bool | None = Field( + default=None, + alias="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`.", + ) + timeout_ms: int | None = Field( + default=None, + alias="timeoutMs", + description="Optional timeout in milliseconds.\n\nWhen omitted, the server default applies. Cannot be combined with `disableTimeout`.", + ) + tty: bool | None = Field( + default=None, + description="Enable PTY mode.\n\nThis implies `streamStdin` and `streamStdoutStderr`.", ) -class ModelRerouteEventMsgType(RootModel[Literal['model_reroute']]): - root: Literal['model_reroute'] = Field(..., title='ModelRerouteEventMsgType') +class CommandExecResizeParams(BaseModel): + process_id: str = Field( + ..., + alias="processId", + description="Client-supplied, connection-scoped `processId` from the original `command/exec` request.", + ) + size: CommandExecTerminalSize = Field( + ..., description="New PTY size in character cells." + ) + + +class ConfigEdit(BaseModel): + key_path: str = Field(..., alias="keyPath") + merge_strategy: MergeStrategy = Field(..., alias="mergeStrategy") + value: Any + + +class ConfigLayer(BaseModel): + config: Any + disabled_reason: str | None = Field(default=None, alias="disabledReason") + name: ConfigLayerSource + version: str + + +class ConfigLayerMetadata(BaseModel): + name: ConfigLayerSource + version: str + + +class ConfigRequirements(BaseModel): + allowed_approval_policies: list[AskForApproval] | None = Field( + default=None, alias="allowedApprovalPolicies" + ) + allowed_sandbox_modes: list[SandboxMode] | None = Field( + default=None, alias="allowedSandboxModes" + ) + allowed_web_search_modes: list[WebSearchMode] | None = Field( + default=None, alias="allowedWebSearchModes" + ) + enforce_residency: ResidencyRequirement | None = Field( + default=None, alias="enforceResidency" + ) + feature_requirements: dict[str, Any] | None = Field( + default=None, alias="featureRequirements" + ) + + +class ConfigRequirementsReadResponse(BaseModel): + requirements: ConfigRequirements | None = Field( + default=None, + description="Null if no requirements are configured (e.g. no requirements.toml/MDM entries).", + ) + + +class ConfigValueWriteParams(BaseModel): + expected_version: str | None = Field(default=None, alias="expectedVersion") + file_path: str | None = Field( + default=None, + alias="filePath", + description="Path to the config file to write; defaults to the user's `config.toml` when omitted.", + ) + key_path: str = Field(..., alias="keyPath") + merge_strategy: MergeStrategy = Field(..., alias="mergeStrategy") + value: Any + + +class ConfigWarningNotification(BaseModel): + details: str | None = Field( + default=None, description="Optional extra guidance or error details." + ) + path: str | None = Field( + default=None, + description="Optional path to the config file that triggered the warning.", + ) + range: TextRange | None = Field( + default=None, + description="Optional range for the error location inside the config file.", + ) + summary: str = Field(..., description="Concise summary of the warning.") + + +class ErrorNotification(BaseModel): + error: TurnError + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + will_retry: bool = Field(..., alias="willRetry") class ModelRerouteEventMsg(BaseModel): from_model: str reason: ModelRerouteReason to_model: str - type: ModelRerouteEventMsgType = Field(..., title='ModelRerouteEventMsgType') - - -class ContextCompactedEventMsgType(RootModel[Literal['context_compacted']]): - root: Literal['context_compacted'] = Field( - ..., title='ContextCompactedEventMsgType' - ) - - -class ContextCompactedEventMsg(BaseModel): - type: ContextCompactedEventMsgType = Field( - ..., title='ContextCompactedEventMsgType' - ) - - -class ThreadRolledBackEventMsgType(RootModel[Literal['thread_rolled_back']]): - root: Literal['thread_rolled_back'] = Field( - ..., title='ThreadRolledBackEventMsgType' - ) - - -class ThreadRolledBackEventMsg(BaseModel): - num_turns: int = Field( - ..., description='Number of user turns that were removed from context.', ge=0 - ) - type: ThreadRolledBackEventMsgType = Field( - ..., title='ThreadRolledBackEventMsgType' - ) - - -class TaskStartedEventMsgType(RootModel[Literal['task_started']]): - root: Literal['task_started'] = Field(..., title='TaskStartedEventMsgType') + type: ModelRerouteEventMsgType = Field(..., title="ModelRerouteEventMsgType") class TaskStartedEventMsg(BaseModel): - collaboration_mode_kind: ModeKind | None = 'default' + collaboration_mode_kind: ModeKind | None = "default" model_context_window: int | None = None turn_id: str - type: TaskStartedEventMsgType = Field(..., title='TaskStartedEventMsgType') - - -class TaskCompleteEventMsgType(RootModel[Literal['task_complete']]): - root: Literal['task_complete'] = Field(..., title='TaskCompleteEventMsgType') - - -class TaskCompleteEventMsg(BaseModel): - last_agent_message: str | None = None - turn_id: str - type: TaskCompleteEventMsgType = Field(..., title='TaskCompleteEventMsgType') - - -class TokenCountEventMsgType(RootModel[Literal['token_count']]): - root: Literal['token_count'] = Field(..., title='TokenCountEventMsgType') - - -class AgentMessageEventMsgType(RootModel[Literal['agent_message']]): - root: Literal['agent_message'] = Field(..., title='AgentMessageEventMsgType') + type: TaskStartedEventMsgType = Field(..., title="TaskStartedEventMsgType") class AgentMessageEventMsg(BaseModel): message: str phase: MessagePhase | None = None - type: AgentMessageEventMsgType = Field(..., title='AgentMessageEventMsgType') - - -class UserMessageEventMsgType(RootModel[Literal['user_message']]): - root: Literal['user_message'] = Field(..., title='UserMessageEventMsgType') + type: AgentMessageEventMsgType = Field(..., title="AgentMessageEventMsgType") class UserMessageEventMsg(BaseModel): images: list[str] | None = Field( default=None, - description='Image URLs sourced from `UserInput::Image`. These are safe to replay in legacy UI history events and correspond to images sent to the model.', + description="Image URLs sourced from `UserInput::Image`. These are safe to replay in legacy UI history events and correspond to images sent to the model.", ) local_images: list[str] | None = Field( default=[], - description='Local file paths sourced from `UserInput::LocalImage`. These are kept so the UI can reattach images when editing history, and should not be sent to the model or treated as API-ready URLs.', + description="Local file paths sourced from `UserInput::LocalImage`. These are kept so the UI can reattach images when editing history, and should not be sent to the model or treated as API-ready URLs.", ) message: str text_elements: list[TextElement] | None = Field( default_factory=list, - description='UI-defined spans within `message` used to render or persist special elements.', - ) - type: UserMessageEventMsgType = Field(..., title='UserMessageEventMsgType') - - -class AgentMessageDeltaEventMsgType(RootModel[Literal['agent_message_delta']]): - root: Literal['agent_message_delta'] = Field( - ..., title='AgentMessageDeltaEventMsgType' - ) - - -class AgentMessageDeltaEventMsg(BaseModel): - delta: str - type: AgentMessageDeltaEventMsgType = Field( - ..., title='AgentMessageDeltaEventMsgType' - ) - - -class AgentReasoningEventMsgType(RootModel[Literal['agent_reasoning']]): - root: Literal['agent_reasoning'] = Field(..., title='AgentReasoningEventMsgType') - - -class AgentReasoningEventMsg(BaseModel): - text: str - type: AgentReasoningEventMsgType = Field(..., title='AgentReasoningEventMsgType') - - -class AgentReasoningDeltaEventMsgType(RootModel[Literal['agent_reasoning_delta']]): - root: Literal['agent_reasoning_delta'] = Field( - ..., title='AgentReasoningDeltaEventMsgType' - ) - - -class AgentReasoningDeltaEventMsg(BaseModel): - delta: str - type: AgentReasoningDeltaEventMsgType = Field( - ..., title='AgentReasoningDeltaEventMsgType' - ) - - -class AgentReasoningRawContentEventMsgType( - RootModel[Literal['agent_reasoning_raw_content']] -): - root: Literal['agent_reasoning_raw_content'] = Field( - ..., title='AgentReasoningRawContentEventMsgType' - ) - - -class AgentReasoningRawContentEventMsg(BaseModel): - text: str - type: AgentReasoningRawContentEventMsgType = Field( - ..., title='AgentReasoningRawContentEventMsgType' - ) - - -class AgentReasoningRawContentDeltaEventMsgType( - RootModel[Literal['agent_reasoning_raw_content_delta']] -): - root: Literal['agent_reasoning_raw_content_delta'] = Field( - ..., title='AgentReasoningRawContentDeltaEventMsgType' - ) - - -class AgentReasoningRawContentDeltaEventMsg(BaseModel): - delta: str - type: AgentReasoningRawContentDeltaEventMsgType = Field( - ..., title='AgentReasoningRawContentDeltaEventMsgType' - ) - - -class AgentReasoningSectionBreakEventMsgType( - RootModel[Literal['agent_reasoning_section_break']] -): - root: Literal['agent_reasoning_section_break'] = Field( - ..., title='AgentReasoningSectionBreakEventMsgType' - ) - - -class AgentReasoningSectionBreakEventMsg(BaseModel): - item_id: str | None = '' - summary_index: int | None = 0 - type: AgentReasoningSectionBreakEventMsgType = Field( - ..., title='AgentReasoningSectionBreakEventMsgType' - ) - - -class SessionConfiguredEventMsgType(RootModel[Literal['session_configured']]): - root: Literal['session_configured'] = Field( - ..., title='SessionConfiguredEventMsgType' - ) - - -class ThreadNameUpdatedEventMsgType(RootModel[Literal['thread_name_updated']]): - root: Literal['thread_name_updated'] = Field( - ..., title='ThreadNameUpdatedEventMsgType' + description="UI-defined spans within `message` used to render or persist special elements.", ) + type: UserMessageEventMsgType = Field(..., title="UserMessageEventMsgType") class ThreadNameUpdatedEventMsg(BaseModel): thread_id: ThreadId thread_name: str | None = None type: ThreadNameUpdatedEventMsgType = Field( - ..., title='ThreadNameUpdatedEventMsgType' - ) - - -class McpStartupUpdateEventMsgType(RootModel[Literal['mcp_startup_update']]): - root: Literal['mcp_startup_update'] = Field( - ..., title='McpStartupUpdateEventMsgType' + ..., title="ThreadNameUpdatedEventMsgType" ) class McpStartupUpdateEventMsg(BaseModel): - server: str = Field(..., description='Server name being started.') - status: McpStartupStatus = Field(..., description='Current startup status.') + server: str = Field(..., description="Server name being started.") + status: McpStartupStatus = Field(..., description="Current startup status.") type: McpStartupUpdateEventMsgType = Field( - ..., title='McpStartupUpdateEventMsgType' - ) - - -class McpStartupCompleteEventMsgType(RootModel[Literal['mcp_startup_complete']]): - root: Literal['mcp_startup_complete'] = Field( - ..., title='McpStartupCompleteEventMsgType' + ..., title="McpStartupUpdateEventMsgType" ) @@ -3732,289 +5218,139 @@ class McpStartupCompleteEventMsg(BaseModel): failed: list[McpStartupFailure] ready: list[str] type: McpStartupCompleteEventMsgType = Field( - ..., title='McpStartupCompleteEventMsgType' - ) - - -class McpToolCallBeginEventMsgType(RootModel[Literal['mcp_tool_call_begin']]): - root: Literal['mcp_tool_call_begin'] = Field( - ..., title='McpToolCallBeginEventMsgType' + ..., title="McpStartupCompleteEventMsgType" ) class McpToolCallBeginEventMsg(BaseModel): call_id: str = Field( ..., - description='Identifier so this can be paired with the McpToolCallEnd event.', + description="Identifier so this can be paired with the McpToolCallEnd event.", ) invocation: McpInvocation type: McpToolCallBeginEventMsgType = Field( - ..., title='McpToolCallBeginEventMsgType' + ..., title="McpToolCallBeginEventMsgType" ) -class McpToolCallEndEventMsgType(RootModel[Literal['mcp_tool_call_end']]): - root: Literal['mcp_tool_call_end'] = Field(..., title='McpToolCallEndEventMsgType') - - -class WebSearchBeginEventMsgType(RootModel[Literal['web_search_begin']]): - root: Literal['web_search_begin'] = Field(..., title='WebSearchBeginEventMsgType') - - -class WebSearchBeginEventMsg(BaseModel): - call_id: str - type: WebSearchBeginEventMsgType = Field(..., title='WebSearchBeginEventMsgType') - - -class WebSearchEndEventMsgType(RootModel[Literal['web_search_end']]): - root: Literal['web_search_end'] = Field(..., title='WebSearchEndEventMsgType') +class McpToolCallEndEventMsg(BaseModel): + call_id: str = Field( + ..., + description="Identifier for the corresponding McpToolCallBegin that finished.", + ) + duration: Duration + invocation: McpInvocation + result: ResultOfCallToolResultOrString = Field( + ..., description="Result of the tool call. Note this could be an error." + ) + type: McpToolCallEndEventMsgType = Field(..., title="McpToolCallEndEventMsgType") class WebSearchEndEventMsg(BaseModel): action: ResponsesApiWebSearchAction call_id: str query: str - type: WebSearchEndEventMsgType = Field(..., title='WebSearchEndEventMsgType') - - -class ImageGenerationBeginEventMsgType(RootModel[Literal['image_generation_begin']]): - root: Literal['image_generation_begin'] = Field( - ..., title='ImageGenerationBeginEventMsgType' - ) - - -class ImageGenerationBeginEventMsg(BaseModel): - call_id: str - type: ImageGenerationBeginEventMsgType = Field( - ..., title='ImageGenerationBeginEventMsgType' - ) - - -class ImageGenerationEndEventMsgType(RootModel[Literal['image_generation_end']]): - root: Literal['image_generation_end'] = Field( - ..., title='ImageGenerationEndEventMsgType' - ) - - -class ImageGenerationEndEventMsg(BaseModel): - call_id: str - result: str - revised_prompt: str | None = None - saved_path: str | None = None - status: str - type: ImageGenerationEndEventMsgType = Field( - ..., title='ImageGenerationEndEventMsgType' - ) - - -class ExecCommandBeginEventMsgType(RootModel[Literal['exec_command_begin']]): - root: Literal['exec_command_begin'] = Field( - ..., title='ExecCommandBeginEventMsgType' - ) + type: WebSearchEndEventMsgType = Field(..., title="WebSearchEndEventMsgType") class ExecCommandBeginEventMsg(BaseModel): call_id: str = Field( ..., - description='Identifier so this can be paired with the ExecCommandEnd event.', + description="Identifier so this can be paired with the ExecCommandEnd event.", ) - command: list[str] = Field(..., description='The command to be executed.') + command: list[str] = Field(..., description="The command to be executed.") cwd: str = Field( ..., description="The command's working directory if not the default cwd for the agent.", ) interaction_input: str | None = Field( default=None, - description='Raw input sent to a unified exec session (if this is an interaction event).', + description="Raw input sent to a unified exec session (if this is an interaction event).", ) parsed_cmd: list[ParsedCommand] process_id: str | None = Field( default=None, - description='Identifier for the underlying PTY process (when available).', + description="Identifier for the underlying PTY process (when available).", ) source: ExecCommandSource | None = Field( - default='agent', - description='Where the command originated. Defaults to Agent for backward compatibility.', + default="agent", + description="Where the command originated. Defaults to Agent for backward compatibility.", ) - turn_id: str = Field(..., description='Turn ID that this command belongs to.') + turn_id: str = Field(..., description="Turn ID that this command belongs to.") type: ExecCommandBeginEventMsgType = Field( - ..., title='ExecCommandBeginEventMsgType' - ) - - -class ExecCommandOutputDeltaEventMsgType( - RootModel[Literal['exec_command_output_delta']] -): - root: Literal['exec_command_output_delta'] = Field( - ..., title='ExecCommandOutputDeltaEventMsgType' + ..., title="ExecCommandBeginEventMsgType" ) class ExecCommandOutputDeltaEventMsg(BaseModel): call_id: str = Field( - ..., description='Identifier for the ExecCommandBegin that produced this chunk.' + ..., description="Identifier for the ExecCommandBegin that produced this chunk." ) chunk: str = Field( - ..., description='Raw bytes from the stream (may not be valid UTF-8).' + ..., description="Raw bytes from the stream (may not be valid UTF-8)." ) stream: ExecOutputStream = Field( - ..., description='Which stream produced this chunk.' + ..., description="Which stream produced this chunk." ) type: ExecCommandOutputDeltaEventMsgType = Field( - ..., title='ExecCommandOutputDeltaEventMsgType' + ..., title="ExecCommandOutputDeltaEventMsgType" ) -class TerminalInteractionEventMsgType(RootModel[Literal['terminal_interaction']]): - root: Literal['terminal_interaction'] = Field( - ..., title='TerminalInteractionEventMsgType' - ) - - -class TerminalInteractionEventMsg(BaseModel): - call_id: str = Field( - ..., description='Identifier for the ExecCommandBegin that produced this chunk.' - ) - process_id: str = Field( - ..., description='Process id associated with the running command.' - ) - stdin: str = Field(..., description='Stdin sent to the running session.') - type: TerminalInteractionEventMsgType = Field( - ..., title='TerminalInteractionEventMsgType' - ) - - -class ExecCommandEndEventMsgType(RootModel[Literal['exec_command_end']]): - root: Literal['exec_command_end'] = Field(..., title='ExecCommandEndEventMsgType') - - class ExecCommandEndEventMsg(BaseModel): aggregated_output: str | None = Field( - default='', description='Captured aggregated output' + default="", description="Captured aggregated output" ) call_id: str = Field( - ..., description='Identifier for the ExecCommandBegin that finished.' + ..., description="Identifier for the ExecCommandBegin that finished." ) - command: list[str] = Field(..., description='The command that was executed.') + command: list[str] = Field(..., description="The command that was executed.") cwd: str = Field( ..., description="The command's working directory if not the default cwd for the agent.", ) duration: Duration = Field( - ..., description='The duration of the command execution.' + ..., description="The duration of the command execution." ) exit_code: int = Field(..., description="The command's exit code.") formatted_output: str = Field( - ..., description='Formatted output from the command, as seen by the model.' + ..., description="Formatted output from the command, as seen by the model." ) interaction_input: str | None = Field( default=None, - description='Raw input sent to a unified exec session (if this is an interaction event).', + description="Raw input sent to a unified exec session (if this is an interaction event).", ) parsed_cmd: list[ParsedCommand] process_id: str | None = Field( default=None, - description='Identifier for the underlying PTY process (when available).', + description="Identifier for the underlying PTY process (when available).", ) source: ExecCommandSource | None = Field( - default='agent', - description='Where the command originated. Defaults to Agent for backward compatibility.', + default="agent", + description="Where the command originated. Defaults to Agent for backward compatibility.", ) status: ExecCommandStatus = Field( - ..., description='Completion status for this command execution.' + ..., description="Completion status for this command execution." ) - stderr: str = Field(..., description='Captured stderr') - stdout: str = Field(..., description='Captured stdout') - turn_id: str = Field(..., description='Turn ID that this command belongs to.') - type: ExecCommandEndEventMsgType = Field(..., title='ExecCommandEndEventMsgType') + stderr: str = Field(..., description="Captured stderr") + stdout: str = Field(..., description="Captured stdout") + turn_id: str = Field(..., description="Turn ID that this command belongs to.") + type: ExecCommandEndEventMsgType = Field(..., title="ExecCommandEndEventMsgType") -class ViewImageToolCallEventMsgType(RootModel[Literal['view_image_tool_call']]): - root: Literal['view_image_tool_call'] = Field( - ..., title='ViewImageToolCallEventMsgType' - ) - - -class ViewImageToolCallEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the originating tool call.') - path: str = Field(..., description='Local filesystem path provided to the tool.') - type: ViewImageToolCallEventMsgType = Field( - ..., title='ViewImageToolCallEventMsgType' - ) - - -class ExecApprovalRequestEventMsgType(RootModel[Literal['exec_approval_request']]): - root: Literal['exec_approval_request'] = Field( - ..., title='ExecApprovalRequestEventMsgType' - ) - - -class RequestPermissionsEventMsgType(RootModel[Literal['request_permissions']]): - root: Literal['request_permissions'] = Field( - ..., title='RequestPermissionsEventMsgType' - ) - - -class RequestUserInputEventMsgType(RootModel[Literal['request_user_input']]): - root: Literal['request_user_input'] = Field( - ..., title='RequestUserInputEventMsgType' - ) - - -class DynamicToolCallRequestEventMsgType( - RootModel[Literal['dynamic_tool_call_request']] -): - root: Literal['dynamic_tool_call_request'] = Field( - ..., title='DynamicToolCallRequestEventMsgType' - ) - - -class DynamicToolCallRequestEventMsg(BaseModel): - arguments: Any - call_id: str = Field(..., alias='callId') - tool: str - turn_id: str = Field(..., alias='turnId') - type: DynamicToolCallRequestEventMsgType = Field( - ..., title='DynamicToolCallRequestEventMsgType' - ) - - -class DynamicToolCallResponseEventMsgType( - RootModel[Literal['dynamic_tool_call_response']] -): - root: Literal['dynamic_tool_call_response'] = Field( - ..., title='DynamicToolCallResponseEventMsgType' - ) - - -class DynamicToolCallResponseEventMsg(BaseModel): - arguments: Any = Field(..., description='Dynamic tool call arguments.') +class RequestPermissionsEventMsg(BaseModel): call_id: str = Field( - ..., description='Identifier for the corresponding DynamicToolCallRequest.' + ..., + description="Responses API call id for the associated tool call, if available.", ) - content_items: list[DynamicToolCallOutputContentItem] = Field( - ..., description='Dynamic tool response content items.' + permissions: PermissionProfile + reason: str | None = None + turn_id: str | None = Field( + default="", + description="Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.", ) - duration: Duration = Field( - ..., description='The duration of the dynamic tool call.' - ) - error: str | None = Field( - default=None, - description='Optional error text when the tool call failed before producing a response.', - ) - success: bool = Field(..., description='Whether the tool call succeeded.') - tool: str = Field(..., description='Dynamic tool name.') - turn_id: str = Field( - ..., description='Turn ID that this dynamic tool call belongs to.' - ) - type: DynamicToolCallResponseEventMsgType = Field( - ..., title='DynamicToolCallResponseEventMsgType' - ) - - -class ElicitationRequestEventMsgType(RootModel[Literal['elicitation_request']]): - root: Literal['elicitation_request'] = Field( - ..., title='ElicitationRequestEventMsgType' + type: RequestPermissionsEventMsgType = Field( + ..., title="RequestPermissionsEventMsgType" ) @@ -4024,1815 +5360,355 @@ class ElicitationRequestEventMsg(BaseModel): server_name: str turn_id: str | None = Field( default=None, - description='Turn ID that this elicitation belongs to, when known.', + description="Turn ID that this elicitation belongs to, when known.", ) type: ElicitationRequestEventMsgType = Field( - ..., title='ElicitationRequestEventMsgType' - ) - - -class ApplyPatchApprovalRequestEventMsgType( - RootModel[Literal['apply_patch_approval_request']] -): - root: Literal['apply_patch_approval_request'] = Field( - ..., title='ApplyPatchApprovalRequestEventMsgType' + ..., title="ElicitationRequestEventMsgType" ) class ApplyPatchApprovalRequestEventMsg(BaseModel): call_id: str = Field( ..., - description='Responses API call id for the associated patch apply call, if available.', + description="Responses API call id for the associated patch apply call, if available.", ) changes: dict[str, FileChange] grant_root: str | None = Field( default=None, - description='When set, the agent is asking the user to allow writes under this root for the remainder of the session.', + description="When set, the agent is asking the user to allow writes under this root for the remainder of the session.", ) reason: str | None = Field( default=None, - description='Optional explanatory reason (e.g. request for extra write access).', + description="Optional explanatory reason (e.g. request for extra write access).", ) turn_id: str | None = Field( - default='', - description='Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility with older senders.', + default="", + description="Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility with older senders.", ) type: ApplyPatchApprovalRequestEventMsgType = Field( - ..., title='ApplyPatchApprovalRequestEventMsgType' + ..., title="ApplyPatchApprovalRequestEventMsgType" ) -class DeprecationNoticeEventMsgType(RootModel[Literal['deprecation_notice']]): - root: Literal['deprecation_notice'] = Field( - ..., title='DeprecationNoticeEventMsgType' - ) - - -class DeprecationNoticeEventMsg(BaseModel): - details: str | None = Field( - default=None, - description='Optional extra guidance, such as migration steps or rationale.', - ) - summary: str = Field(..., description='Concise summary of what is deprecated.') - type: DeprecationNoticeEventMsgType = Field( - ..., title='DeprecationNoticeEventMsgType' - ) - - -class BackgroundEventEventMsgType(RootModel[Literal['background_event']]): - root: Literal['background_event'] = Field(..., title='BackgroundEventEventMsgType') - - -class BackgroundEventEventMsg(BaseModel): - message: str - type: BackgroundEventEventMsgType = Field(..., title='BackgroundEventEventMsgType') - - -class UndoStartedEventMsgType(RootModel[Literal['undo_started']]): - root: Literal['undo_started'] = Field(..., title='UndoStartedEventMsgType') - - -class UndoStartedEventMsg(BaseModel): - message: str | None = None - type: UndoStartedEventMsgType = Field(..., title='UndoStartedEventMsgType') - - -class UndoCompletedEventMsgType(RootModel[Literal['undo_completed']]): - root: Literal['undo_completed'] = Field(..., title='UndoCompletedEventMsgType') - - -class UndoCompletedEventMsg(BaseModel): - message: str | None = None - success: bool - type: UndoCompletedEventMsgType = Field(..., title='UndoCompletedEventMsgType') - - -class StreamErrorEventMsgType(RootModel[Literal['stream_error']]): - root: Literal['stream_error'] = Field(..., title='StreamErrorEventMsgType') - - -class StreamErrorEventMsg(BaseModel): - additional_details: str | None = Field( - default=None, - description='Optional details about the underlying stream failure (often the same human-readable message that is surfaced as the terminal error if retries are exhausted).', - ) - codex_error_info: CodexErrorInfo | None = None - message: str - type: StreamErrorEventMsgType = Field(..., title='StreamErrorEventMsgType') - - -class PatchApplyBeginEventMsgType(RootModel[Literal['patch_apply_begin']]): - root: Literal['patch_apply_begin'] = Field(..., title='PatchApplyBeginEventMsgType') - - class PatchApplyBeginEventMsg(BaseModel): auto_approved: bool = Field( ..., - description='If true, there was no ApplyPatchApprovalRequest for this patch.', + description="If true, there was no ApplyPatchApprovalRequest for this patch.", ) call_id: str = Field( ..., - description='Identifier so this can be paired with the PatchApplyEnd event.', + description="Identifier so this can be paired with the PatchApplyEnd event.", ) changes: dict[str, FileChange] = Field( - ..., description='The changes to be applied.' + ..., description="The changes to be applied." ) turn_id: str | None = Field( - default='', - description='Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.', + default="", + description="Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.", ) - type: PatchApplyBeginEventMsgType = Field(..., title='PatchApplyBeginEventMsgType') - - -class PatchApplyEndEventMsgType(RootModel[Literal['patch_apply_end']]): - root: Literal['patch_apply_end'] = Field(..., title='PatchApplyEndEventMsgType') + type: PatchApplyBeginEventMsgType = Field(..., title="PatchApplyBeginEventMsgType") class PatchApplyEndEventMsg(BaseModel): call_id: str = Field( - ..., description='Identifier for the PatchApplyBegin that finished.' + ..., description="Identifier for the PatchApplyBegin that finished." ) changes: dict[str, FileChange] | None = Field( default_factory=lambda: FileChange({}), - description='The changes that were applied (mirrors PatchApplyBeginEvent::changes).', + description="The changes that were applied (mirrors PatchApplyBeginEvent::changes).", ) status: PatchApplyStatus = Field( - ..., description='Completion status for this patch application.' + ..., description="Completion status for this patch application." ) stderr: str = Field( - ..., description='Captured stderr (parser errors, IO failures, etc.).' + ..., description="Captured stderr (parser errors, IO failures, etc.)." ) stdout: str = Field( - ..., description='Captured stdout (summary printed by apply_patch).' + ..., description="Captured stdout (summary printed by apply_patch)." ) success: bool = Field( - ..., description='Whether the patch was applied successfully.' + ..., description="Whether the patch was applied successfully." ) turn_id: str | None = Field( - default='', - description='Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.', - ) - type: PatchApplyEndEventMsgType = Field(..., title='PatchApplyEndEventMsgType') - - -class TurnDiffEventMsgType(RootModel[Literal['turn_diff']]): - root: Literal['turn_diff'] = Field(..., title='TurnDiffEventMsgType') - - -class TurnDiffEventMsg(BaseModel): - type: TurnDiffEventMsgType = Field(..., title='TurnDiffEventMsgType') - unified_diff: str - - -class GetHistoryEntryResponseEventMsgType( - RootModel[Literal['get_history_entry_response']] -): - root: Literal['get_history_entry_response'] = Field( - ..., title='GetHistoryEntryResponseEventMsgType' + default="", + description="Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.", ) + type: PatchApplyEndEventMsgType = Field(..., title="PatchApplyEndEventMsgType") class GetHistoryEntryResponseEventMsg(BaseModel): entry: HistoryEntry | None = Field( default=None, - description='The entry at the requested offset, if available and parseable.', + description="The entry at the requested offset, if available and parseable.", ) log_id: int = Field(..., ge=0) offset: int = Field(..., ge=0) type: GetHistoryEntryResponseEventMsgType = Field( - ..., title='GetHistoryEntryResponseEventMsgType' - ) - - -class McpListToolsResponseEventMsgType(RootModel[Literal['mcp_list_tools_response']]): - root: Literal['mcp_list_tools_response'] = Field( - ..., title='McpListToolsResponseEventMsgType' + ..., title="GetHistoryEntryResponseEventMsgType" ) class McpListToolsResponseEventMsg(BaseModel): auth_statuses: dict[str, McpAuthStatus] = Field( - ..., description='Authentication status for each configured MCP server.' + ..., description="Authentication status for each configured MCP server." ) resource_templates: dict[str, list[ResourceTemplate]] = Field( - ..., description='Known resource templates grouped by server name.' + ..., description="Known resource templates grouped by server name." ) resources: dict[str, list[Resource]] = Field( - ..., description='Known resources grouped by server name.' + ..., description="Known resources grouped by server name." ) tools: dict[str, Tool] = Field( - ..., description='Fully qualified tool name -> tool definition.' + ..., description="Fully qualified tool name -> tool definition." ) type: McpListToolsResponseEventMsgType = Field( - ..., title='McpListToolsResponseEventMsgType' - ) - - -class ListCustomPromptsResponseEventMsgType( - RootModel[Literal['list_custom_prompts_response']] -): - root: Literal['list_custom_prompts_response'] = Field( - ..., title='ListCustomPromptsResponseEventMsgType' - ) - - -class ListCustomPromptsResponseEventMsg(BaseModel): - custom_prompts: list[CustomPrompt] - type: ListCustomPromptsResponseEventMsgType = Field( - ..., title='ListCustomPromptsResponseEventMsgType' - ) - - -class ListSkillsResponseEventMsgType(RootModel[Literal['list_skills_response']]): - root: Literal['list_skills_response'] = Field( - ..., title='ListSkillsResponseEventMsgType' - ) - - -class ListRemoteSkillsResponseEventMsgType( - RootModel[Literal['list_remote_skills_response']] -): - root: Literal['list_remote_skills_response'] = Field( - ..., title='ListRemoteSkillsResponseEventMsgType' + ..., title="McpListToolsResponseEventMsgType" ) class ListRemoteSkillsResponseEventMsg(BaseModel): skills: list[RemoteSkillSummary] type: ListRemoteSkillsResponseEventMsgType = Field( - ..., title='ListRemoteSkillsResponseEventMsgType' + ..., title="ListRemoteSkillsResponseEventMsgType" ) -class RemoteSkillDownloadedEventMsgType(RootModel[Literal['remote_skill_downloaded']]): - root: Literal['remote_skill_downloaded'] = Field( - ..., title='RemoteSkillDownloadedEventMsgType' - ) - - -class RemoteSkillDownloadedEventMsg(BaseModel): - id: str - name: str - path: str - type: RemoteSkillDownloadedEventMsgType = Field( - ..., title='RemoteSkillDownloadedEventMsgType' - ) - - -class SkillsUpdateAvailableEventMsgType(RootModel[Literal['skills_update_available']]): - root: Literal['skills_update_available'] = Field( - ..., title='SkillsUpdateAvailableEventMsgType' - ) - - -class SkillsUpdateAvailableEventMsg(BaseModel): - type: SkillsUpdateAvailableEventMsgType = Field( - ..., title='SkillsUpdateAvailableEventMsgType' - ) - - -class PlanUpdateEventMsgType(RootModel[Literal['plan_update']]): - root: Literal['plan_update'] = Field(..., title='PlanUpdateEventMsgType') - - -class TurnAbortedEventMsgType(RootModel[Literal['turn_aborted']]): - root: Literal['turn_aborted'] = Field(..., title='TurnAbortedEventMsgType') - - class TurnAbortedEventMsg(BaseModel): reason: TurnAbortReason turn_id: str | None = None - type: TurnAbortedEventMsgType = Field(..., title='TurnAbortedEventMsgType') - - -class ShutdownCompleteEventMsgType(RootModel[Literal['shutdown_complete']]): - root: Literal['shutdown_complete'] = Field( - ..., title='ShutdownCompleteEventMsgType' - ) - - -class ShutdownCompleteEventMsg(BaseModel): - type: ShutdownCompleteEventMsgType = Field( - ..., title='ShutdownCompleteEventMsgType' - ) - - -class EnteredReviewModeEventMsgType(RootModel[Literal['entered_review_mode']]): - root: Literal['entered_review_mode'] = Field( - ..., title='EnteredReviewModeEventMsgType' - ) + type: TurnAbortedEventMsgType = Field(..., title="TurnAbortedEventMsgType") class EnteredReviewModeEventMsg(BaseModel): target: ReviewTarget type: EnteredReviewModeEventMsgType = Field( - ..., title='EnteredReviewModeEventMsgType' + ..., title="EnteredReviewModeEventMsgType" ) user_facing_hint: str | None = None -class ExitedReviewModeEventMsgType(RootModel[Literal['exited_review_mode']]): - root: Literal['exited_review_mode'] = Field( - ..., title='ExitedReviewModeEventMsgType' - ) - - -class RawResponseItemEventMsgType(RootModel[Literal['raw_response_item']]): - root: Literal['raw_response_item'] = Field(..., title='RawResponseItemEventMsgType') - - -class ItemStartedEventMsgType(RootModel[Literal['item_started']]): - root: Literal['item_started'] = Field(..., title='ItemStartedEventMsgType') - - -class ItemStartedEventMsg(BaseModel): - item: TurnItem - thread_id: ThreadId - turn_id: str - type: ItemStartedEventMsgType = Field(..., title='ItemStartedEventMsgType') - - -class ItemCompletedEventMsgType(RootModel[Literal['item_completed']]): - root: Literal['item_completed'] = Field(..., title='ItemCompletedEventMsgType') - - -class ItemCompletedEventMsg(BaseModel): - item: TurnItem - thread_id: ThreadId - turn_id: str - type: ItemCompletedEventMsgType = Field(..., title='ItemCompletedEventMsgType') - - -class AgentMessageContentDeltaEventMsgType( - RootModel[Literal['agent_message_content_delta']] -): - root: Literal['agent_message_content_delta'] = Field( - ..., title='AgentMessageContentDeltaEventMsgType' - ) - - -class AgentMessageContentDeltaEventMsg(BaseModel): - delta: str - item_id: str - thread_id: str - turn_id: str - type: AgentMessageContentDeltaEventMsgType = Field( - ..., title='AgentMessageContentDeltaEventMsgType' - ) - - -class PlanDeltaEventMsgType(RootModel[Literal['plan_delta']]): - root: Literal['plan_delta'] = Field(..., title='PlanDeltaEventMsgType') - - -class PlanDeltaEventMsg(BaseModel): - delta: str - item_id: str - thread_id: str - turn_id: str - type: PlanDeltaEventMsgType = Field(..., title='PlanDeltaEventMsgType') - - -class ReasoningContentDeltaEventMsgType(RootModel[Literal['reasoning_content_delta']]): - root: Literal['reasoning_content_delta'] = Field( - ..., title='ReasoningContentDeltaEventMsgType' - ) - - -class ReasoningContentDeltaEventMsg(BaseModel): - delta: str - item_id: str - summary_index: int | None = 0 - thread_id: str - turn_id: str - type: ReasoningContentDeltaEventMsgType = Field( - ..., title='ReasoningContentDeltaEventMsgType' - ) - - -class ReasoningRawContentDeltaEventMsgType( - RootModel[Literal['reasoning_raw_content_delta']] -): - root: Literal['reasoning_raw_content_delta'] = Field( - ..., title='ReasoningRawContentDeltaEventMsgType' - ) - - -class ReasoningRawContentDeltaEventMsg(BaseModel): - content_index: int | None = 0 - delta: str - item_id: str - thread_id: str - turn_id: str - type: ReasoningRawContentDeltaEventMsgType = Field( - ..., title='ReasoningRawContentDeltaEventMsgType' - ) - - -class CollabAgentSpawnBeginEventMsgType(RootModel[Literal['collab_agent_spawn_begin']]): - root: Literal['collab_agent_spawn_begin'] = Field( - ..., title='CollabAgentSpawnBeginEventMsgType' - ) - - class CollabAgentSpawnBeginEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') + call_id: str = Field(..., description="Identifier for the collab tool call.") prompt: str = Field( ..., - description='Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.', + description="Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.", ) - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") type: CollabAgentSpawnBeginEventMsgType = Field( - ..., title='CollabAgentSpawnBeginEventMsgType' - ) - - -class CollabAgentSpawnEndEventMsgType(RootModel[Literal['collab_agent_spawn_end']]): - root: Literal['collab_agent_spawn_end'] = Field( - ..., title='CollabAgentSpawnEndEventMsgType' + ..., title="CollabAgentSpawnBeginEventMsgType" ) class CollabAgentSpawnEndEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') + call_id: str = Field(..., description="Identifier for the collab tool call.") new_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the new agent.' + default=None, description="Optional nickname assigned to the new agent." ) new_agent_role: str | None = Field( - default=None, description='Optional role assigned to the new agent.' + default=None, description="Optional role assigned to the new agent." ) new_thread_id: ThreadId | None = Field( default=None, - description='Thread ID of the newly spawned agent, if it was created.', + description="Thread ID of the newly spawned agent, if it was created.", ) prompt: str = Field( ..., - description='Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.', + description="Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.", ) - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") status: AgentStatus = Field( ..., - description='Last known status of the new agent reported to the sender agent.', + description="Last known status of the new agent reported to the sender agent.", ) type: CollabAgentSpawnEndEventMsgType = Field( - ..., title='CollabAgentSpawnEndEventMsgType' - ) - - -class CollabAgentInteractionBeginEventMsgType( - RootModel[Literal['collab_agent_interaction_begin']] -): - root: Literal['collab_agent_interaction_begin'] = Field( - ..., title='CollabAgentInteractionBeginEventMsgType' + ..., title="CollabAgentSpawnEndEventMsgType" ) class CollabAgentInteractionBeginEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') + call_id: str = Field(..., description="Identifier for the collab tool call.") prompt: str = Field( ..., - description='Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.', + description="Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.", ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") type: CollabAgentInteractionBeginEventMsgType = Field( - ..., title='CollabAgentInteractionBeginEventMsgType' - ) - - -class CollabAgentInteractionEndEventMsgType( - RootModel[Literal['collab_agent_interaction_end']] -): - root: Literal['collab_agent_interaction_end'] = Field( - ..., title='CollabAgentInteractionEndEventMsgType' + ..., title="CollabAgentInteractionBeginEventMsgType" ) class CollabAgentInteractionEndEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') + call_id: str = Field(..., description="Identifier for the collab tool call.") prompt: str = Field( ..., - description='Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.', + description="Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.", ) receiver_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the receiver agent.' + default=None, description="Optional nickname assigned to the receiver agent." ) receiver_agent_role: str | None = Field( - default=None, description='Optional role assigned to the receiver agent.' + default=None, description="Optional role assigned to the receiver agent." ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") status: AgentStatus = Field( ..., - description='Last known status of the receiver agent reported to the sender agent.', + description="Last known status of the receiver agent reported to the sender agent.", ) type: CollabAgentInteractionEndEventMsgType = Field( - ..., title='CollabAgentInteractionEndEventMsgType' - ) - - -class CollabWaitingBeginEventMsgType(RootModel[Literal['collab_waiting_begin']]): - root: Literal['collab_waiting_begin'] = Field( - ..., title='CollabWaitingBeginEventMsgType' + ..., title="CollabAgentInteractionEndEventMsgType" ) class CollabWaitingBeginEventMsg(BaseModel): - call_id: str = Field(..., description='ID of the waiting call.') + call_id: str = Field(..., description="ID of the waiting call.") receiver_agents: list[CollabAgentRef] | None = Field( - default=None, description='Optional nicknames/roles for receivers.' + default=None, description="Optional nicknames/roles for receivers." ) receiver_thread_ids: list[ThreadId] = Field( - ..., description='Thread ID of the receivers.' + ..., description="Thread ID of the receivers." ) - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") type: CollabWaitingBeginEventMsgType = Field( - ..., title='CollabWaitingBeginEventMsgType' - ) - - -class CollabWaitingEndEventMsgType(RootModel[Literal['collab_waiting_end']]): - root: Literal['collab_waiting_end'] = Field( - ..., title='CollabWaitingEndEventMsgType' + ..., title="CollabWaitingBeginEventMsgType" ) class CollabWaitingEndEventMsg(BaseModel): agent_statuses: list[CollabAgentStatusEntry] | None = Field( default=None, - description='Optional receiver metadata paired with final statuses.', + description="Optional receiver metadata paired with final statuses.", ) - call_id: str = Field(..., description='ID of the waiting call.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + call_id: str = Field(..., description="ID of the waiting call.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") statuses: dict[str, AgentStatus] = Field( ..., - description='Last known status of the receiver agents reported to the sender agent.', + description="Last known status of the receiver agents reported to the sender agent.", ) type: CollabWaitingEndEventMsgType = Field( - ..., title='CollabWaitingEndEventMsgType' - ) - - -class CollabCloseBeginEventMsgType(RootModel[Literal['collab_close_begin']]): - root: Literal['collab_close_begin'] = Field( - ..., title='CollabCloseBeginEventMsgType' + ..., title="CollabWaitingEndEventMsgType" ) class CollabCloseBeginEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + call_id: str = Field(..., description="Identifier for the collab tool call.") + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") type: CollabCloseBeginEventMsgType = Field( - ..., title='CollabCloseBeginEventMsgType' + ..., title="CollabCloseBeginEventMsgType" ) -class CollabCloseEndEventMsgType(RootModel[Literal['collab_close_end']]): - root: Literal['collab_close_end'] = Field(..., title='CollabCloseEndEventMsgType') - - class CollabCloseEndEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') + call_id: str = Field(..., description="Identifier for the collab tool call.") receiver_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the receiver agent.' + default=None, description="Optional nickname assigned to the receiver agent." ) receiver_agent_role: str | None = Field( - default=None, description='Optional role assigned to the receiver agent.' + default=None, description="Optional role assigned to the receiver agent." ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") status: AgentStatus = Field( ..., - description='Last known status of the receiver agent reported to the sender agent before the close.', - ) - type: CollabCloseEndEventMsgType = Field(..., title='CollabCloseEndEventMsgType') - - -class CollabResumeBeginEventMsgType(RootModel[Literal['collab_resume_begin']]): - root: Literal['collab_resume_begin'] = Field( - ..., title='CollabResumeBeginEventMsgType' + description="Last known status of the receiver agent reported to the sender agent before the close.", ) + type: CollabCloseEndEventMsgType = Field(..., title="CollabCloseEndEventMsgType") class CollabResumeBeginEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') + call_id: str = Field(..., description="Identifier for the collab tool call.") receiver_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the receiver agent.' + default=None, description="Optional nickname assigned to the receiver agent." ) receiver_agent_role: str | None = Field( - default=None, description='Optional role assigned to the receiver agent.' + default=None, description="Optional role assigned to the receiver agent." ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") type: CollabResumeBeginEventMsgType = Field( - ..., title='CollabResumeBeginEventMsgType' + ..., title="CollabResumeBeginEventMsgType" ) -class CollabResumeEndEventMsgType(RootModel[Literal['collab_resume_end']]): - root: Literal['collab_resume_end'] = Field(..., title='CollabResumeEndEventMsgType') - - class CollabResumeEndEventMsg(BaseModel): - call_id: str = Field(..., description='Identifier for the collab tool call.') + call_id: str = Field(..., description="Identifier for the collab tool call.") receiver_agent_nickname: str | None = Field( - default=None, description='Optional nickname assigned to the receiver agent.' + default=None, description="Optional nickname assigned to the receiver agent." ) receiver_agent_role: str | None = Field( - default=None, description='Optional role assigned to the receiver agent.' + default=None, description="Optional role assigned to the receiver agent." ) - receiver_thread_id: ThreadId = Field(..., description='Thread ID of the receiver.') - sender_thread_id: ThreadId = Field(..., description='Thread ID of the sender.') + receiver_thread_id: ThreadId = Field(..., description="Thread ID of the receiver.") + sender_thread_id: ThreadId = Field(..., description="Thread ID of the sender.") status: AgentStatus = Field( ..., - description='Last known status of the receiver agent reported to the sender agent after resume.', + description="Last known status of the receiver agent reported to the sender agent after resume.", ) - type: CollabResumeEndEventMsgType = Field(..., title='CollabResumeEndEventMsgType') + type: CollabResumeEndEventMsgType = Field(..., title="CollabResumeEndEventMsgType") -class InitializeClientRequestMethod(RootModel[Literal['initialize']]): - root: Literal['initialize'] = Field(..., title='InitializeClientRequestMethod') - - -class ThreadStartClientRequestMethod(RootModel[Literal['thread/start']]): - root: Literal['thread/start'] = Field(..., title='Thread/startClientRequestMethod') - - -class ThreadStartClientRequest(BaseModel): - id: RequestId - method: ThreadStartClientRequestMethod = Field( - ..., title='Thread/startClientRequestMethod' - ) - params: ThreadStartParams - - -class ThreadResumeClientRequestMethod(RootModel[Literal['thread/resume']]): - root: Literal['thread/resume'] = Field( - ..., title='Thread/resumeClientRequestMethod' - ) - - -class ThreadResumeClientRequest(BaseModel): - id: RequestId - method: ThreadResumeClientRequestMethod = Field( - ..., title='Thread/resumeClientRequestMethod' - ) - params: ThreadResumeParams - - -class ThreadForkClientRequestMethod(RootModel[Literal['thread/fork']]): - root: Literal['thread/fork'] = Field(..., title='Thread/forkClientRequestMethod') - - -class ThreadForkClientRequest(BaseModel): - id: RequestId - method: ThreadForkClientRequestMethod = Field( - ..., title='Thread/forkClientRequestMethod' - ) - params: ThreadForkParams - - -class ThreadArchiveClientRequestMethod(RootModel[Literal['thread/archive']]): - root: Literal['thread/archive'] = Field( - ..., title='Thread/archiveClientRequestMethod' - ) - - -class ThreadArchiveClientRequest(BaseModel): - id: RequestId - method: ThreadArchiveClientRequestMethod = Field( - ..., title='Thread/archiveClientRequestMethod' - ) - params: ThreadArchiveParams - - -class ThreadUnsubscribeClientRequestMethod(RootModel[Literal['thread/unsubscribe']]): - root: Literal['thread/unsubscribe'] = Field( - ..., title='Thread/unsubscribeClientRequestMethod' - ) - - -class ThreadUnsubscribeClientRequest(BaseModel): - id: RequestId - method: ThreadUnsubscribeClientRequestMethod = Field( - ..., title='Thread/unsubscribeClientRequestMethod' - ) - params: ThreadUnsubscribeParams - - -class ThreadNameSetClientRequestMethod(RootModel[Literal['thread/name/set']]): - root: Literal['thread/name/set'] = Field( - ..., title='Thread/name/setClientRequestMethod' +class ExperimentalFeature(BaseModel): + announcement: str | None = Field( + default=None, + description="Announcement copy shown to users when the feature is introduced. Null when this feature is not in beta.", ) - - -class ThreadNameSetClientRequest(BaseModel): - id: RequestId - method: ThreadNameSetClientRequestMethod = Field( - ..., title='Thread/name/setClientRequestMethod' - ) - params: ThreadSetNameParams - - -class ThreadMetadataUpdateClientRequestMethod( - RootModel[Literal['thread/metadata/update']] -): - root: Literal['thread/metadata/update'] = Field( - ..., title='Thread/metadata/updateClientRequestMethod' - ) - - -class ThreadMetadataUpdateClientRequest(BaseModel): - id: RequestId - method: ThreadMetadataUpdateClientRequestMethod = Field( - ..., title='Thread/metadata/updateClientRequestMethod' - ) - params: ThreadMetadataUpdateParams - - -class ThreadUnarchiveClientRequestMethod(RootModel[Literal['thread/unarchive']]): - root: Literal['thread/unarchive'] = Field( - ..., title='Thread/unarchiveClientRequestMethod' - ) - - -class ThreadUnarchiveClientRequest(BaseModel): - id: RequestId - method: ThreadUnarchiveClientRequestMethod = Field( - ..., title='Thread/unarchiveClientRequestMethod' - ) - params: ThreadUnarchiveParams - - -class ThreadCompactStartClientRequestMethod(RootModel[Literal['thread/compact/start']]): - root: Literal['thread/compact/start'] = Field( - ..., title='Thread/compact/startClientRequestMethod' + default_enabled: bool = Field( + ..., + alias="defaultEnabled", + description="Whether this feature is enabled by default.", ) - - -class ThreadCompactStartClientRequest(BaseModel): - id: RequestId - method: ThreadCompactStartClientRequestMethod = Field( - ..., title='Thread/compact/startClientRequestMethod' + description: str | None = Field( + default=None, + description="Short summary describing what the feature does. Null when this feature is not in beta.", ) - params: ThreadCompactStartParams - - -class ThreadRollbackClientRequestMethod(RootModel[Literal['thread/rollback']]): - root: Literal['thread/rollback'] = Field( - ..., title='Thread/rollbackClientRequestMethod' + display_name: str | None = Field( + default=None, + alias="displayName", + description="User-facing display name shown in the experimental features UI. Null when this feature is not in beta.", ) - - -class ThreadRollbackClientRequest(BaseModel): - id: RequestId - method: ThreadRollbackClientRequestMethod = Field( - ..., title='Thread/rollbackClientRequestMethod' + enabled: bool = Field( + ..., + description="Whether this feature is currently enabled in the loaded config.", ) - params: ThreadRollbackParams - - -class ThreadListClientRequestMethod(RootModel[Literal['thread/list']]): - root: Literal['thread/list'] = Field(..., title='Thread/listClientRequestMethod') - - -class ThreadListClientRequest(BaseModel): - id: RequestId - method: ThreadListClientRequestMethod = Field( - ..., title='Thread/listClientRequestMethod' - ) - params: ThreadListParams - - -class ThreadLoadedListClientRequestMethod(RootModel[Literal['thread/loaded/list']]): - root: Literal['thread/loaded/list'] = Field( - ..., title='Thread/loaded/listClientRequestMethod' - ) - - -class ThreadLoadedListClientRequest(BaseModel): - id: RequestId - method: ThreadLoadedListClientRequestMethod = Field( - ..., title='Thread/loaded/listClientRequestMethod' - ) - params: ThreadLoadedListParams - - -class ThreadReadClientRequestMethod(RootModel[Literal['thread/read']]): - root: Literal['thread/read'] = Field(..., title='Thread/readClientRequestMethod') - - -class ThreadReadClientRequest(BaseModel): - id: RequestId - method: ThreadReadClientRequestMethod = Field( - ..., title='Thread/readClientRequestMethod' - ) - params: ThreadReadParams - - -class SkillsListClientRequestMethod(RootModel[Literal['skills/list']]): - root: Literal['skills/list'] = Field(..., title='Skills/listClientRequestMethod') - - -class SkillsListClientRequest(BaseModel): - id: RequestId - method: SkillsListClientRequestMethod = Field( - ..., title='Skills/listClientRequestMethod' - ) - params: SkillsListParams - - -class PluginListClientRequestMethod(RootModel[Literal['plugin/list']]): - root: Literal['plugin/list'] = Field(..., title='Plugin/listClientRequestMethod') - - -class PluginListClientRequest(BaseModel): - id: RequestId - method: PluginListClientRequestMethod = Field( - ..., title='Plugin/listClientRequestMethod' - ) - params: PluginListParams - - -class SkillsRemoteListClientRequestMethod(RootModel[Literal['skills/remote/list']]): - root: Literal['skills/remote/list'] = Field( - ..., title='Skills/remote/listClientRequestMethod' - ) - - -class SkillsRemoteListClientRequest(BaseModel): - id: RequestId - method: SkillsRemoteListClientRequestMethod = Field( - ..., title='Skills/remote/listClientRequestMethod' - ) - params: SkillsRemoteReadParams - - -class SkillsRemoteExportClientRequestMethod(RootModel[Literal['skills/remote/export']]): - root: Literal['skills/remote/export'] = Field( - ..., title='Skills/remote/exportClientRequestMethod' - ) - - -class SkillsRemoteExportClientRequest(BaseModel): - id: RequestId - method: SkillsRemoteExportClientRequestMethod = Field( - ..., title='Skills/remote/exportClientRequestMethod' - ) - params: SkillsRemoteWriteParams - - -class AppListClientRequestMethod(RootModel[Literal['app/list']]): - root: Literal['app/list'] = Field(..., title='App/listClientRequestMethod') - - -class AppListClientRequest(BaseModel): - id: RequestId - method: AppListClientRequestMethod = Field(..., title='App/listClientRequestMethod') - params: AppsListParams - - -class SkillsConfigWriteClientRequestMethod(RootModel[Literal['skills/config/write']]): - root: Literal['skills/config/write'] = Field( - ..., title='Skills/config/writeClientRequestMethod' - ) - - -class SkillsConfigWriteClientRequest(BaseModel): - id: RequestId - method: SkillsConfigWriteClientRequestMethod = Field( - ..., title='Skills/config/writeClientRequestMethod' - ) - params: SkillsConfigWriteParams - - -class PluginInstallClientRequestMethod(RootModel[Literal['plugin/install']]): - root: Literal['plugin/install'] = Field( - ..., title='Plugin/installClientRequestMethod' - ) - - -class PluginInstallClientRequest(BaseModel): - id: RequestId - method: PluginInstallClientRequestMethod = Field( - ..., title='Plugin/installClientRequestMethod' - ) - params: PluginInstallParams - - -class TurnStartClientRequestMethod(RootModel[Literal['turn/start']]): - root: Literal['turn/start'] = Field(..., title='Turn/startClientRequestMethod') - - -class TurnStartClientRequest(BaseModel): - id: RequestId - method: TurnStartClientRequestMethod = Field( - ..., title='Turn/startClientRequestMethod' - ) - params: TurnStartParams - - -class TurnSteerClientRequestMethod(RootModel[Literal['turn/steer']]): - root: Literal['turn/steer'] = Field(..., title='Turn/steerClientRequestMethod') - - -class TurnSteerClientRequest(BaseModel): - id: RequestId - method: TurnSteerClientRequestMethod = Field( - ..., title='Turn/steerClientRequestMethod' - ) - params: TurnSteerParams - - -class TurnInterruptClientRequestMethod(RootModel[Literal['turn/interrupt']]): - root: Literal['turn/interrupt'] = Field( - ..., title='Turn/interruptClientRequestMethod' + name: str = Field( + ..., description="Stable key used in config.toml and CLI flag toggles." ) - - -class TurnInterruptClientRequest(BaseModel): - id: RequestId - method: TurnInterruptClientRequestMethod = Field( - ..., title='Turn/interruptClientRequestMethod' - ) - params: TurnInterruptParams - - -class ReviewStartClientRequestMethod(RootModel[Literal['review/start']]): - root: Literal['review/start'] = Field(..., title='Review/startClientRequestMethod') - - -class ReviewStartClientRequest(BaseModel): - id: RequestId - method: ReviewStartClientRequestMethod = Field( - ..., title='Review/startClientRequestMethod' - ) - params: ReviewStartParams - - -class ModelListClientRequestMethod(RootModel[Literal['model/list']]): - root: Literal['model/list'] = Field(..., title='Model/listClientRequestMethod') - - -class ModelListClientRequest(BaseModel): - id: RequestId - method: ModelListClientRequestMethod = Field( - ..., title='Model/listClientRequestMethod' - ) - params: ModelListParams - - -class ExperimentalFeatureListClientRequestMethod( - RootModel[Literal['experimentalFeature/list']] -): - root: Literal['experimentalFeature/list'] = Field( - ..., title='ExperimentalFeature/listClientRequestMethod' - ) - - -class ExperimentalFeatureListClientRequest(BaseModel): - id: RequestId - method: ExperimentalFeatureListClientRequestMethod = Field( - ..., title='ExperimentalFeature/listClientRequestMethod' - ) - params: ExperimentalFeatureListParams - - -class McpServerOauthLoginClientRequestMethod( - RootModel[Literal['mcpServer/oauth/login']] -): - root: Literal['mcpServer/oauth/login'] = Field( - ..., title='McpServer/oauth/loginClientRequestMethod' - ) - - -class McpServerOauthLoginClientRequest(BaseModel): - id: RequestId - method: McpServerOauthLoginClientRequestMethod = Field( - ..., title='McpServer/oauth/loginClientRequestMethod' - ) - params: McpServerOauthLoginParams - - -class ConfigMcpServerReloadClientRequestMethod( - RootModel[Literal['config/mcpServer/reload']] -): - root: Literal['config/mcpServer/reload'] = Field( - ..., title='Config/mcpServer/reloadClientRequestMethod' - ) - - -class ConfigMcpServerReloadClientRequest(BaseModel): - id: RequestId - method: ConfigMcpServerReloadClientRequestMethod = Field( - ..., title='Config/mcpServer/reloadClientRequestMethod' - ) - params: None = None - - -class McpServerStatusListClientRequestMethod( - RootModel[Literal['mcpServerStatus/list']] -): - root: Literal['mcpServerStatus/list'] = Field( - ..., title='McpServerStatus/listClientRequestMethod' - ) - - -class McpServerStatusListClientRequest(BaseModel): - id: RequestId - method: McpServerStatusListClientRequestMethod = Field( - ..., title='McpServerStatus/listClientRequestMethod' - ) - params: ListMcpServerStatusParams - - -class WindowsSandboxSetupStartClientRequestMethod( - RootModel[Literal['windowsSandbox/setupStart']] -): - root: Literal['windowsSandbox/setupStart'] = Field( - ..., title='WindowsSandbox/setupStartClientRequestMethod' - ) - - -class WindowsSandboxSetupStartClientRequest(BaseModel): - id: RequestId - method: WindowsSandboxSetupStartClientRequestMethod = Field( - ..., title='WindowsSandbox/setupStartClientRequestMethod' - ) - params: WindowsSandboxSetupStartParams - - -class AccountLoginStartClientRequestMethod(RootModel[Literal['account/login/start']]): - root: Literal['account/login/start'] = Field( - ..., title='Account/login/startClientRequestMethod' - ) - - -class AccountLoginStartClientRequest(BaseModel): - id: RequestId - method: AccountLoginStartClientRequestMethod = Field( - ..., title='Account/login/startClientRequestMethod' - ) - params: LoginAccountParams - - -class AccountLoginCancelClientRequestMethod(RootModel[Literal['account/login/cancel']]): - root: Literal['account/login/cancel'] = Field( - ..., title='Account/login/cancelClientRequestMethod' - ) - - -class AccountLoginCancelClientRequest(BaseModel): - id: RequestId - method: AccountLoginCancelClientRequestMethod = Field( - ..., title='Account/login/cancelClientRequestMethod' - ) - params: CancelLoginAccountParams - - -class AccountLogoutClientRequestMethod(RootModel[Literal['account/logout']]): - root: Literal['account/logout'] = Field( - ..., title='Account/logoutClientRequestMethod' - ) - - -class AccountLogoutClientRequest(BaseModel): - id: RequestId - method: AccountLogoutClientRequestMethod = Field( - ..., title='Account/logoutClientRequestMethod' - ) - params: None = None - - -class AccountRateLimitsReadClientRequestMethod( - RootModel[Literal['account/rateLimits/read']] -): - root: Literal['account/rateLimits/read'] = Field( - ..., title='Account/rateLimits/readClientRequestMethod' - ) - - -class AccountRateLimitsReadClientRequest(BaseModel): - id: RequestId - method: AccountRateLimitsReadClientRequestMethod = Field( - ..., title='Account/rateLimits/readClientRequestMethod' - ) - params: None = None - - -class FeedbackUploadClientRequestMethod(RootModel[Literal['feedback/upload']]): - root: Literal['feedback/upload'] = Field( - ..., title='Feedback/uploadClientRequestMethod' - ) - - -class FeedbackUploadClientRequest(BaseModel): - id: RequestId - method: FeedbackUploadClientRequestMethod = Field( - ..., title='Feedback/uploadClientRequestMethod' - ) - params: FeedbackUploadParams - - -class CommandExecClientRequestMethod(RootModel[Literal['command/exec']]): - root: Literal['command/exec'] = Field(..., title='Command/execClientRequestMethod') - - -class CommandExecClientRequest(BaseModel): - id: RequestId - method: CommandExecClientRequestMethod = Field( - ..., title='Command/execClientRequestMethod' - ) - params: CommandExecParams - - -class CommandExecWriteClientRequestMethod(RootModel[Literal['command/exec/write']]): - root: Literal['command/exec/write'] = Field( - ..., title='Command/exec/writeClientRequestMethod' - ) - - -class CommandExecWriteClientRequest(BaseModel): - id: RequestId - method: CommandExecWriteClientRequestMethod = Field( - ..., title='Command/exec/writeClientRequestMethod' - ) - params: CommandExecWriteParams - - -class CommandExecTerminateClientRequestMethod( - RootModel[Literal['command/exec/terminate']] -): - root: Literal['command/exec/terminate'] = Field( - ..., title='Command/exec/terminateClientRequestMethod' - ) - - -class CommandExecTerminateClientRequest(BaseModel): - id: RequestId - method: CommandExecTerminateClientRequestMethod = Field( - ..., title='Command/exec/terminateClientRequestMethod' - ) - params: CommandExecTerminateParams - - -class CommandExecResizeClientRequestMethod(RootModel[Literal['command/exec/resize']]): - root: Literal['command/exec/resize'] = Field( - ..., title='Command/exec/resizeClientRequestMethod' - ) - - -class CommandExecResizeClientRequest(BaseModel): - id: RequestId - method: CommandExecResizeClientRequestMethod = Field( - ..., title='Command/exec/resizeClientRequestMethod' - ) - params: CommandExecResizeParams - - -class ConfigReadClientRequestMethod(RootModel[Literal['config/read']]): - root: Literal['config/read'] = Field(..., title='Config/readClientRequestMethod') - - -class ConfigReadClientRequest(BaseModel): - id: RequestId - method: ConfigReadClientRequestMethod = Field( - ..., title='Config/readClientRequestMethod' - ) - params: ConfigReadParams - - -class ExternalAgentConfigDetectClientRequestMethod( - RootModel[Literal['externalAgentConfig/detect']] -): - root: Literal['externalAgentConfig/detect'] = Field( - ..., title='ExternalAgentConfig/detectClientRequestMethod' - ) - - -class ExternalAgentConfigDetectClientRequest(BaseModel): - id: RequestId - method: ExternalAgentConfigDetectClientRequestMethod = Field( - ..., title='ExternalAgentConfig/detectClientRequestMethod' - ) - params: ExternalAgentConfigDetectParams - - -class ExternalAgentConfigImportClientRequestMethod( - RootModel[Literal['externalAgentConfig/import']] -): - root: Literal['externalAgentConfig/import'] = Field( - ..., title='ExternalAgentConfig/importClientRequestMethod' - ) - - -class ConfigValueWriteClientRequestMethod(RootModel[Literal['config/value/write']]): - root: Literal['config/value/write'] = Field( - ..., title='Config/value/writeClientRequestMethod' - ) - - -class ConfigValueWriteClientRequest(BaseModel): - id: RequestId - method: ConfigValueWriteClientRequestMethod = Field( - ..., title='Config/value/writeClientRequestMethod' - ) - params: ConfigValueWriteParams - - -class ConfigBatchWriteClientRequestMethod(RootModel[Literal['config/batchWrite']]): - root: Literal['config/batchWrite'] = Field( - ..., title='Config/batchWriteClientRequestMethod' + stage: ExperimentalFeatureStage = Field( + ..., description="Lifecycle stage of this feature flag." ) -class ConfigBatchWriteClientRequest(BaseModel): - id: RequestId - method: ConfigBatchWriteClientRequestMethod = Field( - ..., title='Config/batchWriteClientRequestMethod' +class ExperimentalFeatureListResponse(BaseModel): + data: list[ExperimentalFeature] + next_cursor: str | None = Field( + default=None, + alias="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.", ) - params: ConfigBatchWriteParams -class ConfigRequirementsReadClientRequestMethod( - RootModel[Literal['configRequirements/read']] -): - root: Literal['configRequirements/read'] = Field( - ..., title='ConfigRequirements/readClientRequestMethod' +class ExternalAgentConfigMigrationItem(BaseModel): + cwd: str | None = Field( + default=None, + description="Null or empty means home-scoped migration; non-empty means repo-scoped migration.", ) + description: str + item_type: ExternalAgentConfigMigrationItemType = Field(..., alias="itemType") -class ConfigRequirementsReadClientRequest(BaseModel): - id: RequestId - method: ConfigRequirementsReadClientRequestMethod = Field( - ..., title='ConfigRequirements/readClientRequestMethod' - ) - params: None = None - - -class AccountReadClientRequestMethod(RootModel[Literal['account/read']]): - root: Literal['account/read'] = Field(..., title='Account/readClientRequestMethod') - - -class AccountReadClientRequest(BaseModel): - id: RequestId - method: AccountReadClientRequestMethod = Field( - ..., title='Account/readClientRequestMethod' - ) - params: GetAccountParams - - -class FuzzyFileSearchClientRequestMethod(RootModel[Literal['fuzzyFileSearch']]): - root: Literal['fuzzyFileSearch'] = Field( - ..., title='FuzzyFileSearchClientRequestMethod' - ) - - -class FuzzyFileSearchClientRequest(BaseModel): - id: RequestId - method: FuzzyFileSearchClientRequestMethod = Field( - ..., title='FuzzyFileSearchClientRequestMethod' - ) - params: FuzzyFileSearchParams - - -class ErrorServerNotificationMethod(RootModel[Literal['error']]): - root: Literal['error'] = Field(..., title='ErrorServerNotificationMethod') - - -class ErrorServerNotification(BaseModel): - method: ErrorServerNotificationMethod = Field( - ..., title='ErrorServerNotificationMethod' - ) - params: ErrorNotification - - -class ThreadStartedServerNotificationMethod(RootModel[Literal['thread/started']]): - root: Literal['thread/started'] = Field( - ..., title='Thread/startedServerNotificationMethod' - ) - - -class ThreadStatusChangedServerNotificationMethod( - RootModel[Literal['thread/status/changed']] -): - root: Literal['thread/status/changed'] = Field( - ..., title='Thread/status/changedServerNotificationMethod' - ) - - -class ThreadStatusChangedServerNotification(BaseModel): - method: ThreadStatusChangedServerNotificationMethod = Field( - ..., title='Thread/status/changedServerNotificationMethod' - ) - params: ThreadStatusChangedNotification - - -class ThreadArchivedServerNotificationMethod(RootModel[Literal['thread/archived']]): - root: Literal['thread/archived'] = Field( - ..., title='Thread/archivedServerNotificationMethod' - ) - - -class ThreadArchivedServerNotification(BaseModel): - method: ThreadArchivedServerNotificationMethod = Field( - ..., title='Thread/archivedServerNotificationMethod' - ) - params: ThreadArchivedNotification - - -class ThreadUnarchivedServerNotificationMethod(RootModel[Literal['thread/unarchived']]): - root: Literal['thread/unarchived'] = Field( - ..., title='Thread/unarchivedServerNotificationMethod' - ) - - -class ThreadUnarchivedServerNotification(BaseModel): - method: ThreadUnarchivedServerNotificationMethod = Field( - ..., title='Thread/unarchivedServerNotificationMethod' - ) - params: ThreadUnarchivedNotification - - -class ThreadClosedServerNotificationMethod(RootModel[Literal['thread/closed']]): - root: Literal['thread/closed'] = Field( - ..., title='Thread/closedServerNotificationMethod' - ) - - -class ThreadClosedServerNotification(BaseModel): - method: ThreadClosedServerNotificationMethod = Field( - ..., title='Thread/closedServerNotificationMethod' - ) - params: ThreadClosedNotification - - -class SkillsChangedServerNotificationMethod(RootModel[Literal['skills/changed']]): - root: Literal['skills/changed'] = Field( - ..., title='Skills/changedServerNotificationMethod' - ) - - -class SkillsChangedServerNotification(BaseModel): - method: SkillsChangedServerNotificationMethod = Field( - ..., title='Skills/changedServerNotificationMethod' - ) - params: SkillsChangedNotification - - -class ThreadNameUpdatedServerNotificationMethod( - RootModel[Literal['thread/name/updated']] -): - root: Literal['thread/name/updated'] = Field( - ..., title='Thread/name/updatedServerNotificationMethod' - ) - - -class ThreadNameUpdatedServerNotification(BaseModel): - method: ThreadNameUpdatedServerNotificationMethod = Field( - ..., title='Thread/name/updatedServerNotificationMethod' - ) - params: ThreadNameUpdatedNotification - - -class ThreadTokenUsageUpdatedServerNotificationMethod( - RootModel[Literal['thread/tokenUsage/updated']] -): - root: Literal['thread/tokenUsage/updated'] = Field( - ..., title='Thread/tokenUsage/updatedServerNotificationMethod' - ) - - -class TurnStartedServerNotificationMethod(RootModel[Literal['turn/started']]): - root: Literal['turn/started'] = Field( - ..., title='Turn/startedServerNotificationMethod' - ) - - -class TurnCompletedServerNotificationMethod(RootModel[Literal['turn/completed']]): - root: Literal['turn/completed'] = Field( - ..., title='Turn/completedServerNotificationMethod' - ) - - -class TurnDiffUpdatedServerNotificationMethod(RootModel[Literal['turn/diff/updated']]): - root: Literal['turn/diff/updated'] = Field( - ..., title='Turn/diff/updatedServerNotificationMethod' - ) - - -class TurnDiffUpdatedServerNotification(BaseModel): - method: TurnDiffUpdatedServerNotificationMethod = Field( - ..., title='Turn/diff/updatedServerNotificationMethod' - ) - params: TurnDiffUpdatedNotification - - -class TurnPlanUpdatedServerNotificationMethod(RootModel[Literal['turn/plan/updated']]): - root: Literal['turn/plan/updated'] = Field( - ..., title='Turn/plan/updatedServerNotificationMethod' - ) - - -class ItemStartedServerNotificationMethod(RootModel[Literal['item/started']]): - root: Literal['item/started'] = Field( - ..., title='Item/startedServerNotificationMethod' - ) - - -class ItemCompletedServerNotificationMethod(RootModel[Literal['item/completed']]): - root: Literal['item/completed'] = Field( - ..., title='Item/completedServerNotificationMethod' - ) - - -class ItemAgentMessageDeltaServerNotificationMethod( - RootModel[Literal['item/agentMessage/delta']] -): - root: Literal['item/agentMessage/delta'] = Field( - ..., title='Item/agentMessage/deltaServerNotificationMethod' - ) - - -class ItemAgentMessageDeltaServerNotification(BaseModel): - method: ItemAgentMessageDeltaServerNotificationMethod = Field( - ..., title='Item/agentMessage/deltaServerNotificationMethod' - ) - params: AgentMessageDeltaNotification - - -class ItemPlanDeltaServerNotificationMethod(RootModel[Literal['item/plan/delta']]): - root: Literal['item/plan/delta'] = Field( - ..., title='Item/plan/deltaServerNotificationMethod' - ) - - -class ItemPlanDeltaServerNotification(BaseModel): - method: ItemPlanDeltaServerNotificationMethod = Field( - ..., title='Item/plan/deltaServerNotificationMethod' - ) - params: PlanDeltaNotification - - -class CommandExecOutputDeltaServerNotificationMethod( - RootModel[Literal['command/exec/outputDelta']] -): - root: Literal['command/exec/outputDelta'] = Field( - ..., title='Command/exec/outputDeltaServerNotificationMethod' - ) - - -class CommandExecOutputDeltaServerNotification(BaseModel): - method: CommandExecOutputDeltaServerNotificationMethod = Field( - ..., title='Command/exec/outputDeltaServerNotificationMethod' - ) - params: CommandExecOutputDeltaNotification - - -class ItemCommandExecutionOutputDeltaServerNotificationMethod( - RootModel[Literal['item/commandExecution/outputDelta']] -): - root: Literal['item/commandExecution/outputDelta'] = Field( - ..., title='Item/commandExecution/outputDeltaServerNotificationMethod' - ) - - -class ItemCommandExecutionOutputDeltaServerNotification(BaseModel): - method: ItemCommandExecutionOutputDeltaServerNotificationMethod = Field( - ..., title='Item/commandExecution/outputDeltaServerNotificationMethod' - ) - params: CommandExecutionOutputDeltaNotification - - -class ItemCommandExecutionTerminalInteractionServerNotificationMethod( - RootModel[Literal['item/commandExecution/terminalInteraction']] -): - root: Literal['item/commandExecution/terminalInteraction'] = Field( - ..., title='Item/commandExecution/terminalInteractionServerNotificationMethod' - ) - - -class ItemCommandExecutionTerminalInteractionServerNotification(BaseModel): - method: ItemCommandExecutionTerminalInteractionServerNotificationMethod = Field( - ..., title='Item/commandExecution/terminalInteractionServerNotificationMethod' - ) - params: TerminalInteractionNotification - - -class ItemFileChangeOutputDeltaServerNotificationMethod( - RootModel[Literal['item/fileChange/outputDelta']] -): - root: Literal['item/fileChange/outputDelta'] = Field( - ..., title='Item/fileChange/outputDeltaServerNotificationMethod' - ) - - -class ItemFileChangeOutputDeltaServerNotification(BaseModel): - method: ItemFileChangeOutputDeltaServerNotificationMethod = Field( - ..., title='Item/fileChange/outputDeltaServerNotificationMethod' - ) - params: FileChangeOutputDeltaNotification - - -class ServerRequestResolvedServerNotificationMethod( - RootModel[Literal['serverRequest/resolved']] -): - root: Literal['serverRequest/resolved'] = Field( - ..., title='ServerRequest/resolvedServerNotificationMethod' - ) - - -class ServerRequestResolvedServerNotification(BaseModel): - method: ServerRequestResolvedServerNotificationMethod = Field( - ..., title='ServerRequest/resolvedServerNotificationMethod' - ) - params: ServerRequestResolvedNotification - - -class ItemMcpToolCallProgressServerNotificationMethod( - RootModel[Literal['item/mcpToolCall/progress']] -): - root: Literal['item/mcpToolCall/progress'] = Field( - ..., title='Item/mcpToolCall/progressServerNotificationMethod' - ) - - -class ItemMcpToolCallProgressServerNotification(BaseModel): - method: ItemMcpToolCallProgressServerNotificationMethod = Field( - ..., title='Item/mcpToolCall/progressServerNotificationMethod' - ) - params: McpToolCallProgressNotification - - -class McpServerOauthLoginCompletedServerNotificationMethod( - RootModel[Literal['mcpServer/oauthLogin/completed']] -): - root: Literal['mcpServer/oauthLogin/completed'] = Field( - ..., title='McpServer/oauthLogin/completedServerNotificationMethod' - ) - - -class McpServerOauthLoginCompletedServerNotification(BaseModel): - method: McpServerOauthLoginCompletedServerNotificationMethod = Field( - ..., title='McpServer/oauthLogin/completedServerNotificationMethod' - ) - params: McpServerOauthLoginCompletedNotification - - -class AccountUpdatedServerNotificationMethod(RootModel[Literal['account/updated']]): - root: Literal['account/updated'] = Field( - ..., title='Account/updatedServerNotificationMethod' - ) - - -class AccountUpdatedServerNotification(BaseModel): - method: AccountUpdatedServerNotificationMethod = Field( - ..., title='Account/updatedServerNotificationMethod' - ) - params: AccountUpdatedNotification - - -class AccountRateLimitsUpdatedServerNotificationMethod( - RootModel[Literal['account/rateLimits/updated']] -): - root: Literal['account/rateLimits/updated'] = Field( - ..., title='Account/rateLimits/updatedServerNotificationMethod' - ) - - -class AppListUpdatedServerNotificationMethod(RootModel[Literal['app/list/updated']]): - root: Literal['app/list/updated'] = Field( - ..., title='App/list/updatedServerNotificationMethod' - ) - - -class ItemReasoningSummaryTextDeltaServerNotificationMethod( - RootModel[Literal['item/reasoning/summaryTextDelta']] -): - root: Literal['item/reasoning/summaryTextDelta'] = Field( - ..., title='Item/reasoning/summaryTextDeltaServerNotificationMethod' - ) - - -class ItemReasoningSummaryTextDeltaServerNotification(BaseModel): - method: ItemReasoningSummaryTextDeltaServerNotificationMethod = Field( - ..., title='Item/reasoning/summaryTextDeltaServerNotificationMethod' - ) - params: ReasoningSummaryTextDeltaNotification - - -class ItemReasoningSummaryPartAddedServerNotificationMethod( - RootModel[Literal['item/reasoning/summaryPartAdded']] -): - root: Literal['item/reasoning/summaryPartAdded'] = Field( - ..., title='Item/reasoning/summaryPartAddedServerNotificationMethod' - ) - - -class ItemReasoningSummaryPartAddedServerNotification(BaseModel): - method: ItemReasoningSummaryPartAddedServerNotificationMethod = Field( - ..., title='Item/reasoning/summaryPartAddedServerNotificationMethod' - ) - params: ReasoningSummaryPartAddedNotification - - -class ItemReasoningTextDeltaServerNotificationMethod( - RootModel[Literal['item/reasoning/textDelta']] -): - root: Literal['item/reasoning/textDelta'] = Field( - ..., title='Item/reasoning/textDeltaServerNotificationMethod' - ) - - -class ItemReasoningTextDeltaServerNotification(BaseModel): - method: ItemReasoningTextDeltaServerNotificationMethod = Field( - ..., title='Item/reasoning/textDeltaServerNotificationMethod' - ) - params: ReasoningTextDeltaNotification - - -class ThreadCompactedServerNotificationMethod(RootModel[Literal['thread/compacted']]): - root: Literal['thread/compacted'] = Field( - ..., title='Thread/compactedServerNotificationMethod' - ) - - -class ThreadCompactedServerNotification(BaseModel): - method: ThreadCompactedServerNotificationMethod = Field( - ..., title='Thread/compactedServerNotificationMethod' - ) - params: ContextCompactedNotification - - -class ModelReroutedServerNotificationMethod(RootModel[Literal['model/rerouted']]): - root: Literal['model/rerouted'] = Field( - ..., title='Model/reroutedServerNotificationMethod' - ) - - -class DeprecationNoticeServerNotificationMethod( - RootModel[Literal['deprecationNotice']] -): - root: Literal['deprecationNotice'] = Field( - ..., title='DeprecationNoticeServerNotificationMethod' - ) - - -class DeprecationNoticeServerNotification(BaseModel): - method: DeprecationNoticeServerNotificationMethod = Field( - ..., title='DeprecationNoticeServerNotificationMethod' - ) - params: DeprecationNoticeNotification - - -class ConfigWarningServerNotificationMethod(RootModel[Literal['configWarning']]): - root: Literal['configWarning'] = Field( - ..., title='ConfigWarningServerNotificationMethod' - ) - - -class FuzzyFileSearchSessionUpdatedServerNotificationMethod( - RootModel[Literal['fuzzyFileSearch/sessionUpdated']] -): - root: Literal['fuzzyFileSearch/sessionUpdated'] = Field( - ..., title='FuzzyFileSearch/sessionUpdatedServerNotificationMethod' - ) - - -class FuzzyFileSearchSessionCompletedServerNotificationMethod( - RootModel[Literal['fuzzyFileSearch/sessionCompleted']] -): - root: Literal['fuzzyFileSearch/sessionCompleted'] = Field( - ..., title='FuzzyFileSearch/sessionCompletedServerNotificationMethod' - ) - - -class FuzzyFileSearchSessionCompletedServerNotification(BaseModel): - method: FuzzyFileSearchSessionCompletedServerNotificationMethod = Field( - ..., title='FuzzyFileSearch/sessionCompletedServerNotificationMethod' - ) - params: FuzzyFileSearchSessionCompletedNotification - - -class ThreadRealtimeStartedServerNotificationMethod( - RootModel[Literal['thread/realtime/started']] -): - root: Literal['thread/realtime/started'] = Field( - ..., title='Thread/realtime/startedServerNotificationMethod' - ) - - -class ThreadRealtimeStartedServerNotification(BaseModel): - method: ThreadRealtimeStartedServerNotificationMethod = Field( - ..., title='Thread/realtime/startedServerNotificationMethod' - ) - params: ThreadRealtimeStartedNotification - - -class ThreadRealtimeItemAddedServerNotificationMethod( - RootModel[Literal['thread/realtime/itemAdded']] -): - root: Literal['thread/realtime/itemAdded'] = Field( - ..., title='Thread/realtime/itemAddedServerNotificationMethod' - ) - - -class ThreadRealtimeItemAddedServerNotification(BaseModel): - method: ThreadRealtimeItemAddedServerNotificationMethod = Field( - ..., title='Thread/realtime/itemAddedServerNotificationMethod' - ) - params: ThreadRealtimeItemAddedNotification - - -class ThreadRealtimeOutputAudioDeltaServerNotificationMethod( - RootModel[Literal['thread/realtime/outputAudio/delta']] -): - root: Literal['thread/realtime/outputAudio/delta'] = Field( - ..., title='Thread/realtime/outputAudio/deltaServerNotificationMethod' - ) - - -class ThreadRealtimeOutputAudioDeltaServerNotification(BaseModel): - method: ThreadRealtimeOutputAudioDeltaServerNotificationMethod = Field( - ..., title='Thread/realtime/outputAudio/deltaServerNotificationMethod' - ) - params: ThreadRealtimeOutputAudioDeltaNotification - - -class ThreadRealtimeErrorServerNotificationMethod( - RootModel[Literal['thread/realtime/error']] -): - root: Literal['thread/realtime/error'] = Field( - ..., title='Thread/realtime/errorServerNotificationMethod' - ) - - -class ThreadRealtimeErrorServerNotification(BaseModel): - method: ThreadRealtimeErrorServerNotificationMethod = Field( - ..., title='Thread/realtime/errorServerNotificationMethod' - ) - params: ThreadRealtimeErrorNotification - - -class ThreadRealtimeClosedServerNotificationMethod( - RootModel[Literal['thread/realtime/closed']] -): - root: Literal['thread/realtime/closed'] = Field( - ..., title='Thread/realtime/closedServerNotificationMethod' - ) - - -class ThreadRealtimeClosedServerNotification(BaseModel): - method: ThreadRealtimeClosedServerNotificationMethod = Field( - ..., title='Thread/realtime/closedServerNotificationMethod' - ) - params: ThreadRealtimeClosedNotification - - -class WindowsWorldWritableWarningServerNotificationMethod( - RootModel[Literal['windows/worldWritableWarning']] -): - root: Literal['windows/worldWritableWarning'] = Field( - ..., title='Windows/worldWritableWarningServerNotificationMethod' - ) - - -class WindowsWorldWritableWarningServerNotification(BaseModel): - method: WindowsWorldWritableWarningServerNotificationMethod = Field( - ..., title='Windows/worldWritableWarningServerNotificationMethod' - ) - params: WindowsWorldWritableWarningNotification - - -class WindowsSandboxSetupCompletedServerNotificationMethod( - RootModel[Literal['windowsSandbox/setupCompleted']] -): - root: Literal['windowsSandbox/setupCompleted'] = Field( - ..., title='WindowsSandbox/setupCompletedServerNotificationMethod' - ) - - -class AccountLoginCompletedServerNotificationMethod( - RootModel[Literal['account/login/completed']] -): - root: Literal['account/login/completed'] = Field( - ..., title='Account/login/completedServerNotificationMethod' - ) - - -class AccountLoginCompletedServerNotification(BaseModel): - method: AccountLoginCompletedServerNotificationMethod = Field( - ..., title='Account/login/completedServerNotificationMethod' - ) - params: AccountLoginCompletedNotification +class FileUpdateChange(BaseModel): + diff: str + kind: PatchChangeKind + path: str class InputImageFunctionCallOutputContentItem(BaseModel): detail: ImageDetail | None = None image_url: str type: InputImageFunctionCallOutputContentItemType = Field( - ..., title='InputImageFunctionCallOutputContentItemType' + ..., title="InputImageFunctionCallOutputContentItemType" ) @@ -5845,54 +5721,365 @@ class FunctionCallOutputContentItem( InputTextFunctionCallOutputContentItem | InputImageFunctionCallOutputContentItem ) = Field( ..., - 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.', + 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.", ) +class GetAccountResponse(BaseModel): + account: Account | None = None + requires_openai_auth: bool = Field(..., alias="requiresOpenaiAuth") + + +class McpServerStatus(BaseModel): + auth_status: McpAuthStatus = Field(..., alias="authStatus") + name: str + resource_templates: list[ResourceTemplate] = Field(..., alias="resourceTemplates") + resources: list[Resource] + tools: dict[str, Tool] + + +class Model(BaseModel): + availability_nux: ModelAvailabilityNux | None = Field( + default=None, alias="availabilityNux" + ) + default_reasoning_effort: ReasoningEffort = Field( + ..., alias="defaultReasoningEffort" + ) + description: str + display_name: str = Field(..., alias="displayName") + hidden: bool + id: str + input_modalities: list[InputModality] | None = Field( + default_factory=lambda: [ + InputModality.model_validate(v) for v in ["text", "image"] + ], + alias="inputModalities", + ) + is_default: bool = Field(..., alias="isDefault") + model: str + supported_reasoning_efforts: list[ReasoningEffortOption] = Field( + ..., alias="supportedReasoningEfforts" + ) + supports_personality: bool | None = Field( + default=False, alias="supportsPersonality" + ) + upgrade: str | None = None + upgrade_info: ModelUpgradeInfo | None = Field(default=None, alias="upgradeInfo") + + +class ModelListResponse(BaseModel): + data: list[Model] + next_cursor: str | None = Field( + default=None, + alias="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.", + ) + + +class NetworkApprovalContext(BaseModel): + host: str + protocol: NetworkApprovalProtocol + + +class NetworkPolicyAmendment(BaseModel): + action: NetworkPolicyRuleAction + host: str + + +class OverriddenMetadata(BaseModel): + effective_value: Any = Field(..., alias="effectiveValue") + message: str + overriding_layer: ConfigLayerMetadata = Field(..., alias="overridingLayer") + + +class PlanItemArg(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + status: StepStatus + step: str + + +class PluginMarketplaceEntry(BaseModel): + name: str + path: AbsolutePathBuf + plugins: list[PluginSummary] + + +class RateLimitSnapshot(BaseModel): + credits: CreditsSnapshot | None = None + limit_id: str | None = Field(default=None, alias="limitId") + limit_name: str | None = Field(default=None, alias="limitName") + plan_type: PlanType | None = Field(default=None, alias="planType") + primary: RateLimitWindow | None = None + secondary: RateLimitWindow | None = None + + +class HandoffRequestedRealtimeEvent(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + handoff_requested: RealtimeHandoffRequested = Field(..., alias="HandoffRequested") + + +class RealtimeEvent( + RootModel[ + SessionUpdatedRealtimeEvent + | AudioOutRealtimeEvent + | ConversationItemAddedRealtimeEvent + | ConversationItemDoneRealtimeEvent + | HandoffRequestedRealtimeEvent + | ErrorRealtimeEvent + ] +): + root: ( + SessionUpdatedRealtimeEvent + | AudioOutRealtimeEvent + | ConversationItemAddedRealtimeEvent + | ConversationItemDoneRealtimeEvent + | HandoffRequestedRealtimeEvent + | ErrorRealtimeEvent + ) + + +class RequestUserInputQuestion(BaseModel): + header: str + id: str + is_other: bool | None = Field(default=False, alias="isOther") + is_secret: bool | None = Field(default=False, alias="isSecret") + options: list[RequestUserInputQuestionOption] | None = None + question: str + + class WebSearchCallResponseItem(BaseModel): action: ResponsesApiWebSearchAction | None = None id: str | None = None status: str | None = None type: WebSearchCallResponseItemType = Field( - ..., title='WebSearchCallResponseItemType' + ..., title="WebSearchCallResponseItemType" ) -class CollaborationMode(BaseModel): - mode: ModeKind - settings: Settings +class ReviewCodeLocation(BaseModel): + absolute_file_path: str + line_range: ReviewLineRange -class WindowsSandboxSetupCompletedNotification(BaseModel): - error: str | None = None - mode: WindowsSandboxSetupMode - success: bool +class NetworkPolicyAmendment1(BaseModel): + network_policy_amendment: NetworkPolicyAmendment -class ExternalAgentConfigMigrationItem(BaseModel): - cwd: str | None = Field( +class NetworkPolicyAmendmentReviewDecision(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + network_policy_amendment: NetworkPolicyAmendment1 + + +class ReviewDecision( + RootModel[ + Literal["approved"] + | ApprovedExecpolicyAmendmentReviewDecision + | Literal["approved_for_session"] + | NetworkPolicyAmendmentReviewDecision + | Literal["denied"] + | Literal["abort"] + ] +): + root: ( + Literal["approved"] + | ApprovedExecpolicyAmendmentReviewDecision + | Literal["approved_for_session"] + | NetworkPolicyAmendmentReviewDecision + | Literal["denied"] + | Literal["abort"] + ) = Field(..., description="User's decision in response to an ExecApprovalRequest.") + + +class ReviewFinding(BaseModel): + body: str + code_location: ReviewCodeLocation + confidence_score: float + priority: int + title: str + + +class ReviewOutputEvent(BaseModel): + findings: list[ReviewFinding] + overall_confidence_score: float + overall_correctness: str + overall_explanation: str + + +class ReviewStartParams(BaseModel): + delivery: ReviewDelivery | None = Field( default=None, - description='Null or empty means home-scoped migration; non-empty means repo-scoped migration.', + description="Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`).", ) + target: ReviewTarget + thread_id: str = Field(..., alias="threadId") + + +class ErrorServerNotification(BaseModel): + method: ErrorServerNotificationMethod = Field( + ..., title="ErrorServerNotificationMethod" + ) + params: ErrorNotification + + +class ThreadStatusChangedServerNotification(BaseModel): + method: ThreadStatusChangedServerNotificationMethod = Field( + ..., title="Thread/status/changedServerNotificationMethod" + ) + params: ThreadStatusChangedNotification + + +class ThreadArchivedServerNotification(BaseModel): + method: ThreadArchivedServerNotificationMethod = Field( + ..., title="Thread/archivedServerNotificationMethod" + ) + params: ThreadArchivedNotification + + +class ThreadUnarchivedServerNotification(BaseModel): + method: ThreadUnarchivedServerNotificationMethod = Field( + ..., title="Thread/unarchivedServerNotificationMethod" + ) + params: ThreadUnarchivedNotification + + +class ThreadClosedServerNotification(BaseModel): + method: ThreadClosedServerNotificationMethod = Field( + ..., title="Thread/closedServerNotificationMethod" + ) + params: ThreadClosedNotification + + +class SkillsChangedServerNotification(BaseModel): + method: SkillsChangedServerNotificationMethod = Field( + ..., title="Skills/changedServerNotificationMethod" + ) + params: SkillsChangedNotification + + +class ThreadNameUpdatedServerNotification(BaseModel): + method: ThreadNameUpdatedServerNotificationMethod = Field( + ..., title="Thread/name/updatedServerNotificationMethod" + ) + params: ThreadNameUpdatedNotification + + +class TurnDiffUpdatedServerNotification(BaseModel): + method: TurnDiffUpdatedServerNotificationMethod = Field( + ..., title="Turn/diff/updatedServerNotificationMethod" + ) + params: TurnDiffUpdatedNotification + + +class CommandExecOutputDeltaServerNotification(BaseModel): + method: CommandExecOutputDeltaServerNotificationMethod = Field( + ..., title="Command/exec/outputDeltaServerNotificationMethod" + ) + params: CommandExecOutputDeltaNotification + + +class ItemCommandExecutionTerminalInteractionServerNotification(BaseModel): + method: ItemCommandExecutionTerminalInteractionServerNotificationMethod = Field( + ..., title="Item/commandExecution/terminalInteractionServerNotificationMethod" + ) + params: TerminalInteractionNotification + + +class ServerRequestResolvedServerNotification(BaseModel): + method: ServerRequestResolvedServerNotificationMethod = Field( + ..., title="ServerRequest/resolvedServerNotificationMethod" + ) + params: ServerRequestResolvedNotification + + +class AccountUpdatedServerNotification(BaseModel): + method: AccountUpdatedServerNotificationMethod = Field( + ..., title="Account/updatedServerNotificationMethod" + ) + params: AccountUpdatedNotification + + +class ConfigWarningServerNotification(BaseModel): + method: ConfigWarningServerNotificationMethod = Field( + ..., title="ConfigWarningServerNotificationMethod" + ) + params: ConfigWarningNotification + + +class ThreadRealtimeStartedServerNotification(BaseModel): + method: ThreadRealtimeStartedServerNotificationMethod = Field( + ..., title="Thread/realtime/startedServerNotificationMethod" + ) + params: ThreadRealtimeStartedNotification + + +class ThreadRealtimeItemAddedServerNotification(BaseModel): + method: ThreadRealtimeItemAddedServerNotificationMethod = Field( + ..., title="Thread/realtime/itemAddedServerNotificationMethod" + ) + params: ThreadRealtimeItemAddedNotification + + +class ThreadRealtimeOutputAudioDeltaServerNotification(BaseModel): + method: ThreadRealtimeOutputAudioDeltaServerNotificationMethod = Field( + ..., title="Thread/realtime/outputAudio/deltaServerNotificationMethod" + ) + params: ThreadRealtimeOutputAudioDeltaNotification + + +class ThreadRealtimeErrorServerNotification(BaseModel): + method: ThreadRealtimeErrorServerNotificationMethod = Field( + ..., title="Thread/realtime/errorServerNotificationMethod" + ) + params: ThreadRealtimeErrorNotification + + +class ThreadRealtimeClosedServerNotification(BaseModel): + method: ThreadRealtimeClosedServerNotificationMethod = Field( + ..., title="Thread/realtime/closedServerNotificationMethod" + ) + params: ThreadRealtimeClosedNotification + + +class WindowsWorldWritableWarningServerNotification(BaseModel): + method: WindowsWorldWritableWarningServerNotificationMethod = Field( + ..., title="Windows/worldWritableWarningServerNotificationMethod" + ) + params: WindowsWorldWritableWarningNotification + + +class SkillDependencies(BaseModel): + tools: list[SkillToolDependency] + + +class SkillMetadata(BaseModel): + dependencies: SkillDependencies | None = None description: str - item_type: ExternalAgentConfigMigrationItemType = Field(..., alias='itemType') - - -class ExternalAgentConfigImportParams(BaseModel): - migration_items: list[ExternalAgentConfigMigrationItem] = Field( - ..., alias='migrationItems' + enabled: bool + interface: SkillInterface | None = None + name: str + path: str + scope: SkillScope + short_description: str | None = Field( + default=None, + alias="shortDescription", + description="Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.", ) -class CollabAgentState(BaseModel): - message: str | None = None - status: CollabAgentStatus +class SkillsListEntry(BaseModel): + cwd: str + errors: list[SkillErrorInfo] + skills: list[SkillMetadata] -class FileUpdateChange(BaseModel): - diff: str - kind: PatchChangeKind - path: str +class SkillsListResponse(BaseModel): + data: list[SkillsListEntry] class ThreadSpawn(BaseModel): @@ -5904,7 +6091,7 @@ class ThreadSpawn(BaseModel): class ThreadSpawnSubAgentSource(BaseModel): model_config = ConfigDict( - extra='forbid', + extra="forbid", ) thread_spawn: ThreadSpawn @@ -5915,42 +6102,48 @@ class SubAgentSource( root: SubAgentSource1 | ThreadSpawnSubAgentSource | OtherSubAgentSource +class UserMessageThreadItem(BaseModel): + content: list[UserInput] + id: str + type: UserMessageThreadItemType = Field(..., title="UserMessageThreadItemType") + + class FileChangeThreadItem(BaseModel): changes: list[FileUpdateChange] id: str status: PatchApplyStatus - type: FileChangeThreadItemType = Field(..., title='FileChangeThreadItemType') + type: FileChangeThreadItemType = Field(..., title="FileChangeThreadItemType") class CollabAgentToolCallThreadItem(BaseModel): agents_states: dict[str, CollabAgentState] = Field( ..., - alias='agentsStates', - description='Last known status of the target agents, when available.', + alias="agentsStates", + description="Last known status of the target agents, when available.", ) - id: str = Field(..., description='Unique identifier for this collab tool call.') + id: str = Field(..., description="Unique identifier for this collab tool call.") prompt: str | None = Field( default=None, - description='Prompt text sent as part of the collab tool call, when available.', + description="Prompt text sent as part of the collab tool call, when available.", ) receiver_thread_ids: list[str] = Field( ..., - alias='receiverThreadIds', - description='Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.', + alias="receiverThreadIds", + description="Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.", ) sender_thread_id: str = Field( ..., - alias='senderThreadId', - description='Thread ID of the agent issuing the collab request.', + alias="senderThreadId", + description="Thread ID of the agent issuing the collab request.", ) status: CollabAgentToolCallStatus = Field( - ..., description='Current status of the collab tool call.' + ..., description="Current status of the collab tool call." ) tool: CollabAgentTool = Field( - ..., description='Name of the collab tool that was invoked.' + ..., description="Name of the collab tool that was invoked." ) type: CollabAgentToolCallThreadItemType = Field( - ..., title='CollabAgentToolCallThreadItemType' + ..., title="CollabAgentToolCallThreadItemType" ) @@ -5958,7 +6151,7 @@ class WebSearchThreadItem(BaseModel): action: WebSearchAction | None = None id: str query: str - type: WebSearchThreadItemType = Field(..., title='WebSearchThreadItemType') + type: WebSearchThreadItemType = Field(..., title="WebSearchThreadItemType") class ThreadItem( @@ -5999,242 +6192,60 @@ class ThreadItem( ) -class Turn(BaseModel): - error: TurnError | None = Field( - default=None, description="Only populated when the Turn's status is failed." - ) - id: str - items: list[ThreadItem] = Field( - ..., - description='Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.', - ) - status: TurnStatus - - -class SkillDependencies(BaseModel): - tools: list[SkillToolDependency] - - -class SkillMetadata(BaseModel): - dependencies: SkillDependencies | None = None - description: str - enabled: bool - interface: SkillInterface | None = None - name: str - path: str - scope: SkillScope - short_description: str | None = Field( +class ThreadListParams(BaseModel): + archived: bool | None = Field( default=None, - alias='shortDescription', - description='Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.', + description="Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.", ) - - -class SkillsListEntry(BaseModel): - cwd: str - errors: list[SkillErrorInfo] - skills: list[SkillMetadata] - - -class SkillsListResponse(BaseModel): - data: list[SkillsListEntry] - - -class PluginMarketplaceEntry(BaseModel): - name: str - path: AbsolutePathBuf - plugins: list[PluginSummary] - - -class PluginListResponse(BaseModel): - marketplaces: list[PluginMarketplaceEntry] - - -class AppMetadata(BaseModel): - categories: list[str] | None = None - developer: str | None = None - first_party_requires_install: bool | None = Field( - default=None, alias='firstPartyRequiresInstall' - ) - first_party_type: str | None = Field(default=None, alias='firstPartyType') - review: AppReview | None = None - screenshots: list[AppScreenshot] | None = None - seo_description: str | None = Field(default=None, alias='seoDescription') - show_in_composer_when_unlinked: bool | None = Field( - default=None, alias='showInComposerWhenUnlinked' - ) - sub_categories: list[str] | None = Field(default=None, alias='subCategories') - version: str | None = None - version_id: str | None = Field(default=None, alias='versionId') - version_notes: str | None = Field(default=None, alias='versionNotes') - - -class TurnStartResponse(BaseModel): - turn: Turn - - -class TextRange(BaseModel): - end: TextPosition - start: TextPosition - - -class ReviewStartResponse(BaseModel): - review_thread_id: str = Field( - ..., - alias='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.', - ) - turn: Turn - - -class Model(BaseModel): - availability_nux: ModelAvailabilityNux | None = Field( - default=None, alias='availabilityNux' - ) - default_reasoning_effort: ReasoningEffort = Field( - ..., alias='defaultReasoningEffort' - ) - description: str - display_name: str = Field(..., alias='displayName') - hidden: bool - id: str - input_modalities: list[InputModality] | None = Field( - default_factory=lambda: [ - InputModality.model_validate(v) for v in ['text', 'image'] - ], - alias='inputModalities', - ) - is_default: bool = Field(..., alias='isDefault') - model: str - supported_reasoning_efforts: list[ReasoningEffortOption] = Field( - ..., alias='supportedReasoningEfforts' - ) - supports_personality: bool | None = Field( - default=False, alias='supportsPersonality' - ) - upgrade: str | None = None - upgrade_info: ModelUpgradeInfo | None = Field(default=None, alias='upgradeInfo') - - -class ModelListResponse(BaseModel): - data: list[Model] - next_cursor: str | None = Field( + cursor: str | None = Field( default=None, - alias='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.', + description="Opaque pagination cursor returned by a previous call.", ) - - -class ExperimentalFeature(BaseModel): - announcement: str | None = Field( + cwd: str | None = Field( default=None, - description='Announcement copy shown to users when the feature is introduced. Null when this feature is not in beta.', + description="Optional cwd filter; when set, only threads whose session cwd exactly matches this path are returned.", ) - default_enabled: bool = Field( - ..., - alias='defaultEnabled', - description='Whether this feature is enabled by default.', - ) - description: str | None = Field( + limit: int | None = Field( default=None, - description='Short summary describing what the feature does. Null when this feature is not in beta.', + description="Optional page size; defaults to a reasonable server-side value.", + ge=0, ) - display_name: str | None = Field( + model_providers: list[str] | None = Field( default=None, - alias='displayName', - description='User-facing display name shown in the experimental features UI. Null when this feature is not in beta.', + alias="modelProviders", + description="Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.", ) - enabled: bool = Field( - ..., - description='Whether this feature is currently enabled in the loaded config.', - ) - name: str = Field( - ..., description='Stable key used in config.toml and CLI flag toggles.' - ) - stage: ExperimentalFeatureStage = Field( - ..., description='Lifecycle stage of this feature flag.' - ) - - -class ExperimentalFeatureListResponse(BaseModel): - data: list[ExperimentalFeature] - next_cursor: str | None = Field( + search_term: str | None = Field( default=None, - alias='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.', + alias="searchTerm", + description="Optional substring filter for the extracted thread title.", ) - - -class ModelReroutedNotification(BaseModel): - from_model: str = Field(..., alias='fromModel') - reason: ModelRerouteReason - thread_id: str = Field(..., alias='threadId') - to_model: str = Field(..., alias='toModel') - turn_id: str = Field(..., alias='turnId') - - -class McpServerStatus(BaseModel): - auth_status: McpAuthStatus = Field(..., alias='authStatus') - name: str - resource_templates: list[ResourceTemplate] = Field(..., alias='resourceTemplates') - resources: list[Resource] - tools: dict[str, Tool] - - -class ListMcpServerStatusResponse(BaseModel): - data: list[McpServerStatus] - next_cursor: str | None = Field( + sort_key: ThreadSortKey | None = Field( default=None, - alias='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.', + alias="sortKey", + description="Optional sort key; defaults to created_at.", ) - - -class RateLimitSnapshot(BaseModel): - credits: CreditsSnapshot | None = None - limit_id: str | None = Field(default=None, alias='limitId') - limit_name: str | None = Field(default=None, alias='limitName') - plan_type: PlanType | None = Field(default=None, alias='planType') - primary: RateLimitWindow | None = None - secondary: RateLimitWindow | None = None - - -class GetAccountRateLimitsResponse(BaseModel): - rate_limits: RateLimitSnapshot = Field( - ..., - alias='rateLimits', - description='Backward-compatible single-bucket view; mirrors the historical payload.', - ) - rate_limits_by_limit_id: dict[str, Any] | None = Field( + source_kinds: list[ThreadSourceKind] | None = Field( default=None, - alias='rateLimitsByLimitId', - description='Multi-bucket view keyed by metered `limit_id` (for example, `codex`).', + alias="sourceKinds", + description="Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.", ) -class AppConfig(BaseModel): - default_tools_approval_mode: AppToolApproval | None = None - default_tools_enabled: bool | None = None - destructive_enabled: bool | None = None - enabled: bool | None = True - open_world_enabled: bool | None = None - tools: AppToolsConfig | None = None +class ThreadTokenUsage(BaseModel): + last: TokenUsageBreakdown + model_context_window: int | None = Field(default=None, alias="modelContextWindow") + total: TokenUsageBreakdown -class AppsConfig(BaseModel): - field_default: AppsDefaultConfig | None = Field(default=None, alias='_default') +class ThreadTokenUsageUpdatedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + token_usage: ThreadTokenUsage = Field(..., alias="tokenUsage") + turn_id: str = Field(..., alias="turnId") -class ConfigLayer(BaseModel): - config: Any - disabled_reason: str | None = Field(default=None, alias='disabledReason') - name: ConfigLayerSource - version: str - - -class ConfigLayerMetadata(BaseModel): - name: ConfigLayerSource - version: str +class ThreadUnsubscribeResponse(BaseModel): + status: ThreadUnsubscribeStatus class ToolsV2(BaseModel): @@ -6242,76 +6253,51 @@ class ToolsV2(BaseModel): web_search: WebSearchToolConfig | None = None -class ExternalAgentConfigDetectResponse(BaseModel): - items: list[ExternalAgentConfigMigrationItem] - - -class OverriddenMetadata(BaseModel): - effective_value: Any = Field(..., alias='effectiveValue') - message: str - overriding_layer: ConfigLayerMetadata = Field(..., alias='overridingLayer') - - -class ConfigWriteResponse(BaseModel): - file_path: AbsolutePathBuf = Field( +class Turn(BaseModel): + error: TurnError | None = Field( + default=None, description="Only populated when the Turn's status is failed." + ) + id: str + items: list[ThreadItem] = Field( ..., - alias='filePath', - description='Canonical path to the config file that was written.', + description="Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.", ) - overridden_metadata: OverriddenMetadata | None = Field( - default=None, alias='overriddenMetadata' - ) - status: WriteStatus - version: str - - -class ConfigRequirements(BaseModel): - allowed_approval_policies: list[AskForApproval] | None = Field( - default=None, alias='allowedApprovalPolicies' - ) - allowed_sandbox_modes: list[SandboxMode] | None = Field( - default=None, alias='allowedSandboxModes' - ) - allowed_web_search_modes: list[WebSearchMode] | None = Field( - default=None, alias='allowedWebSearchModes' - ) - enforce_residency: ResidencyRequirement | None = Field( - default=None, alias='enforceResidency' - ) - feature_requirements: dict[str, Any] | None = Field( - default=None, alias='featureRequirements' - ) - - -class ConfigRequirementsReadResponse(BaseModel): - requirements: ConfigRequirements | None = Field( - default=None, - description='Null if no requirements are configured (e.g. no requirements.toml/MDM entries).', - ) - - -class ThreadTokenUsage(BaseModel): - last: TokenUsageBreakdown - model_context_window: int | None = Field(default=None, alias='modelContextWindow') - total: TokenUsageBreakdown - - -class ThreadTokenUsageUpdatedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - token_usage: ThreadTokenUsage = Field(..., alias='tokenUsage') - turn_id: str = Field(..., alias='turnId') - - -class TurnStartedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') - turn: Turn + status: TurnStatus class TurnCompletedNotification(BaseModel): - thread_id: str = Field(..., alias='threadId') + thread_id: str = Field(..., alias="threadId") turn: Turn +class UserMessageTurnItem(BaseModel): + content: list[UserInput] + id: str + type: UserMessageTurnItemType = Field(..., title="UserMessageTurnItemType") + + +class TurnItem( + RootModel[ + UserMessageTurnItem + | AgentMessageTurnItem + | PlanTurnItem + | ReasoningTurnItem + | WebSearchTurnItem + | ImageGenerationTurnItem + | ContextCompactionTurnItem + ] +): + root: ( + UserMessageTurnItem + | AgentMessageTurnItem + | PlanTurnItem + | ReasoningTurnItem + | WebSearchTurnItem + | ImageGenerationTurnItem + | ContextCompactionTurnItem + ) + + class TurnPlanStep(BaseModel): status: TurnPlanStepStatus step: str @@ -6320,307 +6306,671 @@ class TurnPlanStep(BaseModel): class TurnPlanUpdatedNotification(BaseModel): explanation: str | None = None plan: list[TurnPlanStep] - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") -class ItemStartedNotification(BaseModel): - item: ThreadItem - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') +class TurnStartParams(BaseModel): + approval_policy: AskForApproval | None = Field( + default=None, + alias="approvalPolicy", + description="Override the approval policy for this turn and subsequent turns.", + ) + cwd: str | None = Field( + default=None, + description="Override the working directory for this turn and subsequent turns.", + ) + effort: ReasoningEffort | None = Field( + default=None, + description="Override the reasoning effort for this turn and subsequent turns.", + ) + input: list[UserInput] + model: str | None = Field( + default=None, + description="Override the model for this turn and subsequent turns.", + ) + output_schema: Any | None = Field( + default=None, + alias="outputSchema", + description="Optional JSON Schema used to constrain the final assistant message for this turn.", + ) + personality: Personality | None = Field( + default=None, + description="Override the personality for this turn and subsequent turns.", + ) + sandbox_policy: SandboxPolicy | None = Field( + default=None, + alias="sandboxPolicy", + description="Override the sandbox policy for this turn and subsequent turns.", + ) + service_tier: ServiceTier | None = Field( + default=None, + alias="serviceTier", + description="Override the service tier for this turn and subsequent turns.", + ) + summary: ReasoningSummary | None = Field( + default=None, + description="Override the reasoning summary for this turn and subsequent turns.", + ) + thread_id: str = Field(..., alias="threadId") -class ItemCompletedNotification(BaseModel): - item: ThreadItem - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') +class TurnStartResponse(BaseModel): + turn: Turn + + +class TurnStartedNotification(BaseModel): + thread_id: str = Field(..., alias="threadId") + turn: Turn + + +class TurnSteerParams(BaseModel): + expected_turn_id: str = Field( + ..., + alias="expectedTurnId", + description="Required active turn id precondition. The request fails when it does not match the currently active turn.", + ) + input: list[UserInput] + thread_id: str = Field(..., alias="threadId") + + +class WindowsSandboxSetupCompletedNotification(BaseModel): + error: str | None = None + mode: WindowsSandboxSetupMode + success: bool class AccountRateLimitsUpdatedNotification(BaseModel): - rate_limits: RateLimitSnapshot = Field(..., alias='rateLimits') + rate_limits: RateLimitSnapshot = Field(..., alias="rateLimits") -class PlanItemArg(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - status: StepStatus - step: str - - -class ReviewCodeLocation(BaseModel): - absolute_file_path: str - line_range: ReviewLineRange - - -class OkResultOfCallToolResultOrString(BaseModel): - ok: CallToolResult = Field(..., alias='Ok') - - -class ResultOfCallToolResultOrString( - RootModel[OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString] -): - root: OkResultOfCallToolResultOrString | ErrResultOfCallToolResultOrString - - -class NetworkPolicyAmendmentModel(BaseModel): - network_policy_amendment: NetworkPolicyAmendment - - -class NetworkPolicyAmendmentReviewDecision(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - network_policy_amendment: NetworkPolicyAmendmentModel - - -class ReviewDecision( - RootModel[ - Literal['approved'] - | ApprovedExecpolicyAmendmentReviewDecision - | Literal['approved_for_session'] - | NetworkPolicyAmendmentReviewDecision - | Literal['denied'] - | Literal['abort'] - ] -): - root: ( - Literal['approved'] - | ApprovedExecpolicyAmendmentReviewDecision - | Literal['approved_for_session'] - | NetworkPolicyAmendmentReviewDecision - | Literal['denied'] - | Literal['abort'] - ) = Field(..., description="User's decision in response to an ExecApprovalRequest.") - - -class MacOsSeatbeltProfileExtensions(BaseModel): - macos_accessibility: bool | None = False - macos_automation: MacOsAutomationPermission | None = Field( - default_factory=lambda: MacOsAutomationPermission('none') - ) - macos_calendar: bool | None = False - macos_preferences: MacOsPreferencesPermission | None = 'read_only' - - -class InitializeParams(BaseModel): - capabilities: InitializeCapabilities | None = None - client_info: ClientInfo = Field(..., alias='clientInfo') - - -class FuzzyFileSearchSessionUpdatedNotification(BaseModel): - files: list[FuzzyFileSearchResult] - query: str - session_id: str = Field(..., alias='sessionId') - - -class HandoffRequestedRealtimeEvent(BaseModel): - model_config = ConfigDict( - extra='forbid', - ) - handoff_requested: RealtimeHandoffRequested = Field(..., alias='HandoffRequested') - - -class RealtimeEvent( - RootModel[ - SessionUpdatedRealtimeEvent - | AudioOutRealtimeEvent - | ConversationItemAddedRealtimeEvent - | ConversationItemDoneRealtimeEvent - | HandoffRequestedRealtimeEvent - | ErrorRealtimeEvent - ] -): - root: ( - SessionUpdatedRealtimeEvent - | AudioOutRealtimeEvent - | ConversationItemAddedRealtimeEvent - | ConversationItemDoneRealtimeEvent - | HandoffRequestedRealtimeEvent - | ErrorRealtimeEvent - ) - - -class ReviewFinding(BaseModel): - body: str - code_location: ReviewCodeLocation - confidence_score: float - priority: int - title: str - - -class ReviewOutputEvent(BaseModel): - findings: list[ReviewFinding] - overall_confidence_score: float - overall_correctness: str - overall_explanation: str - - -class RequestUserInputQuestion(BaseModel): - header: str +class AppInfo(BaseModel): + app_metadata: AppMetadata | None = Field(default=None, alias="appMetadata") + branding: AppBranding | None = None + description: str | None = None + distribution_channel: str | None = Field(default=None, alias="distributionChannel") id: str - is_other: bool | None = Field(default=False, alias='isOther') - is_secret: bool | None = Field(default=False, alias='isSecret') - options: list[RequestUserInputQuestionOption] | None = None - question: str + install_url: str | None = Field(default=None, alias="installUrl") + is_accessible: bool | None = Field(default=False, alias="isAccessible") + is_enabled: bool | None = Field( + default=True, + alias="isEnabled", + description="Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```", + ) + labels: dict[str, Any] | None = None + logo_url: str | None = Field(default=None, alias="logoUrl") + logo_url_dark: str | None = Field(default=None, alias="logoUrlDark") + name: str + plugin_display_names: list[str] | None = Field( + default=[], alias="pluginDisplayNames" + ) -class PermissionProfile(BaseModel): - file_system: FileSystemPermissions | None = None - macos: MacOsSeatbeltProfileExtensions | None = None - network: NetworkPermissions | None = None +class AppListUpdatedNotification(BaseModel): + data: list[AppInfo] -class TokenUsageInfo(BaseModel): - last_token_usage: TokenUsage - model_context_window: int | None = None - total_token_usage: TokenUsage +class AppsListResponse(BaseModel): + data: list[AppInfo] + next_cursor: str | None = Field( + default=None, + alias="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.", + ) + + +class ThreadListClientRequest(BaseModel): + id: RequestId + method: ThreadListClientRequestMethod = Field( + ..., title="Thread/listClientRequestMethod" + ) + params: ThreadListParams + + +class TurnStartClientRequest(BaseModel): + id: RequestId + method: TurnStartClientRequestMethod = Field( + ..., title="Turn/startClientRequestMethod" + ) + params: TurnStartParams + + +class TurnSteerClientRequest(BaseModel): + id: RequestId + method: TurnSteerClientRequestMethod = Field( + ..., title="Turn/steerClientRequestMethod" + ) + params: TurnSteerParams + + +class ReviewStartClientRequest(BaseModel): + id: RequestId + method: ReviewStartClientRequestMethod = Field( + ..., title="Review/startClientRequestMethod" + ) + params: ReviewStartParams + + +class CommandExecClientRequest(BaseModel): + id: RequestId + method: CommandExecClientRequestMethod = Field( + ..., title="Command/execClientRequestMethod" + ) + params: CommandExecParams + + +class CommandExecResizeClientRequest(BaseModel): + id: RequestId + method: CommandExecResizeClientRequestMethod = Field( + ..., title="Command/exec/resizeClientRequestMethod" + ) + params: CommandExecResizeParams + + +class ConfigValueWriteClientRequest(BaseModel): + id: RequestId + method: ConfigValueWriteClientRequestMethod = Field( + ..., title="Config/value/writeClientRequestMethod" + ) + params: ConfigValueWriteParams + + +class ConfigBatchWriteParams(BaseModel): + edits: list[ConfigEdit] + expected_version: str | None = Field(default=None, alias="expectedVersion") + file_path: str | None = Field( + default=None, + alias="filePath", + description="Path to the config file to write; defaults to the user's `config.toml` when omitted.", + ) + reload_user_config: bool | None = Field( + default=None, + alias="reloadUserConfig", + description="When true, hot-reload the updated user config into all loaded threads after writing.", + ) + + +class ConfigWriteResponse(BaseModel): + file_path: AbsolutePathBuf = Field( + ..., + alias="filePath", + description="Canonical path to the config file that was written.", + ) + overridden_metadata: OverriddenMetadata | None = Field( + default=None, alias="overriddenMetadata" + ) + status: WriteStatus + version: str class RealtimeConversationRealtimeEventMsg(BaseModel): payload: RealtimeEvent type: RealtimeConversationRealtimeEventMsgType = Field( - ..., title='RealtimeConversationRealtimeEventMsgType' + ..., title="RealtimeConversationRealtimeEventMsgType" ) class TokenCountEventMsg(BaseModel): info: TokenUsageInfo | None = None rate_limits: RateLimitSnapshot | None = None - type: TokenCountEventMsgType = Field(..., title='TokenCountEventMsgType') - - -class McpToolCallEndEventMsg(BaseModel): - call_id: str = Field( - ..., - description='Identifier for the corresponding McpToolCallBegin that finished.', - ) - duration: Duration - invocation: McpInvocation - result: ResultOfCallToolResultOrString = Field( - ..., description='Result of the tool call. Note this could be an error.' - ) - type: McpToolCallEndEventMsgType = Field(..., title='McpToolCallEndEventMsgType') + type: TokenCountEventMsgType = Field(..., title="TokenCountEventMsgType") class ExecApprovalRequestEventMsg(BaseModel): additional_permissions: PermissionProfile | None = Field( default=None, - description='Optional additional filesystem permissions requested for this command.', + description="Optional additional filesystem permissions requested for this command.", ) approval_id: str | None = Field( default=None, - description='Identifier for this specific approval callback.\n\nWhen absent, the approval is for the command item itself (`call_id`). This is present for subcommand approvals (via execve intercept).', + description="Identifier for this specific approval callback.\n\nWhen absent, the approval is for the command item itself (`call_id`). This is present for subcommand approvals (via execve intercept).", ) available_decisions: list[ReviewDecision] | None = Field( default=None, - description='Ordered list of decisions the client may present for this prompt.\n\nWhen absent, clients should derive the legacy default set from the other fields on this request.', + description="Ordered list of decisions the client may present for this prompt.\n\nWhen absent, clients should derive the legacy default set from the other fields on this request.", ) call_id: str = Field( - ..., description='Identifier for the associated command execution item.' + ..., description="Identifier for the associated command execution item." ) - command: list[str] = Field(..., description='The command to be executed.') + command: list[str] = Field(..., description="The command to be executed.") cwd: str = Field(..., description="The command's working directory.") network_approval_context: NetworkApprovalContext | None = Field( default=None, - description='Optional network context for a blocked request that can be approved.', + description="Optional network context for a blocked request that can be approved.", ) parsed_cmd: list[ParsedCommand] proposed_execpolicy_amendment: list[str] | None = Field( default=None, - description='Proposed execpolicy amendment that can be applied to allow future runs.', + description="Proposed execpolicy amendment that can be applied to allow future runs.", ) proposed_network_policy_amendments: list[NetworkPolicyAmendment] | None = Field( default=None, - description='Proposed network policy amendments (for example allow/deny this host in future).', + description="Proposed network policy amendments (for example allow/deny this host in future).", ) reason: str | None = Field( default=None, - description='Optional human-readable reason for the approval (e.g. retry without sandbox).', + description="Optional human-readable reason for the approval (e.g. retry without sandbox).", ) skill_metadata: ExecApprovalRequestSkillMetadata | None = Field( default=None, - description='Optional skill metadata when the approval was triggered by a skill script.', + description="Optional skill metadata when the approval was triggered by a skill script.", ) turn_id: str | None = Field( - default='', - description='Turn ID that this command belongs to. Uses `#[serde(default)]` for backwards compatibility.', + default="", + description="Turn ID that this command belongs to. Uses `#[serde(default)]` for backwards compatibility.", ) type: ExecApprovalRequestEventMsgType = Field( - ..., title='ExecApprovalRequestEventMsgType' - ) - - -class RequestPermissionsEventMsg(BaseModel): - call_id: str = Field( - ..., - description='Responses API call id for the associated tool call, if available.', - ) - permissions: PermissionProfile - reason: str | None = None - turn_id: str | None = Field( - default='', - description='Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.', - ) - type: RequestPermissionsEventMsgType = Field( - ..., title='RequestPermissionsEventMsgType' + ..., title="ExecApprovalRequestEventMsgType" ) class RequestUserInputEventMsg(BaseModel): call_id: str = Field( ..., - description='Responses API call id for the associated tool call, if available.', + description="Responses API call id for the associated tool call, if available.", ) questions: list[RequestUserInputQuestion] turn_id: str | None = Field( - default='', - description='Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.', + default="", + description="Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.", ) type: RequestUserInputEventMsgType = Field( - ..., title='RequestUserInputEventMsgType' + ..., title="RequestUserInputEventMsgType" ) class ListSkillsResponseEventMsg(BaseModel): skills: list[SkillsListEntry] type: ListSkillsResponseEventMsgType = Field( - ..., title='ListSkillsResponseEventMsgType' + ..., title="ListSkillsResponseEventMsgType" ) class PlanUpdateEventMsg(BaseModel): explanation: str | None = Field( default=None, - description='Arguments for the `update_plan` todo/checklist tool (not plan mode).', + description="Arguments for the `update_plan` todo/checklist tool (not plan mode).", ) plan: list[PlanItemArg] - type: PlanUpdateEventMsgType = Field(..., title='PlanUpdateEventMsgType') + type: PlanUpdateEventMsgType = Field(..., title="PlanUpdateEventMsgType") class ExitedReviewModeEventMsg(BaseModel): review_output: ReviewOutputEvent | None = None type: ExitedReviewModeEventMsgType = Field( - ..., title='ExitedReviewModeEventMsgType' + ..., title="ExitedReviewModeEventMsgType" ) -class InitializeClientRequest(BaseModel): - id: RequestId - method: InitializeClientRequestMethod = Field( - ..., title='InitializeClientRequestMethod' +class ItemStartedEventMsg(BaseModel): + item: TurnItem + thread_id: ThreadId + turn_id: str + type: ItemStartedEventMsgType = Field(..., title="ItemStartedEventMsgType") + + +class ItemCompletedEventMsg(BaseModel): + item: TurnItem + thread_id: ThreadId + turn_id: str + type: ItemCompletedEventMsgType = Field(..., title="ItemCompletedEventMsgType") + + +class ExternalAgentConfigDetectResponse(BaseModel): + items: list[ExternalAgentConfigMigrationItem] + + +class ExternalAgentConfigImportParams(BaseModel): + migration_items: list[ExternalAgentConfigMigrationItem] = Field( + ..., alias="migrationItems" ) - params: InitializeParams + + +class FunctionCallOutputBody(RootModel[str | list[FunctionCallOutputContentItem]]): + root: str | list[FunctionCallOutputContentItem] + + +class FunctionCallOutputPayload(BaseModel): + body: FunctionCallOutputBody + success: bool | None = None + + +class GetAccountRateLimitsResponse(BaseModel): + rate_limits: RateLimitSnapshot = Field( + ..., + alias="rateLimits", + description="Backward-compatible single-bucket view; mirrors the historical payload.", + ) + rate_limits_by_limit_id: dict[str, Any] | None = Field( + default=None, + alias="rateLimitsByLimitId", + description="Multi-bucket view keyed by metered `limit_id` (for example, `codex`).", + ) + + +class ItemCompletedNotification(BaseModel): + item: ThreadItem + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class ItemStartedNotification(BaseModel): + item: ThreadItem + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") + + +class ListMcpServerStatusResponse(BaseModel): + data: list[McpServerStatus] + next_cursor: str | None = Field( + default=None, + alias="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.", + ) + + +class PluginListResponse(BaseModel): + marketplaces: list[PluginMarketplaceEntry] + + +class ProfileV2(BaseModel): + model_config = ConfigDict( + extra="allow", + ) + approval_policy: AskForApproval | None = None + chatgpt_base_url: str | None = None + model: str | None = None + model_provider: str | None = None + model_reasoning_effort: ReasoningEffort | None = None + model_reasoning_summary: ReasoningSummary | None = None + model_verbosity: Verbosity | None = None + service_tier: ServiceTier | None = None + tools: ToolsV2 | None = None + web_search: WebSearchMode | None = None + + +class FunctionCallOutputResponseItem(BaseModel): + call_id: str + output: FunctionCallOutputPayload + type: FunctionCallOutputResponseItemType = Field( + ..., title="FunctionCallOutputResponseItemType" + ) + + +class CustomToolCallOutputResponseItem(BaseModel): + call_id: str + output: FunctionCallOutputPayload + type: CustomToolCallOutputResponseItemType = Field( + ..., title="CustomToolCallOutputResponseItemType" + ) + + +class ResponseItem( + RootModel[ + MessageResponseItem + | ReasoningResponseItem + | LocalShellCallResponseItem + | FunctionCallResponseItem + | FunctionCallOutputResponseItem + | CustomToolCallResponseItem + | CustomToolCallOutputResponseItem + | WebSearchCallResponseItem + | ImageGenerationCallResponseItem + | GhostSnapshotResponseItem + | CompactionResponseItem + | OtherResponseItem + ] +): + root: ( + MessageResponseItem + | ReasoningResponseItem + | LocalShellCallResponseItem + | FunctionCallResponseItem + | FunctionCallOutputResponseItem + | CustomToolCallResponseItem + | CustomToolCallOutputResponseItem + | WebSearchCallResponseItem + | ImageGenerationCallResponseItem + | GhostSnapshotResponseItem + | CompactionResponseItem + | OtherResponseItem + ) + + +class ReviewStartResponse(BaseModel): + review_thread_id: str = Field( + ..., + alias="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.", + ) + turn: Turn + + +class ThreadTokenUsageUpdatedServerNotification(BaseModel): + method: ThreadTokenUsageUpdatedServerNotificationMethod = Field( + ..., title="Thread/tokenUsage/updatedServerNotificationMethod" + ) + params: ThreadTokenUsageUpdatedNotification + + +class TurnStartedServerNotification(BaseModel): + method: TurnStartedServerNotificationMethod = Field( + ..., title="Turn/startedServerNotificationMethod" + ) + params: TurnStartedNotification + + +class TurnCompletedServerNotification(BaseModel): + method: TurnCompletedServerNotificationMethod = Field( + ..., title="Turn/completedServerNotificationMethod" + ) + params: TurnCompletedNotification + + +class TurnPlanUpdatedServerNotification(BaseModel): + method: TurnPlanUpdatedServerNotificationMethod = Field( + ..., title="Turn/plan/updatedServerNotificationMethod" + ) + params: TurnPlanUpdatedNotification + + +class ItemStartedServerNotification(BaseModel): + method: ItemStartedServerNotificationMethod = Field( + ..., title="Item/startedServerNotificationMethod" + ) + params: ItemStartedNotification + + +class ItemCompletedServerNotification(BaseModel): + method: ItemCompletedServerNotificationMethod = Field( + ..., title="Item/completedServerNotificationMethod" + ) + params: ItemCompletedNotification + + +class AccountRateLimitsUpdatedServerNotification(BaseModel): + method: AccountRateLimitsUpdatedServerNotificationMethod = Field( + ..., title="Account/rateLimits/updatedServerNotificationMethod" + ) + params: AccountRateLimitsUpdatedNotification + + +class AppListUpdatedServerNotification(BaseModel): + method: AppListUpdatedServerNotificationMethod = Field( + ..., title="App/list/updatedServerNotificationMethod" + ) + params: AppListUpdatedNotification + + +class WindowsSandboxSetupCompletedServerNotification(BaseModel): + method: WindowsSandboxSetupCompletedServerNotificationMethod = Field( + ..., title="WindowsSandbox/setupCompletedServerNotificationMethod" + ) + params: WindowsSandboxSetupCompletedNotification + + +class SubAgentSessionSource(BaseModel): + model_config = ConfigDict( + extra="forbid", + ) + sub_agent: SubAgentSource = Field(..., alias="subAgent") + + +class SessionSource(RootModel[SessionSource1 | SubAgentSessionSource]): + root: SessionSource1 | SubAgentSessionSource + + +class Thread(BaseModel): + agent_nickname: str | None = Field( + default=None, + alias="agentNickname", + description="Optional random unique nickname assigned to an AgentControl-spawned sub-agent.", + ) + agent_role: str | None = Field( + default=None, + alias="agentRole", + description="Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.", + ) + cli_version: str = Field( + ..., + alias="cliVersion", + description="Version of the CLI that created the thread.", + ) + created_at: int = Field( + ..., + alias="createdAt", + description="Unix timestamp (in seconds) when the thread was created.", + ) + cwd: str = Field(..., description="Working directory captured for the thread.") + ephemeral: bool = Field( + ..., + description="Whether the thread is ephemeral and should not be materialized on disk.", + ) + git_info: GitInfo | None = Field( + default=None, + alias="gitInfo", + description="Optional Git metadata captured when the thread was created.", + ) + id: str + model_provider: str = Field( + ..., + alias="modelProvider", + description="Model provider used for this thread (for example, 'openai').", + ) + name: str | None = Field( + default=None, description="Optional user-facing thread title." + ) + path: str | None = Field( + default=None, description="[UNSTABLE] Path to the thread on disk." + ) + preview: str = Field( + ..., description="Usually the first user message in the thread, if available." + ) + source: SessionSource = Field( + ..., + description="Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).", + ) + status: ThreadStatus = Field( + ..., description="Current runtime status for the thread." + ) + turns: list[Turn] = Field( + ..., + 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.", + ) + updated_at: int = Field( + ..., + alias="updatedAt", + description="Unix timestamp (in seconds) when the thread was last updated.", + ) + + +class ThreadForkResponse(BaseModel): + approval_policy: AskForApproval = Field(..., alias="approvalPolicy") + cwd: str + model: str + model_provider: str = Field(..., alias="modelProvider") + reasoning_effort: ReasoningEffort | None = Field( + default=None, alias="reasoningEffort" + ) + sandbox: SandboxPolicy + service_tier: ServiceTier | None = Field(default=None, alias="serviceTier") + thread: Thread + + +class ThreadListResponse(BaseModel): + data: list[Thread] + next_cursor: str | None = Field( + default=None, + alias="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.", + ) + + +class ThreadMetadataUpdateResponse(BaseModel): + thread: Thread + + +class ThreadReadResponse(BaseModel): + thread: Thread + + +class ThreadResumeResponse(BaseModel): + approval_policy: AskForApproval = Field(..., alias="approvalPolicy") + cwd: str + model: str + model_provider: str = Field(..., alias="modelProvider") + reasoning_effort: ReasoningEffort | None = Field( + default=None, alias="reasoningEffort" + ) + sandbox: SandboxPolicy + service_tier: ServiceTier | None = Field(default=None, alias="serviceTier") + thread: Thread + + +class ThreadRollbackResponse(BaseModel): + thread: Thread = Field( + ..., + 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`.", + ) + + +class ThreadStartResponse(BaseModel): + approval_policy: AskForApproval = Field(..., alias="approvalPolicy") + cwd: str + model: str + model_provider: str = Field(..., alias="modelProvider") + reasoning_effort: ReasoningEffort | None = Field( + default=None, alias="reasoningEffort" + ) + sandbox: SandboxPolicy + service_tier: ServiceTier | None = Field(default=None, alias="serviceTier") + thread: Thread + + +class ThreadStartedNotification(BaseModel): + thread: Thread + + +class ThreadUnarchiveResponse(BaseModel): + thread: Thread class ExternalAgentConfigImportClientRequest(BaseModel): id: RequestId method: ExternalAgentConfigImportClientRequestMethod = Field( - ..., title='ExternalAgentConfig/importClientRequestMethod' + ..., title="ExternalAgentConfig/importClientRequestMethod" ) params: ExternalAgentConfigImportParams +class ConfigBatchWriteClientRequest(BaseModel): + id: RequestId + method: ConfigBatchWriteClientRequestMethod = Field( + ..., title="Config/batchWriteClientRequestMethod" + ) + params: ConfigBatchWriteParams + + class ClientRequest( RootModel[ InitializeClientRequest @@ -6723,381 +7073,64 @@ class ClientRequest( | AccountReadClientRequest | FuzzyFileSearchClientRequest ) = Field( - ..., description='Request from the client to the server.', title='ClientRequest' + ..., description="Request from the client to the server.", title="ClientRequest" ) -class ThreadTokenUsageUpdatedServerNotification(BaseModel): - method: ThreadTokenUsageUpdatedServerNotificationMethod = Field( - ..., title='Thread/tokenUsage/updatedServerNotificationMethod' - ) - params: ThreadTokenUsageUpdatedNotification - - -class TurnStartedServerNotification(BaseModel): - method: TurnStartedServerNotificationMethod = Field( - ..., title='Turn/startedServerNotificationMethod' - ) - params: TurnStartedNotification - - -class TurnCompletedServerNotification(BaseModel): - method: TurnCompletedServerNotificationMethod = Field( - ..., title='Turn/completedServerNotificationMethod' - ) - params: TurnCompletedNotification - - -class TurnPlanUpdatedServerNotification(BaseModel): - method: TurnPlanUpdatedServerNotificationMethod = Field( - ..., title='Turn/plan/updatedServerNotificationMethod' - ) - params: TurnPlanUpdatedNotification - - -class ItemStartedServerNotification(BaseModel): - method: ItemStartedServerNotificationMethod = Field( - ..., title='Item/startedServerNotificationMethod' - ) - params: ItemStartedNotification - - -class ItemCompletedServerNotification(BaseModel): - method: ItemCompletedServerNotificationMethod = Field( - ..., title='Item/completedServerNotificationMethod' - ) - params: ItemCompletedNotification - - -class AccountRateLimitsUpdatedServerNotification(BaseModel): - method: AccountRateLimitsUpdatedServerNotificationMethod = Field( - ..., title='Account/rateLimits/updatedServerNotificationMethod' - ) - params: AccountRateLimitsUpdatedNotification - - -class ModelReroutedServerNotification(BaseModel): - method: ModelReroutedServerNotificationMethod = Field( - ..., title='Model/reroutedServerNotificationMethod' - ) - params: ModelReroutedNotification - - -class FuzzyFileSearchSessionUpdatedServerNotification(BaseModel): - method: FuzzyFileSearchSessionUpdatedServerNotificationMethod = Field( - ..., title='FuzzyFileSearch/sessionUpdatedServerNotificationMethod' - ) - params: FuzzyFileSearchSessionUpdatedNotification - - -class WindowsSandboxSetupCompletedServerNotification(BaseModel): - method: WindowsSandboxSetupCompletedServerNotificationMethod = Field( - ..., title='WindowsSandbox/setupCompletedServerNotificationMethod' - ) - params: WindowsSandboxSetupCompletedNotification - - -class FunctionCallOutputBody(RootModel[str | list[FunctionCallOutputContentItem]]): - root: str | list[FunctionCallOutputContentItem] - - -class FunctionCallOutputPayload(BaseModel): - body: FunctionCallOutputBody - success: bool | None = None - - -class FunctionCallOutputResponseItem(BaseModel): - call_id: str - output: FunctionCallOutputPayload - type: FunctionCallOutputResponseItemType = Field( - ..., title='FunctionCallOutputResponseItemType' - ) - - -class CustomToolCallOutputResponseItem(BaseModel): - call_id: str - output: FunctionCallOutputPayload - type: CustomToolCallOutputResponseItemType = Field( - ..., title='CustomToolCallOutputResponseItemType' - ) - - -class ResponseItem( - RootModel[ - MessageResponseItem - | ReasoningResponseItem - | LocalShellCallResponseItem - | FunctionCallResponseItem - | FunctionCallOutputResponseItem - | CustomToolCallResponseItem - | CustomToolCallOutputResponseItem - | WebSearchCallResponseItem - | ImageGenerationCallResponseItem - | GhostSnapshotResponseItem - | CompactionResponseItem - | OtherResponseItem - ] -): - root: ( - MessageResponseItem - | ReasoningResponseItem - | LocalShellCallResponseItem - | FunctionCallResponseItem - | FunctionCallOutputResponseItem - | CustomToolCallResponseItem - | CustomToolCallOutputResponseItem - | WebSearchCallResponseItem - | ImageGenerationCallResponseItem - | GhostSnapshotResponseItem - | CompactionResponseItem - | OtherResponseItem - ) - - -class SubAgentSessionSource(BaseModel): +class Config(BaseModel): model_config = ConfigDict( - extra='forbid', - ) - sub_agent: SubAgentSource = Field(..., alias='subAgent') - - -class SessionSource(RootModel[SessionSource1 | SubAgentSessionSource]): - root: SessionSource1 | SubAgentSessionSource - - -class Thread(BaseModel): - agent_nickname: str | None = Field( - default=None, - alias='agentNickname', - description='Optional random unique nickname assigned to an AgentControl-spawned sub-agent.', - ) - agent_role: str | None = Field( - default=None, - alias='agentRole', - description='Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.', - ) - cli_version: str = Field( - ..., - alias='cliVersion', - description='Version of the CLI that created the thread.', - ) - created_at: int = Field( - ..., - alias='createdAt', - description='Unix timestamp (in seconds) when the thread was created.', - ) - cwd: str = Field(..., description='Working directory captured for the thread.') - ephemeral: bool = Field( - ..., - description='Whether the thread is ephemeral and should not be materialized on disk.', - ) - git_info: GitInfo | None = Field( - default=None, - alias='gitInfo', - description='Optional Git metadata captured when the thread was created.', - ) - id: str - model_provider: str = Field( - ..., - alias='modelProvider', - description="Model provider used for this thread (for example, 'openai').", - ) - name: str | None = Field( - default=None, description='Optional user-facing thread title.' - ) - path: str | None = Field( - default=None, description='[UNSTABLE] Path to the thread on disk.' - ) - preview: str = Field( - ..., description='Usually the first user message in the thread, if available.' - ) - source: SessionSource = Field( - ..., - description='Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).', - ) - status: ThreadStatus = Field( - ..., description='Current runtime status for the thread.' - ) - turns: list[Turn] = Field( - ..., - 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.', - ) - updated_at: int = Field( - ..., - alias='updatedAt', - description='Unix timestamp (in seconds) when the thread was last updated.', - ) - - -class ThreadStartResponse(BaseModel): - approval_policy: AskForApproval = Field(..., alias='approvalPolicy') - cwd: str - model: str - model_provider: str = Field(..., alias='modelProvider') - reasoning_effort: ReasoningEffort | None = Field( - default=None, alias='reasoningEffort' - ) - sandbox: SandboxPolicy - service_tier: ServiceTier | None = Field(default=None, alias='serviceTier') - thread: Thread - - -class ThreadResumeResponse(BaseModel): - approval_policy: AskForApproval = Field(..., alias='approvalPolicy') - cwd: str - model: str - model_provider: str = Field(..., alias='modelProvider') - reasoning_effort: ReasoningEffort | None = Field( - default=None, alias='reasoningEffort' - ) - sandbox: SandboxPolicy - service_tier: ServiceTier | None = Field(default=None, alias='serviceTier') - thread: Thread - - -class ThreadForkResponse(BaseModel): - approval_policy: AskForApproval = Field(..., alias='approvalPolicy') - cwd: str - model: str - model_provider: str = Field(..., alias='modelProvider') - reasoning_effort: ReasoningEffort | None = Field( - default=None, alias='reasoningEffort' - ) - sandbox: SandboxPolicy - service_tier: ServiceTier | None = Field(default=None, alias='serviceTier') - thread: Thread - - -class ThreadMetadataUpdateResponse(BaseModel): - thread: Thread - - -class ThreadUnarchiveResponse(BaseModel): - thread: Thread - - -class ThreadRollbackResponse(BaseModel): - thread: Thread = Field( - ..., - 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`.', - ) - - -class ThreadListResponse(BaseModel): - data: list[Thread] - next_cursor: str | None = Field( - default=None, - alias='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.', - ) - - -class ThreadReadResponse(BaseModel): - thread: Thread - - -class AppInfo(BaseModel): - app_metadata: AppMetadata | None = Field(default=None, alias='appMetadata') - branding: AppBranding | None = None - description: str | None = None - distribution_channel: str | None = Field(default=None, alias='distributionChannel') - id: str - install_url: str | None = Field(default=None, alias='installUrl') - is_accessible: bool | None = Field(default=False, alias='isAccessible') - is_enabled: bool | None = Field( - default=True, - alias='isEnabled', - description='Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```', - ) - labels: dict[str, Any] | None = None - logo_url: str | None = Field(default=None, alias='logoUrl') - logo_url_dark: str | None = Field(default=None, alias='logoUrlDark') - name: str - plugin_display_names: list[str] | None = Field( - default=[], alias='pluginDisplayNames' - ) - - -class AppsListResponse(BaseModel): - data: list[AppInfo] - next_cursor: str | None = Field( - default=None, - alias='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.', - ) - - -class ConfigWarningNotification(BaseModel): - details: str | None = Field( - default=None, description='Optional extra guidance or error details.' - ) - path: str | None = Field( - default=None, - description='Optional path to the config file that triggered the warning.', - ) - range: TextRange | None = Field( - default=None, - description='Optional range for the error location inside the config file.', - ) - summary: str = Field(..., description='Concise summary of the warning.') - - -class ProfileV2(BaseModel): - model_config = ConfigDict( - extra='allow', + extra="allow", ) + analytics: AnalyticsConfig | None = None approval_policy: AskForApproval | None = None - chatgpt_base_url: str | None = None + compact_prompt: str | None = None + developer_instructions: str | None = None + forced_chatgpt_workspace_id: str | None = None + forced_login_method: ForcedLoginMethod | None = None + instructions: str | None = None model: str | None = None + model_auto_compact_token_limit: int | None = None + model_context_window: int | None = None model_provider: str | None = None model_reasoning_effort: ReasoningEffort | None = None model_reasoning_summary: ReasoningSummary | None = None model_verbosity: Verbosity | None = None + profile: str | None = None + profiles: dict[str, ProfileV2] | None = Field( + default_factory=lambda: ProfileV2.model_validate({}) + ) + review_model: str | None = None + sandbox_mode: SandboxMode | None = None + sandbox_workspace_write: SandboxWorkspaceWrite | None = None service_tier: ServiceTier | None = None tools: ToolsV2 | None = None web_search: WebSearchMode | None = None -class ThreadStartedNotification(BaseModel): - thread: Thread - - -class RawResponseItemCompletedNotification(BaseModel): - item: ResponseItem - thread_id: str = Field(..., alias='threadId') - turn_id: str = Field(..., alias='turnId') - - -class AppListUpdatedNotification(BaseModel): - data: list[AppInfo] +class ConfigReadResponse(BaseModel): + config: Config + layers: list[ConfigLayer] | None = None + origins: dict[str, ConfigLayerMetadata] class RawResponseItemEventMsg(BaseModel): item: ResponseItem - type: RawResponseItemEventMsgType = Field(..., title='RawResponseItemEventMsgType') + type: RawResponseItemEventMsgType = Field(..., title="RawResponseItemEventMsgType") + + +class RawResponseItemCompletedNotification(BaseModel): + item: ResponseItem + thread_id: str = Field(..., alias="threadId") + turn_id: str = Field(..., alias="turnId") class ThreadStartedServerNotification(BaseModel): method: ThreadStartedServerNotificationMethod = Field( - ..., title='Thread/startedServerNotificationMethod' + ..., title="Thread/startedServerNotificationMethod" ) params: ThreadStartedNotification -class AppListUpdatedServerNotification(BaseModel): - method: AppListUpdatedServerNotificationMethod = Field( - ..., title='App/list/updatedServerNotificationMethod' - ) - params: AppListUpdatedNotification - - -class ConfigWarningServerNotification(BaseModel): - method: ConfigWarningServerNotificationMethod = Field( - ..., title='ConfigWarningServerNotificationMethod' - ) - params: ConfigWarningNotification - - class ServerNotification( RootModel[ ErrorServerNotification @@ -7193,73 +7226,37 @@ class ServerNotification( | AccountLoginCompletedServerNotification ) = Field( ..., - description='Notification sent from the server to the client.', - title='ServerNotification', + description="Notification sent from the server to the client.", + title="ServerNotification", ) -class Config(BaseModel): - model_config = ConfigDict( - extra='allow', - ) - analytics: AnalyticsConfig | None = None - approval_policy: AskForApproval | None = None - web_search: WebSearchMode | None = None - compact_prompt: str | None = None - developer_instructions: str | None = None - forced_chatgpt_workspace_id: str | None = None - forced_login_method: ForcedLoginMethod | None = None - instructions: str | None = None - model: str | None = None - model_auto_compact_token_limit: int | None = None - model_context_window: int | None = None - model_provider: str | None = None - model_reasoning_effort: ReasoningEffort | None = None - model_reasoning_summary: ReasoningSummary | None = None - model_verbosity: Verbosity | None = None - profile: str | None = None - profiles: dict[str, ProfileV2] | None = Field( - default_factory=lambda: ProfileV2.model_validate({}) - ) - review_model: str | None = None - sandbox_mode: SandboxMode | None = None - sandbox_workspace_write: SandboxWorkspaceWrite | None = None - service_tier: ServiceTier | None = None - tools: ToolsV2 | None = None - - -class ConfigReadResponse(BaseModel): - config: Config - layers: list[ConfigLayer] | None = None - origins: dict[str, ConfigLayerMetadata] - - class SessionConfiguredEventMsg(BaseModel): approval_policy: AskForApproval = Field( - ..., description='When to escalate for approval for execution' + ..., description="When to escalate for approval for execution" ) cwd: str = Field( ..., - description='Working directory that should be treated as the *root* of the session.', + description="Working directory that should be treated as the *root* of the session.", ) forked_from_id: ThreadId | None = None history_entry_count: int = Field( - ..., description='Current number of entries in the history log.', ge=0 + ..., description="Current number of entries in the history log.", ge=0 ) history_log_id: int = Field( ..., - description='Identifier of the history log file (inode on Unix, 0 otherwise).', + description="Identifier of the history log file (inode on Unix, 0 otherwise).", ge=0, ) initial_messages: list[EventMsg] | None = Field( default=None, - description='Optional initial messages (as events) for resumed sessions. When present, UIs can use these to seed the history.', + description="Optional initial messages (as events) for resumed sessions. When present, UIs can use these to seed the history.", ) - model: str = Field(..., description='Tell the client what model is being queried.') + model: str = Field(..., description="Tell the client what model is being queried.") model_provider_id: str network_proxy: SessionNetworkProxyRuntime | None = Field( default=None, - description='Runtime proxy bind addresses, when the managed proxy was started for this session.', + description="Runtime proxy bind addresses, when the managed proxy was started for this session.", ) reasoning_effort: ReasoningEffort | None = Field( default=None, @@ -7267,18 +7264,18 @@ class SessionConfiguredEventMsg(BaseModel): ) rollout_path: str | None = Field( default=None, - description='Path in which the rollout is stored. Can be `None` for ephemeral threads', + description="Path in which the rollout is stored. Can be `None` for ephemeral threads", ) sandbox_policy: SandboxPolicy = Field( - ..., description='How to sandbox commands executed in the system' + ..., description="How to sandbox commands executed in the system" ) service_tier: ServiceTier | None = None session_id: ThreadId thread_name: str | None = Field( - default=None, description='Optional user-facing thread name (may be unset).' + default=None, description="Optional user-facing thread name (may be unset)." ) type: SessionConfiguredEventMsgType = Field( - ..., title='SessionConfiguredEventMsgType' + ..., title="SessionConfiguredEventMsgType" ) @@ -7445,8 +7442,8 @@ class EventMsg( | CollabResumeEndEventMsg ) = Field( ..., - description='Response event from the agent NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.', - title='EventMsg', + description="Response event from the agent NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.", + title="EventMsg", ) diff --git a/codex-rs/app-server-protocol/src/bin/export.rs b/codex-rs/app-server-protocol/src/bin/export.rs index 1267504f88..c053425333 100644 --- a/codex-rs/app-server-protocol/src/bin/export.rs +++ b/codex-rs/app-server-protocol/src/bin/export.rs @@ -15,6 +15,10 @@ struct Args { #[arg(short = 'p', long = "prettier", value_name = "PRETTIER_BIN")] prettier: Option, + /// Optional Ruff executable path to format generated Python files + #[arg(long = "ruff", value_name = "RUFF_BIN")] + ruff: Option, + /// Include experimental API methods and fields in generated output. #[arg(long = "experimental")] experimental: bool, @@ -34,5 +38,12 @@ fn main() -> Result<()> { }, )?; codex_app_server_protocol::generate_json_with_experimental(&json_out_dir, args.experimental)?; - codex_app_server_protocol::generate_python_with_experimental(&python_out_dir, args.experimental) + codex_app_server_protocol::generate_python_with_options( + &python_out_dir, + args.ruff.as_deref(), + codex_app_server_protocol::GeneratePythonOptions { + experimental_api: args.experimental, + ..codex_app_server_protocol::GeneratePythonOptions::default() + }, + ) } diff --git a/codex-rs/app-server-protocol/src/bin/write_schema_fixtures.rs b/codex-rs/app-server-protocol/src/bin/write_schema_fixtures.rs index f0aee72f3d..970828ef29 100644 --- a/codex-rs/app-server-protocol/src/bin/write_schema_fixtures.rs +++ b/codex-rs/app-server-protocol/src/bin/write_schema_fixtures.rs @@ -14,6 +14,10 @@ struct Args { #[arg(short = 'p', long = "prettier", value_name = "PRETTIER_BIN")] prettier: Option, + /// Optional path to the Ruff executable to format generated Python files. + #[arg(long = "ruff", value_name = "RUFF_BIN")] + ruff: Option, + /// Include experimental API methods and fields in generated fixtures. #[arg(long = "experimental")] experimental: bool, @@ -29,6 +33,7 @@ fn main() -> Result<()> { codex_app_server_protocol::write_schema_fixtures_with_options( &schema_root, args.prettier.as_deref(), + args.ruff.as_deref(), codex_app_server_protocol::SchemaFixtureOptions { experimental_api: args.experimental, }, diff --git a/codex-rs/app-server-protocol/src/export.rs b/codex-rs/app-server-protocol/src/export.rs index e1829b695c..2f047a7bfb 100644 --- a/codex-rs/app-server-protocol/src/export.rs +++ b/codex-rs/app-server-protocol/src/export.rs @@ -102,6 +102,21 @@ impl Default for GenerateTsOptions { } } +#[derive(Clone, Copy, Debug)] +pub struct GeneratePythonOptions { + pub run_ruff: bool, + pub experimental_api: bool, +} + +impl Default for GeneratePythonOptions { + fn default() -> Self { + Self { + run_ruff: true, + experimental_api: false, + } + } +} + pub fn generate_ts(out_dir: &Path, prettier: Option<&Path>) -> Result<()> { generate_ts_with_options(out_dir, prettier, GenerateTsOptions::default()) } @@ -244,10 +259,25 @@ pub fn generate_json_with_experimental(out_dir: &Path, experimental_api: bool) - } pub fn generate_python(out_dir: &Path) -> Result<()> { - generate_python_with_experimental(out_dir, false) + generate_python_with_options(out_dir, None, GeneratePythonOptions::default()) } pub fn generate_python_with_experimental(out_dir: &Path, experimental_api: bool) -> Result<()> { + generate_python_with_options( + out_dir, + None, + GeneratePythonOptions { + experimental_api, + ..GeneratePythonOptions::default() + }, + ) +} + +pub fn generate_python_with_options( + out_dir: &Path, + ruff: Option<&Path>, + options: GeneratePythonOptions, +) -> Result<()> { ensure_dir(out_dir)?; let temp_json_dir = std::env::temp_dir().join(format!( @@ -261,7 +291,7 @@ pub fn generate_python_with_experimental(out_dir: &Path, experimental_api: bool) ) })?; - generate_json_with_experimental(&temp_json_dir, experimental_api)?; + generate_json_with_experimental(&temp_json_dir, options.experimental_api)?; let bundle_path = temp_json_dir.join("codex_app_server_protocol.schemas.json"); let bundle = read_json_value(&bundle_path)?; let root_schema_path = temp_json_dir.join("codex_app_server_protocol.python.schemas.json"); @@ -295,6 +325,10 @@ pub fn generate_python_with_experimental(out_dir: &Path, experimental_api: bool) fs::write(module_dir.join("py.typed"), "") .with_context(|| format!("Failed to write {}", module_dir.join("py.typed").display()))?; + if options.run_ruff { + run_ruff_on_python_files(ruff, &module_dir)?; + } + let _ = fs::remove_dir_all(&temp_json_dir); Ok(()) } @@ -325,8 +359,7 @@ fn generate_python_models(schema_path: &Path, output_path: &Path) -> Result<()> .arg("--use-generic-base-class") .arg("--disable-timestamp") .arg("--formatters") - .arg("black") - .arg("isort"); + .arg("ruff-format"); let status = command.status().with_context(|| { format!( @@ -353,28 +386,25 @@ Install `uv`/`uvx` or `datamodel-codegen` to regenerate app-server Python bindin } fn datamodel_codegen_command() -> Command { - if command_exists("uvx") { - let mut command = Command::new("uvx"); + if command_exists("uv") { + // Keep the uv-managed tool environment next to the protocol crate source, + // not under schema/python/, which is regenerated as a fixture artifact. + let python_codegen_project = Path::new(env!("CARGO_MANIFEST_DIR")).join("python"); + let mut command = Command::new("uv"); command - .arg("--with") - .arg("black") - .arg("--with") - .arg("isort") - .arg("--from") - .arg("datamodel-code-generator") - .arg("datamodel-codegen"); + .arg("run") + .arg("--project") + .arg(python_codegen_project) + .arg("--locked") + .arg("python") + .arg("-m") + .arg("datamodel_code_generator"); return command; } - if command_exists("uv") { - let mut command = Command::new("uv"); + if command_exists("uvx") { + let mut command = Command::new("uvx"); command - .arg("tool") - .arg("run") - .arg("--with") - .arg("black") - .arg("--with") - .arg("isort") .arg("--from") .arg("datamodel-code-generator") .arg("datamodel-codegen"); @@ -384,6 +414,52 @@ fn datamodel_codegen_command() -> Command { Command::new("datamodel-codegen") } +fn run_ruff_on_python_files(ruff: Option<&Path>, out_dir: &Path) -> Result<()> { + let py_files = py_files_in_recursive(out_dir)?; + if py_files.is_empty() { + return Ok(()); + } + + let mut format_command = ruff_command(ruff)?; + let format_status = format_command + .arg("format") + .args(py_files.iter().map(|p| p.as_os_str())) + .status() + .context("Failed to invoke Ruff format")?; + if !format_status.success() { + return Err(anyhow!("Ruff format failed with status {format_status}")); + } + + Ok(()) +} + +fn ruff_command(ruff: Option<&Path>) -> Result { + if let Some(ruff_bin) = ruff { + return Ok(Command::new(ruff_bin)); + } + + if command_exists("uv") { + let python_codegen_project = Path::new(env!("CARGO_MANIFEST_DIR")).join("python"); + let mut command = Command::new("uv"); + command + .arg("run") + .arg("--project") + .arg(python_codegen_project) + .arg("--locked") + .arg("ruff"); + return Ok(command); + } + + if command_exists("ruff") { + return Ok(Command::new("ruff")); + } + + Err(anyhow!( + "Ruff was requested for Python generation, but no Ruff command is available. \ +Install `uv` for the vendored Python toolchain or pass `--ruff /path/to/ruff`." + )) +} + fn command_exists(command: &str) -> bool { std::env::var_os("PATH").is_some_and(|paths| { std::env::split_paths(&paths).any(|path| { @@ -2289,6 +2365,26 @@ fn ts_files_in_recursive(dir: &Path) -> Result> { Ok(files) } +fn py_files_in_recursive(dir: &Path) -> Result> { + let mut files = Vec::new(); + let mut stack = vec![dir.to_path_buf()]; + while let Some(d) = stack.pop() { + for entry in + fs::read_dir(&d).with_context(|| format!("Failed to read dir {}", d.display()))? + { + let entry = entry?; + let path = entry.path(); + if path.is_dir() { + stack.push(path); + } else if path.is_file() && path.extension() == Some(OsStr::new("py")) { + files.push(path); + } + } + } + files.sort(); + Ok(files) +} + /// Generate an index.ts file that re-exports all generated types. /// This allows consumers to import all types from a single file. fn generate_index_ts(out_dir: &Path) -> Result { diff --git a/codex-rs/app-server-protocol/src/lib.rs b/codex-rs/app-server-protocol/src/lib.rs index 41be1ad4a3..686419d379 100644 --- a/codex-rs/app-server-protocol/src/lib.rs +++ b/codex-rs/app-server-protocol/src/lib.rs @@ -5,11 +5,13 @@ mod protocol; mod schema_fixtures; pub use experimental_api::*; +pub use export::GeneratePythonOptions; pub use export::GenerateTsOptions; pub use export::generate_json; pub use export::generate_json_with_experimental; pub use export::generate_python; pub use export::generate_python_with_experimental; +pub use export::generate_python_with_options; pub use export::generate_ts; pub use export::generate_ts_with_options; pub use export::generate_types; diff --git a/codex-rs/app-server-protocol/src/schema_fixtures.rs b/codex-rs/app-server-protocol/src/schema_fixtures.rs index 0ce4db9f62..caecff5a81 100644 --- a/codex-rs/app-server-protocol/src/schema_fixtures.rs +++ b/codex-rs/app-server-protocol/src/schema_fixtures.rs @@ -85,14 +85,19 @@ pub fn generate_typescript_schema_fixture_subtree_for_tests() -> Result) -> Result<()> { - write_schema_fixtures_with_options(schema_root, prettier, SchemaFixtureOptions::default()) +pub fn write_schema_fixtures( + schema_root: &Path, + prettier: Option<&Path>, + ruff: Option<&Path>, +) -> Result<()> { + write_schema_fixtures_with_options(schema_root, prettier, ruff, SchemaFixtureOptions::default()) } /// Regenerates schema fixtures with configurable options. pub fn write_schema_fixtures_with_options( schema_root: &Path, prettier: Option<&Path>, + ruff: Option<&Path>, options: SchemaFixtureOptions, ) -> Result<()> { let typescript_out_dir = schema_root.join("typescript"); @@ -112,7 +117,14 @@ pub fn write_schema_fixtures_with_options( }, )?; crate::generate_json_with_experimental(&json_out_dir, options.experimental_api)?; - crate::generate_python_with_experimental(&python_out_dir, options.experimental_api)?; + crate::generate_python_with_options( + &python_out_dir, + ruff, + crate::GeneratePythonOptions { + experimental_api: options.experimental_api, + ..crate::GeneratePythonOptions::default() + }, + )?; Ok(()) } diff --git a/codex-rs/app-server-protocol/tests/schema_fixtures.rs b/codex-rs/app-server-protocol/tests/schema_fixtures.rs index fbe1fd4408..41489c02b0 100644 --- a/codex-rs/app-server-protocol/tests/schema_fixtures.rs +++ b/codex-rs/app-server-protocol/tests/schema_fixtures.rs @@ -1,6 +1,7 @@ use anyhow::Context; use anyhow::Result; use codex_app_server_protocol::generate_json_with_experimental; +use codex_app_server_protocol::generate_python_with_experimental; use codex_app_server_protocol::generate_typescript_schema_fixture_subtree_for_tests; use codex_app_server_protocol::read_schema_fixture_subtree; use similar::TextDiff; @@ -27,6 +28,13 @@ fn json_schema_fixtures_match_generated() -> Result<()> { }) } +#[test] +fn python_schema_fixtures_match_generated() -> Result<()> { + assert_schema_fixtures_match_generated("python", |output_dir| { + generate_python_with_experimental(output_dir, false) + }) +} + fn assert_schema_fixtures_match_generated( label: &'static str, generate: impl FnOnce(&Path) -> Result<()>, diff --git a/codex-rs/cli/src/main.rs b/codex-rs/cli/src/main.rs index bf08dda2ca..1ceaff6567 100644 --- a/codex-rs/cli/src/main.rs +++ b/codex-rs/cli/src/main.rs @@ -385,6 +385,10 @@ struct GeneratePythonCommand { #[arg(short = 'o', long = "out", value_name = "DIR")] out_dir: PathBuf, + /// Optional path to the Ruff executable to format generated Python files + #[arg(long = "ruff", value_name = "RUFF_BIN")] + ruff: Option, + /// Include experimental methods and fields in the generated output #[arg(long = "experimental", default_value_t = false)] experimental: bool, @@ -646,9 +650,13 @@ async fn cli_main(arg0_paths: Arg0DispatchPaths) -> anyhow::Result<()> { )?; } Some(AppServerSubcommand::GeneratePython(gen_cli)) => { - codex_app_server_protocol::generate_python_with_experimental( + codex_app_server_protocol::generate_python_with_options( &gen_cli.out_dir, - gen_cli.experimental, + gen_cli.ruff.as_deref(), + codex_app_server_protocol::GeneratePythonOptions { + experimental_api: gen_cli.experimental, + ..codex_app_server_protocol::GeneratePythonOptions::default() + }, )?; } },