@crazx/dsh-api-session-controller 0.1.2-alpha.3.zw.1

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 (74) hide show
  1. package/LICENSE +21 -0
  2. package/README.i18n.yaml +6 -0
  3. package/README.md +74 -0
  4. package/README.zh.md +74 -0
  5. package/lib/client.js +2724 -0
  6. package/lib/index.js +2826 -0
  7. package/lib/invariant.js +13 -0
  8. package/lib/typert.host.d.ts +3 -0
  9. package/lib/typert.host.js +2574 -0
  10. package/lib/typert.remote-client.d.ts +67 -0
  11. package/lib/typert.remote-client.js +1119 -0
  12. package/lib/types/agent.d.ts +156 -0
  13. package/lib/types/agent.js +537 -0
  14. package/lib/types/catalog.d.ts +11 -0
  15. package/lib/types/catalog.js +58 -0
  16. package/lib/types/client/contract/events.d.ts +71 -0
  17. package/lib/types/client/contract/events.js +91 -0
  18. package/lib/types/client/contract/session.d.ts +150 -0
  19. package/lib/types/client/contract/session.js +2 -0
  20. package/lib/types/client/contract/sessions.d.ts +125 -0
  21. package/lib/types/client/contract/sessions.js +2 -0
  22. package/lib/types/client/contract/snapshot.d.ts +82 -0
  23. package/lib/types/client/contract/snapshot.js +2 -0
  24. package/lib/types/client/index.d.ts +30 -0
  25. package/lib/types/client/index.js +48 -0
  26. package/lib/types/client/ordered-baseline.d.ts +12 -0
  27. package/lib/types/client/ordered-baseline.js +41 -0
  28. package/lib/types/client/scope.d.ts +36 -0
  29. package/lib/types/client/scope.js +54 -0
  30. package/lib/types/client/sessions/history-records.d.ts +22 -0
  31. package/lib/types/client/sessions/history-records.js +31 -0
  32. package/lib/types/client/sessions/lineage.d.ts +38 -0
  33. package/lib/types/client/sessions/lineage.js +56 -0
  34. package/lib/types/client/sessions/manager.d.ts +280 -0
  35. package/lib/types/client/sessions/manager.js +894 -0
  36. package/lib/types/client/sessions/notifier.d.ts +39 -0
  37. package/lib/types/client/sessions/notifier.js +98 -0
  38. package/lib/types/client/sessions/projection-store.d.ts +108 -0
  39. package/lib/types/client/sessions/projection-store.js +129 -0
  40. package/lib/types/client/sessions/queue-mirror.d.ts +26 -0
  41. package/lib/types/client/sessions/queue-mirror.js +61 -0
  42. package/lib/types/client/sessions/remotes.d.ts +30 -0
  43. package/lib/types/client/sessions/remotes.js +8 -0
  44. package/lib/types/client/sessions/service.d.ts +349 -0
  45. package/lib/types/client/sessions/service.js +574 -0
  46. package/lib/types/client/sessions/session.d.ts +294 -0
  47. package/lib/types/client/sessions/session.js +711 -0
  48. package/lib/types/client/time-zone.d.ts +8 -0
  49. package/lib/types/client/time-zone.js +14 -0
  50. package/lib/types/client/transport.d.ts +73 -0
  51. package/lib/types/client/transport.js +106 -0
  52. package/lib/types/commands.d.ts +69 -0
  53. package/lib/types/commands.js +544 -0
  54. package/lib/types/control.d.ts +23 -0
  55. package/lib/types/control.js +192 -0
  56. package/lib/types/file-references.d.ts +27 -0
  57. package/lib/types/file-references.js +69 -0
  58. package/lib/types/history.d.ts +31 -0
  59. package/lib/types/history.js +376 -0
  60. package/lib/types/index.d.ts +171 -0
  61. package/lib/types/index.js +424 -0
  62. package/lib/types/invariant.d.ts +9 -0
  63. package/lib/types/invariant.js +12 -0
  64. package/lib/types/list.d.ts +53 -0
  65. package/lib/types/list.js +405 -0
  66. package/lib/types/model-selection-projection.d.ts +8 -0
  67. package/lib/types/model-selection-projection.js +66 -0
  68. package/lib/types/remote-events.d.ts +8 -0
  69. package/lib/types/remote-events.js +2 -0
  70. package/lib/types/skill-catalog.d.ts +28 -0
  71. package/lib/types/skill-catalog.js +192 -0
  72. package/lib/types/types.d.ts +505 -0
  73. package/lib/types/types.js +6 -0
  74. package/package.json +154 -0
@@ -0,0 +1,2574 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ const ContentBlockRemoteCodec$schema = z.union([z.object({
5
+ 'type': z.literal("text"),
6
+ 'text': z.string(),
7
+ }), z.object({
8
+ 'type': z.literal("image"),
9
+ 'attachment': z.object({
10
+ 'attachmentId': z.intersection(z.string(), z.unknown()),
11
+ 'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
12
+ 'bytes': z.number(),
13
+ 'width': z.number(),
14
+ 'height': z.number(),
15
+ 'name': z.string().optional(),
16
+ 'originalDimensions': z.object({
17
+ 'width': z.number(),
18
+ 'height': z.number(),
19
+ }).optional(),
20
+ }),
21
+ }), z.object({
22
+ 'type': z.literal("reasoning"),
23
+ 'text': z.string(),
24
+ }), z.object({
25
+ 'type': z.literal("tool-call"),
26
+ 'id': z.intersection(z.string(), z.unknown()),
27
+ 'name': z.string(),
28
+ 'arguments': z.string(),
29
+ }), z.object({
30
+ 'type': z.literal("tool-result"),
31
+ 'toolCallId': z.intersection(z.string(), z.unknown()),
32
+ 'content': z.array(z.lazy(() => ContentBlockRemoteCodec$schema)),
33
+ 'isError': z.boolean().optional(),
34
+ })])
35
+ const JsonValueRemoteCodec$schema = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema))])
36
+ const JsonValueRemoteCodec$schema2 = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2))])
37
+ const JsonValueRemoteCodec$schema3 = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))])
38
+ const JsonValueRemoteCodec$schema4 = z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])
39
+ const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema = z.intersection(z.string(), z.unknown())
40
+ const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1$schema = z.string()
41
+ const _deepseek_ai_dsh_api_session_controller_fileReferences_list_result$schema = z.array(z.object({
42
+ 'path': z.string(),
43
+ 'kind': z.union([z.literal("file"), z.literal("directory")]),
44
+ }))
45
+ const _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0$schema = z.object({
46
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
47
+ 'attachmentId': z.intersection(z.string(), z.unknown()).readonly(),
48
+ })
49
+ const _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema = z.object({
50
+ 'attachment': z.object({
51
+ 'attachmentId': z.intersection(z.string(), z.unknown()),
52
+ 'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
53
+ 'bytes': z.number(),
54
+ 'width': z.number(),
55
+ 'height': z.number(),
56
+ 'name': z.string().optional(),
57
+ 'originalDimensions': z.object({
58
+ 'width': z.number(),
59
+ 'height': z.number(),
60
+ }).optional(),
61
+ }).readonly(),
62
+ 'data': z.string().readonly(),
63
+ })
64
+ const _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0$schema = z.object({
65
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
66
+ })
67
+ const _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema = z.object({
68
+ 'accepted': z.literal(true).readonly(),
69
+ })
70
+ const _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema = z.boolean()
71
+ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = z.union([z.object({
72
+ 'type': z.literal("baseline").readonly(),
73
+ 'value': z.object({
74
+ 'queues': z.record(z.intersection(z.string(), z.unknown()), z.array(z.object({
75
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
76
+ 'placement': z.union([z.literal("queued"), z.literal("steering"), z.literal("context")]).readonly(),
77
+ 'rpcId': z.intersection(z.string(), z.unknown()).readonly().optional(),
78
+ 'message': z.object({
79
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
80
+ 'content': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])).readonly(),
81
+ }).readonly(),
82
+ }))).readonly().readonly(),
83
+ 'jobs': z.record(z.intersection(z.string(), z.unknown()), z.array(z.object({
84
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
85
+ 'kind': z.string().readonly(),
86
+ 'label': z.string().readonly(),
87
+ 'status': z.union([z.literal("completed"), z.literal("running"), z.literal("stopping"), z.literal("killed"), z.literal("failed")]).readonly(),
88
+ 'detail': z.string().readonly().optional(),
89
+ 'startedAt': z.number().readonly(),
90
+ 'finishedAt': z.number().readonly().optional(),
91
+ }))).readonly().readonly(),
92
+ 'projections': z.record(z.intersection(z.string(), z.unknown()), z.object({
93
+ 'asOfSeq': z.number().readonly(),
94
+ 'values': z.intersection(z.object({
95
+ 'agentPreset': z.union([z.literal(null), z.string()]).optional(),
96
+ 'title': z.union([z.literal(null), z.string()]).optional(),
97
+ 'todos': z.union([z.literal(null), z.array(z.object({
98
+ 'content': z.string(),
99
+ 'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed")]),
100
+ }))]).optional(),
101
+ 'sessionListMetadata': z.object({
102
+ 'blank': z.boolean().readonly(),
103
+ 'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
104
+ }).optional(),
105
+ 'imageLimits': z.object({
106
+ 'maxImageBytes': z.number(),
107
+ 'maxImagesPerMessage': z.number(),
108
+ 'maxMessageImageBytes': z.number(),
109
+ 'maxImagePixels': z.number(),
110
+ 'maxImageDimension': z.number(),
111
+ 'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
112
+ }).optional(),
113
+ 'modelSelection': z.object({
114
+ 'lastUsed': z.union([z.literal(null), z.object({
115
+ 'provider': z.string().readonly(),
116
+ 'model': z.string().readonly(),
117
+ 'reasoningEffort': z.string().readonly().optional(),
118
+ })]).readonly(),
119
+ 'next': z.union([z.literal(null), z.object({
120
+ 'provider': z.string().readonly(),
121
+ 'model': z.string().readonly(),
122
+ 'reasoningEffort': z.string().readonly().optional(),
123
+ })]).readonly(),
124
+ }).optional(),
125
+ 'subagentTiming': z.object({
126
+ 'settledMs': z.number(),
127
+ 'active': z.object({
128
+ 'since': z.number(),
129
+ 'through': z.number(),
130
+ }).optional(),
131
+ }).optional(),
132
+ 'subagent': z.union([z.literal(null), z.object({
133
+ 'mode': z.literal("one-shot"),
134
+ 'label': z.string().optional(),
135
+ 'seq': z.number(),
136
+ }), z.object({
137
+ 'mode': z.literal("continuable"),
138
+ 'label': z.string(),
139
+ 'seq': z.number(),
140
+ })]).optional(),
141
+ 'goal': z.union([z.literal(null), z.object({
142
+ 'goal': z.object({
143
+ 'objective': z.string().readonly(),
144
+ 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
145
+ 'blockedReason': z.object({
146
+ 'code': z.string().readonly(),
147
+ 'message': z.string().readonly(),
148
+ }).readonly().optional(),
149
+ 'maxGoalRounds': z.number().readonly(),
150
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
151
+ 'revision': z.number().readonly(),
152
+ }).readonly(),
153
+ 'roundsStarted': z.number().readonly(),
154
+ 'createdAt': z.number().readonly(),
155
+ 'updatedAt': z.number().readonly(),
156
+ })]).optional(),
157
+ }), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])).readonly()).readonly(),
158
+ })).readonly().readonly(),
159
+ }).readonly(),
160
+ }), z.object({
161
+ 'type': z.literal("queue").readonly(),
162
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
163
+ 'items': z.array(z.object({
164
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
165
+ 'placement': z.union([z.literal("queued"), z.literal("steering"), z.literal("context")]).readonly(),
166
+ 'rpcId': z.intersection(z.string(), z.unknown()).readonly().optional(),
167
+ 'message': z.object({
168
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
169
+ 'content': z.array(z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))])).readonly(),
170
+ }).readonly(),
171
+ })).readonly(),
172
+ }), z.object({
173
+ 'type': z.literal("jobs").readonly(),
174
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
175
+ 'jobs': z.array(z.object({
176
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
177
+ 'kind': z.string().readonly(),
178
+ 'label': z.string().readonly(),
179
+ 'status': z.union([z.literal("completed"), z.literal("running"), z.literal("stopping"), z.literal("killed"), z.literal("failed")]).readonly(),
180
+ 'detail': z.string().readonly().optional(),
181
+ 'startedAt': z.number().readonly(),
182
+ 'finishedAt': z.number().readonly().optional(),
183
+ })).readonly(),
184
+ }), z.intersection(z.object({
185
+ 'type': z.literal("projection").readonly(),
186
+ }), z.object({
187
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
188
+ 'key': z.string().readonly(),
189
+ 'value': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4))]).readonly(),
190
+ 'seq': z.number().readonly(),
191
+ }))])
192
+ const _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema = z.object({
193
+ 'workspaceId': z.intersection(z.string(), z.unknown()).readonly().optional(),
194
+ 'cwd': z.string().readonly().optional(),
195
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly().optional(),
196
+ 'agentPreset': z.string().readonly().optional(),
197
+ })
198
+ const _deepseek_ai_dsh_api_session_controller_session_create_result$schema = z.object({
199
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
200
+ 'agentPreset': z.string().readonly().optional(),
201
+ })
202
+ const _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema = z.object({
203
+ 'address': z.union([z.object({
204
+ 'kind': z.literal("session").readonly(),
205
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
206
+ }), z.object({
207
+ 'kind': z.literal("subagent").readonly(),
208
+ 'parentSessionId': z.intersection(z.string(), z.unknown()).readonly(),
209
+ 'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
210
+ 'mode': z.union([z.literal("one-shot"), z.literal("continuable")]).readonly(),
211
+ })]).readonly(),
212
+ 'maxMessages': z.number().readonly().optional(),
213
+ })
214
+ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = z.union([z.object({
215
+ 'type': z.literal("event").readonly(),
216
+ 'event': z.object({
217
+ 'type': z.string().readonly(),
218
+ 'seq': z.number().readonly(),
219
+ 'time': z.number().readonly(),
220
+ 'data': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly(),
221
+ 'ignorable': z.literal(true).readonly().optional(),
222
+ 'sourceEventSeqs': z.array(z.number()).readonly().optional(),
223
+ 'surfaceOp': z.union([z.literal("append"), z.object({
224
+ 'op': z.literal("replace"),
225
+ 'start': z.number(),
226
+ 'end': z.number(),
227
+ })]).readonly().optional(),
228
+ }).readonly(),
229
+ }), z.object({
230
+ 'type': z.literal("snapshot").readonly(),
231
+ 'header': z.object({
232
+ 'version': z.number().readonly(),
233
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
234
+ 'createdAt': z.number().readonly(),
235
+ 'cwd': z.string().readonly().optional(),
236
+ 'parentSession': z.intersection(z.string(), z.unknown()).readonly().optional(),
237
+ 'seedLength': z.number().readonly().optional(),
238
+ 'origin': z.literal("subagent").readonly().optional(),
239
+ 'delegationDepth': z.number().readonly().optional(),
240
+ 'agentPreset': z.string().readonly().optional(),
241
+ }).readonly(),
242
+ 'cursor': z.number().readonly(),
243
+ 'records': z.array(z.union([z.object({
244
+ 'type': z.literal("event").readonly(),
245
+ 'event': z.object({
246
+ 'type': z.string().readonly(),
247
+ 'seq': z.number().readonly(),
248
+ 'time': z.number().readonly(),
249
+ 'data': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))]).readonly(),
250
+ 'ignorable': z.literal(true).readonly().optional(),
251
+ 'sourceEventSeqs': z.array(z.number()).readonly().optional(),
252
+ 'surfaceOp': z.union([z.literal("append"), z.object({
253
+ 'op': z.literal("replace"),
254
+ 'start': z.number(),
255
+ 'end': z.number(),
256
+ })]).readonly().optional(),
257
+ }).readonly(),
258
+ }), z.object({
259
+ 'type': z.literal("chunks").readonly(),
260
+ 'event': z.union([z.object({
261
+ 'type': z.literal("chunkrow/text-chunks").readonly(),
262
+ 'seq': z.number().readonly(),
263
+ 'time': z.number().readonly(),
264
+ 'data': z.object({
265
+ 'texts': z.array(z.string()),
266
+ 'turn': z.number(),
267
+ 'step': z.number(),
268
+ 'index': z.number(),
269
+ 'dt': z.array(z.number()),
270
+ }).readonly(),
271
+ }), z.object({
272
+ 'type': z.literal("chunkrow/reasoning-chunks").readonly(),
273
+ 'seq': z.number().readonly(),
274
+ 'time': z.number().readonly(),
275
+ 'data': z.object({
276
+ 'texts': z.array(z.string()),
277
+ 'turn': z.number(),
278
+ 'step': z.number(),
279
+ 'index': z.number(),
280
+ 'dt': z.array(z.number()),
281
+ }).readonly(),
282
+ }), z.object({
283
+ 'type': z.literal("chunkrow/tool-call-chunks").readonly(),
284
+ 'seq': z.number().readonly(),
285
+ 'time': z.number().readonly(),
286
+ 'data': z.object({
287
+ 'id': z.intersection(z.string(), z.unknown()),
288
+ 'name': z.string().optional(),
289
+ 'args': z.array(z.string()),
290
+ 'turn': z.number(),
291
+ 'step': z.number(),
292
+ 'index': z.number(),
293
+ 'dt': z.array(z.number()),
294
+ }).readonly(),
295
+ })]).readonly(),
296
+ })])).readonly(),
297
+ 'hasMore': z.boolean().readonly(),
298
+ 'projections': z.object({
299
+ 'asOfSeq': z.number().readonly(),
300
+ 'values': z.intersection(z.object({
301
+ 'agentPreset': z.union([z.literal(null), z.string()]).optional(),
302
+ 'title': z.union([z.literal(null), z.string()]).optional(),
303
+ 'todos': z.union([z.literal(null), z.array(z.object({
304
+ 'content': z.string(),
305
+ 'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed")]),
306
+ }))]).optional(),
307
+ 'sessionListMetadata': z.object({
308
+ 'blank': z.boolean().readonly(),
309
+ 'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
310
+ }).optional(),
311
+ 'imageLimits': z.object({
312
+ 'maxImageBytes': z.number(),
313
+ 'maxImagesPerMessage': z.number(),
314
+ 'maxMessageImageBytes': z.number(),
315
+ 'maxImagePixels': z.number(),
316
+ 'maxImageDimension': z.number(),
317
+ 'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
318
+ }).optional(),
319
+ 'modelSelection': z.object({
320
+ 'lastUsed': z.union([z.literal(null), z.object({
321
+ 'provider': z.string().readonly(),
322
+ 'model': z.string().readonly(),
323
+ 'reasoningEffort': z.string().readonly().optional(),
324
+ })]).readonly(),
325
+ 'next': z.union([z.literal(null), z.object({
326
+ 'provider': z.string().readonly(),
327
+ 'model': z.string().readonly(),
328
+ 'reasoningEffort': z.string().readonly().optional(),
329
+ })]).readonly(),
330
+ }).optional(),
331
+ 'subagentTiming': z.object({
332
+ 'settledMs': z.number(),
333
+ 'active': z.object({
334
+ 'since': z.number(),
335
+ 'through': z.number(),
336
+ }).optional(),
337
+ }).optional(),
338
+ 'subagent': z.union([z.literal(null), z.object({
339
+ 'mode': z.literal("one-shot"),
340
+ 'label': z.string().optional(),
341
+ 'seq': z.number(),
342
+ }), z.object({
343
+ 'mode': z.literal("continuable"),
344
+ 'label': z.string(),
345
+ 'seq': z.number(),
346
+ })]).optional(),
347
+ 'goal': z.union([z.literal(null), z.object({
348
+ 'goal': z.object({
349
+ 'objective': z.string().readonly(),
350
+ 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
351
+ 'blockedReason': z.object({
352
+ 'code': z.string().readonly(),
353
+ 'message': z.string().readonly(),
354
+ }).readonly().optional(),
355
+ 'maxGoalRounds': z.number().readonly(),
356
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
357
+ 'revision': z.number().readonly(),
358
+ }).readonly(),
359
+ 'roundsStarted': z.number().readonly(),
360
+ 'createdAt': z.number().readonly(),
361
+ 'updatedAt': z.number().readonly(),
362
+ })]).optional(),
363
+ }), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3))])).readonly()).readonly(),
364
+ }).readonly(),
365
+ })])
366
+ const _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema = z.object({
367
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
368
+ 'atSeq': z.number().readonly().optional(),
369
+ })
370
+ const _deepseek_ai_dsh_api_session_controller_session_fork_result$schema = z.object({
371
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
372
+ })
373
+ const _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema = z.object({
374
+ 'cursor': z.string().readonly().optional(),
375
+ })
376
+ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = z.object({
377
+ 'items': z.array(z.object({
378
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
379
+ 'updatedAt': z.number().readonly(),
380
+ 'running': z.boolean().readonly(),
381
+ 'blank': z.boolean().readonly(),
382
+ 'parentSessionId': z.intersection(z.string(), z.unknown()).readonly().optional(),
383
+ 'origin': z.literal("subagent").readonly().optional(),
384
+ 'cwd': z.string().readonly().optional(),
385
+ 'projections': z.object({
386
+ 'asOfSeq': z.number().readonly(),
387
+ 'values': z.intersection(z.object({
388
+ 'agentPreset': z.union([z.literal(null), z.string()]).optional(),
389
+ 'title': z.union([z.literal(null), z.string()]).optional(),
390
+ 'todos': z.union([z.literal(null), z.array(z.object({
391
+ 'content': z.string(),
392
+ 'status': z.union([z.literal("pending"), z.literal("in_progress"), z.literal("completed")]),
393
+ }))]).optional(),
394
+ 'sessionListMetadata': z.object({
395
+ 'blank': z.boolean().readonly(),
396
+ 'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
397
+ }).optional(),
398
+ 'imageLimits': z.object({
399
+ 'maxImageBytes': z.number(),
400
+ 'maxImagesPerMessage': z.number(),
401
+ 'maxMessageImageBytes': z.number(),
402
+ 'maxImagePixels': z.number(),
403
+ 'maxImageDimension': z.number(),
404
+ 'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
405
+ }).optional(),
406
+ 'modelSelection': z.object({
407
+ 'lastUsed': z.union([z.literal(null), z.object({
408
+ 'provider': z.string().readonly(),
409
+ 'model': z.string().readonly(),
410
+ 'reasoningEffort': z.string().readonly().optional(),
411
+ })]).readonly(),
412
+ 'next': z.union([z.literal(null), z.object({
413
+ 'provider': z.string().readonly(),
414
+ 'model': z.string().readonly(),
415
+ 'reasoningEffort': z.string().readonly().optional(),
416
+ })]).readonly(),
417
+ }).optional(),
418
+ 'subagentTiming': z.object({
419
+ 'settledMs': z.number(),
420
+ 'active': z.object({
421
+ 'since': z.number(),
422
+ 'through': z.number(),
423
+ }).optional(),
424
+ }).optional(),
425
+ 'subagent': z.union([z.literal(null), z.object({
426
+ 'mode': z.literal("one-shot"),
427
+ 'label': z.string().optional(),
428
+ 'seq': z.number(),
429
+ }), z.object({
430
+ 'mode': z.literal("continuable"),
431
+ 'label': z.string(),
432
+ 'seq': z.number(),
433
+ })]).optional(),
434
+ 'goal': z.union([z.literal(null), z.object({
435
+ 'goal': z.object({
436
+ 'objective': z.string().readonly(),
437
+ 'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
438
+ 'blockedReason': z.object({
439
+ 'code': z.string().readonly(),
440
+ 'message': z.string().readonly(),
441
+ }).readonly().optional(),
442
+ 'maxGoalRounds': z.number().readonly(),
443
+ 'id': z.intersection(z.string(), z.unknown()).readonly(),
444
+ 'revision': z.number().readonly(),
445
+ }).readonly(),
446
+ 'roundsStarted': z.number().readonly(),
447
+ 'createdAt': z.number().readonly(),
448
+ 'updatedAt': z.number().readonly(),
449
+ })]).optional(),
450
+ }), z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema))])).readonly()).readonly(),
451
+ }).readonly().optional(),
452
+ })).readonly(),
453
+ })
454
+ const _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema = z.object({
455
+ 'default': z.object({
456
+ 'provider': z.string().readonly(),
457
+ 'model': z.string().readonly(),
458
+ 'reasoningEffort': z.string().readonly().optional(),
459
+ }).readonly(),
460
+ 'routableProviders': z.array(z.string()).readonly(),
461
+ 'groups': z.array(z.object({
462
+ 'id': z.string().readonly(),
463
+ 'name': z.string().readonly(),
464
+ 'models': z.array(z.object({
465
+ 'id': z.string().readonly(),
466
+ 'name': z.string().readonly(),
467
+ 'description': z.string().readonly().optional(),
468
+ 'reasoning': z.object({
469
+ 'efforts': z.array(z.object({
470
+ 'id': z.string().readonly(),
471
+ 'name': z.string().readonly(),
472
+ 'description': z.string().readonly().optional(),
473
+ })).readonly(),
474
+ 'defaultEffort': z.string().readonly().optional(),
475
+ }).readonly().optional(),
476
+ })).readonly(),
477
+ })).readonly(),
478
+ 'failures': z.array(z.object({
479
+ 'id': z.string().readonly(),
480
+ 'name': z.string().readonly(),
481
+ 'message': z.string().readonly(),
482
+ })).readonly(),
483
+ })
484
+ const _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema = z.object({
485
+ 'path': z.string().readonly(),
486
+ })
487
+ const _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema = z.object({
488
+ 'opened': z.literal(true).readonly(),
489
+ })
490
+ const _deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema = z.object({
491
+ 'address': z.union([z.object({
492
+ 'kind': z.literal("session").readonly(),
493
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
494
+ }), z.object({
495
+ 'kind': z.literal("subagent").readonly(),
496
+ 'parentSessionId': z.intersection(z.string(), z.unknown()).readonly(),
497
+ 'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
498
+ 'mode': z.union([z.literal("one-shot"), z.literal("continuable")]).readonly(),
499
+ })]).readonly(),
500
+ 'throughSeq': z.number().readonly(),
501
+ 'beforeSeq': z.number().readonly().optional(),
502
+ 'maxMessages': z.number().readonly().optional(),
503
+ })
504
+ const _deepseek_ai_dsh_api_session_controller_session_page_result$schema = z.object({
505
+ 'records': z.array(z.union([z.object({
506
+ 'type': z.literal("event").readonly(),
507
+ 'event': z.object({
508
+ 'type': z.string().readonly(),
509
+ 'seq': z.number().readonly(),
510
+ 'time': z.number().readonly(),
511
+ 'data': z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2)), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2))]).readonly(),
512
+ 'ignorable': z.literal(true).readonly().optional(),
513
+ 'sourceEventSeqs': z.array(z.number()).readonly().optional(),
514
+ 'surfaceOp': z.union([z.literal("append"), z.object({
515
+ 'op': z.literal("replace"),
516
+ 'start': z.number(),
517
+ 'end': z.number(),
518
+ })]).readonly().optional(),
519
+ }).readonly(),
520
+ }), z.object({
521
+ 'type': z.literal("chunks").readonly(),
522
+ 'event': z.union([z.object({
523
+ 'type': z.literal("chunkrow/text-chunks").readonly(),
524
+ 'seq': z.number().readonly(),
525
+ 'time': z.number().readonly(),
526
+ 'data': z.object({
527
+ 'texts': z.array(z.string()),
528
+ 'turn': z.number(),
529
+ 'step': z.number(),
530
+ 'index': z.number(),
531
+ 'dt': z.array(z.number()),
532
+ }).readonly(),
533
+ }), z.object({
534
+ 'type': z.literal("chunkrow/reasoning-chunks").readonly(),
535
+ 'seq': z.number().readonly(),
536
+ 'time': z.number().readonly(),
537
+ 'data': z.object({
538
+ 'texts': z.array(z.string()),
539
+ 'turn': z.number(),
540
+ 'step': z.number(),
541
+ 'index': z.number(),
542
+ 'dt': z.array(z.number()),
543
+ }).readonly(),
544
+ }), z.object({
545
+ 'type': z.literal("chunkrow/tool-call-chunks").readonly(),
546
+ 'seq': z.number().readonly(),
547
+ 'time': z.number().readonly(),
548
+ 'data': z.object({
549
+ 'id': z.intersection(z.string(), z.unknown()),
550
+ 'name': z.string().optional(),
551
+ 'args': z.array(z.string()),
552
+ 'turn': z.number(),
553
+ 'step': z.number(),
554
+ 'index': z.number(),
555
+ 'dt': z.array(z.number()),
556
+ }).readonly(),
557
+ })]).readonly(),
558
+ })])).readonly(),
559
+ 'hasMore': z.boolean().readonly(),
560
+ })
561
+ const _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema = z.object({
562
+ 'requestId': z.intersection(z.string(), z.unknown()).readonly(),
563
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
564
+ 'mode': z.union([z.literal("queue"), z.literal("steer")]).readonly(),
565
+ 'content': z.array(z.union([z.object({
566
+ 'type': z.literal("text").readonly(),
567
+ 'text': z.string().readonly(),
568
+ }), z.object({
569
+ 'type': z.literal("image").readonly(),
570
+ 'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]).readonly(),
571
+ 'data': z.string().readonly(),
572
+ 'name': z.string().readonly().optional(),
573
+ })])).readonly(),
574
+ 'clientTimeZone': z.string().readonly().optional(),
575
+ })
576
+ const _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema = z.object({
577
+ 'accepted': z.literal(true).readonly(),
578
+ })
579
+ const _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0$schema = z.object({
580
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
581
+ 'title': z.string().readonly(),
582
+ })
583
+ const _deepseek_ai_dsh_api_session_controller_session_rename_result$schema = z.object({
584
+ 'title': z.string().readonly(),
585
+ 'seq': z.number().readonly(),
586
+ })
587
+ const _deepseek_ai_dsh_api_session_controller_session_search_parameter_0$schema = z.object({
588
+ 'query': z.string().readonly(),
589
+ })
590
+ const _deepseek_ai_dsh_api_session_controller_session_search_result$schema = z.object({
591
+ 'items': z.array(z.object({
592
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
593
+ 'snippet': z.string().readonly(),
594
+ })).readonly(),
595
+ 'hasMore': z.boolean().readonly(),
596
+ })
597
+ const _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0$schema = z.object({
598
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
599
+ 'provider': z.string().readonly(),
600
+ 'model': z.string().readonly(),
601
+ 'reasoningEffort': z.string().readonly().optional(),
602
+ })
603
+ const _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema = z.object({
604
+ 'selected': z.object({
605
+ 'provider': z.string().readonly(),
606
+ 'model': z.string().readonly(),
607
+ 'reasoningEffort': z.string().readonly().optional(),
608
+ }).readonly(),
609
+ })
610
+ const _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$schema = z.object({
611
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
612
+ 'itemId': z.intersection(z.string(), z.unknown()).readonly(),
613
+ 'action': z.union([z.object({
614
+ 'kind': z.literal("edit").readonly(),
615
+ 'content': z.array(z.union([z.object({
616
+ 'type': z.literal("text"),
617
+ 'text': z.string(),
618
+ }), z.object({
619
+ 'type': z.literal("image"),
620
+ 'attachment': z.object({
621
+ 'attachmentId': z.intersection(z.string(), z.unknown()),
622
+ 'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
623
+ 'bytes': z.number(),
624
+ 'width': z.number(),
625
+ 'height': z.number(),
626
+ 'name': z.string().optional(),
627
+ 'originalDimensions': z.object({
628
+ 'width': z.number(),
629
+ 'height': z.number(),
630
+ }).optional(),
631
+ }),
632
+ }), z.object({
633
+ 'type': z.literal("reasoning"),
634
+ 'text': z.string(),
635
+ }), z.object({
636
+ 'type': z.literal("tool-call"),
637
+ 'id': z.intersection(z.string(), z.unknown()),
638
+ 'name': z.string(),
639
+ 'arguments': z.string(),
640
+ }), z.object({
641
+ 'type': z.literal("tool-result"),
642
+ 'toolCallId': z.intersection(z.string(), z.unknown()),
643
+ 'content': z.array(z.lazy(() => ContentBlockRemoteCodec$schema)),
644
+ 'isError': z.boolean().optional(),
645
+ })])).readonly(),
646
+ }), z.object({
647
+ 'kind': z.literal("remove").readonly(),
648
+ }), z.object({
649
+ 'kind': z.literal("steer").readonly(),
650
+ })]).readonly(),
651
+ })
652
+ const _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema = z.object({
653
+ 'accepted': z.literal(true).readonly(),
654
+ })
655
+ const _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema = z.object({
656
+ 'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
657
+ })
658
+ const _deepseek_ai_dsh_api_session_controller_skills_list_result$schema = z.object({
659
+ 'skills': z.array(z.object({
660
+ 'name': z.string().readonly(),
661
+ 'description': z.string().readonly(),
662
+ 'whenToUse': z.string().readonly().optional(),
663
+ 'modelInvocable': z.boolean().readonly(),
664
+ })).readonly(),
665
+ })
666
+
667
+ export const TYPERT = {
668
+ package: '@deepseek-ai/dsh-api-session-controller',
669
+ face: 'host',
670
+ schemas: [
671
+ ],
672
+ invocations: [
673
+ {
674
+ id: '@deepseek-ai/dsh-api-session-controller#fileReferences/list',
675
+ service: 'sessionFileReferences',
676
+ namespace: 'fileReferences',
677
+ method: 'list',
678
+ invocation: { kind: 'direct' },
679
+ scope: {
680
+ context: 'agent',
681
+ wire: 'agentId',
682
+ },
683
+ parameters: [
684
+ {
685
+ name: 'agent',
686
+ wire: 'agentId',
687
+ source: 'lookup',
688
+ lookup: 'agent',
689
+ codec: {
690
+ mode: 'strict',
691
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
692
+ schema: _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema,
693
+ },
694
+ },
695
+ {
696
+ name: 'query',
697
+ wire: 'query',
698
+ source: 'json',
699
+ codec: {
700
+ mode: 'strict',
701
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller#fileReferences/list:query',
702
+ schema: _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1$schema,
703
+ },
704
+ },
705
+ ],
706
+ cancellation: { parameter: 'signal' },
707
+ result: {
708
+ mode: 'strict',
709
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller#fileReferences/list:result',
710
+ schema: _deepseek_ai_dsh_api_session_controller_fileReferences_list_result$schema,
711
+ },
712
+ sourceLocation: {"file":"packages/api/session-controller/src/file-references.ts","line":33,"column":3},
713
+ },
714
+ {
715
+ id: '@deepseek-ai/dsh-api-session-controller#session/attachment',
716
+ service: 'sessionController',
717
+ namespace: 'session',
718
+ method: 'attachment',
719
+ invocation: { kind: 'direct' },
720
+ parameters: [
721
+ {
722
+ name: 'request',
723
+ wire: 'request',
724
+ source: 'json',
725
+ codec: {
726
+ mode: 'strict',
727
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentRequest',
728
+ schema: _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0$schema,
729
+ },
730
+ },
731
+ ],
732
+ result: {
733
+ mode: 'strict',
734
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentValue',
735
+ schema: _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema,
736
+ },
737
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":333,"column":3},
738
+ },
739
+ {
740
+ id: '@deepseek-ai/dsh-api-session-controller#session/cancel',
741
+ service: 'sessionController',
742
+ namespace: 'session',
743
+ method: 'cancel',
744
+ invocation: { kind: 'direct' },
745
+ parameters: [
746
+ {
747
+ name: 'request',
748
+ wire: 'request',
749
+ source: 'json',
750
+ codec: {
751
+ mode: 'strict',
752
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelRequest',
753
+ schema: _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0$schema,
754
+ },
755
+ },
756
+ ],
757
+ result: {
758
+ mode: 'strict',
759
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelValue',
760
+ schema: _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema,
761
+ },
762
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":353,"column":3},
763
+ },
764
+ {
765
+ id: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath',
766
+ service: 'sessionController',
767
+ namespace: 'session',
768
+ method: 'canOpenWorkspacePath',
769
+ invocation: { kind: 'direct' },
770
+ parameters: [
771
+ ],
772
+ result: {
773
+ mode: 'strict',
774
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath:result',
775
+ schema: _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema,
776
+ },
777
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":258,"column":3},
778
+ },
779
+ {
780
+ id: '@deepseek-ai/dsh-api-session-controller#session/control',
781
+ service: 'sessionController',
782
+ namespace: 'session',
783
+ method: 'control',
784
+ mode: 'stream',
785
+ invocation: { kind: 'direct' },
786
+ parameters: [
787
+ ],
788
+ cancellation: { parameter: 'signal' },
789
+ result: {
790
+ mode: 'strict',
791
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionControlFrame',
792
+ schema: _deepseek_ai_dsh_api_session_controller_session_control_result$schema,
793
+ },
794
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":385,"column":3},
795
+ },
796
+ {
797
+ id: '@deepseek-ai/dsh-api-session-controller#session/create',
798
+ service: 'sessionController',
799
+ namespace: 'session',
800
+ method: 'create',
801
+ invocation: { kind: 'direct' },
802
+ parameters: [
803
+ {
804
+ name: 'request',
805
+ wire: 'request',
806
+ source: 'json',
807
+ codec: {
808
+ mode: 'strict',
809
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateRequest',
810
+ schema: _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema,
811
+ },
812
+ },
813
+ ],
814
+ result: {
815
+ mode: 'strict',
816
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateValue',
817
+ schema: _deepseek_ai_dsh_api_session_controller_session_create_result$schema,
818
+ },
819
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":230,"column":3},
820
+ },
821
+ {
822
+ id: '@deepseek-ai/dsh-api-session-controller#session/follow',
823
+ service: 'sessionController',
824
+ namespace: 'session',
825
+ method: 'follow',
826
+ mode: 'stream',
827
+ invocation: { kind: 'direct' },
828
+ parameters: [
829
+ {
830
+ name: 'request',
831
+ wire: 'request',
832
+ source: 'json',
833
+ codec: {
834
+ mode: 'strict',
835
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowRequest',
836
+ schema: _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema,
837
+ },
838
+ },
839
+ ],
840
+ cancellation: { parameter: 'signal' },
841
+ result: {
842
+ mode: 'strict',
843
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowFrame',
844
+ schema: _deepseek_ai_dsh_api_session_controller_session_follow_result$schema,
845
+ },
846
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":375,"column":3},
847
+ },
848
+ {
849
+ id: '@deepseek-ai/dsh-api-session-controller#session/fork',
850
+ service: 'sessionController',
851
+ namespace: 'session',
852
+ method: 'fork',
853
+ invocation: { kind: 'direct' },
854
+ parameters: [
855
+ {
856
+ name: 'request',
857
+ wire: 'request',
858
+ source: 'json',
859
+ codec: {
860
+ mode: 'strict',
861
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkRequest',
862
+ schema: _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema,
863
+ },
864
+ },
865
+ ],
866
+ result: {
867
+ mode: 'strict',
868
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkValue',
869
+ schema: _deepseek_ai_dsh_api_session_controller_session_fork_result$schema,
870
+ },
871
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":311,"column":3},
872
+ },
873
+ {
874
+ id: '@deepseek-ai/dsh-api-session-controller#session/list',
875
+ service: 'sessionController',
876
+ namespace: 'session',
877
+ method: 'list',
878
+ invocation: { kind: 'direct' },
879
+ parameters: [
880
+ {
881
+ name: '_request',
882
+ wire: '_request',
883
+ source: 'json',
884
+ codec: {
885
+ mode: 'strict',
886
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListRequest',
887
+ schema: _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema,
888
+ },
889
+ },
890
+ ],
891
+ cancellation: { parameter: 'signal' },
892
+ result: {
893
+ mode: 'strict',
894
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListValue',
895
+ schema: _deepseek_ai_dsh_api_session_controller_session_list_result$schema,
896
+ },
897
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":209,"column":9},
898
+ },
899
+ {
900
+ id: '@deepseek-ai/dsh-api-session-controller#session/modelCatalog',
901
+ service: 'sessionController',
902
+ namespace: 'session',
903
+ method: 'modelCatalog',
904
+ invocation: { kind: 'direct' },
905
+ parameters: [
906
+ ],
907
+ result: {
908
+ mode: 'strict',
909
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#ModelCatalog',
910
+ schema: _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema,
911
+ },
912
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":249,"column":3},
913
+ },
914
+ {
915
+ id: '@deepseek-ai/dsh-api-session-controller#session/openWorkspacePath',
916
+ service: 'sessionController',
917
+ namespace: 'session',
918
+ method: 'openWorkspacePath',
919
+ invocation: { kind: 'direct' },
920
+ parameters: [
921
+ {
922
+ name: 'request',
923
+ wire: 'request',
924
+ source: 'json',
925
+ codec: {
926
+ mode: 'strict',
927
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathRequest',
928
+ schema: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema,
929
+ },
930
+ },
931
+ ],
932
+ cancellation: { parameter: 'signal' },
933
+ result: {
934
+ mode: 'strict',
935
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathValue',
936
+ schema: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema,
937
+ },
938
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":270,"column":9},
939
+ },
940
+ {
941
+ id: '@deepseek-ai/dsh-api-session-controller#session/page',
942
+ service: 'sessionController',
943
+ namespace: 'session',
944
+ method: 'page',
945
+ invocation: { kind: 'direct' },
946
+ parameters: [
947
+ {
948
+ name: 'request',
949
+ wire: 'request',
950
+ source: 'json',
951
+ codec: {
952
+ mode: 'strict',
953
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPageRequest',
954
+ schema: _deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema,
955
+ },
956
+ },
957
+ ],
958
+ cancellation: { parameter: 'signal' },
959
+ result: {
960
+ mode: 'strict',
961
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPage',
962
+ schema: _deepseek_ai_dsh_api_session_controller_session_page_result$schema,
963
+ },
964
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":364,"column":3},
965
+ },
966
+ {
967
+ id: '@deepseek-ai/dsh-api-session-controller#session/prompt',
968
+ service: 'sessionController',
969
+ namespace: 'session',
970
+ method: 'prompt',
971
+ invocation: { kind: 'direct' },
972
+ parameters: [
973
+ {
974
+ name: 'request',
975
+ wire: 'request',
976
+ source: 'json',
977
+ codec: {
978
+ mode: 'strict',
979
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptRequest',
980
+ schema: _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema,
981
+ },
982
+ },
983
+ ],
984
+ cancellation: { parameter: 'signal' },
985
+ result: {
986
+ mode: 'strict',
987
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptValue',
988
+ schema: _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema,
989
+ },
990
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":322,"column":3},
991
+ },
992
+ {
993
+ id: '@deepseek-ai/dsh-api-session-controller#session/rename',
994
+ service: 'sessionController',
995
+ namespace: 'session',
996
+ method: 'rename',
997
+ invocation: { kind: 'direct' },
998
+ parameters: [
999
+ {
1000
+ name: 'request',
1001
+ wire: 'request',
1002
+ source: 'json',
1003
+ codec: {
1004
+ mode: 'strict',
1005
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameRequest',
1006
+ schema: _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0$schema,
1007
+ },
1008
+ },
1009
+ ],
1010
+ result: {
1011
+ mode: 'strict',
1012
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameValue',
1013
+ schema: _deepseek_ai_dsh_api_session_controller_session_rename_result$schema,
1014
+ },
1015
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":301,"column":3},
1016
+ },
1017
+ {
1018
+ id: '@deepseek-ai/dsh-api-session-controller#session/search',
1019
+ service: 'sessionController',
1020
+ namespace: 'session',
1021
+ method: 'search',
1022
+ invocation: { kind: 'direct' },
1023
+ parameters: [
1024
+ {
1025
+ name: 'request',
1026
+ wire: 'request',
1027
+ source: 'json',
1028
+ codec: {
1029
+ mode: 'strict',
1030
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchRequest',
1031
+ schema: _deepseek_ai_dsh_api_session_controller_session_search_parameter_0$schema,
1032
+ },
1033
+ },
1034
+ ],
1035
+ cancellation: { parameter: 'signal' },
1036
+ result: {
1037
+ mode: 'strict',
1038
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchValue',
1039
+ schema: _deepseek_ai_dsh_api_session_controller_session_search_result$schema,
1040
+ },
1041
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":220,"column":3},
1042
+ },
1043
+ {
1044
+ id: '@deepseek-ai/dsh-api-session-controller#session/selectModel',
1045
+ service: 'sessionController',
1046
+ namespace: 'session',
1047
+ method: 'selectModel',
1048
+ invocation: { kind: 'direct' },
1049
+ parameters: [
1050
+ {
1051
+ name: 'request',
1052
+ wire: 'request',
1053
+ source: 'json',
1054
+ codec: {
1055
+ mode: 'strict',
1056
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelRequest',
1057
+ schema: _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0$schema,
1058
+ },
1059
+ },
1060
+ ],
1061
+ result: {
1062
+ mode: 'strict',
1063
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelValue',
1064
+ schema: _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema,
1065
+ },
1066
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":240,"column":3},
1067
+ },
1068
+ {
1069
+ id: '@deepseek-ai/dsh-api-session-controller#session/updateQueue',
1070
+ service: 'sessionController',
1071
+ namespace: 'session',
1072
+ method: 'updateQueue',
1073
+ invocation: { kind: 'direct' },
1074
+ parameters: [
1075
+ {
1076
+ name: 'request',
1077
+ wire: 'request',
1078
+ source: 'json',
1079
+ codec: {
1080
+ mode: 'strict',
1081
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueRequest',
1082
+ schema: _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$schema,
1083
+ },
1084
+ },
1085
+ ],
1086
+ result: {
1087
+ mode: 'strict',
1088
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueValue',
1089
+ schema: _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema,
1090
+ },
1091
+ sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":343,"column":3},
1092
+ },
1093
+ {
1094
+ id: '@deepseek-ai/dsh-api-session-controller#skills/list',
1095
+ service: 'sessionSkillCatalog',
1096
+ namespace: 'skills',
1097
+ method: 'list',
1098
+ invocation: { kind: 'direct' },
1099
+ parameters: [
1100
+ {
1101
+ name: 'request',
1102
+ wire: 'request',
1103
+ source: 'json',
1104
+ codec: {
1105
+ mode: 'strict',
1106
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListRequest',
1107
+ schema: _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema,
1108
+ },
1109
+ },
1110
+ ],
1111
+ cancellation: { parameter: 'signal' },
1112
+ result: {
1113
+ mode: 'strict',
1114
+ typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListValue',
1115
+ schema: _deepseek_ai_dsh_api_session_controller_skills_list_result$schema,
1116
+ },
1117
+ sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":36,"column":9},
1118
+ },
1119
+ ],
1120
+ model: {
1121
+ "services": [
1122
+ {
1123
+ "description": "Host service backing the generated `ctx.remote.session` namespace.",
1124
+ "summary": "Host service backing the generated `ctx.remote.session` namespace.",
1125
+ "tags": [],
1126
+ "jsDoc": "/** Host service backing the generated `ctx.remote.session` namespace. */",
1127
+ "key": "sessionController",
1128
+ "exportName": "SessionController",
1129
+ "members": [
1130
+ {
1131
+ "kind": "method",
1132
+ "name": "resolveAgent",
1133
+ "signature": "resolveAgent(sessionId: SessionId): Promise<ApiSessionAgentResult>",
1134
+ "summary": "Resolve or resume one ordinary Session for another Host API domain.",
1135
+ "jsDoc": "/**\n * Resolve or resume one ordinary Session for another Host API domain.\n * @param sessionId - Session identity whose Agent owns the operation.\n * @returns the live Agent or the stable Session-domain failure.\n */"
1136
+ },
1137
+ {
1138
+ "kind": "method",
1139
+ "name": "inspect",
1140
+ "signature": "inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<{ meta: SessionHeader; events: SessionEvent[] }>",
1141
+ "summary": "Inspect one attached or persisted Session without activating its Agent.",
1142
+ "jsDoc": "/**\n * Inspect one attached or persisted Session without activating its Agent.\n * @param sessionId - durable Session identity.\n * @param signal - optional caller cancellation for persistence reads.\n * @returns the current attached state or persisted header and event prefix.\n */"
1143
+ },
1144
+ {
1145
+ "kind": "method",
1146
+ "name": "list",
1147
+ "signature": "@Remote('list') async list(_request: SessionListRequest, signal: AbortSignal): Promise<SessionListValue>",
1148
+ "summary": "Read all visible Session rows without resuming an Agent.",
1149
+ "jsDoc": "/**\n * Read all visible Session rows without resuming an Agent.\n * @param _request - reserved empty list request.\n * @param signal - cancellation for persistence reads.\n * @returns visible Session summaries ordered by activity.\n */"
1150
+ },
1151
+ {
1152
+ "kind": "method",
1153
+ "name": "search",
1154
+ "signature": "@Remote('search') search(request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>",
1155
+ "summary": "Search visible Session content without resuming an Agent.",
1156
+ "jsDoc": "/**\n * Search visible Session content without resuming an Agent.\n * @param request - literal message-content query.\n * @param signal - cancellation for list and search reads.\n * @returns authorized bounded Session search results.\n */"
1157
+ },
1158
+ {
1159
+ "kind": "method",
1160
+ "name": "create",
1161
+ "signature": "@Remote('create') create(request: SessionCreateRequest): Promise<SessionCreateValue>",
1162
+ "summary": "Create or idempotently adopt one ordinary Session.",
1163
+ "jsDoc": "/**\n * Create or idempotently adopt one ordinary Session.\n * @param request - requested identity, location, and Agent preset.\n * @returns the Session identity and resolved preset when configured.\n */"
1164
+ },
1165
+ {
1166
+ "kind": "method",
1167
+ "name": "selectModel",
1168
+ "signature": "@Remote('selectModel') selectModel(request: SessionSelectModelRequest): Promise<SessionSelectModelValue>",
1169
+ "summary": "Select one Session-local model after explicitly resuming the Session.",
1170
+ "jsDoc": "/**\n * Select one Session-local model after explicitly resuming the Session.\n * @param request - Session identity and requested model selection.\n * @returns the normalized selection installed for the Session.\n */"
1171
+ },
1172
+ {
1173
+ "kind": "method",
1174
+ "name": "modelCatalog",
1175
+ "signature": "@Remote('modelCatalog') modelCatalog(): Promise<ModelCatalog>",
1176
+ "summary": "Describe every currently routable model for Host-generation selectors.",
1177
+ "jsDoc": "/**\n * Describe every currently routable model for Host-generation selectors.\n * @returns provider-grouped models, the deployment default, and isolated provider failures.\n */"
1178
+ },
1179
+ {
1180
+ "kind": "method",
1181
+ "name": "canOpenWorkspacePath",
1182
+ "signature": "@Remote canOpenWorkspacePath(): boolean",
1183
+ "summary": "Report whether this deployment can hand a Session workspace path to a native desktop.",
1184
+ "jsDoc": "/**\n * Report whether this deployment can hand a Session workspace path to a native desktop.\n * @returns true when the matching open operation is available.\n */"
1185
+ },
1186
+ {
1187
+ "kind": "method",
1188
+ "name": "openWorkspacePath",
1189
+ "signature": "@Remote('openWorkspacePath') async openWorkspacePath( request: SessionOpenWorkspacePathRequest, signal: AbortSignal, ): Promise<SessionOpenWorkspacePathValue>",
1190
+ "summary": "Open one path prepared by a Session-aware caller on the Host desktop.",
1191
+ "jsDoc": "/**\n * Open one path prepared by a Session-aware caller on the Host desktop.\n * @param request - path after best-effort Session workspace resolution.\n * @param signal - caller lifetime; abort terminates the native command.\n * @returns confirmation after the native opener accepts the path.\n * @throws RemoteError when the request is invalid, cancelled, or the opener fails.\n */"
1192
+ },
1193
+ {
1194
+ "kind": "method",
1195
+ "name": "rename",
1196
+ "signature": "@Remote('rename') rename(request: SessionRenameRequest): Promise<SessionRenameValue>",
1197
+ "summary": "Rename one Session after explicitly resuming it.",
1198
+ "jsDoc": "/**\n * Rename one Session after explicitly resuming it.\n * @param request - Session identity and proposed title.\n * @returns the accepted title and durable event sequence.\n */"
1199
+ },
1200
+ {
1201
+ "kind": "method",
1202
+ "name": "fork",
1203
+ "signature": "@Remote('fork') fork(request: SessionForkRequest): Promise<SessionForkValue>",
1204
+ "summary": "Fork one cold-readable completed-turn prefix into a new Session.",
1205
+ "jsDoc": "/**\n * Fork one cold-readable completed-turn prefix into a new Session.\n * @param request - source Session and optional event anchor.\n * @returns the new Session identity.\n */"
1206
+ },
1207
+ {
1208
+ "kind": "method",
1209
+ "name": "prompt",
1210
+ "signature": "@Remote('prompt') prompt(request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>",
1211
+ "summary": "Admit one prompt after explicitly resuming its Session.",
1212
+ "jsDoc": "/**\n * Admit one prompt after explicitly resuming its Session.\n * @param request - Session identity, prompt content, source metadata, and delivery mode.\n * @param signal - caller cancellation before prompt admission begins.\n * @returns acknowledgement that the Agent accepted the prompt.\n */"
1213
+ },
1214
+ {
1215
+ "kind": "method",
1216
+ "name": "attachment",
1217
+ "signature": "@Remote('attachment') attachment(request: SessionAttachmentRequest): Promise<SessionAttachmentValue>",
1218
+ "summary": "Read one image proven reachable from the addressed Session log.",
1219
+ "jsDoc": "/**\n * Read one image proven reachable from the addressed Session log.\n * @param request - Session and attachment identities used for authorization.\n * @returns the durable attachment reference and base64-encoded bytes.\n */"
1220
+ },
1221
+ {
1222
+ "kind": "method",
1223
+ "name": "updateQueue",
1224
+ "signature": "@Remote('updateQueue') updateQueue(request: SessionUpdateQueueRequest): SessionUpdateQueueValue",
1225
+ "summary": "Mutate one still-pending queue occurrence on a live Agent.",
1226
+ "jsDoc": "/**\n * Mutate one still-pending queue occurrence on a live Agent.\n * @param request - Session, queue item, and requested mutation.\n * @returns acknowledgement that the queue mutation was applied.\n */"
1227
+ },
1228
+ {
1229
+ "kind": "method",
1230
+ "name": "cancel",
1231
+ "signature": "@Remote('cancel') cancel(request: SessionCancelRequest): SessionCancelValue",
1232
+ "summary": "Cancel one active Agent turn without dropping its pending inbox.",
1233
+ "jsDoc": "/**\n * Cancel one active Agent turn without dropping its pending inbox.\n * @param request - Session whose active Agent turn is cancelled.\n * @returns acknowledgement that cancellation was requested.\n */"
1234
+ },
1235
+ {
1236
+ "kind": "method",
1237
+ "name": "page",
1238
+ "signature": "@Remote('page') page(request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>",
1239
+ "summary": "Read one cold-safe, message-aligned Session history page.",
1240
+ "jsDoc": "/**\n * Read one cold-safe, message-aligned Session history page.\n * @param request - durable address, backward cursor, and page budget.\n * @param signal - cancellation for persistence reads.\n * @returns one chronological page.\n */"
1241
+ },
1242
+ {
1243
+ "kind": "method",
1244
+ "name": "follow",
1245
+ "signature": "@Remote({ mode: 'stream' }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>",
1246
+ "summary": "Follow one Session log from its opening or resume cursor.",
1247
+ "jsDoc": "/**\n * Follow one Session log from its opening or resume cursor.\n * @param request - durable address and last committed sequence already held by the caller.\n * @param signal - cancellation owned by the Remote stream carrier.\n * @returns a complete opening snapshot followed by gap-free event frames.\n */"
1248
+ },
1249
+ {
1250
+ "kind": "method",
1251
+ "name": "control",
1252
+ "signature": "@Remote({ mode: 'stream' }) control(signal: AbortSignal): AsyncIterable<SessionControlFrame>",
1253
+ "summary": "Stream a complete live-control baseline followed by replacement frames.",
1254
+ "jsDoc": "/**\n * Stream a complete live-control baseline followed by replacement frames.\n * @param signal - cancellation owned by the Remote stream carrier.\n * @returns one complete baseline followed by live replacement frames.\n */"
1255
+ }
1256
+ ],
1257
+ "types": [
1258
+ {
1259
+ "name": "Agent",
1260
+ "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}"
1261
+ },
1262
+ {
1263
+ "name": "AgentCancelCause",
1264
+ "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
1265
+ },
1266
+ {
1267
+ "name": "AgentOptions",
1268
+ "declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
1269
+ },
1270
+ {
1271
+ "name": "AgentStatus",
1272
+ "declaration": "export type AgentStatus = 'idle' | 'running';"
1273
+ },
1274
+ {
1275
+ "name": "ApiSessionAgentError",
1276
+ "declaration": "export type ApiSessionAgentError = RemoteError<'session/not-found' | 'session/agent-busy' | 'gateway/internal'>;"
1277
+ },
1278
+ {
1279
+ "name": "ApiSessionAgentResult",
1280
+ "declaration": "export type ApiSessionAgentResult = { readonly agent: Agent; } | { readonly error: ApiSessionAgentError; };"
1281
+ },
1282
+ {
1283
+ "name": "ApprovalOutcome",
1284
+ "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
1285
+ },
1286
+ {
1287
+ "name": "ApprovalPolicy",
1288
+ "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
1289
+ },
1290
+ {
1291
+ "name": "ApprovalRequestId",
1292
+ "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
1293
+ },
1294
+ {
1295
+ "name": "AssistantMessage",
1296
+ "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
1297
+ },
1298
+ {
1299
+ "name": "AssistantProvenance",
1300
+ "declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
1301
+ },
1302
+ {
1303
+ "name": "AttachmentId",
1304
+ "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
1305
+ },
1306
+ {
1307
+ "name": "Branded",
1308
+ "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
1309
+ },
1310
+ {
1311
+ "name": "CancelOptions",
1312
+ "declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
1313
+ },
1314
+ {
1315
+ "name": "ChunkRow",
1316
+ "declaration": "export type ChunkRow = { type: 'text-chunks'; seq0: number; time0: number; data: TextRunData; } | { type: 'reasoning-chunks'; seq0: number; time0: number; data: TextRunData; } | { type: 'tool-call-chunks'; seq0: number; time0: number; data: ToolCallRunData; };"
1317
+ },
1318
+ {
1319
+ "name": "ChunkRowEvent",
1320
+ "declaration": "export type ChunkRowEvent = { [Kind in ChunkRow['type']]: { readonly type: `chunkrow/${Kind}`; readonly seq: number; readonly time: number; readonly data: Extract<ChunkRow, { readonly type: Kind; }>['data']; } }[ChunkRow['type']];"
1321
+ },
1322
+ {
1323
+ "name": "CommandId",
1324
+ "declaration": "export type CommandId = Branded<'CommandId'>;"
1325
+ },
1326
+ {
1327
+ "name": "CommandSource",
1328
+ "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
1329
+ },
1330
+ {
1331
+ "name": "CommandSourceMap",
1332
+ "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
1333
+ },
1334
+ {
1335
+ "name": "CompactionId",
1336
+ "declaration": "export type CompactionId = Branded<'CompactionId'>;"
1337
+ },
1338
+ {
1339
+ "name": "ContentBlock",
1340
+ "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
1341
+ },
1342
+ {
1343
+ "name": "ContentBlockMap",
1344
+ "declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
1345
+ },
1346
+ {
1347
+ "name": "ContentBlockType",
1348
+ "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
1349
+ },
1350
+ {
1351
+ "name": "ContextFormed",
1352
+ "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'; };"
1353
+ },
1354
+ {
1355
+ "name": "ContextSnapshotSection",
1356
+ "declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
1357
+ },
1358
+ {
1359
+ "name": "ContinuableSubagentDescriptorData",
1360
+ "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}"
1361
+ },
1362
+ {
1363
+ "name": "CoordinatorMessageSource",
1364
+ "declaration": "export interface CoordinatorMessageSource {\n readonly kind: 'coordinator';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
1365
+ },
1366
+ {
1367
+ "name": "EpochHeader",
1368
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n system?: string;\n tools?: ToolSchema[];\n}"
1369
+ },
1370
+ {
1371
+ "name": "FinishReason",
1372
+ "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
1373
+ },
1374
+ {
1375
+ "name": "FinishReasonMap",
1376
+ "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}"
1377
+ },
1378
+ {
1379
+ "name": "GoalBlockReason",
1380
+ "declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
1381
+ },
1382
+ {
1383
+ "name": "GoalChangeMeta",
1384
+ "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
1385
+ },
1386
+ {
1387
+ "name": "GoalClearChangeMeta",
1388
+ "declaration": "export interface GoalClearChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: 'clear';\n readonly cleared: GoalRef;\n readonly clearedAt: number;\n}"
1389
+ },
1390
+ {
1391
+ "name": "GoalId",
1392
+ "declaration": "export type GoalId = Branded<'GoalId'>;"
1393
+ },
1394
+ {
1395
+ "name": "GoalMessageSource",
1396
+ "declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
1397
+ },
1398
+ {
1399
+ "name": "GoalOperation",
1400
+ "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
1401
+ },
1402
+ {
1403
+ "name": "GoalPhase",
1404
+ "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
1405
+ },
1406
+ {
1407
+ "name": "GoalProjection",
1408
+ "declaration": "export interface GoalProjection {\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
1409
+ },
1410
+ {
1411
+ "name": "GoalRef",
1412
+ "declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
1413
+ },
1414
+ {
1415
+ "name": "GoalSnapshot",
1416
+ "declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
1417
+ },
1418
+ {
1419
+ "name": "GoalSnapshotChangeMeta",
1420
+ "declaration": "export interface GoalSnapshotChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: Exclude<GoalOperation, 'clear'>;\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
1421
+ },
1422
+ {
1423
+ "name": "ImageAttachmentLimits",
1424
+ "declaration": "export interface ImageAttachmentLimits {\n maxImageBytes: number;\n maxImagesPerMessage: number;\n maxMessageImageBytes: number;\n maxImagePixels: number;\n maxImageDimension: number;\n mediaTypes: readonly ImageMediaType[];\n}"
1425
+ },
1426
+ {
1427
+ "name": "ImageAttachmentRef",
1428
+ "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}"
1429
+ },
1430
+ {
1431
+ "name": "ImageBlock",
1432
+ "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
1433
+ },
1434
+ {
1435
+ "name": "ImageMediaType",
1436
+ "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
1437
+ },
1438
+ {
1439
+ "name": "Inbox",
1440
+ "declaration": "export class Inbox {\n get nextTurn(): readonly UserMessage[];\n get nextStep(): readonly UserMessage[];\n get hasPending(): boolean;\n clear(): void;\n claim(target: InboxTarget, turn: number): UserMessage[];\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}"
1441
+ },
1442
+ {
1443
+ "name": "InboxTarget",
1444
+ "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
1445
+ },
1446
+ {
1447
+ "name": "JobId",
1448
+ "declaration": "export type JobId = Branded<'JobId'>;"
1449
+ },
1450
+ {
1451
+ "name": "JsonValue",
1452
+ "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
1453
+ },
1454
+ {
1455
+ "name": "LlmCallConfig",
1456
+ "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
1457
+ },
1458
+ {
1459
+ "name": "LlmCallConfigAdapterDefaults",
1460
+ "declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
1461
+ },
1462
+ {
1463
+ "name": "LlmFailure",
1464
+ "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}"
1465
+ },
1466
+ {
1467
+ "name": "Message",
1468
+ "declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
1469
+ },
1470
+ {
1471
+ "name": "MessageId",
1472
+ "declaration": "export type MessageId = Branded<'MessageId'>;"
1473
+ },
1474
+ {
1475
+ "name": "MessageSource",
1476
+ "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
1477
+ },
1478
+ {
1479
+ "name": "MessageSourceMap",
1480
+ "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n coordinator: CoordinatorMessageSource;\n 'subagent-report': SubagentReportMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'session-reference': SessionReferenceSource;\n}"
1481
+ },
1482
+ {
1483
+ "name": "ModelCatalog",
1484
+ "declaration": "export interface ModelCatalog {\n readonly default: ModelSelection;\n readonly routableProviders: readonly string[];\n readonly groups: readonly ModelProviderGroup[];\n readonly failures: readonly ModelCatalogFailure[];\n}"
1485
+ },
1486
+ {
1487
+ "name": "ModelCatalogFailure",
1488
+ "declaration": "export interface ModelCatalogFailure {\n readonly id: string;\n readonly name: string;\n readonly message: string;\n}"
1489
+ },
1490
+ {
1491
+ "name": "ModelCatalogModel",
1492
+ "declaration": "export interface ModelCatalogModel {\n readonly id: string;\n readonly name: string;\n readonly description?: string;\n readonly reasoning?: ModelReasoning;\n}"
1493
+ },
1494
+ {
1495
+ "name": "ModelMessageSource",
1496
+ "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n kind: 'model';\n}"
1497
+ },
1498
+ {
1499
+ "name": "ModelProviderGroup",
1500
+ "declaration": "export interface ModelProviderGroup {\n readonly id: string;\n readonly name: string;\n readonly models: readonly ModelCatalogModel[];\n}"
1501
+ },
1502
+ {
1503
+ "name": "ModelReasoning",
1504
+ "declaration": "export interface ModelReasoning {\n readonly efforts: readonly ModelReasoningEffort[];\n readonly defaultEffort?: string;\n}"
1505
+ },
1506
+ {
1507
+ "name": "ModelReasoningEffort",
1508
+ "declaration": "export interface ModelReasoningEffort {\n readonly id: string;\n readonly name: string;\n readonly description?: string;\n}"
1509
+ },
1510
+ {
1511
+ "name": "ModelSelection",
1512
+ "declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
1513
+ },
1514
+ {
1515
+ "name": "ModelSelectionProjection",
1516
+ "declaration": "export interface ModelSelectionProjection {\n readonly lastUsed: ModelSelection | null;\n readonly next: ModelSelection | null;\n}"
1517
+ },
1518
+ {
1519
+ "name": "OneShotSubagentDescriptorData",
1520
+ "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
1521
+ },
1522
+ {
1523
+ "name": "PromptContentPart",
1524
+ "declaration": "export type PromptContentPart = { readonly type: 'text'; readonly text: string; } | { readonly type: 'image'; readonly mediaType: ImageMediaType; readonly data: string; readonly name?: string; };"
1525
+ },
1526
+ {
1527
+ "name": "ProviderRequestId",
1528
+ "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
1529
+ },
1530
+ {
1531
+ "name": "PtcDispatchEventData",
1532
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
1533
+ },
1534
+ {
1535
+ "name": "PtcDispatchStartEventData",
1536
+ "declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
1537
+ },
1538
+ {
1539
+ "name": "QueueAction",
1540
+ "declaration": "export type QueueAction = { readonly kind: 'edit'; readonly content: readonly ContentBlock[]; } | { readonly kind: 'remove'; } | { readonly kind: 'steer'; };"
1541
+ },
1542
+ {
1543
+ "name": "ReasoningBlock",
1544
+ "declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
1545
+ },
1546
+ {
1547
+ "name": "ReasoningEffortId",
1548
+ "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
1549
+ },
1550
+ {
1551
+ "name": "RemoteError",
1552
+ "declaration": "export class RemoteError<Code extends RemoteErrorCode = RemoteErrorCode> extends Error {\n readonly isDSHRemoteError: true;\n}"
1553
+ },
1554
+ {
1555
+ "name": "RemoteErrorCode",
1556
+ "declaration": "export type RemoteErrorCode = keyof RemoteErrorDetailsMap;"
1557
+ },
1558
+ {
1559
+ "name": "RemoteErrorDetailsMap",
1560
+ "declaration": "export interface RemoteErrorDetailsMap {\n 'gateway/bad-request': { readonly issues?: readonly object[]; };\n 'gateway/cancelled': {};\n 'gateway/internal': {};\n 'llm/model-discovery-rejected': { readonly settingsNs: string; readonly baseURL?: string; };\n 'session/not-found': { readonly sessionId: SessionId; };\n 'agent-preset/not-found': { readonly agentPreset: string; readonly available: readonly string[]; };\n 'agent-preset/invalid': { readonly agentPreset: string; readonly reason: string; };\n 'agent-preset/read-only': { readonly agentPreset: string; readonly reason: string; };\n 'agent-preset/locked': { readonly sessionId: SessionId; readonly agentPreset: string; };\n 'workspace/not-found': { readonly workspaceId: WorkspaceId; };\n 'session/model-unavailable': { readonly provider: string; readonly model: string; };\n 'session/conflict': { readonly sessionId: SessionId; readonly requestedCwd: string; readonly existingCwd?: string; };\n 'session/agent-busy': { readonly reason: string; };\n 'session/invalid-time-zone': { readonly value: string; };\n 'session/workspace-attach-failed': { readonly sessionId: SessionId; readonly workspaceId: string; };\n 'agent-preset/conflict': { readonly sessionId: SessionId; readonly requestedPreset: string; readonly existingPreset?: string; };\n 'session/attachment-invalid': { readonly reason: string; };\n 'session/queue-item-not-found': { readonly itemId: MessageId; };\n 'session/steer-unavailable': { readonly itemId: MessageId; };\n 'session/title-invalid': { readonly sessionId: SessionId; };\n 'session/fork-unavailable': { readonly sessionId: SessionId; };\n 'subagent/not-found': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; };\n 'subagent/catalog-diagnostic': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly reason: 'corrupt' | 'unsupported' | 'unavailable'; };\n 'subagent/invalid-time-zone': { readonly value: string; };\n 'subagent/parent-unavailable': { readonly parentSessionId: SessionId; };\n 'subagent/not-resumable': { readonly childSessionId: SessionId; };\n 'subagent/unauthorized': { readonly childSessionId: SessionId; };\n 'subagent/attachment-invalid': { readonly reason: string; };\n 'subagent/delivery-unavailable': { readonly childSessionId: SessionId; };\n 'subagent/projections-unavailable': {};\n 'settings/rejected': { readonly ns: string; };\n 'settings/conflict': { readonly ns: string; readonly expected: number; readonly actual: number; };\n 'credential/rejected': { readonly ref: string; };\n 'workspace/invalid-path': { readonly path: string; };\n 'workspace/name-conflict': { readonly name: string; };\n 'workspace/move-invalid': { readonly workspaceId: WorkspaceId; readonly sessionId: SessionId; readonly beforeSessionId?: SessionId; };\n 'directory-picker/unavailable': { readonly capability: string; };\n 'directory-picker/unreadable': { readonly path: string; };\n 'directory-picker/exists': { readonly path: string; };\n 'directory-picker/create-failed': { readonly path: string; };\n}"
1561
+ },
1562
+ {
1563
+ "name": "ReplayEnvelope",
1564
+ "declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
1565
+ },
1566
+ {
1567
+ "name": "RequestContext",
1568
+ "declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n}"
1569
+ },
1570
+ {
1571
+ "name": "RequestHeaderReason",
1572
+ "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
1573
+ },
1574
+ {
1575
+ "name": "RunDataBase",
1576
+ "declaration": "export interface RunDataBase {\n turn: number;\n step: number;\n index: number;\n dt: number[];\n}"
1577
+ },
1578
+ {
1579
+ "name": "SandboxMode",
1580
+ "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
1581
+ },
1582
+ {
1583
+ "name": "Session",
1584
+ "declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n get id(): SessionId;\n readonly firstLiveSeq: number;\n get events(): readonly SessionEvent[];\n get seq(): number;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
1585
+ },
1586
+ {
1587
+ "name": "SessionAddress",
1588
+ "declaration": "export type SessionAddress = { readonly kind: 'session'; readonly sessionId: SessionId; } | { readonly kind: 'subagent'; readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly mode: 'one-shot' | 'continuable'; };"
1589
+ },
1590
+ {
1591
+ "name": "SessionAttachmentRequest",
1592
+ "declaration": "export interface SessionAttachmentRequest {\n readonly sessionId: SessionId;\n readonly attachmentId: AttachmentIdType;\n}"
1593
+ },
1594
+ {
1595
+ "name": "SessionAttachmentValue",
1596
+ "declaration": "export interface SessionAttachmentValue {\n readonly attachment: ImageAttachmentRef;\n readonly data: string;\n}"
1597
+ },
1598
+ {
1599
+ "name": "SessionCancelRequest",
1600
+ "declaration": "export interface SessionCancelRequest {\n readonly sessionId: SessionId;\n}"
1601
+ },
1602
+ {
1603
+ "name": "SessionCancelValue",
1604
+ "declaration": "export interface SessionCancelValue {\n readonly accepted: true;\n}"
1605
+ },
1606
+ {
1607
+ "name": "SessionChunkRun",
1608
+ "declaration": "export interface SessionChunkRun {\n readonly type: 'chunks';\n readonly event: ChunkRowEvent;\n}"
1609
+ },
1610
+ {
1611
+ "name": "SessionControlBaseline",
1612
+ "declaration": "export interface SessionControlBaseline {\n readonly queues: Readonly<Record<SessionId, readonly SessionQueuedItem[]>>;\n readonly jobs: Readonly<Record<SessionId, readonly SessionJob[]>>;\n readonly projections: Readonly<Record<SessionId, SessionProjectionBaseline>>;\n}"
1613
+ },
1614
+ {
1615
+ "name": "SessionControlFrame",
1616
+ "declaration": "export type SessionControlFrame = { readonly type: 'baseline'; readonly value: SessionControlBaseline; } | { readonly type: 'queue'; readonly sessionId: SessionId; readonly items: readonly SessionQueuedItem[]; } | { readonly type: 'jobs'; readonly sessionId: SessionId; readonly jobs: readonly SessionJob[]; } | ({ readonly type: 'projection'; } & SessionProjectionUpdate);"
1617
+ },
1618
+ {
1619
+ "name": "SessionCreateRequest",
1620
+ "declaration": "export interface SessionCreateRequest {\n readonly workspaceId?: WorkspaceId;\n readonly cwd?: string;\n readonly sessionId?: SessionId;\n readonly agentPreset?: string;\n}"
1621
+ },
1622
+ {
1623
+ "name": "SessionCreateValue",
1624
+ "declaration": "export interface SessionCreateValue {\n readonly sessionId: SessionId;\n readonly agentPreset?: string;\n}"
1625
+ },
1626
+ {
1627
+ "name": "SessionEvent",
1628
+ "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: number; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? { sourceEventSeqs?: number[]; surfaceOp?: SurfaceOp; } : object) }[T];"
1629
+ },
1630
+ {
1631
+ "name": "SessionEventEntry",
1632
+ "declaration": "export interface SessionEventEntry {\n readonly type: 'event';\n readonly event: SessionWireEvent;\n}"
1633
+ },
1634
+ {
1635
+ "name": "SessionEventMap",
1636
+ "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 'assistant/chunk': { turn: number; step: number; chunk: StreamChunk; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; interrupted?: true; };\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; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': Record<string, never>;\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\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/code-dispatch-start': PtcDispatchStartEventData;\n 'tool/code-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: number; };\n 'team/member': { version: 1; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 1; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 1; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 1; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; };\n}"
1637
+ },
1638
+ {
1639
+ "name": "SessionEventType",
1640
+ "declaration": "export type SessionEventType = keyof SessionEventMap;"
1641
+ },
1642
+ {
1643
+ "name": "SessionFollowFrame",
1644
+ "declaration": "export type SessionFollowFrame = { readonly type: 'snapshot'; readonly header: SessionHeader; readonly cursor: number; readonly records: readonly SessionHistoryRecord[]; readonly hasMore: boolean; readonly projections: SessionProjectionBaseline; } | SessionEventEntry;"
1645
+ },
1646
+ {
1647
+ "name": "SessionFollowRequest",
1648
+ "declaration": "export interface SessionFollowRequest {\n readonly address: SessionAddress;\n readonly maxMessages?: number;\n}"
1649
+ },
1650
+ {
1651
+ "name": "SessionForkRequest",
1652
+ "declaration": "export interface SessionForkRequest {\n readonly sessionId: SessionId;\n readonly atSeq?: number;\n}"
1653
+ },
1654
+ {
1655
+ "name": "SessionForkValue",
1656
+ "declaration": "export interface SessionForkValue {\n readonly sessionId: SessionId;\n}"
1657
+ },
1658
+ {
1659
+ "name": "SessionHeader",
1660
+ "declaration": "export interface SessionHeader {\n readonly version: number;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly seedLength?: number;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
1661
+ },
1662
+ {
1663
+ "name": "SessionHistoryRecord",
1664
+ "declaration": "export type SessionHistoryRecord = SessionEventEntry | SessionChunkRun;"
1665
+ },
1666
+ {
1667
+ "name": "SessionId",
1668
+ "declaration": "export type SessionId = Branded<'SessionId'>;"
1669
+ },
1670
+ {
1671
+ "name": "SessionJob",
1672
+ "declaration": "export interface SessionJob {\n readonly id: JobId;\n readonly kind: string;\n readonly label: string;\n readonly status: 'running' | 'stopping' | 'completed' | 'killed' | 'failed';\n readonly detail?: string;\n readonly startedAt: number;\n readonly finishedAt?: number;\n}"
1673
+ },
1674
+ {
1675
+ "name": "SessionListMetadata",
1676
+ "declaration": "export interface SessionListMetadata {\n readonly blank: boolean;\n readonly lastPromptAt: number | null;\n}"
1677
+ },
1678
+ {
1679
+ "name": "SessionListRequest",
1680
+ "declaration": "export interface SessionListRequest {\n readonly cursor?: string;\n}"
1681
+ },
1682
+ {
1683
+ "name": "SessionListValue",
1684
+ "declaration": "export interface SessionListValue {\n readonly items: readonly SessionSummary[];\n}"
1685
+ },
1686
+ {
1687
+ "name": "SessionOpenWorkspacePathRequest",
1688
+ "declaration": "export interface SessionOpenWorkspacePathRequest {\n readonly path: string;\n}"
1689
+ },
1690
+ {
1691
+ "name": "SessionOpenWorkspacePathValue",
1692
+ "declaration": "export interface SessionOpenWorkspacePathValue {\n readonly opened: true;\n}"
1693
+ },
1694
+ {
1695
+ "name": "SessionPage",
1696
+ "declaration": "export interface SessionPage {\n readonly records: readonly SessionHistoryRecord[];\n readonly hasMore: boolean;\n}"
1697
+ },
1698
+ {
1699
+ "name": "SessionPageRequest",
1700
+ "declaration": "export interface SessionPageRequest {\n readonly address: SessionAddress;\n readonly throughSeq: number;\n readonly beforeSeq?: number;\n readonly maxMessages?: number;\n}"
1701
+ },
1702
+ {
1703
+ "name": "SessionProjectionBaseline",
1704
+ "declaration": "export interface SessionProjectionBaseline {\n readonly asOfSeq: number;\n readonly values: SessionProjectionValues;\n}"
1705
+ },
1706
+ {
1707
+ "name": "SessionProjectionHints",
1708
+ "declaration": "export interface SessionProjectionHints {\n readonly asOfSeq: number;\n readonly values: SessionProjectionValues;\n}"
1709
+ },
1710
+ {
1711
+ "name": "SessionProjectionMap",
1712
+ "declaration": "export interface SessionProjectionMap {\n agentPreset: string | null;\n title: string | null;\n todos: TodoItem[] | null;\n sessionListMetadata: SessionListMetadata;\n imageLimits: ImageAttachmentLimits;\n modelSelection: ModelSelectionProjection;\n subagentTiming: SubagentTimingProjection;\n subagent: SubagentIdentityProjection | null;\n goal: GoalProjection | null;\n}"
1713
+ },
1714
+ {
1715
+ "name": "SessionProjectionUpdate",
1716
+ "declaration": "export interface SessionProjectionUpdate {\n readonly sessionId: SessionId;\n readonly key: string;\n readonly value: JsonValue;\n readonly seq: number;\n}"
1717
+ },
1718
+ {
1719
+ "name": "SessionProjectionValue",
1720
+ "declaration": "export type SessionProjectionValue = JsonValue;"
1721
+ },
1722
+ {
1723
+ "name": "SessionProjectionValues",
1724
+ "declaration": "export type SessionProjectionValues = Partial<SessionProjectionMap> & Readonly<Record<string, SessionProjectionValue>>;"
1725
+ },
1726
+ {
1727
+ "name": "SessionPromptRequest",
1728
+ "declaration": "export interface SessionPromptRequest {\n readonly requestId: SessionRequestId;\n readonly sessionId: SessionId;\n readonly mode: 'queue' | 'steer';\n readonly content: readonly PromptContentPart[];\n readonly clientTimeZone?: string;\n}"
1729
+ },
1730
+ {
1731
+ "name": "SessionPromptValue",
1732
+ "declaration": "export interface SessionPromptValue {\n readonly accepted: true;\n}"
1733
+ },
1734
+ {
1735
+ "name": "SessionQueuedItem",
1736
+ "declaration": "export interface SessionQueuedItem {\n readonly id: MessageId;\n readonly placement: 'queued' | 'steering' | 'context';\n readonly rpcId?: SessionRequestId;\n readonly message: { readonly id: MessageId; readonly content: readonly JsonValue[]; };\n}"
1737
+ },
1738
+ {
1739
+ "name": "SessionReferenceSource",
1740
+ "declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedThroughSeq: number | null; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
1741
+ },
1742
+ {
1743
+ "name": "SessionRenameRequest",
1744
+ "declaration": "export interface SessionRenameRequest {\n readonly sessionId: SessionId;\n readonly title: string;\n}"
1745
+ },
1746
+ {
1747
+ "name": "SessionRenameValue",
1748
+ "declaration": "export interface SessionRenameValue {\n readonly title: string;\n readonly seq: number;\n}"
1749
+ },
1750
+ {
1751
+ "name": "SessionRequestId",
1752
+ "declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
1753
+ },
1754
+ {
1755
+ "name": "SessionSearchItem",
1756
+ "declaration": "export interface SessionSearchItem {\n readonly sessionId: SessionId;\n readonly snippet: string;\n}"
1757
+ },
1758
+ {
1759
+ "name": "SessionSearchRequest",
1760
+ "declaration": "export interface SessionSearchRequest {\n readonly query: string;\n}"
1761
+ },
1762
+ {
1763
+ "name": "SessionSearchValue",
1764
+ "declaration": "export interface SessionSearchValue {\n readonly items: readonly SessionSearchItem[];\n readonly hasMore: boolean;\n}"
1765
+ },
1766
+ {
1767
+ "name": "SessionSelectModelRequest",
1768
+ "declaration": "export interface SessionSelectModelRequest extends ModelSelection {\n readonly sessionId: SessionId;\n}"
1769
+ },
1770
+ {
1771
+ "name": "SessionSelectModelValue",
1772
+ "declaration": "export interface SessionSelectModelValue {\n readonly selected: ModelSelection;\n}"
1773
+ },
1774
+ {
1775
+ "name": "SessionSummary",
1776
+ "declaration": "export interface SessionSummary {\n readonly sessionId: SessionId;\n readonly updatedAt: number;\n readonly running: boolean;\n readonly blank: boolean;\n readonly parentSessionId?: SessionId;\n readonly origin?: 'subagent';\n readonly cwd?: string;\n readonly projections?: SessionProjectionHints;\n}"
1777
+ },
1778
+ {
1779
+ "name": "SessionSurface",
1780
+ "declaration": "export interface SessionSurface {\n readonly nodes: readonly number[];\n readonly replaceGeneration: number;\n}"
1781
+ },
1782
+ {
1783
+ "name": "SessionTitleEventData",
1784
+ "declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: number[];\n readonly source: SessionTitleSource;\n}"
1785
+ },
1786
+ {
1787
+ "name": "SessionTitleModelProvenance",
1788
+ "declaration": "export interface SessionTitleModelProvenance {\n readonly provider: string;\n readonly model: string;\n}"
1789
+ },
1790
+ {
1791
+ "name": "SessionTitleProviderId",
1792
+ "declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
1793
+ },
1794
+ {
1795
+ "name": "SessionTitleSource",
1796
+ "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
1797
+ },
1798
+ {
1799
+ "name": "SessionUpdateQueueRequest",
1800
+ "declaration": "export interface SessionUpdateQueueRequest {\n readonly sessionId: SessionId;\n readonly itemId: MessageId;\n readonly action: QueueAction;\n}"
1801
+ },
1802
+ {
1803
+ "name": "SessionUpdateQueueValue",
1804
+ "declaration": "export interface SessionUpdateQueueValue {\n readonly accepted: true;\n}"
1805
+ },
1806
+ {
1807
+ "name": "SessionWireEvent",
1808
+ "declaration": "export interface SessionWireEvent {\n readonly type: string;\n readonly seq: number;\n readonly time: number;\n readonly data: JsonValue;\n readonly ignorable?: true;\n readonly sourceEventSeqs?: number[];\n readonly surfaceOp?: SurfaceOp;\n}"
1809
+ },
1810
+ {
1811
+ "name": "SkillInvocationSource",
1812
+ "declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
1813
+ },
1814
+ {
1815
+ "name": "StreamChunk",
1816
+ "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; };"
1817
+ },
1818
+ {
1819
+ "name": "SubagentDescriptorBase",
1820
+ "declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
1821
+ },
1822
+ {
1823
+ "name": "SubagentDescriptorData",
1824
+ "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
1825
+ },
1826
+ {
1827
+ "name": "SubagentIdentityProjection",
1828
+ "declaration": "export type SubagentIdentityProjection = { mode: 'one-shot'; label?: string; seq: number; } | { mode: 'continuable'; label: string; seq: number; };"
1829
+ },
1830
+ {
1831
+ "name": "SubagentReportMessageSource",
1832
+ "declaration": "export interface SubagentReportMessageSource {\n readonly kind: 'subagent-report';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
1833
+ },
1834
+ {
1835
+ "name": "SubagentSettledMessageSource",
1836
+ "declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
1837
+ },
1838
+ {
1839
+ "name": "SubagentTimingProjection",
1840
+ "declaration": "export interface SubagentTimingProjection {\n settledMs: number;\n active?: { since: number; through: number; };\n}"
1841
+ },
1842
+ {
1843
+ "name": "SurfaceEventType",
1844
+ "declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
1845
+ },
1846
+ {
1847
+ "name": "SurfaceIntent",
1848
+ "declaration": "export interface SurfaceIntent {\n surfaceOp: SurfaceOp;\n sourceEventSeqs?: number[];\n}"
1849
+ },
1850
+ {
1851
+ "name": "SurfaceOp",
1852
+ "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: number; end: number; };"
1853
+ },
1854
+ {
1855
+ "name": "TeamId",
1856
+ "declaration": "export type TeamId = Branded<'TeamId'>;"
1857
+ },
1858
+ {
1859
+ "name": "TeamMemberPhase",
1860
+ "declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
1861
+ },
1862
+ {
1863
+ "name": "TeamMemberSnapshot",
1864
+ "declaration": "export interface TeamMemberSnapshot {\n readonly id: SessionId;\n readonly name: string;\n readonly description: string;\n readonly provider: string;\n readonly context: 'fresh' | 'fork';\n readonly phase: TeamMemberPhase;\n readonly error?: string;\n}"
1865
+ },
1866
+ {
1867
+ "name": "TeamMessageId",
1868
+ "declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
1869
+ },
1870
+ {
1871
+ "name": "TeamMessageSnapshot",
1872
+ "declaration": "export interface TeamMessageSnapshot {\n readonly id: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n readonly targetId: SessionId;\n readonly delivery: 'quiet' | 'wakeup';\n readonly content: ContentBlock[];\n}"
1873
+ },
1874
+ {
1875
+ "name": "TeamMessageSource",
1876
+ "declaration": "export interface TeamMessageSource {\n readonly kind: 'team-message';\n readonly teamId: TeamId;\n readonly messageId: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n}"
1877
+ },
1878
+ {
1879
+ "name": "TeamTaskId",
1880
+ "declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
1881
+ },
1882
+ {
1883
+ "name": "TeamTaskSnapshot",
1884
+ "declaration": "export interface TeamTaskSnapshot {\n readonly id: TeamTaskId;\n readonly revision: number;\n readonly subject: string;\n readonly description: string;\n readonly status: TeamTaskStatus;\n readonly ownerId?: SessionId;\n readonly blockedBy: TeamTaskId[];\n readonly writeScopes: string[];\n}"
1885
+ },
1886
+ {
1887
+ "name": "TeamTaskStatus",
1888
+ "declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
1889
+ },
1890
+ {
1891
+ "name": "TextBlock",
1892
+ "declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
1893
+ },
1894
+ {
1895
+ "name": "TextRunData",
1896
+ "declaration": "export interface TextRunData extends RunDataBase {\n texts: string[];\n}"
1897
+ },
1898
+ {
1899
+ "name": "TodoItem",
1900
+ "declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
1901
+ },
1902
+ {
1903
+ "name": "TokenUsage",
1904
+ "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
1905
+ },
1906
+ {
1907
+ "name": "ToolCallBlock",
1908
+ "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
1909
+ },
1910
+ {
1911
+ "name": "ToolCallId",
1912
+ "declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
1913
+ },
1914
+ {
1915
+ "name": "ToolCallRunData",
1916
+ "declaration": "export interface ToolCallRunData extends RunDataBase {\n id: ToolCallId;\n name?: string;\n args: string[];\n}"
1917
+ },
1918
+ {
1919
+ "name": "ToolMessageSource",
1920
+ "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
1921
+ },
1922
+ {
1923
+ "name": "ToolRestriction",
1924
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
1925
+ },
1926
+ {
1927
+ "name": "ToolResultBlock",
1928
+ "declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
1929
+ },
1930
+ {
1931
+ "name": "ToolResultMessage",
1932
+ "declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
1933
+ },
1934
+ {
1935
+ "name": "ToolSchema",
1936
+ "declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
1937
+ },
1938
+ {
1939
+ "name": "TurnEndCancelCause",
1940
+ "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
1941
+ },
1942
+ {
1943
+ "name": "TurnEndReason",
1944
+ "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
1945
+ },
1946
+ {
1947
+ "name": "TurnEndReasonMap",
1948
+ "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}"
1949
+ },
1950
+ {
1951
+ "name": "UserMessage",
1952
+ "declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
1953
+ },
1954
+ {
1955
+ "name": "WorkspaceId",
1956
+ "declaration": "export type WorkspaceId = Branded<'WorkspaceId'>;"
1957
+ }
1958
+ ]
1959
+ },
1960
+ {
1961
+ "description": "Host Remote adapter over the composed file-reference provider.",
1962
+ "summary": "Host Remote adapter over the composed file-reference provider.",
1963
+ "tags": [],
1964
+ "jsDoc": "/** Host Remote adapter over the composed file-reference provider. */",
1965
+ "key": "sessionFileReferences",
1966
+ "exportName": "SessionFileReferences",
1967
+ "members": [
1968
+ {
1969
+ "kind": "method",
1970
+ "name": "list",
1971
+ "signature": "@Remote list( agent: Agent, query: string, signal: AbortSignal, ): Promise<FileReferenceCandidate[]>",
1972
+ "summary": "List file and directory candidates for one Agent's working directory.",
1973
+ "jsDoc": "/**\n * List file and directory candidates for one Agent's working directory.\n * @param agent - target Agent resolved from the Session identity on the wire.\n * @param query - path text following `@` or `@\"`.\n * @param signal - caller cancellation.\n * @returns deterministic path-only candidates from the composed provider.\n */"
1974
+ }
1975
+ ],
1976
+ "types": [
1977
+ {
1978
+ "name": "Agent",
1979
+ "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}"
1980
+ },
1981
+ {
1982
+ "name": "AgentCancelCause",
1983
+ "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
1984
+ },
1985
+ {
1986
+ "name": "AgentOptions",
1987
+ "declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
1988
+ },
1989
+ {
1990
+ "name": "AgentStatus",
1991
+ "declaration": "export type AgentStatus = 'idle' | 'running';"
1992
+ },
1993
+ {
1994
+ "name": "ApprovalOutcome",
1995
+ "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
1996
+ },
1997
+ {
1998
+ "name": "ApprovalPolicy",
1999
+ "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
2000
+ },
2001
+ {
2002
+ "name": "ApprovalRequestId",
2003
+ "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
2004
+ },
2005
+ {
2006
+ "name": "AssistantMessage",
2007
+ "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
2008
+ },
2009
+ {
2010
+ "name": "AssistantProvenance",
2011
+ "declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
2012
+ },
2013
+ {
2014
+ "name": "AttachmentId",
2015
+ "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
2016
+ },
2017
+ {
2018
+ "name": "Branded",
2019
+ "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
2020
+ },
2021
+ {
2022
+ "name": "CancelOptions",
2023
+ "declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
2024
+ },
2025
+ {
2026
+ "name": "CommandId",
2027
+ "declaration": "export type CommandId = Branded<'CommandId'>;"
2028
+ },
2029
+ {
2030
+ "name": "CommandSource",
2031
+ "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
2032
+ },
2033
+ {
2034
+ "name": "CommandSourceMap",
2035
+ "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
2036
+ },
2037
+ {
2038
+ "name": "CompactionId",
2039
+ "declaration": "export type CompactionId = Branded<'CompactionId'>;"
2040
+ },
2041
+ {
2042
+ "name": "ContentBlock",
2043
+ "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
2044
+ },
2045
+ {
2046
+ "name": "ContentBlockMap",
2047
+ "declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
2048
+ },
2049
+ {
2050
+ "name": "ContentBlockType",
2051
+ "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
2052
+ },
2053
+ {
2054
+ "name": "ContextFormed",
2055
+ "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'; };"
2056
+ },
2057
+ {
2058
+ "name": "ContextSnapshotSection",
2059
+ "declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
2060
+ },
2061
+ {
2062
+ "name": "ContinuableSubagentDescriptorData",
2063
+ "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}"
2064
+ },
2065
+ {
2066
+ "name": "CoordinatorMessageSource",
2067
+ "declaration": "export interface CoordinatorMessageSource {\n readonly kind: 'coordinator';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
2068
+ },
2069
+ {
2070
+ "name": "EpochHeader",
2071
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n system?: string;\n tools?: ToolSchema[];\n}"
2072
+ },
2073
+ {
2074
+ "name": "FileReferenceCandidate",
2075
+ "declaration": "export interface FileReferenceCandidate {\n path: string;\n kind: 'file' | 'directory';\n}"
2076
+ },
2077
+ {
2078
+ "name": "FinishReason",
2079
+ "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
2080
+ },
2081
+ {
2082
+ "name": "FinishReasonMap",
2083
+ "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}"
2084
+ },
2085
+ {
2086
+ "name": "GoalBlockReason",
2087
+ "declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
2088
+ },
2089
+ {
2090
+ "name": "GoalChangeMeta",
2091
+ "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
2092
+ },
2093
+ {
2094
+ "name": "GoalClearChangeMeta",
2095
+ "declaration": "export interface GoalClearChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: 'clear';\n readonly cleared: GoalRef;\n readonly clearedAt: number;\n}"
2096
+ },
2097
+ {
2098
+ "name": "GoalId",
2099
+ "declaration": "export type GoalId = Branded<'GoalId'>;"
2100
+ },
2101
+ {
2102
+ "name": "GoalMessageSource",
2103
+ "declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
2104
+ },
2105
+ {
2106
+ "name": "GoalOperation",
2107
+ "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
2108
+ },
2109
+ {
2110
+ "name": "GoalPhase",
2111
+ "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
2112
+ },
2113
+ {
2114
+ "name": "GoalRef",
2115
+ "declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
2116
+ },
2117
+ {
2118
+ "name": "GoalSnapshot",
2119
+ "declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
2120
+ },
2121
+ {
2122
+ "name": "GoalSnapshotChangeMeta",
2123
+ "declaration": "export interface GoalSnapshotChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: Exclude<GoalOperation, 'clear'>;\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
2124
+ },
2125
+ {
2126
+ "name": "ImageAttachmentRef",
2127
+ "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}"
2128
+ },
2129
+ {
2130
+ "name": "ImageBlock",
2131
+ "declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
2132
+ },
2133
+ {
2134
+ "name": "ImageMediaType",
2135
+ "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
2136
+ },
2137
+ {
2138
+ "name": "Inbox",
2139
+ "declaration": "export class Inbox {\n get nextTurn(): readonly UserMessage[];\n get nextStep(): readonly UserMessage[];\n get hasPending(): boolean;\n clear(): void;\n claim(target: InboxTarget, turn: number): UserMessage[];\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}"
2140
+ },
2141
+ {
2142
+ "name": "InboxTarget",
2143
+ "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
2144
+ },
2145
+ {
2146
+ "name": "JsonValue",
2147
+ "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
2148
+ },
2149
+ {
2150
+ "name": "LlmCallConfig",
2151
+ "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
2152
+ },
2153
+ {
2154
+ "name": "LlmCallConfigAdapterDefaults",
2155
+ "declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
2156
+ },
2157
+ {
2158
+ "name": "LlmFailure",
2159
+ "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}"
2160
+ },
2161
+ {
2162
+ "name": "Message",
2163
+ "declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
2164
+ },
2165
+ {
2166
+ "name": "MessageId",
2167
+ "declaration": "export type MessageId = Branded<'MessageId'>;"
2168
+ },
2169
+ {
2170
+ "name": "MessageSource",
2171
+ "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
2172
+ },
2173
+ {
2174
+ "name": "MessageSourceMap",
2175
+ "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n coordinator: CoordinatorMessageSource;\n 'subagent-report': SubagentReportMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'session-reference': SessionReferenceSource;\n}"
2176
+ },
2177
+ {
2178
+ "name": "ModelMessageSource",
2179
+ "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n kind: 'model';\n}"
2180
+ },
2181
+ {
2182
+ "name": "ModelSelection",
2183
+ "declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
2184
+ },
2185
+ {
2186
+ "name": "OneShotSubagentDescriptorData",
2187
+ "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
2188
+ },
2189
+ {
2190
+ "name": "ProviderRequestId",
2191
+ "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
2192
+ },
2193
+ {
2194
+ "name": "PtcDispatchEventData",
2195
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
2196
+ },
2197
+ {
2198
+ "name": "PtcDispatchStartEventData",
2199
+ "declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
2200
+ },
2201
+ {
2202
+ "name": "ReasoningBlock",
2203
+ "declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
2204
+ },
2205
+ {
2206
+ "name": "ReasoningEffortId",
2207
+ "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
2208
+ },
2209
+ {
2210
+ "name": "ReplayEnvelope",
2211
+ "declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
2212
+ },
2213
+ {
2214
+ "name": "RequestContext",
2215
+ "declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n}"
2216
+ },
2217
+ {
2218
+ "name": "RequestHeaderReason",
2219
+ "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
2220
+ },
2221
+ {
2222
+ "name": "SandboxMode",
2223
+ "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
2224
+ },
2225
+ {
2226
+ "name": "Session",
2227
+ "declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n get id(): SessionId;\n readonly firstLiveSeq: number;\n get events(): readonly SessionEvent[];\n get seq(): number;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
2228
+ },
2229
+ {
2230
+ "name": "SessionEvent",
2231
+ "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: number; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? { sourceEventSeqs?: number[]; surfaceOp?: SurfaceOp; } : object) }[T];"
2232
+ },
2233
+ {
2234
+ "name": "SessionEventMap",
2235
+ "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 'assistant/chunk': { turn: number; step: number; chunk: StreamChunk; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; interrupted?: true; };\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; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': Record<string, never>;\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\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/code-dispatch-start': PtcDispatchStartEventData;\n 'tool/code-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: number; };\n 'team/member': { version: 1; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 1; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 1; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 1; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; };\n}"
2236
+ },
2237
+ {
2238
+ "name": "SessionEventType",
2239
+ "declaration": "export type SessionEventType = keyof SessionEventMap;"
2240
+ },
2241
+ {
2242
+ "name": "SessionHeader",
2243
+ "declaration": "export interface SessionHeader {\n readonly version: number;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly seedLength?: number;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
2244
+ },
2245
+ {
2246
+ "name": "SessionId",
2247
+ "declaration": "export type SessionId = Branded<'SessionId'>;"
2248
+ },
2249
+ {
2250
+ "name": "SessionReferenceSource",
2251
+ "declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedThroughSeq: number | null; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
2252
+ },
2253
+ {
2254
+ "name": "SessionRequestId",
2255
+ "declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
2256
+ },
2257
+ {
2258
+ "name": "SessionSurface",
2259
+ "declaration": "export interface SessionSurface {\n readonly nodes: readonly number[];\n readonly replaceGeneration: number;\n}"
2260
+ },
2261
+ {
2262
+ "name": "SessionTitleEventData",
2263
+ "declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: number[];\n readonly source: SessionTitleSource;\n}"
2264
+ },
2265
+ {
2266
+ "name": "SessionTitleModelProvenance",
2267
+ "declaration": "export interface SessionTitleModelProvenance {\n readonly provider: string;\n readonly model: string;\n}"
2268
+ },
2269
+ {
2270
+ "name": "SessionTitleProviderId",
2271
+ "declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
2272
+ },
2273
+ {
2274
+ "name": "SessionTitleSource",
2275
+ "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
2276
+ },
2277
+ {
2278
+ "name": "SkillInvocationSource",
2279
+ "declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
2280
+ },
2281
+ {
2282
+ "name": "StreamChunk",
2283
+ "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; };"
2284
+ },
2285
+ {
2286
+ "name": "SubagentDescriptorBase",
2287
+ "declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
2288
+ },
2289
+ {
2290
+ "name": "SubagentDescriptorData",
2291
+ "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
2292
+ },
2293
+ {
2294
+ "name": "SubagentReportMessageSource",
2295
+ "declaration": "export interface SubagentReportMessageSource {\n readonly kind: 'subagent-report';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
2296
+ },
2297
+ {
2298
+ "name": "SubagentSettledMessageSource",
2299
+ "declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
2300
+ },
2301
+ {
2302
+ "name": "SurfaceEventType",
2303
+ "declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
2304
+ },
2305
+ {
2306
+ "name": "SurfaceIntent",
2307
+ "declaration": "export interface SurfaceIntent {\n surfaceOp: SurfaceOp;\n sourceEventSeqs?: number[];\n}"
2308
+ },
2309
+ {
2310
+ "name": "SurfaceOp",
2311
+ "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: number; end: number; };"
2312
+ },
2313
+ {
2314
+ "name": "TeamId",
2315
+ "declaration": "export type TeamId = Branded<'TeamId'>;"
2316
+ },
2317
+ {
2318
+ "name": "TeamMemberPhase",
2319
+ "declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
2320
+ },
2321
+ {
2322
+ "name": "TeamMemberSnapshot",
2323
+ "declaration": "export interface TeamMemberSnapshot {\n readonly id: SessionId;\n readonly name: string;\n readonly description: string;\n readonly provider: string;\n readonly context: 'fresh' | 'fork';\n readonly phase: TeamMemberPhase;\n readonly error?: string;\n}"
2324
+ },
2325
+ {
2326
+ "name": "TeamMessageId",
2327
+ "declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
2328
+ },
2329
+ {
2330
+ "name": "TeamMessageSnapshot",
2331
+ "declaration": "export interface TeamMessageSnapshot {\n readonly id: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n readonly targetId: SessionId;\n readonly delivery: 'quiet' | 'wakeup';\n readonly content: ContentBlock[];\n}"
2332
+ },
2333
+ {
2334
+ "name": "TeamMessageSource",
2335
+ "declaration": "export interface TeamMessageSource {\n readonly kind: 'team-message';\n readonly teamId: TeamId;\n readonly messageId: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n}"
2336
+ },
2337
+ {
2338
+ "name": "TeamTaskId",
2339
+ "declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
2340
+ },
2341
+ {
2342
+ "name": "TeamTaskSnapshot",
2343
+ "declaration": "export interface TeamTaskSnapshot {\n readonly id: TeamTaskId;\n readonly revision: number;\n readonly subject: string;\n readonly description: string;\n readonly status: TeamTaskStatus;\n readonly ownerId?: SessionId;\n readonly blockedBy: TeamTaskId[];\n readonly writeScopes: string[];\n}"
2344
+ },
2345
+ {
2346
+ "name": "TeamTaskStatus",
2347
+ "declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
2348
+ },
2349
+ {
2350
+ "name": "TextBlock",
2351
+ "declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
2352
+ },
2353
+ {
2354
+ "name": "TodoItem",
2355
+ "declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
2356
+ },
2357
+ {
2358
+ "name": "TokenUsage",
2359
+ "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
2360
+ },
2361
+ {
2362
+ "name": "ToolCallBlock",
2363
+ "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
2364
+ },
2365
+ {
2366
+ "name": "ToolCallId",
2367
+ "declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
2368
+ },
2369
+ {
2370
+ "name": "ToolMessageSource",
2371
+ "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
2372
+ },
2373
+ {
2374
+ "name": "ToolRestriction",
2375
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
2376
+ },
2377
+ {
2378
+ "name": "ToolResultBlock",
2379
+ "declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
2380
+ },
2381
+ {
2382
+ "name": "ToolResultMessage",
2383
+ "declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
2384
+ },
2385
+ {
2386
+ "name": "ToolSchema",
2387
+ "declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
2388
+ },
2389
+ {
2390
+ "name": "TurnEndCancelCause",
2391
+ "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
2392
+ },
2393
+ {
2394
+ "name": "TurnEndReason",
2395
+ "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
2396
+ },
2397
+ {
2398
+ "name": "TurnEndReasonMap",
2399
+ "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}"
2400
+ },
2401
+ {
2402
+ "name": "UserMessage",
2403
+ "declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
2404
+ }
2405
+ ]
2406
+ },
2407
+ {
2408
+ "description": "Host service backing `ctx.remote.skills` without activating a cold Agent.",
2409
+ "summary": "Host service backing `ctx.remote.skills` without activating a cold Agent.",
2410
+ "tags": [],
2411
+ "jsDoc": "/** Host service backing `ctx.remote.skills` without activating a cold Agent. */",
2412
+ "key": "sessionSkillCatalog",
2413
+ "exportName": "SessionSkillCatalog",
2414
+ "members": [
2415
+ {
2416
+ "kind": "method",
2417
+ "name": "list",
2418
+ "signature": "@Remote async list(request: SkillListRequest, signal: AbortSignal): Promise<SkillListValue>",
2419
+ "summary": "List the user-invocable skills visible to one Session composition.",
2420
+ "jsDoc": "/**\n * List the user-invocable skills visible to one Session composition.\n * @param request - Session identity whose cwd and preset select the catalog view.\n * @param signal - caller lifetime carried by the Remote transport; admitted catalog reads retain their existing completion semantics.\n * @returns user-invocable skill metadata without loading skill bodies.\n * @throws RemoteError when the Session cannot be inspected or no registry can serve it.\n */"
2421
+ }
2422
+ ],
2423
+ "types": [
2424
+ {
2425
+ "name": "Branded",
2426
+ "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
2427
+ },
2428
+ {
2429
+ "name": "SessionId",
2430
+ "declaration": "export type SessionId = Branded<'SessionId'>;"
2431
+ },
2432
+ {
2433
+ "name": "SkillEntry",
2434
+ "declaration": "export interface SkillEntry {\n readonly name: string;\n readonly description: string;\n readonly whenToUse?: string;\n readonly modelInvocable: boolean;\n}"
2435
+ },
2436
+ {
2437
+ "name": "SkillListRequest",
2438
+ "declaration": "export interface SkillListRequest {\n readonly sessionId: SessionId;\n}"
2439
+ },
2440
+ {
2441
+ "name": "SkillListValue",
2442
+ "declaration": "export interface SkillListValue {\n readonly skills: readonly SkillEntry[];\n}"
2443
+ }
2444
+ ]
2445
+ }
2446
+ ],
2447
+ "events": [
2448
+ {
2449
+ "description": "One user-authored durable message advanced Session list activity.",
2450
+ "summary": "One user-authored durable message advanced Session list activity.",
2451
+ "tags": [
2452
+ {
2453
+ "name": "mode",
2454
+ "comment": "emit",
2455
+ "text": "@mode emit\n *"
2456
+ },
2457
+ {
2458
+ "name": "param",
2459
+ "argument": "sessionId",
2460
+ "comment": "- addressed Session identity.",
2461
+ "text": "@param sessionId - addressed Session identity.\n *"
2462
+ },
2463
+ {
2464
+ "name": "param",
2465
+ "argument": "updatedAt",
2466
+ "comment": "- durable message time used for list ordering.",
2467
+ "text": "@param updatedAt - durable message time used for list ordering."
2468
+ }
2469
+ ],
2470
+ "jsDoc": "/**\n * One user-authored durable message advanced Session list activity.\n * @mode emit\n * @param sessionId - addressed Session identity.\n * @param updatedAt - durable message time used for list ordering.\n */",
2471
+ "name": "api-session/activity",
2472
+ "mode": "emit",
2473
+ "signature": "'api-session/activity'(sessionId: SessionId, updatedAt: number): void"
2474
+ },
2475
+ {
2476
+ "description": "A Session became visible to Session list consumers.",
2477
+ "summary": "A Session became visible to Session list consumers.",
2478
+ "tags": [
2479
+ {
2480
+ "name": "mode",
2481
+ "comment": "emit",
2482
+ "text": "@mode emit\n *"
2483
+ },
2484
+ {
2485
+ "name": "param",
2486
+ "argument": "summary",
2487
+ "comment": "- initial list row for the Session.",
2488
+ "text": "@param summary - initial list row for the Session."
2489
+ }
2490
+ ],
2491
+ "jsDoc": "/**\n * A Session became visible to Session list consumers.\n * @mode emit\n * @param summary - initial list row for the Session.\n */",
2492
+ "name": "api-session/added",
2493
+ "mode": "emit",
2494
+ "signature": "'api-session/added'(summary: SessionSummary): void"
2495
+ },
2496
+ {
2497
+ "description": "One Agent failed outside a durable turn position.",
2498
+ "summary": "One Agent failed outside a durable turn position.",
2499
+ "tags": [
2500
+ {
2501
+ "name": "mode",
2502
+ "comment": "emit",
2503
+ "text": "@mode emit\n *"
2504
+ },
2505
+ {
2506
+ "name": "param",
2507
+ "argument": "sessionId",
2508
+ "comment": "- Agent and Session identity.",
2509
+ "text": "@param sessionId - Agent and Session identity.\n *"
2510
+ },
2511
+ {
2512
+ "name": "param",
2513
+ "argument": "message",
2514
+ "comment": "- user-safe failure chain.",
2515
+ "text": "@param message - user-safe failure chain."
2516
+ }
2517
+ ],
2518
+ "jsDoc": "/**\n * One Agent failed outside a durable turn position.\n * @mode emit\n * @param sessionId - Agent and Session identity.\n * @param message - user-safe failure chain.\n */",
2519
+ "name": "api-session/error",
2520
+ "mode": "emit",
2521
+ "signature": "'api-session/error'(sessionId: SessionId, message: string): void"
2522
+ },
2523
+ {
2524
+ "description": "A Session left the live Host registry.",
2525
+ "summary": "A Session left the live Host registry.",
2526
+ "tags": [
2527
+ {
2528
+ "name": "mode",
2529
+ "comment": "emit",
2530
+ "text": "@mode emit\n *"
2531
+ },
2532
+ {
2533
+ "name": "param",
2534
+ "argument": "sessionId",
2535
+ "comment": "- removed Session identity.",
2536
+ "text": "@param sessionId - removed Session identity."
2537
+ }
2538
+ ],
2539
+ "jsDoc": "/**\n * A Session left the live Host registry.\n * @mode emit\n * @param sessionId - removed Session identity.\n */",
2540
+ "name": "api-session/removed",
2541
+ "mode": "emit",
2542
+ "signature": "'api-session/removed'(sessionId: SessionId): void"
2543
+ },
2544
+ {
2545
+ "description": "One Agent changed running state.",
2546
+ "summary": "One Agent changed running state.",
2547
+ "tags": [
2548
+ {
2549
+ "name": "mode",
2550
+ "comment": "emit",
2551
+ "text": "@mode emit\n *"
2552
+ },
2553
+ {
2554
+ "name": "param",
2555
+ "argument": "sessionId",
2556
+ "comment": "- Agent and Session identity.",
2557
+ "text": "@param sessionId - Agent and Session identity.\n *"
2558
+ },
2559
+ {
2560
+ "name": "param",
2561
+ "argument": "running",
2562
+ "comment": "- whether the Agent is running.",
2563
+ "text": "@param running - whether the Agent is running."
2564
+ }
2565
+ ],
2566
+ "jsDoc": "/**\n * One Agent changed running state.\n * @mode emit\n * @param sessionId - Agent and Session identity.\n * @param running - whether the Agent is running.\n */",
2567
+ "name": "api-session/status",
2568
+ "mode": "emit",
2569
+ "signature": "'api-session/status'(sessionId: SessionId, running: boolean): void"
2570
+ }
2571
+ ],
2572
+ "objects": []
2573
+ },
2574
+ }