@khorsheed/dsh-room 0.1.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 (95) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.i18n.yaml +6 -0
  3. package/README.md +48 -0
  4. package/README.zh.md +48 -0
  5. package/cordis.patch.yml +6 -0
  6. package/lib/client.js +11481 -0
  7. package/lib/index.js +3231 -0
  8. package/lib/invariant.js +26 -0
  9. package/lib/journal-CuRnWk66.js +435 -0
  10. package/lib/tool.js +350 -0
  11. package/lib/typert.host.d.ts +3 -0
  12. package/lib/typert.host.js +2615 -0
  13. package/lib/typert.remote-client.d.ts +55 -0
  14. package/lib/typert.remote-client.js +1711 -0
  15. package/lib/types/adapter.d.ts +42 -0
  16. package/lib/types/adapter.js +41 -0
  17. package/lib/types/agent-setup.d.ts +141 -0
  18. package/lib/types/agent-setup.js +145 -0
  19. package/lib/types/client/InviteAgentAction.d.ts +13 -0
  20. package/lib/types/client/InviteAgentAction.js +45 -0
  21. package/lib/types/client/InviteDialog.d.ts +90 -0
  22. package/lib/types/client/InviteDialog.js +216 -0
  23. package/lib/types/client/MemberCard.d.ts +33 -0
  24. package/lib/types/client/MemberCard.js +32 -0
  25. package/lib/types/client/MembersView.d.ts +5 -0
  26. package/lib/types/client/MembersView.js +168 -0
  27. package/lib/types/client/RoomComposer.d.ts +21 -0
  28. package/lib/types/client/RoomComposer.js +211 -0
  29. package/lib/types/client/RoomDockCapsules.d.ts +64 -0
  30. package/lib/types/client/RoomDockCapsules.js +277 -0
  31. package/lib/types/client/RoomEventView.d.ts +11 -0
  32. package/lib/types/client/RoomEventView.js +17 -0
  33. package/lib/types/client/RoomModelPicker.d.ts +18 -0
  34. package/lib/types/client/RoomModelPicker.js +134 -0
  35. package/lib/types/client/RoomPlanView.d.ts +17 -0
  36. package/lib/types/client/RoomPlanView.js +88 -0
  37. package/lib/types/client/RoomQueueStrip.d.ts +26 -0
  38. package/lib/types/client/RoomQueueStrip.js +28 -0
  39. package/lib/types/client/RoomRecoveryView.d.ts +11 -0
  40. package/lib/types/client/RoomRecoveryView.js +38 -0
  41. package/lib/types/client/RoomRelayView.d.ts +12 -0
  42. package/lib/types/client/RoomRelayView.js +20 -0
  43. package/lib/types/client/RoomRunView.d.ts +15 -0
  44. package/lib/types/client/RoomRunView.js +50 -0
  45. package/lib/types/client/RoomSpeechView.d.ts +18 -0
  46. package/lib/types/client/RoomSpeechView.js +62 -0
  47. package/lib/types/client/RoomStatsLine.d.ts +61 -0
  48. package/lib/types/client/RoomStatsLine.js +138 -0
  49. package/lib/types/client/RoomTaskLineView.d.ts +13 -0
  50. package/lib/types/client/RoomTaskLineView.js +21 -0
  51. package/lib/types/client/RoomTodoStrip.d.ts +24 -0
  52. package/lib/types/client/RoomTodoStrip.js +64 -0
  53. package/lib/types/client/format.d.ts +31 -0
  54. package/lib/types/client/format.js +48 -0
  55. package/lib/types/client/icons.d.ts +27 -0
  56. package/lib/types/client/icons.js +11 -0
  57. package/lib/types/client/index.d.ts +39 -0
  58. package/lib/types/client/index.js +471 -0
  59. package/lib/types/client/locales.d.ts +422 -0
  60. package/lib/types/client/locales.js +413 -0
  61. package/lib/types/client/member-color.d.ts +13 -0
  62. package/lib/types/client/member-color.js +22 -0
  63. package/lib/types/client/name-pool.d.ts +17 -0
  64. package/lib/types/client/name-pool.js +25 -0
  65. package/lib/types/client/nodes.d.ts +136 -0
  66. package/lib/types/client/nodes.js +212 -0
  67. package/lib/types/client/preset-visibility.d.ts +91 -0
  68. package/lib/types/client/preset-visibility.js +113 -0
  69. package/lib/types/client/request-ids.d.ts +7 -0
  70. package/lib/types/client/request-ids.js +21 -0
  71. package/lib/types/client/room-store.d.ts +137 -0
  72. package/lib/types/client/room-store.js +244 -0
  73. package/lib/types/client/slots.d.ts +319 -0
  74. package/lib/types/client/slots.js +1 -0
  75. package/lib/types/deliveries.d.ts +5 -0
  76. package/lib/types/deliveries.js +20 -0
  77. package/lib/types/dispatch.d.ts +105 -0
  78. package/lib/types/dispatch.js +467 -0
  79. package/lib/types/index.d.ts +301 -0
  80. package/lib/types/index.js +1200 -0
  81. package/lib/types/invariant.d.ts +16 -0
  82. package/lib/types/invariant.js +24 -0
  83. package/lib/types/journal.d.ts +117 -0
  84. package/lib/types/journal.js +434 -0
  85. package/lib/types/plan-service.d.ts +34 -0
  86. package/lib/types/plan-service.js +266 -0
  87. package/lib/types/plan.d.ts +168 -0
  88. package/lib/types/plan.js +494 -0
  89. package/lib/types/tool.d.ts +56 -0
  90. package/lib/types/tool.js +389 -0
  91. package/lib/types/types.d.ts +813 -0
  92. package/lib/types/types.js +1 -0
  93. package/locale/en.json +6 -0
  94. package/locale/zh.json +6 -0
  95. package/package.json +131 -0
@@ -0,0 +1,2615 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ let RoomJsonValueRemoteCodec$schema$value
5
+ const RoomJsonValueRemoteCodec$schema = () => (RoomJsonValueRemoteCodec$schema$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => RoomJsonValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => RoomJsonValueRemoteCodec$schema()))]))
6
+ let _khorsheed_dsh_room_room_addTask_parameter_0$schema$value
7
+ const _khorsheed_dsh_room_room_addTask_parameter_0$schema = () => (_khorsheed_dsh_room_room_addTask_parameter_0$schema$value ??= z.object({
8
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
9
+ 'member': z.string().readonly(),
10
+ 'title': z.string().readonly(),
11
+ 'blockedBy': z.string().readonly().optional(),
12
+ }))
13
+ let _khorsheed_dsh_room_room_addTask_result$schema$value
14
+ const _khorsheed_dsh_room_room_addTask_result$schema = () => (_khorsheed_dsh_room_room_addTask_result$schema$value ??= z.union([z.object({
15
+ 'ok': z.literal(true).readonly(),
16
+ 'value': z.object({
17
+ 'id': z.string().readonly(),
18
+ }).readonly(),
19
+ }), z.object({
20
+ 'ok': z.literal(false).readonly(),
21
+ 'error': z.union([z.object({
22
+ 'code': z.literal("request-conflict").readonly(),
23
+ }), z.object({
24
+ 'code': z.literal("member-cwd-bound").readonly(),
25
+ }), z.object({
26
+ 'code': z.literal("not-coordinator").readonly(),
27
+ }), z.object({
28
+ 'code': z.literal("delivery-not-uncertain").readonly(),
29
+ }), z.object({
30
+ 'code': z.literal("plan-reconciliation-required").readonly(),
31
+ }), z.object({
32
+ 'code': z.literal("coordinator-busy").readonly(),
33
+ }), z.object({
34
+ 'code': z.literal("coordinator-not-ready").readonly(),
35
+ 'message': z.string().readonly(),
36
+ }), z.object({
37
+ 'code': z.literal("coordinator-conflict").readonly(),
38
+ }), z.object({
39
+ 'code': z.literal("active-coordinator").readonly(),
40
+ }), z.object({
41
+ 'code': z.literal("configuration-owned-by-core").readonly(),
42
+ }), z.object({
43
+ 'code': z.literal("session-not-found").readonly(),
44
+ }), z.object({
45
+ 'code': z.literal("not-a-room").readonly(),
46
+ }), z.object({
47
+ 'code': z.literal("invalid-name").readonly(),
48
+ }), z.object({
49
+ 'code': z.literal("duplicate-name").readonly(),
50
+ }), z.object({
51
+ 'code': z.literal("empty-provider").readonly(),
52
+ }), z.object({
53
+ 'code': z.literal("member-not-found").readonly(),
54
+ }), z.object({
55
+ 'code': z.literal("empty-text").readonly(),
56
+ }), z.object({
57
+ 'code': z.literal("nothing-to-update").readonly(),
58
+ }), z.object({
59
+ 'code': z.literal("local-agent-unavailable").readonly(),
60
+ }), z.object({
61
+ 'code': z.literal("unknown-provider").readonly(),
62
+ 'provider': z.string().readonly(),
63
+ 'available': z.array(z.string()).readonly(),
64
+ }), z.object({
65
+ 'code': z.literal("unknown-targets").readonly(),
66
+ 'names': z.array(z.string()).readonly(),
67
+ }), z.object({
68
+ 'code': z.literal("no-targets").readonly(),
69
+ }), z.object({
70
+ 'code': z.literal("relay-not-found").readonly(),
71
+ }), z.object({
72
+ 'code': z.literal("relay-not-pending").readonly(),
73
+ }), z.object({
74
+ 'code': z.literal("main-member").readonly(),
75
+ }), z.object({
76
+ 'code': z.literal("task-not-found").readonly(),
77
+ }), z.object({
78
+ 'code': z.literal("task-closed").readonly(),
79
+ }), z.object({
80
+ 'code': z.literal("resume-failed").readonly(),
81
+ 'message': z.string().readonly(),
82
+ })]).readonly(),
83
+ })]))
84
+ let _khorsheed_dsh_room_room_cancel_parameter_0$schema$value
85
+ const _khorsheed_dsh_room_room_cancel_parameter_0$schema = () => (_khorsheed_dsh_room_room_cancel_parameter_0$schema$value ??= z.object({
86
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
87
+ 'name': z.string().readonly(),
88
+ }))
89
+ let _khorsheed_dsh_room_room_cancel_result$schema$value
90
+ const _khorsheed_dsh_room_room_cancel_result$schema = () => (_khorsheed_dsh_room_room_cancel_result$schema$value ??= z.union([z.object({
91
+ 'ok': z.literal(true).readonly(),
92
+ 'value': z.object({
93
+ 'cancelled': z.boolean().readonly(),
94
+ }).readonly(),
95
+ }), z.object({
96
+ 'ok': z.literal(false).readonly(),
97
+ 'error': z.union([z.object({
98
+ 'code': z.literal("request-conflict").readonly(),
99
+ }), z.object({
100
+ 'code': z.literal("member-cwd-bound").readonly(),
101
+ }), z.object({
102
+ 'code': z.literal("not-coordinator").readonly(),
103
+ }), z.object({
104
+ 'code': z.literal("delivery-not-uncertain").readonly(),
105
+ }), z.object({
106
+ 'code': z.literal("plan-reconciliation-required").readonly(),
107
+ }), z.object({
108
+ 'code': z.literal("coordinator-busy").readonly(),
109
+ }), z.object({
110
+ 'code': z.literal("coordinator-not-ready").readonly(),
111
+ 'message': z.string().readonly(),
112
+ }), z.object({
113
+ 'code': z.literal("coordinator-conflict").readonly(),
114
+ }), z.object({
115
+ 'code': z.literal("active-coordinator").readonly(),
116
+ }), z.object({
117
+ 'code': z.literal("configuration-owned-by-core").readonly(),
118
+ }), z.object({
119
+ 'code': z.literal("session-not-found").readonly(),
120
+ }), z.object({
121
+ 'code': z.literal("not-a-room").readonly(),
122
+ }), z.object({
123
+ 'code': z.literal("invalid-name").readonly(),
124
+ }), z.object({
125
+ 'code': z.literal("duplicate-name").readonly(),
126
+ }), z.object({
127
+ 'code': z.literal("empty-provider").readonly(),
128
+ }), z.object({
129
+ 'code': z.literal("member-not-found").readonly(),
130
+ }), z.object({
131
+ 'code': z.literal("empty-text").readonly(),
132
+ }), z.object({
133
+ 'code': z.literal("nothing-to-update").readonly(),
134
+ }), z.object({
135
+ 'code': z.literal("local-agent-unavailable").readonly(),
136
+ }), z.object({
137
+ 'code': z.literal("unknown-provider").readonly(),
138
+ 'provider': z.string().readonly(),
139
+ 'available': z.array(z.string()).readonly(),
140
+ }), z.object({
141
+ 'code': z.literal("unknown-targets").readonly(),
142
+ 'names': z.array(z.string()).readonly(),
143
+ }), z.object({
144
+ 'code': z.literal("no-targets").readonly(),
145
+ }), z.object({
146
+ 'code': z.literal("relay-not-found").readonly(),
147
+ }), z.object({
148
+ 'code': z.literal("relay-not-pending").readonly(),
149
+ }), z.object({
150
+ 'code': z.literal("main-member").readonly(),
151
+ }), z.object({
152
+ 'code': z.literal("task-not-found").readonly(),
153
+ }), z.object({
154
+ 'code': z.literal("task-closed").readonly(),
155
+ }), z.object({
156
+ 'code': z.literal("resume-failed").readonly(),
157
+ 'message': z.string().readonly(),
158
+ })]).readonly(),
159
+ })]))
160
+ let _khorsheed_dsh_room_room_closeTask_parameter_0$schema$value
161
+ const _khorsheed_dsh_room_room_closeTask_parameter_0$schema = () => (_khorsheed_dsh_room_room_closeTask_parameter_0$schema$value ??= z.object({
162
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
163
+ 'taskId': z.string().readonly(),
164
+ 'status': z.union([z.literal("cancelled"), z.literal("done")]).readonly().optional(),
165
+ }))
166
+ let _khorsheed_dsh_room_room_closeTask_result$schema$value
167
+ const _khorsheed_dsh_room_room_closeTask_result$schema = () => (_khorsheed_dsh_room_room_closeTask_result$schema$value ??= z.union([z.object({
168
+ 'ok': z.literal(true).readonly(),
169
+ 'value': z.object({
170
+ 'id': z.string().readonly(),
171
+ }).readonly(),
172
+ }), z.object({
173
+ 'ok': z.literal(false).readonly(),
174
+ 'error': z.union([z.object({
175
+ 'code': z.literal("request-conflict").readonly(),
176
+ }), z.object({
177
+ 'code': z.literal("member-cwd-bound").readonly(),
178
+ }), z.object({
179
+ 'code': z.literal("not-coordinator").readonly(),
180
+ }), z.object({
181
+ 'code': z.literal("delivery-not-uncertain").readonly(),
182
+ }), z.object({
183
+ 'code': z.literal("plan-reconciliation-required").readonly(),
184
+ }), z.object({
185
+ 'code': z.literal("coordinator-busy").readonly(),
186
+ }), z.object({
187
+ 'code': z.literal("coordinator-not-ready").readonly(),
188
+ 'message': z.string().readonly(),
189
+ }), z.object({
190
+ 'code': z.literal("coordinator-conflict").readonly(),
191
+ }), z.object({
192
+ 'code': z.literal("active-coordinator").readonly(),
193
+ }), z.object({
194
+ 'code': z.literal("configuration-owned-by-core").readonly(),
195
+ }), z.object({
196
+ 'code': z.literal("session-not-found").readonly(),
197
+ }), z.object({
198
+ 'code': z.literal("not-a-room").readonly(),
199
+ }), z.object({
200
+ 'code': z.literal("invalid-name").readonly(),
201
+ }), z.object({
202
+ 'code': z.literal("duplicate-name").readonly(),
203
+ }), z.object({
204
+ 'code': z.literal("empty-provider").readonly(),
205
+ }), z.object({
206
+ 'code': z.literal("member-not-found").readonly(),
207
+ }), z.object({
208
+ 'code': z.literal("empty-text").readonly(),
209
+ }), z.object({
210
+ 'code': z.literal("nothing-to-update").readonly(),
211
+ }), z.object({
212
+ 'code': z.literal("local-agent-unavailable").readonly(),
213
+ }), z.object({
214
+ 'code': z.literal("unknown-provider").readonly(),
215
+ 'provider': z.string().readonly(),
216
+ 'available': z.array(z.string()).readonly(),
217
+ }), z.object({
218
+ 'code': z.literal("unknown-targets").readonly(),
219
+ 'names': z.array(z.string()).readonly(),
220
+ }), z.object({
221
+ 'code': z.literal("no-targets").readonly(),
222
+ }), z.object({
223
+ 'code': z.literal("relay-not-found").readonly(),
224
+ }), z.object({
225
+ 'code': z.literal("relay-not-pending").readonly(),
226
+ }), z.object({
227
+ 'code': z.literal("main-member").readonly(),
228
+ }), z.object({
229
+ 'code': z.literal("task-not-found").readonly(),
230
+ }), z.object({
231
+ 'code': z.literal("task-closed").readonly(),
232
+ }), z.object({
233
+ 'code': z.literal("resume-failed").readonly(),
234
+ 'message': z.string().readonly(),
235
+ })]).readonly(),
236
+ })]))
237
+ let _khorsheed_dsh_room_room_confirmRelay_parameter_0$schema$value
238
+ const _khorsheed_dsh_room_room_confirmRelay_parameter_0$schema = () => (_khorsheed_dsh_room_room_confirmRelay_parameter_0$schema$value ??= z.object({
239
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
240
+ 'relayId': z.string().readonly(),
241
+ }))
242
+ let _khorsheed_dsh_room_room_confirmRelay_result$schema$value
243
+ const _khorsheed_dsh_room_room_confirmRelay_result$schema = () => (_khorsheed_dsh_room_room_confirmRelay_result$schema$value ??= z.union([z.object({
244
+ 'ok': z.literal(true).readonly(),
245
+ 'value': z.object({
246
+ 'relayId': z.string().readonly(),
247
+ }).readonly(),
248
+ }), z.object({
249
+ 'ok': z.literal(false).readonly(),
250
+ 'error': z.union([z.object({
251
+ 'code': z.literal("request-conflict").readonly(),
252
+ }), z.object({
253
+ 'code': z.literal("member-cwd-bound").readonly(),
254
+ }), z.object({
255
+ 'code': z.literal("not-coordinator").readonly(),
256
+ }), z.object({
257
+ 'code': z.literal("delivery-not-uncertain").readonly(),
258
+ }), z.object({
259
+ 'code': z.literal("plan-reconciliation-required").readonly(),
260
+ }), z.object({
261
+ 'code': z.literal("coordinator-busy").readonly(),
262
+ }), z.object({
263
+ 'code': z.literal("coordinator-not-ready").readonly(),
264
+ 'message': z.string().readonly(),
265
+ }), z.object({
266
+ 'code': z.literal("coordinator-conflict").readonly(),
267
+ }), z.object({
268
+ 'code': z.literal("active-coordinator").readonly(),
269
+ }), z.object({
270
+ 'code': z.literal("configuration-owned-by-core").readonly(),
271
+ }), z.object({
272
+ 'code': z.literal("session-not-found").readonly(),
273
+ }), z.object({
274
+ 'code': z.literal("not-a-room").readonly(),
275
+ }), z.object({
276
+ 'code': z.literal("invalid-name").readonly(),
277
+ }), z.object({
278
+ 'code': z.literal("duplicate-name").readonly(),
279
+ }), z.object({
280
+ 'code': z.literal("empty-provider").readonly(),
281
+ }), z.object({
282
+ 'code': z.literal("member-not-found").readonly(),
283
+ }), z.object({
284
+ 'code': z.literal("empty-text").readonly(),
285
+ }), z.object({
286
+ 'code': z.literal("nothing-to-update").readonly(),
287
+ }), z.object({
288
+ 'code': z.literal("local-agent-unavailable").readonly(),
289
+ }), z.object({
290
+ 'code': z.literal("unknown-provider").readonly(),
291
+ 'provider': z.string().readonly(),
292
+ 'available': z.array(z.string()).readonly(),
293
+ }), z.object({
294
+ 'code': z.literal("unknown-targets").readonly(),
295
+ 'names': z.array(z.string()).readonly(),
296
+ }), z.object({
297
+ 'code': z.literal("no-targets").readonly(),
298
+ }), z.object({
299
+ 'code': z.literal("relay-not-found").readonly(),
300
+ }), z.object({
301
+ 'code': z.literal("relay-not-pending").readonly(),
302
+ }), z.object({
303
+ 'code': z.literal("main-member").readonly(),
304
+ }), z.object({
305
+ 'code': z.literal("task-not-found").readonly(),
306
+ }), z.object({
307
+ 'code': z.literal("task-closed").readonly(),
308
+ }), z.object({
309
+ 'code': z.literal("resume-failed").readonly(),
310
+ 'message': z.string().readonly(),
311
+ })]).readonly(),
312
+ })]))
313
+ let _khorsheed_dsh_room_room_dismissRelay_parameter_0$schema$value
314
+ const _khorsheed_dsh_room_room_dismissRelay_parameter_0$schema = () => (_khorsheed_dsh_room_room_dismissRelay_parameter_0$schema$value ??= z.object({
315
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
316
+ 'relayId': z.string().readonly(),
317
+ }))
318
+ let _khorsheed_dsh_room_room_dismissRelay_result$schema$value
319
+ const _khorsheed_dsh_room_room_dismissRelay_result$schema = () => (_khorsheed_dsh_room_room_dismissRelay_result$schema$value ??= z.union([z.object({
320
+ 'ok': z.literal(true).readonly(),
321
+ 'value': z.object({
322
+ 'relayId': z.string().readonly(),
323
+ }).readonly(),
324
+ }), z.object({
325
+ 'ok': z.literal(false).readonly(),
326
+ 'error': z.union([z.object({
327
+ 'code': z.literal("request-conflict").readonly(),
328
+ }), z.object({
329
+ 'code': z.literal("member-cwd-bound").readonly(),
330
+ }), z.object({
331
+ 'code': z.literal("not-coordinator").readonly(),
332
+ }), z.object({
333
+ 'code': z.literal("delivery-not-uncertain").readonly(),
334
+ }), z.object({
335
+ 'code': z.literal("plan-reconciliation-required").readonly(),
336
+ }), z.object({
337
+ 'code': z.literal("coordinator-busy").readonly(),
338
+ }), z.object({
339
+ 'code': z.literal("coordinator-not-ready").readonly(),
340
+ 'message': z.string().readonly(),
341
+ }), z.object({
342
+ 'code': z.literal("coordinator-conflict").readonly(),
343
+ }), z.object({
344
+ 'code': z.literal("active-coordinator").readonly(),
345
+ }), z.object({
346
+ 'code': z.literal("configuration-owned-by-core").readonly(),
347
+ }), z.object({
348
+ 'code': z.literal("session-not-found").readonly(),
349
+ }), z.object({
350
+ 'code': z.literal("not-a-room").readonly(),
351
+ }), z.object({
352
+ 'code': z.literal("invalid-name").readonly(),
353
+ }), z.object({
354
+ 'code': z.literal("duplicate-name").readonly(),
355
+ }), z.object({
356
+ 'code': z.literal("empty-provider").readonly(),
357
+ }), z.object({
358
+ 'code': z.literal("member-not-found").readonly(),
359
+ }), z.object({
360
+ 'code': z.literal("empty-text").readonly(),
361
+ }), z.object({
362
+ 'code': z.literal("nothing-to-update").readonly(),
363
+ }), z.object({
364
+ 'code': z.literal("local-agent-unavailable").readonly(),
365
+ }), z.object({
366
+ 'code': z.literal("unknown-provider").readonly(),
367
+ 'provider': z.string().readonly(),
368
+ 'available': z.array(z.string()).readonly(),
369
+ }), z.object({
370
+ 'code': z.literal("unknown-targets").readonly(),
371
+ 'names': z.array(z.string()).readonly(),
372
+ }), z.object({
373
+ 'code': z.literal("no-targets").readonly(),
374
+ }), z.object({
375
+ 'code': z.literal("relay-not-found").readonly(),
376
+ }), z.object({
377
+ 'code': z.literal("relay-not-pending").readonly(),
378
+ }), z.object({
379
+ 'code': z.literal("main-member").readonly(),
380
+ }), z.object({
381
+ 'code': z.literal("task-not-found").readonly(),
382
+ }), z.object({
383
+ 'code': z.literal("task-closed").readonly(),
384
+ }), z.object({
385
+ 'code': z.literal("resume-failed").readonly(),
386
+ 'message': z.string().readonly(),
387
+ })]).readonly(),
388
+ })]))
389
+ let _khorsheed_dsh_room_room_getState_parameter_0$schema$value
390
+ const _khorsheed_dsh_room_room_getState_parameter_0$schema = () => (_khorsheed_dsh_room_room_getState_parameter_0$schema$value ??= z.object({
391
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
392
+ }))
393
+ let _khorsheed_dsh_room_room_getState_result$schema$value
394
+ const _khorsheed_dsh_room_room_getState_result$schema = () => (_khorsheed_dsh_room_room_getState_result$schema$value ??= z.union([z.object({
395
+ 'ok': z.literal(true).readonly(),
396
+ 'value': z.object({
397
+ 'plan': z.object({
398
+ 'version': z.literal(1),
399
+ 'id': z.string(),
400
+ 'revision': z.number(),
401
+ 'objective': z.string(),
402
+ 'status': z.union([z.literal("cancelled"), z.literal("running"), z.literal("draft"), z.literal("paused"), z.literal("completed")]),
403
+ 'reason': z.string().optional(),
404
+ 'budget': z.object({
405
+ 'maxParallel': z.number(),
406
+ 'maxAttempts': z.number(),
407
+ 'maxAttemptsPerTask': z.number(),
408
+ 'maxActiveMs': z.number(),
409
+ }),
410
+ 'activeMs': z.number(),
411
+ 'resumedAt': z.number().optional(),
412
+ 'stages': z.array(z.object({
413
+ 'id': z.string(),
414
+ 'title': z.string(),
415
+ })),
416
+ 'tasks': z.array(z.object({
417
+ 'id': z.string(),
418
+ 'title': z.string(),
419
+ 'stageId': z.string(),
420
+ 'parentId': z.string().optional(),
421
+ 'kind': z.union([z.literal("group"), z.literal("task")]),
422
+ 'ownerMemberId': z.string().optional(),
423
+ 'instruction': z.string(),
424
+ 'criteria': z.array(z.string()),
425
+ 'inputRefs': z.array(z.string()),
426
+ 'artifactPaths': z.array(z.string()),
427
+ 'dependsOn': z.array(z.string()),
428
+ 'status': z.union([z.literal("pending"), z.literal("failed"), z.literal("cancelled"), z.literal("running"), z.literal("submitted"), z.literal("accepted")]),
429
+ 'attempts': z.array(z.object({
430
+ 'id': z.string(),
431
+ 'deliveryId': z.string(),
432
+ 'number': z.number(),
433
+ 'status': z.union([z.literal("failed"), z.literal("rejected"), z.literal("cancelled"), z.literal("queued"), z.literal("running"), z.literal("uncertain"), z.literal("submitted"), z.literal("accepted")]),
434
+ 'createdAt': z.number(),
435
+ 'startedAt': z.number().optional(),
436
+ 'settledAt': z.number().optional(),
437
+ 'submission': z.object({
438
+ 'summary': z.string(),
439
+ 'references': z.array(z.string()),
440
+ 'artifacts': z.array(z.string()),
441
+ }).optional(),
442
+ 'review': z.object({
443
+ 'decision': z.union([z.literal("accepted"), z.literal("rework")]),
444
+ 'by': z.string(),
445
+ 'reason': z.string(),
446
+ 'references': z.array(z.string()),
447
+ 'time': z.number(),
448
+ }).optional(),
449
+ 'error': z.string().optional(),
450
+ 'retry': z.object({
451
+ 'by': z.string(),
452
+ 'reason': z.string(),
453
+ 'time': z.number(),
454
+ }).optional(),
455
+ })),
456
+ })),
457
+ 'completion': z.object({
458
+ 'summary': z.string(),
459
+ 'references': z.array(z.string()),
460
+ 'artifacts': z.array(z.string()),
461
+ }).optional(),
462
+ }).readonly().optional(),
463
+ 'deliveries': z.array(z.object({
464
+ 'id': z.string().readonly(),
465
+ 'dispatchSeq': z.number().readonly(),
466
+ 'memberId': z.string().readonly(),
467
+ 'status': z.union([z.literal("failed"), z.literal("cancelled"), z.literal("queued"), z.literal("running"), z.literal("done"), z.literal("uncertain")]).readonly(),
468
+ 'origin': z.union([z.literal("human"), z.literal("coordinator"), z.literal("report"), z.literal("relay")]).readonly(),
469
+ 'text': z.string().readonly(),
470
+ 'error': z.string().readonly().optional(),
471
+ 'plan': z.union([z.undefined(), z.object({
472
+ 'goalId': z.string().readonly(),
473
+ 'taskId': z.string().readonly().optional(),
474
+ 'attemptId': z.string().readonly().optional(),
475
+ })]).readonly().optional(),
476
+ })).readonly().optional(),
477
+ 'coordinator': z.object({
478
+ 'version': z.literal(1).readonly(),
479
+ 'memberId': z.string().readonly(),
480
+ 'revision': z.number().readonly(),
481
+ 'previousMemberId': z.string().readonly(),
482
+ 'handoff': z.string().readonly(),
483
+ }).readonly().optional(),
484
+ 'members': z.array(z.object({
485
+ 'id': z.string().readonly().optional(),
486
+ 'name': z.string().readonly(),
487
+ 'kind': z.union([z.literal("main-agent"), z.literal("cli")]).readonly(),
488
+ 'provider': z.string().readonly().optional(),
489
+ 'instructions': z.string().readonly().optional(),
490
+ 'invitedBy': z.union([z.literal("human"), z.literal("agent")]).readonly(),
491
+ 'cwd': z.string().readonly().optional(),
492
+ 'model': z.string().readonly().optional(),
493
+ 'childSessionId': z.intersection(z.string(), z.unknown()).readonly().optional(),
494
+ })).readonly(),
495
+ 'relays': z.array(z.object({
496
+ 'id': z.string().readonly(),
497
+ 'from': z.string().readonly(),
498
+ 'to': z.string().readonly(),
499
+ 'content': z.string().readonly(),
500
+ 'provenance': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => RoomJsonValueRemoteCodec$schema())), z.record(z.string(), z.lazy(() => RoomJsonValueRemoteCodec$schema()))])).readonly().optional(),
501
+ 'state': z.union([z.literal("pending"), z.literal("confirmed"), z.literal("dismissed"), z.literal("sent")]).readonly(),
502
+ })).readonly(),
503
+ 'tasks': z.array(z.object({
504
+ 'deliveryId': z.string().readonly().optional(),
505
+ 'id': z.string().readonly(),
506
+ 'member': z.string().readonly(),
507
+ 'title': z.string().readonly(),
508
+ 'status': z.union([z.literal("pending"), z.literal("failed"), z.literal("cancelled"), z.literal("done"), z.literal("in_progress")]).readonly(),
509
+ 'blockedBy': z.string().readonly().optional(),
510
+ 'updatedAt': z.number().readonly(),
511
+ })).readonly(),
512
+ 'runs': z.array(z.object({
513
+ 'runId': z.string().readonly().optional(),
514
+ 'member': z.string().readonly(),
515
+ 'state': z.union([z.literal("failed"), z.literal("cancelled"), z.literal("running"), z.literal("done")]).readonly(),
516
+ 'startedAt': z.number().readonly(),
517
+ 'elapsedMs': z.number().readonly().optional(),
518
+ 'error': z.string().readonly().optional(),
519
+ })).readonly(),
520
+ 'goal': z.string().readonly().optional(),
521
+ }).readonly(),
522
+ }), z.object({
523
+ 'ok': z.literal(false).readonly(),
524
+ 'error': z.union([z.object({
525
+ 'code': z.literal("request-conflict").readonly(),
526
+ }), z.object({
527
+ 'code': z.literal("member-cwd-bound").readonly(),
528
+ }), z.object({
529
+ 'code': z.literal("not-coordinator").readonly(),
530
+ }), z.object({
531
+ 'code': z.literal("delivery-not-uncertain").readonly(),
532
+ }), z.object({
533
+ 'code': z.literal("plan-reconciliation-required").readonly(),
534
+ }), z.object({
535
+ 'code': z.literal("coordinator-busy").readonly(),
536
+ }), z.object({
537
+ 'code': z.literal("coordinator-not-ready").readonly(),
538
+ 'message': z.string().readonly(),
539
+ }), z.object({
540
+ 'code': z.literal("coordinator-conflict").readonly(),
541
+ }), z.object({
542
+ 'code': z.literal("active-coordinator").readonly(),
543
+ }), z.object({
544
+ 'code': z.literal("configuration-owned-by-core").readonly(),
545
+ }), z.object({
546
+ 'code': z.literal("session-not-found").readonly(),
547
+ }), z.object({
548
+ 'code': z.literal("not-a-room").readonly(),
549
+ }), z.object({
550
+ 'code': z.literal("invalid-name").readonly(),
551
+ }), z.object({
552
+ 'code': z.literal("duplicate-name").readonly(),
553
+ }), z.object({
554
+ 'code': z.literal("empty-provider").readonly(),
555
+ }), z.object({
556
+ 'code': z.literal("member-not-found").readonly(),
557
+ }), z.object({
558
+ 'code': z.literal("empty-text").readonly(),
559
+ }), z.object({
560
+ 'code': z.literal("nothing-to-update").readonly(),
561
+ }), z.object({
562
+ 'code': z.literal("local-agent-unavailable").readonly(),
563
+ }), z.object({
564
+ 'code': z.literal("unknown-provider").readonly(),
565
+ 'provider': z.string().readonly(),
566
+ 'available': z.array(z.string()).readonly(),
567
+ }), z.object({
568
+ 'code': z.literal("unknown-targets").readonly(),
569
+ 'names': z.array(z.string()).readonly(),
570
+ }), z.object({
571
+ 'code': z.literal("no-targets").readonly(),
572
+ }), z.object({
573
+ 'code': z.literal("relay-not-found").readonly(),
574
+ }), z.object({
575
+ 'code': z.literal("relay-not-pending").readonly(),
576
+ }), z.object({
577
+ 'code': z.literal("main-member").readonly(),
578
+ }), z.object({
579
+ 'code': z.literal("task-not-found").readonly(),
580
+ }), z.object({
581
+ 'code': z.literal("task-closed").readonly(),
582
+ }), z.object({
583
+ 'code': z.literal("resume-failed").readonly(),
584
+ 'message': z.string().readonly(),
585
+ })]).readonly(),
586
+ })]))
587
+ let _khorsheed_dsh_room_room_invite_parameter_0$schema$value
588
+ const _khorsheed_dsh_room_room_invite_parameter_0$schema = () => (_khorsheed_dsh_room_room_invite_parameter_0$schema$value ??= z.object({
589
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
590
+ 'provider': z.string().readonly(),
591
+ 'name': z.string().readonly(),
592
+ 'instructions': z.string().readonly().optional(),
593
+ 'cwd': z.string().readonly().optional(),
594
+ 'firstTask': z.string().readonly().optional(),
595
+ 'model': z.string().readonly().optional(),
596
+ }))
597
+ let _khorsheed_dsh_room_room_invite_result$schema$value
598
+ const _khorsheed_dsh_room_room_invite_result$schema = () => (_khorsheed_dsh_room_room_invite_result$schema$value ??= z.union([z.object({
599
+ 'ok': z.literal(true).readonly(),
600
+ 'value': z.object({
601
+ 'name': z.string().readonly(),
602
+ 'pendingFirstTask': z.boolean().readonly(),
603
+ }).readonly(),
604
+ }), z.object({
605
+ 'ok': z.literal(false).readonly(),
606
+ 'error': z.union([z.object({
607
+ 'code': z.literal("request-conflict").readonly(),
608
+ }), z.object({
609
+ 'code': z.literal("member-cwd-bound").readonly(),
610
+ }), z.object({
611
+ 'code': z.literal("not-coordinator").readonly(),
612
+ }), z.object({
613
+ 'code': z.literal("delivery-not-uncertain").readonly(),
614
+ }), z.object({
615
+ 'code': z.literal("plan-reconciliation-required").readonly(),
616
+ }), z.object({
617
+ 'code': z.literal("coordinator-busy").readonly(),
618
+ }), z.object({
619
+ 'code': z.literal("coordinator-not-ready").readonly(),
620
+ 'message': z.string().readonly(),
621
+ }), z.object({
622
+ 'code': z.literal("coordinator-conflict").readonly(),
623
+ }), z.object({
624
+ 'code': z.literal("active-coordinator").readonly(),
625
+ }), z.object({
626
+ 'code': z.literal("configuration-owned-by-core").readonly(),
627
+ }), z.object({
628
+ 'code': z.literal("session-not-found").readonly(),
629
+ }), z.object({
630
+ 'code': z.literal("not-a-room").readonly(),
631
+ }), z.object({
632
+ 'code': z.literal("invalid-name").readonly(),
633
+ }), z.object({
634
+ 'code': z.literal("duplicate-name").readonly(),
635
+ }), z.object({
636
+ 'code': z.literal("empty-provider").readonly(),
637
+ }), z.object({
638
+ 'code': z.literal("member-not-found").readonly(),
639
+ }), z.object({
640
+ 'code': z.literal("empty-text").readonly(),
641
+ }), z.object({
642
+ 'code': z.literal("nothing-to-update").readonly(),
643
+ }), z.object({
644
+ 'code': z.literal("local-agent-unavailable").readonly(),
645
+ }), z.object({
646
+ 'code': z.literal("unknown-provider").readonly(),
647
+ 'provider': z.string().readonly(),
648
+ 'available': z.array(z.string()).readonly(),
649
+ }), z.object({
650
+ 'code': z.literal("unknown-targets").readonly(),
651
+ 'names': z.array(z.string()).readonly(),
652
+ }), z.object({
653
+ 'code': z.literal("no-targets").readonly(),
654
+ }), z.object({
655
+ 'code': z.literal("relay-not-found").readonly(),
656
+ }), z.object({
657
+ 'code': z.literal("relay-not-pending").readonly(),
658
+ }), z.object({
659
+ 'code': z.literal("main-member").readonly(),
660
+ }), z.object({
661
+ 'code': z.literal("task-not-found").readonly(),
662
+ }), z.object({
663
+ 'code': z.literal("task-closed").readonly(),
664
+ }), z.object({
665
+ 'code': z.literal("resume-failed").readonly(),
666
+ 'message': z.string().readonly(),
667
+ })]).readonly(),
668
+ })]))
669
+ let _khorsheed_dsh_room_room_isRoom_parameter_0$schema$value
670
+ const _khorsheed_dsh_room_room_isRoom_parameter_0$schema = () => (_khorsheed_dsh_room_room_isRoom_parameter_0$schema$value ??= z.object({
671
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
672
+ }))
673
+ let _khorsheed_dsh_room_room_isRoom_result$schema$value
674
+ const _khorsheed_dsh_room_room_isRoom_result$schema = () => (_khorsheed_dsh_room_room_isRoom_result$schema$value ??= z.boolean())
675
+ let _khorsheed_dsh_room_room_listProviders_parameter_0$schema$value
676
+ const _khorsheed_dsh_room_room_listProviders_parameter_0$schema = () => (_khorsheed_dsh_room_room_listProviders_parameter_0$schema$value ??= z.object({}))
677
+ let _khorsheed_dsh_room_room_listProviders_result$schema$value
678
+ const _khorsheed_dsh_room_room_listProviders_result$schema = () => (_khorsheed_dsh_room_room_listProviders_result$schema$value ??= z.object({
679
+ 'localAgentAvailable': z.boolean().readonly(),
680
+ 'providers': z.array(z.object({
681
+ 'provider': z.string().readonly(),
682
+ 'displayName': z.string().readonly(),
683
+ 'harness': z.string().readonly().optional(),
684
+ 'authenticated': z.boolean().readonly(),
685
+ })).readonly(),
686
+ }))
687
+ let _khorsheed_dsh_room_room_planCommand_parameter_0$schema$value
688
+ const _khorsheed_dsh_room_room_planCommand_parameter_0$schema = () => (_khorsheed_dsh_room_room_planCommand_parameter_0$schema$value ??= z.object({
689
+ 'sessionId': z.intersection(z.string(), z.unknown()),
690
+ 'command': z.string(),
691
+ }))
692
+ let _khorsheed_dsh_room_room_planCommand_result$schema$value
693
+ const _khorsheed_dsh_room_room_planCommand_result$schema = () => (_khorsheed_dsh_room_room_planCommand_result$schema$value ??= z.union([z.object({
694
+ 'ok': z.literal(true),
695
+ }), z.object({
696
+ 'ok': z.literal(false),
697
+ 'message': z.string(),
698
+ })]))
699
+ let _khorsheed_dsh_room_room_postMessage_parameter_0$schema$value
700
+ const _khorsheed_dsh_room_room_postMessage_parameter_0$schema = () => (_khorsheed_dsh_room_room_postMessage_parameter_0$schema$value ??= z.object({
701
+ 'requestId': z.string().readonly().optional(),
702
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
703
+ 'text': z.string().readonly(),
704
+ 'targets': z.array(z.string()).readonly().optional(),
705
+ }))
706
+ let _khorsheed_dsh_room_room_postMessage_result$schema$value
707
+ const _khorsheed_dsh_room_room_postMessage_result$schema = () => (_khorsheed_dsh_room_room_postMessage_result$schema$value ??= z.union([z.object({
708
+ 'ok': z.literal(true).readonly(),
709
+ 'value': z.object({
710
+ 'parsed': z.object({
711
+ 'targets': z.array(z.string()).readonly(),
712
+ 'text': z.string().readonly(),
713
+ }).readonly(),
714
+ 'seq': z.number().readonly(),
715
+ }).readonly(),
716
+ }), z.object({
717
+ 'ok': z.literal(false).readonly(),
718
+ 'error': z.union([z.object({
719
+ 'code': z.literal("request-conflict").readonly(),
720
+ }), z.object({
721
+ 'code': z.literal("member-cwd-bound").readonly(),
722
+ }), z.object({
723
+ 'code': z.literal("not-coordinator").readonly(),
724
+ }), z.object({
725
+ 'code': z.literal("delivery-not-uncertain").readonly(),
726
+ }), z.object({
727
+ 'code': z.literal("plan-reconciliation-required").readonly(),
728
+ }), z.object({
729
+ 'code': z.literal("coordinator-busy").readonly(),
730
+ }), z.object({
731
+ 'code': z.literal("coordinator-not-ready").readonly(),
732
+ 'message': z.string().readonly(),
733
+ }), z.object({
734
+ 'code': z.literal("coordinator-conflict").readonly(),
735
+ }), z.object({
736
+ 'code': z.literal("active-coordinator").readonly(),
737
+ }), z.object({
738
+ 'code': z.literal("configuration-owned-by-core").readonly(),
739
+ }), z.object({
740
+ 'code': z.literal("session-not-found").readonly(),
741
+ }), z.object({
742
+ 'code': z.literal("not-a-room").readonly(),
743
+ }), z.object({
744
+ 'code': z.literal("invalid-name").readonly(),
745
+ }), z.object({
746
+ 'code': z.literal("duplicate-name").readonly(),
747
+ }), z.object({
748
+ 'code': z.literal("empty-provider").readonly(),
749
+ }), z.object({
750
+ 'code': z.literal("member-not-found").readonly(),
751
+ }), z.object({
752
+ 'code': z.literal("empty-text").readonly(),
753
+ }), z.object({
754
+ 'code': z.literal("nothing-to-update").readonly(),
755
+ }), z.object({
756
+ 'code': z.literal("local-agent-unavailable").readonly(),
757
+ }), z.object({
758
+ 'code': z.literal("unknown-provider").readonly(),
759
+ 'provider': z.string().readonly(),
760
+ 'available': z.array(z.string()).readonly(),
761
+ }), z.object({
762
+ 'code': z.literal("unknown-targets").readonly(),
763
+ 'names': z.array(z.string()).readonly(),
764
+ }), z.object({
765
+ 'code': z.literal("no-targets").readonly(),
766
+ }), z.object({
767
+ 'code': z.literal("relay-not-found").readonly(),
768
+ }), z.object({
769
+ 'code': z.literal("relay-not-pending").readonly(),
770
+ }), z.object({
771
+ 'code': z.literal("main-member").readonly(),
772
+ }), z.object({
773
+ 'code': z.literal("task-not-found").readonly(),
774
+ }), z.object({
775
+ 'code': z.literal("task-closed").readonly(),
776
+ }), z.object({
777
+ 'code': z.literal("resume-failed").readonly(),
778
+ 'message': z.string().readonly(),
779
+ })]).readonly(),
780
+ })]))
781
+ let _khorsheed_dsh_room_room_prepareMember_parameter_0$schema$value
782
+ const _khorsheed_dsh_room_room_prepareMember_parameter_0$schema = () => (_khorsheed_dsh_room_room_prepareMember_parameter_0$schema$value ??= z.object({
783
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
784
+ 'name': z.string().readonly(),
785
+ }))
786
+ let _khorsheed_dsh_room_room_prepareMember_result$schema$value
787
+ const _khorsheed_dsh_room_room_prepareMember_result$schema = () => (_khorsheed_dsh_room_room_prepareMember_result$schema$value ??= z.union([z.object({
788
+ 'ok': z.literal(true).readonly(),
789
+ 'value': z.object({
790
+ 'childSessionId': z.string().readonly(),
791
+ }).readonly(),
792
+ }), z.object({
793
+ 'ok': z.literal(false).readonly(),
794
+ 'error': z.union([z.object({
795
+ 'code': z.literal("request-conflict").readonly(),
796
+ }), z.object({
797
+ 'code': z.literal("member-cwd-bound").readonly(),
798
+ }), z.object({
799
+ 'code': z.literal("not-coordinator").readonly(),
800
+ }), z.object({
801
+ 'code': z.literal("delivery-not-uncertain").readonly(),
802
+ }), z.object({
803
+ 'code': z.literal("plan-reconciliation-required").readonly(),
804
+ }), z.object({
805
+ 'code': z.literal("coordinator-busy").readonly(),
806
+ }), z.object({
807
+ 'code': z.literal("coordinator-not-ready").readonly(),
808
+ 'message': z.string().readonly(),
809
+ }), z.object({
810
+ 'code': z.literal("coordinator-conflict").readonly(),
811
+ }), z.object({
812
+ 'code': z.literal("active-coordinator").readonly(),
813
+ }), z.object({
814
+ 'code': z.literal("configuration-owned-by-core").readonly(),
815
+ }), z.object({
816
+ 'code': z.literal("session-not-found").readonly(),
817
+ }), z.object({
818
+ 'code': z.literal("not-a-room").readonly(),
819
+ }), z.object({
820
+ 'code': z.literal("invalid-name").readonly(),
821
+ }), z.object({
822
+ 'code': z.literal("duplicate-name").readonly(),
823
+ }), z.object({
824
+ 'code': z.literal("empty-provider").readonly(),
825
+ }), z.object({
826
+ 'code': z.literal("member-not-found").readonly(),
827
+ }), z.object({
828
+ 'code': z.literal("empty-text").readonly(),
829
+ }), z.object({
830
+ 'code': z.literal("nothing-to-update").readonly(),
831
+ }), z.object({
832
+ 'code': z.literal("local-agent-unavailable").readonly(),
833
+ }), z.object({
834
+ 'code': z.literal("unknown-provider").readonly(),
835
+ 'provider': z.string().readonly(),
836
+ 'available': z.array(z.string()).readonly(),
837
+ }), z.object({
838
+ 'code': z.literal("unknown-targets").readonly(),
839
+ 'names': z.array(z.string()).readonly(),
840
+ }), z.object({
841
+ 'code': z.literal("no-targets").readonly(),
842
+ }), z.object({
843
+ 'code': z.literal("relay-not-found").readonly(),
844
+ }), z.object({
845
+ 'code': z.literal("relay-not-pending").readonly(),
846
+ }), z.object({
847
+ 'code': z.literal("main-member").readonly(),
848
+ }), z.object({
849
+ 'code': z.literal("task-not-found").readonly(),
850
+ }), z.object({
851
+ 'code': z.literal("task-closed").readonly(),
852
+ }), z.object({
853
+ 'code': z.literal("resume-failed").readonly(),
854
+ 'message': z.string().readonly(),
855
+ })]).readonly(),
856
+ })]))
857
+ let _khorsheed_dsh_room_room_reconcileDelivery_parameter_0$schema$value
858
+ const _khorsheed_dsh_room_room_reconcileDelivery_parameter_0$schema = () => (_khorsheed_dsh_room_room_reconcileDelivery_parameter_0$schema$value ??= z.object({
859
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
860
+ 'deliveryId': z.string().readonly(),
861
+ 'outcome': z.union([z.literal("cancelled"), z.literal("done")]).readonly(),
862
+ 'evidence': z.string().readonly(),
863
+ }))
864
+ let _khorsheed_dsh_room_room_reconcileDelivery_result$schema$value
865
+ const _khorsheed_dsh_room_room_reconcileDelivery_result$schema = () => (_khorsheed_dsh_room_room_reconcileDelivery_result$schema$value ??= z.union([z.object({
866
+ 'ok': z.literal(true).readonly(),
867
+ }), z.object({
868
+ 'ok': z.literal(false).readonly(),
869
+ 'error': z.union([z.object({
870
+ 'code': z.literal("request-conflict").readonly(),
871
+ }), z.object({
872
+ 'code': z.literal("member-cwd-bound").readonly(),
873
+ }), z.object({
874
+ 'code': z.literal("not-coordinator").readonly(),
875
+ }), z.object({
876
+ 'code': z.literal("delivery-not-uncertain").readonly(),
877
+ }), z.object({
878
+ 'code': z.literal("plan-reconciliation-required").readonly(),
879
+ }), z.object({
880
+ 'code': z.literal("coordinator-busy").readonly(),
881
+ }), z.object({
882
+ 'code': z.literal("coordinator-not-ready").readonly(),
883
+ 'message': z.string().readonly(),
884
+ }), z.object({
885
+ 'code': z.literal("coordinator-conflict").readonly(),
886
+ }), z.object({
887
+ 'code': z.literal("active-coordinator").readonly(),
888
+ }), z.object({
889
+ 'code': z.literal("configuration-owned-by-core").readonly(),
890
+ }), z.object({
891
+ 'code': z.literal("session-not-found").readonly(),
892
+ }), z.object({
893
+ 'code': z.literal("not-a-room").readonly(),
894
+ }), z.object({
895
+ 'code': z.literal("invalid-name").readonly(),
896
+ }), z.object({
897
+ 'code': z.literal("duplicate-name").readonly(),
898
+ }), z.object({
899
+ 'code': z.literal("empty-provider").readonly(),
900
+ }), z.object({
901
+ 'code': z.literal("member-not-found").readonly(),
902
+ }), z.object({
903
+ 'code': z.literal("empty-text").readonly(),
904
+ }), z.object({
905
+ 'code': z.literal("nothing-to-update").readonly(),
906
+ }), z.object({
907
+ 'code': z.literal("local-agent-unavailable").readonly(),
908
+ }), z.object({
909
+ 'code': z.literal("unknown-provider").readonly(),
910
+ 'provider': z.string().readonly(),
911
+ 'available': z.array(z.string()).readonly(),
912
+ }), z.object({
913
+ 'code': z.literal("unknown-targets").readonly(),
914
+ 'names': z.array(z.string()).readonly(),
915
+ }), z.object({
916
+ 'code': z.literal("no-targets").readonly(),
917
+ }), z.object({
918
+ 'code': z.literal("relay-not-found").readonly(),
919
+ }), z.object({
920
+ 'code': z.literal("relay-not-pending").readonly(),
921
+ }), z.object({
922
+ 'code': z.literal("main-member").readonly(),
923
+ }), z.object({
924
+ 'code': z.literal("task-not-found").readonly(),
925
+ }), z.object({
926
+ 'code': z.literal("task-closed").readonly(),
927
+ }), z.object({
928
+ 'code': z.literal("resume-failed").readonly(),
929
+ 'message': z.string().readonly(),
930
+ })]).readonly(),
931
+ })]))
932
+ let _khorsheed_dsh_room_room_removeMember_parameter_0$schema$value
933
+ const _khorsheed_dsh_room_room_removeMember_parameter_0$schema = () => (_khorsheed_dsh_room_room_removeMember_parameter_0$schema$value ??= z.object({
934
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
935
+ 'name': z.string().readonly(),
936
+ }))
937
+ let _khorsheed_dsh_room_room_removeMember_result$schema$value
938
+ const _khorsheed_dsh_room_room_removeMember_result$schema = () => (_khorsheed_dsh_room_room_removeMember_result$schema$value ??= z.union([z.object({
939
+ 'ok': z.literal(true).readonly(),
940
+ 'value': z.object({
941
+ 'name': z.string().readonly(),
942
+ }).readonly(),
943
+ }), z.object({
944
+ 'ok': z.literal(false).readonly(),
945
+ 'error': z.union([z.object({
946
+ 'code': z.literal("request-conflict").readonly(),
947
+ }), z.object({
948
+ 'code': z.literal("member-cwd-bound").readonly(),
949
+ }), z.object({
950
+ 'code': z.literal("not-coordinator").readonly(),
951
+ }), z.object({
952
+ 'code': z.literal("delivery-not-uncertain").readonly(),
953
+ }), z.object({
954
+ 'code': z.literal("plan-reconciliation-required").readonly(),
955
+ }), z.object({
956
+ 'code': z.literal("coordinator-busy").readonly(),
957
+ }), z.object({
958
+ 'code': z.literal("coordinator-not-ready").readonly(),
959
+ 'message': z.string().readonly(),
960
+ }), z.object({
961
+ 'code': z.literal("coordinator-conflict").readonly(),
962
+ }), z.object({
963
+ 'code': z.literal("active-coordinator").readonly(),
964
+ }), z.object({
965
+ 'code': z.literal("configuration-owned-by-core").readonly(),
966
+ }), z.object({
967
+ 'code': z.literal("session-not-found").readonly(),
968
+ }), z.object({
969
+ 'code': z.literal("not-a-room").readonly(),
970
+ }), z.object({
971
+ 'code': z.literal("invalid-name").readonly(),
972
+ }), z.object({
973
+ 'code': z.literal("duplicate-name").readonly(),
974
+ }), z.object({
975
+ 'code': z.literal("empty-provider").readonly(),
976
+ }), z.object({
977
+ 'code': z.literal("member-not-found").readonly(),
978
+ }), z.object({
979
+ 'code': z.literal("empty-text").readonly(),
980
+ }), z.object({
981
+ 'code': z.literal("nothing-to-update").readonly(),
982
+ }), z.object({
983
+ 'code': z.literal("local-agent-unavailable").readonly(),
984
+ }), z.object({
985
+ 'code': z.literal("unknown-provider").readonly(),
986
+ 'provider': z.string().readonly(),
987
+ 'available': z.array(z.string()).readonly(),
988
+ }), z.object({
989
+ 'code': z.literal("unknown-targets").readonly(),
990
+ 'names': z.array(z.string()).readonly(),
991
+ }), z.object({
992
+ 'code': z.literal("no-targets").readonly(),
993
+ }), z.object({
994
+ 'code': z.literal("relay-not-found").readonly(),
995
+ }), z.object({
996
+ 'code': z.literal("relay-not-pending").readonly(),
997
+ }), z.object({
998
+ 'code': z.literal("main-member").readonly(),
999
+ }), z.object({
1000
+ 'code': z.literal("task-not-found").readonly(),
1001
+ }), z.object({
1002
+ 'code': z.literal("task-closed").readonly(),
1003
+ }), z.object({
1004
+ 'code': z.literal("resume-failed").readonly(),
1005
+ 'message': z.string().readonly(),
1006
+ })]).readonly(),
1007
+ })]))
1008
+ let _khorsheed_dsh_room_room_setCoordinator_parameter_0$schema$value
1009
+ const _khorsheed_dsh_room_room_setCoordinator_parameter_0$schema = () => (_khorsheed_dsh_room_room_setCoordinator_parameter_0$schema$value ??= z.object({
1010
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
1011
+ 'memberId': z.string().readonly(),
1012
+ 'expectedRevision': z.number().readonly(),
1013
+ }))
1014
+ let _khorsheed_dsh_room_room_setCoordinator_result$schema$value
1015
+ const _khorsheed_dsh_room_room_setCoordinator_result$schema = () => (_khorsheed_dsh_room_room_setCoordinator_result$schema$value ??= z.union([z.object({
1016
+ 'ok': z.literal(true).readonly(),
1017
+ 'value': z.object({
1018
+ 'version': z.literal(1).readonly(),
1019
+ 'memberId': z.string().readonly(),
1020
+ 'revision': z.number().readonly(),
1021
+ 'previousMemberId': z.string().readonly(),
1022
+ 'handoff': z.string().readonly(),
1023
+ }).readonly(),
1024
+ }), z.object({
1025
+ 'ok': z.literal(false).readonly(),
1026
+ 'error': z.union([z.object({
1027
+ 'code': z.literal("request-conflict").readonly(),
1028
+ }), z.object({
1029
+ 'code': z.literal("member-cwd-bound").readonly(),
1030
+ }), z.object({
1031
+ 'code': z.literal("not-coordinator").readonly(),
1032
+ }), z.object({
1033
+ 'code': z.literal("delivery-not-uncertain").readonly(),
1034
+ }), z.object({
1035
+ 'code': z.literal("plan-reconciliation-required").readonly(),
1036
+ }), z.object({
1037
+ 'code': z.literal("coordinator-busy").readonly(),
1038
+ }), z.object({
1039
+ 'code': z.literal("coordinator-not-ready").readonly(),
1040
+ 'message': z.string().readonly(),
1041
+ }), z.object({
1042
+ 'code': z.literal("coordinator-conflict").readonly(),
1043
+ }), z.object({
1044
+ 'code': z.literal("active-coordinator").readonly(),
1045
+ }), z.object({
1046
+ 'code': z.literal("configuration-owned-by-core").readonly(),
1047
+ }), z.object({
1048
+ 'code': z.literal("session-not-found").readonly(),
1049
+ }), z.object({
1050
+ 'code': z.literal("not-a-room").readonly(),
1051
+ }), z.object({
1052
+ 'code': z.literal("invalid-name").readonly(),
1053
+ }), z.object({
1054
+ 'code': z.literal("duplicate-name").readonly(),
1055
+ }), z.object({
1056
+ 'code': z.literal("empty-provider").readonly(),
1057
+ }), z.object({
1058
+ 'code': z.literal("member-not-found").readonly(),
1059
+ }), z.object({
1060
+ 'code': z.literal("empty-text").readonly(),
1061
+ }), z.object({
1062
+ 'code': z.literal("nothing-to-update").readonly(),
1063
+ }), z.object({
1064
+ 'code': z.literal("local-agent-unavailable").readonly(),
1065
+ }), z.object({
1066
+ 'code': z.literal("unknown-provider").readonly(),
1067
+ 'provider': z.string().readonly(),
1068
+ 'available': z.array(z.string()).readonly(),
1069
+ }), z.object({
1070
+ 'code': z.literal("unknown-targets").readonly(),
1071
+ 'names': z.array(z.string()).readonly(),
1072
+ }), z.object({
1073
+ 'code': z.literal("no-targets").readonly(),
1074
+ }), z.object({
1075
+ 'code': z.literal("relay-not-found").readonly(),
1076
+ }), z.object({
1077
+ 'code': z.literal("relay-not-pending").readonly(),
1078
+ }), z.object({
1079
+ 'code': z.literal("main-member").readonly(),
1080
+ }), z.object({
1081
+ 'code': z.literal("task-not-found").readonly(),
1082
+ }), z.object({
1083
+ 'code': z.literal("task-closed").readonly(),
1084
+ }), z.object({
1085
+ 'code': z.literal("resume-failed").readonly(),
1086
+ 'message': z.string().readonly(),
1087
+ })]).readonly(),
1088
+ })]))
1089
+ let _khorsheed_dsh_room_room_setGoal_parameter_0$schema$value
1090
+ const _khorsheed_dsh_room_room_setGoal_parameter_0$schema = () => (_khorsheed_dsh_room_room_setGoal_parameter_0$schema$value ??= z.object({
1091
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
1092
+ 'text': z.string().readonly(),
1093
+ }))
1094
+ let _khorsheed_dsh_room_room_setGoal_result$schema$value
1095
+ const _khorsheed_dsh_room_room_setGoal_result$schema = () => (_khorsheed_dsh_room_room_setGoal_result$schema$value ??= z.union([z.object({
1096
+ 'ok': z.literal(true).readonly(),
1097
+ 'value': z.object({
1098
+ 'goal': z.string().readonly().optional(),
1099
+ }).readonly(),
1100
+ }), z.object({
1101
+ 'ok': z.literal(false).readonly(),
1102
+ 'error': z.union([z.object({
1103
+ 'code': z.literal("request-conflict").readonly(),
1104
+ }), z.object({
1105
+ 'code': z.literal("member-cwd-bound").readonly(),
1106
+ }), z.object({
1107
+ 'code': z.literal("not-coordinator").readonly(),
1108
+ }), z.object({
1109
+ 'code': z.literal("delivery-not-uncertain").readonly(),
1110
+ }), z.object({
1111
+ 'code': z.literal("plan-reconciliation-required").readonly(),
1112
+ }), z.object({
1113
+ 'code': z.literal("coordinator-busy").readonly(),
1114
+ }), z.object({
1115
+ 'code': z.literal("coordinator-not-ready").readonly(),
1116
+ 'message': z.string().readonly(),
1117
+ }), z.object({
1118
+ 'code': z.literal("coordinator-conflict").readonly(),
1119
+ }), z.object({
1120
+ 'code': z.literal("active-coordinator").readonly(),
1121
+ }), z.object({
1122
+ 'code': z.literal("configuration-owned-by-core").readonly(),
1123
+ }), z.object({
1124
+ 'code': z.literal("session-not-found").readonly(),
1125
+ }), z.object({
1126
+ 'code': z.literal("not-a-room").readonly(),
1127
+ }), z.object({
1128
+ 'code': z.literal("invalid-name").readonly(),
1129
+ }), z.object({
1130
+ 'code': z.literal("duplicate-name").readonly(),
1131
+ }), z.object({
1132
+ 'code': z.literal("empty-provider").readonly(),
1133
+ }), z.object({
1134
+ 'code': z.literal("member-not-found").readonly(),
1135
+ }), z.object({
1136
+ 'code': z.literal("empty-text").readonly(),
1137
+ }), z.object({
1138
+ 'code': z.literal("nothing-to-update").readonly(),
1139
+ }), z.object({
1140
+ 'code': z.literal("local-agent-unavailable").readonly(),
1141
+ }), z.object({
1142
+ 'code': z.literal("unknown-provider").readonly(),
1143
+ 'provider': z.string().readonly(),
1144
+ 'available': z.array(z.string()).readonly(),
1145
+ }), z.object({
1146
+ 'code': z.literal("unknown-targets").readonly(),
1147
+ 'names': z.array(z.string()).readonly(),
1148
+ }), z.object({
1149
+ 'code': z.literal("no-targets").readonly(),
1150
+ }), z.object({
1151
+ 'code': z.literal("relay-not-found").readonly(),
1152
+ }), z.object({
1153
+ 'code': z.literal("relay-not-pending").readonly(),
1154
+ }), z.object({
1155
+ 'code': z.literal("main-member").readonly(),
1156
+ }), z.object({
1157
+ 'code': z.literal("task-not-found").readonly(),
1158
+ }), z.object({
1159
+ 'code': z.literal("task-closed").readonly(),
1160
+ }), z.object({
1161
+ 'code': z.literal("resume-failed").readonly(),
1162
+ 'message': z.string().readonly(),
1163
+ })]).readonly(),
1164
+ })]))
1165
+ let _khorsheed_dsh_room_room_updateMember_parameter_0$schema$value
1166
+ const _khorsheed_dsh_room_room_updateMember_parameter_0$schema = () => (_khorsheed_dsh_room_room_updateMember_parameter_0$schema$value ??= z.object({
1167
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
1168
+ 'name': z.string().readonly(),
1169
+ 'rename': z.string().readonly().optional(),
1170
+ 'instructions': z.union([z.literal(null), z.string()]).readonly().optional(),
1171
+ 'cwd': z.union([z.literal(null), z.string()]).readonly().optional(),
1172
+ 'model': z.union([z.literal(null), z.string()]).readonly().optional(),
1173
+ }))
1174
+ let _khorsheed_dsh_room_room_updateMember_result$schema$value
1175
+ const _khorsheed_dsh_room_room_updateMember_result$schema = () => (_khorsheed_dsh_room_room_updateMember_result$schema$value ??= z.union([z.object({
1176
+ 'ok': z.literal(true).readonly(),
1177
+ 'value': z.object({
1178
+ 'name': z.string().readonly(),
1179
+ }).readonly(),
1180
+ }), z.object({
1181
+ 'ok': z.literal(false).readonly(),
1182
+ 'error': z.union([z.object({
1183
+ 'code': z.literal("request-conflict").readonly(),
1184
+ }), z.object({
1185
+ 'code': z.literal("member-cwd-bound").readonly(),
1186
+ }), z.object({
1187
+ 'code': z.literal("not-coordinator").readonly(),
1188
+ }), z.object({
1189
+ 'code': z.literal("delivery-not-uncertain").readonly(),
1190
+ }), z.object({
1191
+ 'code': z.literal("plan-reconciliation-required").readonly(),
1192
+ }), z.object({
1193
+ 'code': z.literal("coordinator-busy").readonly(),
1194
+ }), z.object({
1195
+ 'code': z.literal("coordinator-not-ready").readonly(),
1196
+ 'message': z.string().readonly(),
1197
+ }), z.object({
1198
+ 'code': z.literal("coordinator-conflict").readonly(),
1199
+ }), z.object({
1200
+ 'code': z.literal("active-coordinator").readonly(),
1201
+ }), z.object({
1202
+ 'code': z.literal("configuration-owned-by-core").readonly(),
1203
+ }), z.object({
1204
+ 'code': z.literal("session-not-found").readonly(),
1205
+ }), z.object({
1206
+ 'code': z.literal("not-a-room").readonly(),
1207
+ }), z.object({
1208
+ 'code': z.literal("invalid-name").readonly(),
1209
+ }), z.object({
1210
+ 'code': z.literal("duplicate-name").readonly(),
1211
+ }), z.object({
1212
+ 'code': z.literal("empty-provider").readonly(),
1213
+ }), z.object({
1214
+ 'code': z.literal("member-not-found").readonly(),
1215
+ }), z.object({
1216
+ 'code': z.literal("empty-text").readonly(),
1217
+ }), z.object({
1218
+ 'code': z.literal("nothing-to-update").readonly(),
1219
+ }), z.object({
1220
+ 'code': z.literal("local-agent-unavailable").readonly(),
1221
+ }), z.object({
1222
+ 'code': z.literal("unknown-provider").readonly(),
1223
+ 'provider': z.string().readonly(),
1224
+ 'available': z.array(z.string()).readonly(),
1225
+ }), z.object({
1226
+ 'code': z.literal("unknown-targets").readonly(),
1227
+ 'names': z.array(z.string()).readonly(),
1228
+ }), z.object({
1229
+ 'code': z.literal("no-targets").readonly(),
1230
+ }), z.object({
1231
+ 'code': z.literal("relay-not-found").readonly(),
1232
+ }), z.object({
1233
+ 'code': z.literal("relay-not-pending").readonly(),
1234
+ }), z.object({
1235
+ 'code': z.literal("main-member").readonly(),
1236
+ }), z.object({
1237
+ 'code': z.literal("task-not-found").readonly(),
1238
+ }), z.object({
1239
+ 'code': z.literal("task-closed").readonly(),
1240
+ }), z.object({
1241
+ 'code': z.literal("resume-failed").readonly(),
1242
+ 'message': z.string().readonly(),
1243
+ })]).readonly(),
1244
+ })]))
1245
+
1246
+ export const TYPERT = {
1247
+ package: '@khorsheed/dsh-room',
1248
+ face: 'host',
1249
+ schemas: [
1250
+ ],
1251
+ invocations: [
1252
+ {
1253
+ id: '@khorsheed/dsh-room#room/addTask',
1254
+ service: 'room',
1255
+ namespace: 'room',
1256
+ method: 'addTask',
1257
+ invocation: { kind: 'direct' },
1258
+ parameters: [
1259
+ {
1260
+ name: 'request',
1261
+ wire: 'request',
1262
+ source: 'json',
1263
+ codec: {
1264
+ mode: 'strict',
1265
+ typeSymbol: '@khorsheed/dsh-room/types#RoomAddTaskRequest',
1266
+ create: _khorsheed_dsh_room_room_addTask_parameter_0$schema,
1267
+ schema: _khorsheed_dsh_room_room_addTask_parameter_0$schema(),
1268
+ },
1269
+ },
1270
+ ],
1271
+ result: {
1272
+ mode: 'strict',
1273
+ typeSymbol: '@khorsheed/dsh-room/types#RoomAddTaskResult',
1274
+ create: _khorsheed_dsh_room_room_addTask_result$schema,
1275
+ schema: _khorsheed_dsh_room_room_addTask_result$schema(),
1276
+ },
1277
+ sourceLocation: {"file":"packages/room/src/index.ts","line":946,"column":9},
1278
+ },
1279
+ {
1280
+ id: '@khorsheed/dsh-room#room/cancel',
1281
+ service: 'room',
1282
+ namespace: 'room',
1283
+ method: 'cancel',
1284
+ invocation: { kind: 'direct' },
1285
+ parameters: [
1286
+ {
1287
+ name: 'request',
1288
+ wire: 'request',
1289
+ source: 'json',
1290
+ codec: {
1291
+ mode: 'strict',
1292
+ typeSymbol: '@khorsheed/dsh-room/types#RoomCancelRequest',
1293
+ create: _khorsheed_dsh_room_room_cancel_parameter_0$schema,
1294
+ schema: _khorsheed_dsh_room_room_cancel_parameter_0$schema(),
1295
+ },
1296
+ },
1297
+ ],
1298
+ result: {
1299
+ mode: 'strict',
1300
+ typeSymbol: '@khorsheed/dsh-room/types#RoomCancelResult',
1301
+ create: _khorsheed_dsh_room_room_cancel_result$schema,
1302
+ schema: _khorsheed_dsh_room_room_cancel_result$schema(),
1303
+ },
1304
+ sourceLocation: {"file":"packages/room/src/index.ts","line":1051,"column":9},
1305
+ },
1306
+ {
1307
+ id: '@khorsheed/dsh-room#room/closeTask',
1308
+ service: 'room',
1309
+ namespace: 'room',
1310
+ method: 'closeTask',
1311
+ invocation: { kind: 'direct' },
1312
+ parameters: [
1313
+ {
1314
+ name: 'request',
1315
+ wire: 'request',
1316
+ source: 'json',
1317
+ codec: {
1318
+ mode: 'strict',
1319
+ typeSymbol: '@khorsheed/dsh-room/types#RoomCloseTaskRequest',
1320
+ create: _khorsheed_dsh_room_room_closeTask_parameter_0$schema,
1321
+ schema: _khorsheed_dsh_room_room_closeTask_parameter_0$schema(),
1322
+ },
1323
+ },
1324
+ ],
1325
+ result: {
1326
+ mode: 'strict',
1327
+ typeSymbol: '@khorsheed/dsh-room/types#RoomCloseTaskResult',
1328
+ create: _khorsheed_dsh_room_room_closeTask_result$schema,
1329
+ schema: _khorsheed_dsh_room_room_closeTask_result$schema(),
1330
+ },
1331
+ sourceLocation: {"file":"packages/room/src/index.ts","line":974,"column":9},
1332
+ },
1333
+ {
1334
+ id: '@khorsheed/dsh-room#room/confirmRelay',
1335
+ service: 'room',
1336
+ namespace: 'room',
1337
+ method: 'confirmRelay',
1338
+ invocation: { kind: 'direct' },
1339
+ parameters: [
1340
+ {
1341
+ name: 'request',
1342
+ wire: 'request',
1343
+ source: 'json',
1344
+ codec: {
1345
+ mode: 'strict',
1346
+ typeSymbol: '@khorsheed/dsh-room/types#RoomRelayResolveRequest',
1347
+ create: _khorsheed_dsh_room_room_confirmRelay_parameter_0$schema,
1348
+ schema: _khorsheed_dsh_room_room_confirmRelay_parameter_0$schema(),
1349
+ },
1350
+ },
1351
+ ],
1352
+ result: {
1353
+ mode: 'strict',
1354
+ typeSymbol: '@khorsheed/dsh-room/types#RoomRelayResolveResult',
1355
+ create: _khorsheed_dsh_room_room_confirmRelay_result$schema,
1356
+ schema: _khorsheed_dsh_room_room_confirmRelay_result$schema(),
1357
+ },
1358
+ sourceLocation: {"file":"packages/room/src/index.ts","line":903,"column":9},
1359
+ },
1360
+ {
1361
+ id: '@khorsheed/dsh-room#room/dismissRelay',
1362
+ service: 'room',
1363
+ namespace: 'room',
1364
+ method: 'dismissRelay',
1365
+ invocation: { kind: 'direct' },
1366
+ parameters: [
1367
+ {
1368
+ name: 'request',
1369
+ wire: 'request',
1370
+ source: 'json',
1371
+ codec: {
1372
+ mode: 'strict',
1373
+ typeSymbol: '@khorsheed/dsh-room/types#RoomRelayResolveRequest',
1374
+ create: _khorsheed_dsh_room_room_dismissRelay_parameter_0$schema,
1375
+ schema: _khorsheed_dsh_room_room_dismissRelay_parameter_0$schema(),
1376
+ },
1377
+ },
1378
+ ],
1379
+ result: {
1380
+ mode: 'strict',
1381
+ typeSymbol: '@khorsheed/dsh-room/types#RoomRelayResolveResult',
1382
+ create: _khorsheed_dsh_room_room_dismissRelay_result$schema,
1383
+ schema: _khorsheed_dsh_room_room_dismissRelay_result$schema(),
1384
+ },
1385
+ sourceLocation: {"file":"packages/room/src/index.ts","line":926,"column":9},
1386
+ },
1387
+ {
1388
+ id: '@khorsheed/dsh-room#room/getState',
1389
+ service: 'room',
1390
+ namespace: 'room',
1391
+ method: 'getState',
1392
+ invocation: { kind: 'direct' },
1393
+ parameters: [
1394
+ {
1395
+ name: 'request',
1396
+ wire: 'request',
1397
+ source: 'json',
1398
+ codec: {
1399
+ mode: 'strict',
1400
+ typeSymbol: '@khorsheed/dsh-room/types#RoomGetStateRequest',
1401
+ create: _khorsheed_dsh_room_room_getState_parameter_0$schema,
1402
+ schema: _khorsheed_dsh_room_room_getState_parameter_0$schema(),
1403
+ },
1404
+ },
1405
+ ],
1406
+ result: {
1407
+ mode: 'strict',
1408
+ typeSymbol: '@khorsheed/dsh-room/types#RoomGetStateResult',
1409
+ create: _khorsheed_dsh_room_room_getState_result$schema,
1410
+ schema: _khorsheed_dsh_room_room_getState_result$schema(),
1411
+ },
1412
+ sourceLocation: {"file":"packages/room/src/index.ts","line":347,"column":9},
1413
+ },
1414
+ {
1415
+ id: '@khorsheed/dsh-room#room/invite',
1416
+ service: 'room',
1417
+ namespace: 'room',
1418
+ method: 'invite',
1419
+ invocation: { kind: 'direct' },
1420
+ parameters: [
1421
+ {
1422
+ name: 'request',
1423
+ wire: 'request',
1424
+ source: 'json',
1425
+ codec: {
1426
+ mode: 'strict',
1427
+ typeSymbol: '@khorsheed/dsh-room/types#RoomInviteRequest',
1428
+ create: _khorsheed_dsh_room_room_invite_parameter_0$schema,
1429
+ schema: _khorsheed_dsh_room_room_invite_parameter_0$schema(),
1430
+ },
1431
+ },
1432
+ ],
1433
+ result: {
1434
+ mode: 'strict',
1435
+ typeSymbol: '@khorsheed/dsh-room/types#RoomInviteResult',
1436
+ create: _khorsheed_dsh_room_room_invite_result$schema,
1437
+ schema: _khorsheed_dsh_room_room_invite_result$schema(),
1438
+ },
1439
+ sourceLocation: {"file":"packages/room/src/index.ts","line":448,"column":3},
1440
+ },
1441
+ {
1442
+ id: '@khorsheed/dsh-room#room/isRoom',
1443
+ service: 'room',
1444
+ namespace: 'room',
1445
+ method: 'isRoom',
1446
+ invocation: { kind: 'direct' },
1447
+ parameters: [
1448
+ {
1449
+ name: 'request',
1450
+ wire: 'request',
1451
+ source: 'json',
1452
+ codec: {
1453
+ mode: 'strict',
1454
+ typeSymbol: '@khorsheed/dsh-room/types#RoomIsRoomRequest',
1455
+ create: _khorsheed_dsh_room_room_isRoom_parameter_0$schema,
1456
+ schema: _khorsheed_dsh_room_room_isRoom_parameter_0$schema(),
1457
+ },
1458
+ },
1459
+ ],
1460
+ result: {
1461
+ mode: 'strict',
1462
+ typeSymbol: '@khorsheed/dsh-room#room/isRoom:result',
1463
+ create: _khorsheed_dsh_room_room_isRoom_result$schema,
1464
+ schema: _khorsheed_dsh_room_room_isRoom_result$schema(),
1465
+ },
1466
+ sourceLocation: {"file":"packages/room/src/index.ts","line":270,"column":9},
1467
+ },
1468
+ {
1469
+ id: '@khorsheed/dsh-room#room/listProviders',
1470
+ service: 'room',
1471
+ namespace: 'room',
1472
+ method: 'listProviders',
1473
+ invocation: { kind: 'direct' },
1474
+ parameters: [
1475
+ {
1476
+ name: '_request',
1477
+ wire: '_request',
1478
+ source: 'json',
1479
+ codec: {
1480
+ mode: 'strict',
1481
+ typeSymbol: '@khorsheed/dsh-room/types#RoomListProvidersRequest',
1482
+ create: _khorsheed_dsh_room_room_listProviders_parameter_0$schema,
1483
+ schema: _khorsheed_dsh_room_room_listProviders_parameter_0$schema(),
1484
+ },
1485
+ },
1486
+ ],
1487
+ result: {
1488
+ mode: 'strict',
1489
+ typeSymbol: '@khorsheed/dsh-room/types#RoomProviderList',
1490
+ create: _khorsheed_dsh_room_room_listProviders_result$schema,
1491
+ schema: _khorsheed_dsh_room_room_listProviders_result$schema(),
1492
+ },
1493
+ sourceLocation: {"file":"packages/room/src/index.ts","line":319,"column":9},
1494
+ },
1495
+ {
1496
+ id: '@khorsheed/dsh-room#room/planCommand',
1497
+ service: 'room',
1498
+ namespace: 'room',
1499
+ method: 'planCommand',
1500
+ invocation: { kind: 'direct' },
1501
+ parameters: [
1502
+ {
1503
+ name: 'request',
1504
+ wire: 'request',
1505
+ source: 'json',
1506
+ codec: {
1507
+ mode: 'strict',
1508
+ typeSymbol: '@khorsheed/dsh-room#room/planCommand:request',
1509
+ create: _khorsheed_dsh_room_room_planCommand_parameter_0$schema,
1510
+ schema: _khorsheed_dsh_room_room_planCommand_parameter_0$schema(),
1511
+ },
1512
+ },
1513
+ ],
1514
+ result: {
1515
+ mode: 'strict',
1516
+ typeSymbol: '@khorsheed/dsh-room#room/planCommand:result',
1517
+ create: _khorsheed_dsh_room_room_planCommand_result$schema,
1518
+ schema: _khorsheed_dsh_room_room_planCommand_result$schema(),
1519
+ },
1520
+ sourceLocation: {"file":"packages/room/src/index.ts","line":787,"column":9},
1521
+ },
1522
+ {
1523
+ id: '@khorsheed/dsh-room#room/postMessage',
1524
+ service: 'room',
1525
+ namespace: 'room',
1526
+ method: 'postMessage',
1527
+ invocation: { kind: 'direct' },
1528
+ parameters: [
1529
+ {
1530
+ name: 'request',
1531
+ wire: 'request',
1532
+ source: 'json',
1533
+ codec: {
1534
+ mode: 'strict',
1535
+ typeSymbol: '@khorsheed/dsh-room/types#RoomPostMessageRequest',
1536
+ create: _khorsheed_dsh_room_room_postMessage_parameter_0$schema,
1537
+ schema: _khorsheed_dsh_room_room_postMessage_parameter_0$schema(),
1538
+ },
1539
+ },
1540
+ ],
1541
+ result: {
1542
+ mode: 'strict',
1543
+ typeSymbol: '@khorsheed/dsh-room/types#RoomPostMessageResult',
1544
+ create: _khorsheed_dsh_room_room_postMessage_result$schema,
1545
+ schema: _khorsheed_dsh_room_room_postMessage_result$schema(),
1546
+ },
1547
+ sourceLocation: {"file":"packages/room/src/index.ts","line":666,"column":9},
1548
+ },
1549
+ {
1550
+ id: '@khorsheed/dsh-room#room/prepareMember',
1551
+ service: 'room',
1552
+ namespace: 'room',
1553
+ method: 'prepareMember',
1554
+ invocation: { kind: 'direct' },
1555
+ parameters: [
1556
+ {
1557
+ name: 'request',
1558
+ wire: 'request',
1559
+ source: 'json',
1560
+ codec: {
1561
+ mode: 'strict',
1562
+ typeSymbol: '@khorsheed/dsh-room/types#RoomPrepareMemberRequest',
1563
+ create: _khorsheed_dsh_room_room_prepareMember_parameter_0$schema,
1564
+ schema: _khorsheed_dsh_room_room_prepareMember_parameter_0$schema(),
1565
+ },
1566
+ },
1567
+ ],
1568
+ result: {
1569
+ mode: 'strict',
1570
+ typeSymbol: '@khorsheed/dsh-room/types#RoomPrepareMemberResult',
1571
+ create: _khorsheed_dsh_room_room_prepareMember_result$schema,
1572
+ schema: _khorsheed_dsh_room_room_prepareMember_result$schema(),
1573
+ },
1574
+ sourceLocation: {"file":"packages/room/src/index.ts","line":516,"column":9},
1575
+ },
1576
+ {
1577
+ id: '@khorsheed/dsh-room#room/reconcileDelivery',
1578
+ service: 'room',
1579
+ namespace: 'room',
1580
+ method: 'reconcileDelivery',
1581
+ invocation: { kind: 'direct' },
1582
+ parameters: [
1583
+ {
1584
+ name: 'request',
1585
+ wire: 'request',
1586
+ source: 'json',
1587
+ codec: {
1588
+ mode: 'strict',
1589
+ typeSymbol: '@khorsheed/dsh-room/types#RoomReconcileDeliveryRequest',
1590
+ create: _khorsheed_dsh_room_room_reconcileDelivery_parameter_0$schema,
1591
+ schema: _khorsheed_dsh_room_room_reconcileDelivery_parameter_0$schema(),
1592
+ },
1593
+ },
1594
+ ],
1595
+ result: {
1596
+ mode: 'strict',
1597
+ typeSymbol: '@khorsheed/dsh-room/types#RoomReconcileDeliveryResult',
1598
+ create: _khorsheed_dsh_room_room_reconcileDelivery_result$schema,
1599
+ schema: _khorsheed_dsh_room_room_reconcileDelivery_result$schema(),
1600
+ },
1601
+ sourceLocation: {"file":"packages/room/src/index.ts","line":542,"column":9},
1602
+ },
1603
+ {
1604
+ id: '@khorsheed/dsh-room#room/removeMember',
1605
+ service: 'room',
1606
+ namespace: 'room',
1607
+ method: 'removeMember',
1608
+ invocation: { kind: 'direct' },
1609
+ parameters: [
1610
+ {
1611
+ name: 'request',
1612
+ wire: 'request',
1613
+ source: 'json',
1614
+ codec: {
1615
+ mode: 'strict',
1616
+ typeSymbol: '@khorsheed/dsh-room/types#RoomRemoveMemberRequest',
1617
+ create: _khorsheed_dsh_room_room_removeMember_parameter_0$schema,
1618
+ schema: _khorsheed_dsh_room_room_removeMember_parameter_0$schema(),
1619
+ },
1620
+ },
1621
+ ],
1622
+ result: {
1623
+ mode: 'strict',
1624
+ typeSymbol: '@khorsheed/dsh-room/types#RoomRemoveMemberResult',
1625
+ create: _khorsheed_dsh_room_room_removeMember_result$schema,
1626
+ schema: _khorsheed_dsh_room_room_removeMember_result$schema(),
1627
+ },
1628
+ sourceLocation: {"file":"packages/room/src/index.ts","line":629,"column":9},
1629
+ },
1630
+ {
1631
+ id: '@khorsheed/dsh-room#room/setCoordinator',
1632
+ service: 'room',
1633
+ namespace: 'room',
1634
+ method: 'setCoordinator',
1635
+ invocation: { kind: 'direct' },
1636
+ parameters: [
1637
+ {
1638
+ name: 'request',
1639
+ wire: 'request',
1640
+ source: 'json',
1641
+ codec: {
1642
+ mode: 'strict',
1643
+ typeSymbol: '@khorsheed/dsh-room/types#RoomSetCoordinatorRequest',
1644
+ create: _khorsheed_dsh_room_room_setCoordinator_parameter_0$schema,
1645
+ schema: _khorsheed_dsh_room_room_setCoordinator_parameter_0$schema(),
1646
+ },
1647
+ },
1648
+ ],
1649
+ result: {
1650
+ mode: 'strict',
1651
+ typeSymbol: '@khorsheed/dsh-room/types#RoomSetCoordinatorResult',
1652
+ create: _khorsheed_dsh_room_room_setCoordinator_result$schema,
1653
+ schema: _khorsheed_dsh_room_room_setCoordinator_result$schema(),
1654
+ },
1655
+ sourceLocation: {"file":"packages/room/src/index.ts","line":559,"column":9},
1656
+ },
1657
+ {
1658
+ id: '@khorsheed/dsh-room#room/setGoal',
1659
+ service: 'room',
1660
+ namespace: 'room',
1661
+ method: 'setGoal',
1662
+ invocation: { kind: 'direct' },
1663
+ parameters: [
1664
+ {
1665
+ name: 'request',
1666
+ wire: 'request',
1667
+ source: 'json',
1668
+ codec: {
1669
+ mode: 'strict',
1670
+ typeSymbol: '@khorsheed/dsh-room/types#RoomSetGoalRequest',
1671
+ create: _khorsheed_dsh_room_room_setGoal_parameter_0$schema,
1672
+ schema: _khorsheed_dsh_room_room_setGoal_parameter_0$schema(),
1673
+ },
1674
+ },
1675
+ ],
1676
+ result: {
1677
+ mode: 'strict',
1678
+ typeSymbol: '@khorsheed/dsh-room/types#RoomSetGoalResult',
1679
+ create: _khorsheed_dsh_room_room_setGoal_result$schema,
1680
+ schema: _khorsheed_dsh_room_room_setGoal_result$schema(),
1681
+ },
1682
+ sourceLocation: {"file":"packages/room/src/index.ts","line":1032,"column":9},
1683
+ },
1684
+ {
1685
+ id: '@khorsheed/dsh-room#room/updateMember',
1686
+ service: 'room',
1687
+ namespace: 'room',
1688
+ method: 'updateMember',
1689
+ invocation: { kind: 'direct' },
1690
+ parameters: [
1691
+ {
1692
+ name: 'request',
1693
+ wire: 'request',
1694
+ source: 'json',
1695
+ codec: {
1696
+ mode: 'strict',
1697
+ typeSymbol: '@khorsheed/dsh-room/types#RoomUpdateMemberRequest',
1698
+ create: _khorsheed_dsh_room_room_updateMember_parameter_0$schema,
1699
+ schema: _khorsheed_dsh_room_room_updateMember_parameter_0$schema(),
1700
+ },
1701
+ },
1702
+ ],
1703
+ result: {
1704
+ mode: 'strict',
1705
+ typeSymbol: '@khorsheed/dsh-room/types#RoomUpdateMemberResult',
1706
+ create: _khorsheed_dsh_room_room_updateMember_result$schema,
1707
+ schema: _khorsheed_dsh_room_room_updateMember_result$schema(),
1708
+ },
1709
+ sourceLocation: {"file":"packages/room/src/index.ts","line":471,"column":9},
1710
+ },
1711
+ ],
1712
+ model: {
1713
+ "services": [
1714
+ {
1715
+ "description": "room Remote service: promotion, roster management, the human",
1716
+ "summary": "room Remote service: promotion, roster management, the human",
1717
+ "tags": [
1718
+ {
1719
+ "name": "",
1720
+ "comment": "-message intake, the notification gate, the task board, and run cancellation. A room IS a normal session; the journal is its only state. A room is never CREATED apart from a session — inviting an agent into any session promotes it (see ensureRoom; the room-session-promotion proposal).",
1721
+ "text": "@-message\n * intake, the notification gate, the task board, and run cancellation. A\n * room IS a normal session; the journal is its only state. A room is never\n * CREATED apart from a session — inviting an agent into any session promotes\n * it (see ensureRoom; the room-session-promotion proposal)."
1722
+ }
1723
+ ],
1724
+ "jsDoc": "/**\n * room Remote service: promotion, roster management, the human @-message\n * intake, the notification gate, the task board, and run cancellation. A\n * room IS a normal session; the journal is its only state. A room is never\n * CREATED apart from a session — inviting an agent into any session promotes\n * it (see ensureRoom; the room-session-promotion proposal).\n */",
1725
+ "key": "room",
1726
+ "exportName": "RoomService",
1727
+ "members": [
1728
+ {
1729
+ "kind": "property",
1730
+ "name": "plans",
1731
+ "signature": "readonly plans: PlanService",
1732
+ "summary": "The dispatch engine executing this service's dispatch records.",
1733
+ "jsDoc": "/** The dispatch engine executing this service's dispatch records. */"
1734
+ },
1735
+ {
1736
+ "kind": "property",
1737
+ "name": "engine",
1738
+ "signature": "readonly engine: DispatchEngine"
1739
+ },
1740
+ {
1741
+ "kind": "method",
1742
+ "name": "isRoom",
1743
+ "signature": "@Remote('isRoom') async isRoom(request: RoomIsRoomRequest): Promise<boolean>",
1744
+ "summary": "Probe whether a session is a room: replay its event log looking for the `room/created` marker.",
1745
+ "jsDoc": "/**\n * Probe whether a session is a room: replay its event log looking for the\n * `room/created` marker. Side-effect-free: a cold session answers from a\n * persistence inspection, so opening any session never resumes its agent.\n * @param request - session identity.\n * @returns true when the session carries the marker (false for unknown sessions too).\n */"
1746
+ },
1747
+ {
1748
+ "kind": "method",
1749
+ "name": "ensureRoom",
1750
+ "signature": "async ensureRoom(sessionId: SessionId): Promise<RoomLoad>",
1751
+ "summary": "Resolve a session for a room WRITE, promoting it when it isn't a room yet: a live plain session gains the `room/created` identity marker and the main agent's roster seat (the promotion IS the entry model — the room-session-promotion proposal: any session an agent is invited into becomes a room).",
1752
+ "jsDoc": "/**\n * Resolve a session for a room WRITE, promoting it when it isn't a room\n * yet: a live plain session gains the `room/created` identity marker and\n * the main agent's roster seat (the promotion IS the entry model — the\n * room-session-promotion proposal: any session an agent is invited into\n * becomes a room). Idempotent — an existing room passes through untouched,\n * and concurrent promotions converge on the log (the first `room/created`\n * wins identity). A cold EXISTING room resumes through the normal path;\n * a cold PLAIN session cannot be promoted sight-unseen (promotion writes\n * on the live session, and the surfaces that promote — the open session's\n * invite dialog, the room tools running in their own session — always hold\n * it live), so it answers `not-a-room`. NOT a Remote — the surfaces reach\n * it through the write paths (invite/messageMember); public so tests and a\n * future manual \"promote\" surface share the one entry.\n * @param sessionId - the session to write.\n * @returns the live session plus replayed state, or the rejection.\n */"
1753
+ },
1754
+ {
1755
+ "kind": "method",
1756
+ "name": "listProviders",
1757
+ "signature": "@Remote('listProviders') async listProviders(_request: RoomListProvidersRequest): Promise<RoomProviderList>",
1758
+ "summary": "List the invitable CLI providers: the local-agent roster with each harness's auth state, plus the delegation-facade verdict (absent facade = CLI members undispatchable; the dialog greys the section instead of failing).",
1759
+ "jsDoc": "/**\n * List the invitable CLI providers: the local-agent roster with each\n * harness's auth state, plus the delegation-facade verdict (absent facade =\n * CLI members undispatchable; the dialog greys the section instead of\n * failing). Harnesses without a delegation provider are record-only and\n * are not invitable.\n * @param _request - no parameters.\n * @returns the provider list and the facade verdict.\n */"
1760
+ },
1761
+ {
1762
+ "kind": "method",
1763
+ "name": "getState",
1764
+ "signature": "@Remote('getState') async getState(request: RoomGetStateRequest): Promise<RoomGetStateResult>",
1765
+ "summary": "Replay the room's journal into the derived state (roster, notification relays, task board, run states).",
1766
+ "jsDoc": "/**\n * Replay the room's journal into the derived state (roster, notification\n * relays, task board, run states).\n * @param request - room session identity.\n * @returns the replayed state, or a rejection from the closed failure union.\n */"
1767
+ },
1768
+ {
1769
+ "kind": "method",
1770
+ "name": "inviteMember",
1771
+ "signature": "async inviteMember(request: RoomInviteRequest, invitedBy: 'human' | 'agent', actorChildSessionId?: string): Promise<RoomInviteResult>",
1772
+ "summary": "Validate, PROMOTE (a plain session becomes a room — see ensureRoom), and journal an invitation: the name must be parseable by the composer",
1773
+ "jsDoc": "/**\n * Validate, PROMOTE (a plain session becomes a room — see ensureRoom), and\n * journal an invitation: the name must be parseable by the\n * composer @-grammar and unique, the provider non-blank AND a registered\n * delegation provider (the classic slip is the harness name `kimi` where\n * the family registered `kimi-cli` — validated against the roster's\n * `delegationProvider` set, the same probe listProviders serves; a roster-\n * less core skips the check, degrading to the old accept-anything), and\n * (CLI members are undispatchable without it) the local-agent facade must\n * be probed. A first task is journaled as a `room/dispatch` (auto-opening\n * the member's in_progress task) and handed to the engine immediately —\n * the receipt's `pendingFirstTask` means \"dispatched\". Shared by the\n * Remote surface (`invitedBy: 'human'`) and the room_invite tool\n * (`invitedBy: 'agent'`).\n * @param request - room session, provider, name, optional cwd, instructions and first task.\n * @param invitedBy - the invitation's origin.\n * @returns the invitation receipt, or a rejection.\n */"
1774
+ },
1775
+ {
1776
+ "kind": "method",
1777
+ "name": "invite",
1778
+ "signature": "@Remote('invite') invite(request: RoomInviteRequest): Promise<RoomInviteResult>",
1779
+ "summary": "Invite a CLI member (the human path; see inviteMember).",
1780
+ "jsDoc": "/**\n * Invite a CLI member (the human path; see inviteMember).\n * @param request - room session, provider, name, optional cwd, instructions and first task.\n * @returns the invitation receipt, or a rejection.\n */"
1781
+ },
1782
+ {
1783
+ "kind": "method",
1784
+ "name": "updateMember",
1785
+ "signature": "@Remote('updateMember') async updateMember(request: RoomUpdateMemberRequest): Promise<RoomUpdateMemberResult>",
1786
+ "summary": "Update a member's editable fields: rename (validated like an invite name — unique, parseable; the main agent is the room itself and cannot be renamed), role instructions (null or a blank text CLEARS them — later dispatches inject none), the member-level cwd override (null or a blank text clears back to inheriting the room cwd; still roster-recorded only — the delegation facade's per-call cwd override is the family's open R2), and the intended model (null or a blank text clears it back to the harness default; roster-recorded intent — the first dispatch binds it as the facade start's `model` option, and the live member's immediate switch is the client's localAgentGateway `setMemberModel` call, not this one).",
1787
+ "jsDoc": "/**\n * Update a member's editable fields: rename (validated like an invite name —\n * unique, parseable; the main agent is the room itself and cannot be\n * renamed), role instructions (null or a blank text CLEARS them — later\n * dispatches inject none), the member-level cwd override (null or a\n * blank text clears back to inheriting the room cwd; still roster-recorded\n * only — the delegation facade's per-call cwd override is the family's open\n * R2), and the intended model (null or a blank text clears it back to the\n * harness default; roster-recorded intent — the first dispatch binds it as\n * the facade start's `model` option, and the live member's immediate switch\n * is the client's localAgentGateway `setMemberModel` call, not this one).\n * An instructions edit rides the member's next dispatch as a context\n * update (the CLI session itself is never rewritten); a rename migrates\n * every name-keyed projection at replay (the journal fold moves the roster\n * key, tasks' member/blockedBy, relays' from/to, and the runs key).\n * @param request - room session, member name, and the fields to change.\n * @returns the update receipt (the CURRENT name), or a rejection.\n */"
1788
+ },
1789
+ {
1790
+ "kind": "method",
1791
+ "name": "prepareMember",
1792
+ "signature": "@Remote('prepareMember') async prepareMember(request: RoomPrepareMemberRequest): Promise<RoomPrepareMemberResult>",
1793
+ "summary": "Native preparation creates no unrelated conversation turn and leaves the role unchanged.",
1794
+ "jsDoc": "/** Native preparation creates no unrelated conversation turn and leaves the role unchanged. */"
1795
+ },
1796
+ {
1797
+ "kind": "method",
1798
+ "name": "reconcileDelivery",
1799
+ "signature": "@Remote('reconcileDelivery') async reconcileDelivery(request: RoomReconcileDeliveryRequest): Promise<RoomReconcileDeliveryResult>",
1800
+ "summary": "A human records the known result before releasing a crashed member's queued work.",
1801
+ "jsDoc": "/** A human records the known result before releasing a crashed member's queued work. */"
1802
+ },
1803
+ {
1804
+ "kind": "method",
1805
+ "name": "setCoordinator",
1806
+ "signature": "@Remote('setCoordinator') async setCoordinator(request: RoomSetCoordinatorRequest): Promise<RoomSetCoordinatorResult>",
1807
+ "summary": "Explicit human role change; state is committed only after readiness and idle checks.",
1808
+ "jsDoc": "/** Explicit human role change; state is committed only after readiness and idle checks. */"
1809
+ },
1810
+ {
1811
+ "kind": "method",
1812
+ "name": "removeMember",
1813
+ "signature": "@Remote('removeMember') async removeMember(request: RoomRemoveMemberRequest): Promise<RoomRemoveMemberResult>",
1814
+ "summary": "Remove a member from the roster.",
1815
+ "jsDoc": "/**\n * Remove a member from the roster. An in-flight run is NOT interrupted\n * here — cancel() first when the member is running.\n * @param request - room session, member name.\n * @returns the removal receipt, or a rejection.\n */"
1816
+ },
1817
+ {
1818
+ "kind": "method",
1819
+ "name": "postMessage",
1820
+ "signature": "@Remote('postMessage') async postMessage(request: RoomPostMessageRequest): Promise<RoomPostMessageResult>",
1821
+ "summary": "Post a human",
1822
+ "jsDoc": "/**\n * Post a human @-message into the room: leading `@name` tokens address\n * members, and so does the request's `targets` list (the composer's\n * mention-menu picks — explicit addressing wherever the `@name` sits); the\n * two union before the roster check (a `room/dispatch` journal record,\n * executed by the engine, and one auto-opened in_progress task per target).\n * The human's raw text is\n * FIRST appended as a standard `user/message` (source kind 'user' — the\n * human typed it; the official messageDefinition classifies any other kind\n * as a collapsed context-injection row, not the user bubble), so the words\n * render as the official user bubble and enter the main agent's\n * model-visible history. The append wakes nothing: turns start from\n * prompt/followup calls, never from log appends (the agent is the log's\n * writer, not a watcher). The `room/dispatch` record stays as pure\n * bookkeeping (task board, dispatch cursors, replay) — it no longer drives\n * any chat node. A BARE message is a structured `no-targets` rejection —\n * defense only: the room composer releases bare messages to the official\n * submit path (a normal main-agent turn) and never calls this Remote\n * without addressing.\n * @param request - room session, raw composer text, and the menu-picked addressees.\n * @returns the parse receipt, or a rejection.\n */"
1823
+ },
1824
+ {
1825
+ "kind": "method",
1826
+ "name": "messageMember",
1827
+ "signature": "async messageMember(request: RoomMessageRequest, actorChildSessionId?: string): Promise<RoomMessageResult>",
1828
+ "summary": "Dispatch one message to one member (host-only — the `room_message` tool's path; the model-facing equivalent of the human's `@member text`).",
1829
+ "jsDoc": "/**\n * Dispatch one message to one member (host-only — the `room_message` tool's\n * path; the model-facing equivalent of the human's `@member text`). Same\n * dispatch internals as postMessage minus the user/message bubble: the\n * caller is the room's own main agent, so the text must NOT wear the human\n * bubble (source kind 'user' would misattribute it). The dispatch record\n * and the auto-opened in_progress task journal as usual.\n * @param request - room session, addressee, text.\n * @returns the dispatch receipt, or a rejection.\n */"
1830
+ },
1831
+ {
1832
+ "kind": "method",
1833
+ "name": "readRoomContext",
1834
+ "signature": "async readRoomContext(sessionId: string): Promise<string>",
1835
+ "summary": "Bounded shared room context for native and external model tools; reading never wakes an agent.",
1836
+ "jsDoc": "/** Bounded shared room context for native and external model tools; reading never wakes an agent. */"
1837
+ },
1838
+ {
1839
+ "kind": "method",
1840
+ "name": "planCommand",
1841
+ "signature": "@Remote('planCommand') async planCommand(request: { sessionId: SessionId; command: string }): Promise<{ ok: true } | { ok: false; message: string }>",
1842
+ "summary": "Human UI and native/external tools share the same durable transition service.",
1843
+ "jsDoc": "/** Human UI and native/external tools share the same durable transition service. */"
1844
+ },
1845
+ {
1846
+ "kind": "method",
1847
+ "name": "commandPlan",
1848
+ "signature": "async commandPlan(sessionId: string, command: string, actorChildSessionId?: string): Promise<string>",
1849
+ "summary": "The actor is derived from the calling native agent or authenticated bridge.",
1850
+ "jsDoc": "/** The actor is derived from the calling native agent or authenticated bridge. */"
1851
+ },
1852
+ {
1853
+ "kind": "method",
1854
+ "name": "receiveMemberCommand",
1855
+ "signature": "async receiveMemberCommand(actor: LocalAgentMemberRun, command: MemberRoomCommand): Promise<MemberMessageOutcome>",
1856
+ "summary": "Shared backend for external MCP room tools.",
1857
+ "jsDoc": "/** Shared backend for external MCP room tools. Not exposed as a browser Remote. */"
1858
+ },
1859
+ {
1860
+ "kind": "method",
1861
+ "name": "receiveMemberMessage",
1862
+ "signature": "async receiveMemberMessage(request: RoomMemberMessage): Promise<RoomMemberMessageReceipt>",
1863
+ "summary": "The notification gate entry, verbatim-frozen contract for the local-agent family bridge (`ctx.get('room')` + duck-typed call).",
1864
+ "jsDoc": "/**\n * The notification gate entry, verbatim-frozen contract for the local-agent\n * family bridge (`ctx.get('room')` + duck-typed call). The call crosses an\n * untyped package boundary, so the message shape is validated at runtime:\n * a malformed message throws (the bridge treats a rejection as \"room does\n * not claim this\" and delivers directly) instead of poisoning the journal.\n * `from`/`to` arrive as roster names OR member child session ids (the\n * bridge cannot speak names for the sender — only room owns the roster);\n * both are normalized to roster names when resolvable, so the pending card\n * and the delivery text (`{from} 给你的通知: …`) read as names. Phase 1's\n * gate is ALWAYS human confirmation: the relay is journaled pending and\n * the sender receives 'pending-confirm' (never 'sent' — the bridge keeps\n * the member's conclusion honest). A non-room parent session throws.\n * @param request - sender, recipient, content, the shared parent session, provenance.\n * @returns the gate receipt.\n */"
1865
+ },
1866
+ {
1867
+ "kind": "method",
1868
+ "name": "confirmRelay",
1869
+ "signature": "@Remote('confirmRelay') async confirmRelay(request: RoomRelayResolveRequest): Promise<RoomRelayResolveResult>",
1870
+ "summary": "Confirm a pending relay: journal the confirmed edge and dispatch the notification to the recipient as a continuation (`{from} 给你的通知: {content}`); the engine marks the relay sent once the recipient's own session receives the prompt.",
1871
+ "jsDoc": "/**\n * Confirm a pending relay: journal the confirmed edge and dispatch the\n * notification to the recipient as a continuation (`{from} 给你的通知:\n * {content}`); the engine marks the relay sent once the recipient's own\n * session receives the prompt.\n * @param request - room session, relay id.\n * @returns the resolution receipt, or a rejection.\n */"
1872
+ },
1873
+ {
1874
+ "kind": "method",
1875
+ "name": "dismissRelay",
1876
+ "signature": "@Remote('dismissRelay') async dismissRelay(request: RoomRelayResolveRequest): Promise<RoomRelayResolveResult>",
1877
+ "summary": "Dismiss a pending relay: the notification never reaches anyone.",
1878
+ "jsDoc": "/**\n * Dismiss a pending relay: the notification never reaches anyone.\n * @param request - room session, relay id.\n * @returns the resolution receipt, or a rejection.\n */"
1879
+ },
1880
+ {
1881
+ "kind": "method",
1882
+ "name": "addTask",
1883
+ "signature": "@Remote('addTask') async addTask(request: RoomAddTaskRequest): Promise<RoomAddTaskResult>",
1884
+ "summary": "Add a task to a member's board lane (the human's management entry;",
1885
+ "jsDoc": "/**\n * Add a task to a member's board lane (the human's management entry; @-\n * dispatches auto-open in_progress tasks, this opens a pending one).\n * `blockedBy` names the member the task waits on (display only — it never\n * dispatches anything); it must resolve against the roster.\n * @param request - room session, member, title, optional blockedBy.\n * @returns the new task's id, or a rejection.\n */"
1886
+ },
1887
+ {
1888
+ "kind": "method",
1889
+ "name": "closeTask",
1890
+ "signature": "@Remote('closeTask') async closeTask(request: RoomCloseTaskRequest): Promise<RoomCloseTaskResult>",
1891
+ "summary": "Close an open task (done by default, or cancelled).",
1892
+ "jsDoc": "/**\n * Close an open task (done by default, or cancelled). A failed task is\n * still open for closing — that is the human's dismiss path after a\n * failed run (the board's [关闭] passes 'cancelled').\n * @param request - room session, task id, optional closing status.\n * @returns the closed task's id, or a rejection.\n */"
1893
+ },
1894
+ {
1895
+ "kind": "method",
1896
+ "name": "updateTask",
1897
+ "signature": "async updateTask(request: RoomUpdateTaskRequest): Promise<RoomUpdateTaskResult>",
1898
+ "summary": "Edit an open task's title and/or blockedBy (the `room_task` tool's update action; journaled as `room/task-edited`, status changes stay on closeTask).",
1899
+ "jsDoc": "/**\n * Edit an open task's title and/or blockedBy (the `room_task` tool's update\n * action; journaled as `room/task-edited`, status changes stay on\n * closeTask). Host method only — the capsule UI edits nothing but the goal.\n * `blockedBy: null` clears the wait; a string must resolve against the\n * roster. A closed task takes no edits.\n * @param request - room session, task id, and at least one edited field.\n * @returns the edited task's id, or a rejection.\n */"
1900
+ },
1901
+ {
1902
+ "kind": "method",
1903
+ "name": "setGoal",
1904
+ "signature": "@Remote('setGoal') async setGoal(request: RoomSetGoalRequest): Promise<RoomSetGoalResult>",
1905
+ "summary": "Set (or, with a blank text, clear) the room's goal.",
1906
+ "jsDoc": "/**\n * Set (or, with a blank text, clear) the room's goal. The goal is one\n * journaled line — the latest `room/goal` event wins; it rides the top of\n * the roster section in every member prompt and drives the dock's goal\n * capsule. Pure display/coordination text: it never dispatches anything.\n * @param request - room session and goal text.\n * @returns the now-current goal (absent after a clear), or a rejection.\n */"
1907
+ },
1908
+ {
1909
+ "kind": "method",
1910
+ "name": "cancel",
1911
+ "signature": "@Remote('cancel') async cancel(request: RoomCancelRequest): Promise<RoomCancelResult>",
1912
+ "summary": "Cancel a member's in-flight run through the local-agent facade.",
1913
+ "jsDoc": "/**\n * Cancel a member's in-flight run through the local-agent facade. A hit\n * journals the terminal `cancelled` edge immediately (the engine's own\n * settle for that run then no-ops); a miss — no facade, no delegation\n * handle, or nothing in flight — journals nothing and reports\n * `cancelled: false`.\n * @param request - room session, member name.\n * @returns the cancellation receipt, or a rejection.\n */"
1914
+ }
1915
+ ],
1916
+ "types": [
1917
+ {
1918
+ "name": "AgentCancelCause",
1919
+ "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
1920
+ },
1921
+ {
1922
+ "name": "AgentMessageSource",
1923
+ "declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
1924
+ },
1925
+ {
1926
+ "name": "ApprovalOutcome",
1927
+ "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
1928
+ },
1929
+ {
1930
+ "name": "ApprovalPolicy",
1931
+ "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
1932
+ },
1933
+ {
1934
+ "name": "ApprovalRequestId",
1935
+ "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
1936
+ },
1937
+ {
1938
+ "name": "AssistantMessage",
1939
+ "declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
1940
+ },
1941
+ {
1942
+ "name": "AssistantProviderMetadata",
1943
+ "declaration": "export interface AssistantProviderMetadata {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
1944
+ },
1945
+ {
1946
+ "name": "AssistantStreamRecord",
1947
+ "declaration": "export type AssistantStreamRecord = { readonly type: 'text-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'reasoning-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'tool-call-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly id: ToolCallId; readonly name?: string; readonly args: readonly string[]; } | { readonly type: 'chunk'; readonly time: number; readonly chunk: StreamChunk; };"
1948
+ },
1949
+ {
1950
+ "name": "AttachmentId",
1951
+ "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
1952
+ },
1953
+ {
1954
+ "name": "Branded",
1955
+ "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
1956
+ },
1957
+ {
1958
+ "name": "BrandedNumber",
1959
+ "declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
1960
+ },
1961
+ {
1962
+ "name": "CommandId",
1963
+ "declaration": "export type CommandId = Branded<'CommandId'>;"
1964
+ },
1965
+ {
1966
+ "name": "CommandSource",
1967
+ "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
1968
+ },
1969
+ {
1970
+ "name": "CommandSourceMap",
1971
+ "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
1972
+ },
1973
+ {
1974
+ "name": "ContentBlock",
1975
+ "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
1976
+ },
1977
+ {
1978
+ "name": "ContentBlockMap",
1979
+ "declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-addition': ToolAdditionBlock;\n 'tool-removal': ToolRemovalBlock;\n}"
1980
+ },
1981
+ {
1982
+ "name": "ContentBlockType",
1983
+ "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
1984
+ },
1985
+ {
1986
+ "name": "ContextFormed",
1987
+ "declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
1988
+ },
1989
+ {
1990
+ "name": "ContextSnapshotSection",
1991
+ "declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
1992
+ },
1993
+ {
1994
+ "name": "ContinuableSubagentDescriptorData",
1995
+ "declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'continuable';\n readonly label: string;\n readonly agentProvider?: string;\n readonly agentModel?: string;\n readonly agentReasoningEffort?: ReasoningEffortId;\n readonly persona?: string;\n readonly toolFilter?: ToolRestriction;\n}"
1996
+ },
1997
+ {
1998
+ "name": "DeveloperMessage",
1999
+ "declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
2000
+ },
2001
+ {
2002
+ "name": "DispatchEngine",
2003
+ "declaration": "export class DispatchEngine {\n hasPending(room: Session, memberName: string): boolean;\n dispatch(room: Session, memberName: string, text: string, options: DispatchOptions = {}): void;\n idle(): Promise<void>;\n view(sessionId: string, state: RoomState): RoomState;\n recover(room: Session): Promise<void>;\n}"
2004
+ },
2005
+ {
2006
+ "name": "DispatchOptions",
2007
+ "declaration": "export interface DispatchOptions {\n readonly dispatchSeq?: number;\n readonly targetId?: string;\n readonly relayIds?: readonly string[];\n}"
2008
+ },
2009
+ {
2010
+ "name": "EpochHeader",
2011
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
2012
+ },
2013
+ {
2014
+ "name": "FileAttachmentRef",
2015
+ "declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
2016
+ },
2017
+ {
2018
+ "name": "FileBlock",
2019
+ "declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
2020
+ },
2021
+ {
2022
+ "name": "FinishReason",
2023
+ "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
2024
+ },
2025
+ {
2026
+ "name": "FinishReasonMap",
2027
+ "declaration": "export interface FinishReasonMap {\n stop: { kind: 'stop'; };\n 'tool-calls': { kind: 'tool-calls'; };\n 'max-tokens': { kind: 'max-tokens'; };\n aborted: { kind: 'aborted'; failure: LlmFailure; };\n error: { kind: 'error'; failure: LlmFailure; };\n}"
2028
+ },
2029
+ {
2030
+ "name": "ImageAttachmentRef",
2031
+ "declaration": "export interface ImageAttachmentRef {\n attachmentId: AttachmentId;\n mediaType: ImageMediaType;\n bytes: number;\n width: number;\n height: number;\n name?: string;\n originalDimensions?: { width: number; height: number; };\n}"
2032
+ },
2033
+ {
2034
+ "name": "ImageBlock",
2035
+ "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n offloaded?: true;\n}"
2036
+ },
2037
+ {
2038
+ "name": "ImageMediaType",
2039
+ "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
2040
+ },
2041
+ {
2042
+ "name": "ImageOffloadTarget",
2043
+ "declaration": "export interface ImageOffloadTarget {\n seq: SessionSeq;\n imageIndexes: number[];\n}"
2044
+ },
2045
+ {
2046
+ "name": "InboxTarget",
2047
+ "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
2048
+ },
2049
+ {
2050
+ "name": "JsonValue",
2051
+ "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
2052
+ },
2053
+ {
2054
+ "name": "KnownCatalogMode",
2055
+ "declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
2056
+ },
2057
+ {
2058
+ "name": "LlmCallConfig",
2059
+ "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
2060
+ },
2061
+ {
2062
+ "name": "LlmCallConfigAdapterDefaults",
2063
+ "declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
2064
+ },
2065
+ {
2066
+ "name": "LlmFailure",
2067
+ "declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
2068
+ },
2069
+ {
2070
+ "name": "LocalAgentMemberRun",
2071
+ "declaration": "export interface LocalAgentMemberRun {\n childSessionId: string;\n parentSessionId: string;\n provider: string;\n}"
2072
+ },
2073
+ {
2074
+ "name": "LocalAgentStreamCheckpoint",
2075
+ "declaration": "export interface LocalAgentStreamCheckpoint extends Omit<LocalAgentStreamItem, 'revision'> {\n sessionId: string;\n opening?: boolean;\n closed?: boolean;\n append: boolean;\n}"
2076
+ },
2077
+ {
2078
+ "name": "LocalAgentStreamItem",
2079
+ "declaration": "export interface LocalAgentStreamItem {\n id: string;\n turn: number;\n step: number;\n kind: 'think' | 'text';\n text: string;\n revision: number;\n receivedAt: number;\n}"
2080
+ },
2081
+ {
2082
+ "name": "MemberMessageOutcome",
2083
+ "declaration": "export type MemberMessageOutcome = { readonly ok: true; readonly receipt: string; } | { readonly ok: false; readonly error: string; };"
2084
+ },
2085
+ {
2086
+ "name": "MemberRoomCommand",
2087
+ "declaration": "export interface MemberRoomCommand {\n name: MemberRoomCommandName;\n arguments: Record<string, unknown>;\n}"
2088
+ },
2089
+ {
2090
+ "name": "MemberRoomCommandName",
2091
+ "declaration": "export type MemberRoomCommandName = 'room_plan' | 'room_read' | 'room_invite' | 'room_message';"
2092
+ },
2093
+ {
2094
+ "name": "Message",
2095
+ "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
2096
+ },
2097
+ {
2098
+ "name": "MessageBase",
2099
+ "declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
2100
+ },
2101
+ {
2102
+ "name": "MessageId",
2103
+ "declaration": "export type MessageId = Branded<'MessageId'>;"
2104
+ },
2105
+ {
2106
+ "name": "MessageRoleMap",
2107
+ "declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
2108
+ },
2109
+ {
2110
+ "name": "MessageSource",
2111
+ "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
2112
+ },
2113
+ {
2114
+ "name": "MessageSourceMap",
2115
+ "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'tool-registry': { kind: 'tool-registry'; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n room: { kind: 'room'; } & ContextFormed;\n}"
2116
+ },
2117
+ {
2118
+ "name": "ModelMessageSource",
2119
+ "declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
2120
+ },
2121
+ {
2122
+ "name": "OneShotSubagentDescriptorData",
2123
+ "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
2124
+ },
2125
+ {
2126
+ "name": "PlanActor",
2127
+ "declaration": "export interface PlanActor {\n kind: 'human' | 'coordinator' | 'worker';\n memberId: string;\n}"
2128
+ },
2129
+ {
2130
+ "name": "PlanAttempt",
2131
+ "declaration": "export interface PlanAttempt {\n id: string;\n deliveryId: string;\n number: number;\n status: 'queued' | 'running' | 'submitted' | 'accepted' | 'rejected' | 'failed' | 'cancelled' | 'uncertain';\n createdAt: number;\n startedAt?: number;\n settledAt?: number;\n submission?: PlanEvidence;\n review?: { decision: 'accepted' | 'rework'; by: string; reason: string; references: string[]; time: number; };\n error?: string;\n retry?: { by: string; reason: string; time: number; };\n}"
2132
+ },
2133
+ {
2134
+ "name": "PlanBudget",
2135
+ "declaration": "export interface PlanBudget {\n maxParallel: number;\n maxAttempts: number;\n maxAttemptsPerTask: number;\n maxActiveMs: number;\n}"
2136
+ },
2137
+ {
2138
+ "name": "PlanEvidence",
2139
+ "declaration": "export interface PlanEvidence {\n summary: string;\n references: string[];\n artifacts: string[];\n}"
2140
+ },
2141
+ {
2142
+ "name": "PlanService",
2143
+ "declaration": "export class PlanService {\n view(sessionId: string, view: Omit<RoomPlan, 'requests'>): Omit<RoomPlan, 'requests'>;\n recover(room: Session): Promise<void>;\n command(room: Session, json: string, actor: PlanActor): Promise<RoomPlan>;\n allows(room: Session, dispatchSeq?: number): boolean;\n admitted(room: Session, dispatchSeq?: number): Promise<void>;\n settled(room: Session, dispatchSeq: number | undefined, outcome: { state: 'done' | 'failed' | 'cancelled'; text?: string; error?: string; }): Promise<void>;\n dispose(): void;\n}"
2144
+ },
2145
+ {
2146
+ "name": "PlanTask",
2147
+ "declaration": "export interface PlanTask {\n id: string;\n title: string;\n stageId: string;\n parentId?: string;\n kind: 'group' | 'task';\n ownerMemberId?: string;\n instruction: string;\n criteria: string[];\n inputRefs: string[];\n artifactPaths: string[];\n dependsOn: string[];\n status: 'pending' | 'running' | 'submitted' | 'accepted' | 'failed' | 'cancelled';\n attempts: PlanAttempt[];\n}"
2148
+ },
2149
+ {
2150
+ "name": "ProviderRequestId",
2151
+ "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
2152
+ },
2153
+ {
2154
+ "name": "PtcDispatchEventData",
2155
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
2156
+ },
2157
+ {
2158
+ "name": "PtcDispatchStartEventData",
2159
+ "declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
2160
+ },
2161
+ {
2162
+ "name": "ReasoningBlock",
2163
+ "declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
2164
+ },
2165
+ {
2166
+ "name": "ReasoningEffortId",
2167
+ "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
2168
+ },
2169
+ {
2170
+ "name": "ReplayEnvelope",
2171
+ "declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
2172
+ },
2173
+ {
2174
+ "name": "RequestContext",
2175
+ "declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
2176
+ },
2177
+ {
2178
+ "name": "RequestHeaderReason",
2179
+ "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
2180
+ },
2181
+ {
2182
+ "name": "RoomAddTaskRequest",
2183
+ "declaration": "export interface RoomAddTaskRequest {\n readonly sessionId: SessionId;\n readonly member: string;\n readonly title: string;\n readonly blockedBy?: string;\n}"
2184
+ },
2185
+ {
2186
+ "name": "RoomAddTaskResult",
2187
+ "declaration": "export type RoomAddTaskResult = { readonly ok: true; readonly value: { readonly id: string; }; } | { readonly ok: false; readonly error: RoomFailure; };"
2188
+ },
2189
+ {
2190
+ "name": "RoomCancellation",
2191
+ "declaration": "export interface RoomCancellation {\n readonly cancelled: boolean;\n}"
2192
+ },
2193
+ {
2194
+ "name": "RoomCancelRequest",
2195
+ "declaration": "export interface RoomCancelRequest {\n readonly sessionId: SessionId;\n readonly name: string;\n}"
2196
+ },
2197
+ {
2198
+ "name": "RoomCancelResult",
2199
+ "declaration": "export type RoomCancelResult = { readonly ok: true; readonly value: RoomCancellation; } | { readonly ok: false; readonly error: RoomFailure; };"
2200
+ },
2201
+ {
2202
+ "name": "RoomCloseTaskRequest",
2203
+ "declaration": "export interface RoomCloseTaskRequest {\n readonly sessionId: SessionId;\n readonly taskId: string;\n readonly status?: 'done' | 'cancelled';\n}"
2204
+ },
2205
+ {
2206
+ "name": "RoomCloseTaskResult",
2207
+ "declaration": "export type RoomCloseTaskResult = { readonly ok: true; readonly value: { readonly id: string; }; } | { readonly ok: false; readonly error: RoomFailure; };"
2208
+ },
2209
+ {
2210
+ "name": "RoomCoordinatorEvent",
2211
+ "declaration": "export interface RoomCoordinatorEvent {\n readonly version: 1;\n readonly memberId: string;\n readonly revision: number;\n readonly previousMemberId: string;\n readonly handoff: string;\n}"
2212
+ },
2213
+ {
2214
+ "name": "RoomCreatedEvent",
2215
+ "declaration": "export interface RoomCreatedEvent {\n readonly version: 1;\n}"
2216
+ },
2217
+ {
2218
+ "name": "RoomDelivery",
2219
+ "declaration": "export interface RoomDelivery {\n readonly id: string;\n readonly dispatchSeq: number;\n readonly memberId: string;\n readonly status: 'queued' | RoomDeliveryStateEvent['state'];\n readonly origin: NonNullable<RoomDispatchEvent['origin']>;\n readonly text: string;\n readonly error?: string;\n readonly plan?: RoomDispatchEvent['plan'];\n}"
2220
+ },
2221
+ {
2222
+ "name": "RoomDeliveryStateEvent",
2223
+ "declaration": "export interface RoomDeliveryStateEvent {\n readonly id: string;\n readonly dispatchSeq: number;\n readonly memberId: string;\n readonly state: 'running' | 'done' | 'cancelled' | 'failed' | 'uncertain';\n readonly text?: string;\n readonly error?: string;\n}"
2224
+ },
2225
+ {
2226
+ "name": "RoomDispatchEvent",
2227
+ "declaration": "export interface RoomDispatchEvent {\n readonly plan?: { readonly goalId: string; readonly taskId?: string; readonly attemptId?: string; };\n readonly requestSignature?: string;\n readonly id?: string;\n readonly targetIds?: readonly string[];\n readonly origin?: 'human' | 'coordinator' | 'report' | 'relay';\n readonly replyTo?: string;\n readonly reportFor?: string;\n readonly targets: readonly string[];\n readonly text: string;\n}"
2228
+ },
2229
+ {
2230
+ "name": "RoomFailure",
2231
+ "declaration": "export type RoomFailure = { readonly code: 'request-conflict'; } | { readonly code: 'member-cwd-bound'; } | { readonly code: 'not-coordinator'; } | { readonly code: 'delivery-not-uncertain'; } | { readonly code: 'plan-reconciliation-required'; } | { readonly code: 'coordinator-busy'; } | { readonly code: 'coordinator-not-ready'; readonly message: string; } | { readonly code: 'coordinator-conflict'; } | { readonly code: 'active-coordinator'; } | { readonly code: 'configuration-owned-by-core'; } | { readonly code: 'session-not-found'; } | { readonly code: 'not-a-room'; } | { readonly code: 'invalid-name'; } | { readonly code: 'duplicate-name'; } | { readonly code: 'empty-provider'; } | { readonly code: 'member-not-found'; } | { readonly code: 'empty-text'; } | { readonly code: 'nothing-to-update'; } | { readonly code: 'local-agent-unavailable'; } | { readonly code: 'unknown-provider'; readonly provider: string; readonly available: readonly string[]; } | { readonly code: 'unknown-targets'; readonly names: readonly string[]; } | { readonly code: 'no-targets'; } | { readonly code: 'relay-not-found'; } | { readonly code: 'relay-not-pending'; } | { readonly code: 'main-member'; } | { readonly code: 'task-not-found'; } | { readonly code: 'task-closed'; } | { readonly code: 'resume-failed'; readonly message: string; };"
2232
+ },
2233
+ {
2234
+ "name": "RoomGetStateRequest",
2235
+ "declaration": "export interface RoomGetStateRequest {\n readonly sessionId: SessionId;\n}"
2236
+ },
2237
+ {
2238
+ "name": "RoomGetStateResult",
2239
+ "declaration": "export type RoomGetStateResult = { readonly ok: true; readonly value: RoomState; } | { readonly ok: false; readonly error: RoomFailure; };"
2240
+ },
2241
+ {
2242
+ "name": "RoomGoalEvent",
2243
+ "declaration": "export interface RoomGoalEvent {\n readonly text: string;\n}"
2244
+ },
2245
+ {
2246
+ "name": "RoomInvitation",
2247
+ "declaration": "export interface RoomInvitation {\n readonly name: string;\n readonly pendingFirstTask: boolean;\n}"
2248
+ },
2249
+ {
2250
+ "name": "RoomInviteRequest",
2251
+ "declaration": "export interface RoomInviteRequest {\n readonly sessionId: SessionId;\n readonly provider: string;\n readonly name: string;\n readonly instructions?: string;\n readonly cwd?: string;\n readonly firstTask?: string;\n readonly model?: string;\n}"
2252
+ },
2253
+ {
2254
+ "name": "RoomInviteResult",
2255
+ "declaration": "export type RoomInviteResult = { readonly ok: true; readonly value: RoomInvitation; } | { readonly ok: false; readonly error: RoomFailure; };"
2256
+ },
2257
+ {
2258
+ "name": "RoomIsRoomRequest",
2259
+ "declaration": "export interface RoomIsRoomRequest {\n readonly sessionId: SessionId;\n}"
2260
+ },
2261
+ {
2262
+ "name": "RoomJsonValue",
2263
+ "declaration": "export type RoomJsonValue = null | boolean | number | string | RoomJsonValue[] | { [key: string]: RoomJsonValue; };"
2264
+ },
2265
+ {
2266
+ "name": "RoomListProvidersRequest",
2267
+ "declaration": "export interface RoomListProvidersRequest {\n}"
2268
+ },
2269
+ {
2270
+ "name": "RoomLoad",
2271
+ "declaration": "export type RoomLoad = { readonly ok: true; readonly session: Session; readonly state: RoomState; } | { readonly ok: false; readonly error: RoomFailure; };"
2272
+ },
2273
+ {
2274
+ "name": "RoomMember",
2275
+ "declaration": "export interface RoomMember {\n readonly id?: string;\n readonly name: string;\n readonly kind: 'main-agent' | 'cli';\n readonly provider?: string;\n readonly instructions?: string;\n readonly invitedBy: 'human' | 'agent';\n readonly cwd?: string;\n readonly model?: string;\n readonly childSessionId?: SessionId;\n}"
2276
+ },
2277
+ {
2278
+ "name": "RoomMemberAddedEvent",
2279
+ "declaration": "export interface RoomMemberAddedEvent {\n readonly id?: string;\n readonly name: string;\n readonly kind: 'main-agent' | 'cli';\n readonly provider?: string;\n readonly instructions?: string;\n readonly invitedBy: 'human' | 'agent';\n readonly cwd?: string;\n readonly model?: string;\n readonly childSessionId?: SessionId;\n}"
2280
+ },
2281
+ {
2282
+ "name": "RoomMemberMessage",
2283
+ "declaration": "export interface RoomMemberMessage {\n readonly from: string;\n readonly to: string;\n readonly content: string;\n readonly parentSessionId: SessionId;\n readonly provenance?: Record<string, RoomJsonValue>;\n}"
2284
+ },
2285
+ {
2286
+ "name": "RoomMemberMessageReceipt",
2287
+ "declaration": "export type RoomMemberMessageReceipt = 'sent' | 'pending-confirm' | 'busy';"
2288
+ },
2289
+ {
2290
+ "name": "RoomMemberRemovedEvent",
2291
+ "declaration": "export interface RoomMemberRemovedEvent {\n readonly name: string;\n}"
2292
+ },
2293
+ {
2294
+ "name": "RoomMemberRun",
2295
+ "declaration": "export interface RoomMemberRun {\n readonly runId?: string;\n readonly member: string;\n readonly state: 'running' | 'done' | 'cancelled' | 'failed';\n readonly startedAt: number;\n readonly elapsedMs?: number;\n readonly error?: string;\n}"
2296
+ },
2297
+ {
2298
+ "name": "RoomMemberUpdatedEvent",
2299
+ "declaration": "export interface RoomMemberUpdatedEvent {\n readonly name: string;\n readonly rename?: string;\n readonly instructions?: string | null;\n readonly cwd?: string | null;\n readonly model?: string | null;\n readonly childSessionId?: SessionId;\n}"
2300
+ },
2301
+ {
2302
+ "name": "RoomMessageRequest",
2303
+ "declaration": "export interface RoomMessageRequest {\n readonly sessionId: SessionId;\n readonly member: string;\n readonly text: string;\n}"
2304
+ },
2305
+ {
2306
+ "name": "RoomMessageResult",
2307
+ "declaration": "export type RoomMessageResult = { readonly ok: true; readonly value: { readonly member: string; }; } | { readonly ok: false; readonly error: RoomFailure; };"
2308
+ },
2309
+ {
2310
+ "name": "RoomPlan",
2311
+ "declaration": "export interface RoomPlan {\n version: 1;\n id: string;\n revision: number;\n objective: string;\n status: 'draft' | 'running' | 'paused' | 'completed' | 'cancelled';\n reason?: string;\n budget: PlanBudget;\n activeMs: number;\n resumedAt?: number;\n stages: { id: string; title: string; }[];\n tasks: PlanTask[];\n completion?: PlanEvidence;\n requests: { id: string; signature: string; }[];\n}"
2312
+ },
2313
+ {
2314
+ "name": "RoomPostMessageRequest",
2315
+ "declaration": "export interface RoomPostMessageRequest {\n readonly requestId?: string;\n readonly sessionId: SessionId;\n readonly text: string;\n readonly targets?: readonly string[];\n}"
2316
+ },
2317
+ {
2318
+ "name": "RoomPostMessageResult",
2319
+ "declaration": "export type RoomPostMessageResult = { readonly ok: true; readonly value: RoomPostReceipt; } | { readonly ok: false; readonly error: RoomFailure; };"
2320
+ },
2321
+ {
2322
+ "name": "RoomPostParsed",
2323
+ "declaration": "export interface RoomPostParsed {\n readonly targets: readonly string[];\n readonly text: string;\n}"
2324
+ },
2325
+ {
2326
+ "name": "RoomPostReceipt",
2327
+ "declaration": "export interface RoomPostReceipt {\n readonly parsed: RoomPostParsed;\n readonly seq: number;\n}"
2328
+ },
2329
+ {
2330
+ "name": "RoomPrepareMemberRequest",
2331
+ "declaration": "export interface RoomPrepareMemberRequest {\n readonly sessionId: SessionId;\n readonly name: string;\n}"
2332
+ },
2333
+ {
2334
+ "name": "RoomPrepareMemberResult",
2335
+ "declaration": "export type RoomPrepareMemberResult = { readonly ok: true; readonly value: { readonly childSessionId: string; }; } | { readonly ok: false; readonly error: RoomFailure; };"
2336
+ },
2337
+ {
2338
+ "name": "RoomProviderInfo",
2339
+ "declaration": "export interface RoomProviderInfo {\n readonly provider: string;\n readonly displayName: string;\n readonly harness?: string;\n readonly authenticated: boolean;\n}"
2340
+ },
2341
+ {
2342
+ "name": "RoomProviderList",
2343
+ "declaration": "export interface RoomProviderList {\n readonly localAgentAvailable: boolean;\n readonly providers: readonly RoomProviderInfo[];\n}"
2344
+ },
2345
+ {
2346
+ "name": "RoomReconcileDeliveryRequest",
2347
+ "declaration": "export interface RoomReconcileDeliveryRequest {\n readonly sessionId: SessionId;\n readonly deliveryId: string;\n readonly outcome: 'done' | 'cancelled';\n readonly evidence: string;\n}"
2348
+ },
2349
+ {
2350
+ "name": "RoomReconcileDeliveryResult",
2351
+ "declaration": "export type RoomReconcileDeliveryResult = { readonly ok: true; } | { readonly ok: false; readonly error: RoomFailure; };"
2352
+ },
2353
+ {
2354
+ "name": "RoomRelay",
2355
+ "declaration": "export interface RoomRelay {\n readonly id: string;\n readonly from: string;\n readonly to: string;\n readonly content: string;\n readonly provenance?: Record<string, RoomJsonValue>;\n readonly state: RoomRelayState;\n}"
2356
+ },
2357
+ {
2358
+ "name": "RoomRelayEvent",
2359
+ "declaration": "export interface RoomRelayEvent {\n readonly id: string;\n readonly from: string;\n readonly to: string;\n readonly content: string;\n readonly provenance?: Record<string, RoomJsonValue>;\n}"
2360
+ },
2361
+ {
2362
+ "name": "RoomRelayResolvedEvent",
2363
+ "declaration": "export interface RoomRelayResolvedEvent {\n readonly id: string;\n readonly state: 'confirmed' | 'dismissed' | 'sent';\n}"
2364
+ },
2365
+ {
2366
+ "name": "RoomRelayResolveRequest",
2367
+ "declaration": "export interface RoomRelayResolveRequest {\n readonly sessionId: SessionId;\n readonly relayId: string;\n}"
2368
+ },
2369
+ {
2370
+ "name": "RoomRelayResolveResult",
2371
+ "declaration": "export type RoomRelayResolveResult = { readonly ok: true; readonly value: { readonly relayId: string; }; } | { readonly ok: false; readonly error: RoomFailure; };"
2372
+ },
2373
+ {
2374
+ "name": "RoomRelayState",
2375
+ "declaration": "export type RoomRelayState = 'pending' | 'confirmed' | 'dismissed' | 'sent';"
2376
+ },
2377
+ {
2378
+ "name": "RoomRemoveMemberRequest",
2379
+ "declaration": "export interface RoomRemoveMemberRequest {\n readonly sessionId: SessionId;\n readonly name: string;\n}"
2380
+ },
2381
+ {
2382
+ "name": "RoomRemoveMemberResult",
2383
+ "declaration": "export type RoomRemoveMemberResult = { readonly ok: true; readonly value: { readonly name: string; }; } | { readonly ok: false; readonly error: RoomFailure; };"
2384
+ },
2385
+ {
2386
+ "name": "RoomRunStateEvent",
2387
+ "declaration": "export interface RoomRunStateEvent {\n readonly runId?: string;\n readonly member: string;\n readonly state: 'running' | 'done' | 'cancelled' | 'failed';\n readonly startedAt: number;\n readonly elapsedMs?: number;\n readonly error?: string;\n}"
2388
+ },
2389
+ {
2390
+ "name": "RoomSetCoordinatorRequest",
2391
+ "declaration": "export interface RoomSetCoordinatorRequest {\n readonly sessionId: SessionId;\n readonly memberId: string;\n readonly expectedRevision: number;\n}"
2392
+ },
2393
+ {
2394
+ "name": "RoomSetCoordinatorResult",
2395
+ "declaration": "export type RoomSetCoordinatorResult = { readonly ok: true; readonly value: RoomCoordinatorEvent; } | { readonly ok: false; readonly error: RoomFailure; };"
2396
+ },
2397
+ {
2398
+ "name": "RoomSetGoalRequest",
2399
+ "declaration": "export interface RoomSetGoalRequest {\n readonly sessionId: SessionId;\n readonly text: string;\n}"
2400
+ },
2401
+ {
2402
+ "name": "RoomSetGoalResult",
2403
+ "declaration": "export type RoomSetGoalResult = { readonly ok: true; readonly value: { readonly goal?: string; }; } | { readonly ok: false; readonly error: RoomFailure; };"
2404
+ },
2405
+ {
2406
+ "name": "RoomSpeechEvent",
2407
+ "declaration": "export interface RoomSpeechEvent {\n readonly interrupted?: 'cancelled' | 'failed';\n readonly member: string;\n readonly text: string;\n readonly childSessionId?: SessionId;\n readonly durationMs?: number;\n}"
2408
+ },
2409
+ {
2410
+ "name": "RoomState",
2411
+ "declaration": "export interface RoomState {\n readonly plan?: Omit<RoomPlan, 'requests'>;\n readonly deliveries?: readonly RoomDelivery[];\n readonly coordinator?: RoomCoordinatorEvent;\n readonly members: readonly RoomMember[];\n readonly relays: readonly RoomRelay[];\n readonly tasks: readonly RoomTask[];\n readonly runs: readonly RoomMemberRun[];\n readonly goal?: string;\n}"
2412
+ },
2413
+ {
2414
+ "name": "RoomTask",
2415
+ "declaration": "export interface RoomTask {\n readonly deliveryId?: string;\n readonly id: string;\n readonly member: string;\n readonly title: string;\n readonly status: RoomTaskStatus;\n readonly blockedBy?: string;\n readonly updatedAt: number;\n}"
2416
+ },
2417
+ {
2418
+ "name": "RoomTaskAddedEvent",
2419
+ "declaration": "export interface RoomTaskAddedEvent {\n readonly deliveryId?: string;\n readonly id: string;\n readonly member: string;\n readonly title: string;\n readonly status: 'pending' | 'in_progress';\n readonly blockedBy?: string;\n}"
2420
+ },
2421
+ {
2422
+ "name": "RoomTaskEditedEvent",
2423
+ "declaration": "export interface RoomTaskEditedEvent {\n readonly id: string;\n readonly title?: string;\n readonly blockedBy?: string | null;\n}"
2424
+ },
2425
+ {
2426
+ "name": "RoomTaskStatus",
2427
+ "declaration": "export type RoomTaskStatus = 'pending' | 'in_progress' | 'done' | 'cancelled' | 'failed';"
2428
+ },
2429
+ {
2430
+ "name": "RoomTaskUpdatedEvent",
2431
+ "declaration": "export interface RoomTaskUpdatedEvent {\n readonly id: string;\n readonly status: 'in_progress' | 'done' | 'cancelled' | 'failed';\n}"
2432
+ },
2433
+ {
2434
+ "name": "RoomUpdateMemberRequest",
2435
+ "declaration": "export interface RoomUpdateMemberRequest {\n readonly sessionId: SessionId;\n readonly name: string;\n readonly rename?: string;\n readonly instructions?: string | null;\n readonly cwd?: string | null;\n readonly model?: string | null;\n}"
2436
+ },
2437
+ {
2438
+ "name": "RoomUpdateMemberResult",
2439
+ "declaration": "export type RoomUpdateMemberResult = { readonly ok: true; readonly value: { readonly name: string; }; } | { readonly ok: false; readonly error: RoomFailure; };"
2440
+ },
2441
+ {
2442
+ "name": "RoomUpdateTaskRequest",
2443
+ "declaration": "export interface RoomUpdateTaskRequest {\n readonly sessionId: SessionId;\n readonly taskId: string;\n readonly title?: string;\n readonly blockedBy?: string | null;\n}"
2444
+ },
2445
+ {
2446
+ "name": "RoomUpdateTaskResult",
2447
+ "declaration": "export type RoomUpdateTaskResult = { readonly ok: true; readonly value: { readonly id: string; }; } | { readonly ok: false; readonly error: RoomFailure; };"
2448
+ },
2449
+ {
2450
+ "name": "SandboxMode",
2451
+ "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
2452
+ },
2453
+ {
2454
+ "name": "Session",
2455
+ "declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n readonly firstLifecycleSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
2456
+ },
2457
+ {
2458
+ "name": "SessionEvent",
2459
+ "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: SessionSeq; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? SurfaceIntent<K> : { surfaceOp?: never; sourceEventSeqs?: never; }) }[T];"
2460
+ },
2461
+ {
2462
+ "name": "SessionEventMap",
2463
+ "declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'subagent/descriptor': SubagentDescriptorData;\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'permission/preset': { preset: string; };\n 'agent-preset/selected': { agentPreset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'local-agent/stream': LocalAgentStreamCheckpoint;\n 'room/created': RoomCreatedEvent;\n 'room/member-added': RoomMemberAddedEvent;\n 'room/member-updated': RoomMemberUpdatedEvent;\n 'room/member-removed': RoomMemberRemovedEvent;\n 'room/dispatch': RoomDispatchEvent;\n 'room/speech': RoomSpeechEvent;\n 'room/run-state': RoomRunStateEvent;\n 'room/relay': RoomRelayEvent;\n 'room/relay-resolved': RoomRelayResolvedEvent;\n 'room/task-added': RoomTaskAddedEvent;\n 'room/task-updated': RoomTaskUpdatedEvent;\n 'room/task-edited': RoomTaskEditedEvent;\n 'room/goal': RoomGoalEvent;\n 'room/plan-state': RoomPlan;\n 'room/coordinator': RoomCoordinatorEvent;\n 'room/delivery-state': RoomDeliveryStateEvent;\n}"
2464
+ },
2465
+ {
2466
+ "name": "SessionEventType",
2467
+ "declaration": "export type SessionEventType = keyof SessionEventMap;"
2468
+ },
2469
+ {
2470
+ "name": "SessionHeader",
2471
+ "declaration": "export interface SessionHeader {\n readonly version: typeof SESSION_FORMAT_VERSION;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
2472
+ },
2473
+ {
2474
+ "name": "SessionId",
2475
+ "declaration": "export type SessionId = Branded<'SessionId'>;"
2476
+ },
2477
+ {
2478
+ "name": "SessionLogOffset",
2479
+ "declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
2480
+ },
2481
+ {
2482
+ "name": "SessionSeq",
2483
+ "declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
2484
+ },
2485
+ {
2486
+ "name": "SessionSurface",
2487
+ "declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
2488
+ },
2489
+ {
2490
+ "name": "SessionTitleEventData",
2491
+ "declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
2492
+ },
2493
+ {
2494
+ "name": "SessionTitleModelIdentity",
2495
+ "declaration": "export interface SessionTitleModelIdentity {\n readonly provider: string;\n readonly model: string;\n}"
2496
+ },
2497
+ {
2498
+ "name": "SessionTitleProviderId",
2499
+ "declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
2500
+ },
2501
+ {
2502
+ "name": "SessionTitleSource",
2503
+ "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
2504
+ },
2505
+ {
2506
+ "name": "StreamChunk",
2507
+ "declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
2508
+ },
2509
+ {
2510
+ "name": "SubagentCatalogEvent",
2511
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
2512
+ },
2513
+ {
2514
+ "name": "SubagentDescriptorBase",
2515
+ "declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
2516
+ },
2517
+ {
2518
+ "name": "SubagentDescriptorData",
2519
+ "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
2520
+ },
2521
+ {
2522
+ "name": "SubagentSettledMessageSource",
2523
+ "declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
2524
+ },
2525
+ {
2526
+ "name": "SurfaceEventType",
2527
+ "declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
2528
+ },
2529
+ {
2530
+ "name": "SurfaceIntent",
2531
+ "declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
2532
+ },
2533
+ {
2534
+ "name": "SurfaceOp",
2535
+ "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
2536
+ },
2537
+ {
2538
+ "name": "SystemMessage",
2539
+ "declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
2540
+ },
2541
+ {
2542
+ "name": "SystemPromptMessageSource",
2543
+ "declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
2544
+ },
2545
+ {
2546
+ "name": "SystemPromptUpdate",
2547
+ "declaration": "export type SystemPromptUpdate = 'in-history';"
2548
+ },
2549
+ {
2550
+ "name": "TextBlock",
2551
+ "declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
2552
+ },
2553
+ {
2554
+ "name": "TodoItem",
2555
+ "declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
2556
+ },
2557
+ {
2558
+ "name": "TokenUsage",
2559
+ "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
2560
+ },
2561
+ {
2562
+ "name": "ToolAdditionBlock",
2563
+ "declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
2564
+ },
2565
+ {
2566
+ "name": "ToolCallBlock",
2567
+ "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
2568
+ },
2569
+ {
2570
+ "name": "ToolCallId",
2571
+ "declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
2572
+ },
2573
+ {
2574
+ "name": "ToolMessageSource",
2575
+ "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
2576
+ },
2577
+ {
2578
+ "name": "ToolRemovalBlock",
2579
+ "declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
2580
+ },
2581
+ {
2582
+ "name": "ToolRestriction",
2583
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
2584
+ },
2585
+ {
2586
+ "name": "ToolResultMessage",
2587
+ "declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
2588
+ },
2589
+ {
2590
+ "name": "ToolSchema",
2591
+ "declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
2592
+ },
2593
+ {
2594
+ "name": "TurnEndCancelCause",
2595
+ "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
2596
+ },
2597
+ {
2598
+ "name": "TurnEndReason",
2599
+ "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
2600
+ },
2601
+ {
2602
+ "name": "TurnEndReasonMap",
2603
+ "declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n forked: { kind: 'forked'; };\n}"
2604
+ },
2605
+ {
2606
+ "name": "UserMessage",
2607
+ "declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
2608
+ }
2609
+ ]
2610
+ }
2611
+ ],
2612
+ "events": [],
2613
+ "objects": []
2614
+ },
2615
+ }