@khorsheed/dsh-local-agent 0.1.0-rc.6

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 (99) hide show
  1. package/README.en.md +181 -0
  2. package/README.i18n.yaml +2 -0
  3. package/README.md +181 -0
  4. package/cordis.patch.yml +21 -0
  5. package/lib/client.js +8832 -0
  6. package/lib/index.js +5281 -0
  7. package/lib/invariant.js +85 -0
  8. package/lib/member-bridge.js +298 -0
  9. package/lib/typert.host.d.ts +3 -0
  10. package/lib/typert.host.js +3137 -0
  11. package/lib/typert.remote-client.d.ts +67 -0
  12. package/lib/typert.remote-client.js +1971 -0
  13. package/lib/types/cli-version.d.ts +82 -0
  14. package/lib/types/cli-version.js +165 -0
  15. package/lib/types/client/AuthStatusDot.d.ts +17 -0
  16. package/lib/types/client/AuthStatusDot.js +9 -0
  17. package/lib/types/client/HarnessModelPicker.d.ts +17 -0
  18. package/lib/types/client/HarnessModelPicker.js +48 -0
  19. package/lib/types/client/LocalAgentRecordsAction.d.ts +41 -0
  20. package/lib/types/client/LocalAgentRecordsAction.js +74 -0
  21. package/lib/types/client/MemberComposer.d.ts +79 -0
  22. package/lib/types/client/MemberComposer.js +308 -0
  23. package/lib/types/client/MemberConfiguration.d.ts +9 -0
  24. package/lib/types/client/MemberConfiguration.js +46 -0
  25. package/lib/types/client/MemberInboxView.d.ts +12 -0
  26. package/lib/types/client/MemberInboxView.js +38 -0
  27. package/lib/types/client/MemberLiveNode.d.ts +14 -0
  28. package/lib/types/client/MemberLiveNode.js +74 -0
  29. package/lib/types/client/MemberPaintDiagnostics.d.ts +7 -0
  30. package/lib/types/client/MemberPaintDiagnostics.js +20 -0
  31. package/lib/types/client/ModelConfigurationFields.d.ts +15 -0
  32. package/lib/types/client/ModelConfigurationFields.js +23 -0
  33. package/lib/types/client/ProviderAuthBlock.d.ts +59 -0
  34. package/lib/types/client/ProviderAuthBlock.js +164 -0
  35. package/lib/types/client/auth-status.d.ts +28 -0
  36. package/lib/types/client/auth-status.js +56 -0
  37. package/lib/types/client/icons.d.ts +22 -0
  38. package/lib/types/client/icons.js +6 -0
  39. package/lib/types/client/index.d.ts +62 -0
  40. package/lib/types/client/index.js +135 -0
  41. package/lib/types/client/live-node.d.ts +14 -0
  42. package/lib/types/client/live-node.js +34 -0
  43. package/lib/types/client/live-output.d.ts +34 -0
  44. package/lib/types/client/live-output.js +94 -0
  45. package/lib/types/client/live-paint.d.ts +40 -0
  46. package/lib/types/client/live-paint.js +74 -0
  47. package/lib/types/client/locales.d.ts +120 -0
  48. package/lib/types/client/locales.js +227 -0
  49. package/lib/types/client/member-configuration.d.ts +41 -0
  50. package/lib/types/client/member-configuration.js +114 -0
  51. package/lib/types/client/member-dock.d.ts +94 -0
  52. package/lib/types/client/member-dock.js +102 -0
  53. package/lib/types/client/member-feed.d.ts +24 -0
  54. package/lib/types/client/member-feed.js +134 -0
  55. package/lib/types/client/request-id.d.ts +3 -0
  56. package/lib/types/client/request-id.js +6 -0
  57. package/lib/types/client/settings-scope.d.ts +74 -0
  58. package/lib/types/client/settings-scope.js +98 -0
  59. package/lib/types/client/use-configuration-menu.d.ts +10 -0
  60. package/lib/types/client/use-configuration-menu.js +61 -0
  61. package/lib/types/container.d.ts +69 -0
  62. package/lib/types/container.js +129 -0
  63. package/lib/types/env.d.ts +17 -0
  64. package/lib/types/env.js +89 -0
  65. package/lib/types/gateway.d.ts +162 -0
  66. package/lib/types/gateway.js +470 -0
  67. package/lib/types/index.d.ts +1463 -0
  68. package/lib/types/index.js +2704 -0
  69. package/lib/types/invariant.d.ts +16 -0
  70. package/lib/types/invariant.js +105 -0
  71. package/lib/types/live-flush.d.ts +21 -0
  72. package/lib/types/live-flush.js +59 -0
  73. package/lib/types/live-stream.d.ts +41 -0
  74. package/lib/types/live-stream.js +178 -0
  75. package/lib/types/member-bridge.d.ts +50 -0
  76. package/lib/types/member-bridge.js +216 -0
  77. package/lib/types/member-channel.d.ts +86 -0
  78. package/lib/types/member-channel.js +232 -0
  79. package/lib/types/member-control-storage.d.ts +10 -0
  80. package/lib/types/member-control-storage.js +100 -0
  81. package/lib/types/member-control.d.ts +62 -0
  82. package/lib/types/member-control.js +359 -0
  83. package/lib/types/member-controls.d.ts +23 -0
  84. package/lib/types/member-controls.js +143 -0
  85. package/lib/types/member-feed.d.ts +4 -0
  86. package/lib/types/member-feed.js +45 -0
  87. package/lib/types/member-inbox.d.ts +30 -0
  88. package/lib/types/member-inbox.js +225 -0
  89. package/lib/types/model-directory.d.ts +43 -0
  90. package/lib/types/model-directory.js +192 -0
  91. package/lib/types/prepared-members.d.ts +15 -0
  92. package/lib/types/prepared-members.js +61 -0
  93. package/lib/types/settings-face.d.ts +61 -0
  94. package/lib/types/settings-face.js +61 -0
  95. package/lib/types/types.d.ts +959 -0
  96. package/lib/types/types.js +24 -0
  97. package/locale/en.json +6 -0
  98. package/locale/zh.json +6 -0
  99. package/package.json +112 -0
@@ -0,0 +1,3137 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ let _khorsheed_dsh_local_agent_localAgentGateway_activeDelegations_result$schema$value
5
+ const _khorsheed_dsh_local_agent_localAgentGateway_activeDelegations_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_activeDelegations_result$schema$value ??= z.array(z.string()))
6
+ let _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_0$schema$value
7
+ const _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_0$schema$value ??= z.string())
8
+ let _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_1$schema$value
9
+ const _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_1$schema$value ??= z.string())
10
+ let _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_2$schema$value
11
+ const _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_2$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_2$schema$value ??= z.number())
12
+ let _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_result$schema$value
13
+ const _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_result$schema$value ??= z.object({
14
+ 'requestId': z.string(),
15
+ 'revision': z.number(),
16
+ 'status': z.union([z.literal("pending"), z.literal("applying"), z.literal("failed"), z.literal("unsupported"), z.literal("applied"), z.literal("cancelled"), z.literal("conflict"), z.literal("locked")]),
17
+ 'error': z.string().optional(),
18
+ }))
19
+ let _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_0$schema$value
20
+ const _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_0$schema$value ??= z.string())
21
+ let _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_1$schema$value
22
+ const _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_1$schema$value ??= z.union([z.literal("cancel"), z.literal("pause"), z.literal("resume"), z.literal("reconcile")]))
23
+ let _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_2$schema$value
24
+ const _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_2$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_2$schema$value ??= z.union([z.undefined(), z.string()]))
25
+ let _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_3$schema$value
26
+ const _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_3$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_3$schema$value ??= z.union([z.undefined(), z.literal("cancelled"), z.literal("done")]))
27
+ let _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_4$schema$value
28
+ const _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_4$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_4$schema$value ??= z.union([z.undefined(), z.string()]))
29
+ let _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_result$schema$value
30
+ const _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_result$schema$value ??= z.union([z.object({
31
+ 'ok': z.literal(true),
32
+ 'requestId': z.string().optional(),
33
+ }), z.object({
34
+ 'ok': z.literal(false),
35
+ 'error': z.string(),
36
+ })]))
37
+ let _khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_parameter_0$schema$value
38
+ const _khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_parameter_0$schema$value ??= z.string())
39
+ let _khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_result$schema$value
40
+ const _khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_result$schema$value ??= z.object({
41
+ 'memberId': z.string(),
42
+ 'revision': z.number(),
43
+ 'current': z.object({
44
+ 'revision': z.number(),
45
+ 'selection': z.object({
46
+ 'model': z.union([z.object({
47
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
48
+ }), z.object({
49
+ 'mode': z.literal("value"),
50
+ 'value': z.string(),
51
+ })]),
52
+ 'effort': z.union([z.object({
53
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
54
+ }), z.object({
55
+ 'mode': z.literal("value"),
56
+ 'value': z.string(),
57
+ })]),
58
+ }),
59
+ 'resolved': z.object({
60
+ 'model': z.string().optional(),
61
+ 'effort': z.string().optional(),
62
+ }),
63
+ }),
64
+ 'pending': z.object({
65
+ 'revision': z.number(),
66
+ 'requestId': z.string(),
67
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
68
+ 'selection': z.object({
69
+ 'model': z.union([z.object({
70
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
71
+ }), z.object({
72
+ 'mode': z.literal("value"),
73
+ 'value': z.string(),
74
+ })]),
75
+ 'effort': z.union([z.object({
76
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
77
+ }), z.object({
78
+ 'mode': z.literal("value"),
79
+ 'value': z.string(),
80
+ })]),
81
+ }),
82
+ }).optional(),
83
+ 'operation': z.intersection(z.object({
84
+ 'revision': z.number(),
85
+ 'requestId': z.string(),
86
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
87
+ 'selection': z.object({
88
+ 'model': z.union([z.object({
89
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
90
+ }), z.object({
91
+ 'mode': z.literal("value"),
92
+ 'value': z.string(),
93
+ })]),
94
+ 'effort': z.union([z.object({
95
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
96
+ }), z.object({
97
+ 'mode': z.literal("value"),
98
+ 'value': z.string(),
99
+ })]),
100
+ }),
101
+ }), z.object({
102
+ 'previous': z.object({
103
+ 'revision': z.number(),
104
+ 'selection': z.object({
105
+ 'model': z.union([z.object({
106
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
107
+ }), z.object({
108
+ 'mode': z.literal("value"),
109
+ 'value': z.string(),
110
+ })]),
111
+ 'effort': z.union([z.object({
112
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
113
+ }), z.object({
114
+ 'mode': z.literal("value"),
115
+ 'value': z.string(),
116
+ })]),
117
+ }),
118
+ 'resolved': z.object({
119
+ 'model': z.string().optional(),
120
+ 'effort': z.string().optional(),
121
+ }),
122
+ }),
123
+ })).optional(),
124
+ 'status': z.union([z.literal("idle"), z.literal("pending"), z.literal("applying"), z.literal("reconciling"), z.literal("failed")]),
125
+ 'round': z.object({
126
+ 'id': z.string(),
127
+ 'configuration': z.object({
128
+ 'revision': z.number(),
129
+ 'selection': z.object({
130
+ 'model': z.union([z.object({
131
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
132
+ }), z.object({
133
+ 'mode': z.literal("value"),
134
+ 'value': z.string(),
135
+ })]),
136
+ 'effort': z.union([z.object({
137
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
138
+ }), z.object({
139
+ 'mode': z.literal("value"),
140
+ 'value': z.string(),
141
+ })]),
142
+ }),
143
+ 'resolved': z.object({
144
+ 'model': z.string().optional(),
145
+ 'effort': z.string().optional(),
146
+ }),
147
+ }),
148
+ }).optional(),
149
+ 'lockedReason': z.string().optional(),
150
+ 'frozen': z.object({
151
+ 'revision': z.number(),
152
+ 'selection': z.object({
153
+ 'model': z.union([z.object({
154
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
155
+ }), z.object({
156
+ 'mode': z.literal("value"),
157
+ 'value': z.string(),
158
+ })]),
159
+ 'effort': z.union([z.object({
160
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
161
+ }), z.object({
162
+ 'mode': z.literal("value"),
163
+ 'value': z.string(),
164
+ })]),
165
+ }),
166
+ 'resolved': z.object({
167
+ 'model': z.string().optional(),
168
+ 'effort': z.string().optional(),
169
+ }),
170
+ }).optional(),
171
+ 'error': z.string().optional(),
172
+ }))
173
+ let _khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_parameter_0$schema$value
174
+ const _khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_parameter_0$schema$value ??= z.string())
175
+ let _khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_result$schema$value
176
+ const _khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_result$schema$value ??= z.object({
177
+ 'status': z.union([z.literal("loading"), z.literal("ready"), z.literal("stale"), z.literal("error"), z.literal("unsupported")]),
178
+ 'refreshing': z.boolean(),
179
+ 'revision': z.number(),
180
+ 'refreshedAt': z.number().optional(),
181
+ 'entries': z.array(z.object({
182
+ 'value': z.string(),
183
+ 'label': z.string(),
184
+ 'resolvedModel': z.string().optional(),
185
+ 'description': z.string().optional(),
186
+ 'source': z.union([z.literal("configuration"), z.literal("native"), z.literal("history")]),
187
+ 'hidden': z.boolean().optional(),
188
+ 'reasoning': z.object({
189
+ 'options': z.array(z.object({
190
+ 'value': z.string(),
191
+ 'label': z.string(),
192
+ 'description': z.string().optional(),
193
+ })),
194
+ 'default': z.string().optional(),
195
+ }).optional(),
196
+ })),
197
+ 'defaultModel': z.string().optional(),
198
+ 'complete': z.boolean(),
199
+ 'customInput': z.boolean(),
200
+ 'unsupported': z.boolean().optional(),
201
+ 'reason': z.string().optional(),
202
+ }))
203
+ let _khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_parameter_0$schema$value
204
+ const _khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_parameter_0$schema$value ??= z.string())
205
+ let _khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_result$schema$value
206
+ const _khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_result$schema$value ??= z.object({
207
+ 'baseline': z.boolean(),
208
+ 'updates': z.array(z.intersection(z.object({
209
+ 'id': z.string(),
210
+ 'turn': z.number(),
211
+ 'step': z.number(),
212
+ 'kind': z.union([z.literal("think"), z.literal("text")]),
213
+ 'text': z.string(),
214
+ 'revision': z.number(),
215
+ 'receivedAt': z.number(),
216
+ }), z.object({
217
+ 'append': z.boolean(),
218
+ }))),
219
+ 'removed': z.array(z.string()),
220
+ }))
221
+ let _khorsheed_dsh_local_agent_localAgentGateway_followMembers_parameter_0$schema$value
222
+ const _khorsheed_dsh_local_agent_localAgentGateway_followMembers_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followMembers_parameter_0$schema$value ??= z.array(z.object({
223
+ 'memberId': z.string(),
224
+ 'channel': z.union([z.literal("configuration"), z.literal("directory"), z.literal("output")]),
225
+ })))
226
+ let _khorsheed_dsh_local_agent_localAgentGateway_followMembers_result$schema$value
227
+ const _khorsheed_dsh_local_agent_localAgentGateway_followMembers_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followMembers_result$schema$value ??= z.union([z.object({
228
+ 'memberId': z.string(),
229
+ 'channel': z.literal("configuration"),
230
+ 'value': z.object({
231
+ 'memberId': z.string(),
232
+ 'revision': z.number(),
233
+ 'current': z.object({
234
+ 'revision': z.number(),
235
+ 'selection': z.object({
236
+ 'model': z.union([z.object({
237
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
238
+ }), z.object({
239
+ 'mode': z.literal("value"),
240
+ 'value': z.string(),
241
+ })]),
242
+ 'effort': z.union([z.object({
243
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
244
+ }), z.object({
245
+ 'mode': z.literal("value"),
246
+ 'value': z.string(),
247
+ })]),
248
+ }),
249
+ 'resolved': z.object({
250
+ 'model': z.string().optional(),
251
+ 'effort': z.string().optional(),
252
+ }),
253
+ }),
254
+ 'pending': z.object({
255
+ 'revision': z.number(),
256
+ 'requestId': z.string(),
257
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
258
+ 'selection': z.object({
259
+ 'model': z.union([z.object({
260
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
261
+ }), z.object({
262
+ 'mode': z.literal("value"),
263
+ 'value': z.string(),
264
+ })]),
265
+ 'effort': z.union([z.object({
266
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
267
+ }), z.object({
268
+ 'mode': z.literal("value"),
269
+ 'value': z.string(),
270
+ })]),
271
+ }),
272
+ }).optional(),
273
+ 'operation': z.intersection(z.object({
274
+ 'revision': z.number(),
275
+ 'requestId': z.string(),
276
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
277
+ 'selection': z.object({
278
+ 'model': z.union([z.object({
279
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
280
+ }), z.object({
281
+ 'mode': z.literal("value"),
282
+ 'value': z.string(),
283
+ })]),
284
+ 'effort': z.union([z.object({
285
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
286
+ }), z.object({
287
+ 'mode': z.literal("value"),
288
+ 'value': z.string(),
289
+ })]),
290
+ }),
291
+ }), z.object({
292
+ 'previous': z.object({
293
+ 'revision': z.number(),
294
+ 'selection': z.object({
295
+ 'model': z.union([z.object({
296
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
297
+ }), z.object({
298
+ 'mode': z.literal("value"),
299
+ 'value': z.string(),
300
+ })]),
301
+ 'effort': z.union([z.object({
302
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
303
+ }), z.object({
304
+ 'mode': z.literal("value"),
305
+ 'value': z.string(),
306
+ })]),
307
+ }),
308
+ 'resolved': z.object({
309
+ 'model': z.string().optional(),
310
+ 'effort': z.string().optional(),
311
+ }),
312
+ }),
313
+ })).optional(),
314
+ 'status': z.union([z.literal("idle"), z.literal("pending"), z.literal("applying"), z.literal("reconciling"), z.literal("failed")]),
315
+ 'round': z.object({
316
+ 'id': z.string(),
317
+ 'configuration': z.object({
318
+ 'revision': z.number(),
319
+ 'selection': z.object({
320
+ 'model': z.union([z.object({
321
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
322
+ }), z.object({
323
+ 'mode': z.literal("value"),
324
+ 'value': z.string(),
325
+ })]),
326
+ 'effort': z.union([z.object({
327
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
328
+ }), z.object({
329
+ 'mode': z.literal("value"),
330
+ 'value': z.string(),
331
+ })]),
332
+ }),
333
+ 'resolved': z.object({
334
+ 'model': z.string().optional(),
335
+ 'effort': z.string().optional(),
336
+ }),
337
+ }),
338
+ }).optional(),
339
+ 'lockedReason': z.string().optional(),
340
+ 'frozen': z.object({
341
+ 'revision': z.number(),
342
+ 'selection': z.object({
343
+ 'model': z.union([z.object({
344
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
345
+ }), z.object({
346
+ 'mode': z.literal("value"),
347
+ 'value': z.string(),
348
+ })]),
349
+ 'effort': z.union([z.object({
350
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
351
+ }), z.object({
352
+ 'mode': z.literal("value"),
353
+ 'value': z.string(),
354
+ })]),
355
+ }),
356
+ 'resolved': z.object({
357
+ 'model': z.string().optional(),
358
+ 'effort': z.string().optional(),
359
+ }),
360
+ }).optional(),
361
+ 'error': z.string().optional(),
362
+ }),
363
+ }), z.object({
364
+ 'memberId': z.string(),
365
+ 'channel': z.literal("directory"),
366
+ 'value': z.object({
367
+ 'status': z.union([z.literal("loading"), z.literal("ready"), z.literal("stale"), z.literal("error"), z.literal("unsupported")]),
368
+ 'refreshing': z.boolean(),
369
+ 'revision': z.number(),
370
+ 'refreshedAt': z.number().optional(),
371
+ 'entries': z.array(z.object({
372
+ 'value': z.string(),
373
+ 'label': z.string(),
374
+ 'resolvedModel': z.string().optional(),
375
+ 'description': z.string().optional(),
376
+ 'source': z.union([z.literal("configuration"), z.literal("native"), z.literal("history")]),
377
+ 'hidden': z.boolean().optional(),
378
+ 'reasoning': z.object({
379
+ 'options': z.array(z.object({
380
+ 'value': z.string(),
381
+ 'label': z.string(),
382
+ 'description': z.string().optional(),
383
+ })),
384
+ 'default': z.string().optional(),
385
+ }).optional(),
386
+ })),
387
+ 'defaultModel': z.string().optional(),
388
+ 'complete': z.boolean(),
389
+ 'customInput': z.boolean(),
390
+ 'unsupported': z.boolean().optional(),
391
+ 'reason': z.string().optional(),
392
+ }),
393
+ }), z.object({
394
+ 'memberId': z.string(),
395
+ 'channel': z.literal("output"),
396
+ 'value': z.object({
397
+ 'baseline': z.boolean(),
398
+ 'updates': z.array(z.intersection(z.object({
399
+ 'id': z.string(),
400
+ 'turn': z.number(),
401
+ 'step': z.number(),
402
+ 'kind': z.union([z.literal("think"), z.literal("text")]),
403
+ 'text': z.string(),
404
+ 'revision': z.number(),
405
+ 'receivedAt': z.number(),
406
+ }), z.object({
407
+ 'append': z.boolean(),
408
+ }))),
409
+ 'removed': z.array(z.string()),
410
+ }),
411
+ }), z.object({
412
+ 'memberId': z.string(),
413
+ 'channel': z.literal("error"),
414
+ 'source': z.union([z.literal("configuration"), z.literal("directory"), z.literal("output")]),
415
+ 'message': z.string(),
416
+ })]))
417
+ let _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_0$schema$value
418
+ const _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_0$schema$value ??= z.string())
419
+ let _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_1$schema$value
420
+ const _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_1$schema$value ??= z.union([z.undefined(), z.string()]))
421
+ let _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_result$schema$value
422
+ const _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_result$schema$value ??= z.object({
423
+ 'status': z.union([z.literal("loading"), z.literal("ready"), z.literal("stale"), z.literal("error"), z.literal("unsupported")]),
424
+ 'refreshing': z.boolean(),
425
+ 'revision': z.number(),
426
+ 'refreshedAt': z.number().optional(),
427
+ 'entries': z.array(z.object({
428
+ 'value': z.string(),
429
+ 'label': z.string(),
430
+ 'resolvedModel': z.string().optional(),
431
+ 'description': z.string().optional(),
432
+ 'source': z.union([z.literal("configuration"), z.literal("native"), z.literal("history")]),
433
+ 'hidden': z.boolean().optional(),
434
+ 'reasoning': z.object({
435
+ 'options': z.array(z.object({
436
+ 'value': z.string(),
437
+ 'label': z.string(),
438
+ 'description': z.string().optional(),
439
+ })),
440
+ 'default': z.string().optional(),
441
+ }).optional(),
442
+ })),
443
+ 'defaultModel': z.string().optional(),
444
+ 'complete': z.boolean(),
445
+ 'customInput': z.boolean(),
446
+ 'unsupported': z.boolean().optional(),
447
+ 'reason': z.string().optional(),
448
+ }))
449
+ let _khorsheed_dsh_local_agent_localAgentGateway_harnessModel_parameter_0$schema$value
450
+ const _khorsheed_dsh_local_agent_localAgentGateway_harnessModel_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_harnessModel_parameter_0$schema$value ??= z.string())
451
+ let _khorsheed_dsh_local_agent_localAgentGateway_harnessModel_result$schema$value
452
+ const _khorsheed_dsh_local_agent_localAgentGateway_harnessModel_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_harnessModel_result$schema$value ??= z.union([z.literal(null), z.object({
453
+ 'configuration': z.object({
454
+ 'memberId': z.string(),
455
+ 'revision': z.number(),
456
+ 'current': z.object({
457
+ 'revision': z.number(),
458
+ 'selection': z.object({
459
+ 'model': z.union([z.object({
460
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
461
+ }), z.object({
462
+ 'mode': z.literal("value"),
463
+ 'value': z.string(),
464
+ })]),
465
+ 'effort': z.union([z.object({
466
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
467
+ }), z.object({
468
+ 'mode': z.literal("value"),
469
+ 'value': z.string(),
470
+ })]),
471
+ }),
472
+ 'resolved': z.object({
473
+ 'model': z.string().optional(),
474
+ 'effort': z.string().optional(),
475
+ }),
476
+ }),
477
+ 'pending': z.object({
478
+ 'revision': z.number(),
479
+ 'requestId': z.string(),
480
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
481
+ 'selection': z.object({
482
+ 'model': z.union([z.object({
483
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
484
+ }), z.object({
485
+ 'mode': z.literal("value"),
486
+ 'value': z.string(),
487
+ })]),
488
+ 'effort': z.union([z.object({
489
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
490
+ }), z.object({
491
+ 'mode': z.literal("value"),
492
+ 'value': z.string(),
493
+ })]),
494
+ }),
495
+ }).optional(),
496
+ 'operation': z.intersection(z.object({
497
+ 'revision': z.number(),
498
+ 'requestId': z.string(),
499
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
500
+ 'selection': z.object({
501
+ 'model': z.union([z.object({
502
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
503
+ }), z.object({
504
+ 'mode': z.literal("value"),
505
+ 'value': z.string(),
506
+ })]),
507
+ 'effort': z.union([z.object({
508
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
509
+ }), z.object({
510
+ 'mode': z.literal("value"),
511
+ 'value': z.string(),
512
+ })]),
513
+ }),
514
+ }), z.object({
515
+ 'previous': z.object({
516
+ 'revision': z.number(),
517
+ 'selection': z.object({
518
+ 'model': z.union([z.object({
519
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
520
+ }), z.object({
521
+ 'mode': z.literal("value"),
522
+ 'value': z.string(),
523
+ })]),
524
+ 'effort': z.union([z.object({
525
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
526
+ }), z.object({
527
+ 'mode': z.literal("value"),
528
+ 'value': z.string(),
529
+ })]),
530
+ }),
531
+ 'resolved': z.object({
532
+ 'model': z.string().optional(),
533
+ 'effort': z.string().optional(),
534
+ }),
535
+ }),
536
+ })).optional(),
537
+ 'status': z.union([z.literal("idle"), z.literal("pending"), z.literal("applying"), z.literal("reconciling"), z.literal("failed")]),
538
+ 'round': z.object({
539
+ 'id': z.string(),
540
+ 'configuration': z.object({
541
+ 'revision': z.number(),
542
+ 'selection': z.object({
543
+ 'model': z.union([z.object({
544
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
545
+ }), z.object({
546
+ 'mode': z.literal("value"),
547
+ 'value': z.string(),
548
+ })]),
549
+ 'effort': z.union([z.object({
550
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
551
+ }), z.object({
552
+ 'mode': z.literal("value"),
553
+ 'value': z.string(),
554
+ })]),
555
+ }),
556
+ 'resolved': z.object({
557
+ 'model': z.string().optional(),
558
+ 'effort': z.string().optional(),
559
+ }),
560
+ }),
561
+ }).optional(),
562
+ 'lockedReason': z.string().optional(),
563
+ 'frozen': z.object({
564
+ 'revision': z.number(),
565
+ 'selection': z.object({
566
+ 'model': z.union([z.object({
567
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
568
+ }), z.object({
569
+ 'mode': z.literal("value"),
570
+ 'value': z.string(),
571
+ })]),
572
+ 'effort': z.union([z.object({
573
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
574
+ }), z.object({
575
+ 'mode': z.literal("value"),
576
+ 'value': z.string(),
577
+ })]),
578
+ }),
579
+ 'resolved': z.object({
580
+ 'model': z.string().optional(),
581
+ 'effort': z.string().optional(),
582
+ }),
583
+ }).optional(),
584
+ 'error': z.string().optional(),
585
+ }).optional(),
586
+ 'effective': z.string().optional(),
587
+ 'source': z.union([z.literal("override"), z.literal("delegation"), z.literal("settings"), z.literal("cli-config"), z.literal("cli-builtin")]),
588
+ 'override': z.string().optional(),
589
+ 'delegation': z.string().optional(),
590
+ 'settings': z.string().optional(),
591
+ 'cliDefault': z.string().optional(),
592
+ 'lastObserved': z.string().optional(),
593
+ 'choices': z.array(z.string()),
594
+ 'directory': z.object({
595
+ 'status': z.union([z.literal("loading"), z.literal("ready"), z.literal("stale"), z.literal("error"), z.literal("unsupported")]),
596
+ 'refreshing': z.boolean(),
597
+ 'revision': z.number(),
598
+ 'refreshedAt': z.number().optional(),
599
+ 'entries': z.array(z.object({
600
+ 'value': z.string(),
601
+ 'label': z.string(),
602
+ 'resolvedModel': z.string().optional(),
603
+ 'description': z.string().optional(),
604
+ 'source': z.union([z.literal("configuration"), z.literal("native"), z.literal("history")]),
605
+ 'hidden': z.boolean().optional(),
606
+ 'reasoning': z.object({
607
+ 'options': z.array(z.object({
608
+ 'value': z.string(),
609
+ 'label': z.string(),
610
+ 'description': z.string().optional(),
611
+ })),
612
+ 'default': z.string().optional(),
613
+ }).optional(),
614
+ })),
615
+ 'defaultModel': z.string().optional(),
616
+ 'complete': z.boolean(),
617
+ 'customInput': z.boolean(),
618
+ 'unsupported': z.boolean().optional(),
619
+ 'reason': z.string().optional(),
620
+ }).optional(),
621
+ 'live': z.boolean(),
622
+ 'switchable': z.boolean(),
623
+ 'reason': z.string().optional(),
624
+ })]))
625
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_parameter_0$schema$value
626
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_parameter_0$schema$value ??= z.string())
627
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_result$schema$value
628
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_result$schema$value ??= z.object({
629
+ 'memberId': z.string(),
630
+ 'revision': z.number(),
631
+ 'current': z.object({
632
+ 'revision': z.number(),
633
+ 'selection': z.object({
634
+ 'model': z.union([z.object({
635
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
636
+ }), z.object({
637
+ 'mode': z.literal("value"),
638
+ 'value': z.string(),
639
+ })]),
640
+ 'effort': z.union([z.object({
641
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
642
+ }), z.object({
643
+ 'mode': z.literal("value"),
644
+ 'value': z.string(),
645
+ })]),
646
+ }),
647
+ 'resolved': z.object({
648
+ 'model': z.string().optional(),
649
+ 'effort': z.string().optional(),
650
+ }),
651
+ }),
652
+ 'pending': z.object({
653
+ 'revision': z.number(),
654
+ 'requestId': z.string(),
655
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
656
+ 'selection': z.object({
657
+ 'model': z.union([z.object({
658
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
659
+ }), z.object({
660
+ 'mode': z.literal("value"),
661
+ 'value': z.string(),
662
+ })]),
663
+ 'effort': z.union([z.object({
664
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
665
+ }), z.object({
666
+ 'mode': z.literal("value"),
667
+ 'value': z.string(),
668
+ })]),
669
+ }),
670
+ }).optional(),
671
+ 'operation': z.intersection(z.object({
672
+ 'revision': z.number(),
673
+ 'requestId': z.string(),
674
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
675
+ 'selection': z.object({
676
+ 'model': z.union([z.object({
677
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
678
+ }), z.object({
679
+ 'mode': z.literal("value"),
680
+ 'value': z.string(),
681
+ })]),
682
+ 'effort': z.union([z.object({
683
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
684
+ }), z.object({
685
+ 'mode': z.literal("value"),
686
+ 'value': z.string(),
687
+ })]),
688
+ }),
689
+ }), z.object({
690
+ 'previous': z.object({
691
+ 'revision': z.number(),
692
+ 'selection': z.object({
693
+ 'model': z.union([z.object({
694
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
695
+ }), z.object({
696
+ 'mode': z.literal("value"),
697
+ 'value': z.string(),
698
+ })]),
699
+ 'effort': z.union([z.object({
700
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
701
+ }), z.object({
702
+ 'mode': z.literal("value"),
703
+ 'value': z.string(),
704
+ })]),
705
+ }),
706
+ 'resolved': z.object({
707
+ 'model': z.string().optional(),
708
+ 'effort': z.string().optional(),
709
+ }),
710
+ }),
711
+ })).optional(),
712
+ 'status': z.union([z.literal("idle"), z.literal("pending"), z.literal("applying"), z.literal("reconciling"), z.literal("failed")]),
713
+ 'round': z.object({
714
+ 'id': z.string(),
715
+ 'configuration': z.object({
716
+ 'revision': z.number(),
717
+ 'selection': z.object({
718
+ 'model': z.union([z.object({
719
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
720
+ }), z.object({
721
+ 'mode': z.literal("value"),
722
+ 'value': z.string(),
723
+ })]),
724
+ 'effort': z.union([z.object({
725
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
726
+ }), z.object({
727
+ 'mode': z.literal("value"),
728
+ 'value': z.string(),
729
+ })]),
730
+ }),
731
+ 'resolved': z.object({
732
+ 'model': z.string().optional(),
733
+ 'effort': z.string().optional(),
734
+ }),
735
+ }),
736
+ }).optional(),
737
+ 'lockedReason': z.string().optional(),
738
+ 'frozen': z.object({
739
+ 'revision': z.number(),
740
+ 'selection': z.object({
741
+ 'model': z.union([z.object({
742
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
743
+ }), z.object({
744
+ 'mode': z.literal("value"),
745
+ 'value': z.string(),
746
+ })]),
747
+ 'effort': z.union([z.object({
748
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
749
+ }), z.object({
750
+ 'mode': z.literal("value"),
751
+ 'value': z.string(),
752
+ })]),
753
+ }),
754
+ 'resolved': z.object({
755
+ 'model': z.string().optional(),
756
+ 'effort': z.string().optional(),
757
+ }),
758
+ }).optional(),
759
+ 'error': z.string().optional(),
760
+ }))
761
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_0$schema$value
762
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_0$schema$value ??= z.string())
763
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_1$schema$value
764
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_1$schema$value ??= z.boolean())
765
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_result$schema$value
766
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_result$schema$value ??= z.union([z.literal(null), z.object({
767
+ 'status': z.union([z.literal("loading"), z.literal("ready"), z.literal("stale"), z.literal("error"), z.literal("unsupported")]),
768
+ 'refreshing': z.boolean(),
769
+ 'revision': z.number(),
770
+ 'refreshedAt': z.number().optional(),
771
+ 'entries': z.array(z.object({
772
+ 'value': z.string(),
773
+ 'label': z.string(),
774
+ 'resolvedModel': z.string().optional(),
775
+ 'description': z.string().optional(),
776
+ 'source': z.union([z.literal("configuration"), z.literal("native"), z.literal("history")]),
777
+ 'hidden': z.boolean().optional(),
778
+ 'reasoning': z.object({
779
+ 'options': z.array(z.object({
780
+ 'value': z.string(),
781
+ 'label': z.string(),
782
+ 'description': z.string().optional(),
783
+ })),
784
+ 'default': z.string().optional(),
785
+ }).optional(),
786
+ })),
787
+ 'defaultModel': z.string().optional(),
788
+ 'complete': z.boolean(),
789
+ 'customInput': z.boolean(),
790
+ 'unsupported': z.boolean().optional(),
791
+ 'reason': z.string().optional(),
792
+ })]))
793
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberInbox_parameter_0$schema$value
794
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberInbox_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberInbox_parameter_0$schema$value ??= z.string())
795
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberInbox_result$schema$value
796
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberInbox_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberInbox_result$schema$value ??= z.object({
797
+ 'memberId': z.string(),
798
+ 'paused': z.boolean(),
799
+ 'error': z.string().optional(),
800
+ 'messages': z.array(z.object({
801
+ 'id': z.string(),
802
+ 'text': z.string(),
803
+ 'status': z.union([z.literal("failed"), z.literal("cancelled"), z.literal("queued"), z.literal("running"), z.literal("done"), z.literal("uncertain")]),
804
+ 'createdAt': z.number(),
805
+ 'updatedAt': z.number(),
806
+ 'error': z.string().optional(),
807
+ })),
808
+ }))
809
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberModel_parameter_0$schema$value
810
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberModel_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberModel_parameter_0$schema$value ??= z.string())
811
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberModel_result$schema$value
812
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberModel_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberModel_result$schema$value ??= z.union([z.literal(null), z.object({
813
+ 'configuration': z.object({
814
+ 'memberId': z.string(),
815
+ 'revision': z.number(),
816
+ 'current': z.object({
817
+ 'revision': z.number(),
818
+ 'selection': z.object({
819
+ 'model': z.union([z.object({
820
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
821
+ }), z.object({
822
+ 'mode': z.literal("value"),
823
+ 'value': z.string(),
824
+ })]),
825
+ 'effort': z.union([z.object({
826
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
827
+ }), z.object({
828
+ 'mode': z.literal("value"),
829
+ 'value': z.string(),
830
+ })]),
831
+ }),
832
+ 'resolved': z.object({
833
+ 'model': z.string().optional(),
834
+ 'effort': z.string().optional(),
835
+ }),
836
+ }),
837
+ 'pending': z.object({
838
+ 'revision': z.number(),
839
+ 'requestId': z.string(),
840
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
841
+ 'selection': z.object({
842
+ 'model': z.union([z.object({
843
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
844
+ }), z.object({
845
+ 'mode': z.literal("value"),
846
+ 'value': z.string(),
847
+ })]),
848
+ 'effort': z.union([z.object({
849
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
850
+ }), z.object({
851
+ 'mode': z.literal("value"),
852
+ 'value': z.string(),
853
+ })]),
854
+ }),
855
+ }).optional(),
856
+ 'operation': z.intersection(z.object({
857
+ 'revision': z.number(),
858
+ 'requestId': z.string(),
859
+ 'kind': z.union([z.literal("selection"), z.literal("cancel")]),
860
+ 'selection': z.object({
861
+ 'model': z.union([z.object({
862
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
863
+ }), z.object({
864
+ 'mode': z.literal("value"),
865
+ 'value': z.string(),
866
+ })]),
867
+ 'effort': z.union([z.object({
868
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
869
+ }), z.object({
870
+ 'mode': z.literal("value"),
871
+ 'value': z.string(),
872
+ })]),
873
+ }),
874
+ }), z.object({
875
+ 'previous': z.object({
876
+ 'revision': z.number(),
877
+ 'selection': z.object({
878
+ 'model': z.union([z.object({
879
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
880
+ }), z.object({
881
+ 'mode': z.literal("value"),
882
+ 'value': z.string(),
883
+ })]),
884
+ 'effort': z.union([z.object({
885
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
886
+ }), z.object({
887
+ 'mode': z.literal("value"),
888
+ 'value': z.string(),
889
+ })]),
890
+ }),
891
+ 'resolved': z.object({
892
+ 'model': z.string().optional(),
893
+ 'effort': z.string().optional(),
894
+ }),
895
+ }),
896
+ })).optional(),
897
+ 'status': z.union([z.literal("idle"), z.literal("pending"), z.literal("applying"), z.literal("reconciling"), z.literal("failed")]),
898
+ 'round': z.object({
899
+ 'id': z.string(),
900
+ 'configuration': z.object({
901
+ 'revision': z.number(),
902
+ 'selection': z.object({
903
+ 'model': z.union([z.object({
904
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
905
+ }), z.object({
906
+ 'mode': z.literal("value"),
907
+ 'value': z.string(),
908
+ })]),
909
+ 'effort': z.union([z.object({
910
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
911
+ }), z.object({
912
+ 'mode': z.literal("value"),
913
+ 'value': z.string(),
914
+ })]),
915
+ }),
916
+ 'resolved': z.object({
917
+ 'model': z.string().optional(),
918
+ 'effort': z.string().optional(),
919
+ }),
920
+ }),
921
+ }).optional(),
922
+ 'lockedReason': z.string().optional(),
923
+ 'frozen': z.object({
924
+ 'revision': z.number(),
925
+ 'selection': z.object({
926
+ 'model': z.union([z.object({
927
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
928
+ }), z.object({
929
+ 'mode': z.literal("value"),
930
+ 'value': z.string(),
931
+ })]),
932
+ 'effort': z.union([z.object({
933
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
934
+ }), z.object({
935
+ 'mode': z.literal("value"),
936
+ 'value': z.string(),
937
+ })]),
938
+ }),
939
+ 'resolved': z.object({
940
+ 'model': z.string().optional(),
941
+ 'effort': z.string().optional(),
942
+ }),
943
+ }).optional(),
944
+ 'error': z.string().optional(),
945
+ }).optional(),
946
+ 'effective': z.string().optional(),
947
+ 'source': z.union([z.literal("override"), z.literal("delegation"), z.literal("settings"), z.literal("cli-config"), z.literal("cli-builtin")]),
948
+ 'override': z.string().optional(),
949
+ 'delegation': z.string().optional(),
950
+ 'settings': z.string().optional(),
951
+ 'cliDefault': z.string().optional(),
952
+ 'lastObserved': z.string().optional(),
953
+ 'choices': z.array(z.string()),
954
+ 'directory': z.object({
955
+ 'status': z.union([z.literal("loading"), z.literal("ready"), z.literal("stale"), z.literal("error"), z.literal("unsupported")]),
956
+ 'refreshing': z.boolean(),
957
+ 'revision': z.number(),
958
+ 'refreshedAt': z.number().optional(),
959
+ 'entries': z.array(z.object({
960
+ 'value': z.string(),
961
+ 'label': z.string(),
962
+ 'resolvedModel': z.string().optional(),
963
+ 'description': z.string().optional(),
964
+ 'source': z.union([z.literal("configuration"), z.literal("native"), z.literal("history")]),
965
+ 'hidden': z.boolean().optional(),
966
+ 'reasoning': z.object({
967
+ 'options': z.array(z.object({
968
+ 'value': z.string(),
969
+ 'label': z.string(),
970
+ 'description': z.string().optional(),
971
+ })),
972
+ 'default': z.string().optional(),
973
+ }).optional(),
974
+ })),
975
+ 'defaultModel': z.string().optional(),
976
+ 'complete': z.boolean(),
977
+ 'customInput': z.boolean(),
978
+ 'unsupported': z.boolean().optional(),
979
+ 'reason': z.string().optional(),
980
+ }).optional(),
981
+ 'live': z.boolean(),
982
+ 'switchable': z.boolean(),
983
+ 'reason': z.string().optional(),
984
+ })]))
985
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberOf_parameter_0$schema$value
986
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberOf_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberOf_parameter_0$schema$value ??= z.string())
987
+ let _khorsheed_dsh_local_agent_localAgentGateway_memberOf_result$schema$value
988
+ const _khorsheed_dsh_local_agent_localAgentGateway_memberOf_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_memberOf_result$schema$value ??= z.union([z.literal(null), z.object({
989
+ 'childSessionId': z.string(),
990
+ 'provider': z.string(),
991
+ 'parentSessionId': z.string(),
992
+ 'harnessDisplayName': z.string().optional(),
993
+ })]))
994
+ let _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_0$schema$value
995
+ const _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_0$schema$value ??= z.string())
996
+ let _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_1$schema$value
997
+ const _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_1$schema$value ??= z.union([z.undefined(), z.string()]))
998
+ let _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_2$schema$value
999
+ const _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_2$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_2$schema$value ??= z.boolean())
1000
+ let _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_result$schema$value
1001
+ const _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_result$schema$value ??= z.union([z.literal(null), z.object({
1002
+ 'status': z.union([z.literal("loading"), z.literal("ready"), z.literal("stale"), z.literal("error"), z.literal("unsupported")]),
1003
+ 'refreshing': z.boolean(),
1004
+ 'revision': z.number(),
1005
+ 'refreshedAt': z.number().optional(),
1006
+ 'entries': z.array(z.object({
1007
+ 'value': z.string(),
1008
+ 'label': z.string(),
1009
+ 'resolvedModel': z.string().optional(),
1010
+ 'description': z.string().optional(),
1011
+ 'source': z.union([z.literal("configuration"), z.literal("native"), z.literal("history")]),
1012
+ 'hidden': z.boolean().optional(),
1013
+ 'reasoning': z.object({
1014
+ 'options': z.array(z.object({
1015
+ 'value': z.string(),
1016
+ 'label': z.string(),
1017
+ 'description': z.string().optional(),
1018
+ })),
1019
+ 'default': z.string().optional(),
1020
+ }).optional(),
1021
+ })),
1022
+ 'defaultModel': z.string().optional(),
1023
+ 'complete': z.boolean(),
1024
+ 'customInput': z.boolean(),
1025
+ 'unsupported': z.boolean().optional(),
1026
+ 'reason': z.string().optional(),
1027
+ })]))
1028
+ let _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_0$schema$value
1029
+ const _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_0$schema$value ??= z.string())
1030
+ let _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_1$schema$value
1031
+ const _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_1$schema$value ??= z.string())
1032
+ let _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_2$schema$value
1033
+ const _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_2$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_2$schema$value ??= z.union([z.undefined(), z.string()]))
1034
+ let _khorsheed_dsh_local_agent_localAgentGateway_promptMember_result$schema$value
1035
+ const _khorsheed_dsh_local_agent_localAgentGateway_promptMember_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_promptMember_result$schema$value ??= z.union([z.object({
1036
+ 'ok': z.literal(true),
1037
+ 'requestId': z.string().optional(),
1038
+ }), z.object({
1039
+ 'ok': z.literal(false),
1040
+ 'error': z.string(),
1041
+ })]))
1042
+ let _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_0$schema$value
1043
+ const _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_0$schema$value ??= z.string())
1044
+ let _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_1$schema$value
1045
+ const _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_1$schema$value ??= z.number())
1046
+ let _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_result$schema$value
1047
+ const _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_result$schema$value ??= z.void())
1048
+ let _khorsheed_dsh_local_agent_localAgentGateway_roster_result$schema$value
1049
+ const _khorsheed_dsh_local_agent_localAgentGateway_roster_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_roster_result$schema$value ??= z.array(z.object({
1050
+ 'name': z.string(),
1051
+ 'displayName': z.string(),
1052
+ })))
1053
+ let _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_0$schema$value
1054
+ const _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_0$schema$value ??= z.string())
1055
+ let _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_1$schema$value
1056
+ const _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_1$schema$value ??= z.string())
1057
+ let _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_2$schema$value
1058
+ const _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_2$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_2$schema$value ??= z.number())
1059
+ let _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_3$schema$value
1060
+ const _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_3$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_3$schema$value ??= z.object({
1061
+ 'model': z.union([z.object({
1062
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
1063
+ }), z.object({
1064
+ 'mode': z.literal("value"),
1065
+ 'value': z.string(),
1066
+ })]),
1067
+ 'effort': z.union([z.object({
1068
+ 'mode': z.union([z.literal("inherit"), z.literal("default")]),
1069
+ }), z.object({
1070
+ 'mode': z.literal("value"),
1071
+ 'value': z.string(),
1072
+ })]),
1073
+ }))
1074
+ let _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_result$schema$value
1075
+ const _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_result$schema$value ??= z.object({
1076
+ 'requestId': z.string(),
1077
+ 'revision': z.number(),
1078
+ 'status': z.union([z.literal("pending"), z.literal("applying"), z.literal("failed"), z.literal("unsupported"), z.literal("applied"), z.literal("cancelled"), z.literal("conflict"), z.literal("locked")]),
1079
+ 'error': z.string().optional(),
1080
+ }))
1081
+ let _khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_0$schema$value
1082
+ const _khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_0$schema$value ??= z.string())
1083
+ let _khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_1$schema$value
1084
+ const _khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_1$schema$value ??= z.union([z.undefined(), z.string()]))
1085
+ let _khorsheed_dsh_local_agent_localAgentGateway_sessions_result$schema$value
1086
+ const _khorsheed_dsh_local_agent_localAgentGateway_sessions_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_sessions_result$schema$value ??= z.array(z.object({
1087
+ 'id': z.string(),
1088
+ 'workDir': z.string(),
1089
+ 'title': z.string().optional(),
1090
+ 'startedAt': z.number().optional(),
1091
+ })))
1092
+ let _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_0$schema$value
1093
+ const _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_0$schema$value ??= z.string())
1094
+ let _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_1$schema$value
1095
+ const _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_1$schema$value ??= z.union([z.undefined(), z.string()]))
1096
+ let _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_result$schema$value
1097
+ const _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_result$schema$value ??= z.union([z.object({
1098
+ 'ok': z.literal(true),
1099
+ 'requestId': z.string().optional(),
1100
+ }), z.object({
1101
+ 'ok': z.literal(false),
1102
+ 'error': z.string(),
1103
+ })]))
1104
+ let _khorsheed_dsh_local_agent_localAgentGateway_status_parameter_0$schema$value
1105
+ const _khorsheed_dsh_local_agent_localAgentGateway_status_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_status_parameter_0$schema$value ??= z.string())
1106
+ let _khorsheed_dsh_local_agent_localAgentGateway_status_parameter_1$schema$value
1107
+ const _khorsheed_dsh_local_agent_localAgentGateway_status_parameter_1$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_status_parameter_1$schema$value ??= z.union([z.undefined(), z.string()]))
1108
+ let _khorsheed_dsh_local_agent_localAgentGateway_status_result$schema$value
1109
+ const _khorsheed_dsh_local_agent_localAgentGateway_status_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_status_result$schema$value ??= z.object({
1110
+ 'name': z.string(),
1111
+ 'displayName': z.string(),
1112
+ 'authenticated': z.boolean(),
1113
+ 'credentialState': z.union([z.literal("absent"), z.literal("present-unverified"), z.literal("verified"), z.literal("rejected")]),
1114
+ 'homeDir': z.string(),
1115
+ 'scope': z.string().optional(),
1116
+ 'delegationProvider': z.string().optional(),
1117
+ 'loginable': z.boolean().optional(),
1118
+ 'loginAwaitingCode': z.boolean().optional(),
1119
+ 'logoutable': z.boolean().optional(),
1120
+ 'effectiveSettings': z.object({
1121
+ 'drive': z.union([z.literal("exec"), z.literal("live")]),
1122
+ 'sandbox': z.string().optional(),
1123
+ 'permissionMode': z.string().optional(),
1124
+ 'autoApprove': z.boolean().optional(),
1125
+ 'reasoningEffort': z.string().optional(),
1126
+ 'baseUrlSet': z.boolean(),
1127
+ 'baseUrlHost': z.string().optional(),
1128
+ 'cliVersion': z.string().optional(),
1129
+ 'model': z.string().optional(),
1130
+ 'containerNodeOptions': z.string().optional(),
1131
+ }).optional(),
1132
+ }))
1133
+ let _khorsheed_dsh_local_agent_localAgentGateway_stopMember_parameter_0$schema$value
1134
+ const _khorsheed_dsh_local_agent_localAgentGateway_stopMember_parameter_0$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_stopMember_parameter_0$schema$value ??= z.string())
1135
+ let _khorsheed_dsh_local_agent_localAgentGateway_stopMember_result$schema$value
1136
+ const _khorsheed_dsh_local_agent_localAgentGateway_stopMember_result$schema = () => (_khorsheed_dsh_local_agent_localAgentGateway_stopMember_result$schema$value ??= z.boolean())
1137
+
1138
+ export const TYPERT = {
1139
+ package: '@khorsheed/dsh-local-agent',
1140
+ face: 'host',
1141
+ schemas: [
1142
+ ],
1143
+ invocations: [
1144
+ {
1145
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/activeDelegations',
1146
+ service: 'localAgentGateway',
1147
+ namespace: 'localAgentGateway',
1148
+ method: 'activeDelegations',
1149
+ invocation: { kind: 'direct' },
1150
+ parameters: [
1151
+ ],
1152
+ result: {
1153
+ mode: 'strict',
1154
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/activeDelegations:result',
1155
+ create: _khorsheed_dsh_local_agent_localAgentGateway_activeDelegations_result$schema,
1156
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_activeDelegations_result$schema(),
1157
+ },
1158
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":173,"column":3},
1159
+ },
1160
+ {
1161
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/cancelMemberConfiguration',
1162
+ service: 'localAgentGateway',
1163
+ namespace: 'localAgentGateway',
1164
+ method: 'cancelMemberConfiguration',
1165
+ invocation: { kind: 'direct' },
1166
+ parameters: [
1167
+ {
1168
+ name: 'childSessionId',
1169
+ wire: 'childSessionId',
1170
+ source: 'json',
1171
+ codec: {
1172
+ mode: 'strict',
1173
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/cancelMemberConfiguration:childSessionId',
1174
+ create: _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_0$schema,
1175
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_0$schema(),
1176
+ },
1177
+ },
1178
+ {
1179
+ name: 'requestId',
1180
+ wire: 'requestId',
1181
+ source: 'json',
1182
+ codec: {
1183
+ mode: 'strict',
1184
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/cancelMemberConfiguration:requestId',
1185
+ create: _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_1$schema,
1186
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_1$schema(),
1187
+ },
1188
+ },
1189
+ {
1190
+ name: 'expectedRevision',
1191
+ wire: 'expectedRevision',
1192
+ source: 'json',
1193
+ codec: {
1194
+ mode: 'strict',
1195
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/cancelMemberConfiguration:expectedRevision',
1196
+ create: _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_2$schema,
1197
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_parameter_2$schema(),
1198
+ },
1199
+ },
1200
+ ],
1201
+ result: {
1202
+ mode: 'strict',
1203
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentControlReceipt',
1204
+ create: _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_result$schema,
1205
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_cancelMemberConfiguration_result$schema(),
1206
+ },
1207
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":335,"column":9},
1208
+ },
1209
+ {
1210
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/controlMemberInbox',
1211
+ service: 'localAgentGateway',
1212
+ namespace: 'localAgentGateway',
1213
+ method: 'controlMemberInbox',
1214
+ invocation: { kind: 'direct' },
1215
+ parameters: [
1216
+ {
1217
+ name: 'childSessionId',
1218
+ wire: 'childSessionId',
1219
+ source: 'json',
1220
+ codec: {
1221
+ mode: 'strict',
1222
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/controlMemberInbox:childSessionId',
1223
+ create: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_0$schema,
1224
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_0$schema(),
1225
+ },
1226
+ },
1227
+ {
1228
+ name: 'action',
1229
+ wire: 'action',
1230
+ source: 'json',
1231
+ codec: {
1232
+ mode: 'strict',
1233
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/controlMemberInbox:action',
1234
+ create: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_1$schema,
1235
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_1$schema(),
1236
+ },
1237
+ },
1238
+ {
1239
+ name: 'requestId',
1240
+ wire: 'requestId',
1241
+ source: 'json',
1242
+ acceptsUndefined: true,
1243
+ codec: {
1244
+ mode: 'strict',
1245
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/controlMemberInbox:requestId',
1246
+ create: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_2$schema,
1247
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_2$schema(),
1248
+ },
1249
+ },
1250
+ {
1251
+ name: 'outcome',
1252
+ wire: 'outcome',
1253
+ source: 'json',
1254
+ acceptsUndefined: true,
1255
+ codec: {
1256
+ mode: 'strict',
1257
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/controlMemberInbox:outcome',
1258
+ create: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_3$schema,
1259
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_3$schema(),
1260
+ },
1261
+ },
1262
+ {
1263
+ name: 'evidence',
1264
+ wire: 'evidence',
1265
+ source: 'json',
1266
+ acceptsUndefined: true,
1267
+ codec: {
1268
+ mode: 'strict',
1269
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/controlMemberInbox:evidence',
1270
+ create: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_4$schema,
1271
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_parameter_4$schema(),
1272
+ },
1273
+ },
1274
+ ],
1275
+ result: {
1276
+ mode: 'strict',
1277
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentPromptResult',
1278
+ create: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_result$schema,
1279
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_controlMemberInbox_result$schema(),
1280
+ },
1281
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":374,"column":3},
1282
+ },
1283
+ {
1284
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/followMemberConfiguration',
1285
+ service: 'localAgentGateway',
1286
+ namespace: 'localAgentGateway',
1287
+ method: 'followMemberConfiguration',
1288
+ mode: 'stream',
1289
+ invocation: { kind: 'direct' },
1290
+ parameters: [
1291
+ {
1292
+ name: 'childSessionId',
1293
+ wire: 'childSessionId',
1294
+ source: 'json',
1295
+ codec: {
1296
+ mode: 'strict',
1297
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/followMemberConfiguration:childSessionId',
1298
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_parameter_0$schema,
1299
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_parameter_0$schema(),
1300
+ },
1301
+ },
1302
+ ],
1303
+ cancellation: { parameter: 'signal' },
1304
+ result: {
1305
+ mode: 'strict',
1306
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentMemberControlState',
1307
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_result$schema,
1308
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followMemberConfiguration_result$schema(),
1309
+ },
1310
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":345,"column":3},
1311
+ },
1312
+ {
1313
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/followMemberDirectory',
1314
+ service: 'localAgentGateway',
1315
+ namespace: 'localAgentGateway',
1316
+ method: 'followMemberDirectory',
1317
+ mode: 'stream',
1318
+ invocation: { kind: 'direct' },
1319
+ parameters: [
1320
+ {
1321
+ name: 'childSessionId',
1322
+ wire: 'childSessionId',
1323
+ source: 'json',
1324
+ codec: {
1325
+ mode: 'strict',
1326
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/followMemberDirectory:childSessionId',
1327
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_parameter_0$schema,
1328
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_parameter_0$schema(),
1329
+ },
1330
+ },
1331
+ ],
1332
+ cancellation: { parameter: 'signal' },
1333
+ result: {
1334
+ mode: 'strict',
1335
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentModelDirectory',
1336
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_result$schema,
1337
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followMemberDirectory_result$schema(),
1338
+ },
1339
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":144,"column":10},
1340
+ },
1341
+ {
1342
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/followMemberOutput',
1343
+ service: 'localAgentGateway',
1344
+ namespace: 'localAgentGateway',
1345
+ method: 'followMemberOutput',
1346
+ mode: 'stream',
1347
+ invocation: { kind: 'direct' },
1348
+ parameters: [
1349
+ {
1350
+ name: 'childSessionId',
1351
+ wire: 'childSessionId',
1352
+ source: 'json',
1353
+ codec: {
1354
+ mode: 'strict',
1355
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/followMemberOutput:childSessionId',
1356
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_parameter_0$schema,
1357
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_parameter_0$schema(),
1358
+ },
1359
+ },
1360
+ ],
1361
+ cancellation: { parameter: 'signal' },
1362
+ result: {
1363
+ mode: 'strict',
1364
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentStreamFrame',
1365
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_result$schema,
1366
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followMemberOutput_result$schema(),
1367
+ },
1368
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":71,"column":3},
1369
+ },
1370
+ {
1371
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/followMembers',
1372
+ service: 'localAgentGateway',
1373
+ namespace: 'localAgentGateway',
1374
+ method: 'followMembers',
1375
+ mode: 'stream',
1376
+ invocation: { kind: 'direct' },
1377
+ parameters: [
1378
+ {
1379
+ name: 'requests',
1380
+ wire: 'requests',
1381
+ source: 'json',
1382
+ codec: {
1383
+ mode: 'strict',
1384
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/followMembers:requests',
1385
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followMembers_parameter_0$schema,
1386
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followMembers_parameter_0$schema(),
1387
+ },
1388
+ },
1389
+ ],
1390
+ cancellation: { parameter: 'signal' },
1391
+ result: {
1392
+ mode: 'strict',
1393
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentMemberFeedEvent',
1394
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followMembers_result$schema,
1395
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followMembers_result$schema(),
1396
+ },
1397
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":77,"column":3},
1398
+ },
1399
+ {
1400
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/followModelDirectory',
1401
+ service: 'localAgentGateway',
1402
+ namespace: 'localAgentGateway',
1403
+ method: 'followModelDirectory',
1404
+ mode: 'stream',
1405
+ invocation: { kind: 'direct' },
1406
+ parameters: [
1407
+ {
1408
+ name: 'name',
1409
+ wire: 'name',
1410
+ source: 'json',
1411
+ codec: {
1412
+ mode: 'strict',
1413
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/followModelDirectory:name',
1414
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_0$schema,
1415
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_0$schema(),
1416
+ },
1417
+ },
1418
+ {
1419
+ name: 'childSessionId',
1420
+ wire: 'childSessionId',
1421
+ source: 'json',
1422
+ acceptsUndefined: true,
1423
+ codec: {
1424
+ mode: 'strict',
1425
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/followModelDirectory:childSessionId',
1426
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_1$schema,
1427
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_parameter_1$schema(),
1428
+ },
1429
+ },
1430
+ ],
1431
+ cancellation: { parameter: 'signal' },
1432
+ result: {
1433
+ mode: 'strict',
1434
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentModelDirectory',
1435
+ create: _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_result$schema,
1436
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_followModelDirectory_result$schema(),
1437
+ },
1438
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":126,"column":10},
1439
+ },
1440
+ {
1441
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/harnessModel',
1442
+ service: 'localAgentGateway',
1443
+ namespace: 'localAgentGateway',
1444
+ method: 'harnessModel',
1445
+ invocation: { kind: 'direct' },
1446
+ parameters: [
1447
+ {
1448
+ name: 'name',
1449
+ wire: 'name',
1450
+ source: 'json',
1451
+ codec: {
1452
+ mode: 'strict',
1453
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/harnessModel:name',
1454
+ create: _khorsheed_dsh_local_agent_localAgentGateway_harnessModel_parameter_0$schema,
1455
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_harnessModel_parameter_0$schema(),
1456
+ },
1457
+ },
1458
+ ],
1459
+ result: {
1460
+ mode: 'strict',
1461
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/harnessModel:result',
1462
+ create: _khorsheed_dsh_local_agent_localAgentGateway_harnessModel_result$schema,
1463
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_harnessModel_result$schema(),
1464
+ },
1465
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":246,"column":9},
1466
+ },
1467
+ {
1468
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/memberConfiguration',
1469
+ service: 'localAgentGateway',
1470
+ namespace: 'localAgentGateway',
1471
+ method: 'memberConfiguration',
1472
+ invocation: { kind: 'direct' },
1473
+ parameters: [
1474
+ {
1475
+ name: 'childSessionId',
1476
+ wire: 'childSessionId',
1477
+ source: 'json',
1478
+ codec: {
1479
+ mode: 'strict',
1480
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/memberConfiguration:childSessionId',
1481
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_parameter_0$schema,
1482
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_parameter_0$schema(),
1483
+ },
1484
+ },
1485
+ ],
1486
+ result: {
1487
+ mode: 'strict',
1488
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentMemberControlState',
1489
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_result$schema,
1490
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberConfiguration_result$schema(),
1491
+ },
1492
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":325,"column":9},
1493
+ },
1494
+ {
1495
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/memberDirectory',
1496
+ service: 'localAgentGateway',
1497
+ namespace: 'localAgentGateway',
1498
+ method: 'memberDirectory',
1499
+ invocation: { kind: 'direct' },
1500
+ parameters: [
1501
+ {
1502
+ name: 'childSessionId',
1503
+ wire: 'childSessionId',
1504
+ source: 'json',
1505
+ codec: {
1506
+ mode: 'strict',
1507
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/memberDirectory:childSessionId',
1508
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_0$schema,
1509
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_0$schema(),
1510
+ },
1511
+ },
1512
+ {
1513
+ name: 'refresh',
1514
+ wire: 'refresh',
1515
+ source: 'json',
1516
+ codec: {
1517
+ mode: 'strict',
1518
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/memberDirectory:refresh',
1519
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_1$schema,
1520
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_parameter_1$schema(),
1521
+ },
1522
+ },
1523
+ ],
1524
+ result: {
1525
+ mode: 'strict',
1526
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/memberDirectory:result',
1527
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_result$schema,
1528
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberDirectory_result$schema(),
1529
+ },
1530
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":137,"column":9},
1531
+ },
1532
+ {
1533
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/memberInbox',
1534
+ service: 'localAgentGateway',
1535
+ namespace: 'localAgentGateway',
1536
+ method: 'memberInbox',
1537
+ invocation: { kind: 'direct' },
1538
+ parameters: [
1539
+ {
1540
+ name: 'childSessionId',
1541
+ wire: 'childSessionId',
1542
+ source: 'json',
1543
+ codec: {
1544
+ mode: 'strict',
1545
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/memberInbox:childSessionId',
1546
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberInbox_parameter_0$schema,
1547
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberInbox_parameter_0$schema(),
1548
+ },
1549
+ },
1550
+ ],
1551
+ result: {
1552
+ mode: 'strict',
1553
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentMemberInbox',
1554
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberInbox_result$schema,
1555
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberInbox_result$schema(),
1556
+ },
1557
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":371,"column":3},
1558
+ },
1559
+ {
1560
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/memberModel',
1561
+ service: 'localAgentGateway',
1562
+ namespace: 'localAgentGateway',
1563
+ method: 'memberModel',
1564
+ invocation: { kind: 'direct' },
1565
+ parameters: [
1566
+ {
1567
+ name: 'childSessionId',
1568
+ wire: 'childSessionId',
1569
+ source: 'json',
1570
+ codec: {
1571
+ mode: 'strict',
1572
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/memberModel:childSessionId',
1573
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberModel_parameter_0$schema,
1574
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberModel_parameter_0$schema(),
1575
+ },
1576
+ },
1577
+ ],
1578
+ result: {
1579
+ mode: 'strict',
1580
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/memberModel:result',
1581
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberModel_result$schema,
1582
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberModel_result$schema(),
1583
+ },
1584
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":273,"column":9},
1585
+ },
1586
+ {
1587
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/memberOf',
1588
+ service: 'localAgentGateway',
1589
+ namespace: 'localAgentGateway',
1590
+ method: 'memberOf',
1591
+ invocation: { kind: 'direct' },
1592
+ parameters: [
1593
+ {
1594
+ name: 'childSessionId',
1595
+ wire: 'childSessionId',
1596
+ source: 'json',
1597
+ codec: {
1598
+ mode: 'strict',
1599
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/memberOf:childSessionId',
1600
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberOf_parameter_0$schema,
1601
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberOf_parameter_0$schema(),
1602
+ },
1603
+ },
1604
+ ],
1605
+ result: {
1606
+ mode: 'strict',
1607
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/memberOf:result',
1608
+ create: _khorsheed_dsh_local_agent_localAgentGateway_memberOf_result$schema,
1609
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_memberOf_result$schema(),
1610
+ },
1611
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":220,"column":3},
1612
+ },
1613
+ {
1614
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/modelDirectory',
1615
+ service: 'localAgentGateway',
1616
+ namespace: 'localAgentGateway',
1617
+ method: 'modelDirectory',
1618
+ invocation: { kind: 'direct' },
1619
+ parameters: [
1620
+ {
1621
+ name: 'name',
1622
+ wire: 'name',
1623
+ source: 'json',
1624
+ codec: {
1625
+ mode: 'strict',
1626
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/modelDirectory:name',
1627
+ create: _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_0$schema,
1628
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_0$schema(),
1629
+ },
1630
+ },
1631
+ {
1632
+ name: 'childSessionId',
1633
+ wire: 'childSessionId',
1634
+ source: 'json',
1635
+ acceptsUndefined: true,
1636
+ codec: {
1637
+ mode: 'strict',
1638
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/modelDirectory:childSessionId',
1639
+ create: _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_1$schema,
1640
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_1$schema(),
1641
+ },
1642
+ },
1643
+ {
1644
+ name: 'refresh',
1645
+ wire: 'refresh',
1646
+ source: 'json',
1647
+ codec: {
1648
+ mode: 'strict',
1649
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/modelDirectory:refresh',
1650
+ create: _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_2$schema,
1651
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_parameter_2$schema(),
1652
+ },
1653
+ },
1654
+ ],
1655
+ result: {
1656
+ mode: 'strict',
1657
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/modelDirectory:result',
1658
+ create: _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_result$schema,
1659
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_modelDirectory_result$schema(),
1660
+ },
1661
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":113,"column":9},
1662
+ },
1663
+ {
1664
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/promptMember',
1665
+ service: 'localAgentGateway',
1666
+ namespace: 'localAgentGateway',
1667
+ method: 'promptMember',
1668
+ invocation: { kind: 'direct' },
1669
+ parameters: [
1670
+ {
1671
+ name: 'childSessionId',
1672
+ wire: 'childSessionId',
1673
+ source: 'json',
1674
+ codec: {
1675
+ mode: 'strict',
1676
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/promptMember:childSessionId',
1677
+ create: _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_0$schema,
1678
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_0$schema(),
1679
+ },
1680
+ },
1681
+ {
1682
+ name: 'text',
1683
+ wire: 'text',
1684
+ source: 'json',
1685
+ codec: {
1686
+ mode: 'strict',
1687
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/promptMember:text',
1688
+ create: _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_1$schema,
1689
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_1$schema(),
1690
+ },
1691
+ },
1692
+ {
1693
+ name: 'requestId',
1694
+ wire: 'requestId',
1695
+ source: 'json',
1696
+ acceptsUndefined: true,
1697
+ codec: {
1698
+ mode: 'strict',
1699
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/promptMember:requestId',
1700
+ create: _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_2$schema,
1701
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_promptMember_parameter_2$schema(),
1702
+ },
1703
+ },
1704
+ ],
1705
+ result: {
1706
+ mode: 'strict',
1707
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentPromptResult',
1708
+ create: _khorsheed_dsh_local_agent_localAgentGateway_promptMember_result$schema,
1709
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_promptMember_result$schema(),
1710
+ },
1711
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":365,"column":9},
1712
+ },
1713
+ {
1714
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/retryMemberConfiguration',
1715
+ service: 'localAgentGateway',
1716
+ namespace: 'localAgentGateway',
1717
+ method: 'retryMemberConfiguration',
1718
+ invocation: { kind: 'direct' },
1719
+ parameters: [
1720
+ {
1721
+ name: 'childSessionId',
1722
+ wire: 'childSessionId',
1723
+ source: 'json',
1724
+ codec: {
1725
+ mode: 'strict',
1726
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/retryMemberConfiguration:childSessionId',
1727
+ create: _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_0$schema,
1728
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_0$schema(),
1729
+ },
1730
+ },
1731
+ {
1732
+ name: 'expectedRevision',
1733
+ wire: 'expectedRevision',
1734
+ source: 'json',
1735
+ codec: {
1736
+ mode: 'strict',
1737
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/retryMemberConfiguration:expectedRevision',
1738
+ create: _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_1$schema,
1739
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_parameter_1$schema(),
1740
+ },
1741
+ },
1742
+ ],
1743
+ result: {
1744
+ mode: 'strict',
1745
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/retryMemberConfiguration:result',
1746
+ create: _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_result$schema,
1747
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_retryMemberConfiguration_result$schema(),
1748
+ },
1749
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":340,"column":9},
1750
+ },
1751
+ {
1752
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/roster',
1753
+ service: 'localAgentGateway',
1754
+ namespace: 'localAgentGateway',
1755
+ method: 'roster',
1756
+ invocation: { kind: 'direct' },
1757
+ parameters: [
1758
+ ],
1759
+ result: {
1760
+ mode: 'strict',
1761
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/roster:result',
1762
+ create: _khorsheed_dsh_local_agent_localAgentGateway_roster_result$schema,
1763
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_roster_result$schema(),
1764
+ },
1765
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":159,"column":3},
1766
+ },
1767
+ {
1768
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/selectMemberConfiguration',
1769
+ service: 'localAgentGateway',
1770
+ namespace: 'localAgentGateway',
1771
+ method: 'selectMemberConfiguration',
1772
+ invocation: { kind: 'direct' },
1773
+ parameters: [
1774
+ {
1775
+ name: 'childSessionId',
1776
+ wire: 'childSessionId',
1777
+ source: 'json',
1778
+ codec: {
1779
+ mode: 'strict',
1780
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/selectMemberConfiguration:childSessionId',
1781
+ create: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_0$schema,
1782
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_0$schema(),
1783
+ },
1784
+ },
1785
+ {
1786
+ name: 'requestId',
1787
+ wire: 'requestId',
1788
+ source: 'json',
1789
+ codec: {
1790
+ mode: 'strict',
1791
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/selectMemberConfiguration:requestId',
1792
+ create: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_1$schema,
1793
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_1$schema(),
1794
+ },
1795
+ },
1796
+ {
1797
+ name: 'expectedRevision',
1798
+ wire: 'expectedRevision',
1799
+ source: 'json',
1800
+ codec: {
1801
+ mode: 'strict',
1802
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/selectMemberConfiguration:expectedRevision',
1803
+ create: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_2$schema,
1804
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_2$schema(),
1805
+ },
1806
+ },
1807
+ {
1808
+ name: 'selection',
1809
+ wire: 'selection',
1810
+ source: 'json',
1811
+ codec: {
1812
+ mode: 'strict',
1813
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentMemberConfiguration',
1814
+ create: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_3$schema,
1815
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_parameter_3$schema(),
1816
+ },
1817
+ },
1818
+ ],
1819
+ result: {
1820
+ mode: 'strict',
1821
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentControlReceipt',
1822
+ create: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_result$schema,
1823
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_selectMemberConfiguration_result$schema(),
1824
+ },
1825
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":330,"column":9},
1826
+ },
1827
+ {
1828
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/sessions',
1829
+ service: 'localAgentGateway',
1830
+ namespace: 'localAgentGateway',
1831
+ method: 'sessions',
1832
+ invocation: { kind: 'direct' },
1833
+ parameters: [
1834
+ {
1835
+ name: 'name',
1836
+ wire: 'name',
1837
+ source: 'json',
1838
+ codec: {
1839
+ mode: 'strict',
1840
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/sessions:name',
1841
+ create: _khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_0$schema,
1842
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_0$schema(),
1843
+ },
1844
+ },
1845
+ {
1846
+ name: 'sessionId',
1847
+ wire: 'sessionId',
1848
+ source: 'json',
1849
+ acceptsUndefined: true,
1850
+ codec: {
1851
+ mode: 'strict',
1852
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/sessions:sessionId',
1853
+ create: _khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_1$schema,
1854
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_sessions_parameter_1$schema(),
1855
+ },
1856
+ },
1857
+ ],
1858
+ result: {
1859
+ mode: 'strict',
1860
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/sessions:result',
1861
+ create: _khorsheed_dsh_local_agent_localAgentGateway_sessions_result$schema,
1862
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_sessions_result$schema(),
1863
+ },
1864
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":200,"column":9},
1865
+ },
1866
+ {
1867
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/setMemberModel',
1868
+ service: 'localAgentGateway',
1869
+ namespace: 'localAgentGateway',
1870
+ method: 'setMemberModel',
1871
+ invocation: { kind: 'direct' },
1872
+ parameters: [
1873
+ {
1874
+ name: 'childSessionId',
1875
+ wire: 'childSessionId',
1876
+ source: 'json',
1877
+ codec: {
1878
+ mode: 'strict',
1879
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/setMemberModel:childSessionId',
1880
+ create: _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_0$schema,
1881
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_0$schema(),
1882
+ },
1883
+ },
1884
+ {
1885
+ name: 'model',
1886
+ wire: 'model',
1887
+ source: 'json',
1888
+ acceptsUndefined: true,
1889
+ codec: {
1890
+ mode: 'strict',
1891
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/setMemberModel:model',
1892
+ create: _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_1$schema,
1893
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_parameter_1$schema(),
1894
+ },
1895
+ },
1896
+ ],
1897
+ result: {
1898
+ mode: 'strict',
1899
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentPromptResult',
1900
+ create: _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_result$schema,
1901
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_setMemberModel_result$schema(),
1902
+ },
1903
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":305,"column":9},
1904
+ },
1905
+ {
1906
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/status',
1907
+ service: 'localAgentGateway',
1908
+ namespace: 'localAgentGateway',
1909
+ method: 'status',
1910
+ invocation: { kind: 'direct' },
1911
+ parameters: [
1912
+ {
1913
+ name: 'name',
1914
+ wire: 'name',
1915
+ source: 'json',
1916
+ codec: {
1917
+ mode: 'strict',
1918
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/status:name',
1919
+ create: _khorsheed_dsh_local_agent_localAgentGateway_status_parameter_0$schema,
1920
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_status_parameter_0$schema(),
1921
+ },
1922
+ },
1923
+ {
1924
+ name: 'scope',
1925
+ wire: 'scope',
1926
+ source: 'json',
1927
+ acceptsUndefined: true,
1928
+ codec: {
1929
+ mode: 'strict',
1930
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/status:scope',
1931
+ create: _khorsheed_dsh_local_agent_localAgentGateway_status_parameter_1$schema,
1932
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_status_parameter_1$schema(),
1933
+ },
1934
+ },
1935
+ ],
1936
+ result: {
1937
+ mode: 'strict',
1938
+ typeSymbol: '@khorsheed/dsh-local-agent/types#LocalAgentStatus',
1939
+ create: _khorsheed_dsh_local_agent_localAgentGateway_status_result$schema,
1940
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_status_result$schema(),
1941
+ },
1942
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":186,"column":3},
1943
+ },
1944
+ {
1945
+ id: '@khorsheed/dsh-local-agent#localAgentGateway/stopMember',
1946
+ service: 'localAgentGateway',
1947
+ namespace: 'localAgentGateway',
1948
+ method: 'stopMember',
1949
+ invocation: { kind: 'direct' },
1950
+ parameters: [
1951
+ {
1952
+ name: 'childSessionId',
1953
+ wire: 'childSessionId',
1954
+ source: 'json',
1955
+ codec: {
1956
+ mode: 'strict',
1957
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/stopMember:childSessionId',
1958
+ create: _khorsheed_dsh_local_agent_localAgentGateway_stopMember_parameter_0$schema,
1959
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_stopMember_parameter_0$schema(),
1960
+ },
1961
+ },
1962
+ ],
1963
+ result: {
1964
+ mode: 'strict',
1965
+ typeSymbol: '@khorsheed/dsh-local-agent#localAgentGateway/stopMember:result',
1966
+ create: _khorsheed_dsh_local_agent_localAgentGateway_stopMember_result$schema,
1967
+ schema: _khorsheed_dsh_local_agent_localAgentGateway_stopMember_result$schema(),
1968
+ },
1969
+ sourceLocation: {"file":"packages/local-agent/src/gateway.ts","line":393,"column":3},
1970
+ },
1971
+ ],
1972
+ model: {
1973
+ "services": [
1974
+ {
1975
+ "description": "Registry of local code-agent harnesses and the per-harness command family.",
1976
+ "summary": "Registry of local code-agent harnesses and the per-harness command family.",
1977
+ "tags": [
1978
+ {
1979
+ "name": "module",
1980
+ "text": "@module"
1981
+ },
1982
+ {
1983
+ "name": "khorsheed",
1984
+ "comment": "/dsh-local-agent",
1985
+ "text": "@khorsheed/dsh-local-agent"
1986
+ }
1987
+ ],
1988
+ "jsDoc": "/**\n * Registry of local code-agent harnesses and the per-harness command family.\n * @module @khorsheed/dsh-local-agent\n */",
1989
+ "key": "localAgent",
1990
+ "exportName": "LocalAgentRegistry",
1991
+ "members": [
1992
+ {
1993
+ "kind": "property",
1994
+ "name": "memberInbox",
1995
+ "signature": "readonly memberInbox: MemberInbox"
1996
+ },
1997
+ {
1998
+ "kind": "method",
1999
+ "name": "withMemberConfigurationRound",
2000
+ "signature": "withMemberConfigurationRound(binding: LocalAgentMemberBinding, start: (configuration: LocalAgentAppliedConfiguration) => Promise<SubagentRun>, signal?: AbortSignal, onAdmitted?: () => void | Promise<void>): Promise<SubagentRun>",
2001
+ "summary": "All provider starts, including direct tool starts, acquire the same whole-turn lease.",
2002
+ "jsDoc": "/** All provider starts, including direct tool starts, acquire the same whole-turn lease. */"
2003
+ },
2004
+ {
2005
+ "kind": "method",
2006
+ "name": "enqueueMemberInput",
2007
+ "signature": "enqueueMemberInput(childSessionId: string, text: string, requestId: string): string"
2008
+ },
2009
+ {
2010
+ "kind": "method",
2011
+ "name": "resumeMemberInbox",
2012
+ "signature": "resumeMemberInbox(childSessionId: string): void"
2013
+ },
2014
+ {
2015
+ "kind": "method",
2016
+ "name": "readMemberInbox",
2017
+ "signature": "readMemberInbox(childSessionId: string): LocalAgentMemberInbox"
2018
+ },
2019
+ {
2020
+ "kind": "method",
2021
+ "name": "queuedMemberRounds",
2022
+ "signature": "queuedMemberRounds(childSessionId: string): number"
2023
+ },
2024
+ {
2025
+ "kind": "method",
2026
+ "name": "runConfiguration",
2027
+ "signature": "runConfiguration(run: object): LocalAgentAppliedConfiguration | undefined",
2028
+ "summary": "The admitted snapshot belongs to this exact run object, including after settle.",
2029
+ "jsDoc": "/** The admitted snapshot belongs to this exact run object, including after settle. */"
2030
+ },
2031
+ {
2032
+ "kind": "method",
2033
+ "name": "supportsMemberConfiguration",
2034
+ "signature": "supportsMemberConfiguration(provider: string): boolean"
2035
+ },
2036
+ {
2037
+ "kind": "method",
2038
+ "name": "memberBinding",
2039
+ "signature": "memberBinding(childSessionId: string): LocalAgentMemberBinding | undefined",
2040
+ "summary": "Execution identity is available before the first native transcript exists.",
2041
+ "jsDoc": "/** Execution identity is available before the first native transcript exists. */"
2042
+ },
2043
+ {
2044
+ "kind": "method",
2045
+ "name": "memberConfiguration",
2046
+ "signature": "memberConfiguration(childSessionId: string): LocalAgentMemberControlState"
2047
+ },
2048
+ {
2049
+ "kind": "method",
2050
+ "name": "selectMemberConfiguration",
2051
+ "signature": "selectMemberConfiguration(childSessionId: string, requestId: string, expectedRevision: number, selection: LocalAgentMemberConfiguration): Promise<LocalAgentControlReceipt>"
2052
+ },
2053
+ {
2054
+ "kind": "method",
2055
+ "name": "cancelMemberConfiguration",
2056
+ "signature": "cancelMemberConfiguration(childSessionId: string, requestId: string, expectedRevision: number): LocalAgentControlReceipt"
2057
+ },
2058
+ {
2059
+ "kind": "method",
2060
+ "name": "retryMemberConfiguration",
2061
+ "signature": "retryMemberConfiguration(childSessionId: string, expectedRevision: number): Promise<void>"
2062
+ },
2063
+ {
2064
+ "kind": "method",
2065
+ "name": "followMemberConfiguration",
2066
+ "signature": "followMemberConfiguration(childSessionId: string, signal: AbortSignal): AsyncIterable<LocalAgentMemberControlState>"
2067
+ },
2068
+ {
2069
+ "kind": "method",
2070
+ "name": "setMemberModel",
2071
+ "signature": "async setMemberModel(childSessionId: string, model: string | undefined): Promise<void>",
2072
+ "summary": "Compatibility write routes through the durable slot, including while busy.",
2073
+ "jsDoc": "/** Compatibility write routes through the durable slot, including while busy. */"
2074
+ },
2075
+ {
2076
+ "kind": "property",
2077
+ "name": "liveStreams",
2078
+ "signature": "readonly liveStreams: LocalAgentStreams = new LocalAgentStreams()",
2079
+ "summary": "Independent live output transport for mirrored sessions without native Agents.",
2080
+ "jsDoc": "/** Independent live output transport for mirrored sessions without native Agents. */"
2081
+ },
2082
+ {
2083
+ "kind": "method",
2084
+ "name": "homeDir",
2085
+ "signature": "homeDir(name: string, scope?: string): string",
2086
+ "summary": "Absolute scoped home for one harness, in the default scope or in a NAMED one.",
2087
+ "jsDoc": "/**\n * Absolute scoped home for one harness, in the default scope or in a NAMED\n * one.\n *\n * The default scope (`scope` absent) is `<homesRoot>/<name>` and is a pure\n * path computation, exactly as it always was. A named scope is the sibling\n * directory `<homesRoot>/<name>@<scope>` — a name, never a path, so the\n * directory can only ever be under the homes root — and is MATERIALIZED the\n * first time it is named here: `mkdir` 0700 plus this harness's own\n * provisioning, plus the load of that directory's own `delegations.jsonl`,\n * once per (harness, scope) in this host process. Materializing on the read\n * is what makes \"a scope exists once something names it\" true for every\n * caller at once: `/<name> login --scope`, the status surfaces, a scoped\n * delegation, and the evaluation's mount source.\n *\n * Credentials are never copied between scopes: a new named scope starts\n * empty, reports `credentialState: absent`, and needs its own login.\n * @param name - the harness name.\n * @param scope - the named scope, or undefined for the default one.\n * @returns `<homesRoot>/<name>`, or `<homesRoot>/<name>@<scope>`.\n * @throws when the scope is present but not a `[a-z0-9-]` name.\n */"
2088
+ },
2089
+ {
2090
+ "kind": "method",
2091
+ "name": "provisionScope",
2092
+ "signature": "async provisionScope( name: string, scope?: string, options?: LocalAgentScopeProvisionOptions, ): Promise<LocalAgentScopeProvisionResult & { homeDir: string }>",
2093
+ "summary": "Provision ONE scope deliberately, with per-scope inputs, and report what the scope now holds.",
2094
+ "jsDoc": "/**\n * Provision ONE scope deliberately, with per-scope inputs, and report what\n * the scope now holds.\n *\n * The difference from the materialization above is the whole reason this\n * exists. Materialization runs once per (harness, scope) per host process,\n * passes no options, and swallows failures — right for \"somebody named a\n * scope\". A caller that provisions a scope on purpose is asking a question\n * (`compose this preset`), needs the answer (`this is what it composes\n * now`), and needs the failure (a preset that could not be composed must\n * not read as one that was). So this one awaits, propagates, and returns\n * the harness's read-back.\n *\n * A harness with no `provision` hook is not an error: there is simply\n * nothing to do, and the caller's own read-back — the file it was going to\n * check anyway — reports what is actually there.\n * @param name - the harness name.\n * @param scope - the named scope, or undefined for the default scoped home.\n * @param options - per-scope inputs for the harness's provisioning.\n * @returns the scoped home plus whatever the harness read back.\n * @throws whatever the harness's provisioning throws.\n */"
2095
+ },
2096
+ {
2097
+ "kind": "method",
2098
+ "name": "register",
2099
+ "signature": "register(harness: LocalAgentHarness): () => void",
2100
+ "summary": "Register one harness: provision its scoped home, register the `/<name> login|sessions` command family, and publish the added event.",
2101
+ "jsDoc": "/**\n * Register one harness: provision its scoped home, register the\n * `/<name> login|sessions` command family, and publish the added event.\n * @param harness - the harness definition.\n * @returns the disposer unregistering the command and the harness.\n */"
2102
+ },
2103
+ {
2104
+ "kind": "method",
2105
+ "name": "get",
2106
+ "signature": "get(name: string): LocalAgentHarness | undefined",
2107
+ "summary": "Resolve one harness by name.",
2108
+ "jsDoc": "/**\n * Resolve one harness by name.\n * @param name - the harness name.\n * @returns the harness, or undefined when it is not registered.\n */"
2109
+ },
2110
+ {
2111
+ "kind": "method",
2112
+ "name": "harnessForProvider",
2113
+ "signature": "harnessForProvider(provider: string): LocalAgentHarness | undefined",
2114
+ "summary": "Resolve the harness that claims one delegation provider — the inverse of {@link LocalAgentHarness.delegationProvider}, for surfaces handed a provider name (a delegation record's) that need the owning harness's knobs (its model broker).",
2115
+ "jsDoc": "/**\n * Resolve the harness that claims one delegation provider — the inverse of\n * {@link LocalAgentHarness.delegationProvider}, for surfaces handed a\n * provider name (a delegation record's) that need the owning harness's\n * knobs (its model broker).\n * @param provider - the `ctx.subagents` provider name.\n * @returns the claiming harness, or undefined when none claims it.\n */"
2116
+ },
2117
+ {
2118
+ "kind": "method",
2119
+ "name": "list",
2120
+ "signature": "list(): readonly string[]",
2121
+ "summary": "Every registered harness name, in registration order.",
2122
+ "jsDoc": "/**\n * Every registered harness name, in registration order.\n * @returns the harness names.\n */"
2123
+ },
2124
+ {
2125
+ "kind": "method",
2126
+ "name": "roster",
2127
+ "signature": "roster(): readonly LocalAgentRosterRow[]",
2128
+ "summary": "Every registered harness as a roster row, in registration order.",
2129
+ "jsDoc": "/**\n * Every registered harness as a roster row, in registration order.\n * @returns the roster rows.\n */"
2130
+ },
2131
+ {
2132
+ "kind": "method",
2133
+ "name": "reportAuthFailure",
2134
+ "signature": "reportAuthFailure(name: string, detail: string, scope?: string): void",
2135
+ "summary": "Record a delegation-observed authentication failure (a 401/403 from the CLI's endpoint).",
2136
+ "jsDoc": "/**\n * Record a delegation-observed authentication failure (a 401/403 from the\n * CLI's endpoint). Presence probes cannot see a server-side revocation, so\n * this mark downgrades the harness's reported status until a real re-login\n * rewrites the credential marker (see {@link LocalAgentHarness.credentialStamp}).\n * @param name - the harness whose credential failed.\n * @param detail - the endpoint's answer, for the log.\n * @param scope - the scope whose credential failed; absent means the\n * default scope. Each scope holds its own account, so the mark is per\n * scope: one scope's revocation says nothing about another's.\n */"
2137
+ },
2138
+ {
2139
+ "kind": "method",
2140
+ "name": "reportAuthSuccess",
2141
+ "signature": "reportAuthSuccess(name: string, scope?: string): void",
2142
+ "summary": "Record a delegation-observed authentication SUCCESS: a round reached the harness CLI's endpoint and completed, so the scoped credential is known live and the status grades it `verified` instead of `present-unverified`.",
2143
+ "jsDoc": "/**\n * Record a delegation-observed authentication SUCCESS: a round reached the\n * harness CLI's endpoint and completed, so the scoped credential is known\n * live and the status grades it `verified` instead of `present-unverified`.\n * The counterpart of {@link reportAuthFailure}; providers wire both from the\n * same settle path. A success newer than a failure mark also clears the\n * `rejected` grade — a completed round outranks a stale rejection.\n * @param name - the harness whose credential just worked.\n * @param scope - the scope whose credential just worked; absent means the\n * default scope.\n */"
2144
+ },
2145
+ {
2146
+ "kind": "method",
2147
+ "name": "statusOf",
2148
+ "signature": "async statusOf(name: string, scope?: string): Promise<LocalAgentStatus>",
2149
+ "summary": "Query one harness's auth status, in the default scope or in a named one.",
2150
+ "jsDoc": "/**\n * Query one harness's auth status, in the default scope or in a named one.\n * @param name - the harness name.\n * @param scope - the named scope to report on; absent means the default\n * scope and the reply is exactly what it always was. A named scope is\n * materialized by the read (see {@link homeDir}), so a scope nobody has\n * logged into reports `credentialState: absent` against a real, empty\n * directory.\n * @returns the status snapshot.\n */"
2151
+ },
2152
+ {
2153
+ "kind": "method",
2154
+ "name": "effectiveSettings",
2155
+ "signature": "async effectiveSettings(name: string, scope?: string): Promise<LocalAgentEffectiveSettings | undefined>",
2156
+ "summary": "One harness's fairness-relevant effective settings — the evaluation condition hash's read side (web-eval frozen decisions 2 to 4: drive, approval boundary, reasoning effort, endpoint route).",
2157
+ "jsDoc": "/**\n * One harness's fairness-relevant effective settings — the evaluation\n * condition hash's read side (web-eval frozen decisions 2 to 4: drive,\n * approval boundary, reasoning effort, endpoint route). Read-only: the\n * snapshot reflects the settings in force right now, whatever layer set\n * them (plugin config, scoped-home config a person edited, process env).\n * Pure JSON and credential-free by contract; see\n * {@link LocalAgentEffectiveSettings}.\n * @param name - the harness name.\n * @param scope - the scope to snapshot; absent means the default one.\n * @returns the snapshot, or undefined when the harness declares none.\n */"
2158
+ },
2159
+ {
2160
+ "kind": "method",
2161
+ "name": "sessionsOf",
2162
+ "signature": "sessionsOf(name: string, scope?: string): Promise<readonly LocalAgentSessionRecord[]>",
2163
+ "summary": "Query one harness's scoped session records.",
2164
+ "jsDoc": "/**\n * Query one harness's scoped session records.\n * @param name - the harness name.\n * @param scope - the scope to list; absent means the default one. Session\n * records belong to the directory the rounds ran in, so a named scope\n * lists its own and nothing of the default scope's.\n * @returns the session records in the harness's own order.\n */"
2165
+ },
2166
+ {
2167
+ "kind": "method",
2168
+ "name": "recordDelegation",
2169
+ "signature": "recordDelegation(record: LocalAgentDelegationRecord): void",
2170
+ "summary": "Record one delegation's CLI-session mapping after its first round settles, so a later resume round can continue the same CLI session.",
2171
+ "jsDoc": "/**\n * Record one delegation's CLI-session mapping after its first round\n * settles, so a later resume round can continue the same CLI session. The\n * provider learns the CLI session id only from the settled round's output,\n * so recording happens post-settle. A duplicate child session id replaces\n * the earlier record: a resumed child keeps one mapping. The record is also\n * appended to the owning harness's `delegations.jsonl` (last line per child\n * session wins), so a host restart keeps the mapping resolvable. A settled\n * round's observation that arrived before this record (the provider's\n * record point is its own) is merged in from the pending stash — see\n * {@link recordRoundSettled}.\n * @param record - the delegation's dsh child session id, provider, owning\n * parent session id, and CLI session id.\n */"
2172
+ },
2173
+ {
2174
+ "kind": "method",
2175
+ "name": "resolveDelegation",
2176
+ "signature": "resolveDelegation( childSessionId: string, claims: { readonly provider: string; readonly parentSessionId: string }, ): { readonly cliSessionId: string }",
2177
+ "summary": "Resolve the CLI-session mapping a resume tool call needs to continue a previous delegation.",
2178
+ "jsDoc": "/**\n * Resolve the CLI-session mapping a resume tool call needs to continue a\n * previous delegation. Ownership is proven by the recorded parent session\n * id: a caller naming a child session it did not delegate is rejected\n * instead of resuming someone else's conversation context.\n * @param childSessionId - the dsh child session id from the first round.\n * @param claims - the caller's provider and parent session id.\n * @returns the recorded CLI session id to continue.\n * @throws when the child session is unknown, owned by another parent, or\n * served by a different provider than claimed.\n */"
2179
+ },
2180
+ {
2181
+ "kind": "method",
2182
+ "name": "stageDelegationIntent",
2183
+ "signature": "stageDelegationIntent( parentSessionId: string, provider: string, intent: LocalAgentDelegationIntent, ): void",
2184
+ "summary": "Stage one delegation intent for a provider's next `start()`.",
2185
+ "jsDoc": "/**\n * Stage one delegation intent for a provider's next `start()`. The family\n * resume tool stages exactly one intent per call before awaiting\n * `ctx.subagents.start()`; the provider consumes exactly one per start via\n * {@link takeDelegationIntent}, so the per-(parent, provider) FIFO pairs\n * fresh and resume rounds even under parallel delegations from one parent.\n * @param parentSessionId - the delegating parent session id.\n * @param provider - the `ctx.subagents` provider name.\n * @param intent - the fresh or resume intent for the next start.\n */"
2186
+ },
2187
+ {
2188
+ "kind": "method",
2189
+ "name": "takeDelegationIntent",
2190
+ "signature": "takeDelegationIntent( parentSessionId: string, provider: string, ): LocalAgentDelegationIntent | undefined",
2191
+ "summary": "Consume the oldest staged intent for one provider start, or `undefined` when the queue is empty (a provider invoked directly without the family tool stages nothing and starts a fresh round).",
2192
+ "jsDoc": "/**\n * Consume the oldest staged intent for one provider start, or `undefined`\n * when the queue is empty (a provider invoked directly without the family\n * tool stages nothing and starts a fresh round).\n * @param parentSessionId - the delegating parent session id.\n * @param provider - the `ctx.subagents` provider name.\n * @returns the oldest staged intent, or undefined when none is staged.\n */"
2193
+ },
2194
+ {
2195
+ "kind": "method",
2196
+ "name": "unstageDelegationIntent",
2197
+ "signature": "unstageDelegationIntent( parentSessionId: string, provider: string, intent: LocalAgentDelegationIntent, ): boolean",
2198
+ "summary": "Remove one previously staged intent by reference, returning whether it was still queued.",
2199
+ "jsDoc": "/**\n * Remove one previously staged intent by reference, returning whether it was\n * still queued. The delegation facade calls this when `ctx.subagents.start()`\n * throws: an intent the provider never consumed must not linger in the FIFO,\n * where the NEXT same-(parent, provider) start would misconsume it as its own\n * (orphan-intent crosstalk). When the provider already consumed the intent\n * before throwing, the removal is a no-op and the pairing stays intact.\n * @param parentSessionId - the delegating parent session id.\n * @param provider - the `ctx.subagents` provider name.\n * @param intent - the exact intent object passed to\n * {@link stageDelegationIntent}.\n * @returns whether the intent was removed (false when already consumed or\n * never staged).\n */"
2200
+ },
2201
+ {
2202
+ "kind": "method",
2203
+ "name": "listDelegations",
2204
+ "signature": "listDelegations(): readonly LocalAgentDelegationRecord[]",
2205
+ "summary": "Every recorded delegation, in recording order.",
2206
+ "jsDoc": "/**\n * Every recorded delegation, in recording order. The invariant companion\n * cross-checks each record's provider against the mounted subagent\n * providers so a provider rename cannot leave a stale resume mapping.\n * @returns the recorded delegations.\n */"
2207
+ },
2208
+ {
2209
+ "kind": "method",
2210
+ "name": "getDelegation",
2211
+ "signature": "getDelegation(childSessionId: string): LocalAgentDelegationRecord | undefined",
2212
+ "summary": "Read-only lookup of one delegation by its dsh child session id — the member channel's membership check.",
2213
+ "jsDoc": "/**\n * Read-only lookup of one delegation by its dsh child session id — the\n * member channel's membership check. Unlike {@link resolveDelegation} this\n * never throws and performs no ownership assertion: the gateway composes it\n * with {@link resume} (whose ownership checks are unchanged) for the\n * human-opened child session, where the record itself is the authorization\n * source.\n * @param childSessionId - the dsh child session id.\n * @returns the record, or undefined when this child was never delegated\n * through the family.\n */"
2214
+ },
2215
+ {
2216
+ "kind": "method",
2217
+ "name": "delegationOf",
2218
+ "signature": "delegationOf(childSessionId: string): LocalAgentDelegationInfo | undefined",
2219
+ "summary": "Read-only lookup of one delegation's facts by its dsh child session id, WITHOUT the CLI-session resume handle — the orchestrator-facing read side (the evaluation reads a cell's recorded `observedModel` and first-round `cwd` through it).",
2220
+ "jsDoc": "/**\n * Read-only lookup of one delegation's facts by its dsh child session id,\n * WITHOUT the CLI-session resume handle — the orchestrator-facing read side\n * (the evaluation reads a cell's recorded `observedModel` and first-round\n * `cwd` through it). Same never-throws contract as\n * {@link getDelegation}; the record's optional fields stay absent when the\n * stream never yielded them.\n * @param childSessionId - the dsh child session id.\n * @returns the record without `cliSessionId`, or undefined when this child\n * was never delegated through the family.\n */"
2221
+ },
2222
+ {
2223
+ "kind": "method",
2224
+ "name": "latestObservedModel",
2225
+ "signature": "latestObservedModel(provider: string): string | undefined",
2226
+ "summary": "The most recent model one provider was OBSERVED running across all its recorded delegations — the display hint behind the cli-builtin layer (nothing names the CLI's compiled default, but \"what ran last\" is what a round with no model layer would run again).",
2227
+ "jsDoc": "/**\n * The most recent model one provider was OBSERVED running across all its\n * recorded delegations — the display hint behind the cli-builtin layer\n * (nothing names the CLI's compiled default, but \"what ran last\" is what a\n * round with no model layer would run again). Recency is the observation\n * stamp ({@link observedModelStamps}), not record insertion order: a round\n * that re-observes an old delegation counts as the freshest. Records whose\n * stream never yielded a model (absent or blank) are not candidates.\n * @param provider - the `ctx.subagents` provider name to scan.\n * @returns the newest observed model identifier, or undefined when this\n * provider was never observed running one.\n */"
2228
+ },
2229
+ {
2230
+ "kind": "method",
2231
+ "name": "recordRoundSettled",
2232
+ "signature": "recordRoundSettled( childSessionId: string, round: { readonly observedEffort?: string readonly observedModel?: string readonly cliVersion?: string readonly usage?: TokenUsage readonly toolCalls?: LocalAgentToolCalls }, ): void",
2233
+ "summary": "Record one delegation round's settled observation: merge `observedModel` into the delegation record when present (in memory and `delegations.jsonl`, same replace semantics as {@link recordDelegation}) and report the `settled` run-progress event with the round's observed model and usage.",
2234
+ "jsDoc": "/**\n * Record one delegation round's settled observation: merge `observedModel`\n * into the delegation record when present (in memory and `delegations.jsonl`,\n * same replace semantics as {@link recordDelegation}) and report the\n * `settled` run-progress event with the round's observed model and usage.\n * Providers call it once per settled round, at the point their output\n * stream has been fully parsed; fields the stream did not yield stay absent\n * — absence is recorded, never guessed. A record that does not exist yet\n * (the round's settle beat the provider's record point — e.g. a round whose\n * CLI session id only parses post-settle) does not lose the observation: it\n * is stashed and merged by the later {@link recordDelegation}; the event\n * still reports either way.\n * @param childSessionId - the dsh child session id of the settled round.\n * @param round - the round's observed model, version, usage and tool-call\n * accounting, each optional.\n */"
2235
+ },
2236
+ {
2237
+ "kind": "method",
2238
+ "name": "acquireResumeLock",
2239
+ "signature": "acquireResumeLock(childSessionId: string): boolean",
2240
+ "summary": "Acquire the resume lock for one child session.",
2241
+ "jsDoc": "/**\n * Acquire the resume lock for one child session. A dsh child session may\n * have only one in-flight resume: the provider takes the lock before\n * spawning the resume CLI and releases it when the run settles, so a second\n * resume of the same child fails loud instead of racing the first process.\n * Fresh delegations never take the lock (they mint a new child session).\n * @param childSessionId - the dsh child session id to resume.\n * @returns whether the lock was acquired (false when already held).\n */"
2242
+ },
2243
+ {
2244
+ "kind": "method",
2245
+ "name": "releaseResumeLock",
2246
+ "signature": "releaseResumeLock(childSessionId: string): void",
2247
+ "summary": "Release the resume lock for one child session.",
2248
+ "jsDoc": "/**\n * Release the resume lock for one child session. The provider releases it\n * on every settle path (completed, failed, cancelled) so a deadlock never\n * strands a later resume. Releasing an unheld lock is a no-op.\n * @param childSessionId - the dsh child session id.\n */"
2249
+ },
2250
+ {
2251
+ "kind": "method",
2252
+ "name": "isResumeLocked",
2253
+ "signature": "isResumeLocked(childSessionId: string): boolean",
2254
+ "summary": "Read-only probe of the per-child resume lock.",
2255
+ "jsDoc": "/**\n * Read-only probe of the per-child resume lock. The delegation facade uses\n * it to fail fast BEFORE staging an intent; the authoritative mutual\n * exclusion stays with the provider's `acquireResumeLock` inside `start()`.\n * @param childSessionId - the dsh child session id.\n * @returns whether a resume of this child session is currently in flight.\n */"
2256
+ },
2257
+ {
2258
+ "kind": "method",
2259
+ "name": "setMemberBridgeAvailable",
2260
+ "signature": "setMemberBridgeAvailable(available: boolean): void",
2261
+ "summary": "Listener lifecycle owns this flag; it is never persisted across host restarts.",
2262
+ "jsDoc": "/** Listener lifecycle owns this flag; it is never persisted across host restarts. */"
2263
+ },
2264
+ {
2265
+ "kind": "method",
2266
+ "name": "canCoordinateRoom",
2267
+ "signature": "canCoordinateRoom(childSessionId: string): boolean",
2268
+ "summary": "Transport/readiness capability only; authenticated generation needs separate acceptance.",
2269
+ "jsDoc": "/** Transport/readiness capability only; authenticated generation needs separate acceptance. */"
2270
+ },
2271
+ {
2272
+ "kind": "method",
2273
+ "name": "registerMemberRun",
2274
+ "signature": "registerMemberRun(run: LocalAgentMemberRun): string",
2275
+ "summary": "Register one CLI run with the member channel and mint its per-run token.",
2276
+ "jsDoc": "/**\n * Register one CLI run with the member channel and mint its per-run token.\n * The provider calls this before spawning the CLI (fresh and resume rounds\n * alike) and injects the token into the bridge MCP server's environment; the\n * token is how the host resolves which run — and therefore which member — a\n * bridge callback belongs to, so a member's identity is never self-reported.\n * @param run - the run's member identity (child session, parent, provider).\n * @returns the minted token, invalidated by {@link unregisterMemberRun}.\n */"
2277
+ },
2278
+ {
2279
+ "kind": "method",
2280
+ "name": "resolveMemberRun",
2281
+ "signature": "resolveMemberRun(token: string): LocalAgentMemberRun | undefined",
2282
+ "summary": "Resolve a member-channel token to its run, or undefined when the token is unknown or already invalidated (the run settled).",
2283
+ "jsDoc": "/**\n * Resolve a member-channel token to its run, or undefined when the token is\n * unknown or already invalidated (the run settled).\n * @param token - the token the bridge presented.\n * @returns the registered run, or undefined.\n */"
2284
+ },
2285
+ {
2286
+ "kind": "method",
2287
+ "name": "unregisterMemberRun",
2288
+ "signature": "unregisterMemberRun(token: string): void",
2289
+ "summary": "Invalidate a run's member-channel token on its settle path (any stop reason).",
2290
+ "jsDoc": "/**\n * Invalidate a run's member-channel token on its settle path (any stop\n * reason). A bridge callback arriving after settle is an unknown token.\n * @param token - the token to invalidate.\n */"
2291
+ },
2292
+ {
2293
+ "kind": "method",
2294
+ "name": "memberBridgeSocketPath",
2295
+ "signature": "memberBridgeSocketPath(): string",
2296
+ "summary": "The loopback socket path the member-bridge listener owns.",
2297
+ "jsDoc": "/**\n * The loopback socket path the member-bridge listener owns. Providers inject\n * it into the bridge's environment so the stdio MCP server knows where to\n * call back.\n * @returns the unix socket path under the shared homes root.\n */"
2298
+ },
2299
+ {
2300
+ "kind": "method",
2301
+ "name": "memberBridgeCommand",
2302
+ "signature": "memberBridgeCommand(): { command: string; args: string[] }",
2303
+ "summary": "The stdio MCP server entry for the member bridge, for providers to write into their CLI's scoped MCP config.",
2304
+ "jsDoc": "/**\n * The stdio MCP server entry for the member bridge, for providers to write\n * into their CLI's scoped MCP config. The bridge script ships inside this\n * package and runs under the same Node that runs the host.\n * @returns the command + args declaring the bridge server.\n */"
2305
+ },
2306
+ {
2307
+ "kind": "method",
2308
+ "name": "prepareMember",
2309
+ "signature": "prepareMember(parentSessionId: string, provider: string, childSessionId: string, options: DelegationCallOptions = {}): Promise<string>",
2310
+ "summary": "Prepare a roster-owned identity without a paid prompt; repeated calls coalesce.",
2311
+ "jsDoc": "/** Prepare a roster-owned identity without a paid prompt; repeated calls coalesce. */"
2312
+ },
2313
+ {
2314
+ "kind": "method",
2315
+ "name": "isPreparedMember",
2316
+ "signature": "isPreparedMember(childSessionId: string): boolean"
2317
+ },
2318
+ {
2319
+ "kind": "method",
2320
+ "name": "start",
2321
+ "signature": "async start( parentSessionId: string, provider: string, prompt: ContentBlock[], options?: DelegationCallOptions, ): Promise<SubagentRun>",
2322
+ "summary": "Start a FRESH delegation on one subagent provider — the programmatic equivalent of the family tool's fresh call, for plugins acting on the user's behalf (room, orchestrators).",
2323
+ "jsDoc": "/**\n * Start a FRESH delegation on one subagent provider — the programmatic\n * equivalent of the family tool's fresh call, for plugins acting on the\n * user's behalf (room, orchestrators). One call performs the provider\n * pre-check, resolves the live parent agent, stages exactly one\n * `{ kind: 'fresh' }` intent, and starts the provider in the same\n * synchronous flow, so the per-(parent, provider) FIFO pairing holds. When\n * the start throws, the staged intent is rolled back via\n * {@link unstageDelegationIntent} (a no-op once the provider consumed it).\n *\n * The returned run is tracked under its `run.id` (== the new dsh child\n * session id) until `run.result` settles; {@link cancel} aborts it by that\n * id. Note on trust: cordis plugins share one process, so the ownership\n * checks here and in {@link resume} guard against caller MISTAKES, not\n * against a malicious plugin — their real protection target is untrusted\n * model text, which never carries the resume handle (first-class parameter\n * + intent channel only).\n * @param parentSessionId - the delegating parent session id; must have a\n * live agent (`ctx.agents.get`, a harness hard constraint).\n * @param provider - the `ctx.subagents` provider name.\n * @param prompt - the child user message content blocks.\n * @param options - optional label and caller-owned abort signal.\n * @returns the published subagent run.\n * @throws when the subagents/agents service is not mounted, the provider is\n * not registered, or the parent session has no live agent — in every case\n * BEFORE anything is staged.\n */"
2324
+ },
2325
+ {
2326
+ "kind": "method",
2327
+ "name": "resume",
2328
+ "signature": "async resume( parentSessionId: string, provider: string, childSessionId: string, prompt: ContentBlock[], options?: DelegationCallOptions, ): Promise<SubagentRun>",
2329
+ "summary": "Resume a recorded delegation: continue the SAME CLI session inside the SAME dsh child session.",
2330
+ "jsDoc": "/**\n * Resume a recorded delegation: continue the SAME CLI session inside the\n * SAME dsh child session. One call performs, in order:\n *\n * 1. provider pre-check (`ctx.subagents.getProvider`) — fails loud WITHOUT\n * staging, so an unknown provider never leaves an orphan intent;\n * 2. `resolveDelegation` ownership check (unchanged semantics): the handle\n * must name a delegation THIS parent session recorded through THIS\n * provider;\n * 3. read-only resume-lock probe ({@link isResumeLocked}) — fails fast\n * without staging; the provider still takes the authoritative lock inside\n * its `start()`;\n * 4. live parent agent resolution (`ctx.agents.get`) — a harness hard\n * constraint, since `ctx.subagents.start` requires a live parent;\n * 5. child-session REATTACH when `ctx.sessions.get(childSessionId)` is\n * undefined (recipe below; `opts.reattach === false` disables this step\n * and fails loud on a non-live child instead);\n * 6. stage `{ kind: 'resume', childSessionId, cliSessionId }` and, in the\n * same synchronous flow, `await ctx.subagents.start(provider, …)`;\n * 7. on start failure, roll the intent back via\n * {@link unstageDelegationIntent} (no-op once consumed);\n * 8. on success, track the run under `childSessionId` for {@link cancel}\n * until `run.result` settles.\n *\n * **Reattach recipe** (callers replicating this flow — e.g. room — copy\n * exactly this sequence):\n *\n * ```ts\n * const handle = await ctx.sessionPersistence.open(SessionId(childSessionId), 'write')\n * try {\n * const cold = await handle.read(0)\n * const session = ctx.sessions.prepare(SessionId(childSessionId), {\n * seed: [...cold.events],\n * meta: structuredClone(handle.header),\n * inheritedEventCount: handle.inheritedEventCount,\n * eventState: cold.eventState,\n * })\n * // The seeded constructor's session/end-seed marker lands before enter()\n * // installs publication hooks — push the unstored suffix through the\n * // handle directly, or the writer's contiguous cursor diverges.\n * const unstored = session.snapshotEvents().slice(cold.events.length)\n * if (unstored.length > 0) await handle.append(unstored)\n * const detach = ctx.sessions.enter(session)\n * try { ctx.sessions.announce(session) }\n * catch (error) { detach(); throw error }\n * // Hold BOTH for the reattached lifetime: the backend routes live\n * // session/event appends into the per-id writer only while the write\n * // handle is open; closing it ends persistence for the session.\n * } catch (error) {\n * await handle.close().catch(() => {})\n * throw error\n * }\n * ```\n *\n * Hold `detach` and `handle` for the plugin lifetime. Announce the restored\n * live session after entering it, rolling back detach if announcement fails.\n * History followers need this lifecycle edge to replay the constructor's\n * end-seed suffix before the provider publishes subsequent events.\n * @param parentSessionId - the delegating parent session id; must match the\n * recorded one and have a live agent.\n * @param provider - the `ctx.subagents` provider that owns the CLI session.\n * @param childSessionId - the dsh child session id from the first round (the\n * resume handle).\n * @param prompt - the follow-up user message content blocks.\n * @param options - optional label and caller-owned abort signal.\n * @returns the published subagent run.\n * @throws on unknown provider, unknown/foreign-parent/wrong-provider handle,\n * an in-flight resume of the same child, or a missing live parent agent —\n * all BEFORE anything is staged.\n */"
2331
+ },
2332
+ {
2333
+ "kind": "method",
2334
+ "name": "cancel",
2335
+ "signature": "cancel(childSessionId: string): boolean",
2336
+ "summary": "Cancel an in-flight facade-started run by its dsh child session id: aborts the internal controller whose (fused) signal was passed to `ctx.subagents.start`, which is the canonical cancellation channel for a one-shot run.",
2337
+ "jsDoc": "/**\n * Cancel an in-flight facade-started run by its dsh child session id: aborts\n * the internal controller whose (fused) signal was passed to\n * `ctx.subagents.start`, which is the canonical cancellation channel for a\n * one-shot run. The provider settles the run with an `aborted`-class stop\n * reason. A caller holding the `SubagentRun` may also `run.dispose()`.\n * @param childSessionId - the dsh child session id of the run to cancel.\n * @returns whether an in-flight run was found and signalled (false on a\n * miss — never a silent success, never a throw).\n */"
2338
+ },
2339
+ {
2340
+ "kind": "method",
2341
+ "name": "trackDelegationRun",
2342
+ "signature": "trackDelegationRun(childSessionId: string, run: SubagentRun, cancel: () => void): void",
2343
+ "summary": "Register a NON-facade in-flight delegation run with the active-delegation registry, keyed by the dsh child session id, so the `/local-agent stop` command and {@link cancel} can reach it.",
2344
+ "jsDoc": "/**\n * Register a NON-facade in-flight delegation run with the active-delegation\n * registry, keyed by the dsh child session id, so the `/local-agent stop`\n * command and {@link cancel} can reach it. This is the family TOOL's entry\n * point: the tool starts its runs through `ctx.subagents.start` directly\n * (not the facade), so without this registration its in-flight runs would\n * be invisible to the stop command. The caller owns the cancel lever — a\n * controller fused with the run's request signal, aborted exactly like the\n * facade's tracked controller. The entry clears itself when the run's\n * result settles (any stop reason); an existing facade entry for the same\n * child session wins (it already owns cancellation and progress).\n * @param childSessionId - the dsh child session id (the run id).\n * @param run - the published subagent run.\n * @param cancel - the lever that aborts the run's request signal.\n */"
2345
+ },
2346
+ {
2347
+ "kind": "method",
2348
+ "name": "isDelegationActive",
2349
+ "signature": "isDelegationActive(childSessionId: string): boolean",
2350
+ "summary": "Whether the active-delegation registry holds an in-flight run for the child session — the registry's read side for the `/local-agent stop` command's miss report (the command cancels through {@link cancel}).",
2351
+ "jsDoc": "/**\n * Whether the active-delegation registry holds an in-flight run for the\n * child session — the registry's read side for the `/local-agent stop`\n * command's miss report (the command cancels through {@link cancel}).\n * @param childSessionId - the dsh child session id.\n * @returns whether a run is currently in flight under that id.\n */"
2352
+ },
2353
+ {
2354
+ "kind": "method",
2355
+ "name": "activeDelegations",
2356
+ "signature": "activeDelegations(): readonly string[]",
2357
+ "summary": "The child session ids with an in-flight delegation run — the gateway's `activeDelegations` Remote exposes this to the browser so surfaces can mark one-shot rows as running.",
2358
+ "jsDoc": "/**\n * The child session ids with an in-flight delegation run — the gateway's\n * `activeDelegations` Remote exposes this to the browser so surfaces can\n * mark one-shot rows as running.\n * @returns the in-flight child session ids.\n */"
2359
+ },
2360
+ {
2361
+ "kind": "method",
2362
+ "name": "kimiMirroredLines",
2363
+ "signature": "kimiMirroredLines(childSessionId: string): number | undefined",
2364
+ "summary": "Read the kimi transcript lines already mirrored into one child session, so a resumed round mirrors only its delta instead of duplicating earlier messages.",
2365
+ "jsDoc": "/**\n * Read the kimi transcript lines already mirrored into one child session,\n * so a resumed round mirrors only its delta instead of duplicating earlier\n * messages. Absent means the first round has not mirrored yet. Reads the\n * dedicated offset map (never gated on a delegation record).\n * @param childSessionId - the dsh child session id.\n * @returns the mirrored transcript-line count, or undefined.\n */"
2366
+ },
2367
+ {
2368
+ "kind": "method",
2369
+ "name": "setKimiMirroredLines",
2370
+ "signature": "setKimiMirroredLines(childSessionId: string, lines: number): void",
2371
+ "summary": "Advance the kimi transcript-line mirror offset for one child session.",
2372
+ "jsDoc": "/**\n * Advance the kimi transcript-line mirror offset for one child session.\n * The kimi provider calls this after every mirror (fresh or resumed) with\n * the new total transcript-line count. Writes the dedicated offset map so\n * the offset survives even without a delegation record; the record's own\n * field is mirrored for completeness.\n * @param childSessionId - the dsh child session id.\n * @param lines - the total transcript lines mirrored so far.\n */"
2373
+ },
2374
+ {
2375
+ "kind": "method",
2376
+ "name": "ensureChildLive",
2377
+ "signature": "async ensureChildLive(childSessionId: string): Promise<void>",
2378
+ "summary": "Ensure a delegated child session is live in this process, reattaching it from persistence when it is not — a host restart evicts every child from the live store.",
2379
+ "jsDoc": "/**\n * Ensure a delegated child session is live in this process, reattaching it\n * from persistence when it is not — a host restart evicts every child from\n * the live store. This is the public entry of the facade resume's reattach\n * recipe for callers that start resume rounds WITHOUT the facade (the\n * family subagent tool starts runs directly through `ctx.subagents.start`;\n * without this call the provider refuses the resume as \"not live\").\n * Idempotent; a child that was never persisted fails through the\n * persistence layer's own not-found error.\n * @param childSessionId - the dsh child session id (the resume handle).\n */"
2380
+ },
2381
+ {
2382
+ "kind": "method",
2383
+ "name": "syncChildSession",
2384
+ "signature": "async syncChildSession(session: Session, strict: boolean = false): Promise<void>",
2385
+ "summary": "Sync a live delegated child session's events into durable storage through the registry-cached write handle, creating the stored session on first sync.",
2386
+ "jsDoc": "/**\n * Sync a live delegated child session's events into durable storage through\n * the registry-cached write handle, creating the stored session on first\n * sync. The host's live write-behind routes `session/event` appends into\n * the per-id writer only while a write handle is open AND a checkpoint\n * drains it — a delegated mirror session has no agent loop, so nothing ever\n * checkpoints it and production child logs stayed header-only. This explicit\n * suffix sync is the mirror's durability path: read the stored prefix,\n * append only what is missing (idempotent under repetition and under a\n * working write-behind), then flush. A failure downgrades to a warn and the\n * handle stays cached for the next sync — a persistence hiccup must never\n * fail the delegation round.\n * @param session - the live child session to sync.\n */"
2387
+ },
2388
+ {
2389
+ "kind": "method",
2390
+ "name": "reportRunProgress",
2391
+ "signature": "reportRunProgress(childSessionId: string, progress: LocalAgentRunProgress): void",
2392
+ "summary": "The provider-facing progress reporting channel: a provider reports a run's data-bearing progress (mirror counts now, live deltas with M3), and the registry forwards it — as the `localAgent/run-progress` cordis event, and to the `onProgress` callback when the child session has a facade-tracked run.",
2393
+ "jsDoc": "/**\n * The provider-facing progress reporting channel: a provider reports a\n * run's data-bearing progress (mirror counts now, live deltas with M3), and\n * the registry forwards it — as the `localAgent/run-progress` cordis event,\n * and to the `onProgress` callback when the child session has a\n * facade-tracked run. Reports for untracked child sessions still emit the\n * event (a provider-only run must stay observable) and invoke no callback.\n * The facade's own heartbeat rides the same path.\n * @param childSessionId - the dsh child session id of the running delegation.\n * @param progress - the progress payload.\n */"
2394
+ }
2395
+ ],
2396
+ "types": [
2397
+ {
2398
+ "name": "Agent",
2399
+ "declaration": "export interface Agent {\n readonly id: SessionId;\n readonly options: AgentOptions;\n readonly session: Session;\n readonly inbox: Inbox;\n readonly status: AgentStatus;\n readonly ctx: Context;\n cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n whenIdle(): Promise<void>;\n runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n followup(message: UserMessage): void;\n steer(message: UserMessage): void;\n inject(message: UserMessage): void;\n}"
2400
+ },
2401
+ {
2402
+ "name": "AgentCancelCause",
2403
+ "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
2404
+ },
2405
+ {
2406
+ "name": "AgentMessageSource",
2407
+ "declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
2408
+ },
2409
+ {
2410
+ "name": "AgentOptions",
2411
+ "declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
2412
+ },
2413
+ {
2414
+ "name": "AgentStatus",
2415
+ "declaration": "export type AgentStatus = 'idle' | 'running';"
2416
+ },
2417
+ {
2418
+ "name": "ApprovalOutcome",
2419
+ "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
2420
+ },
2421
+ {
2422
+ "name": "ApprovalPolicy",
2423
+ "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
2424
+ },
2425
+ {
2426
+ "name": "ApprovalRequestId",
2427
+ "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
2428
+ },
2429
+ {
2430
+ "name": "AssistantMessage",
2431
+ "declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
2432
+ },
2433
+ {
2434
+ "name": "AssistantProviderMetadata",
2435
+ "declaration": "export interface AssistantProviderMetadata {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
2436
+ },
2437
+ {
2438
+ "name": "AssistantStreamRecord",
2439
+ "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; };"
2440
+ },
2441
+ {
2442
+ "name": "AttachmentId",
2443
+ "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
2444
+ },
2445
+ {
2446
+ "name": "Branded",
2447
+ "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
2448
+ },
2449
+ {
2450
+ "name": "BrandedNumber",
2451
+ "declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
2452
+ },
2453
+ {
2454
+ "name": "CancelOptions",
2455
+ "declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
2456
+ },
2457
+ {
2458
+ "name": "CommandId",
2459
+ "declaration": "export type CommandId = Branded<'CommandId'>;"
2460
+ },
2461
+ {
2462
+ "name": "CommandInvocation",
2463
+ "declaration": "export interface CommandInvocation {\n readonly commandId: CommandId;\n readonly agent: Agent;\n readonly rawInput: string;\n readonly attachments: readonly (ImageBlock | FileBlock)[];\n readonly signal: AbortSignal;\n}"
2464
+ },
2465
+ {
2466
+ "name": "CommandResult",
2467
+ "declaration": "export type CommandResult = { readonly kind: 'success'; readonly text?: string; readonly sourceEventSeq?: SessionSeq; } | { readonly kind: 'error'; readonly text: string; };"
2468
+ },
2469
+ {
2470
+ "name": "CommandSource",
2471
+ "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
2472
+ },
2473
+ {
2474
+ "name": "CommandSourceMap",
2475
+ "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
2476
+ },
2477
+ {
2478
+ "name": "ContentBlock",
2479
+ "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
2480
+ },
2481
+ {
2482
+ "name": "ContentBlockMap",
2483
+ "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}"
2484
+ },
2485
+ {
2486
+ "name": "ContentBlockType",
2487
+ "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
2488
+ },
2489
+ {
2490
+ "name": "ContextFormed",
2491
+ "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'; };"
2492
+ },
2493
+ {
2494
+ "name": "ContextSnapshotSection",
2495
+ "declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
2496
+ },
2497
+ {
2498
+ "name": "ContinuableSubagentDescriptorData",
2499
+ "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}"
2500
+ },
2501
+ {
2502
+ "name": "DelegationCallOptions",
2503
+ "declaration": "export interface DelegationCallOptions {\n readonly onAdmitted?: () => void | Promise<void>;\n readonly preparedMemberId?: string;\n readonly effort?: string;\n readonly configurationLock?: string;\n readonly label?: string;\n readonly signal?: AbortSignal;\n readonly onProgress?: (event: LocalAgentRunProgress) => void;\n readonly reattach?: boolean;\n readonly cwd?: string;\n readonly exec?: DelegationExecTarget;\n readonly scope?: string;\n readonly model?: string;\n}"
2504
+ },
2505
+ {
2506
+ "name": "DelegationExecTarget",
2507
+ "declaration": "export interface DelegationExecTarget {\n readonly container: string;\n readonly workdir: string;\n readonly env?: Readonly<Record<string, string>>;\n}"
2508
+ },
2509
+ {
2510
+ "name": "DeveloperMessage",
2511
+ "declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
2512
+ },
2513
+ {
2514
+ "name": "EpochHeader",
2515
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
2516
+ },
2517
+ {
2518
+ "name": "FileAttachmentRef",
2519
+ "declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
2520
+ },
2521
+ {
2522
+ "name": "FileBlock",
2523
+ "declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
2524
+ },
2525
+ {
2526
+ "name": "FinishReason",
2527
+ "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
2528
+ },
2529
+ {
2530
+ "name": "FinishReasonMap",
2531
+ "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}"
2532
+ },
2533
+ {
2534
+ "name": "ImageAttachmentRef",
2535
+ "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}"
2536
+ },
2537
+ {
2538
+ "name": "ImageBlock",
2539
+ "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n offloaded?: true;\n}"
2540
+ },
2541
+ {
2542
+ "name": "ImageMediaType",
2543
+ "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
2544
+ },
2545
+ {
2546
+ "name": "ImageOffloadTarget",
2547
+ "declaration": "export interface ImageOffloadTarget {\n seq: SessionSeq;\n imageIndexes: number[];\n}"
2548
+ },
2549
+ {
2550
+ "name": "Inbox",
2551
+ "declaration": "export interface Inbox {\n readonly nextTurn: readonly UserMessage[];\n readonly nextStep: readonly UserMessage[];\n clear(): void;\n append(target: InboxTarget, message: UserMessage): void;\n prepend(target: InboxTarget, message: UserMessage): void;\n replace(messageId: MessageId, newMessage: UserMessage): boolean;\n remove(messageId: MessageId): boolean;\n splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
2552
+ },
2553
+ {
2554
+ "name": "InboxTarget",
2555
+ "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
2556
+ },
2557
+ {
2558
+ "name": "JsonValue",
2559
+ "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
2560
+ },
2561
+ {
2562
+ "name": "KnownCatalogMode",
2563
+ "declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
2564
+ },
2565
+ {
2566
+ "name": "LlmCallConfig",
2567
+ "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
2568
+ },
2569
+ {
2570
+ "name": "LlmCallConfigAdapterDefaults",
2571
+ "declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
2572
+ },
2573
+ {
2574
+ "name": "LlmFailure",
2575
+ "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}"
2576
+ },
2577
+ {
2578
+ "name": "LocalAgentAppliedConfiguration",
2579
+ "declaration": "export interface LocalAgentAppliedConfiguration {\n revision: number;\n selection: LocalAgentMemberConfiguration;\n resolved: LocalAgentResolvedConfiguration;\n}"
2580
+ },
2581
+ {
2582
+ "name": "LocalAgentConfigurationChoice",
2583
+ "declaration": "export type LocalAgentConfigurationChoice = { mode: 'inherit' | 'default'; } | { mode: 'value'; value: string; };"
2584
+ },
2585
+ {
2586
+ "name": "LocalAgentControlReceipt",
2587
+ "declaration": "export interface LocalAgentControlReceipt {\n requestId: string;\n revision: number;\n status: 'pending' | 'applying' | 'applied' | 'cancelled' | 'failed' | 'conflict' | 'locked' | 'unsupported';\n error?: string;\n}"
2588
+ },
2589
+ {
2590
+ "name": "LocalAgentCredentialState",
2591
+ "declaration": "export type LocalAgentCredentialState = 'absent' | 'present-unverified' | 'verified' | 'rejected';"
2592
+ },
2593
+ {
2594
+ "name": "LocalAgentDelegationInfo",
2595
+ "declaration": "export type LocalAgentDelegationInfo = Omit<LocalAgentDelegationRecord, 'cliSessionId'>;"
2596
+ },
2597
+ {
2598
+ "name": "LocalAgentDelegationIntent",
2599
+ "declaration": "export type LocalAgentDelegationIntent = { readonly kind: 'fresh'; readonly onAdmitted?: () => void | Promise<void>; readonly preparedMemberId?: string; readonly effort?: string; readonly configurationLock?: string; readonly cwd?: string; readonly exec?: DelegationExecTarget; readonly scope?: string; readonly model?: string; } | { readonly kind: 'resume'; readonly onAdmitted?: () => void | Promise<void>; readonly childSessionId: string; readonly cliSessionId: string; readonly cwd?: string; readonly exec?: DelegationExecTarget; readonly scope?: string; };"
2600
+ },
2601
+ {
2602
+ "name": "LocalAgentDelegationRecord",
2603
+ "declaration": "export interface LocalAgentDelegationRecord {\n effort?: string;\n configurationLock?: string;\n childSessionId: string;\n provider: string;\n parentSessionId: string;\n cliSessionId: string;\n cwd?: string;\n scope?: string;\n observedModel?: string;\n model?: string;\n cliVersion?: string;\n kimiMirroredLines?: number;\n}"
2604
+ },
2605
+ {
2606
+ "name": "LocalAgentEffectiveSettings",
2607
+ "declaration": "export interface LocalAgentEffectiveSettings {\n drive: 'exec' | 'live';\n sandbox?: string;\n permissionMode?: string;\n autoApprove?: boolean;\n reasoningEffort?: string;\n baseUrlSet: boolean;\n baseUrlHost?: string;\n cliVersion?: string;\n model?: string;\n containerNodeOptions?: string;\n}"
2608
+ },
2609
+ {
2610
+ "name": "LocalAgentHarness",
2611
+ "declaration": "export interface LocalAgentHarness {\n prepareMember?: (request: LocalAgentPreparation) => Promise<void>;\n name: string;\n displayName: string;\n homeEnvVar: string;\n delegationProvider?: string;\n login?: LocalAgentLogin;\n records: LocalAgentRecordsAdapter;\n provision?: (homeDir: string, options?: LocalAgentScopeProvisionOptions) => LocalAgentScopeProvisionResult | void | Promise<LocalAgentScopeProvisionResult | void>;\n isAuthenticated?: (homeDir: string) => Promise<boolean>;\n credentialStamp?: (homeDir: string) => Promise<number | undefined>;\n logout?: (homeDir: string) => Promise<void>;\n subcommand?: (input: string, invocation: CommandInvocation) => Promise<CommandResult> | CommandResult | undefined;\n effectiveSettings?: (homeDir: string) => LocalAgentEffectiveSettings | Promise<LocalAgentEffectiveSettings>;\n modelBroker?: LocalAgentModelBroker;\n}"
2612
+ },
2613
+ {
2614
+ "name": "LocalAgentLogin",
2615
+ "declaration": "export type LocalAgentLogin = { command: string; args: readonly string[]; capture?: 'stderr' | 'stdout'; } | { manual: { commandDisplay: string; }; watch?: (homeDir: string) => Promise<boolean>; } | { pty: { command: string; args: readonly string[] | ((homeDir: string) => readonly string[]); }; watch?: (homeDir: string) => Promise<boolean>; };"
2616
+ },
2617
+ {
2618
+ "name": "LocalAgentMemberBinding",
2619
+ "declaration": "export interface LocalAgentMemberBinding {\n childSessionId: string;\n provider: string;\n parentSessionId: string;\n cwd: string;\n scope?: string;\n model?: string;\n effort?: string;\n configurationLock?: string;\n}"
2620
+ },
2621
+ {
2622
+ "name": "LocalAgentMemberConfiguration",
2623
+ "declaration": "export interface LocalAgentMemberConfiguration {\n model: LocalAgentConfigurationChoice;\n effort: LocalAgentConfigurationChoice;\n}"
2624
+ },
2625
+ {
2626
+ "name": "LocalAgentMemberControlState",
2627
+ "declaration": "export interface LocalAgentMemberControlState {\n memberId: string;\n revision: number;\n current: LocalAgentAppliedConfiguration;\n pending?: LocalAgentPendingConfiguration;\n operation?: LocalAgentPendingConfiguration & { previous: LocalAgentAppliedConfiguration; };\n status: 'idle' | 'pending' | 'applying' | 'reconciling' | 'failed';\n round?: { id: string; configuration: LocalAgentAppliedConfiguration; };\n lockedReason?: string;\n frozen?: LocalAgentAppliedConfiguration;\n error?: string;\n}"
2628
+ },
2629
+ {
2630
+ "name": "LocalAgentMemberInbox",
2631
+ "declaration": "export interface LocalAgentMemberInbox {\n memberId: string;\n paused: boolean;\n error?: string;\n messages: LocalAgentMemberInput[];\n}"
2632
+ },
2633
+ {
2634
+ "name": "LocalAgentMemberInput",
2635
+ "declaration": "export interface LocalAgentMemberInput {\n id: string;\n text: string;\n status: 'queued' | 'running' | 'done' | 'failed' | 'cancelled' | 'uncertain';\n createdAt: number;\n updatedAt: number;\n error?: string;\n}"
2636
+ },
2637
+ {
2638
+ "name": "LocalAgentMemberRun",
2639
+ "declaration": "export interface LocalAgentMemberRun {\n childSessionId: string;\n parentSessionId: string;\n provider: string;\n}"
2640
+ },
2641
+ {
2642
+ "name": "LocalAgentModelBroker",
2643
+ "declaration": "export interface LocalAgentModelBroker {\n configurationAdapter?(binding: LocalAgentMemberBinding): MemberConfigurationAdapter;\n modelDirectory?(childSessionId?: string, refresh?: boolean): LocalAgentModelDirectory | Promise<LocalAgentModelDirectory>;\n followModelDirectory?(childSessionId: string | undefined, signal: AbortSignal): AsyncIterable<LocalAgentModelDirectory>;\n modelInfo(childSessionId?: string, delegationModel?: string): LocalAgentModelInfo | Promise<LocalAgentModelInfo>;\n setMemberModel(childSessionId: string, model: string | undefined): Promise<void>;\n}"
2644
+ },
2645
+ {
2646
+ "name": "LocalAgentModelDirectory",
2647
+ "declaration": "export interface LocalAgentModelDirectory extends LocalAgentModelDirectoryData {\n status: 'loading' | 'ready' | 'stale' | 'error' | 'unsupported';\n refreshing: boolean;\n revision: number;\n refreshedAt?: number;\n}"
2648
+ },
2649
+ {
2650
+ "name": "LocalAgentModelDirectoryData",
2651
+ "declaration": "export interface LocalAgentModelDirectoryData {\n entries: readonly LocalAgentModelEntry[];\n defaultModel?: string;\n complete: boolean;\n customInput: boolean;\n unsupported?: boolean;\n reason?: string;\n}"
2652
+ },
2653
+ {
2654
+ "name": "LocalAgentModelEntry",
2655
+ "declaration": "export interface LocalAgentModelEntry {\n value: string;\n label: string;\n resolvedModel?: string;\n description?: string;\n source: 'native' | 'configuration' | 'history';\n hidden?: boolean;\n reasoning?: { options: readonly LocalAgentReasoningOption[]; default?: string; };\n}"
2656
+ },
2657
+ {
2658
+ "name": "LocalAgentModelInfo",
2659
+ "declaration": "export interface LocalAgentModelInfo {\n configuration?: LocalAgentMemberControlState;\n effective?: string;\n source: LocalAgentModelSource;\n override?: string;\n delegation?: string;\n settings?: string;\n cliDefault?: string;\n lastObserved?: string;\n choices: readonly string[];\n directory?: LocalAgentModelDirectory;\n live: boolean;\n switchable: boolean;\n reason?: string;\n}"
2660
+ },
2661
+ {
2662
+ "name": "LocalAgentModelSource",
2663
+ "declaration": "export type LocalAgentModelSource = 'override' | 'delegation' | 'settings' | 'cli-config' | 'cli-builtin';"
2664
+ },
2665
+ {
2666
+ "name": "LocalAgentPendingConfiguration",
2667
+ "declaration": "export interface LocalAgentPendingConfiguration {\n revision: number;\n requestId: string;\n kind: 'selection' | 'cancel';\n selection: LocalAgentMemberConfiguration;\n}"
2668
+ },
2669
+ {
2670
+ "name": "LocalAgentPreparation",
2671
+ "declaration": "export interface LocalAgentPreparation {\n binding: LocalAgentMemberBinding;\n childSession: Session;\n configuration: LocalAgentAppliedConfiguration;\n signal: AbortSignal;\n}"
2672
+ },
2673
+ {
2674
+ "name": "LocalAgentReasoningOption",
2675
+ "declaration": "export interface LocalAgentReasoningOption {\n value: string;\n label: string;\n description?: string;\n}"
2676
+ },
2677
+ {
2678
+ "name": "LocalAgentRecordsAdapter",
2679
+ "declaration": "export interface LocalAgentRecordsAdapter {\n listSessions(homeDir: string): Promise<readonly LocalAgentSessionRecord[]>;\n}"
2680
+ },
2681
+ {
2682
+ "name": "LocalAgentResolvedConfiguration",
2683
+ "declaration": "export interface LocalAgentResolvedConfiguration {\n model?: string;\n effort?: string;\n}"
2684
+ },
2685
+ {
2686
+ "name": "LocalAgentRosterRow",
2687
+ "declaration": "export interface LocalAgentRosterRow {\n name: string;\n displayName: string;\n}"
2688
+ },
2689
+ {
2690
+ "name": "LocalAgentRunProgress",
2691
+ "declaration": "export type LocalAgentRunProgress = { readonly kind: 'heartbeat'; readonly elapsedMs: number; } | { readonly kind: 'mirror'; readonly mirroredLines: number; } | { readonly kind: 'delta'; readonly text: string; } | { readonly kind: 'settled'; readonly observedEffort?: string; readonly observedModel?: string; readonly cliVersion?: string; readonly usage?: TokenUsage; readonly toolCalls?: LocalAgentToolCalls; };"
2692
+ },
2693
+ {
2694
+ "name": "LocalAgentScopeProvisionOptions",
2695
+ "declaration": "export interface LocalAgentScopeProvisionOptions {\n preset?: string;\n}"
2696
+ },
2697
+ {
2698
+ "name": "LocalAgentScopeProvisionResult",
2699
+ "declaration": "export interface LocalAgentScopeProvisionResult {\n preset?: string;\n presetSnapshot?: { matchesSource: boolean; };\n}"
2700
+ },
2701
+ {
2702
+ "name": "LocalAgentSessionRecord",
2703
+ "declaration": "export interface LocalAgentSessionRecord {\n id: string;\n workDir: string;\n title?: string;\n startedAt?: number;\n}"
2704
+ },
2705
+ {
2706
+ "name": "LocalAgentStatus",
2707
+ "declaration": "export interface LocalAgentStatus {\n name: string;\n displayName: string;\n authenticated: boolean;\n credentialState: LocalAgentCredentialState;\n homeDir: string;\n scope?: string;\n delegationProvider?: string;\n loginable?: boolean;\n loginAwaitingCode?: boolean;\n logoutable?: boolean;\n effectiveSettings?: LocalAgentEffectiveSettings;\n}"
2708
+ },
2709
+ {
2710
+ "name": "LocalAgentStreamCheckpoint",
2711
+ "declaration": "export interface LocalAgentStreamCheckpoint extends Omit<LocalAgentStreamItem, 'revision'> {\n sessionId: string;\n opening?: boolean;\n closed?: boolean;\n append: boolean;\n}"
2712
+ },
2713
+ {
2714
+ "name": "LocalAgentStreamFrame",
2715
+ "declaration": "export interface LocalAgentStreamFrame {\n baseline: boolean;\n updates: readonly (LocalAgentStreamItem & { append: boolean; })[];\n removed: readonly string[];\n}"
2716
+ },
2717
+ {
2718
+ "name": "LocalAgentStreamItem",
2719
+ "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}"
2720
+ },
2721
+ {
2722
+ "name": "LocalAgentStreams",
2723
+ "declaration": "export class LocalAgentStreams {\n publish(sessionId: string, item: Omit<LocalAgentStreamItem, 'revision'>): void;\n finish(sessionId: string, id: string): void;\n follow(sessionId: string, signal: AbortSignal): AsyncIterable<LocalAgentStreamFrame>;\n dispose(): void;\n}"
2724
+ },
2725
+ {
2726
+ "name": "LocalAgentToolCalls",
2727
+ "declaration": "export interface LocalAgentToolCalls {\n readonly count: number;\n readonly byName?: Readonly<Record<string, number>>;\n}"
2728
+ },
2729
+ {
2730
+ "name": "MemberConfigurationAdapter",
2731
+ "declaration": "export interface MemberConfigurationAdapter {\n prepare?(selection: LocalAgentMemberConfiguration): Promise<LocalAgentResolvedConfiguration>;\n validate(selection: LocalAgentMemberConfiguration): Promise<void>;\n apply(selection: LocalAgentMemberConfiguration, previous: LocalAgentAppliedConfiguration, operationId: string): Promise<LocalAgentResolvedConfiguration>;\n reconcile(state: LocalAgentMemberControlState): Promise<{ active: boolean; matches: 'current' | 'operation' | 'unknown'; resolved: LocalAgentResolvedConfiguration; }>;\n}"
2732
+ },
2733
+ {
2734
+ "name": "MemberInbox",
2735
+ "declaration": "export class MemberInbox {\n read(memberId: string): LocalAgentMemberInbox;\n assertAdmission(memberId: string): void;\n enqueue(memberId: string, text: string, requestId: string): LocalAgentMemberInput;\n pause(memberId: string): void;\n resume(memberId: string): void;\n cancelStarting(memberId: string): boolean;\n cancel(memberId: string, id: string): void;\n reconcile(memberId: string, id: string, outcome: 'done' | 'cancelled', evidence: string): void;\n dispose(): void;\n}"
2736
+ },
2737
+ {
2738
+ "name": "Message",
2739
+ "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
2740
+ },
2741
+ {
2742
+ "name": "MessageBase",
2743
+ "declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
2744
+ },
2745
+ {
2746
+ "name": "MessageId",
2747
+ "declaration": "export type MessageId = Branded<'MessageId'>;"
2748
+ },
2749
+ {
2750
+ "name": "MessageRoleMap",
2751
+ "declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
2752
+ },
2753
+ {
2754
+ "name": "MessageSource",
2755
+ "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
2756
+ },
2757
+ {
2758
+ "name": "MessageSourceMap",
2759
+ "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}"
2760
+ },
2761
+ {
2762
+ "name": "ModelMessageSource",
2763
+ "declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
2764
+ },
2765
+ {
2766
+ "name": "OneShotSubagentDescriptorData",
2767
+ "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
2768
+ },
2769
+ {
2770
+ "name": "PlanAttempt",
2771
+ "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}"
2772
+ },
2773
+ {
2774
+ "name": "PlanBudget",
2775
+ "declaration": "export interface PlanBudget {\n maxParallel: number;\n maxAttempts: number;\n maxAttemptsPerTask: number;\n maxActiveMs: number;\n}"
2776
+ },
2777
+ {
2778
+ "name": "PlanEvidence",
2779
+ "declaration": "export interface PlanEvidence {\n summary: string;\n references: string[];\n artifacts: string[];\n}"
2780
+ },
2781
+ {
2782
+ "name": "PlanTask",
2783
+ "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}"
2784
+ },
2785
+ {
2786
+ "name": "ProviderRequestId",
2787
+ "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
2788
+ },
2789
+ {
2790
+ "name": "PtcDispatchEventData",
2791
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
2792
+ },
2793
+ {
2794
+ "name": "PtcDispatchStartEventData",
2795
+ "declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
2796
+ },
2797
+ {
2798
+ "name": "ReasoningBlock",
2799
+ "declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
2800
+ },
2801
+ {
2802
+ "name": "ReasoningEffortId",
2803
+ "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
2804
+ },
2805
+ {
2806
+ "name": "ReplayEnvelope",
2807
+ "declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
2808
+ },
2809
+ {
2810
+ "name": "RequestContext",
2811
+ "declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
2812
+ },
2813
+ {
2814
+ "name": "RequestHeaderReason",
2815
+ "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
2816
+ },
2817
+ {
2818
+ "name": "RoomCoordinatorEvent",
2819
+ "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}"
2820
+ },
2821
+ {
2822
+ "name": "RoomCreatedEvent",
2823
+ "declaration": "export interface RoomCreatedEvent {\n readonly version: 1;\n}"
2824
+ },
2825
+ {
2826
+ "name": "RoomDeliveryStateEvent",
2827
+ "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}"
2828
+ },
2829
+ {
2830
+ "name": "RoomDispatchEvent",
2831
+ "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}"
2832
+ },
2833
+ {
2834
+ "name": "RoomGoalEvent",
2835
+ "declaration": "export interface RoomGoalEvent {\n readonly text: string;\n}"
2836
+ },
2837
+ {
2838
+ "name": "RoomJsonValue",
2839
+ "declaration": "export type RoomJsonValue = null | boolean | number | string | RoomJsonValue[] | { [key: string]: RoomJsonValue; };"
2840
+ },
2841
+ {
2842
+ "name": "RoomMemberAddedEvent",
2843
+ "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}"
2844
+ },
2845
+ {
2846
+ "name": "RoomMemberRemovedEvent",
2847
+ "declaration": "export interface RoomMemberRemovedEvent {\n readonly name: string;\n}"
2848
+ },
2849
+ {
2850
+ "name": "RoomMemberUpdatedEvent",
2851
+ "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}"
2852
+ },
2853
+ {
2854
+ "name": "RoomPlan",
2855
+ "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}"
2856
+ },
2857
+ {
2858
+ "name": "RoomRelayEvent",
2859
+ "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}"
2860
+ },
2861
+ {
2862
+ "name": "RoomRelayResolvedEvent",
2863
+ "declaration": "export interface RoomRelayResolvedEvent {\n readonly id: string;\n readonly state: 'confirmed' | 'dismissed' | 'sent';\n}"
2864
+ },
2865
+ {
2866
+ "name": "RoomRunStateEvent",
2867
+ "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}"
2868
+ },
2869
+ {
2870
+ "name": "RoomSpeechEvent",
2871
+ "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}"
2872
+ },
2873
+ {
2874
+ "name": "RoomTaskAddedEvent",
2875
+ "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}"
2876
+ },
2877
+ {
2878
+ "name": "RoomTaskEditedEvent",
2879
+ "declaration": "export interface RoomTaskEditedEvent {\n readonly id: string;\n readonly title?: string;\n readonly blockedBy?: string | null;\n}"
2880
+ },
2881
+ {
2882
+ "name": "RoomTaskUpdatedEvent",
2883
+ "declaration": "export interface RoomTaskUpdatedEvent {\n readonly id: string;\n readonly status: 'in_progress' | 'done' | 'cancelled' | 'failed';\n}"
2884
+ },
2885
+ {
2886
+ "name": "SandboxMode",
2887
+ "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
2888
+ },
2889
+ {
2890
+ "name": "Session",
2891
+ "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}"
2892
+ },
2893
+ {
2894
+ "name": "SessionEvent",
2895
+ "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];"
2896
+ },
2897
+ {
2898
+ "name": "SessionEventMap",
2899
+ "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}"
2900
+ },
2901
+ {
2902
+ "name": "SessionEventType",
2903
+ "declaration": "export type SessionEventType = keyof SessionEventMap;"
2904
+ },
2905
+ {
2906
+ "name": "SessionHeader",
2907
+ "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}"
2908
+ },
2909
+ {
2910
+ "name": "SessionId",
2911
+ "declaration": "export type SessionId = Branded<'SessionId'>;"
2912
+ },
2913
+ {
2914
+ "name": "SessionLogOffset",
2915
+ "declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
2916
+ },
2917
+ {
2918
+ "name": "SessionSeq",
2919
+ "declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
2920
+ },
2921
+ {
2922
+ "name": "SessionSurface",
2923
+ "declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
2924
+ },
2925
+ {
2926
+ "name": "SessionTitleEventData",
2927
+ "declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
2928
+ },
2929
+ {
2930
+ "name": "SessionTitleModelIdentity",
2931
+ "declaration": "export interface SessionTitleModelIdentity {\n readonly provider: string;\n readonly model: string;\n}"
2932
+ },
2933
+ {
2934
+ "name": "SessionTitleProviderId",
2935
+ "declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
2936
+ },
2937
+ {
2938
+ "name": "SessionTitleSource",
2939
+ "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
2940
+ },
2941
+ {
2942
+ "name": "StreamChunk",
2943
+ "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; };"
2944
+ },
2945
+ {
2946
+ "name": "SubagentCatalogEvent",
2947
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
2948
+ },
2949
+ {
2950
+ "name": "SubagentDescriptorBase",
2951
+ "declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
2952
+ },
2953
+ {
2954
+ "name": "SubagentDescriptorData",
2955
+ "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
2956
+ },
2957
+ {
2958
+ "name": "SubagentResult",
2959
+ "declaration": "export interface SubagentResult {\n readonly output: readonly ContentBlock[];\n readonly structured?: unknown;\n readonly diagnostic?: string;\n readonly stopReason: SubagentStopReason;\n}"
2960
+ },
2961
+ {
2962
+ "name": "SubagentRun",
2963
+ "declaration": "export interface SubagentRun {\n readonly id: SessionId;\n readonly localAgent: Agent | undefined;\n readonly result: Promise<SubagentResult>;\n dispose(): Promise<void>;\n}"
2964
+ },
2965
+ {
2966
+ "name": "SubagentSettledMessageSource",
2967
+ "declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
2968
+ },
2969
+ {
2970
+ "name": "SubagentStopReason",
2971
+ "declaration": "export type SubagentStopReason = SubagentStopReasonMap[keyof SubagentStopReasonMap];"
2972
+ },
2973
+ {
2974
+ "name": "SubagentStopReasonMap",
2975
+ "declaration": "export interface SubagentStopReasonMap {\n completed: 'completed';\n aborted: 'aborted';\n error: 'error';\n 'max-tokens': 'max-tokens';\n refusal: 'refusal';\n}"
2976
+ },
2977
+ {
2978
+ "name": "SurfaceEventType",
2979
+ "declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
2980
+ },
2981
+ {
2982
+ "name": "SurfaceIntent",
2983
+ "declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
2984
+ },
2985
+ {
2986
+ "name": "SurfaceOp",
2987
+ "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
2988
+ },
2989
+ {
2990
+ "name": "SystemMessage",
2991
+ "declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
2992
+ },
2993
+ {
2994
+ "name": "SystemPromptMessageSource",
2995
+ "declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
2996
+ },
2997
+ {
2998
+ "name": "SystemPromptUpdate",
2999
+ "declaration": "export type SystemPromptUpdate = 'in-history';"
3000
+ },
3001
+ {
3002
+ "name": "TextBlock",
3003
+ "declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
3004
+ },
3005
+ {
3006
+ "name": "TodoItem",
3007
+ "declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
3008
+ },
3009
+ {
3010
+ "name": "TokenUsage",
3011
+ "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
3012
+ },
3013
+ {
3014
+ "name": "ToolAdditionBlock",
3015
+ "declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
3016
+ },
3017
+ {
3018
+ "name": "ToolCallBlock",
3019
+ "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
3020
+ },
3021
+ {
3022
+ "name": "ToolCallId",
3023
+ "declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
3024
+ },
3025
+ {
3026
+ "name": "ToolMessageSource",
3027
+ "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
3028
+ },
3029
+ {
3030
+ "name": "ToolRemovalBlock",
3031
+ "declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
3032
+ },
3033
+ {
3034
+ "name": "ToolRestriction",
3035
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
3036
+ },
3037
+ {
3038
+ "name": "ToolResultMessage",
3039
+ "declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
3040
+ },
3041
+ {
3042
+ "name": "ToolSchema",
3043
+ "declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
3044
+ },
3045
+ {
3046
+ "name": "TurnEndCancelCause",
3047
+ "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
3048
+ },
3049
+ {
3050
+ "name": "TurnEndReason",
3051
+ "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
3052
+ },
3053
+ {
3054
+ "name": "TurnEndReasonMap",
3055
+ "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}"
3056
+ },
3057
+ {
3058
+ "name": "UserMessage",
3059
+ "declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
3060
+ }
3061
+ ]
3062
+ }
3063
+ ],
3064
+ "events": [
3065
+ {
3066
+ "description": "A harness became resolvable: its scoped home exists and its command family is registered.",
3067
+ "summary": "A harness became resolvable: its scoped home exists and its command family is registered.",
3068
+ "tags": [
3069
+ {
3070
+ "name": "param",
3071
+ "argument": "harness",
3072
+ "comment": "- the registered harness.",
3073
+ "text": "@param harness - the registered harness.\n *"
3074
+ },
3075
+ {
3076
+ "name": "mode",
3077
+ "comment": "emit",
3078
+ "text": "@mode emit"
3079
+ }
3080
+ ],
3081
+ "jsDoc": "/**\n * A harness became resolvable: its scoped home exists and its command\n * family is registered.\n * @param harness - the registered harness.\n * @mode emit\n */",
3082
+ "name": "localAgent/harness-added",
3083
+ "mode": "emit",
3084
+ "signature": "'localAgent/harness-added'(harness: LocalAgentHarness): void"
3085
+ },
3086
+ {
3087
+ "description": "A harness left the registry; its command family is unregistered.",
3088
+ "summary": "A harness left the registry; its command family is unregistered.",
3089
+ "tags": [
3090
+ {
3091
+ "name": "param",
3092
+ "argument": "name",
3093
+ "comment": "- the harness name that no longer resolves.",
3094
+ "text": "@param name - the harness name that no longer resolves.\n *"
3095
+ },
3096
+ {
3097
+ "name": "mode",
3098
+ "comment": "emit",
3099
+ "text": "@mode emit"
3100
+ }
3101
+ ],
3102
+ "jsDoc": "/**\n * A harness left the registry; its command family is unregistered.\n * @param name - the harness name that no longer resolves.\n * @mode emit\n */",
3103
+ "name": "localAgent/harness-removed",
3104
+ "mode": "emit",
3105
+ "signature": "'localAgent/harness-removed'(name: string): void"
3106
+ },
3107
+ {
3108
+ "description": "Progress for one delegation run. The facade emits `heartbeat` payloads while a facade-tracked run is in flight; providers report the data-bearing kinds through `LocalAgentRegistry.reportRunProgress` and the registry re-emits them here (reports for sessions with no facade-tracked run still emit, so a provider-only run stays observable).",
3109
+ "summary": "Progress for one delegation run.",
3110
+ "tags": [
3111
+ {
3112
+ "name": "param",
3113
+ "argument": "childSessionId",
3114
+ "comment": "- the dsh child session id of the run.",
3115
+ "text": "@param childSessionId - the dsh child session id of the run.\n *"
3116
+ },
3117
+ {
3118
+ "name": "param",
3119
+ "argument": "progress",
3120
+ "comment": "- the progress payload.",
3121
+ "text": "@param progress - the progress payload.\n *"
3122
+ },
3123
+ {
3124
+ "name": "mode",
3125
+ "comment": "emit",
3126
+ "text": "@mode emit"
3127
+ }
3128
+ ],
3129
+ "jsDoc": "/**\n * Progress for one delegation run. The facade emits `heartbeat` payloads\n * while a facade-tracked run is in flight; providers report the\n * data-bearing kinds through `LocalAgentRegistry.reportRunProgress` and\n * the registry re-emits them here (reports for sessions with no\n * facade-tracked run still emit, so a provider-only run stays\n * observable).\n * @param childSessionId - the dsh child session id of the run.\n * @param progress - the progress payload.\n * @mode emit\n */",
3130
+ "name": "localAgent/run-progress",
3131
+ "mode": "emit",
3132
+ "signature": "'localAgent/run-progress'(childSessionId: string, progress: LocalAgentRunProgress): void"
3133
+ }
3134
+ ],
3135
+ "objects": []
3136
+ },
3137
+ }