Compare commits

..

32 Commits

Author SHA1 Message Date
Dax Raad e4b4b913fc fix(core): resume background completions 2026-07-08 03:44:52 +00:00
opencode-agent[bot] ed4f833813 fix(core): preserve provider metadata namespaces (#35817)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-07-07 21:45:58 -05:00
opencode-agent[bot] e96c24ce2e test(core): fix mutable plugin fixture (#35837) 2026-07-07 22:22:12 -04:00
Kit Langton ed6ad272ec refactor(schema): apply session review decisions (#35793) 2026-07-07 22:10:11 -04:00
Kit Langton d27746e5b3 test(core): simplify runner test fixtures (#35832) 2026-07-07 21:58:52 -04:00
Kit Langton eb661e6e6d fix(core): settle unadvertised tool calls and repair session hook test contexts 2026-07-07 21:51:23 -04:00
Dax Raad 3379e44abb refactor(core): rename ApplyPatchTool to PatchTool 2026-07-07 21:16:00 -04:00
Dax e1abf59c59 fix(core): provide PluginHooks in plugin test layer (#35811) 2026-07-07 20:03:41 -04:00
Dax 4f976bcf1a feat(plugin): add session request hook (#35794) 2026-07-07 19:56:47 -04:00
Kit Langton e25a724bc2 test(tui): cover patch diff display aliases (#35810) 2026-07-07 19:44:54 -04:00
Kit Langton 521ea87192 fix(core): retain reasoning delta state (#35758) 2026-07-07 19:44:40 -04:00
Aiden Cline 3100701488 fix(tui): restore prompt context usage (#35795) 2026-07-07 17:49:33 -05:00
Kit Langton 9c54291ae8 fix(tui): restore forms on reconnect
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
2026-07-07 22:47:13 +00:00
Dax Raad 52ad916ba4 fix(tui): restore permissions on reconnect
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
2026-07-07 22:44:26 +00:00
Dax Raad 5db320b02d refactor: rename apply_patch tool 2026-07-07 16:27:25 -04:00
Aiden Cline 910e37f6d8 fix: update v2 session usage metrics (#35468) 2026-07-07 14:31:54 -05:00
Kit Langton 81f6e06681 feat: enable background subagents by default 2026-07-07 15:18:46 -04:00
James Long da68e2865e feat(tui): wire move session command (#35203) 2026-07-07 14:49:11 -04:00
Aiden Cline f86e1cc1ff fix(codemode): preserve collection value identity (#35776) 2026-07-07 13:40:55 -05:00
Aiden Cline 947bbf9490 feat(mcp): expose resource catalog API (#35773) 2026-07-07 13:34:29 -05:00
James Long 3e57b43a4a feat(session): support admit-only synthetic messages (#35774) 2026-07-07 14:17:20 -04:00
opencode-agent[bot] cb18a42a47 docs(codemode): clarify implicit return guidance (#35763)
Co-authored-by: Kit Langton <kit.langton@gmail.com>
2026-07-07 12:48:05 -05:00
Aiden Cline 1fb2837fd3 feat(codemode): expand numeric standard library (#35749) 2026-07-07 12:11:57 -05:00
Aiden Cline 66a8d830aa feat(core): support MCP resources (#35656) 2026-07-07 11:55:06 -05:00
opencode-agent[bot] d0733f83bf fix(codemode): return final top-level expression (#35759)
Co-authored-by: Kit Langton <kit.langton@gmail.com>
2026-07-07 11:44:50 -05:00
Kit Langton b2ce195bda fix(core): normalize Location.Ref keys in LocationServiceMap (#35757) 2026-07-07 12:25:29 -04:00
James Long 6c065ca6a5 feat(simulation): render driven UI screenshots and videos (#35739) 2026-07-07 12:15:01 -04:00
Dax Raad dd1c007877 docs 2026-07-07 12:08:45 -04:00
Kit Langton 8deb0e5780 fix(core): preserve SDK plugins across location eviction (#35725) 2026-07-07 11:43:40 -04:00
Aiden Cline f488089179 fix: preserve compaction files and classify Z.AI overflow (#35747)
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: 冯基魁 <56265583+fengjikui@users.noreply.github.com>
2026-07-07 09:54:31 -05:00
Kit Langton e3a39b214f fix(core): lower failed reasoning to text (#35735) 2026-07-07 09:49:17 -04:00
James Long b6a2912bb1 refactor(simulation): type RPC request payloads (#35734) 2026-07-07 09:21:19 -04:00
375 changed files with 14693 additions and 9600 deletions
+116 -6
View File
@@ -101,7 +101,6 @@
"dependencies": {
"@effect/platform-node": "catalog:",
"@opencode-ai/client": "workspace:*",
"@opencode-ai/codemode": "workspace:*",
"@opencode-ai/core": "workspace:*",
"@opencode-ai/plugin": "workspace:*",
"@opencode-ai/schema": "workspace:*",
@@ -874,6 +873,7 @@
"name": "@opencode-ai/simulation",
"version": "1.17.13",
"dependencies": {
"@napi-rs/canvas": "1.0.2",
"@opencode-ai/core": "workspace:*",
"@opencode-ai/llm": "workspace:*",
"@opentui/core": "catalog:",
@@ -1612,11 +1612,11 @@
"@emmetio/stream-reader-utils": ["@emmetio/stream-reader-utils@0.1.0", "", {}, "sha512-ZsZ2I9Vzso3Ho/pjZFsmmZ++FWeEd/txqybHTm4OgaZzdS8V9V/YYWQwg5TC38Z7uLWUV1vavpLLbjJtKubR1A=="],
"@emnapi/core": ["@emnapi/core@1.9.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA=="],
"@emnapi/core": ["@emnapi/core@1.11.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" } }, "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ=="],
"@emnapi/runtime": ["@emnapi/runtime@1.9.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw=="],
"@emnapi/runtime": ["@emnapi/runtime@1.11.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw=="],
"@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="],
"@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA=="],
"@emotion/is-prop-valid": ["@emotion/is-prop-valid@0.8.8", "", { "dependencies": { "@emotion/memoize": "0.7.4" } }, "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA=="],
@@ -1984,6 +1984,30 @@
"@msgpackr-extract/msgpackr-extract-win32-x64": ["@msgpackr-extract/msgpackr-extract-win32-x64@3.0.4", "", { "os": "win32", "cpu": "x64" }, "sha512-CmCXPQrkbwExx3j946/PtHWHbYJiCRBRDl4BlkRQcJB/YOwQxJRTpoo7aTsortjgoJ1x7opzTSxn7C+ASSLVjQ=="],
"@napi-rs/canvas": ["@napi-rs/canvas@1.0.2", "", { "optionalDependencies": { "@napi-rs/canvas-android-arm64": "1.0.2", "@napi-rs/canvas-darwin-arm64": "1.0.2", "@napi-rs/canvas-darwin-x64": "1.0.2", "@napi-rs/canvas-linux-arm-gnueabihf": "1.0.2", "@napi-rs/canvas-linux-arm64-gnu": "1.0.2", "@napi-rs/canvas-linux-arm64-musl": "1.0.2", "@napi-rs/canvas-linux-riscv64-gnu": "1.0.2", "@napi-rs/canvas-linux-x64-gnu": "1.0.2", "@napi-rs/canvas-linux-x64-musl": "1.0.2", "@napi-rs/canvas-win32-arm64-msvc": "1.0.2", "@napi-rs/canvas-win32-x64-msvc": "1.0.2" } }, "sha512-EYEqlMYaCbpZDz+IgDH5xp9MTd3ui4dmGqbQYryhMLnSRxrhHKq5KQWHHKxFUcEP4Hp8/BWgvqXocX4j7iSbOQ=="],
"@napi-rs/canvas-android-arm64": ["@napi-rs/canvas-android-arm64@1.0.2", "", { "os": "android", "cpu": "arm64" }, "sha512-IMXKVQod0ol4vt3gmClUfXz4JAgHYESGPCUqmH3lQxBoL0K/2greJaQE1HVBVxWWFKfLc4OLZVdxg7kXVyXv+g=="],
"@napi-rs/canvas-darwin-arm64": ["@napi-rs/canvas-darwin-arm64@1.0.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Sc8tPi6cF+5lqOzCCKFALJHhDiRwyMzTPYm3bbhdXsOunU0lQO5f05ucyOzN2r55I23Hg5bsjH63uSCvWp3EgQ=="],
"@napi-rs/canvas-darwin-x64": ["@napi-rs/canvas-darwin-x64@1.0.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-niDXZ9LhKB1zLrUdYB64RHQFDGz9rr0eGx061qtJJU3U20EMMIx28ADF5fVYbhtOgkWQrBjFicfaye1yM0U62A=="],
"@napi-rs/canvas-linux-arm-gnueabihf": ["@napi-rs/canvas-linux-arm-gnueabihf@1.0.2", "", { "os": "linux", "cpu": "arm" }, "sha512-sgatQL9JxGRH/Amzcvu0P3t8Am3duou74CisfuJ41Dwt8cWy723z/9KZ8LlgmxfypEwEZxSTNFJtU8d281lmhQ=="],
"@napi-rs/canvas-linux-arm64-gnu": ["@napi-rs/canvas-linux-arm64-gnu@1.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-dgKuX0peF3xwY6ZF5QxGS4wbfDqpoFAJYXiLSp+guZKARQUKMkRqZSDrXKj7nfrec3UCMzC0PFCPte0ES98AiA=="],
"@napi-rs/canvas-linux-arm64-musl": ["@napi-rs/canvas-linux-arm64-musl@1.0.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-qwROoDIC9upfvDoRLuPn2aNg9CGW1x0Ygr4k2Or+8paA9d0qBLwk87U+g8KQpoOviKoPoiwl97kvBYuYD7qZoA=="],
"@napi-rs/canvas-linux-riscv64-gnu": ["@napi-rs/canvas-linux-riscv64-gnu@1.0.2", "", { "os": "linux", "cpu": "none" }, "sha512-fXRjnPihdnbO6qy1QQOgxAonb68A0TCEG7rj1x7v7rxNElsE8EVIKIEUTvyDtU+sthYSbX+8e7g3oZiLGnOmxw=="],
"@napi-rs/canvas-linux-x64-gnu": ["@napi-rs/canvas-linux-x64-gnu@1.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-nPR97DXhbWIAy7yazF3jc06kEPMqYMLmPzFOVNlwKPfIoSChnI+x7dc0hTLaihz3jxrjL6j4BbA7earxfx4X3g=="],
"@napi-rs/canvas-linux-x64-musl": ["@napi-rs/canvas-linux-x64-musl@1.0.2", "", { "os": "linux", "cpu": "x64" }, "sha512-l7zZY5+jL5qnBZtDz7CoBtY6p7EkHu422g/0zWwrOrzIwWyWxZFRfZZORY1UG7YApymPLx+UbOkN206xXn/c1Q=="],
"@napi-rs/canvas-win32-arm64-msvc": ["@napi-rs/canvas-win32-arm64-msvc@1.0.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-yE0koHCFF4PIbMc2o2SEALhnipz7WBISh5glLvQiomtIoCcW0np3H4Lw93ceJAfJttTTeIIWFbwH84F7EVzjMQ=="],
"@napi-rs/canvas-win32-x64-msvc": ["@napi-rs/canvas-win32-x64-msvc@1.0.2", "", { "os": "win32", "cpu": "x64" }, "sha512-okU8/t2foV6C31n0GtvEMbfD5rOFc70+/6xUNME9Guld29sgSOIGUEDScAWFlcP3k5TYQRl9TNkwJEEjh15w8A=="],
"@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.4", "", { "dependencies": { "@tybys/wasm-util": "^0.10.1" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" } }, "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow=="],
"@noble/hashes": ["@noble/hashes@2.2.0", "", {}, "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg=="],
@@ -2278,7 +2302,7 @@
"@oxc-parser/binding-win32-x64-msvc": ["@oxc-parser/binding-win32-x64-msvc@0.127.0", "", { "os": "win32", "cpu": "x64" }, "sha512-rOrnSQSCbhI2kowr9XxE7m9a8oQXnBHjnS6j95LxxAnEZ0+Fz20WlRXG4ondQb+ejjt2KOsa65sE6++L6kUd+w=="],
"@oxc-project/types": ["@oxc-project/types@0.127.0", "", {}, "sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ=="],
"@oxc-project/types": ["@oxc-project/types@0.138.0", "", {}, "sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA=="],
"@oxc-resolver/binding-android-arm-eabi": ["@oxc-resolver/binding-android-arm-eabi@11.20.0", "", { "os": "android", "cpu": "arm" }, "sha512-IjfWOXRgJFNdORDl+Uf1aibNgZY2guOD3zmOhx1BGVb/MIiqlFTdmjpQNplSN58lhWehnX4UNqC3QwpUo8pjJg=="],
@@ -2570,7 +2594,37 @@
"@remix-run/router": ["@remix-run/router@1.9.0", "", {}, "sha512-bV63itrKBC0zdT27qYm6SDZHlkXwFL1xMBuhkn+X7l0+IIhNaH5wuuvZKp6eKhCD4KFhujhfhCT1YxXW6esUIA=="],
"@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-beta.27", "", {}, "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA=="],
"@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.1.4", "", { "os": "android", "cpu": "arm64" }, "sha512-EZLpf/8y7GXkkra90ML47kzik/GMP3EMcE9bPyHmRfxLC6z9+aW5A8poCsoxjrT5GfEcNAAvWwUHjvP1pUQkfw=="],
"@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.1.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-aUi+HBvmYb7j8krl1+qJgkG8C17fO79gk3c+jPw4S8glRFc1DTija9S3EyaTSQUm5GJXYKDAsugBEhFHH2vYiQ=="],
"@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.1.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-F7hHC3gwY11+vByKPRWqwGbeXWVgKmL+pTGCinaEhdihzBV2aQ0fvZOch9cXYUOKuKKq429HeYXOqQLc7wFCEg=="],
"@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.1.4", "", { "os": "freebsd", "cpu": "x64" }, "sha512-sI5yw+7s92SK6odiEhD5lKCBlWcpjHS5qyqpVQbZAJ0fIzEUXrmbl3DH2ybR3PZogulNJF+COLtmA8hUfvkCCQ=="],
"@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.1.4", "", { "os": "linux", "cpu": "arm" }, "sha512-mCi0OKgEieFircrtVYmQAFGszRtMnZ6fpZAXrxanXAu7lqZcsK1E1RAaZNG0uKAnxox3B1f4EyQNnoyMfN1vAA=="],
"@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.1.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-B9Ial3Kv5sh0SHnB1g/QWcUQCEvCF6QKGAl4zXypYj65mVI+B4AhFBwPtSN7pDrJeIx8Z7zdy4ntx+wQABom7w=="],
"@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.1.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-lZVym0PuHE1KZ22gmFTC15lAkrg9iTszR617oYRB/iPY1A56ywoJzVKOJBKaot5RiikCObmur6pogpse3gRcng=="],
"@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.1.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-t2DNiLJWNTbnEHyUzTumldML6ET4/g16467LZoDDJ3tSxGvguL5/NyC2lCsNKuyRycg9XeDQF5SSv+TNOhQEXg=="],
"@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.1.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-0WIRnL1Uw4BvTZRLQt+PVgo6ZKTJadlC2btP+/EOXv2f/DWbY0rEgl+y834mIVwP1FkTlWVTrGGJXf12lru7EQ=="],
"@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.1.4", "", { "os": "linux", "cpu": "x64" }, "sha512-JWtGshGfX+oENAKonoNkqEJX+7hC8yfhi9GUyPX1VX4mdh1y5r+ZiJLR5XzAB0aoP6s/PcILsGjKq8O0mm24bw=="],
"@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.1.4", "", { "os": "linux", "cpu": "x64" }, "sha512-rT6yQcxUuXs4CnbofqwHRRV0iem349rLMYpTjkgQGLjrY4ado/eDzwPZPTCgTOlF6Nkp8NEv70yLMTn6qkWxsQ=="],
"@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.1.4", "", { "os": "none", "cpu": "arm64" }, "sha512-KXMGoboq5cyaCQjDA4GLuRiOwBQ0EyFnJoVViLeZ45/3rFItRODEr+NdsBcVpll40hhNArlm/speWGRvj08LzA=="],
"@rolldown/binding-wasm32-wasi": ["@rolldown/binding-wasm32-wasi@1.1.4", "", { "dependencies": { "@emnapi/core": "1.11.1", "@emnapi/runtime": "1.11.1", "@napi-rs/wasm-runtime": "^1.1.6" }, "cpu": "none" }, "sha512-5K83rb36oJiY7BCyE9zLZtGcPV4g5wvq+xwdO0XPIwDVZI8cyB/AUjkNXGb92/rnmezEkjMOpgY61rtwjQtFwg=="],
"@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.1.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-PnWBtw3TV5KOg69HQQDR0mnQuyCmSGR2pAB4DC1rPF808fgKeTUMj2EOEyKATpgiuxuR5APQmiDO7PDgEjTFSA=="],
"@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.1.4", "", { "os": "win32", "cpu": "x64" }, "sha512-M1lpniBePobTfsa7Ks9a199e1akxsXn+GYBUKsEzv3YFzOm1HJAMNwKI3qr0Zq+mxwx9gOZoTdP1yXRYsZUocQ=="],
"@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.1", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="],
"@rollup/pluginutils": ["@rollup/pluginutils@5.4.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg=="],
@@ -3112,6 +3166,8 @@
"@types/react": ["@types/react@18.0.25", "", { "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", "csstype": "^3.0.2" } }, "sha512-xD6c0KDT4m7n9uD4ZHi02lzskaiqcBxf4zi+tXZY98a04wvc0hi/TcCPC2FOESZi51Nd7tlUeOJY8RofL799/g=="],
"@types/react-dom": ["@types/react-dom@19.2.3", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ=="],
"@types/responselike": ["@types/responselike@1.0.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw=="],
"@types/retry": ["@types/retry@0.12.0", "", {}, "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA=="],
@@ -3184,6 +3240,12 @@
"@valibot/to-json-schema": ["@valibot/to-json-schema@1.6.0", "", { "peerDependencies": { "valibot": "^1.3.0" } }, "sha512-d6rYyK5KVa2XdqamWgZ4/Nr+cXhxjy7lmpe6Iajw15J/jmU+gyxl2IEd1Otg1d7Rl3gOQL5reulnSypzBtYy1A=="],
"@vercel/cli-config": ["@vercel/cli-config@0.2.0", "", { "dependencies": { "xdg-app-paths": "5", "zod": "4.1.11" } }, "sha512-fJRRRB7734BDuXZ89yBEaA2ncYhH7bWX30mk04W80J6VAfQc+4iB8lyzAdaGpFV3/vNlkt9VZt+/uoQoWX6UsQ=="],
"@vercel/cli-exec": ["@vercel/cli-exec@1.0.0", "", { "dependencies": { "execa": "5.1.1" } }, "sha512-kQF8LGie/Hbdq9/psJxLE7owRTcqMQMhgybU04gCeR7cbQAr5t8OrjefDNColJv1QSSucFt4pLwRiARVmlOnug=="],
"@vercel/functions": ["@vercel/functions@3.7.5", "", { "dependencies": { "@vercel/oidc": "3.8.0" }, "peerDependencies": { "@aws-sdk/credential-provider-web-identity": "*", "ws": ">=8" }, "optionalPeers": ["@aws-sdk/credential-provider-web-identity", "ws"] }, "sha512-ESf8BbeDebqRUyMi09JwRbQqpLn4g6fjcVVHPsHB56j2dSqRrSHO4h3X4aaxJf6iQQjzhAtDGI2xCWQ27JE8PA=="],
"@vercel/oidc": ["@vercel/oidc@3.2.0", "", {}, "sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug=="],
"@vitejs/plugin-react": ["@vitejs/plugin-react@4.7.0", "", { "dependencies": { "@babel/core": "^7.28.0", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.27", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA=="],
@@ -4988,6 +5050,8 @@
"opentui-spinner": ["opentui-spinner@0.0.7", "", { "dependencies": { "cli-spinners": "^3.3.0" }, "peerDependencies": { "@opentui/core": "^0.3.4", "@opentui/react": "^0.3.4", "@opentui/solid": "^0.3.4", "typescript": "^5" }, "optionalPeers": ["@opentui/react", "@opentui/solid"] }, "sha512-nPzwAvJG+y9rVEwwHLHqbsMzLnIk2zw+F9LqwA7aYJvpM5gsrKC2rrGi36A+tZpA+1RnWxXeWEgVZMchnaH18Q=="],
"os-paths": ["os-paths@4.4.0", "", {}, "sha512-wrAwOeXp1RRMFfQY8Sy7VaGVmPocaLwSFOYCGKSyo8qmJ+/yaafCl5BCA1IQZWqFSRBrKDYFeR9d/VyQzfH/jg=="],
"own-keys": ["own-keys@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.2.6", "object-keys": "^1.1.1", "safe-push-apply": "^1.0.0" } }, "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg=="],
"oxc-minify": ["oxc-minify@0.96.0", "", { "optionalDependencies": { "@oxc-minify/binding-android-arm64": "0.96.0", "@oxc-minify/binding-darwin-arm64": "0.96.0", "@oxc-minify/binding-darwin-x64": "0.96.0", "@oxc-minify/binding-freebsd-x64": "0.96.0", "@oxc-minify/binding-linux-arm-gnueabihf": "0.96.0", "@oxc-minify/binding-linux-arm-musleabihf": "0.96.0", "@oxc-minify/binding-linux-arm64-gnu": "0.96.0", "@oxc-minify/binding-linux-arm64-musl": "0.96.0", "@oxc-minify/binding-linux-riscv64-gnu": "0.96.0", "@oxc-minify/binding-linux-s390x-gnu": "0.96.0", "@oxc-minify/binding-linux-x64-gnu": "0.96.0", "@oxc-minify/binding-linux-x64-musl": "0.96.0", "@oxc-minify/binding-wasm32-wasi": "0.96.0", "@oxc-minify/binding-win32-arm64-msvc": "0.96.0", "@oxc-minify/binding-win32-x64-msvc": "0.96.0" } }, "sha512-dXeeGrfPJJ4rMdw+NrqiCRtbzVX2ogq//R0Xns08zql2HjV3Zi2SBJ65saqfDaJzd2bcHqvGWH+M44EQCHPAcA=="],
@@ -5402,6 +5466,8 @@
"roarr": ["roarr@2.15.4", "", { "dependencies": { "boolean": "^3.0.1", "detect-node": "^2.0.4", "globalthis": "^1.0.1", "json-stringify-safe": "^5.0.1", "semver-compare": "^1.0.0", "sprintf-js": "^1.1.2" } }, "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A=="],
"rolldown": ["rolldown@1.1.4", "", { "dependencies": { "@oxc-project/types": "=0.138.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.1.4", "@rolldown/binding-darwin-arm64": "1.1.4", "@rolldown/binding-darwin-x64": "1.1.4", "@rolldown/binding-freebsd-x64": "1.1.4", "@rolldown/binding-linux-arm-gnueabihf": "1.1.4", "@rolldown/binding-linux-arm64-gnu": "1.1.4", "@rolldown/binding-linux-arm64-musl": "1.1.4", "@rolldown/binding-linux-ppc64-gnu": "1.1.4", "@rolldown/binding-linux-s390x-gnu": "1.1.4", "@rolldown/binding-linux-x64-gnu": "1.1.4", "@rolldown/binding-linux-x64-musl": "1.1.4", "@rolldown/binding-openharmony-arm64": "1.1.4", "@rolldown/binding-wasm32-wasi": "1.1.4", "@rolldown/binding-win32-arm64-msvc": "1.1.4", "@rolldown/binding-win32-x64-msvc": "1.1.4" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA=="],
"rollup": ["rollup@4.60.4", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.60.4", "@rollup/rollup-android-arm64": "4.60.4", "@rollup/rollup-darwin-arm64": "4.60.4", "@rollup/rollup-darwin-x64": "4.60.4", "@rollup/rollup-freebsd-arm64": "4.60.4", "@rollup/rollup-freebsd-x64": "4.60.4", "@rollup/rollup-linux-arm-gnueabihf": "4.60.4", "@rollup/rollup-linux-arm-musleabihf": "4.60.4", "@rollup/rollup-linux-arm64-gnu": "4.60.4", "@rollup/rollup-linux-arm64-musl": "4.60.4", "@rollup/rollup-linux-loong64-gnu": "4.60.4", "@rollup/rollup-linux-loong64-musl": "4.60.4", "@rollup/rollup-linux-ppc64-gnu": "4.60.4", "@rollup/rollup-linux-ppc64-musl": "4.60.4", "@rollup/rollup-linux-riscv64-gnu": "4.60.4", "@rollup/rollup-linux-riscv64-musl": "4.60.4", "@rollup/rollup-linux-s390x-gnu": "4.60.4", "@rollup/rollup-linux-x64-gnu": "4.60.4", "@rollup/rollup-linux-x64-musl": "4.60.4", "@rollup/rollup-openbsd-x64": "4.60.4", "@rollup/rollup-openharmony-arm64": "4.60.4", "@rollup/rollup-win32-arm64-msvc": "4.60.4", "@rollup/rollup-win32-ia32-msvc": "4.60.4", "@rollup/rollup-win32-x64-gnu": "4.60.4", "@rollup/rollup-win32-x64-msvc": "4.60.4", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-WHeFSbZYsPu3+bLoNRUuAO+wavNlocOPf3wSHTP7hcFKVnJeWsYlCDbr3mTS14FCizf9ccIxXA8sGL8zKeQN3g=="],
"rou3": ["rou3@0.7.12", "", {}, "sha512-iFE4hLDuloSWcD7mjdCDhx2bKcIsYbtOTpfH5MHHLSKMOUyjqQXTeZVa289uuwEGEKFoE/BAPbhaU4B774nceg=="],
@@ -6022,8 +6088,12 @@
"wsl-utils": ["wsl-utils@0.3.1", "", { "dependencies": { "is-wsl": "^3.1.0", "powershell-utils": "^0.1.0" } }, "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg=="],
"xdg-app-paths": ["xdg-app-paths@5.5.1", "", { "dependencies": { "os-paths": "^4.0.1", "xdg-portable": "^7.2.0" } }, "sha512-hI3flOB4PLZIy5prbtTpirobtPE2ZtZ52szO+2mM9Efp6ErM398La+C1lIpNWDfNoQk+6Lsi6nMcCwVB7pxeMQ=="],
"xdg-basedir": ["xdg-basedir@5.1.0", "", {}, "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ=="],
"xdg-portable": ["xdg-portable@7.3.0", "", { "dependencies": { "os-paths": "^4.0.1" } }, "sha512-sqMMuL1rc0FmMBOzCpd0yuy9trqF2yTTVe+E9ogwCSWQCdDEtQUwrZPT6AxqtsFGRNxycgncbP/xmOOSPw5ZUw=="],
"xml-naming": ["xml-naming@0.1.0", "", {}, "sha512-k8KO9hrMyNk6tUWqUfkTEZbezRRpONVOzUTnc97VnCvyj6Tf9lyUR9EDAIeiVLv56jsMcoXEwjW8Kv5yPY52lw=="],
"xml2js": ["xml2js@0.5.0", "", { "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" } }, "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA=="],
@@ -6620,6 +6690,10 @@
"@oslojs/jwt/@oslojs/encoding": ["@oslojs/encoding@0.4.1", "", {}, "sha512-hkjo6MuIK/kQR5CrGNdAPZhS01ZCXuWDRJ187zh6qqF2+yMHZpD9fAYpX8q2bOO6Ryhl3XpCT6kUX76N8hhm4Q=="],
"@oxc-parser/binding-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.9.2", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA=="],
"@oxc-parser/binding-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.9.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw=="],
"@oxc-resolver/binding-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.10.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw=="],
"@oxc-resolver/binding-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.10.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA=="],
@@ -6640,6 +6714,8 @@
"@puppeteer/browsers/yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="],
"@rolldown/binding-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.6", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" } }, "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg=="],
"@rollup/pluginutils/estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="],
"@sentry/bundler-plugin-core/glob": ["glob@9.3.5", "", { "dependencies": { "fs.realpath": "^1.0.0", "minimatch": "^8.0.2", "minipass": "^4.2.4", "path-scurry": "^1.6.1" } }, "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q=="],
@@ -6748,6 +6824,14 @@
"@types/plist/xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="],
"@vercel/cli-config/zod": ["zod@4.1.11", "", {}, "sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg=="],
"@vercel/cli-exec/execa": ["execa@5.1.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="],
"@vercel/functions/@vercel/oidc": ["@vercel/oidc@3.8.0", "", { "dependencies": { "@vercel/cli-config": "0.2.0", "@vercel/cli-exec": "1.0.0", "jose": "^5.9.6" } }, "sha512-r00laGW6Pv778RoR6M2NxX91ycSj+PBwVo+fOb9Bif+F0IyUKt25zrvBzfEzQpeAzbqOgPZyQibEWDdDFApd+A=="],
"@vitejs/plugin-react/@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-beta.27", "", {}, "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA=="],
"@vitest/coverage-v8/@vitest/utils": ["@vitest/utils@4.1.8", "", { "dependencies": { "@vitest/pretty-format": "4.1.8", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" } }, "sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg=="],
"@vitest/coverage-v8/magicast": ["magicast@0.5.3", "", { "dependencies": { "@babel/parser": "^7.29.3", "@babel/types": "^7.29.0", "source-map-js": "^1.2.1" } }, "sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw=="],
@@ -7044,6 +7128,8 @@
"openid-client/lru-cache": ["lru-cache@6.0.0", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="],
"oxc-parser/@oxc-project/types": ["@oxc-project/types@0.127.0", "", {}, "sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ=="],
"p-any/p-cancelable": ["p-cancelable@3.0.0", "", {}, "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw=="],
"p-locate/p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
@@ -7708,6 +7794,10 @@
"@opentui/solid/@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
"@oxc-parser/binding-wasm32-wasi/@emnapi/core/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="],
"@oxc-resolver/binding-wasm32-wasi/@emnapi/core/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="],
"@pierre/diffs/@shikijs/transformers/@shikijs/core": ["@shikijs/core@3.20.0", "", { "dependencies": { "@shikijs/types": "3.20.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "sha512-f2ED7HYV4JEk827mtMDwe/yQ25pRiXZmtHjWF8uzZKuKiEsJR7Ce1nuQ+HhV9FzDcbIo4ObBCD9GPTzNuy9S1g=="],
"@pierre/diffs/@shikijs/transformers/@shikijs/types": ["@shikijs/types@3.20.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-lhYAATn10nkZcBQ0BlzSbJA3wcmL5MXUUF8d2Zzon6saZDlToKaiRX60n2+ZaHJCmXEcZRWNzn+k9vplr8Jhsw=="],
@@ -7716,6 +7806,8 @@
"@puppeteer/browsers/yargs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
"@rolldown/binding-wasm32-wasi/@napi-rs/wasm-runtime/@tybys/wasm-util": ["@tybys/wasm-util@0.10.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg=="],
"@sentry/bundler-plugin-core/glob/minimatch": ["minimatch@8.0.7", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-V+1uQNdzybxa14e/p00HZnQNNcTjnRJjDxg2V8wtkjFctq4M7hXFws4oekyTP0Jebeq7QYtpFyOeBAjc88zvYg=="],
"@sentry/bundler-plugin-core/glob/minipass": ["minipass@4.2.8", "", {}, "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ=="],
@@ -7786,6 +7878,22 @@
"@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime/@tybys/wasm-util": ["@tybys/wasm-util@0.10.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg=="],
"@vercel/cli-exec/execa/get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="],
"@vercel/cli-exec/execa/human-signals": ["human-signals@2.1.0", "", {}, "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="],
"@vercel/cli-exec/execa/is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="],
"@vercel/cli-exec/execa/npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="],
"@vercel/cli-exec/execa/onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="],
"@vercel/cli-exec/execa/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
"@vercel/cli-exec/execa/strip-final-newline": ["strip-final-newline@2.0.0", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="],
"@vercel/functions/@vercel/oidc/jose": ["jose@5.9.6", "", {}, "sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ=="],
"@vitest/coverage-v8/@vitest/utils/@vitest/pretty-format": ["@vitest/pretty-format@4.1.8", "", { "dependencies": { "tinyrainbow": "^3.1.0" } }, "sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA=="],
"@vitest/expect/@vitest/utils/@vitest/pretty-format": ["@vitest/pretty-format@3.2.4", "", { "dependencies": { "tinyrainbow": "^2.0.0" } }, "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA=="],
@@ -8352,6 +8460,8 @@
"@stoplight/spectral-core/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
"@vercel/cli-exec/execa/onetime/mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="],
"ai-gateway-provider/@ai-sdk/amazon-bedrock/@ai-sdk/provider-utils/@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
"ai-gateway-provider/@ai-sdk/anthropic/@ai-sdk/provider-utils/@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
@@ -20,7 +20,7 @@ const profiles = [
{ name: "edit", tool: "edit", input: { filePath: "src/edit.ts" } },
{
name: "multi patch",
tool: "apply_patch",
tool: "patch",
input: { files: ["src/a.ts", "src/b.ts", "src/old.ts", "src/moved.ts"] },
},
] as const
@@ -25,7 +25,7 @@ test("adds patch files incrementally without resetting outer expansion", async (
userMessage(),
assistantMessage(
[
toolPart(patchID, "apply_patch", "running", { files: [first.filePath] }, { metadata: { files: [first] } }),
toolPart(patchID, "patch", "running", { files: [first.filePath] }, { metadata: { files: [first] } }),
textPart(followingID, "Following incremental patch"),
],
{ completed: false },
@@ -49,7 +49,7 @@ test("adds patch files incrementally without resetting outer expansion", async (
partUpdated(
toolPart(
patchID,
"apply_patch",
"patch",
"running",
{ files: [first.filePath, second.filePath] },
{ metadata: { files: [first, second] } },
@@ -61,7 +61,7 @@ test("adds patch files incrementally without resetting outer expansion", async (
partUpdated(
toolPart(
patchID,
"apply_patch",
"patch",
"completed",
{ files: [first.filePath, second.filePath, third.filePath] },
{ metadata: { files: [first, second, third] } },
@@ -295,7 +295,7 @@ function performanceTurn(index: number) {
messageID: assistantID,
type: "tool",
callID: `call_0000_${suffix}_patch`,
tool: "apply_patch",
tool: "patch",
state: {
status: "completed",
input: { patchText: realisticPatch(index) },
@@ -131,7 +131,7 @@ function toolPart(
): MessagePart {
const metadata =
metadataOverride ??
(tool === "apply_patch"
(tool === "patch"
? { files: [patchFile(index, "update"), patchFile(index + 1, index % 2 === 0 ? "add" : "delete")] }
: tool === "edit" || tool === "write"
? {
@@ -219,7 +219,7 @@ function turn(index: number): Message[] {
? [toolPart(index, 7, "write", { filePath: `src/generated/write-${index}.ts`, content: code(index, 28) }, 560)]
: []),
...(index % 8 === 0
? [toolPart(index, 8, "apply_patch", { files: [`src/generated/patch-${index}.ts`] }, 620)]
? [toolPart(index, 8, "patch", { files: [`src/generated/patch-${index}.ts`] }, 620)]
: []),
...(index % 7 === 0
? [toolPart(index, 4, "bash", { command: "bun typecheck", description: "Verify generated output" }, 620)]
@@ -24,7 +24,7 @@ test("renders a completed single-file patch", async ({ page }) => {
assistantMessage([
toolPart(
id,
"apply_patch",
"patch",
"completed",
{ files: ["src/a.ts"] },
{
@@ -35,7 +35,7 @@ test("preserves nested patch file state through outer collapse and reopen", asyn
assistantMessage([
toolPart(
patchID,
"apply_patch",
"patch",
"completed",
{ files: files.map((file) => file.filePath) },
{ metadata: { files } },
@@ -246,7 +246,7 @@ function editPart(id: string) {
function patchPart(id: string) {
return toolPart(
id,
"apply_patch",
"patch",
"completed",
{ files: ["src/a.ts", "src/b.ts"] },
{
@@ -8,7 +8,7 @@ import {
} from "../performance/timeline-stability/fixture"
test("renders every tool error outcome without leaking hidden tools", async ({ page }) => {
const ordinary = ["bash", "edit", "write", "apply_patch", "webfetch", "websearch", "task", "skill", "mcp_probe"]
const ordinary = ["bash", "edit", "write", "patch", "webfetch", "websearch", "task", "skill", "mcp_probe"]
const parts = ordinary.map((tool, index) =>
toolPart(`prt_error_${index}`, tool, "error", errorInput(tool), { error: `${tool} failed visibly` }),
)
@@ -90,7 +90,7 @@ function questionInput() {
function errorInput(tool: string) {
if (tool === "bash") return { command: "exit 1" }
if (["edit", "write"].includes(tool)) return { filePath: "src/error.ts", content: "" }
if (tool === "apply_patch") return { files: ["src/error.ts"] }
if (tool === "patch") return { files: ["src/error.ts"] }
if (tool === "webfetch") return { url: "https://example.com" }
if (tool === "websearch") return { query: "failure" }
if (tool === "task") return { description: "Fail task", subagent_type: "explore" }
@@ -120,7 +120,7 @@ function toolPart(
outputLength = 160,
): MessagePart {
const metadata =
tool === "apply_patch"
tool === "patch"
? { files: [patchFile(index, "update"), patchFile(index + 1, index % 2 === 0 ? "add" : "delete")] }
: tool === "edit" || tool === "write"
? {
@@ -199,7 +199,7 @@ function turn(index: number): Message[] {
? [toolPart(index, 7, "write", { filePath: `src/generated/write-${index}.ts`, content: code(index, 28) }, 560)]
: []),
...(index % 8 === 0
? [toolPart(index, 8, "apply_patch", { files: [`src/generated/patch-${index}.ts`] }, 620)]
? [toolPart(index, 8, "patch", { files: [`src/generated/patch-${index}.ts`] }, 620)]
: []),
...(index % 7 === 0 ? [toolPart(index, 4, "bash", { command: "bun typecheck" }, 620)] : []),
...(index % 10 === 0 ? [toolPart(index, 9, "webfetch", { url: "https://example.com/docs/sample" }, 120)] : []),
+1 -1
View File
@@ -55,7 +55,7 @@ export async function mockOpenCodeServer(page: Page, config: MockServerConfig) {
const path = url.pathname
if (path === "/global/event" || path === "/event") return sse(route, config.events?.(), config.eventRetry)
if (path === "/global/health") return json(route, { healthy: true })
if (path === "/experimental/capabilities") return json(route, { backgroundSubagents: false })
if (path === "/experimental/capabilities") return json(route, { backgroundSubagents: true })
if (path === "/permission")
return json(route, typeof config.permissions === "function" ? config.permissions() : (config.permissions ?? []))
if (path === "/question")
@@ -8,7 +8,7 @@ import type {
QuestionRequest,
Session,
SessionStatus,
SnapshotFileDiff,
FileDiffInfo,
Todo,
} from "@opencode-ai/sdk/v2/client"
import type { State, VcsCache } from "./types"
@@ -188,7 +188,7 @@ export function applyDirectoryEvent(input: {
break
}
case "session.diff": {
const props = event.properties as { sessionID: string; diff: SnapshotFileDiff[] }
const props = event.properties as { sessionID: string; diff: FileDiffInfo[] }
input.setStore("session_diff", props.sessionID, reconcile(list(props.diff), { key: "file" }))
break
}
@@ -5,7 +5,7 @@ import type {
PermissionRequest,
QuestionRequest,
SessionStatus,
SnapshotFileDiff,
FileDiffInfo,
Todo,
} from "@opencode-ai/sdk/v2/client"
import { dropSessionCaches, pickSessionCacheEvictions } from "./session-cache"
@@ -33,7 +33,7 @@ describe("app session cache", () => {
test("dropSessionCaches clears orphaned parts without message rows", () => {
const store: {
session_status: Record<string, SessionStatus | undefined>
session_diff: Record<string, SnapshotFileDiff[] | undefined>
session_diff: Record<string, FileDiffInfo[] | undefined>
todo: Record<string, Todo[] | undefined>
message: Record<string, Message[] | undefined>
part: Record<string, Part[] | undefined>
@@ -67,7 +67,7 @@ describe("app session cache", () => {
const m = msg("msg_1", "ses_1")
const store: {
session_status: Record<string, SessionStatus | undefined>
session_diff: Record<string, SnapshotFileDiff[] | undefined>
session_diff: Record<string, FileDiffInfo[] | undefined>
todo: Record<string, Todo[] | undefined>
message: Record<string, Message[] | undefined>
part: Record<string, Part[] | undefined>
@@ -4,7 +4,7 @@ import type {
PermissionRequest,
QuestionRequest,
SessionStatus,
SnapshotFileDiff,
FileDiffInfo,
Todo,
} from "@opencode-ai/sdk/v2/client"
@@ -12,7 +12,7 @@ export const SESSION_CACHE_LIMIT = 40
type SessionCache = {
session_status: Record<string, SessionStatus | undefined>
session_diff: Record<string, SnapshotFileDiff[] | undefined>
session_diff: Record<string, FileDiffInfo[] | undefined>
todo: Record<string, Todo[] | undefined>
message: Record<string, Message[] | undefined>
part: Record<string, Part[] | undefined>
@@ -13,7 +13,7 @@ import type {
ReferenceInfo,
Session,
SessionStatus,
SnapshotFileDiff,
FileDiffInfo,
Todo,
VcsInfo,
} from "@opencode-ai/sdk/v2/client"
@@ -51,7 +51,7 @@ export type State = {
}
session_working(id: string): boolean
session_diff: {
[sessionID: string]: SnapshotFileDiff[]
[sessionID: string]: FileDiffInfo[]
}
todo: {
[sessionID: string]: Todo[]
+3 -3
View File
@@ -8,7 +8,7 @@ import type {
QuestionRequest,
Session,
SessionStatus,
SnapshotFileDiff,
FileDiffInfo,
Todo,
} from "@opencode-ai/sdk/v2/client"
import { batch } from "solid-js"
@@ -139,7 +139,7 @@ export function createServerSession(client: OpencodeClient, options?: { retry?:
const [data, setData] = createStore({
info: {} as Record<string, Session | undefined>,
session_status: {} as Record<string, SessionStatus>,
session_diff: {} as Record<string, SnapshotFileDiff[]>,
session_diff: {} as Record<string, FileDiffInfo[]>,
todo: {} as Record<string, Todo[]>,
permission: {} as Record<string, PermissionRequest[]>,
question: {} as Record<string, QuestionRequest[]>,
@@ -769,7 +769,7 @@ export function createServerSession(client: OpencodeClient, options?: { retry?:
return
}
case "session.diff": {
const props = event.properties as { sessionID: string; diff: SnapshotFileDiff[] }
const props = event.properties as { sessionID: string; diff: FileDiffInfo[] }
setData("session_diff", props.sessionID, reconcile(cleanDiffs(props.diff), { key: "file" }))
return
}
@@ -1,6 +1,6 @@
import { createEffect, onCleanup, type JSX } from "solid-js"
import { makeEventListener } from "@solid-primitives/event-listener"
import type { SnapshotFileDiff, VcsFileDiff } from "@opencode-ai/sdk/v2"
import type { FileDiffInfo, VcsFileDiff } from "@opencode-ai/sdk/v2"
import { SessionReview } from "@opencode-ai/session-ui/session-review"
import type {
SessionReviewCommentActions,
@@ -14,7 +14,7 @@ import type { LineComment } from "@/context/comments"
export type DiffStyle = "unified" | "split"
type ReviewDiff = SnapshotFileDiff | VcsFileDiff
type ReviewDiff = FileDiffInfo | VcsFileDiff
export interface SessionReviewTabProps {
title?: JSX.Element
@@ -8,7 +8,7 @@ import { ResizeHandle } from "@opencode-ai/ui/resize-handle"
import { Mark } from "@opencode-ai/ui/logo"
import { DragDropProvider, DragDropSensors, DragOverlay, SortableProvider, closestCenter } from "@thisbeyond/solid-dnd"
import type { DragEvent } from "@thisbeyond/solid-dnd"
import type { SnapshotFileDiff, VcsFileDiff } from "@opencode-ai/sdk/v2"
import type { FileDiffInfo, VcsFileDiff } from "@opencode-ai/sdk/v2"
import { ConstrainDragYAxis, getDraggableId } from "@/utils/solid-dnd"
import { useDialog } from "@opencode-ai/ui/context/dialog"
@@ -23,7 +23,6 @@ import { useFile, type SelectedLineRange } from "@/context/file"
import { useLanguage } from "@/context/language"
import { useLayout } from "@/context/layout"
import { useSettings } from "@/context/settings"
import { useSync } from "@/context/sync"
import { createFileTabListSync } from "@/pages/session/file-tab-scroll"
import { FileTabContent } from "@/pages/session/file-tabs"
import {
@@ -36,15 +35,9 @@ import {
import { setSessionHandoff } from "@/pages/session/handoff"
import { useSessionLayout } from "@/pages/session/session-layout"
type RenderDiff = (SnapshotFileDiff & { file: string }) | VcsFileDiff
function renderDiff(value: SnapshotFileDiff | VcsFileDiff): value is RenderDiff {
return typeof value.file === "string"
}
export function SessionSidePanel(props: {
canReview: () => boolean
diffs: () => (SnapshotFileDiff | VcsFileDiff)[]
diffs: () => (FileDiffInfo | VcsFileDiff)[]
diffsReady: () => boolean
empty: () => string
hasReview: () => boolean
@@ -59,7 +52,6 @@ export function SessionSidePanel(props: {
}) {
const layout = useLayout()
const settings = useSettings()
const sync = useSync()
const file = useFile()
const language = useLanguage()
const command = useCommand()
@@ -88,7 +80,7 @@ export function SessionSidePanel(props: {
})
const treeWidth = createMemo(() => (fileOpen() ? `${layout.fileTree.width()}px` : "0px"))
const diffs = createMemo(() => props.diffs().filter(renderDiff))
const diffs = createMemo(() => props.diffs())
const diffFiles = createMemo(() => diffs().map((d) => d.file))
const kinds = createMemo(() => {
const merge = (a: "add" | "del" | "mix" | undefined, b: "add" | "del" | "mix") => {
@@ -1245,7 +1245,7 @@ export function MessageTimeline(props: {
const value = row()
if (value._tag !== "AssistantPart" || value.group.type !== "part") return false
const part = getMsgPart(value.group.ref.messageID, value.group.ref.partID)
return part?.type === "tool" && ["edit", "write", "apply_patch"].includes(part.tool)
return part?.type === "tool" && ["edit", "write", "patch", "apply_patch"].includes(part.tool)
}
const [ready, setReady] = createSignal(initialItem.size <= timelineFallbackItemSize || !asyncFile())
let contentMeasureFrame: number | undefined
@@ -1,17 +1,13 @@
import type { SnapshotFileDiff, VcsFileDiff } from "@opencode-ai/sdk/v2"
import type { FileDiffInfo, VcsFileDiff } from "@opencode-ai/sdk/v2"
import type { Kind } from "@/components/file-tree-v2"
import { normalizeFileTreeV2Path } from "@/components/file-tree-v2-model"
export type RenderDiff = (SnapshotFileDiff & { file: string }) | VcsFileDiff
export type RenderDiff = FileDiffInfo | VcsFileDiff
export function normalizePath(p: string) {
return normalizeFileTreeV2Path(p)
}
export function filterRenderableDiff(value: SnapshotFileDiff | VcsFileDiff): value is RenderDiff {
return typeof value.file === "string"
}
export function reviewDiffKinds(diffs: RenderDiff[]) {
const merge = (a: Kind | undefined, b: Kind) => {
if (!a) return b
@@ -1,5 +1,5 @@
import { createMemo, createSignal, Show, type JSX } from "solid-js"
import type { SnapshotFileDiff, VcsFileDiff } from "@opencode-ai/sdk/v2"
import type { FileDiffInfo, VcsFileDiff } from "@opencode-ai/sdk/v2"
import {
SESSION_REVIEW_V2_SIDEBAR_WIDTH_MAX,
SESSION_REVIEW_V2_SIDEBAR_WIDTH_MIN,
@@ -21,16 +21,11 @@ import type {
import FileTreeV2 from "@/components/file-tree-v2"
import { useLanguage } from "@/context/language"
import { useSDK } from "@/context/sdk"
import {
filterRenderableDiff,
filterReviewFiles,
reviewDiffKinds,
type RenderDiff,
} from "@/pages/session/v2/review-diff-kinds"
import { filterReviewFiles, reviewDiffKinds, type RenderDiff } from "@/pages/session/v2/review-diff-kinds"
import type { ReviewPanelV2State } from "@/pages/session/v2/review-panel-v2-state"
import { applyFileListKeyDown, SessionFileListV2 } from "@/pages/session/v2/session-file-list-v2"
type ReviewDiff = SnapshotFileDiff | VcsFileDiff
type ReviewDiff = FileDiffInfo | VcsFileDiff
export type ReviewPanelV2Props = {
title?: JSX.Element
@@ -54,7 +49,7 @@ export type ReviewPanelV2Props = {
export function ReviewPanelV2(props: ReviewPanelV2Props) {
const sdk = useSDK()
const diffs = createMemo(() => props.diffs().filter(filterRenderableDiff))
const diffs = createMemo(() => props.diffs())
const filteredFiles = createMemo(() =>
filterReviewFiles(
diffs().map((diff) => diff.file),
+2 -2
View File
@@ -1,5 +1,5 @@
import { describe, expect, test } from "bun:test"
import type { SnapshotFileDiff } from "@opencode-ai/sdk/v2"
import type { FileDiffInfo } from "@opencode-ai/sdk/v2"
import type { Message } from "@opencode-ai/sdk/v2/client"
import { diffs, message } from "./diffs"
@@ -9,7 +9,7 @@ const item = {
additions: 1,
deletions: 1,
status: "modified",
} satisfies SnapshotFileDiff
} satisfies FileDiffInfo
describe("diffs", () => {
test("keeps valid arrays", () => {
+2 -2
View File
@@ -1,7 +1,7 @@
import type { SnapshotFileDiff, VcsFileDiff } from "@opencode-ai/sdk/v2"
import type { FileDiffInfo } from "@opencode-ai/sdk/v2"
import type { Message } from "@opencode-ai/sdk/v2/client"
type Diff = SnapshotFileDiff | VcsFileDiff
type Diff = FileDiffInfo
function diff(value: unknown): value is Diff {
if (!value || typeof value !== "object" || Array.isArray(value)) return false
Regular → Executable
View File
-1
View File
@@ -33,7 +33,6 @@
"dependencies": {
"@effect/platform-node": "catalog:",
"@opencode-ai/client": "workspace:*",
"@opencode-ai/codemode": "workspace:*",
"@opencode-ai/core": "workspace:*",
"@opencode-ai/plugin": "workspace:*",
"@opencode-ai/schema": "workspace:*",
-66
View File
@@ -1,66 +0,0 @@
export * as CodeModeHost from "./code-mode"
import { NodeHttpClient } from "@effect/platform-node"
import { LayerNode } from "@opencode-ai/core/effect/layer-node"
import { ToolRegistry } from "@opencode-ai/core/tool/registry"
import { OpenAPI, Tool } from "@opencode-ai/codemode"
import { Api } from "@opencode-ai/server/api"
import { ServerAuth } from "@opencode-ai/server/auth"
import { Effect, Layer } from "effect"
import { HttpClient, HttpClientRequest } from "effect/unstable/http"
import { OpenApi } from "effect/unstable/httpapi"
import type { Server } from "node:http"
export function replacements(server: Server, password: string): LayerNode.Replacements {
return [ToolRegistry.codeModeReplacement(makeTools(client(server), password))]
}
export function makeTools(client: Layer.Layer<HttpClient.HttpClient>, password: string): ToolRegistry.CodeModeTools {
return {
opencode: bindTools(
OpenAPI.fromSpec({
spec: { ...OpenApi.fromApi(Api) },
baseUrl: "http://opencode.local",
headers: ServerAuth.headers({ username: "opencode", password }),
}).tools,
client,
),
}
}
function client(server: Server) {
return Layer.effect(
HttpClient.HttpClient,
Effect.gen(function* () {
const client = yield* HttpClient.HttpClient
return HttpClient.mapRequest(client, (request) => {
const address = server.address()
if (!address || typeof address === "string") throw new Error("OpenCode server is not listening")
const local =
address.address === "0.0.0.0" ? "127.0.0.1" : address.address === "::" ? "::1" : address.address
const host = local.includes(":") && !local.startsWith("[") ? `[${local}]` : local
const url = new URL(request.url)
return HttpClientRequest.setUrl(
request,
new URL(`${url.pathname}${url.search}${url.hash}`, `http://${host}:${address.port}`),
)
})
}),
).pipe(Layer.provide(NodeHttpClient.layerNodeHttp))
}
function bindTools(tools: OpenAPI.Tools, client: Layer.Layer<HttpClient.HttpClient>): ToolRegistry.CodeModeTools {
return Object.fromEntries(
Object.entries(tools).map(([name, value]) => [
name,
Tool.isDefinition<HttpClient.HttpClient>(value)
? Tool.make({
description: value.description,
input: value.input,
output: value.output,
run: (input) => value.run(input).pipe(Effect.provide(client)),
})
: bindTools(value, client),
]),
)
}
+3 -2
View File
@@ -37,7 +37,8 @@ function defaultCost(model: CurrentModel) {
export function runAgent(input: CurrentAgent): RunAgent {
return {
name: input.id,
id: input.id,
name: input.name,
description: input.description,
mode: input.mode,
hidden: input.hidden,
@@ -53,7 +54,7 @@ export function runCommand(input: CurrentCommand): RunCommand {
export function runSkill(input: CurrentSkill): RunCommand {
return {
name: input.name,
name: input.id,
description: input.description,
source: "skill",
}
+2 -2
View File
@@ -628,11 +628,11 @@ function emitEdit(state: State): void {
function emitPatch(state: State): void {
const file = path.join(process.cwd(), "src", "demo-format.ts")
const ref = make(state, "apply_patch", {
const ref = make(state, "patch", {
patchText: "*** Begin Patch\n*** End Patch",
})
doneTool(state, ref, {
title: "apply_patch",
title: "patch",
output: "",
metadata: {
files: [
+2 -2
View File
@@ -333,10 +333,10 @@ export function createPromptState(input: PromptInput): PromptState {
.map((item) => ({
kind: "mention",
display: "@" + item.name,
value: item.name,
value: item.id,
part: {
type: "agent",
name: item.name,
name: item.id,
source: {
start: 0,
end: 0,
-2
View File
@@ -84,7 +84,6 @@ type RunFooterOptions = {
theme: RunTheme
keymap: Keymap<Renderable, KeyEvent>
tuiConfig: RunTuiConfig
backgroundSubagents: boolean
diffStyle: RunDiffStyle
onPermissionReply: (input: PermissionReply) => void | Promise<void>
onQuestionReply: (input: QuestionReply) => void | Promise<void>
@@ -326,7 +325,6 @@ export class RunFooter implements FooterApi {
theme: footer.theme,
diffStyle: options.diffStyle,
tuiConfig: options.tuiConfig,
backgroundSubagents: options.backgroundSubagents,
history: footer.history,
agent: options.agentLabel,
onSubmit: footer.handlePrompt,
+1 -4
View File
@@ -89,7 +89,6 @@ type RunFooterViewProps = {
theme: () => RunTheme
diffStyle?: RunDiffStyle
tuiConfig: RunTuiConfig
backgroundSubagents: boolean
history?: () => RunPrompt[]
agent: string
onSubmit: (input: RunPrompt) => boolean
@@ -169,9 +168,7 @@ export function RunFooterView(props: RunFooterViewProps) {
return tabs().findIndex((item) => item.sessionID === sessionID) + 1
})
const foregroundSubagents = createMemo(
() => props.backgroundSubagents && activeTabs().some((item) => !item.background),
)
const foregroundSubagents = createMemo(() => activeTabs().some((item) => !item.background))
const model = createMemo(() => {
const current = props.currentModel()
return current ? modelInfo(props.providers(), current) : { model: props.state().model, provider: undefined }
-4
View File
@@ -1,6 +1,5 @@
import { NodeFileSystem } from "@effect/platform-node"
import { OpenCode, type OpenCodeClient } from "@opencode-ai/client/promise"
import { truthy } from "@opencode-ai/core/flag/flag"
import { Global } from "@opencode-ai/core/global"
import { Effect } from "effect"
import path from "node:path"
@@ -84,9 +83,6 @@ export async function runMini(input: MiniCommandInput) {
files: [],
initialInput,
thinking: true,
backgroundSubagents:
truthy("OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS") ||
(process.env.OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS === undefined && truthy("OPENCODE_EXPERIMENTAL")),
replay: input.replay ?? true,
replayLimit: input.replayLimit,
demo: input.demo,
-1
View File
@@ -281,7 +281,6 @@ export async function runNonInteractivePrompt(input: Input) {
metadata: {
structured: event.data.structured,
content: event.data.content,
outputPaths: event.data.outputPaths,
result: event.data.result,
providerCall: current.provider,
providerResult: { executed: event.data.executed, state: event.data.resultState },
+5 -8
View File
@@ -89,12 +89,11 @@ async function execute(input: RunCommandInput, prepared: Prepared, transport: Tr
!explicitModel && !sessionModel
? await client.model
.default({ location: { directory: cwd, workspace } })
.then((result) =>
result.data ? { providerID: result.data.providerID, modelID: result.data.id } : undefined,
)
.then((result) => (result.data ? { providerID: result.data.providerID, modelID: result.data.id } : undefined))
: undefined
const model = pickRunModel(explicitModel, input.variant, sessionModel, defaultModel)
if (input.variant && !model) return reportError(input, "Cannot select a variant before selecting a model", session?.id)
if (input.variant && !model)
return reportError(input, "Cannot select a variant before selecting a model", session?.id)
if (model) {
await waitForCatalogReady({ sdk: client, directory: cwd, workspace, model })
const available = await client.model.list({ location: { directory: cwd, workspace } })
@@ -112,9 +111,7 @@ async function execute(input: RunCommandInput, prepared: Prepared, transport: Tr
if (!session && input.title !== undefined) {
await client.session.rename({
sessionID: selected.id,
title:
input.title ||
prepared.message.slice(0, 50) + (prepared.message.length > 50 ? "..." : ""),
title: input.title || prepared.message.slice(0, 50) + (prepared.message.length > 50 ? "..." : ""),
})
}
@@ -200,7 +197,7 @@ async function validateAgent(client: OpenCodeClient, directory: string, name?: s
warning(`failed to list agents${server ? ` from ${server}` : ""}. Falling back to default agent`)
return
}
const agent = agents.find((item) => item.name === name)
const agent = agents.find((item) => item.id === name)
if (!agent) {
warning(`agent "${name}" not found. Falling back to default agent`)
return
@@ -64,7 +64,6 @@ export type LifecycleInput = {
model: RunInput["model"]
variant: string | undefined
tuiConfig: RunTuiConfig | Promise<RunTuiConfig>
backgroundSubagents: boolean
onPermissionReply: (input: PermissionReply) => void | Promise<void>
onQuestionReply: (input: QuestionReply) => void | Promise<void>
onQuestionReject: (input: QuestionReject) => void | Promise<void>
@@ -236,7 +235,6 @@ export async function createRuntimeLifecycle(input: LifecycleInput): Promise<Lif
wrote,
keymap,
tuiConfig,
backgroundSubagents: input.backgroundSubagents,
diffStyle: tuiConfig.diff_style ?? "auto",
onPermissionReply: input.onPermissionReply,
onQuestionReply: input.onQuestionReply,
-5
View File
@@ -56,7 +56,6 @@ type RunRuntimeInput = {
files: RunInput["files"]
initialInput?: string
thinking: boolean
backgroundSubagents: boolean
replay?: boolean
replayLimit?: number
demo?: RunInput["demo"]
@@ -75,7 +74,6 @@ type RunDeferredInput = {
files: RunInput["files"]
initialInput?: string
thinking: boolean
backgroundSubagents: boolean
replay?: boolean
replayLimit?: number
demo?: RunInput["demo"]
@@ -270,7 +268,6 @@ async function runInteractiveRuntime(input: RunRuntimeInput, deps: RunRuntimeDep
model: state.model,
variant: state.activeVariant,
tuiConfig: tuiConfigTask,
backgroundSubagents: input.backgroundSubagents,
onPermissionReply: async (next) => {
if (state.demo?.permission(next)) {
return
@@ -876,7 +873,6 @@ export async function runInteractiveDeferredMode(input: RunDeferredInput, deps?:
files: input.files,
initialInput: input.initialInput,
thinking: input.thinking,
backgroundSubagents: input.backgroundSubagents,
replay: input.replay,
replayLimit: input.replayLimit,
demo: input.demo,
@@ -928,7 +924,6 @@ export async function runInteractiveMode(
files: input.files,
initialInput: input.initialInput,
thinking: input.thinking,
backgroundSubagents: input.backgroundSubagents,
replay: input.replay,
replayLimit: input.replayLimit,
demo: input.demo,
+6 -8
View File
@@ -16,7 +16,7 @@
// backgrounding is intentionally absent: subagent jobs block the parent
// session, so only whole-session `v2.session.background(parentID)` exists.
import type { EventSubscribeOutput, OpenCodeClient } from "@opencode-ai/client/promise"
import type { SessionMessage, SessionMessageAssistantTool, ToolPart } from "@opencode-ai/sdk/v2"
import type { SessionMessageAssistantTool, SessionMessageInfo, ToolPart } from "@opencode-ai/sdk/v2"
import { Locale } from "@opencode-ai/tui/util/locale"
import type { FooterSubagentDetail, FooterSubagentState, FooterSubagentTab, StreamCommit } from "./types"
@@ -54,7 +54,7 @@ export function legacyTool(input: {
callID: tool.id,
tool: tool.name,
}
if (tool.state.status === "pending") {
if (tool.state.status === "streaming") {
return {
...base,
state: { status: "pending", input: {}, raw: tool.state.input },
@@ -83,7 +83,6 @@ export function legacyTool(input: {
metadata: {
structured: tool.state.structured,
content: tool.state.content,
outputPaths: tool.state.outputPaths,
result: tool.state.result,
providerCall,
providerResult,
@@ -179,7 +178,7 @@ export type SubagentTrackerInput = {
export type SubagentTracker = {
main(event: V2Event): void
foreign(sessionID: string, event: V2Event): void
hydrate(next: { messages: SessionMessage[]; active: Record<string, unknown> }): Promise<void>
hydrate(next: { messages: SessionMessageInfo[]; active: Record<string, unknown> }): Promise<void>
select(sessionID: string | undefined): void
snapshot(): FooterSubagentState
}
@@ -316,7 +315,7 @@ export function createSubagentTracker(input: SubagentTrackerInput): SubagentTrac
messageID,
tool: item,
})
if (item.state.status === "pending") return
if (item.state.status === "streaming") return
child.callIDs.add(item.id)
if (item.state.status === "running") {
setFrame(child, `tool:${item.id}`, toolCommit(part, "start"))
@@ -327,7 +326,7 @@ export function createSubagentTracker(input: SubagentTrackerInput): SubagentTrac
setFrame(child, `tool:${item.id}`, toolCommit(part, "final"))
}
const rebuild = (child: ChildState, messages: SessionMessage[]) => {
const rebuild = (child: ChildState, messages: SessionMessageInfo[]) => {
child.frames = []
child.text.clear()
child.projectedText.clear()
@@ -412,7 +411,7 @@ export function createSubagentTracker(input: SubagentTrackerInput): SubagentTrac
for (const [id, prompt] of pendingPrompts) {
if (!child.prompts.has(id)) child.prompts.set(id, prompt)
}
rebuild(child, structuredClone(response.data).toReversed() as SessionMessage[])
rebuild(child, structuredClone(response.data).toReversed() as SessionMessageInfo[])
for (const [id, tool] of pendingTools) {
if (!child.finishedTools.has(id) && !child.tools.has(id)) child.tools.set(id, tool)
}
@@ -622,7 +621,6 @@ export function createSubagentTracker(input: SubagentTrackerInput): SubagentTrac
input: current?.input ?? {},
structured: event.data.structured,
content: event.data.content,
outputPaths: event.data.outputPaths,
result: event.data.result,
},
time: {
+15 -16
View File
@@ -2,7 +2,7 @@ import type { EventSubscribeOutput, OpenCodeClient } from "@opencode-ai/client/p
import type {
PermissionRequest,
QuestionRequest,
SessionMessage,
SessionMessageInfo,
SessionMessageAssistantTool,
} from "@opencode-ai/sdk/v2"
import { Event } from "@opencode-ai/schema/event"
@@ -389,7 +389,7 @@ export async function createSessionTransport(input: StreamInput): Promise<Sessio
messageID,
tool: item,
})
if (item.state.status === "pending") return
if (item.state.status === "streaming") return
if (item.state.status === "running") {
if (state.tools.get(item.id)?.running) return
state.tools.set(item.id, {
@@ -417,7 +417,7 @@ export async function createSessionTransport(input: StreamInput): Promise<Sessio
])
}
const renderMessage = (message: SessionMessage, render: boolean, reuseVisibleWait: boolean) => {
const renderMessage = (message: SessionMessageInfo, render: boolean, reuseVisibleWait: boolean) => {
if (message.type === "user") {
const waiting = state.wait?.messageID === message.id
if (waiting && state.wait) state.wait.promoted = true
@@ -438,34 +438,34 @@ export async function createSessionTransport(input: StreamInput): Promise<Sessio
return
}
if (message.type === "shell") {
state.shellCommands.set(message.shell.id, message.shell.command)
if (state.shellWait?.messageID === message.id) state.shellWait.callID = message.shell.id
state.shellCommands.set(message.shellID, message.command)
if (state.shellWait?.messageID === message.id) state.shellWait.callID = message.shellID
const completed = message.time.completed !== undefined
if (!render) {
// Suppressed history: mark settled shells rendered so live redelivery
// stays silent. A still-running shell stays unmarked and renders in
// full when its live shell.ended event arrives.
if (completed) {
state.shellStarted.add(message.shell.id)
state.shellEnded.add(message.shell.id)
state.shellStarted.add(message.shellID)
state.shellEnded.add(message.shellID)
}
return
}
if (!state.shellStarted.has(message.shell.id)) {
state.shellStarted.add(message.shell.id)
if (!state.shellStarted.has(message.shellID)) {
state.shellStarted.add(message.shellID)
write([
shellCommit(message.shell.id, message.shell.command, {
shellCommit(message.shellID, message.command, {
text: "running shell",
phase: "start",
toolState: "running",
}),
])
}
if (completed && message.output && !state.shellEnded.has(message.shell.id)) {
state.shellEnded.add(message.shell.id)
write(shellTerminal(message.shell.id, message.shell.command, message.shell, message.output))
if (completed && message.output && !state.shellEnded.has(message.shellID)) {
state.shellEnded.add(message.shellID)
write(shellTerminal(message.shellID, message.command, message, message.output))
}
if (completed && state.shellWait?.callID === message.shell.id) state.shellWait.resolve()
if (completed && state.shellWait?.callID === message.shellID) state.shellWait.resolve()
return
}
if (message.type !== "assistant") return
@@ -534,7 +534,7 @@ export async function createSessionTransport(input: StreamInput): Promise<Sessio
input.sdk.question.list({ sessionID: input.sessionID }),
input.sdk.session.active(),
])
const projected = structuredClone(messages.data).toReversed() as SessionMessage[]
const projected = structuredClone(messages.data).toReversed() as SessionMessageInfo[]
for (const message of projected) renderMessage(message, next.render, next.reuseVisibleWait)
state.permissions = permissions.map(permission)
state.questions = questions.map(question)
@@ -762,7 +762,6 @@ export async function createSessionTransport(input: StreamInput): Promise<Sessio
input: current?.input ?? {},
structured: event.data.structured,
content: event.data.content,
outputPaths: event.data.outputPaths,
result: event.data.result,
},
time: { created: current?.started ?? event.created, ran: current?.started, completed: event.created },
+2 -2
View File
@@ -119,7 +119,7 @@ type ToolName =
| "bash"
| "write"
| "edit"
| "apply_patch"
| "patch"
| "batch"
| "task"
| "todowrite"
@@ -1094,7 +1094,7 @@ const TOOL_RULES = {
},
permission: permEdit,
},
apply_patch: {
patch: {
view: {
output: false,
final: true,
+1 -1
View File
@@ -113,6 +113,7 @@ export type FooterQueuedPrompt = {
}
export type RunAgent = {
id: string
name: string
description?: string
mode: "subagent" | "primary" | "all"
@@ -135,7 +136,6 @@ export type RunInput = {
files: RunFilePart[]
initialInput?: string
thinking: boolean
backgroundSubagents: boolean
demo?: boolean
}
-11
View File
@@ -7,13 +7,11 @@ import { LayerNode } from "@opencode-ai/core/effect/layer-node"
import { Global } from "@opencode-ai/core/global"
import { InstallationVersion } from "@opencode-ai/core/installation/version"
import { AppProcess } from "@opencode-ai/core/process"
import { Flock } from "@opencode-ai/core/util/flock"
import { start } from "@opencode-ai/server/process"
import { randomBytes, randomUUID } from "node:crypto"
import path from "node:path"
import { Effect, FileSystem, Logger, Option, Redacted, Schedule, Schema } from "effect"
import { HttpServer } from "effect/unstable/http"
import { CodeModeHost } from "./code-mode"
import { Env } from "./env"
import { ServiceConfig } from "./services/service-config"
import { Updater } from "./services/updater"
@@ -38,14 +36,6 @@ const processEffect = Effect.fnUntraced(function* (options: Options) {
if (options.mode === "service") yield* Effect.sync(() => process.chdir(Global.Path.home))
return yield* Effect.scoped(
Effect.gen(function* () {
if (options.mode === "service") {
const service = yield* ServiceConfig.options()
yield* Flock.effect(path.basename(service.file, ".json") + "-process", {
dir: path.dirname(service.file),
staleMs: 3_000,
timeoutMs: 15_000,
})
}
const environmentPassword = yield* Env.password
// Keep the lease credential out of the environment inherited by tools.
if (options.mode === "stdio") {
@@ -64,7 +54,6 @@ const processEffect = Effect.fnUntraced(function* (options: Options) {
hostname: options.hostname ?? config.hostname ?? "127.0.0.1",
port: Option.fromNullishOr(options.port ?? config.port),
password,
replacements: (server) => CodeModeHost.replacements(server, password),
}).pipe(Effect.provide(Logger.layer([], { mergeWithExisting: false })))
if (options.mode === "service") yield* register(address, password)
const url = HttpServer.formatAddress(address)
-39
View File
@@ -1,39 +0,0 @@
import { expect, test } from "bun:test"
import { CodeMode } from "@opencode-ai/codemode"
import { Effect, Layer } from "effect"
import { HttpClient, HttpClientResponse } from "effect/unstable/http"
import { CodeModeHost } from "../src/code-mode"
test("exposes the authenticated OpenCode API through CodeMode", async () => {
const requests: Array<{ readonly url: string; readonly authorization?: string }> = []
const client = Layer.succeed(
HttpClient.HttpClient,
HttpClient.make((request) => {
requests.push({ url: request.url, authorization: request.headers.authorization })
return Effect.succeed(
HttpClientResponse.fromWeb(
request,
Response.json(
{ healthy: true, version: "test", pid: 1 },
{ headers: { "content-type": "application/json" } },
),
),
)
}),
)
const result = await CodeMode.make({ tools: CodeModeHost.makeTools(client, "secret") })
.execute("return await tools.opencode.v2.health.get({})")
.pipe(Effect.runPromise)
expect(result).toEqual({
ok: true,
value: { healthy: true, version: "test", pid: 1 },
toolCalls: [{ name: "opencode.v2.health.get" }],
})
expect(requests).toEqual([
{
url: "http://opencode.local/api/health",
authorization: `Basic ${Buffer.from("opencode:secret").toString("base64")}`,
},
])
})
+2 -3
View File
@@ -3,15 +3,14 @@ import { compile, emitEffectImported, emitEffectShape, emitPromise, write } from
import {
ClientApi,
effectOmitEndpoints,
endpointNames,
groupNames,
promiseOmitEndpoints,
} from "@opencode-ai/protocol/client"
import { Effect } from "effect"
import { fileURLToPath } from "url"
const promiseContract = compile(ClientApi, { groupNames, endpointNames, omitEndpoints: promiseOmitEndpoints })
const effectContract = compile(ClientApi, { groupNames, endpointNames, omitEndpoints: effectOmitEndpoints })
const promiseContract = compile(ClientApi, { groupNames, omitEndpoints: promiseOmitEndpoints })
const effectContract = compile(ClientApi, { groupNames, omitEndpoints: effectOmitEndpoints })
await Effect.runPromise(
Effect.all(
-1
View File
@@ -1,7 +1,6 @@
export {
ClientApi,
effectOmitEndpoints,
endpointNames,
groupNames,
promiseOmitEndpoints,
} from "@opencode-ai/protocol/client"
+141 -112
View File
@@ -111,157 +111,167 @@ export type Endpoint4_8Input = {
export type Endpoint4_8Output = EffectValue<ReturnType<RawClient["server.session"]["session.rename"]>>
export type SessionRenameOperation<E = never> = (input: Endpoint4_8Input) => Effect.Effect<Endpoint4_8Output, E>
type Endpoint4_9Request = Parameters<RawClient["server.session"]["session.prompt"]>[0]
type Endpoint4_9Request = Parameters<RawClient["server.session"]["session.move"]>[0]
export type Endpoint4_9Input = {
readonly sessionID: Endpoint4_9Request["params"]["sessionID"]
readonly id?: Endpoint4_9Request["payload"]["id"]
readonly prompt: Endpoint4_9Request["payload"]["prompt"]
readonly delivery?: Endpoint4_9Request["payload"]["delivery"]
readonly resume?: Endpoint4_9Request["payload"]["resume"]
readonly destination: Endpoint4_9Request["payload"]["destination"]
readonly moveChanges?: Endpoint4_9Request["payload"]["moveChanges"]
}
export type Endpoint4_9Output = EffectValue<ReturnType<RawClient["server.session"]["session.prompt"]>>["data"]
export type SessionPromptOperation<E = never> = (input: Endpoint4_9Input) => Effect.Effect<Endpoint4_9Output, E>
export type Endpoint4_9Output = EffectValue<ReturnType<RawClient["server.session"]["session.move"]>>
export type SessionMoveOperation<E = never> = (input: Endpoint4_9Input) => Effect.Effect<Endpoint4_9Output, E>
type Endpoint4_10Request = Parameters<RawClient["server.session"]["session.command"]>[0]
type Endpoint4_10Request = Parameters<RawClient["server.session"]["session.prompt"]>[0]
export type Endpoint4_10Input = {
readonly sessionID: Endpoint4_10Request["params"]["sessionID"]
readonly id?: Endpoint4_10Request["payload"]["id"]
readonly command: Endpoint4_10Request["payload"]["command"]
readonly arguments?: Endpoint4_10Request["payload"]["arguments"]
readonly agent?: Endpoint4_10Request["payload"]["agent"]
readonly model?: Endpoint4_10Request["payload"]["model"]
readonly files?: Endpoint4_10Request["payload"]["files"]
readonly agents?: Endpoint4_10Request["payload"]["agents"]
readonly prompt: Endpoint4_10Request["payload"]["prompt"]
readonly delivery?: Endpoint4_10Request["payload"]["delivery"]
readonly resume?: Endpoint4_10Request["payload"]["resume"]
}
export type Endpoint4_10Output = EffectValue<ReturnType<RawClient["server.session"]["session.command"]>>["data"]
export type SessionCommandOperation<E = never> = (input: Endpoint4_10Input) => Effect.Effect<Endpoint4_10Output, E>
export type Endpoint4_10Output = EffectValue<ReturnType<RawClient["server.session"]["session.prompt"]>>["data"]
export type SessionPromptOperation<E = never> = (input: Endpoint4_10Input) => Effect.Effect<Endpoint4_10Output, E>
type Endpoint4_11Request = Parameters<RawClient["server.session"]["session.skill"]>[0]
type Endpoint4_11Request = Parameters<RawClient["server.session"]["session.command"]>[0]
export type Endpoint4_11Input = {
readonly sessionID: Endpoint4_11Request["params"]["sessionID"]
readonly id?: Endpoint4_11Request["payload"]["id"]
readonly skill: Endpoint4_11Request["payload"]["skill"]
readonly command: Endpoint4_11Request["payload"]["command"]
readonly arguments?: Endpoint4_11Request["payload"]["arguments"]
readonly agent?: Endpoint4_11Request["payload"]["agent"]
readonly model?: Endpoint4_11Request["payload"]["model"]
readonly files?: Endpoint4_11Request["payload"]["files"]
readonly agents?: Endpoint4_11Request["payload"]["agents"]
readonly delivery?: Endpoint4_11Request["payload"]["delivery"]
readonly resume?: Endpoint4_11Request["payload"]["resume"]
}
export type Endpoint4_11Output = EffectValue<ReturnType<RawClient["server.session"]["session.skill"]>>
export type SessionSkillOperation<E = never> = (input: Endpoint4_11Input) => Effect.Effect<Endpoint4_11Output, E>
export type Endpoint4_11Output = EffectValue<ReturnType<RawClient["server.session"]["session.command"]>>["data"]
export type SessionCommandOperation<E = never> = (input: Endpoint4_11Input) => Effect.Effect<Endpoint4_11Output, E>
type Endpoint4_12Request = Parameters<RawClient["server.session"]["session.synthetic"]>[0]
type Endpoint4_12Request = Parameters<RawClient["server.session"]["session.skill"]>[0]
export type Endpoint4_12Input = {
readonly sessionID: Endpoint4_12Request["params"]["sessionID"]
readonly text: Endpoint4_12Request["payload"]["text"]
readonly description?: Endpoint4_12Request["payload"]["description"]
readonly metadata?: Endpoint4_12Request["payload"]["metadata"]
readonly id?: Endpoint4_12Request["payload"]["id"]
readonly skill: Endpoint4_12Request["payload"]["skill"]
readonly resume?: Endpoint4_12Request["payload"]["resume"]
}
export type Endpoint4_12Output = EffectValue<ReturnType<RawClient["server.session"]["session.synthetic"]>>
export type SessionSyntheticOperation<E = never> = (input: Endpoint4_12Input) => Effect.Effect<Endpoint4_12Output, E>
export type Endpoint4_12Output = EffectValue<ReturnType<RawClient["server.session"]["session.skill"]>>
export type SessionSkillOperation<E = never> = (input: Endpoint4_12Input) => Effect.Effect<Endpoint4_12Output, E>
type Endpoint4_13Request = Parameters<RawClient["server.session"]["session.shell"]>[0]
type Endpoint4_13Request = Parameters<RawClient["server.session"]["session.synthetic"]>[0]
export type Endpoint4_13Input = {
readonly sessionID: Endpoint4_13Request["params"]["sessionID"]
readonly id?: Endpoint4_13Request["payload"]["id"]
readonly command: Endpoint4_13Request["payload"]["command"]
readonly text: Endpoint4_13Request["payload"]["text"]
readonly description?: Endpoint4_13Request["payload"]["description"]
readonly metadata?: Endpoint4_13Request["payload"]["metadata"]
readonly resume?: Endpoint4_13Request["payload"]["resume"]
}
export type Endpoint4_13Output = EffectValue<ReturnType<RawClient["server.session"]["session.shell"]>>
export type SessionShellOperation<E = never> = (input: Endpoint4_13Input) => Effect.Effect<Endpoint4_13Output, E>
export type Endpoint4_13Output = EffectValue<ReturnType<RawClient["server.session"]["session.synthetic"]>>
export type SessionSyntheticOperation<E = never> = (input: Endpoint4_13Input) => Effect.Effect<Endpoint4_13Output, E>
type Endpoint4_14Request = Parameters<RawClient["server.session"]["session.compact"]>[0]
type Endpoint4_14Request = Parameters<RawClient["server.session"]["session.shell"]>[0]
export type Endpoint4_14Input = {
readonly sessionID: Endpoint4_14Request["params"]["sessionID"]
readonly id?: Endpoint4_14Request["payload"]["id"]
readonly command: Endpoint4_14Request["payload"]["command"]
}
export type Endpoint4_14Output = EffectValue<ReturnType<RawClient["server.session"]["session.compact"]>>["data"]
export type SessionCompactOperation<E = never> = (input: Endpoint4_14Input) => Effect.Effect<Endpoint4_14Output, E>
export type Endpoint4_14Output = EffectValue<ReturnType<RawClient["server.session"]["session.shell"]>>
export type SessionShellOperation<E = never> = (input: Endpoint4_14Input) => Effect.Effect<Endpoint4_14Output, E>
type Endpoint4_15Request = Parameters<RawClient["server.session"]["session.wait"]>[0]
export type Endpoint4_15Input = { readonly sessionID: Endpoint4_15Request["params"]["sessionID"] }
export type Endpoint4_15Output = EffectValue<ReturnType<RawClient["server.session"]["session.wait"]>>
export type SessionWaitOperation<E = never> = (input: Endpoint4_15Input) => Effect.Effect<Endpoint4_15Output, E>
type Endpoint4_16Request = Parameters<RawClient["server.session"]["session.revert.stage"]>[0]
export type Endpoint4_16Input = {
readonly sessionID: Endpoint4_16Request["params"]["sessionID"]
readonly messageID: Endpoint4_16Request["payload"]["messageID"]
readonly files?: Endpoint4_16Request["payload"]["files"]
type Endpoint4_15Request = Parameters<RawClient["server.session"]["session.compact"]>[0]
export type Endpoint4_15Input = {
readonly sessionID: Endpoint4_15Request["params"]["sessionID"]
readonly id?: Endpoint4_15Request["payload"]["id"]
}
export type Endpoint4_16Output = EffectValue<ReturnType<RawClient["server.session"]["session.revert.stage"]>>["data"]
export type SessionRevertStageOperation<E = never> = (input: Endpoint4_16Input) => Effect.Effect<Endpoint4_16Output, E>
export type Endpoint4_15Output = EffectValue<ReturnType<RawClient["server.session"]["session.compact"]>>["data"]
export type SessionCompactOperation<E = never> = (input: Endpoint4_15Input) => Effect.Effect<Endpoint4_15Output, E>
type Endpoint4_17Request = Parameters<RawClient["server.session"]["session.revert.clear"]>[0]
export type Endpoint4_17Input = { readonly sessionID: Endpoint4_17Request["params"]["sessionID"] }
export type Endpoint4_17Output = EffectValue<ReturnType<RawClient["server.session"]["session.revert.clear"]>>
export type SessionRevertClearOperation<E = never> = (input: Endpoint4_17Input) => Effect.Effect<Endpoint4_17Output, E>
type Endpoint4_16Request = Parameters<RawClient["server.session"]["session.wait"]>[0]
export type Endpoint4_16Input = { readonly sessionID: Endpoint4_16Request["params"]["sessionID"] }
export type Endpoint4_16Output = EffectValue<ReturnType<RawClient["server.session"]["session.wait"]>>
export type SessionWaitOperation<E = never> = (input: Endpoint4_16Input) => Effect.Effect<Endpoint4_16Output, E>
type Endpoint4_18Request = Parameters<RawClient["server.session"]["session.revert.commit"]>[0]
type Endpoint4_17Request = Parameters<RawClient["server.session"]["session.revert.stage"]>[0]
export type Endpoint4_17Input = {
readonly sessionID: Endpoint4_17Request["params"]["sessionID"]
readonly messageID: Endpoint4_17Request["payload"]["messageID"]
readonly files?: Endpoint4_17Request["payload"]["files"]
}
export type Endpoint4_17Output = EffectValue<ReturnType<RawClient["server.session"]["session.revert.stage"]>>["data"]
export type SessionRevertStageOperation<E = never> = (input: Endpoint4_17Input) => Effect.Effect<Endpoint4_17Output, E>
type Endpoint4_18Request = Parameters<RawClient["server.session"]["session.revert.clear"]>[0]
export type Endpoint4_18Input = { readonly sessionID: Endpoint4_18Request["params"]["sessionID"] }
export type Endpoint4_18Output = EffectValue<ReturnType<RawClient["server.session"]["session.revert.commit"]>>
export type SessionRevertCommitOperation<E = never> = (input: Endpoint4_18Input) => Effect.Effect<Endpoint4_18Output, E>
export type Endpoint4_18Output = EffectValue<ReturnType<RawClient["server.session"]["session.revert.clear"]>>
export type SessionRevertClearOperation<E = never> = (input: Endpoint4_18Input) => Effect.Effect<Endpoint4_18Output, E>
type Endpoint4_19Request = Parameters<RawClient["server.session"]["session.context"]>[0]
type Endpoint4_19Request = Parameters<RawClient["server.session"]["session.revert.commit"]>[0]
export type Endpoint4_19Input = { readonly sessionID: Endpoint4_19Request["params"]["sessionID"] }
export type Endpoint4_19Output = EffectValue<ReturnType<RawClient["server.session"]["session.context"]>>["data"]
export type SessionContextOperation<E = never> = (input: Endpoint4_19Input) => Effect.Effect<Endpoint4_19Output, E>
export type Endpoint4_19Output = EffectValue<ReturnType<RawClient["server.session"]["session.revert.commit"]>>
export type SessionRevertCommitOperation<E = never> = (input: Endpoint4_19Input) => Effect.Effect<Endpoint4_19Output, E>
type Endpoint4_20Request = Parameters<RawClient["server.session"]["session.instructions.entry.list"]>[0]
type Endpoint4_20Request = Parameters<RawClient["server.session"]["session.context"]>[0]
export type Endpoint4_20Input = { readonly sessionID: Endpoint4_20Request["params"]["sessionID"] }
export type Endpoint4_20Output = EffectValue<
export type Endpoint4_20Output = EffectValue<ReturnType<RawClient["server.session"]["session.context"]>>["data"]
export type SessionContextOperation<E = never> = (input: Endpoint4_20Input) => Effect.Effect<Endpoint4_20Output, E>
type Endpoint4_21Request = Parameters<RawClient["server.session"]["session.instructions.entry.list"]>[0]
export type Endpoint4_21Input = { readonly sessionID: Endpoint4_21Request["params"]["sessionID"] }
export type Endpoint4_21Output = EffectValue<
ReturnType<RawClient["server.session"]["session.instructions.entry.list"]>
>["data"]
export type SessionInstructionsEntryListOperation<E = never> = (
input: Endpoint4_20Input,
) => Effect.Effect<Endpoint4_20Output, E>
type Endpoint4_21Request = Parameters<RawClient["server.session"]["session.instructions.entry.put"]>[0]
export type Endpoint4_21Input = {
readonly sessionID: Endpoint4_21Request["params"]["sessionID"]
readonly key: Endpoint4_21Request["params"]["key"]
readonly value: Endpoint4_21Request["payload"]["value"]
}
export type Endpoint4_21Output = EffectValue<ReturnType<RawClient["server.session"]["session.instructions.entry.put"]>>
export type SessionInstructionsEntryPutOperation<E = never> = (
input: Endpoint4_21Input,
) => Effect.Effect<Endpoint4_21Output, E>
type Endpoint4_22Request = Parameters<RawClient["server.session"]["session.instructions.entry.remove"]>[0]
type Endpoint4_22Request = Parameters<RawClient["server.session"]["session.instructions.entry.put"]>[0]
export type Endpoint4_22Input = {
readonly sessionID: Endpoint4_22Request["params"]["sessionID"]
readonly key: Endpoint4_22Request["params"]["key"]
readonly value: Endpoint4_22Request["payload"]["value"]
}
export type Endpoint4_22Output = EffectValue<
ReturnType<RawClient["server.session"]["session.instructions.entry.remove"]>
>
export type SessionInstructionsEntryRemoveOperation<E = never> = (
export type Endpoint4_22Output = EffectValue<ReturnType<RawClient["server.session"]["session.instructions.entry.put"]>>
export type SessionInstructionsEntryPutOperation<E = never> = (
input: Endpoint4_22Input,
) => Effect.Effect<Endpoint4_22Output, E>
type Endpoint4_23Request = Parameters<RawClient["server.session"]["session.log"]>[0]
type Endpoint4_23Request = Parameters<RawClient["server.session"]["session.instructions.entry.remove"]>[0]
export type Endpoint4_23Input = {
readonly sessionID: Endpoint4_23Request["params"]["sessionID"]
readonly after?: Endpoint4_23Request["query"]["after"]
readonly follow?: Endpoint4_23Request["query"]["follow"]
readonly key: Endpoint4_23Request["params"]["key"]
}
export type Endpoint4_23Output = StreamValue<EffectValue<ReturnType<RawClient["server.session"]["session.log"]>>>
export type SessionLogOperation<E = never> = (input: Endpoint4_23Input) => Stream.Stream<Endpoint4_23Output, E>
export type Endpoint4_23Output = EffectValue<
ReturnType<RawClient["server.session"]["session.instructions.entry.remove"]>
>
export type SessionInstructionsEntryRemoveOperation<E = never> = (
input: Endpoint4_23Input,
) => Effect.Effect<Endpoint4_23Output, E>
type Endpoint4_24Request = Parameters<RawClient["server.session"]["session.interrupt"]>[0]
export type Endpoint4_24Input = { readonly sessionID: Endpoint4_24Request["params"]["sessionID"] }
export type Endpoint4_24Output = EffectValue<ReturnType<RawClient["server.session"]["session.interrupt"]>>
export type SessionInterruptOperation<E = never> = (input: Endpoint4_24Input) => Effect.Effect<Endpoint4_24Output, E>
type Endpoint4_24Request = Parameters<RawClient["server.session"]["session.log"]>[0]
export type Endpoint4_24Input = {
readonly sessionID: Endpoint4_24Request["params"]["sessionID"]
readonly after?: Endpoint4_24Request["query"]["after"]
readonly follow?: Endpoint4_24Request["query"]["follow"]
}
export type Endpoint4_24Output = StreamValue<EffectValue<ReturnType<RawClient["server.session"]["session.log"]>>>
export type SessionLogOperation<E = never> = (input: Endpoint4_24Input) => Stream.Stream<Endpoint4_24Output, E>
type Endpoint4_25Request = Parameters<RawClient["server.session"]["session.background"]>[0]
type Endpoint4_25Request = Parameters<RawClient["server.session"]["session.interrupt"]>[0]
export type Endpoint4_25Input = { readonly sessionID: Endpoint4_25Request["params"]["sessionID"] }
export type Endpoint4_25Output = EffectValue<ReturnType<RawClient["server.session"]["session.background"]>>
export type SessionBackgroundOperation<E = never> = (input: Endpoint4_25Input) => Effect.Effect<Endpoint4_25Output, E>
export type Endpoint4_25Output = EffectValue<ReturnType<RawClient["server.session"]["session.interrupt"]>>
export type SessionInterruptOperation<E = never> = (input: Endpoint4_25Input) => Effect.Effect<Endpoint4_25Output, E>
type Endpoint4_26Request = Parameters<RawClient["server.session"]["session.message"]>[0]
export type Endpoint4_26Input = {
readonly sessionID: Endpoint4_26Request["params"]["sessionID"]
readonly messageID: Endpoint4_26Request["params"]["messageID"]
type Endpoint4_26Request = Parameters<RawClient["server.session"]["session.background"]>[0]
export type Endpoint4_26Input = { readonly sessionID: Endpoint4_26Request["params"]["sessionID"] }
export type Endpoint4_26Output = EffectValue<ReturnType<RawClient["server.session"]["session.background"]>>
export type SessionBackgroundOperation<E = never> = (input: Endpoint4_26Input) => Effect.Effect<Endpoint4_26Output, E>
type Endpoint4_27Request = Parameters<RawClient["server.session"]["session.message"]>[0]
export type Endpoint4_27Input = {
readonly sessionID: Endpoint4_27Request["params"]["sessionID"]
readonly messageID: Endpoint4_27Request["params"]["messageID"]
}
export type Endpoint4_26Output = EffectValue<ReturnType<RawClient["server.session"]["session.message"]>>["data"]
export type SessionMessageOperation<E = never> = (input: Endpoint4_26Input) => Effect.Effect<Endpoint4_26Output, E>
export type Endpoint4_27Output = EffectValue<ReturnType<RawClient["server.session"]["session.message"]>>["data"]
export type SessionMessageOperation<E = never> = (input: Endpoint4_27Input) => Effect.Effect<Endpoint4_27Output, E>
export interface SessionApi<E = never> {
readonly list: SessionListOperation<E>
@@ -273,6 +283,7 @@ export interface SessionApi<E = never> {
readonly switchAgent: SessionSwitchAgentOperation<E>
readonly switchModel: SessionSwitchModelOperation<E>
readonly rename: SessionRenameOperation<E>
readonly move: SessionMoveOperation<E>
readonly prompt: SessionPromptOperation<E>
readonly command: SessionCommandOperation<E>
readonly skill: SessionSkillOperation<E>
@@ -280,9 +291,11 @@ export interface SessionApi<E = never> {
readonly shell: SessionShellOperation<E>
readonly compact: SessionCompactOperation<E>
readonly wait: SessionWaitOperation<E>
readonly revertStage: SessionRevertStageOperation<E>
readonly revertClear: SessionRevertClearOperation<E>
readonly revertCommit: SessionRevertCommitOperation<E>
readonly revert: {
readonly stage: SessionRevertStageOperation<E>
readonly clear: SessionRevertClearOperation<E>
readonly commit: SessionRevertCommitOperation<E>
}
readonly context: SessionContextOperation<E>
readonly instructions: {
readonly entry: {
@@ -427,11 +440,15 @@ export type IntegrationAttemptCancelOperation<E = never> = (
export interface IntegrationApi<E = never> {
readonly list: IntegrationListOperation<E>
readonly get: IntegrationGetOperation<E>
readonly connectKey: IntegrationConnectKeyOperation<E>
readonly connectOauth: IntegrationConnectOauthOperation<E>
readonly attemptStatus: IntegrationAttemptStatusOperation<E>
readonly attemptComplete: IntegrationAttemptCompleteOperation<E>
readonly attemptCancel: IntegrationAttemptCancelOperation<E>
readonly connect: {
readonly key: IntegrationConnectKeyOperation<E>
readonly oauth: IntegrationConnectOauthOperation<E>
}
readonly attempt: {
readonly status: IntegrationAttemptStatusOperation<E>
readonly complete: IntegrationAttemptCompleteOperation<E>
readonly cancel: IntegrationAttemptCancelOperation<E>
}
}
type Endpoint10_0Request = Parameters<RawClient["server.mcp"]["mcp.list"]>[0]
@@ -439,8 +456,16 @@ export type Endpoint10_0Input = { readonly location?: Endpoint10_0Request["query
export type Endpoint10_0Output = EffectValue<ReturnType<RawClient["server.mcp"]["mcp.list"]>>
export type ServerMcpListOperation<E = never> = (input?: Endpoint10_0Input) => Effect.Effect<Endpoint10_0Output, E>
type Endpoint10_1Request = Parameters<RawClient["server.mcp"]["mcp.resource.catalog"]>[0]
export type Endpoint10_1Input = { readonly location?: Endpoint10_1Request["query"]["location"] }
export type Endpoint10_1Output = EffectValue<ReturnType<RawClient["server.mcp"]["mcp.resource.catalog"]>>
export type ServerMcpResourceCatalogOperation<E = never> = (
input?: Endpoint10_1Input,
) => Effect.Effect<Endpoint10_1Output, E>
export interface ServerMcpApi<E = never> {
readonly list: ServerMcpListOperation<E>
readonly resource: { readonly catalog: ServerMcpResourceCatalogOperation<E> }
}
type Endpoint11_0Request = Parameters<RawClient["server.credential"]["credential.update"]>[0]
@@ -490,7 +515,7 @@ export interface ProjectApi<E = never> {
type Endpoint13_0Request = Parameters<RawClient["server.form"]["form.request.list"]>[0]
export type Endpoint13_0Input = { readonly location?: Endpoint13_0Request["query"]["location"] }
export type Endpoint13_0Output = EffectValue<ReturnType<RawClient["server.form"]["form.request.list"]>>
export type FormListRequestsOperation<E = never> = (input?: Endpoint13_0Input) => Effect.Effect<Endpoint13_0Output, E>
export type FormRequestListOperation<E = never> = (input?: Endpoint13_0Input) => Effect.Effect<Endpoint13_0Output, E>
type Endpoint13_1Request = Parameters<RawClient["server.form"]["session.form.list"]>[0]
export type Endpoint13_1Input = { readonly sessionID: Endpoint13_1Request["params"]["sessionID"] }
@@ -544,7 +569,7 @@ export type Endpoint13_6Output = EffectValue<ReturnType<RawClient["server.form"]
export type FormCancelOperation<E = never> = (input: Endpoint13_6Input) => Effect.Effect<Endpoint13_6Output, E>
export interface FormApi<E = never> {
readonly listRequests: FormListRequestsOperation<E>
readonly request: { readonly list: FormRequestListOperation<E> }
readonly list: FormListOperation<E>
readonly create: FormCreateOperation<E>
readonly get: FormGetOperation<E>
@@ -556,7 +581,7 @@ export interface FormApi<E = never> {
type Endpoint14_0Request = Parameters<RawClient["server.permission"]["permission.request.list"]>[0]
export type Endpoint14_0Input = { readonly location?: Endpoint14_0Request["query"]["location"] }
export type Endpoint14_0Output = EffectValue<ReturnType<RawClient["server.permission"]["permission.request.list"]>>
export type PermissionListRequestsOperation<E = never> = (
export type PermissionRequestListOperation<E = never> = (
input?: Endpoint14_0Input,
) => Effect.Effect<Endpoint14_0Output, E>
@@ -565,14 +590,14 @@ export type Endpoint14_1Input = { readonly projectID?: Endpoint14_1Request["quer
export type Endpoint14_1Output = EffectValue<
ReturnType<RawClient["server.permission"]["permission.saved.list"]>
>["data"]
export type PermissionListSavedOperation<E = never> = (
export type PermissionSavedListOperation<E = never> = (
input?: Endpoint14_1Input,
) => Effect.Effect<Endpoint14_1Output, E>
type Endpoint14_2Request = Parameters<RawClient["server.permission"]["permission.saved.remove"]>[0]
export type Endpoint14_2Input = { readonly id: Endpoint14_2Request["params"]["id"] }
export type Endpoint14_2Output = EffectValue<ReturnType<RawClient["server.permission"]["permission.saved.remove"]>>
export type PermissionRemoveSavedOperation<E = never> = (
export type PermissionSavedRemoveOperation<E = never> = (
input: Endpoint14_2Input,
) => Effect.Effect<Endpoint14_2Output, E>
@@ -620,9 +645,8 @@ export type Endpoint14_6Output = EffectValue<ReturnType<RawClient["server.permis
export type PermissionReplyOperation<E = never> = (input: Endpoint14_6Input) => Effect.Effect<Endpoint14_6Output, E>
export interface PermissionApi<E = never> {
readonly listRequests: PermissionListRequestsOperation<E>
readonly listSaved: PermissionListSavedOperation<E>
readonly removeSaved: PermissionRemoveSavedOperation<E>
readonly request: { readonly list: PermissionRequestListOperation<E> }
readonly saved: { readonly list: PermissionSavedListOperation<E>; readonly remove: PermissionSavedRemoveOperation<E> }
readonly create: PermissionCreateOperation<E>
readonly list: PermissionListOperation<E>
readonly get: PermissionGetOperation<E>
@@ -791,7 +815,7 @@ export interface ShellApi<E = never> {
type Endpoint21_0Request = Parameters<RawClient["server.question"]["question.request.list"]>[0]
export type Endpoint21_0Input = { readonly location?: Endpoint21_0Request["query"]["location"] }
export type Endpoint21_0Output = EffectValue<ReturnType<RawClient["server.question"]["question.request.list"]>>
export type QuestionListRequestsOperation<E = never> = (
export type QuestionRequestListOperation<E = never> = (
input?: Endpoint21_0Input,
) => Effect.Effect<Endpoint21_0Output, E>
@@ -818,7 +842,7 @@ export type Endpoint21_3Output = EffectValue<ReturnType<RawClient["server.questi
export type QuestionRejectOperation<E = never> = (input: Endpoint21_3Input) => Effect.Effect<Endpoint21_3Output, E>
export interface QuestionApi<E = never> {
readonly listRequests: QuestionListRequestsOperation<E>
readonly request: { readonly list: QuestionRequestListOperation<E> }
readonly list: QuestionListOperation<E>
readonly reply: QuestionReplyOperation<E>
readonly reject: QuestionRejectOperation<E>
@@ -888,10 +912,15 @@ export interface VcsApi<E = never> {
}
export type Endpoint25_0Output = EffectValue<ReturnType<RawClient["server.debug"]["debug.location"]>>
export type DebugLocationOperation<E = never> = () => Effect.Effect<Endpoint25_0Output, E>
export type DebugLocationListOperation<E = never> = () => Effect.Effect<Endpoint25_0Output, E>
type Endpoint25_1Request = Parameters<RawClient["server.debug"]["debug.location.evict"]>[0]
export type Endpoint25_1Input = { readonly location?: Endpoint25_1Request["query"]["location"] }
export type Endpoint25_1Output = EffectValue<ReturnType<RawClient["server.debug"]["debug.location.evict"]>>
export type DebugLocationEvictOperation<E = never> = (input?: Endpoint25_1Input) => Effect.Effect<Endpoint25_1Output, E>
export interface DebugApi<E = never> {
readonly location: DebugLocationOperation<E>
readonly location: { readonly list: DebugLocationListOperation<E>; readonly evict: DebugLocationEvictOperation<E> }
}
export interface AppApi<E = never> {
+150 -122
View File
@@ -141,15 +141,27 @@ const Endpoint4_8 = (raw: RawClient["server.session"]) => (input: Endpoint4_8Inp
Effect.mapError(mapClientError),
)
type Endpoint4_9Request = Parameters<RawClient["server.session"]["session.prompt"]>[0]
type Endpoint4_9Request = Parameters<RawClient["server.session"]["session.move"]>[0]
type Endpoint4_9Input = {
readonly sessionID: Endpoint4_9Request["params"]["sessionID"]
readonly id?: Endpoint4_9Request["payload"]["id"]
readonly prompt: Endpoint4_9Request["payload"]["prompt"]
readonly delivery?: Endpoint4_9Request["payload"]["delivery"]
readonly resume?: Endpoint4_9Request["payload"]["resume"]
readonly destination: Endpoint4_9Request["payload"]["destination"]
readonly moveChanges?: Endpoint4_9Request["payload"]["moveChanges"]
}
const Endpoint4_9 = (raw: RawClient["server.session"]) => (input: Endpoint4_9Input) =>
raw["session.move"]({
params: { sessionID: input["sessionID"] },
payload: { destination: input["destination"], moveChanges: input["moveChanges"] },
}).pipe(Effect.mapError(mapClientError))
type Endpoint4_10Request = Parameters<RawClient["server.session"]["session.prompt"]>[0]
type Endpoint4_10Input = {
readonly sessionID: Endpoint4_10Request["params"]["sessionID"]
readonly id?: Endpoint4_10Request["payload"]["id"]
readonly prompt: Endpoint4_10Request["payload"]["prompt"]
readonly delivery?: Endpoint4_10Request["payload"]["delivery"]
readonly resume?: Endpoint4_10Request["payload"]["resume"]
}
const Endpoint4_10 = (raw: RawClient["server.session"]) => (input: Endpoint4_10Input) =>
raw["session.prompt"]({
params: { sessionID: input["sessionID"] },
payload: { id: input["id"], prompt: input["prompt"], delivery: input["delivery"], resume: input["resume"] },
@@ -158,20 +170,20 @@ const Endpoint4_9 = (raw: RawClient["server.session"]) => (input: Endpoint4_9Inp
Effect.map((value) => value.data),
)
type Endpoint4_10Request = Parameters<RawClient["server.session"]["session.command"]>[0]
type Endpoint4_10Input = {
readonly sessionID: Endpoint4_10Request["params"]["sessionID"]
readonly id?: Endpoint4_10Request["payload"]["id"]
readonly command: Endpoint4_10Request["payload"]["command"]
readonly arguments?: Endpoint4_10Request["payload"]["arguments"]
readonly agent?: Endpoint4_10Request["payload"]["agent"]
readonly model?: Endpoint4_10Request["payload"]["model"]
readonly files?: Endpoint4_10Request["payload"]["files"]
readonly agents?: Endpoint4_10Request["payload"]["agents"]
readonly delivery?: Endpoint4_10Request["payload"]["delivery"]
readonly resume?: Endpoint4_10Request["payload"]["resume"]
type Endpoint4_11Request = Parameters<RawClient["server.session"]["session.command"]>[0]
type Endpoint4_11Input = {
readonly sessionID: Endpoint4_11Request["params"]["sessionID"]
readonly id?: Endpoint4_11Request["payload"]["id"]
readonly command: Endpoint4_11Request["payload"]["command"]
readonly arguments?: Endpoint4_11Request["payload"]["arguments"]
readonly agent?: Endpoint4_11Request["payload"]["agent"]
readonly model?: Endpoint4_11Request["payload"]["model"]
readonly files?: Endpoint4_11Request["payload"]["files"]
readonly agents?: Endpoint4_11Request["payload"]["agents"]
readonly delivery?: Endpoint4_11Request["payload"]["delivery"]
readonly resume?: Endpoint4_11Request["payload"]["resume"]
}
const Endpoint4_10 = (raw: RawClient["server.session"]) => (input: Endpoint4_10Input) =>
const Endpoint4_11 = (raw: RawClient["server.session"]) => (input: Endpoint4_11Input) =>
raw["session.command"]({
params: { sessionID: input["sessionID"] },
payload: {
@@ -190,67 +202,73 @@ const Endpoint4_10 = (raw: RawClient["server.session"]) => (input: Endpoint4_10I
Effect.map((value) => value.data),
)
type Endpoint4_11Request = Parameters<RawClient["server.session"]["session.skill"]>[0]
type Endpoint4_11Input = {
readonly sessionID: Endpoint4_11Request["params"]["sessionID"]
readonly id?: Endpoint4_11Request["payload"]["id"]
readonly skill: Endpoint4_11Request["payload"]["skill"]
readonly resume?: Endpoint4_11Request["payload"]["resume"]
type Endpoint4_12Request = Parameters<RawClient["server.session"]["session.skill"]>[0]
type Endpoint4_12Input = {
readonly sessionID: Endpoint4_12Request["params"]["sessionID"]
readonly id?: Endpoint4_12Request["payload"]["id"]
readonly skill: Endpoint4_12Request["payload"]["skill"]
readonly resume?: Endpoint4_12Request["payload"]["resume"]
}
const Endpoint4_11 = (raw: RawClient["server.session"]) => (input: Endpoint4_11Input) =>
const Endpoint4_12 = (raw: RawClient["server.session"]) => (input: Endpoint4_12Input) =>
raw["session.skill"]({
params: { sessionID: input["sessionID"] },
payload: { id: input["id"], skill: input["skill"], resume: input["resume"] },
}).pipe(Effect.mapError(mapClientError))
type Endpoint4_12Request = Parameters<RawClient["server.session"]["session.synthetic"]>[0]
type Endpoint4_12Input = {
readonly sessionID: Endpoint4_12Request["params"]["sessionID"]
readonly text: Endpoint4_12Request["payload"]["text"]
readonly description?: Endpoint4_12Request["payload"]["description"]
readonly metadata?: Endpoint4_12Request["payload"]["metadata"]
}
const Endpoint4_12 = (raw: RawClient["server.session"]) => (input: Endpoint4_12Input) =>
raw["session.synthetic"]({
params: { sessionID: input["sessionID"] },
payload: { text: input["text"], description: input["description"], metadata: input["metadata"] },
}).pipe(Effect.mapError(mapClientError))
type Endpoint4_13Request = Parameters<RawClient["server.session"]["session.shell"]>[0]
type Endpoint4_13Request = Parameters<RawClient["server.session"]["session.synthetic"]>[0]
type Endpoint4_13Input = {
readonly sessionID: Endpoint4_13Request["params"]["sessionID"]
readonly id?: Endpoint4_13Request["payload"]["id"]
readonly command: Endpoint4_13Request["payload"]["command"]
readonly text: Endpoint4_13Request["payload"]["text"]
readonly description?: Endpoint4_13Request["payload"]["description"]
readonly metadata?: Endpoint4_13Request["payload"]["metadata"]
readonly resume?: Endpoint4_13Request["payload"]["resume"]
}
const Endpoint4_13 = (raw: RawClient["server.session"]) => (input: Endpoint4_13Input) =>
raw["session.synthetic"]({
params: { sessionID: input["sessionID"] },
payload: {
text: input["text"],
description: input["description"],
metadata: input["metadata"],
resume: input["resume"],
},
}).pipe(Effect.mapError(mapClientError))
type Endpoint4_14Request = Parameters<RawClient["server.session"]["session.shell"]>[0]
type Endpoint4_14Input = {
readonly sessionID: Endpoint4_14Request["params"]["sessionID"]
readonly id?: Endpoint4_14Request["payload"]["id"]
readonly command: Endpoint4_14Request["payload"]["command"]
}
const Endpoint4_14 = (raw: RawClient["server.session"]) => (input: Endpoint4_14Input) =>
raw["session.shell"]({
params: { sessionID: input["sessionID"] },
payload: { id: input["id"], command: input["command"] },
}).pipe(Effect.mapError(mapClientError))
type Endpoint4_14Request = Parameters<RawClient["server.session"]["session.compact"]>[0]
type Endpoint4_14Input = {
readonly sessionID: Endpoint4_14Request["params"]["sessionID"]
readonly id?: Endpoint4_14Request["payload"]["id"]
type Endpoint4_15Request = Parameters<RawClient["server.session"]["session.compact"]>[0]
type Endpoint4_15Input = {
readonly sessionID: Endpoint4_15Request["params"]["sessionID"]
readonly id?: Endpoint4_15Request["payload"]["id"]
}
const Endpoint4_14 = (raw: RawClient["server.session"]) => (input: Endpoint4_14Input) =>
const Endpoint4_15 = (raw: RawClient["server.session"]) => (input: Endpoint4_15Input) =>
raw["session.compact"]({ params: { sessionID: input["sessionID"] }, payload: { id: input["id"] } }).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
type Endpoint4_15Request = Parameters<RawClient["server.session"]["session.wait"]>[0]
type Endpoint4_15Input = { readonly sessionID: Endpoint4_15Request["params"]["sessionID"] }
const Endpoint4_15 = (raw: RawClient["server.session"]) => (input: Endpoint4_15Input) =>
type Endpoint4_16Request = Parameters<RawClient["server.session"]["session.wait"]>[0]
type Endpoint4_16Input = { readonly sessionID: Endpoint4_16Request["params"]["sessionID"] }
const Endpoint4_16 = (raw: RawClient["server.session"]) => (input: Endpoint4_16Input) =>
raw["session.wait"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
type Endpoint4_16Request = Parameters<RawClient["server.session"]["session.revert.stage"]>[0]
type Endpoint4_16Input = {
readonly sessionID: Endpoint4_16Request["params"]["sessionID"]
readonly messageID: Endpoint4_16Request["payload"]["messageID"]
readonly files?: Endpoint4_16Request["payload"]["files"]
type Endpoint4_17Request = Parameters<RawClient["server.session"]["session.revert.stage"]>[0]
type Endpoint4_17Input = {
readonly sessionID: Endpoint4_17Request["params"]["sessionID"]
readonly messageID: Endpoint4_17Request["payload"]["messageID"]
readonly files?: Endpoint4_17Request["payload"]["files"]
}
const Endpoint4_16 = (raw: RawClient["server.session"]) => (input: Endpoint4_16Input) =>
const Endpoint4_17 = (raw: RawClient["server.session"]) => (input: Endpoint4_17Input) =>
raw["session.revert.stage"]({
params: { sessionID: input["sessionID"] },
payload: { messageID: input["messageID"], files: input["files"] },
@@ -259,61 +277,61 @@ const Endpoint4_16 = (raw: RawClient["server.session"]) => (input: Endpoint4_16I
Effect.map((value) => value.data),
)
type Endpoint4_17Request = Parameters<RawClient["server.session"]["session.revert.clear"]>[0]
type Endpoint4_17Input = { readonly sessionID: Endpoint4_17Request["params"]["sessionID"] }
const Endpoint4_17 = (raw: RawClient["server.session"]) => (input: Endpoint4_17Input) =>
raw["session.revert.clear"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
type Endpoint4_18Request = Parameters<RawClient["server.session"]["session.revert.commit"]>[0]
type Endpoint4_18Request = Parameters<RawClient["server.session"]["session.revert.clear"]>[0]
type Endpoint4_18Input = { readonly sessionID: Endpoint4_18Request["params"]["sessionID"] }
const Endpoint4_18 = (raw: RawClient["server.session"]) => (input: Endpoint4_18Input) =>
raw["session.revert.commit"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
raw["session.revert.clear"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
type Endpoint4_19Request = Parameters<RawClient["server.session"]["session.context"]>[0]
type Endpoint4_19Request = Parameters<RawClient["server.session"]["session.revert.commit"]>[0]
type Endpoint4_19Input = { readonly sessionID: Endpoint4_19Request["params"]["sessionID"] }
const Endpoint4_19 = (raw: RawClient["server.session"]) => (input: Endpoint4_19Input) =>
raw["session.revert.commit"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
type Endpoint4_20Request = Parameters<RawClient["server.session"]["session.context"]>[0]
type Endpoint4_20Input = { readonly sessionID: Endpoint4_20Request["params"]["sessionID"] }
const Endpoint4_20 = (raw: RawClient["server.session"]) => (input: Endpoint4_20Input) =>
raw["session.context"]({ params: { sessionID: input["sessionID"] } }).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
type Endpoint4_20Request = Parameters<RawClient["server.session"]["session.instructions.entry.list"]>[0]
type Endpoint4_20Input = { readonly sessionID: Endpoint4_20Request["params"]["sessionID"] }
const Endpoint4_20 = (raw: RawClient["server.session"]) => (input: Endpoint4_20Input) =>
type Endpoint4_21Request = Parameters<RawClient["server.session"]["session.instructions.entry.list"]>[0]
type Endpoint4_21Input = { readonly sessionID: Endpoint4_21Request["params"]["sessionID"] }
const Endpoint4_21 = (raw: RawClient["server.session"]) => (input: Endpoint4_21Input) =>
raw["session.instructions.entry.list"]({ params: { sessionID: input["sessionID"] } }).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
type Endpoint4_21Request = Parameters<RawClient["server.session"]["session.instructions.entry.put"]>[0]
type Endpoint4_21Input = {
readonly sessionID: Endpoint4_21Request["params"]["sessionID"]
readonly key: Endpoint4_21Request["params"]["key"]
readonly value: Endpoint4_21Request["payload"]["value"]
type Endpoint4_22Request = Parameters<RawClient["server.session"]["session.instructions.entry.put"]>[0]
type Endpoint4_22Input = {
readonly sessionID: Endpoint4_22Request["params"]["sessionID"]
readonly key: Endpoint4_22Request["params"]["key"]
readonly value: Endpoint4_22Request["payload"]["value"]
}
const Endpoint4_21 = (raw: RawClient["server.session"]) => (input: Endpoint4_21Input) =>
const Endpoint4_22 = (raw: RawClient["server.session"]) => (input: Endpoint4_22Input) =>
raw["session.instructions.entry.put"]({
params: { sessionID: input["sessionID"], key: input["key"] },
payload: { value: input["value"] },
}).pipe(Effect.mapError(mapClientError))
type Endpoint4_22Request = Parameters<RawClient["server.session"]["session.instructions.entry.remove"]>[0]
type Endpoint4_22Input = {
readonly sessionID: Endpoint4_22Request["params"]["sessionID"]
readonly key: Endpoint4_22Request["params"]["key"]
type Endpoint4_23Request = Parameters<RawClient["server.session"]["session.instructions.entry.remove"]>[0]
type Endpoint4_23Input = {
readonly sessionID: Endpoint4_23Request["params"]["sessionID"]
readonly key: Endpoint4_23Request["params"]["key"]
}
const Endpoint4_22 = (raw: RawClient["server.session"]) => (input: Endpoint4_22Input) =>
const Endpoint4_23 = (raw: RawClient["server.session"]) => (input: Endpoint4_23Input) =>
raw["session.instructions.entry.remove"]({ params: { sessionID: input["sessionID"], key: input["key"] } }).pipe(
Effect.mapError(mapClientError),
)
type Endpoint4_23Request = Parameters<RawClient["server.session"]["session.log"]>[0]
type Endpoint4_23Input = {
readonly sessionID: Endpoint4_23Request["params"]["sessionID"]
readonly after?: Endpoint4_23Request["query"]["after"]
readonly follow?: Endpoint4_23Request["query"]["follow"]
type Endpoint4_24Request = Parameters<RawClient["server.session"]["session.log"]>[0]
type Endpoint4_24Input = {
readonly sessionID: Endpoint4_24Request["params"]["sessionID"]
readonly after?: Endpoint4_24Request["query"]["after"]
readonly follow?: Endpoint4_24Request["query"]["follow"]
}
const Endpoint4_23 = (raw: RawClient["server.session"]) => (input: Endpoint4_23Input) =>
const Endpoint4_24 = (raw: RawClient["server.session"]) => (input: Endpoint4_24Input) =>
Stream.unwrap(
raw["session.log"]({
params: { sessionID: input["sessionID"] },
@@ -324,22 +342,22 @@ const Endpoint4_23 = (raw: RawClient["server.session"]) => (input: Endpoint4_23I
),
)
type Endpoint4_24Request = Parameters<RawClient["server.session"]["session.interrupt"]>[0]
type Endpoint4_24Input = { readonly sessionID: Endpoint4_24Request["params"]["sessionID"] }
const Endpoint4_24 = (raw: RawClient["server.session"]) => (input: Endpoint4_24Input) =>
raw["session.interrupt"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
type Endpoint4_25Request = Parameters<RawClient["server.session"]["session.background"]>[0]
type Endpoint4_25Request = Parameters<RawClient["server.session"]["session.interrupt"]>[0]
type Endpoint4_25Input = { readonly sessionID: Endpoint4_25Request["params"]["sessionID"] }
const Endpoint4_25 = (raw: RawClient["server.session"]) => (input: Endpoint4_25Input) =>
raw["session.interrupt"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
type Endpoint4_26Request = Parameters<RawClient["server.session"]["session.background"]>[0]
type Endpoint4_26Input = { readonly sessionID: Endpoint4_26Request["params"]["sessionID"] }
const Endpoint4_26 = (raw: RawClient["server.session"]) => (input: Endpoint4_26Input) =>
raw["session.background"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
type Endpoint4_26Request = Parameters<RawClient["server.session"]["session.message"]>[0]
type Endpoint4_26Input = {
readonly sessionID: Endpoint4_26Request["params"]["sessionID"]
readonly messageID: Endpoint4_26Request["params"]["messageID"]
type Endpoint4_27Request = Parameters<RawClient["server.session"]["session.message"]>[0]
type Endpoint4_27Input = {
readonly sessionID: Endpoint4_27Request["params"]["sessionID"]
readonly messageID: Endpoint4_27Request["params"]["messageID"]
}
const Endpoint4_26 = (raw: RawClient["server.session"]) => (input: Endpoint4_26Input) =>
const Endpoint4_27 = (raw: RawClient["server.session"]) => (input: Endpoint4_27Input) =>
raw["session.message"]({ params: { sessionID: input["sessionID"], messageID: input["messageID"] } }).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
@@ -355,22 +373,21 @@ const adaptGroup4 = (raw: RawClient["server.session"]) => ({
switchAgent: Endpoint4_6(raw),
switchModel: Endpoint4_7(raw),
rename: Endpoint4_8(raw),
prompt: Endpoint4_9(raw),
command: Endpoint4_10(raw),
skill: Endpoint4_11(raw),
synthetic: Endpoint4_12(raw),
shell: Endpoint4_13(raw),
compact: Endpoint4_14(raw),
wait: Endpoint4_15(raw),
revertStage: Endpoint4_16(raw),
revertClear: Endpoint4_17(raw),
revertCommit: Endpoint4_18(raw),
context: Endpoint4_19(raw),
instructions: { entry: { list: Endpoint4_20(raw), put: Endpoint4_21(raw), remove: Endpoint4_22(raw) } },
log: Endpoint4_23(raw),
interrupt: Endpoint4_24(raw),
background: Endpoint4_25(raw),
message: Endpoint4_26(raw),
move: Endpoint4_9(raw),
prompt: Endpoint4_10(raw),
command: Endpoint4_11(raw),
skill: Endpoint4_12(raw),
synthetic: Endpoint4_13(raw),
shell: Endpoint4_14(raw),
compact: Endpoint4_15(raw),
wait: Endpoint4_16(raw),
revert: { stage: Endpoint4_17(raw), clear: Endpoint4_18(raw), commit: Endpoint4_19(raw) },
context: Endpoint4_20(raw),
instructions: { entry: { list: Endpoint4_21(raw), put: Endpoint4_22(raw), remove: Endpoint4_23(raw) } },
log: Endpoint4_24(raw),
interrupt: Endpoint4_25(raw),
background: Endpoint4_26(raw),
message: Endpoint4_27(raw),
})
type Endpoint5_0Request = Parameters<RawClient["server.message"]["session.messages"]>[0]
@@ -517,11 +534,8 @@ const Endpoint9_6 = (raw: RawClient["server.integration"]) => (input: Endpoint9_
const adaptGroup9 = (raw: RawClient["server.integration"]) => ({
list: Endpoint9_0(raw),
get: Endpoint9_1(raw),
connectKey: Endpoint9_2(raw),
connectOauth: Endpoint9_3(raw),
attemptStatus: Endpoint9_4(raw),
attemptComplete: Endpoint9_5(raw),
attemptCancel: Endpoint9_6(raw),
connect: { key: Endpoint9_2(raw), oauth: Endpoint9_3(raw) },
attempt: { status: Endpoint9_4(raw), complete: Endpoint9_5(raw), cancel: Endpoint9_6(raw) },
})
type Endpoint10_0Request = Parameters<RawClient["server.mcp"]["mcp.list"]>[0]
@@ -529,7 +543,15 @@ type Endpoint10_0Input = { readonly location?: Endpoint10_0Request["query"]["loc
const Endpoint10_0 = (raw: RawClient["server.mcp"]) => (input?: Endpoint10_0Input) =>
raw["mcp.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
const adaptGroup10 = (raw: RawClient["server.mcp"]) => ({ list: Endpoint10_0(raw) })
type Endpoint10_1Request = Parameters<RawClient["server.mcp"]["mcp.resource.catalog"]>[0]
type Endpoint10_1Input = { readonly location?: Endpoint10_1Request["query"]["location"] }
const Endpoint10_1 = (raw: RawClient["server.mcp"]) => (input?: Endpoint10_1Input) =>
raw["mcp.resource.catalog"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
const adaptGroup10 = (raw: RawClient["server.mcp"]) => ({
list: Endpoint10_0(raw),
resource: { catalog: Endpoint10_1(raw) },
})
type Endpoint11_0Request = Parameters<RawClient["server.credential"]["credential.update"]>[0]
type Endpoint11_0Input = {
@@ -666,7 +688,7 @@ const Endpoint13_6 = (raw: RawClient["server.form"]) => (input: Endpoint13_6Inpu
)
const adaptGroup13 = (raw: RawClient["server.form"]) => ({
listRequests: Endpoint13_0(raw),
request: { list: Endpoint13_0(raw) },
list: Endpoint13_1(raw),
create: Endpoint13_2(raw),
get: Endpoint13_3(raw),
@@ -754,9 +776,8 @@ const Endpoint14_6 = (raw: RawClient["server.permission"]) => (input: Endpoint14
}).pipe(Effect.mapError(mapClientError))
const adaptGroup14 = (raw: RawClient["server.permission"]) => ({
listRequests: Endpoint14_0(raw),
listSaved: Endpoint14_1(raw),
removeSaved: Endpoint14_2(raw),
request: { list: Endpoint14_0(raw) },
saved: { list: Endpoint14_1(raw), remove: Endpoint14_2(raw) },
create: Endpoint14_3(raw),
list: Endpoint14_4(raw),
get: Endpoint14_5(raw),
@@ -989,7 +1010,7 @@ const Endpoint21_3 = (raw: RawClient["server.question"]) => (input: Endpoint21_3
)
const adaptGroup21 = (raw: RawClient["server.question"]) => ({
listRequests: Endpoint21_0(raw),
request: { list: Endpoint21_0(raw) },
list: Endpoint21_1(raw),
reply: Endpoint21_2(raw),
reject: Endpoint21_3(raw),
@@ -1069,7 +1090,14 @@ const adaptGroup24 = (raw: RawClient["server.vcs"]) => ({ status: Endpoint24_0(r
const Endpoint25_0 = (raw: RawClient["server.debug"]) => () =>
raw["debug.location"]({}).pipe(Effect.mapError(mapClientError))
const adaptGroup25 = (raw: RawClient["server.debug"]) => ({ location: Endpoint25_0(raw) })
type Endpoint25_1Request = Parameters<RawClient["server.debug"]["debug.location.evict"]>[0]
type Endpoint25_1Input = { readonly location?: Endpoint25_1Request["query"]["location"] }
const Endpoint25_1 = (raw: RawClient["server.debug"]) => (input?: Endpoint25_1Input) =>
raw["debug.location.evict"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
const adaptGroup25 = (raw: RawClient["server.debug"]) => ({
location: { list: Endpoint25_0(raw), evict: Endpoint25_1(raw) },
})
const adaptClient = (raw: RawClient) => ({
health: adaptGroup0(raw["server.health"]),
+244 -179
View File
@@ -23,6 +23,8 @@ import type {
SessionSwitchModelOutput,
SessionRenameInput,
SessionRenameOutput,
SessionMoveInput,
SessionMoveOutput,
SessionPromptInput,
SessionPromptOutput,
SessionCommandInput,
@@ -87,6 +89,8 @@ import type {
IntegrationAttemptCancelOutput,
ServerMcpListInput,
ServerMcpListOutput,
ServerMcpResourceCatalogInput,
ServerMcpResourceCatalogOutput,
CredentialUpdateInput,
CredentialUpdateOutput,
CredentialRemoveInput,
@@ -96,8 +100,8 @@ import type {
ProjectCurrentOutput,
ProjectDirectoriesInput,
ProjectDirectoriesOutput,
FormListRequestsInput,
FormListRequestsOutput,
FormRequestListInput,
FormRequestListOutput,
FormListInput,
FormListOutput,
FormCreateInput,
@@ -110,12 +114,12 @@ import type {
FormReplyOutput,
FormCancelInput,
FormCancelOutput,
PermissionListRequestsInput,
PermissionListRequestsOutput,
PermissionListSavedInput,
PermissionListSavedOutput,
PermissionRemoveSavedInput,
PermissionRemoveSavedOutput,
PermissionRequestListInput,
PermissionRequestListOutput,
PermissionSavedListInput,
PermissionSavedListOutput,
PermissionSavedRemoveInput,
PermissionSavedRemoveOutput,
PermissionCreateInput,
PermissionCreateOutput,
PermissionListInput,
@@ -157,8 +161,8 @@ import type {
ShellOutputOutput,
ShellRemoveInput,
ShellRemoveOutput,
QuestionListRequestsInput,
QuestionListRequestsOutput,
QuestionRequestListInput,
QuestionRequestListOutput,
QuestionListInput,
QuestionListOutput,
QuestionReplyInput,
@@ -177,7 +181,9 @@ import type {
VcsStatusOutput,
VcsDiffInput,
VcsDiffOutput,
DebugLocationOutput,
DebugLocationListOutput,
DebugLocationEvictInput,
DebugLocationEvictOutput,
} from "./types"
import { ClientError } from "./client-error"
@@ -485,6 +491,18 @@ export function make(options: ClientOptions) {
},
requestOptions,
),
move: (input: SessionMoveInput, requestOptions?: RequestOptions) =>
request<SessionMoveOutput>(
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/move`,
body: { destination: input["destination"], moveChanges: input["moveChanges"] },
successStatus: 204,
declaredStatuses: [404, 400, 401],
empty: true,
},
requestOptions,
),
prompt: (input: SessionPromptInput, requestOptions?: RequestOptions) =>
request<{ readonly data: SessionPromptOutput }>(
{
@@ -536,7 +554,12 @@ export function make(options: ClientOptions) {
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/synthetic`,
body: { text: input["text"], description: input["description"], metadata: input["metadata"] },
body: {
text: input["text"],
description: input["description"],
metadata: input["metadata"],
resume: input["resume"],
},
successStatus: 204,
declaredStatuses: [404, 400, 401],
empty: true,
@@ -578,40 +601,42 @@ export function make(options: ClientOptions) {
},
requestOptions,
),
revertStage: (input: SessionRevertStageInput, requestOptions?: RequestOptions) =>
request<{ readonly data: SessionRevertStageOutput }>(
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/stage`,
body: { messageID: input["messageID"], files: input["files"] },
successStatus: 200,
declaredStatuses: [404, 409, 500, 400, 401],
empty: false,
},
requestOptions,
).then((value) => value.data),
revertClear: (input: SessionRevertClearInput, requestOptions?: RequestOptions) =>
request<SessionRevertClearOutput>(
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/clear`,
successStatus: 204,
declaredStatuses: [404, 409, 500, 400, 401],
empty: true,
},
requestOptions,
),
revertCommit: (input: SessionRevertCommitInput, requestOptions?: RequestOptions) =>
request<SessionRevertCommitOutput>(
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/commit`,
successStatus: 204,
declaredStatuses: [404, 409, 400, 401],
empty: true,
},
requestOptions,
),
revert: {
stage: (input: SessionRevertStageInput, requestOptions?: RequestOptions) =>
request<{ readonly data: SessionRevertStageOutput }>(
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/stage`,
body: { messageID: input["messageID"], files: input["files"] },
successStatus: 200,
declaredStatuses: [404, 409, 500, 400, 401],
empty: false,
},
requestOptions,
).then((value) => value.data),
clear: (input: SessionRevertClearInput, requestOptions?: RequestOptions) =>
request<SessionRevertClearOutput>(
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/clear`,
successStatus: 204,
declaredStatuses: [404, 409, 500, 400, 401],
empty: true,
},
requestOptions,
),
commit: (input: SessionRevertCommitInput, requestOptions?: RequestOptions) =>
request<SessionRevertCommitOutput>(
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/commit`,
successStatus: 204,
declaredStatuses: [404, 409, 400, 401],
empty: true,
},
requestOptions,
),
},
context: (input: SessionContextInput, requestOptions?: RequestOptions) =>
request<{ readonly data: SessionContextOutput }>(
{
@@ -813,69 +838,73 @@ export function make(options: ClientOptions) {
},
requestOptions,
),
connectKey: (input: IntegrationConnectKeyInput, requestOptions?: RequestOptions) =>
request<IntegrationConnectKeyOutput>(
{
method: "POST",
path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/key`,
query: { location: input["location"] },
body: { key: input["key"], label: input["label"] },
successStatus: 204,
declaredStatuses: [400, 401],
empty: true,
},
requestOptions,
),
connectOauth: (input: IntegrationConnectOauthInput, requestOptions?: RequestOptions) =>
request<IntegrationConnectOauthOutput>(
{
method: "POST",
path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/oauth`,
query: { location: input["location"] },
body: { methodID: input["methodID"], inputs: input["inputs"], label: input["label"] },
successStatus: 200,
declaredStatuses: [400, 401],
empty: false,
},
requestOptions,
),
attemptStatus: (input: IntegrationAttemptStatusInput, requestOptions?: RequestOptions) =>
request<IntegrationAttemptStatusOutput>(
{
method: "GET",
path: `/api/integration/attempt/${encodeURIComponent(input.attemptID)}`,
query: { location: input["location"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
attemptComplete: (input: IntegrationAttemptCompleteInput, requestOptions?: RequestOptions) =>
request<IntegrationAttemptCompleteOutput>(
{
method: "POST",
path: `/api/integration/attempt/${encodeURIComponent(input.attemptID)}/complete`,
query: { location: input["location"] },
body: { code: input["code"] },
successStatus: 204,
declaredStatuses: [400, 401],
empty: true,
},
requestOptions,
),
attemptCancel: (input: IntegrationAttemptCancelInput, requestOptions?: RequestOptions) =>
request<IntegrationAttemptCancelOutput>(
{
method: "DELETE",
path: `/api/integration/attempt/${encodeURIComponent(input.attemptID)}`,
query: { location: input["location"] },
successStatus: 204,
declaredStatuses: [401, 400],
empty: true,
},
requestOptions,
),
connect: {
key: (input: IntegrationConnectKeyInput, requestOptions?: RequestOptions) =>
request<IntegrationConnectKeyOutput>(
{
method: "POST",
path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/key`,
query: { location: input["location"] },
body: { key: input["key"], label: input["label"] },
successStatus: 204,
declaredStatuses: [400, 401],
empty: true,
},
requestOptions,
),
oauth: (input: IntegrationConnectOauthInput, requestOptions?: RequestOptions) =>
request<IntegrationConnectOauthOutput>(
{
method: "POST",
path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/oauth`,
query: { location: input["location"] },
body: { methodID: input["methodID"], inputs: input["inputs"], label: input["label"] },
successStatus: 200,
declaredStatuses: [400, 401],
empty: false,
},
requestOptions,
),
},
attempt: {
status: (input: IntegrationAttemptStatusInput, requestOptions?: RequestOptions) =>
request<IntegrationAttemptStatusOutput>(
{
method: "GET",
path: `/api/integration/attempt/${encodeURIComponent(input.attemptID)}`,
query: { location: input["location"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
complete: (input: IntegrationAttemptCompleteInput, requestOptions?: RequestOptions) =>
request<IntegrationAttemptCompleteOutput>(
{
method: "POST",
path: `/api/integration/attempt/${encodeURIComponent(input.attemptID)}/complete`,
query: { location: input["location"] },
body: { code: input["code"] },
successStatus: 204,
declaredStatuses: [400, 401],
empty: true,
},
requestOptions,
),
cancel: (input: IntegrationAttemptCancelInput, requestOptions?: RequestOptions) =>
request<IntegrationAttemptCancelOutput>(
{
method: "DELETE",
path: `/api/integration/attempt/${encodeURIComponent(input.attemptID)}`,
query: { location: input["location"] },
successStatus: 204,
declaredStatuses: [401, 400],
empty: true,
},
requestOptions,
),
},
},
"server.mcp": {
list: (input?: ServerMcpListInput, requestOptions?: RequestOptions) =>
@@ -890,6 +919,20 @@ export function make(options: ClientOptions) {
},
requestOptions,
),
resource: {
catalog: (input?: ServerMcpResourceCatalogInput, requestOptions?: RequestOptions) =>
request<ServerMcpResourceCatalogOutput>(
{
method: "GET",
path: `/api/mcp/resource`,
query: { location: input?.["location"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
},
},
credential: {
update: (input: CredentialUpdateInput, requestOptions?: RequestOptions) =>
@@ -950,18 +993,20 @@ export function make(options: ClientOptions) {
),
},
form: {
listRequests: (input?: FormListRequestsInput, requestOptions?: RequestOptions) =>
request<FormListRequestsOutput>(
{
method: "GET",
path: `/api/form/request`,
query: { location: input?.["location"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
request: {
list: (input?: FormRequestListInput, requestOptions?: RequestOptions) =>
request<FormRequestListOutput>(
{
method: "GET",
path: `/api/form/request`,
query: { location: input?.["location"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
},
list: (input: FormListInput, requestOptions?: RequestOptions) =>
request<{ readonly data: FormListOutput }>(
{
@@ -1039,41 +1084,45 @@ export function make(options: ClientOptions) {
),
},
permission: {
listRequests: (input?: PermissionListRequestsInput, requestOptions?: RequestOptions) =>
request<PermissionListRequestsOutput>(
{
method: "GET",
path: `/api/permission/request`,
query: { location: input?.["location"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
listSaved: (input?: PermissionListSavedInput, requestOptions?: RequestOptions) =>
request<{ readonly data: PermissionListSavedOutput }>(
{
method: "GET",
path: `/api/permission/saved`,
query: { projectID: input?.["projectID"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
).then((value) => value.data),
removeSaved: (input: PermissionRemoveSavedInput, requestOptions?: RequestOptions) =>
request<PermissionRemoveSavedOutput>(
{
method: "DELETE",
path: `/api/permission/saved/${encodeURIComponent(input.id)}`,
successStatus: 204,
declaredStatuses: [401, 400],
empty: true,
},
requestOptions,
),
request: {
list: (input?: PermissionRequestListInput, requestOptions?: RequestOptions) =>
request<PermissionRequestListOutput>(
{
method: "GET",
path: `/api/permission/request`,
query: { location: input?.["location"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
},
saved: {
list: (input?: PermissionSavedListInput, requestOptions?: RequestOptions) =>
request<{ readonly data: PermissionSavedListOutput }>(
{
method: "GET",
path: `/api/permission/saved`,
query: { projectID: input?.["projectID"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
).then((value) => value.data),
remove: (input: PermissionSavedRemoveInput, requestOptions?: RequestOptions) =>
request<PermissionSavedRemoveOutput>(
{
method: "DELETE",
path: `/api/permission/saved/${encodeURIComponent(input.id)}`,
successStatus: 204,
declaredStatuses: [401, 400],
empty: true,
},
requestOptions,
),
},
create: (input: PermissionCreateInput, requestOptions?: RequestOptions) =>
request<{ readonly data: PermissionCreateOutput }>(
{
@@ -1355,18 +1404,20 @@ export function make(options: ClientOptions) {
),
},
question: {
listRequests: (input?: QuestionListRequestsInput, requestOptions?: RequestOptions) =>
request<QuestionListRequestsOutput>(
{
method: "GET",
path: `/api/question/request`,
query: { location: input?.["location"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
request: {
list: (input?: QuestionRequestListInput, requestOptions?: RequestOptions) =>
request<QuestionRequestListOutput>(
{
method: "GET",
path: `/api/question/request`,
query: { location: input?.["location"] },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
},
list: (input: QuestionListInput, requestOptions?: RequestOptions) =>
request<{ readonly data: QuestionListOutput }>(
{
@@ -1483,17 +1534,31 @@ export function make(options: ClientOptions) {
),
},
debug: {
location: (requestOptions?: RequestOptions) =>
request<DebugLocationOutput>(
{
method: "GET",
path: `/api/debug/location`,
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
location: {
list: (requestOptions?: RequestOptions) =>
request<DebugLocationListOutput>(
{
method: "GET",
path: `/api/debug/location`,
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
},
requestOptions,
),
evict: (input?: DebugLocationEvictInput, requestOptions?: RequestOptions) =>
request<DebugLocationEvictOutput>(
{
method: "DELETE",
path: `/api/debug/location`,
query: { location: input?.["location"] },
successStatus: 204,
declaredStatuses: [401, 400],
empty: true,
},
requestOptions,
),
},
},
}
}
+365 -259
View File
@@ -185,6 +185,7 @@ export type AgentListOutput = {
}
readonly data: ReadonlyArray<{
readonly id: string
readonly name: string
readonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string }
readonly request: {
readonly settings: { readonly [x: string]: JsonValue }
@@ -345,13 +346,12 @@ export type SessionListOutput = {
readonly messageID: string
readonly partID?: string
readonly snapshot?: string
readonly diff?: string
readonly files?: ReadonlyArray<{
readonly path: string
readonly status: "added" | "modified" | "deleted"
readonly file: string
readonly patch: string
readonly additions: number
readonly deletions: number
readonly patch: string
readonly status: "added" | "deleted" | "modified"
}>
}
}>
@@ -408,13 +408,12 @@ export type SessionCreateOutput = {
readonly messageID: string
readonly partID?: string
readonly snapshot?: string
readonly diff?: string
readonly files?: ReadonlyArray<{
readonly path: string
readonly status: "added" | "modified" | "deleted"
readonly file: string
readonly patch: string
readonly additions: number
readonly deletions: number
readonly patch: string
readonly status: "added" | "deleted" | "modified"
}>
}
}
@@ -447,13 +446,12 @@ export type SessionGetOutput = {
readonly messageID: string
readonly partID?: string
readonly snapshot?: string
readonly diff?: string
readonly files?: ReadonlyArray<{
readonly path: string
readonly status: "added" | "modified" | "deleted"
readonly file: string
readonly patch: string
readonly additions: number
readonly deletions: number
readonly patch: string
readonly status: "added" | "deleted" | "modified"
}>
}
}
@@ -491,13 +489,12 @@ export type SessionForkOutput = {
readonly messageID: string
readonly partID?: string
readonly snapshot?: string
readonly diff?: string
readonly files?: ReadonlyArray<{
readonly path: string
readonly status: "added" | "modified" | "deleted"
readonly file: string
readonly patch: string
readonly additions: number
readonly deletions: number
readonly patch: string
readonly status: "added" | "deleted" | "modified"
}>
}
}
@@ -526,6 +523,20 @@ export type SessionRenameInput = {
export type SessionRenameOutput = void
export type SessionMoveInput = {
readonly sessionID: { readonly sessionID: string }["sessionID"]
readonly destination: {
readonly destination: { readonly directory: string }
readonly moveChanges?: boolean | undefined
}["destination"]
readonly moveChanges?: {
readonly destination: { readonly directory: string }
readonly moveChanges?: boolean | undefined
}["moveChanges"]
}
export type SessionMoveOutput = void
export type SessionPromptInput = {
readonly sessionID: { readonly sessionID: string }["sessionID"]
readonly id?: {
@@ -856,17 +867,26 @@ export type SessionSyntheticInput = {
readonly text: string
readonly description?: string | null
readonly metadata?: { readonly [x: string]: JsonValue }
readonly resume?: boolean | null
}["text"]
readonly description?: {
readonly text: string
readonly description?: string | null
readonly metadata?: { readonly [x: string]: JsonValue }
readonly resume?: boolean | null
}["description"]
readonly metadata?: {
readonly text: string
readonly description?: string | null
readonly metadata?: { readonly [x: string]: JsonValue }
readonly resume?: boolean | null
}["metadata"]
readonly resume?: {
readonly text: string
readonly description?: string | null
readonly metadata?: { readonly [x: string]: JsonValue }
readonly resume?: boolean | null
}["resume"]
}
export type SessionSyntheticOutput = void
@@ -910,13 +930,12 @@ export type SessionRevertStageOutput = {
readonly messageID: string
readonly partID?: string
readonly snapshot?: string
readonly diff?: string
readonly files?: ReadonlyArray<{
readonly path: string
readonly status: "added" | "modified" | "deleted"
readonly file: string
readonly patch: string
readonly additions: number
readonly deletions: number
readonly patch: string
readonly status: "added" | "deleted" | "modified"
}>
}
}["data"]
@@ -971,7 +990,6 @@ export type SessionContextOutput = {
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly sessionID: string
readonly text: string
readonly description?: string
readonly type: "synthetic"
@@ -988,6 +1006,7 @@ export type SessionContextOutput = {
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly type: "skill"
readonly skill: string
readonly name: string
readonly text: string
}
@@ -996,21 +1015,10 @@ export type SessionContextOutput = {
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number; readonly completed?: number }
readonly type: "shell"
readonly shell: {
readonly id: string
readonly status: "running" | "exited" | "timeout" | "killed"
readonly command: string
readonly cwd: string
readonly shell: string
readonly file: string
readonly pid?: number
readonly exit?: number | "Infinity" | "-Infinity" | "NaN"
readonly metadata: { readonly [x: string]: JsonValue }
readonly time: {
readonly started: number | "Infinity" | "-Infinity" | "NaN"
readonly completed?: number | "Infinity" | "-Infinity" | "NaN"
}
}
readonly shellID: string
readonly command: string
readonly status: "running" | "exited" | "timeout" | "killed"
readonly exit?: number | "Infinity" | "-Infinity" | "NaN"
readonly output?: {
readonly output: string
readonly cursor: number
@@ -1041,7 +1049,7 @@ export type SessionContextOutput = {
readonly providerState?: { readonly [x: string]: JsonValue }
readonly providerResultState?: { readonly [x: string]: JsonValue }
readonly state:
| { readonly status: "pending"; readonly input: string }
| { readonly status: "streaming"; readonly input: string }
| {
readonly status: "running"
readonly input: { readonly [x: string]: JsonValue }
@@ -1054,19 +1062,10 @@ export type SessionContextOutput = {
| {
readonly status: "completed"
readonly input: { readonly [x: string]: JsonValue }
readonly attachments?: ReadonlyArray<{
readonly data: string
readonly mime: string
readonly source: { readonly type: "inline" } | { readonly type: "uri"; readonly uri: string }
readonly name?: string
readonly description?: string
readonly mention?: { readonly start: number; readonly end: number; readonly text: string }
}>
readonly content: ReadonlyArray<
| { readonly type: "text"; readonly text: string }
| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
>
readonly outputPaths?: ReadonlyArray<string>
readonly structured: { readonly [x: string]: JsonValue }
readonly result?: JsonValue
}
@@ -1081,12 +1080,7 @@ export type SessionContextOutput = {
readonly error: { readonly type: string; readonly message: string }
readonly result?: JsonValue
}
readonly time: {
readonly created: number
readonly ran?: number
readonly completed?: number
readonly pruned?: number
}
readonly time: { readonly created: number; readonly ran?: number; readonly completed?: number }
}
>
readonly snapshot?: { readonly start?: string; readonly end?: string; readonly files?: ReadonlyArray<string> }
@@ -1105,16 +1099,37 @@ export type SessionContextOutput = {
readonly error: { readonly type: string; readonly message: string }
}
}
| {
readonly type: "compaction"
readonly status: "queued" | "running" | "completed" | "failed"
readonly reason: "auto" | "manual"
readonly summary: string
readonly recent: string
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
}
| (
| {
readonly type: "compaction"
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly status: "running"
readonly reason: "auto" | "manual"
readonly summary: string
readonly recent: string
}
| {
readonly type: "compaction"
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly status: "completed"
readonly reason: "auto" | "manual"
readonly summary: string
readonly recent: string
}
| {
readonly type: "compaction"
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly status: "failed"
readonly reason: "auto" | "manual"
readonly error: { readonly type: string; readonly message: string }
}
)
>
}["data"]
@@ -1152,7 +1167,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.agent.selected"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly agent: string }
}
@@ -1161,7 +1176,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.model.selected"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1173,7 +1188,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.moved"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1186,7 +1201,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.renamed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly title: string }
}
@@ -1195,7 +1210,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.deleted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 2 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
}
@@ -1204,7 +1219,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.forked"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly parentID: string; readonly from?: string }
}
@@ -1213,7 +1228,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.prompt.promoted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly inputID: string }
}
@@ -1222,7 +1237,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.prompt.admitted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1250,7 +1265,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.execution.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
}
@@ -1259,7 +1274,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.execution.succeeded"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
}
@@ -1268,7 +1283,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.execution.failed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1280,7 +1295,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.execution.interrupted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly reason: "user" | "shutdown" | "superseded" }
}
@@ -1289,7 +1304,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.instructions.updated"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly text: string }
}
@@ -1298,7 +1313,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.synthetic"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1312,16 +1327,21 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.skill.activated"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly name: string; readonly text: string }
readonly data: {
readonly sessionID: string
readonly id: string
readonly name: string
readonly text: string
}
}
| {
readonly id: string
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.shell.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1344,7 +1364,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.shell.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1373,7 +1393,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.step.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1388,7 +1408,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.step.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1410,12 +1430,19 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.step.failed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
readonly assistantMessageID: string
readonly error: { readonly type: string; readonly message: string }
readonly cost?: number
readonly tokens?: {
readonly input: number
readonly output: number
readonly reasoning: number
readonly cache: { readonly read: number; readonly write: number }
}
}
}
| {
@@ -1423,7 +1450,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.text.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly assistantMessageID: string; readonly ordinal: number }
}
@@ -1432,7 +1459,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.text.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1446,7 +1473,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.reasoning.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1460,7 +1487,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.reasoning.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1475,7 +1502,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.input.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1489,7 +1516,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.input.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1503,7 +1530,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.called"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1519,7 +1546,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.progress"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1537,7 +1564,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.success"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1548,7 +1575,6 @@ export type SessionLogOutput =
| { readonly type: "text"; readonly text: string }
| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
>
readonly outputPaths?: ReadonlyArray<string>
readonly result?: unknown
readonly executed: boolean
readonly resultState?: { readonly [x: string]: unknown }
@@ -1559,7 +1585,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.failed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1576,7 +1602,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.retry.scheduled"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1591,7 +1617,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.compaction.admitted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly inputID: string }
}
@@ -1600,16 +1626,21 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.compaction.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly reason: "auto" | "manual" }
readonly data: {
readonly sessionID: string
readonly reason: "auto" | "manual"
readonly recent: string
readonly inputID?: string
}
}
| {
readonly id: string
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.compaction.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1623,16 +1654,21 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.compaction.failed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
readonly data: {
readonly sessionID: string
readonly reason: "auto" | "manual"
readonly error: { readonly type: string; readonly message: string }
readonly inputID?: string
}
}
| {
readonly id: string
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.revert.staged"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -1640,13 +1676,12 @@ export type SessionLogOutput =
readonly messageID: string
readonly partID?: string
readonly snapshot?: string
readonly diff?: string
readonly files?: ReadonlyArray<{
readonly path: string
readonly status: "added" | "modified" | "deleted"
readonly file: string
readonly patch: string
readonly additions: number
readonly deletions: number
readonly patch: string
readonly status: "added" | "deleted" | "modified"
}>
}
}
@@ -1656,7 +1691,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.revert.cleared"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
}
@@ -1665,7 +1700,7 @@ export type SessionLogOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.revert.committed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly to: string }
}
@@ -1725,7 +1760,6 @@ export type SessionMessageOutput = {
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly sessionID: string
readonly text: string
readonly description?: string
readonly type: "synthetic"
@@ -1742,6 +1776,7 @@ export type SessionMessageOutput = {
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly type: "skill"
readonly skill: string
readonly name: string
readonly text: string
}
@@ -1750,21 +1785,10 @@ export type SessionMessageOutput = {
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number; readonly completed?: number }
readonly type: "shell"
readonly shell: {
readonly id: string
readonly status: "running" | "exited" | "timeout" | "killed"
readonly command: string
readonly cwd: string
readonly shell: string
readonly file: string
readonly pid?: number
readonly exit?: number | "Infinity" | "-Infinity" | "NaN"
readonly metadata: { readonly [x: string]: JsonValue }
readonly time: {
readonly started: number | "Infinity" | "-Infinity" | "NaN"
readonly completed?: number | "Infinity" | "-Infinity" | "NaN"
}
}
readonly shellID: string
readonly command: string
readonly status: "running" | "exited" | "timeout" | "killed"
readonly exit?: number | "Infinity" | "-Infinity" | "NaN"
readonly output?: {
readonly output: string
readonly cursor: number
@@ -1795,7 +1819,7 @@ export type SessionMessageOutput = {
readonly providerState?: { readonly [x: string]: JsonValue }
readonly providerResultState?: { readonly [x: string]: JsonValue }
readonly state:
| { readonly status: "pending"; readonly input: string }
| { readonly status: "streaming"; readonly input: string }
| {
readonly status: "running"
readonly input: { readonly [x: string]: JsonValue }
@@ -1808,19 +1832,10 @@ export type SessionMessageOutput = {
| {
readonly status: "completed"
readonly input: { readonly [x: string]: JsonValue }
readonly attachments?: ReadonlyArray<{
readonly data: string
readonly mime: string
readonly source: { readonly type: "inline" } | { readonly type: "uri"; readonly uri: string }
readonly name?: string
readonly description?: string
readonly mention?: { readonly start: number; readonly end: number; readonly text: string }
}>
readonly content: ReadonlyArray<
| { readonly type: "text"; readonly text: string }
| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
>
readonly outputPaths?: ReadonlyArray<string>
readonly structured: { readonly [x: string]: JsonValue }
readonly result?: JsonValue
}
@@ -1835,12 +1850,7 @@ export type SessionMessageOutput = {
readonly error: { readonly type: string; readonly message: string }
readonly result?: JsonValue
}
readonly time: {
readonly created: number
readonly ran?: number
readonly completed?: number
readonly pruned?: number
}
readonly time: { readonly created: number; readonly ran?: number; readonly completed?: number }
}
>
readonly snapshot?: { readonly start?: string; readonly end?: string; readonly files?: ReadonlyArray<string> }
@@ -1859,16 +1869,37 @@ export type SessionMessageOutput = {
readonly error: { readonly type: string; readonly message: string }
}
}
| {
readonly type: "compaction"
readonly status: "queued" | "running" | "completed" | "failed"
readonly reason: "auto" | "manual"
readonly summary: string
readonly recent: string
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
}
| (
| {
readonly type: "compaction"
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly status: "running"
readonly reason: "auto" | "manual"
readonly summary: string
readonly recent: string
}
| {
readonly type: "compaction"
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly status: "completed"
readonly reason: "auto" | "manual"
readonly summary: string
readonly recent: string
}
| {
readonly type: "compaction"
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly status: "failed"
readonly reason: "auto" | "manual"
readonly error: { readonly type: string; readonly message: string }
}
)
}["data"]
export type MessageListInput = {
@@ -1930,7 +1961,6 @@ export type MessageListOutput = {
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly sessionID: string
readonly text: string
readonly description?: string
readonly type: "synthetic"
@@ -1947,6 +1977,7 @@ export type MessageListOutput = {
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly type: "skill"
readonly skill: string
readonly name: string
readonly text: string
}
@@ -1955,21 +1986,10 @@ export type MessageListOutput = {
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number; readonly completed?: number }
readonly type: "shell"
readonly shell: {
readonly id: string
readonly status: "running" | "exited" | "timeout" | "killed"
readonly command: string
readonly cwd: string
readonly shell: string
readonly file: string
readonly pid?: number
readonly exit?: number | "Infinity" | "-Infinity" | "NaN"
readonly metadata: { readonly [x: string]: JsonValue }
readonly time: {
readonly started: number | "Infinity" | "-Infinity" | "NaN"
readonly completed?: number | "Infinity" | "-Infinity" | "NaN"
}
}
readonly shellID: string
readonly command: string
readonly status: "running" | "exited" | "timeout" | "killed"
readonly exit?: number | "Infinity" | "-Infinity" | "NaN"
readonly output?: {
readonly output: string
readonly cursor: number
@@ -2000,7 +2020,7 @@ export type MessageListOutput = {
readonly providerState?: { readonly [x: string]: JsonValue }
readonly providerResultState?: { readonly [x: string]: JsonValue }
readonly state:
| { readonly status: "pending"; readonly input: string }
| { readonly status: "streaming"; readonly input: string }
| {
readonly status: "running"
readonly input: { readonly [x: string]: JsonValue }
@@ -2013,19 +2033,10 @@ export type MessageListOutput = {
| {
readonly status: "completed"
readonly input: { readonly [x: string]: JsonValue }
readonly attachments?: ReadonlyArray<{
readonly data: string
readonly mime: string
readonly source: { readonly type: "inline" } | { readonly type: "uri"; readonly uri: string }
readonly name?: string
readonly description?: string
readonly mention?: { readonly start: number; readonly end: number; readonly text: string }
}>
readonly content: ReadonlyArray<
| { readonly type: "text"; readonly text: string }
| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
>
readonly outputPaths?: ReadonlyArray<string>
readonly structured: { readonly [x: string]: JsonValue }
readonly result?: JsonValue
}
@@ -2040,12 +2051,7 @@ export type MessageListOutput = {
readonly error: { readonly type: string; readonly message: string }
readonly result?: JsonValue
}
readonly time: {
readonly created: number
readonly ran?: number
readonly completed?: number
readonly pruned?: number
}
readonly time: { readonly created: number; readonly ran?: number; readonly completed?: number }
}
>
readonly snapshot?: { readonly start?: string; readonly end?: string; readonly files?: ReadonlyArray<string> }
@@ -2064,16 +2070,37 @@ export type MessageListOutput = {
readonly error: { readonly type: string; readonly message: string }
}
}
| {
readonly type: "compaction"
readonly status: "queued" | "running" | "completed" | "failed"
readonly reason: "auto" | "manual"
readonly summary: string
readonly recent: string
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
}
| (
| {
readonly type: "compaction"
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly status: "running"
readonly reason: "auto" | "manual"
readonly summary: string
readonly recent: string
}
| {
readonly type: "compaction"
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly status: "completed"
readonly reason: "auto" | "manual"
readonly summary: string
readonly recent: string
}
| {
readonly type: "compaction"
readonly id: string
readonly metadata?: { readonly [x: string]: JsonValue }
readonly time: { readonly created: number }
readonly status: "failed"
readonly reason: "auto" | "manual"
readonly error: { readonly type: string; readonly message: string }
}
)
>
readonly cursor: { readonly previous?: string | null; readonly next?: string | null }
}
@@ -2478,6 +2505,36 @@ export type ServerMcpListOutput = {
}>
}
export type ServerMcpResourceCatalogInput = {
readonly location?: {
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
}["location"]
}
export type ServerMcpResourceCatalogOutput = {
readonly location: {
readonly directory: string
readonly workspaceID?: string
readonly project: { readonly id: string; readonly directory: string }
}
readonly data: {
readonly resources: ReadonlyArray<{
readonly server: string
readonly name: string
readonly uri: string
readonly description?: string
readonly mimeType?: string
}>
readonly templates: ReadonlyArray<{
readonly server: string
readonly name: string
readonly uriTemplate: string
readonly description?: string
readonly mimeType?: string
}>
}
}
export type CredentialUpdateInput = {
readonly credentialID: { readonly credentialID: string }["credentialID"]
readonly location?: {
@@ -2525,13 +2582,13 @@ export type ProjectDirectoriesInput = {
export type ProjectDirectoriesOutput = ReadonlyArray<{ readonly directory: string; readonly strategy?: string }>
export type FormListRequestsInput = {
export type FormRequestListInput = {
readonly location?: {
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
}["location"]
}
export type FormListRequestsOutput = {
export type FormRequestListOutput = {
readonly location: {
readonly directory: string
readonly workspaceID?: string
@@ -3599,13 +3656,13 @@ export type FormCancelInput = {
export type FormCancelOutput = void
export type PermissionListRequestsInput = {
export type PermissionRequestListInput = {
readonly location?: {
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
}["location"]
}
export type PermissionListRequestsOutput = {
export type PermissionRequestListOutput = {
readonly location: {
readonly directory: string
readonly workspaceID?: string
@@ -3622,9 +3679,9 @@ export type PermissionListRequestsOutput = {
}>
}
export type PermissionListSavedInput = { readonly projectID?: { readonly projectID?: string | undefined }["projectID"] }
export type PermissionSavedListInput = { readonly projectID?: { readonly projectID?: string | undefined }["projectID"] }
export type PermissionListSavedOutput = {
export type PermissionSavedListOutput = {
readonly data: ReadonlyArray<{
readonly id: string
readonly projectID: string
@@ -3633,9 +3690,9 @@ export type PermissionListSavedOutput = {
}>
}["data"]
export type PermissionRemoveSavedInput = { readonly id: { readonly id: string }["id"] }
export type PermissionSavedRemoveInput = { readonly id: { readonly id: string }["id"] }
export type PermissionRemoveSavedOutput = void
export type PermissionSavedRemoveOutput = void
export type PermissionCreateInput = {
readonly sessionID: { readonly sessionID: string }["sessionID"]
@@ -3848,6 +3905,7 @@ export type SkillListOutput = {
readonly project: { readonly id: string; readonly directory: string }
}
readonly data: ReadonlyArray<{
readonly id: string
readonly name: string
readonly description?: string
readonly slash?: boolean
@@ -3903,7 +3961,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.created"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -3965,7 +4023,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.updated"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4027,7 +4085,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.deleted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4089,7 +4147,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "message.updated"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4194,7 +4252,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "message.removed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly messageID: string }
}
@@ -4203,7 +4261,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "message.part.updated"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4442,7 +4500,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "message.part.removed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly messageID: string; readonly partID: string }
}
@@ -4451,7 +4509,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.agent.selected"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly agent: string }
}
@@ -4460,7 +4518,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.model.selected"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4472,7 +4530,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.moved"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4485,16 +4543,33 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.renamed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly title: string }
}
| {
readonly id: string
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.usage.updated"
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
readonly cost: number
readonly tokens: {
readonly input: number
readonly output: number
readonly reasoning: number
readonly cache: { readonly read: number; readonly write: number }
}
}
}
| {
readonly id: string
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.deleted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 2 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
}
@@ -4503,7 +4578,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.forked"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly parentID: string; readonly from?: string }
}
@@ -4512,7 +4587,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.prompt.promoted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly inputID: string }
}
@@ -4521,7 +4596,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.prompt.admitted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4549,7 +4624,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.execution.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
}
@@ -4558,7 +4633,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.execution.succeeded"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
}
@@ -4567,7 +4642,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.execution.failed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly error: { readonly type: string; readonly message: string } }
}
@@ -4576,7 +4651,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.execution.interrupted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly reason: "user" | "shutdown" | "superseded" }
}
@@ -4585,7 +4660,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.instructions.updated"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly text: string }
}
@@ -4594,7 +4669,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.synthetic"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4608,16 +4683,16 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.skill.activated"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly name: string; readonly text: string }
readonly data: { readonly sessionID: string; readonly id: string; readonly name: string; readonly text: string }
}
| {
readonly id: string
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.shell.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4640,7 +4715,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.shell.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4669,7 +4744,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.step.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4684,7 +4759,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.step.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4706,12 +4781,19 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.step.failed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
readonly assistantMessageID: string
readonly error: { readonly type: string; readonly message: string }
readonly cost?: number
readonly tokens?: {
readonly input: number
readonly output: number
readonly reasoning: number
readonly cache: { readonly read: number; readonly write: number }
}
}
}
| {
@@ -4719,7 +4801,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.text.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly assistantMessageID: string; readonly ordinal: number }
}
@@ -4741,7 +4823,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.text.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4755,7 +4837,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.reasoning.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4782,7 +4864,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.reasoning.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4797,7 +4879,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.input.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4824,7 +4906,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.input.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4838,7 +4920,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.called"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4854,7 +4936,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.progress"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4872,7 +4954,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.success"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4883,7 +4965,6 @@ export type EventSubscribeOutput =
| { readonly type: "text"; readonly text: string }
| { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
>
readonly outputPaths?: ReadonlyArray<string>
readonly result?: unknown
readonly executed: boolean
readonly resultState?: { readonly [x: string]: unknown }
@@ -4894,7 +4975,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.tool.failed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4911,7 +4992,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.retry.scheduled"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4926,7 +5007,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.compaction.admitted"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly inputID: string }
}
@@ -4935,9 +5016,14 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.compaction.started"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly reason: "auto" | "manual" }
readonly data: {
readonly sessionID: string
readonly reason: "auto" | "manual"
readonly recent: string
readonly inputID?: string
}
}
| {
readonly id: string
@@ -4952,7 +5038,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.compaction.ended"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4966,16 +5052,21 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.compaction.failed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
readonly data: {
readonly sessionID: string
readonly reason: "auto" | "manual"
readonly error: { readonly type: string; readonly message: string }
readonly inputID?: string
}
}
| {
readonly id: string
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.revert.staged"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: {
readonly sessionID: string
@@ -4983,13 +5074,12 @@ export type EventSubscribeOutput =
readonly messageID: string
readonly partID?: string
readonly snapshot?: string
readonly diff?: string
readonly files?: ReadonlyArray<{
readonly path: string
readonly status: "added" | "modified" | "deleted"
readonly file: string
readonly patch: string
readonly additions: number
readonly deletions: number
readonly patch: string
readonly status: "added" | "deleted" | "modified"
}>
}
}
@@ -4999,7 +5089,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.revert.cleared"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string }
}
@@ -5008,7 +5098,7 @@ export type EventSubscribeOutput =
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "session.revert.committed"
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: number }
readonly durable: { readonly aggregateID: string; readonly seq: number; readonly version: 1 }
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly sessionID: string; readonly to: string }
}
@@ -5508,6 +5598,14 @@ export type EventSubscribeOutput =
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly server: string }
}
| {
readonly id: string
readonly created: number
readonly metadata?: { readonly [x: string]: unknown }
readonly type: "mcp.resources.changed"
readonly location?: { readonly directory: string; readonly workspaceID?: string }
readonly data: { readonly server: string }
}
| {
readonly id: string
readonly created: number
@@ -5957,13 +6055,13 @@ export type ShellRemoveInput = {
export type ShellRemoveOutput = void
export type QuestionListRequestsInput = {
export type QuestionRequestListInput = {
readonly location?: {
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
}["location"]
}
export type QuestionListRequestsOutput = {
export type QuestionRequestListOutput = {
readonly location: {
readonly directory: string
readonly workspaceID?: string
@@ -6121,12 +6219,20 @@ export type VcsDiffOutput = {
readonly project: { readonly id: string; readonly directory: string }
}
readonly data: ReadonlyArray<{
readonly file?: string
readonly patch?: string
readonly file: string
readonly patch: string
readonly additions: number
readonly deletions: number
readonly status?: "added" | "deleted" | "modified"
readonly status: "added" | "deleted" | "modified"
}>
}
export type DebugLocationOutput = ReadonlyArray<{ readonly directory: string; readonly workspaceID?: string }>
export type DebugLocationListOutput = ReadonlyArray<{ readonly directory: string; readonly workspaceID?: string }>
export type DebugLocationEvictInput = {
readonly location?: {
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
}["location"]
}
export type DebugLocationEvictOutput = void
@@ -19,7 +19,7 @@ import { SessionMessage } from "@opencode-ai/schema/session-message"
import { Workspace } from "@opencode-ai/schema/workspace"
import { Api } from "@opencode-ai/server/api"
import { compile, emitPromise } from "@opencode-ai/httpapi-codegen"
import { ClientApi, endpointNames, groupNames, promiseOmitEndpoints } from "../src/contract"
import { ClientApi, groupNames, promiseOmitEndpoints } from "../src/contract"
const Client = await import("../src/effect")
@@ -38,7 +38,7 @@ test("Core and Server reuse the authoritative Schema and Protocol values", () =>
expect(ProjectV2.Directory).toBe(Project.Directory)
expect(ProjectV2.Directories).toBe(Project.Directories)
expect(CoreSessionInput.Admitted).toBe(SessionInput.Admitted)
expect(CoreSessionMessage.Message).toBe(SessionMessage.Message)
expect(CoreSessionMessage.Info).toBe(SessionMessage.Info)
expect(Api.groups["server.session"].identifier).toBe("server.session")
expect(Api.groups["server.project"].identifier).toBe("server.project")
expect(Object.keys(ClientApi.groups)).toEqual(Object.keys(Api.groups))
@@ -49,8 +49,8 @@ test("Core and Server reuse the authoritative Schema and Protocol values", () =>
})
test("client and Server contracts generate identically", () => {
const server = compile(Api, { groupNames, endpointNames, omitEndpoints: promiseOmitEndpoints })
const client = compile(ClientApi, { groupNames, endpointNames, omitEndpoints: promiseOmitEndpoints })
const server = compile(Api, { groupNames, omitEndpoints: promiseOmitEndpoints })
const client = compile(ClientApi, { groupNames, omitEndpoints: promiseOmitEndpoints })
expect(emitPromise(client)).toEqual(emitPromise(server))
})
+27 -9
View File
@@ -33,16 +33,11 @@ test("exposes every standard HTTP API group", () => {
"debug",
])
expect(Object.keys(client.debug)).toEqual(["location"])
expect(Object.keys(client.debug.location)).toEqual(["list", "evict"])
expect(Object.keys(client.message)).toEqual(["list"])
expect(Object.keys(client.integration)).toEqual([
"list",
"get",
"connectKey",
"connectOauth",
"attemptStatus",
"attemptComplete",
"attemptCancel",
])
expect(Object.keys(client.integration)).toEqual(["list", "get", "connect", "attempt"])
expect(Object.keys(client.integration.connect)).toEqual(["key", "oauth"])
expect(Object.keys(client.integration.attempt)).toEqual(["status", "complete", "cancel"])
expect(Object.keys(client.file)).toEqual(["read", "list", "find"])
expect(Object.keys(client.vcs)).toEqual(["status", "diff"])
expect(Object.keys(client.pty)).toEqual(["list", "create", "get", "update", "remove"])
@@ -50,6 +45,29 @@ test("exposes every standard HTTP API group", () => {
expect(Object.keys(client.project)).toEqual(["list", "current", "directories"])
})
test("MCP resource catalog uses the public HTTP contract", async () => {
let request: Request | undefined
const client = OpenCode.make({
baseUrl: "http://localhost:3000",
fetch: async (input) => {
request = input instanceof Request ? input : new Request(input)
return Response.json({
location: { directory: "/tmp/project", project: { id: "proj_test", directory: "/tmp/project" } },
data: {
resources: [{ server: "docs", name: "Readme", uri: "docs://readme" }],
templates: [{ server: "docs", name: "File", uriTemplate: "docs://{path}" }],
},
})
},
})
const result = await client["server.mcp"].resource.catalog({ location: { directory: "/tmp/project" } })
expect(result.data.resources[0]?.uri).toBe("docs://readme")
expect(request?.method).toBe("GET")
expect(request?.url).toBe("http://localhost:3000/api/mcp/resource?location%5Bdirectory%5D=%2Ftmp%2Fproject")
})
test("file.read returns binary content from the public HTTP contract", async () => {
let request: Request | undefined
const client = OpenCode.make({
+2 -2
View File
@@ -62,7 +62,7 @@ const result =
`result` is always a `CodeMode.Result`. Program, validation, limit, and tool failures are returned as diagnostics rather than failing the Effect. Host interruption remains interruption.
Successful result values are JSON-safe data. A program that returns `undefined`, including by reaching the end without `return`, produces `null`; nested `undefined` values are normalized to `null` as well.
Successful result values are JSON-safe data. An explicit `return` produces the program result; when it is omitted, the final executable top-level expression is returned as a model-friendly REPL convenience. Otherwise reaching the end produces `null`. Returned `undefined` and nested `undefined` values are normalized to `null` as well.
## API
@@ -241,7 +241,7 @@ CodeMode executes a deliberately bounded JavaScript subset. It supports:
- `if`, conditional expressions, `switch`, `for`, `for...of` (arrays, strings, Maps, Sets, including assignment-form destructuring such as `for ([key, value] of entries)`), `for...in` (own keys of plain objects, index strings of arrays, and namespace/tool names of `tools` references - anything else is an error suggesting `for...of` or `Object.keys`, rather than real JS's surprising behavior of indices for strings and zero iterations for Maps/Sets), `while`, and `do...while`.
- Arrow functions and function declarations with closures, defaults, rest parameters, and destructuring.
- Optional chaining, nullish coalescing, templates, spread (arrays, strings, Maps, Sets), and `try`/`catch`.
- Common array, string, number, `Object`, `Math`, and `JSON` operations. Mutating array methods include `push`/`pop`/`shift`/`unshift`/`splice` (removes in place and returns the removed elements)/`fill`/`copyWithin`; array `keys`/`values`/`entries` return **arrays** (matching the Map/Set convention) and work with `for...of` and spread. String methods include `localeCompare` (locale/options arguments ignored), `normalize`, and the `trimLeft`/`trimRight` aliases. `Object.keys` also accepts arrays (index strings, as in JS) and tool references: `Object.keys(tools)` lists the top-level namespaces, including `$codemode`, and `Object.keys(tools.ns)` lists the names at that node (a callable tool enumerates as `[]`; an unknown path is an `UnknownTool` diagnostic). `Object.values`/`Object.entries` on a tool reference fail with a pointer at `Object.keys(tools)` and `tools.$codemode.search`.
- Common array, string, number, `Object`, `Math`, and `JSON` operations, including primitive-number `valueOf`, the standard non-finite `Number` constants, and host-backed `Math.random`. Mutating array methods include `push`/`pop`/`shift`/`unshift`/`splice` (removes in place and returns the removed elements)/`fill`/`copyWithin`; array `keys`/`values`/`entries` return **arrays** (matching the Map/Set convention) and work with `for...of` and spread. String methods include `localeCompare` (locale/options arguments ignored), `normalize`, and the `trimLeft`/`trimRight` aliases. `Object.keys` also accepts arrays (index strings, as in JS) and tool references: `Object.keys(tools)` lists the top-level namespaces, including `$codemode`, and `Object.keys(tools.ns)` lists the names at that node (a callable tool enumerates as `[]`; an unknown path is an `UnknownTool` diagnostic). `Object.values`/`Object.entries` on a tool reference fail with a pointer at `Object.keys(tools)` and `tools.$codemode.search`.
- `Date` - `Date.now()`/`Date.parse()`/`Date.UTC()`, `new Date(...)`, the getter methods, and date arithmetic/comparison via the time value. Dates stringify as ISO (`toString` included, for determinism across host timezones).
- Regular expressions - `/literals/` and `new RegExp(...)` with `test`/`exec` (stateful `lastIndex` for `g`), plus string `match`/`matchAll`/`replace`/`replaceAll`/`split`/`search` with patterns. Match results are arrays carrying `index` and named `groups` as own properties (`input` is omitted). `replace` and `replaceAll` accept function replacers with captures, offset, input, and named groups; callbacks run sequentially, may await tool calls, and have their results coerced to strings. Invalid patterns, invalid flags, and missing-`g` calls fail with catchable errors that say what was wrong and how to fix it (escaping hints, the exact `/pattern/g` to write). Patterns run on the host engine, so pathological backtracking is bounded only by the execution timeout.
- `Map` and `Set` - construction from entries/arrays/strings, `get`/`set`/`add`/`has`/`delete`/`clear`/`size`/`forEach`, and `keys`/`values`/`entries` returning **arrays** (not iterators).
+1 -1
View File
@@ -158,7 +158,7 @@ current omissions to implement, not intentional product boundaries.
- [ ] Add `Object.is` after runtime method and tool references have stable identity semantics.
- [ ] Add deterministic modern collection conveniences where they improve orchestration: `Object.groupBy`, Set
composition methods, and `Array.prototype.toSpliced`.
- [ ] Decide whether nondeterministic `Math.random` and iterable `Math.sumPrecise` belong in the runtime.
- [ ] Decide whether iterable `Math.sumPrecise` belongs in the runtime.
- [ ] Refine diagnostics so user throws, expected tool failures, unexpected host/tool defects, and genuine interpreter
defects are distinguishable without leaking private causes.
@@ -30,7 +30,6 @@ export type Binding = {
export type StatementResult =
| { kind: "none" }
| { kind: "value"; value: unknown }
| { kind: "return"; value: unknown }
| { kind: "break" }
| { kind: "continue" }
+24 -37
View File
@@ -530,17 +530,29 @@ const invokeArrayStatic = (name: string, args: Array<unknown>, node: AstNode): u
if (args[0] instanceof SandboxURLSearchParams) {
return Array.from(args[0].params.entries(), ([key, value]) => [key, value])
}
const source = boundedData(args[0], "Array.from input")
const source = args[0]
if (source instanceof SandboxPromise) {
throw new InterpreterRuntimeError(
"Array.from received an un-awaited Promise; await it before creating the array.",
node,
"InvalidDataValue",
)
}
if (typeof source === "string") return Array.from(source)
if (Array.isArray(source)) return [...source]
if (
source !== null &&
typeof source === "object" &&
(Object.getPrototypeOf(source) === Object.prototype || Object.getPrototypeOf(source) === null) &&
typeof (source as { length?: unknown }).length === "number"
) {
return Array.from(source as ArrayLike<unknown>)
}
throw new InterpreterRuntimeError("Array.from expects an array, string, Map, Set, or array-like value.", node)
throw new InterpreterRuntimeError(
"Array.from expects an array, string, Map, Set, or array-like value.",
node,
"InvalidDataValue",
)
}
default:
throw new InterpreterRuntimeError(`Array.${name} is not available in CodeMode.`, node)
@@ -606,7 +618,6 @@ class Interpreter<R> {
// ToolRuntime.make like invokeTool: the interpreter never holds the tree itself.
private readonly toolKeys: (path: ReadonlyArray<string>) => ReadonlyArray<string>
private readonly logs: Array<string>
private lastValue: unknown
// Caps how many eagerly forked tool calls run at once (the parallel-call concurrency cap).
private readonly callPermits: Semaphore.Semaphore
// Fiber-backed promises whose settlement no program construct has observed yet. Successful
@@ -625,7 +636,6 @@ class Interpreter<R> {
this.invokeTool = invokeTool
this.toolKeys = toolKeys
this.logs = logs
this.lastValue = undefined
this.callPermits = shared?.callPermits ?? Semaphore.makeUnsafe(TOOL_CALL_CONCURRENCY)
this.pendingSettlements = shared?.pendingSettlements ?? new Set<SandboxPromise>()
globalScope.set("tools", { mutable: false, value: new ToolReference([]) })
@@ -671,13 +681,15 @@ class Interpreter<R> {
return Effect.gen(function* () {
self.hoistFunctions(program.body)
let value: unknown = undefined
let returned = false
for (const statement of program.body) {
for (const [index, statement] of program.body.entries()) {
if (index === program.body.length - 1 && statement.type === "ExpressionStatement") {
value = yield* self.evaluateExpression(getNode(statement, "expression"))
break
}
const result = yield* self.evaluateStatement(statement)
if (result.kind === "return") {
value = result.value
returned = true
break
}
@@ -685,11 +697,7 @@ class Interpreter<R> {
throw new InterpreterRuntimeError(`Unexpected '${result.kind}' outside of a loop.`, statement)
}
if (result.kind === "value") {
self.lastValue = result.value
}
}
if (!returned) value = self.lastValue
// The program body runs inside an implicit async function, so a returned promise
// resolves before crossing the data boundary - `return tools.ns.tool(...)` works
@@ -780,7 +788,7 @@ class Interpreter<R> {
private evaluateStatement(node: AstNode): Effect.Effect<StatementResult, unknown, R> {
switch (node.type) {
case "ExpressionStatement":
return Effect.map(this.evaluateExpression(getNode(node, "expression")), (value) => ({ kind: "value", value }))
return Effect.as(this.evaluateExpression(getNode(node, "expression")), { kind: "none" })
case "VariableDeclaration":
return Effect.map(this.evaluateVariableDeclaration(node), () => ({ kind: "none" }))
case "ReturnStatement": {
@@ -833,11 +841,6 @@ class Interpreter<R> {
const statement = asNode(statementValue, "body")
const result = yield* self.evaluateStatement(statement)
if (result.kind === "value") {
self.lastValue = result.value
continue
}
if (result.kind !== "none") {
return result
}
@@ -929,7 +932,6 @@ class Interpreter<R> {
const result = yield* self.evaluateStatement(asNode(statementValue, "consequent"))
if (result.kind === "break") return { kind: "none" } satisfies StatementResult
if (result.kind === "return" || result.kind === "continue") return result
if (result.kind === "value") self.lastValue = result.value
}
}
return { kind: "none" } satisfies StatementResult
@@ -957,9 +959,6 @@ class Interpreter<R> {
return result
}
if (result.kind === "value") {
self.lastValue = result.value
}
}
return { kind: "none" } satisfies StatementResult
@@ -987,9 +986,6 @@ class Interpreter<R> {
return result
}
if (result.kind === "value") {
self.lastValue = result.value
}
} while (yield* self.evaluateExpression(testNode))
return { kind: "none" } satisfies StatementResult
@@ -1045,10 +1041,6 @@ class Interpreter<R> {
return { kind: "none" } satisfies StatementResult
}
if (result.kind === "value") {
self.lastValue = result.value
}
if (iterationScope) {
const loopScope = self.currentScope()
for (const name of perIterationBindings) {
@@ -1133,10 +1125,6 @@ class Interpreter<R> {
return { kind: "none" }
}
if (result.kind === "value") {
self.lastValue = result.value
}
if (result.kind === "continue") {
continue
}
@@ -1226,10 +1214,6 @@ class Interpreter<R> {
return { kind: "none" }
}
if (result.kind === "value") {
self.lastValue = result.value
}
if (result.kind === "continue") {
continue
}
@@ -2033,6 +2017,9 @@ class Interpreter<R> {
if (callable.namespace === "Object" && objectMethodsPreservingIdentity.has(callable.name)) {
return invokeGlobalMethod(callable, args, node)
}
if (callable.namespace === "Array" && (callable.name === "from" || callable.name === "of")) {
return invokeGlobalMethod(callable, args, node)
}
return boundedData(invokeGlobalMethod(callable, args, node), `${callable.namespace}.${callable.name} result`)
}
if (callable instanceof CoercionFunction) {
@@ -2372,7 +2359,7 @@ class Interpreter<R> {
if (fn.body.type === "BlockStatement") {
const result = yield* invocation.evaluateStatement(fn.body)
return result.kind === "return" || result.kind === "value" ? result.value : undefined
return result.kind === "return" ? result.value : undefined
}
return yield* invocation.evaluateExpression(fn.body)
+2
View File
@@ -1,6 +1,7 @@
export const mathConstants = new Set(["PI", "E", "LN2", "LN10", "LOG2E", "LOG10E", "SQRT2", "SQRT1_2"])
export const mathMethods = new Set([
"random",
"max",
"min",
"abs",
@@ -40,6 +41,7 @@ export const mathMethods = new Set([
export const invokeMathMethod = (name: string, args: Array<unknown>, node: AstNode): number => {
if (!mathMethods.has(name)) throw new InterpreterRuntimeError(`Math.${name} is not available in CodeMode.`, node)
if (name === "random") return Math.random()
const nums = args.map((arg) => {
if (typeof arg !== "number") throw new InterpreterRuntimeError(`Math.${name} expects number arguments.`, node)
return arg
+14 -2
View File
@@ -1,6 +1,15 @@
export const numberMethods = new Set(["toFixed", "toPrecision", "toExponential", "toString"])
export const numberMethods = new Set(["toFixed", "toPrecision", "toExponential", "toString", "valueOf"])
export const numberConstants = new Set(["MAX_SAFE_INTEGER", "MIN_SAFE_INTEGER", "MAX_VALUE", "MIN_VALUE", "EPSILON"])
export const numberConstants = new Set([
"MAX_SAFE_INTEGER",
"MIN_SAFE_INTEGER",
"MAX_VALUE",
"MIN_VALUE",
"EPSILON",
"NaN",
"POSITIVE_INFINITY",
"NEGATIVE_INFINITY",
])
export const numberStatics = new Set(["isInteger", "isFinite", "isNaN", "isSafeInteger", "parseInt", "parseFloat"])
@@ -32,6 +41,9 @@ export const invokeNumberMethod = (value: number, name: string, args: Array<unkn
result = value.toString(radix)
break
}
case "valueOf":
result = value
break
default:
throw new InterpreterRuntimeError(`Number method '${name}' is not available in CodeMode.`, node)
}
+18 -15
View File
@@ -1,6 +1,6 @@
import { type AstNode, InterpreterRuntimeError } from "../interpreter/model.js"
import { isBlockedMember } from "../tool-runtime.js"
import { isSandboxValue, SandboxMap, SandboxSet, SandboxURLSearchParams } from "../values.js"
import { isSandboxValue, SandboxMap, SandboxPromise, SandboxSet, SandboxURLSearchParams } from "../values.js"
import { boundedData, coerceToString } from "./value.js"
export const objectStatics = new Set(["keys", "values", "entries", "hasOwn", "assign", "fromEntries"])
@@ -10,13 +10,23 @@ export const invokeObjectMethod = (name: string, args: Array<unknown>, node: Ast
if (!objectStatics.has(name)) throw new InterpreterRuntimeError(`Object.${name} is not available in CodeMode.`, node)
const requireObject = (): Record<string, unknown> => {
const input = args[0]
const value = boundedData(args[0], `Object.${name} input`)
if (Array.isArray(input)) return input as unknown as Record<string, unknown>
if (isSandboxValue(value)) return {}
if (value === null || typeof value !== "object") {
throw new InterpreterRuntimeError(`Object.${name} expects a data object or array.`, node)
if (isSandboxValue(input)) return {}
if (input instanceof SandboxPromise) {
throw new InterpreterRuntimeError(
`Object.${name} received an un-awaited Promise; await it before inspecting the result.`,
node,
"InvalidDataValue",
)
}
return value as Record<string, unknown>
if (input === null || typeof input !== "object") {
throw new InterpreterRuntimeError(`Object.${name} expects a data object or array.`, node, "InvalidDataValue")
}
const prototype = Object.getPrototypeOf(input)
if (prototype !== null && prototype !== Object.prototype) {
throw new InterpreterRuntimeError(`Object.${name} expects a data object or array.`, node, "InvalidDataValue")
}
return input as Record<string, unknown>
}
const guardedSet = (out: Record<string, unknown>, key: string, item: unknown): void => {
if (isBlockedMember(key)) throw new InterpreterRuntimeError(`Property '${key}' is not available in CodeMode.`, node)
@@ -28,15 +38,8 @@ export const invokeObjectMethod = (name: string, args: Array<unknown>, node: Ast
guardedSet(out, coerceToString(key), item)
}
switch (name) {
case "keys": {
const value = boundedData(args[0], "Object.keys input")
if (isSandboxValue(value)) return []
if (Array.isArray(value)) return Object.keys(value)
if (value === null || typeof value !== "object") {
throw new InterpreterRuntimeError("Object.keys expects a data object or array.", node)
}
return Object.keys(value)
}
case "keys":
return Object.keys(requireObject())
case "values":
return Object.values(requireObject())
case "entries":
+1
View File
@@ -617,6 +617,7 @@ export const prepare = <R>(tools: HostTools<R>, catalogBudget = defaultCatalogBu
"",
"Use common JavaScript data operations, functions, control flow, selected standard-library methods, and awaited tool calls. Built-ins include Date, RegExp, Map, Set, URL, URLSearchParams, and URI encoding helpers.",
"Modules/imports, classes, generators, timers, fetch, eval, prototype access, unlisted methods, and promise chaining are unavailable. Use Code Mode tools for external operations. Use await with try/catch.",
"Prefer explicit `return`; otherwise only the final top-level expression becomes the result.",
"Dates and URLs serialize to strings at data boundaries; Map/Set/RegExp/URLSearchParams serialize to `{}`.",
]
+21
View File
@@ -658,6 +658,9 @@ describe("CodeMode public contract", () => {
expect(instructions).toContain("URL, URLSearchParams, and URI encoding helpers")
expect(instructions).not.toContain("host globals")
expect(instructions).toContain("Use Code Mode tools for external operations")
expect(instructions).toContain(
"Prefer explicit `return`; otherwise only the final top-level expression becomes the result.",
)
expect(instructions).toContain(
"Dates and URLs serialize to strings at data boundaries; Map/Set/RegExp/URLSearchParams serialize to `{}`.",
)
@@ -1081,6 +1084,24 @@ describe("CodeMode public contract", () => {
expect(Schema.decodeUnknownSync(CodeMode.Result)(JSON.parse(JSON.stringify(result)))).toStrictEqual(result)
})
test("returns the final top-level expression when return is omitted", async () => {
const result = await Effect.runPromise(CodeMode.execute({ code: `1; 2` }))
expect(result).toStrictEqual({ ok: true, value: 2, toolCalls: [] })
})
test("does not implicitly return expressions nested in control flow", async () => {
const result = await Effect.runPromise(CodeMode.execute({ code: `if (true) { 2 }` }))
expect(result).toStrictEqual({ ok: true, value: null, toolCalls: [] })
})
test("returns null when the final top-level statement is not an expression", async () => {
const result = await Effect.runPromise(CodeMode.execute({ code: `1; const value = 2` }))
expect(result).toStrictEqual({ ok: true, value: null, toolCalls: [] })
})
test("rejects invalid configuration and discovery limits", async () => {
expect(() => CodeMode.execute({ code: "return 1", limits: { timeoutMs: 0 } })).toThrow(RangeError)
expect(() => CodeMode.execute({ code: "return 1", limits: { timeoutMs: Number.POSITIVE_INFINITY } })).toThrow(
+3804 -3594
View File
@@ -9,7 +9,7 @@
"/api/health": {
"get": {
"tags": [
"server.health"
"health"
],
"operationId": "v2.health.get",
"parameters": [],
@@ -27,10 +27,23 @@
"enum": [
true
]
},
"version": {
"type": "string"
},
"pid": {
"type": "integer",
"allOf": [
{
"exclusiveMinimum": 0
}
]
}
},
"required": [
"healthy"
"healthy",
"version",
"pid"
],
"additionalProperties": false
}
@@ -65,7 +78,7 @@
"/api/location": {
"get": {
"tags": [
"server.location"
"location"
],
"operationId": "v2.location.get",
"parameters": [
@@ -150,7 +163,7 @@
"/api/agent": {
"get": {
"tags": [
"server.agent"
"agent"
],
"operationId": "v2.agent.list",
"parameters": [
@@ -210,7 +223,7 @@
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AgentV2.Info"
"$ref": "#/components/schemas/Agent.Info"
}
}
},
@@ -251,7 +264,7 @@
"/api/plugin": {
"get": {
"tags": [
"plugins"
"plugin"
],
"operationId": "v2.plugin.list",
"parameters": [
@@ -352,7 +365,7 @@
"/api/session": {
"get": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.list",
"parameters": [
@@ -568,7 +581,7 @@
},
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.create",
"parameters": [],
@@ -582,7 +595,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/SessionV2.Info"
"$ref": "#/components/schemas/Session.Info"
}
},
"required": [
@@ -679,7 +692,7 @@
"/api/session/active": {
"get": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.active",
"parameters": [],
@@ -699,14 +712,10 @@
"$ref": "#/components/schemas/SessionActive"
}
}
},
"watermarks": {
"$ref": "#/components/schemas/SessionWatermarks"
}
},
"required": [
"data",
"watermarks"
"data"
],
"additionalProperties": false
}
@@ -734,14 +743,14 @@
}
}
},
"description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive. Watermarks are the durable log positions read alongside the activity snapshot; activity itself is process state, so the pairing is advisory rather than transactional.",
"description": "Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.",
"summary": "List active sessions"
}
},
"/api/session/{sessionID}": {
"get": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.get",
"parameters": [
@@ -769,7 +778,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/SessionV2.Info"
"$ref": "#/components/schemas/Session.Info"
}
},
"required": [
@@ -820,12 +829,78 @@
},
"description": "Retrieve a session by ID.",
"summary": "Get session"
},
"delete": {
"tags": [
"session"
],
"operationId": "v2.session.remove",
"parameters": [
{
"name": "sessionID",
"in": "path",
"schema": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"required": true
}
],
"security": [],
"responses": {
"204": {
"description": "<No Content>"
},
"400": {
"description": "InvalidRequestError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
}
}
}
},
"401": {
"description": "UnauthorizedError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
}
}
}
},
"404": {
"description": "SessionNotFoundError",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionNotFoundError"
},
{
"$ref": "#/components/schemas/SessionNotFoundError"
}
]
}
}
}
}
},
"description": "Delete a session and its child sessions.",
"summary": "Delete session"
}
},
"/api/session/{sessionID}/fork": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.fork",
"parameters": [
@@ -853,7 +928,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/SessionV2.Info"
"$ref": "#/components/schemas/Session.Info"
}
},
"required": [
@@ -940,7 +1015,7 @@
"/api/session/{sessionID}/agent": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.switchAgent",
"parameters": [
@@ -1027,7 +1102,7 @@
"/api/session/{sessionID}/model": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.switchModel",
"parameters": [
@@ -1114,7 +1189,7 @@
"/api/session/{sessionID}/rename": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.rename",
"parameters": [
@@ -1198,10 +1273,123 @@
}
}
},
"/api/session/{sessionID}/move": {
"post": {
"tags": [
"session"
],
"operationId": "v2.session.move",
"parameters": [
{
"name": "sessionID",
"in": "path",
"schema": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"required": true
}
],
"security": [],
"responses": {
"204": {
"description": "<No Content>"
},
"400": {
"description": "InvalidRequestError",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/InvalidRequestError1"
},
{
"$ref": "#/components/schemas/InvalidRequestError"
}
]
}
}
}
},
"401": {
"description": "UnauthorizedError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
}
}
}
},
"404": {
"description": "SessionNotFoundError",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionNotFoundError"
},
{
"$ref": "#/components/schemas/SessionNotFoundError"
}
]
}
}
}
}
},
"description": "Move a session to another project directory, optionally transferring local changes.",
"summary": "Move session",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"destination": {
"type": "object",
"properties": {
"directory": {
"type": "string"
}
},
"required": [
"directory"
],
"additionalProperties": false
},
"moveChanges": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"required": [
"destination"
],
"additionalProperties": false
}
}
},
"required": true
}
}
},
"/api/session/{sessionID}/prompt": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.prompt",
"parameters": [
@@ -1245,7 +1433,14 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
"anyOf": [
{
"$ref": "#/components/schemas/InvalidRequestError1"
},
{
"$ref": "#/components/schemas/InvalidRequestError"
}
]
}
}
}
@@ -1353,7 +1548,7 @@
"/api/session/{sessionID}/command": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.command",
"parameters": [
@@ -1397,7 +1592,14 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
"anyOf": [
{
"$ref": "#/components/schemas/InvalidRequestError1"
},
{
"$ref": "#/components/schemas/InvalidRequestError"
}
]
}
}
}
@@ -1560,7 +1762,7 @@
"/api/session/{sessionID}/skill": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.skill",
"parameters": [
@@ -1675,7 +1877,7 @@
"/api/session/{sessionID}/synthetic": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.synthetic",
"parameters": [
@@ -1759,6 +1961,16 @@
},
"metadata": {
"type": "object"
},
"resume": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"required": [
@@ -1772,12 +1984,12 @@
}
}
},
"/api/session/{sessionID}/compact": {
"/api/session/{sessionID}/shell": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.compact",
"operationId": "v2.session.shell",
"parameters": [
{
"name": "sessionID",
@@ -1818,6 +2030,124 @@
}
}
},
"404": {
"description": "SessionNotFoundError",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionNotFoundError"
},
{
"$ref": "#/components/schemas/SessionNotFoundError"
}
]
}
}
}
}
},
"description": "Execute one shell command in the session's working directory. Emits a shell.started event before execution and a shell.ended event with the merged output after.",
"summary": "Run shell command",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
{
"type": "null"
}
]
},
"command": {
"type": "string"
}
},
"required": [
"command"
],
"additionalProperties": false
}
}
},
"required": true
}
}
},
"/api/session/{sessionID}/compact": {
"post": {
"tags": [
"session"
],
"operationId": "v2.session.compact",
"parameters": [
{
"name": "sessionID",
"in": "path",
"schema": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"required": true
}
],
"security": [],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/SessionInput.Compaction"
}
},
"required": [
"data"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "InvalidRequestError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
}
}
}
},
"401": {
"description": "UnauthorizedError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
}
}
}
},
"404": {
"description": "SessionNotFoundError",
"content": {
@@ -1836,44 +2166,52 @@
}
},
"409": {
"description": "SessionBusyError",
"description": "ConflictError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionBusyError"
}
}
}
},
"500": {
"description": "UnknownError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnknownError"
}
}
}
},
"503": {
"description": "ServiceUnavailableError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceUnavailableError"
"$ref": "#/components/schemas/ConflictError"
}
}
}
}
},
"description": "Compact a session conversation.",
"summary": "Compact session"
"description": "Queue a durable session compaction request.",
"summary": "Compact session",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
}
},
"required": true
}
}
},
"/api/session/{sessionID}/wait": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.wait",
"parameters": [
@@ -1951,7 +2289,7 @@
"/api/session/{sessionID}/revert/stage": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.revert.stage",
"parameters": [
@@ -1979,7 +2317,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Revert.State"
"$ref": "#/components/schemas/Session.Revert"
}
},
"required": [
@@ -2092,7 +2430,7 @@
"/api/session/{sessionID}/revert/clear": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.revert.clear",
"parameters": [
@@ -2179,7 +2517,7 @@
"/api/session/{sessionID}/revert/commit": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.revert.commit",
"parameters": [
@@ -2256,7 +2594,7 @@
"/api/session/{sessionID}/context": {
"get": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.context",
"parameters": [
@@ -2286,7 +2624,7 @@
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Session.Message"
"$ref": "#/components/schemas/Session.Message.Info"
}
}
},
@@ -2353,7 +2691,7 @@
"/api/session/{sessionID}/instructions/entries": {
"get": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.instructions.entry.list",
"parameters": [
@@ -2440,7 +2778,7 @@
"/api/session/{sessionID}/instructions/entries/{key}": {
"put": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.instructions.entry.put",
"parameters": [
@@ -2531,7 +2869,7 @@
},
"delete": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.instructions.entry.remove",
"parameters": [
@@ -2604,10 +2942,10 @@
"summary": "Remove instruction entry"
}
},
"/api/session/{sessionID}/log": {
"/api/experimental/session/{sessionID}/log": {
"get": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.log",
"parameters": [
@@ -2809,14 +3147,14 @@
}
}
},
"description": "Durable, ordered, gap-free read of public session events after an exclusive aggregate sequence. Emits a synced marker once replay reaches the captured watermark, then completes; with follow=true it continues with live events instead. The only event API that promises reliability: attach after a snapshot watermark to compose fetch and stream without a race window.",
"description": "Experimental durable session event log. Reads events after an exclusive aggregate sequence and continues with live events when follow=true.",
"summary": "Read the session log"
}
},
"/api/session/{sessionID}/interrupt": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.interrupt",
"parameters": [
@@ -2884,7 +3222,7 @@
"/api/session/{sessionID}/background": {
"post": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.background",
"parameters": [
@@ -2952,7 +3290,7 @@
"/api/session/{sessionID}/message/{messageID}": {
"get": {
"tags": [
"sessions"
"session"
],
"operationId": "v2.session.message",
"parameters": [
@@ -2993,7 +3331,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Session.Message"
"$ref": "#/components/schemas/Session.Message.Info"
}
},
"required": [
@@ -3052,9 +3390,9 @@
"/api/session/{sessionID}/message": {
"get": {
"tags": [
"messages"
"session"
],
"operationId": "v2.session.messages",
"operationId": "v2.message.list",
"parameters": [
{
"name": "sessionID",
@@ -3196,7 +3534,7 @@
"/api/model": {
"get": {
"tags": [
"models"
"model"
],
"operationId": "v2.model.list",
"parameters": [
@@ -3256,7 +3594,7 @@
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ModelV2.Info"
"$ref": "#/components/schemas/Model.Info"
}
}
},
@@ -3307,7 +3645,7 @@
"/api/model/default": {
"get": {
"tags": [
"models"
"model"
],
"operationId": "v2.model.default",
"parameters": [
@@ -3367,7 +3705,7 @@
"data": {
"anyOf": [
{
"$ref": "#/components/schemas/ModelV2.Info"
"$ref": "#/components/schemas/Model.Info"
},
{
"type": "null"
@@ -3553,7 +3891,7 @@
"/api/provider": {
"get": {
"tags": [
"providers"
"provider"
],
"operationId": "v2.provider.list",
"parameters": [
@@ -3664,7 +4002,7 @@
"/api/provider/{providerID}": {
"get": {
"tags": [
"providers"
"provider"
],
"operationId": "v2.provider.get",
"parameters": [
@@ -3790,7 +4128,7 @@
"/api/integration": {
"get": {
"tags": [
"integrations"
"integration"
],
"operationId": "v2.integration.list",
"parameters": [
@@ -3891,7 +4229,7 @@
"/api/integration/{integrationID}": {
"get": {
"tags": [
"integrations"
"integration"
],
"operationId": "v2.integration.get",
"parameters": [
@@ -4004,7 +4342,7 @@
"/api/integration/{integrationID}/connect/key": {
"post": {
"tags": [
"integrations"
"integration"
],
"operationId": "v2.integration.connect.key",
"parameters": [
@@ -4126,7 +4464,7 @@
"/api/integration/{integrationID}/connect/oauth": {
"post": {
"tags": [
"integrations"
"integration"
],
"operationId": "v2.integration.connect.oauth",
"parameters": [
@@ -4275,7 +4613,7 @@
"/api/integration/attempt/{attemptID}": {
"get": {
"tags": [
"integrations"
"integration"
],
"operationId": "v2.integration.attempt.status",
"parameters": [
@@ -4379,7 +4717,7 @@
},
"delete": {
"tags": [
"integrations"
"integration"
],
"operationId": "v2.integration.attempt.cancel",
"parameters": [
@@ -4465,7 +4803,7 @@
"/api/integration/attempt/{attemptID}/complete": {
"post": {
"tags": [
"integrations"
"integration"
],
"operationId": "v2.integration.attempt.complete",
"parameters": [
@@ -4679,10 +5017,108 @@
"summary": "List MCP servers"
}
},
"/api/mcp/resource": {
"get": {
"tags": [
"mcp"
],
"operationId": "v2.mcp.resource.catalog",
"parameters": [
{
"name": "location",
"in": "query",
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"directory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"workspace": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"required": false,
"style": "deepObject",
"explode": true
}
],
"security": [],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"location": {
"$ref": "#/components/schemas/Location.Info"
},
"data": {
"$ref": "#/components/schemas/Mcp.ResourceCatalog"
}
},
"required": [
"location",
"data"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "InvalidRequestError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
}
}
}
},
"401": {
"description": "UnauthorizedError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
}
}
}
}
},
"description": "Retrieve resources and resource templates from connected MCP servers.",
"summary": "List MCP resources"
}
},
"/api/credential/{credentialID}": {
"patch": {
"tags": [
"server.credential"
"credential"
],
"operationId": "v2.credential.update",
"parameters": [
@@ -4785,7 +5221,7 @@
},
"delete": {
"tags": [
"server.credential"
"credential"
],
"operationId": "v2.credential.remove",
"parameters": [
@@ -4868,10 +5304,57 @@
"summary": "Remove credential"
}
},
"/api/project": {
"get": {
"tags": [
"project"
],
"operationId": "v2.project.list",
"parameters": [],
"security": [],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Project"
}
}
}
}
},
"400": {
"description": "InvalidRequestError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
}
}
}
},
"401": {
"description": "UnauthorizedError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
}
}
}
}
},
"description": "List known projects.",
"summary": "List projects"
}
},
"/api/project/current": {
"get": {
"tags": [
"projects"
"project"
],
"operationId": "v2.project.current",
"parameters": [
@@ -4956,7 +5439,7 @@
"/api/project/{projectID}/directories": {
"get": {
"tags": [
"projects"
"project"
],
"operationId": "v2.project.directories",
"parameters": [
@@ -5049,7 +5532,7 @@
"/api/form/request": {
"get": {
"tags": [
"forms"
"form"
],
"operationId": "v2.form.request.list",
"parameters": [
@@ -5157,7 +5640,7 @@
"/api/session/{sessionID}/form": {
"get": {
"tags": [
"forms"
"form"
],
"operationId": "v2.session.form.list",
"parameters": [
@@ -5244,7 +5727,7 @@
},
"post": {
"tags": [
"forms"
"form"
],
"operationId": "v2.session.form.create",
"parameters": [
@@ -5357,7 +5840,7 @@
"/api/session/{sessionID}/form/{formID}": {
"get": {
"tags": [
"forms"
"form"
],
"operationId": "v2.session.form.get",
"parameters": [
@@ -5459,7 +5942,7 @@
"/api/session/{sessionID}/form/{formID}/state": {
"get": {
"tags": [
"forms"
"form"
],
"operationId": "v2.session.form.state",
"parameters": [
@@ -5554,7 +6037,7 @@
"/api/session/{sessionID}/form/{formID}/reply": {
"post": {
"tags": [
"forms"
"form"
],
"operationId": "v2.session.form.reply",
"parameters": [
@@ -5660,7 +6143,7 @@
"/api/session/{sessionID}/form/{formID}/cancel": {
"post": {
"tags": [
"forms"
"form"
],
"operationId": "v2.session.form.cancel",
"parameters": [
@@ -5749,7 +6232,7 @@
"/api/permission/request": {
"get": {
"tags": [
"permissions"
"permission"
],
"operationId": "v2.permission.request.list",
"parameters": [
@@ -5850,7 +6333,7 @@
"/api/permission/saved": {
"get": {
"tags": [
"permissions"
"permission"
],
"operationId": "v2.permission.saved.list",
"parameters": [
@@ -5922,7 +6405,7 @@
"/api/permission/saved/{id}": {
"delete": {
"tags": [
"permissions"
"permission"
],
"operationId": "v2.permission.saved.remove",
"parameters": [
@@ -5968,7 +6451,7 @@
"/api/session/{sessionID}/permission": {
"post": {
"tags": [
"permissions"
"permission"
],
"operationId": "v2.session.permission.create",
"parameters": [
@@ -6131,7 +6614,7 @@
},
"get": {
"tags": [
"permissions"
"permission"
],
"operationId": "v2.session.permission.list",
"parameters": [
@@ -6218,7 +6701,7 @@
"/api/session/{sessionID}/permission/{requestID}": {
"get": {
"tags": [
"permissions"
"permission"
],
"operationId": "v2.session.permission.get",
"parameters": [
@@ -6318,7 +6801,7 @@
"/api/session/{sessionID}/permission/{requestID}/reply": {
"post": {
"tags": [
"permissions"
"permission"
],
"operationId": "v2.session.permission.reply",
"parameters": [
@@ -6769,7 +7252,7 @@
"/api/command": {
"get": {
"tags": [
"commands"
"command"
],
"operationId": "v2.command.list",
"parameters": [
@@ -6829,7 +7312,7 @@
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CommandV2.Info"
"$ref": "#/components/schemas/Command.Info"
}
}
},
@@ -6870,7 +7353,7 @@
"/api/skill": {
"get": {
"tags": [
"skills"
"skill"
],
"operationId": "v2.skill.list",
"parameters": [
@@ -6930,7 +7413,7 @@
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SkillV2.Info"
"$ref": "#/components/schemas/Skill.Info"
}
}
},
@@ -6971,7 +7454,7 @@
"/api/event": {
"get": {
"tags": [
"events"
"event"
],
"operationId": "v2.event.subscribe",
"parameters": [],
@@ -7108,154 +7591,10 @@
}
}
},
"description": "Subscribe to native event payloads for the server. Volatile by contract: a slow consumer overflows and fails the stream, and events during disconnection are missed. Consumers that need reliability should combine the changes feed with durable session log reads.",
"description": "Subscribe to native event payloads for the server. Volatile by contract: a slow consumer overflows and fails the stream, and events during disconnection are missed.",
"summary": "Subscribe to events"
}
},
"/api/event/changes": {
"get": {
"tags": [
"events"
],
"operationId": "v2.event.changes",
"parameters": [],
"security": [],
"responses": {
"200": {
"description": "Success",
"content": {
"text/event-stream": {
"schema": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"event": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/EventLog.ChangeStream"
}
},
"required": [
"id",
"event",
"data"
],
"additionalProperties": false
},
"x-effect-stream": {
"encoding": "sse",
"causeSchema": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"_tag": {
"type": "string",
"enum": [
"Fail"
]
},
"error": {
"not": {}
}
},
"required": [
"_tag",
"error"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"_tag": {
"type": "string",
"enum": [
"Die"
]
},
"defect": {}
},
"required": [
"_tag",
"defect"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"_tag": {
"type": "string",
"enum": [
"Interrupt"
]
},
"fiberId": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
}
},
"required": [
"_tag",
"fiberId"
],
"additionalProperties": false
}
]
}
},
"errorSchema": {
"not": {}
},
"failureEvent": "effect/httpapi/stream/failure"
}
}
}
},
"400": {
"description": "InvalidRequestError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
}
}
}
},
"401": {
"description": "UnauthorizedError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
}
}
}
}
},
"description": "Payload-free hint channel: after an event commits, a subscriber eventually receives a hint for that aggregate with seq at or beyond the event, or a sweep-required marker. Hints coalesce to the latest seq per aggregate under backpressure and the stream never fails from overflow. No consumer may derive correctness from receiving a hint; correctness always comes from durable log reads plus the consumer's own checkpoint. A sweep-required marker is emitted first on every (re)subscribe and whenever hint retention is exceeded: treat every aggregate as potentially dirty and recover via bounded sweep plus log reads.",
"summary": "Subscribe to change hints"
}
},
"/api/pty": {
"get": {
"tags": [
@@ -7873,7 +8212,7 @@
"tags": [
"pty"
],
"operationId": "v2.pty.connectToken",
"operationId": "v2.pty.connect.token",
"parameters": [
{
"name": "ptyID",
@@ -8005,7 +8344,6 @@
"pty"
],
"operationId": "v2.pty.connect",
"x-websocket": true,
"parameters": [
{
"name": "ptyID",
@@ -8103,7 +8441,8 @@
}
},
"description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
"summary": "Connect to PTY session"
"summary": "Connect to PTY session",
"x-websocket": true
}
},
"/api/shell": {
@@ -8326,7 +8665,8 @@
}
},
"required": [
"command"
"command",
"timeout"
],
"additionalProperties": false
}
@@ -8556,6 +8896,151 @@
"summary": "Remove shell command"
}
},
"/api/shell/{id}/timeout": {
"patch": {
"tags": [
"shell"
],
"operationId": "v2.shell.timeout",
"parameters": [
{
"name": "id",
"in": "path",
"schema": {
"type": "string",
"allOf": [
{
"pattern": "^sh_"
}
]
},
"required": true
},
{
"name": "location",
"in": "query",
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"directory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"workspace": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"required": false,
"style": "deepObject",
"explode": true
}
],
"security": [],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"location": {
"$ref": "#/components/schemas/Location.Info"
},
"data": {
"$ref": "#/components/schemas/Shell1"
}
},
"required": [
"location",
"data"
],
"additionalProperties": false
}
}
}
},
"400": {
"description": "InvalidRequestError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
}
}
}
},
"401": {
"description": "UnauthorizedError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
}
}
}
},
"404": {
"description": "ShellNotFoundError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ShellNotFoundError"
}
}
}
}
},
"description": "Replace a running shell command's timeout from now, or clear it with zero.",
"summary": "Update shell timeout",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"timeout": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
}
},
"required": [
"timeout"
],
"additionalProperties": false
}
}
},
"required": true
}
}
},
"/api/shell/{id}/output": {
"get": {
"tags": [
@@ -8737,7 +9222,7 @@
"/api/question/request": {
"get": {
"tags": [
"session questions"
"question"
],
"operationId": "v2.question.request.list",
"parameters": [
@@ -8838,7 +9323,7 @@
"/api/session/{sessionID}/question": {
"get": {
"tags": [
"session questions"
"question"
],
"operationId": "v2.session.question.list",
"parameters": [
@@ -8925,7 +9410,7 @@
"/api/session/{sessionID}/question/{requestID}/reply": {
"post": {
"tags": [
"session questions"
"question"
],
"operationId": "v2.session.question.reply",
"parameters": [
@@ -9019,7 +9504,7 @@
"/api/session/{sessionID}/question/{requestID}/reject": {
"post": {
"tags": [
"session questions"
"question"
],
"operationId": "v2.session.question.reject",
"parameters": [
@@ -9715,7 +10200,7 @@
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SnapshotFileDiff"
"$ref": "#/components/schemas/FileDiff.Info"
}
}
},
@@ -9752,6 +10237,129 @@
"description": "Diff the working copy against HEAD (mode git) or the default-branch merge base (mode branch) for the requested location.",
"summary": "VCS diff"
}
},
"/api/debug/location": {
"get": {
"tags": [
"debug"
],
"operationId": "v2.debug.location.list",
"parameters": [],
"security": [],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Location.Ref"
}
}
}
}
},
"400": {
"description": "InvalidRequestError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
}
}
}
},
"401": {
"description": "UnauthorizedError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
}
}
}
}
},
"description": "List locations currently loaded by the server.",
"summary": "List loaded locations"
},
"delete": {
"tags": [
"debug"
],
"operationId": "v2.debug.location.evict",
"parameters": [
{
"name": "location",
"in": "query",
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"directory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"workspace": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"required": false,
"style": "deepObject",
"explode": true
}
],
"security": [],
"responses": {
"204": {
"description": "<No Content>"
},
"400": {
"description": "InvalidRequestError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InvalidRequestError"
}
}
}
},
"401": {
"description": "UnauthorizedError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedError"
}
}
}
}
},
"description": "Dispose the requested location's cached services so its next use boots them fresh.",
"summary": "Evict a loaded location"
}
}
},
"components": {
@@ -9954,12 +10562,15 @@
"$ref": "#/components/schemas/PermissionV2.Rule"
}
},
"AgentV2.Info": {
"Agent.Info": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"model": {
"$ref": "#/components/schemas/Model.Ref"
},
@@ -10000,6 +10611,7 @@
},
"required": [
"id",
"name",
"request",
"mode",
"hidden",
@@ -10019,6 +10631,46 @@
],
"additionalProperties": false
},
"Money.USD": {
"type": "number"
},
"TokenUsage.Info": {
"type": "object",
"properties": {
"input": {
"type": "number"
},
"output": {
"type": "number"
},
"reasoning": {
"type": "number"
},
"cache": {
"type": "object",
"properties": {
"read": {
"type": "number"
},
"write": {
"type": "number"
}
},
"required": [
"read",
"write"
],
"additionalProperties": false
}
},
"required": [
"input",
"output",
"reasoning",
"cache"
],
"additionalProperties": false
},
"Location.Ref": {
"type": "object",
"properties": {
@@ -10039,19 +10691,14 @@
],
"additionalProperties": false
},
"File.Diff": {
"FileDiff.Info": {
"type": "object",
"properties": {
"path": {
"file": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"added",
"modified",
"deleted"
]
"patch": {
"type": "string"
},
"additions": {
"type": "integer",
@@ -10069,20 +10716,25 @@
}
]
},
"patch": {
"type": "string"
"status": {
"type": "string",
"enum": [
"added",
"deleted",
"modified"
]
}
},
"required": [
"path",
"status",
"file",
"patch",
"additions",
"deletions",
"patch"
"status"
],
"additionalProperties": false
},
"Revert.State": {
"Session.Revert": {
"type": "object",
"properties": {
"messageID": {
@@ -10099,13 +10751,10 @@
"snapshot": {
"type": "string"
},
"diff": {
"type": "string"
},
"files": {
"type": "array",
"items": {
"$ref": "#/components/schemas/File.Diff"
"$ref": "#/components/schemas/FileDiff.Info"
}
}
},
@@ -10114,7 +10763,7 @@
],
"additionalProperties": false
},
"SessionV2.Info": {
"Session.Info": {
"type": "object",
"properties": {
"id": {
@@ -10133,6 +10782,31 @@
}
]
},
"fork": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"messageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
}
},
"required": [
"sessionID"
],
"additionalProperties": false
},
"projectID": {
"type": "string"
},
@@ -10143,44 +10817,10 @@
"$ref": "#/components/schemas/Model.Ref"
},
"cost": {
"type": "number"
"$ref": "#/components/schemas/Money.USD"
},
"tokens": {
"type": "object",
"properties": {
"input": {
"type": "number"
},
"output": {
"type": "number"
},
"reasoning": {
"type": "number"
},
"cache": {
"type": "object",
"properties": {
"read": {
"type": "number"
},
"write": {
"type": "number"
}
},
"required": [
"read",
"write"
],
"additionalProperties": false
}
},
"required": [
"input",
"output",
"reasoning",
"cache"
],
"additionalProperties": false
"$ref": "#/components/schemas/TokenUsage.Info"
},
"time": {
"type": "object",
@@ -10211,7 +10851,7 @@
"type": "string"
},
"revert": {
"$ref": "#/components/schemas/Revert.State"
"$ref": "#/components/schemas/Session.Revert"
}
},
"required": [
@@ -10225,32 +10865,15 @@
],
"additionalProperties": false
},
"SessionWatermarks": {
"type": "object",
"patternProperties": {
"^ses": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
}
},
"description": "Durable log seq each session's snapshot was computed at. Attach a live log read after the watermark to compose fetch and stream gap-free; apply a snapshot only where its watermark is at or beyond already-applied events. Sessions without durable events are absent."
},
"SessionsResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SessionV2.Info"
"$ref": "#/components/schemas/Session.Info"
}
},
"watermarks": {
"$ref": "#/components/schemas/SessionWatermarks"
},
"cursor": {
"type": "object",
"properties": {
@@ -10280,7 +10903,6 @@
},
"required": [
"data",
"watermarks",
"cursor"
],
"additionalProperties": false
@@ -10408,7 +11030,7 @@
],
"additionalProperties": false
},
"Prompt.Source": {
"Prompt.Mention": {
"type": "object",
"properties": {
"start": {
@@ -10440,8 +11062,8 @@
"description": {
"type": "string"
},
"source": {
"$ref": "#/components/schemas/Prompt.Source"
"mention": {
"$ref": "#/components/schemas/Prompt.Mention"
}
},
"required": [
@@ -10455,8 +11077,8 @@
"name": {
"type": "string"
},
"source": {
"$ref": "#/components/schemas/Prompt.Source"
"mention": {
"$ref": "#/components/schemas/Prompt.Mention"
}
},
"required": [
@@ -10488,28 +11110,78 @@
],
"additionalProperties": false
},
"Prompt.Base64": {
"type": "string",
"allOf": [
{
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
}
]
},
"Prompt.FileSource": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"inline"
]
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"uri"
]
},
"uri": {
"type": "string"
}
},
"required": [
"type",
"uri"
],
"additionalProperties": false
}
]
},
"Prompt.FileAttachment": {
"type": "object",
"properties": {
"uri": {
"type": "string"
"data": {
"$ref": "#/components/schemas/Prompt.Base64"
},
"mime": {
"type": "string"
},
"source": {
"$ref": "#/components/schemas/Prompt.FileSource"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"source": {
"$ref": "#/components/schemas/Prompt.Source"
"mention": {
"$ref": "#/components/schemas/Prompt.Mention"
}
},
"required": [
"uri",
"mime"
"data",
"mime",
"source"
],
"additionalProperties": false
},
@@ -10694,26 +11366,57 @@
],
"additionalProperties": false
},
"SessionBusyError": {
"SessionInput.Compaction": {
"type": "object",
"properties": {
"_tag": {
"type": {
"type": "string",
"enum": [
"SessionBusyError"
"compaction"
]
},
"admittedSeq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"id": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"sessionID": {
"type": "string"
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"message": {
"type": "string"
"timeCreated": {
"type": "number"
},
"handledSeq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
}
},
"required": [
"_tag",
"type",
"admittedSeq",
"id",
"sessionID",
"message"
"timeCreated"
],
"additionalProperties": false
},
@@ -10746,6 +11449,29 @@
],
"additionalProperties": false
},
"SessionBusyError": {
"type": "object",
"properties": {
"_tag": {
"type": "string",
"enum": [
"SessionBusyError"
]
},
"sessionID": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"_tag",
"sessionID",
"message"
],
"additionalProperties": false
},
"UnknownError": {
"type": "object",
"properties": {
@@ -10775,7 +11501,7 @@
],
"additionalProperties": false
},
"Session.Message.AgentSwitched": {
"Session.Message.AgentSelected": {
"type": "object",
"properties": {
"id": {
@@ -10819,7 +11545,7 @@
],
"additionalProperties": false
},
"Session.Message.ModelSwitched": {
"Session.Message.ModelSelected": {
"type": "object",
"properties": {
"id": {
@@ -10853,6 +11579,9 @@
},
"model": {
"$ref": "#/components/schemas/Model.Ref"
},
"previous": {
"$ref": "#/components/schemas/Model.Ref"
}
},
"required": [
@@ -10945,14 +11674,6 @@
],
"additionalProperties": false
},
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"text": {
"type": "string"
},
@@ -10969,7 +11690,6 @@
"required": [
"id",
"time",
"sessionID",
"text",
"type"
],
@@ -11051,6 +11771,9 @@
"skill"
]
},
"skill": {
"type": "string"
},
"name": {
"type": "string"
},
@@ -11062,6 +11785,7 @@
"id",
"time",
"type",
"skill",
"name",
"text"
],
@@ -11102,23 +11826,105 @@
"shell"
]
},
"callID": {
"type": "string"
"shellID": {
"type": "string",
"allOf": [
{
"pattern": "^sh_"
}
]
},
"command": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"running",
"exited",
"timeout",
"killed"
]
},
"exit": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"enum": [
"NaN"
]
},
{
"type": "string",
"enum": [
"Infinity"
]
},
{
"type": "string",
"enum": [
"-Infinity"
]
}
]
},
{
"type": "string",
"enum": [
"Infinity",
"-Infinity",
"NaN"
]
}
]
},
"output": {
"type": "string"
"type": "object",
"properties": {
"output": {
"type": "string"
},
"cursor": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"size": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"truncated": {
"type": "boolean"
}
},
"required": [
"output",
"cursor",
"size",
"truncated"
],
"additionalProperties": false
}
},
"required": [
"id",
"time",
"type",
"callID",
"shellID",
"command",
"output"
"status"
],
"additionalProperties": false
},
@@ -11131,25 +11937,18 @@
"text"
]
},
"id": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"type",
"id",
"text"
],
"additionalProperties": false
},
"LLM.ProviderMetadata": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"Session.Message.ProviderState": {
"type": "object"
},
"Session.Message.Assistant.Reasoning": {
"type": "object",
@@ -11160,14 +11959,11 @@
"reasoning"
]
},
"id": {
"type": "string"
},
"text": {
"type": "string"
},
"providerMetadata": {
"$ref": "#/components/schemas/LLM.ProviderMetadata"
"state": {
"$ref": "#/components/schemas/Session.Message.ProviderState"
},
"time": {
"type": "object",
@@ -11187,18 +11983,17 @@
},
"required": [
"type",
"id",
"text"
],
"additionalProperties": false
},
"Session.Message.ToolState.Pending": {
"Session.Message.ToolState.Streaming": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"pending"
"streaming"
]
},
"input": {
@@ -11308,24 +12103,12 @@
"input": {
"type": "object"
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Prompt.FileAttachment"
}
},
"content": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LLM.ToolContent"
}
},
"outputPaths": {
"type": "array",
"items": {
"type": "string"
}
},
"structured": {
"type": "object"
},
@@ -11339,14 +12122,11 @@
],
"additionalProperties": false
},
"Session.Error.Unknown": {
"Session.StructuredError": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"unknown"
]
"type": "string"
},
"message": {
"type": "string"
@@ -11380,7 +12160,7 @@
"type": "object"
},
"error": {
"$ref": "#/components/schemas/Session.Error.Unknown"
"$ref": "#/components/schemas/Session.StructuredError"
},
"result": {}
},
@@ -11408,28 +12188,19 @@
"name": {
"type": "string"
},
"provider": {
"type": "object",
"properties": {
"executed": {
"type": "boolean"
},
"metadata": {
"$ref": "#/components/schemas/LLM.ProviderMetadata"
},
"resultMetadata": {
"$ref": "#/components/schemas/LLM.ProviderMetadata"
}
},
"required": [
"executed"
],
"additionalProperties": false
"executed": {
"type": "boolean"
},
"providerState": {
"$ref": "#/components/schemas/Session.Message.ProviderState"
},
"providerResultState": {
"$ref": "#/components/schemas/Session.Message.ProviderState"
},
"state": {
"anyOf": [
{
"$ref": "#/components/schemas/Session.Message.ToolState.Pending"
"$ref": "#/components/schemas/Session.Message.ToolState.Streaming"
},
{
"$ref": "#/components/schemas/Session.Message.ToolState.Running"
@@ -11453,9 +12224,6 @@
},
"completed": {
"type": "number"
},
"pruned": {
"type": "number"
}
},
"required": [
@@ -11473,6 +12241,31 @@
],
"additionalProperties": false
},
"Session.Message.Assistant.Retry": {
"type": "object",
"properties": {
"attempt": {
"type": "integer",
"allOf": [
{
"exclusiveMinimum": 0
}
]
},
"at": {
"type": "number"
},
"error": {
"$ref": "#/components/schemas/Session.StructuredError"
}
},
"required": [
"attempt",
"at",
"error"
],
"additionalProperties": false
},
"Session.Message.Assistant": {
"type": "object",
"properties": {
@@ -11549,50 +12342,27 @@
"additionalProperties": false
},
"finish": {
"type": "string"
"type": "string",
"enum": [
"stop",
"length",
"tool-calls",
"content-filter",
"error",
"unknown"
]
},
"cost": {
"type": "number"
"$ref": "#/components/schemas/Money.USD"
},
"tokens": {
"type": "object",
"properties": {
"input": {
"type": "number"
},
"output": {
"type": "number"
},
"reasoning": {
"type": "number"
},
"cache": {
"type": "object",
"properties": {
"read": {
"type": "number"
},
"write": {
"type": "number"
}
},
"required": [
"read",
"write"
],
"additionalProperties": false
}
},
"required": [
"input",
"output",
"reasoning",
"cache"
],
"additionalProperties": false
"$ref": "#/components/schemas/TokenUsage.Info"
},
"error": {
"$ref": "#/components/schemas/Session.Error.Unknown"
"$ref": "#/components/schemas/Session.StructuredError"
},
"retry": {
"$ref": "#/components/schemas/Session.Message.Assistant.Retry"
}
},
"required": [
@@ -11605,7 +12375,7 @@
],
"additionalProperties": false
},
"Session.Message.Compaction": {
"Session.Message.Compaction.Running": {
"type": "object",
"properties": {
"type": {
@@ -11614,19 +12384,6 @@
"compaction"
]
},
"reason": {
"type": "string",
"enum": [
"auto",
"manual"
]
},
"summary": {
"type": "string"
},
"recent": {
"type": "string"
},
"id": {
"type": "string",
"allOf": [
@@ -11649,25 +12406,180 @@
"created"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"running"
]
},
"reason": {
"type": "string",
"enum": [
"auto",
"manual"
]
},
"summary": {
"type": "string"
},
"recent": {
"type": "string"
}
},
"required": [
"type",
"id",
"time",
"status",
"reason",
"summary",
"recent",
"id",
"time"
"recent"
],
"additionalProperties": false
},
"Session.Message": {
"Session.Message.Compaction.Completed": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"compaction"
]
},
"id": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"metadata": {
"type": "object"
},
"time": {
"type": "object",
"properties": {
"created": {
"type": "number"
}
},
"required": [
"created"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"completed"
]
},
"reason": {
"type": "string",
"enum": [
"auto",
"manual"
]
},
"summary": {
"type": "string"
},
"recent": {
"type": "string"
}
},
"required": [
"type",
"id",
"time",
"status",
"reason",
"summary",
"recent"
],
"additionalProperties": false
},
"Session.Message.Compaction.Failed": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"compaction"
]
},
"id": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"metadata": {
"type": "object"
},
"time": {
"type": "object",
"properties": {
"created": {
"type": "number"
}
},
"required": [
"created"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"failed"
]
},
"reason": {
"type": "string",
"enum": [
"auto",
"manual"
]
},
"error": {
"$ref": "#/components/schemas/Session.StructuredError"
}
},
"required": [
"type",
"id",
"time",
"status",
"reason",
"error"
],
"additionalProperties": false
},
"Session.Message.Compaction": {
"anyOf": [
{
"$ref": "#/components/schemas/Session.Message.AgentSwitched"
"$ref": "#/components/schemas/Session.Message.Compaction.Running"
},
{
"$ref": "#/components/schemas/Session.Message.ModelSwitched"
"$ref": "#/components/schemas/Session.Message.Compaction.Completed"
},
{
"$ref": "#/components/schemas/Session.Message.Compaction.Failed"
}
]
},
"Session.Message.Info": {
"anyOf": [
{
"$ref": "#/components/schemas/Session.Message.AgentSelected"
},
{
"$ref": "#/components/schemas/Session.Message.ModelSelected"
},
{
"$ref": "#/components/schemas/Session.Message.User"
@@ -11697,7 +12609,7 @@
"allOf": [
{
"pattern": "^[a-z0-9][a-z0-9._-]*$",
"description": "Context entry key (lowercase alphanumerics plus . _ -)"
"description": "Instruction entry key (lowercase alphanumerics plus . _ -)"
}
]
},
@@ -11715,7 +12627,7 @@
],
"additionalProperties": false
},
"session.next.agent.switched": {
"session.agent.selected": {
"type": "object",
"properties": {
"id": {
@@ -11726,13 +12638,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.agent.switched"
"session.agent.selected"
]
},
"durable": {
@@ -11750,11 +12665,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -11771,9 +12684,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -11782,22 +12692,12 @@
}
]
},
"messageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"agent": {
"type": "string"
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"agent"
],
"additionalProperties": false
@@ -11805,12 +12705,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.model.switched": {
"session.model.selected": {
"type": "object",
"properties": {
"id": {
@@ -11821,13 +12723,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.model.switched"
"session.model.selected"
]
},
"durable": {
@@ -11845,11 +12750,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -11866,9 +12769,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -11877,22 +12777,12 @@
}
]
},
"messageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"model": {
"$ref": "#/components/schemas/Model.Ref"
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"model"
],
"additionalProperties": false
@@ -11900,12 +12790,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.moved": {
"session.moved": {
"type": "object",
"properties": {
"id": {
@@ -11916,13 +12808,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.moved"
"session.moved"
]
},
"durable": {
@@ -11940,11 +12835,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -11961,9 +12854,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -11975,12 +12865,11 @@
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"subdirectory": {
"subpath": {
"type": "string"
}
},
"required": [
"timestamp",
"sessionID",
"location"
],
@@ -11989,12 +12878,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.renamed": {
"session.renamed": {
"type": "object",
"properties": {
"id": {
@@ -12005,13 +12896,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.renamed"
"session.renamed"
]
},
"durable": {
@@ -12029,11 +12923,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -12050,9 +12942,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -12066,7 +12955,6 @@
}
},
"required": [
"timestamp",
"sessionID",
"title"
],
@@ -12075,12 +12963,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.forked": {
"session.deleted": {
"type": "object",
"properties": {
"id": {
@@ -12091,13 +12981,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.forked"
"session.deleted"
]
},
"durable": {
@@ -12115,11 +13008,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
2
]
}
},
@@ -12136,9 +13027,87 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
}
},
"required": [
"sessionID"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.forked": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.forked"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
@@ -12155,7 +13124,7 @@
}
]
},
"messageID": {
"from": {
"type": "string",
"allOf": [
{
@@ -12165,7 +13134,6 @@
}
},
"required": [
"timestamp",
"sessionID",
"parentID"
],
@@ -12174,12 +13142,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.prompted": {
"session.prompt.promoted": {
"type": "object",
"properties": {
"id": {
@@ -12190,13 +13160,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.prompted"
"session.prompt.promoted"
]
},
"durable": {
@@ -12214,11 +13187,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -12235,9 +13206,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -12246,7 +13214,97 @@
}
]
},
"messageID": {
"inputID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
}
},
"required": [
"sessionID",
"inputID"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.prompt.admitted": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.prompt.admitted"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"inputID": {
"type": "string",
"allOf": [
{
@@ -12266,9 +13324,8 @@
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"inputID",
"prompt",
"delivery"
],
@@ -12277,12 +13334,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.prompt.admitted": {
"session.execution.started": {
"type": "object",
"properties": {
"id": {
@@ -12293,13 +13352,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.prompt.admitted"
"session.execution.started"
]
},
"durable": {
@@ -12317,11 +13379,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -12338,9 +13398,168 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
}
},
"required": [
"sessionID"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.execution.succeeded": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.execution.succeeded"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
}
},
"required": [
"sessionID"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.execution.failed": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.execution.failed"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
@@ -12349,43 +13568,117 @@
}
]
},
"messageID": {
"type": "string",
"error": {
"$ref": "#/components/schemas/Session.StructuredError"
}
},
"required": [
"sessionID",
"error"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.execution.interrupted": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.execution.interrupted"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"pattern": "^msg_"
"minimum": 0
}
]
},
"prompt": {
"$ref": "#/components/schemas/Prompt"
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"delivery": {
"reason": {
"type": "string",
"enum": [
"steer",
"queue"
"user",
"shutdown",
"superseded"
]
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"prompt",
"delivery"
"reason"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.instructions.updated": {
"session.instructions.updated": {
"type": "object",
"properties": {
"id": {
@@ -12396,13 +13689,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.instructions.updated"
"session.instructions.updated"
]
},
"durable": {
@@ -12420,11 +13716,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -12441,9 +13735,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -12452,22 +13743,12 @@
}
]
},
"messageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"text": {
"type": "string"
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"text"
],
"additionalProperties": false
@@ -12475,12 +13756,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.synthetic": {
"session.synthetic": {
"type": "object",
"properties": {
"id": {
@@ -12491,13 +13774,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.synthetic"
"session.synthetic"
]
},
"durable": {
@@ -12515,11 +13801,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -12536,9 +13820,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -12547,14 +13828,6 @@
}
]
},
"messageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"text": {
"type": "string"
},
@@ -12566,9 +13839,7 @@
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"text"
],
"additionalProperties": false
@@ -12576,12 +13847,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.skill.activated": {
"session.skill.activated": {
"type": "object",
"properties": {
"id": {
@@ -12592,13 +13865,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.skill.activated"
"session.skill.activated"
]
},
"durable": {
@@ -12616,11 +13892,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -12637,9 +13911,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -12648,13 +13919,8 @@
}
]
},
"messageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
"id": {
"type": "string"
},
"name": {
"type": "string"
@@ -12664,9 +13930,8 @@
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"id",
"name",
"text"
],
@@ -12675,111 +13940,154 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.shell.started": {
"Shell": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
"pattern": "^sh_"
}
]
},
"status": {
"type": "string",
"enum": [
"running",
"exited",
"timeout",
"killed"
]
},
"command": {
"type": "string"
},
"cwd": {
"type": "string"
},
"shell": {
"type": "string"
},
"file": {
"type": "string"
},
"pid": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"exit": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"enum": [
"NaN"
]
},
{
"type": "string",
"enum": [
"Infinity"
]
},
{
"type": "string",
"enum": [
"-Infinity"
]
}
]
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.shell.started"
]
},
"durable": {
"time": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
"started": {
"anyOf": [
{
"minimum": 0
"type": "number"
},
{
"type": "string",
"enum": [
"NaN"
]
},
{
"type": "string",
"enum": [
"Infinity"
]
},
{
"type": "string",
"enum": [
"-Infinity"
]
}
]
},
"version": {
"type": "integer",
"allOf": [
"completed": {
"anyOf": [
{
"minimum": 1
"type": "number"
},
{
"type": "string",
"enum": [
"NaN"
]
},
{
"type": "string",
"enum": [
"Infinity"
]
},
{
"type": "string",
"enum": [
"-Infinity"
]
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"messageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"callID": {
"type": "string"
},
"command": {
"type": "string"
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"callID",
"command"
"started"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"data"
"status",
"command",
"cwd",
"shell",
"file",
"metadata",
"time"
],
"additionalProperties": false
},
"session.next.shell.ended": {
"session.shell.started": {
"type": "object",
"properties": {
"id": {
@@ -12790,13 +14098,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.shell.ended"
"session.shell.started"
]
},
"durable": {
@@ -12814,11 +14125,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -12835,9 +14144,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -12846,17 +14152,132 @@
}
]
},
"callID": {
"type": "string"
},
"output": {
"type": "string"
"shell": {
"$ref": "#/components/schemas/Shell"
}
},
"required": [
"timestamp",
"sessionID",
"callID",
"shell"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.shell.ended": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.shell.ended"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"shell": {
"$ref": "#/components/schemas/Shell"
},
"output": {
"type": "object",
"properties": {
"output": {
"type": "string"
},
"cursor": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"size": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"truncated": {
"type": "boolean"
}
},
"required": [
"output",
"cursor",
"size",
"truncated"
],
"additionalProperties": false
}
},
"required": [
"sessionID",
"shell",
"output"
],
"additionalProperties": false
@@ -12864,12 +14285,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.step.started": {
"session.step.started": {
"type": "object",
"properties": {
"id": {
@@ -12880,13 +14303,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.step.started"
"session.step.started"
]
},
"durable": {
@@ -12904,11 +14330,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -12925,9 +14349,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -12955,7 +14376,6 @@
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"agent",
@@ -12966,12 +14386,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.step.ended": {
"session.step.ended": {
"type": "object",
"properties": {
"id": {
@@ -12982,13 +14404,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.step.ended"
"session.step.ended"
]
},
"durable": {
@@ -13006,11 +14431,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -13027,9 +14450,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -13047,47 +14467,21 @@
]
},
"finish": {
"type": "string"
"type": "string",
"enum": [
"stop",
"length",
"tool-calls",
"content-filter",
"error",
"unknown"
]
},
"cost": {
"type": "number"
"$ref": "#/components/schemas/Money.USD"
},
"tokens": {
"type": "object",
"properties": {
"input": {
"type": "number"
},
"output": {
"type": "number"
},
"reasoning": {
"type": "number"
},
"cache": {
"type": "object",
"properties": {
"read": {
"type": "number"
},
"write": {
"type": "number"
}
},
"required": [
"read",
"write"
],
"additionalProperties": false
}
},
"required": [
"input",
"output",
"reasoning",
"cache"
],
"additionalProperties": false
"$ref": "#/components/schemas/TokenUsage.Info"
},
"snapshot": {
"type": "string"
@@ -13100,7 +14494,6 @@
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"finish",
@@ -13112,12 +14505,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.step.failed": {
"session.step.failed": {
"type": "object",
"properties": {
"id": {
@@ -13128,13 +14523,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.step.failed"
"session.step.failed"
]
},
"durable": {
@@ -13152,11 +14550,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -13173,9 +14569,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -13193,11 +14586,16 @@
]
},
"error": {
"$ref": "#/components/schemas/Session.Error.Unknown"
"$ref": "#/components/schemas/Session.StructuredError"
},
"cost": {
"$ref": "#/components/schemas/Money.USD"
},
"tokens": {
"$ref": "#/components/schemas/TokenUsage.Info"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"error"
@@ -13207,12 +14605,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.text.started": {
"session.text.started": {
"type": "object",
"properties": {
"id": {
@@ -13223,13 +14623,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.text.started"
"session.text.started"
]
},
"durable": {
@@ -13247,11 +14650,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -13268,9 +14669,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -13287,27 +14685,33 @@
}
]
},
"textID": {
"type": "string"
"ordinal": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"textID"
"ordinal"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.text.ended": {
"session.text.ended": {
"type": "object",
"properties": {
"id": {
@@ -13318,13 +14722,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.text.ended"
"session.text.ended"
]
},
"durable": {
@@ -13342,11 +14749,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -13363,9 +14768,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -13382,18 +14784,22 @@
}
]
},
"textID": {
"type": "string"
"ordinal": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"text": {
"type": "string"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"textID",
"ordinal",
"text"
],
"additionalProperties": false
@@ -13401,12 +14807,17 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.tool.input.started": {
"Session.Message.ProviderState3": {
"type": "object"
},
"session.reasoning.started": {
"type": "object",
"properties": {
"id": {
@@ -13417,13 +14828,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.tool.input.started"
"session.reasoning.started"
]
},
"durable": {
@@ -13441,11 +14855,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -13462,9 +14874,217 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"assistantMessageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"ordinal": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"state": {
"$ref": "#/components/schemas/Session.Message.ProviderState3"
}
},
"required": [
"sessionID",
"assistantMessageID",
"ordinal"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"Session.Message.ProviderState4": {
"type": "object"
},
"session.reasoning.ended": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.reasoning.ended"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"assistantMessageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"ordinal": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"text": {
"type": "string"
},
"state": {
"$ref": "#/components/schemas/Session.Message.ProviderState4"
}
},
"required": [
"sessionID",
"assistantMessageID",
"ordinal",
"text"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.tool.input.started": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.tool.input.started"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
@@ -13489,7 +15109,6 @@
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"callID",
@@ -13500,12 +15119,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.tool.input.ended": {
"session.tool.input.ended": {
"type": "object",
"properties": {
"id": {
@@ -13516,13 +15137,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.tool.input.ended"
"session.tool.input.ended"
]
},
"durable": {
@@ -13540,11 +15164,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -13561,9 +15183,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -13588,7 +15207,6 @@
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"callID",
@@ -13599,18 +15217,17 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"LLM.ProviderMetadata3": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"Session.Message.ProviderState5": {
"type": "object"
},
"session.next.tool.called": {
"session.tool.called": {
"type": "object",
"properties": {
"id": {
@@ -13621,13 +15238,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.tool.called"
"session.tool.called"
]
},
"durable": {
@@ -13645,11 +15265,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -13666,9 +15284,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -13688,48 +15303,36 @@
"callID": {
"type": "string"
},
"tool": {
"type": "string"
},
"input": {
"type": "object"
},
"provider": {
"type": "object",
"properties": {
"executed": {
"type": "boolean"
},
"metadata": {
"$ref": "#/components/schemas/LLM.ProviderMetadata3"
}
},
"required": [
"executed"
],
"additionalProperties": false
"executed": {
"type": "boolean"
},
"state": {
"$ref": "#/components/schemas/Session.Message.ProviderState5"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"callID",
"tool",
"input",
"provider"
"executed"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.tool.progress": {
"session.tool.progress": {
"type": "object",
"properties": {
"id": {
@@ -13740,13 +15343,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.tool.progress"
"session.tool.progress"
]
},
"durable": {
@@ -13764,11 +15370,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -13785,9 +15389,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -13818,7 +15419,6 @@
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"callID",
@@ -13830,18 +15430,17 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"LLM.ProviderMetadata4": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"Session.Message.ProviderState6": {
"type": "object"
},
"session.next.tool.success": {
"session.tool.success": {
"type": "object",
"properties": {
"id": {
@@ -13852,13 +15451,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.tool.success"
"session.tool.success"
]
},
"durable": {
@@ -13876,11 +15478,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -13897,9 +15497,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -13928,55 +15525,38 @@
"$ref": "#/components/schemas/LLM.ToolContent"
}
},
"outputPaths": {
"type": "array",
"items": {
"type": "string"
}
},
"result": {},
"provider": {
"type": "object",
"properties": {
"executed": {
"type": "boolean"
},
"metadata": {
"$ref": "#/components/schemas/LLM.ProviderMetadata4"
}
},
"required": [
"executed"
],
"additionalProperties": false
"executed": {
"type": "boolean"
},
"resultState": {
"$ref": "#/components/schemas/Session.Message.ProviderState6"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"callID",
"structured",
"content",
"provider"
"executed"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"LLM.ProviderMetadata5": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"Session.Message.ProviderState7": {
"type": "object"
},
"session.next.tool.failed": {
"session.tool.failed": {
"type": "object",
"properties": {
"id": {
@@ -13987,13 +15567,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.tool.failed"
"session.tool.failed"
]
},
"durable": {
@@ -14011,11 +15594,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -14032,9 +15613,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -14055,50 +15633,36 @@
"type": "string"
},
"error": {
"$ref": "#/components/schemas/Session.Error.Unknown"
"$ref": "#/components/schemas/Session.StructuredError"
},
"result": {},
"provider": {
"type": "object",
"properties": {
"executed": {
"type": "boolean"
},
"metadata": {
"$ref": "#/components/schemas/LLM.ProviderMetadata5"
}
},
"required": [
"executed"
],
"additionalProperties": false
"executed": {
"type": "boolean"
},
"resultState": {
"$ref": "#/components/schemas/Session.Message.ProviderState7"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"callID",
"error",
"provider"
"executed"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"LLM.ProviderMetadata6": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"session.next.reasoning.started": {
"session.retry.scheduled": {
"type": "object",
"properties": {
"id": {
@@ -14109,253 +15673,16 @@
}
]
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.reasoning.started"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"assistantMessageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"reasoningID": {
"type": "string"
},
"providerMetadata": {
"$ref": "#/components/schemas/LLM.ProviderMetadata6"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"reasoningID"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"data"
],
"additionalProperties": false
},
"LLM.ProviderMetadata7": {
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"session.next.reasoning.ended": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.reasoning.ended"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"assistantMessageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"reasoningID": {
"type": "string"
},
"text": {
"type": "string"
},
"providerMetadata": {
"$ref": "#/components/schemas/LLM.ProviderMetadata7"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"reasoningID",
"text"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"data"
],
"additionalProperties": false
},
"session.next.retry_error": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"statusCode": {
"created": {
"type": "number"
},
"isRetryable": {
"type": "boolean"
},
"responseHeaders": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"responseBody": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"message",
"isRetryable"
],
"additionalProperties": false
},
"session.next.retried": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.retried"
"session.retry.scheduled"
]
},
"durable": {
@@ -14373,11 +15700,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -14394,9 +15719,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -14405,17 +15727,39 @@
}
]
},
"assistantMessageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"attempt": {
"type": "number"
"type": "integer",
"allOf": [
{
"exclusiveMinimum": 0
}
]
},
"at": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"error": {
"$ref": "#/components/schemas/session.next.retry_error"
"$ref": "#/components/schemas/Session.StructuredError"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"attempt",
"at",
"error"
],
"additionalProperties": false
@@ -14423,12 +15767,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.compaction.started": {
"session.compaction.admitted": {
"type": "object",
"properties": {
"id": {
@@ -14439,13 +15785,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.compaction.started"
"session.compaction.admitted"
]
},
"durable": {
@@ -14463,11 +15812,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -14484,9 +15831,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -14495,13 +15839,95 @@
}
]
},
"messageID": {
"inputID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
}
},
"required": [
"sessionID",
"inputID"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.compaction.started": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.compaction.started"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"reason": {
"type": "string",
@@ -14509,25 +15935,37 @@
"auto",
"manual"
]
},
"recent": {
"type": "string"
},
"inputID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"reason"
"reason",
"recent"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.compaction.ended": {
"session.compaction.ended": {
"type": "object",
"properties": {
"id": {
@@ -14538,13 +15976,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.compaction.ended"
"session.compaction.ended"
]
},
"durable": {
@@ -14562,11 +16003,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -14583,9 +16022,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -14594,14 +16030,6 @@
}
]
},
"messageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"reason": {
"type": "string",
"enum": [
@@ -14617,9 +16045,7 @@
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"reason",
"text",
"recent"
@@ -14629,12 +16055,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.revert.staged": {
"session.compaction.failed": {
"type": "object",
"properties": {
"id": {
@@ -14645,13 +16073,16 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.revert.staged"
"session.compaction.failed"
]
},
"durable": {
@@ -14669,11 +16100,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -14690,9 +16119,6 @@
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -14701,175 +16127,17 @@
}
]
},
"revert": {
"$ref": "#/components/schemas/Revert.State"
}
},
"required": [
"timestamp",
"sessionID",
"revert"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"data"
],
"additionalProperties": false
},
"session.next.revert.cleared": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.revert.cleared"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"reason": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
}
},
"required": [
"timestamp",
"sessionID"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"data"
],
"additionalProperties": false
},
"session.next.revert.committed": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.revert.committed"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
"enum": [
"auto",
"manual"
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
"error": {
"$ref": "#/components/schemas/Session.StructuredError"
},
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"messageID": {
"inputID": {
"type": "string",
"allOf": [
{
@@ -14879,114 +16147,393 @@
}
},
"required": [
"timestamp",
"sessionID",
"messageID"
"reason",
"error"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"SessionDurableEvent": {
"session.revert.staged": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.revert.staged"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"revert": {
"$ref": "#/components/schemas/Session.Revert"
}
},
"required": [
"sessionID",
"revert"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.revert.cleared": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.revert.cleared"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
}
},
"required": [
"sessionID"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.revert.committed": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.revert.committed"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"sessionID": {
"type": "string",
"allOf": [
{
"pattern": "^ses"
}
]
},
"to": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
}
},
"required": [
"sessionID",
"to"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"Session.Event.Durable": {
"oneOf": [
{
"$ref": "#/components/schemas/session.next.agent.switched"
"$ref": "#/components/schemas/session.agent.selected"
},
{
"$ref": "#/components/schemas/session.next.model.switched"
"$ref": "#/components/schemas/session.model.selected"
},
{
"$ref": "#/components/schemas/session.next.moved"
"$ref": "#/components/schemas/session.moved"
},
{
"$ref": "#/components/schemas/session.next.renamed"
"$ref": "#/components/schemas/session.renamed"
},
{
"$ref": "#/components/schemas/session.next.forked"
"$ref": "#/components/schemas/session.deleted"
},
{
"$ref": "#/components/schemas/session.next.prompted"
"$ref": "#/components/schemas/session.forked"
},
{
"$ref": "#/components/schemas/session.next.prompt.admitted"
"$ref": "#/components/schemas/session.prompt.promoted"
},
{
"$ref": "#/components/schemas/session.next.instructions.updated"
"$ref": "#/components/schemas/session.prompt.admitted"
},
{
"$ref": "#/components/schemas/session.next.synthetic"
"$ref": "#/components/schemas/session.execution.started"
},
{
"$ref": "#/components/schemas/session.next.skill.activated"
"$ref": "#/components/schemas/session.execution.succeeded"
},
{
"$ref": "#/components/schemas/session.next.shell.started"
"$ref": "#/components/schemas/session.execution.failed"
},
{
"$ref": "#/components/schemas/session.next.shell.ended"
"$ref": "#/components/schemas/session.execution.interrupted"
},
{
"$ref": "#/components/schemas/session.next.step.started"
"$ref": "#/components/schemas/session.instructions.updated"
},
{
"$ref": "#/components/schemas/session.next.step.ended"
"$ref": "#/components/schemas/session.synthetic"
},
{
"$ref": "#/components/schemas/session.next.step.failed"
"$ref": "#/components/schemas/session.skill.activated"
},
{
"$ref": "#/components/schemas/session.next.text.started"
"$ref": "#/components/schemas/session.shell.started"
},
{
"$ref": "#/components/schemas/session.next.text.ended"
"$ref": "#/components/schemas/session.shell.ended"
},
{
"$ref": "#/components/schemas/session.next.tool.input.started"
"$ref": "#/components/schemas/session.step.started"
},
{
"$ref": "#/components/schemas/session.next.tool.input.ended"
"$ref": "#/components/schemas/session.step.ended"
},
{
"$ref": "#/components/schemas/session.next.tool.called"
"$ref": "#/components/schemas/session.step.failed"
},
{
"$ref": "#/components/schemas/session.next.tool.progress"
"$ref": "#/components/schemas/session.text.started"
},
{
"$ref": "#/components/schemas/session.next.tool.success"
"$ref": "#/components/schemas/session.text.ended"
},
{
"$ref": "#/components/schemas/session.next.tool.failed"
"$ref": "#/components/schemas/session.reasoning.started"
},
{
"$ref": "#/components/schemas/session.next.reasoning.started"
"$ref": "#/components/schemas/session.reasoning.ended"
},
{
"$ref": "#/components/schemas/session.next.reasoning.ended"
"$ref": "#/components/schemas/session.tool.input.started"
},
{
"$ref": "#/components/schemas/session.next.retried"
"$ref": "#/components/schemas/session.tool.input.ended"
},
{
"$ref": "#/components/schemas/session.next.compaction.started"
"$ref": "#/components/schemas/session.tool.called"
},
{
"$ref": "#/components/schemas/session.next.compaction.ended"
"$ref": "#/components/schemas/session.tool.progress"
},
{
"$ref": "#/components/schemas/session.next.revert.staged"
"$ref": "#/components/schemas/session.tool.success"
},
{
"$ref": "#/components/schemas/session.next.revert.cleared"
"$ref": "#/components/schemas/session.tool.failed"
},
{
"$ref": "#/components/schemas/session.next.revert.committed"
"$ref": "#/components/schemas/session.retry.scheduled"
},
{
"$ref": "#/components/schemas/session.compaction.admitted"
},
{
"$ref": "#/components/schemas/session.compaction.started"
},
{
"$ref": "#/components/schemas/session.compaction.ended"
},
{
"$ref": "#/components/schemas/session.compaction.failed"
},
{
"$ref": "#/components/schemas/session.revert.staged"
},
{
"$ref": "#/components/schemas/session.revert.cleared"
},
{
"$ref": "#/components/schemas/session.revert.committed"
}
]
},
@@ -15021,7 +16568,7 @@
"SessionLogItem": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionDurableEvent"
"$ref": "#/components/schemas/Session.Event.Durable"
},
{
"$ref": "#/components/schemas/EventLog.Synced"
@@ -15041,17 +16588,9 @@
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Session.Message"
"$ref": "#/components/schemas/Session.Message.Info"
}
},
"watermark": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"cursor": {
"type": "object",
"properties": {
@@ -15085,65 +16624,6 @@
],
"additionalProperties": false
},
"Model.Api": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"aisdk"
]
},
"package": {
"type": "string"
},
"url": {
"type": "string"
},
"settings": {
"type": "object"
}
},
"required": [
"id",
"type",
"package"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"native"
]
},
"url": {
"type": "string"
},
"settings": {
"type": "object"
}
},
"required": [
"id",
"type",
"settings"
],
"additionalProperties": false
}
]
},
"Model.Capabilities": {
"type": "object",
"properties": {
@@ -15170,6 +16650,33 @@
],
"additionalProperties": false
},
"Model.Variant": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"settings": {
"type": "object"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "object"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"Money.USDPerMillionTokens": {
"type": "number"
},
"Model.Cost": {
"type": "object",
"properties": {
@@ -15193,19 +16700,19 @@
"additionalProperties": false
},
"input": {
"type": "number"
"$ref": "#/components/schemas/Money.USDPerMillionTokens"
},
"output": {
"type": "number"
"$ref": "#/components/schemas/Money.USDPerMillionTokens"
},
"cache": {
"type": "object",
"properties": {
"read": {
"type": "number"
"$ref": "#/components/schemas/Money.USDPerMillionTokens"
},
"write": {
"type": "number"
"$ref": "#/components/schemas/Money.USDPerMillionTokens"
}
},
"required": [
@@ -15222,12 +16729,15 @@
],
"additionalProperties": false
},
"ModelV2.Info": {
"Model.Info": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"modelID": {
"type": "string"
},
"providerID": {
"type": "string"
},
@@ -15237,66 +16747,28 @@
"name": {
"type": "string"
},
"api": {
"$ref": "#/components/schemas/Model.Api"
"package": {
"type": "string"
},
"settings": {
"type": "object"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "object"
},
"capabilities": {
"$ref": "#/components/schemas/Model.Capabilities"
},
"request": {
"type": "object",
"properties": {
"settings": {
"$ref": "#/components/schemas/Provider.Settings"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "object"
},
"variant": {
"type": "string"
}
},
"required": [
"settings",
"headers",
"body"
],
"additionalProperties": false
},
"variants": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"settings": {
"$ref": "#/components/schemas/Provider.Settings"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "object"
}
},
"required": [
"id",
"settings",
"headers",
"body"
],
"additionalProperties": false
"$ref": "#/components/schemas/Model.Variant"
}
},
"time": {
@@ -15351,11 +16823,10 @@
},
"required": [
"id",
"modelID",
"providerID",
"name",
"api",
"capabilities",
"request",
"variants",
"time",
"cost",
@@ -15386,63 +16857,6 @@
],
"additionalProperties": false
},
"Provider.AISDK": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"aisdk"
]
},
"package": {
"type": "string"
},
"url": {
"type": "string"
},
"settings": {
"type": "object"
}
},
"required": [
"type",
"package"
],
"additionalProperties": false
},
"Provider.Native": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"native"
]
},
"url": {
"type": "string"
},
"settings": {
"type": "object"
}
},
"required": [
"type",
"settings"
],
"additionalProperties": false
},
"Provider.Api": {
"anyOf": [
{
"$ref": "#/components/schemas/Provider.AISDK"
},
{
"$ref": "#/components/schemas/Provider.Native"
}
]
},
"ProviderV2.Info": {
"type": "object",
"properties": {
@@ -15458,18 +16872,26 @@
"disabled": {
"type": "boolean"
},
"api": {
"$ref": "#/components/schemas/Provider.Api"
"package": {
"type": "string"
},
"request": {
"$ref": "#/components/schemas/Provider.Request"
"settings": {
"type": "object"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "object"
}
},
"required": [
"id",
"name",
"api",
"request"
"package"
],
"additionalProperties": false
},
@@ -16305,13 +17727,13 @@
],
"additionalProperties": false
},
"Mcp.Status.Disconnected": {
"Mcp.Status.Pending": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"disconnected"
"pending"
]
}
},
@@ -16400,7 +17822,7 @@
"$ref": "#/components/schemas/Mcp.Status.Connected"
},
{
"$ref": "#/components/schemas/Mcp.Status.Disconnected"
"$ref": "#/components/schemas/Mcp.Status.Pending"
},
{
"$ref": "#/components/schemas/Mcp.Status.Disabled"
@@ -16426,6 +17848,185 @@
],
"additionalProperties": false
},
"Mcp.Resource": {
"type": "object",
"properties": {
"server": {
"type": "string"
},
"name": {
"type": "string"
},
"uri": {
"type": "string"
},
"description": {
"type": "string"
},
"mimeType": {
"type": "string"
}
},
"required": [
"server",
"name",
"uri"
],
"additionalProperties": false
},
"Mcp.ResourceTemplate": {
"type": "object",
"properties": {
"server": {
"type": "string"
},
"name": {
"type": "string"
},
"uriTemplate": {
"type": "string"
},
"description": {
"type": "string"
},
"mimeType": {
"type": "string"
}
},
"required": [
"server",
"name",
"uriTemplate"
],
"additionalProperties": false
},
"Mcp.ResourceCatalog": {
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Mcp.Resource"
}
},
"templates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Mcp.ResourceTemplate"
}
}
},
"required": [
"resources",
"templates"
],
"additionalProperties": false
},
"Project.Vcs": {
"type": "string",
"enum": [
"git",
"hg"
]
},
"Project.Icon": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"override": {
"type": "string"
},
"color": {
"type": "string"
}
},
"additionalProperties": false
},
"Project.Commands": {
"type": "object",
"properties": {
"start": {
"type": "string",
"description": "Startup script to run when creating a new workspace (worktree)"
}
},
"additionalProperties": false
},
"Project.Time": {
"type": "object",
"properties": {
"created": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"updated": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"initialized": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
}
},
"required": [
"created",
"updated"
],
"additionalProperties": false
},
"Project": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"worktree": {
"type": "string"
},
"vcs": {
"$ref": "#/components/schemas/Project.Vcs"
},
"name": {
"type": "string"
},
"icon": {
"$ref": "#/components/schemas/Project.Icon"
},
"commands": {
"$ref": "#/components/schemas/Project.Commands"
},
"time": {
"$ref": "#/components/schemas/Project.Time"
},
"sandboxes": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"worktree",
"time",
"sandboxes"
],
"additionalProperties": false
},
"Project.Current": {
"type": "object",
"properties": {
@@ -17538,7 +19139,7 @@
],
"additionalProperties": false
},
"CommandV2.Info": {
"Command.Info": {
"type": "object",
"properties": {
"name": {
@@ -17566,9 +19167,12 @@
],
"additionalProperties": false
},
"SkillV2.Info": {
"Skill.Info": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
@@ -17589,6 +19193,7 @@
}
},
"required": [
"id",
"name",
"location",
"content"
@@ -17606,6 +19211,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -17615,36 +19223,6 @@
"models-dev.refreshed"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -17661,6 +19239,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -17677,6 +19256,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -17686,36 +19268,6 @@
"integration.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -17732,6 +19284,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -17748,6 +19301,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -17757,36 +19313,6 @@
"integration.connection.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -17805,6 +19331,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -17821,6 +19348,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -17830,36 +19360,6 @@
"catalog.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -17876,6 +19376,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -17892,6 +19393,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -17901,36 +19405,6 @@
"agent.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -17947,12 +19421,13 @@
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"SnapshotFileDiff": {
"FileDiff.LegacyInfo": {
"type": "object",
"properties": {
"file": {
@@ -18016,7 +19491,7 @@
"$ref": "#/components/schemas/PermissionRule"
}
},
"Session": {
"SessionV1.Info": {
"type": "object",
"properties": {
"id": {
@@ -18070,7 +19545,7 @@
"diffs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SnapshotFileDiff"
"$ref": "#/components/schemas/FileDiff.LegacyInfo"
}
}
},
@@ -18258,6 +19733,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -18282,11 +19760,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -18312,7 +19788,7 @@
]
},
"info": {
"$ref": "#/components/schemas/Session"
"$ref": "#/components/schemas/SessionV1.Info"
}
},
"required": [
@@ -18324,7 +19800,9 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
@@ -18340,6 +19818,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -18364,11 +19845,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -18394,7 +19873,7 @@
]
},
"info": {
"$ref": "#/components/schemas/Session"
"$ref": "#/components/schemas/SessionV1.Info"
}
},
"required": [
@@ -18406,12 +19885,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.deleted": {
"session.deleted1": {
"type": "object",
"properties": {
"id": {
@@ -18422,6 +19903,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -18446,11 +19930,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -18476,7 +19958,7 @@
]
},
"info": {
"$ref": "#/components/schemas/Session"
"$ref": "#/components/schemas/SessionV1.Info"
}
},
"required": [
@@ -18488,7 +19970,9 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
@@ -18636,7 +20120,7 @@
"diffs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SnapshotFileDiff"
"$ref": "#/components/schemas/FileDiff.LegacyInfo"
}
}
},
@@ -19277,6 +20761,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -19301,11 +20788,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -19343,7 +20828,9 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
@@ -19359,6 +20846,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -19383,11 +20873,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -19430,7 +20918,9 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
@@ -20824,6 +22314,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -20848,11 +22341,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -20894,7 +22385,9 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
@@ -20910,6 +22403,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -20934,11 +22430,9 @@
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
"type": "number",
"enum": [
1
]
}
},
@@ -20990,12 +22484,14 @@
},
"required": [
"id",
"created",
"type",
"durable",
"data"
],
"additionalProperties": false
},
"session.next.execution.settled": {
"session.usage.updated": {
"type": "object",
"properties": {
"id": {
@@ -21006,54 +22502,24 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.execution.settled"
"session.usage.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -21062,34 +22528,30 @@
}
]
},
"outcome": {
"type": "string",
"enum": [
"success",
"failure",
"interrupted"
]
"cost": {
"$ref": "#/components/schemas/Money.USD"
},
"error": {
"$ref": "#/components/schemas/Session.Error.Unknown"
"tokens": {
"$ref": "#/components/schemas/TokenUsage.Info"
}
},
"required": [
"timestamp",
"sessionID",
"outcome"
"cost",
"tokens"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"session.next.text.delta": {
"session.text.delta": {
"type": "object",
"properties": {
"id": {
@@ -21100,54 +22562,24 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.text.delta"
"session.text.delta"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -21164,18 +22596,22 @@
}
]
},
"textID": {
"type": "string"
"ordinal": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"delta": {
"type": "string"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"textID",
"ordinal",
"delta"
],
"additionalProperties": false
@@ -21183,12 +22619,13 @@
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"session.next.reasoning.delta": {
"session.reasoning.delta": {
"type": "object",
"properties": {
"id": {
@@ -21199,54 +22636,24 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.reasoning.delta"
"session.reasoning.delta"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -21263,18 +22670,22 @@
}
]
},
"reasoningID": {
"type": "string"
"ordinal": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"delta": {
"type": "string"
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"reasoningID",
"ordinal",
"delta"
],
"additionalProperties": false
@@ -21282,12 +22693,13 @@
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"session.next.tool.input.delta": {
"session.tool.input.delta": {
"type": "object",
"properties": {
"id": {
@@ -21298,54 +22710,24 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.tool.input.delta"
"session.tool.input.delta"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -21370,7 +22752,6 @@
}
},
"required": [
"timestamp",
"sessionID",
"assistantMessageID",
"callID",
@@ -21381,12 +22762,13 @@
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"session.next.compaction.delta": {
"session.compaction.delta": {
"type": "object",
"properties": {
"id": {
@@ -21397,54 +22779,24 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"session.next.compaction.delta"
"session.compaction.delta"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"timestamp": {
"type": "number"
},
"sessionID": {
"type": "string",
"allOf": [
@@ -21453,22 +22805,12 @@
}
]
},
"messageID": {
"type": "string",
"allOf": [
{
"pattern": "^msg_"
}
]
},
"text": {
"type": "string"
}
},
"required": [
"timestamp",
"sessionID",
"messageID",
"text"
],
"additionalProperties": false
@@ -21476,12 +22818,13 @@
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"file.edited": {
"filesystem.changed": {
"type": "object",
"properties": {
"id": {
@@ -21492,45 +22835,18 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"file.edited"
"filesystem.changed"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -21539,16 +22855,26 @@
"properties": {
"file": {
"type": "string"
},
"event": {
"type": "string",
"enum": [
"add",
"change",
"unlink"
]
}
},
"required": [
"file"
"file",
"event"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -21565,6 +22891,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -21574,36 +22903,6 @@
"reference.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -21620,6 +22919,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -21636,6 +22936,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -21645,36 +22948,6 @@
"permission.v2.asked"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -21730,6 +23003,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -21746,6 +23020,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -21755,36 +23032,6 @@
"permission.v2.replied"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -21821,6 +23068,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -21837,6 +23085,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -21846,36 +23097,6 @@
"plugin.added"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -21894,6 +23115,52 @@
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"plugin.updated": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"plugin.updated"
]
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"anyOf": [
{
"type": "object"
},
{
"type": "array"
}
]
}
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -21910,6 +23177,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -21919,36 +23189,6 @@
"project.directories.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -21967,6 +23207,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -21983,6 +23224,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -21992,36 +23236,6 @@
"command.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -22038,6 +23252,52 @@
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"config.updated": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"config.updated"
]
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"anyOf": [
{
"type": "object"
},
{
"type": "array"
}
]
}
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -22054,6 +23314,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -22063,36 +23326,6 @@
"skill.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -22109,88 +23342,7 @@
},
"required": [
"id",
"type",
"data"
],
"additionalProperties": false
},
"file.watcher.updated": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"file.watcher.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"file": {
"type": "string"
},
"event": {
"type": "string",
"enum": [
"add",
"change",
"unlink"
]
}
},
"required": [
"file",
"event"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -22268,6 +23420,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -22277,36 +23432,6 @@
"pty.created"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -22325,6 +23450,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -22341,6 +23467,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -22350,36 +23479,6 @@
"pty.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -22398,6 +23497,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -22414,6 +23514,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -22423,36 +23526,6 @@
"pty.exited"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -22485,6 +23558,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -22501,6 +23575,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -22510,36 +23587,6 @@
"pty.deleted"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -22563,151 +23610,12 @@
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"Shell": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^sh_"
}
]
},
"status": {
"type": "string",
"enum": [
"running",
"exited",
"timeout",
"killed"
]
},
"command": {
"type": "string"
},
"cwd": {
"type": "string"
},
"shell": {
"type": "string"
},
"file": {
"type": "string"
},
"pid": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"exit": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"enum": [
"NaN"
]
},
{
"type": "string",
"enum": [
"Infinity"
]
},
{
"type": "string",
"enum": [
"-Infinity"
]
}
]
},
"metadata": {
"type": "object"
},
"time": {
"type": "object",
"properties": {
"started": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"enum": [
"NaN"
]
},
{
"type": "string",
"enum": [
"Infinity"
]
},
{
"type": "string",
"enum": [
"-Infinity"
]
}
]
},
"completed": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"enum": [
"NaN"
]
},
{
"type": "string",
"enum": [
"Infinity"
]
},
{
"type": "string",
"enum": [
"-Infinity"
]
}
]
}
},
"required": [
"started"
],
"additionalProperties": false
}
},
"required": [
"id",
"status",
"command",
"cwd",
"shell",
"file",
"metadata",
"time"
],
"additionalProperties": false
},
"shell.created": {
"type": "object",
"properties": {
@@ -22719,6 +23627,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -22728,36 +23639,6 @@
"shell.created"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -22776,6 +23657,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -22792,6 +23674,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -22801,36 +23686,6 @@
"shell.exited"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -22889,6 +23744,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -22905,6 +23761,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -22914,36 +23773,6 @@
"shell.deleted"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -22967,6 +23796,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -23049,6 +23879,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -23058,36 +23891,6 @@
"question.v2.asked"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -23131,6 +23934,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -23153,6 +23957,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -23162,36 +23969,6 @@
"question.v2.replied"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -23231,6 +24008,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -23247,6 +24025,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -23256,36 +24037,6 @@
"question.v2.rejected"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -23318,6 +24069,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -23886,6 +24638,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -23895,36 +24650,6 @@
"form.created"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -23950,6 +24675,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24013,6 +24739,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24022,36 +24751,6 @@
"form.replied"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24083,6 +24782,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24099,6 +24799,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24108,36 +24811,6 @@
"form.cancelled"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24165,6 +24838,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24204,6 +24878,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24213,36 +24890,6 @@
"todo.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24273,6 +24920,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24391,6 +25039,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24400,36 +25051,6 @@
"session.status"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24457,6 +25078,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24473,6 +25095,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24482,36 +25107,6 @@
"session.idle"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24535,6 +25130,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24551,6 +25147,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24560,36 +25159,6 @@
"tui.prompt.append"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24608,6 +25177,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24624,6 +25194,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24633,36 +25206,6 @@
"tui.command.execute"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24707,6 +25250,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24723,6 +25267,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24732,36 +25279,6 @@
"tui.toast.show"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24808,6 +25325,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24824,6 +25342,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24833,36 +25354,6 @@
"tui.session.select"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24887,6 +25378,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24903,6 +25395,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24912,36 +25407,6 @@
"installation.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -24960,6 +25425,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -24976,6 +25442,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -24985,36 +25454,6 @@
"installation.update-available"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -25033,6 +25472,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -25049,6 +25489,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -25058,36 +25501,6 @@
"vcs.branch.updated"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -25103,6 +25516,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -25119,6 +25533,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -25128,36 +25545,6 @@
"mcp.status.changed"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -25176,6 +25563,54 @@
},
"required": [
"id",
"created",
"type",
"data"
],
"additionalProperties": false
},
"mcp.resources.changed": {
"type": "object",
"properties": {
"id": {
"type": "string",
"allOf": [
{
"pattern": "^evt_"
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
"type": {
"type": "string",
"enum": [
"mcp.resources.changed"
]
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
"data": {
"type": "object",
"properties": {
"server": {
"type": "string"
}
},
"required": [
"server"
],
"additionalProperties": false
}
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -25192,6 +25627,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -25201,36 +25639,6 @@
"permission.asked"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -25308,6 +25716,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -25324,6 +25733,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -25333,36 +25745,6 @@
"permission.replied"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -25404,6 +25786,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -25507,6 +25890,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -25516,36 +25902,6 @@
"question.asked"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -25596,6 +25952,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -25618,6 +25975,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -25627,36 +25987,6 @@
"question.replied"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -25696,6 +26026,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -25712,6 +26043,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -25721,36 +26055,6 @@
"question.rejected"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -25783,6 +26087,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -25799,6 +26104,9 @@
}
]
},
"created": {
"type": "number"
},
"metadata": {
"type": "object"
},
@@ -25808,36 +26116,6 @@
"session.error"
]
},
"durable": {
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
"location": {
"$ref": "#/components/schemas/Location.Ref"
},
@@ -25900,6 +26178,7 @@
},
"required": [
"id",
"created",
"type",
"data"
],
@@ -25926,43 +26205,6 @@
}
]
},
"durable": {
"anyOf": [
{
"type": "object",
"properties": {
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
},
"version": {
"type": "integer",
"allOf": [
{
"minimum": 1
}
]
}
},
"required": [
"aggregateID",
"seq",
"version"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"location": {
"anyOf": [
{
@@ -26021,7 +26263,7 @@
"$ref": "#/components/schemas/session.updated"
},
{
"$ref": "#/components/schemas/session.deleted"
"$ref": "#/components/schemas/session.deleted1"
},
{
"$ref": "#/components/schemas/message.updated"
@@ -26036,115 +26278,136 @@
"$ref": "#/components/schemas/message.part.removed"
},
{
"$ref": "#/components/schemas/session.next.agent.switched"
"$ref": "#/components/schemas/session.agent.selected"
},
{
"$ref": "#/components/schemas/session.next.model.switched"
"$ref": "#/components/schemas/session.model.selected"
},
{
"$ref": "#/components/schemas/session.next.moved"
"$ref": "#/components/schemas/session.moved"
},
{
"$ref": "#/components/schemas/session.next.renamed"
"$ref": "#/components/schemas/session.renamed"
},
{
"$ref": "#/components/schemas/session.next.forked"
"$ref": "#/components/schemas/session.usage.updated"
},
{
"$ref": "#/components/schemas/session.next.prompted"
"$ref": "#/components/schemas/session.deleted"
},
{
"$ref": "#/components/schemas/session.next.prompt.admitted"
"$ref": "#/components/schemas/session.forked"
},
{
"$ref": "#/components/schemas/session.next.execution.settled"
"$ref": "#/components/schemas/session.prompt.promoted"
},
{
"$ref": "#/components/schemas/session.next.instructions.updated"
"$ref": "#/components/schemas/session.prompt.admitted"
},
{
"$ref": "#/components/schemas/session.next.synthetic"
"$ref": "#/components/schemas/session.execution.started"
},
{
"$ref": "#/components/schemas/session.next.skill.activated"
"$ref": "#/components/schemas/session.execution.succeeded"
},
{
"$ref": "#/components/schemas/session.next.shell.started"
"$ref": "#/components/schemas/session.execution.failed"
},
{
"$ref": "#/components/schemas/session.next.shell.ended"
"$ref": "#/components/schemas/session.execution.interrupted"
},
{
"$ref": "#/components/schemas/session.next.step.started"
"$ref": "#/components/schemas/session.instructions.updated"
},
{
"$ref": "#/components/schemas/session.next.step.ended"
"$ref": "#/components/schemas/session.synthetic"
},
{
"$ref": "#/components/schemas/session.next.step.failed"
"$ref": "#/components/schemas/session.skill.activated"
},
{
"$ref": "#/components/schemas/session.next.text.started"
"$ref": "#/components/schemas/session.shell.started"
},
{
"$ref": "#/components/schemas/session.next.text.delta"
"$ref": "#/components/schemas/session.shell.ended"
},
{
"$ref": "#/components/schemas/session.next.text.ended"
"$ref": "#/components/schemas/session.step.started"
},
{
"$ref": "#/components/schemas/session.next.reasoning.started"
"$ref": "#/components/schemas/session.step.ended"
},
{
"$ref": "#/components/schemas/session.next.reasoning.delta"
"$ref": "#/components/schemas/session.step.failed"
},
{
"$ref": "#/components/schemas/session.next.reasoning.ended"
"$ref": "#/components/schemas/session.text.started"
},
{
"$ref": "#/components/schemas/session.next.tool.input.started"
"$ref": "#/components/schemas/session.text.delta"
},
{
"$ref": "#/components/schemas/session.next.tool.input.delta"
"$ref": "#/components/schemas/session.text.ended"
},
{
"$ref": "#/components/schemas/session.next.tool.input.ended"
"$ref": "#/components/schemas/session.reasoning.started"
},
{
"$ref": "#/components/schemas/session.next.tool.called"
"$ref": "#/components/schemas/session.reasoning.delta"
},
{
"$ref": "#/components/schemas/session.next.tool.progress"
"$ref": "#/components/schemas/session.reasoning.ended"
},
{
"$ref": "#/components/schemas/session.next.tool.success"
"$ref": "#/components/schemas/session.tool.input.started"
},
{
"$ref": "#/components/schemas/session.next.tool.failed"
"$ref": "#/components/schemas/session.tool.input.delta"
},
{
"$ref": "#/components/schemas/session.next.retried"
"$ref": "#/components/schemas/session.tool.input.ended"
},
{
"$ref": "#/components/schemas/session.next.compaction.started"
"$ref": "#/components/schemas/session.tool.called"
},
{
"$ref": "#/components/schemas/session.next.compaction.delta"
"$ref": "#/components/schemas/session.tool.progress"
},
{
"$ref": "#/components/schemas/session.next.compaction.ended"
"$ref": "#/components/schemas/session.tool.success"
},
{
"$ref": "#/components/schemas/session.next.revert.staged"
"$ref": "#/components/schemas/session.tool.failed"
},
{
"$ref": "#/components/schemas/session.next.revert.cleared"
"$ref": "#/components/schemas/session.retry.scheduled"
},
{
"$ref": "#/components/schemas/session.next.revert.committed"
"$ref": "#/components/schemas/session.compaction.admitted"
},
{
"$ref": "#/components/schemas/file.edited"
"$ref": "#/components/schemas/session.compaction.started"
},
{
"$ref": "#/components/schemas/session.compaction.delta"
},
{
"$ref": "#/components/schemas/session.compaction.ended"
},
{
"$ref": "#/components/schemas/session.compaction.failed"
},
{
"$ref": "#/components/schemas/session.revert.staged"
},
{
"$ref": "#/components/schemas/session.revert.cleared"
},
{
"$ref": "#/components/schemas/session.revert.committed"
},
{
"$ref": "#/components/schemas/filesystem.changed"
},
{
"$ref": "#/components/schemas/reference.updated"
@@ -26158,6 +26421,9 @@
{
"$ref": "#/components/schemas/plugin.added"
},
{
"$ref": "#/components/schemas/plugin.updated"
},
{
"$ref": "#/components/schemas/project.directories.updated"
},
@@ -26165,10 +26431,10 @@
"$ref": "#/components/schemas/command.updated"
},
{
"$ref": "#/components/schemas/skill.updated"
"$ref": "#/components/schemas/config.updated"
},
{
"$ref": "#/components/schemas/file.watcher.updated"
"$ref": "#/components/schemas/skill.updated"
},
{
"$ref": "#/components/schemas/pty.created"
@@ -26242,6 +26508,9 @@
{
"$ref": "#/components/schemas/mcp.status.changed"
},
{
"$ref": "#/components/schemas/mcp.resources.changed"
},
{
"$ref": "#/components/schemas/permission.asked"
},
@@ -26272,68 +26541,6 @@
},
"contentMediaType": "application/json"
},
"EventLog.Hint": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"log.hint"
]
},
"aggregateID": {
"type": "string"
},
"seq": {
"type": "integer",
"allOf": [
{
"minimum": 0
}
]
}
},
"required": [
"type",
"aggregateID",
"seq"
],
"additionalProperties": false,
"description": "Payload-free change hint: the aggregate's durable log advanced to at least seq. Hints coalesce under backpressure (latest per aggregate) and are never a delivery guarantee."
},
"EventLog.SweepRequired": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"log.sweep_required"
]
}
},
"required": [
"type"
],
"additionalProperties": false,
"description": "Hints may have been lost; treat every aggregate as potentially dirty and recover via bounded sweep plus durable log reads. Emitted first on every (re)subscribe."
},
"EventLog.Change": {
"anyOf": [
{
"$ref": "#/components/schemas/EventLog.Hint"
},
{
"$ref": "#/components/schemas/EventLog.SweepRequired"
}
]
},
"EventLog.ChangeStream": {
"type": "string",
"contentSchema": {
"$ref": "#/components/schemas/EventLog.Change"
},
"contentMediaType": "application/json"
},
"PtyNotFoundError": {
"type": "object",
"properties": {
@@ -26863,28 +27070,28 @@
"security": [],
"tags": [
{
"name": "server.health"
"name": "health"
},
{
"name": "server.location"
"name": "location"
},
{
"name": "server.agent"
"name": "agent"
},
{
"name": "plugins",
"name": "plugin",
"description": "Experimental plugin routes."
},
{
"name": "sessions",
"name": "session",
"description": "Experimental session routes."
},
{
"name": "messages",
"name": "session",
"description": "Experimental message routes."
},
{
"name": "models",
"name": "model",
"description": "Experimental model routes."
},
{
@@ -26892,30 +27099,30 @@
"description": "Experimental one-shot generation routes."
},
{
"name": "providers",
"name": "provider",
"description": "Experimental provider routes."
},
{
"name": "integrations",
"name": "integration",
"description": "Integration discovery and authentication routes."
},
{
"name": "mcp",
"description": "MCP server status routes."
"description": "MCP server and resource routes."
},
{
"name": "server.credential"
"name": "credential"
},
{
"name": "projects",
"name": "project",
"description": "Location-scoped project routes."
},
{
"name": "forms",
"name": "form",
"description": "Session form routes."
},
{
"name": "permissions",
"name": "permission",
"description": "Experimental permission routes."
},
{
@@ -26923,15 +27130,15 @@
"description": "Experimental location-scoped filesystem routes."
},
{
"name": "commands",
"name": "command",
"description": "Experimental command routes."
},
{
"name": "skills",
"name": "skill",
"description": "Experimental skill routes."
},
{
"name": "events",
"name": "event",
"description": "Experimental event stream routes."
},
{
@@ -26943,7 +27150,7 @@
"description": "Experimental location-scoped shell command routes."
},
{
"name": "session questions",
"name": "question",
"description": "Experimental session question routes."
},
{
@@ -26957,6 +27164,9 @@
{
"name": "vcs",
"description": "Location-scoped version control routes."
},
{
"name": "debug"
}
]
}
+4 -4
View File
@@ -177,13 +177,13 @@ describe("OpenAPI.fromSpec", () => {
const spec = await opencodeSpec()
const result = OpenAPI.fromSpec({ spec, baseUrl })
expect(result.skipped).toHaveLength(5)
expect(result.skipped).toHaveLength(4)
expect(result.skipped).toContainEqual({
method: "GET",
path: "/api/pty/{ptyID}/connect",
reason: "WebSocket operations are not supported",
})
expect(result.skipped.filter((item) => item.reason === "SSE operations are not supported")).toHaveLength(3)
expect(result.skipped.filter((item) => item.reason === "SSE operations are not supported")).toHaveLength(2)
expect(result.skipped).toContainEqual({
method: "GET",
path: "/api/fs/read/*",
@@ -210,11 +210,11 @@ describe("OpenAPI.fromSpec", () => {
if (!Tool.isDefinition(instructionPut)) throw new Error("v2.session.instructions.entry.put was not generated")
expect(inputTypeScript(instructionPut)).toBe("{ sessionID: string; key: string; value: unknown }")
expect(toolAt(result.tools, "v2_session_instructions_entry_put_2")).toBeUndefined()
expect(toolAt(result.tools, "v2.pty.connect")).toBeUndefined()
expect(Tool.isDefinition(toolAt(result.tools, "v2.pty.connect"))).toBe(false)
expect(toolAt(result.tools, "v2.session.log")).toBeUndefined()
expect(toolAt(result.tools, "v2.event.subscribe")).toBeUndefined()
expect(toolAt(result.tools, "v2.fs.read")).toBeUndefined()
expect(toolAt(result.tools, "v2.pty.connectToken")).not.toBeUndefined()
expect(toolAt(result.tools, "v2.pty.connect.token")).not.toBeUndefined()
})
test("preserves operation path sanitization and collision handling", () => {
+6
View File
@@ -245,6 +245,12 @@ describe("promises at data boundaries", () => {
expect(diagnostic.message).toContain("await tools.ns.tool(...)")
})
test("collection helpers do not let un-awaited promises cross the result boundary", async () => {
const diagnostic = await error(`return Array.from([Promise.resolve(1)])`)
expect(diagnostic.kind).toBe("InvalidDataValue")
expect(diagnostic.message).toContain("un-awaited Promise")
})
test("passing an un-awaited promise as a tool argument is a clear diagnostic", async () => {
const diagnostic = await error(`return await tools.host.sleepy({ id: tools.host.sleepy({ id: 1 }) })`)
expect(diagnostic.kind).toBe("InvalidDataValue")
+106
View File
@@ -19,6 +19,28 @@ const error = async (code: string) => {
return result.error
}
describe("Number and Math", () => {
test("Math.random returns a number in [0, 1)", async () => {
expect(await value(`const n = Math.random(); return typeof n === "number" && n >= 0 && n < 1`)).toBe(true)
})
test("Number exposes native non-finite constants", async () => {
expect(
await value(
`return [Number.isNaN(Number.NaN), Number.POSITIVE_INFINITY === Infinity, Number.NEGATIVE_INFINITY === -Infinity]`,
),
).toEqual([true, true, true])
})
test("Number valueOf returns its primitive receiver", async () => {
expect(await value(`return (42).valueOf()`)).toBe(42)
})
test("Number valueOf does not enable boxed numbers", async () => {
expect((await error(`return new Number(42)`)).kind).toBe("UnsupportedSyntax")
})
})
describe("Date", () => {
test("Date.now() returns a number", async () => {
expect(await value(`return typeof Date.now()`)).toBe("number")
@@ -751,6 +773,43 @@ describe("sandbox values at intra-sandbox checkpoints", () => {
)
})
test("Object.values/entries preserve nested object identity", async () => {
expect(
await value(`
const child = { selected: false }
const rows = { a: child }
Object.values(rows)[0].selected = true
return child.selected
`),
).toBe(true)
expect(
await value(`
const child = { selected: false }
const rows = { a: child }
Object.entries(rows)[0][1].selected = true
return child.selected
`),
).toBe(true)
})
test("Object enumeration preserves promises and callable references", async () => {
expect(
await value(`
const pending = Promise.resolve(1)
const source = { pending }
return [Object.keys(source), Object.hasOwn(source, "pending"), await Object.values(source)[0], await Object.entries(source)[0][1]]
`),
).toEqual([["pending"], true, 1, 1])
expect(await value(`return Object.values({ max: Math.max })[0](1, 2)`)).toBe(2)
})
test("Object enumeration rejects invalid receivers and gives promises an await hint", async () => {
const diagnostic = await error(`return Object.keys(Promise.resolve({ a: 1 }))`)
expect(diagnostic.kind).toBe("InvalidDataValue")
expect(diagnostic.message).toContain("await")
expect((await error(`return Object.keys(Math)`)).kind).toBe("InvalidDataValue")
})
test("Object.assign keeps Maps usable", async () => {
expect(await value(`const merged = Object.assign({}, { m: new Map([["a", 1]]) }); return merged.m.get("a")`)).toBe(
1,
@@ -773,6 +832,53 @@ describe("sandbox values at intra-sandbox checkpoints", () => {
expect(await value(`return Array.from([new Date(5)])[0].getTime()`)).toBe(5)
})
test("Array.from and Array.of preserve nested object identity", async () => {
expect(
await value(`
const child = { selected: false }
Array.from([child])[0].selected = true
return child.selected
`),
).toBe(true)
expect(
await value(`
const child = { selected: false }
Array.of(child)[0].selected = true
return child.selected
`),
).toBe(true)
})
test("Array.from and Array.of preserve promises and callable references", async () => {
expect(
await value(`
const pending = Promise.resolve(1)
return [await Array.from([pending])[0], await Array.of(pending)[0]]
`),
).toEqual([1, 1])
expect(await value(`return [Array.from([Math.max])[0](1, 2), Array.of(Math.max)[0](3, 4)]`)).toEqual([2, 4])
})
test("Array.from preserves identity across supported collection shapes", async () => {
expect(
await value(`
const child = { selected: false }
const fromArrayLike = Array.from({ 0: child, length: 1 })
const fromMap = Array.from(new Map([["child", child]]))
const fromSet = Array.from(new Set([child]))
fromArrayLike[0].selected = true
return [fromMap[0][1] === child, fromSet[0] === child, child.selected]
`),
).toEqual([true, true, true])
})
test("Array.from rejects invalid receivers and gives promises an await hint", async () => {
const diagnostic = await error(`return Array.from(Promise.resolve([1]))`)
expect(diagnostic.kind).toBe("InvalidDataValue")
expect(diagnostic.message).toContain("await")
expect((await error(`return Array.from(() => 1)`)).kind).toBe("InvalidDataValue")
})
test("regexes stay callable through Object.values", async () => {
expect(await value(`return Object.values({ r: /ab+/ })[0].test("abb")`)).toBe(true)
})
+2
View File
@@ -8,6 +8,8 @@ import { State } from "./state"
export const ID = Agent.ID
export type ID = typeof ID.Type
export const Name = Agent.Name
export type Name = Agent.Name
export const defaultID = ID.make("build")
export const Color = Agent.Color
+7 -3
View File
@@ -6,6 +6,7 @@ import type {
JSONValue,
LanguageModelV3,
LanguageModelV3CallOptions,
LanguageModelV3FinishReason,
LanguageModelV3FunctionTool,
LanguageModelV3Message,
LanguageModelV3Prompt,
@@ -304,6 +305,7 @@ function modelFromLanguage(info: ModelV2.Info, language: LanguageModelV3) {
const route: AnyRoute = {
id: `ai-sdk:${ProviderV2.packageName(info.package) ?? "unknown"}`,
provider: ProviderID.make(info.providerID),
providerMetadataKey: optionKey,
protocol: "ai-sdk",
endpoint: Endpoint.path("/", { baseURL: "https://ai-sdk.local" }),
auth: Auth.none,
@@ -416,7 +418,7 @@ function assistantPart(part: ContentPart): AssistantContent {
case "media":
return [{ type: "file", mediaType: part.mediaType, data: part.data, filename: part.filename }]
case "reasoning":
return [{ type: "reasoning", text: part.text }]
return [{ type: "reasoning", text: part.text, providerOptions: providerOptions(part.providerMetadata) }]
case "tool-call":
return [
{
@@ -425,6 +427,7 @@ function assistantPart(part: ContentPart): AssistantContent {
toolName: part.name,
input: part.input,
providerExecuted: part.providerExecuted,
providerOptions: providerOptions(part.providerMetadata),
},
]
case "tool-result":
@@ -440,6 +443,7 @@ function toolResultPart(part: ContentPart): ToolResultContent[] {
toolCallId: part.id,
toolName: part.name,
output: toolOutput(part.result),
providerOptions: providerOptions(part.providerMetadata),
},
]
}
@@ -624,8 +628,8 @@ function usage(input: Extract<LanguageModelV3StreamPart, { type: "finish" }>["us
return Object.values(output).some((value) => value !== undefined) ? output : undefined
}
function finishReason(value: unknown): FinishReason {
return Schema.is(FinishReason)(value) ? value : "unknown"
function finishReason(value: LanguageModelV3FinishReason): FinishReason {
return value.unified === "other" ? "unknown" : value.unified
}
function providerMetadata(value: unknown) {
+3 -2
View File
@@ -1,6 +1,7 @@
export * as ConfigProviderPlugin from "./provider"
import { define } from "@opencode-ai/plugin/v2/effect/plugin"
import { Money } from "@opencode-ai/schema/money"
import { Effect, Stream } from "effect"
import { Config } from "../../config"
import { ModelV2 } from "../../model"
@@ -91,8 +92,8 @@ export const Plugin = define({
input: cost.input,
output: cost.output,
cache: {
read: cost.cache?.read ?? 0,
write: cost.cache?.write ?? 0,
read: cost.cache?.read ?? Money.USDPerMillionTokens.zero,
write: cost.cache?.write ?? Money.USDPerMillionTokens.zero,
},
}))
}
+5 -4
View File
@@ -1,6 +1,7 @@
export * as ConfigProvider from "./provider"
import { Schema } from "effect"
import { Money } from "@opencode-ai/schema/money"
import { ModelV2 } from "../model"
const JsonRecord = Schema.Record(Schema.String, Schema.Json)
@@ -17,8 +18,8 @@ export class Request extends Schema.Class<Request>("ConfigV2.Provider.Request")(
}) {}
class Cache extends Schema.Class<Cache>("ConfigV2.Model.Cost.Cache")({
read: Schema.Finite.pipe(Schema.optional),
write: Schema.Finite.pipe(Schema.optional),
read: Money.USDPerMillionTokens.pipe(Schema.optional),
write: Money.USDPerMillionTokens.pipe(Schema.optional),
}) {}
class Cost extends Schema.Class<Cost>("ConfigV2.Model.Cost")({
@@ -26,8 +27,8 @@ class Cost extends Schema.Class<Cost>("ConfigV2.Model.Cost")({
type: Schema.Literal("context"),
size: Schema.Int,
}).pipe(Schema.optional),
input: Schema.Finite,
output: Schema.Finite,
input: Money.USDPerMillionTokens,
output: Money.USDPerMillionTokens,
cache: Cache.pipe(Schema.optional),
}) {}
+1
View File
@@ -48,5 +48,6 @@ export const migrations = (
import("./migration/20260705180000_rename_instructions"),
import("./migration/20260706223930_add-session-fork"),
import("./migration/20260707010146_durable_session_inbox"),
import("./migration/20260707120000_migrate_prelaunch_v2_state"),
])
).map((module) => module.default) satisfies DatabaseMigration.Migration[]
@@ -0,0 +1,227 @@
import { sql } from "drizzle-orm"
import { Effect, Schema } from "effect"
import type { DatabaseMigration } from "../migration"
const decodeJson = Schema.decodeUnknownSync(Schema.UnknownFromJsonString)
const isObject = Schema.is(Schema.Record(Schema.String, Schema.Unknown))
export default {
id: "20260707120000_migrate_prelaunch_v2_state",
up(tx) {
return Effect.gen(function* () {
yield* tx.run(
sql`DELETE FROM session_message WHERE type = 'compaction' AND json_extract(data, '$.status') = 'queued'`,
)
const messages = yield* tx.all<{ id: string; type: string; data: string }>(
sql`SELECT id, type, data FROM session_message WHERE type IN ('skill', 'shell', 'assistant', 'compaction', 'synthetic')`,
)
for (const row of messages) {
const data = object(decodeJson(row.data))
yield* tx.run(
sql`UPDATE session_message SET data = ${JSON.stringify(messageData(row.type, data))} WHERE id = ${row.id}`,
)
}
yield* tx.run(sql`DELETE FROM event WHERE type = 'session.compaction.delta.1'`)
const events = yield* tx.all<{ id: string; aggregateID: string; seq: number; type: string; data: string }>(sql`
SELECT id, aggregate_id as aggregateID, seq, type, data
FROM event
WHERE type IN (
'session.skill.activated.1',
'session.skill.activated.2',
'session.compaction.started.1',
'session.compaction.started.2',
'session.compaction.ended.1',
'session.compaction.failed.1',
'session.compaction.failed.2',
'session.revert.staged.1',
'session.revert.staged.2'
)
ORDER BY aggregate_id, seq
`)
const compactionReasons = new Map<string, "auto" | "manual">()
for (const row of events) {
const data = object(decodeJson(row.data))
if (row.type.startsWith("session.compaction.ended.")) {
compactionReasons.delete(row.aggregateID)
continue
}
const event = eventData(row.type, data, compactionReasons.get(row.aggregateID))
if (row.type.startsWith("session.compaction.started."))
compactionReasons.set(row.aggregateID, event.data.reason === "auto" ? "auto" : "manual")
if (row.type.startsWith("session.compaction.failed.")) compactionReasons.delete(row.aggregateID)
yield* tx.run(
sql`UPDATE event SET type = ${event.type}, data = ${JSON.stringify(event.data)} WHERE id = ${row.id}`,
)
}
})
},
} satisfies DatabaseMigration.Migration
function messageData(type: string, data: Record<string, unknown>) {
if (type === "skill")
return defined({
metadata: data.metadata,
time: data.time,
skill: data.skill ?? data.id ?? data.name,
name: data.name,
text: data.text,
})
if (type === "shell") {
const shell = object(data.shell)
return defined({
metadata: data.metadata,
time: data.time,
shellID: data.shellID ?? shell.id,
command: data.command ?? shell.command,
status: data.status ?? shell.status,
exit: data.exit ?? shell.exit,
output: data.output,
})
}
if (type === "assistant")
return defined({
metadata: data.metadata,
time: data.time,
agent: data.agent,
model: data.model,
content: Array.isArray(data.content) ? data.content.map(assistantContent) : data.content,
snapshot: data.snapshot,
finish: data.finish,
cost: data.cost,
tokens: data.tokens,
error: data.error,
retry: data.retry,
})
if (type === "compaction") {
if (data.status === "failed")
return defined({
metadata: data.metadata,
time: data.time,
status: data.status,
reason: data.reason,
error: data.error ?? genericCompactionError,
})
return defined({
metadata: data.metadata,
time: data.time,
status: data.status,
reason: data.reason,
summary: data.summary,
recent: data.recent,
})
}
if (type === "synthetic")
return defined({ metadata: data.metadata, time: data.time, text: data.text, description: data.description })
const { sessionID: _, ...current } = data
return current
}
function assistantContent(value: unknown) {
const content = object(value)
if (content.type === "text") return defined({ type: content.type, text: content.text })
if (content.type === "reasoning")
return defined({ type: content.type, text: content.text, state: content.state, time: content.time })
if (content.type !== "tool") return content
return defined({
type: content.type,
id: content.id,
name: content.name,
executed: content.executed,
providerState: content.providerState,
providerResultState: content.providerResultState,
state: toolState(content.state),
time: content.time,
})
}
function toolState(value: unknown) {
const state = object(value)
if (state.status === "pending" || state.status === "streaming")
return defined({ status: "streaming", input: state.input })
if (state.status === "running")
return defined({ status: state.status, input: state.input, structured: state.structured, content: state.content })
if (state.status === "completed")
return defined({
status: state.status,
input: state.input,
structured: state.structured,
content: state.content,
result: state.result,
})
if (state.status === "error")
return defined({
status: state.status,
input: state.input,
structured: state.structured,
content: state.content,
error: state.error,
result: state.result,
})
return state
}
function eventData(type: string, data: Record<string, unknown>, compactionReason?: "auto" | "manual") {
if (type.startsWith("session.skill.activated."))
return {
type: "session.skill.activated.1",
data: defined({ sessionID: data.sessionID, id: data.id ?? data.name, name: data.name, text: data.text }),
}
if (type.startsWith("session.compaction.started."))
return {
type: "session.compaction.started.1",
data: defined({
sessionID: data.sessionID,
reason: data.reason,
recent: data.recent ?? "",
inputID: data.inputID,
}),
}
if (type.startsWith("session.compaction.failed."))
return {
type: "session.compaction.failed.1",
data: defined({
sessionID: data.sessionID,
reason: data.reason ?? compactionReason ?? "manual",
error: data.error ?? genericCompactionError,
inputID: data.inputID,
}),
}
const revert = object(data.revert)
return {
type: "session.revert.staged.1",
data: defined({
sessionID: data.sessionID,
revert: defined({
messageID: revert.messageID,
partID: revert.partID,
snapshot: revert.snapshot,
files: Array.isArray(revert.files)
? revert.files.map((value) => {
const file = object(value)
return defined({
file: file.file ?? file.path,
patch: file.patch,
additions: file.additions,
deletions: file.deletions,
status: file.status,
})
})
: undefined,
}),
}),
}
}
const genericCompactionError = {
type: "compaction.failed",
message: "Compaction failed before recording an error",
}
function object(value: unknown): Record<string, unknown> {
return isObject(value) ? value : {}
}
function defined(value: Record<string, unknown>) {
return Object.fromEntries(Object.entries(value).filter((entry) => entry[1] !== undefined))
}
+1 -1
View File
@@ -200,6 +200,6 @@ export const node = makeLocationNode({ service: Service, layer, deps: [FSUtil.no
// TODO: Publish watcher/file-edit events after V2 watcher integration exists.
// TODO: Add snapshots / undo after V2 snapshot design exists.
// TODO: Notify LSP and collect diagnostics after V2 LSP runtime exists.
// TODO: Design multi-file transactions / rollback if apply_patch needs atomic edits.
// TODO: Design multi-file transactions / rollback if patch needs atomic edits.
// Until then, edits are sequential and report partial application.
// TODO: Define crash recovery and idempotency for side effects between Tool.Called and durable settlement.
+2 -2
View File
@@ -1,6 +1,6 @@
export * as File from "./file"
import { Revert } from "@opencode-ai/schema/revert"
import { FileDiff } from "@opencode-ai/schema/file-diff"
export const Diff = Revert.FileDiff
export const Diff = FileDiff.Info
export type Diff = typeof Diff.Type
+1 -1
View File
@@ -606,7 +606,7 @@ const layer = Layer.effect(
file,
])).text
return {
path: file,
file,
status,
additions: binary ? 0 : Number(stats[0] ?? 0),
deletions: binary ? 0 : Number(stats[1] ?? 0),
+35 -22
View File
@@ -150,31 +150,44 @@ export type LocationError = LayerNode.Error<typeof locationServices>
export function buildLocationServiceMap(
replacements: LayerNode.Replacements = [],
): Layer.Layer<LocationServiceMap.Service> {
// Structural Equal is own-key-set sensitive, so `{ directory }` (schema-decoded
// payloads omit optional keys) and `{ directory, workspaceID: undefined }` are
// different RcMap keys. The RcMap caches by the raw key before the build
// callback runs, so canonicalize at the map boundary to the key-present shape.
const canonical = (ref: Location.Ref) => Location.Ref.make({ directory: ref.directory, workspaceID: ref.workspaceID })
return Layer.effect(
LocationServiceMap.Service,
LayerMap.make(
(ref: Location.Ref) => {
const startedAt = performance.now()
const allReplacements = replacements.concat([[Location.node, Location.boundNode(ref)]])
// Apply replacements during hoist, not afterward: replacements can
// introduce new tagged dependencies (Location.boundNode depends on
// Project), and the hoist walk is the only pass that can still slice
// those back out.
const location = LayerNode.hoist(locationServices, Node.tags.values.global, allReplacements)
Effect.map(
LayerMap.make(
(ref: Location.Ref) => {
const startedAt = performance.now()
const allReplacements = replacements.concat([[Location.node, Location.boundNode(ref)]])
// Apply replacements during hoist, not afterward: replacements can
// introduce new tagged dependencies (Location.boundNode depends on
// Project), and the hoist walk is the only pass that can still slice
// those back out.
const location = LayerNode.hoist(locationServices, Node.tags.values.global, allReplacements)
return LayerNode.compile(location.node).pipe(
Layer.fresh,
Layer.tap(() =>
Effect.logInfo("location services booted", {
directory: ref.directory,
workspaceID: ref.workspaceID,
durationMs: Math.round(performance.now() - startedAt),
}),
),
Layer.provide(LayerNode.compile(location.hoisted)),
)
},
{ idleTimeToLive: "60 minutes" },
return LayerNode.compile(location.node).pipe(
Layer.fresh,
Layer.tap(() =>
Effect.logInfo("location services booted", {
directory: ref.directory,
workspaceID: ref.workspaceID,
durationMs: Math.round(performance.now() - startedAt),
}),
),
Layer.provide(LayerNode.compile(location.hoisted)),
)
},
{ idleTimeToLive: "60 minutes" },
),
(inner) => ({
...inner,
get: (ref: Location.Ref) => inner.get(canonical(ref)),
contextEffect: (ref: Location.Ref) => inner.contextEffect(canonical(ref)),
invalidate: (ref: Location.Ref) => inner.invalidate(canonical(ref)),
}),
),
)
}
+118 -16
View File
@@ -3,7 +3,7 @@ export * as MCPClient from "./client"
import path from "node:path"
import { execFile } from "node:child_process"
import { pathToFileURL } from "node:url"
import { Client, type ClientOptions } from "@modelcontextprotocol/sdk/client/index.js"
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { UnauthorizedError, type OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js"
@@ -21,6 +21,7 @@ import {
ListToolsResultSchema,
PromptListChangedNotificationSchema,
PromptSchema,
ResourceListChangedNotificationSchema,
type LoggingMessageNotification,
LoggingMessageNotificationSchema,
ToolListChangedNotificationSchema,
@@ -68,11 +69,13 @@ export interface ToolDefinition {
export interface PromptDefinition {
readonly name: string
readonly description: string | undefined
readonly arguments: ReadonlyArray<{
readonly name: string
readonly description: string | undefined
readonly required: boolean | undefined
}> | undefined
readonly arguments:
| ReadonlyArray<{
readonly name: string
readonly description: string | undefined
readonly required: boolean | undefined
}>
| undefined
}
export interface PromptMessage {
@@ -84,6 +87,28 @@ export interface PromptResult {
readonly messages: ReadonlyArray<PromptMessage>
}
export interface ResourceDefinition {
readonly name: string
readonly uri: string
readonly description: string | undefined
readonly mimeType: string | undefined
}
export interface ResourceTemplateDefinition {
readonly name: string
readonly uriTemplate: string
readonly description: string | undefined
readonly mimeType: string | undefined
}
export type ResourceContentPart =
| { readonly type: "text"; readonly uri: string; readonly text: string; readonly mimeType: string | undefined }
| { readonly type: "blob"; readonly uri: string; readonly blob: string; readonly mimeType: string | undefined }
export interface ReadResourceResult {
readonly contents: ReadonlyArray<ResourceContentPart>
}
export type CallToolContent =
| { readonly type: "text"; readonly text: string }
| { readonly type: "media"; readonly data: string; readonly mimeType: string }
@@ -124,6 +149,12 @@ export interface Connection {
readonly tools: () => Effect.Effect<ToolDefinition[], Error>
/** Lists the server's prompts; returns [] when the server doesn't advertise prompt support, fails on a transport error. */
readonly prompts: () => Effect.Effect<PromptDefinition[], Error>
/** Lists the server's resources; returns [] when the server doesn't advertise resource support. */
readonly resources: () => Effect.Effect<ResourceDefinition[], Error>
/** Lists the server's resource templates; returns [] when the server doesn't advertise resource support. */
readonly resourceTemplates: () => Effect.Effect<ResourceTemplateDefinition[], Error>
/** Reads one resource; returns undefined when the server doesn't advertise resource support. */
readonly readResource: (input: { readonly uri: string }) => Effect.Effect<ReadResourceResult | undefined, Error>
/** Invokes a prompt on the server. Interruption aborts the in-flight request. */
readonly prompt: (input: {
readonly name: string
@@ -141,6 +172,8 @@ export interface Connection {
readonly onToolsChanged: (callback: () => void) => void
/** Registers a callback fired when the server announces its prompt list changed; no-op if unsupported. */
readonly onPromptsChanged: (callback: () => void) => void
/** Registers a callback fired when the server announces its resource catalog changed. */
readonly onResourcesChanged: (callback: () => void) => void
}
/** Connects an MCP server; closing the calling scope tears down the transport and any spawned process. */
@@ -168,7 +201,8 @@ export const connect = Effect.fnUntraced(function* (
},
})
}
if (!URL.canParse(config.url)) return yield* new ConnectError({ server, message: `Invalid MCP URL for "${server}"` })
if (!URL.canParse(config.url))
return yield* new ConnectError({ server, message: `Invalid MCP URL for "${server}"` })
return new StreamableHTTPClientTransport(new URL(config.url), {
requestInit: config.headers ? { headers: config.headers } : undefined,
authProvider,
@@ -202,10 +236,7 @@ export const connect = Effect.fnUntraced(function* (
}).pipe(Effect.exit)
if (Exit.isSuccess(exit)) {
yield* Effect.addFinalizer(() =>
cleanupStdioDescendants(transport).pipe(
Effect.andThen(Effect.promise(() => client.close())),
Effect.ignore,
),
cleanupStdioDescendants(transport).pipe(Effect.andThen(Effect.promise(() => client.close())), Effect.ignore),
)
const catalogTimeout = config.timeout?.catalog ?? DEFAULT_CATALOG_TIMEOUT
const executionTimeout = config.timeout?.execution ?? DEFAULT_EXECUTION_TIMEOUT
@@ -257,7 +288,9 @@ export const connect = Effect.fnUntraced(function* (
),
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
}).pipe(
Effect.tapError((error) => Effect.logWarning("failed to list MCP prompts", { server, error: error.message })),
Effect.tapError((error) =>
Effect.logWarning("failed to list MCP prompts", { server, error: error.message }),
),
)
return prompts.map((prompt) => ({
name: prompt.name,
@@ -269,6 +302,74 @@ export const connect = Effect.fnUntraced(function* (
})),
}))
}),
resources: () =>
Effect.gen(function* () {
if (!client.getServerCapabilities()?.resources) return []
const resources = yield* Effect.tryPromise({
try: () =>
paginate(
(cursor) =>
client.listResources(cursor === undefined ? undefined : { cursor }, { timeout: catalogTimeout }),
(result) => result.resources,
),
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
}).pipe(
Effect.tapError((error) =>
Effect.logWarning("failed to list MCP resources", { server, error: error.message }),
),
)
return resources.map((resource) => ({
name: resource.name,
uri: resource.uri,
description: resource.description,
mimeType: resource.mimeType,
}))
}),
resourceTemplates: () =>
Effect.gen(function* () {
if (!client.getServerCapabilities()?.resources) return []
const templates = yield* Effect.tryPromise({
try: () =>
paginate(
(cursor) =>
client.listResourceTemplates(cursor === undefined ? undefined : { cursor }, {
timeout: catalogTimeout,
}),
(result) => result.resourceTemplates,
),
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
}).pipe(
Effect.tapError((error) =>
Effect.logWarning("failed to list MCP resource templates", { server, error: error.message }),
),
)
return templates.map((template) => ({
name: template.name,
uriTemplate: template.uriTemplate,
description: template.description,
mimeType: template.mimeType,
}))
}),
readResource: (input) =>
Effect.gen(function* () {
if (!client.getServerCapabilities()?.resources) return undefined
const result = yield* Effect.tryPromise({
try: (signal) => client.readResource({ uri: input.uri }, { signal, timeout: executionTimeout }),
catch: (error) => (error instanceof Error ? error : new Error(String(error))),
}).pipe(
Effect.tapError((error) =>
Effect.logWarning("failed to read MCP resource", { server, uri: input.uri, error: error.message }),
),
)
return {
contents: result.contents.map(
(part): ResourceContentPart =>
"text" in part
? { type: "text", uri: part.uri, text: part.text, mimeType: part.mimeType }
: { type: "blob", uri: part.uri, blob: part.blob, mimeType: part.mimeType },
),
}
}),
prompt: (input) =>
Effect.tryPromise({
try: (signal) =>
@@ -328,13 +429,14 @@ export const connect = Effect.fnUntraced(function* (
if (!client.getServerCapabilities()?.prompts?.listChanged) return
client.setNotificationHandler(PromptListChangedNotificationSchema, async () => callback())
},
onResourcesChanged: (callback) => {
if (!client.getServerCapabilities()?.resources?.listChanged) return
client.setNotificationHandler(ResourceListChangedNotificationSchema, async () => callback())
},
} satisfies Connection
}
yield* cleanupStdioDescendants(transport).pipe(
Effect.andThen(Effect.promise(() => transport.close())),
Effect.ignore,
)
yield* cleanupStdioDescendants(transport).pipe(Effect.andThen(Effect.promise(() => transport.close())), Effect.ignore)
const error = Cause.squash(exit.cause)
if (error instanceof UnauthorizedError) return yield* new NeedsAuthError({ server })
return yield* new ConnectError({ server, message: error instanceof Error ? error.message : String(error) })
+80 -50
View File
@@ -83,48 +83,16 @@ export class PromptResult extends Schema.Class<PromptResult>("MCP.PromptResult")
messages: Schema.Array(PromptMessage),
}) {}
export class Resource extends Schema.Class<Resource>("MCP.Resource")({
server: ServerName,
name: Schema.String,
uri: Schema.String,
description: Schema.String.pipe(Schema.optional),
mimeType: Schema.String.pipe(Schema.optional),
}) {}
export class ResourceTemplate extends Schema.Class<ResourceTemplate>("MCP.ResourceTemplate")({
server: ServerName,
name: Schema.String,
uriTemplate: Schema.String,
description: Schema.String.pipe(Schema.optional),
mimeType: Schema.String.pipe(Schema.optional),
}) {}
export class ResourceCatalog extends Schema.Class<ResourceCatalog>("MCP.ResourceCatalog")({
resources: Schema.Array(Resource),
templates: Schema.Array(ResourceTemplate),
}) {}
export const ResourceContentPart = Schema.Union([
Schema.Struct({
type: Schema.Literal("text"),
uri: Schema.String,
text: Schema.String,
mimeType: Schema.String.pipe(Schema.optional),
}),
Schema.Struct({
type: Schema.Literal("blob"),
uri: Schema.String,
blob: Schema.String,
mimeType: Schema.String.pipe(Schema.optional),
}),
]).pipe(Schema.toTaggedUnion("type"))
export type ResourceContentPart = typeof ResourceContentPart.Type
export class ResourceContent extends Schema.Class<ResourceContent>("MCP.ResourceContent")({
server: ServerName,
uri: Schema.String,
contents: Schema.Array(ResourceContentPart),
}) {}
export const Resource = Mcp.Resource
export type Resource = Mcp.Resource
export const ResourceTemplate = Mcp.ResourceTemplate
export type ResourceTemplate = Mcp.ResourceTemplate
export const ResourceCatalog = Mcp.ResourceCatalog
export type ResourceCatalog = Mcp.ResourceCatalog
export const ResourceContentPart = Mcp.ResourceContentPart
export type ResourceContentPart = Mcp.ResourceContentPart
export const ResourceContent = Mcp.ResourceContent
export type ResourceContent = Mcp.ResourceContent
export class NotFoundError extends Schema.TaggedErrorClass<NotFoundError>()("MCP.NotFoundError", {
server: ServerName,
@@ -415,6 +383,24 @@ export const layer = Layer.effect(
),
})
const toResource = (server: ServerName, def: MCPClient.ResourceDefinition) =>
Resource.make({
server,
name: def.name,
uri: def.uri,
description: def.description,
mimeType: def.mimeType,
})
const toResourceTemplate = (server: ServerName, def: MCPClient.ResourceTemplateDefinition) =>
ResourceTemplate.make({
server,
name: def.name,
uriTemplate: def.uriTemplate,
description: def.description,
mimeType: def.mimeType,
})
const refreshTools = (name: ServerName, entry: ServerEntry, connection: MCPClient.Connection) =>
connection.tools().pipe(
Effect.map((defs) => {
@@ -443,6 +429,7 @@ export const layer = Layer.effect(
entry.prompts = undefined
entry.status = { status: "failed", error: "Connection closed" }
fork(events.publish(McpEvent.ToolsChanged, { server: name }).pipe(Effect.ignore))
fork(events.publish(McpEvent.ResourcesChanged, { server: name }).pipe(Effect.ignore))
fork(events.publish(Command.Event.Updated, {}).pipe(Effect.ignore))
fork(events.publish(McpEvent.StatusChanged, { server: name }).pipe(Effect.ignore))
})
@@ -458,6 +445,10 @@ export const layer = Layer.effect(
connection.onPromptsChanged(() => {
fork(refreshPrompts(name, entry, connection).pipe(Effect.ignore))
})
connection.onResourcesChanged(() => {
if (entry.client !== connection) return
fork(events.publish(McpEvent.ResourcesChanged, { server: name }).pipe(Effect.ignore))
})
}
const serverLog = (server: ServerName, message: MCPClient.LogMessage) => {
@@ -501,6 +492,7 @@ export const layer = Layer.effect(
// after the initial registration sweep and emits no list-changed notification would otherwise
// stay invisible to the model.
yield* events.publish(McpEvent.ToolsChanged, { server: name }).pipe(Effect.ignore)
yield* events.publish(McpEvent.ResourcesChanged, { server: name }).pipe(Effect.ignore)
yield* events.publish(McpEvent.StatusChanged, { server: name }).pipe(Effect.ignore)
fork(refreshPrompts(name, entry, result.value.connection).pipe(Effect.ignore))
return
@@ -557,11 +549,6 @@ export const layer = Layer.effect(
concurrency: "unbounded",
discard: true,
})
const gate = Effect.fnUntraced(function* (server: ServerName | string) {
const target = yield* requireServer(server)
yield* Deferred.await(target.entry.startup)
})
return Service.of({
servers: Effect.fn("MCP.servers")(function* () {
const entries = Array.from(runtime).toSorted(([a], [b]) => a.localeCompare(b))
@@ -637,11 +624,54 @@ export const layer = Layer.effect(
}),
resourceCatalog: Effect.fn("MCP.resourceCatalog")(function* () {
yield* whenAllReady
return new ResourceCatalog({ resources: [], templates: [] })
const catalogs = yield* Effect.forEach(
Array.from(runtime),
([name, entry]) => {
if (!entry.client) return Effect.succeed({ resources: [], templates: [] })
return Effect.all(
{
resources: entry.client.resources().pipe(Effect.catch(() => Effect.succeed([]))),
templates: entry.client.resourceTemplates().pipe(Effect.catch(() => Effect.succeed([]))),
},
{ concurrency: "unbounded" },
).pipe(
Effect.map((catalog) => ({
resources: catalog.resources.map((def) => toResource(name, def)),
templates: catalog.templates.map((def) => toResourceTemplate(name, def)),
})),
)
},
{ concurrency: "unbounded" },
)
return ResourceCatalog.make({
resources: catalogs
.flatMap((catalog) => catalog.resources)
.toSorted(
(a, b) => a.server.localeCompare(b.server) || a.name.localeCompare(b.name) || a.uri.localeCompare(b.uri),
),
templates: catalogs
.flatMap((catalog) => catalog.templates)
.toSorted(
(a, b) =>
a.server.localeCompare(b.server) ||
a.name.localeCompare(b.name) ||
a.uriTemplate.localeCompare(b.uriTemplate),
),
})
}),
readResource: Effect.fn("MCP.readResource")(function* (input) {
yield* gate(input.server)
return undefined
const target = yield* requireServer(input.server)
yield* Deferred.await(target.entry.startup)
if (!target.entry.client) return undefined
const result = yield* target.entry.client
.readResource({ uri: input.uri })
.pipe(Effect.catch(() => Effect.succeed(undefined)))
if (!result) return undefined
return ResourceContent.make({
server: target.name,
uri: input.uri,
contents: result.contents,
})
}),
})
}),
+13 -12
View File
@@ -2,6 +2,7 @@ import path from "path"
import { Context, Duration, Effect, Layer, Option, Schedule, Schema } from "effect"
import { HttpClient, HttpClientRequest } from "effect/unstable/http"
import { ModelsDev } from "@opencode-ai/schema/models-dev"
import { Money } from "@opencode-ai/schema/money"
import { Global } from "./global"
import { Flag } from "./flag/flag"
import { Flock } from "./util/flock"
@@ -18,10 +19,10 @@ export type CatalogModelStatus = typeof CatalogModelStatus.Type
const USER_AGENT = `opencode/${InstallationChannel}/${InstallationVersion}/${Flag.OPENCODE_CLIENT}`
const CostTier = Schema.Struct({
input: Schema.Finite,
output: Schema.Finite,
cache_read: Schema.optional(Schema.Finite),
cache_write: Schema.optional(Schema.Finite),
input: Money.USDPerMillionTokens,
output: Money.USDPerMillionTokens,
cache_read: Schema.optional(Money.USDPerMillionTokens),
cache_write: Schema.optional(Money.USDPerMillionTokens),
tier: Schema.Struct({
type: Schema.Literal("context"),
size: Schema.Finite,
@@ -29,17 +30,17 @@ const CostTier = Schema.Struct({
})
const Cost = Schema.Struct({
input: Schema.Finite,
output: Schema.Finite,
cache_read: Schema.optional(Schema.Finite),
cache_write: Schema.optional(Schema.Finite),
input: Money.USDPerMillionTokens,
output: Money.USDPerMillionTokens,
cache_read: Schema.optional(Money.USDPerMillionTokens),
cache_write: Schema.optional(Money.USDPerMillionTokens),
tiers: Schema.optional(Schema.Array(CostTier)),
context_over_200k: Schema.optional(
Schema.Struct({
input: Schema.Finite,
output: Schema.Finite,
cache_read: Schema.optional(Schema.Finite),
cache_write: Schema.optional(Schema.Finite),
input: Money.USDPerMillionTokens,
output: Money.USDPerMillionTokens,
cache_read: Schema.optional(Money.USDPerMillionTokens),
cache_write: Schema.optional(Money.USDPerMillionTokens),
}),
),
})
+13 -6
View File
@@ -1,6 +1,6 @@
export * as PluginV2 from "./plugin"
import type { Plugin } from "@opencode-ai/plugin/v2/effect"
import type { Plugin } from "@opencode-ai/plugin/v2/effect/plugin"
import { Event, ID, type Info } from "@opencode-ai/schema/plugin"
import { makeLocationNode } from "./effect/app-node"
import { Context, Effect, Exit, Layer, Scope, Semaphore } from "effect"
@@ -18,6 +18,7 @@ import { SkillV2 } from "./skill"
import { State } from "./state"
import { ToolRegistry } from "./tool/registry"
import { ToolHooks } from "./tool/hooks"
import { PluginHooks } from "./plugin/hooks"
export interface Interface {
readonly activate: (plugins: readonly { readonly plugin: Plugin; readonly version?: string }[]) => Effect.Effect<void>
@@ -57,12 +58,13 @@ const layer = Layer.effect(
generation.length === definitions.length &&
generation.every(
(plugin, index) => plugin.id === definitions[index]?.id && plugin.version === definitions[index]?.version,
)
) &&
definitions.every((definition) => active.has(definition.id))
) {
return
}
generation = undefined
const exit = yield* State.batch(
yield* State.batch(
Effect.gen(function* () {
const scopes = Array.from(active.values()).toReversed()
active.clear()
@@ -81,13 +83,17 @@ const layer = Layer.effect(
Effect.onExit((exit) => (Exit.isFailure(exit) ? Scope.close(child, exit) : Effect.void)),
Effect.exit,
)
if (Exit.isFailure(loaded)) return loaded
if (Exit.isFailure(loaded)) {
yield* Effect.logWarning("failed to load plugin", {
"plugin.id": definition.id,
cause: loaded.cause,
})
continue
}
active.set(definition.id, child)
}
return Exit.void
}),
)
if (Exit.isFailure(exit)) return yield* exit
generation = definitions.map((definition) => ({
id: definition.id,
...(definition.version === undefined ? {} : { version: definition.version }),
@@ -131,6 +137,7 @@ export const node = makeLocationNode({
SkillV2.node,
ToolRegistry.toolsNode,
ToolHooks.node,
PluginHooks.node,
PluginRuntime.node,
],
})
+7
View File
@@ -125,6 +125,7 @@ export const Plugin = define({
yield* ctx.agent.transform((draft) => {
draft.update(AgentV2.defaultID, (item) => {
item.name = AgentV2.Name.make("Build")
item.description = "The default agent. Executes tools based on configured permissions."
item.mode = "primary"
item.permissions.push(
@@ -136,6 +137,7 @@ export const Plugin = define({
})
draft.update(AgentV2.ID.make("plan"), (item) => {
item.name = AgentV2.Name.make("Plan")
item.description = "Plan mode. Disallows all edit tools."
item.mode = "primary"
item.permissions.push(
@@ -155,6 +157,7 @@ export const Plugin = define({
})
draft.update(AgentV2.ID.make("general"), (item) => {
item.name = AgentV2.Name.make("General")
item.description =
"General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel."
item.mode = "subagent"
@@ -167,6 +170,7 @@ export const Plugin = define({
})
draft.update(AgentV2.ID.make("explore"), (item) => {
item.name = AgentV2.Name.make("Explore")
item.description =
'Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions.'
item.system = PROMPT_EXPLORE
@@ -189,6 +193,7 @@ export const Plugin = define({
})
draft.update(AgentV2.ID.make("compaction"), (item) => {
item.name = AgentV2.Name.make("Compaction")
item.mode = "primary"
item.hidden = true
item.system = PROMPT_COMPACTION
@@ -196,6 +201,7 @@ export const Plugin = define({
})
draft.update(AgentV2.ID.make("title"), (item) => {
item.name = AgentV2.Name.make("Title")
item.mode = "primary"
item.hidden = true
item.system = PROMPT_TITLE
@@ -203,6 +209,7 @@ export const Plugin = define({
})
draft.update(AgentV2.ID.make("summary"), (item) => {
item.name = AgentV2.Name.make("Summary")
item.mode = "primary"
item.hidden = true
item.system = PROMPT_SUMMARY
+67
View File
@@ -0,0 +1,67 @@
export * as PluginHooks from "./hooks"
import type { AISDKHooks } from "@opencode-ai/plugin/v2/effect/aisdk"
import type { SessionHooks } from "@opencode-ai/plugin/v2/effect/session"
import type { ToolHooks } from "@opencode-ai/plugin/v2/effect/tool"
import { Context, Effect, Layer, Scope } from "effect"
import { makeLocationNode } from "../effect/app-node"
import { State } from "../state"
export interface Domains {
readonly aisdk: AISDKHooks
readonly session: SessionHooks
readonly tool: ToolHooks
}
type Callback<Event> = (event: Event) => Effect.Effect<void>
export interface Interface {
readonly register: <Domain extends keyof Domains, Name extends keyof Domains[Domain]>(
domain: Domain,
name: Name,
callback: Callback<Domains[Domain][Name]>,
) => Effect.Effect<State.Registration, never, Scope.Scope>
readonly trigger: <Domain extends keyof Domains, Name extends keyof Domains[Domain]>(
domain: Domain,
name: Name,
event: Domains[Domain][Name],
) => Effect.Effect<Domains[Domain][Name]>
}
export class Service extends Context.Service<Service, Interface>()("@opencode/v2/PluginHooks") {}
const layer = Layer.effect(
Service,
Effect.gen(function* () {
const callbacks = new Map<string, Function[]>()
const key = (domain: keyof Domains, name: PropertyKey) => `${domain}.${String(name)}`
const register: Interface["register"] = Effect.fn("PluginHooks.register")(function* (domain, name, callback) {
const scope = yield* Scope.Scope
const id = key(domain, name)
let active = true
callbacks.set(id, [...(callbacks.get(id) ?? []), callback])
const dispose = Effect.sync(() => {
if (!active) return
active = false
const next = (callbacks.get(id) ?? []).filter((item) => item !== callback)
if (next.length === 0) callbacks.delete(id)
else callbacks.set(id, next)
})
yield* Scope.addFinalizer(scope, dispose)
return { dispose }
})
const trigger: Interface["trigger"] = Effect.fn("PluginHooks.trigger")(function* (domain, name, event) {
for (const callback of callbacks.get(key(domain, name)) ?? []) {
const result: Effect.Effect<void> = Reflect.apply(callback, undefined, [event])
yield* result
}
return event
})
return Service.of({ register, trigger })
}),
)
export const node = makeLocationNode({ service: Service, layer, deps: [] })
+74 -68
View File
@@ -1,6 +1,6 @@
export * as PluginHost from "./host"
import type { PluginContext } from "@opencode-ai/plugin/v2/effect"
import type { Plugin } from "@opencode-ai/plugin/v2/effect"
import { EventManifest } from "@opencode-ai/schema/event-manifest"
import { Effect, Schema, Stream } from "effect"
import { AgentV2 } from "../agent"
@@ -22,6 +22,7 @@ import { Tool } from "../tool/tool"
import { Tools } from "../tool/tools"
import { ToolHooks } from "../tool/hooks"
import { WorkspaceV2 } from "../workspace"
import { PluginHooks } from "./hooks"
const mutable = <T>(value: T) => value as DeepMutable<T>
export const make = Effect.fn("PluginHost.make")(function* (plugin: PluginV2.Interface) {
@@ -36,6 +37,7 @@ export const make = Effect.fn("PluginHost.make")(function* (plugin: PluginV2.Int
const skill = yield* SkillV2.Service
const tools = yield* Tools.Service
const toolHooks = yield* ToolHooks.Service
const hooks = yield* PluginHooks.Service
const runtime = yield* PluginRuntime.Service
const locationInfo = () =>
new Location.Info({
@@ -43,7 +45,7 @@ export const make = Effect.fn("PluginHost.make")(function* (plugin: PluginV2.Int
workspaceID: location.workspaceID,
project: location.project,
})
const locationRef = (input?: Parameters<PluginContext["agent"]["list"]>[0]) =>
const locationRef = (input?: Parameters<Plugin.Context["agent"]["list"]>[0]) =>
input?.location === undefined
? undefined
: Location.Ref.make({
@@ -79,32 +81,32 @@ export const make = Effect.fn("PluginHost.make")(function* (plugin: PluginV2.Int
}),
},
aisdk: {
sdk: (callback) =>
aisdk.hook.sdk((event) => {
hook: (name, callback) => {
if (name === "sdk") {
return aisdk.hook.sdk((event) => {
const output = {
model: mutable(event.model),
package: event.package,
options: event.options,
sdk: event.sdk,
}
return Reflect.apply(callback, undefined, [output]).pipe(
Effect.tap(() => Effect.sync(() => (event.sdk = output.sdk))),
)
})
}
return aisdk.hook.language((event) => {
const output = {
model: mutable(event.model),
package: event.package,
options: event.options,
sdk: event.sdk,
}
const result = callback(output)
return Effect.suspend(() => (Effect.isEffect(result) ? result : Effect.void)).pipe(
Effect.tap(() => Effect.sync(() => (event.sdk = output.sdk))),
)
}),
language: (callback) =>
aisdk.hook.language((event) => {
const output = {
model: mutable(event.model),
sdk: event.sdk,
options: event.options,
language: event.language,
}
const result = callback(output)
return Effect.suspend(() => (Effect.isEffect(result) ? result : Effect.void)).pipe(
return Reflect.apply(callback, undefined, [output]).pipe(
Effect.tap(() => Effect.sync(() => (event.language = output.language))),
)
}),
})
},
},
catalog: {
provider: {
@@ -164,25 +166,29 @@ export const make = Effect.fn("PluginHost.make")(function* (plugin: PluginV2.Int
integration: {
list: () => response(integration.list()),
get: (input) => response(integration.get(Integration.ID.make(input.integrationID))),
connectKey: (input) =>
integration.connection.key({
integrationID: Integration.ID.make(input.integrationID),
key: input.key,
label: input.label,
}),
connectOauth: (input) =>
response(
integration.connection.oauth({
connect: {
key: (input) =>
integration.connection.key({
integrationID: Integration.ID.make(input.integrationID),
methodID: Integration.MethodID.make(input.methodID),
inputs: input.inputs,
key: input.key,
label: input.label,
}),
),
attemptStatus: (input) => response(integration.attempt.status(Integration.AttemptID.make(input.attemptID))),
attemptComplete: (input) =>
integration.attempt.complete({ attemptID: Integration.AttemptID.make(input.attemptID), code: input.code }),
attemptCancel: (input) => integration.attempt.cancel(Integration.AttemptID.make(input.attemptID)),
oauth: (input) =>
response(
integration.connection.oauth({
integrationID: Integration.ID.make(input.integrationID),
methodID: Integration.MethodID.make(input.methodID),
inputs: input.inputs,
label: input.label,
}),
),
},
attempt: {
status: (input) => response(integration.attempt.status(Integration.AttemptID.make(input.attemptID))),
complete: (input) =>
integration.attempt.complete({ attemptID: Integration.AttemptID.make(input.attemptID), code: input.code }),
cancel: (input) => integration.attempt.cancel(Integration.AttemptID.make(input.attemptID)),
},
reload: integration.reload,
connection: {
active: (id) => integration.connection.active(Integration.ID.make(id)),
@@ -317,11 +323,12 @@ export const make = Effect.fn("PluginHost.make")(function* (plugin: PluginV2.Int
registrations,
(registration) => tools.register({ [registration.name]: registration.tool }, registration.options),
{ discard: true },
)
).pipe(Effect.orDie)
return { dispose: Effect.void }
}),
execute: {
before: (callback) =>
toolHooks.hook.before((event) => {
hook: (name, callback) => {
if (name === "execute.before") {
return toolHooks.hook.before((event) => {
const output = {
tool: event.tool,
sessionID: event.sessionID,
@@ -330,38 +337,37 @@ export const make = Effect.fn("PluginHost.make")(function* (plugin: PluginV2.Int
toolCallID: event.toolCallID,
input: event.input,
}
const result = callback(output)
return Effect.suspend(() => (Effect.isEffect(result) ? result : Effect.void)).pipe(
return Reflect.apply(callback, undefined, [output]).pipe(
Effect.tap(() => Effect.sync(() => (event.input = output.input))),
)
}),
after: (callback) =>
toolHooks.hook.after((event) => {
const output = {
tool: event.tool,
sessionID: event.sessionID,
agent: event.agent,
assistantMessageID: event.assistantMessageID,
toolCallID: event.toolCallID,
input: event.input,
result: event.result,
output: event.output,
outputPaths: event.outputPaths,
}
const result = callback(output)
return Effect.suspend(() => (Effect.isEffect(result) ? result : Effect.void)).pipe(
Effect.tap(() =>
Effect.sync(() => {
event.result = output.result
event.output = output.output
event.outputPaths = output.outputPaths
}),
),
)
}),
})
}
return toolHooks.hook.after((event) => {
const output = {
tool: event.tool,
sessionID: event.sessionID,
agent: event.agent,
assistantMessageID: event.assistantMessageID,
toolCallID: event.toolCallID,
input: event.input,
result: event.result,
output: event.output,
outputPaths: event.outputPaths,
}
return Reflect.apply(callback, undefined, [output]).pipe(
Effect.tap(() =>
Effect.sync(() => {
event.result = output.result
event.output = output.output
event.outputPaths = output.outputPaths
}),
),
)
})
},
},
session: {
hook: (name, callback) => hooks.register("session", name, callback),
create: (input) =>
runtime.session.create({
id: input?.id,
@@ -375,5 +381,5 @@ export const make = Effect.fn("PluginHost.make")(function* (plugin: PluginV2.Int
command: runtime.session.command,
interrupt: (input) => runtime.session.interrupt(input.sessionID),
},
} satisfies PluginContext
} satisfies Plugin.Context
})
+3 -3
View File
@@ -1,6 +1,6 @@
export * as PluginInternal from "./internal"
import type { Plugin } from "@opencode-ai/plugin/v2/effect"
import type { Plugin } from "@opencode-ai/plugin/v2/effect/plugin"
import { Context, Effect, Scope } from "effect"
import { HttpClient } from "effect/unstable/http"
import { AgentV2 } from "../agent"
@@ -31,7 +31,7 @@ import { SessionInstructions } from "../session/instructions"
import { SessionTodo } from "../session/todo"
import { Shell } from "../shell"
import { SkillV2 } from "../skill"
import { ApplyPatchTool } from "../tool/apply-patch"
import { PatchTool } from "../tool/patch"
import { EditTool } from "../tool/edit"
import { GlobTool } from "../tool/glob"
import { GrepTool } from "../tool/grep"
@@ -127,7 +127,7 @@ const pre = [
SkillPlugin.Plugin,
ModelsDevPlugin,
...ProviderPlugins,
ApplyPatchTool.Plugin,
PatchTool.Plugin,
EditTool.Plugin,
GlobTool.Plugin,
GrepTool.Plugin,
+34 -20
View File
@@ -1,5 +1,6 @@
import { define } from "@opencode-ai/plugin/v2/effect/plugin"
import type { ModelV2Info } from "@opencode-ai/sdk/v2/types"
import { Money } from "@opencode-ai/schema/money"
import type { ModelInfo } from "@opencode-ai/sdk/v2/types"
import { Effect, Stream } from "effect"
import { EventV2 } from "../event"
import { ModelV2 } from "../model"
@@ -11,13 +12,13 @@ function released(date: string) {
return Number.isFinite(time) ? time : 0
}
function cost(input: ModelsDev.Model["cost"]): ModelV2Info["cost"] {
function cost(input: ModelsDev.Model["cost"]): ModelInfo["cost"] {
const base = {
input: input?.input ?? 0,
output: input?.output ?? 0,
input: input?.input ?? Money.USDPerMillionTokens.zero,
output: input?.output ?? Money.USDPerMillionTokens.zero,
cache: {
read: input?.cache_read ?? 0,
write: input?.cache_write ?? 0,
read: input?.cache_read ?? Money.USDPerMillionTokens.zero,
write: input?.cache_write ?? Money.USDPerMillionTokens.zero,
},
}
return [
@@ -27,8 +28,8 @@ function cost(input: ModelsDev.Model["cost"]): ModelV2Info["cost"] {
input: item.input,
output: item.output,
cache: {
read: item.cache_read ?? 0,
write: item.cache_write ?? 0,
read: item.cache_read ?? Money.USDPerMillionTokens.zero,
write: item.cache_write ?? Money.USDPerMillionTokens.zero,
},
})) ?? []),
...(input?.context_over_200k
@@ -41,8 +42,8 @@ function cost(input: ModelsDev.Model["cost"]): ModelV2Info["cost"] {
input: input.context_over_200k.input,
output: input.context_over_200k.output,
cache: {
read: input.context_over_200k.cache_read ?? 0,
write: input.context_over_200k.cache_write ?? 0,
read: input.context_over_200k.cache_read ?? Money.USDPerMillionTokens.zero,
write: input.context_over_200k.cache_write ?? Money.USDPerMillionTokens.zero,
},
},
]
@@ -50,13 +51,13 @@ function cost(input: ModelsDev.Model["cost"]): ModelV2Info["cost"] {
]
}
function mergeCost(base: ModelV2Info["cost"], override: ModelsDev.Model["cost"] | undefined) {
function mergeCost(base: ModelInfo["cost"], override: ModelsDev.Model["cost"] | undefined) {
if (!override) return base
const next = cost(override)
const [baseDefault, ...baseTiers] = base
const [nextDefault, ...nextTiers] = next
const tierKey = (item: ModelV2Info["cost"][number]) => `${item.tier?.type ?? "base"}:${item.tier?.size ?? 0}`
const merge = (left: ModelV2Info["cost"][number], right: ModelV2Info["cost"][number]) => ({
const tierKey = (item: ModelInfo["cost"][number]) => `${item.tier?.type ?? "base"}:${item.tier?.size ?? 0}`
const merge = (left: ModelInfo["cost"][number], right: ModelInfo["cost"][number]) => ({
...left,
...right,
tier: right.tier ?? left.tier,
@@ -67,12 +68,25 @@ function mergeCost(base: ModelV2Info["cost"], override: ModelsDev.Model["cost"]
const current = tiers.get(tierKey(item))
tiers.set(tierKey(item), current ? merge(current, item) : item)
}
return [merge(baseDefault ?? { input: 0, output: 0, cache: { read: 0, write: 0 } }, nextDefault), ...tiers.values()]
return [
merge(
baseDefault ?? {
input: Money.USDPerMillionTokens.zero,
output: Money.USDPerMillionTokens.zero,
cache: {
read: Money.USDPerMillionTokens.zero,
write: Money.USDPerMillionTokens.zero,
},
},
nextDefault,
),
...tiers.values(),
]
}
const OPENAI_INCLUDE_ENCRYPTED_REASONING = ["reasoning.encrypted_content"]
function reasoningVariants(provider: ModelsDev.Provider, model: ModelsDev.Model): NonNullable<ModelV2Info["variants"]> {
function reasoningVariants(provider: ModelsDev.Provider, model: ModelsDev.Model): NonNullable<ModelInfo["variants"]> {
const npm = model.provider?.npm ?? provider.npm
const options = model.reasoning_options ?? []
const effort = options.find((option) => option.type === "effort")
@@ -117,7 +131,7 @@ function settingsForEffort(npm: string | undefined, effort: string): ProviderV2.
function budgetVariants(
npm: string | undefined,
option: Extract<NonNullable<ModelsDev.Model["reasoning_options"]>[number], { type: "budget_tokens" }>,
): NonNullable<ModelV2Info["variants"]> {
): NonNullable<ModelInfo["variants"]> {
const max = option.max
const high =
option.max === undefined
@@ -146,7 +160,7 @@ function modeName(model: ModelsDev.Model, mode: string) {
return `${model.name} ${mode.charAt(0).toUpperCase()}${mode.slice(1)}`
}
function mergeVariants(model: ModelV2Info, next: NonNullable<ModelV2Info["variants"]>) {
function mergeVariants(model: ModelInfo, next: NonNullable<ModelInfo["variants"]>) {
const variants = model.variants ?? []
const existing = new Map(variants.map((variant) => [variant.id, variant]))
const nextIDs = new Set(next.map((variant) => variant.id))
@@ -157,13 +171,13 @@ function mergeVariants(model: ModelV2Info, next: NonNullable<ModelV2Info["varian
}
function applyModel(
draft: ModelV2Info,
draft: ModelInfo,
model: ModelsDev.Model,
input: {
readonly name?: string
readonly cost?: ModelV2Info["cost"]
readonly cost?: ModelInfo["cost"]
readonly request?: NonNullable<NonNullable<ModelsDev.Model["experimental"]>["modes"]>[string]["provider"]
readonly variants?: NonNullable<ModelV2Info["variants"]>
readonly variants?: NonNullable<ModelInfo["variants"]>
} = {},
) {
draft.name = input.name ?? model.name
+24 -14
View File
@@ -1,11 +1,12 @@
export * as PluginPromise from "./promise"
import { define } from "@opencode-ai/plugin/v2/effect"
import type { Plugin, PluginContext } from "@opencode-ai/plugin/v2/promise"
import { Plugin } from "@opencode-ai/plugin/v2/effect"
import { Effect, Scope, Stream } from "effect"
type HostRegistration = { readonly dispose: Effect.Effect<void> }
type Registration = { readonly dispose: () => Promise<void> }
type PromisePlugin = import("@opencode-ai/plugin/v2/plugin").Plugin
type PromisePluginContext = import("@opencode-ai/plugin/v2/plugin").Context
/**
* Adapts a Promise plugin into an Effect plugin so the existing Effect-only
@@ -16,8 +17,8 @@ type Registration = { readonly dispose: () => Promise<void> }
* preserves boot-time batching, so Promise-plugin transforms still coalesce
* into one reload per domain.
*/
export function fromPromise(plugin: Plugin) {
return define({
export function fromPromise(plugin: PromisePlugin) {
return Plugin.define({
id: plugin.id,
effect: (host) =>
Effect.gen(function* () {
@@ -43,7 +44,7 @@ export function fromPromise(plugin: Plugin) {
}),
)
const context2: PluginContext = {
const context2: PromisePluginContext = {
options: host.options,
agent: {
list: (input) => run(host.agent.list(input)),
@@ -51,10 +52,8 @@ export function fromPromise(plugin: Plugin) {
reload: () => run(host.agent.reload()),
},
aisdk: {
sdk: (callback) =>
register(host.aisdk.sdk((event) => Effect.promise(() => Promise.resolve(callback(event))))),
language: (callback) =>
register(host.aisdk.language((event) => Effect.promise(() => Promise.resolve(callback(event))))),
hook: (name, callback) =>
register(host.aisdk.hook(name, (event) => Effect.promise(() => Promise.resolve(callback(event))))),
},
catalog: {
provider: {
@@ -79,11 +78,15 @@ export function fromPromise(plugin: Plugin) {
integration: {
list: (input) => run(host.integration.list(input)),
get: (input) => run(host.integration.get(input)),
connectKey: (input) => run(host.integration.connectKey(input)),
connectOauth: (input) => run(host.integration.connectOauth(input)),
attemptStatus: (input) => run(host.integration.attemptStatus(input)),
attemptComplete: (input) => run(host.integration.attemptComplete(input)),
attemptCancel: (input) => run(host.integration.attemptCancel(input)),
connect: {
key: (input) => run(host.integration.connect.key(input)),
oauth: (input) => run(host.integration.connect.oauth(input)),
},
attempt: {
status: (input) => run(host.integration.attempt.status(input)),
complete: (input) => run(host.integration.attempt.complete(input)),
cancel: (input) => run(host.integration.attempt.cancel(input)),
},
transform: transform(host.integration),
reload: () => run(host.integration.reload()),
connection: {
@@ -104,12 +107,19 @@ export function fromPromise(plugin: Plugin) {
transform: transform(host.skill),
reload: () => run(host.skill.reload()),
},
tool: {
transform: transform(host.tool),
hook: (name, callback) =>
register(host.tool.hook(name, (event) => Effect.promise(() => Promise.resolve(callback(event))))),
},
session: {
create: (input) => run(host.session.create(input)),
get: (input) => run(host.session.get(input)),
prompt: (input) => run(host.session.prompt(input)),
command: (input) => run(host.session.command(input)),
interrupt: (input) => run(host.session.interrupt(input)),
hook: (name, callback) =>
register(host.session.hook(name, (event) => Effect.promise(() => Promise.resolve(callback(event))))),
},
}
+2 -1
View File
@@ -4,7 +4,8 @@ import { define } from "@opencode-ai/plugin/v2/effect/plugin"
export const AlibabaPlugin = define({
id: "opencode.provider.alibaba",
effect: Effect.fn(function* (ctx) {
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/alibaba") return
const mod = yield* Effect.promise(() => import("@ai-sdk/alibaba"))
@@ -75,7 +75,8 @@ export const AmazonBedrockPlugin = define({
})
}
})
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (!["@ai-sdk/amazon-bedrock", "@ai-sdk/amazon-bedrock/mantle"].includes(evt.package)) return
const options = { ...evt.options }
@@ -108,7 +109,8 @@ export const AmazonBedrockPlugin = define({
evt.sdk = mod.createAmazonBedrock(options)
}),
)
yield* ctx.aisdk.language(
yield* ctx.aisdk.hook(
"language",
Effect.fn(function* (evt) {
if (evt.model.providerID !== ProviderV2.ID.amazonBedrock) return
if (
@@ -17,7 +17,8 @@ export const AnthropicPlugin = define({
})
}
})
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/anthropic") return
const mod = yield* Effect.promise(() => import("@ai-sdk/anthropic"))
+6 -3
View File
@@ -26,7 +26,8 @@ export const AzurePlugin = define({
})
}
})
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/azure") return
if (evt.model.providerID === ProviderV2.ID.azure) {
@@ -44,7 +45,8 @@ export const AzurePlugin = define({
evt.sdk = mod.createAzure(evt.options)
}),
)
yield* ctx.aisdk.language(
yield* ctx.aisdk.hook(
"language",
Effect.fn(function* (evt) {
if (evt.model.providerID !== ProviderV2.ID.azure) return
evt.language = selectLanguage(
@@ -75,7 +77,8 @@ export const AzureCognitiveServicesPlugin = define({
})
}
})
yield* ctx.aisdk.language(
yield* ctx.aisdk.hook(
"language",
Effect.fn(function* (evt) {
if (evt.model.providerID !== ProviderV2.ID.make("azure-cognitive-services")) return
evt.language = selectLanguage(
@@ -14,7 +14,8 @@ export const CerebrasPlugin = define({
})
}
})
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/cerebras") return
const mod = yield* Effect.promise(() => import("@ai-sdk/cerebras"))
@@ -6,7 +6,8 @@ import { define } from "@opencode-ai/plugin/v2/effect/plugin"
export const CloudflareAIGatewayPlugin = define({
id: "opencode.provider.cloudflare-ai-gateway",
effect: Effect.fn(function* (ctx) {
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "ai-gateway-provider") return
if (evt.options.baseURL) return
@@ -19,7 +19,8 @@ export const CloudflareWorkersAIPlugin = define({
if (accountId) provider.settings = { ...provider.settings, baseURL: workersEndpoint(accountId) }
})
})
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.model.providerID !== providerID) return
if (evt.package !== "@ai-sdk/openai-compatible") return
@@ -35,7 +36,8 @@ export const CloudflareWorkersAIPlugin = define({
)
}),
)
yield* ctx.aisdk.language(
yield* ctx.aisdk.hook(
"language",
Effect.fn(function* (evt) {
if (evt.model.providerID !== providerID) return
evt.language = evt.sdk.languageModel(evt.model.modelID ?? evt.model.id)
+2 -1
View File
@@ -4,7 +4,8 @@ import { define } from "@opencode-ai/plugin/v2/effect/plugin"
export const CoherePlugin = define({
id: "opencode.provider.cohere",
effect: Effect.fn(function* (ctx) {
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/cohere") return
const mod = yield* Effect.promise(() => import("@ai-sdk/cohere"))
@@ -4,7 +4,8 @@ import { define } from "@opencode-ai/plugin/v2/effect/plugin"
export const DeepInfraPlugin = define({
id: "opencode.provider.deepinfra",
effect: Effect.fn(function* (ctx) {
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/deepinfra") return
const mod = yield* Effect.promise(() => import("@ai-sdk/deepinfra"))
+2 -1
View File
@@ -7,7 +7,8 @@ export const DynamicProviderPlugin = define({
id: "opencode.provider.dynamic",
effect: Effect.fn(function* (ctx) {
const npm = yield* Npm.Service
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.sdk) return
+2 -1
View File
@@ -4,7 +4,8 @@ import { define } from "@opencode-ai/plugin/v2/effect/plugin"
export const GatewayPlugin = define({
id: "opencode.provider.gateway",
effect: Effect.fn(function* (ctx) {
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/gateway") return
const mod = yield* Effect.promise(() => import("@ai-sdk/gateway"))
@@ -23,14 +23,16 @@ export const GithubCopilotPlugin = define({
model.enabled = false
})
})
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/github-copilot") return
const mod = yield* Effect.promise(() => import("../../github-copilot/copilot-provider"))
evt.sdk = mod.createOpenaiCompatible(evt.options)
}),
)
yield* ctx.aisdk.language(
yield* ctx.aisdk.hook(
"language",
Effect.fn(function* (evt) {
if (evt.model.providerID !== ProviderV2.ID.githubCopilot) return
if (evt.sdk.responses === undefined && evt.sdk.chat === undefined) {
+4 -2
View File
@@ -7,7 +7,8 @@ import { ProviderV2 } from "../../provider"
export const GitLabPlugin = define({
id: "opencode.provider.gitlab",
effect: Effect.fn(function* (ctx) {
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "gitlab-ai-provider") return
const mod = yield* Effect.promise(() => import("gitlab-ai-provider"))
@@ -31,7 +32,8 @@ export const GitLabPlugin = define({
})
}),
)
yield* ctx.aisdk.language(
yield* ctx.aisdk.hook(
"language",
Effect.fn(function* (evt) {
if (evt.model.providerID !== ProviderV2.ID.gitlab) return
const featureFlags =
@@ -85,7 +85,8 @@ export const GoogleVertexPlugin = define({
})
}
})
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.model.providerID === ProviderV2.ID.googleVertex && evt.package.includes("@ai-sdk/openai-compatible")) {
evt.options.fetch = authFetch(evt.options.fetch)
@@ -104,7 +105,8 @@ export const GoogleVertexPlugin = define({
})
}),
)
yield* ctx.aisdk.language(
yield* ctx.aisdk.hook(
"language",
Effect.fn(function* (evt) {
if (evt.model.providerID !== ProviderV2.ID.googleVertex) return
evt.language = evt.sdk.languageModel(String(evt.model.modelID ?? evt.model.id).trim())
@@ -135,7 +137,8 @@ export const GoogleVertexAnthropicPlugin = define({
})
}
})
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/google-vertex/anthropic") return
const mod = yield* Effect.promise(() => import("@ai-sdk/google-vertex/anthropic"))
@@ -161,7 +164,8 @@ export const GoogleVertexAnthropicPlugin = define({
})
}),
)
yield* ctx.aisdk.language(
yield* ctx.aisdk.hook(
"language",
Effect.fn(function* (evt) {
if (evt.model.providerID !== ProviderV2.ID.make("google-vertex-anthropic")) return
evt.language = evt.sdk.languageModel(String(evt.model.modelID ?? evt.model.id).trim())
+2 -1
View File
@@ -4,7 +4,8 @@ import { define } from "@opencode-ai/plugin/v2/effect/plugin"
export const GooglePlugin = define({
id: "opencode.provider.google",
effect: Effect.fn(function* (ctx) {
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/google") return
const mod = yield* Effect.promise(() => import("@ai-sdk/google"))
+2 -1
View File
@@ -4,7 +4,8 @@ import { define } from "@opencode-ai/plugin/v2/effect/plugin"
export const GroqPlugin = define({
id: "opencode.provider.groq",
effect: Effect.fn(function* (ctx) {
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/groq") return
const mod = yield* Effect.promise(() => import("@ai-sdk/groq"))
+2 -1
View File
@@ -4,7 +4,8 @@ import { define } from "@opencode-ai/plugin/v2/effect/plugin"
export const MistralPlugin = define({
id: "opencode.provider.mistral",
effect: Effect.fn(function* (ctx) {
yield* ctx.aisdk.sdk(
yield* ctx.aisdk.hook(
"sdk",
Effect.fn(function* (evt) {
if (evt.package !== "@ai-sdk/mistral") return
const mod = yield* Effect.promise(() => import("@ai-sdk/mistral"))

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