@agent-phonon/protocol 0.2.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.
Files changed (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +70 -0
  3. package/dist/index.d.ts +24 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +24 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/json-schema/_index.json +3794 -0
  8. package/dist/json-schema/connect.hello.json +117 -0
  9. package/dist/json-schema/discovery.changed.json +190 -0
  10. package/dist/json-schema/discovery.get.json +183 -0
  11. package/dist/json-schema/discovery.list.json +182 -0
  12. package/dist/json-schema/document.prepare_upload.json +96 -0
  13. package/dist/json-schema/document.send.json +165 -0
  14. package/dist/json-schema/hook.fired.json +100 -0
  15. package/dist/json-schema/hook.resolve.json +96 -0
  16. package/dist/json-schema/interaction.cancel.json +48 -0
  17. package/dist/json-schema/interaction.request.json +376 -0
  18. package/dist/json-schema/interaction.response.json +68 -0
  19. package/dist/json-schema/project.create.json +89 -0
  20. package/dist/json-schema/project.get.json +76 -0
  21. package/dist/json-schema/project.git.deleteBranch.json +64 -0
  22. package/dist/json-schema/project.list.json +72 -0
  23. package/dist/json-schema/project.remove.json +69 -0
  24. package/dist/json-schema/project.worktree.create.json +88 -0
  25. package/dist/json-schema/project.worktree.list.json +77 -0
  26. package/dist/json-schema/project.worktree.remove.json +61 -0
  27. package/dist/json-schema/session.compress.json +72 -0
  28. package/dist/json-schema/session.create.json +128 -0
  29. package/dist/json-schema/session.inject.json +72 -0
  30. package/dist/json-schema/session.interrupt.json +58 -0
  31. package/dist/json-schema/session.list.json +127 -0
  32. package/dist/json-schema/session.send.json +132 -0
  33. package/dist/json-schema/session.status.json +94 -0
  34. package/dist/json-schema/session.switchModel.json +73 -0
  35. package/dist/json-schema/session.terminate.json +54 -0
  36. package/dist/json-schema/skill.install.json +171 -0
  37. package/dist/json-schema/skill.list.json +101 -0
  38. package/dist/json-schema/skill.uninstall.json +76 -0
  39. package/dist/json-schema/stream.ack.json +36 -0
  40. package/dist/json-schema/stream.event.json +381 -0
  41. package/dist/schemas/capabilities.d.ts +90 -0
  42. package/dist/schemas/capabilities.d.ts.map +1 -0
  43. package/dist/schemas/capabilities.js +59 -0
  44. package/dist/schemas/capabilities.js.map +1 -0
  45. package/dist/schemas/common.d.ts +66 -0
  46. package/dist/schemas/common.d.ts.map +1 -0
  47. package/dist/schemas/common.js +97 -0
  48. package/dist/schemas/common.js.map +1 -0
  49. package/dist/schemas/connect.d.ts +111 -0
  50. package/dist/schemas/connect.d.ts.map +1 -0
  51. package/dist/schemas/connect.js +46 -0
  52. package/dist/schemas/connect.js.map +1 -0
  53. package/dist/schemas/device.d.ts +221 -0
  54. package/dist/schemas/device.d.ts.map +1 -0
  55. package/dist/schemas/device.js +59 -0
  56. package/dist/schemas/device.js.map +1 -0
  57. package/dist/schemas/discovery.d.ts +892 -0
  58. package/dist/schemas/discovery.d.ts.map +1 -0
  59. package/dist/schemas/discovery.js +66 -0
  60. package/dist/schemas/discovery.js.map +1 -0
  61. package/dist/schemas/document.d.ts +351 -0
  62. package/dist/schemas/document.d.ts.map +1 -0
  63. package/dist/schemas/document.js +103 -0
  64. package/dist/schemas/document.js.map +1 -0
  65. package/dist/schemas/env.d.ts +265 -0
  66. package/dist/schemas/env.d.ts.map +1 -0
  67. package/dist/schemas/env.js +44 -0
  68. package/dist/schemas/env.js.map +1 -0
  69. package/dist/schemas/file.d.ts +274 -0
  70. package/dist/schemas/file.d.ts.map +1 -0
  71. package/dist/schemas/file.js +72 -0
  72. package/dist/schemas/file.js.map +1 -0
  73. package/dist/schemas/hook.d.ts +132 -0
  74. package/dist/schemas/hook.d.ts.map +1 -0
  75. package/dist/schemas/hook.js +58 -0
  76. package/dist/schemas/hook.js.map +1 -0
  77. package/dist/schemas/interaction.d.ts +1583 -0
  78. package/dist/schemas/interaction.d.ts.map +1 -0
  79. package/dist/schemas/interaction.js +112 -0
  80. package/dist/schemas/interaction.js.map +1 -0
  81. package/dist/schemas/jsonrpc.d.ts +314 -0
  82. package/dist/schemas/jsonrpc.d.ts.map +1 -0
  83. package/dist/schemas/jsonrpc.js +64 -0
  84. package/dist/schemas/jsonrpc.js.map +1 -0
  85. package/dist/schemas/methods.d.ts +3826 -0
  86. package/dist/schemas/methods.d.ts.map +1 -0
  87. package/dist/schemas/methods.js +311 -0
  88. package/dist/schemas/methods.js.map +1 -0
  89. package/dist/schemas/policy.d.ts +81 -0
  90. package/dist/schemas/policy.d.ts.map +1 -0
  91. package/dist/schemas/policy.js +66 -0
  92. package/dist/schemas/policy.js.map +1 -0
  93. package/dist/schemas/project.d.ts +506 -0
  94. package/dist/schemas/project.d.ts.map +1 -0
  95. package/dist/schemas/project.js +148 -0
  96. package/dist/schemas/project.js.map +1 -0
  97. package/dist/schemas/session.d.ts +730 -0
  98. package/dist/schemas/session.d.ts.map +1 -0
  99. package/dist/schemas/session.js +287 -0
  100. package/dist/schemas/session.js.map +1 -0
  101. package/dist/schemas/skill.d.ts +465 -0
  102. package/dist/schemas/skill.d.ts.map +1 -0
  103. package/dist/schemas/skill.js +103 -0
  104. package/dist/schemas/skill.js.map +1 -0
  105. package/dist/schemas/stream.d.ts +688 -0
  106. package/dist/schemas/stream.d.ts.map +1 -0
  107. package/dist/schemas/stream.js +133 -0
  108. package/dist/schemas/stream.js.map +1 -0
  109. package/package.json +52 -0
  110. package/src/index.ts +24 -0
  111. package/src/schemas/capabilities.ts +62 -0
  112. package/src/schemas/common.ts +119 -0
  113. package/src/schemas/connect.ts +50 -0
  114. package/src/schemas/device.ts +67 -0
  115. package/src/schemas/discovery.ts +80 -0
  116. package/src/schemas/document.ts +121 -0
  117. package/src/schemas/env.ts +60 -0
  118. package/src/schemas/file.ts +97 -0
  119. package/src/schemas/hook.ts +66 -0
  120. package/src/schemas/interaction.ts +135 -0
  121. package/src/schemas/jsonrpc.ts +80 -0
  122. package/src/schemas/methods.ts +414 -0
  123. package/src/schemas/policy.ts +71 -0
  124. package/src/schemas/project.ts +185 -0
  125. package/src/schemas/session.ts +336 -0
  126. package/src/schemas/skill.ts +121 -0
  127. package/src/schemas/stream.ts +149 -0
@@ -0,0 +1,3826 @@
1
+ import { z } from "zod";
2
+ export declare const METHODS: {
3
+ readonly "connect.hello": {
4
+ readonly direction: "p2s";
5
+ readonly kind: "request";
6
+ readonly params: z.ZodObject<{
7
+ protocolVersion: z.ZodString;
8
+ deviceId: z.ZodBranded<z.ZodString, "DeviceId">;
9
+ phononVersion: z.ZodOptional<z.ZodString>;
10
+ features: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
11
+ auth: z.ZodOptional<z.ZodObject<{
12
+ deviceKey: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ deviceKey: string;
15
+ }, {
16
+ deviceKey: string;
17
+ }>>;
18
+ resumeFrom: z.ZodOptional<z.ZodArray<z.ZodObject<{
19
+ sessionId: z.ZodString;
20
+ fromSeq: z.ZodNumber;
21
+ }, "strip", z.ZodTypeAny, {
22
+ sessionId: string;
23
+ fromSeq: number;
24
+ }, {
25
+ sessionId: string;
26
+ fromSeq: number;
27
+ }>, "many">>;
28
+ at: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ at: string;
31
+ protocolVersion: string;
32
+ deviceId: string & z.BRAND<"DeviceId">;
33
+ features: string[];
34
+ phononVersion?: string | undefined;
35
+ auth?: {
36
+ deviceKey: string;
37
+ } | undefined;
38
+ resumeFrom?: {
39
+ sessionId: string;
40
+ fromSeq: number;
41
+ }[] | undefined;
42
+ }, {
43
+ at: string;
44
+ protocolVersion: string;
45
+ deviceId: string;
46
+ phononVersion?: string | undefined;
47
+ features?: string[] | undefined;
48
+ auth?: {
49
+ deviceKey: string;
50
+ } | undefined;
51
+ resumeFrom?: {
52
+ sessionId: string;
53
+ fromSeq: number;
54
+ }[] | undefined;
55
+ }>;
56
+ readonly result: z.ZodObject<{
57
+ protocolVersion: z.ZodString;
58
+ tenantId: z.ZodBranded<z.ZodString, "TenantId">;
59
+ features: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
60
+ ackedSeqs: z.ZodOptional<z.ZodArray<z.ZodObject<{
61
+ sessionId: z.ZodString;
62
+ lastSeq: z.ZodNumber;
63
+ }, "strip", z.ZodTypeAny, {
64
+ sessionId: string;
65
+ lastSeq: number;
66
+ }, {
67
+ sessionId: string;
68
+ lastSeq: number;
69
+ }>, "many">>;
70
+ at: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ at: string;
73
+ tenantId: string & z.BRAND<"TenantId">;
74
+ protocolVersion: string;
75
+ features: string[];
76
+ ackedSeqs?: {
77
+ sessionId: string;
78
+ lastSeq: number;
79
+ }[] | undefined;
80
+ }, {
81
+ at: string;
82
+ tenantId: string;
83
+ protocolVersion: string;
84
+ features?: string[] | undefined;
85
+ ackedSeqs?: {
86
+ sessionId: string;
87
+ lastSeq: number;
88
+ }[] | undefined;
89
+ }>;
90
+ };
91
+ readonly "device.info": {
92
+ readonly direction: "s2p";
93
+ readonly kind: "request";
94
+ readonly params: z.ZodDefault<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
95
+ readonly result: z.ZodObject<{
96
+ at: z.ZodString;
97
+ hostname: z.ZodString;
98
+ os: z.ZodObject<{
99
+ platform: z.ZodUnion<[z.ZodEnum<["aix", "darwin", "freebsd", "linux", "openbsd", "sunos", "win32", "cygwin", "netbsd"]>, z.ZodString]>;
100
+ type: z.ZodString;
101
+ release: z.ZodString;
102
+ arch: z.ZodString;
103
+ }, "strip", z.ZodTypeAny, {
104
+ type: string;
105
+ platform: string;
106
+ release: string;
107
+ arch: string;
108
+ }, {
109
+ type: string;
110
+ platform: string;
111
+ release: string;
112
+ arch: string;
113
+ }>;
114
+ runtime: z.ZodOptional<z.ZodObject<{
115
+ node: z.ZodOptional<z.ZodString>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ node?: string | undefined;
118
+ }, {
119
+ node?: string | undefined;
120
+ }>>;
121
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
122
+ }, "strip", z.ZodTypeAny, {
123
+ at: string;
124
+ capabilities: string[];
125
+ hostname: string;
126
+ os: {
127
+ type: string;
128
+ platform: string;
129
+ release: string;
130
+ arch: string;
131
+ };
132
+ runtime?: {
133
+ node?: string | undefined;
134
+ } | undefined;
135
+ }, {
136
+ at: string;
137
+ hostname: string;
138
+ os: {
139
+ type: string;
140
+ platform: string;
141
+ release: string;
142
+ arch: string;
143
+ };
144
+ capabilities?: string[] | undefined;
145
+ runtime?: {
146
+ node?: string | undefined;
147
+ } | undefined;
148
+ }>;
149
+ };
150
+ readonly "device.resources": {
151
+ readonly direction: "s2p";
152
+ readonly kind: "request";
153
+ readonly params: z.ZodDefault<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
154
+ readonly result: z.ZodObject<{
155
+ at: z.ZodString;
156
+ cpu: z.ZodOptional<z.ZodObject<{
157
+ loadavg: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
158
+ cores: z.ZodOptional<z.ZodNumber>;
159
+ usagePercent: z.ZodOptional<z.ZodNumber>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ usagePercent?: number | undefined;
162
+ loadavg?: number[] | undefined;
163
+ cores?: number | undefined;
164
+ }, {
165
+ usagePercent?: number | undefined;
166
+ loadavg?: number[] | undefined;
167
+ cores?: number | undefined;
168
+ }>>;
169
+ memory: z.ZodObject<{
170
+ totalBytes: z.ZodNumber;
171
+ freeBytes: z.ZodNumber;
172
+ usedBytes: z.ZodNumber;
173
+ usagePercent: z.ZodOptional<z.ZodNumber>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ totalBytes: number;
176
+ freeBytes: number;
177
+ usedBytes: number;
178
+ usagePercent?: number | undefined;
179
+ }, {
180
+ totalBytes: number;
181
+ freeBytes: number;
182
+ usedBytes: number;
183
+ usagePercent?: number | undefined;
184
+ }>;
185
+ disk: z.ZodOptional<z.ZodObject<{
186
+ path: z.ZodString;
187
+ totalBytes: z.ZodOptional<z.ZodNumber>;
188
+ freeBytes: z.ZodOptional<z.ZodNumber>;
189
+ usedBytes: z.ZodOptional<z.ZodNumber>;
190
+ usagePercent: z.ZodOptional<z.ZodNumber>;
191
+ }, "strip", z.ZodTypeAny, {
192
+ path: string;
193
+ usagePercent?: number | undefined;
194
+ totalBytes?: number | undefined;
195
+ freeBytes?: number | undefined;
196
+ usedBytes?: number | undefined;
197
+ }, {
198
+ path: string;
199
+ usagePercent?: number | undefined;
200
+ totalBytes?: number | undefined;
201
+ freeBytes?: number | undefined;
202
+ usedBytes?: number | undefined;
203
+ }>>;
204
+ gpu: z.ZodOptional<z.ZodArray<z.ZodObject<{
205
+ name: z.ZodOptional<z.ZodString>;
206
+ memoryTotalBytes: z.ZodOptional<z.ZodNumber>;
207
+ memoryUsedBytes: z.ZodOptional<z.ZodNumber>;
208
+ utilizationPercent: z.ZodOptional<z.ZodNumber>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ name?: string | undefined;
211
+ memoryTotalBytes?: number | undefined;
212
+ memoryUsedBytes?: number | undefined;
213
+ utilizationPercent?: number | undefined;
214
+ }, {
215
+ name?: string | undefined;
216
+ memoryTotalBytes?: number | undefined;
217
+ memoryUsedBytes?: number | undefined;
218
+ utilizationPercent?: number | undefined;
219
+ }>, "many">>;
220
+ process: z.ZodOptional<z.ZodObject<{
221
+ pid: z.ZodNumber;
222
+ uptimeSeconds: z.ZodNumber;
223
+ rssBytes: z.ZodOptional<z.ZodNumber>;
224
+ heapUsedBytes: z.ZodOptional<z.ZodNumber>;
225
+ heapTotalBytes: z.ZodOptional<z.ZodNumber>;
226
+ }, "strip", z.ZodTypeAny, {
227
+ pid: number;
228
+ uptimeSeconds: number;
229
+ rssBytes?: number | undefined;
230
+ heapUsedBytes?: number | undefined;
231
+ heapTotalBytes?: number | undefined;
232
+ }, {
233
+ pid: number;
234
+ uptimeSeconds: number;
235
+ rssBytes?: number | undefined;
236
+ heapUsedBytes?: number | undefined;
237
+ heapTotalBytes?: number | undefined;
238
+ }>>;
239
+ }, "strip", z.ZodTypeAny, {
240
+ at: string;
241
+ memory: {
242
+ totalBytes: number;
243
+ freeBytes: number;
244
+ usedBytes: number;
245
+ usagePercent?: number | undefined;
246
+ };
247
+ cpu?: {
248
+ usagePercent?: number | undefined;
249
+ loadavg?: number[] | undefined;
250
+ cores?: number | undefined;
251
+ } | undefined;
252
+ disk?: {
253
+ path: string;
254
+ usagePercent?: number | undefined;
255
+ totalBytes?: number | undefined;
256
+ freeBytes?: number | undefined;
257
+ usedBytes?: number | undefined;
258
+ } | undefined;
259
+ gpu?: {
260
+ name?: string | undefined;
261
+ memoryTotalBytes?: number | undefined;
262
+ memoryUsedBytes?: number | undefined;
263
+ utilizationPercent?: number | undefined;
264
+ }[] | undefined;
265
+ process?: {
266
+ pid: number;
267
+ uptimeSeconds: number;
268
+ rssBytes?: number | undefined;
269
+ heapUsedBytes?: number | undefined;
270
+ heapTotalBytes?: number | undefined;
271
+ } | undefined;
272
+ }, {
273
+ at: string;
274
+ memory: {
275
+ totalBytes: number;
276
+ freeBytes: number;
277
+ usedBytes: number;
278
+ usagePercent?: number | undefined;
279
+ };
280
+ cpu?: {
281
+ usagePercent?: number | undefined;
282
+ loadavg?: number[] | undefined;
283
+ cores?: number | undefined;
284
+ } | undefined;
285
+ disk?: {
286
+ path: string;
287
+ usagePercent?: number | undefined;
288
+ totalBytes?: number | undefined;
289
+ freeBytes?: number | undefined;
290
+ usedBytes?: number | undefined;
291
+ } | undefined;
292
+ gpu?: {
293
+ name?: string | undefined;
294
+ memoryTotalBytes?: number | undefined;
295
+ memoryUsedBytes?: number | undefined;
296
+ utilizationPercent?: number | undefined;
297
+ }[] | undefined;
298
+ process?: {
299
+ pid: number;
300
+ uptimeSeconds: number;
301
+ rssBytes?: number | undefined;
302
+ heapUsedBytes?: number | undefined;
303
+ heapTotalBytes?: number | undefined;
304
+ } | undefined;
305
+ }>;
306
+ };
307
+ readonly "discovery.list": {
308
+ readonly direction: "s2p";
309
+ readonly kind: "request";
310
+ readonly params: z.ZodObject<{
311
+ availableOnly: z.ZodOptional<z.ZodBoolean>;
312
+ }, "strip", z.ZodTypeAny, {
313
+ availableOnly?: boolean | undefined;
314
+ }, {
315
+ availableOnly?: boolean | undefined;
316
+ }>;
317
+ readonly result: z.ZodObject<{
318
+ agents: z.ZodArray<z.ZodObject<{
319
+ agentId: z.ZodBranded<z.ZodString, "AgentId">;
320
+ displayName: z.ZodString;
321
+ adapter: z.ZodString;
322
+ available: z.ZodBoolean;
323
+ unavailableReason: z.ZodOptional<z.ZodString>;
324
+ version: z.ZodOptional<z.ZodString>;
325
+ models: z.ZodArray<z.ZodObject<{
326
+ id: z.ZodString;
327
+ displayName: z.ZodOptional<z.ZodString>;
328
+ contextWindow: z.ZodOptional<z.ZodNumber>;
329
+ available: z.ZodDefault<z.ZodBoolean>;
330
+ }, "strip", z.ZodTypeAny, {
331
+ id: string;
332
+ available: boolean;
333
+ displayName?: string | undefined;
334
+ contextWindow?: number | undefined;
335
+ }, {
336
+ id: string;
337
+ displayName?: string | undefined;
338
+ contextWindow?: number | undefined;
339
+ available?: boolean | undefined;
340
+ }>, "many">;
341
+ capabilities: z.ZodObject<{
342
+ nativeSession: z.ZodBoolean;
343
+ nativeCompression: z.ZodBoolean;
344
+ contextInjection: z.ZodBoolean;
345
+ proactiveOutput: z.ZodBoolean;
346
+ modelSwitch: z.ZodBoolean;
347
+ interrupt: z.ZodBoolean;
348
+ injectMidTurn: z.ZodBoolean;
349
+ skillManagement: z.ZodBoolean;
350
+ hooks: z.ZodArray<z.ZodEnum<["pre_tool", "post_tool", "pre_command", "pre_file_write", "pre_network", "session_start", "session_end", "notification"]>, "many">;
351
+ streaming: z.ZodBoolean;
352
+ limits: z.ZodOptional<z.ZodObject<{
353
+ maxConcurrentSessions: z.ZodOptional<z.ZodNumber>;
354
+ maxContextTokens: z.ZodOptional<z.ZodNumber>;
355
+ maxMessageBytes: z.ZodOptional<z.ZodNumber>;
356
+ }, "strip", z.ZodTypeAny, {
357
+ maxConcurrentSessions?: number | undefined;
358
+ maxContextTokens?: number | undefined;
359
+ maxMessageBytes?: number | undefined;
360
+ }, {
361
+ maxConcurrentSessions?: number | undefined;
362
+ maxContextTokens?: number | undefined;
363
+ maxMessageBytes?: number | undefined;
364
+ }>>;
365
+ }, "strip", z.ZodTypeAny, {
366
+ nativeSession: boolean;
367
+ nativeCompression: boolean;
368
+ contextInjection: boolean;
369
+ proactiveOutput: boolean;
370
+ modelSwitch: boolean;
371
+ interrupt: boolean;
372
+ injectMidTurn: boolean;
373
+ skillManagement: boolean;
374
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
375
+ streaming: boolean;
376
+ limits?: {
377
+ maxConcurrentSessions?: number | undefined;
378
+ maxContextTokens?: number | undefined;
379
+ maxMessageBytes?: number | undefined;
380
+ } | undefined;
381
+ }, {
382
+ nativeSession: boolean;
383
+ nativeCompression: boolean;
384
+ contextInjection: boolean;
385
+ proactiveOutput: boolean;
386
+ modelSwitch: boolean;
387
+ interrupt: boolean;
388
+ injectMidTurn: boolean;
389
+ skillManagement: boolean;
390
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
391
+ streaming: boolean;
392
+ limits?: {
393
+ maxConcurrentSessions?: number | undefined;
394
+ maxContextTokens?: number | undefined;
395
+ maxMessageBytes?: number | undefined;
396
+ } | undefined;
397
+ }>;
398
+ scannedAt: z.ZodOptional<z.ZodString>;
399
+ }, "strip", z.ZodTypeAny, {
400
+ agentId: string & z.BRAND<"AgentId">;
401
+ displayName: string;
402
+ available: boolean;
403
+ adapter: string;
404
+ models: {
405
+ id: string;
406
+ available: boolean;
407
+ displayName?: string | undefined;
408
+ contextWindow?: number | undefined;
409
+ }[];
410
+ capabilities: {
411
+ nativeSession: boolean;
412
+ nativeCompression: boolean;
413
+ contextInjection: boolean;
414
+ proactiveOutput: boolean;
415
+ modelSwitch: boolean;
416
+ interrupt: boolean;
417
+ injectMidTurn: boolean;
418
+ skillManagement: boolean;
419
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
420
+ streaming: boolean;
421
+ limits?: {
422
+ maxConcurrentSessions?: number | undefined;
423
+ maxContextTokens?: number | undefined;
424
+ maxMessageBytes?: number | undefined;
425
+ } | undefined;
426
+ };
427
+ unavailableReason?: string | undefined;
428
+ version?: string | undefined;
429
+ scannedAt?: string | undefined;
430
+ }, {
431
+ agentId: string;
432
+ displayName: string;
433
+ available: boolean;
434
+ adapter: string;
435
+ models: {
436
+ id: string;
437
+ displayName?: string | undefined;
438
+ contextWindow?: number | undefined;
439
+ available?: boolean | undefined;
440
+ }[];
441
+ capabilities: {
442
+ nativeSession: boolean;
443
+ nativeCompression: boolean;
444
+ contextInjection: boolean;
445
+ proactiveOutput: boolean;
446
+ modelSwitch: boolean;
447
+ interrupt: boolean;
448
+ injectMidTurn: boolean;
449
+ skillManagement: boolean;
450
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
451
+ streaming: boolean;
452
+ limits?: {
453
+ maxConcurrentSessions?: number | undefined;
454
+ maxContextTokens?: number | undefined;
455
+ maxMessageBytes?: number | undefined;
456
+ } | undefined;
457
+ };
458
+ unavailableReason?: string | undefined;
459
+ version?: string | undefined;
460
+ scannedAt?: string | undefined;
461
+ }>, "many">;
462
+ }, "strip", z.ZodTypeAny, {
463
+ agents: {
464
+ agentId: string & z.BRAND<"AgentId">;
465
+ displayName: string;
466
+ available: boolean;
467
+ adapter: string;
468
+ models: {
469
+ id: string;
470
+ available: boolean;
471
+ displayName?: string | undefined;
472
+ contextWindow?: number | undefined;
473
+ }[];
474
+ capabilities: {
475
+ nativeSession: boolean;
476
+ nativeCompression: boolean;
477
+ contextInjection: boolean;
478
+ proactiveOutput: boolean;
479
+ modelSwitch: boolean;
480
+ interrupt: boolean;
481
+ injectMidTurn: boolean;
482
+ skillManagement: boolean;
483
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
484
+ streaming: boolean;
485
+ limits?: {
486
+ maxConcurrentSessions?: number | undefined;
487
+ maxContextTokens?: number | undefined;
488
+ maxMessageBytes?: number | undefined;
489
+ } | undefined;
490
+ };
491
+ unavailableReason?: string | undefined;
492
+ version?: string | undefined;
493
+ scannedAt?: string | undefined;
494
+ }[];
495
+ }, {
496
+ agents: {
497
+ agentId: string;
498
+ displayName: string;
499
+ available: boolean;
500
+ adapter: string;
501
+ models: {
502
+ id: string;
503
+ displayName?: string | undefined;
504
+ contextWindow?: number | undefined;
505
+ available?: boolean | undefined;
506
+ }[];
507
+ capabilities: {
508
+ nativeSession: boolean;
509
+ nativeCompression: boolean;
510
+ contextInjection: boolean;
511
+ proactiveOutput: boolean;
512
+ modelSwitch: boolean;
513
+ interrupt: boolean;
514
+ injectMidTurn: boolean;
515
+ skillManagement: boolean;
516
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
517
+ streaming: boolean;
518
+ limits?: {
519
+ maxConcurrentSessions?: number | undefined;
520
+ maxContextTokens?: number | undefined;
521
+ maxMessageBytes?: number | undefined;
522
+ } | undefined;
523
+ };
524
+ unavailableReason?: string | undefined;
525
+ version?: string | undefined;
526
+ scannedAt?: string | undefined;
527
+ }[];
528
+ }>;
529
+ };
530
+ readonly "discovery.get": {
531
+ readonly direction: "s2p";
532
+ readonly kind: "request";
533
+ readonly params: z.ZodObject<{
534
+ agentId: z.ZodBranded<z.ZodString, "AgentId">;
535
+ }, "strip", z.ZodTypeAny, {
536
+ agentId: string & z.BRAND<"AgentId">;
537
+ }, {
538
+ agentId: string;
539
+ }>;
540
+ readonly result: z.ZodObject<{
541
+ agent: z.ZodObject<{
542
+ agentId: z.ZodBranded<z.ZodString, "AgentId">;
543
+ displayName: z.ZodString;
544
+ adapter: z.ZodString;
545
+ available: z.ZodBoolean;
546
+ unavailableReason: z.ZodOptional<z.ZodString>;
547
+ version: z.ZodOptional<z.ZodString>;
548
+ models: z.ZodArray<z.ZodObject<{
549
+ id: z.ZodString;
550
+ displayName: z.ZodOptional<z.ZodString>;
551
+ contextWindow: z.ZodOptional<z.ZodNumber>;
552
+ available: z.ZodDefault<z.ZodBoolean>;
553
+ }, "strip", z.ZodTypeAny, {
554
+ id: string;
555
+ available: boolean;
556
+ displayName?: string | undefined;
557
+ contextWindow?: number | undefined;
558
+ }, {
559
+ id: string;
560
+ displayName?: string | undefined;
561
+ contextWindow?: number | undefined;
562
+ available?: boolean | undefined;
563
+ }>, "many">;
564
+ capabilities: z.ZodObject<{
565
+ nativeSession: z.ZodBoolean;
566
+ nativeCompression: z.ZodBoolean;
567
+ contextInjection: z.ZodBoolean;
568
+ proactiveOutput: z.ZodBoolean;
569
+ modelSwitch: z.ZodBoolean;
570
+ interrupt: z.ZodBoolean;
571
+ injectMidTurn: z.ZodBoolean;
572
+ skillManagement: z.ZodBoolean;
573
+ hooks: z.ZodArray<z.ZodEnum<["pre_tool", "post_tool", "pre_command", "pre_file_write", "pre_network", "session_start", "session_end", "notification"]>, "many">;
574
+ streaming: z.ZodBoolean;
575
+ limits: z.ZodOptional<z.ZodObject<{
576
+ maxConcurrentSessions: z.ZodOptional<z.ZodNumber>;
577
+ maxContextTokens: z.ZodOptional<z.ZodNumber>;
578
+ maxMessageBytes: z.ZodOptional<z.ZodNumber>;
579
+ }, "strip", z.ZodTypeAny, {
580
+ maxConcurrentSessions?: number | undefined;
581
+ maxContextTokens?: number | undefined;
582
+ maxMessageBytes?: number | undefined;
583
+ }, {
584
+ maxConcurrentSessions?: number | undefined;
585
+ maxContextTokens?: number | undefined;
586
+ maxMessageBytes?: number | undefined;
587
+ }>>;
588
+ }, "strip", z.ZodTypeAny, {
589
+ nativeSession: boolean;
590
+ nativeCompression: boolean;
591
+ contextInjection: boolean;
592
+ proactiveOutput: boolean;
593
+ modelSwitch: boolean;
594
+ interrupt: boolean;
595
+ injectMidTurn: boolean;
596
+ skillManagement: boolean;
597
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
598
+ streaming: boolean;
599
+ limits?: {
600
+ maxConcurrentSessions?: number | undefined;
601
+ maxContextTokens?: number | undefined;
602
+ maxMessageBytes?: number | undefined;
603
+ } | undefined;
604
+ }, {
605
+ nativeSession: boolean;
606
+ nativeCompression: boolean;
607
+ contextInjection: boolean;
608
+ proactiveOutput: boolean;
609
+ modelSwitch: boolean;
610
+ interrupt: boolean;
611
+ injectMidTurn: boolean;
612
+ skillManagement: boolean;
613
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
614
+ streaming: boolean;
615
+ limits?: {
616
+ maxConcurrentSessions?: number | undefined;
617
+ maxContextTokens?: number | undefined;
618
+ maxMessageBytes?: number | undefined;
619
+ } | undefined;
620
+ }>;
621
+ scannedAt: z.ZodOptional<z.ZodString>;
622
+ }, "strip", z.ZodTypeAny, {
623
+ agentId: string & z.BRAND<"AgentId">;
624
+ displayName: string;
625
+ available: boolean;
626
+ adapter: string;
627
+ models: {
628
+ id: string;
629
+ available: boolean;
630
+ displayName?: string | undefined;
631
+ contextWindow?: number | undefined;
632
+ }[];
633
+ capabilities: {
634
+ nativeSession: boolean;
635
+ nativeCompression: boolean;
636
+ contextInjection: boolean;
637
+ proactiveOutput: boolean;
638
+ modelSwitch: boolean;
639
+ interrupt: boolean;
640
+ injectMidTurn: boolean;
641
+ skillManagement: boolean;
642
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
643
+ streaming: boolean;
644
+ limits?: {
645
+ maxConcurrentSessions?: number | undefined;
646
+ maxContextTokens?: number | undefined;
647
+ maxMessageBytes?: number | undefined;
648
+ } | undefined;
649
+ };
650
+ unavailableReason?: string | undefined;
651
+ version?: string | undefined;
652
+ scannedAt?: string | undefined;
653
+ }, {
654
+ agentId: string;
655
+ displayName: string;
656
+ available: boolean;
657
+ adapter: string;
658
+ models: {
659
+ id: string;
660
+ displayName?: string | undefined;
661
+ contextWindow?: number | undefined;
662
+ available?: boolean | undefined;
663
+ }[];
664
+ capabilities: {
665
+ nativeSession: boolean;
666
+ nativeCompression: boolean;
667
+ contextInjection: boolean;
668
+ proactiveOutput: boolean;
669
+ modelSwitch: boolean;
670
+ interrupt: boolean;
671
+ injectMidTurn: boolean;
672
+ skillManagement: boolean;
673
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
674
+ streaming: boolean;
675
+ limits?: {
676
+ maxConcurrentSessions?: number | undefined;
677
+ maxContextTokens?: number | undefined;
678
+ maxMessageBytes?: number | undefined;
679
+ } | undefined;
680
+ };
681
+ unavailableReason?: string | undefined;
682
+ version?: string | undefined;
683
+ scannedAt?: string | undefined;
684
+ }>;
685
+ }, "strip", z.ZodTypeAny, {
686
+ agent: {
687
+ agentId: string & z.BRAND<"AgentId">;
688
+ displayName: string;
689
+ available: boolean;
690
+ adapter: string;
691
+ models: {
692
+ id: string;
693
+ available: boolean;
694
+ displayName?: string | undefined;
695
+ contextWindow?: number | undefined;
696
+ }[];
697
+ capabilities: {
698
+ nativeSession: boolean;
699
+ nativeCompression: boolean;
700
+ contextInjection: boolean;
701
+ proactiveOutput: boolean;
702
+ modelSwitch: boolean;
703
+ interrupt: boolean;
704
+ injectMidTurn: boolean;
705
+ skillManagement: boolean;
706
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
707
+ streaming: boolean;
708
+ limits?: {
709
+ maxConcurrentSessions?: number | undefined;
710
+ maxContextTokens?: number | undefined;
711
+ maxMessageBytes?: number | undefined;
712
+ } | undefined;
713
+ };
714
+ unavailableReason?: string | undefined;
715
+ version?: string | undefined;
716
+ scannedAt?: string | undefined;
717
+ };
718
+ }, {
719
+ agent: {
720
+ agentId: string;
721
+ displayName: string;
722
+ available: boolean;
723
+ adapter: string;
724
+ models: {
725
+ id: string;
726
+ displayName?: string | undefined;
727
+ contextWindow?: number | undefined;
728
+ available?: boolean | undefined;
729
+ }[];
730
+ capabilities: {
731
+ nativeSession: boolean;
732
+ nativeCompression: boolean;
733
+ contextInjection: boolean;
734
+ proactiveOutput: boolean;
735
+ modelSwitch: boolean;
736
+ interrupt: boolean;
737
+ injectMidTurn: boolean;
738
+ skillManagement: boolean;
739
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
740
+ streaming: boolean;
741
+ limits?: {
742
+ maxConcurrentSessions?: number | undefined;
743
+ maxContextTokens?: number | undefined;
744
+ maxMessageBytes?: number | undefined;
745
+ } | undefined;
746
+ };
747
+ unavailableReason?: string | undefined;
748
+ version?: string | undefined;
749
+ scannedAt?: string | undefined;
750
+ };
751
+ }>;
752
+ };
753
+ readonly "discovery.changed": {
754
+ readonly direction: "p2s";
755
+ readonly kind: "notification";
756
+ readonly params: z.ZodObject<{
757
+ kind: z.ZodEnum<["agent_added", "agent_removed", "agent_updated", "models_changed"]>;
758
+ agentId: z.ZodBranded<z.ZodString, "AgentId">;
759
+ snapshot: z.ZodOptional<z.ZodObject<{
760
+ agentId: z.ZodBranded<z.ZodString, "AgentId">;
761
+ displayName: z.ZodString;
762
+ adapter: z.ZodString;
763
+ available: z.ZodBoolean;
764
+ unavailableReason: z.ZodOptional<z.ZodString>;
765
+ version: z.ZodOptional<z.ZodString>;
766
+ models: z.ZodArray<z.ZodObject<{
767
+ id: z.ZodString;
768
+ displayName: z.ZodOptional<z.ZodString>;
769
+ contextWindow: z.ZodOptional<z.ZodNumber>;
770
+ available: z.ZodDefault<z.ZodBoolean>;
771
+ }, "strip", z.ZodTypeAny, {
772
+ id: string;
773
+ available: boolean;
774
+ displayName?: string | undefined;
775
+ contextWindow?: number | undefined;
776
+ }, {
777
+ id: string;
778
+ displayName?: string | undefined;
779
+ contextWindow?: number | undefined;
780
+ available?: boolean | undefined;
781
+ }>, "many">;
782
+ capabilities: z.ZodObject<{
783
+ nativeSession: z.ZodBoolean;
784
+ nativeCompression: z.ZodBoolean;
785
+ contextInjection: z.ZodBoolean;
786
+ proactiveOutput: z.ZodBoolean;
787
+ modelSwitch: z.ZodBoolean;
788
+ interrupt: z.ZodBoolean;
789
+ injectMidTurn: z.ZodBoolean;
790
+ skillManagement: z.ZodBoolean;
791
+ hooks: z.ZodArray<z.ZodEnum<["pre_tool", "post_tool", "pre_command", "pre_file_write", "pre_network", "session_start", "session_end", "notification"]>, "many">;
792
+ streaming: z.ZodBoolean;
793
+ limits: z.ZodOptional<z.ZodObject<{
794
+ maxConcurrentSessions: z.ZodOptional<z.ZodNumber>;
795
+ maxContextTokens: z.ZodOptional<z.ZodNumber>;
796
+ maxMessageBytes: z.ZodOptional<z.ZodNumber>;
797
+ }, "strip", z.ZodTypeAny, {
798
+ maxConcurrentSessions?: number | undefined;
799
+ maxContextTokens?: number | undefined;
800
+ maxMessageBytes?: number | undefined;
801
+ }, {
802
+ maxConcurrentSessions?: number | undefined;
803
+ maxContextTokens?: number | undefined;
804
+ maxMessageBytes?: number | undefined;
805
+ }>>;
806
+ }, "strip", z.ZodTypeAny, {
807
+ nativeSession: boolean;
808
+ nativeCompression: boolean;
809
+ contextInjection: boolean;
810
+ proactiveOutput: boolean;
811
+ modelSwitch: boolean;
812
+ interrupt: boolean;
813
+ injectMidTurn: boolean;
814
+ skillManagement: boolean;
815
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
816
+ streaming: boolean;
817
+ limits?: {
818
+ maxConcurrentSessions?: number | undefined;
819
+ maxContextTokens?: number | undefined;
820
+ maxMessageBytes?: number | undefined;
821
+ } | undefined;
822
+ }, {
823
+ nativeSession: boolean;
824
+ nativeCompression: boolean;
825
+ contextInjection: boolean;
826
+ proactiveOutput: boolean;
827
+ modelSwitch: boolean;
828
+ interrupt: boolean;
829
+ injectMidTurn: boolean;
830
+ skillManagement: boolean;
831
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
832
+ streaming: boolean;
833
+ limits?: {
834
+ maxConcurrentSessions?: number | undefined;
835
+ maxContextTokens?: number | undefined;
836
+ maxMessageBytes?: number | undefined;
837
+ } | undefined;
838
+ }>;
839
+ scannedAt: z.ZodOptional<z.ZodString>;
840
+ }, "strip", z.ZodTypeAny, {
841
+ agentId: string & z.BRAND<"AgentId">;
842
+ displayName: string;
843
+ available: boolean;
844
+ adapter: string;
845
+ models: {
846
+ id: string;
847
+ available: boolean;
848
+ displayName?: string | undefined;
849
+ contextWindow?: number | undefined;
850
+ }[];
851
+ capabilities: {
852
+ nativeSession: boolean;
853
+ nativeCompression: boolean;
854
+ contextInjection: boolean;
855
+ proactiveOutput: boolean;
856
+ modelSwitch: boolean;
857
+ interrupt: boolean;
858
+ injectMidTurn: boolean;
859
+ skillManagement: boolean;
860
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
861
+ streaming: boolean;
862
+ limits?: {
863
+ maxConcurrentSessions?: number | undefined;
864
+ maxContextTokens?: number | undefined;
865
+ maxMessageBytes?: number | undefined;
866
+ } | undefined;
867
+ };
868
+ unavailableReason?: string | undefined;
869
+ version?: string | undefined;
870
+ scannedAt?: string | undefined;
871
+ }, {
872
+ agentId: string;
873
+ displayName: string;
874
+ available: boolean;
875
+ adapter: string;
876
+ models: {
877
+ id: string;
878
+ displayName?: string | undefined;
879
+ contextWindow?: number | undefined;
880
+ available?: boolean | undefined;
881
+ }[];
882
+ capabilities: {
883
+ nativeSession: boolean;
884
+ nativeCompression: boolean;
885
+ contextInjection: boolean;
886
+ proactiveOutput: boolean;
887
+ modelSwitch: boolean;
888
+ interrupt: boolean;
889
+ injectMidTurn: boolean;
890
+ skillManagement: boolean;
891
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
892
+ streaming: boolean;
893
+ limits?: {
894
+ maxConcurrentSessions?: number | undefined;
895
+ maxContextTokens?: number | undefined;
896
+ maxMessageBytes?: number | undefined;
897
+ } | undefined;
898
+ };
899
+ unavailableReason?: string | undefined;
900
+ version?: string | undefined;
901
+ scannedAt?: string | undefined;
902
+ }>>;
903
+ at: z.ZodString;
904
+ }, "strip", z.ZodTypeAny, {
905
+ at: string;
906
+ agentId: string & z.BRAND<"AgentId">;
907
+ kind: "agent_added" | "agent_removed" | "agent_updated" | "models_changed";
908
+ snapshot?: {
909
+ agentId: string & z.BRAND<"AgentId">;
910
+ displayName: string;
911
+ available: boolean;
912
+ adapter: string;
913
+ models: {
914
+ id: string;
915
+ available: boolean;
916
+ displayName?: string | undefined;
917
+ contextWindow?: number | undefined;
918
+ }[];
919
+ capabilities: {
920
+ nativeSession: boolean;
921
+ nativeCompression: boolean;
922
+ contextInjection: boolean;
923
+ proactiveOutput: boolean;
924
+ modelSwitch: boolean;
925
+ interrupt: boolean;
926
+ injectMidTurn: boolean;
927
+ skillManagement: boolean;
928
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
929
+ streaming: boolean;
930
+ limits?: {
931
+ maxConcurrentSessions?: number | undefined;
932
+ maxContextTokens?: number | undefined;
933
+ maxMessageBytes?: number | undefined;
934
+ } | undefined;
935
+ };
936
+ unavailableReason?: string | undefined;
937
+ version?: string | undefined;
938
+ scannedAt?: string | undefined;
939
+ } | undefined;
940
+ }, {
941
+ at: string;
942
+ agentId: string;
943
+ kind: "agent_added" | "agent_removed" | "agent_updated" | "models_changed";
944
+ snapshot?: {
945
+ agentId: string;
946
+ displayName: string;
947
+ available: boolean;
948
+ adapter: string;
949
+ models: {
950
+ id: string;
951
+ displayName?: string | undefined;
952
+ contextWindow?: number | undefined;
953
+ available?: boolean | undefined;
954
+ }[];
955
+ capabilities: {
956
+ nativeSession: boolean;
957
+ nativeCompression: boolean;
958
+ contextInjection: boolean;
959
+ proactiveOutput: boolean;
960
+ modelSwitch: boolean;
961
+ interrupt: boolean;
962
+ injectMidTurn: boolean;
963
+ skillManagement: boolean;
964
+ hooks: ("pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification")[];
965
+ streaming: boolean;
966
+ limits?: {
967
+ maxConcurrentSessions?: number | undefined;
968
+ maxContextTokens?: number | undefined;
969
+ maxMessageBytes?: number | undefined;
970
+ } | undefined;
971
+ };
972
+ unavailableReason?: string | undefined;
973
+ version?: string | undefined;
974
+ scannedAt?: string | undefined;
975
+ } | undefined;
976
+ }>;
977
+ readonly result: z.ZodUndefined;
978
+ };
979
+ readonly "session.create": {
980
+ readonly direction: "s2p";
981
+ readonly kind: "request";
982
+ readonly params: z.ZodObject<{
983
+ clientRequestId: z.ZodOptional<z.ZodString>;
984
+ project: z.ZodBranded<z.ZodString, "ProjectId">;
985
+ worktreeId: z.ZodOptional<z.ZodString>;
986
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
987
+ model: z.ZodString;
988
+ agentConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
989
+ initialContext: z.ZodOptional<z.ZodArray<z.ZodObject<{
990
+ role: z.ZodEnum<["system", "user", "assistant"]>;
991
+ content: z.ZodString;
992
+ }, "strip", z.ZodTypeAny, {
993
+ role: "system" | "user" | "assistant";
994
+ content: string;
995
+ }, {
996
+ role: "system" | "user" | "assistant";
997
+ content: string;
998
+ }>, "many">>;
999
+ verbosity: z.ZodDefault<z.ZodEnum<["final", "messages", "tools", "trace"]>>;
1000
+ clientTag: z.ZodOptional<z.ZodString>;
1001
+ }, "strip", z.ZodTypeAny, {
1002
+ agent: string & z.BRAND<"AgentId">;
1003
+ project: string & z.BRAND<"ProjectId">;
1004
+ model: string;
1005
+ verbosity: "final" | "messages" | "tools" | "trace";
1006
+ clientRequestId?: string | undefined;
1007
+ worktreeId?: string | undefined;
1008
+ agentConfig?: Record<string, unknown> | undefined;
1009
+ initialContext?: {
1010
+ role: "system" | "user" | "assistant";
1011
+ content: string;
1012
+ }[] | undefined;
1013
+ clientTag?: string | undefined;
1014
+ }, {
1015
+ agent: string;
1016
+ project: string;
1017
+ model: string;
1018
+ clientRequestId?: string | undefined;
1019
+ worktreeId?: string | undefined;
1020
+ agentConfig?: Record<string, unknown> | undefined;
1021
+ initialContext?: {
1022
+ role: "system" | "user" | "assistant";
1023
+ content: string;
1024
+ }[] | undefined;
1025
+ verbosity?: "final" | "messages" | "tools" | "trace" | undefined;
1026
+ clientTag?: string | undefined;
1027
+ }>;
1028
+ readonly result: z.ZodObject<{
1029
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1030
+ project: z.ZodBranded<z.ZodString, "ProjectId">;
1031
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
1032
+ model: z.ZodString;
1033
+ status: z.ZodEnum<["idle", "running", "paused", "terminated"]>;
1034
+ createdAt: z.ZodString;
1035
+ }, "strip", z.ZodTypeAny, {
1036
+ status: "idle" | "running" | "paused" | "terminated";
1037
+ sessionId: string & z.BRAND<"SessionId">;
1038
+ agent: string & z.BRAND<"AgentId">;
1039
+ project: string & z.BRAND<"ProjectId">;
1040
+ model: string;
1041
+ createdAt: string;
1042
+ }, {
1043
+ status: "idle" | "running" | "paused" | "terminated";
1044
+ sessionId: string;
1045
+ agent: string;
1046
+ project: string;
1047
+ model: string;
1048
+ createdAt: string;
1049
+ }>;
1050
+ };
1051
+ readonly "session.send": {
1052
+ readonly direction: "s2p";
1053
+ readonly kind: "request";
1054
+ readonly params: z.ZodObject<{
1055
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1056
+ input: z.ZodString;
1057
+ clientRequestId: z.ZodOptional<z.ZodString>;
1058
+ skills: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1059
+ name: z.ZodString;
1060
+ version: z.ZodOptional<z.ZodString>;
1061
+ scope: z.ZodOptional<z.ZodEnum<["global", "project"]>>;
1062
+ force: z.ZodOptional<z.ZodBoolean>;
1063
+ }, "strip", z.ZodTypeAny, {
1064
+ name: string;
1065
+ version?: string | undefined;
1066
+ scope?: "project" | "global" | undefined;
1067
+ force?: boolean | undefined;
1068
+ }, {
1069
+ name: string;
1070
+ version?: string | undefined;
1071
+ scope?: "project" | "global" | undefined;
1072
+ force?: boolean | undefined;
1073
+ }>]>, "many">>;
1074
+ verbosity: z.ZodOptional<z.ZodEnum<["final", "messages", "tools", "trace"]>>;
1075
+ whenBusy: z.ZodDefault<z.ZodEnum<["queue", "interrupt", "inject"]>>;
1076
+ fallback: z.ZodOptional<z.ZodEnum<["queue", "interrupt", "inject"]>>;
1077
+ turnId: z.ZodOptional<z.ZodString>;
1078
+ }, "strip", z.ZodTypeAny, {
1079
+ sessionId: string & z.BRAND<"SessionId">;
1080
+ input: string;
1081
+ whenBusy: "interrupt" | "queue" | "inject";
1082
+ clientRequestId?: string | undefined;
1083
+ verbosity?: "final" | "messages" | "tools" | "trace" | undefined;
1084
+ skills?: (string | {
1085
+ name: string;
1086
+ version?: string | undefined;
1087
+ scope?: "project" | "global" | undefined;
1088
+ force?: boolean | undefined;
1089
+ })[] | undefined;
1090
+ fallback?: "interrupt" | "queue" | "inject" | undefined;
1091
+ turnId?: string | undefined;
1092
+ }, {
1093
+ sessionId: string;
1094
+ input: string;
1095
+ clientRequestId?: string | undefined;
1096
+ verbosity?: "final" | "messages" | "tools" | "trace" | undefined;
1097
+ skills?: (string | {
1098
+ name: string;
1099
+ version?: string | undefined;
1100
+ scope?: "project" | "global" | undefined;
1101
+ force?: boolean | undefined;
1102
+ })[] | undefined;
1103
+ whenBusy?: "interrupt" | "queue" | "inject" | undefined;
1104
+ fallback?: "interrupt" | "queue" | "inject" | undefined;
1105
+ turnId?: string | undefined;
1106
+ }>;
1107
+ readonly result: z.ZodObject<{
1108
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1109
+ turnId: z.ZodString;
1110
+ accepted: z.ZodLiteral<true>;
1111
+ disposition: z.ZodEnum<["started", "queued", "interrupted", "injected"]>;
1112
+ queuePosition: z.ZodOptional<z.ZodNumber>;
1113
+ }, "strip", z.ZodTypeAny, {
1114
+ sessionId: string & z.BRAND<"SessionId">;
1115
+ turnId: string;
1116
+ accepted: true;
1117
+ disposition: "started" | "queued" | "interrupted" | "injected";
1118
+ queuePosition?: number | undefined;
1119
+ }, {
1120
+ sessionId: string;
1121
+ turnId: string;
1122
+ accepted: true;
1123
+ disposition: "started" | "queued" | "interrupted" | "injected";
1124
+ queuePosition?: number | undefined;
1125
+ }>;
1126
+ };
1127
+ readonly "session.inject": {
1128
+ readonly direction: "s2p";
1129
+ readonly kind: "request";
1130
+ readonly params: z.ZodObject<{
1131
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1132
+ context: z.ZodArray<z.ZodObject<{
1133
+ role: z.ZodEnum<["system", "user", "assistant"]>;
1134
+ content: z.ZodString;
1135
+ }, "strip", z.ZodTypeAny, {
1136
+ role: "system" | "user" | "assistant";
1137
+ content: string;
1138
+ }, {
1139
+ role: "system" | "user" | "assistant";
1140
+ content: string;
1141
+ }>, "many">;
1142
+ }, "strip", z.ZodTypeAny, {
1143
+ sessionId: string & z.BRAND<"SessionId">;
1144
+ context: {
1145
+ role: "system" | "user" | "assistant";
1146
+ content: string;
1147
+ }[];
1148
+ }, {
1149
+ sessionId: string;
1150
+ context: {
1151
+ role: "system" | "user" | "assistant";
1152
+ content: string;
1153
+ }[];
1154
+ }>;
1155
+ readonly result: z.ZodObject<{
1156
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1157
+ injected: z.ZodNumber;
1158
+ }, "strip", z.ZodTypeAny, {
1159
+ sessionId: string & z.BRAND<"SessionId">;
1160
+ injected: number;
1161
+ }, {
1162
+ sessionId: string;
1163
+ injected: number;
1164
+ }>;
1165
+ };
1166
+ readonly "session.compress": {
1167
+ readonly direction: "s2p";
1168
+ readonly kind: "request";
1169
+ readonly params: z.ZodObject<{
1170
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1171
+ mode: z.ZodEnum<["native", "custom"]>;
1172
+ strategy: z.ZodOptional<z.ZodString>;
1173
+ keepRecentToolCalls: z.ZodOptional<z.ZodNumber>;
1174
+ }, "strip", z.ZodTypeAny, {
1175
+ sessionId: string & z.BRAND<"SessionId">;
1176
+ mode: "custom" | "native";
1177
+ strategy?: string | undefined;
1178
+ keepRecentToolCalls?: number | undefined;
1179
+ }, {
1180
+ sessionId: string;
1181
+ mode: "custom" | "native";
1182
+ strategy?: string | undefined;
1183
+ keepRecentToolCalls?: number | undefined;
1184
+ }>;
1185
+ readonly result: z.ZodObject<{
1186
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1187
+ mode: z.ZodEnum<["native", "custom"]>;
1188
+ tokensBefore: z.ZodOptional<z.ZodNumber>;
1189
+ tokensAfter: z.ZodOptional<z.ZodNumber>;
1190
+ summary: z.ZodOptional<z.ZodString>;
1191
+ }, "strip", z.ZodTypeAny, {
1192
+ sessionId: string & z.BRAND<"SessionId">;
1193
+ mode: "custom" | "native";
1194
+ tokensBefore?: number | undefined;
1195
+ tokensAfter?: number | undefined;
1196
+ summary?: string | undefined;
1197
+ }, {
1198
+ sessionId: string;
1199
+ mode: "custom" | "native";
1200
+ tokensBefore?: number | undefined;
1201
+ tokensAfter?: number | undefined;
1202
+ summary?: string | undefined;
1203
+ }>;
1204
+ };
1205
+ readonly "session.switchModel": {
1206
+ readonly direction: "s2p";
1207
+ readonly kind: "request";
1208
+ readonly params: z.ZodObject<{
1209
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1210
+ model: z.ZodString;
1211
+ whenRunning: z.ZodDefault<z.ZodEnum<["reject", "afterCurrentTurn", "interrupt"]>>;
1212
+ }, "strip", z.ZodTypeAny, {
1213
+ sessionId: string & z.BRAND<"SessionId">;
1214
+ model: string;
1215
+ whenRunning: "interrupt" | "reject" | "afterCurrentTurn";
1216
+ }, {
1217
+ sessionId: string;
1218
+ model: string;
1219
+ whenRunning?: "interrupt" | "reject" | "afterCurrentTurn" | undefined;
1220
+ }>;
1221
+ readonly result: z.ZodObject<{
1222
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1223
+ previousModel: z.ZodString;
1224
+ model: z.ZodString;
1225
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1226
+ deferred: z.ZodOptional<z.ZodBoolean>;
1227
+ }, "strip", z.ZodTypeAny, {
1228
+ sessionId: string & z.BRAND<"SessionId">;
1229
+ model: string;
1230
+ previousModel: string;
1231
+ warnings?: string[] | undefined;
1232
+ deferred?: boolean | undefined;
1233
+ }, {
1234
+ sessionId: string;
1235
+ model: string;
1236
+ previousModel: string;
1237
+ warnings?: string[] | undefined;
1238
+ deferred?: boolean | undefined;
1239
+ }>;
1240
+ };
1241
+ readonly "session.interrupt": {
1242
+ readonly direction: "s2p";
1243
+ readonly kind: "request";
1244
+ readonly params: z.ZodObject<{
1245
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1246
+ reason: z.ZodOptional<z.ZodString>;
1247
+ }, "strip", z.ZodTypeAny, {
1248
+ sessionId: string & z.BRAND<"SessionId">;
1249
+ reason?: string | undefined;
1250
+ }, {
1251
+ sessionId: string;
1252
+ reason?: string | undefined;
1253
+ }>;
1254
+ readonly result: z.ZodObject<{
1255
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1256
+ interruptedTurnId: z.ZodOptional<z.ZodString>;
1257
+ status: z.ZodEnum<["idle", "running", "paused", "terminated"]>;
1258
+ }, "strip", z.ZodTypeAny, {
1259
+ status: "idle" | "running" | "paused" | "terminated";
1260
+ sessionId: string & z.BRAND<"SessionId">;
1261
+ interruptedTurnId?: string | undefined;
1262
+ }, {
1263
+ status: "idle" | "running" | "paused" | "terminated";
1264
+ sessionId: string;
1265
+ interruptedTurnId?: string | undefined;
1266
+ }>;
1267
+ };
1268
+ readonly "session.terminate": {
1269
+ readonly direction: "s2p";
1270
+ readonly kind: "request";
1271
+ readonly params: z.ZodObject<{
1272
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1273
+ cleanWorktree: z.ZodDefault<z.ZodBoolean>;
1274
+ }, "strip", z.ZodTypeAny, {
1275
+ sessionId: string & z.BRAND<"SessionId">;
1276
+ cleanWorktree: boolean;
1277
+ }, {
1278
+ sessionId: string;
1279
+ cleanWorktree?: boolean | undefined;
1280
+ }>;
1281
+ readonly result: z.ZodObject<{
1282
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1283
+ status: z.ZodLiteral<"terminated">;
1284
+ cleanedWorktreeId: z.ZodOptional<z.ZodString>;
1285
+ }, "strip", z.ZodTypeAny, {
1286
+ status: "terminated";
1287
+ sessionId: string & z.BRAND<"SessionId">;
1288
+ cleanedWorktreeId?: string | undefined;
1289
+ }, {
1290
+ status: "terminated";
1291
+ sessionId: string;
1292
+ cleanedWorktreeId?: string | undefined;
1293
+ }>;
1294
+ };
1295
+ readonly "session.status": {
1296
+ readonly direction: "s2p";
1297
+ readonly kind: "request";
1298
+ readonly params: z.ZodObject<{
1299
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1300
+ }, "strip", z.ZodTypeAny, {
1301
+ sessionId: string & z.BRAND<"SessionId">;
1302
+ }, {
1303
+ sessionId: string;
1304
+ }>;
1305
+ readonly result: z.ZodObject<{
1306
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1307
+ project: z.ZodBranded<z.ZodString, "ProjectId">;
1308
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
1309
+ model: z.ZodString;
1310
+ status: z.ZodEnum<["idle", "running", "paused", "terminated"]>;
1311
+ currentTurnId: z.ZodOptional<z.ZodString>;
1312
+ queuedCount: z.ZodOptional<z.ZodNumber>;
1313
+ context: z.ZodOptional<z.ZodObject<{
1314
+ contextWindow: z.ZodOptional<z.ZodNumber>;
1315
+ usedTokens: z.ZodOptional<z.ZodNumber>;
1316
+ usagePercent: z.ZodOptional<z.ZodNumber>;
1317
+ compactions: z.ZodOptional<z.ZodNumber>;
1318
+ }, "strip", z.ZodTypeAny, {
1319
+ contextWindow?: number | undefined;
1320
+ usedTokens?: number | undefined;
1321
+ usagePercent?: number | undefined;
1322
+ compactions?: number | undefined;
1323
+ }, {
1324
+ contextWindow?: number | undefined;
1325
+ usedTokens?: number | undefined;
1326
+ usagePercent?: number | undefined;
1327
+ compactions?: number | undefined;
1328
+ }>>;
1329
+ verbosity: z.ZodEnum<["final", "messages", "tools", "trace"]>;
1330
+ clientTag: z.ZodOptional<z.ZodString>;
1331
+ createdAt: z.ZodString;
1332
+ lastActiveAt: z.ZodOptional<z.ZodString>;
1333
+ }, "strip", z.ZodTypeAny, {
1334
+ status: "idle" | "running" | "paused" | "terminated";
1335
+ sessionId: string & z.BRAND<"SessionId">;
1336
+ agent: string & z.BRAND<"AgentId">;
1337
+ project: string & z.BRAND<"ProjectId">;
1338
+ model: string;
1339
+ verbosity: "final" | "messages" | "tools" | "trace";
1340
+ createdAt: string;
1341
+ clientTag?: string | undefined;
1342
+ context?: {
1343
+ contextWindow?: number | undefined;
1344
+ usedTokens?: number | undefined;
1345
+ usagePercent?: number | undefined;
1346
+ compactions?: number | undefined;
1347
+ } | undefined;
1348
+ currentTurnId?: string | undefined;
1349
+ queuedCount?: number | undefined;
1350
+ lastActiveAt?: string | undefined;
1351
+ }, {
1352
+ status: "idle" | "running" | "paused" | "terminated";
1353
+ sessionId: string;
1354
+ agent: string;
1355
+ project: string;
1356
+ model: string;
1357
+ verbosity: "final" | "messages" | "tools" | "trace";
1358
+ createdAt: string;
1359
+ clientTag?: string | undefined;
1360
+ context?: {
1361
+ contextWindow?: number | undefined;
1362
+ usedTokens?: number | undefined;
1363
+ usagePercent?: number | undefined;
1364
+ compactions?: number | undefined;
1365
+ } | undefined;
1366
+ currentTurnId?: string | undefined;
1367
+ queuedCount?: number | undefined;
1368
+ lastActiveAt?: string | undefined;
1369
+ }>;
1370
+ };
1371
+ readonly "session.list": {
1372
+ readonly direction: "s2p";
1373
+ readonly kind: "request";
1374
+ readonly params: z.ZodObject<{
1375
+ project: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
1376
+ agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
1377
+ status: z.ZodOptional<z.ZodEnum<["idle", "running", "paused", "terminated"]>>;
1378
+ limit: z.ZodOptional<z.ZodNumber>;
1379
+ cursor: z.ZodOptional<z.ZodString>;
1380
+ }, "strip", z.ZodTypeAny, {
1381
+ status?: "idle" | "running" | "paused" | "terminated" | undefined;
1382
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
1383
+ project?: (string & z.BRAND<"ProjectId">) | undefined;
1384
+ limit?: number | undefined;
1385
+ cursor?: string | undefined;
1386
+ }, {
1387
+ status?: "idle" | "running" | "paused" | "terminated" | undefined;
1388
+ agent?: string | undefined;
1389
+ project?: string | undefined;
1390
+ limit?: number | undefined;
1391
+ cursor?: string | undefined;
1392
+ }>;
1393
+ readonly result: z.ZodObject<{
1394
+ sessions: z.ZodArray<z.ZodObject<{
1395
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1396
+ project: z.ZodBranded<z.ZodString, "ProjectId">;
1397
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
1398
+ model: z.ZodString;
1399
+ status: z.ZodEnum<["idle", "running", "paused", "terminated"]>;
1400
+ currentTurnId: z.ZodOptional<z.ZodString>;
1401
+ queuedCount: z.ZodOptional<z.ZodNumber>;
1402
+ context: z.ZodOptional<z.ZodObject<{
1403
+ contextWindow: z.ZodOptional<z.ZodNumber>;
1404
+ usedTokens: z.ZodOptional<z.ZodNumber>;
1405
+ usagePercent: z.ZodOptional<z.ZodNumber>;
1406
+ compactions: z.ZodOptional<z.ZodNumber>;
1407
+ }, "strip", z.ZodTypeAny, {
1408
+ contextWindow?: number | undefined;
1409
+ usedTokens?: number | undefined;
1410
+ usagePercent?: number | undefined;
1411
+ compactions?: number | undefined;
1412
+ }, {
1413
+ contextWindow?: number | undefined;
1414
+ usedTokens?: number | undefined;
1415
+ usagePercent?: number | undefined;
1416
+ compactions?: number | undefined;
1417
+ }>>;
1418
+ verbosity: z.ZodEnum<["final", "messages", "tools", "trace"]>;
1419
+ clientTag: z.ZodOptional<z.ZodString>;
1420
+ createdAt: z.ZodString;
1421
+ lastActiveAt: z.ZodOptional<z.ZodString>;
1422
+ }, "strip", z.ZodTypeAny, {
1423
+ status: "idle" | "running" | "paused" | "terminated";
1424
+ sessionId: string & z.BRAND<"SessionId">;
1425
+ agent: string & z.BRAND<"AgentId">;
1426
+ project: string & z.BRAND<"ProjectId">;
1427
+ model: string;
1428
+ verbosity: "final" | "messages" | "tools" | "trace";
1429
+ createdAt: string;
1430
+ clientTag?: string | undefined;
1431
+ context?: {
1432
+ contextWindow?: number | undefined;
1433
+ usedTokens?: number | undefined;
1434
+ usagePercent?: number | undefined;
1435
+ compactions?: number | undefined;
1436
+ } | undefined;
1437
+ currentTurnId?: string | undefined;
1438
+ queuedCount?: number | undefined;
1439
+ lastActiveAt?: string | undefined;
1440
+ }, {
1441
+ status: "idle" | "running" | "paused" | "terminated";
1442
+ sessionId: string;
1443
+ agent: string;
1444
+ project: string;
1445
+ model: string;
1446
+ verbosity: "final" | "messages" | "tools" | "trace";
1447
+ createdAt: string;
1448
+ clientTag?: string | undefined;
1449
+ context?: {
1450
+ contextWindow?: number | undefined;
1451
+ usedTokens?: number | undefined;
1452
+ usagePercent?: number | undefined;
1453
+ compactions?: number | undefined;
1454
+ } | undefined;
1455
+ currentTurnId?: string | undefined;
1456
+ queuedCount?: number | undefined;
1457
+ lastActiveAt?: string | undefined;
1458
+ }>, "many">;
1459
+ nextCursor: z.ZodOptional<z.ZodString>;
1460
+ }, "strip", z.ZodTypeAny, {
1461
+ sessions: {
1462
+ status: "idle" | "running" | "paused" | "terminated";
1463
+ sessionId: string & z.BRAND<"SessionId">;
1464
+ agent: string & z.BRAND<"AgentId">;
1465
+ project: string & z.BRAND<"ProjectId">;
1466
+ model: string;
1467
+ verbosity: "final" | "messages" | "tools" | "trace";
1468
+ createdAt: string;
1469
+ clientTag?: string | undefined;
1470
+ context?: {
1471
+ contextWindow?: number | undefined;
1472
+ usedTokens?: number | undefined;
1473
+ usagePercent?: number | undefined;
1474
+ compactions?: number | undefined;
1475
+ } | undefined;
1476
+ currentTurnId?: string | undefined;
1477
+ queuedCount?: number | undefined;
1478
+ lastActiveAt?: string | undefined;
1479
+ }[];
1480
+ nextCursor?: string | undefined;
1481
+ }, {
1482
+ sessions: {
1483
+ status: "idle" | "running" | "paused" | "terminated";
1484
+ sessionId: string;
1485
+ agent: string;
1486
+ project: string;
1487
+ model: string;
1488
+ verbosity: "final" | "messages" | "tools" | "trace";
1489
+ createdAt: string;
1490
+ clientTag?: string | undefined;
1491
+ context?: {
1492
+ contextWindow?: number | undefined;
1493
+ usedTokens?: number | undefined;
1494
+ usagePercent?: number | undefined;
1495
+ compactions?: number | undefined;
1496
+ } | undefined;
1497
+ currentTurnId?: string | undefined;
1498
+ queuedCount?: number | undefined;
1499
+ lastActiveAt?: string | undefined;
1500
+ }[];
1501
+ nextCursor?: string | undefined;
1502
+ }>;
1503
+ };
1504
+ readonly "stream.event": {
1505
+ readonly direction: "p2s";
1506
+ readonly kind: "notification";
1507
+ readonly params: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1508
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1509
+ turnId: z.ZodString;
1510
+ origin: z.ZodDefault<z.ZodEnum<["solicited", "unsolicited"]>>;
1511
+ source: z.ZodOptional<z.ZodString>;
1512
+ seq: z.ZodNumber;
1513
+ at: z.ZodString;
1514
+ } & {
1515
+ type: z.ZodLiteral<"message">;
1516
+ role: z.ZodDefault<z.ZodEnum<["assistant", "user", "system"]>>;
1517
+ text: z.ZodString;
1518
+ delta: z.ZodDefault<z.ZodBoolean>;
1519
+ }, "strip", z.ZodTypeAny, {
1520
+ at: string;
1521
+ type: "message";
1522
+ sessionId: string & z.BRAND<"SessionId">;
1523
+ role: "system" | "user" | "assistant";
1524
+ turnId: string;
1525
+ origin: "solicited" | "unsolicited";
1526
+ seq: number;
1527
+ text: string;
1528
+ delta: boolean;
1529
+ source?: string | undefined;
1530
+ }, {
1531
+ at: string;
1532
+ type: "message";
1533
+ sessionId: string;
1534
+ turnId: string;
1535
+ seq: number;
1536
+ text: string;
1537
+ role?: "system" | "user" | "assistant" | undefined;
1538
+ origin?: "solicited" | "unsolicited" | undefined;
1539
+ source?: string | undefined;
1540
+ delta?: boolean | undefined;
1541
+ }>, z.ZodObject<{
1542
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1543
+ turnId: z.ZodString;
1544
+ origin: z.ZodDefault<z.ZodEnum<["solicited", "unsolicited"]>>;
1545
+ source: z.ZodOptional<z.ZodString>;
1546
+ seq: z.ZodNumber;
1547
+ at: z.ZodString;
1548
+ } & {
1549
+ type: z.ZodLiteral<"thinking">;
1550
+ text: z.ZodString;
1551
+ delta: z.ZodDefault<z.ZodBoolean>;
1552
+ }, "strip", z.ZodTypeAny, {
1553
+ at: string;
1554
+ type: "thinking";
1555
+ sessionId: string & z.BRAND<"SessionId">;
1556
+ turnId: string;
1557
+ origin: "solicited" | "unsolicited";
1558
+ seq: number;
1559
+ text: string;
1560
+ delta: boolean;
1561
+ source?: string | undefined;
1562
+ }, {
1563
+ at: string;
1564
+ type: "thinking";
1565
+ sessionId: string;
1566
+ turnId: string;
1567
+ seq: number;
1568
+ text: string;
1569
+ origin?: "solicited" | "unsolicited" | undefined;
1570
+ source?: string | undefined;
1571
+ delta?: boolean | undefined;
1572
+ }>, z.ZodObject<{
1573
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1574
+ turnId: z.ZodString;
1575
+ origin: z.ZodDefault<z.ZodEnum<["solicited", "unsolicited"]>>;
1576
+ source: z.ZodOptional<z.ZodString>;
1577
+ seq: z.ZodNumber;
1578
+ at: z.ZodString;
1579
+ } & {
1580
+ type: z.ZodLiteral<"tool_call">;
1581
+ toolName: z.ZodString;
1582
+ args: z.ZodOptional<z.ZodUnknown>;
1583
+ toolCallId: z.ZodOptional<z.ZodString>;
1584
+ }, "strip", z.ZodTypeAny, {
1585
+ at: string;
1586
+ type: "tool_call";
1587
+ sessionId: string & z.BRAND<"SessionId">;
1588
+ turnId: string;
1589
+ origin: "solicited" | "unsolicited";
1590
+ seq: number;
1591
+ toolName: string;
1592
+ source?: string | undefined;
1593
+ args?: unknown;
1594
+ toolCallId?: string | undefined;
1595
+ }, {
1596
+ at: string;
1597
+ type: "tool_call";
1598
+ sessionId: string;
1599
+ turnId: string;
1600
+ seq: number;
1601
+ toolName: string;
1602
+ origin?: "solicited" | "unsolicited" | undefined;
1603
+ source?: string | undefined;
1604
+ args?: unknown;
1605
+ toolCallId?: string | undefined;
1606
+ }>, z.ZodObject<{
1607
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1608
+ turnId: z.ZodString;
1609
+ origin: z.ZodDefault<z.ZodEnum<["solicited", "unsolicited"]>>;
1610
+ source: z.ZodOptional<z.ZodString>;
1611
+ seq: z.ZodNumber;
1612
+ at: z.ZodString;
1613
+ } & {
1614
+ type: z.ZodLiteral<"tool_result">;
1615
+ toolName: z.ZodString;
1616
+ toolCallId: z.ZodOptional<z.ZodString>;
1617
+ ok: z.ZodBoolean;
1618
+ output: z.ZodOptional<z.ZodUnknown>;
1619
+ }, "strip", z.ZodTypeAny, {
1620
+ at: string;
1621
+ type: "tool_result";
1622
+ sessionId: string & z.BRAND<"SessionId">;
1623
+ turnId: string;
1624
+ origin: "solicited" | "unsolicited";
1625
+ seq: number;
1626
+ toolName: string;
1627
+ ok: boolean;
1628
+ source?: string | undefined;
1629
+ toolCallId?: string | undefined;
1630
+ output?: unknown;
1631
+ }, {
1632
+ at: string;
1633
+ type: "tool_result";
1634
+ sessionId: string;
1635
+ turnId: string;
1636
+ seq: number;
1637
+ toolName: string;
1638
+ ok: boolean;
1639
+ origin?: "solicited" | "unsolicited" | undefined;
1640
+ source?: string | undefined;
1641
+ toolCallId?: string | undefined;
1642
+ output?: unknown;
1643
+ }>, z.ZodObject<{
1644
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1645
+ turnId: z.ZodString;
1646
+ origin: z.ZodDefault<z.ZodEnum<["solicited", "unsolicited"]>>;
1647
+ source: z.ZodOptional<z.ZodString>;
1648
+ seq: z.ZodNumber;
1649
+ at: z.ZodString;
1650
+ } & {
1651
+ type: z.ZodLiteral<"token">;
1652
+ text: z.ZodString;
1653
+ }, "strip", z.ZodTypeAny, {
1654
+ at: string;
1655
+ type: "token";
1656
+ sessionId: string & z.BRAND<"SessionId">;
1657
+ turnId: string;
1658
+ origin: "solicited" | "unsolicited";
1659
+ seq: number;
1660
+ text: string;
1661
+ source?: string | undefined;
1662
+ }, {
1663
+ at: string;
1664
+ type: "token";
1665
+ sessionId: string;
1666
+ turnId: string;
1667
+ seq: number;
1668
+ text: string;
1669
+ origin?: "solicited" | "unsolicited" | undefined;
1670
+ source?: string | undefined;
1671
+ }>, z.ZodObject<{
1672
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1673
+ turnId: z.ZodString;
1674
+ origin: z.ZodDefault<z.ZodEnum<["solicited", "unsolicited"]>>;
1675
+ source: z.ZodOptional<z.ZodString>;
1676
+ seq: z.ZodNumber;
1677
+ at: z.ZodString;
1678
+ } & {
1679
+ type: z.ZodLiteral<"result">;
1680
+ text: z.ZodString;
1681
+ usage: z.ZodOptional<z.ZodObject<{
1682
+ inputTokens: z.ZodOptional<z.ZodNumber>;
1683
+ outputTokens: z.ZodOptional<z.ZodNumber>;
1684
+ }, "strip", z.ZodTypeAny, {
1685
+ inputTokens?: number | undefined;
1686
+ outputTokens?: number | undefined;
1687
+ }, {
1688
+ inputTokens?: number | undefined;
1689
+ outputTokens?: number | undefined;
1690
+ }>>;
1691
+ status: z.ZodDefault<z.ZodEnum<["completed", "interrupted", "aborted", "failed", "timeout"]>>;
1692
+ final: z.ZodLiteral<true>;
1693
+ }, "strip", z.ZodTypeAny, {
1694
+ at: string;
1695
+ type: "result";
1696
+ status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
1697
+ final: true;
1698
+ sessionId: string & z.BRAND<"SessionId">;
1699
+ turnId: string;
1700
+ origin: "solicited" | "unsolicited";
1701
+ seq: number;
1702
+ text: string;
1703
+ source?: string | undefined;
1704
+ usage?: {
1705
+ inputTokens?: number | undefined;
1706
+ outputTokens?: number | undefined;
1707
+ } | undefined;
1708
+ }, {
1709
+ at: string;
1710
+ type: "result";
1711
+ final: true;
1712
+ sessionId: string;
1713
+ turnId: string;
1714
+ seq: number;
1715
+ text: string;
1716
+ status?: "aborted" | "interrupted" | "completed" | "failed" | "timeout" | undefined;
1717
+ origin?: "solicited" | "unsolicited" | undefined;
1718
+ source?: string | undefined;
1719
+ usage?: {
1720
+ inputTokens?: number | undefined;
1721
+ outputTokens?: number | undefined;
1722
+ } | undefined;
1723
+ }>, z.ZodObject<{
1724
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1725
+ turnId: z.ZodString;
1726
+ origin: z.ZodDefault<z.ZodEnum<["solicited", "unsolicited"]>>;
1727
+ source: z.ZodOptional<z.ZodString>;
1728
+ seq: z.ZodNumber;
1729
+ at: z.ZodString;
1730
+ } & {
1731
+ type: z.ZodLiteral<"error">;
1732
+ message: z.ZodString;
1733
+ appCode: z.ZodOptional<z.ZodString>;
1734
+ status: z.ZodDefault<z.ZodEnum<["failed", "aborted", "timeout", "interrupted"]>>;
1735
+ final: z.ZodLiteral<true>;
1736
+ }, "strip", z.ZodTypeAny, {
1737
+ at: string;
1738
+ message: string;
1739
+ type: "error";
1740
+ status: "aborted" | "interrupted" | "failed" | "timeout";
1741
+ final: true;
1742
+ sessionId: string & z.BRAND<"SessionId">;
1743
+ turnId: string;
1744
+ origin: "solicited" | "unsolicited";
1745
+ seq: number;
1746
+ appCode?: string | undefined;
1747
+ source?: string | undefined;
1748
+ }, {
1749
+ at: string;
1750
+ message: string;
1751
+ type: "error";
1752
+ final: true;
1753
+ sessionId: string;
1754
+ turnId: string;
1755
+ seq: number;
1756
+ status?: "aborted" | "interrupted" | "failed" | "timeout" | undefined;
1757
+ appCode?: string | undefined;
1758
+ origin?: "solicited" | "unsolicited" | undefined;
1759
+ source?: string | undefined;
1760
+ }>]>;
1761
+ readonly result: z.ZodUndefined;
1762
+ };
1763
+ readonly "stream.ack": {
1764
+ readonly direction: "s2p";
1765
+ readonly kind: "notification";
1766
+ readonly params: z.ZodObject<{
1767
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
1768
+ lastSeq: z.ZodNumber;
1769
+ }, "strip", z.ZodTypeAny, {
1770
+ lastSeq: number;
1771
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
1772
+ }, {
1773
+ lastSeq: number;
1774
+ sessionId?: string | undefined;
1775
+ }>;
1776
+ readonly result: z.ZodUndefined;
1777
+ };
1778
+ readonly "hook.fired": {
1779
+ readonly direction: "p2s";
1780
+ readonly kind: "request";
1781
+ readonly params: z.ZodObject<{
1782
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1783
+ hookId: z.ZodString;
1784
+ hookType: z.ZodEnum<["pre_tool", "post_tool", "pre_command", "pre_file_write", "pre_network", "session_start", "session_end", "notification"]>;
1785
+ payload: z.ZodDefault<z.ZodObject<{
1786
+ toolName: z.ZodOptional<z.ZodString>;
1787
+ command: z.ZodOptional<z.ZodString>;
1788
+ filePath: z.ZodOptional<z.ZodString>;
1789
+ url: z.ZodOptional<z.ZodString>;
1790
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1791
+ }, "strip", z.ZodTypeAny, {
1792
+ toolName?: string | undefined;
1793
+ command?: string | undefined;
1794
+ filePath?: string | undefined;
1795
+ url?: string | undefined;
1796
+ extra?: Record<string, unknown> | undefined;
1797
+ }, {
1798
+ toolName?: string | undefined;
1799
+ command?: string | undefined;
1800
+ filePath?: string | undefined;
1801
+ url?: string | undefined;
1802
+ extra?: Record<string, unknown> | undefined;
1803
+ }>>;
1804
+ turnId: z.ZodOptional<z.ZodString>;
1805
+ at: z.ZodString;
1806
+ }, "strip", z.ZodTypeAny, {
1807
+ at: string;
1808
+ sessionId: string & z.BRAND<"SessionId">;
1809
+ hookId: string;
1810
+ hookType: "pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification";
1811
+ payload: {
1812
+ toolName?: string | undefined;
1813
+ command?: string | undefined;
1814
+ filePath?: string | undefined;
1815
+ url?: string | undefined;
1816
+ extra?: Record<string, unknown> | undefined;
1817
+ };
1818
+ turnId?: string | undefined;
1819
+ }, {
1820
+ at: string;
1821
+ sessionId: string;
1822
+ hookId: string;
1823
+ hookType: "pre_tool" | "post_tool" | "pre_command" | "pre_file_write" | "pre_network" | "session_start" | "session_end" | "notification";
1824
+ turnId?: string | undefined;
1825
+ payload?: {
1826
+ toolName?: string | undefined;
1827
+ command?: string | undefined;
1828
+ filePath?: string | undefined;
1829
+ url?: string | undefined;
1830
+ extra?: Record<string, unknown> | undefined;
1831
+ } | undefined;
1832
+ }>;
1833
+ readonly result: z.ZodObject<{
1834
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1835
+ hookId: z.ZodString;
1836
+ applied: z.ZodBoolean;
1837
+ }, "strip", z.ZodTypeAny, {
1838
+ sessionId: string & z.BRAND<"SessionId">;
1839
+ hookId: string;
1840
+ applied: boolean;
1841
+ }, {
1842
+ sessionId: string;
1843
+ hookId: string;
1844
+ applied: boolean;
1845
+ }>;
1846
+ };
1847
+ readonly "hook.resolve": {
1848
+ readonly direction: "s2p";
1849
+ readonly kind: "request";
1850
+ readonly params: z.ZodObject<{
1851
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1852
+ hookId: z.ZodString;
1853
+ action: z.ZodEnum<["continue", "inject", "modify", "abort"]>;
1854
+ context: z.ZodOptional<z.ZodArray<z.ZodObject<{
1855
+ role: z.ZodEnum<["system", "user", "assistant"]>;
1856
+ content: z.ZodString;
1857
+ }, "strip", z.ZodTypeAny, {
1858
+ role: "system" | "user" | "assistant";
1859
+ content: string;
1860
+ }, {
1861
+ role: "system" | "user" | "assistant";
1862
+ content: string;
1863
+ }>, "many">>;
1864
+ patch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1865
+ reason: z.ZodOptional<z.ZodString>;
1866
+ }, "strip", z.ZodTypeAny, {
1867
+ sessionId: string & z.BRAND<"SessionId">;
1868
+ hookId: string;
1869
+ action: "inject" | "continue" | "modify" | "abort";
1870
+ reason?: string | undefined;
1871
+ context?: {
1872
+ role: "system" | "user" | "assistant";
1873
+ content: string;
1874
+ }[] | undefined;
1875
+ patch?: Record<string, unknown> | undefined;
1876
+ }, {
1877
+ sessionId: string;
1878
+ hookId: string;
1879
+ action: "inject" | "continue" | "modify" | "abort";
1880
+ reason?: string | undefined;
1881
+ context?: {
1882
+ role: "system" | "user" | "assistant";
1883
+ content: string;
1884
+ }[] | undefined;
1885
+ patch?: Record<string, unknown> | undefined;
1886
+ }>;
1887
+ readonly result: z.ZodObject<{
1888
+ sessionId: z.ZodBranded<z.ZodString, "SessionId">;
1889
+ hookId: z.ZodString;
1890
+ applied: z.ZodBoolean;
1891
+ }, "strip", z.ZodTypeAny, {
1892
+ sessionId: string & z.BRAND<"SessionId">;
1893
+ hookId: string;
1894
+ applied: boolean;
1895
+ }, {
1896
+ sessionId: string;
1897
+ hookId: string;
1898
+ applied: boolean;
1899
+ }>;
1900
+ };
1901
+ readonly "document.send": {
1902
+ readonly direction: "p2s";
1903
+ readonly kind: "request";
1904
+ readonly params: z.ZodObject<{
1905
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
1906
+ turnId: z.ZodOptional<z.ZodString>;
1907
+ documents: z.ZodArray<z.ZodObject<{
1908
+ name: z.ZodString;
1909
+ relativePath: z.ZodOptional<z.ZodString>;
1910
+ mimeType: z.ZodOptional<z.ZodString>;
1911
+ kind: z.ZodDefault<z.ZodEnum<["attachment", "document", "image", "file"]>>;
1912
+ caption: z.ZodOptional<z.ZodString>;
1913
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
1914
+ sha256: z.ZodOptional<z.ZodString>;
1915
+ content: z.ZodUnion<[z.ZodObject<{
1916
+ encoding: z.ZodLiteral<"base64">;
1917
+ data: z.ZodString;
1918
+ }, "strip", z.ZodTypeAny, {
1919
+ encoding: "base64";
1920
+ data: string;
1921
+ }, {
1922
+ encoding: "base64";
1923
+ data: string;
1924
+ }>, z.ZodObject<{
1925
+ encoding: z.ZodLiteral<"utf8">;
1926
+ data: z.ZodString;
1927
+ }, "strip", z.ZodTypeAny, {
1928
+ encoding: "utf8";
1929
+ data: string;
1930
+ }, {
1931
+ encoding: "utf8";
1932
+ data: string;
1933
+ }>, z.ZodObject<{
1934
+ ref: z.ZodString;
1935
+ }, "strip", z.ZodTypeAny, {
1936
+ ref: string;
1937
+ }, {
1938
+ ref: string;
1939
+ }>]>;
1940
+ }, "strip", z.ZodTypeAny, {
1941
+ kind: "attachment" | "document" | "image" | "file";
1942
+ content: {
1943
+ encoding: "base64";
1944
+ data: string;
1945
+ } | {
1946
+ encoding: "utf8";
1947
+ data: string;
1948
+ } | {
1949
+ ref: string;
1950
+ };
1951
+ name: string;
1952
+ caption?: string | undefined;
1953
+ relativePath?: string | undefined;
1954
+ mimeType?: string | undefined;
1955
+ sizeBytes?: number | undefined;
1956
+ sha256?: string | undefined;
1957
+ }, {
1958
+ content: {
1959
+ encoding: "base64";
1960
+ data: string;
1961
+ } | {
1962
+ encoding: "utf8";
1963
+ data: string;
1964
+ } | {
1965
+ ref: string;
1966
+ };
1967
+ name: string;
1968
+ kind?: "attachment" | "document" | "image" | "file" | undefined;
1969
+ caption?: string | undefined;
1970
+ relativePath?: string | undefined;
1971
+ mimeType?: string | undefined;
1972
+ sizeBytes?: number | undefined;
1973
+ sha256?: string | undefined;
1974
+ }>, "many">;
1975
+ at: z.ZodString;
1976
+ }, "strip", z.ZodTypeAny, {
1977
+ at: string;
1978
+ documents: {
1979
+ kind: "attachment" | "document" | "image" | "file";
1980
+ content: {
1981
+ encoding: "base64";
1982
+ data: string;
1983
+ } | {
1984
+ encoding: "utf8";
1985
+ data: string;
1986
+ } | {
1987
+ ref: string;
1988
+ };
1989
+ name: string;
1990
+ caption?: string | undefined;
1991
+ relativePath?: string | undefined;
1992
+ mimeType?: string | undefined;
1993
+ sizeBytes?: number | undefined;
1994
+ sha256?: string | undefined;
1995
+ }[];
1996
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
1997
+ turnId?: string | undefined;
1998
+ }, {
1999
+ at: string;
2000
+ documents: {
2001
+ content: {
2002
+ encoding: "base64";
2003
+ data: string;
2004
+ } | {
2005
+ encoding: "utf8";
2006
+ data: string;
2007
+ } | {
2008
+ ref: string;
2009
+ };
2010
+ name: string;
2011
+ kind?: "attachment" | "document" | "image" | "file" | undefined;
2012
+ caption?: string | undefined;
2013
+ relativePath?: string | undefined;
2014
+ mimeType?: string | undefined;
2015
+ sizeBytes?: number | undefined;
2016
+ sha256?: string | undefined;
2017
+ }[];
2018
+ sessionId?: string | undefined;
2019
+ turnId?: string | undefined;
2020
+ }>;
2021
+ readonly result: z.ZodObject<{
2022
+ delivered: z.ZodArray<z.ZodObject<{
2023
+ name: z.ZodString;
2024
+ ok: z.ZodBoolean;
2025
+ serverRef: z.ZodOptional<z.ZodString>;
2026
+ error: z.ZodOptional<z.ZodString>;
2027
+ }, "strip", z.ZodTypeAny, {
2028
+ name: string;
2029
+ ok: boolean;
2030
+ error?: string | undefined;
2031
+ serverRef?: string | undefined;
2032
+ }, {
2033
+ name: string;
2034
+ ok: boolean;
2035
+ error?: string | undefined;
2036
+ serverRef?: string | undefined;
2037
+ }>, "many">;
2038
+ }, "strip", z.ZodTypeAny, {
2039
+ delivered: {
2040
+ name: string;
2041
+ ok: boolean;
2042
+ error?: string | undefined;
2043
+ serverRef?: string | undefined;
2044
+ }[];
2045
+ }, {
2046
+ delivered: {
2047
+ name: string;
2048
+ ok: boolean;
2049
+ error?: string | undefined;
2050
+ serverRef?: string | undefined;
2051
+ }[];
2052
+ }>;
2053
+ };
2054
+ readonly "document.prepare_upload": {
2055
+ readonly direction: "p2s";
2056
+ readonly kind: "request";
2057
+ readonly params: z.ZodObject<{
2058
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
2059
+ turnId: z.ZodOptional<z.ZodString>;
2060
+ filename: z.ZodString;
2061
+ sizeBytes: z.ZodNumber;
2062
+ mimeType: z.ZodOptional<z.ZodString>;
2063
+ sha256: z.ZodOptional<z.ZodString>;
2064
+ kind: z.ZodDefault<z.ZodEnum<["attachment", "document", "image", "file"]>>;
2065
+ at: z.ZodString;
2066
+ }, "strip", z.ZodTypeAny, {
2067
+ at: string;
2068
+ kind: "attachment" | "document" | "image" | "file";
2069
+ sizeBytes: number;
2070
+ filename: string;
2071
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
2072
+ turnId?: string | undefined;
2073
+ mimeType?: string | undefined;
2074
+ sha256?: string | undefined;
2075
+ }, {
2076
+ at: string;
2077
+ sizeBytes: number;
2078
+ filename: string;
2079
+ sessionId?: string | undefined;
2080
+ kind?: "attachment" | "document" | "image" | "file" | undefined;
2081
+ turnId?: string | undefined;
2082
+ mimeType?: string | undefined;
2083
+ sha256?: string | undefined;
2084
+ }>;
2085
+ readonly result: z.ZodObject<{
2086
+ uploadRef: z.ZodString;
2087
+ uploadUrl: z.ZodString;
2088
+ method: z.ZodDefault<z.ZodEnum<["PUT", "POST"]>>;
2089
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2090
+ expiresAt: z.ZodOptional<z.ZodString>;
2091
+ }, "strip", z.ZodTypeAny, {
2092
+ uploadRef: string;
2093
+ uploadUrl: string;
2094
+ method: "PUT" | "POST";
2095
+ headers?: Record<string, string> | undefined;
2096
+ expiresAt?: string | undefined;
2097
+ }, {
2098
+ uploadRef: string;
2099
+ uploadUrl: string;
2100
+ method?: "PUT" | "POST" | undefined;
2101
+ headers?: Record<string, string> | undefined;
2102
+ expiresAt?: string | undefined;
2103
+ }>;
2104
+ };
2105
+ readonly "interaction.request": {
2106
+ readonly direction: "p2s";
2107
+ readonly kind: "request";
2108
+ readonly params: z.ZodObject<{
2109
+ requestId: z.ZodString;
2110
+ sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
2111
+ turnId: z.ZodOptional<z.ZodString>;
2112
+ form: z.ZodObject<{
2113
+ title: z.ZodString;
2114
+ description: z.ZodOptional<z.ZodString>;
2115
+ fields: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2116
+ type: z.ZodLiteral<"text">;
2117
+ placeholder: z.ZodOptional<z.ZodString>;
2118
+ defaultValue: z.ZodOptional<z.ZodString>;
2119
+ key: z.ZodString;
2120
+ label: z.ZodString;
2121
+ required: z.ZodDefault<z.ZodBoolean>;
2122
+ help: z.ZodOptional<z.ZodString>;
2123
+ }, "strip", z.ZodTypeAny, {
2124
+ type: "text";
2125
+ label: string;
2126
+ key: string;
2127
+ required: boolean;
2128
+ placeholder?: string | undefined;
2129
+ defaultValue?: string | undefined;
2130
+ help?: string | undefined;
2131
+ }, {
2132
+ type: "text";
2133
+ label: string;
2134
+ key: string;
2135
+ placeholder?: string | undefined;
2136
+ defaultValue?: string | undefined;
2137
+ required?: boolean | undefined;
2138
+ help?: string | undefined;
2139
+ }>, z.ZodObject<{
2140
+ type: z.ZodLiteral<"textarea">;
2141
+ placeholder: z.ZodOptional<z.ZodString>;
2142
+ defaultValue: z.ZodOptional<z.ZodString>;
2143
+ key: z.ZodString;
2144
+ label: z.ZodString;
2145
+ required: z.ZodDefault<z.ZodBoolean>;
2146
+ help: z.ZodOptional<z.ZodString>;
2147
+ }, "strip", z.ZodTypeAny, {
2148
+ type: "textarea";
2149
+ label: string;
2150
+ key: string;
2151
+ required: boolean;
2152
+ placeholder?: string | undefined;
2153
+ defaultValue?: string | undefined;
2154
+ help?: string | undefined;
2155
+ }, {
2156
+ type: "textarea";
2157
+ label: string;
2158
+ key: string;
2159
+ placeholder?: string | undefined;
2160
+ defaultValue?: string | undefined;
2161
+ required?: boolean | undefined;
2162
+ help?: string | undefined;
2163
+ }>, z.ZodObject<{
2164
+ type: z.ZodLiteral<"number">;
2165
+ defaultValue: z.ZodOptional<z.ZodNumber>;
2166
+ key: z.ZodString;
2167
+ label: z.ZodString;
2168
+ required: z.ZodDefault<z.ZodBoolean>;
2169
+ help: z.ZodOptional<z.ZodString>;
2170
+ }, "strip", z.ZodTypeAny, {
2171
+ type: "number";
2172
+ label: string;
2173
+ key: string;
2174
+ required: boolean;
2175
+ defaultValue?: number | undefined;
2176
+ help?: string | undefined;
2177
+ }, {
2178
+ type: "number";
2179
+ label: string;
2180
+ key: string;
2181
+ defaultValue?: number | undefined;
2182
+ required?: boolean | undefined;
2183
+ help?: string | undefined;
2184
+ }>, z.ZodObject<{
2185
+ type: z.ZodLiteral<"boolean">;
2186
+ defaultValue: z.ZodOptional<z.ZodBoolean>;
2187
+ key: z.ZodString;
2188
+ label: z.ZodString;
2189
+ required: z.ZodDefault<z.ZodBoolean>;
2190
+ help: z.ZodOptional<z.ZodString>;
2191
+ }, "strip", z.ZodTypeAny, {
2192
+ type: "boolean";
2193
+ label: string;
2194
+ key: string;
2195
+ required: boolean;
2196
+ defaultValue?: boolean | undefined;
2197
+ help?: string | undefined;
2198
+ }, {
2199
+ type: "boolean";
2200
+ label: string;
2201
+ key: string;
2202
+ defaultValue?: boolean | undefined;
2203
+ required?: boolean | undefined;
2204
+ help?: string | undefined;
2205
+ }>, z.ZodObject<{
2206
+ type: z.ZodLiteral<"select">;
2207
+ options: z.ZodArray<z.ZodObject<{
2208
+ label: z.ZodString;
2209
+ value: z.ZodString;
2210
+ }, "strip", z.ZodTypeAny, {
2211
+ value: string;
2212
+ label: string;
2213
+ }, {
2214
+ value: string;
2215
+ label: string;
2216
+ }>, "many">;
2217
+ defaultValue: z.ZodOptional<z.ZodString>;
2218
+ key: z.ZodString;
2219
+ label: z.ZodString;
2220
+ required: z.ZodDefault<z.ZodBoolean>;
2221
+ help: z.ZodOptional<z.ZodString>;
2222
+ }, "strip", z.ZodTypeAny, {
2223
+ options: {
2224
+ value: string;
2225
+ label: string;
2226
+ }[];
2227
+ type: "select";
2228
+ label: string;
2229
+ key: string;
2230
+ required: boolean;
2231
+ defaultValue?: string | undefined;
2232
+ help?: string | undefined;
2233
+ }, {
2234
+ options: {
2235
+ value: string;
2236
+ label: string;
2237
+ }[];
2238
+ type: "select";
2239
+ label: string;
2240
+ key: string;
2241
+ defaultValue?: string | undefined;
2242
+ required?: boolean | undefined;
2243
+ help?: string | undefined;
2244
+ }>, z.ZodObject<{
2245
+ type: z.ZodLiteral<"multiselect">;
2246
+ options: z.ZodArray<z.ZodObject<{
2247
+ label: z.ZodString;
2248
+ value: z.ZodString;
2249
+ }, "strip", z.ZodTypeAny, {
2250
+ value: string;
2251
+ label: string;
2252
+ }, {
2253
+ value: string;
2254
+ label: string;
2255
+ }>, "many">;
2256
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2257
+ key: z.ZodString;
2258
+ label: z.ZodString;
2259
+ required: z.ZodDefault<z.ZodBoolean>;
2260
+ help: z.ZodOptional<z.ZodString>;
2261
+ }, "strip", z.ZodTypeAny, {
2262
+ options: {
2263
+ value: string;
2264
+ label: string;
2265
+ }[];
2266
+ type: "multiselect";
2267
+ label: string;
2268
+ key: string;
2269
+ required: boolean;
2270
+ defaultValue?: string[] | undefined;
2271
+ help?: string | undefined;
2272
+ }, {
2273
+ options: {
2274
+ value: string;
2275
+ label: string;
2276
+ }[];
2277
+ type: "multiselect";
2278
+ label: string;
2279
+ key: string;
2280
+ defaultValue?: string[] | undefined;
2281
+ required?: boolean | undefined;
2282
+ help?: string | undefined;
2283
+ }>, z.ZodObject<{
2284
+ type: z.ZodLiteral<"date">;
2285
+ defaultValue: z.ZodOptional<z.ZodString>;
2286
+ key: z.ZodString;
2287
+ label: z.ZodString;
2288
+ required: z.ZodDefault<z.ZodBoolean>;
2289
+ help: z.ZodOptional<z.ZodString>;
2290
+ }, "strip", z.ZodTypeAny, {
2291
+ type: "date";
2292
+ label: string;
2293
+ key: string;
2294
+ required: boolean;
2295
+ defaultValue?: string | undefined;
2296
+ help?: string | undefined;
2297
+ }, {
2298
+ type: "date";
2299
+ label: string;
2300
+ key: string;
2301
+ defaultValue?: string | undefined;
2302
+ required?: boolean | undefined;
2303
+ help?: string | undefined;
2304
+ }>]>, "many">>;
2305
+ submitLabel: z.ZodDefault<z.ZodString>;
2306
+ cancelLabel: z.ZodOptional<z.ZodString>;
2307
+ }, "strip", z.ZodTypeAny, {
2308
+ title: string;
2309
+ fields: ({
2310
+ type: "text";
2311
+ label: string;
2312
+ key: string;
2313
+ required: boolean;
2314
+ placeholder?: string | undefined;
2315
+ defaultValue?: string | undefined;
2316
+ help?: string | undefined;
2317
+ } | {
2318
+ type: "textarea";
2319
+ label: string;
2320
+ key: string;
2321
+ required: boolean;
2322
+ placeholder?: string | undefined;
2323
+ defaultValue?: string | undefined;
2324
+ help?: string | undefined;
2325
+ } | {
2326
+ type: "number";
2327
+ label: string;
2328
+ key: string;
2329
+ required: boolean;
2330
+ defaultValue?: number | undefined;
2331
+ help?: string | undefined;
2332
+ } | {
2333
+ type: "boolean";
2334
+ label: string;
2335
+ key: string;
2336
+ required: boolean;
2337
+ defaultValue?: boolean | undefined;
2338
+ help?: string | undefined;
2339
+ } | {
2340
+ options: {
2341
+ value: string;
2342
+ label: string;
2343
+ }[];
2344
+ type: "select";
2345
+ label: string;
2346
+ key: string;
2347
+ required: boolean;
2348
+ defaultValue?: string | undefined;
2349
+ help?: string | undefined;
2350
+ } | {
2351
+ options: {
2352
+ value: string;
2353
+ label: string;
2354
+ }[];
2355
+ type: "multiselect";
2356
+ label: string;
2357
+ key: string;
2358
+ required: boolean;
2359
+ defaultValue?: string[] | undefined;
2360
+ help?: string | undefined;
2361
+ } | {
2362
+ type: "date";
2363
+ label: string;
2364
+ key: string;
2365
+ required: boolean;
2366
+ defaultValue?: string | undefined;
2367
+ help?: string | undefined;
2368
+ })[];
2369
+ submitLabel: string;
2370
+ description?: string | undefined;
2371
+ cancelLabel?: string | undefined;
2372
+ }, {
2373
+ title: string;
2374
+ description?: string | undefined;
2375
+ fields?: ({
2376
+ type: "text";
2377
+ label: string;
2378
+ key: string;
2379
+ placeholder?: string | undefined;
2380
+ defaultValue?: string | undefined;
2381
+ required?: boolean | undefined;
2382
+ help?: string | undefined;
2383
+ } | {
2384
+ type: "textarea";
2385
+ label: string;
2386
+ key: string;
2387
+ placeholder?: string | undefined;
2388
+ defaultValue?: string | undefined;
2389
+ required?: boolean | undefined;
2390
+ help?: string | undefined;
2391
+ } | {
2392
+ type: "number";
2393
+ label: string;
2394
+ key: string;
2395
+ defaultValue?: number | undefined;
2396
+ required?: boolean | undefined;
2397
+ help?: string | undefined;
2398
+ } | {
2399
+ type: "boolean";
2400
+ label: string;
2401
+ key: string;
2402
+ defaultValue?: boolean | undefined;
2403
+ required?: boolean | undefined;
2404
+ help?: string | undefined;
2405
+ } | {
2406
+ options: {
2407
+ value: string;
2408
+ label: string;
2409
+ }[];
2410
+ type: "select";
2411
+ label: string;
2412
+ key: string;
2413
+ defaultValue?: string | undefined;
2414
+ required?: boolean | undefined;
2415
+ help?: string | undefined;
2416
+ } | {
2417
+ options: {
2418
+ value: string;
2419
+ label: string;
2420
+ }[];
2421
+ type: "multiselect";
2422
+ label: string;
2423
+ key: string;
2424
+ defaultValue?: string[] | undefined;
2425
+ required?: boolean | undefined;
2426
+ help?: string | undefined;
2427
+ } | {
2428
+ type: "date";
2429
+ label: string;
2430
+ key: string;
2431
+ defaultValue?: string | undefined;
2432
+ required?: boolean | undefined;
2433
+ help?: string | undefined;
2434
+ })[] | undefined;
2435
+ submitLabel?: string | undefined;
2436
+ cancelLabel?: string | undefined;
2437
+ }>;
2438
+ blocking: z.ZodDefault<z.ZodBoolean>;
2439
+ hookId: z.ZodOptional<z.ZodString>;
2440
+ timeoutSeconds: z.ZodOptional<z.ZodNumber>;
2441
+ at: z.ZodString;
2442
+ }, "strip", z.ZodTypeAny, {
2443
+ at: string;
2444
+ form: {
2445
+ title: string;
2446
+ fields: ({
2447
+ type: "text";
2448
+ label: string;
2449
+ key: string;
2450
+ required: boolean;
2451
+ placeholder?: string | undefined;
2452
+ defaultValue?: string | undefined;
2453
+ help?: string | undefined;
2454
+ } | {
2455
+ type: "textarea";
2456
+ label: string;
2457
+ key: string;
2458
+ required: boolean;
2459
+ placeholder?: string | undefined;
2460
+ defaultValue?: string | undefined;
2461
+ help?: string | undefined;
2462
+ } | {
2463
+ type: "number";
2464
+ label: string;
2465
+ key: string;
2466
+ required: boolean;
2467
+ defaultValue?: number | undefined;
2468
+ help?: string | undefined;
2469
+ } | {
2470
+ type: "boolean";
2471
+ label: string;
2472
+ key: string;
2473
+ required: boolean;
2474
+ defaultValue?: boolean | undefined;
2475
+ help?: string | undefined;
2476
+ } | {
2477
+ options: {
2478
+ value: string;
2479
+ label: string;
2480
+ }[];
2481
+ type: "select";
2482
+ label: string;
2483
+ key: string;
2484
+ required: boolean;
2485
+ defaultValue?: string | undefined;
2486
+ help?: string | undefined;
2487
+ } | {
2488
+ options: {
2489
+ value: string;
2490
+ label: string;
2491
+ }[];
2492
+ type: "multiselect";
2493
+ label: string;
2494
+ key: string;
2495
+ required: boolean;
2496
+ defaultValue?: string[] | undefined;
2497
+ help?: string | undefined;
2498
+ } | {
2499
+ type: "date";
2500
+ label: string;
2501
+ key: string;
2502
+ required: boolean;
2503
+ defaultValue?: string | undefined;
2504
+ help?: string | undefined;
2505
+ })[];
2506
+ submitLabel: string;
2507
+ description?: string | undefined;
2508
+ cancelLabel?: string | undefined;
2509
+ };
2510
+ blocking: boolean;
2511
+ requestId: string;
2512
+ sessionId?: (string & z.BRAND<"SessionId">) | undefined;
2513
+ turnId?: string | undefined;
2514
+ hookId?: string | undefined;
2515
+ timeoutSeconds?: number | undefined;
2516
+ }, {
2517
+ at: string;
2518
+ form: {
2519
+ title: string;
2520
+ description?: string | undefined;
2521
+ fields?: ({
2522
+ type: "text";
2523
+ label: string;
2524
+ key: string;
2525
+ placeholder?: string | undefined;
2526
+ defaultValue?: string | undefined;
2527
+ required?: boolean | undefined;
2528
+ help?: string | undefined;
2529
+ } | {
2530
+ type: "textarea";
2531
+ label: string;
2532
+ key: string;
2533
+ placeholder?: string | undefined;
2534
+ defaultValue?: string | undefined;
2535
+ required?: boolean | undefined;
2536
+ help?: string | undefined;
2537
+ } | {
2538
+ type: "number";
2539
+ label: string;
2540
+ key: string;
2541
+ defaultValue?: number | undefined;
2542
+ required?: boolean | undefined;
2543
+ help?: string | undefined;
2544
+ } | {
2545
+ type: "boolean";
2546
+ label: string;
2547
+ key: string;
2548
+ defaultValue?: boolean | undefined;
2549
+ required?: boolean | undefined;
2550
+ help?: string | undefined;
2551
+ } | {
2552
+ options: {
2553
+ value: string;
2554
+ label: string;
2555
+ }[];
2556
+ type: "select";
2557
+ label: string;
2558
+ key: string;
2559
+ defaultValue?: string | undefined;
2560
+ required?: boolean | undefined;
2561
+ help?: string | undefined;
2562
+ } | {
2563
+ options: {
2564
+ value: string;
2565
+ label: string;
2566
+ }[];
2567
+ type: "multiselect";
2568
+ label: string;
2569
+ key: string;
2570
+ defaultValue?: string[] | undefined;
2571
+ required?: boolean | undefined;
2572
+ help?: string | undefined;
2573
+ } | {
2574
+ type: "date";
2575
+ label: string;
2576
+ key: string;
2577
+ defaultValue?: string | undefined;
2578
+ required?: boolean | undefined;
2579
+ help?: string | undefined;
2580
+ })[] | undefined;
2581
+ submitLabel?: string | undefined;
2582
+ cancelLabel?: string | undefined;
2583
+ };
2584
+ requestId: string;
2585
+ sessionId?: string | undefined;
2586
+ turnId?: string | undefined;
2587
+ hookId?: string | undefined;
2588
+ blocking?: boolean | undefined;
2589
+ timeoutSeconds?: number | undefined;
2590
+ }>;
2591
+ readonly result: z.ZodObject<{
2592
+ requestId: z.ZodString;
2593
+ action: z.ZodEnum<["submit", "cancel", "timeout"]>;
2594
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">, z.ZodBoolean, z.ZodNumber]>>>;
2595
+ }, "strip", z.ZodTypeAny, {
2596
+ action: "timeout" | "submit" | "cancel";
2597
+ requestId: string;
2598
+ values?: Record<string, string | number | boolean | string[]> | undefined;
2599
+ }, {
2600
+ action: "timeout" | "submit" | "cancel";
2601
+ requestId: string;
2602
+ values?: Record<string, string | number | boolean | string[]> | undefined;
2603
+ }>;
2604
+ };
2605
+ readonly "interaction.response": {
2606
+ readonly direction: "s2p";
2607
+ readonly kind: "notification";
2608
+ readonly params: z.ZodObject<{
2609
+ requestId: z.ZodString;
2610
+ action: z.ZodEnum<["submit", "cancel", "timeout"]>;
2611
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">, z.ZodBoolean, z.ZodNumber]>>>;
2612
+ at: z.ZodString;
2613
+ }, "strip", z.ZodTypeAny, {
2614
+ at: string;
2615
+ action: "timeout" | "submit" | "cancel";
2616
+ requestId: string;
2617
+ values?: Record<string, string | number | boolean | string[]> | undefined;
2618
+ }, {
2619
+ at: string;
2620
+ action: "timeout" | "submit" | "cancel";
2621
+ requestId: string;
2622
+ values?: Record<string, string | number | boolean | string[]> | undefined;
2623
+ }>;
2624
+ readonly result: z.ZodUndefined;
2625
+ };
2626
+ readonly "interaction.cancel": {
2627
+ readonly direction: "s2p";
2628
+ readonly kind: "request";
2629
+ readonly params: z.ZodObject<{
2630
+ requestId: z.ZodString;
2631
+ reason: z.ZodOptional<z.ZodString>;
2632
+ }, "strip", z.ZodTypeAny, {
2633
+ requestId: string;
2634
+ reason?: string | undefined;
2635
+ }, {
2636
+ requestId: string;
2637
+ reason?: string | undefined;
2638
+ }>;
2639
+ readonly result: z.ZodObject<{
2640
+ requestId: z.ZodString;
2641
+ cancelled: z.ZodBoolean;
2642
+ }, "strip", z.ZodTypeAny, {
2643
+ requestId: string;
2644
+ cancelled: boolean;
2645
+ }, {
2646
+ requestId: string;
2647
+ cancelled: boolean;
2648
+ }>;
2649
+ };
2650
+ readonly "project.create": {
2651
+ readonly direction: "s2p";
2652
+ readonly kind: "request";
2653
+ readonly params: z.ZodObject<{
2654
+ clientRequestId: z.ZodOptional<z.ZodString>;
2655
+ name: z.ZodString;
2656
+ path: z.ZodOptional<z.ZodString>;
2657
+ git: z.ZodDefault<z.ZodBoolean>;
2658
+ remote: z.ZodOptional<z.ZodString>;
2659
+ }, "strip", z.ZodTypeAny, {
2660
+ name: string;
2661
+ git: boolean;
2662
+ path?: string | undefined;
2663
+ clientRequestId?: string | undefined;
2664
+ remote?: string | undefined;
2665
+ }, {
2666
+ name: string;
2667
+ path?: string | undefined;
2668
+ clientRequestId?: string | undefined;
2669
+ git?: boolean | undefined;
2670
+ remote?: string | undefined;
2671
+ }>;
2672
+ readonly result: z.ZodObject<{
2673
+ project: z.ZodObject<{
2674
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2675
+ name: z.ZodString;
2676
+ path: z.ZodString;
2677
+ git: z.ZodDefault<z.ZodBoolean>;
2678
+ branch: z.ZodOptional<z.ZodString>;
2679
+ remote: z.ZodOptional<z.ZodString>;
2680
+ createdAt: z.ZodString;
2681
+ }, "strip", z.ZodTypeAny, {
2682
+ path: string;
2683
+ createdAt: string;
2684
+ name: string;
2685
+ projectId: string & z.BRAND<"ProjectId">;
2686
+ git: boolean;
2687
+ branch?: string | undefined;
2688
+ remote?: string | undefined;
2689
+ }, {
2690
+ path: string;
2691
+ createdAt: string;
2692
+ name: string;
2693
+ projectId: string;
2694
+ git?: boolean | undefined;
2695
+ branch?: string | undefined;
2696
+ remote?: string | undefined;
2697
+ }>;
2698
+ }, "strip", z.ZodTypeAny, {
2699
+ project: {
2700
+ path: string;
2701
+ createdAt: string;
2702
+ name: string;
2703
+ projectId: string & z.BRAND<"ProjectId">;
2704
+ git: boolean;
2705
+ branch?: string | undefined;
2706
+ remote?: string | undefined;
2707
+ };
2708
+ }, {
2709
+ project: {
2710
+ path: string;
2711
+ createdAt: string;
2712
+ name: string;
2713
+ projectId: string;
2714
+ git?: boolean | undefined;
2715
+ branch?: string | undefined;
2716
+ remote?: string | undefined;
2717
+ };
2718
+ }>;
2719
+ };
2720
+ readonly "project.list": {
2721
+ readonly direction: "s2p";
2722
+ readonly kind: "request";
2723
+ readonly params: z.ZodDefault<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
2724
+ readonly result: z.ZodObject<{
2725
+ projects: z.ZodArray<z.ZodObject<{
2726
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2727
+ name: z.ZodString;
2728
+ path: z.ZodString;
2729
+ git: z.ZodDefault<z.ZodBoolean>;
2730
+ branch: z.ZodOptional<z.ZodString>;
2731
+ remote: z.ZodOptional<z.ZodString>;
2732
+ createdAt: z.ZodString;
2733
+ }, "strip", z.ZodTypeAny, {
2734
+ path: string;
2735
+ createdAt: string;
2736
+ name: string;
2737
+ projectId: string & z.BRAND<"ProjectId">;
2738
+ git: boolean;
2739
+ branch?: string | undefined;
2740
+ remote?: string | undefined;
2741
+ }, {
2742
+ path: string;
2743
+ createdAt: string;
2744
+ name: string;
2745
+ projectId: string;
2746
+ git?: boolean | undefined;
2747
+ branch?: string | undefined;
2748
+ remote?: string | undefined;
2749
+ }>, "many">;
2750
+ }, "strip", z.ZodTypeAny, {
2751
+ projects: {
2752
+ path: string;
2753
+ createdAt: string;
2754
+ name: string;
2755
+ projectId: string & z.BRAND<"ProjectId">;
2756
+ git: boolean;
2757
+ branch?: string | undefined;
2758
+ remote?: string | undefined;
2759
+ }[];
2760
+ }, {
2761
+ projects: {
2762
+ path: string;
2763
+ createdAt: string;
2764
+ name: string;
2765
+ projectId: string;
2766
+ git?: boolean | undefined;
2767
+ branch?: string | undefined;
2768
+ remote?: string | undefined;
2769
+ }[];
2770
+ }>;
2771
+ };
2772
+ readonly "project.get": {
2773
+ readonly direction: "s2p";
2774
+ readonly kind: "request";
2775
+ readonly params: z.ZodObject<{
2776
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2777
+ }, "strip", z.ZodTypeAny, {
2778
+ projectId: string & z.BRAND<"ProjectId">;
2779
+ }, {
2780
+ projectId: string;
2781
+ }>;
2782
+ readonly result: z.ZodObject<{
2783
+ project: z.ZodObject<{
2784
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2785
+ name: z.ZodString;
2786
+ path: z.ZodString;
2787
+ git: z.ZodDefault<z.ZodBoolean>;
2788
+ branch: z.ZodOptional<z.ZodString>;
2789
+ remote: z.ZodOptional<z.ZodString>;
2790
+ createdAt: z.ZodString;
2791
+ }, "strip", z.ZodTypeAny, {
2792
+ path: string;
2793
+ createdAt: string;
2794
+ name: string;
2795
+ projectId: string & z.BRAND<"ProjectId">;
2796
+ git: boolean;
2797
+ branch?: string | undefined;
2798
+ remote?: string | undefined;
2799
+ }, {
2800
+ path: string;
2801
+ createdAt: string;
2802
+ name: string;
2803
+ projectId: string;
2804
+ git?: boolean | undefined;
2805
+ branch?: string | undefined;
2806
+ remote?: string | undefined;
2807
+ }>;
2808
+ }, "strip", z.ZodTypeAny, {
2809
+ project: {
2810
+ path: string;
2811
+ createdAt: string;
2812
+ name: string;
2813
+ projectId: string & z.BRAND<"ProjectId">;
2814
+ git: boolean;
2815
+ branch?: string | undefined;
2816
+ remote?: string | undefined;
2817
+ };
2818
+ }, {
2819
+ project: {
2820
+ path: string;
2821
+ createdAt: string;
2822
+ name: string;
2823
+ projectId: string;
2824
+ git?: boolean | undefined;
2825
+ branch?: string | undefined;
2826
+ remote?: string | undefined;
2827
+ };
2828
+ }>;
2829
+ };
2830
+ readonly "project.remove": {
2831
+ readonly direction: "s2p";
2832
+ readonly kind: "request";
2833
+ readonly params: z.ZodObject<{
2834
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2835
+ deleteFiles: z.ZodDefault<z.ZodBoolean>;
2836
+ whenActiveSessions: z.ZodDefault<z.ZodEnum<["reject", "cascade"]>>;
2837
+ }, "strip", z.ZodTypeAny, {
2838
+ projectId: string & z.BRAND<"ProjectId">;
2839
+ deleteFiles: boolean;
2840
+ whenActiveSessions: "reject" | "cascade";
2841
+ }, {
2842
+ projectId: string;
2843
+ deleteFiles?: boolean | undefined;
2844
+ whenActiveSessions?: "reject" | "cascade" | undefined;
2845
+ }>;
2846
+ readonly result: z.ZodObject<{
2847
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2848
+ removed: z.ZodLiteral<true>;
2849
+ filesDeleted: z.ZodBoolean;
2850
+ terminatedSessions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2851
+ }, "strip", z.ZodTypeAny, {
2852
+ projectId: string & z.BRAND<"ProjectId">;
2853
+ removed: true;
2854
+ filesDeleted: boolean;
2855
+ terminatedSessions?: string[] | undefined;
2856
+ }, {
2857
+ projectId: string;
2858
+ removed: true;
2859
+ filesDeleted: boolean;
2860
+ terminatedSessions?: string[] | undefined;
2861
+ }>;
2862
+ };
2863
+ readonly "project.worktree.create": {
2864
+ readonly direction: "s2p";
2865
+ readonly kind: "request";
2866
+ readonly params: z.ZodObject<{
2867
+ clientRequestId: z.ZodOptional<z.ZodString>;
2868
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2869
+ baseBranch: z.ZodString;
2870
+ newBranch: z.ZodOptional<z.ZodString>;
2871
+ path: z.ZodOptional<z.ZodString>;
2872
+ }, "strip", z.ZodTypeAny, {
2873
+ projectId: string & z.BRAND<"ProjectId">;
2874
+ baseBranch: string;
2875
+ path?: string | undefined;
2876
+ clientRequestId?: string | undefined;
2877
+ newBranch?: string | undefined;
2878
+ }, {
2879
+ projectId: string;
2880
+ baseBranch: string;
2881
+ path?: string | undefined;
2882
+ clientRequestId?: string | undefined;
2883
+ newBranch?: string | undefined;
2884
+ }>;
2885
+ readonly result: z.ZodObject<{
2886
+ worktree: z.ZodObject<{
2887
+ worktreeId: z.ZodString;
2888
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2889
+ path: z.ZodString;
2890
+ branch: z.ZodString;
2891
+ isPrimary: z.ZodDefault<z.ZodBoolean>;
2892
+ createdAt: z.ZodOptional<z.ZodString>;
2893
+ }, "strip", z.ZodTypeAny, {
2894
+ path: string;
2895
+ worktreeId: string;
2896
+ projectId: string & z.BRAND<"ProjectId">;
2897
+ branch: string;
2898
+ isPrimary: boolean;
2899
+ createdAt?: string | undefined;
2900
+ }, {
2901
+ path: string;
2902
+ worktreeId: string;
2903
+ projectId: string;
2904
+ branch: string;
2905
+ createdAt?: string | undefined;
2906
+ isPrimary?: boolean | undefined;
2907
+ }>;
2908
+ }, "strip", z.ZodTypeAny, {
2909
+ worktree: {
2910
+ path: string;
2911
+ worktreeId: string;
2912
+ projectId: string & z.BRAND<"ProjectId">;
2913
+ branch: string;
2914
+ isPrimary: boolean;
2915
+ createdAt?: string | undefined;
2916
+ };
2917
+ }, {
2918
+ worktree: {
2919
+ path: string;
2920
+ worktreeId: string;
2921
+ projectId: string;
2922
+ branch: string;
2923
+ createdAt?: string | undefined;
2924
+ isPrimary?: boolean | undefined;
2925
+ };
2926
+ }>;
2927
+ };
2928
+ readonly "project.worktree.list": {
2929
+ readonly direction: "s2p";
2930
+ readonly kind: "request";
2931
+ readonly params: z.ZodObject<{
2932
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2933
+ }, "strip", z.ZodTypeAny, {
2934
+ projectId: string & z.BRAND<"ProjectId">;
2935
+ }, {
2936
+ projectId: string;
2937
+ }>;
2938
+ readonly result: z.ZodObject<{
2939
+ worktrees: z.ZodArray<z.ZodObject<{
2940
+ worktreeId: z.ZodString;
2941
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2942
+ path: z.ZodString;
2943
+ branch: z.ZodString;
2944
+ isPrimary: z.ZodDefault<z.ZodBoolean>;
2945
+ createdAt: z.ZodOptional<z.ZodString>;
2946
+ }, "strip", z.ZodTypeAny, {
2947
+ path: string;
2948
+ worktreeId: string;
2949
+ projectId: string & z.BRAND<"ProjectId">;
2950
+ branch: string;
2951
+ isPrimary: boolean;
2952
+ createdAt?: string | undefined;
2953
+ }, {
2954
+ path: string;
2955
+ worktreeId: string;
2956
+ projectId: string;
2957
+ branch: string;
2958
+ createdAt?: string | undefined;
2959
+ isPrimary?: boolean | undefined;
2960
+ }>, "many">;
2961
+ }, "strip", z.ZodTypeAny, {
2962
+ worktrees: {
2963
+ path: string;
2964
+ worktreeId: string;
2965
+ projectId: string & z.BRAND<"ProjectId">;
2966
+ branch: string;
2967
+ isPrimary: boolean;
2968
+ createdAt?: string | undefined;
2969
+ }[];
2970
+ }, {
2971
+ worktrees: {
2972
+ path: string;
2973
+ worktreeId: string;
2974
+ projectId: string;
2975
+ branch: string;
2976
+ createdAt?: string | undefined;
2977
+ isPrimary?: boolean | undefined;
2978
+ }[];
2979
+ }>;
2980
+ };
2981
+ readonly "project.worktree.remove": {
2982
+ readonly direction: "s2p";
2983
+ readonly kind: "request";
2984
+ readonly params: z.ZodObject<{
2985
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
2986
+ worktreeId: z.ZodString;
2987
+ force: z.ZodDefault<z.ZodBoolean>;
2988
+ }, "strip", z.ZodTypeAny, {
2989
+ worktreeId: string;
2990
+ force: boolean;
2991
+ projectId: string & z.BRAND<"ProjectId">;
2992
+ }, {
2993
+ worktreeId: string;
2994
+ projectId: string;
2995
+ force?: boolean | undefined;
2996
+ }>;
2997
+ readonly result: z.ZodObject<{
2998
+ worktreeId: z.ZodString;
2999
+ removed: z.ZodLiteral<true>;
3000
+ affectedSessions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3001
+ }, "strip", z.ZodTypeAny, {
3002
+ worktreeId: string;
3003
+ removed: true;
3004
+ affectedSessions?: string[] | undefined;
3005
+ }, {
3006
+ worktreeId: string;
3007
+ removed: true;
3008
+ affectedSessions?: string[] | undefined;
3009
+ }>;
3010
+ };
3011
+ readonly "project.git.deleteBranch": {
3012
+ readonly direction: "s2p";
3013
+ readonly kind: "request";
3014
+ readonly params: z.ZodObject<{
3015
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
3016
+ branch: z.ZodString;
3017
+ force: z.ZodDefault<z.ZodBoolean>;
3018
+ }, "strip", z.ZodTypeAny, {
3019
+ force: boolean;
3020
+ projectId: string & z.BRAND<"ProjectId">;
3021
+ branch: string;
3022
+ }, {
3023
+ projectId: string;
3024
+ branch: string;
3025
+ force?: boolean | undefined;
3026
+ }>;
3027
+ readonly result: z.ZodObject<{
3028
+ branch: z.ZodString;
3029
+ deleted: z.ZodLiteral<true>;
3030
+ wasMerged: z.ZodOptional<z.ZodBoolean>;
3031
+ affectedWorktrees: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3032
+ }, "strip", z.ZodTypeAny, {
3033
+ branch: string;
3034
+ deleted: true;
3035
+ wasMerged?: boolean | undefined;
3036
+ affectedWorktrees?: string[] | undefined;
3037
+ }, {
3038
+ branch: string;
3039
+ deleted: true;
3040
+ wasMerged?: boolean | undefined;
3041
+ affectedWorktrees?: string[] | undefined;
3042
+ }>;
3043
+ };
3044
+ readonly "file.read": {
3045
+ readonly direction: "s2p";
3046
+ readonly kind: "request";
3047
+ readonly params: z.ZodObject<{
3048
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
3049
+ worktreeId: z.ZodOptional<z.ZodString>;
3050
+ } & {
3051
+ path: z.ZodEffects<z.ZodString, string, string>;
3052
+ encoding: z.ZodDefault<z.ZodEnum<["utf8", "base64"]>>;
3053
+ maxBytes: z.ZodOptional<z.ZodNumber>;
3054
+ }, "strip", z.ZodTypeAny, {
3055
+ path: string;
3056
+ encoding: "base64" | "utf8";
3057
+ projectId: string & z.BRAND<"ProjectId">;
3058
+ worktreeId?: string | undefined;
3059
+ maxBytes?: number | undefined;
3060
+ }, {
3061
+ path: string;
3062
+ projectId: string;
3063
+ worktreeId?: string | undefined;
3064
+ encoding?: "base64" | "utf8" | undefined;
3065
+ maxBytes?: number | undefined;
3066
+ }>;
3067
+ readonly result: z.ZodObject<{
3068
+ path: z.ZodString;
3069
+ encoding: z.ZodEnum<["utf8", "base64"]>;
3070
+ data: z.ZodString;
3071
+ sizeBytes: z.ZodNumber;
3072
+ truncated: z.ZodDefault<z.ZodBoolean>;
3073
+ }, "strip", z.ZodTypeAny, {
3074
+ path: string;
3075
+ encoding: "base64" | "utf8";
3076
+ data: string;
3077
+ sizeBytes: number;
3078
+ truncated: boolean;
3079
+ }, {
3080
+ path: string;
3081
+ encoding: "base64" | "utf8";
3082
+ data: string;
3083
+ sizeBytes: number;
3084
+ truncated?: boolean | undefined;
3085
+ }>;
3086
+ };
3087
+ readonly "file.write": {
3088
+ readonly direction: "s2p";
3089
+ readonly kind: "request";
3090
+ readonly params: z.ZodObject<{
3091
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
3092
+ worktreeId: z.ZodOptional<z.ZodString>;
3093
+ } & {
3094
+ clientRequestId: z.ZodOptional<z.ZodString>;
3095
+ path: z.ZodEffects<z.ZodString, string, string>;
3096
+ encoding: z.ZodDefault<z.ZodEnum<["utf8", "base64"]>>;
3097
+ data: z.ZodString;
3098
+ overwrite: z.ZodDefault<z.ZodBoolean>;
3099
+ createDirs: z.ZodDefault<z.ZodBoolean>;
3100
+ }, "strip", z.ZodTypeAny, {
3101
+ path: string;
3102
+ encoding: "base64" | "utf8";
3103
+ data: string;
3104
+ projectId: string & z.BRAND<"ProjectId">;
3105
+ overwrite: boolean;
3106
+ createDirs: boolean;
3107
+ clientRequestId?: string | undefined;
3108
+ worktreeId?: string | undefined;
3109
+ }, {
3110
+ path: string;
3111
+ data: string;
3112
+ projectId: string;
3113
+ clientRequestId?: string | undefined;
3114
+ worktreeId?: string | undefined;
3115
+ encoding?: "base64" | "utf8" | undefined;
3116
+ overwrite?: boolean | undefined;
3117
+ createDirs?: boolean | undefined;
3118
+ }>;
3119
+ readonly result: z.ZodObject<{
3120
+ path: z.ZodString;
3121
+ sizeBytes: z.ZodNumber;
3122
+ written: z.ZodLiteral<true>;
3123
+ }, "strip", z.ZodTypeAny, {
3124
+ path: string;
3125
+ sizeBytes: number;
3126
+ written: true;
3127
+ }, {
3128
+ path: string;
3129
+ sizeBytes: number;
3130
+ written: true;
3131
+ }>;
3132
+ };
3133
+ readonly "file.list": {
3134
+ readonly direction: "s2p";
3135
+ readonly kind: "request";
3136
+ readonly params: z.ZodObject<{
3137
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
3138
+ worktreeId: z.ZodOptional<z.ZodString>;
3139
+ } & {
3140
+ path: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
3141
+ recursive: z.ZodDefault<z.ZodBoolean>;
3142
+ limit: z.ZodDefault<z.ZodNumber>;
3143
+ }, "strip", z.ZodTypeAny, {
3144
+ path: string;
3145
+ limit: number;
3146
+ projectId: string & z.BRAND<"ProjectId">;
3147
+ recursive: boolean;
3148
+ worktreeId?: string | undefined;
3149
+ }, {
3150
+ projectId: string;
3151
+ path?: string | undefined;
3152
+ worktreeId?: string | undefined;
3153
+ limit?: number | undefined;
3154
+ recursive?: boolean | undefined;
3155
+ }>;
3156
+ readonly result: z.ZodObject<{
3157
+ path: z.ZodString;
3158
+ entries: z.ZodArray<z.ZodObject<{
3159
+ path: z.ZodString;
3160
+ type: z.ZodEnum<["file", "directory", "symlink", "other"]>;
3161
+ sizeBytes: z.ZodNumber;
3162
+ modifiedAt: z.ZodOptional<z.ZodString>;
3163
+ }, "strip", z.ZodTypeAny, {
3164
+ path: string;
3165
+ type: "file" | "directory" | "symlink" | "other";
3166
+ sizeBytes: number;
3167
+ modifiedAt?: string | undefined;
3168
+ }, {
3169
+ path: string;
3170
+ type: "file" | "directory" | "symlink" | "other";
3171
+ sizeBytes: number;
3172
+ modifiedAt?: string | undefined;
3173
+ }>, "many">;
3174
+ truncated: z.ZodDefault<z.ZodBoolean>;
3175
+ }, "strip", z.ZodTypeAny, {
3176
+ entries: {
3177
+ path: string;
3178
+ type: "file" | "directory" | "symlink" | "other";
3179
+ sizeBytes: number;
3180
+ modifiedAt?: string | undefined;
3181
+ }[];
3182
+ path: string;
3183
+ truncated: boolean;
3184
+ }, {
3185
+ entries: {
3186
+ path: string;
3187
+ type: "file" | "directory" | "symlink" | "other";
3188
+ sizeBytes: number;
3189
+ modifiedAt?: string | undefined;
3190
+ }[];
3191
+ path: string;
3192
+ truncated?: boolean | undefined;
3193
+ }>;
3194
+ };
3195
+ readonly "file.stat": {
3196
+ readonly direction: "s2p";
3197
+ readonly kind: "request";
3198
+ readonly params: z.ZodObject<{
3199
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
3200
+ worktreeId: z.ZodOptional<z.ZodString>;
3201
+ } & {
3202
+ path: z.ZodEffects<z.ZodString, string, string>;
3203
+ }, "strip", z.ZodTypeAny, {
3204
+ path: string;
3205
+ projectId: string & z.BRAND<"ProjectId">;
3206
+ worktreeId?: string | undefined;
3207
+ }, {
3208
+ path: string;
3209
+ projectId: string;
3210
+ worktreeId?: string | undefined;
3211
+ }>;
3212
+ readonly result: z.ZodObject<{
3213
+ stat: z.ZodObject<{
3214
+ path: z.ZodString;
3215
+ type: z.ZodEnum<["file", "directory", "symlink", "other"]>;
3216
+ sizeBytes: z.ZodNumber;
3217
+ modifiedAt: z.ZodOptional<z.ZodString>;
3218
+ }, "strip", z.ZodTypeAny, {
3219
+ path: string;
3220
+ type: "file" | "directory" | "symlink" | "other";
3221
+ sizeBytes: number;
3222
+ modifiedAt?: string | undefined;
3223
+ }, {
3224
+ path: string;
3225
+ type: "file" | "directory" | "symlink" | "other";
3226
+ sizeBytes: number;
3227
+ modifiedAt?: string | undefined;
3228
+ }>;
3229
+ }, "strip", z.ZodTypeAny, {
3230
+ stat: {
3231
+ path: string;
3232
+ type: "file" | "directory" | "symlink" | "other";
3233
+ sizeBytes: number;
3234
+ modifiedAt?: string | undefined;
3235
+ };
3236
+ }, {
3237
+ stat: {
3238
+ path: string;
3239
+ type: "file" | "directory" | "symlink" | "other";
3240
+ sizeBytes: number;
3241
+ modifiedAt?: string | undefined;
3242
+ };
3243
+ }>;
3244
+ };
3245
+ readonly "file.mkdir": {
3246
+ readonly direction: "s2p";
3247
+ readonly kind: "request";
3248
+ readonly params: z.ZodObject<{
3249
+ projectId: z.ZodBranded<z.ZodString, "ProjectId">;
3250
+ worktreeId: z.ZodOptional<z.ZodString>;
3251
+ } & {
3252
+ clientRequestId: z.ZodOptional<z.ZodString>;
3253
+ path: z.ZodEffects<z.ZodString, string, string>;
3254
+ recursive: z.ZodDefault<z.ZodBoolean>;
3255
+ }, "strip", z.ZodTypeAny, {
3256
+ path: string;
3257
+ projectId: string & z.BRAND<"ProjectId">;
3258
+ recursive: boolean;
3259
+ clientRequestId?: string | undefined;
3260
+ worktreeId?: string | undefined;
3261
+ }, {
3262
+ path: string;
3263
+ projectId: string;
3264
+ clientRequestId?: string | undefined;
3265
+ worktreeId?: string | undefined;
3266
+ recursive?: boolean | undefined;
3267
+ }>;
3268
+ readonly result: z.ZodObject<{
3269
+ path: z.ZodString;
3270
+ created: z.ZodLiteral<true>;
3271
+ }, "strip", z.ZodTypeAny, {
3272
+ path: string;
3273
+ created: true;
3274
+ }, {
3275
+ path: string;
3276
+ created: true;
3277
+ }>;
3278
+ };
3279
+ readonly "env.set": {
3280
+ readonly direction: "s2p";
3281
+ readonly kind: "request";
3282
+ readonly params: z.ZodObject<{
3283
+ scope: z.ZodEnum<["global", "project", "skill"]>;
3284
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3285
+ agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
3286
+ skillName: z.ZodOptional<z.ZodString>;
3287
+ } & {
3288
+ clientRequestId: z.ZodOptional<z.ZodString>;
3289
+ name: z.ZodString;
3290
+ value: z.ZodString;
3291
+ secret: z.ZodDefault<z.ZodBoolean>;
3292
+ }, "strip", z.ZodTypeAny, {
3293
+ value: string;
3294
+ name: string;
3295
+ scope: "project" | "global" | "skill";
3296
+ secret: boolean;
3297
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3298
+ clientRequestId?: string | undefined;
3299
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3300
+ skillName?: string | undefined;
3301
+ }, {
3302
+ value: string;
3303
+ name: string;
3304
+ scope: "project" | "global" | "skill";
3305
+ agent?: string | undefined;
3306
+ clientRequestId?: string | undefined;
3307
+ projectId?: string | undefined;
3308
+ skillName?: string | undefined;
3309
+ secret?: boolean | undefined;
3310
+ }>;
3311
+ readonly result: z.ZodObject<{
3312
+ variable: z.ZodObject<{
3313
+ scope: z.ZodEnum<["global", "project", "skill"]>;
3314
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3315
+ agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
3316
+ skillName: z.ZodOptional<z.ZodString>;
3317
+ } & {
3318
+ name: z.ZodString;
3319
+ value: z.ZodOptional<z.ZodString>;
3320
+ redacted: z.ZodDefault<z.ZodBoolean>;
3321
+ updatedAt: z.ZodOptional<z.ZodString>;
3322
+ }, "strip", z.ZodTypeAny, {
3323
+ name: string;
3324
+ scope: "project" | "global" | "skill";
3325
+ redacted: boolean;
3326
+ value?: string | undefined;
3327
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3328
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3329
+ skillName?: string | undefined;
3330
+ updatedAt?: string | undefined;
3331
+ }, {
3332
+ name: string;
3333
+ scope: "project" | "global" | "skill";
3334
+ value?: string | undefined;
3335
+ agent?: string | undefined;
3336
+ projectId?: string | undefined;
3337
+ skillName?: string | undefined;
3338
+ redacted?: boolean | undefined;
3339
+ updatedAt?: string | undefined;
3340
+ }>;
3341
+ }, "strip", z.ZodTypeAny, {
3342
+ variable: {
3343
+ name: string;
3344
+ scope: "project" | "global" | "skill";
3345
+ redacted: boolean;
3346
+ value?: string | undefined;
3347
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3348
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3349
+ skillName?: string | undefined;
3350
+ updatedAt?: string | undefined;
3351
+ };
3352
+ }, {
3353
+ variable: {
3354
+ name: string;
3355
+ scope: "project" | "global" | "skill";
3356
+ value?: string | undefined;
3357
+ agent?: string | undefined;
3358
+ projectId?: string | undefined;
3359
+ skillName?: string | undefined;
3360
+ redacted?: boolean | undefined;
3361
+ updatedAt?: string | undefined;
3362
+ };
3363
+ }>;
3364
+ };
3365
+ readonly "env.list": {
3366
+ readonly direction: "s2p";
3367
+ readonly kind: "request";
3368
+ readonly params: z.ZodObject<{
3369
+ scope: z.ZodOptional<z.ZodEnum<["global", "project", "skill"]>>;
3370
+ projectId: z.ZodOptional<z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>>;
3371
+ agent: z.ZodOptional<z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>>;
3372
+ skillName: z.ZodOptional<z.ZodOptional<z.ZodString>>;
3373
+ } & {
3374
+ reveal: z.ZodDefault<z.ZodBoolean>;
3375
+ }, "strip", z.ZodTypeAny, {
3376
+ reveal: boolean;
3377
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3378
+ scope?: "project" | "global" | "skill" | undefined;
3379
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3380
+ skillName?: string | undefined;
3381
+ }, {
3382
+ agent?: string | undefined;
3383
+ scope?: "project" | "global" | "skill" | undefined;
3384
+ projectId?: string | undefined;
3385
+ skillName?: string | undefined;
3386
+ reveal?: boolean | undefined;
3387
+ }>;
3388
+ readonly result: z.ZodObject<{
3389
+ variables: z.ZodArray<z.ZodObject<{
3390
+ scope: z.ZodEnum<["global", "project", "skill"]>;
3391
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3392
+ agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
3393
+ skillName: z.ZodOptional<z.ZodString>;
3394
+ } & {
3395
+ name: z.ZodString;
3396
+ value: z.ZodOptional<z.ZodString>;
3397
+ redacted: z.ZodDefault<z.ZodBoolean>;
3398
+ updatedAt: z.ZodOptional<z.ZodString>;
3399
+ }, "strip", z.ZodTypeAny, {
3400
+ name: string;
3401
+ scope: "project" | "global" | "skill";
3402
+ redacted: boolean;
3403
+ value?: string | undefined;
3404
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3405
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3406
+ skillName?: string | undefined;
3407
+ updatedAt?: string | undefined;
3408
+ }, {
3409
+ name: string;
3410
+ scope: "project" | "global" | "skill";
3411
+ value?: string | undefined;
3412
+ agent?: string | undefined;
3413
+ projectId?: string | undefined;
3414
+ skillName?: string | undefined;
3415
+ redacted?: boolean | undefined;
3416
+ updatedAt?: string | undefined;
3417
+ }>, "many">;
3418
+ }, "strip", z.ZodTypeAny, {
3419
+ variables: {
3420
+ name: string;
3421
+ scope: "project" | "global" | "skill";
3422
+ redacted: boolean;
3423
+ value?: string | undefined;
3424
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3425
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3426
+ skillName?: string | undefined;
3427
+ updatedAt?: string | undefined;
3428
+ }[];
3429
+ }, {
3430
+ variables: {
3431
+ name: string;
3432
+ scope: "project" | "global" | "skill";
3433
+ value?: string | undefined;
3434
+ agent?: string | undefined;
3435
+ projectId?: string | undefined;
3436
+ skillName?: string | undefined;
3437
+ redacted?: boolean | undefined;
3438
+ updatedAt?: string | undefined;
3439
+ }[];
3440
+ }>;
3441
+ };
3442
+ readonly "env.delete": {
3443
+ readonly direction: "s2p";
3444
+ readonly kind: "request";
3445
+ readonly params: z.ZodObject<{
3446
+ scope: z.ZodEnum<["global", "project", "skill"]>;
3447
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3448
+ agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
3449
+ skillName: z.ZodOptional<z.ZodString>;
3450
+ } & {
3451
+ clientRequestId: z.ZodOptional<z.ZodString>;
3452
+ name: z.ZodString;
3453
+ }, "strip", z.ZodTypeAny, {
3454
+ name: string;
3455
+ scope: "project" | "global" | "skill";
3456
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3457
+ clientRequestId?: string | undefined;
3458
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3459
+ skillName?: string | undefined;
3460
+ }, {
3461
+ name: string;
3462
+ scope: "project" | "global" | "skill";
3463
+ agent?: string | undefined;
3464
+ clientRequestId?: string | undefined;
3465
+ projectId?: string | undefined;
3466
+ skillName?: string | undefined;
3467
+ }>;
3468
+ readonly result: z.ZodObject<{
3469
+ deleted: z.ZodLiteral<true>;
3470
+ name: z.ZodString;
3471
+ }, "strip", z.ZodTypeAny, {
3472
+ name: string;
3473
+ deleted: true;
3474
+ }, {
3475
+ name: string;
3476
+ deleted: true;
3477
+ }>;
3478
+ };
3479
+ readonly "skill.install": {
3480
+ readonly direction: "s2p";
3481
+ readonly kind: "request";
3482
+ readonly params: z.ZodEffects<z.ZodObject<{
3483
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
3484
+ name: z.ZodString;
3485
+ scope: z.ZodEnum<["global", "project"]>;
3486
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3487
+ source: z.ZodUnion<[z.ZodObject<{
3488
+ kind: z.ZodLiteral<"inline">;
3489
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
3490
+ }, "strip", z.ZodTypeAny, {
3491
+ kind: "inline";
3492
+ files: Record<string, string>;
3493
+ }, {
3494
+ kind: "inline";
3495
+ files: Record<string, string>;
3496
+ }>, z.ZodObject<{
3497
+ kind: z.ZodLiteral<"archive">;
3498
+ format: z.ZodLiteral<"tar.gz">;
3499
+ contentBase64: z.ZodString;
3500
+ sha256: z.ZodOptional<z.ZodString>;
3501
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
3502
+ }, "strip", z.ZodTypeAny, {
3503
+ kind: "archive";
3504
+ format: "tar.gz";
3505
+ contentBase64: string;
3506
+ sizeBytes?: number | undefined;
3507
+ sha256?: string | undefined;
3508
+ }, {
3509
+ kind: "archive";
3510
+ format: "tar.gz";
3511
+ contentBase64: string;
3512
+ sizeBytes?: number | undefined;
3513
+ sha256?: string | undefined;
3514
+ }>, z.ZodObject<{
3515
+ kind: z.ZodLiteral<"localPath">;
3516
+ path: z.ZodString;
3517
+ }, "strip", z.ZodTypeAny, {
3518
+ path: string;
3519
+ kind: "localPath";
3520
+ }, {
3521
+ path: string;
3522
+ kind: "localPath";
3523
+ }>, z.ZodObject<{
3524
+ kind: z.ZodLiteral<"url">;
3525
+ url: z.ZodString;
3526
+ sha256: z.ZodOptional<z.ZodString>;
3527
+ }, "strip", z.ZodTypeAny, {
3528
+ kind: "url";
3529
+ url: string;
3530
+ sha256?: string | undefined;
3531
+ }, {
3532
+ kind: "url";
3533
+ url: string;
3534
+ sha256?: string | undefined;
3535
+ }>]>;
3536
+ }, "strip", z.ZodTypeAny, {
3537
+ agent: string & z.BRAND<"AgentId">;
3538
+ name: string;
3539
+ scope: "project" | "global";
3540
+ source: {
3541
+ kind: "inline";
3542
+ files: Record<string, string>;
3543
+ } | {
3544
+ kind: "archive";
3545
+ format: "tar.gz";
3546
+ contentBase64: string;
3547
+ sizeBytes?: number | undefined;
3548
+ sha256?: string | undefined;
3549
+ } | {
3550
+ path: string;
3551
+ kind: "localPath";
3552
+ } | {
3553
+ kind: "url";
3554
+ url: string;
3555
+ sha256?: string | undefined;
3556
+ };
3557
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3558
+ }, {
3559
+ agent: string;
3560
+ name: string;
3561
+ scope: "project" | "global";
3562
+ source: {
3563
+ kind: "inline";
3564
+ files: Record<string, string>;
3565
+ } | {
3566
+ kind: "archive";
3567
+ format: "tar.gz";
3568
+ contentBase64: string;
3569
+ sizeBytes?: number | undefined;
3570
+ sha256?: string | undefined;
3571
+ } | {
3572
+ path: string;
3573
+ kind: "localPath";
3574
+ } | {
3575
+ kind: "url";
3576
+ url: string;
3577
+ sha256?: string | undefined;
3578
+ };
3579
+ projectId?: string | undefined;
3580
+ }>, {
3581
+ agent: string & z.BRAND<"AgentId">;
3582
+ name: string;
3583
+ scope: "project" | "global";
3584
+ source: {
3585
+ kind: "inline";
3586
+ files: Record<string, string>;
3587
+ } | {
3588
+ kind: "archive";
3589
+ format: "tar.gz";
3590
+ contentBase64: string;
3591
+ sizeBytes?: number | undefined;
3592
+ sha256?: string | undefined;
3593
+ } | {
3594
+ path: string;
3595
+ kind: "localPath";
3596
+ } | {
3597
+ kind: "url";
3598
+ url: string;
3599
+ sha256?: string | undefined;
3600
+ };
3601
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3602
+ }, {
3603
+ agent: string;
3604
+ name: string;
3605
+ scope: "project" | "global";
3606
+ source: {
3607
+ kind: "inline";
3608
+ files: Record<string, string>;
3609
+ } | {
3610
+ kind: "archive";
3611
+ format: "tar.gz";
3612
+ contentBase64: string;
3613
+ sizeBytes?: number | undefined;
3614
+ sha256?: string | undefined;
3615
+ } | {
3616
+ path: string;
3617
+ kind: "localPath";
3618
+ } | {
3619
+ kind: "url";
3620
+ url: string;
3621
+ sha256?: string | undefined;
3622
+ };
3623
+ projectId?: string | undefined;
3624
+ }>;
3625
+ readonly result: z.ZodObject<{
3626
+ skill: z.ZodObject<{
3627
+ name: z.ZodString;
3628
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
3629
+ scope: z.ZodEnum<["global", "project"]>;
3630
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3631
+ version: z.ZodOptional<z.ZodString>;
3632
+ hash: z.ZodOptional<z.ZodString>;
3633
+ compatibleAgents: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "AgentId">, "many">>;
3634
+ sourceTrusted: z.ZodOptional<z.ZodBoolean>;
3635
+ installedPath: z.ZodOptional<z.ZodString>;
3636
+ installedAt: z.ZodOptional<z.ZodString>;
3637
+ }, "strip", z.ZodTypeAny, {
3638
+ agent: string & z.BRAND<"AgentId">;
3639
+ name: string;
3640
+ scope: "project" | "global";
3641
+ version?: string | undefined;
3642
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3643
+ hash?: string | undefined;
3644
+ compatibleAgents?: (string & z.BRAND<"AgentId">)[] | undefined;
3645
+ sourceTrusted?: boolean | undefined;
3646
+ installedPath?: string | undefined;
3647
+ installedAt?: string | undefined;
3648
+ }, {
3649
+ agent: string;
3650
+ name: string;
3651
+ scope: "project" | "global";
3652
+ version?: string | undefined;
3653
+ projectId?: string | undefined;
3654
+ hash?: string | undefined;
3655
+ compatibleAgents?: string[] | undefined;
3656
+ sourceTrusted?: boolean | undefined;
3657
+ installedPath?: string | undefined;
3658
+ installedAt?: string | undefined;
3659
+ }>;
3660
+ }, "strip", z.ZodTypeAny, {
3661
+ skill: {
3662
+ agent: string & z.BRAND<"AgentId">;
3663
+ name: string;
3664
+ scope: "project" | "global";
3665
+ version?: string | undefined;
3666
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3667
+ hash?: string | undefined;
3668
+ compatibleAgents?: (string & z.BRAND<"AgentId">)[] | undefined;
3669
+ sourceTrusted?: boolean | undefined;
3670
+ installedPath?: string | undefined;
3671
+ installedAt?: string | undefined;
3672
+ };
3673
+ }, {
3674
+ skill: {
3675
+ agent: string;
3676
+ name: string;
3677
+ scope: "project" | "global";
3678
+ version?: string | undefined;
3679
+ projectId?: string | undefined;
3680
+ hash?: string | undefined;
3681
+ compatibleAgents?: string[] | undefined;
3682
+ sourceTrusted?: boolean | undefined;
3683
+ installedPath?: string | undefined;
3684
+ installedAt?: string | undefined;
3685
+ };
3686
+ }>;
3687
+ };
3688
+ readonly "skill.uninstall": {
3689
+ readonly direction: "s2p";
3690
+ readonly kind: "request";
3691
+ readonly params: z.ZodEffects<z.ZodObject<{
3692
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
3693
+ name: z.ZodString;
3694
+ scope: z.ZodEnum<["global", "project"]>;
3695
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3696
+ }, "strip", z.ZodTypeAny, {
3697
+ agent: string & z.BRAND<"AgentId">;
3698
+ name: string;
3699
+ scope: "project" | "global";
3700
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3701
+ }, {
3702
+ agent: string;
3703
+ name: string;
3704
+ scope: "project" | "global";
3705
+ projectId?: string | undefined;
3706
+ }>, {
3707
+ agent: string & z.BRAND<"AgentId">;
3708
+ name: string;
3709
+ scope: "project" | "global";
3710
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3711
+ }, {
3712
+ agent: string;
3713
+ name: string;
3714
+ scope: "project" | "global";
3715
+ projectId?: string | undefined;
3716
+ }>;
3717
+ readonly result: z.ZodObject<{
3718
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
3719
+ name: z.ZodString;
3720
+ scope: z.ZodEnum<["global", "project"]>;
3721
+ uninstalled: z.ZodLiteral<true>;
3722
+ }, "strip", z.ZodTypeAny, {
3723
+ agent: string & z.BRAND<"AgentId">;
3724
+ name: string;
3725
+ scope: "project" | "global";
3726
+ uninstalled: true;
3727
+ }, {
3728
+ agent: string;
3729
+ name: string;
3730
+ scope: "project" | "global";
3731
+ uninstalled: true;
3732
+ }>;
3733
+ };
3734
+ readonly "skill.list": {
3735
+ readonly direction: "s2p";
3736
+ readonly kind: "request";
3737
+ readonly params: z.ZodObject<{
3738
+ agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
3739
+ scope: z.ZodOptional<z.ZodEnum<["global", "project"]>>;
3740
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3741
+ }, "strip", z.ZodTypeAny, {
3742
+ agent?: (string & z.BRAND<"AgentId">) | undefined;
3743
+ scope?: "project" | "global" | undefined;
3744
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3745
+ }, {
3746
+ agent?: string | undefined;
3747
+ scope?: "project" | "global" | undefined;
3748
+ projectId?: string | undefined;
3749
+ }>;
3750
+ readonly result: z.ZodObject<{
3751
+ skills: z.ZodArray<z.ZodObject<{
3752
+ name: z.ZodString;
3753
+ agent: z.ZodBranded<z.ZodString, "AgentId">;
3754
+ scope: z.ZodEnum<["global", "project"]>;
3755
+ projectId: z.ZodOptional<z.ZodBranded<z.ZodString, "ProjectId">>;
3756
+ version: z.ZodOptional<z.ZodString>;
3757
+ hash: z.ZodOptional<z.ZodString>;
3758
+ compatibleAgents: z.ZodOptional<z.ZodArray<z.ZodBranded<z.ZodString, "AgentId">, "many">>;
3759
+ sourceTrusted: z.ZodOptional<z.ZodBoolean>;
3760
+ installedPath: z.ZodOptional<z.ZodString>;
3761
+ installedAt: z.ZodOptional<z.ZodString>;
3762
+ }, "strip", z.ZodTypeAny, {
3763
+ agent: string & z.BRAND<"AgentId">;
3764
+ name: string;
3765
+ scope: "project" | "global";
3766
+ version?: string | undefined;
3767
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3768
+ hash?: string | undefined;
3769
+ compatibleAgents?: (string & z.BRAND<"AgentId">)[] | undefined;
3770
+ sourceTrusted?: boolean | undefined;
3771
+ installedPath?: string | undefined;
3772
+ installedAt?: string | undefined;
3773
+ }, {
3774
+ agent: string;
3775
+ name: string;
3776
+ scope: "project" | "global";
3777
+ version?: string | undefined;
3778
+ projectId?: string | undefined;
3779
+ hash?: string | undefined;
3780
+ compatibleAgents?: string[] | undefined;
3781
+ sourceTrusted?: boolean | undefined;
3782
+ installedPath?: string | undefined;
3783
+ installedAt?: string | undefined;
3784
+ }>, "many">;
3785
+ }, "strip", z.ZodTypeAny, {
3786
+ skills: {
3787
+ agent: string & z.BRAND<"AgentId">;
3788
+ name: string;
3789
+ scope: "project" | "global";
3790
+ version?: string | undefined;
3791
+ projectId?: (string & z.BRAND<"ProjectId">) | undefined;
3792
+ hash?: string | undefined;
3793
+ compatibleAgents?: (string & z.BRAND<"AgentId">)[] | undefined;
3794
+ sourceTrusted?: boolean | undefined;
3795
+ installedPath?: string | undefined;
3796
+ installedAt?: string | undefined;
3797
+ }[];
3798
+ }, {
3799
+ skills: {
3800
+ agent: string;
3801
+ name: string;
3802
+ scope: "project" | "global";
3803
+ version?: string | undefined;
3804
+ projectId?: string | undefined;
3805
+ hash?: string | undefined;
3806
+ compatibleAgents?: string[] | undefined;
3807
+ sourceTrusted?: boolean | undefined;
3808
+ installedPath?: string | undefined;
3809
+ installedAt?: string | undefined;
3810
+ }[];
3811
+ }>;
3812
+ };
3813
+ };
3814
+ export type MethodName = keyof typeof METHODS;
3815
+ export type MethodSpec = (typeof METHODS)[MethodName];
3816
+ /** 取某方法的 params 类型。 */
3817
+ export type ParamsOf<M extends MethodName> = z.infer<(typeof METHODS)[M]["params"]>;
3818
+ /** 取某方法的 result 类型。 */
3819
+ export type ResultOf<M extends MethodName> = z.infer<(typeof METHODS)[M]["result"]>;
3820
+ /** 运行时校验某方法的 params。 */
3821
+ export declare function parseParams<M extends MethodName>(method: M, data: unknown): ParamsOf<M>;
3822
+ /** 运行时校验某方法的 result。 */
3823
+ export declare function parseResult<M extends MethodName>(method: M, data: unknown): ResultOf<M>;
3824
+ /** 全部方法名(运行时数组)。 */
3825
+ export declare const METHOD_NAMES: MethodName[];
3826
+ //# sourceMappingURL=methods.d.ts.map