@moxt-ai/mobius-protocol 0.0.3

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 (49) hide show
  1. package/dist/bot.d.ts +398 -0
  2. package/dist/bot.d.ts.map +1 -0
  3. package/dist/bot.js +901 -0
  4. package/dist/bot.js.map +1 -0
  5. package/dist/codecs/messages.d.ts +35 -0
  6. package/dist/codecs/messages.d.ts.map +1 -0
  7. package/dist/codecs/messages.js +466 -0
  8. package/dist/codecs/messages.js.map +1 -0
  9. package/dist/control-messages.d.ts +662 -0
  10. package/dist/control-messages.d.ts.map +1 -0
  11. package/dist/control-messages.js +494 -0
  12. package/dist/control-messages.js.map +1 -0
  13. package/dist/conversation-title.d.ts +2 -0
  14. package/dist/conversation-title.d.ts.map +1 -0
  15. package/dist/conversation-title.js +28 -0
  16. package/dist/conversation-title.js.map +1 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +12 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/messages.d.ts +135 -0
  22. package/dist/messages.d.ts.map +1 -0
  23. package/dist/messages.js +25 -0
  24. package/dist/messages.js.map +1 -0
  25. package/dist/mobius-api.d.ts +15 -0
  26. package/dist/mobius-api.d.ts.map +1 -0
  27. package/dist/mobius-api.js +28 -0
  28. package/dist/mobius-api.js.map +1 -0
  29. package/dist/native-sessions.d.ts +262 -0
  30. package/dist/native-sessions.d.ts.map +1 -0
  31. package/dist/native-sessions.js +153 -0
  32. package/dist/native-sessions.js.map +1 -0
  33. package/dist/prompt-usage.d.ts +76 -0
  34. package/dist/prompt-usage.d.ts.map +1 -0
  35. package/dist/prompt-usage.js +88 -0
  36. package/dist/prompt-usage.js.map +1 -0
  37. package/dist/resource-model.d.ts +945 -0
  38. package/dist/resource-model.d.ts.map +1 -0
  39. package/dist/resource-model.js +716 -0
  40. package/dist/resource-model.js.map +1 -0
  41. package/dist/session-events.d.ts +97 -0
  42. package/dist/session-events.d.ts.map +1 -0
  43. package/dist/session-events.js +160 -0
  44. package/dist/session-events.js.map +1 -0
  45. package/dist/session-history.d.ts +69 -0
  46. package/dist/session-history.d.ts.map +1 -0
  47. package/dist/session-history.js +84 -0
  48. package/dist/session-history.js.map +1 -0
  49. package/package.json +36 -0
@@ -0,0 +1,945 @@
1
+ import { z } from "zod";
2
+ export declare const MAX_LOCAL_AGENT_DIRECTORY_ENTRIES = 32;
3
+ declare const recordingPolicySchema: z.ZodReadonly<z.ZodObject<{
4
+ contentLimitBytes: z.ZodNumber;
5
+ hotEventLimit: z.ZodNumber;
6
+ idempotencyRetentionMilliseconds: z.ZodNumber;
7
+ level: z.ZodEnum<{
8
+ full: "full";
9
+ summary: "summary";
10
+ }>;
11
+ retentionMilliseconds: z.ZodNumber;
12
+ }, z.core.$strict>>;
13
+ export type RecordingPolicy = z.infer<typeof recordingPolicySchema>;
14
+ declare const tenantSchema: z.ZodReadonly<z.ZodObject<{
15
+ lifecycle: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
16
+ kind: z.ZodLiteral<"active">;
17
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
18
+ kind: z.ZodLiteral<"suspended">;
19
+ suspendedAt: z.ZodString;
20
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
21
+ deletedAt: z.ZodString;
22
+ kind: z.ZodLiteral<"deleted">;
23
+ }, z.core.$strict>>], "kind">;
24
+ quotaPolicyRevision: z.ZodNumber;
25
+ recordingPolicy: z.ZodReadonly<z.ZodObject<{
26
+ contentLimitBytes: z.ZodNumber;
27
+ hotEventLimit: z.ZodNumber;
28
+ idempotencyRetentionMilliseconds: z.ZodNumber;
29
+ level: z.ZodEnum<{
30
+ full: "full";
31
+ summary: "summary";
32
+ }>;
33
+ retentionMilliseconds: z.ZodNumber;
34
+ }, z.core.$strict>>;
35
+ tenantId: z.ZodString;
36
+ }, z.core.$strict>>;
37
+ export type Tenant = z.infer<typeof tenantSchema>;
38
+ declare const projectSchema: z.ZodReadonly<z.ZodObject<{
39
+ displayName: z.ZodString;
40
+ lifecycle: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
41
+ kind: z.ZodLiteral<"active">;
42
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
43
+ archivedAt: z.ZodString;
44
+ kind: z.ZodLiteral<"archived">;
45
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
46
+ deletedAt: z.ZodString;
47
+ kind: z.ZodLiteral<"deleted">;
48
+ }, z.core.$strict>>], "kind">;
49
+ projectId: z.ZodString;
50
+ tenantId: z.ZodString;
51
+ }, z.core.$strict>>;
52
+ export type Project = z.infer<typeof projectSchema>;
53
+ declare const runtimeSchema: z.ZodReadonly<z.ZodObject<{
54
+ capabilities: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
55
+ name: z.ZodString;
56
+ revision: z.ZodNumber;
57
+ }, z.core.$strict>>>>;
58
+ displayName: z.ZodString;
59
+ lifecycle: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
60
+ kind: z.ZodLiteral<"registered">;
61
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
62
+ disabledAt: z.ZodString;
63
+ kind: z.ZodLiteral<"disabled">;
64
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
65
+ deletedAt: z.ZodString;
66
+ kind: z.ZodLiteral<"deleted">;
67
+ }, z.core.$strict>>], "kind">;
68
+ runtimeId: z.ZodString;
69
+ tenantId: z.ZodString;
70
+ }, z.core.$strict>>;
71
+ export type Runtime = z.infer<typeof runtimeSchema>;
72
+ declare const channelSchema: z.ZodReadonly<z.ZodObject<{
73
+ channelId: z.ZodString;
74
+ runtimeId: z.ZodString;
75
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
76
+ connectionEpoch: z.ZodNumber;
77
+ connectedAt: z.ZodString;
78
+ connectionId: z.ZodString;
79
+ kind: z.ZodLiteral<"online">;
80
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
81
+ connectionEpoch: z.ZodNumber;
82
+ disconnectedAt: z.ZodString;
83
+ kind: z.ZodLiteral<"offline">;
84
+ }, z.core.$strict>>], "kind">;
85
+ }, z.core.$strict>>;
86
+ export type Channel = z.infer<typeof channelSchema>;
87
+ declare const sessionLifecycleSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
88
+ kind: z.ZodLiteral<"ready">;
89
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
90
+ kind: z.ZodLiteral<"deleting">;
91
+ requestedAt: z.ZodString;
92
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
93
+ completedAt: z.ZodString;
94
+ kind: z.ZodLiteral<"deleted">;
95
+ }, z.core.$strict>>], "kind">;
96
+ export type SessionLifecycle = z.infer<typeof sessionLifecycleSchema>;
97
+ declare const sessionSchema: z.ZodReadonly<z.ZodObject<{
98
+ createdAt: z.ZodString;
99
+ createdBy: z.ZodString;
100
+ defaultBindingId: z.ZodString;
101
+ lastCommittedSeq: z.ZodString;
102
+ lifecycle: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
103
+ kind: z.ZodLiteral<"ready">;
104
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
105
+ kind: z.ZodLiteral<"deleting">;
106
+ requestedAt: z.ZodString;
107
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
108
+ completedAt: z.ZodString;
109
+ kind: z.ZodLiteral<"deleted">;
110
+ }, z.core.$strict>>], "kind">;
111
+ projectId: z.ZodString;
112
+ sessionId: z.ZodString;
113
+ tenantId: z.ZodString;
114
+ }, z.core.$strict>>;
115
+ export type Session = z.infer<typeof sessionSchema>;
116
+ declare const sessionBindingSchema: z.ZodReadonly<z.ZodObject<{
117
+ agentRef: z.ZodString;
118
+ bindingId: z.ZodString;
119
+ configRevision: z.ZodNumber;
120
+ createdAt: z.ZodString;
121
+ runtimeId: z.ZodString;
122
+ sessionId: z.ZodString;
123
+ workspaceRef: z.ZodString;
124
+ }, z.core.$strict>>;
125
+ export type SessionBinding = z.infer<typeof sessionBindingSchema>;
126
+ declare const domainErrorSchema: z.ZodReadonly<z.ZodObject<{
127
+ code: z.ZodString;
128
+ message: z.ZodString;
129
+ retryable: z.ZodBoolean;
130
+ }, z.core.$strict>>;
131
+ export type DomainError = z.infer<typeof domainErrorSchema>;
132
+ declare const executionResultSchema: z.ZodReadonly<z.ZodObject<{
133
+ kind: z.ZodLiteral<"agent_result">;
134
+ stopReason: z.ZodString;
135
+ }, z.core.$strict>>;
136
+ export type ExecutionResult = z.infer<typeof executionResultSchema>;
137
+ declare const reconciliationSchema: z.ZodReadonly<z.ZodObject<{
138
+ detectedAt: z.ZodString;
139
+ reason: z.ZodEnum<{
140
+ connection_lost: "connection_lost";
141
+ dispatch_indeterminate: "dispatch_indeterminate";
142
+ runtime_restarted: "runtime_restarted";
143
+ }>;
144
+ }, z.core.$strict>>;
145
+ export type Reconciliation = z.infer<typeof reconciliationSchema>;
146
+ declare const turnStateSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
147
+ kind: z.ZodLiteral<"queued">;
148
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
149
+ kind: z.ZodLiteral<"running">;
150
+ startedAt: z.ZodString;
151
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
152
+ completedAt: z.ZodString;
153
+ kind: z.ZodLiteral<"succeeded">;
154
+ result: z.ZodReadonly<z.ZodObject<{
155
+ kind: z.ZodLiteral<"agent_result">;
156
+ stopReason: z.ZodString;
157
+ }, z.core.$strict>>;
158
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
159
+ error: z.ZodReadonly<z.ZodObject<{
160
+ code: z.ZodString;
161
+ message: z.ZodString;
162
+ retryable: z.ZodBoolean;
163
+ }, z.core.$strict>>;
164
+ failedAt: z.ZodString;
165
+ kind: z.ZodLiteral<"failed">;
166
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
167
+ cancelledAt: z.ZodString;
168
+ kind: z.ZodLiteral<"cancelled">;
169
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
170
+ kind: z.ZodLiteral<"indeterminate">;
171
+ reconciliation: z.ZodReadonly<z.ZodObject<{
172
+ detectedAt: z.ZodString;
173
+ reason: z.ZodEnum<{
174
+ connection_lost: "connection_lost";
175
+ dispatch_indeterminate: "dispatch_indeterminate";
176
+ runtime_restarted: "runtime_restarted";
177
+ }>;
178
+ }, z.core.$strict>>;
179
+ }, z.core.$strict>>], "kind">;
180
+ export type TurnState = z.infer<typeof turnStateSchema>;
181
+ declare const turnRequestSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
182
+ content: z.ZodString;
183
+ kind: z.ZodLiteral<"prompt">;
184
+ }, z.core.$strict>>], "kind">;
185
+ export type TurnRequest = z.infer<typeof turnRequestSchema>;
186
+ declare const turnSchema: z.ZodReadonly<z.ZodObject<{
187
+ acceptedAt: z.ZodString;
188
+ bindingId: z.ZodString;
189
+ idempotencyKey: z.ZodString;
190
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
191
+ content: z.ZodString;
192
+ kind: z.ZodLiteral<"prompt">;
193
+ }, z.core.$strict>>], "kind">;
194
+ sessionId: z.ZodString;
195
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
196
+ kind: z.ZodLiteral<"queued">;
197
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
198
+ kind: z.ZodLiteral<"running">;
199
+ startedAt: z.ZodString;
200
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
201
+ completedAt: z.ZodString;
202
+ kind: z.ZodLiteral<"succeeded">;
203
+ result: z.ZodReadonly<z.ZodObject<{
204
+ kind: z.ZodLiteral<"agent_result">;
205
+ stopReason: z.ZodString;
206
+ }, z.core.$strict>>;
207
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
208
+ error: z.ZodReadonly<z.ZodObject<{
209
+ code: z.ZodString;
210
+ message: z.ZodString;
211
+ retryable: z.ZodBoolean;
212
+ }, z.core.$strict>>;
213
+ failedAt: z.ZodString;
214
+ kind: z.ZodLiteral<"failed">;
215
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
216
+ cancelledAt: z.ZodString;
217
+ kind: z.ZodLiteral<"cancelled">;
218
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
219
+ kind: z.ZodLiteral<"indeterminate">;
220
+ reconciliation: z.ZodReadonly<z.ZodObject<{
221
+ detectedAt: z.ZodString;
222
+ reason: z.ZodEnum<{
223
+ connection_lost: "connection_lost";
224
+ dispatch_indeterminate: "dispatch_indeterminate";
225
+ runtime_restarted: "runtime_restarted";
226
+ }>;
227
+ }, z.core.$strict>>;
228
+ }, z.core.$strict>>], "kind">;
229
+ turnId: z.ZodString;
230
+ }, z.core.$strict>>;
231
+ export type Turn = z.infer<typeof turnSchema>;
232
+ declare const attemptStateSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
233
+ dispatchedAt: z.ZodString;
234
+ kind: z.ZodLiteral<"dispatching">;
235
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
236
+ kind: z.ZodLiteral<"running">;
237
+ startedAt: z.ZodString;
238
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
239
+ interactionIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
240
+ kind: z.ZodLiteral<"waiting_input">;
241
+ startedAt: z.ZodString;
242
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
243
+ completedAt: z.ZodString;
244
+ kind: z.ZodLiteral<"succeeded">;
245
+ result: z.ZodReadonly<z.ZodObject<{
246
+ kind: z.ZodLiteral<"agent_result">;
247
+ stopReason: z.ZodString;
248
+ }, z.core.$strict>>;
249
+ startedAt: z.ZodString;
250
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
251
+ error: z.ZodReadonly<z.ZodObject<{
252
+ code: z.ZodString;
253
+ message: z.ZodString;
254
+ retryable: z.ZodBoolean;
255
+ }, z.core.$strict>>;
256
+ failedAt: z.ZodString;
257
+ kind: z.ZodLiteral<"failed">;
258
+ startedAt: z.ZodString;
259
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
260
+ cancelledAt: z.ZodString;
261
+ kind: z.ZodLiteral<"cancelled">;
262
+ startedAt: z.ZodString;
263
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
264
+ kind: z.ZodLiteral<"indeterminate">;
265
+ reconciliation: z.ZodReadonly<z.ZodObject<{
266
+ detectedAt: z.ZodString;
267
+ reason: z.ZodEnum<{
268
+ connection_lost: "connection_lost";
269
+ dispatch_indeterminate: "dispatch_indeterminate";
270
+ runtime_restarted: "runtime_restarted";
271
+ }>;
272
+ }, z.core.$strict>>;
273
+ startedAt: z.ZodString;
274
+ }, z.core.$strict>>], "kind">;
275
+ export type AttemptState = z.infer<typeof attemptStateSchema>;
276
+ declare const attemptSchema: z.ZodReadonly<z.ZodObject<{
277
+ attemptId: z.ZodString;
278
+ bindingId: z.ZodString;
279
+ sessionId: z.ZodString;
280
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
281
+ dispatchedAt: z.ZodString;
282
+ kind: z.ZodLiteral<"dispatching">;
283
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
284
+ kind: z.ZodLiteral<"running">;
285
+ startedAt: z.ZodString;
286
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
287
+ interactionIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
288
+ kind: z.ZodLiteral<"waiting_input">;
289
+ startedAt: z.ZodString;
290
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
291
+ completedAt: z.ZodString;
292
+ kind: z.ZodLiteral<"succeeded">;
293
+ result: z.ZodReadonly<z.ZodObject<{
294
+ kind: z.ZodLiteral<"agent_result">;
295
+ stopReason: z.ZodString;
296
+ }, z.core.$strict>>;
297
+ startedAt: z.ZodString;
298
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
299
+ error: z.ZodReadonly<z.ZodObject<{
300
+ code: z.ZodString;
301
+ message: z.ZodString;
302
+ retryable: z.ZodBoolean;
303
+ }, z.core.$strict>>;
304
+ failedAt: z.ZodString;
305
+ kind: z.ZodLiteral<"failed">;
306
+ startedAt: z.ZodString;
307
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
308
+ cancelledAt: z.ZodString;
309
+ kind: z.ZodLiteral<"cancelled">;
310
+ startedAt: z.ZodString;
311
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
312
+ kind: z.ZodLiteral<"indeterminate">;
313
+ reconciliation: z.ZodReadonly<z.ZodObject<{
314
+ detectedAt: z.ZodString;
315
+ reason: z.ZodEnum<{
316
+ connection_lost: "connection_lost";
317
+ dispatch_indeterminate: "dispatch_indeterminate";
318
+ runtime_restarted: "runtime_restarted";
319
+ }>;
320
+ }, z.core.$strict>>;
321
+ startedAt: z.ZodString;
322
+ }, z.core.$strict>>], "kind">;
323
+ turnId: z.ZodString;
324
+ }, z.core.$strict>>;
325
+ export type Attempt = z.infer<typeof attemptSchema>;
326
+ declare const interactionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
327
+ kind: z.ZodLiteral<"permission">;
328
+ options: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
329
+ kind: z.ZodEnum<{
330
+ allow_always: "allow_always";
331
+ allow_once: "allow_once";
332
+ reject_always: "reject_always";
333
+ reject_once: "reject_once";
334
+ }>;
335
+ name: z.ZodString;
336
+ optionId: z.ZodString;
337
+ }, z.core.$strict>>>>;
338
+ title: z.ZodString;
339
+ toolCallId: z.ZodString;
340
+ toolKind: z.ZodString;
341
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
342
+ elicitationId: z.ZodString;
343
+ fields: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
344
+ defaultBooleanValue: z.ZodBoolean;
345
+ defaultNumberValue: z.ZodNumber;
346
+ defaultStringValue: z.ZodString;
347
+ description: z.ZodString;
348
+ format: z.ZodString;
349
+ hasDefaultValue: z.ZodBoolean;
350
+ maximum: z.ZodString;
351
+ maximumLength: z.ZodString;
352
+ minimum: z.ZodString;
353
+ minimumLength: z.ZodString;
354
+ name: z.ZodString;
355
+ options: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
356
+ description: z.ZodString;
357
+ label: z.ZodString;
358
+ value: z.ZodString;
359
+ }, z.core.$strict>>>>;
360
+ pattern: z.ZodString;
361
+ required: z.ZodBoolean;
362
+ title: z.ZodString;
363
+ type: z.ZodEnum<{
364
+ boolean: "boolean";
365
+ integer: "integer";
366
+ multiselect: "multiselect";
367
+ number: "number";
368
+ select: "select";
369
+ string: "string";
370
+ }>;
371
+ }, z.core.$strict>>>>;
372
+ kind: z.ZodLiteral<"elicitation">;
373
+ message: z.ZodString;
374
+ mode: z.ZodEnum<{
375
+ form: "form";
376
+ url: "url";
377
+ }>;
378
+ url: z.ZodString;
379
+ }, z.core.$strict>>], "kind">;
380
+ export type InteractionRequest = z.infer<typeof interactionRequestSchema>;
381
+ declare const interactionResponseSchema: z.ZodReadonly<z.ZodObject<{
382
+ content: z.ZodString;
383
+ kind: z.ZodEnum<{
384
+ elicitation: "elicitation";
385
+ permission: "permission";
386
+ }>;
387
+ }, z.core.$strict>>;
388
+ export type InteractionResponse = z.infer<typeof interactionResponseSchema>;
389
+ declare const interactionStateSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
390
+ kind: z.ZodLiteral<"pending">;
391
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
392
+ kind: z.ZodLiteral<"responded">;
393
+ respondedAt: z.ZodString;
394
+ responderId: z.ZodString;
395
+ response: z.ZodReadonly<z.ZodObject<{
396
+ content: z.ZodString;
397
+ kind: z.ZodEnum<{
398
+ elicitation: "elicitation";
399
+ permission: "permission";
400
+ }>;
401
+ }, z.core.$strict>>;
402
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
403
+ kind: z.ZodLiteral<"resolved">;
404
+ resolution: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
405
+ kind: z.ZodLiteral<"without_response">;
406
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
407
+ kind: z.ZodLiteral<"response_applied">;
408
+ respondedAt: z.ZodString;
409
+ responderId: z.ZodString;
410
+ response: z.ZodReadonly<z.ZodObject<{
411
+ content: z.ZodString;
412
+ kind: z.ZodEnum<{
413
+ elicitation: "elicitation";
414
+ permission: "permission";
415
+ }>;
416
+ }, z.core.$strict>>;
417
+ }, z.core.$strict>>], "kind">;
418
+ resolvedAt: z.ZodString;
419
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
420
+ expiredAt: z.ZodString;
421
+ kind: z.ZodLiteral<"expired">;
422
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
423
+ cancelledAt: z.ZodString;
424
+ kind: z.ZodLiteral<"cancelled">;
425
+ }, z.core.$strict>>], "kind">;
426
+ export type InteractionState = z.infer<typeof interactionStateSchema>;
427
+ declare const interactionSchema: z.ZodReadonly<z.ZodObject<{
428
+ attemptId: z.ZodString;
429
+ interactionId: z.ZodString;
430
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
431
+ kind: z.ZodLiteral<"permission">;
432
+ options: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
433
+ kind: z.ZodEnum<{
434
+ allow_always: "allow_always";
435
+ allow_once: "allow_once";
436
+ reject_always: "reject_always";
437
+ reject_once: "reject_once";
438
+ }>;
439
+ name: z.ZodString;
440
+ optionId: z.ZodString;
441
+ }, z.core.$strict>>>>;
442
+ title: z.ZodString;
443
+ toolCallId: z.ZodString;
444
+ toolKind: z.ZodString;
445
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
446
+ elicitationId: z.ZodString;
447
+ fields: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
448
+ defaultBooleanValue: z.ZodBoolean;
449
+ defaultNumberValue: z.ZodNumber;
450
+ defaultStringValue: z.ZodString;
451
+ description: z.ZodString;
452
+ format: z.ZodString;
453
+ hasDefaultValue: z.ZodBoolean;
454
+ maximum: z.ZodString;
455
+ maximumLength: z.ZodString;
456
+ minimum: z.ZodString;
457
+ minimumLength: z.ZodString;
458
+ name: z.ZodString;
459
+ options: z.ZodReadonly<z.ZodArray<z.ZodReadonly<z.ZodObject<{
460
+ description: z.ZodString;
461
+ label: z.ZodString;
462
+ value: z.ZodString;
463
+ }, z.core.$strict>>>>;
464
+ pattern: z.ZodString;
465
+ required: z.ZodBoolean;
466
+ title: z.ZodString;
467
+ type: z.ZodEnum<{
468
+ boolean: "boolean";
469
+ integer: "integer";
470
+ multiselect: "multiselect";
471
+ number: "number";
472
+ select: "select";
473
+ string: "string";
474
+ }>;
475
+ }, z.core.$strict>>>>;
476
+ kind: z.ZodLiteral<"elicitation">;
477
+ message: z.ZodString;
478
+ mode: z.ZodEnum<{
479
+ form: "form";
480
+ url: "url";
481
+ }>;
482
+ url: z.ZodString;
483
+ }, z.core.$strict>>], "kind">;
484
+ sessionId: z.ZodString;
485
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
486
+ kind: z.ZodLiteral<"pending">;
487
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
488
+ kind: z.ZodLiteral<"responded">;
489
+ respondedAt: z.ZodString;
490
+ responderId: z.ZodString;
491
+ response: z.ZodReadonly<z.ZodObject<{
492
+ content: z.ZodString;
493
+ kind: z.ZodEnum<{
494
+ elicitation: "elicitation";
495
+ permission: "permission";
496
+ }>;
497
+ }, z.core.$strict>>;
498
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
499
+ kind: z.ZodLiteral<"resolved">;
500
+ resolution: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
501
+ kind: z.ZodLiteral<"without_response">;
502
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
503
+ kind: z.ZodLiteral<"response_applied">;
504
+ respondedAt: z.ZodString;
505
+ responderId: z.ZodString;
506
+ response: z.ZodReadonly<z.ZodObject<{
507
+ content: z.ZodString;
508
+ kind: z.ZodEnum<{
509
+ elicitation: "elicitation";
510
+ permission: "permission";
511
+ }>;
512
+ }, z.core.$strict>>;
513
+ }, z.core.$strict>>], "kind">;
514
+ resolvedAt: z.ZodString;
515
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
516
+ expiredAt: z.ZodString;
517
+ kind: z.ZodLiteral<"expired">;
518
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
519
+ cancelledAt: z.ZodString;
520
+ kind: z.ZodLiteral<"cancelled">;
521
+ }, z.core.$strict>>], "kind">;
522
+ turnId: z.ZodString;
523
+ }, z.core.$strict>>;
524
+ export type Interaction = z.infer<typeof interactionSchema>;
525
+ declare const recordingCompletenessSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
526
+ kind: z.ZodLiteral<"complete">;
527
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
528
+ capturedBytes: z.ZodNumber;
529
+ kind: z.ZodLiteral<"truncated">;
530
+ originalBytes: z.ZodNumber;
531
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
532
+ kind: z.ZodLiteral<"redacted">;
533
+ reason: z.ZodString;
534
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
535
+ kind: z.ZodLiteral<"uncaptured">;
536
+ }, z.core.$strict>>], "kind">;
537
+ export type RecordingCompleteness = z.infer<typeof recordingCompletenessSchema>;
538
+ declare const messageViewSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
539
+ contentArtifactIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
540
+ lastAppliedSeq: z.ZodString;
541
+ messageId: z.ZodString;
542
+ preview: z.ZodString;
543
+ sessionId: z.ZodString;
544
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
545
+ kind: z.ZodLiteral<"building">;
546
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
547
+ completeness: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
548
+ kind: z.ZodLiteral<"complete">;
549
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
550
+ capturedBytes: z.ZodNumber;
551
+ kind: z.ZodLiteral<"truncated">;
552
+ originalBytes: z.ZodNumber;
553
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
554
+ kind: z.ZodLiteral<"redacted">;
555
+ reason: z.ZodString;
556
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
557
+ kind: z.ZodLiteral<"uncaptured">;
558
+ }, z.core.$strict>>], "kind">;
559
+ kind: z.ZodLiteral<"available">;
560
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
561
+ deletedAt: z.ZodString;
562
+ kind: z.ZodLiteral<"deleted">;
563
+ }, z.core.$strict>>], "kind">;
564
+ role: z.ZodLiteral<"user">;
565
+ source: z.ZodReadonly<z.ZodObject<{
566
+ kind: z.ZodLiteral<"turn">;
567
+ turnId: z.ZodString;
568
+ }, z.core.$strict>>;
569
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
570
+ contentArtifactIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
571
+ lastAppliedSeq: z.ZodString;
572
+ messageId: z.ZodString;
573
+ preview: z.ZodString;
574
+ sessionId: z.ZodString;
575
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
576
+ kind: z.ZodLiteral<"building">;
577
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
578
+ completeness: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
579
+ kind: z.ZodLiteral<"complete">;
580
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
581
+ capturedBytes: z.ZodNumber;
582
+ kind: z.ZodLiteral<"truncated">;
583
+ originalBytes: z.ZodNumber;
584
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
585
+ kind: z.ZodLiteral<"redacted">;
586
+ reason: z.ZodString;
587
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
588
+ kind: z.ZodLiteral<"uncaptured">;
589
+ }, z.core.$strict>>], "kind">;
590
+ kind: z.ZodLiteral<"available">;
591
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
592
+ deletedAt: z.ZodString;
593
+ kind: z.ZodLiteral<"deleted">;
594
+ }, z.core.$strict>>], "kind">;
595
+ role: z.ZodLiteral<"agent">;
596
+ source: z.ZodReadonly<z.ZodObject<{
597
+ attemptId: z.ZodString;
598
+ kind: z.ZodLiteral<"attempt">;
599
+ turnId: z.ZodString;
600
+ }, z.core.$strict>>;
601
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
602
+ contentArtifactIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
603
+ lastAppliedSeq: z.ZodString;
604
+ messageId: z.ZodString;
605
+ preview: z.ZodString;
606
+ sessionId: z.ZodString;
607
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
608
+ kind: z.ZodLiteral<"building">;
609
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
610
+ completeness: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
611
+ kind: z.ZodLiteral<"complete">;
612
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
613
+ capturedBytes: z.ZodNumber;
614
+ kind: z.ZodLiteral<"truncated">;
615
+ originalBytes: z.ZodNumber;
616
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
617
+ kind: z.ZodLiteral<"redacted">;
618
+ reason: z.ZodString;
619
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
620
+ kind: z.ZodLiteral<"uncaptured">;
621
+ }, z.core.$strict>>], "kind">;
622
+ kind: z.ZodLiteral<"available">;
623
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
624
+ deletedAt: z.ZodString;
625
+ kind: z.ZodLiteral<"deleted">;
626
+ }, z.core.$strict>>], "kind">;
627
+ role: z.ZodLiteral<"tool">;
628
+ source: z.ZodReadonly<z.ZodObject<{
629
+ attemptId: z.ZodString;
630
+ kind: z.ZodLiteral<"tool_call">;
631
+ toolCallId: z.ZodString;
632
+ turnId: z.ZodString;
633
+ }, z.core.$strict>>;
634
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
635
+ contentArtifactIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
636
+ lastAppliedSeq: z.ZodString;
637
+ messageId: z.ZodString;
638
+ preview: z.ZodString;
639
+ sessionId: z.ZodString;
640
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
641
+ kind: z.ZodLiteral<"building">;
642
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
643
+ completeness: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
644
+ kind: z.ZodLiteral<"complete">;
645
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
646
+ capturedBytes: z.ZodNumber;
647
+ kind: z.ZodLiteral<"truncated">;
648
+ originalBytes: z.ZodNumber;
649
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
650
+ kind: z.ZodLiteral<"redacted">;
651
+ reason: z.ZodString;
652
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
653
+ kind: z.ZodLiteral<"uncaptured">;
654
+ }, z.core.$strict>>], "kind">;
655
+ kind: z.ZodLiteral<"available">;
656
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
657
+ deletedAt: z.ZodString;
658
+ kind: z.ZodLiteral<"deleted">;
659
+ }, z.core.$strict>>], "kind">;
660
+ role: z.ZodLiteral<"system">;
661
+ source: z.ZodReadonly<z.ZodObject<{
662
+ kind: z.ZodLiteral<"system">;
663
+ }, z.core.$strict>>;
664
+ }, z.core.$strict>>], "role">;
665
+ export type MessageView = z.infer<typeof messageViewSchema>;
666
+ declare const toolCallViewSchema: z.ZodReadonly<z.ZodObject<{
667
+ attemptId: z.ZodString;
668
+ detail: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
669
+ artifactId: z.ZodString;
670
+ kind: z.ZodLiteral<"available">;
671
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
672
+ capturedBytes: z.ZodNumber;
673
+ kind: z.ZodLiteral<"truncated">;
674
+ originalBytes: z.ZodNumber;
675
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
676
+ kind: z.ZodLiteral<"uncaptured">;
677
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
678
+ deletedAt: z.ZodString;
679
+ kind: z.ZodLiteral<"deleted">;
680
+ }, z.core.$strict>>], "kind">;
681
+ inputPreview: z.ZodString;
682
+ lastAppliedSeq: z.ZodString;
683
+ name: z.ZodString;
684
+ outputPreview: z.ZodString;
685
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
686
+ kind: z.ZodLiteral<"pending">;
687
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
688
+ kind: z.ZodLiteral<"running">;
689
+ startedAt: z.ZodString;
690
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
691
+ completedAt: z.ZodString;
692
+ kind: z.ZodLiteral<"succeeded">;
693
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
694
+ error: z.ZodReadonly<z.ZodObject<{
695
+ code: z.ZodString;
696
+ message: z.ZodString;
697
+ retryable: z.ZodBoolean;
698
+ }, z.core.$strict>>;
699
+ failedAt: z.ZodString;
700
+ kind: z.ZodLiteral<"failed">;
701
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
702
+ cancelledAt: z.ZodString;
703
+ kind: z.ZodLiteral<"cancelled">;
704
+ }, z.core.$strict>>], "kind">;
705
+ title: z.ZodString;
706
+ toolCallId: z.ZodString;
707
+ toolKind: z.ZodString;
708
+ }, z.core.$strict>>;
709
+ export type ToolCallView = z.infer<typeof toolCallViewSchema>;
710
+ declare const sessionListEntrySchema: z.ZodReadonly<z.ZodObject<{
711
+ lastAppliedSeq: z.ZodString;
712
+ preview: z.ZodString;
713
+ projectId: z.ZodString;
714
+ projectedAttemptState: z.ZodEnum<{
715
+ dispatching: "dispatching";
716
+ idle: "idle";
717
+ indeterminate: "indeterminate";
718
+ running: "running";
719
+ waiting_input: "waiting_input";
720
+ }>;
721
+ sessionId: z.ZodString;
722
+ tenantId: z.ZodString;
723
+ title: z.ZodString;
724
+ updatedAt: z.ZodString;
725
+ }, z.core.$strict>>;
726
+ export type SessionListEntry = z.infer<typeof sessionListEntrySchema>;
727
+ declare const artifactStateSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
728
+ expectedBytes: z.ZodNumber;
729
+ expiresAt: z.ZodString;
730
+ kind: z.ZodLiteral<"uploading">;
731
+ uploadId: z.ZodString;
732
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
733
+ availableAt: z.ZodString;
734
+ byteLength: z.ZodNumber;
735
+ kind: z.ZodLiteral<"available">;
736
+ sha256: z.ZodString;
737
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
738
+ kind: z.ZodLiteral<"deleting">;
739
+ requestedAt: z.ZodString;
740
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
741
+ completedAt: z.ZodString;
742
+ kind: z.ZodLiteral<"deleted">;
743
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
744
+ error: z.ZodReadonly<z.ZodObject<{
745
+ code: z.ZodString;
746
+ message: z.ZodString;
747
+ retryable: z.ZodBoolean;
748
+ }, z.core.$strict>>;
749
+ failedAt: z.ZodString;
750
+ kind: z.ZodLiteral<"failed">;
751
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
752
+ expiredAt: z.ZodString;
753
+ kind: z.ZodLiteral<"expired">;
754
+ }, z.core.$strict>>], "kind">;
755
+ export type ArtifactState = z.infer<typeof artifactStateSchema>;
756
+ declare const artifactSchema: z.ZodReadonly<z.ZodObject<{
757
+ artifactId: z.ZodString;
758
+ completeness: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
759
+ kind: z.ZodLiteral<"complete">;
760
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
761
+ capturedBytes: z.ZodNumber;
762
+ kind: z.ZodLiteral<"truncated">;
763
+ originalBytes: z.ZodNumber;
764
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
765
+ kind: z.ZodLiteral<"redacted">;
766
+ reason: z.ZodString;
767
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
768
+ kind: z.ZodLiteral<"uncaptured">;
769
+ }, z.core.$strict>>], "kind">;
770
+ contentKind: z.ZodString;
771
+ mediaType: z.ZodString;
772
+ projectId: z.ZodString;
773
+ provenance: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
774
+ kind: z.ZodLiteral<"user_upload">;
775
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
776
+ attemptId: z.ZodString;
777
+ kind: z.ZodLiteral<"tool_call">;
778
+ toolCallId: z.ZodString;
779
+ turnId: z.ZodString;
780
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
781
+ attemptId: z.ZodString;
782
+ kind: z.ZodLiteral<"agent_generated">;
783
+ turnId: z.ZodString;
784
+ }, z.core.$strict>>], "kind">;
785
+ sessionId: z.ZodString;
786
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
787
+ expectedBytes: z.ZodNumber;
788
+ expiresAt: z.ZodString;
789
+ kind: z.ZodLiteral<"uploading">;
790
+ uploadId: z.ZodString;
791
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
792
+ availableAt: z.ZodString;
793
+ byteLength: z.ZodNumber;
794
+ kind: z.ZodLiteral<"available">;
795
+ sha256: z.ZodString;
796
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
797
+ kind: z.ZodLiteral<"deleting">;
798
+ requestedAt: z.ZodString;
799
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
800
+ completedAt: z.ZodString;
801
+ kind: z.ZodLiteral<"deleted">;
802
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
803
+ error: z.ZodReadonly<z.ZodObject<{
804
+ code: z.ZodString;
805
+ message: z.ZodString;
806
+ retryable: z.ZodBoolean;
807
+ }, z.core.$strict>>;
808
+ failedAt: z.ZodString;
809
+ kind: z.ZodLiteral<"failed">;
810
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
811
+ expiredAt: z.ZodString;
812
+ kind: z.ZodLiteral<"expired">;
813
+ }, z.core.$strict>>], "kind">;
814
+ tenantId: z.ZodString;
815
+ }, z.core.$strict>>;
816
+ export type Artifact = z.infer<typeof artifactSchema>;
817
+ declare const archiveSegmentStateSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
818
+ kind: z.ZodLiteral<"pending">;
819
+ queuedAt: z.ZodString;
820
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
821
+ byteLength: z.ZodNumber;
822
+ kind: z.ZodLiteral<"uploaded">;
823
+ sha256: z.ZodString;
824
+ uploadedAt: z.ZodString;
825
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
826
+ byteLength: z.ZodNumber;
827
+ kind: z.ZodLiteral<"published">;
828
+ publishedAt: z.ZodString;
829
+ sha256: z.ZodString;
830
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
831
+ kind: z.ZodLiteral<"deleting">;
832
+ requestedAt: z.ZodString;
833
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
834
+ completedAt: z.ZodString;
835
+ kind: z.ZodLiteral<"deleted">;
836
+ }, z.core.$strict>>], "kind">;
837
+ export type ArchiveSegmentState = z.infer<typeof archiveSegmentStateSchema>;
838
+ declare const archiveSegmentSchema: z.ZodReadonly<z.ZodObject<{
839
+ compression: z.ZodLiteral<"gzip">;
840
+ eventCount: z.ZodNumber;
841
+ firstSeq: z.ZodString;
842
+ lastSeq: z.ZodString;
843
+ segmentId: z.ZodString;
844
+ sessionId: z.ZodString;
845
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
846
+ kind: z.ZodLiteral<"pending">;
847
+ queuedAt: z.ZodString;
848
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
849
+ byteLength: z.ZodNumber;
850
+ kind: z.ZodLiteral<"uploaded">;
851
+ sha256: z.ZodString;
852
+ uploadedAt: z.ZodString;
853
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
854
+ byteLength: z.ZodNumber;
855
+ kind: z.ZodLiteral<"published">;
856
+ publishedAt: z.ZodString;
857
+ sha256: z.ZodString;
858
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
859
+ kind: z.ZodLiteral<"deleting">;
860
+ requestedAt: z.ZodString;
861
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
862
+ completedAt: z.ZodString;
863
+ kind: z.ZodLiteral<"deleted">;
864
+ }, z.core.$strict>>], "kind">;
865
+ }, z.core.$strict>>;
866
+ export type ArchiveSegment = z.infer<typeof archiveSegmentSchema>;
867
+ declare const pendingWorkSchema: z.ZodReadonly<z.ZodObject<{
868
+ kind: z.ZodEnum<{
869
+ archive: "archive";
870
+ delete: "delete";
871
+ dispatch: "dispatch";
872
+ interaction_response: "interaction_response";
873
+ projection: "projection";
874
+ }>;
875
+ projectId: z.ZodString;
876
+ sessionId: z.ZodString;
877
+ state: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
878
+ kind: z.ZodLiteral<"pending">;
879
+ queuedAt: z.ZodString;
880
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
881
+ attempt: z.ZodNumber;
882
+ kind: z.ZodLiteral<"running">;
883
+ startedAt: z.ZodString;
884
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
885
+ completedAt: z.ZodString;
886
+ kind: z.ZodLiteral<"completed">;
887
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
888
+ error: z.ZodReadonly<z.ZodObject<{
889
+ code: z.ZodString;
890
+ message: z.ZodString;
891
+ retryable: z.ZodBoolean;
892
+ }, z.core.$strict>>;
893
+ kind: z.ZodLiteral<"retryable">;
894
+ nextAttemptAt: z.ZodString;
895
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
896
+ error: z.ZodReadonly<z.ZodObject<{
897
+ code: z.ZodString;
898
+ message: z.ZodString;
899
+ retryable: z.ZodBoolean;
900
+ }, z.core.$strict>>;
901
+ failedAt: z.ZodString;
902
+ kind: z.ZodLiteral<"failed">;
903
+ }, z.core.$strict>>], "kind">;
904
+ workId: z.ZodString;
905
+ }, z.core.$strict>>;
906
+ export type PendingWork = z.infer<typeof pendingWorkSchema>;
907
+ declare const commandReceiptSchema: z.ZodReadonly<z.ZodObject<{
908
+ acceptedAt: z.ZodString;
909
+ commandKind: z.ZodString;
910
+ expiresAt: z.ZodString;
911
+ idempotencyKey: z.ZodString;
912
+ projectId: z.ZodString;
913
+ requestHash: z.ZodString;
914
+ resultId: z.ZodString;
915
+ sessionId: z.ZodString;
916
+ }, z.core.$strict>>;
917
+ export type CommandReceipt = z.infer<typeof commandReceiptSchema>;
918
+ export declare class ResourceTransitionError extends Error {
919
+ readonly code = "invalid_resource_transition";
920
+ constructor(resource: string, from: string, to: string);
921
+ }
922
+ export declare function transitionSession(session: Session, lifecycle: SessionLifecycle): Session;
923
+ export declare function transitionTurn(turn: Turn, state: TurnState): Turn;
924
+ export declare function transitionAttempt(attempt: Attempt, state: AttemptState): Attempt;
925
+ export declare function transitionInteraction(interaction: Interaction, state: InteractionState): Interaction;
926
+ export declare const decodeTenant: (value: unknown) => Tenant;
927
+ export declare const decodeProject: (value: unknown) => Project;
928
+ export declare const decodeRuntime: (value: unknown) => Runtime;
929
+ export declare const decodeChannel: (value: unknown) => Channel;
930
+ export declare const decodeSession: (value: unknown) => Session;
931
+ export declare const decodeSessionBinding: (value: unknown) => SessionBinding;
932
+ export declare const decodeTurn: (value: unknown) => Turn;
933
+ export declare const decodeAttempt: (value: unknown) => Attempt;
934
+ export declare const decodeInteraction: (value: unknown) => Interaction;
935
+ export declare const decodeInteractionRequest: (value: unknown) => InteractionRequest;
936
+ export declare const decodeInteractionResponse: (value: unknown) => InteractionResponse;
937
+ export declare const decodeMessageView: (value: unknown) => MessageView;
938
+ export declare const decodeToolCallView: (value: unknown) => ToolCallView;
939
+ export declare const decodeSessionListEntry: (value: unknown) => SessionListEntry;
940
+ export declare const decodeArtifact: (value: unknown) => Artifact;
941
+ export declare const decodeArchiveSegment: (value: unknown) => ArchiveSegment;
942
+ export declare const decodePendingWork: (value: unknown) => PendingWork;
943
+ export declare const decodeCommandReceipt: (value: unknown) => CommandReceipt;
944
+ export {};
945
+ //# sourceMappingURL=resource-model.d.ts.map