geordi 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/daemon/host.js +1388 -2336
- package/daemon/main.js +415 -300
- package/forge/adapter-node.js +1 -1
- package/forge/client/_app/immutable/assets/0.MTPMv8jx.css +2 -0
- package/forge/client/_app/immutable/assets/0.MTPMv8jx.css.br +0 -0
- package/forge/client/_app/immutable/assets/0.MTPMv8jx.css.gz +0 -0
- package/forge/client/_app/immutable/chunks/B3znLk1J.js +1 -0
- package/forge/client/_app/immutable/chunks/B3znLk1J.js.br +1 -0
- package/forge/client/_app/immutable/chunks/B3znLk1J.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/BLYrrO5i.js +1 -0
- package/forge/client/_app/immutable/chunks/BLYrrO5i.js.br +0 -0
- package/forge/client/_app/immutable/chunks/BLYrrO5i.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/{aBa3SWer.js → BPUcSU9Y.js} +1 -1
- package/forge/client/_app/immutable/chunks/BPUcSU9Y.js.br +2 -0
- package/forge/client/_app/immutable/chunks/BPUcSU9Y.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/BV6RCEM1.js +1 -0
- package/forge/client/_app/immutable/chunks/BV6RCEM1.js.br +2 -0
- package/forge/client/_app/immutable/chunks/BV6RCEM1.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/B_mLdc9L.js +1 -0
- package/forge/client/_app/immutable/chunks/B_mLdc9L.js.br +0 -0
- package/forge/client/_app/immutable/chunks/B_mLdc9L.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/BvPSoxVj.js +3 -0
- package/forge/client/_app/immutable/chunks/BvPSoxVj.js.br +0 -0
- package/forge/client/_app/immutable/chunks/BvPSoxVj.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/C1DGY91i.js +1 -0
- package/forge/client/_app/immutable/chunks/C1DGY91i.js.br +0 -0
- package/forge/client/_app/immutable/chunks/C1DGY91i.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/CrbaLN9e.js +3 -0
- package/forge/client/_app/immutable/chunks/CrbaLN9e.js.br +0 -0
- package/forge/client/_app/immutable/chunks/CrbaLN9e.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/Cu5m_VdO.js +162 -0
- package/forge/client/_app/immutable/chunks/Cu5m_VdO.js.br +0 -0
- package/forge/client/_app/immutable/chunks/Cu5m_VdO.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/{4h5PLCfh.js → DBdrLgIP.js} +1 -1
- package/forge/client/_app/immutable/chunks/DBdrLgIP.js.br +0 -0
- package/forge/client/_app/immutable/chunks/DBdrLgIP.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/DGwDCmJd.js +1 -0
- package/forge/client/_app/immutable/chunks/DGwDCmJd.js.br +0 -0
- package/forge/client/_app/immutable/chunks/DGwDCmJd.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/{CP0U8Qtu.js → DHj6ofkw.js} +1 -1
- package/forge/client/_app/immutable/chunks/DHj6ofkw.js.br +0 -0
- package/forge/client/_app/immutable/chunks/DHj6ofkw.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/DOMiXBiZ.js +1 -0
- package/forge/client/_app/immutable/chunks/DOMiXBiZ.js.br +1 -0
- package/forge/client/_app/immutable/chunks/DOMiXBiZ.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/Wy-MV1bx.js +3 -0
- package/forge/client/_app/immutable/chunks/Wy-MV1bx.js.br +0 -0
- package/forge/client/_app/immutable/chunks/Wy-MV1bx.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/YRCfaiJm.js +1 -0
- package/forge/client/_app/immutable/chunks/YRCfaiJm.js.br +0 -0
- package/forge/client/_app/immutable/chunks/YRCfaiJm.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/aqm7T3j0.js +1 -0
- package/forge/client/_app/immutable/chunks/aqm7T3j0.js.br +0 -0
- package/forge/client/_app/immutable/chunks/aqm7T3j0.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/e4tnLtM4.js +1 -0
- package/forge/client/_app/immutable/chunks/e4tnLtM4.js.br +0 -0
- package/forge/client/_app/immutable/chunks/e4tnLtM4.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/qtK8ANZN.js +1 -0
- package/forge/client/_app/immutable/chunks/qtK8ANZN.js.br +0 -0
- package/forge/client/_app/immutable/chunks/qtK8ANZN.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/yLpFDVQa.js +1 -0
- package/forge/client/_app/immutable/chunks/yLpFDVQa.js.br +0 -0
- package/forge/client/_app/immutable/chunks/yLpFDVQa.js.gz +0 -0
- package/forge/client/_app/immutable/entry/app.CcN3jWRh.js +2 -0
- package/forge/client/_app/immutable/entry/app.CcN3jWRh.js.br +0 -0
- package/forge/client/_app/immutable/entry/app.CcN3jWRh.js.gz +0 -0
- package/forge/client/_app/immutable/entry/{start.2j018bzK.js → start.C2pXqDYu.js} +2 -2
- package/forge/client/_app/immutable/entry/start.C2pXqDYu.js.br +0 -0
- package/forge/client/_app/immutable/entry/start.C2pXqDYu.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/0.BxR2qPA9.js +1 -0
- package/forge/client/_app/immutable/nodes/0.BxR2qPA9.js.br +0 -0
- package/forge/client/_app/immutable/nodes/0.BxR2qPA9.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/1.DTJ1nwBs.js +1 -0
- package/forge/client/_app/immutable/nodes/1.DTJ1nwBs.js.br +0 -0
- package/forge/client/_app/immutable/nodes/1.DTJ1nwBs.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/2.Cp2mgq6a.js +1 -0
- package/forge/client/_app/immutable/nodes/2.Cp2mgq6a.js.br +0 -0
- package/forge/client/_app/immutable/nodes/2.Cp2mgq6a.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/3.CaBDF-xh.js +1 -0
- package/forge/client/_app/immutable/nodes/3.CaBDF-xh.js.br +0 -0
- package/forge/client/_app/immutable/nodes/3.CaBDF-xh.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/4.CkFYpCOG.js +6 -0
- package/forge/client/_app/immutable/nodes/4.CkFYpCOG.js.br +0 -0
- package/forge/client/_app/immutable/nodes/4.CkFYpCOG.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/5.C707zcjh.js +31 -0
- package/forge/client/_app/immutable/nodes/5.C707zcjh.js.br +0 -0
- package/forge/client/_app/immutable/nodes/5.C707zcjh.js.gz +0 -0
- package/forge/client/_app/version.json +1 -1
- package/forge/client/_app/version.json.br +0 -0
- package/forge/client/_app/version.json.gz +0 -0
- package/forge/server/.vite/manifest.json +36 -28
- package/forge/server/_app/immutable/assets/_layout.MTPMv8jx.css +2 -0
- package/forge/server/chunks/Dialog.js +7 -28
- package/forge/server/chunks/Dialog.js.map +1 -1
- package/forge/server/chunks/NewWorkspace.js +110 -268
- package/forge/server/chunks/NewWorkspace.js.map +1 -1
- package/forge/server/chunks/TitleBar.js +4 -4
- package/forge/server/chunks/TitleBar.js.map +1 -1
- package/forge/server/chunks/WorkspaceActions.js +7 -4
- package/forge/server/chunks/WorkspaceActions.js.map +1 -1
- package/forge/server/chunks/access.remote.js +9 -3
- package/forge/server/chunks/access.remote.js.map +1 -1
- package/forge/server/chunks/app.js +533 -245
- package/forge/server/chunks/app.js.map +1 -1
- package/forge/server/chunks/format.js +238 -2
- package/forge/server/chunks/format.js.map +1 -1
- package/forge/server/chunks/index-server2.js +1 -8
- package/forge/server/chunks/index-server2.js.map +1 -1
- package/forge/server/chunks/instance.js +3 -3
- package/forge/server/chunks/internal.js +2 -2
- package/forge/server/chunks/internal.js.map +1 -1
- package/forge/server/chunks/keys.js +104 -0
- package/forge/server/chunks/keys.js.map +1 -0
- package/forge/server/chunks/{afar.svelte.js → motion.js} +5 -3
- package/forge/server/chunks/motion.js.map +1 -0
- package/forge/server/chunks/overview.js +1 -1
- package/forge/server/chunks/overview.js.map +1 -1
- package/forge/server/chunks/remote-15qct20.js +1 -1
- package/forge/server/chunks/settings.svelte.js +5 -0
- package/forge/server/chunks/settings.svelte.js.map +1 -1
- package/forge/server/chunks/workspaces.remote.js +9 -2
- package/forge/server/chunks/workspaces.remote.js.map +1 -1
- package/forge/server/entries/endpoints/mcp/_server.ts.js +7 -7
- package/forge/server/entries/endpoints/mcp/_server.ts.js.map +1 -1
- package/forge/server/entries/hooks.server.js +6 -1
- package/forge/server/entries/hooks.server.js.map +1 -1
- package/forge/server/entries/pages/_layout.svelte.js +80 -31
- package/forge/server/entries/pages/_layout.svelte.js.map +1 -1
- package/forge/server/entries/pages/overview/_page.svelte.js +2 -2
- package/forge/server/entries/pages/settings/__section__/_page.svelte.js +72 -15
- package/forge/server/entries/pages/settings/__section__/_page.svelte.js.map +1 -1
- package/forge/server/entries/pages/workspaces/_id_/_page.svelte.js +559 -158
- package/forge/server/entries/pages/workspaces/_id_/_page.svelte.js.map +1 -1
- package/forge/server/manifest-full.js +3 -3
- package/forge/server/manifest.js +3 -3
- package/forge/server/nodes/0.js +2 -2
- package/forge/server/nodes/1.js +1 -1
- package/forge/server/nodes/2.js +1 -1
- package/forge/server/nodes/3.js +1 -1
- package/forge/server/nodes/4.js +1 -1
- package/forge/server/nodes/5.js +1 -1
- package/forge/server/server.js +3 -3
- package/geordi.js +4 -1
- package/package.json +1 -1
- package/forge/client/_app/immutable/assets/0.CeOWqS-S.css +0 -2
- package/forge/client/_app/immutable/assets/0.CeOWqS-S.css.br +0 -0
- package/forge/client/_app/immutable/assets/0.CeOWqS-S.css.gz +0 -0
- package/forge/client/_app/immutable/chunks/4h5PLCfh.js.br +0 -0
- package/forge/client/_app/immutable/chunks/4h5PLCfh.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/6t7TNajV.js +0 -158
- package/forge/client/_app/immutable/chunks/6t7TNajV.js.br +0 -0
- package/forge/client/_app/immutable/chunks/6t7TNajV.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/BHzTxq5o.js +0 -1
- package/forge/client/_app/immutable/chunks/BHzTxq5o.js.br +0 -0
- package/forge/client/_app/immutable/chunks/BHzTxq5o.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/BPUjZm07.js +0 -1
- package/forge/client/_app/immutable/chunks/BPUjZm07.js.br +0 -0
- package/forge/client/_app/immutable/chunks/BPUjZm07.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/BSvEvqa6.js +0 -1
- package/forge/client/_app/immutable/chunks/BSvEvqa6.js.br +0 -2
- package/forge/client/_app/immutable/chunks/BSvEvqa6.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/BwzaI1OF.js +0 -1
- package/forge/client/_app/immutable/chunks/BwzaI1OF.js.br +0 -0
- package/forge/client/_app/immutable/chunks/BwzaI1OF.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/C7uVFhMO.js +0 -1
- package/forge/client/_app/immutable/chunks/C7uVFhMO.js.br +0 -0
- package/forge/client/_app/immutable/chunks/C7uVFhMO.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/CCvT0cxn.js +0 -1
- package/forge/client/_app/immutable/chunks/CCvT0cxn.js.br +0 -0
- package/forge/client/_app/immutable/chunks/CCvT0cxn.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/CP0U8Qtu.js.br +0 -0
- package/forge/client/_app/immutable/chunks/CP0U8Qtu.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/CVVzDLmk.js +0 -1
- package/forge/client/_app/immutable/chunks/CVVzDLmk.js.br +0 -0
- package/forge/client/_app/immutable/chunks/CVVzDLmk.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/CeAxe25K.js +0 -1
- package/forge/client/_app/immutable/chunks/CeAxe25K.js.br +0 -0
- package/forge/client/_app/immutable/chunks/CeAxe25K.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/DFLpRvbz.js +0 -1
- package/forge/client/_app/immutable/chunks/DFLpRvbz.js.br +0 -0
- package/forge/client/_app/immutable/chunks/DFLpRvbz.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/DYKv5n5o.js +0 -1
- package/forge/client/_app/immutable/chunks/DYKv5n5o.js.br +0 -0
- package/forge/client/_app/immutable/chunks/DYKv5n5o.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/DdaUeSpb.js +0 -1
- package/forge/client/_app/immutable/chunks/DdaUeSpb.js.br +0 -1
- package/forge/client/_app/immutable/chunks/DdaUeSpb.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/DeOqS6ly.js +0 -3
- package/forge/client/_app/immutable/chunks/DeOqS6ly.js.br +0 -0
- package/forge/client/_app/immutable/chunks/DeOqS6ly.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/YP9ibVqW.js +0 -1
- package/forge/client/_app/immutable/chunks/YP9ibVqW.js.br +0 -0
- package/forge/client/_app/immutable/chunks/YP9ibVqW.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/aBa3SWer.js.br +0 -0
- package/forge/client/_app/immutable/chunks/aBa3SWer.js.gz +0 -0
- package/forge/client/_app/immutable/chunks/zBSgLl7M.js +0 -3
- package/forge/client/_app/immutable/chunks/zBSgLl7M.js.br +0 -0
- package/forge/client/_app/immutable/chunks/zBSgLl7M.js.gz +0 -0
- package/forge/client/_app/immutable/entry/app.Bg7yCsGP.js +0 -2
- package/forge/client/_app/immutable/entry/app.Bg7yCsGP.js.br +0 -0
- package/forge/client/_app/immutable/entry/app.Bg7yCsGP.js.gz +0 -0
- package/forge/client/_app/immutable/entry/start.2j018bzK.js.br +0 -0
- package/forge/client/_app/immutable/entry/start.2j018bzK.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/0.B9rqMzxb.js +0 -1
- package/forge/client/_app/immutable/nodes/0.B9rqMzxb.js.br +0 -0
- package/forge/client/_app/immutable/nodes/0.B9rqMzxb.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/1.DwmerKk4.js +0 -1
- package/forge/client/_app/immutable/nodes/1.DwmerKk4.js.br +0 -2
- package/forge/client/_app/immutable/nodes/1.DwmerKk4.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/2.BUk1YVIo.js +0 -1
- package/forge/client/_app/immutable/nodes/2.BUk1YVIo.js.br +0 -0
- package/forge/client/_app/immutable/nodes/2.BUk1YVIo.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/3.DmPRvAdZ.js +0 -1
- package/forge/client/_app/immutable/nodes/3.DmPRvAdZ.js.br +0 -0
- package/forge/client/_app/immutable/nodes/3.DmPRvAdZ.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/4.uaGnBjju.js +0 -6
- package/forge/client/_app/immutable/nodes/4.uaGnBjju.js.br +0 -0
- package/forge/client/_app/immutable/nodes/4.uaGnBjju.js.gz +0 -0
- package/forge/client/_app/immutable/nodes/5.DPP-3Nng.js +0 -31
- package/forge/client/_app/immutable/nodes/5.DPP-3Nng.js.br +0 -0
- package/forge/client/_app/immutable/nodes/5.DPP-3Nng.js.gz +0 -0
- package/forge/server/_app/immutable/assets/_layout.CeOWqS-S.css +0 -2
- package/forge/server/chunks/afar.svelte.js.map +0 -1
package/daemon/host.js
CHANGED
|
@@ -1,10 +1,99 @@
|
|
|
1
1
|
import { createRequire as makeBundleRequire } from 'node:module'; const require = makeBundleRequire(import.meta.url);
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __esm = (fn, res, err2) => function __init() {
|
|
5
|
+
if (err2) throw err2[0];
|
|
6
|
+
try {
|
|
7
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
8
|
+
} catch (e) {
|
|
9
|
+
throw err2 = [e], e;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
3
12
|
var __export = (target, all) => {
|
|
4
13
|
for (var name in all)
|
|
5
14
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
15
|
};
|
|
7
16
|
|
|
17
|
+
// ../../packages/protocol/src/images.ts
|
|
18
|
+
var MAX_IMAGE_BYTES;
|
|
19
|
+
var init_images = __esm({
|
|
20
|
+
"../../packages/protocol/src/images.ts"() {
|
|
21
|
+
"use strict";
|
|
22
|
+
MAX_IMAGE_BYTES = 5 * 1024 * 1024;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// ../../packages/protocol/src/index.ts
|
|
27
|
+
var DEFAULT_PORTS, CONFIG_SETTINGS, TEARDOWN_TIMEOUT_MS, REMOVE_TIMEOUT_MS, TOOL_KINDS;
|
|
28
|
+
var init_src = __esm({
|
|
29
|
+
"../../packages/protocol/src/index.ts"() {
|
|
30
|
+
"use strict";
|
|
31
|
+
init_images();
|
|
32
|
+
DEFAULT_PORTS = 10;
|
|
33
|
+
CONFIG_SETTINGS = {
|
|
34
|
+
default: {
|
|
35
|
+
does: "The job or URL for the Run button. Use its key, such as `jobs.web` or `urls.app`. Without a default, Run selects the first URL, or the first job if there are no URLs.",
|
|
36
|
+
example: "default: urls.app"
|
|
37
|
+
},
|
|
38
|
+
run: {
|
|
39
|
+
does: "The command that runs the project for someone to look at or use: its development server, a desktop app, a game. Short for a single job called `run`. Use this unless the project needs several things running.",
|
|
40
|
+
example: "run: pnpm dev --port $PORT"
|
|
41
|
+
},
|
|
42
|
+
jobs: {
|
|
43
|
+
does: "Several things to run, each a `command` under a name (lower case letters, digits and dashes). `needs` lists the jobs that have to be up first: starting a job starts those, and stopping one stops the jobs that need it. An optional `label` supplies a human-readable display name (1\u2013100 characters); the key still identifies dependencies and ports. Each job runs in a terminal of its own, in the workspace's directory, and should keep running until stopped.",
|
|
44
|
+
example: "jobs:\n db:\n command: docker compose up db\n web:\n label: Development server\n command: pnpm dev --port $PORT\n needs: [db]"
|
|
45
|
+
},
|
|
46
|
+
urls: {
|
|
47
|
+
does: "Places to open in the browser, each a `url` under a name. `{job}` stands for that job's port. Opening one first starts the jobs it mentions (and any listed under `needs`) and waits for them. An optional `label` supplies a human-readable display name (1\u2013100 characters); otherwise the key is shown. Only addresses on this machine (`localhost`).",
|
|
48
|
+
example: "urls:\n app:\n label: Open app\n url: http://localhost:{web}/"
|
|
49
|
+
},
|
|
50
|
+
setup: {
|
|
51
|
+
does: "A command that gets a new workspace ready to work in: installing dependencies, copying an `.env`, setting up a database. It runs once, in the workspace's directory, when its worktree is made from the main line (not in one an agent starts from its own branch: there the agent sets up itself), in a terminal the person can watch; the agent's first turn waits for it. If it fails, the agent is told, with the end of its output. It gets the workspace's ports (`GEORDI_PORT\u2026`) like everything else. A person has to agree to it once per repository (and again whenever it changes); until then it does not run, and the agent is told so.",
|
|
52
|
+
example: "setup: pnpm install && cp ../.env .env"
|
|
53
|
+
},
|
|
54
|
+
teardown: {
|
|
55
|
+
does: "A command that cleans up after a workspace when a person archives it, before its directory is removed: stopping services, dropping databases. It gets the same ports as everything in the workspace did. It has two minutes; archiving goes on however it ends. A person agrees to it together with the first commands they agree to run in the repository.",
|
|
56
|
+
example: "teardown: docker compose down --volumes"
|
|
57
|
+
},
|
|
58
|
+
ports: {
|
|
59
|
+
does: `How many ports each workspace gets: one per job unless said otherwise (and ${DEFAULT_PORTS} where there are no jobs). Only needed for spare ones, beyond the jobs'. Every job has one port of its own, and it stays the same for as long as the workspace lives: the command gets it as \`PORT\`, and every job's port is in \`GEORDI_PORT_<NAME>\` (upper case, dashes as underscores) for all jobs, terminals and agents of the workspace. \`GEORDI_PORT\` is the first of the workspace's ports and \`GEORDI_PORTS\` how many there are. \`GEORDI_ASSIGNED_PORTS\` is a JSON array of every assigned port, in allocation order; use it for spare ports because allocations need not be contiguous. Never hard-code a port: two workspaces would collide.`,
|
|
60
|
+
example: "ports: 20"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
TEARDOWN_TIMEOUT_MS = 12e4;
|
|
64
|
+
REMOVE_TIMEOUT_MS = TEARDOWN_TIMEOUT_MS + 3e4;
|
|
65
|
+
TOOL_KINDS = [
|
|
66
|
+
"read",
|
|
67
|
+
"edit",
|
|
68
|
+
"delete",
|
|
69
|
+
"move",
|
|
70
|
+
"search",
|
|
71
|
+
"execute",
|
|
72
|
+
"think",
|
|
73
|
+
"fetch",
|
|
74
|
+
"switch_mode",
|
|
75
|
+
"other"
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// ../daemon/src/session-process.ts
|
|
81
|
+
import { execFileSync, spawnSync } from "node:child_process";
|
|
82
|
+
import { dirname, join } from "node:path";
|
|
83
|
+
var windows = process.platform === "win32";
|
|
84
|
+
var system32 = () => {
|
|
85
|
+
if (!process.env.SystemRoot) throw new Error("SystemRoot is not set");
|
|
86
|
+
return join(process.env.SystemRoot, "System32");
|
|
87
|
+
};
|
|
88
|
+
function signalTree(pid, signal) {
|
|
89
|
+
if (windows)
|
|
90
|
+
execFileSync(join(system32(), "taskkill.exe"), ["/PID", String(pid), "/T", "/F"], {
|
|
91
|
+
windowsHide: true,
|
|
92
|
+
stdio: "ignore"
|
|
93
|
+
});
|
|
94
|
+
else process.kill(-pid, signal);
|
|
95
|
+
}
|
|
96
|
+
|
|
8
97
|
// ../daemon/src/journal.ts
|
|
9
98
|
import { closeSync, existsSync, openSync, readSync } from "node:fs";
|
|
10
99
|
function* linesFrom(path, offset) {
|
|
@@ -41,33 +130,46 @@ import {
|
|
|
41
130
|
writeFileSync
|
|
42
131
|
} from "node:fs";
|
|
43
132
|
import { createRequire } from "node:module";
|
|
44
|
-
import { delimiter, dirname, join } from "node:path";
|
|
133
|
+
import { delimiter, dirname as dirname2, join as join2 } from "node:path";
|
|
45
134
|
|
|
46
135
|
// ../daemon/src/agents/acp.ts
|
|
47
136
|
import { randomUUID } from "node:crypto";
|
|
48
137
|
import { Readable, Writable } from "node:stream";
|
|
49
138
|
|
|
50
|
-
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js
|
|
139
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/v2/unstable/schema/index.js
|
|
51
140
|
var AGENT_METHODS = {
|
|
52
141
|
initialize: "initialize",
|
|
53
142
|
auth_login: "auth/login",
|
|
143
|
+
providers_list: "providers/list",
|
|
144
|
+
providers_set: "providers/set",
|
|
145
|
+
providers_disable: "providers/disable",
|
|
54
146
|
session_new: "session/new",
|
|
55
147
|
session_set_config_option: "session/set_config_option",
|
|
56
148
|
session_prompt: "session/prompt",
|
|
57
149
|
session_cancel: "session/cancel",
|
|
150
|
+
mcp_message: "mcp/message",
|
|
58
151
|
session_list: "session/list",
|
|
59
152
|
session_delete: "session/delete",
|
|
153
|
+
session_fork: "session/fork",
|
|
154
|
+
session_archive: "session/archive",
|
|
155
|
+
session_unarchive: "session/unarchive",
|
|
156
|
+
session_status: "session/status",
|
|
157
|
+
session_options: "session/options",
|
|
158
|
+
session_set_title: "session/set_title",
|
|
60
159
|
session_resume: "session/resume",
|
|
61
160
|
session_close: "session/close",
|
|
62
161
|
tool_call_cancel: "tool_call/cancel",
|
|
63
162
|
terminal_cancel: "terminal/cancel",
|
|
64
|
-
auth_logout: "auth/logout"
|
|
163
|
+
auth_logout: "auth/logout",
|
|
164
|
+
auth_status: "auth/status"
|
|
65
165
|
};
|
|
66
166
|
var CLIENT_METHODS = {
|
|
67
167
|
session_request_permission: "session/request_permission",
|
|
68
168
|
session_update: "session/update",
|
|
169
|
+
mcp_message: "mcp/message",
|
|
69
170
|
elicitation_create: "elicitation/create",
|
|
70
|
-
elicitation_complete: "elicitation/complete"
|
|
171
|
+
elicitation_complete: "elicitation/complete",
|
|
172
|
+
auth_status_update: "auth/status_update"
|
|
71
173
|
};
|
|
72
174
|
var PROTOCOL_METHODS = {
|
|
73
175
|
cancel_request: "$/cancel_request"
|
|
@@ -6490,7 +6592,7 @@ function exactlyOneByRequiredKeys(options2, requiredKeys) {
|
|
|
6490
6592
|
});
|
|
6491
6593
|
}
|
|
6492
6594
|
|
|
6493
|
-
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js
|
|
6595
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/v2/unstable/schema/zod.gen.js
|
|
6494
6596
|
var zRequestId = union([wideInt(), string2()]);
|
|
6495
6597
|
var zSessionId = string2();
|
|
6496
6598
|
var zToolCallId = string2();
|
|
@@ -6590,6 +6692,10 @@ var zEmbeddedResource = object({
|
|
|
6590
6692
|
annotations: defaultOnError(zAnnotations.nullish(), () => void 0),
|
|
6591
6693
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6592
6694
|
});
|
|
6695
|
+
var zSkillReference = object({
|
|
6696
|
+
name: string2(),
|
|
6697
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6698
|
+
});
|
|
6593
6699
|
var zContentBlock = preserveCustomPayload(union([
|
|
6594
6700
|
zTextContent.and(object({
|
|
6595
6701
|
type: literal("text")
|
|
@@ -6606,10 +6712,13 @@ var zContentBlock = preserveCustomPayload(union([
|
|
|
6606
6712
|
zEmbeddedResource.and(object({
|
|
6607
6713
|
type: literal("resource")
|
|
6608
6714
|
})),
|
|
6715
|
+
zSkillReference.and(object({
|
|
6716
|
+
type: literal("skill")
|
|
6717
|
+
})),
|
|
6609
6718
|
excludeKnownTags(object({
|
|
6610
6719
|
type: string2()
|
|
6611
|
-
}), "type", ["audio", "image", "resource", "resource_link", "text"])
|
|
6612
|
-
]), "type", ["audio", "image", "resource", "resource_link", "text"]);
|
|
6720
|
+
}), "type", ["audio", "image", "resource", "resource_link", "skill", "text"])
|
|
6721
|
+
]), "type", ["audio", "image", "resource", "resource_link", "skill", "text"]);
|
|
6613
6722
|
var zContent = object({
|
|
6614
6723
|
content: zContentBlock,
|
|
6615
6724
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
@@ -6896,11 +7005,25 @@ var zCreateElicitationRequest = preserveCustomPayload(intersection(union([
|
|
|
6896
7005
|
message: string2(),
|
|
6897
7006
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6898
7007
|
})), "mode", ["form", "url"]);
|
|
7008
|
+
var zMcpServerAcpId = string2();
|
|
7009
|
+
var zMcpRequestId = string2();
|
|
7010
|
+
var zMessageMcpRequest = object({
|
|
7011
|
+
serverId: zMcpServerAcpId,
|
|
7012
|
+
requestId: zMcpRequestId,
|
|
7013
|
+
method: string2(),
|
|
7014
|
+
params: record(string2(), unknown()).nullish(),
|
|
7015
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7016
|
+
});
|
|
6899
7017
|
var zExtRequest = unknown();
|
|
6900
7018
|
var zAgentRequest = object({
|
|
6901
7019
|
id: zRequestId,
|
|
6902
7020
|
method: string2(),
|
|
6903
|
-
params: union([
|
|
7021
|
+
params: union([
|
|
7022
|
+
zRequestPermissionRequest,
|
|
7023
|
+
zCreateElicitationRequest,
|
|
7024
|
+
zMessageMcpRequest,
|
|
7025
|
+
zExtRequest
|
|
7026
|
+
]).nullish()
|
|
6904
7027
|
});
|
|
6905
7028
|
var zProtocolVersion = int().gte(0).lte(65535);
|
|
6906
7029
|
var zImplementation = object({
|
|
@@ -6918,10 +7041,18 @@ var zPromptAudioCapabilities = object({
|
|
|
6918
7041
|
var zPromptEmbeddedContextCapabilities = object({
|
|
6919
7042
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6920
7043
|
});
|
|
7044
|
+
var zPromptSkillInlineCapabilities = object({
|
|
7045
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7046
|
+
});
|
|
7047
|
+
var zPromptSkillCapabilities = object({
|
|
7048
|
+
inline: defaultOnError(zPromptSkillInlineCapabilities.nullish(), () => void 0),
|
|
7049
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7050
|
+
});
|
|
6921
7051
|
var zPromptCapabilities = object({
|
|
6922
7052
|
image: defaultOnError(zPromptImageCapabilities.nullish(), () => void 0),
|
|
6923
7053
|
audio: defaultOnError(zPromptAudioCapabilities.nullish(), () => void 0),
|
|
6924
7054
|
embeddedContext: defaultOnError(zPromptEmbeddedContextCapabilities.nullish(), () => void 0),
|
|
7055
|
+
skill: defaultOnError(zPromptSkillCapabilities.nullish(), () => void 0),
|
|
6925
7056
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6926
7057
|
});
|
|
6927
7058
|
var zMcpStdioCapabilities = object({
|
|
@@ -6930,9 +7061,13 @@ var zMcpStdioCapabilities = object({
|
|
|
6930
7061
|
var zMcpHttpCapabilities = object({
|
|
6931
7062
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6932
7063
|
});
|
|
7064
|
+
var zMcpAcpCapabilities = object({
|
|
7065
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7066
|
+
});
|
|
6933
7067
|
var zMcpCapabilities = object({
|
|
6934
7068
|
stdio: defaultOnError(zMcpStdioCapabilities.nullish(), () => void 0),
|
|
6935
7069
|
http: defaultOnError(zMcpHttpCapabilities.nullish(), () => void 0),
|
|
7070
|
+
acp: defaultOnError(zMcpAcpCapabilities.nullish(), () => void 0),
|
|
6936
7071
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6937
7072
|
});
|
|
6938
7073
|
var zSessionDeleteCapabilities = object({
|
|
@@ -6952,20 +7087,48 @@ var zSessionSystemPromptCapabilities = object({
|
|
|
6952
7087
|
mode: defaultOnError(zSessionSystemPromptModeCapabilities.nullish(), () => void 0),
|
|
6953
7088
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6954
7089
|
});
|
|
7090
|
+
var zSessionForkCapabilities = object({
|
|
7091
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7092
|
+
});
|
|
7093
|
+
var zSessionArchiveCapabilities = object({
|
|
7094
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7095
|
+
});
|
|
7096
|
+
var zSessionStatusCapabilities = object({
|
|
7097
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7098
|
+
});
|
|
7099
|
+
var zSessionOptionsCapabilities = object({
|
|
7100
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7101
|
+
});
|
|
7102
|
+
var zSessionTitleCapabilities = object({
|
|
7103
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7104
|
+
});
|
|
6955
7105
|
var zSessionCapabilities = object({
|
|
6956
7106
|
prompt: defaultOnError(zPromptCapabilities.nullish(), () => void 0),
|
|
6957
7107
|
mcp: defaultOnError(zMcpCapabilities.nullish(), () => void 0),
|
|
6958
7108
|
delete: defaultOnError(zSessionDeleteCapabilities.nullish(), () => void 0),
|
|
6959
7109
|
additionalDirectories: defaultOnError(zSessionAdditionalDirectoriesCapabilities.nullish(), () => void 0),
|
|
6960
7110
|
systemPrompt: defaultOnError(zSessionSystemPromptCapabilities.nullish(), () => void 0),
|
|
7111
|
+
fork: defaultOnError(zSessionForkCapabilities.nullish(), () => void 0),
|
|
7112
|
+
archive: defaultOnError(zSessionArchiveCapabilities.nullish(), () => void 0),
|
|
7113
|
+
status: defaultOnError(zSessionStatusCapabilities.nullish(), () => void 0),
|
|
7114
|
+
options: defaultOnError(zSessionOptionsCapabilities.nullish(), () => void 0),
|
|
7115
|
+
title: defaultOnError(zSessionTitleCapabilities.nullish(), () => void 0),
|
|
7116
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7117
|
+
});
|
|
7118
|
+
var zAuthStatusCapabilities = object({
|
|
6961
7119
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6962
7120
|
});
|
|
6963
7121
|
var zAgentAuthCapabilities = object({
|
|
7122
|
+
status: defaultOnError(zAuthStatusCapabilities.nullish(), () => void 0),
|
|
7123
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7124
|
+
});
|
|
7125
|
+
var zProvidersCapabilities = object({
|
|
6964
7126
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6965
7127
|
});
|
|
6966
7128
|
var zAgentCapabilities = object({
|
|
6967
7129
|
session: defaultOnError(zSessionCapabilities.nullish(), () => void 0),
|
|
6968
7130
|
auth: defaultOnError(zAgentAuthCapabilities.nullish(), () => void 0),
|
|
7131
|
+
providers: defaultOnError(zProvidersCapabilities.nullish(), () => void 0),
|
|
6969
7132
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
6970
7133
|
});
|
|
6971
7134
|
var zAuthMethodId = string2();
|
|
@@ -7011,14 +7174,67 @@ var zInitializeResponse = object({
|
|
|
7011
7174
|
var zLoginAuthResponse = object({
|
|
7012
7175
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7013
7176
|
});
|
|
7177
|
+
var zProviderId = string2();
|
|
7178
|
+
var zLlmProtocol = union([
|
|
7179
|
+
literal("anthropic"),
|
|
7180
|
+
literal("openai"),
|
|
7181
|
+
literal("azure"),
|
|
7182
|
+
literal("vertex"),
|
|
7183
|
+
literal("bedrock"),
|
|
7184
|
+
string2()
|
|
7185
|
+
]);
|
|
7186
|
+
var zProviderCurrentConfig = object({
|
|
7187
|
+
apiType: zLlmProtocol,
|
|
7188
|
+
baseUrl: url(),
|
|
7189
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7190
|
+
});
|
|
7191
|
+
var zProviderInfo = object({
|
|
7192
|
+
providerId: zProviderId,
|
|
7193
|
+
supported: requiredDefaultOnError(vecSkipError(zLlmProtocol), () => []),
|
|
7194
|
+
required: boolean2(),
|
|
7195
|
+
current: zProviderCurrentConfig.nullish(),
|
|
7196
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7197
|
+
});
|
|
7198
|
+
var zListProvidersResponse = object({
|
|
7199
|
+
providers: array(zProviderInfo),
|
|
7200
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7201
|
+
});
|
|
7202
|
+
var zSetProviderResponse = object({
|
|
7203
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7204
|
+
});
|
|
7205
|
+
var zDisableProviderResponse = object({
|
|
7206
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7207
|
+
});
|
|
7014
7208
|
var zLogoutAuthResponse = object({
|
|
7015
7209
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7016
7210
|
});
|
|
7211
|
+
var zAuthState = union([
|
|
7212
|
+
literal("authenticated"),
|
|
7213
|
+
literal("unauthenticated"),
|
|
7214
|
+
literal("not_required"),
|
|
7215
|
+
literal("unknown"),
|
|
7216
|
+
string2()
|
|
7217
|
+
]);
|
|
7218
|
+
var zAuthAccount = object({
|
|
7219
|
+
label: string2(),
|
|
7220
|
+
description: defaultOnError(string2().nullish(), () => void 0),
|
|
7221
|
+
active: defaultOnError(boolean2().nullish(), () => void 0),
|
|
7222
|
+
name: defaultOnError(string2().nullish(), () => void 0),
|
|
7223
|
+
email: defaultOnError(string2().nullish(), () => void 0),
|
|
7224
|
+
organization: defaultOnError(string2().nullish(), () => void 0),
|
|
7225
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7226
|
+
});
|
|
7227
|
+
var zAuthStatusResponse = object({
|
|
7228
|
+
state: zAuthState,
|
|
7229
|
+
accounts: defaultOnError(vecSkipError(zAuthAccount).optional(), () => []),
|
|
7230
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7231
|
+
});
|
|
7017
7232
|
var zSessionConfigId = string2();
|
|
7018
7233
|
var zSessionConfigOptionCategory = union([
|
|
7019
7234
|
literal("mode"),
|
|
7020
7235
|
literal("model"),
|
|
7021
7236
|
literal("model_config"),
|
|
7237
|
+
literal("speed"),
|
|
7022
7238
|
literal("thought_level"),
|
|
7023
7239
|
string2()
|
|
7024
7240
|
]);
|
|
@@ -7082,16 +7298,25 @@ var zCommand = object({
|
|
|
7082
7298
|
input: defaultOnError(zAvailableCommandInput.nullish(), () => void 0),
|
|
7083
7299
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7084
7300
|
});
|
|
7301
|
+
var zSkill = object({
|
|
7302
|
+
name: string2(),
|
|
7303
|
+
description: string2(),
|
|
7304
|
+
path: defaultOnError(zAbsolutePath.nullish(), () => void 0),
|
|
7305
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7306
|
+
});
|
|
7085
7307
|
var zAvailableCommand = preserveCustomPayload(union([
|
|
7086
7308
|
zCommand.and(object({
|
|
7087
7309
|
type: literal("command")
|
|
7088
7310
|
})),
|
|
7311
|
+
zSkill.and(object({
|
|
7312
|
+
type: literal("skill")
|
|
7313
|
+
})),
|
|
7089
7314
|
excludeKnownTags(object({
|
|
7090
7315
|
type: string2(),
|
|
7091
7316
|
name: string2(),
|
|
7092
7317
|
description: string2()
|
|
7093
|
-
}), "type", ["command"])
|
|
7094
|
-
]), "type", ["command"]);
|
|
7318
|
+
}), "type", ["command", "skill"])
|
|
7319
|
+
]), "type", ["command", "skill"]);
|
|
7095
7320
|
var zNewSessionResponse = object({
|
|
7096
7321
|
sessionId: zSessionId,
|
|
7097
7322
|
configOptions: defaultOnError(vecSkipError(zSessionConfigOption).optional(), () => []),
|
|
@@ -7104,6 +7329,7 @@ var zSessionInfo = object({
|
|
|
7104
7329
|
additionalDirectories: defaultOnNull(array(zAbsolutePath), () => []).optional(),
|
|
7105
7330
|
title: defaultOnError(string2().nullish(), () => void 0),
|
|
7106
7331
|
updatedAt: defaultOnError(iso_exports.datetime({ offset: true }).nullish(), () => void 0),
|
|
7332
|
+
archived: defaultOnError(boolean2().nullish(), () => void 0),
|
|
7107
7333
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7108
7334
|
});
|
|
7109
7335
|
var zSessionListCursor = string2();
|
|
@@ -7115,30 +7341,53 @@ var zListSessionsResponse = object({
|
|
|
7115
7341
|
var zDeleteSessionResponse = object({
|
|
7116
7342
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7117
7343
|
});
|
|
7118
|
-
var
|
|
7344
|
+
var zForkSessionResponse = object({
|
|
7345
|
+
sessionId: zSessionId,
|
|
7119
7346
|
configOptions: defaultOnError(vecSkipError(zSessionConfigOption).optional(), () => []),
|
|
7120
7347
|
availableCommands: defaultOnError(vecSkipError(zAvailableCommand).optional(), () => []),
|
|
7121
7348
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7122
7349
|
});
|
|
7123
|
-
var
|
|
7350
|
+
var zArchiveSessionResponse = object({
|
|
7124
7351
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7125
7352
|
});
|
|
7126
|
-
var
|
|
7353
|
+
var zUnarchiveSessionResponse = object({
|
|
7127
7354
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7128
7355
|
});
|
|
7129
|
-
var
|
|
7356
|
+
var zSessionStatus = union([
|
|
7357
|
+
literal("open"),
|
|
7358
|
+
literal("saved"),
|
|
7359
|
+
string2()
|
|
7360
|
+
]);
|
|
7361
|
+
var zBackgroundTerminal = object({
|
|
7362
|
+
terminalId: zTerminalId,
|
|
7130
7363
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7131
7364
|
});
|
|
7132
|
-
var
|
|
7133
|
-
|
|
7365
|
+
var zBackgroundToolCall = object({
|
|
7366
|
+
toolCallId: zToolCallId,
|
|
7134
7367
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7135
7368
|
});
|
|
7136
|
-
var
|
|
7137
|
-
|
|
7138
|
-
|
|
7369
|
+
var zBackgroundSubagent = object({
|
|
7370
|
+
sessionId: zSessionId,
|
|
7371
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7372
|
+
});
|
|
7373
|
+
var zBackgroundWork = preserveCustomPayload(union([
|
|
7374
|
+
zBackgroundTerminal.and(object({
|
|
7375
|
+
type: literal("terminal")
|
|
7376
|
+
})),
|
|
7377
|
+
zBackgroundToolCall.and(object({
|
|
7378
|
+
type: literal("tool_call")
|
|
7379
|
+
})),
|
|
7380
|
+
zBackgroundSubagent.and(object({
|
|
7381
|
+
type: literal("subagent")
|
|
7382
|
+
})),
|
|
7383
|
+
excludeKnownTags(object({
|
|
7384
|
+
type: string2()
|
|
7385
|
+
}), "type", ["subagent", "terminal", "tool_call"])
|
|
7386
|
+
]), "type", ["subagent", "terminal", "tool_call"]);
|
|
7387
|
+
var zRunningStateUpdate = object({
|
|
7388
|
+
background: defaultOnError(array(zBackgroundWork).nullish(), () => void 0),
|
|
7139
7389
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7140
7390
|
});
|
|
7141
|
-
var zExtResponse = unknown();
|
|
7142
7391
|
var zErrorCode = union([
|
|
7143
7392
|
literal(-32700),
|
|
7144
7393
|
literal(-32600),
|
|
@@ -7174,116 +7423,52 @@ var zError = object({
|
|
|
7174
7423
|
message: string2(),
|
|
7175
7424
|
data: defaultOnError(zErrorData.nullish(), () => void 0)
|
|
7176
7425
|
});
|
|
7177
|
-
var
|
|
7426
|
+
var zErrorStopReason = object({
|
|
7427
|
+
error: defaultOnError(zError.nullish(), () => void 0)
|
|
7428
|
+
});
|
|
7429
|
+
var zUsage = object({
|
|
7430
|
+
totalTokens: wideInt().gte(0),
|
|
7431
|
+
inputTokens: wideInt().gte(0),
|
|
7432
|
+
outputTokens: wideInt().gte(0),
|
|
7433
|
+
thoughtTokens: defaultOnError(wideInt().gte(0).nullish(), () => void 0),
|
|
7434
|
+
cachedReadTokens: defaultOnError(wideInt().gte(0).nullish(), () => void 0),
|
|
7435
|
+
cachedWriteTokens: defaultOnError(wideInt().gte(0).nullish(), () => void 0),
|
|
7436
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7437
|
+
});
|
|
7438
|
+
var zIdleStateUpdate = defaultOnErrorOptionalStringTag(preserveCustomPayload(intersection(union([
|
|
7178
7439
|
object({
|
|
7179
|
-
|
|
7180
|
-
result: union([
|
|
7181
|
-
zInitializeResponse,
|
|
7182
|
-
zLoginAuthResponse,
|
|
7183
|
-
zLogoutAuthResponse,
|
|
7184
|
-
zNewSessionResponse,
|
|
7185
|
-
zListSessionsResponse,
|
|
7186
|
-
zDeleteSessionResponse,
|
|
7187
|
-
zResumeSessionResponse,
|
|
7188
|
-
zCloseSessionResponse,
|
|
7189
|
-
zCancelToolCallResponse,
|
|
7190
|
-
zCancelTerminalResponse,
|
|
7191
|
-
zSetSessionConfigOptionResponse,
|
|
7192
|
-
zPromptResponse,
|
|
7193
|
-
zExtResponse
|
|
7194
|
-
])
|
|
7440
|
+
stopReason: literal("end_turn")
|
|
7195
7441
|
}),
|
|
7196
7442
|
object({
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
})
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7224
|
-
});
|
|
7225
|
-
var zBackgroundToolCall = object({
|
|
7226
|
-
toolCallId: zToolCallId,
|
|
7227
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7228
|
-
});
|
|
7229
|
-
var zBackgroundSubagent = object({
|
|
7230
|
-
sessionId: zSessionId,
|
|
7231
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7232
|
-
});
|
|
7233
|
-
var zBackgroundWork = preserveCustomPayload(union([
|
|
7234
|
-
zBackgroundTerminal.and(object({
|
|
7235
|
-
type: literal("terminal")
|
|
7236
|
-
})),
|
|
7237
|
-
zBackgroundToolCall.and(object({
|
|
7238
|
-
type: literal("tool_call")
|
|
7239
|
-
})),
|
|
7240
|
-
zBackgroundSubagent.and(object({
|
|
7241
|
-
type: literal("subagent")
|
|
7242
|
-
})),
|
|
7243
|
-
excludeKnownTags(object({
|
|
7244
|
-
type: string2()
|
|
7245
|
-
}), "type", ["subagent", "terminal", "tool_call"])
|
|
7246
|
-
]), "type", ["subagent", "terminal", "tool_call"]);
|
|
7247
|
-
var zRunningStateUpdate = object({
|
|
7248
|
-
background: defaultOnError(array(zBackgroundWork).nullish(), () => void 0),
|
|
7249
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7250
|
-
});
|
|
7251
|
-
var zErrorStopReason = object({
|
|
7252
|
-
error: defaultOnError(zError.nullish(), () => void 0)
|
|
7253
|
-
});
|
|
7254
|
-
var zIdleStateUpdate = defaultOnErrorOptionalStringTag(preserveCustomPayload(intersection(union([
|
|
7255
|
-
object({
|
|
7256
|
-
stopReason: literal("end_turn")
|
|
7257
|
-
}),
|
|
7258
|
-
object({
|
|
7259
|
-
stopReason: literal("max_tokens")
|
|
7260
|
-
}),
|
|
7261
|
-
object({
|
|
7262
|
-
stopReason: literal("max_turn_requests")
|
|
7263
|
-
}),
|
|
7264
|
-
object({
|
|
7265
|
-
stopReason: literal("refusal")
|
|
7266
|
-
}),
|
|
7267
|
-
object({
|
|
7268
|
-
stopReason: literal("cancelled")
|
|
7269
|
-
}),
|
|
7270
|
-
zErrorStopReason.and(object({
|
|
7271
|
-
stopReason: literal("error")
|
|
7272
|
-
})),
|
|
7273
|
-
excludeKnownTags(object({
|
|
7274
|
-
stopReason: string2()
|
|
7275
|
-
}), "stopReason", [
|
|
7276
|
-
"cancelled",
|
|
7277
|
-
"end_turn",
|
|
7278
|
-
"error",
|
|
7279
|
-
"max_tokens",
|
|
7280
|
-
"max_turn_requests",
|
|
7281
|
-
"refusal"
|
|
7282
|
-
]),
|
|
7283
|
-
object({
|
|
7284
|
-
stopReason: _null3().optional()
|
|
7443
|
+
stopReason: literal("max_tokens")
|
|
7444
|
+
}),
|
|
7445
|
+
object({
|
|
7446
|
+
stopReason: literal("max_turn_requests")
|
|
7447
|
+
}),
|
|
7448
|
+
object({
|
|
7449
|
+
stopReason: literal("refusal")
|
|
7450
|
+
}),
|
|
7451
|
+
object({
|
|
7452
|
+
stopReason: literal("cancelled")
|
|
7453
|
+
}),
|
|
7454
|
+
zErrorStopReason.and(object({
|
|
7455
|
+
stopReason: literal("error")
|
|
7456
|
+
})),
|
|
7457
|
+
excludeKnownTags(object({
|
|
7458
|
+
stopReason: string2()
|
|
7459
|
+
}), "stopReason", [
|
|
7460
|
+
"cancelled",
|
|
7461
|
+
"end_turn",
|
|
7462
|
+
"error",
|
|
7463
|
+
"max_tokens",
|
|
7464
|
+
"max_turn_requests",
|
|
7465
|
+
"refusal"
|
|
7466
|
+
]),
|
|
7467
|
+
object({
|
|
7468
|
+
stopReason: _null3().optional()
|
|
7285
7469
|
})
|
|
7286
7470
|
]), object({
|
|
7471
|
+
usage: defaultOnError(zUsage.nullish(), () => void 0),
|
|
7287
7472
|
background: defaultOnError(array(zBackgroundWork).nullish(), () => void 0),
|
|
7288
7473
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0),
|
|
7289
7474
|
stopReason: defaultOnError(string2().nullish(), () => void 0)
|
|
@@ -7320,6 +7505,98 @@ var zStateUpdate = preserveCustomPayload(union([
|
|
|
7320
7505
|
state: string2()
|
|
7321
7506
|
}), "state", ["idle", "requires_action", "running", "unknown"])
|
|
7322
7507
|
]), "state", ["idle", "requires_action", "running", "unknown"]);
|
|
7508
|
+
var zSessionStatusResponse = object({
|
|
7509
|
+
status: zSessionStatus,
|
|
7510
|
+
state: defaultOnError(zStateUpdate.nullish(), () => void 0),
|
|
7511
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7512
|
+
});
|
|
7513
|
+
var zSessionOptionsResponse = object({
|
|
7514
|
+
configOptions: defaultOnError(vecSkipError(zSessionConfigOption).optional(), () => []),
|
|
7515
|
+
availableCommands: defaultOnError(vecSkipError(zAvailableCommand).optional(), () => []),
|
|
7516
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7517
|
+
});
|
|
7518
|
+
var zSetSessionTitleResponse = object({
|
|
7519
|
+
title: string2(),
|
|
7520
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7521
|
+
});
|
|
7522
|
+
var zResumeSessionResponse = object({
|
|
7523
|
+
configOptions: defaultOnError(vecSkipError(zSessionConfigOption).optional(), () => []),
|
|
7524
|
+
availableCommands: defaultOnError(vecSkipError(zAvailableCommand).optional(), () => []),
|
|
7525
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7526
|
+
});
|
|
7527
|
+
var zCloseSessionResponse = object({
|
|
7528
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7529
|
+
});
|
|
7530
|
+
var zCancelToolCallResponse = object({
|
|
7531
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7532
|
+
});
|
|
7533
|
+
var zCancelTerminalResponse = object({
|
|
7534
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7535
|
+
});
|
|
7536
|
+
var zSetSessionConfigOptionResponse = object({
|
|
7537
|
+
configOptions: vecSkipError(zSessionConfigOption),
|
|
7538
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7539
|
+
});
|
|
7540
|
+
var zMessageId = string2();
|
|
7541
|
+
var zPromptResponse = object({
|
|
7542
|
+
messageId: zMessageId,
|
|
7543
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7544
|
+
});
|
|
7545
|
+
var zExtResponse = unknown();
|
|
7546
|
+
var zAgentResponse = union([
|
|
7547
|
+
object({
|
|
7548
|
+
id: zRequestId,
|
|
7549
|
+
result: union([
|
|
7550
|
+
zInitializeResponse,
|
|
7551
|
+
zLoginAuthResponse,
|
|
7552
|
+
zListProvidersResponse,
|
|
7553
|
+
zSetProviderResponse,
|
|
7554
|
+
zDisableProviderResponse,
|
|
7555
|
+
zLogoutAuthResponse,
|
|
7556
|
+
zAuthStatusResponse,
|
|
7557
|
+
zNewSessionResponse,
|
|
7558
|
+
zListSessionsResponse,
|
|
7559
|
+
zDeleteSessionResponse,
|
|
7560
|
+
zForkSessionResponse,
|
|
7561
|
+
zArchiveSessionResponse,
|
|
7562
|
+
zUnarchiveSessionResponse,
|
|
7563
|
+
zSessionStatusResponse,
|
|
7564
|
+
zSessionOptionsResponse,
|
|
7565
|
+
zSetSessionTitleResponse,
|
|
7566
|
+
zResumeSessionResponse,
|
|
7567
|
+
zCloseSessionResponse,
|
|
7568
|
+
zCancelToolCallResponse,
|
|
7569
|
+
zCancelTerminalResponse,
|
|
7570
|
+
zSetSessionConfigOptionResponse,
|
|
7571
|
+
zPromptResponse,
|
|
7572
|
+
zExtResponse
|
|
7573
|
+
])
|
|
7574
|
+
}),
|
|
7575
|
+
object({
|
|
7576
|
+
id: union([wideInt(), string2()]).nullable(),
|
|
7577
|
+
error: zError
|
|
7578
|
+
})
|
|
7579
|
+
]);
|
|
7580
|
+
var zContentChunk = object({
|
|
7581
|
+
messageId: zMessageId,
|
|
7582
|
+
content: zContentBlock,
|
|
7583
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7584
|
+
});
|
|
7585
|
+
var zUserMessage = object({
|
|
7586
|
+
messageId: zMessageId,
|
|
7587
|
+
content: defaultOnError(vecSkipError(zContentBlock).nullish(), () => void 0),
|
|
7588
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7589
|
+
});
|
|
7590
|
+
var zAgentMessage = object({
|
|
7591
|
+
messageId: zMessageId,
|
|
7592
|
+
content: defaultOnError(vecSkipError(zContentBlock).nullish(), () => void 0),
|
|
7593
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7594
|
+
});
|
|
7595
|
+
var zAgentThought = object({
|
|
7596
|
+
messageId: zMessageId,
|
|
7597
|
+
content: defaultOnError(vecSkipError(zContentBlock).nullish(), () => void 0),
|
|
7598
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7599
|
+
});
|
|
7323
7600
|
var zToolCallContentChunk = object({
|
|
7324
7601
|
toolCallId: zToolCallId,
|
|
7325
7602
|
content: zToolCallContent,
|
|
@@ -7386,19 +7663,32 @@ var zPlanItems = object({
|
|
|
7386
7663
|
entries: vecSkipError(zPlanEntry),
|
|
7387
7664
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7388
7665
|
});
|
|
7666
|
+
var zPlanMarkdown = object({
|
|
7667
|
+
planId: zPlanId,
|
|
7668
|
+
content: string2(),
|
|
7669
|
+
path: defaultOnError(zAbsolutePath.nullish(), () => void 0),
|
|
7670
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7671
|
+
});
|
|
7389
7672
|
var zPlanUpdateContent = preserveCustomPayload(union([
|
|
7390
7673
|
zPlanItems.and(object({
|
|
7391
7674
|
type: literal("items")
|
|
7392
7675
|
})),
|
|
7676
|
+
zPlanMarkdown.and(object({
|
|
7677
|
+
type: literal("markdown")
|
|
7678
|
+
})),
|
|
7393
7679
|
excludeKnownTags(object({
|
|
7394
7680
|
type: string2(),
|
|
7395
7681
|
planId: zPlanId
|
|
7396
|
-
}), "type", ["items"])
|
|
7397
|
-
]), "type", ["items"]);
|
|
7682
|
+
}), "type", ["items", "markdown"])
|
|
7683
|
+
]), "type", ["items", "markdown"]);
|
|
7398
7684
|
var zPlanUpdate = object({
|
|
7399
7685
|
plan: zPlanUpdateContent,
|
|
7400
7686
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7401
7687
|
});
|
|
7688
|
+
var zPlanRemoved = object({
|
|
7689
|
+
planId: zPlanId,
|
|
7690
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7691
|
+
});
|
|
7402
7692
|
var zAvailableCommandsUpdate = object({
|
|
7403
7693
|
availableCommands: vecSkipError(zAvailableCommand),
|
|
7404
7694
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
@@ -7458,6 +7748,14 @@ var zCompactionSummaryChunk = object({
|
|
|
7458
7748
|
var zReplayComplete = object({
|
|
7459
7749
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7460
7750
|
});
|
|
7751
|
+
var zPromptSuggestion = object({
|
|
7752
|
+
prompt: array(zContentBlock).min(1),
|
|
7753
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7754
|
+
});
|
|
7755
|
+
var zPromptSuggestionsUpdate = object({
|
|
7756
|
+
suggestions: vecSkipError(zPromptSuggestion),
|
|
7757
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7758
|
+
});
|
|
7461
7759
|
var zSessionCancelCapabilities = object({
|
|
7462
7760
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7463
7761
|
});
|
|
@@ -7526,6 +7824,9 @@ var zSessionUpdate = preserveCustomPayload(union([
|
|
|
7526
7824
|
zPlanUpdate.and(object({
|
|
7527
7825
|
sessionUpdate: literal("plan_update")
|
|
7528
7826
|
})),
|
|
7827
|
+
zPlanRemoved.and(object({
|
|
7828
|
+
sessionUpdate: literal("plan_removed")
|
|
7829
|
+
})),
|
|
7529
7830
|
zAvailableCommandsUpdate.and(object({
|
|
7530
7831
|
sessionUpdate: literal("available_commands_update")
|
|
7531
7832
|
})),
|
|
@@ -7550,6 +7851,9 @@ var zSessionUpdate = preserveCustomPayload(union([
|
|
|
7550
7851
|
zReplayComplete.and(object({
|
|
7551
7852
|
sessionUpdate: literal("replay_complete")
|
|
7552
7853
|
})),
|
|
7854
|
+
zPromptSuggestionsUpdate.and(object({
|
|
7855
|
+
sessionUpdate: literal("prompt_suggestions_update")
|
|
7856
|
+
})),
|
|
7553
7857
|
zSubagentUpdate.and(object({
|
|
7554
7858
|
sessionUpdate: literal("subagent_update")
|
|
7555
7859
|
})),
|
|
@@ -7571,7 +7875,9 @@ var zSessionUpdate = preserveCustomPayload(union([
|
|
|
7571
7875
|
"compaction_update",
|
|
7572
7876
|
"config_option_update",
|
|
7573
7877
|
"notice",
|
|
7878
|
+
"plan_removed",
|
|
7574
7879
|
"plan_update",
|
|
7880
|
+
"prompt_suggestions_update",
|
|
7575
7881
|
"replay_complete",
|
|
7576
7882
|
"session_info_update",
|
|
7577
7883
|
"session_message",
|
|
@@ -7596,7 +7902,9 @@ var zSessionUpdate = preserveCustomPayload(union([
|
|
|
7596
7902
|
"compaction_update",
|
|
7597
7903
|
"config_option_update",
|
|
7598
7904
|
"notice",
|
|
7905
|
+
"plan_removed",
|
|
7599
7906
|
"plan_update",
|
|
7907
|
+
"prompt_suggestions_update",
|
|
7600
7908
|
"replay_complete",
|
|
7601
7909
|
"session_info_update",
|
|
7602
7910
|
"session_message",
|
|
@@ -7620,12 +7928,18 @@ var zCompleteElicitationNotification = object({
|
|
|
7620
7928
|
elicitationId: zElicitationId,
|
|
7621
7929
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7622
7930
|
});
|
|
7931
|
+
var zAuthStatusUpdateNotification = object({
|
|
7932
|
+
state: zAuthState,
|
|
7933
|
+
accounts: defaultOnError(vecSkipError(zAuthAccount).optional(), () => []),
|
|
7934
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7935
|
+
});
|
|
7623
7936
|
var zExtNotification = unknown();
|
|
7624
7937
|
var zAgentNotification = object({
|
|
7625
7938
|
method: string2(),
|
|
7626
7939
|
params: union([
|
|
7627
7940
|
zUpdateSessionNotification,
|
|
7628
7941
|
zCompleteElicitationNotification,
|
|
7942
|
+
zAuthStatusUpdateNotification,
|
|
7629
7943
|
zExtNotification
|
|
7630
7944
|
]).nullish()
|
|
7631
7945
|
});
|
|
@@ -7647,9 +7961,37 @@ var zElicitationCapabilities = object({
|
|
|
7647
7961
|
url: defaultOnError(zElicitationUrlCapabilities.nullish(), () => void 0),
|
|
7648
7962
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7649
7963
|
});
|
|
7964
|
+
var zPromptSuggestionsImageCapabilities = object({
|
|
7965
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7966
|
+
});
|
|
7967
|
+
var zPromptSuggestionsAudioCapabilities = object({
|
|
7968
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7969
|
+
});
|
|
7970
|
+
var zPromptSuggestionsEmbeddedContextCapabilities = object({
|
|
7971
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7972
|
+
});
|
|
7973
|
+
var zPromptSuggestionsCapabilities = object({
|
|
7974
|
+
image: defaultOnError(zPromptSuggestionsImageCapabilities.nullish(), () => void 0),
|
|
7975
|
+
audio: defaultOnError(zPromptSuggestionsAudioCapabilities.nullish(), () => void 0),
|
|
7976
|
+
embeddedContext: defaultOnError(zPromptSuggestionsEmbeddedContextCapabilities.nullish(), () => void 0),
|
|
7977
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7978
|
+
});
|
|
7979
|
+
var zCommandsSkillCapabilities = object({
|
|
7980
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7981
|
+
});
|
|
7982
|
+
var zCommandsCapabilities = object({
|
|
7983
|
+
skill: defaultOnError(zCommandsSkillCapabilities.nullish(), () => void 0),
|
|
7984
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7985
|
+
});
|
|
7986
|
+
var zClientSessionCapabilities = object({
|
|
7987
|
+
promptSuggestions: defaultOnError(zPromptSuggestionsCapabilities.nullish(), () => void 0),
|
|
7988
|
+
commands: defaultOnError(zCommandsCapabilities.nullish(), () => void 0),
|
|
7989
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7990
|
+
});
|
|
7650
7991
|
var zClientCapabilities = object({
|
|
7651
7992
|
auth: defaultOnError(zClientAuthCapabilities.nullish(), () => void 0),
|
|
7652
7993
|
elicitation: defaultOnError(zElicitationCapabilities.nullish(), () => void 0),
|
|
7994
|
+
session: defaultOnError(zClientSessionCapabilities.nullish(), () => void 0),
|
|
7653
7995
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7654
7996
|
});
|
|
7655
7997
|
var zInitializeRequest = object({
|
|
@@ -7662,9 +8004,26 @@ var zLoginAuthRequest = object({
|
|
|
7662
8004
|
methodId: zAuthMethodId,
|
|
7663
8005
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7664
8006
|
});
|
|
8007
|
+
var zListProvidersRequest = object({
|
|
8008
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8009
|
+
});
|
|
8010
|
+
var zSetProviderRequest = object({
|
|
8011
|
+
providerId: zProviderId,
|
|
8012
|
+
apiType: zLlmProtocol,
|
|
8013
|
+
baseUrl: url(),
|
|
8014
|
+
headers: record(string2(), string2()).optional(),
|
|
8015
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8016
|
+
});
|
|
8017
|
+
var zDisableProviderRequest = object({
|
|
8018
|
+
providerId: zProviderId,
|
|
8019
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8020
|
+
});
|
|
7665
8021
|
var zLogoutAuthRequest = object({
|
|
7666
8022
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7667
8023
|
});
|
|
8024
|
+
var zAuthStatusRequest = object({
|
|
8025
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8026
|
+
});
|
|
7668
8027
|
var zHttpHeader = object({
|
|
7669
8028
|
name: string2(),
|
|
7670
8029
|
value: string2(),
|
|
@@ -7676,6 +8035,11 @@ var zMcpServerHttp = object({
|
|
|
7676
8035
|
headers: defaultOnNull(array(zHttpHeader), () => []).optional(),
|
|
7677
8036
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7678
8037
|
});
|
|
8038
|
+
var zMcpServerAcp = object({
|
|
8039
|
+
name: string2(),
|
|
8040
|
+
serverId: zMcpServerAcpId,
|
|
8041
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8042
|
+
});
|
|
7679
8043
|
var zMcpServerStdio = object({
|
|
7680
8044
|
name: string2(),
|
|
7681
8045
|
command: zAbsolutePath,
|
|
@@ -7687,13 +8051,16 @@ var zMcpServer = preserveCustomPayload(union([
|
|
|
7687
8051
|
zMcpServerHttp.and(object({
|
|
7688
8052
|
type: literal("http")
|
|
7689
8053
|
})),
|
|
8054
|
+
zMcpServerAcp.and(object({
|
|
8055
|
+
type: literal("acp")
|
|
8056
|
+
})),
|
|
7690
8057
|
zMcpServerStdio.and(object({
|
|
7691
8058
|
type: literal("stdio")
|
|
7692
8059
|
})),
|
|
7693
8060
|
excludeKnownTags(object({
|
|
7694
8061
|
type: string2()
|
|
7695
|
-
}), "type", ["http", "stdio"])
|
|
7696
|
-
]), "type", ["http", "stdio"]);
|
|
8062
|
+
}), "type", ["acp", "http", "stdio"])
|
|
8063
|
+
]), "type", ["acp", "http", "stdio"]);
|
|
7697
8064
|
var zSystemPromptMode = union([
|
|
7698
8065
|
literal("append"),
|
|
7699
8066
|
literal("override"),
|
|
@@ -7704,22 +8071,79 @@ var zSystemPrompt = object({
|
|
|
7704
8071
|
content: array(zContentBlock),
|
|
7705
8072
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7706
8073
|
});
|
|
8074
|
+
var zInitialSessionConfigOption = preserveCustomPayload(intersection(union([
|
|
8075
|
+
object({
|
|
8076
|
+
type: literal("id"),
|
|
8077
|
+
value: zSessionConfigValueId
|
|
8078
|
+
}),
|
|
8079
|
+
object({
|
|
8080
|
+
type: literal("boolean"),
|
|
8081
|
+
value: boolean2()
|
|
8082
|
+
}),
|
|
8083
|
+
excludeKnownTags(object({
|
|
8084
|
+
type: string2(),
|
|
8085
|
+
value: unknown()
|
|
8086
|
+
}), "type", ["boolean", "id"])
|
|
8087
|
+
]), object({
|
|
8088
|
+
configId: zSessionConfigId,
|
|
8089
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8090
|
+
})), "type", ["boolean", "id"]);
|
|
7707
8091
|
var zNewSessionRequest = object({
|
|
7708
8092
|
cwd: zAbsolutePath,
|
|
7709
8093
|
additionalDirectories: defaultOnNull(array(zAbsolutePath), () => []).optional(),
|
|
7710
8094
|
mcpServers: defaultOnNull(array(zMcpServer), () => []).optional(),
|
|
7711
8095
|
systemPrompt: zSystemPrompt.nullish(),
|
|
8096
|
+
configOptions: defaultOnNull(array(zInitialSessionConfigOption), () => []).optional(),
|
|
7712
8097
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7713
8098
|
});
|
|
8099
|
+
var zSessionArchiveFilter = union([
|
|
8100
|
+
literal("exclude"),
|
|
8101
|
+
literal("include"),
|
|
8102
|
+
literal("only"),
|
|
8103
|
+
string2()
|
|
8104
|
+
]);
|
|
7714
8105
|
var zListSessionsRequest = object({
|
|
7715
8106
|
cwd: zAbsolutePath.nullish(),
|
|
7716
8107
|
cursor: zSessionListCursor.nullish(),
|
|
8108
|
+
archived: zSessionArchiveFilter.nullish(),
|
|
7717
8109
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7718
8110
|
});
|
|
7719
8111
|
var zDeleteSessionRequest = object({
|
|
7720
8112
|
sessionId: zSessionId,
|
|
7721
8113
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7722
8114
|
});
|
|
8115
|
+
var zForkSessionRequest = object({
|
|
8116
|
+
sessionId: zSessionId,
|
|
8117
|
+
cwd: zAbsolutePath,
|
|
8118
|
+
additionalDirectories: defaultOnNull(array(zAbsolutePath), () => []).optional(),
|
|
8119
|
+
mcpServers: defaultOnNull(array(zMcpServer), () => []).optional(),
|
|
8120
|
+
systemPrompt: zSystemPrompt.nullish(),
|
|
8121
|
+
configOptions: defaultOnNull(array(zInitialSessionConfigOption), () => []).optional(),
|
|
8122
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8123
|
+
});
|
|
8124
|
+
var zArchiveSessionRequest = object({
|
|
8125
|
+
sessionId: zSessionId,
|
|
8126
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8127
|
+
});
|
|
8128
|
+
var zUnarchiveSessionRequest = object({
|
|
8129
|
+
sessionId: zSessionId,
|
|
8130
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8131
|
+
});
|
|
8132
|
+
var zSessionStatusRequest = object({
|
|
8133
|
+
sessionId: zSessionId,
|
|
8134
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8135
|
+
});
|
|
8136
|
+
var zSessionOptionsRequest = object({
|
|
8137
|
+
cwd: zAbsolutePath,
|
|
8138
|
+
additionalDirectories: defaultOnNull(array(zAbsolutePath), () => []).optional(),
|
|
8139
|
+
sessionId: zSessionId.nullish(),
|
|
8140
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8141
|
+
});
|
|
8142
|
+
var zSetSessionTitleRequest = object({
|
|
8143
|
+
sessionId: zSessionId,
|
|
8144
|
+
title: string2(),
|
|
8145
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8146
|
+
});
|
|
7723
8147
|
var zReplayFromStart = object({
|
|
7724
8148
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7725
8149
|
});
|
|
@@ -7738,6 +8162,7 @@ var zResumeSessionRequest = object({
|
|
|
7738
8162
|
mcpServers: defaultOnNull(array(zMcpServer), () => []).optional(),
|
|
7739
8163
|
replayFrom: zReplayFrom.nullish(),
|
|
7740
8164
|
systemPrompt: zSystemPrompt.nullish(),
|
|
8165
|
+
configOptions: defaultOnNull(array(zInitialSessionConfigOption), () => []).optional(),
|
|
7741
8166
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7742
8167
|
});
|
|
7743
8168
|
var zCloseSessionRequest = object({
|
|
@@ -7783,10 +8208,20 @@ var zClientRequest = object({
|
|
|
7783
8208
|
params: union([
|
|
7784
8209
|
zInitializeRequest,
|
|
7785
8210
|
zLoginAuthRequest,
|
|
8211
|
+
zListProvidersRequest,
|
|
8212
|
+
zSetProviderRequest,
|
|
8213
|
+
zDisableProviderRequest,
|
|
7786
8214
|
zLogoutAuthRequest,
|
|
8215
|
+
zAuthStatusRequest,
|
|
7787
8216
|
zNewSessionRequest,
|
|
7788
8217
|
zListSessionsRequest,
|
|
7789
8218
|
zDeleteSessionRequest,
|
|
8219
|
+
zForkSessionRequest,
|
|
8220
|
+
zArchiveSessionRequest,
|
|
8221
|
+
zUnarchiveSessionRequest,
|
|
8222
|
+
zSessionStatusRequest,
|
|
8223
|
+
zSessionOptionsRequest,
|
|
8224
|
+
zSetSessionTitleRequest,
|
|
7790
8225
|
zResumeSessionRequest,
|
|
7791
8226
|
zCloseSessionRequest,
|
|
7792
8227
|
zCancelToolCallRequest,
|
|
@@ -7845,12 +8280,32 @@ var zCreateElicitationResponse = preserveCustomPayload(intersection(union([
|
|
|
7845
8280
|
]), object({
|
|
7846
8281
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7847
8282
|
})), "action", ["accept", "cancel", "decline"]);
|
|
8283
|
+
var zMcpError = looseObject({
|
|
8284
|
+
code: int().min(-2147483648, {
|
|
8285
|
+
error: "Invalid value: Expected int32 to be >= -2147483648"
|
|
8286
|
+
}).max(2147483647, {
|
|
8287
|
+
error: "Invalid value: Expected int32 to be <= 2147483647"
|
|
8288
|
+
}),
|
|
8289
|
+
message: string2(),
|
|
8290
|
+
data: unknown().optional()
|
|
8291
|
+
});
|
|
8292
|
+
var zMessageMcpResponse = union([
|
|
8293
|
+
object({
|
|
8294
|
+
result: unknown(),
|
|
8295
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8296
|
+
}),
|
|
8297
|
+
object({
|
|
8298
|
+
error: zMcpError,
|
|
8299
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8300
|
+
})
|
|
8301
|
+
]);
|
|
7848
8302
|
var zClientResponse = union([
|
|
7849
8303
|
object({
|
|
7850
8304
|
id: zRequestId,
|
|
7851
8305
|
result: union([
|
|
7852
8306
|
zRequestPermissionResponse,
|
|
7853
8307
|
zCreateElicitationResponse,
|
|
8308
|
+
zMessageMcpResponse,
|
|
7854
8309
|
zExtResponse
|
|
7855
8310
|
])
|
|
7856
8311
|
}),
|
|
@@ -7863,16 +8318,59 @@ var zCancelSessionNotification = object({
|
|
|
7863
8318
|
sessionId: zSessionId,
|
|
7864
8319
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7865
8320
|
});
|
|
8321
|
+
var zMessageMcpNotification = object({
|
|
8322
|
+
serverId: zMcpServerAcpId,
|
|
8323
|
+
requestId: zMcpRequestId,
|
|
8324
|
+
method: string2(),
|
|
8325
|
+
params: record(string2(), unknown()).nullish(),
|
|
8326
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8327
|
+
});
|
|
7866
8328
|
var zClientNotification = object({
|
|
7867
8329
|
method: string2(),
|
|
7868
|
-
params: union([
|
|
8330
|
+
params: union([
|
|
8331
|
+
zCancelSessionNotification,
|
|
8332
|
+
zMessageMcpNotification,
|
|
8333
|
+
zExtNotification
|
|
8334
|
+
]).nullish()
|
|
7869
8335
|
});
|
|
7870
8336
|
var zCancelRequestNotification = object({
|
|
7871
8337
|
requestId: zRequestId,
|
|
7872
8338
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
7873
8339
|
});
|
|
8340
|
+
var zInitializeProxyRequest = zInitializeRequest;
|
|
8341
|
+
var zProxySuccessorRequest = object({
|
|
8342
|
+
method: string2(),
|
|
8343
|
+
params: unknown().optional(),
|
|
8344
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8345
|
+
});
|
|
8346
|
+
var zProxyRequest = object({
|
|
8347
|
+
id: zRequestId,
|
|
8348
|
+
method: string2(),
|
|
8349
|
+
params: union([zInitializeProxyRequest, zProxySuccessorRequest]).nullish()
|
|
8350
|
+
});
|
|
8351
|
+
var zInitializeProxyResponse = zInitializeResponse;
|
|
8352
|
+
var zProxySuccessorResponse = unknown();
|
|
8353
|
+
var zProxyResponse = union([
|
|
8354
|
+
object({
|
|
8355
|
+
id: zRequestId,
|
|
8356
|
+
result: union([zInitializeProxyResponse, zProxySuccessorResponse])
|
|
8357
|
+
}),
|
|
8358
|
+
object({
|
|
8359
|
+
id: union([wideInt(), string2()]).nullable(),
|
|
8360
|
+
error: zError
|
|
8361
|
+
})
|
|
8362
|
+
]);
|
|
8363
|
+
var zProxySuccessorNotification = object({
|
|
8364
|
+
method: string2(),
|
|
8365
|
+
params: unknown().optional(),
|
|
8366
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
8367
|
+
});
|
|
8368
|
+
var zProxyNotification = object({
|
|
8369
|
+
method: string2(),
|
|
8370
|
+
params: zProxySuccessorNotification.nullish()
|
|
8371
|
+
});
|
|
7874
8372
|
|
|
7875
|
-
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js
|
|
8373
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/v2/unstable/schema/guards.gen.js
|
|
7876
8374
|
function tagOf(value, key) {
|
|
7877
8375
|
return typeof value === "object" && value !== null ? value[key] : void 0;
|
|
7878
8376
|
}
|
|
@@ -7893,6 +8391,7 @@ var zGuardContentBlockResourceLink = zResourceLink.and(object({
|
|
|
7893
8391
|
annotations: zAnnotations.nullish()
|
|
7894
8392
|
})).and(object({ type: literal("resource_link") }));
|
|
7895
8393
|
var zGuardContentBlockResource = zEmbeddedResource.and(object({ annotations: zAnnotations.nullish() })).and(object({ type: literal("resource") }));
|
|
8394
|
+
var zGuardContentBlockSkill = zSkillReference.and(object({ type: literal("skill") }));
|
|
7896
8395
|
var zGuardDiffChangeAdd = zDiffPathChange.and(object({ operation: literal("add") }));
|
|
7897
8396
|
var zGuardDiffChangeDelete = zDiffPathChange.and(object({ operation: literal("delete") }));
|
|
7898
8397
|
var zGuardDiffChangeModify = zDiffPathChange.and(object({ operation: literal("modify") }));
|
|
@@ -7921,11 +8420,36 @@ var zGuardSessionConfigOptionCustom = object({
|
|
|
7921
8420
|
name: string2()
|
|
7922
8421
|
});
|
|
7923
8422
|
var zGuardAvailableCommandCommand = zCommand.and(object({ input: zAvailableCommandInput.nullish() })).and(object({ type: literal("command") }));
|
|
8423
|
+
var zGuardAvailableCommandSkill = zSkill.and(object({ path: zAbsolutePath.nullish() })).and(object({ type: literal("skill") }));
|
|
7924
8424
|
var zGuardAvailableCommandCustom = object({
|
|
7925
8425
|
name: string2(),
|
|
7926
8426
|
description: string2()
|
|
7927
8427
|
});
|
|
7928
8428
|
var zGuardAvailableCommandInputText = zTextCommandInput.and(object({ type: literal("text") }));
|
|
8429
|
+
var zGuardStateUpdateRunning = zRunningStateUpdate.and(object({ state: literal("running") }));
|
|
8430
|
+
var zGuardStateUpdateIdle = zIdleStateUpdate.and(object({ usage: zUsage.nullish() })).and(object({ state: literal("idle") }));
|
|
8431
|
+
var zGuardStateUpdateRequiresAction = zRequiresActionStateUpdate.and(object({ state: literal("requires_action") }));
|
|
8432
|
+
var zGuardStateUpdateUnknown = zUnknownStateUpdate.and(object({ state: literal("unknown") }));
|
|
8433
|
+
var zGuardBackgroundWorkTerminal = zBackgroundTerminal.and(object({ type: literal("terminal") }));
|
|
8434
|
+
var zGuardBackgroundWorkToolCall = zBackgroundToolCall.and(object({ type: literal("tool_call") }));
|
|
8435
|
+
var zGuardBackgroundWorkSubagent = zBackgroundSubagent.and(object({ type: literal("subagent") }));
|
|
8436
|
+
var zGuardIdleStateUpdateEndTurn = object({
|
|
8437
|
+
stopReason: literal("end_turn")
|
|
8438
|
+
});
|
|
8439
|
+
var zGuardIdleStateUpdateMaxTokens = object({
|
|
8440
|
+
stopReason: literal("max_tokens")
|
|
8441
|
+
});
|
|
8442
|
+
var zGuardIdleStateUpdateMaxTurnRequests = object({
|
|
8443
|
+
stopReason: literal("max_turn_requests")
|
|
8444
|
+
});
|
|
8445
|
+
var zGuardIdleStateUpdateRefusal = object({
|
|
8446
|
+
stopReason: literal("refusal")
|
|
8447
|
+
});
|
|
8448
|
+
var zGuardIdleStateUpdateCancelled = object({
|
|
8449
|
+
stopReason: literal("cancelled")
|
|
8450
|
+
});
|
|
8451
|
+
var zGuardIdleStateUpdateError = zErrorStopReason.and(object({ error: zError.nullish() })).and(object({ stopReason: literal("error") }));
|
|
8452
|
+
var zGuardIdleStateUpdateNone = object({ stopReason: _null3().optional() });
|
|
7929
8453
|
var zGuardSessionUpdateUserMessageChunk = zContentChunk.and(object({ sessionUpdate: literal("user_message_chunk") }));
|
|
7930
8454
|
var zGuardSessionUpdateUserMessage = zUserMessage.and(object({ sessionUpdate: literal("user_message") }));
|
|
7931
8455
|
var zGuardSessionUpdateAgentMessageChunk = zContentChunk.and(object({ sessionUpdate: literal("agent_message_chunk") }));
|
|
@@ -7948,6 +8472,7 @@ var zGuardSessionUpdateTerminalUpdate = zTerminalUpdate.and(object({
|
|
|
7948
8472
|
})).and(object({ sessionUpdate: literal("terminal_update") }));
|
|
7949
8473
|
var zGuardSessionUpdateTerminalOutputChunk = zTerminalOutputChunk.and(object({ sessionUpdate: literal("terminal_output_chunk") }));
|
|
7950
8474
|
var zGuardSessionUpdatePlanUpdate = zPlanUpdate.and(object({ sessionUpdate: literal("plan_update") }));
|
|
8475
|
+
var zGuardSessionUpdatePlanRemoved = zPlanRemoved.and(object({ sessionUpdate: literal("plan_removed") }));
|
|
7951
8476
|
var zGuardSessionUpdateAvailableCommandsUpdate = zAvailableCommandsUpdate.and(object({ sessionUpdate: literal("available_commands_update") }));
|
|
7952
8477
|
var zGuardSessionUpdateConfigOptionUpdate = zConfigOptionUpdate.and(object({ sessionUpdate: literal("config_option_update") }));
|
|
7953
8478
|
var zGuardSessionUpdateSessionInfoUpdate = zSessionInfoUpdate.and(object({ sessionUpdate: literal("session_info_update") }));
|
|
@@ -7956,6 +8481,7 @@ var zGuardSessionUpdateNotice = zNotice.and(object({ sessionUpdate: literal("not
|
|
|
7956
8481
|
var zGuardSessionUpdateCompactionUpdate = zCompactionUpdate.and(object({ sessionUpdate: literal("compaction_update") }));
|
|
7957
8482
|
var zGuardSessionUpdateCompactionSummaryChunk = zCompactionSummaryChunk.and(object({ sessionUpdate: literal("compaction_summary_chunk") }));
|
|
7958
8483
|
var zGuardSessionUpdateReplayComplete = zReplayComplete.and(object({ sessionUpdate: literal("replay_complete") }));
|
|
8484
|
+
var zGuardSessionUpdatePromptSuggestionsUpdate = zPromptSuggestionsUpdate.and(object({ sessionUpdate: literal("prompt_suggestions_update") }));
|
|
7959
8485
|
var zGuardSessionUpdateSubagentUpdate = zSubagentUpdate.and(object({
|
|
7960
8486
|
capabilities: zSubagentSessionCapabilities.nullish(),
|
|
7961
8487
|
state: zStateUpdate.nullish()
|
|
@@ -7967,34 +8493,15 @@ var zGuardSessionUpdateSessionMessage = zSessionMessage.and(object({
|
|
|
7967
8493
|
recipientMessageId: zMessageId.nullish()
|
|
7968
8494
|
})).and(object({ sessionUpdate: literal("session_message") }));
|
|
7969
8495
|
var zGuardSessionUpdateSessionMessageChunk = zSessionMessageChunk.and(object({ sessionUpdate: literal("session_message_chunk") }));
|
|
7970
|
-
var zGuardBackgroundWorkTerminal = zBackgroundTerminal.and(object({ type: literal("terminal") }));
|
|
7971
|
-
var zGuardBackgroundWorkToolCall = zBackgroundToolCall.and(object({ type: literal("tool_call") }));
|
|
7972
|
-
var zGuardBackgroundWorkSubagent = zBackgroundSubagent.and(object({ type: literal("subagent") }));
|
|
7973
|
-
var zGuardIdleStateUpdateEndTurn = object({
|
|
7974
|
-
stopReason: literal("end_turn")
|
|
7975
|
-
});
|
|
7976
|
-
var zGuardIdleStateUpdateMaxTokens = object({
|
|
7977
|
-
stopReason: literal("max_tokens")
|
|
7978
|
-
});
|
|
7979
|
-
var zGuardIdleStateUpdateMaxTurnRequests = object({
|
|
7980
|
-
stopReason: literal("max_turn_requests")
|
|
7981
|
-
});
|
|
7982
|
-
var zGuardIdleStateUpdateRefusal = object({
|
|
7983
|
-
stopReason: literal("refusal")
|
|
7984
|
-
});
|
|
7985
|
-
var zGuardIdleStateUpdateCancelled = object({
|
|
7986
|
-
stopReason: literal("cancelled")
|
|
7987
|
-
});
|
|
7988
|
-
var zGuardIdleStateUpdateError = zErrorStopReason.and(object({ error: zError.nullish() })).and(object({ stopReason: literal("error") }));
|
|
7989
|
-
var zGuardIdleStateUpdateNone = object({ stopReason: _null3().optional() });
|
|
7990
|
-
var zGuardStateUpdateRunning = zRunningStateUpdate.and(object({ state: literal("running") }));
|
|
7991
|
-
var zGuardStateUpdateIdle = zIdleStateUpdate.and(object({ state: literal("idle") }));
|
|
7992
|
-
var zGuardStateUpdateRequiresAction = zRequiresActionStateUpdate.and(object({ state: literal("requires_action") }));
|
|
7993
|
-
var zGuardStateUpdateUnknown = zUnknownStateUpdate.and(object({ state: literal("unknown") }));
|
|
7994
8496
|
var zGuardPlanUpdateContentItems = zPlanItems.and(object({ type: literal("items") }));
|
|
8497
|
+
var zGuardPlanUpdateContentMarkdown = zPlanMarkdown.and(object({ path: zAbsolutePath.nullish() })).and(object({ type: literal("markdown") }));
|
|
7995
8498
|
var zGuardPlanUpdateContentCustom = object({ planId: zPlanId });
|
|
7996
8499
|
var zGuardMcpServerHttp = zMcpServerHttp.and(object({ type: literal("http") }));
|
|
8500
|
+
var zGuardMcpServerAcp = zMcpServerAcp.and(object({ type: literal("acp") }));
|
|
7997
8501
|
var zGuardMcpServerStdio = zMcpServerStdio.and(object({ type: literal("stdio") }));
|
|
8502
|
+
var zGuardInitialSessionConfigOptionId = object({ type: literal("id") }).and(object({ value: zSessionConfigValueId })).and(object({ configId: zSessionConfigId }));
|
|
8503
|
+
var zGuardInitialSessionConfigOptionBoolean = object({ type: literal("boolean") }).and(object({ value: boolean2() })).and(object({ configId: zSessionConfigId }));
|
|
8504
|
+
var zGuardInitialSessionConfigOptionCustom = object({ value: unknown() }).and(object({ configId: zSessionConfigId }));
|
|
7998
8505
|
var zGuardReplayFromStart = zReplayFromStart.and(object({ type: literal("start") }));
|
|
7999
8506
|
var zGuardSetSessionConfigOptionRequestId = object({ type: literal("id") }).and(object({ value: zSessionConfigValueId })).and(object({
|
|
8000
8507
|
sessionId: zSessionId,
|
|
@@ -8088,6 +8595,10 @@ var ContentBlock = {
|
|
|
8088
8595
|
isResource(value) {
|
|
8089
8596
|
return tagOf(value, "type") === "resource" && zGuardContentBlockResource.safeParse(value).success;
|
|
8090
8597
|
},
|
|
8598
|
+
/** Narrow to the `skill` variant, validating its payload. */
|
|
8599
|
+
isSkill(value) {
|
|
8600
|
+
return tagOf(value, "type") === "skill" && zGuardContentBlockSkill.safeParse(value).success;
|
|
8601
|
+
},
|
|
8091
8602
|
/**
|
|
8092
8603
|
* Narrow to a custom or future variant: the `type` tag matches no known variant.
|
|
8093
8604
|
*
|
|
@@ -8097,7 +8608,14 @@ var ContentBlock = {
|
|
|
8097
8608
|
*/
|
|
8098
8609
|
isCustom(value) {
|
|
8099
8610
|
const tag = tagOf(value, "type");
|
|
8100
|
-
return typeof tag === "string" && ![
|
|
8611
|
+
return typeof tag === "string" && ![
|
|
8612
|
+
"audio",
|
|
8613
|
+
"image",
|
|
8614
|
+
"resource",
|
|
8615
|
+
"resource_link",
|
|
8616
|
+
"skill",
|
|
8617
|
+
"text"
|
|
8618
|
+
].includes(tag);
|
|
8101
8619
|
}
|
|
8102
8620
|
};
|
|
8103
8621
|
var CreateElicitationRequest = {
|
|
@@ -8175,40 +8693,163 @@ var MultiSelectItems = {
|
|
|
8175
8693
|
return typeof tag === "string" && !["string"].includes(tag);
|
|
8176
8694
|
}
|
|
8177
8695
|
};
|
|
8178
|
-
var
|
|
8179
|
-
/** Narrow to the `
|
|
8180
|
-
|
|
8181
|
-
return tagOf(value, "
|
|
8696
|
+
var AvailableCommand = {
|
|
8697
|
+
/** Narrow to the `command` variant, validating its payload. */
|
|
8698
|
+
isCommand(value) {
|
|
8699
|
+
return tagOf(value, "type") === "command" && zGuardAvailableCommandCommand.safeParse(value).success;
|
|
8182
8700
|
},
|
|
8183
|
-
/** Narrow to the `
|
|
8184
|
-
|
|
8185
|
-
return tagOf(value, "
|
|
8701
|
+
/** Narrow to the `skill` variant, validating its payload. */
|
|
8702
|
+
isSkill(value) {
|
|
8703
|
+
return tagOf(value, "type") === "skill" && zGuardAvailableCommandSkill.safeParse(value).success;
|
|
8186
8704
|
},
|
|
8187
|
-
/**
|
|
8188
|
-
|
|
8189
|
-
|
|
8705
|
+
/**
|
|
8706
|
+
* Narrow to a custom or future variant: the `type` tag matches no known variant, with a valid payload.
|
|
8707
|
+
*
|
|
8708
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
8709
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
8710
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
8711
|
+
*/
|
|
8712
|
+
isCustom(value) {
|
|
8713
|
+
const tag = tagOf(value, "type");
|
|
8714
|
+
return typeof tag === "string" && !["command", "skill"].includes(tag) && zGuardAvailableCommandCustom.safeParse(value).success;
|
|
8715
|
+
}
|
|
8716
|
+
};
|
|
8717
|
+
var StateUpdate = {
|
|
8718
|
+
/** Narrow to the `running` variant, validating its payload. */
|
|
8719
|
+
isRunning(value) {
|
|
8720
|
+
return tagOf(value, "state") === "running" && zGuardStateUpdateRunning.safeParse(value).success;
|
|
8190
8721
|
},
|
|
8191
|
-
/** Narrow to the `
|
|
8192
|
-
|
|
8193
|
-
return tagOf(value, "
|
|
8722
|
+
/** Narrow to the `idle` variant, validating its payload. */
|
|
8723
|
+
isIdle(value) {
|
|
8724
|
+
return tagOf(value, "state") === "idle" && zGuardStateUpdateIdle.safeParse(value).success;
|
|
8194
8725
|
},
|
|
8195
|
-
/** Narrow to the `
|
|
8196
|
-
|
|
8197
|
-
return tagOf(value, "
|
|
8726
|
+
/** Narrow to the `requires_action` variant, validating its payload. */
|
|
8727
|
+
isRequiresAction(value) {
|
|
8728
|
+
return tagOf(value, "state") === "requires_action" && zGuardStateUpdateRequiresAction.safeParse(value).success;
|
|
8198
8729
|
},
|
|
8199
|
-
/** Narrow to the `
|
|
8200
|
-
|
|
8201
|
-
return tagOf(value, "
|
|
8730
|
+
/** Narrow to the `unknown` variant, validating its payload. */
|
|
8731
|
+
isUnknown(value) {
|
|
8732
|
+
return tagOf(value, "state") === "unknown" && zGuardStateUpdateUnknown.safeParse(value).success;
|
|
8202
8733
|
},
|
|
8203
|
-
/**
|
|
8204
|
-
|
|
8205
|
-
|
|
8734
|
+
/**
|
|
8735
|
+
* Narrow to a custom or future variant: the `state` tag matches no known variant.
|
|
8736
|
+
*
|
|
8737
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
8738
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
8739
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
8740
|
+
*/
|
|
8741
|
+
isCustom(value) {
|
|
8742
|
+
const tag = tagOf(value, "state");
|
|
8743
|
+
return typeof tag === "string" && !["idle", "requires_action", "running", "unknown"].includes(tag);
|
|
8744
|
+
}
|
|
8745
|
+
};
|
|
8746
|
+
var BackgroundWork = {
|
|
8747
|
+
/** Narrow to the `terminal` variant, validating its payload. */
|
|
8748
|
+
isTerminal(value) {
|
|
8749
|
+
return tagOf(value, "type") === "terminal" && zGuardBackgroundWorkTerminal.safeParse(value).success;
|
|
8206
8750
|
},
|
|
8207
|
-
/** Narrow to the `
|
|
8208
|
-
|
|
8209
|
-
return tagOf(value, "
|
|
8751
|
+
/** Narrow to the `tool_call` variant, validating its payload. */
|
|
8752
|
+
isToolCall(value) {
|
|
8753
|
+
return tagOf(value, "type") === "tool_call" && zGuardBackgroundWorkToolCall.safeParse(value).success;
|
|
8210
8754
|
},
|
|
8211
|
-
/** Narrow to the `
|
|
8755
|
+
/** Narrow to the `subagent` variant, validating its payload. */
|
|
8756
|
+
isSubagent(value) {
|
|
8757
|
+
return tagOf(value, "type") === "subagent" && zGuardBackgroundWorkSubagent.safeParse(value).success;
|
|
8758
|
+
},
|
|
8759
|
+
/**
|
|
8760
|
+
* Narrow to a custom or future variant: the `type` tag matches no known variant.
|
|
8761
|
+
*
|
|
8762
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
8763
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
8764
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
8765
|
+
*/
|
|
8766
|
+
isCustom(value) {
|
|
8767
|
+
const tag = tagOf(value, "type");
|
|
8768
|
+
return typeof tag === "string" && !["subagent", "terminal", "tool_call"].includes(tag);
|
|
8769
|
+
}
|
|
8770
|
+
};
|
|
8771
|
+
var IdleStateUpdate = {
|
|
8772
|
+
/** Narrow to the `end_turn` variant, validating its payload. */
|
|
8773
|
+
isEndTurn(value) {
|
|
8774
|
+
return tagOf(value, "stopReason") === "end_turn" && zGuardIdleStateUpdateEndTurn.safeParse(value).success;
|
|
8775
|
+
},
|
|
8776
|
+
/** Narrow to the `max_tokens` variant, validating its payload. */
|
|
8777
|
+
isMaxTokens(value) {
|
|
8778
|
+
return tagOf(value, "stopReason") === "max_tokens" && zGuardIdleStateUpdateMaxTokens.safeParse(value).success;
|
|
8779
|
+
},
|
|
8780
|
+
/** Narrow to the `max_turn_requests` variant, validating its payload. */
|
|
8781
|
+
isMaxTurnRequests(value) {
|
|
8782
|
+
return tagOf(value, "stopReason") === "max_turn_requests" && zGuardIdleStateUpdateMaxTurnRequests.safeParse(value).success;
|
|
8783
|
+
},
|
|
8784
|
+
/** Narrow to the `refusal` variant, validating its payload. */
|
|
8785
|
+
isRefusal(value) {
|
|
8786
|
+
return tagOf(value, "stopReason") === "refusal" && zGuardIdleStateUpdateRefusal.safeParse(value).success;
|
|
8787
|
+
},
|
|
8788
|
+
/** Narrow to the `cancelled` variant, validating its payload. */
|
|
8789
|
+
isCancelled(value) {
|
|
8790
|
+
return tagOf(value, "stopReason") === "cancelled" && zGuardIdleStateUpdateCancelled.safeParse(value).success;
|
|
8791
|
+
},
|
|
8792
|
+
/** Narrow to the `error` variant, validating its payload. */
|
|
8793
|
+
isError(value) {
|
|
8794
|
+
return tagOf(value, "stopReason") === "error" && zGuardIdleStateUpdateError.safeParse(value).success;
|
|
8795
|
+
},
|
|
8796
|
+
/** Narrow to the `none` variant, validating its payload. */
|
|
8797
|
+
isNone(value) {
|
|
8798
|
+
return (tagOf(value, "stopReason") === null || tagOf(value, "stopReason") === void 0) && zGuardIdleStateUpdateNone.safeParse(value).success;
|
|
8799
|
+
},
|
|
8800
|
+
/**
|
|
8801
|
+
* Narrow to a custom or future variant: the `stopReason` tag matches no known variant.
|
|
8802
|
+
*
|
|
8803
|
+
* TypeScript keeps the known variants in the narrowed union (they are
|
|
8804
|
+
* structural subtypes of the catch-all), so read vendor payload keys
|
|
8805
|
+
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
8806
|
+
*/
|
|
8807
|
+
isCustom(value) {
|
|
8808
|
+
const tag = tagOf(value, "stopReason");
|
|
8809
|
+
return typeof tag === "string" && ![
|
|
8810
|
+
"cancelled",
|
|
8811
|
+
"end_turn",
|
|
8812
|
+
"error",
|
|
8813
|
+
"max_tokens",
|
|
8814
|
+
"max_turn_requests",
|
|
8815
|
+
"refusal"
|
|
8816
|
+
].includes(tag);
|
|
8817
|
+
}
|
|
8818
|
+
};
|
|
8819
|
+
var SessionUpdate = {
|
|
8820
|
+
/** Narrow to the `user_message_chunk` variant, validating its payload. */
|
|
8821
|
+
isUserMessageChunk(value) {
|
|
8822
|
+
return tagOf(value, "sessionUpdate") === "user_message_chunk" && zGuardSessionUpdateUserMessageChunk.safeParse(value).success;
|
|
8823
|
+
},
|
|
8824
|
+
/** Narrow to the `user_message` variant, validating its payload. */
|
|
8825
|
+
isUserMessage(value) {
|
|
8826
|
+
return tagOf(value, "sessionUpdate") === "user_message" && zGuardSessionUpdateUserMessage.safeParse(value).success;
|
|
8827
|
+
},
|
|
8828
|
+
/** Narrow to the `agent_message_chunk` variant, validating its payload. */
|
|
8829
|
+
isAgentMessageChunk(value) {
|
|
8830
|
+
return tagOf(value, "sessionUpdate") === "agent_message_chunk" && zGuardSessionUpdateAgentMessageChunk.safeParse(value).success;
|
|
8831
|
+
},
|
|
8832
|
+
/** Narrow to the `agent_message` variant, validating its payload. */
|
|
8833
|
+
isAgentMessage(value) {
|
|
8834
|
+
return tagOf(value, "sessionUpdate") === "agent_message" && zGuardSessionUpdateAgentMessage.safeParse(value).success;
|
|
8835
|
+
},
|
|
8836
|
+
/** Narrow to the `agent_thought_chunk` variant, validating its payload. */
|
|
8837
|
+
isAgentThoughtChunk(value) {
|
|
8838
|
+
return tagOf(value, "sessionUpdate") === "agent_thought_chunk" && zGuardSessionUpdateAgentThoughtChunk.safeParse(value).success;
|
|
8839
|
+
},
|
|
8840
|
+
/** Narrow to the `agent_thought` variant, validating its payload. */
|
|
8841
|
+
isAgentThought(value) {
|
|
8842
|
+
return tagOf(value, "sessionUpdate") === "agent_thought" && zGuardSessionUpdateAgentThought.safeParse(value).success;
|
|
8843
|
+
},
|
|
8844
|
+
/** Narrow to the `state_update` variant, validating its payload. */
|
|
8845
|
+
isStateUpdate(value) {
|
|
8846
|
+
return tagOf(value, "sessionUpdate") === "state_update" && zGuardSessionUpdateStateUpdate.safeParse(value).success;
|
|
8847
|
+
},
|
|
8848
|
+
/** Narrow to the `tool_call_content_chunk` variant, validating its payload. */
|
|
8849
|
+
isToolCallContentChunk(value) {
|
|
8850
|
+
return tagOf(value, "sessionUpdate") === "tool_call_content_chunk" && zGuardSessionUpdateToolCallContentChunk.safeParse(value).success;
|
|
8851
|
+
},
|
|
8852
|
+
/** Narrow to the `tool_call_update` variant, validating its payload. */
|
|
8212
8853
|
isToolCallUpdate(value) {
|
|
8213
8854
|
return tagOf(value, "sessionUpdate") === "tool_call_update" && zGuardSessionUpdateToolCallUpdate.safeParse(value).success;
|
|
8214
8855
|
},
|
|
@@ -8224,6 +8865,10 @@ var SessionUpdate = {
|
|
|
8224
8865
|
isPlanUpdate(value) {
|
|
8225
8866
|
return tagOf(value, "sessionUpdate") === "plan_update" && zGuardSessionUpdatePlanUpdate.safeParse(value).success;
|
|
8226
8867
|
},
|
|
8868
|
+
/** Narrow to the `plan_removed` variant, validating its payload. */
|
|
8869
|
+
isPlanRemoved(value) {
|
|
8870
|
+
return tagOf(value, "sessionUpdate") === "plan_removed" && zGuardSessionUpdatePlanRemoved.safeParse(value).success;
|
|
8871
|
+
},
|
|
8227
8872
|
/** Narrow to the `available_commands_update` variant, validating its payload. */
|
|
8228
8873
|
isAvailableCommandsUpdate(value) {
|
|
8229
8874
|
return tagOf(value, "sessionUpdate") === "available_commands_update" && zGuardSessionUpdateAvailableCommandsUpdate.safeParse(value).success;
|
|
@@ -8256,6 +8901,10 @@ var SessionUpdate = {
|
|
|
8256
8901
|
isReplayComplete(value) {
|
|
8257
8902
|
return tagOf(value, "sessionUpdate") === "replay_complete" && zGuardSessionUpdateReplayComplete.safeParse(value).success;
|
|
8258
8903
|
},
|
|
8904
|
+
/** Narrow to the `prompt_suggestions_update` variant, validating its payload. */
|
|
8905
|
+
isPromptSuggestionsUpdate(value) {
|
|
8906
|
+
return tagOf(value, "sessionUpdate") === "prompt_suggestions_update" && zGuardSessionUpdatePromptSuggestionsUpdate.safeParse(value).success;
|
|
8907
|
+
},
|
|
8259
8908
|
/** Narrow to the `subagent_update` variant, validating its payload. */
|
|
8260
8909
|
isSubagentUpdate(value) {
|
|
8261
8910
|
return tagOf(value, "sessionUpdate") === "subagent_update" && zGuardSessionUpdateSubagentUpdate.safeParse(value).success;
|
|
@@ -8287,7 +8936,9 @@ var SessionUpdate = {
|
|
|
8287
8936
|
"compaction_update",
|
|
8288
8937
|
"config_option_update",
|
|
8289
8938
|
"notice",
|
|
8939
|
+
"plan_removed",
|
|
8290
8940
|
"plan_update",
|
|
8941
|
+
"prompt_suggestions_update",
|
|
8291
8942
|
"replay_complete",
|
|
8292
8943
|
"session_info_update",
|
|
8293
8944
|
"session_message",
|
|
@@ -8304,113 +8955,15 @@ var SessionUpdate = {
|
|
|
8304
8955
|
].includes(tag);
|
|
8305
8956
|
}
|
|
8306
8957
|
};
|
|
8307
|
-
var BackgroundWork = {
|
|
8308
|
-
/** Narrow to the `terminal` variant, validating its payload. */
|
|
8309
|
-
isTerminal(value) {
|
|
8310
|
-
return tagOf(value, "type") === "terminal" && zGuardBackgroundWorkTerminal.safeParse(value).success;
|
|
8311
|
-
},
|
|
8312
|
-
/** Narrow to the `tool_call` variant, validating its payload. */
|
|
8313
|
-
isToolCall(value) {
|
|
8314
|
-
return tagOf(value, "type") === "tool_call" && zGuardBackgroundWorkToolCall.safeParse(value).success;
|
|
8315
|
-
},
|
|
8316
|
-
/** Narrow to the `subagent` variant, validating its payload. */
|
|
8317
|
-
isSubagent(value) {
|
|
8318
|
-
return tagOf(value, "type") === "subagent" && zGuardBackgroundWorkSubagent.safeParse(value).success;
|
|
8319
|
-
},
|
|
8320
|
-
/**
|
|
8321
|
-
* Narrow to a custom or future variant: the `type` tag matches no known variant.
|
|
8322
|
-
*
|
|
8323
|
-
* TypeScript keeps the known variants in the narrowed union (they are
|
|
8324
|
-
* structural subtypes of the catch-all), so read vendor payload keys
|
|
8325
|
-
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
8326
|
-
*/
|
|
8327
|
-
isCustom(value) {
|
|
8328
|
-
const tag = tagOf(value, "type");
|
|
8329
|
-
return typeof tag === "string" && !["subagent", "terminal", "tool_call"].includes(tag);
|
|
8330
|
-
}
|
|
8331
|
-
};
|
|
8332
|
-
var IdleStateUpdate = {
|
|
8333
|
-
/** Narrow to the `end_turn` variant, validating its payload. */
|
|
8334
|
-
isEndTurn(value) {
|
|
8335
|
-
return tagOf(value, "stopReason") === "end_turn" && zGuardIdleStateUpdateEndTurn.safeParse(value).success;
|
|
8336
|
-
},
|
|
8337
|
-
/** Narrow to the `max_tokens` variant, validating its payload. */
|
|
8338
|
-
isMaxTokens(value) {
|
|
8339
|
-
return tagOf(value, "stopReason") === "max_tokens" && zGuardIdleStateUpdateMaxTokens.safeParse(value).success;
|
|
8340
|
-
},
|
|
8341
|
-
/** Narrow to the `max_turn_requests` variant, validating its payload. */
|
|
8342
|
-
isMaxTurnRequests(value) {
|
|
8343
|
-
return tagOf(value, "stopReason") === "max_turn_requests" && zGuardIdleStateUpdateMaxTurnRequests.safeParse(value).success;
|
|
8344
|
-
},
|
|
8345
|
-
/** Narrow to the `refusal` variant, validating its payload. */
|
|
8346
|
-
isRefusal(value) {
|
|
8347
|
-
return tagOf(value, "stopReason") === "refusal" && zGuardIdleStateUpdateRefusal.safeParse(value).success;
|
|
8348
|
-
},
|
|
8349
|
-
/** Narrow to the `cancelled` variant, validating its payload. */
|
|
8350
|
-
isCancelled(value) {
|
|
8351
|
-
return tagOf(value, "stopReason") === "cancelled" && zGuardIdleStateUpdateCancelled.safeParse(value).success;
|
|
8352
|
-
},
|
|
8353
|
-
/** Narrow to the `error` variant, validating its payload. */
|
|
8354
|
-
isError(value) {
|
|
8355
|
-
return tagOf(value, "stopReason") === "error" && zGuardIdleStateUpdateError.safeParse(value).success;
|
|
8356
|
-
},
|
|
8357
|
-
/** Narrow to the `none` variant, validating its payload. */
|
|
8358
|
-
isNone(value) {
|
|
8359
|
-
return (tagOf(value, "stopReason") === null || tagOf(value, "stopReason") === void 0) && zGuardIdleStateUpdateNone.safeParse(value).success;
|
|
8360
|
-
},
|
|
8361
|
-
/**
|
|
8362
|
-
* Narrow to a custom or future variant: the `stopReason` tag matches no known variant.
|
|
8363
|
-
*
|
|
8364
|
-
* TypeScript keeps the known variants in the narrowed union (they are
|
|
8365
|
-
* structural subtypes of the catch-all), so read vendor payload keys
|
|
8366
|
-
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
8367
|
-
*/
|
|
8368
|
-
isCustom(value) {
|
|
8369
|
-
const tag = tagOf(value, "stopReason");
|
|
8370
|
-
return typeof tag === "string" && ![
|
|
8371
|
-
"cancelled",
|
|
8372
|
-
"end_turn",
|
|
8373
|
-
"error",
|
|
8374
|
-
"max_tokens",
|
|
8375
|
-
"max_turn_requests",
|
|
8376
|
-
"refusal"
|
|
8377
|
-
].includes(tag);
|
|
8378
|
-
}
|
|
8379
|
-
};
|
|
8380
|
-
var StateUpdate = {
|
|
8381
|
-
/** Narrow to the `running` variant, validating its payload. */
|
|
8382
|
-
isRunning(value) {
|
|
8383
|
-
return tagOf(value, "state") === "running" && zGuardStateUpdateRunning.safeParse(value).success;
|
|
8384
|
-
},
|
|
8385
|
-
/** Narrow to the `idle` variant, validating its payload. */
|
|
8386
|
-
isIdle(value) {
|
|
8387
|
-
return tagOf(value, "state") === "idle" && zGuardStateUpdateIdle.safeParse(value).success;
|
|
8388
|
-
},
|
|
8389
|
-
/** Narrow to the `requires_action` variant, validating its payload. */
|
|
8390
|
-
isRequiresAction(value) {
|
|
8391
|
-
return tagOf(value, "state") === "requires_action" && zGuardStateUpdateRequiresAction.safeParse(value).success;
|
|
8392
|
-
},
|
|
8393
|
-
/** Narrow to the `unknown` variant, validating its payload. */
|
|
8394
|
-
isUnknown(value) {
|
|
8395
|
-
return tagOf(value, "state") === "unknown" && zGuardStateUpdateUnknown.safeParse(value).success;
|
|
8396
|
-
},
|
|
8397
|
-
/**
|
|
8398
|
-
* Narrow to a custom or future variant: the `state` tag matches no known variant.
|
|
8399
|
-
*
|
|
8400
|
-
* TypeScript keeps the known variants in the narrowed union (they are
|
|
8401
|
-
* structural subtypes of the catch-all), so read vendor payload keys
|
|
8402
|
-
* via a widening cast: `(value as Record<string, unknown>).someKey`.
|
|
8403
|
-
*/
|
|
8404
|
-
isCustom(value) {
|
|
8405
|
-
const tag = tagOf(value, "state");
|
|
8406
|
-
return typeof tag === "string" && !["idle", "requires_action", "running", "unknown"].includes(tag);
|
|
8407
|
-
}
|
|
8408
|
-
};
|
|
8409
8958
|
var PlanUpdateContent = {
|
|
8410
8959
|
/** Narrow to the `items` variant, validating its payload. */
|
|
8411
8960
|
isItems(value) {
|
|
8412
8961
|
return tagOf(value, "type") === "items" && zGuardPlanUpdateContentItems.safeParse(value).success;
|
|
8413
8962
|
},
|
|
8963
|
+
/** Narrow to the `markdown` variant, validating its payload. */
|
|
8964
|
+
isMarkdown(value) {
|
|
8965
|
+
return tagOf(value, "type") === "markdown" && zGuardPlanUpdateContentMarkdown.safeParse(value).success;
|
|
8966
|
+
},
|
|
8414
8967
|
/**
|
|
8415
8968
|
* Narrow to a custom or future variant: the `type` tag matches no known variant, with a valid payload.
|
|
8416
8969
|
*
|
|
@@ -8420,7 +8973,7 @@ var PlanUpdateContent = {
|
|
|
8420
8973
|
*/
|
|
8421
8974
|
isCustom(value) {
|
|
8422
8975
|
const tag = tagOf(value, "type");
|
|
8423
|
-
return typeof tag === "string" && !["items"].includes(tag) && zGuardPlanUpdateContentCustom.safeParse(value).success;
|
|
8976
|
+
return typeof tag === "string" && !["items", "markdown"].includes(tag) && zGuardPlanUpdateContentCustom.safeParse(value).success;
|
|
8424
8977
|
}
|
|
8425
8978
|
};
|
|
8426
8979
|
|
|
@@ -9952,11 +10505,11 @@ var zCreateElicitationRequest2 = preserveCustomPayload(intersection(union([
|
|
|
9952
10505
|
message: string2(),
|
|
9953
10506
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
9954
10507
|
})), "mode", ["form", "url"]);
|
|
9955
|
-
var
|
|
9956
|
-
var
|
|
9957
|
-
var
|
|
9958
|
-
serverId:
|
|
9959
|
-
requestId:
|
|
10508
|
+
var zMcpServerAcpId2 = string2();
|
|
10509
|
+
var zMcpRequestId2 = string2();
|
|
10510
|
+
var zMessageMcpRequest2 = object({
|
|
10511
|
+
serverId: zMcpServerAcpId2,
|
|
10512
|
+
requestId: zMcpRequestId2,
|
|
9960
10513
|
method: string2(),
|
|
9961
10514
|
params: record(string2(), unknown()).nullish(),
|
|
9962
10515
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
@@ -9975,7 +10528,7 @@ var zAgentRequest2 = object({
|
|
|
9975
10528
|
zWaitForTerminalExitRequest,
|
|
9976
10529
|
zKillTerminalRequest,
|
|
9977
10530
|
zCreateElicitationRequest2,
|
|
9978
|
-
|
|
10531
|
+
zMessageMcpRequest2,
|
|
9979
10532
|
zExtRequest2
|
|
9980
10533
|
]).nullish()
|
|
9981
10534
|
});
|
|
@@ -10012,19 +10565,19 @@ var zSessionSystemPromptCapabilities2 = object({
|
|
|
10012
10565
|
mode: defaultOnError(zSessionSystemPromptModeCapabilities2.nullish(), () => void 0),
|
|
10013
10566
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10014
10567
|
});
|
|
10015
|
-
var
|
|
10568
|
+
var zSessionForkCapabilities2 = object({
|
|
10016
10569
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10017
10570
|
});
|
|
10018
|
-
var
|
|
10571
|
+
var zSessionArchiveCapabilities2 = object({
|
|
10019
10572
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10020
10573
|
});
|
|
10021
|
-
var
|
|
10574
|
+
var zSessionStatusCapabilities2 = object({
|
|
10022
10575
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10023
10576
|
});
|
|
10024
|
-
var
|
|
10577
|
+
var zSessionOptionsCapabilities2 = object({
|
|
10025
10578
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10026
10579
|
});
|
|
10027
|
-
var
|
|
10580
|
+
var zSessionTitleCapabilities2 = object({
|
|
10028
10581
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10029
10582
|
});
|
|
10030
10583
|
var zSessionResumeCapabilities = object({
|
|
@@ -10038,27 +10591,27 @@ var zSessionCapabilities2 = object({
|
|
|
10038
10591
|
delete: defaultOnError(zSessionDeleteCapabilities2.nullish(), () => void 0),
|
|
10039
10592
|
additionalDirectories: defaultOnError(zSessionAdditionalDirectoriesCapabilities2.nullish(), () => void 0),
|
|
10040
10593
|
systemPrompt: defaultOnError(zSessionSystemPromptCapabilities2.nullish(), () => void 0),
|
|
10041
|
-
fork: defaultOnError(
|
|
10042
|
-
archive: defaultOnError(
|
|
10043
|
-
status: defaultOnError(
|
|
10044
|
-
options: defaultOnError(
|
|
10045
|
-
title: defaultOnError(
|
|
10594
|
+
fork: defaultOnError(zSessionForkCapabilities2.nullish(), () => void 0),
|
|
10595
|
+
archive: defaultOnError(zSessionArchiveCapabilities2.nullish(), () => void 0),
|
|
10596
|
+
status: defaultOnError(zSessionStatusCapabilities2.nullish(), () => void 0),
|
|
10597
|
+
options: defaultOnError(zSessionOptionsCapabilities2.nullish(), () => void 0),
|
|
10598
|
+
title: defaultOnError(zSessionTitleCapabilities2.nullish(), () => void 0),
|
|
10046
10599
|
resume: defaultOnError(zSessionResumeCapabilities.nullish(), () => void 0),
|
|
10047
10600
|
close: defaultOnError(zSessionCloseCapabilities.nullish(), () => void 0),
|
|
10048
10601
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10049
10602
|
});
|
|
10050
|
-
var
|
|
10603
|
+
var zAuthStatusCapabilities2 = object({
|
|
10051
10604
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10052
10605
|
});
|
|
10053
10606
|
var zLogoutCapabilities = object({
|
|
10054
10607
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10055
10608
|
});
|
|
10056
10609
|
var zAgentAuthCapabilities2 = object({
|
|
10057
|
-
status: defaultOnError(
|
|
10610
|
+
status: defaultOnError(zAuthStatusCapabilities2.nullish(), () => void 0),
|
|
10058
10611
|
logout: defaultOnError(zLogoutCapabilities.nullish(), () => void 0),
|
|
10059
10612
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10060
10613
|
});
|
|
10061
|
-
var
|
|
10614
|
+
var zProvidersCapabilities2 = object({
|
|
10062
10615
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10063
10616
|
});
|
|
10064
10617
|
var zAgentCapabilities2 = object({
|
|
@@ -10083,7 +10636,7 @@ var zAgentCapabilities2 = object({
|
|
|
10083
10636
|
})),
|
|
10084
10637
|
sessionCapabilities: defaultOnError(zSessionCapabilities2.optional().default({}), () => ({})),
|
|
10085
10638
|
auth: defaultOnError(zAgentAuthCapabilities2.optional().default({}), () => ({})),
|
|
10086
|
-
providers: defaultOnError(
|
|
10639
|
+
providers: defaultOnError(zProvidersCapabilities2.nullish(), () => void 0),
|
|
10087
10640
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10088
10641
|
});
|
|
10089
10642
|
var zAuthMethodId2 = string2();
|
|
@@ -10151,8 +10704,8 @@ var zInitializeResponse2 = object({
|
|
|
10151
10704
|
var zAuthenticateResponse = object({
|
|
10152
10705
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10153
10706
|
});
|
|
10154
|
-
var
|
|
10155
|
-
var
|
|
10707
|
+
var zProviderId2 = string2();
|
|
10708
|
+
var zLlmProtocol2 = union([
|
|
10156
10709
|
literal("anthropic"),
|
|
10157
10710
|
literal("openai"),
|
|
10158
10711
|
literal("azure"),
|
|
@@ -10160,39 +10713,39 @@ var zLlmProtocol = union([
|
|
|
10160
10713
|
literal("bedrock"),
|
|
10161
10714
|
string2()
|
|
10162
10715
|
]);
|
|
10163
|
-
var
|
|
10164
|
-
apiType:
|
|
10716
|
+
var zProviderCurrentConfig2 = object({
|
|
10717
|
+
apiType: zLlmProtocol2,
|
|
10165
10718
|
baseUrl: string2(),
|
|
10166
10719
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10167
10720
|
});
|
|
10168
|
-
var
|
|
10169
|
-
providerId:
|
|
10170
|
-
supported: requiredDefaultOnError(vecSkipError(
|
|
10171
|
-
required: boolean2(),
|
|
10172
|
-
current:
|
|
10721
|
+
var zProviderInfo2 = object({
|
|
10722
|
+
providerId: zProviderId2,
|
|
10723
|
+
supported: requiredDefaultOnError(vecSkipError(zLlmProtocol2), () => []),
|
|
10724
|
+
required: boolean2(),
|
|
10725
|
+
current: zProviderCurrentConfig2.nullish(),
|
|
10173
10726
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10174
10727
|
});
|
|
10175
|
-
var
|
|
10176
|
-
providers: array(
|
|
10728
|
+
var zListProvidersResponse2 = object({
|
|
10729
|
+
providers: array(zProviderInfo2),
|
|
10177
10730
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10178
10731
|
});
|
|
10179
|
-
var
|
|
10732
|
+
var zSetProviderResponse2 = object({
|
|
10180
10733
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10181
10734
|
});
|
|
10182
|
-
var
|
|
10735
|
+
var zDisableProviderResponse2 = object({
|
|
10183
10736
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10184
10737
|
});
|
|
10185
10738
|
var zLogoutResponse = object({
|
|
10186
10739
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10187
10740
|
});
|
|
10188
|
-
var
|
|
10741
|
+
var zAuthState2 = union([
|
|
10189
10742
|
literal("authenticated"),
|
|
10190
10743
|
literal("unauthenticated"),
|
|
10191
10744
|
literal("not_required"),
|
|
10192
10745
|
literal("unknown"),
|
|
10193
10746
|
string2()
|
|
10194
10747
|
]);
|
|
10195
|
-
var
|
|
10748
|
+
var zAuthAccount2 = object({
|
|
10196
10749
|
label: string2(),
|
|
10197
10750
|
description: defaultOnError(string2().nullish(), () => void 0),
|
|
10198
10751
|
active: defaultOnError(boolean2().nullish(), () => void 0),
|
|
@@ -10201,9 +10754,9 @@ var zAuthAccount = object({
|
|
|
10201
10754
|
organization: defaultOnError(string2().nullish(), () => void 0),
|
|
10202
10755
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10203
10756
|
});
|
|
10204
|
-
var
|
|
10205
|
-
state:
|
|
10206
|
-
accounts: defaultOnError(vecSkipError(
|
|
10757
|
+
var zAuthStatusResponse2 = object({
|
|
10758
|
+
state: zAuthState2,
|
|
10759
|
+
accounts: defaultOnError(vecSkipError(zAuthAccount2).optional(), () => []),
|
|
10207
10760
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10208
10761
|
});
|
|
10209
10762
|
var zSessionModeId = string2();
|
|
@@ -10294,33 +10847,33 @@ var zListSessionsResponse2 = object({
|
|
|
10294
10847
|
var zDeleteSessionResponse2 = object({
|
|
10295
10848
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10296
10849
|
});
|
|
10297
|
-
var
|
|
10850
|
+
var zForkSessionResponse2 = object({
|
|
10298
10851
|
sessionId: zSessionId2,
|
|
10299
10852
|
modes: defaultOnError(zSessionModeState.nullish(), () => void 0),
|
|
10300
10853
|
configOptions: defaultOnError(vecSkipError(zSessionConfigOption2).nullish(), () => void 0),
|
|
10301
10854
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10302
10855
|
});
|
|
10303
|
-
var
|
|
10856
|
+
var zArchiveSessionResponse2 = object({
|
|
10304
10857
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10305
10858
|
});
|
|
10306
|
-
var
|
|
10859
|
+
var zUnarchiveSessionResponse2 = object({
|
|
10307
10860
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10308
10861
|
});
|
|
10309
|
-
var
|
|
10862
|
+
var zSessionStatus2 = union([
|
|
10310
10863
|
literal("open"),
|
|
10311
10864
|
literal("saved"),
|
|
10312
10865
|
string2()
|
|
10313
10866
|
]);
|
|
10314
|
-
var
|
|
10315
|
-
status:
|
|
10867
|
+
var zSessionStatusResponse2 = object({
|
|
10868
|
+
status: zSessionStatus2,
|
|
10316
10869
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10317
10870
|
});
|
|
10318
|
-
var
|
|
10871
|
+
var zSessionOptionsResponse2 = object({
|
|
10319
10872
|
modes: defaultOnError(zSessionModeState.nullish(), () => void 0),
|
|
10320
10873
|
configOptions: defaultOnError(vecSkipError(zSessionConfigOption2).nullish(), () => void 0),
|
|
10321
10874
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10322
10875
|
});
|
|
10323
|
-
var
|
|
10876
|
+
var zSetSessionTitleResponse2 = object({
|
|
10324
10877
|
title: string2(),
|
|
10325
10878
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10326
10879
|
});
|
|
@@ -10346,7 +10899,7 @@ var zStopReason = union([
|
|
|
10346
10899
|
literal("refusal"),
|
|
10347
10900
|
literal("cancelled")
|
|
10348
10901
|
]);
|
|
10349
|
-
var
|
|
10902
|
+
var zUsage2 = object({
|
|
10350
10903
|
totalTokens: wideInt().gte(0),
|
|
10351
10904
|
inputTokens: wideInt().gte(0),
|
|
10352
10905
|
outputTokens: wideInt().gte(0),
|
|
@@ -10357,7 +10910,7 @@ var zUsage = object({
|
|
|
10357
10910
|
});
|
|
10358
10911
|
var zPromptResponse2 = object({
|
|
10359
10912
|
stopReason: zStopReason,
|
|
10360
|
-
usage: defaultOnError(
|
|
10913
|
+
usage: defaultOnError(zUsage2.nullish(), () => void 0),
|
|
10361
10914
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10362
10915
|
});
|
|
10363
10916
|
var zExtResponse2 = unknown();
|
|
@@ -10387,21 +10940,21 @@ var zAgentResponse2 = union([
|
|
|
10387
10940
|
result: union([
|
|
10388
10941
|
zInitializeResponse2,
|
|
10389
10942
|
zAuthenticateResponse,
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10943
|
+
zListProvidersResponse2,
|
|
10944
|
+
zSetProviderResponse2,
|
|
10945
|
+
zDisableProviderResponse2,
|
|
10393
10946
|
zLogoutResponse,
|
|
10394
|
-
|
|
10947
|
+
zAuthStatusResponse2,
|
|
10395
10948
|
zNewSessionResponse2,
|
|
10396
10949
|
zLoadSessionResponse,
|
|
10397
10950
|
zListSessionsResponse2,
|
|
10398
10951
|
zDeleteSessionResponse2,
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10952
|
+
zForkSessionResponse2,
|
|
10953
|
+
zArchiveSessionResponse2,
|
|
10954
|
+
zUnarchiveSessionResponse2,
|
|
10955
|
+
zSessionStatusResponse2,
|
|
10956
|
+
zSessionOptionsResponse2,
|
|
10957
|
+
zSetSessionTitleResponse2,
|
|
10405
10958
|
zResumeSessionResponse2,
|
|
10406
10959
|
zCloseSessionResponse2,
|
|
10407
10960
|
zSetSessionModeResponse,
|
|
@@ -10459,7 +11012,7 @@ var zPlanItems2 = object({
|
|
|
10459
11012
|
entries: requiredDefaultOnError(vecSkipError(zPlanEntry2), () => []),
|
|
10460
11013
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10461
11014
|
});
|
|
10462
|
-
var
|
|
11015
|
+
var zPlanMarkdown2 = object({
|
|
10463
11016
|
planId: zPlanId2,
|
|
10464
11017
|
content: string2(),
|
|
10465
11018
|
path: defaultOnError(string2().nullish(), () => void 0),
|
|
@@ -10469,7 +11022,7 @@ var zPlanUpdateContent2 = union([
|
|
|
10469
11022
|
zPlanItems2.and(object({
|
|
10470
11023
|
type: literal("items")
|
|
10471
11024
|
})),
|
|
10472
|
-
|
|
11025
|
+
zPlanMarkdown2.and(object({
|
|
10473
11026
|
type: literal("markdown")
|
|
10474
11027
|
}))
|
|
10475
11028
|
]);
|
|
@@ -10477,7 +11030,7 @@ var zPlanUpdate2 = object({
|
|
|
10477
11030
|
plan: zPlanUpdateContent2,
|
|
10478
11031
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10479
11032
|
});
|
|
10480
|
-
var
|
|
11033
|
+
var zPlanRemoved2 = object({
|
|
10481
11034
|
planId: zPlanId2,
|
|
10482
11035
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10483
11036
|
});
|
|
@@ -10552,12 +11105,12 @@ var zCompactionSummaryChunk2 = object({
|
|
|
10552
11105
|
content: zContentBlock2,
|
|
10553
11106
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10554
11107
|
});
|
|
10555
|
-
var
|
|
11108
|
+
var zPromptSuggestion2 = object({
|
|
10556
11109
|
prompt: array(zContentBlock2).min(1),
|
|
10557
11110
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10558
11111
|
});
|
|
10559
|
-
var
|
|
10560
|
-
suggestions: vecSkipError(
|
|
11112
|
+
var zPromptSuggestionsUpdate2 = object({
|
|
11113
|
+
suggestions: vecSkipError(zPromptSuggestion2),
|
|
10561
11114
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10562
11115
|
});
|
|
10563
11116
|
var zSessionCancelCapabilities2 = object({
|
|
@@ -10606,7 +11159,7 @@ var zIdleStateUpdate2 = defaultOnErrorOptionalStringTag(preserveCustomPayload(in
|
|
|
10606
11159
|
stopReason: _null3().optional()
|
|
10607
11160
|
})
|
|
10608
11161
|
]), object({
|
|
10609
|
-
usage: defaultOnError(
|
|
11162
|
+
usage: defaultOnError(zUsage2.nullish(), () => void 0),
|
|
10610
11163
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0),
|
|
10611
11164
|
stopReason: defaultOnError(string2().nullish(), () => void 0)
|
|
10612
11165
|
})), "stopReason", [
|
|
@@ -10686,7 +11239,7 @@ var zSessionUpdate2 = union([
|
|
|
10686
11239
|
zPlanUpdate2.and(object({
|
|
10687
11240
|
sessionUpdate: literal("plan_update")
|
|
10688
11241
|
})),
|
|
10689
|
-
|
|
11242
|
+
zPlanRemoved2.and(object({
|
|
10690
11243
|
sessionUpdate: literal("plan_removed")
|
|
10691
11244
|
})),
|
|
10692
11245
|
zAvailableCommandsUpdate2.and(object({
|
|
@@ -10713,7 +11266,7 @@ var zSessionUpdate2 = union([
|
|
|
10713
11266
|
zCompactionSummaryChunk2.and(object({
|
|
10714
11267
|
sessionUpdate: literal("compaction_summary_chunk")
|
|
10715
11268
|
})),
|
|
10716
|
-
|
|
11269
|
+
zPromptSuggestionsUpdate2.and(object({
|
|
10717
11270
|
sessionUpdate: literal("prompt_suggestions_update")
|
|
10718
11271
|
})),
|
|
10719
11272
|
zSubagentUpdate2.and(object({
|
|
@@ -10735,9 +11288,9 @@ var zCompleteElicitationNotification2 = object({
|
|
|
10735
11288
|
elicitationId: zElicitationId2,
|
|
10736
11289
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10737
11290
|
});
|
|
10738
|
-
var
|
|
10739
|
-
state:
|
|
10740
|
-
accounts: defaultOnError(vecSkipError(
|
|
11291
|
+
var zAuthStatusUpdateNotification2 = object({
|
|
11292
|
+
state: zAuthState2,
|
|
11293
|
+
accounts: defaultOnError(vecSkipError(zAuthAccount2).optional(), () => []),
|
|
10741
11294
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10742
11295
|
});
|
|
10743
11296
|
var zExtNotification2 = unknown();
|
|
@@ -10746,7 +11299,7 @@ var zAgentNotification2 = object({
|
|
|
10746
11299
|
params: union([
|
|
10747
11300
|
zSessionNotification,
|
|
10748
11301
|
zCompleteElicitationNotification2,
|
|
10749
|
-
|
|
11302
|
+
zAuthStatusUpdateNotification2,
|
|
10750
11303
|
zExtNotification2
|
|
10751
11304
|
]).nullish()
|
|
10752
11305
|
});
|
|
@@ -10764,26 +11317,26 @@ var zSessionConfigOptionsCapabilities = object({
|
|
|
10764
11317
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10765
11318
|
});
|
|
10766
11319
|
var zNoticeCapabilities = record(string2(), unknown());
|
|
10767
|
-
var
|
|
11320
|
+
var zPromptSuggestionsImageCapabilities2 = object({
|
|
10768
11321
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10769
11322
|
});
|
|
10770
|
-
var
|
|
11323
|
+
var zPromptSuggestionsAudioCapabilities2 = object({
|
|
10771
11324
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10772
11325
|
});
|
|
10773
|
-
var
|
|
11326
|
+
var zPromptSuggestionsEmbeddedContextCapabilities2 = object({
|
|
10774
11327
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10775
11328
|
});
|
|
10776
|
-
var
|
|
10777
|
-
image: defaultOnError(
|
|
10778
|
-
audio: defaultOnError(
|
|
10779
|
-
embeddedContext: defaultOnError(
|
|
11329
|
+
var zPromptSuggestionsCapabilities2 = object({
|
|
11330
|
+
image: defaultOnError(zPromptSuggestionsImageCapabilities2.nullish(), () => void 0),
|
|
11331
|
+
audio: defaultOnError(zPromptSuggestionsAudioCapabilities2.nullish(), () => void 0),
|
|
11332
|
+
embeddedContext: defaultOnError(zPromptSuggestionsEmbeddedContextCapabilities2.nullish(), () => void 0),
|
|
10780
11333
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10781
11334
|
});
|
|
10782
|
-
var
|
|
11335
|
+
var zClientSessionCapabilities2 = object({
|
|
10783
11336
|
compaction: defaultOnError(zCompactionCapabilities.nullish(), () => void 0),
|
|
10784
11337
|
configOptions: defaultOnError(zSessionConfigOptionsCapabilities.nullish(), () => void 0),
|
|
10785
11338
|
notices: defaultOnError(zNoticeCapabilities.nullish(), () => void 0),
|
|
10786
|
-
promptSuggestions: defaultOnError(
|
|
11339
|
+
promptSuggestions: defaultOnError(zPromptSuggestionsCapabilities2.nullish(), () => void 0),
|
|
10787
11340
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10788
11341
|
});
|
|
10789
11342
|
var zSubagentCapabilities = object({
|
|
@@ -10810,7 +11363,7 @@ var zElicitationCapabilities2 = object({
|
|
|
10810
11363
|
var zClientCapabilities2 = object({
|
|
10811
11364
|
fs: defaultOnError(zFileSystemCapabilities.optional().default({ readTextFile: false, writeTextFile: false }), () => ({ readTextFile: false, writeTextFile: false })),
|
|
10812
11365
|
terminal: defaultOnError(boolean2().optional().default(false), () => false),
|
|
10813
|
-
session: defaultOnError(
|
|
11366
|
+
session: defaultOnError(zClientSessionCapabilities2.nullish(), () => void 0),
|
|
10814
11367
|
subagents: defaultOnError(zSubagentCapabilities.nullish(), () => void 0),
|
|
10815
11368
|
plan: defaultOnError(zPlanCapabilities.nullish(), () => void 0),
|
|
10816
11369
|
auth: defaultOnError(zAuthCapabilities.optional().default({ terminal: false }), () => ({ terminal: false })),
|
|
@@ -10835,24 +11388,24 @@ var zAuthenticateRequest = object({
|
|
|
10835
11388
|
methodId: zAuthMethodId2,
|
|
10836
11389
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10837
11390
|
});
|
|
10838
|
-
var
|
|
11391
|
+
var zListProvidersRequest2 = object({
|
|
10839
11392
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10840
11393
|
});
|
|
10841
|
-
var
|
|
10842
|
-
providerId:
|
|
10843
|
-
apiType:
|
|
11394
|
+
var zSetProviderRequest2 = object({
|
|
11395
|
+
providerId: zProviderId2,
|
|
11396
|
+
apiType: zLlmProtocol2,
|
|
10844
11397
|
baseUrl: string2(),
|
|
10845
11398
|
headers: record(string2(), string2()).optional(),
|
|
10846
11399
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10847
11400
|
});
|
|
10848
|
-
var
|
|
10849
|
-
providerId:
|
|
11401
|
+
var zDisableProviderRequest2 = object({
|
|
11402
|
+
providerId: zProviderId2,
|
|
10850
11403
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10851
11404
|
});
|
|
10852
11405
|
var zLogoutRequest = object({
|
|
10853
11406
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10854
11407
|
});
|
|
10855
|
-
var
|
|
11408
|
+
var zAuthStatusRequest2 = object({
|
|
10856
11409
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10857
11410
|
});
|
|
10858
11411
|
var zHttpHeader2 = object({
|
|
@@ -10872,9 +11425,9 @@ var zMcpServerSse = object({
|
|
|
10872
11425
|
headers: defaultOnNull(array(zHttpHeader2), () => []),
|
|
10873
11426
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10874
11427
|
});
|
|
10875
|
-
var
|
|
11428
|
+
var zMcpServerAcp2 = object({
|
|
10876
11429
|
name: string2(),
|
|
10877
|
-
serverId:
|
|
11430
|
+
serverId: zMcpServerAcpId2,
|
|
10878
11431
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10879
11432
|
});
|
|
10880
11433
|
var zMcpServerStdio2 = object({
|
|
@@ -10888,1839 +11441,50 @@ var zMcpServer2 = union([
|
|
|
10888
11441
|
zMcpServerHttp2.and(object({
|
|
10889
11442
|
type: literal("http")
|
|
10890
11443
|
})),
|
|
10891
|
-
zMcpServerSse.and(object({
|
|
10892
|
-
type: literal("sse")
|
|
10893
|
-
})),
|
|
10894
|
-
zMcpServerAcp.and(object({
|
|
10895
|
-
type: literal("acp")
|
|
10896
|
-
})),
|
|
10897
|
-
zMcpServerStdio2
|
|
10898
|
-
]);
|
|
10899
|
-
var zSystemPromptMode2 = union([
|
|
10900
|
-
literal("append"),
|
|
10901
|
-
literal("override"),
|
|
10902
|
-
string2()
|
|
10903
|
-
]);
|
|
10904
|
-
var zSystemPrompt2 = object({
|
|
10905
|
-
mode: zSystemPromptMode2,
|
|
10906
|
-
content: array(zContentBlock2),
|
|
10907
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10908
|
-
});
|
|
10909
|
-
var zInitialSessionConfigOption = intersection(union([
|
|
10910
|
-
object({
|
|
10911
|
-
type: literal("boolean"),
|
|
10912
|
-
value: boolean2()
|
|
10913
|
-
}),
|
|
10914
|
-
object({
|
|
10915
|
-
value: zSessionConfigValueId2
|
|
10916
|
-
})
|
|
10917
|
-
]), object({
|
|
10918
|
-
configId: zSessionConfigId2,
|
|
10919
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10920
|
-
}));
|
|
10921
|
-
var zNewSessionRequest2 = object({
|
|
10922
|
-
cwd: string2(),
|
|
10923
|
-
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
10924
|
-
mcpServers: defaultOnNull(array(zMcpServer2), () => []),
|
|
10925
|
-
systemPrompt: zSystemPrompt2.nullish(),
|
|
10926
|
-
configOptions: defaultOnNull(array(zInitialSessionConfigOption), () => []).optional(),
|
|
10927
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10928
|
-
});
|
|
10929
|
-
var zLoadSessionRequest = object({
|
|
10930
|
-
mcpServers: defaultOnNull(array(zMcpServer2), () => []),
|
|
10931
|
-
cwd: string2(),
|
|
10932
|
-
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
10933
|
-
sessionId: zSessionId2,
|
|
10934
|
-
systemPrompt: zSystemPrompt2.nullish(),
|
|
10935
|
-
configOptions: defaultOnNull(array(zInitialSessionConfigOption), () => []).optional(),
|
|
10936
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10937
|
-
});
|
|
10938
|
-
var zSessionArchiveFilter = union([
|
|
10939
|
-
literal("exclude"),
|
|
10940
|
-
literal("include"),
|
|
10941
|
-
literal("only"),
|
|
10942
|
-
string2()
|
|
10943
|
-
]);
|
|
10944
|
-
var zListSessionsRequest2 = object({
|
|
10945
|
-
cwd: string2().nullish(),
|
|
10946
|
-
cursor: string2().nullish(),
|
|
10947
|
-
archived: zSessionArchiveFilter.nullish(),
|
|
10948
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10949
|
-
});
|
|
10950
|
-
var zDeleteSessionRequest2 = object({
|
|
10951
|
-
sessionId: zSessionId2,
|
|
10952
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10953
|
-
});
|
|
10954
|
-
var zForkSessionRequest = object({
|
|
10955
|
-
sessionId: zSessionId2,
|
|
10956
|
-
cwd: string2(),
|
|
10957
|
-
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
10958
|
-
mcpServers: defaultOnNull(array(zMcpServer2), () => []).optional(),
|
|
10959
|
-
systemPrompt: zSystemPrompt2.nullish(),
|
|
10960
|
-
configOptions: defaultOnNull(array(zInitialSessionConfigOption), () => []).optional(),
|
|
10961
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10962
|
-
});
|
|
10963
|
-
var zArchiveSessionRequest = object({
|
|
10964
|
-
sessionId: zSessionId2,
|
|
10965
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10966
|
-
});
|
|
10967
|
-
var zUnarchiveSessionRequest = object({
|
|
10968
|
-
sessionId: zSessionId2,
|
|
10969
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10970
|
-
});
|
|
10971
|
-
var zSessionStatusRequest = object({
|
|
10972
|
-
sessionId: zSessionId2,
|
|
10973
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10974
|
-
});
|
|
10975
|
-
var zSessionOptionsRequest = object({
|
|
10976
|
-
cwd: string2(),
|
|
10977
|
-
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
10978
|
-
sessionId: zSessionId2.nullish(),
|
|
10979
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10980
|
-
});
|
|
10981
|
-
var zSetSessionTitleRequest = object({
|
|
10982
|
-
sessionId: zSessionId2,
|
|
10983
|
-
title: string2(),
|
|
10984
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10985
|
-
});
|
|
10986
|
-
var zResumeSessionRequest2 = object({
|
|
10987
|
-
sessionId: zSessionId2,
|
|
10988
|
-
cwd: string2(),
|
|
10989
|
-
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
10990
|
-
mcpServers: defaultOnNull(array(zMcpServer2), () => []).optional(),
|
|
10991
|
-
systemPrompt: zSystemPrompt2.nullish(),
|
|
10992
|
-
configOptions: defaultOnNull(array(zInitialSessionConfigOption), () => []).optional(),
|
|
10993
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10994
|
-
});
|
|
10995
|
-
var zCloseSessionRequest2 = object({
|
|
10996
|
-
sessionId: zSessionId2,
|
|
10997
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
10998
|
-
});
|
|
10999
|
-
var zSetSessionModeRequest = object({
|
|
11000
|
-
sessionId: zSessionId2,
|
|
11001
|
-
modeId: zSessionModeId,
|
|
11002
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11003
|
-
});
|
|
11004
|
-
var zSetSessionConfigOptionRequest2 = intersection(union([
|
|
11005
|
-
object({
|
|
11006
|
-
type: literal("boolean"),
|
|
11007
|
-
value: boolean2()
|
|
11008
|
-
}),
|
|
11009
|
-
object({
|
|
11010
|
-
value: zSessionConfigValueId2
|
|
11011
|
-
})
|
|
11012
|
-
]), object({
|
|
11013
|
-
sessionId: zSessionId2,
|
|
11014
|
-
configId: zSessionConfigId2,
|
|
11015
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11016
|
-
}));
|
|
11017
|
-
var zPromptRequest2 = object({
|
|
11018
|
-
sessionId: zSessionId2,
|
|
11019
|
-
prompt: array(zContentBlock2),
|
|
11020
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11021
|
-
});
|
|
11022
|
-
var zClientRequest2 = object({
|
|
11023
|
-
id: zRequestId2,
|
|
11024
|
-
method: string2(),
|
|
11025
|
-
params: union([
|
|
11026
|
-
zInitializeRequest2,
|
|
11027
|
-
zAuthenticateRequest,
|
|
11028
|
-
zListProvidersRequest,
|
|
11029
|
-
zSetProviderRequest,
|
|
11030
|
-
zDisableProviderRequest,
|
|
11031
|
-
zLogoutRequest,
|
|
11032
|
-
zAuthStatusRequest,
|
|
11033
|
-
zNewSessionRequest2,
|
|
11034
|
-
zLoadSessionRequest,
|
|
11035
|
-
zListSessionsRequest2,
|
|
11036
|
-
zDeleteSessionRequest2,
|
|
11037
|
-
zForkSessionRequest,
|
|
11038
|
-
zArchiveSessionRequest,
|
|
11039
|
-
zUnarchiveSessionRequest,
|
|
11040
|
-
zSessionStatusRequest,
|
|
11041
|
-
zSessionOptionsRequest,
|
|
11042
|
-
zSetSessionTitleRequest,
|
|
11043
|
-
zResumeSessionRequest2,
|
|
11044
|
-
zCloseSessionRequest2,
|
|
11045
|
-
zSetSessionModeRequest,
|
|
11046
|
-
zSetSessionConfigOptionRequest2,
|
|
11047
|
-
zPromptRequest2,
|
|
11048
|
-
zExtRequest2
|
|
11049
|
-
]).nullish()
|
|
11050
|
-
});
|
|
11051
|
-
var zWriteTextFileResponse = object({
|
|
11052
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11053
|
-
});
|
|
11054
|
-
var zReadTextFileResponse = object({
|
|
11055
|
-
content: string2(),
|
|
11056
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11057
|
-
});
|
|
11058
|
-
var zSelectedPermissionOutcome2 = object({
|
|
11059
|
-
optionId: zPermissionOptionId2,
|
|
11060
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11061
|
-
});
|
|
11062
|
-
var zRequestPermissionOutcome2 = union([
|
|
11063
|
-
object({
|
|
11064
|
-
outcome: literal("cancelled")
|
|
11065
|
-
}),
|
|
11066
|
-
zSelectedPermissionOutcome2.and(object({
|
|
11067
|
-
outcome: literal("selected")
|
|
11068
|
-
}))
|
|
11069
|
-
]);
|
|
11070
|
-
var zRequestPermissionResponse2 = object({
|
|
11071
|
-
outcome: zRequestPermissionOutcome2,
|
|
11072
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11073
|
-
});
|
|
11074
|
-
var zCreateTerminalResponse = object({
|
|
11075
|
-
terminalId: zTerminalId2,
|
|
11076
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11077
|
-
});
|
|
11078
|
-
var zTerminalExitStatus2 = object({
|
|
11079
|
-
exitCode: defaultOnError(int().gte(0).max(4294967295, {
|
|
11080
|
-
error: "Invalid value: Expected uint32 to be <= 4294967295"
|
|
11081
|
-
}).nullish(), () => void 0),
|
|
11082
|
-
signal: defaultOnError(string2().nullish(), () => void 0),
|
|
11083
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11084
|
-
});
|
|
11085
|
-
var zTerminalOutputResponse = object({
|
|
11086
|
-
output: string2(),
|
|
11087
|
-
truncated: boolean2(),
|
|
11088
|
-
exitStatus: defaultOnError(zTerminalExitStatus2.nullish(), () => void 0),
|
|
11089
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11090
|
-
});
|
|
11091
|
-
var zReleaseTerminalResponse = object({
|
|
11092
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11093
|
-
});
|
|
11094
|
-
var zWaitForTerminalExitResponse = object({
|
|
11095
|
-
exitCode: defaultOnError(int().gte(0).max(4294967295, {
|
|
11096
|
-
error: "Invalid value: Expected uint32 to be <= 4294967295"
|
|
11097
|
-
}).nullish(), () => void 0),
|
|
11098
|
-
signal: defaultOnError(string2().nullish(), () => void 0),
|
|
11099
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11100
|
-
});
|
|
11101
|
-
var zKillTerminalResponse = object({
|
|
11102
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11103
|
-
});
|
|
11104
|
-
var zElicitationContentValue2 = union([
|
|
11105
|
-
string2(),
|
|
11106
|
-
wideInt(),
|
|
11107
|
-
number2(),
|
|
11108
|
-
boolean2(),
|
|
11109
|
-
array(string2())
|
|
11110
|
-
]);
|
|
11111
|
-
var zElicitationAcceptAction2 = object({
|
|
11112
|
-
content: record(string2(), zElicitationContentValue2).nullish()
|
|
11113
|
-
});
|
|
11114
|
-
var zCreateElicitationResponse2 = preserveCustomPayload(intersection(union([
|
|
11115
|
-
zElicitationAcceptAction2.and(object({
|
|
11116
|
-
action: literal("accept")
|
|
11117
|
-
})),
|
|
11118
|
-
object({
|
|
11119
|
-
action: literal("decline")
|
|
11120
|
-
}),
|
|
11121
|
-
object({
|
|
11122
|
-
action: literal("cancel")
|
|
11123
|
-
}),
|
|
11124
|
-
excludeKnownTags(object({
|
|
11125
|
-
action: string2()
|
|
11126
|
-
}), "action", ["accept", "cancel", "decline"])
|
|
11127
|
-
]), object({
|
|
11128
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11129
|
-
})), "action", ["accept", "cancel", "decline"]);
|
|
11130
|
-
var zMcpError = looseObject({
|
|
11131
|
-
code: int().min(-2147483648, {
|
|
11132
|
-
error: "Invalid value: Expected int32 to be >= -2147483648"
|
|
11133
|
-
}).max(2147483647, {
|
|
11134
|
-
error: "Invalid value: Expected int32 to be <= 2147483647"
|
|
11135
|
-
}),
|
|
11136
|
-
message: string2(),
|
|
11137
|
-
data: unknown().optional()
|
|
11138
|
-
});
|
|
11139
|
-
var zMessageMcpResponse = union([
|
|
11140
|
-
object({
|
|
11141
|
-
result: unknown(),
|
|
11142
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11143
|
-
}),
|
|
11144
|
-
object({
|
|
11145
|
-
error: zMcpError,
|
|
11146
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11147
|
-
})
|
|
11148
|
-
]);
|
|
11149
|
-
var zClientResponse2 = union([
|
|
11150
|
-
object({
|
|
11151
|
-
id: zRequestId2,
|
|
11152
|
-
result: union([
|
|
11153
|
-
zWriteTextFileResponse,
|
|
11154
|
-
zReadTextFileResponse,
|
|
11155
|
-
zRequestPermissionResponse2,
|
|
11156
|
-
zCreateTerminalResponse,
|
|
11157
|
-
zTerminalOutputResponse,
|
|
11158
|
-
zReleaseTerminalResponse,
|
|
11159
|
-
zWaitForTerminalExitResponse,
|
|
11160
|
-
zKillTerminalResponse,
|
|
11161
|
-
zCreateElicitationResponse2,
|
|
11162
|
-
zMessageMcpResponse,
|
|
11163
|
-
zExtResponse2
|
|
11164
|
-
])
|
|
11165
|
-
}),
|
|
11166
|
-
object({
|
|
11167
|
-
id: zRequestId2,
|
|
11168
|
-
error: zError2
|
|
11169
|
-
})
|
|
11170
|
-
]);
|
|
11171
|
-
var zCancelNotification = object({
|
|
11172
|
-
sessionId: zSessionId2,
|
|
11173
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11174
|
-
});
|
|
11175
|
-
var zMessageMcpNotification = object({
|
|
11176
|
-
serverId: zMcpServerAcpId,
|
|
11177
|
-
requestId: zMcpRequestId,
|
|
11178
|
-
method: string2(),
|
|
11179
|
-
params: record(string2(), unknown()).nullish(),
|
|
11180
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11181
|
-
});
|
|
11182
|
-
var zClientNotification2 = object({
|
|
11183
|
-
method: string2(),
|
|
11184
|
-
params: union([zCancelNotification, zMessageMcpNotification, zExtNotification2]).nullish()
|
|
11185
|
-
});
|
|
11186
|
-
var zCancelRequestNotification2 = object({
|
|
11187
|
-
requestId: zRequestId2,
|
|
11188
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11189
|
-
});
|
|
11190
|
-
var zInitializeProxyRequest = zInitializeRequest2;
|
|
11191
|
-
var zProxySuccessorRequest = object({
|
|
11192
|
-
method: string2(),
|
|
11193
|
-
params: unknown().optional(),
|
|
11194
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11195
|
-
});
|
|
11196
|
-
var zProxyRequest = object({
|
|
11197
|
-
id: zRequestId2,
|
|
11198
|
-
method: string2(),
|
|
11199
|
-
params: union([zInitializeProxyRequest, zProxySuccessorRequest]).nullish()
|
|
11200
|
-
});
|
|
11201
|
-
var zInitializeProxyResponse = zInitializeResponse2;
|
|
11202
|
-
var zProxySuccessorResponse = unknown();
|
|
11203
|
-
var zProxyResponse = union([
|
|
11204
|
-
object({
|
|
11205
|
-
id: zRequestId2,
|
|
11206
|
-
result: union([zInitializeProxyResponse, zProxySuccessorResponse])
|
|
11207
|
-
}),
|
|
11208
|
-
object({
|
|
11209
|
-
id: zRequestId2,
|
|
11210
|
-
error: zError2
|
|
11211
|
-
})
|
|
11212
|
-
]);
|
|
11213
|
-
var zProxySuccessorNotification = object({
|
|
11214
|
-
method: string2(),
|
|
11215
|
-
params: unknown().optional(),
|
|
11216
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11217
|
-
});
|
|
11218
|
-
var zProxyNotification = object({
|
|
11219
|
-
method: string2(),
|
|
11220
|
-
params: zProxySuccessorNotification.nullish()
|
|
11221
|
-
});
|
|
11222
|
-
|
|
11223
|
-
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/v2/unstable/schema/zod.gen.js
|
|
11224
|
-
var zRequestId3 = union([wideInt(), string2()]);
|
|
11225
|
-
var zSessionId3 = string2();
|
|
11226
|
-
var zToolCallId3 = string2();
|
|
11227
|
-
var zToolKind3 = union([
|
|
11228
|
-
literal("read"),
|
|
11229
|
-
literal("edit"),
|
|
11230
|
-
literal("delete"),
|
|
11231
|
-
literal("move"),
|
|
11232
|
-
literal("search"),
|
|
11233
|
-
literal("execute"),
|
|
11234
|
-
literal("think"),
|
|
11235
|
-
literal("fetch"),
|
|
11236
|
-
literal("switch_mode"),
|
|
11237
|
-
literal("other"),
|
|
11238
|
-
string2()
|
|
11239
|
-
]);
|
|
11240
|
-
var zToolCallStatus3 = union([
|
|
11241
|
-
literal("pending"),
|
|
11242
|
-
literal("in_progress"),
|
|
11243
|
-
literal("paused"),
|
|
11244
|
-
literal("completed"),
|
|
11245
|
-
literal("failed"),
|
|
11246
|
-
literal("cancelled"),
|
|
11247
|
-
string2()
|
|
11248
|
-
]);
|
|
11249
|
-
var zRole3 = union([
|
|
11250
|
-
literal("assistant"),
|
|
11251
|
-
literal("user"),
|
|
11252
|
-
string2()
|
|
11253
|
-
]);
|
|
11254
|
-
var zAnnotations3 = object({
|
|
11255
|
-
audience: defaultOnError(vecSkipError(zRole3).nullish(), () => void 0),
|
|
11256
|
-
lastModified: defaultOnError(string2().nullish(), () => void 0),
|
|
11257
|
-
priority: defaultOnError(number2().gte(0).lte(1).nullish(), () => void 0),
|
|
11258
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11259
|
-
});
|
|
11260
|
-
var zTextContent3 = object({
|
|
11261
|
-
text: string2(),
|
|
11262
|
-
annotations: defaultOnError(zAnnotations3.nullish(), () => void 0),
|
|
11263
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11264
|
-
});
|
|
11265
|
-
var zMediaType2 = string2();
|
|
11266
|
-
var zImageContent3 = object({
|
|
11267
|
-
data: string2(),
|
|
11268
|
-
mimeType: zMediaType2,
|
|
11269
|
-
uri: defaultOnError(url().nullish(), () => void 0),
|
|
11270
|
-
annotations: defaultOnError(zAnnotations3.nullish(), () => void 0),
|
|
11271
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11272
|
-
});
|
|
11273
|
-
var zAudioContent3 = object({
|
|
11274
|
-
data: string2(),
|
|
11275
|
-
mimeType: zMediaType2,
|
|
11276
|
-
annotations: defaultOnError(zAnnotations3.nullish(), () => void 0),
|
|
11277
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11278
|
-
});
|
|
11279
|
-
var zIconTheme2 = union([
|
|
11280
|
-
literal("light"),
|
|
11281
|
-
literal("dark"),
|
|
11282
|
-
string2()
|
|
11283
|
-
]);
|
|
11284
|
-
var zIcon2 = object({
|
|
11285
|
-
src: url(),
|
|
11286
|
-
mimeType: defaultOnError(zMediaType2.nullish(), () => void 0),
|
|
11287
|
-
sizes: defaultOnError(vecSkipError(string2()).nullish(), () => void 0),
|
|
11288
|
-
theme: defaultOnError(zIconTheme2.nullish(), () => void 0),
|
|
11289
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11290
|
-
});
|
|
11291
|
-
var zResourceLink3 = object({
|
|
11292
|
-
name: string2(),
|
|
11293
|
-
uri: url(),
|
|
11294
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11295
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11296
|
-
icons: defaultOnError(vecSkipError(zIcon2).nullish(), () => void 0),
|
|
11297
|
-
mimeType: defaultOnError(zMediaType2.nullish(), () => void 0),
|
|
11298
|
-
size: defaultOnError(wideInt().gte(0).nullish(), () => void 0),
|
|
11299
|
-
annotations: defaultOnError(zAnnotations3.nullish(), () => void 0),
|
|
11300
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11301
|
-
});
|
|
11302
|
-
var zTextResourceContents3 = object({
|
|
11303
|
-
text: string2(),
|
|
11304
|
-
uri: url(),
|
|
11305
|
-
mimeType: defaultOnError(zMediaType2.nullish(), () => void 0),
|
|
11306
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11307
|
-
});
|
|
11308
|
-
var zBlobResourceContents3 = object({
|
|
11309
|
-
blob: string2(),
|
|
11310
|
-
uri: url(),
|
|
11311
|
-
mimeType: defaultOnError(zMediaType2.nullish(), () => void 0),
|
|
11312
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11313
|
-
});
|
|
11314
|
-
var zEmbeddedResourceResource3 = union([
|
|
11315
|
-
zTextResourceContents3,
|
|
11316
|
-
zBlobResourceContents3
|
|
11317
|
-
]);
|
|
11318
|
-
var zEmbeddedResource3 = object({
|
|
11319
|
-
resource: zEmbeddedResourceResource3,
|
|
11320
|
-
annotations: defaultOnError(zAnnotations3.nullish(), () => void 0),
|
|
11321
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11322
|
-
});
|
|
11323
|
-
var zSkillReference = object({
|
|
11324
|
-
name: string2(),
|
|
11325
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11326
|
-
});
|
|
11327
|
-
var zContentBlock3 = preserveCustomPayload(union([
|
|
11328
|
-
zTextContent3.and(object({
|
|
11329
|
-
type: literal("text")
|
|
11330
|
-
})),
|
|
11331
|
-
zImageContent3.and(object({
|
|
11332
|
-
type: literal("image")
|
|
11333
|
-
})),
|
|
11334
|
-
zAudioContent3.and(object({
|
|
11335
|
-
type: literal("audio")
|
|
11336
|
-
})),
|
|
11337
|
-
zResourceLink3.and(object({
|
|
11338
|
-
type: literal("resource_link")
|
|
11339
|
-
})),
|
|
11340
|
-
zEmbeddedResource3.and(object({
|
|
11341
|
-
type: literal("resource")
|
|
11342
|
-
})),
|
|
11343
|
-
zSkillReference.and(object({
|
|
11344
|
-
type: literal("skill")
|
|
11345
|
-
})),
|
|
11346
|
-
excludeKnownTags(object({
|
|
11347
|
-
type: string2()
|
|
11348
|
-
}), "type", ["audio", "image", "resource", "resource_link", "skill", "text"])
|
|
11349
|
-
]), "type", ["audio", "image", "resource", "resource_link", "skill", "text"]);
|
|
11350
|
-
var zContent3 = object({
|
|
11351
|
-
content: zContentBlock3,
|
|
11352
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11353
|
-
});
|
|
11354
|
-
var zDiffFileType2 = union([
|
|
11355
|
-
literal("text"),
|
|
11356
|
-
literal("binary"),
|
|
11357
|
-
literal("directory"),
|
|
11358
|
-
literal("symlink"),
|
|
11359
|
-
string2()
|
|
11360
|
-
]);
|
|
11361
|
-
var zAbsolutePath2 = string2();
|
|
11362
|
-
var zDiffPathChange2 = object({
|
|
11363
|
-
path: zAbsolutePath2
|
|
11364
|
-
});
|
|
11365
|
-
var zDiffPathPairChange2 = object({
|
|
11366
|
-
oldPath: zAbsolutePath2,
|
|
11367
|
-
path: zAbsolutePath2
|
|
11368
|
-
});
|
|
11369
|
-
var zDiffChange2 = preserveCustomPayload(intersection(union([
|
|
11370
|
-
zDiffPathChange2.and(object({
|
|
11371
|
-
operation: literal("add")
|
|
11372
|
-
})),
|
|
11373
|
-
zDiffPathChange2.and(object({
|
|
11374
|
-
operation: literal("delete")
|
|
11375
|
-
})),
|
|
11376
|
-
zDiffPathChange2.and(object({
|
|
11377
|
-
operation: literal("modify")
|
|
11378
|
-
})),
|
|
11379
|
-
zDiffPathPairChange2.and(object({
|
|
11380
|
-
operation: literal("move")
|
|
11381
|
-
})),
|
|
11382
|
-
zDiffPathPairChange2.and(object({
|
|
11383
|
-
operation: literal("copy")
|
|
11384
|
-
})),
|
|
11385
|
-
excludeKnownTags(object({
|
|
11386
|
-
operation: string2()
|
|
11387
|
-
}), "operation", ["add", "copy", "delete", "modify", "move"])
|
|
11388
|
-
]), object({
|
|
11389
|
-
fileType: defaultOnError(zDiffFileType2.nullish(), () => void 0),
|
|
11390
|
-
mimeType: defaultOnError(zMediaType2.nullish(), () => void 0),
|
|
11391
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11392
|
-
})), "operation", ["add", "copy", "delete", "modify", "move"]);
|
|
11393
|
-
var zDiffPatchFormat2 = union([literal("git_patch"), string2()]);
|
|
11394
|
-
var zDiffPatch2 = object({
|
|
11395
|
-
format: zDiffPatchFormat2,
|
|
11396
|
-
text: string2(),
|
|
11397
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11398
|
-
});
|
|
11399
|
-
var zDiff3 = object({
|
|
11400
|
-
changes: vecSkipError(zDiffChange2),
|
|
11401
|
-
patch: defaultOnError(zDiffPatch2.nullish(), () => void 0),
|
|
11402
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11403
|
-
});
|
|
11404
|
-
var zTerminalId3 = string2();
|
|
11405
|
-
var zTerminal3 = object({
|
|
11406
|
-
terminalId: zTerminalId3,
|
|
11407
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11408
|
-
});
|
|
11409
|
-
var zSessionReference3 = object({
|
|
11410
|
-
sessionId: zSessionId3,
|
|
11411
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11412
|
-
});
|
|
11413
|
-
var zToolCallContent3 = preserveCustomPayload(union([
|
|
11414
|
-
zContent3.and(object({
|
|
11415
|
-
type: literal("content")
|
|
11416
|
-
})),
|
|
11417
|
-
zDiff3.and(object({
|
|
11418
|
-
type: literal("diff")
|
|
11419
|
-
})),
|
|
11420
|
-
zTerminal3.and(object({
|
|
11421
|
-
type: literal("terminal")
|
|
11422
|
-
})),
|
|
11423
|
-
zSessionReference3.and(object({
|
|
11424
|
-
type: literal("session")
|
|
11425
|
-
})),
|
|
11426
|
-
excludeKnownTags(object({
|
|
11427
|
-
type: string2()
|
|
11428
|
-
}), "type", ["content", "diff", "session", "terminal"])
|
|
11429
|
-
]), "type", ["content", "diff", "session", "terminal"]);
|
|
11430
|
-
var zToolCallLocation3 = object({
|
|
11431
|
-
path: zAbsolutePath2,
|
|
11432
|
-
line: defaultOnError(int().gte(1).max(4294967295, {
|
|
11433
|
-
error: "Invalid value: Expected uint32 to be <= 4294967295"
|
|
11434
|
-
}).nullish(), () => void 0),
|
|
11435
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11436
|
-
});
|
|
11437
|
-
var zToolCallCancelCapabilities2 = object({
|
|
11438
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11439
|
-
});
|
|
11440
|
-
var zToolCallCapabilities2 = object({
|
|
11441
|
-
cancel: defaultOnError(zToolCallCancelCapabilities2.nullish(), () => void 0),
|
|
11442
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11443
|
-
});
|
|
11444
|
-
var zToolCallUpdate3 = object({
|
|
11445
|
-
toolCallId: zToolCallId3,
|
|
11446
|
-
name: defaultOnError(string2().nullish(), () => void 0),
|
|
11447
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11448
|
-
kind: defaultOnError(zToolKind3.nullish(), () => void 0),
|
|
11449
|
-
status: defaultOnError(zToolCallStatus3.nullish(), () => void 0),
|
|
11450
|
-
content: defaultOnError(vecSkipError(zToolCallContent3).nullish(), () => void 0),
|
|
11451
|
-
locations: defaultOnError(vecSkipError(zToolCallLocation3).nullish(), () => void 0),
|
|
11452
|
-
rawInput: defaultOnError(unknown().optional(), () => void 0),
|
|
11453
|
-
rawOutput: defaultOnError(unknown().optional(), () => void 0),
|
|
11454
|
-
capabilities: defaultOnError(zToolCallCapabilities2.nullish(), () => void 0),
|
|
11455
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11456
|
-
});
|
|
11457
|
-
var zToolCallPermissionSubject2 = object({
|
|
11458
|
-
toolCall: zToolCallUpdate3,
|
|
11459
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11460
|
-
});
|
|
11461
|
-
var zCommandPermissionSubject2 = object({
|
|
11462
|
-
command: string2(),
|
|
11463
|
-
cwd: zAbsolutePath2,
|
|
11464
|
-
toolCallId: defaultOnError(zToolCallId3.nullish(), () => void 0),
|
|
11465
|
-
terminalId: defaultOnError(zTerminalId3.nullish(), () => void 0),
|
|
11466
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11467
|
-
});
|
|
11468
|
-
var zRequestPermissionSubject2 = preserveCustomPayload(union([
|
|
11469
|
-
zToolCallPermissionSubject2.and(object({
|
|
11470
|
-
type: literal("tool_call")
|
|
11471
|
-
})),
|
|
11472
|
-
zCommandPermissionSubject2.and(object({
|
|
11473
|
-
type: literal("command")
|
|
11474
|
-
})),
|
|
11475
|
-
excludeKnownTags(object({
|
|
11476
|
-
type: string2()
|
|
11477
|
-
}), "type", ["command", "tool_call"])
|
|
11478
|
-
]), "type", ["command", "tool_call"]);
|
|
11479
|
-
var zPermissionOptionId3 = string2();
|
|
11480
|
-
var zPermissionOptionKind3 = union([
|
|
11481
|
-
literal("allow_once"),
|
|
11482
|
-
literal("allow_always"),
|
|
11483
|
-
literal("reject_once"),
|
|
11484
|
-
literal("reject_always"),
|
|
11485
|
-
string2()
|
|
11486
|
-
]);
|
|
11487
|
-
var zPermissionOption3 = object({
|
|
11488
|
-
optionId: zPermissionOptionId3,
|
|
11489
|
-
name: string2(),
|
|
11490
|
-
kind: zPermissionOptionKind3,
|
|
11491
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11492
|
-
});
|
|
11493
|
-
var zRequestPermissionRequest3 = object({
|
|
11494
|
-
sessionId: zSessionId3,
|
|
11495
|
-
title: string2(),
|
|
11496
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11497
|
-
subject: zRequestPermissionSubject2.nullish(),
|
|
11498
|
-
options: array(zPermissionOption3).min(1),
|
|
11499
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11500
|
-
});
|
|
11501
|
-
var zElicitationSessionScope3 = object({
|
|
11502
|
-
sessionId: zSessionId3,
|
|
11503
|
-
toolCallId: defaultOnError(zToolCallId3.nullish(), () => void 0)
|
|
11504
|
-
});
|
|
11505
|
-
var zElicitationRequestScope3 = object({
|
|
11506
|
-
requestId: zRequestId3
|
|
11507
|
-
});
|
|
11508
|
-
var zElicitationSchemaType3 = literal("object");
|
|
11509
|
-
var zStringFormat3 = union([
|
|
11510
|
-
literal("email"),
|
|
11511
|
-
literal("uri"),
|
|
11512
|
-
literal("date"),
|
|
11513
|
-
literal("date-time"),
|
|
11514
|
-
string2()
|
|
11515
|
-
]);
|
|
11516
|
-
var zEnumOption3 = object({
|
|
11517
|
-
const: string2(),
|
|
11518
|
-
title: string2(),
|
|
11519
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11520
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11521
|
-
});
|
|
11522
|
-
var zStringPropertySchema3 = object({
|
|
11523
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11524
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11525
|
-
minLength: int().gte(0).max(4294967295, {
|
|
11526
|
-
error: "Invalid value: Expected uint32 to be <= 4294967295"
|
|
11527
|
-
}).nullish(),
|
|
11528
|
-
maxLength: int().gte(0).max(4294967295, {
|
|
11529
|
-
error: "Invalid value: Expected uint32 to be <= 4294967295"
|
|
11530
|
-
}).nullish(),
|
|
11531
|
-
pattern: string2().nullish(),
|
|
11532
|
-
format: zStringFormat3.nullish(),
|
|
11533
|
-
default: defaultOnError(string2().nullish(), () => void 0),
|
|
11534
|
-
enum: array(string2()).min(1).nullish(),
|
|
11535
|
-
oneOf: array(zEnumOption3).min(1).nullish(),
|
|
11536
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11537
|
-
});
|
|
11538
|
-
var zNumberPropertySchema3 = object({
|
|
11539
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11540
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11541
|
-
minimum: number2().nullish(),
|
|
11542
|
-
maximum: number2().nullish(),
|
|
11543
|
-
default: defaultOnError(number2().nullish(), () => void 0),
|
|
11544
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11545
|
-
});
|
|
11546
|
-
var zIntegerPropertySchema3 = object({
|
|
11547
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11548
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11549
|
-
minimum: wideInt().nullish(),
|
|
11550
|
-
maximum: wideInt().nullish(),
|
|
11551
|
-
default: defaultOnError(wideInt().nullish(), () => void 0),
|
|
11552
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11553
|
-
});
|
|
11554
|
-
var zBooleanPropertySchema3 = object({
|
|
11555
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11556
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11557
|
-
default: defaultOnError(boolean2().nullish(), () => void 0),
|
|
11558
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11559
|
-
});
|
|
11560
|
-
var zStringMultiSelectItems3 = object({
|
|
11561
|
-
enum: array(string2()).min(1),
|
|
11562
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11563
|
-
});
|
|
11564
|
-
var zTitledMultiSelectItems3 = object({
|
|
11565
|
-
anyOf: array(zEnumOption3).min(1),
|
|
11566
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11567
|
-
});
|
|
11568
|
-
var zMultiSelectItems3 = preserveCustomPayload(union([
|
|
11569
|
-
zStringMultiSelectItems3.and(object({
|
|
11570
|
-
type: literal("string")
|
|
11571
|
-
})),
|
|
11572
|
-
excludeKnownTags(object({
|
|
11573
|
-
type: string2()
|
|
11574
|
-
}), "type", ["string"]),
|
|
11575
|
-
zTitledMultiSelectItems3
|
|
11576
|
-
]), "type", ["string"]);
|
|
11577
|
-
var zMultiSelectPropertySchema3 = object({
|
|
11578
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11579
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11580
|
-
minItems: wideInt().gte(0).nullish(),
|
|
11581
|
-
maxItems: wideInt().gte(0).nullish(),
|
|
11582
|
-
items: zMultiSelectItems3,
|
|
11583
|
-
default: defaultOnError(vecSkipError(string2()).nullish(), () => void 0),
|
|
11584
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11585
|
-
});
|
|
11586
|
-
var zElicitationPropertySchema3 = preserveCustomPayload(union([
|
|
11587
|
-
zStringPropertySchema3.and(object({
|
|
11588
|
-
type: literal("string")
|
|
11589
|
-
})),
|
|
11590
|
-
zNumberPropertySchema3.and(object({
|
|
11591
|
-
type: literal("number")
|
|
11592
|
-
})),
|
|
11593
|
-
zIntegerPropertySchema3.and(object({
|
|
11594
|
-
type: literal("integer")
|
|
11595
|
-
})),
|
|
11596
|
-
zBooleanPropertySchema3.and(object({
|
|
11597
|
-
type: literal("boolean")
|
|
11598
|
-
})),
|
|
11599
|
-
zMultiSelectPropertySchema3.and(object({
|
|
11600
|
-
type: literal("array")
|
|
11601
|
-
})),
|
|
11602
|
-
excludeKnownTags(object({
|
|
11603
|
-
type: string2()
|
|
11604
|
-
}), "type", ["array", "boolean", "integer", "number", "string"])
|
|
11605
|
-
]), "type", ["array", "boolean", "integer", "number", "string"]);
|
|
11606
|
-
var zElicitationSchema3 = object({
|
|
11607
|
-
type: zElicitationSchemaType3,
|
|
11608
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11609
|
-
properties: record(string2(), zElicitationPropertySchema3),
|
|
11610
|
-
required: array(string2()).nullish(),
|
|
11611
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11612
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11613
|
-
});
|
|
11614
|
-
var zElicitationFormMode3 = intersection(exactlyOneByRequiredKeys([zElicitationSessionScope3, zElicitationRequestScope3], [["sessionId"], ["requestId"]]), object({
|
|
11615
|
-
requestedSchema: zElicitationSchema3
|
|
11616
|
-
}));
|
|
11617
|
-
var zElicitationId3 = string2();
|
|
11618
|
-
var zElicitationUrlMode3 = intersection(exactlyOneByRequiredKeys([zElicitationSessionScope3, zElicitationRequestScope3], [["sessionId"], ["requestId"]]), object({
|
|
11619
|
-
elicitationId: zElicitationId3,
|
|
11620
|
-
url: url()
|
|
11621
|
-
}));
|
|
11622
|
-
var zCreateElicitationRequest3 = preserveCustomPayload(intersection(union([
|
|
11623
|
-
zElicitationFormMode3.and(object({
|
|
11624
|
-
mode: literal("form")
|
|
11625
|
-
})),
|
|
11626
|
-
zElicitationUrlMode3.and(object({
|
|
11627
|
-
mode: literal("url")
|
|
11628
|
-
})),
|
|
11629
|
-
excludeKnownTags(intersection(exactlyOneByRequiredKeys([zElicitationSessionScope3, zElicitationRequestScope3], [["sessionId"], ["requestId"]]), object({
|
|
11630
|
-
mode: string2()
|
|
11631
|
-
})), "mode", ["form", "url"])
|
|
11632
|
-
]), object({
|
|
11633
|
-
message: string2(),
|
|
11634
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11635
|
-
})), "mode", ["form", "url"]);
|
|
11636
|
-
var zMcpServerAcpId2 = string2();
|
|
11637
|
-
var zMcpRequestId2 = string2();
|
|
11638
|
-
var zMessageMcpRequest2 = object({
|
|
11639
|
-
serverId: zMcpServerAcpId2,
|
|
11640
|
-
requestId: zMcpRequestId2,
|
|
11641
|
-
method: string2(),
|
|
11642
|
-
params: record(string2(), unknown()).nullish(),
|
|
11643
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11644
|
-
});
|
|
11645
|
-
var zExtRequest3 = unknown();
|
|
11646
|
-
var zAgentRequest3 = object({
|
|
11647
|
-
id: zRequestId3,
|
|
11648
|
-
method: string2(),
|
|
11649
|
-
params: union([
|
|
11650
|
-
zRequestPermissionRequest3,
|
|
11651
|
-
zCreateElicitationRequest3,
|
|
11652
|
-
zMessageMcpRequest2,
|
|
11653
|
-
zExtRequest3
|
|
11654
|
-
]).nullish()
|
|
11655
|
-
});
|
|
11656
|
-
var zProtocolVersion3 = int().gte(0).lte(65535);
|
|
11657
|
-
var zImplementation3 = object({
|
|
11658
|
-
name: string2(),
|
|
11659
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11660
|
-
version: string2(),
|
|
11661
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11662
|
-
});
|
|
11663
|
-
var zPromptImageCapabilities2 = object({
|
|
11664
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11665
|
-
});
|
|
11666
|
-
var zPromptAudioCapabilities2 = object({
|
|
11667
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11668
|
-
});
|
|
11669
|
-
var zPromptEmbeddedContextCapabilities2 = object({
|
|
11670
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11671
|
-
});
|
|
11672
|
-
var zPromptSkillInlineCapabilities = object({
|
|
11673
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11674
|
-
});
|
|
11675
|
-
var zPromptSkillCapabilities = object({
|
|
11676
|
-
inline: defaultOnError(zPromptSkillInlineCapabilities.nullish(), () => void 0),
|
|
11677
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11678
|
-
});
|
|
11679
|
-
var zPromptCapabilities3 = object({
|
|
11680
|
-
image: defaultOnError(zPromptImageCapabilities2.nullish(), () => void 0),
|
|
11681
|
-
audio: defaultOnError(zPromptAudioCapabilities2.nullish(), () => void 0),
|
|
11682
|
-
embeddedContext: defaultOnError(zPromptEmbeddedContextCapabilities2.nullish(), () => void 0),
|
|
11683
|
-
skill: defaultOnError(zPromptSkillCapabilities.nullish(), () => void 0),
|
|
11684
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11685
|
-
});
|
|
11686
|
-
var zMcpStdioCapabilities2 = object({
|
|
11687
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11688
|
-
});
|
|
11689
|
-
var zMcpHttpCapabilities2 = object({
|
|
11690
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11691
|
-
});
|
|
11692
|
-
var zMcpAcpCapabilities = object({
|
|
11693
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11694
|
-
});
|
|
11695
|
-
var zMcpCapabilities3 = object({
|
|
11696
|
-
stdio: defaultOnError(zMcpStdioCapabilities2.nullish(), () => void 0),
|
|
11697
|
-
http: defaultOnError(zMcpHttpCapabilities2.nullish(), () => void 0),
|
|
11698
|
-
acp: defaultOnError(zMcpAcpCapabilities.nullish(), () => void 0),
|
|
11699
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11700
|
-
});
|
|
11701
|
-
var zSessionDeleteCapabilities3 = object({
|
|
11702
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11703
|
-
});
|
|
11704
|
-
var zSessionAdditionalDirectoriesCapabilities3 = object({
|
|
11705
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11706
|
-
});
|
|
11707
|
-
var zSessionSystemPromptOverrideCapabilities3 = object({
|
|
11708
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11709
|
-
});
|
|
11710
|
-
var zSessionSystemPromptModeCapabilities3 = object({
|
|
11711
|
-
override: defaultOnError(zSessionSystemPromptOverrideCapabilities3.nullish(), () => void 0),
|
|
11712
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11713
|
-
});
|
|
11714
|
-
var zSessionSystemPromptCapabilities3 = object({
|
|
11715
|
-
mode: defaultOnError(zSessionSystemPromptModeCapabilities3.nullish(), () => void 0),
|
|
11716
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11717
|
-
});
|
|
11718
|
-
var zSessionForkCapabilities2 = object({
|
|
11719
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11720
|
-
});
|
|
11721
|
-
var zSessionArchiveCapabilities2 = object({
|
|
11722
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11723
|
-
});
|
|
11724
|
-
var zSessionStatusCapabilities2 = object({
|
|
11725
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11726
|
-
});
|
|
11727
|
-
var zSessionOptionsCapabilities2 = object({
|
|
11728
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11729
|
-
});
|
|
11730
|
-
var zSessionTitleCapabilities2 = object({
|
|
11731
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11732
|
-
});
|
|
11733
|
-
var zSessionCapabilities3 = object({
|
|
11734
|
-
prompt: defaultOnError(zPromptCapabilities3.nullish(), () => void 0),
|
|
11735
|
-
mcp: defaultOnError(zMcpCapabilities3.nullish(), () => void 0),
|
|
11736
|
-
delete: defaultOnError(zSessionDeleteCapabilities3.nullish(), () => void 0),
|
|
11737
|
-
additionalDirectories: defaultOnError(zSessionAdditionalDirectoriesCapabilities3.nullish(), () => void 0),
|
|
11738
|
-
systemPrompt: defaultOnError(zSessionSystemPromptCapabilities3.nullish(), () => void 0),
|
|
11739
|
-
fork: defaultOnError(zSessionForkCapabilities2.nullish(), () => void 0),
|
|
11740
|
-
archive: defaultOnError(zSessionArchiveCapabilities2.nullish(), () => void 0),
|
|
11741
|
-
status: defaultOnError(zSessionStatusCapabilities2.nullish(), () => void 0),
|
|
11742
|
-
options: defaultOnError(zSessionOptionsCapabilities2.nullish(), () => void 0),
|
|
11743
|
-
title: defaultOnError(zSessionTitleCapabilities2.nullish(), () => void 0),
|
|
11744
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11745
|
-
});
|
|
11746
|
-
var zAuthStatusCapabilities2 = object({
|
|
11747
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11748
|
-
});
|
|
11749
|
-
var zAgentAuthCapabilities3 = object({
|
|
11750
|
-
status: defaultOnError(zAuthStatusCapabilities2.nullish(), () => void 0),
|
|
11751
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11752
|
-
});
|
|
11753
|
-
var zProvidersCapabilities2 = object({
|
|
11754
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11755
|
-
});
|
|
11756
|
-
var zAgentCapabilities3 = object({
|
|
11757
|
-
session: defaultOnError(zSessionCapabilities3.nullish(), () => void 0),
|
|
11758
|
-
auth: defaultOnError(zAgentAuthCapabilities3.nullish(), () => void 0),
|
|
11759
|
-
providers: defaultOnError(zProvidersCapabilities2.nullish(), () => void 0),
|
|
11760
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11761
|
-
});
|
|
11762
|
-
var zAuthMethodId3 = string2();
|
|
11763
|
-
var zEnvVariable3 = object({
|
|
11764
|
-
name: string2(),
|
|
11765
|
-
value: string2(),
|
|
11766
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11767
|
-
});
|
|
11768
|
-
var zAuthMethodTerminal3 = object({
|
|
11769
|
-
methodId: zAuthMethodId3,
|
|
11770
|
-
name: string2(),
|
|
11771
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11772
|
-
args: defaultOnNull(array(string2()), () => []).optional(),
|
|
11773
|
-
env: defaultOnNull(array(zEnvVariable3), () => []).optional(),
|
|
11774
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11775
|
-
});
|
|
11776
|
-
var zAuthMethodAgent3 = object({
|
|
11777
|
-
methodId: zAuthMethodId3,
|
|
11778
|
-
name: string2(),
|
|
11779
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11780
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11781
|
-
});
|
|
11782
|
-
var zAuthMethod3 = preserveCustomPayload(union([
|
|
11783
|
-
zAuthMethodTerminal3.and(object({
|
|
11784
|
-
type: literal("terminal")
|
|
11785
|
-
})),
|
|
11786
|
-
zAuthMethodAgent3.and(object({
|
|
11787
|
-
type: literal("agent")
|
|
11788
|
-
})),
|
|
11789
|
-
excludeKnownTags(object({
|
|
11790
|
-
type: string2(),
|
|
11791
|
-
methodId: zAuthMethodId3,
|
|
11792
|
-
name: string2()
|
|
11793
|
-
}), "type", ["agent", "terminal"])
|
|
11794
|
-
]), "type", ["agent", "terminal"]);
|
|
11795
|
-
var zInitializeResponse3 = object({
|
|
11796
|
-
protocolVersion: zProtocolVersion3,
|
|
11797
|
-
info: zImplementation3,
|
|
11798
|
-
capabilities: defaultOnError(zAgentCapabilities3.optional().default({}), () => ({})),
|
|
11799
|
-
authMethods: defaultOnError(vecSkipError(zAuthMethod3).optional(), () => []),
|
|
11800
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11801
|
-
});
|
|
11802
|
-
var zLoginAuthResponse2 = object({
|
|
11803
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11804
|
-
});
|
|
11805
|
-
var zProviderId2 = string2();
|
|
11806
|
-
var zLlmProtocol2 = union([
|
|
11807
|
-
literal("anthropic"),
|
|
11808
|
-
literal("openai"),
|
|
11809
|
-
literal("azure"),
|
|
11810
|
-
literal("vertex"),
|
|
11811
|
-
literal("bedrock"),
|
|
11812
|
-
string2()
|
|
11813
|
-
]);
|
|
11814
|
-
var zProviderCurrentConfig2 = object({
|
|
11815
|
-
apiType: zLlmProtocol2,
|
|
11816
|
-
baseUrl: url(),
|
|
11817
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11818
|
-
});
|
|
11819
|
-
var zProviderInfo2 = object({
|
|
11820
|
-
providerId: zProviderId2,
|
|
11821
|
-
supported: requiredDefaultOnError(vecSkipError(zLlmProtocol2), () => []),
|
|
11822
|
-
required: boolean2(),
|
|
11823
|
-
current: zProviderCurrentConfig2.nullish(),
|
|
11824
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11825
|
-
});
|
|
11826
|
-
var zListProvidersResponse2 = object({
|
|
11827
|
-
providers: array(zProviderInfo2),
|
|
11828
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11829
|
-
});
|
|
11830
|
-
var zSetProviderResponse2 = object({
|
|
11831
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11832
|
-
});
|
|
11833
|
-
var zDisableProviderResponse2 = object({
|
|
11834
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11835
|
-
});
|
|
11836
|
-
var zLogoutAuthResponse2 = object({
|
|
11837
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11838
|
-
});
|
|
11839
|
-
var zAuthState2 = union([
|
|
11840
|
-
literal("authenticated"),
|
|
11841
|
-
literal("unauthenticated"),
|
|
11842
|
-
literal("not_required"),
|
|
11843
|
-
literal("unknown"),
|
|
11844
|
-
string2()
|
|
11845
|
-
]);
|
|
11846
|
-
var zAuthAccount2 = object({
|
|
11847
|
-
label: string2(),
|
|
11848
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11849
|
-
active: defaultOnError(boolean2().nullish(), () => void 0),
|
|
11850
|
-
name: defaultOnError(string2().nullish(), () => void 0),
|
|
11851
|
-
email: defaultOnError(string2().nullish(), () => void 0),
|
|
11852
|
-
organization: defaultOnError(string2().nullish(), () => void 0),
|
|
11853
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11854
|
-
});
|
|
11855
|
-
var zAuthStatusResponse2 = object({
|
|
11856
|
-
state: zAuthState2,
|
|
11857
|
-
accounts: defaultOnError(vecSkipError(zAuthAccount2).optional(), () => []),
|
|
11858
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11859
|
-
});
|
|
11860
|
-
var zSessionConfigId3 = string2();
|
|
11861
|
-
var zSessionConfigOptionCategory3 = union([
|
|
11862
|
-
literal("mode"),
|
|
11863
|
-
literal("model"),
|
|
11864
|
-
literal("model_config"),
|
|
11865
|
-
literal("speed"),
|
|
11866
|
-
literal("thought_level"),
|
|
11867
|
-
string2()
|
|
11868
|
-
]);
|
|
11869
|
-
var zSessionConfigValueId3 = string2();
|
|
11870
|
-
var zSessionConfigSelectOption3 = object({
|
|
11871
|
-
value: zSessionConfigValueId3,
|
|
11872
|
-
name: string2(),
|
|
11873
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11874
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11875
|
-
});
|
|
11876
|
-
var zSessionConfigGroupId3 = string2();
|
|
11877
|
-
var zSessionConfigSelectGroup3 = object({
|
|
11878
|
-
groupId: zSessionConfigGroupId3,
|
|
11879
|
-
name: string2(),
|
|
11880
|
-
options: requiredDefaultOnError(vecSkipError(zSessionConfigSelectOption3), () => []),
|
|
11881
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11882
|
-
});
|
|
11883
|
-
var zSessionConfigSelectOptions3 = union([
|
|
11884
|
-
array(zSessionConfigSelectOption3).min(1),
|
|
11885
|
-
array(zSessionConfigSelectGroup3).min(1)
|
|
11886
|
-
]);
|
|
11887
|
-
var zSessionConfigSelect3 = object({
|
|
11888
|
-
currentValue: zSessionConfigValueId3,
|
|
11889
|
-
options: zSessionConfigSelectOptions3
|
|
11890
|
-
});
|
|
11891
|
-
var zSessionConfigBoolean3 = object({
|
|
11892
|
-
currentValue: boolean2()
|
|
11893
|
-
});
|
|
11894
|
-
var zSessionConfigOption3 = preserveCustomPayload(intersection(union([
|
|
11895
|
-
zSessionConfigSelect3.and(object({
|
|
11896
|
-
type: literal("select")
|
|
11897
|
-
})),
|
|
11898
|
-
zSessionConfigBoolean3.and(object({
|
|
11899
|
-
type: literal("boolean")
|
|
11900
|
-
})),
|
|
11901
|
-
excludeKnownTags(object({
|
|
11902
|
-
type: string2()
|
|
11903
|
-
}), "type", ["boolean", "select"])
|
|
11904
|
-
]), object({
|
|
11905
|
-
configId: zSessionConfigId3,
|
|
11906
|
-
name: string2(),
|
|
11907
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
11908
|
-
category: defaultOnError(zSessionConfigOptionCategory3.nullish(), () => void 0),
|
|
11909
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11910
|
-
})), "type", ["boolean", "select"]);
|
|
11911
|
-
var zTextCommandInput2 = object({
|
|
11912
|
-
hint: string2(),
|
|
11913
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11914
|
-
});
|
|
11915
|
-
var zAvailableCommandInput3 = preserveCustomPayload(union([
|
|
11916
|
-
zTextCommandInput2.and(object({
|
|
11917
|
-
type: literal("text")
|
|
11918
|
-
})),
|
|
11919
|
-
excludeKnownTags(object({
|
|
11920
|
-
type: string2()
|
|
11921
|
-
}), "type", ["text"])
|
|
11922
|
-
]), "type", ["text"]);
|
|
11923
|
-
var zCommand2 = object({
|
|
11924
|
-
name: string2(),
|
|
11925
|
-
description: string2(),
|
|
11926
|
-
input: defaultOnError(zAvailableCommandInput3.nullish(), () => void 0),
|
|
11927
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11928
|
-
});
|
|
11929
|
-
var zSkill = object({
|
|
11930
|
-
name: string2(),
|
|
11931
|
-
description: string2(),
|
|
11932
|
-
path: defaultOnError(zAbsolutePath2.nullish(), () => void 0),
|
|
11933
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11934
|
-
});
|
|
11935
|
-
var zAvailableCommand3 = preserveCustomPayload(union([
|
|
11936
|
-
zCommand2.and(object({
|
|
11937
|
-
type: literal("command")
|
|
11938
|
-
})),
|
|
11939
|
-
zSkill.and(object({
|
|
11940
|
-
type: literal("skill")
|
|
11941
|
-
})),
|
|
11942
|
-
excludeKnownTags(object({
|
|
11943
|
-
type: string2(),
|
|
11944
|
-
name: string2(),
|
|
11945
|
-
description: string2()
|
|
11946
|
-
}), "type", ["command", "skill"])
|
|
11947
|
-
]), "type", ["command", "skill"]);
|
|
11948
|
-
var zNewSessionResponse3 = object({
|
|
11949
|
-
sessionId: zSessionId3,
|
|
11950
|
-
configOptions: defaultOnError(vecSkipError(zSessionConfigOption3).optional(), () => []),
|
|
11951
|
-
availableCommands: defaultOnError(vecSkipError(zAvailableCommand3).optional(), () => []),
|
|
11952
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11953
|
-
});
|
|
11954
|
-
var zSessionInfo3 = object({
|
|
11955
|
-
sessionId: zSessionId3,
|
|
11956
|
-
cwd: zAbsolutePath2,
|
|
11957
|
-
additionalDirectories: defaultOnNull(array(zAbsolutePath2), () => []).optional(),
|
|
11958
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
11959
|
-
updatedAt: defaultOnError(iso_exports.datetime({ offset: true }).nullish(), () => void 0),
|
|
11960
|
-
archived: defaultOnError(boolean2().nullish(), () => void 0),
|
|
11961
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11962
|
-
});
|
|
11963
|
-
var zSessionListCursor2 = string2();
|
|
11964
|
-
var zListSessionsResponse3 = object({
|
|
11965
|
-
sessions: requiredDefaultOnError(vecSkipError(zSessionInfo3), () => []),
|
|
11966
|
-
nextCursor: zSessionListCursor2.nullish(),
|
|
11967
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11968
|
-
});
|
|
11969
|
-
var zDeleteSessionResponse3 = object({
|
|
11970
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11971
|
-
});
|
|
11972
|
-
var zForkSessionResponse2 = object({
|
|
11973
|
-
sessionId: zSessionId3,
|
|
11974
|
-
configOptions: defaultOnError(vecSkipError(zSessionConfigOption3).optional(), () => []),
|
|
11975
|
-
availableCommands: defaultOnError(vecSkipError(zAvailableCommand3).optional(), () => []),
|
|
11976
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11977
|
-
});
|
|
11978
|
-
var zArchiveSessionResponse2 = object({
|
|
11979
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11980
|
-
});
|
|
11981
|
-
var zUnarchiveSessionResponse2 = object({
|
|
11982
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11983
|
-
});
|
|
11984
|
-
var zSessionStatus2 = union([
|
|
11985
|
-
literal("open"),
|
|
11986
|
-
literal("saved"),
|
|
11987
|
-
string2()
|
|
11988
|
-
]);
|
|
11989
|
-
var zBackgroundTerminal2 = object({
|
|
11990
|
-
terminalId: zTerminalId3,
|
|
11991
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11992
|
-
});
|
|
11993
|
-
var zBackgroundToolCall2 = object({
|
|
11994
|
-
toolCallId: zToolCallId3,
|
|
11995
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11996
|
-
});
|
|
11997
|
-
var zBackgroundSubagent2 = object({
|
|
11998
|
-
sessionId: zSessionId3,
|
|
11999
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12000
|
-
});
|
|
12001
|
-
var zBackgroundWork2 = preserveCustomPayload(union([
|
|
12002
|
-
zBackgroundTerminal2.and(object({
|
|
12003
|
-
type: literal("terminal")
|
|
12004
|
-
})),
|
|
12005
|
-
zBackgroundToolCall2.and(object({
|
|
12006
|
-
type: literal("tool_call")
|
|
12007
|
-
})),
|
|
12008
|
-
zBackgroundSubagent2.and(object({
|
|
12009
|
-
type: literal("subagent")
|
|
12010
|
-
})),
|
|
12011
|
-
excludeKnownTags(object({
|
|
12012
|
-
type: string2()
|
|
12013
|
-
}), "type", ["subagent", "terminal", "tool_call"])
|
|
12014
|
-
]), "type", ["subagent", "terminal", "tool_call"]);
|
|
12015
|
-
var zRunningStateUpdate3 = object({
|
|
12016
|
-
background: defaultOnError(array(zBackgroundWork2).nullish(), () => void 0),
|
|
12017
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12018
|
-
});
|
|
12019
|
-
var zErrorCode3 = union([
|
|
12020
|
-
literal(-32700),
|
|
12021
|
-
literal(-32600),
|
|
12022
|
-
literal(-32601),
|
|
12023
|
-
literal(-32602),
|
|
12024
|
-
literal(-32603),
|
|
12025
|
-
literal(-32800),
|
|
12026
|
-
literal(-32e3),
|
|
12027
|
-
literal(-32002),
|
|
12028
|
-
literal(-32022),
|
|
12029
|
-
int().min(-2147483648, {
|
|
12030
|
-
error: "Invalid value: Expected int32 to be >= -2147483648"
|
|
12031
|
-
}).max(2147483647, {
|
|
12032
|
-
error: "Invalid value: Expected int32 to be <= 2147483647"
|
|
12033
|
-
})
|
|
12034
|
-
]);
|
|
12035
|
-
var zUnsupportedProtocolVersionErrorData2 = object({
|
|
12036
|
-
requested: zProtocolVersion3,
|
|
12037
|
-
supported: array(zProtocolVersion3),
|
|
12038
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12039
|
-
});
|
|
12040
|
-
var zSessionNotFoundErrorData2 = object({
|
|
12041
|
-
sessionId: zSessionId3,
|
|
12042
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12043
|
-
});
|
|
12044
|
-
var zErrorData2 = union([
|
|
12045
|
-
zUnsupportedProtocolVersionErrorData2,
|
|
12046
|
-
zSessionNotFoundErrorData2,
|
|
12047
|
-
unknown()
|
|
12048
|
-
]);
|
|
12049
|
-
var zError3 = object({
|
|
12050
|
-
code: zErrorCode3,
|
|
12051
|
-
message: string2(),
|
|
12052
|
-
data: defaultOnError(zErrorData2.nullish(), () => void 0)
|
|
12053
|
-
});
|
|
12054
|
-
var zErrorStopReason3 = object({
|
|
12055
|
-
error: defaultOnError(zError3.nullish(), () => void 0)
|
|
12056
|
-
});
|
|
12057
|
-
var zUsage2 = object({
|
|
12058
|
-
totalTokens: wideInt().gte(0),
|
|
12059
|
-
inputTokens: wideInt().gte(0),
|
|
12060
|
-
outputTokens: wideInt().gte(0),
|
|
12061
|
-
thoughtTokens: defaultOnError(wideInt().gte(0).nullish(), () => void 0),
|
|
12062
|
-
cachedReadTokens: defaultOnError(wideInt().gte(0).nullish(), () => void 0),
|
|
12063
|
-
cachedWriteTokens: defaultOnError(wideInt().gte(0).nullish(), () => void 0),
|
|
12064
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12065
|
-
});
|
|
12066
|
-
var zIdleStateUpdate3 = defaultOnErrorOptionalStringTag(preserveCustomPayload(intersection(union([
|
|
12067
|
-
object({
|
|
12068
|
-
stopReason: literal("end_turn")
|
|
12069
|
-
}),
|
|
12070
|
-
object({
|
|
12071
|
-
stopReason: literal("max_tokens")
|
|
12072
|
-
}),
|
|
12073
|
-
object({
|
|
12074
|
-
stopReason: literal("max_turn_requests")
|
|
12075
|
-
}),
|
|
12076
|
-
object({
|
|
12077
|
-
stopReason: literal("refusal")
|
|
12078
|
-
}),
|
|
12079
|
-
object({
|
|
12080
|
-
stopReason: literal("cancelled")
|
|
12081
|
-
}),
|
|
12082
|
-
zErrorStopReason3.and(object({
|
|
12083
|
-
stopReason: literal("error")
|
|
12084
|
-
})),
|
|
12085
|
-
excludeKnownTags(object({
|
|
12086
|
-
stopReason: string2()
|
|
12087
|
-
}), "stopReason", [
|
|
12088
|
-
"cancelled",
|
|
12089
|
-
"end_turn",
|
|
12090
|
-
"error",
|
|
12091
|
-
"max_tokens",
|
|
12092
|
-
"max_turn_requests",
|
|
12093
|
-
"refusal"
|
|
12094
|
-
]),
|
|
12095
|
-
object({
|
|
12096
|
-
stopReason: _null3().optional()
|
|
12097
|
-
})
|
|
12098
|
-
]), object({
|
|
12099
|
-
usage: defaultOnError(zUsage2.nullish(), () => void 0),
|
|
12100
|
-
background: defaultOnError(array(zBackgroundWork2).nullish(), () => void 0),
|
|
12101
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0),
|
|
12102
|
-
stopReason: defaultOnError(string2().nullish(), () => void 0)
|
|
12103
|
-
})), "stopReason", [
|
|
12104
|
-
"cancelled",
|
|
12105
|
-
"end_turn",
|
|
12106
|
-
"error",
|
|
12107
|
-
"max_tokens",
|
|
12108
|
-
"max_turn_requests",
|
|
12109
|
-
"refusal"
|
|
12110
|
-
]), "stopReason");
|
|
12111
|
-
var zRequiresActionStateUpdate3 = object({
|
|
12112
|
-
background: defaultOnError(array(zBackgroundWork2).nullish(), () => void 0),
|
|
12113
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12114
|
-
});
|
|
12115
|
-
var zUnknownStateUpdate3 = object({
|
|
12116
|
-
background: defaultOnError(array(zBackgroundWork2).nullish(), () => void 0),
|
|
12117
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12118
|
-
});
|
|
12119
|
-
var zStateUpdate3 = preserveCustomPayload(union([
|
|
12120
|
-
zRunningStateUpdate3.and(object({
|
|
12121
|
-
state: literal("running")
|
|
12122
|
-
})),
|
|
12123
|
-
zIdleStateUpdate3.and(object({
|
|
12124
|
-
state: literal("idle")
|
|
12125
|
-
})),
|
|
12126
|
-
zRequiresActionStateUpdate3.and(object({
|
|
12127
|
-
state: literal("requires_action")
|
|
12128
|
-
})),
|
|
12129
|
-
zUnknownStateUpdate3.and(object({
|
|
12130
|
-
state: literal("unknown")
|
|
12131
|
-
})),
|
|
12132
|
-
excludeKnownTags(object({
|
|
12133
|
-
state: string2()
|
|
12134
|
-
}), "state", ["idle", "requires_action", "running", "unknown"])
|
|
12135
|
-
]), "state", ["idle", "requires_action", "running", "unknown"]);
|
|
12136
|
-
var zSessionStatusResponse2 = object({
|
|
12137
|
-
status: zSessionStatus2,
|
|
12138
|
-
state: defaultOnError(zStateUpdate3.nullish(), () => void 0),
|
|
12139
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12140
|
-
});
|
|
12141
|
-
var zSessionOptionsResponse2 = object({
|
|
12142
|
-
configOptions: defaultOnError(vecSkipError(zSessionConfigOption3).optional(), () => []),
|
|
12143
|
-
availableCommands: defaultOnError(vecSkipError(zAvailableCommand3).optional(), () => []),
|
|
12144
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12145
|
-
});
|
|
12146
|
-
var zSetSessionTitleResponse2 = object({
|
|
12147
|
-
title: string2(),
|
|
12148
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12149
|
-
});
|
|
12150
|
-
var zResumeSessionResponse3 = object({
|
|
12151
|
-
configOptions: defaultOnError(vecSkipError(zSessionConfigOption3).optional(), () => []),
|
|
12152
|
-
availableCommands: defaultOnError(vecSkipError(zAvailableCommand3).optional(), () => []),
|
|
12153
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12154
|
-
});
|
|
12155
|
-
var zCloseSessionResponse3 = object({
|
|
12156
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12157
|
-
});
|
|
12158
|
-
var zCancelToolCallResponse2 = object({
|
|
12159
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12160
|
-
});
|
|
12161
|
-
var zCancelTerminalResponse2 = object({
|
|
12162
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12163
|
-
});
|
|
12164
|
-
var zSetSessionConfigOptionResponse3 = object({
|
|
12165
|
-
configOptions: vecSkipError(zSessionConfigOption3),
|
|
12166
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12167
|
-
});
|
|
12168
|
-
var zMessageId3 = string2();
|
|
12169
|
-
var zPromptResponse3 = object({
|
|
12170
|
-
messageId: zMessageId3,
|
|
12171
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12172
|
-
});
|
|
12173
|
-
var zExtResponse3 = unknown();
|
|
12174
|
-
var zAgentResponse3 = union([
|
|
12175
|
-
object({
|
|
12176
|
-
id: zRequestId3,
|
|
12177
|
-
result: union([
|
|
12178
|
-
zInitializeResponse3,
|
|
12179
|
-
zLoginAuthResponse2,
|
|
12180
|
-
zListProvidersResponse2,
|
|
12181
|
-
zSetProviderResponse2,
|
|
12182
|
-
zDisableProviderResponse2,
|
|
12183
|
-
zLogoutAuthResponse2,
|
|
12184
|
-
zAuthStatusResponse2,
|
|
12185
|
-
zNewSessionResponse3,
|
|
12186
|
-
zListSessionsResponse3,
|
|
12187
|
-
zDeleteSessionResponse3,
|
|
12188
|
-
zForkSessionResponse2,
|
|
12189
|
-
zArchiveSessionResponse2,
|
|
12190
|
-
zUnarchiveSessionResponse2,
|
|
12191
|
-
zSessionStatusResponse2,
|
|
12192
|
-
zSessionOptionsResponse2,
|
|
12193
|
-
zSetSessionTitleResponse2,
|
|
12194
|
-
zResumeSessionResponse3,
|
|
12195
|
-
zCloseSessionResponse3,
|
|
12196
|
-
zCancelToolCallResponse2,
|
|
12197
|
-
zCancelTerminalResponse2,
|
|
12198
|
-
zSetSessionConfigOptionResponse3,
|
|
12199
|
-
zPromptResponse3,
|
|
12200
|
-
zExtResponse3
|
|
12201
|
-
])
|
|
12202
|
-
}),
|
|
12203
|
-
object({
|
|
12204
|
-
id: union([wideInt(), string2()]).nullable(),
|
|
12205
|
-
error: zError3
|
|
12206
|
-
})
|
|
12207
|
-
]);
|
|
12208
|
-
var zContentChunk3 = object({
|
|
12209
|
-
messageId: zMessageId3,
|
|
12210
|
-
content: zContentBlock3,
|
|
12211
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12212
|
-
});
|
|
12213
|
-
var zUserMessage2 = object({
|
|
12214
|
-
messageId: zMessageId3,
|
|
12215
|
-
content: defaultOnError(vecSkipError(zContentBlock3).nullish(), () => void 0),
|
|
12216
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12217
|
-
});
|
|
12218
|
-
var zAgentMessage2 = object({
|
|
12219
|
-
messageId: zMessageId3,
|
|
12220
|
-
content: defaultOnError(vecSkipError(zContentBlock3).nullish(), () => void 0),
|
|
12221
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12222
|
-
});
|
|
12223
|
-
var zAgentThought2 = object({
|
|
12224
|
-
messageId: zMessageId3,
|
|
12225
|
-
content: defaultOnError(vecSkipError(zContentBlock3).nullish(), () => void 0),
|
|
12226
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12227
|
-
});
|
|
12228
|
-
var zToolCallContentChunk2 = object({
|
|
12229
|
-
toolCallId: zToolCallId3,
|
|
12230
|
-
content: zToolCallContent3,
|
|
12231
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12232
|
-
});
|
|
12233
|
-
var zTerminalOutput2 = object({
|
|
12234
|
-
data: string2(),
|
|
12235
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12236
|
-
});
|
|
12237
|
-
var zTerminalExitStatus3 = object({
|
|
12238
|
-
exitCode: defaultOnError(wideInt().nullish(), () => void 0),
|
|
12239
|
-
signal: defaultOnError(string2().nullish(), () => void 0),
|
|
12240
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12241
|
-
});
|
|
12242
|
-
var zTerminalSize2 = object({
|
|
12243
|
-
cols: int().gte(1).lte(65535),
|
|
12244
|
-
rows: int().gte(1).lte(65535),
|
|
12245
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12246
|
-
});
|
|
12247
|
-
var zTerminalCancelCapabilities2 = object({
|
|
12248
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12249
|
-
});
|
|
12250
|
-
var zTerminalCapabilities2 = object({
|
|
12251
|
-
cancel: defaultOnError(zTerminalCancelCapabilities2.nullish(), () => void 0),
|
|
12252
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12253
|
-
});
|
|
12254
|
-
var zTerminalUpdate2 = object({
|
|
12255
|
-
terminalId: zTerminalId3,
|
|
12256
|
-
command: defaultOnError(string2().nullish(), () => void 0),
|
|
12257
|
-
cwd: defaultOnError(zAbsolutePath2.nullish(), () => void 0),
|
|
12258
|
-
output: defaultOnError(zTerminalOutput2.nullish(), () => void 0),
|
|
12259
|
-
exitStatus: defaultOnError(zTerminalExitStatus3.nullish(), () => void 0),
|
|
12260
|
-
size: defaultOnError(zTerminalSize2.nullish(), () => void 0),
|
|
12261
|
-
capabilities: defaultOnError(zTerminalCapabilities2.nullish(), () => void 0),
|
|
12262
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12263
|
-
});
|
|
12264
|
-
var zTerminalOutputChunk2 = object({
|
|
12265
|
-
terminalId: zTerminalId3,
|
|
12266
|
-
data: string2(),
|
|
12267
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12268
|
-
});
|
|
12269
|
-
var zPlanId3 = string2();
|
|
12270
|
-
var zPlanEntryPriority3 = union([
|
|
12271
|
-
literal("high"),
|
|
12272
|
-
literal("medium"),
|
|
12273
|
-
literal("low"),
|
|
12274
|
-
string2()
|
|
12275
|
-
]);
|
|
12276
|
-
var zPlanEntryStatus3 = union([
|
|
12277
|
-
literal("pending"),
|
|
12278
|
-
literal("in_progress"),
|
|
12279
|
-
literal("completed"),
|
|
12280
|
-
literal("cancelled"),
|
|
12281
|
-
string2()
|
|
12282
|
-
]);
|
|
12283
|
-
var zPlanEntry3 = object({
|
|
12284
|
-
content: string2(),
|
|
12285
|
-
priority: zPlanEntryPriority3,
|
|
12286
|
-
status: zPlanEntryStatus3,
|
|
12287
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12288
|
-
});
|
|
12289
|
-
var zPlanItems3 = object({
|
|
12290
|
-
planId: zPlanId3,
|
|
12291
|
-
entries: vecSkipError(zPlanEntry3),
|
|
12292
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12293
|
-
});
|
|
12294
|
-
var zPlanMarkdown2 = object({
|
|
12295
|
-
planId: zPlanId3,
|
|
12296
|
-
content: string2(),
|
|
12297
|
-
path: defaultOnError(zAbsolutePath2.nullish(), () => void 0),
|
|
12298
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12299
|
-
});
|
|
12300
|
-
var zPlanUpdateContent3 = preserveCustomPayload(union([
|
|
12301
|
-
zPlanItems3.and(object({
|
|
12302
|
-
type: literal("items")
|
|
12303
|
-
})),
|
|
12304
|
-
zPlanMarkdown2.and(object({
|
|
12305
|
-
type: literal("markdown")
|
|
12306
|
-
})),
|
|
12307
|
-
excludeKnownTags(object({
|
|
12308
|
-
type: string2(),
|
|
12309
|
-
planId: zPlanId3
|
|
12310
|
-
}), "type", ["items", "markdown"])
|
|
12311
|
-
]), "type", ["items", "markdown"]);
|
|
12312
|
-
var zPlanUpdate3 = object({
|
|
12313
|
-
plan: zPlanUpdateContent3,
|
|
12314
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12315
|
-
});
|
|
12316
|
-
var zPlanRemoved2 = object({
|
|
12317
|
-
planId: zPlanId3,
|
|
12318
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12319
|
-
});
|
|
12320
|
-
var zAvailableCommandsUpdate3 = object({
|
|
12321
|
-
availableCommands: vecSkipError(zAvailableCommand3),
|
|
12322
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12323
|
-
});
|
|
12324
|
-
var zConfigOptionUpdate3 = object({
|
|
12325
|
-
configOptions: vecSkipError(zSessionConfigOption3),
|
|
12326
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12327
|
-
});
|
|
12328
|
-
var zSessionInfoUpdate3 = object({
|
|
12329
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
12330
|
-
updatedAt: defaultOnError(iso_exports.datetime({ offset: true }).nullish(), () => void 0),
|
|
12331
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12332
|
-
});
|
|
12333
|
-
var zCost3 = object({
|
|
12334
|
-
amount: number2(),
|
|
12335
|
-
currency: string2(),
|
|
12336
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12337
|
-
});
|
|
12338
|
-
var zUsageUpdate3 = object({
|
|
12339
|
-
used: wideInt().gte(0),
|
|
12340
|
-
size: wideInt().gte(0),
|
|
12341
|
-
cost: defaultOnError(zCost3.nullish(), () => void 0),
|
|
12342
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12343
|
-
});
|
|
12344
|
-
var zNoticeSeverity3 = union([
|
|
12345
|
-
literal("info"),
|
|
12346
|
-
literal("warning"),
|
|
12347
|
-
literal("error"),
|
|
12348
|
-
string2()
|
|
12349
|
-
]);
|
|
12350
|
-
var zNotice3 = object({
|
|
12351
|
-
severity: zNoticeSeverity3,
|
|
12352
|
-
title: string2().min(1),
|
|
12353
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
12354
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12355
|
-
});
|
|
12356
|
-
var zCompactionId3 = string2();
|
|
12357
|
-
var zCompactionStatus3 = union([
|
|
12358
|
-
literal("in_progress"),
|
|
12359
|
-
literal("completed"),
|
|
12360
|
-
literal("failed"),
|
|
12361
|
-
literal("cancelled"),
|
|
12362
|
-
string2()
|
|
12363
|
-
]);
|
|
12364
|
-
var zCompactionUpdate3 = object({
|
|
12365
|
-
compactionId: zCompactionId3,
|
|
12366
|
-
status: zCompactionStatus3,
|
|
12367
|
-
summary: defaultOnError(vecSkipError(zContentBlock3).nullish(), () => void 0),
|
|
12368
|
-
error: defaultOnError(string2().nullish(), () => void 0),
|
|
12369
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12370
|
-
});
|
|
12371
|
-
var zCompactionSummaryChunk3 = object({
|
|
12372
|
-
compactionId: zCompactionId3,
|
|
12373
|
-
content: zContentBlock3,
|
|
12374
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12375
|
-
});
|
|
12376
|
-
var zReplayComplete2 = object({
|
|
12377
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12378
|
-
});
|
|
12379
|
-
var zPromptSuggestion2 = object({
|
|
12380
|
-
prompt: array(zContentBlock3).min(1),
|
|
12381
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12382
|
-
});
|
|
12383
|
-
var zPromptSuggestionsUpdate2 = object({
|
|
12384
|
-
suggestions: vecSkipError(zPromptSuggestion2),
|
|
12385
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12386
|
-
});
|
|
12387
|
-
var zSessionCancelCapabilities3 = object({
|
|
12388
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12389
|
-
});
|
|
12390
|
-
var zSubagentSessionCapabilities3 = object({
|
|
12391
|
-
cancel: defaultOnError(zSessionCancelCapabilities3.nullish(), () => void 0),
|
|
12392
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12393
|
-
});
|
|
12394
|
-
var zSubagentUpdate3 = object({
|
|
12395
|
-
sessionId: zSessionId3,
|
|
12396
|
-
title: defaultOnError(string2().nullish(), () => void 0),
|
|
12397
|
-
description: defaultOnError(string2().nullish(), () => void 0),
|
|
12398
|
-
capabilities: defaultOnError(zSubagentSessionCapabilities3.nullish(), () => void 0),
|
|
12399
|
-
state: defaultOnError(zStateUpdate3.nullish(), () => void 0),
|
|
12400
|
-
cwd: zAbsolutePath2.nullish(),
|
|
12401
|
-
additionalDirectories: array(zAbsolutePath2).nullish(),
|
|
12402
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12403
|
-
});
|
|
12404
|
-
var zSessionMessage3 = object({
|
|
12405
|
-
messageId: zMessageId3,
|
|
12406
|
-
senderSessionId: defaultOnError(zSessionId3.nullish(), () => void 0),
|
|
12407
|
-
recipientSessionId: defaultOnError(zSessionId3.nullish(), () => void 0),
|
|
12408
|
-
senderMessageId: defaultOnError(zMessageId3.nullish(), () => void 0),
|
|
12409
|
-
recipientMessageId: defaultOnError(zMessageId3.nullish(), () => void 0),
|
|
12410
|
-
content: defaultOnError(vecSkipError(zContentBlock3).nullish(), () => void 0),
|
|
12411
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12412
|
-
});
|
|
12413
|
-
var zSessionMessageChunk3 = object({
|
|
12414
|
-
messageId: zMessageId3,
|
|
12415
|
-
content: zContentBlock3,
|
|
12416
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12417
|
-
});
|
|
12418
|
-
var zSessionUpdate3 = preserveCustomPayload(union([
|
|
12419
|
-
zContentChunk3.and(object({
|
|
12420
|
-
sessionUpdate: literal("user_message_chunk")
|
|
12421
|
-
})),
|
|
12422
|
-
zUserMessage2.and(object({
|
|
12423
|
-
sessionUpdate: literal("user_message")
|
|
12424
|
-
})),
|
|
12425
|
-
zContentChunk3.and(object({
|
|
12426
|
-
sessionUpdate: literal("agent_message_chunk")
|
|
12427
|
-
})),
|
|
12428
|
-
zAgentMessage2.and(object({
|
|
12429
|
-
sessionUpdate: literal("agent_message")
|
|
12430
|
-
})),
|
|
12431
|
-
zContentChunk3.and(object({
|
|
12432
|
-
sessionUpdate: literal("agent_thought_chunk")
|
|
12433
|
-
})),
|
|
12434
|
-
zAgentThought2.and(object({
|
|
12435
|
-
sessionUpdate: literal("agent_thought")
|
|
12436
|
-
})),
|
|
12437
|
-
zStateUpdate3.and(object({
|
|
12438
|
-
sessionUpdate: literal("state_update")
|
|
12439
|
-
})),
|
|
12440
|
-
zToolCallContentChunk2.and(object({
|
|
12441
|
-
sessionUpdate: literal("tool_call_content_chunk")
|
|
12442
|
-
})),
|
|
12443
|
-
zToolCallUpdate3.and(object({
|
|
12444
|
-
sessionUpdate: literal("tool_call_update")
|
|
12445
|
-
})),
|
|
12446
|
-
zTerminalUpdate2.and(object({
|
|
12447
|
-
sessionUpdate: literal("terminal_update")
|
|
12448
|
-
})),
|
|
12449
|
-
zTerminalOutputChunk2.and(object({
|
|
12450
|
-
sessionUpdate: literal("terminal_output_chunk")
|
|
12451
|
-
})),
|
|
12452
|
-
zPlanUpdate3.and(object({
|
|
12453
|
-
sessionUpdate: literal("plan_update")
|
|
12454
|
-
})),
|
|
12455
|
-
zPlanRemoved2.and(object({
|
|
12456
|
-
sessionUpdate: literal("plan_removed")
|
|
12457
|
-
})),
|
|
12458
|
-
zAvailableCommandsUpdate3.and(object({
|
|
12459
|
-
sessionUpdate: literal("available_commands_update")
|
|
12460
|
-
})),
|
|
12461
|
-
zConfigOptionUpdate3.and(object({
|
|
12462
|
-
sessionUpdate: literal("config_option_update")
|
|
12463
|
-
})),
|
|
12464
|
-
zSessionInfoUpdate3.and(object({
|
|
12465
|
-
sessionUpdate: literal("session_info_update")
|
|
12466
|
-
})),
|
|
12467
|
-
zUsageUpdate3.and(object({
|
|
12468
|
-
sessionUpdate: literal("usage_update")
|
|
12469
|
-
})),
|
|
12470
|
-
zNotice3.and(object({
|
|
12471
|
-
sessionUpdate: literal("notice")
|
|
12472
|
-
})),
|
|
12473
|
-
zCompactionUpdate3.and(object({
|
|
12474
|
-
sessionUpdate: literal("compaction_update")
|
|
12475
|
-
})),
|
|
12476
|
-
zCompactionSummaryChunk3.and(object({
|
|
12477
|
-
sessionUpdate: literal("compaction_summary_chunk")
|
|
12478
|
-
})),
|
|
12479
|
-
zReplayComplete2.and(object({
|
|
12480
|
-
sessionUpdate: literal("replay_complete")
|
|
12481
|
-
})),
|
|
12482
|
-
zPromptSuggestionsUpdate2.and(object({
|
|
12483
|
-
sessionUpdate: literal("prompt_suggestions_update")
|
|
12484
|
-
})),
|
|
12485
|
-
zSubagentUpdate3.and(object({
|
|
12486
|
-
sessionUpdate: literal("subagent_update")
|
|
12487
|
-
})),
|
|
12488
|
-
zSessionMessage3.and(object({
|
|
12489
|
-
sessionUpdate: literal("session_message")
|
|
12490
|
-
})),
|
|
12491
|
-
zSessionMessageChunk3.and(object({
|
|
12492
|
-
sessionUpdate: literal("session_message_chunk")
|
|
12493
|
-
})),
|
|
12494
|
-
excludeKnownTags(object({
|
|
12495
|
-
sessionUpdate: string2()
|
|
12496
|
-
}), "sessionUpdate", [
|
|
12497
|
-
"agent_message",
|
|
12498
|
-
"agent_message_chunk",
|
|
12499
|
-
"agent_thought",
|
|
12500
|
-
"agent_thought_chunk",
|
|
12501
|
-
"available_commands_update",
|
|
12502
|
-
"compaction_summary_chunk",
|
|
12503
|
-
"compaction_update",
|
|
12504
|
-
"config_option_update",
|
|
12505
|
-
"notice",
|
|
12506
|
-
"plan_removed",
|
|
12507
|
-
"plan_update",
|
|
12508
|
-
"prompt_suggestions_update",
|
|
12509
|
-
"replay_complete",
|
|
12510
|
-
"session_info_update",
|
|
12511
|
-
"session_message",
|
|
12512
|
-
"session_message_chunk",
|
|
12513
|
-
"state_update",
|
|
12514
|
-
"subagent_update",
|
|
12515
|
-
"terminal_output_chunk",
|
|
12516
|
-
"terminal_update",
|
|
12517
|
-
"tool_call_content_chunk",
|
|
12518
|
-
"tool_call_update",
|
|
12519
|
-
"usage_update",
|
|
12520
|
-
"user_message",
|
|
12521
|
-
"user_message_chunk"
|
|
12522
|
-
])
|
|
12523
|
-
]), "sessionUpdate", [
|
|
12524
|
-
"agent_message",
|
|
12525
|
-
"agent_message_chunk",
|
|
12526
|
-
"agent_thought",
|
|
12527
|
-
"agent_thought_chunk",
|
|
12528
|
-
"available_commands_update",
|
|
12529
|
-
"compaction_summary_chunk",
|
|
12530
|
-
"compaction_update",
|
|
12531
|
-
"config_option_update",
|
|
12532
|
-
"notice",
|
|
12533
|
-
"plan_removed",
|
|
12534
|
-
"plan_update",
|
|
12535
|
-
"prompt_suggestions_update",
|
|
12536
|
-
"replay_complete",
|
|
12537
|
-
"session_info_update",
|
|
12538
|
-
"session_message",
|
|
12539
|
-
"session_message_chunk",
|
|
12540
|
-
"state_update",
|
|
12541
|
-
"subagent_update",
|
|
12542
|
-
"terminal_output_chunk",
|
|
12543
|
-
"terminal_update",
|
|
12544
|
-
"tool_call_content_chunk",
|
|
12545
|
-
"tool_call_update",
|
|
12546
|
-
"usage_update",
|
|
12547
|
-
"user_message",
|
|
12548
|
-
"user_message_chunk"
|
|
12549
|
-
]);
|
|
12550
|
-
var zUpdateSessionNotification2 = object({
|
|
12551
|
-
sessionId: zSessionId3,
|
|
12552
|
-
update: zSessionUpdate3,
|
|
12553
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12554
|
-
});
|
|
12555
|
-
var zCompleteElicitationNotification3 = object({
|
|
12556
|
-
elicitationId: zElicitationId3,
|
|
12557
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12558
|
-
});
|
|
12559
|
-
var zAuthStatusUpdateNotification2 = object({
|
|
12560
|
-
state: zAuthState2,
|
|
12561
|
-
accounts: defaultOnError(vecSkipError(zAuthAccount2).optional(), () => []),
|
|
12562
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12563
|
-
});
|
|
12564
|
-
var zExtNotification3 = unknown();
|
|
12565
|
-
var zAgentNotification3 = object({
|
|
12566
|
-
method: string2(),
|
|
12567
|
-
params: union([
|
|
12568
|
-
zUpdateSessionNotification2,
|
|
12569
|
-
zCompleteElicitationNotification3,
|
|
12570
|
-
zAuthStatusUpdateNotification2,
|
|
12571
|
-
zExtNotification3
|
|
12572
|
-
]).nullish()
|
|
12573
|
-
});
|
|
12574
|
-
var zTerminalAuthCapabilities2 = object({
|
|
12575
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12576
|
-
});
|
|
12577
|
-
var zClientAuthCapabilities2 = object({
|
|
12578
|
-
terminal: defaultOnError(zTerminalAuthCapabilities2.nullish(), () => void 0),
|
|
12579
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12580
|
-
});
|
|
12581
|
-
var zElicitationFormCapabilities3 = object({
|
|
12582
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12583
|
-
});
|
|
12584
|
-
var zElicitationUrlCapabilities3 = object({
|
|
12585
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12586
|
-
});
|
|
12587
|
-
var zElicitationCapabilities3 = object({
|
|
12588
|
-
form: defaultOnError(zElicitationFormCapabilities3.nullish(), () => void 0),
|
|
12589
|
-
url: defaultOnError(zElicitationUrlCapabilities3.nullish(), () => void 0),
|
|
12590
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12591
|
-
});
|
|
12592
|
-
var zPromptSuggestionsImageCapabilities2 = object({
|
|
12593
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12594
|
-
});
|
|
12595
|
-
var zPromptSuggestionsAudioCapabilities2 = object({
|
|
12596
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12597
|
-
});
|
|
12598
|
-
var zPromptSuggestionsEmbeddedContextCapabilities2 = object({
|
|
12599
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12600
|
-
});
|
|
12601
|
-
var zPromptSuggestionsCapabilities2 = object({
|
|
12602
|
-
image: defaultOnError(zPromptSuggestionsImageCapabilities2.nullish(), () => void 0),
|
|
12603
|
-
audio: defaultOnError(zPromptSuggestionsAudioCapabilities2.nullish(), () => void 0),
|
|
12604
|
-
embeddedContext: defaultOnError(zPromptSuggestionsEmbeddedContextCapabilities2.nullish(), () => void 0),
|
|
12605
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12606
|
-
});
|
|
12607
|
-
var zCommandsSkillCapabilities = object({
|
|
12608
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12609
|
-
});
|
|
12610
|
-
var zCommandsCapabilities = object({
|
|
12611
|
-
skill: defaultOnError(zCommandsSkillCapabilities.nullish(), () => void 0),
|
|
12612
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12613
|
-
});
|
|
12614
|
-
var zClientSessionCapabilities2 = object({
|
|
12615
|
-
promptSuggestions: defaultOnError(zPromptSuggestionsCapabilities2.nullish(), () => void 0),
|
|
12616
|
-
commands: defaultOnError(zCommandsCapabilities.nullish(), () => void 0),
|
|
12617
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12618
|
-
});
|
|
12619
|
-
var zClientCapabilities3 = object({
|
|
12620
|
-
auth: defaultOnError(zClientAuthCapabilities2.nullish(), () => void 0),
|
|
12621
|
-
elicitation: defaultOnError(zElicitationCapabilities3.nullish(), () => void 0),
|
|
12622
|
-
session: defaultOnError(zClientSessionCapabilities2.nullish(), () => void 0),
|
|
12623
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12624
|
-
});
|
|
12625
|
-
var zInitializeRequest3 = object({
|
|
12626
|
-
protocolVersion: zProtocolVersion3,
|
|
12627
|
-
info: zImplementation3,
|
|
12628
|
-
capabilities: defaultOnError(zClientCapabilities3.optional().default({}), () => ({})),
|
|
12629
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12630
|
-
});
|
|
12631
|
-
var zLoginAuthRequest2 = object({
|
|
12632
|
-
methodId: zAuthMethodId3,
|
|
12633
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12634
|
-
});
|
|
12635
|
-
var zListProvidersRequest2 = object({
|
|
12636
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12637
|
-
});
|
|
12638
|
-
var zSetProviderRequest2 = object({
|
|
12639
|
-
providerId: zProviderId2,
|
|
12640
|
-
apiType: zLlmProtocol2,
|
|
12641
|
-
baseUrl: url(),
|
|
12642
|
-
headers: record(string2(), string2()).optional(),
|
|
12643
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12644
|
-
});
|
|
12645
|
-
var zDisableProviderRequest2 = object({
|
|
12646
|
-
providerId: zProviderId2,
|
|
12647
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12648
|
-
});
|
|
12649
|
-
var zLogoutAuthRequest2 = object({
|
|
12650
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12651
|
-
});
|
|
12652
|
-
var zAuthStatusRequest2 = object({
|
|
12653
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12654
|
-
});
|
|
12655
|
-
var zHttpHeader3 = object({
|
|
12656
|
-
name: string2(),
|
|
12657
|
-
value: string2(),
|
|
12658
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12659
|
-
});
|
|
12660
|
-
var zMcpServerHttp3 = object({
|
|
12661
|
-
name: string2(),
|
|
12662
|
-
url: url(),
|
|
12663
|
-
headers: defaultOnNull(array(zHttpHeader3), () => []).optional(),
|
|
12664
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12665
|
-
});
|
|
12666
|
-
var zMcpServerAcp2 = object({
|
|
12667
|
-
name: string2(),
|
|
12668
|
-
serverId: zMcpServerAcpId2,
|
|
12669
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12670
|
-
});
|
|
12671
|
-
var zMcpServerStdio3 = object({
|
|
12672
|
-
name: string2(),
|
|
12673
|
-
command: zAbsolutePath2,
|
|
12674
|
-
args: defaultOnNull(array(string2()), () => []).optional(),
|
|
12675
|
-
env: defaultOnNull(array(zEnvVariable3), () => []).optional(),
|
|
12676
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12677
|
-
});
|
|
12678
|
-
var zMcpServer3 = preserveCustomPayload(union([
|
|
12679
|
-
zMcpServerHttp3.and(object({
|
|
12680
|
-
type: literal("http")
|
|
11444
|
+
zMcpServerSse.and(object({
|
|
11445
|
+
type: literal("sse")
|
|
12681
11446
|
})),
|
|
12682
11447
|
zMcpServerAcp2.and(object({
|
|
12683
11448
|
type: literal("acp")
|
|
12684
11449
|
})),
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
excludeKnownTags(object({
|
|
12689
|
-
type: string2()
|
|
12690
|
-
}), "type", ["acp", "http", "stdio"])
|
|
12691
|
-
]), "type", ["acp", "http", "stdio"]);
|
|
12692
|
-
var zSystemPromptMode3 = union([
|
|
11450
|
+
zMcpServerStdio2
|
|
11451
|
+
]);
|
|
11452
|
+
var zSystemPromptMode2 = union([
|
|
12693
11453
|
literal("append"),
|
|
12694
11454
|
literal("override"),
|
|
12695
11455
|
string2()
|
|
12696
11456
|
]);
|
|
12697
|
-
var
|
|
12698
|
-
mode:
|
|
12699
|
-
content: array(
|
|
11457
|
+
var zSystemPrompt2 = object({
|
|
11458
|
+
mode: zSystemPromptMode2,
|
|
11459
|
+
content: array(zContentBlock2),
|
|
12700
11460
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12701
11461
|
});
|
|
12702
|
-
var zInitialSessionConfigOption2 =
|
|
12703
|
-
object({
|
|
12704
|
-
type: literal("id"),
|
|
12705
|
-
value: zSessionConfigValueId3
|
|
12706
|
-
}),
|
|
11462
|
+
var zInitialSessionConfigOption2 = intersection(union([
|
|
12707
11463
|
object({
|
|
12708
11464
|
type: literal("boolean"),
|
|
12709
11465
|
value: boolean2()
|
|
12710
11466
|
}),
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
}), "type", ["boolean", "id"])
|
|
11467
|
+
object({
|
|
11468
|
+
value: zSessionConfigValueId2
|
|
11469
|
+
})
|
|
12715
11470
|
]), object({
|
|
12716
|
-
configId:
|
|
11471
|
+
configId: zSessionConfigId2,
|
|
12717
11472
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12718
|
-
}))
|
|
12719
|
-
var
|
|
12720
|
-
cwd:
|
|
12721
|
-
additionalDirectories: defaultOnNull(array(
|
|
12722
|
-
mcpServers: defaultOnNull(array(
|
|
12723
|
-
systemPrompt:
|
|
11473
|
+
}));
|
|
11474
|
+
var zNewSessionRequest2 = object({
|
|
11475
|
+
cwd: string2(),
|
|
11476
|
+
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
11477
|
+
mcpServers: defaultOnNull(array(zMcpServer2), () => []),
|
|
11478
|
+
systemPrompt: zSystemPrompt2.nullish(),
|
|
11479
|
+
configOptions: defaultOnNull(array(zInitialSessionConfigOption2), () => []).optional(),
|
|
11480
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11481
|
+
});
|
|
11482
|
+
var zLoadSessionRequest = object({
|
|
11483
|
+
mcpServers: defaultOnNull(array(zMcpServer2), () => []),
|
|
11484
|
+
cwd: string2(),
|
|
11485
|
+
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
11486
|
+
sessionId: zSessionId2,
|
|
11487
|
+
systemPrompt: zSystemPrompt2.nullish(),
|
|
12724
11488
|
configOptions: defaultOnNull(array(zInitialSessionConfigOption2), () => []).optional(),
|
|
12725
11489
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12726
11490
|
});
|
|
@@ -12730,170 +11494,178 @@ var zSessionArchiveFilter2 = union([
|
|
|
12730
11494
|
literal("only"),
|
|
12731
11495
|
string2()
|
|
12732
11496
|
]);
|
|
12733
|
-
var
|
|
12734
|
-
cwd:
|
|
12735
|
-
cursor:
|
|
11497
|
+
var zListSessionsRequest2 = object({
|
|
11498
|
+
cwd: string2().nullish(),
|
|
11499
|
+
cursor: string2().nullish(),
|
|
12736
11500
|
archived: zSessionArchiveFilter2.nullish(),
|
|
12737
11501
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12738
11502
|
});
|
|
12739
|
-
var
|
|
12740
|
-
sessionId:
|
|
11503
|
+
var zDeleteSessionRequest2 = object({
|
|
11504
|
+
sessionId: zSessionId2,
|
|
12741
11505
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12742
11506
|
});
|
|
12743
11507
|
var zForkSessionRequest2 = object({
|
|
12744
|
-
sessionId:
|
|
12745
|
-
cwd:
|
|
12746
|
-
additionalDirectories: defaultOnNull(array(
|
|
12747
|
-
mcpServers: defaultOnNull(array(
|
|
12748
|
-
systemPrompt:
|
|
11508
|
+
sessionId: zSessionId2,
|
|
11509
|
+
cwd: string2(),
|
|
11510
|
+
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
11511
|
+
mcpServers: defaultOnNull(array(zMcpServer2), () => []).optional(),
|
|
11512
|
+
systemPrompt: zSystemPrompt2.nullish(),
|
|
12749
11513
|
configOptions: defaultOnNull(array(zInitialSessionConfigOption2), () => []).optional(),
|
|
12750
11514
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12751
11515
|
});
|
|
12752
11516
|
var zArchiveSessionRequest2 = object({
|
|
12753
|
-
sessionId:
|
|
11517
|
+
sessionId: zSessionId2,
|
|
12754
11518
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12755
11519
|
});
|
|
12756
11520
|
var zUnarchiveSessionRequest2 = object({
|
|
12757
|
-
sessionId:
|
|
11521
|
+
sessionId: zSessionId2,
|
|
12758
11522
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12759
11523
|
});
|
|
12760
11524
|
var zSessionStatusRequest2 = object({
|
|
12761
|
-
sessionId:
|
|
11525
|
+
sessionId: zSessionId2,
|
|
12762
11526
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12763
11527
|
});
|
|
12764
11528
|
var zSessionOptionsRequest2 = object({
|
|
12765
|
-
cwd:
|
|
12766
|
-
additionalDirectories: defaultOnNull(array(
|
|
12767
|
-
sessionId:
|
|
11529
|
+
cwd: string2(),
|
|
11530
|
+
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
11531
|
+
sessionId: zSessionId2.nullish(),
|
|
12768
11532
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12769
11533
|
});
|
|
12770
11534
|
var zSetSessionTitleRequest2 = object({
|
|
12771
|
-
sessionId:
|
|
11535
|
+
sessionId: zSessionId2,
|
|
12772
11536
|
title: string2(),
|
|
12773
11537
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12774
11538
|
});
|
|
12775
|
-
var
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
})),
|
|
12782
|
-
excludeKnownTags(object({
|
|
12783
|
-
type: string2()
|
|
12784
|
-
}), "type", ["start"])
|
|
12785
|
-
]), "type", ["start"]);
|
|
12786
|
-
var zResumeSessionRequest3 = object({
|
|
12787
|
-
sessionId: zSessionId3,
|
|
12788
|
-
cwd: zAbsolutePath2,
|
|
12789
|
-
additionalDirectories: defaultOnNull(array(zAbsolutePath2), () => []).optional(),
|
|
12790
|
-
mcpServers: defaultOnNull(array(zMcpServer3), () => []).optional(),
|
|
12791
|
-
replayFrom: zReplayFrom2.nullish(),
|
|
12792
|
-
systemPrompt: zSystemPrompt3.nullish(),
|
|
11539
|
+
var zResumeSessionRequest2 = object({
|
|
11540
|
+
sessionId: zSessionId2,
|
|
11541
|
+
cwd: string2(),
|
|
11542
|
+
additionalDirectories: defaultOnNull(array(string2()), () => []).optional(),
|
|
11543
|
+
mcpServers: defaultOnNull(array(zMcpServer2), () => []).optional(),
|
|
11544
|
+
systemPrompt: zSystemPrompt2.nullish(),
|
|
12793
11545
|
configOptions: defaultOnNull(array(zInitialSessionConfigOption2), () => []).optional(),
|
|
12794
11546
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12795
11547
|
});
|
|
12796
|
-
var
|
|
12797
|
-
sessionId:
|
|
12798
|
-
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12799
|
-
});
|
|
12800
|
-
var zCancelToolCallRequest2 = object({
|
|
12801
|
-
sessionId: zSessionId3,
|
|
12802
|
-
toolCallId: zToolCallId3,
|
|
11548
|
+
var zCloseSessionRequest2 = object({
|
|
11549
|
+
sessionId: zSessionId2,
|
|
12803
11550
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12804
11551
|
});
|
|
12805
|
-
var
|
|
12806
|
-
sessionId:
|
|
12807
|
-
|
|
11552
|
+
var zSetSessionModeRequest = object({
|
|
11553
|
+
sessionId: zSessionId2,
|
|
11554
|
+
modeId: zSessionModeId,
|
|
12808
11555
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12809
11556
|
});
|
|
12810
|
-
var
|
|
12811
|
-
object({
|
|
12812
|
-
type: literal("id"),
|
|
12813
|
-
value: zSessionConfigValueId3
|
|
12814
|
-
}),
|
|
11557
|
+
var zSetSessionConfigOptionRequest2 = intersection(union([
|
|
12815
11558
|
object({
|
|
12816
11559
|
type: literal("boolean"),
|
|
12817
11560
|
value: boolean2()
|
|
12818
11561
|
}),
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
}), "type", ["boolean", "id"])
|
|
11562
|
+
object({
|
|
11563
|
+
value: zSessionConfigValueId2
|
|
11564
|
+
})
|
|
12823
11565
|
]), object({
|
|
12824
|
-
sessionId:
|
|
12825
|
-
configId:
|
|
11566
|
+
sessionId: zSessionId2,
|
|
11567
|
+
configId: zSessionConfigId2,
|
|
12826
11568
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12827
|
-
}))
|
|
12828
|
-
var
|
|
12829
|
-
sessionId:
|
|
12830
|
-
prompt: array(
|
|
11569
|
+
}));
|
|
11570
|
+
var zPromptRequest2 = object({
|
|
11571
|
+
sessionId: zSessionId2,
|
|
11572
|
+
prompt: array(zContentBlock2),
|
|
12831
11573
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12832
11574
|
});
|
|
12833
|
-
var
|
|
12834
|
-
id:
|
|
11575
|
+
var zClientRequest2 = object({
|
|
11576
|
+
id: zRequestId2,
|
|
12835
11577
|
method: string2(),
|
|
12836
11578
|
params: union([
|
|
12837
|
-
|
|
12838
|
-
|
|
11579
|
+
zInitializeRequest2,
|
|
11580
|
+
zAuthenticateRequest,
|
|
12839
11581
|
zListProvidersRequest2,
|
|
12840
11582
|
zSetProviderRequest2,
|
|
12841
11583
|
zDisableProviderRequest2,
|
|
12842
|
-
|
|
11584
|
+
zLogoutRequest,
|
|
12843
11585
|
zAuthStatusRequest2,
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
11586
|
+
zNewSessionRequest2,
|
|
11587
|
+
zLoadSessionRequest,
|
|
11588
|
+
zListSessionsRequest2,
|
|
11589
|
+
zDeleteSessionRequest2,
|
|
12847
11590
|
zForkSessionRequest2,
|
|
12848
11591
|
zArchiveSessionRequest2,
|
|
12849
11592
|
zUnarchiveSessionRequest2,
|
|
12850
11593
|
zSessionStatusRequest2,
|
|
12851
11594
|
zSessionOptionsRequest2,
|
|
12852
11595
|
zSetSessionTitleRequest2,
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
zExtRequest3
|
|
11596
|
+
zResumeSessionRequest2,
|
|
11597
|
+
zCloseSessionRequest2,
|
|
11598
|
+
zSetSessionModeRequest,
|
|
11599
|
+
zSetSessionConfigOptionRequest2,
|
|
11600
|
+
zPromptRequest2,
|
|
11601
|
+
zExtRequest2
|
|
12860
11602
|
]).nullish()
|
|
12861
11603
|
});
|
|
12862
|
-
var
|
|
11604
|
+
var zWriteTextFileResponse = object({
|
|
11605
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11606
|
+
});
|
|
11607
|
+
var zReadTextFileResponse = object({
|
|
11608
|
+
content: string2(),
|
|
12863
11609
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12864
11610
|
});
|
|
12865
|
-
var
|
|
12866
|
-
optionId:
|
|
11611
|
+
var zSelectedPermissionOutcome2 = object({
|
|
11612
|
+
optionId: zPermissionOptionId2,
|
|
12867
11613
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12868
11614
|
});
|
|
12869
|
-
var
|
|
12870
|
-
|
|
11615
|
+
var zRequestPermissionOutcome2 = union([
|
|
11616
|
+
object({
|
|
12871
11617
|
outcome: literal("cancelled")
|
|
12872
|
-
})
|
|
12873
|
-
|
|
11618
|
+
}),
|
|
11619
|
+
zSelectedPermissionOutcome2.and(object({
|
|
12874
11620
|
outcome: literal("selected")
|
|
12875
|
-
}))
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
11621
|
+
}))
|
|
11622
|
+
]);
|
|
11623
|
+
var zRequestPermissionResponse2 = object({
|
|
11624
|
+
outcome: zRequestPermissionOutcome2,
|
|
11625
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11626
|
+
});
|
|
11627
|
+
var zCreateTerminalResponse = object({
|
|
11628
|
+
terminalId: zTerminalId2,
|
|
11629
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11630
|
+
});
|
|
11631
|
+
var zTerminalExitStatus2 = object({
|
|
11632
|
+
exitCode: defaultOnError(int().gte(0).max(4294967295, {
|
|
11633
|
+
error: "Invalid value: Expected uint32 to be <= 4294967295"
|
|
11634
|
+
}).nullish(), () => void 0),
|
|
11635
|
+
signal: defaultOnError(string2().nullish(), () => void 0),
|
|
11636
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11637
|
+
});
|
|
11638
|
+
var zTerminalOutputResponse = object({
|
|
11639
|
+
output: string2(),
|
|
11640
|
+
truncated: boolean2(),
|
|
11641
|
+
exitStatus: defaultOnError(zTerminalExitStatus2.nullish(), () => void 0),
|
|
11642
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11643
|
+
});
|
|
11644
|
+
var zReleaseTerminalResponse = object({
|
|
11645
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11646
|
+
});
|
|
11647
|
+
var zWaitForTerminalExitResponse = object({
|
|
11648
|
+
exitCode: defaultOnError(int().gte(0).max(4294967295, {
|
|
11649
|
+
error: "Invalid value: Expected uint32 to be <= 4294967295"
|
|
11650
|
+
}).nullish(), () => void 0),
|
|
11651
|
+
signal: defaultOnError(string2().nullish(), () => void 0),
|
|
12882
11652
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12883
11653
|
});
|
|
12884
|
-
var
|
|
11654
|
+
var zKillTerminalResponse = object({
|
|
11655
|
+
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
11656
|
+
});
|
|
11657
|
+
var zElicitationContentValue2 = union([
|
|
12885
11658
|
string2(),
|
|
12886
11659
|
wideInt(),
|
|
12887
11660
|
number2(),
|
|
12888
11661
|
boolean2(),
|
|
12889
|
-
array(string2())
|
|
12890
|
-
unknown()
|
|
11662
|
+
array(string2())
|
|
12891
11663
|
]);
|
|
12892
|
-
var
|
|
12893
|
-
content: record(string2(),
|
|
11664
|
+
var zElicitationAcceptAction2 = object({
|
|
11665
|
+
content: record(string2(), zElicitationContentValue2).nullish()
|
|
12894
11666
|
});
|
|
12895
|
-
var
|
|
12896
|
-
|
|
11667
|
+
var zCreateElicitationResponse2 = preserveCustomPayload(intersection(union([
|
|
11668
|
+
zElicitationAcceptAction2.and(object({
|
|
12897
11669
|
action: literal("accept")
|
|
12898
11670
|
})),
|
|
12899
11671
|
object({
|
|
@@ -12927,23 +11699,30 @@ var zMessageMcpResponse2 = union([
|
|
|
12927
11699
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12928
11700
|
})
|
|
12929
11701
|
]);
|
|
12930
|
-
var
|
|
11702
|
+
var zClientResponse2 = union([
|
|
12931
11703
|
object({
|
|
12932
|
-
id:
|
|
11704
|
+
id: zRequestId2,
|
|
12933
11705
|
result: union([
|
|
12934
|
-
|
|
12935
|
-
|
|
11706
|
+
zWriteTextFileResponse,
|
|
11707
|
+
zReadTextFileResponse,
|
|
11708
|
+
zRequestPermissionResponse2,
|
|
11709
|
+
zCreateTerminalResponse,
|
|
11710
|
+
zTerminalOutputResponse,
|
|
11711
|
+
zReleaseTerminalResponse,
|
|
11712
|
+
zWaitForTerminalExitResponse,
|
|
11713
|
+
zKillTerminalResponse,
|
|
11714
|
+
zCreateElicitationResponse2,
|
|
12936
11715
|
zMessageMcpResponse2,
|
|
12937
|
-
|
|
11716
|
+
zExtResponse2
|
|
12938
11717
|
])
|
|
12939
11718
|
}),
|
|
12940
11719
|
object({
|
|
12941
|
-
id:
|
|
12942
|
-
error:
|
|
11720
|
+
id: zRequestId2,
|
|
11721
|
+
error: zError2
|
|
12943
11722
|
})
|
|
12944
11723
|
]);
|
|
12945
|
-
var
|
|
12946
|
-
sessionId:
|
|
11724
|
+
var zCancelNotification = object({
|
|
11725
|
+
sessionId: zSessionId2,
|
|
12947
11726
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12948
11727
|
});
|
|
12949
11728
|
var zMessageMcpNotification2 = object({
|
|
@@ -12953,39 +11732,35 @@ var zMessageMcpNotification2 = object({
|
|
|
12953
11732
|
params: record(string2(), unknown()).nullish(),
|
|
12954
11733
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12955
11734
|
});
|
|
12956
|
-
var
|
|
11735
|
+
var zClientNotification2 = object({
|
|
12957
11736
|
method: string2(),
|
|
12958
|
-
params: union([
|
|
12959
|
-
zCancelSessionNotification2,
|
|
12960
|
-
zMessageMcpNotification2,
|
|
12961
|
-
zExtNotification3
|
|
12962
|
-
]).nullish()
|
|
11737
|
+
params: union([zCancelNotification, zMessageMcpNotification2, zExtNotification2]).nullish()
|
|
12963
11738
|
});
|
|
12964
|
-
var
|
|
12965
|
-
requestId:
|
|
11739
|
+
var zCancelRequestNotification2 = object({
|
|
11740
|
+
requestId: zRequestId2,
|
|
12966
11741
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12967
11742
|
});
|
|
12968
|
-
var zInitializeProxyRequest2 =
|
|
11743
|
+
var zInitializeProxyRequest2 = zInitializeRequest2;
|
|
12969
11744
|
var zProxySuccessorRequest2 = object({
|
|
12970
11745
|
method: string2(),
|
|
12971
11746
|
params: unknown().optional(),
|
|
12972
11747
|
_meta: defaultOnError(record(string2(), unknown()).nullish(), () => void 0)
|
|
12973
11748
|
});
|
|
12974
11749
|
var zProxyRequest2 = object({
|
|
12975
|
-
id:
|
|
11750
|
+
id: zRequestId2,
|
|
12976
11751
|
method: string2(),
|
|
12977
11752
|
params: union([zInitializeProxyRequest2, zProxySuccessorRequest2]).nullish()
|
|
12978
11753
|
});
|
|
12979
|
-
var zInitializeProxyResponse2 =
|
|
11754
|
+
var zInitializeProxyResponse2 = zInitializeResponse2;
|
|
12980
11755
|
var zProxySuccessorResponse2 = unknown();
|
|
12981
11756
|
var zProxyResponse2 = union([
|
|
12982
11757
|
object({
|
|
12983
|
-
id:
|
|
11758
|
+
id: zRequestId2,
|
|
12984
11759
|
result: union([zInitializeProxyResponse2, zProxySuccessorResponse2])
|
|
12985
11760
|
}),
|
|
12986
11761
|
object({
|
|
12987
|
-
id:
|
|
12988
|
-
error:
|
|
11762
|
+
id: zRequestId2,
|
|
11763
|
+
error: zError2
|
|
12989
11764
|
})
|
|
12990
11765
|
]);
|
|
12991
11766
|
var zProxySuccessorNotification2 = object({
|
|
@@ -13001,7 +11776,7 @@ var zProxyNotification2 = object({
|
|
|
13001
11776
|
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/core/connection-access.js
|
|
13002
11777
|
var connectionContextOf = /* @__PURE__ */ Symbol("connectionContextOf");
|
|
13003
11778
|
|
|
13004
|
-
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/v2/
|
|
11779
|
+
// ../../node_modules/.pnpm/@agentclientprotocol+sdk@2.7.0_zod@4.6.7/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js
|
|
13005
11780
|
function ndJsonStream2(output, input2, options2) {
|
|
13006
11781
|
return ndJsonStream(output, input2, options2);
|
|
13007
11782
|
}
|
|
@@ -13352,12 +12127,24 @@ var methods = {
|
|
|
13352
12127
|
initialize: AGENT_METHODS.initialize,
|
|
13353
12128
|
auth: {
|
|
13354
12129
|
login: AGENT_METHODS.auth_login,
|
|
13355
|
-
logout: AGENT_METHODS.auth_logout
|
|
12130
|
+
logout: AGENT_METHODS.auth_logout,
|
|
12131
|
+
status: AGENT_METHODS.auth_status
|
|
12132
|
+
},
|
|
12133
|
+
providers: {
|
|
12134
|
+
list: AGENT_METHODS.providers_list,
|
|
12135
|
+
set: AGENT_METHODS.providers_set,
|
|
12136
|
+
disable: AGENT_METHODS.providers_disable
|
|
13356
12137
|
},
|
|
13357
12138
|
session: {
|
|
13358
12139
|
new: AGENT_METHODS.session_new,
|
|
13359
12140
|
list: AGENT_METHODS.session_list,
|
|
13360
12141
|
delete: AGENT_METHODS.session_delete,
|
|
12142
|
+
fork: AGENT_METHODS.session_fork,
|
|
12143
|
+
archive: AGENT_METHODS.session_archive,
|
|
12144
|
+
unarchive: AGENT_METHODS.session_unarchive,
|
|
12145
|
+
status: AGENT_METHODS.session_status,
|
|
12146
|
+
options: AGENT_METHODS.session_options,
|
|
12147
|
+
setTitle: AGENT_METHODS.session_set_title,
|
|
13361
12148
|
resume: AGENT_METHODS.session_resume,
|
|
13362
12149
|
close: AGENT_METHODS.session_close,
|
|
13363
12150
|
setConfigOption: AGENT_METHODS.session_set_config_option,
|
|
@@ -13369,6 +12156,9 @@ var methods = {
|
|
|
13369
12156
|
},
|
|
13370
12157
|
terminal: {
|
|
13371
12158
|
cancel: AGENT_METHODS.terminal_cancel
|
|
12159
|
+
},
|
|
12160
|
+
mcp: {
|
|
12161
|
+
message: AGENT_METHODS.mcp_message
|
|
13372
12162
|
}
|
|
13373
12163
|
},
|
|
13374
12164
|
client: {
|
|
@@ -13376,9 +12166,15 @@ var methods = {
|
|
|
13376
12166
|
requestPermission: CLIENT_METHODS.session_request_permission,
|
|
13377
12167
|
update: CLIENT_METHODS.session_update
|
|
13378
12168
|
},
|
|
12169
|
+
mcp: {
|
|
12170
|
+
message: CLIENT_METHODS.mcp_message
|
|
12171
|
+
},
|
|
13379
12172
|
elicitation: {
|
|
13380
12173
|
create: CLIENT_METHODS.elicitation_create,
|
|
13381
12174
|
complete: CLIENT_METHODS.elicitation_complete
|
|
12175
|
+
},
|
|
12176
|
+
auth: {
|
|
12177
|
+
statusUpdate: CLIENT_METHODS.auth_status_update
|
|
13382
12178
|
}
|
|
13383
12179
|
},
|
|
13384
12180
|
protocol: {
|
|
@@ -14088,27 +12884,40 @@ function specsByMethod(specs) {
|
|
|
14088
12884
|
var agentRequestSpecs = {
|
|
14089
12885
|
initialize: requestSpec(AGENT_METHODS.initialize, parseV2InitializeRequest, mapV2InitializeResponse, serializeV2InitializeResponse),
|
|
14090
12886
|
loginAuth: requestSpec(AGENT_METHODS.auth_login, zLoginAuthRequest, zLoginAuthResponse, emptyObjectResponse),
|
|
12887
|
+
unstable_listProviders: requestSpec(AGENT_METHODS.providers_list, zListProvidersRequest, zListProvidersResponse),
|
|
12888
|
+
unstable_setProvider: requestSpec(AGENT_METHODS.providers_set, zSetProviderRequest, zSetProviderResponse, emptyObjectResponse),
|
|
12889
|
+
unstable_disableProvider: requestSpec(AGENT_METHODS.providers_disable, zDisableProviderRequest, zDisableProviderResponse, emptyObjectResponse),
|
|
14091
12890
|
newSession: requestSpec(AGENT_METHODS.session_new, received(zNewSessionRequest), received(zNewSessionResponse)),
|
|
14092
12891
|
setSessionConfigOption: requestSpec(AGENT_METHODS.session_set_config_option, received(zSetSessionConfigOptionRequest), received(zSetSessionConfigOptionResponse)),
|
|
14093
12892
|
prompt: requestSpec(AGENT_METHODS.session_prompt, received(zPromptRequest), received(zPromptResponse)),
|
|
14094
12893
|
listSessions: requestSpec(AGENT_METHODS.session_list, zListSessionsRequest, zListSessionsResponse),
|
|
14095
12894
|
deleteSession: requestSpec(AGENT_METHODS.session_delete, zDeleteSessionRequest, zDeleteSessionResponse, emptyObjectResponse),
|
|
12895
|
+
unstable_forkSession: requestSpec(AGENT_METHODS.session_fork, received(zForkSessionRequest), received(zForkSessionResponse)),
|
|
12896
|
+
unstable_archiveSession: requestSpec(AGENT_METHODS.session_archive, zArchiveSessionRequest, zArchiveSessionResponse, emptyObjectResponse),
|
|
12897
|
+
unstable_unarchiveSession: requestSpec(AGENT_METHODS.session_unarchive, zUnarchiveSessionRequest, zUnarchiveSessionResponse, emptyObjectResponse),
|
|
12898
|
+
unstable_sessionStatus: requestSpec(AGENT_METHODS.session_status, zSessionStatusRequest, received(zSessionStatusResponse)),
|
|
12899
|
+
unstable_sessionOptions: requestSpec(AGENT_METHODS.session_options, zSessionOptionsRequest, received(zSessionOptionsResponse)),
|
|
12900
|
+
unstable_setSessionTitle: requestSpec(AGENT_METHODS.session_set_title, zSetSessionTitleRequest, zSetSessionTitleResponse),
|
|
14096
12901
|
resumeSession: requestSpec(AGENT_METHODS.session_resume, received(zResumeSessionRequest), received(zResumeSessionResponse)),
|
|
14097
12902
|
closeSession: requestSpec(AGENT_METHODS.session_close, zCloseSessionRequest, zCloseSessionResponse, emptyObjectResponse),
|
|
14098
12903
|
cancelToolCall: requestSpec(AGENT_METHODS.tool_call_cancel, zCancelToolCallRequest, zCancelToolCallResponse, emptyObjectResponse),
|
|
14099
12904
|
cancelTerminal: requestSpec(AGENT_METHODS.terminal_cancel, zCancelTerminalRequest, zCancelTerminalResponse, emptyObjectResponse),
|
|
14100
|
-
logoutAuth: requestSpec(AGENT_METHODS.auth_logout, zLogoutAuthRequest, zLogoutAuthResponse, emptyObjectResponse)
|
|
12905
|
+
logoutAuth: requestSpec(AGENT_METHODS.auth_logout, zLogoutAuthRequest, zLogoutAuthResponse, emptyObjectResponse),
|
|
12906
|
+
unstable_authStatus: requestSpec(AGENT_METHODS.auth_status, zAuthStatusRequest, zAuthStatusResponse)
|
|
14101
12907
|
};
|
|
14102
12908
|
var agentNotificationSpecs = {
|
|
14103
|
-
cancelSession: notificationSpec(AGENT_METHODS.session_cancel, zCancelSessionNotification)
|
|
12909
|
+
cancelSession: notificationSpec(AGENT_METHODS.session_cancel, zCancelSessionNotification),
|
|
12910
|
+
unstable_messageMcp: notificationSpec(AGENT_METHODS.mcp_message, zMessageMcpNotification)
|
|
14104
12911
|
};
|
|
14105
12912
|
var clientRequestSpecs = {
|
|
14106
12913
|
requestPermission: requestSpec(CLIENT_METHODS.session_request_permission, received(zRequestPermissionRequest), received(zRequestPermissionResponse)),
|
|
12914
|
+
unstable_messageMcp: requestSpec(CLIENT_METHODS.mcp_message, zMessageMcpRequest, zMessageMcpResponse),
|
|
14107
12915
|
createElicitation: requestSpec(CLIENT_METHODS.elicitation_create, received(zCreateElicitationRequest), received(zCreateElicitationResponse))
|
|
14108
12916
|
};
|
|
14109
12917
|
var clientNotificationSpecs = {
|
|
14110
12918
|
sessionUpdate: notificationSpec(CLIENT_METHODS.session_update, received(zUpdateSessionNotification)),
|
|
14111
|
-
completeElicitation: notificationSpec(CLIENT_METHODS.elicitation_complete, zCompleteElicitationNotification)
|
|
12919
|
+
completeElicitation: notificationSpec(CLIENT_METHODS.elicitation_complete, zCompleteElicitationNotification),
|
|
12920
|
+
unstable_authStatusUpdate: notificationSpec(CLIENT_METHODS.auth_status_update, zAuthStatusUpdateNotification)
|
|
14112
12921
|
};
|
|
14113
12922
|
var agentRequestSpecsByMethod = specsByMethod(agentRequestSpecs);
|
|
14114
12923
|
var agentNotificationSpecsByMethod = specsByMethod(agentNotificationSpecs);
|
|
@@ -14631,6 +13440,84 @@ var TerminalOutput = class {
|
|
|
14631
13440
|
}
|
|
14632
13441
|
};
|
|
14633
13442
|
|
|
13443
|
+
// ../daemon/src/agents/tool-info.ts
|
|
13444
|
+
init_src();
|
|
13445
|
+
var isKind = (kind) => TOOL_KINDS.includes(kind);
|
|
13446
|
+
var ToolInfos = class {
|
|
13447
|
+
#said = /* @__PURE__ */ new Map();
|
|
13448
|
+
/** Whether this tool call was heard of before. */
|
|
13449
|
+
has(id) {
|
|
13450
|
+
return this.#said.has(id);
|
|
13451
|
+
}
|
|
13452
|
+
/** What this update says of its tool call that was not said before. */
|
|
13453
|
+
news(u, last = false) {
|
|
13454
|
+
const fresh = !this.#said.has(u.toolCallId);
|
|
13455
|
+
const said = this.#said.get(u.toolCallId) ?? {};
|
|
13456
|
+
this.#said.set(u.toolCallId, said);
|
|
13457
|
+
if (u.rawInput !== void 0) said.pending = truncate(JSON.stringify(u.rawInput) ?? "");
|
|
13458
|
+
const heard = {
|
|
13459
|
+
...u.title && { title: u.title },
|
|
13460
|
+
...u.kind && { toolKind: isKind(u.kind) ? u.kind : "other" },
|
|
13461
|
+
...u.locations && {
|
|
13462
|
+
locations: u.locations.map(({ path, line }) => ({ path, ...line && { line } }))
|
|
13463
|
+
}
|
|
13464
|
+
};
|
|
13465
|
+
const news = {};
|
|
13466
|
+
for (const [key, value] of Object.entries(heard)) {
|
|
13467
|
+
const text = JSON.stringify(value);
|
|
13468
|
+
if (said[key] === text || said[key] === void 0 && text === "[]") continue;
|
|
13469
|
+
said[key] = text;
|
|
13470
|
+
Object.assign(news, { [key]: value });
|
|
13471
|
+
}
|
|
13472
|
+
const input2 = said.pending;
|
|
13473
|
+
if (input2 !== void 0 && input2 !== said.input && (fresh || last || Object.keys(news).length))
|
|
13474
|
+
news.input = said.input = input2;
|
|
13475
|
+
return news;
|
|
13476
|
+
}
|
|
13477
|
+
delete(id) {
|
|
13478
|
+
this.#said.delete(id);
|
|
13479
|
+
}
|
|
13480
|
+
};
|
|
13481
|
+
|
|
13482
|
+
// ../daemon/src/agents/diffs.ts
|
|
13483
|
+
var MAX_PATCH = 32 * 1024;
|
|
13484
|
+
function toolDiff(u) {
|
|
13485
|
+
const entries = u.content?.filter(ToolCallContent.isDiff) ?? [];
|
|
13486
|
+
if (!entries.length) return;
|
|
13487
|
+
const files = [];
|
|
13488
|
+
const patches = [];
|
|
13489
|
+
for (const entry2 of entries) {
|
|
13490
|
+
for (const change of entry2.changes ?? []) {
|
|
13491
|
+
if (typeof change.path !== "string") continue;
|
|
13492
|
+
files.push({
|
|
13493
|
+
operation: String(change.operation),
|
|
13494
|
+
path: change.path,
|
|
13495
|
+
..."oldPath" in change && typeof change.oldPath === "string" && { oldPath: change.oldPath },
|
|
13496
|
+
...typeof change.fileType === "string" && { fileType: change.fileType }
|
|
13497
|
+
});
|
|
13498
|
+
}
|
|
13499
|
+
if (entry2.patch?.format === "git_patch" && typeof entry2.patch.text === "string")
|
|
13500
|
+
patches.push(entry2.patch.text.replace(/\n?$/, "\n"));
|
|
13501
|
+
}
|
|
13502
|
+
const patch = patches.join("");
|
|
13503
|
+
if (!files.length && !patch) return;
|
|
13504
|
+
if (patch.length > MAX_PATCH) return { files, tooLarge: true };
|
|
13505
|
+
return { files, ...patch && { patch } };
|
|
13506
|
+
}
|
|
13507
|
+
var ToolDiffs = class {
|
|
13508
|
+
diffs = /* @__PURE__ */ new Map();
|
|
13509
|
+
receive(u) {
|
|
13510
|
+
const diff = toolDiff(u);
|
|
13511
|
+
if (diff) this.diffs.set(u.toolCallId, diff);
|
|
13512
|
+
}
|
|
13513
|
+
/** The call's diff, if it completed with one: a failed edit changed nothing. Forgets it. */
|
|
13514
|
+
take(u) {
|
|
13515
|
+
const diff = this.diffs.get(u.toolCallId);
|
|
13516
|
+
this.diffs.delete(u.toolCallId);
|
|
13517
|
+
return u.status === "completed" ? diff : void 0;
|
|
13518
|
+
}
|
|
13519
|
+
};
|
|
13520
|
+
|
|
14634
13521
|
// ../daemon/src/agents/subagents.ts
|
|
14635
13522
|
function stateOf(state) {
|
|
14636
13523
|
if (state?.state === "running") return "running";
|
|
@@ -14663,7 +13550,9 @@ function nativeSubagents(provider, emit2) {
|
|
|
14663
13550
|
path: [...child2?.path ?? [], u.sessionId],
|
|
14664
13551
|
messages: /* @__PURE__ */ new Map(),
|
|
14665
13552
|
dirty: /* @__PURE__ */ new Set(),
|
|
14666
|
-
terminal: new TerminalOutput()
|
|
13553
|
+
terminal: new TerminalOutput(),
|
|
13554
|
+
tools: new ToolInfos(),
|
|
13555
|
+
diffs: new ToolDiffs()
|
|
14667
13556
|
};
|
|
14668
13557
|
children.set(u.sessionId, target);
|
|
14669
13558
|
}
|
|
@@ -14699,16 +13588,24 @@ function nativeSubagents(provider, emit2) {
|
|
|
14699
13588
|
if (!chunk) flush(child2);
|
|
14700
13589
|
} else if (SessionUpdate.isToolCallUpdate(u)) {
|
|
14701
13590
|
flush(child2);
|
|
13591
|
+
child2.diffs.receive(u);
|
|
14702
13592
|
const output = child2.terminal.toolResult(provider, u);
|
|
13593
|
+
const fresh = !child2.tools.has(u.toolCallId);
|
|
13594
|
+
const news = child2.tools.news(u, output !== void 0);
|
|
13595
|
+
if (output !== void 0) child2.tools.delete(u.toolCallId);
|
|
13596
|
+
const diff = output !== void 0 ? child2.diffs.take(u) : void 0;
|
|
13597
|
+
const name = fresh && (u.name ?? u.title);
|
|
13598
|
+
if (!fresh && !Object.keys(news).length && output === void 0) return true;
|
|
14703
13599
|
send(child2, {
|
|
14704
13600
|
kind: "tool",
|
|
14705
13601
|
id: u.toolCallId,
|
|
14706
|
-
...
|
|
14707
|
-
...
|
|
13602
|
+
...name && { name },
|
|
13603
|
+
...news,
|
|
14708
13604
|
...output !== void 0 && {
|
|
14709
13605
|
output,
|
|
14710
13606
|
isError: u.status !== "completed"
|
|
14711
|
-
}
|
|
13607
|
+
},
|
|
13608
|
+
...diff && { diff }
|
|
14712
13609
|
});
|
|
14713
13610
|
} else if (SessionUpdate.isStateUpdate(u)) {
|
|
14714
13611
|
flush(child2);
|
|
@@ -14721,27 +13618,110 @@ function nativeSubagents(provider, emit2) {
|
|
|
14721
13618
|
return { receive };
|
|
14722
13619
|
}
|
|
14723
13620
|
|
|
13621
|
+
// ../daemon/src/agents/suggestions.ts
|
|
13622
|
+
function promptSuggestion(u) {
|
|
13623
|
+
const list = u.sessionUpdate === "prompt_suggestions_update" ? u.suggestions : u.sessionUpdate === "session_info_update" ? u._meta?.promptSuggestions?.suggestions : void 0;
|
|
13624
|
+
if (!Array.isArray(list)) return void 0;
|
|
13625
|
+
for (const item of list) {
|
|
13626
|
+
const text = typeof item?.text === "string" ? item.text : Array.isArray(item?.prompt) ? item.prompt.flatMap((c) => c?.type === "text" && typeof c.text === "string" ? [c.text] : []).join("") : "";
|
|
13627
|
+
if (text.trim()) return text.trim();
|
|
13628
|
+
}
|
|
13629
|
+
return null;
|
|
13630
|
+
}
|
|
13631
|
+
|
|
14724
13632
|
// ../daemon/src/agents/acp.ts
|
|
14725
13633
|
var CODEX_OTHER = "None of the above";
|
|
14726
13634
|
var ACP_MODES = {
|
|
14727
13635
|
claude: { auto: "auto", "full-access": "bypassPermissions" },
|
|
14728
13636
|
codex: { auto: "agent", "full-access": "agent-full-access" }
|
|
14729
13637
|
};
|
|
13638
|
+
function turnUsage(usage) {
|
|
13639
|
+
if (!usage?.totalTokens) return {};
|
|
13640
|
+
const {
|
|
13641
|
+
totalTokens,
|
|
13642
|
+
inputTokens,
|
|
13643
|
+
outputTokens,
|
|
13644
|
+
thoughtTokens,
|
|
13645
|
+
cachedReadTokens,
|
|
13646
|
+
cachedWriteTokens
|
|
13647
|
+
} = usage;
|
|
13648
|
+
return {
|
|
13649
|
+
usage: {
|
|
13650
|
+
totalTokens,
|
|
13651
|
+
inputTokens,
|
|
13652
|
+
outputTokens,
|
|
13653
|
+
...thoughtTokens && { thoughtTokens },
|
|
13654
|
+
...cachedReadTokens && { cachedReadTokens },
|
|
13655
|
+
...cachedWriteTokens && { cachedWriteTokens }
|
|
13656
|
+
}
|
|
13657
|
+
};
|
|
13658
|
+
}
|
|
13659
|
+
var UNOFFERED = {
|
|
13660
|
+
claude: ["remote-control", "rename", "model", "effort", "config"],
|
|
13661
|
+
codex: ["logout", "rename"]
|
|
13662
|
+
};
|
|
13663
|
+
function offeredCommands(provider, list) {
|
|
13664
|
+
return list.flatMap((command) => {
|
|
13665
|
+
if (!AvailableCommand.isCommand(command) || command.name.startsWith("__") || UNOFFERED[provider].includes(command.name))
|
|
13666
|
+
return [];
|
|
13667
|
+
const action = command._meta?.jetbrains?.air?.commandAction;
|
|
13668
|
+
if (action?.kind === "setConfigOption") return [];
|
|
13669
|
+
const hint = command.input && "hint" in command.input ? command.input.hint : void 0;
|
|
13670
|
+
return [
|
|
13671
|
+
{
|
|
13672
|
+
name: command.name,
|
|
13673
|
+
...command.description && { description: command.description },
|
|
13674
|
+
...typeof hint === "string" && hint && { hint }
|
|
13675
|
+
}
|
|
13676
|
+
];
|
|
13677
|
+
});
|
|
13678
|
+
}
|
|
14730
13679
|
function connectAgent(provider, options2, token, stdin2, stdout2, emit2) {
|
|
14731
13680
|
let id = "";
|
|
14732
13681
|
let running = false;
|
|
14733
|
-
|
|
13682
|
+
let tasks = [];
|
|
13683
|
+
const publishTasks = () => emit2({ kind: "background", tasks });
|
|
13684
|
+
const background = new BackgroundTasks((snapshot) => {
|
|
13685
|
+
tasks = snapshot.map((task) => {
|
|
13686
|
+
const previous = tasks.find(
|
|
13687
|
+
(t) => t.session === task.session && t.type === task.type && t.id === task.id
|
|
13688
|
+
);
|
|
13689
|
+
if (previous)
|
|
13690
|
+
return {
|
|
13691
|
+
...task,
|
|
13692
|
+
stopId: previous.stopId,
|
|
13693
|
+
stopping: previous.stopping,
|
|
13694
|
+
stopError: previous.stopError
|
|
13695
|
+
};
|
|
13696
|
+
return { ...task, stopId: randomUUID() };
|
|
13697
|
+
});
|
|
13698
|
+
publishTasks();
|
|
13699
|
+
});
|
|
14734
13700
|
let steering = false;
|
|
14735
13701
|
const messages = /* @__PURE__ */ new Map();
|
|
14736
13702
|
const tools = /* @__PURE__ */ new Map();
|
|
13703
|
+
const toolInfos = new ToolInfos();
|
|
14737
13704
|
const terminalOutput = new TerminalOutput();
|
|
13705
|
+
const diffs = new ToolDiffs();
|
|
14738
13706
|
const questions = /* @__PURE__ */ new Map();
|
|
13707
|
+
let cost;
|
|
13708
|
+
let commands;
|
|
13709
|
+
function offer(list) {
|
|
13710
|
+
if (!list) return;
|
|
13711
|
+
const offered = offeredCommands(provider, list);
|
|
13712
|
+
const said = JSON.stringify(offered);
|
|
13713
|
+
if (said === commands) return;
|
|
13714
|
+
commands = said;
|
|
13715
|
+
emit2({ kind: "commands", commands: offered });
|
|
13716
|
+
}
|
|
14739
13717
|
function flush() {
|
|
14740
13718
|
for (const text of messages.values()) if (text) emit2({ kind: "text", text });
|
|
14741
13719
|
messages.clear();
|
|
14742
13720
|
}
|
|
14743
13721
|
function update(u) {
|
|
14744
13722
|
if (terminalOutput.receive(u)) return;
|
|
13723
|
+
const suggestion = promptSuggestion(u);
|
|
13724
|
+
if (suggestion !== void 0) emit2({ kind: "suggestion", text: suggestion });
|
|
14745
13725
|
switch (true) {
|
|
14746
13726
|
case SessionUpdate.isStateUpdate(u):
|
|
14747
13727
|
if (u.state === "running" || u.state === "requires_action") {
|
|
@@ -14752,12 +13732,14 @@ function connectAgent(provider, options2, token, stdin2, stdout2, emit2) {
|
|
|
14752
13732
|
running = false;
|
|
14753
13733
|
terminalOutput.retainOpen(tools);
|
|
14754
13734
|
for (const cancel of questions.values()) cancel();
|
|
13735
|
+
const usage = turnUsage(u.usage);
|
|
14755
13736
|
if (u.stopReason && u.stopReason !== "end_turn")
|
|
14756
13737
|
emit2({
|
|
14757
13738
|
kind: "turn.failed",
|
|
14758
|
-
error: u.stopReason === "cancelled" ? "Stopped" : (IdleStateUpdate.isError(u) ? u.error?.message : void 0) ?? String(u.stopReason)
|
|
13739
|
+
error: u.stopReason === "cancelled" ? "Stopped" : (IdleStateUpdate.isError(u) ? u.error?.message : void 0) ?? String(u.stopReason),
|
|
13740
|
+
...usage
|
|
14759
13741
|
});
|
|
14760
|
-
else emit2({ kind: "turn.completed" });
|
|
13742
|
+
else emit2({ kind: "turn.completed", ...usage });
|
|
14761
13743
|
}
|
|
14762
13744
|
break;
|
|
14763
13745
|
case SessionUpdate.isAgentMessageChunk(u):
|
|
@@ -14790,6 +13772,15 @@ function connectAgent(provider, options2, token, stdin2, stdout2, emit2) {
|
|
|
14790
13772
|
}
|
|
14791
13773
|
break;
|
|
14792
13774
|
}
|
|
13775
|
+
// How full the context is, after every model step. Claude says what the session has
|
|
13776
|
+
// cost so far, but not every time: what it said last stands until it says more.
|
|
13777
|
+
case SessionUpdate.isUsageUpdate(u):
|
|
13778
|
+
if (u.cost) cost = { amount: u.cost.amount, currency: u.cost.currency };
|
|
13779
|
+
emit2({ kind: "usage", usage: { used: u.used, size: u.size, ...cost && { cost } } });
|
|
13780
|
+
break;
|
|
13781
|
+
case SessionUpdate.isAvailableCommandsUpdate(u):
|
|
13782
|
+
offer(u.availableCommands);
|
|
13783
|
+
break;
|
|
14793
13784
|
// The pinned wrappers use this extension to withdraw one checklist.
|
|
14794
13785
|
case (u.sessionUpdate === "plan_removed" && "planId" in u && typeof u.planId === "string"):
|
|
14795
13786
|
emit2({ kind: "plan", id: u.planId, plan: null });
|
|
@@ -14797,23 +13788,40 @@ function connectAgent(provider, options2, token, stdin2, stdout2, emit2) {
|
|
|
14797
13788
|
case SessionUpdate.isToolCallUpdate(u): {
|
|
14798
13789
|
flush();
|
|
14799
13790
|
if (tools.get(u.toolCallId) === "closed") break;
|
|
13791
|
+
diffs.receive(u);
|
|
13792
|
+
const output = terminalOutput.toolResult(provider, u);
|
|
13793
|
+
const { input: input2 = "", ...info } = toolInfos.news(u, output !== void 0);
|
|
14800
13794
|
if (!tools.has(u.toolCallId)) {
|
|
14801
13795
|
tools.set(u.toolCallId, "open");
|
|
14802
13796
|
emit2({
|
|
14803
13797
|
kind: "tool",
|
|
14804
13798
|
id: u.toolCallId,
|
|
14805
13799
|
name: u.name ?? u.title ?? "Tool",
|
|
14806
|
-
input:
|
|
13800
|
+
input: input2,
|
|
13801
|
+
...info
|
|
14807
13802
|
});
|
|
13803
|
+
} else if (input2 || Object.keys(info).length) {
|
|
13804
|
+
emit2({ kind: "tool.update", id: u.toolCallId, ...input2 && { input: input2 }, ...info });
|
|
14808
13805
|
}
|
|
14809
|
-
const output = terminalOutput.toolResult(provider, u);
|
|
14810
13806
|
if (output !== void 0) {
|
|
14811
13807
|
tools.set(u.toolCallId, "closed");
|
|
13808
|
+
toolInfos.delete(u.toolCallId);
|
|
13809
|
+
const diff = diffs.take(u);
|
|
14812
13810
|
if (u.status !== "cancelled")
|
|
14813
|
-
emit2({
|
|
13811
|
+
emit2({
|
|
13812
|
+
kind: "tool.result",
|
|
13813
|
+
id: u.toolCallId,
|
|
13814
|
+
output,
|
|
13815
|
+
isError: u.status === "failed",
|
|
13816
|
+
...diff && { diff }
|
|
13817
|
+
});
|
|
14814
13818
|
}
|
|
14815
13819
|
break;
|
|
14816
13820
|
}
|
|
13821
|
+
// What the agent calls its session; the forge decides whether it names the workspace.
|
|
13822
|
+
case (SessionUpdate.isSessionInfoUpdate(u) && !!u.title?.trim()):
|
|
13823
|
+
emit2({ kind: "title", title: u.title });
|
|
13824
|
+
break;
|
|
14817
13825
|
}
|
|
14818
13826
|
}
|
|
14819
13827
|
const children = nativeSubagents(provider, emit2);
|
|
@@ -14912,8 +13920,13 @@ function connectAgent(provider, options2, token, stdin2, stdout2, emit2) {
|
|
|
14912
13920
|
info: { name: "Geordi", version: "1" },
|
|
14913
13921
|
capabilities: {
|
|
14914
13922
|
elicitation: { form: {} },
|
|
14915
|
-
|
|
14916
|
-
|
|
13923
|
+
session: { promptSuggestions: {} },
|
|
13924
|
+
// Both wrappers suggest what to say next only to a client that declares AIR's
|
|
13925
|
+
// `_meta` (see `suggestions.ts`). For Claude it changes nothing else Geordi reads.
|
|
13926
|
+
_meta: {
|
|
13927
|
+
jetbrains: {
|
|
13928
|
+
air: { version: 1, capabilities: provider === "codex" ? ["asyncTasks"] : [] }
|
|
13929
|
+
}
|
|
14917
13930
|
}
|
|
14918
13931
|
}
|
|
14919
13932
|
});
|
|
@@ -14951,6 +13964,7 @@ function connectAgent(provider, options2, token, stdin2, stdout2, emit2) {
|
|
|
14951
13964
|
const session = options2.resumeId ? await agent2.request(methods.agent.session.resume, { ...setup, sessionId: options2.resumeId }) : await agent2.request(methods.agent.session.new, setup);
|
|
14952
13965
|
id = options2.resumeId ?? ("sessionId" in session ? String(session.sessionId) : "");
|
|
14953
13966
|
if (!id) throw new Error("Missing ACP session ID");
|
|
13967
|
+
offer(session.availableCommands);
|
|
14954
13968
|
let config2 = session.configOptions ?? [];
|
|
14955
13969
|
for (const [category, value] of [
|
|
14956
13970
|
["model", options2.settings.model],
|
|
@@ -14995,6 +14009,40 @@ function connectAgent(provider, options2, token, stdin2, stdout2, emit2) {
|
|
|
14995
14009
|
}
|
|
14996
14010
|
await agent2.request(methods.agent.session.prompt, { sessionId: id, prompt });
|
|
14997
14011
|
},
|
|
14012
|
+
async stopTask(stopId) {
|
|
14013
|
+
const task = tasks.find((t) => t.stopId === stopId);
|
|
14014
|
+
if (!task || task.stopping) return;
|
|
14015
|
+
task.stopping = true;
|
|
14016
|
+
delete task.stopError;
|
|
14017
|
+
publishTasks();
|
|
14018
|
+
const sessionId = task.session ?? id;
|
|
14019
|
+
try {
|
|
14020
|
+
if (task.type === "subagent") {
|
|
14021
|
+
await agent2.notify(methods.agent.session.cancel, { sessionId: task.id });
|
|
14022
|
+
} else if (provider === "codex") {
|
|
14023
|
+
const result = await agent2.request("_session/async_task/stop", {
|
|
14024
|
+
sessionId,
|
|
14025
|
+
asyncTaskId: task.id
|
|
14026
|
+
});
|
|
14027
|
+
if (!result.stopped) throw new Error("The agent could not stop this task.");
|
|
14028
|
+
} else if (task.type === "terminal") {
|
|
14029
|
+
await agent2.request(methods.agent.terminal.cancel, { sessionId, terminalId: task.id });
|
|
14030
|
+
} else {
|
|
14031
|
+
await agent2.request(methods.agent.toolCall.cancel, { sessionId, toolCallId: task.id });
|
|
14032
|
+
}
|
|
14033
|
+
} catch (error2) {
|
|
14034
|
+
const current = tasks.find((t) => t.stopId === stopId);
|
|
14035
|
+
if (current) {
|
|
14036
|
+
current.stopError = error2 instanceof Error ? error2.message : "Could not stop this task.";
|
|
14037
|
+
}
|
|
14038
|
+
} finally {
|
|
14039
|
+
const current = tasks.find((t) => t.stopId === stopId);
|
|
14040
|
+
if (current) {
|
|
14041
|
+
delete current.stopping;
|
|
14042
|
+
publishTasks();
|
|
14043
|
+
}
|
|
14044
|
+
}
|
|
14045
|
+
},
|
|
14998
14046
|
interrupt: () => agent2.notify(methods.agent.session.cancel, { sessionId: id }),
|
|
14999
14047
|
answer: (key, answers) => questions.get(key)?.(answers),
|
|
15000
14048
|
busy: () => background.busy() || running,
|
|
@@ -15007,12 +14055,12 @@ var POLL_MS = 100;
|
|
|
15007
14055
|
var KILL_AFTER_MS = 1e4;
|
|
15008
14056
|
var IDLE_MS = Number(process.env.GEORDI_SESSION_IDLE_MS) || 5 * 6e4;
|
|
15009
14057
|
var dir = process.argv[2];
|
|
15010
|
-
var file = (name) =>
|
|
14058
|
+
var file = (name) => join2(dir, name);
|
|
15011
14059
|
var { agent, options, apiToken } = JSON.parse(readFileSync(file("meta.json"), "utf8"));
|
|
15012
14060
|
var cmd = agent === "codex" ? "codex-acp" : "claude-agent-acp";
|
|
15013
|
-
var bundled =
|
|
15014
|
-
var entry = process.argv[3] ?? (existsSync2(bundled) ? bundled :
|
|
15015
|
-
|
|
14061
|
+
var bundled = join2(import.meta.dirname, `${cmd}.js`);
|
|
14062
|
+
var entry = process.argv[3] ?? (existsSync2(bundled) ? bundled : join2(
|
|
14063
|
+
dirname2(createRequire(import.meta.url).resolve(`@agentclientprotocol/${cmd}/package.json`)),
|
|
15016
14064
|
"dist/index.js"
|
|
15017
14065
|
));
|
|
15018
14066
|
for (const signal of ["SIGTERM", "SIGINT", "SIGHUP"]) process.on(signal, () => {
|
|
@@ -15042,7 +14090,7 @@ function installed(name) {
|
|
|
15042
14090
|
const extensions = process.platform === "win32" ? (env.PATHEXT || ".EXE").split(";") : [""];
|
|
15043
14091
|
for (const dir2 of (env.PATH ?? "").split(delimiter).filter(Boolean))
|
|
15044
14092
|
for (const extension of extensions)
|
|
15045
|
-
if (existsSync2(
|
|
14093
|
+
if (existsSync2(join2(dir2, name + extension))) return join2(dir2, name + extension);
|
|
15046
14094
|
}
|
|
15047
14095
|
var err = openSync2(file("err.log"), "a", 384);
|
|
15048
14096
|
var child = spawn(process.execPath, [entry], {
|
|
@@ -15068,8 +14116,7 @@ function emit(event) {
|
|
|
15068
14116
|
open2 = true;
|
|
15069
14117
|
} else if (event.kind === "turn.completed" || event.kind === "turn.failed") {
|
|
15070
14118
|
if (!open2) return;
|
|
15071
|
-
if (event.kind === "turn.failed" && stopped())
|
|
15072
|
-
event = { kind: "turn.failed", error: "Stopped" };
|
|
14119
|
+
if (event.kind === "turn.failed" && stopped()) event = { ...event, error: "Stopped" };
|
|
15073
14120
|
open2 = stopping = false;
|
|
15074
14121
|
clearTimeout(unstoppable);
|
|
15075
14122
|
}
|
|
@@ -15083,7 +14130,9 @@ function failed(error2) {
|
|
|
15083
14130
|
}
|
|
15084
14131
|
function kill() {
|
|
15085
14132
|
try {
|
|
15086
|
-
process.
|
|
14133
|
+
if (process.platform === "win32") {
|
|
14134
|
+
if (child.pid) signalTree(child.pid, "SIGTERM");
|
|
14135
|
+
} else process.kill(0, "SIGTERM");
|
|
15087
14136
|
} catch {
|
|
15088
14137
|
}
|
|
15089
14138
|
setTimeout(() => child.kill("SIGKILL"), KILL_AFTER_MS).unref();
|
|
@@ -15102,6 +14151,9 @@ function obey(command) {
|
|
|
15102
14151
|
if (missing) return failed(missing);
|
|
15103
14152
|
void ready.then(() => dialogue.message(command.prompt, command.images ?? [])).catch(failed);
|
|
15104
14153
|
return;
|
|
14154
|
+
case "stopTask":
|
|
14155
|
+
void dialogue.stopTask(command.stopId);
|
|
14156
|
+
return;
|
|
15105
14157
|
case "interrupt":
|
|
15106
14158
|
if (!open2 || stopping) return;
|
|
15107
14159
|
stopping = true;
|