@ravi-os/sdk 0.260724.1 → 0.260915.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.
@@ -0,0 +1,1084 @@
1
+ import { z } from "zod";
2
+ import { type ExternalChannelTarget } from "./channel-backend.js";
3
+ export declare const CHANNEL_RUNTIME_EVENTS_PROTOCOL: "ravi.channel.runtime-events";
4
+ export declare const CHANNEL_RUNTIME_EVENTS_SCHEMA_VERSION: 1;
5
+ export declare const MAX_CHANNEL_TOOL_PRESENTATION_TITLE_BYTES = 256;
6
+ export declare const MAX_CHANNEL_TOOL_PRESENTATION_SUMMARY_BYTES = 1024;
7
+ export declare const MAX_CHANNEL_TOOL_PRESENTATION_PARAMETER_NAME_BYTES = 96;
8
+ export declare const MAX_CHANNEL_TOOL_PRESENTATION_PARAMETER_LABEL_BYTES = 256;
9
+ export declare const MAX_CHANNEL_TOOL_PRESENTATION_PARAMETER_VALUE_BYTES = 512;
10
+ export declare const MAX_CHANNEL_TOOL_PRESENTATION_PARAMETERS = 8;
11
+ export declare const ChannelRuntimeCorrelationSchema: z.ZodObject<{
12
+ correlationId: z.ZodString;
13
+ causationId: z.ZodOptional<z.ZodString>;
14
+ ingressRequestId: z.ZodString;
15
+ binding: z.ZodObject<{
16
+ channelInstanceId: z.ZodString;
17
+ agentId: z.ZodString;
18
+ chatId: z.ZodString;
19
+ messageId: z.ZodString;
20
+ sessionId: z.ZodString;
21
+ turnId: z.ZodString;
22
+ }, z.core.$strip>;
23
+ }, z.core.$strip>;
24
+ export declare const ChannelTurnStateSchema: z.ZodEnum<{
25
+ accepted: "accepted";
26
+ running: "running";
27
+ waiting_approval: "waiting_approval";
28
+ completed: "completed";
29
+ failed: "failed";
30
+ interrupted: "interrupted";
31
+ }>;
32
+ export declare const ChannelTurnStateChangedPayloadSchema: z.ZodObject<{
33
+ state: z.ZodEnum<{
34
+ accepted: "accepted";
35
+ running: "running";
36
+ waiting_approval: "waiting_approval";
37
+ completed: "completed";
38
+ failed: "failed";
39
+ interrupted: "interrupted";
40
+ }>;
41
+ error: z.ZodOptional<z.ZodObject<{
42
+ code: z.ZodEnum<{
43
+ INVALID_REQUEST: "INVALID_REQUEST";
44
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
45
+ UNAUTHENTICATED: "UNAUTHENTICATED";
46
+ PERMISSION_DENIED: "PERMISSION_DENIED";
47
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
48
+ NOT_FOUND: "NOT_FOUND";
49
+ RATE_LIMITED: "RATE_LIMITED";
50
+ OVERLOADED: "OVERLOADED";
51
+ UNAVAILABLE: "UNAVAILABLE";
52
+ INTERNAL: "INTERNAL";
53
+ }>;
54
+ category: z.ZodEnum<{
55
+ validation: "validation";
56
+ authentication: "authentication";
57
+ authorization: "authorization";
58
+ capacity: "capacity";
59
+ availability: "availability";
60
+ internal: "internal";
61
+ }>;
62
+ retryable: z.ZodBoolean;
63
+ correlationId: z.ZodOptional<z.ZodString>;
64
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
65
+ }, z.core.$strip>>;
66
+ }, z.core.$strip>;
67
+ export declare const ChannelAssistantDeltaPayloadSchema: z.ZodObject<{
68
+ blockIndex: z.ZodNumber;
69
+ deltaSequence: z.ZodNumber;
70
+ text: z.ZodString;
71
+ phase: z.ZodOptional<z.ZodEnum<{
72
+ unknown: "unknown";
73
+ commentary: "commentary";
74
+ final_answer: "final_answer";
75
+ }>>;
76
+ }, z.core.$strip>;
77
+ export declare const ChannelAssistantMessagePayloadSchema: z.ZodObject<{
78
+ phase: z.ZodEnum<{
79
+ unknown: "unknown";
80
+ commentary: "commentary";
81
+ final_answer: "final_answer";
82
+ }>;
83
+ content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
84
+ type: z.ZodLiteral<"text">;
85
+ text: z.ZodString;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ type: z.ZodLiteral<"artifact">;
88
+ artifactId: z.ZodString;
89
+ name: z.ZodOptional<z.ZodString>;
90
+ mediaType: z.ZodOptional<z.ZodString>;
91
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
92
+ }, z.core.$strip>], "type">>;
93
+ }, z.core.$strip>;
94
+ export declare const ChannelTerminalOutputPayloadSchema: z.ZodObject<{
95
+ state: z.ZodEnum<{
96
+ completed: "completed";
97
+ failed: "failed";
98
+ interrupted: "interrupted";
99
+ }>;
100
+ assistantMessageId: z.ZodOptional<z.ZodString>;
101
+ content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
102
+ type: z.ZodLiteral<"text">;
103
+ text: z.ZodString;
104
+ }, z.core.$strip>, z.ZodObject<{
105
+ type: z.ZodLiteral<"artifact">;
106
+ artifactId: z.ZodString;
107
+ name: z.ZodOptional<z.ZodString>;
108
+ mediaType: z.ZodOptional<z.ZodString>;
109
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
110
+ }, z.core.$strip>], "type">>>;
111
+ error: z.ZodOptional<z.ZodObject<{
112
+ code: z.ZodEnum<{
113
+ INVALID_REQUEST: "INVALID_REQUEST";
114
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
115
+ UNAUTHENTICATED: "UNAUTHENTICATED";
116
+ PERMISSION_DENIED: "PERMISSION_DENIED";
117
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
118
+ NOT_FOUND: "NOT_FOUND";
119
+ RATE_LIMITED: "RATE_LIMITED";
120
+ OVERLOADED: "OVERLOADED";
121
+ UNAVAILABLE: "UNAVAILABLE";
122
+ INTERNAL: "INTERNAL";
123
+ }>;
124
+ category: z.ZodEnum<{
125
+ validation: "validation";
126
+ authentication: "authentication";
127
+ authorization: "authorization";
128
+ capacity: "capacity";
129
+ availability: "availability";
130
+ internal: "internal";
131
+ }>;
132
+ retryable: z.ZodBoolean;
133
+ correlationId: z.ZodOptional<z.ZodString>;
134
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
135
+ }, z.core.$strip>>;
136
+ }, z.core.$strip>;
137
+ export declare const ChannelToolPresentationParameterSchema: z.ZodObject<{
138
+ name: z.ZodString;
139
+ label: z.ZodOptional<z.ZodString>;
140
+ value: z.ZodOptional<z.ZodString>;
141
+ redacted: z.ZodOptional<z.ZodBoolean>;
142
+ }, z.core.$strip>;
143
+ export declare const ChannelToolPresentationSchema: z.ZodObject<{
144
+ title: z.ZodString;
145
+ summary: z.ZodOptional<z.ZodString>;
146
+ category: z.ZodOptional<z.ZodString>;
147
+ operation: z.ZodOptional<z.ZodEnum<{
148
+ read: "read";
149
+ mutate: "mutate";
150
+ execute: "execute";
151
+ ask: "ask";
152
+ }>>;
153
+ risk: z.ZodOptional<z.ZodEnum<{
154
+ low: "low";
155
+ medium: "medium";
156
+ high: "high";
157
+ destructive: "destructive";
158
+ }>>;
159
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
160
+ name: z.ZodString;
161
+ label: z.ZodOptional<z.ZodString>;
162
+ value: z.ZodOptional<z.ZodString>;
163
+ redacted: z.ZodOptional<z.ZodBoolean>;
164
+ }, z.core.$strip>>>;
165
+ }, z.core.$strip>;
166
+ export declare const ChannelToolSummaryPayloadSchema: z.ZodObject<{
167
+ toolCallId: z.ZodString;
168
+ toolName: z.ZodString;
169
+ phase: z.ZodEnum<{
170
+ running: "running";
171
+ completed: "completed";
172
+ failed: "failed";
173
+ requested: "requested";
174
+ denied: "denied";
175
+ }>;
176
+ presentation: z.ZodOptional<z.ZodObject<{
177
+ title: z.ZodString;
178
+ summary: z.ZodOptional<z.ZodString>;
179
+ category: z.ZodOptional<z.ZodString>;
180
+ operation: z.ZodOptional<z.ZodEnum<{
181
+ read: "read";
182
+ mutate: "mutate";
183
+ execute: "execute";
184
+ ask: "ask";
185
+ }>>;
186
+ risk: z.ZodOptional<z.ZodEnum<{
187
+ low: "low";
188
+ medium: "medium";
189
+ high: "high";
190
+ destructive: "destructive";
191
+ }>>;
192
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
193
+ name: z.ZodString;
194
+ label: z.ZodOptional<z.ZodString>;
195
+ value: z.ZodOptional<z.ZodString>;
196
+ redacted: z.ZodOptional<z.ZodBoolean>;
197
+ }, z.core.$strip>>>;
198
+ }, z.core.$strip>>;
199
+ durationMs: z.ZodOptional<z.ZodNumber>;
200
+ error: z.ZodOptional<z.ZodObject<{
201
+ code: z.ZodEnum<{
202
+ INVALID_REQUEST: "INVALID_REQUEST";
203
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
204
+ UNAUTHENTICATED: "UNAUTHENTICATED";
205
+ PERMISSION_DENIED: "PERMISSION_DENIED";
206
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
207
+ NOT_FOUND: "NOT_FOUND";
208
+ RATE_LIMITED: "RATE_LIMITED";
209
+ OVERLOADED: "OVERLOADED";
210
+ UNAVAILABLE: "UNAVAILABLE";
211
+ INTERNAL: "INTERNAL";
212
+ }>;
213
+ category: z.ZodEnum<{
214
+ validation: "validation";
215
+ authentication: "authentication";
216
+ authorization: "authorization";
217
+ capacity: "capacity";
218
+ availability: "availability";
219
+ internal: "internal";
220
+ }>;
221
+ retryable: z.ZodBoolean;
222
+ correlationId: z.ZodOptional<z.ZodString>;
223
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
224
+ }, z.core.$strip>>;
225
+ }, z.core.$strip>;
226
+ export declare const ChannelApprovalRequestedPayloadSchema: z.ZodObject<{
227
+ approvalId: z.ZodString;
228
+ action: z.ZodString;
229
+ risk: z.ZodOptional<z.ZodEnum<{
230
+ low: "low";
231
+ medium: "medium";
232
+ high: "high";
233
+ }>>;
234
+ expiresAt: z.ZodOptional<z.ZodString>;
235
+ }, z.core.$strip>;
236
+ export declare const ChannelApprovalResolvedPayloadSchema: z.ZodObject<{
237
+ approvalId: z.ZodString;
238
+ decision: z.ZodEnum<{
239
+ denied: "denied";
240
+ approved: "approved";
241
+ cancelled: "cancelled";
242
+ expired: "expired";
243
+ }>;
244
+ }, z.core.$strip>;
245
+ export declare const ChannelTurnStateChangedEventSchema: z.ZodObject<{
246
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
247
+ schemaVersion: z.ZodLiteral<1>;
248
+ eventId: z.ZodString;
249
+ occurredAt: z.ZodString;
250
+ sequence: z.ZodNumber;
251
+ correlation: z.ZodObject<{
252
+ correlationId: z.ZodString;
253
+ causationId: z.ZodOptional<z.ZodString>;
254
+ ingressRequestId: z.ZodString;
255
+ binding: z.ZodObject<{
256
+ channelInstanceId: z.ZodString;
257
+ agentId: z.ZodString;
258
+ chatId: z.ZodString;
259
+ messageId: z.ZodString;
260
+ sessionId: z.ZodString;
261
+ turnId: z.ZodString;
262
+ }, z.core.$strip>;
263
+ }, z.core.$strip>;
264
+ kind: z.ZodLiteral<"turn.state_changed">;
265
+ payload: z.ZodObject<{
266
+ state: z.ZodEnum<{
267
+ accepted: "accepted";
268
+ running: "running";
269
+ waiting_approval: "waiting_approval";
270
+ completed: "completed";
271
+ failed: "failed";
272
+ interrupted: "interrupted";
273
+ }>;
274
+ error: z.ZodOptional<z.ZodObject<{
275
+ code: z.ZodEnum<{
276
+ INVALID_REQUEST: "INVALID_REQUEST";
277
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
278
+ UNAUTHENTICATED: "UNAUTHENTICATED";
279
+ PERMISSION_DENIED: "PERMISSION_DENIED";
280
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
281
+ NOT_FOUND: "NOT_FOUND";
282
+ RATE_LIMITED: "RATE_LIMITED";
283
+ OVERLOADED: "OVERLOADED";
284
+ UNAVAILABLE: "UNAVAILABLE";
285
+ INTERNAL: "INTERNAL";
286
+ }>;
287
+ category: z.ZodEnum<{
288
+ validation: "validation";
289
+ authentication: "authentication";
290
+ authorization: "authorization";
291
+ capacity: "capacity";
292
+ availability: "availability";
293
+ internal: "internal";
294
+ }>;
295
+ retryable: z.ZodBoolean;
296
+ correlationId: z.ZodOptional<z.ZodString>;
297
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
298
+ }, z.core.$strip>>;
299
+ }, z.core.$strip>;
300
+ }, z.core.$strip>;
301
+ export declare const ChannelAssistantDeltaEventSchema: z.ZodObject<{
302
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
303
+ schemaVersion: z.ZodLiteral<1>;
304
+ eventId: z.ZodString;
305
+ occurredAt: z.ZodString;
306
+ sequence: z.ZodNumber;
307
+ correlation: z.ZodObject<{
308
+ correlationId: z.ZodString;
309
+ causationId: z.ZodOptional<z.ZodString>;
310
+ ingressRequestId: z.ZodString;
311
+ binding: z.ZodObject<{
312
+ channelInstanceId: z.ZodString;
313
+ agentId: z.ZodString;
314
+ chatId: z.ZodString;
315
+ messageId: z.ZodString;
316
+ sessionId: z.ZodString;
317
+ turnId: z.ZodString;
318
+ }, z.core.$strip>;
319
+ }, z.core.$strip>;
320
+ kind: z.ZodLiteral<"turn.assistant_delta">;
321
+ payload: z.ZodObject<{
322
+ blockIndex: z.ZodNumber;
323
+ deltaSequence: z.ZodNumber;
324
+ text: z.ZodString;
325
+ phase: z.ZodOptional<z.ZodEnum<{
326
+ unknown: "unknown";
327
+ commentary: "commentary";
328
+ final_answer: "final_answer";
329
+ }>>;
330
+ }, z.core.$strip>;
331
+ }, z.core.$strip>;
332
+ export declare const ChannelAssistantMessageEventSchema: z.ZodObject<{
333
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
334
+ schemaVersion: z.ZodLiteral<1>;
335
+ eventId: z.ZodString;
336
+ occurredAt: z.ZodString;
337
+ sequence: z.ZodNumber;
338
+ correlation: z.ZodObject<{
339
+ correlationId: z.ZodString;
340
+ causationId: z.ZodOptional<z.ZodString>;
341
+ ingressRequestId: z.ZodString;
342
+ binding: z.ZodObject<{
343
+ channelInstanceId: z.ZodString;
344
+ agentId: z.ZodString;
345
+ chatId: z.ZodString;
346
+ messageId: z.ZodString;
347
+ sessionId: z.ZodString;
348
+ turnId: z.ZodString;
349
+ }, z.core.$strip>;
350
+ }, z.core.$strip>;
351
+ kind: z.ZodLiteral<"turn.assistant_message">;
352
+ payload: z.ZodObject<{
353
+ phase: z.ZodEnum<{
354
+ unknown: "unknown";
355
+ commentary: "commentary";
356
+ final_answer: "final_answer";
357
+ }>;
358
+ content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
359
+ type: z.ZodLiteral<"text">;
360
+ text: z.ZodString;
361
+ }, z.core.$strip>, z.ZodObject<{
362
+ type: z.ZodLiteral<"artifact">;
363
+ artifactId: z.ZodString;
364
+ name: z.ZodOptional<z.ZodString>;
365
+ mediaType: z.ZodOptional<z.ZodString>;
366
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
367
+ }, z.core.$strip>], "type">>;
368
+ }, z.core.$strip>;
369
+ }, z.core.$strip>;
370
+ export declare const ChannelTerminalOutputEventSchema: z.ZodObject<{
371
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
372
+ schemaVersion: z.ZodLiteral<1>;
373
+ eventId: z.ZodString;
374
+ occurredAt: z.ZodString;
375
+ sequence: z.ZodNumber;
376
+ correlation: z.ZodObject<{
377
+ correlationId: z.ZodString;
378
+ causationId: z.ZodOptional<z.ZodString>;
379
+ ingressRequestId: z.ZodString;
380
+ binding: z.ZodObject<{
381
+ channelInstanceId: z.ZodString;
382
+ agentId: z.ZodString;
383
+ chatId: z.ZodString;
384
+ messageId: z.ZodString;
385
+ sessionId: z.ZodString;
386
+ turnId: z.ZodString;
387
+ }, z.core.$strip>;
388
+ }, z.core.$strip>;
389
+ kind: z.ZodLiteral<"turn.terminal_output">;
390
+ payload: z.ZodObject<{
391
+ state: z.ZodEnum<{
392
+ completed: "completed";
393
+ failed: "failed";
394
+ interrupted: "interrupted";
395
+ }>;
396
+ assistantMessageId: z.ZodOptional<z.ZodString>;
397
+ content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
398
+ type: z.ZodLiteral<"text">;
399
+ text: z.ZodString;
400
+ }, z.core.$strip>, z.ZodObject<{
401
+ type: z.ZodLiteral<"artifact">;
402
+ artifactId: z.ZodString;
403
+ name: z.ZodOptional<z.ZodString>;
404
+ mediaType: z.ZodOptional<z.ZodString>;
405
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
406
+ }, z.core.$strip>], "type">>>;
407
+ error: z.ZodOptional<z.ZodObject<{
408
+ code: z.ZodEnum<{
409
+ INVALID_REQUEST: "INVALID_REQUEST";
410
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
411
+ UNAUTHENTICATED: "UNAUTHENTICATED";
412
+ PERMISSION_DENIED: "PERMISSION_DENIED";
413
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
414
+ NOT_FOUND: "NOT_FOUND";
415
+ RATE_LIMITED: "RATE_LIMITED";
416
+ OVERLOADED: "OVERLOADED";
417
+ UNAVAILABLE: "UNAVAILABLE";
418
+ INTERNAL: "INTERNAL";
419
+ }>;
420
+ category: z.ZodEnum<{
421
+ validation: "validation";
422
+ authentication: "authentication";
423
+ authorization: "authorization";
424
+ capacity: "capacity";
425
+ availability: "availability";
426
+ internal: "internal";
427
+ }>;
428
+ retryable: z.ZodBoolean;
429
+ correlationId: z.ZodOptional<z.ZodString>;
430
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
431
+ }, z.core.$strip>>;
432
+ }, z.core.$strip>;
433
+ }, z.core.$strip>;
434
+ export declare const ChannelToolSummaryEventSchema: z.ZodObject<{
435
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
436
+ schemaVersion: z.ZodLiteral<1>;
437
+ eventId: z.ZodString;
438
+ occurredAt: z.ZodString;
439
+ sequence: z.ZodNumber;
440
+ correlation: z.ZodObject<{
441
+ correlationId: z.ZodString;
442
+ causationId: z.ZodOptional<z.ZodString>;
443
+ ingressRequestId: z.ZodString;
444
+ binding: z.ZodObject<{
445
+ channelInstanceId: z.ZodString;
446
+ agentId: z.ZodString;
447
+ chatId: z.ZodString;
448
+ messageId: z.ZodString;
449
+ sessionId: z.ZodString;
450
+ turnId: z.ZodString;
451
+ }, z.core.$strip>;
452
+ }, z.core.$strip>;
453
+ kind: z.ZodLiteral<"turn.tool_summary">;
454
+ payload: z.ZodObject<{
455
+ toolCallId: z.ZodString;
456
+ toolName: z.ZodString;
457
+ phase: z.ZodEnum<{
458
+ running: "running";
459
+ completed: "completed";
460
+ failed: "failed";
461
+ requested: "requested";
462
+ denied: "denied";
463
+ }>;
464
+ presentation: z.ZodOptional<z.ZodObject<{
465
+ title: z.ZodString;
466
+ summary: z.ZodOptional<z.ZodString>;
467
+ category: z.ZodOptional<z.ZodString>;
468
+ operation: z.ZodOptional<z.ZodEnum<{
469
+ read: "read";
470
+ mutate: "mutate";
471
+ execute: "execute";
472
+ ask: "ask";
473
+ }>>;
474
+ risk: z.ZodOptional<z.ZodEnum<{
475
+ low: "low";
476
+ medium: "medium";
477
+ high: "high";
478
+ destructive: "destructive";
479
+ }>>;
480
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
481
+ name: z.ZodString;
482
+ label: z.ZodOptional<z.ZodString>;
483
+ value: z.ZodOptional<z.ZodString>;
484
+ redacted: z.ZodOptional<z.ZodBoolean>;
485
+ }, z.core.$strip>>>;
486
+ }, z.core.$strip>>;
487
+ durationMs: z.ZodOptional<z.ZodNumber>;
488
+ error: z.ZodOptional<z.ZodObject<{
489
+ code: z.ZodEnum<{
490
+ INVALID_REQUEST: "INVALID_REQUEST";
491
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
492
+ UNAUTHENTICATED: "UNAUTHENTICATED";
493
+ PERMISSION_DENIED: "PERMISSION_DENIED";
494
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
495
+ NOT_FOUND: "NOT_FOUND";
496
+ RATE_LIMITED: "RATE_LIMITED";
497
+ OVERLOADED: "OVERLOADED";
498
+ UNAVAILABLE: "UNAVAILABLE";
499
+ INTERNAL: "INTERNAL";
500
+ }>;
501
+ category: z.ZodEnum<{
502
+ validation: "validation";
503
+ authentication: "authentication";
504
+ authorization: "authorization";
505
+ capacity: "capacity";
506
+ availability: "availability";
507
+ internal: "internal";
508
+ }>;
509
+ retryable: z.ZodBoolean;
510
+ correlationId: z.ZodOptional<z.ZodString>;
511
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
512
+ }, z.core.$strip>>;
513
+ }, z.core.$strip>;
514
+ }, z.core.$strip>;
515
+ export declare const ChannelApprovalRequestedEventSchema: z.ZodObject<{
516
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
517
+ schemaVersion: z.ZodLiteral<1>;
518
+ eventId: z.ZodString;
519
+ occurredAt: z.ZodString;
520
+ sequence: z.ZodNumber;
521
+ correlation: z.ZodObject<{
522
+ correlationId: z.ZodString;
523
+ causationId: z.ZodOptional<z.ZodString>;
524
+ ingressRequestId: z.ZodString;
525
+ binding: z.ZodObject<{
526
+ channelInstanceId: z.ZodString;
527
+ agentId: z.ZodString;
528
+ chatId: z.ZodString;
529
+ messageId: z.ZodString;
530
+ sessionId: z.ZodString;
531
+ turnId: z.ZodString;
532
+ }, z.core.$strip>;
533
+ }, z.core.$strip>;
534
+ kind: z.ZodLiteral<"turn.approval_requested">;
535
+ payload: z.ZodObject<{
536
+ approvalId: z.ZodString;
537
+ action: z.ZodString;
538
+ risk: z.ZodOptional<z.ZodEnum<{
539
+ low: "low";
540
+ medium: "medium";
541
+ high: "high";
542
+ }>>;
543
+ expiresAt: z.ZodOptional<z.ZodString>;
544
+ }, z.core.$strip>;
545
+ }, z.core.$strip>;
546
+ export declare const ChannelApprovalResolvedEventSchema: z.ZodObject<{
547
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
548
+ schemaVersion: z.ZodLiteral<1>;
549
+ eventId: z.ZodString;
550
+ occurredAt: z.ZodString;
551
+ sequence: z.ZodNumber;
552
+ correlation: z.ZodObject<{
553
+ correlationId: z.ZodString;
554
+ causationId: z.ZodOptional<z.ZodString>;
555
+ ingressRequestId: z.ZodString;
556
+ binding: z.ZodObject<{
557
+ channelInstanceId: z.ZodString;
558
+ agentId: z.ZodString;
559
+ chatId: z.ZodString;
560
+ messageId: z.ZodString;
561
+ sessionId: z.ZodString;
562
+ turnId: z.ZodString;
563
+ }, z.core.$strip>;
564
+ }, z.core.$strip>;
565
+ kind: z.ZodLiteral<"turn.approval_resolved">;
566
+ payload: z.ZodObject<{
567
+ approvalId: z.ZodString;
568
+ decision: z.ZodEnum<{
569
+ denied: "denied";
570
+ approved: "approved";
571
+ cancelled: "cancelled";
572
+ expired: "expired";
573
+ }>;
574
+ }, z.core.$strip>;
575
+ }, z.core.$strip>;
576
+ export declare const KnownChannelRuntimeEventSchema: z.ZodUnion<readonly [z.ZodObject<{
577
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
578
+ schemaVersion: z.ZodLiteral<1>;
579
+ eventId: z.ZodString;
580
+ occurredAt: z.ZodString;
581
+ sequence: z.ZodNumber;
582
+ correlation: z.ZodObject<{
583
+ correlationId: z.ZodString;
584
+ causationId: z.ZodOptional<z.ZodString>;
585
+ ingressRequestId: z.ZodString;
586
+ binding: z.ZodObject<{
587
+ channelInstanceId: z.ZodString;
588
+ agentId: z.ZodString;
589
+ chatId: z.ZodString;
590
+ messageId: z.ZodString;
591
+ sessionId: z.ZodString;
592
+ turnId: z.ZodString;
593
+ }, z.core.$strip>;
594
+ }, z.core.$strip>;
595
+ kind: z.ZodLiteral<"turn.state_changed">;
596
+ payload: z.ZodObject<{
597
+ state: z.ZodEnum<{
598
+ accepted: "accepted";
599
+ running: "running";
600
+ waiting_approval: "waiting_approval";
601
+ completed: "completed";
602
+ failed: "failed";
603
+ interrupted: "interrupted";
604
+ }>;
605
+ error: z.ZodOptional<z.ZodObject<{
606
+ code: z.ZodEnum<{
607
+ INVALID_REQUEST: "INVALID_REQUEST";
608
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
609
+ UNAUTHENTICATED: "UNAUTHENTICATED";
610
+ PERMISSION_DENIED: "PERMISSION_DENIED";
611
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
612
+ NOT_FOUND: "NOT_FOUND";
613
+ RATE_LIMITED: "RATE_LIMITED";
614
+ OVERLOADED: "OVERLOADED";
615
+ UNAVAILABLE: "UNAVAILABLE";
616
+ INTERNAL: "INTERNAL";
617
+ }>;
618
+ category: z.ZodEnum<{
619
+ validation: "validation";
620
+ authentication: "authentication";
621
+ authorization: "authorization";
622
+ capacity: "capacity";
623
+ availability: "availability";
624
+ internal: "internal";
625
+ }>;
626
+ retryable: z.ZodBoolean;
627
+ correlationId: z.ZodOptional<z.ZodString>;
628
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
629
+ }, z.core.$strip>>;
630
+ }, z.core.$strip>;
631
+ }, z.core.$strip>, z.ZodObject<{
632
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
633
+ schemaVersion: z.ZodLiteral<1>;
634
+ eventId: z.ZodString;
635
+ occurredAt: z.ZodString;
636
+ sequence: z.ZodNumber;
637
+ correlation: z.ZodObject<{
638
+ correlationId: z.ZodString;
639
+ causationId: z.ZodOptional<z.ZodString>;
640
+ ingressRequestId: z.ZodString;
641
+ binding: z.ZodObject<{
642
+ channelInstanceId: z.ZodString;
643
+ agentId: z.ZodString;
644
+ chatId: z.ZodString;
645
+ messageId: z.ZodString;
646
+ sessionId: z.ZodString;
647
+ turnId: z.ZodString;
648
+ }, z.core.$strip>;
649
+ }, z.core.$strip>;
650
+ kind: z.ZodLiteral<"turn.assistant_delta">;
651
+ payload: z.ZodObject<{
652
+ blockIndex: z.ZodNumber;
653
+ deltaSequence: z.ZodNumber;
654
+ text: z.ZodString;
655
+ phase: z.ZodOptional<z.ZodEnum<{
656
+ unknown: "unknown";
657
+ commentary: "commentary";
658
+ final_answer: "final_answer";
659
+ }>>;
660
+ }, z.core.$strip>;
661
+ }, z.core.$strip>, z.ZodObject<{
662
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
663
+ schemaVersion: z.ZodLiteral<1>;
664
+ eventId: z.ZodString;
665
+ occurredAt: z.ZodString;
666
+ sequence: z.ZodNumber;
667
+ correlation: z.ZodObject<{
668
+ correlationId: z.ZodString;
669
+ causationId: z.ZodOptional<z.ZodString>;
670
+ ingressRequestId: z.ZodString;
671
+ binding: z.ZodObject<{
672
+ channelInstanceId: z.ZodString;
673
+ agentId: z.ZodString;
674
+ chatId: z.ZodString;
675
+ messageId: z.ZodString;
676
+ sessionId: z.ZodString;
677
+ turnId: z.ZodString;
678
+ }, z.core.$strip>;
679
+ }, z.core.$strip>;
680
+ kind: z.ZodLiteral<"turn.assistant_message">;
681
+ payload: z.ZodObject<{
682
+ phase: z.ZodEnum<{
683
+ unknown: "unknown";
684
+ commentary: "commentary";
685
+ final_answer: "final_answer";
686
+ }>;
687
+ content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
688
+ type: z.ZodLiteral<"text">;
689
+ text: z.ZodString;
690
+ }, z.core.$strip>, z.ZodObject<{
691
+ type: z.ZodLiteral<"artifact">;
692
+ artifactId: z.ZodString;
693
+ name: z.ZodOptional<z.ZodString>;
694
+ mediaType: z.ZodOptional<z.ZodString>;
695
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
696
+ }, z.core.$strip>], "type">>;
697
+ }, z.core.$strip>;
698
+ }, z.core.$strip>, z.ZodObject<{
699
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
700
+ schemaVersion: z.ZodLiteral<1>;
701
+ eventId: z.ZodString;
702
+ occurredAt: z.ZodString;
703
+ sequence: z.ZodNumber;
704
+ correlation: z.ZodObject<{
705
+ correlationId: z.ZodString;
706
+ causationId: z.ZodOptional<z.ZodString>;
707
+ ingressRequestId: z.ZodString;
708
+ binding: z.ZodObject<{
709
+ channelInstanceId: z.ZodString;
710
+ agentId: z.ZodString;
711
+ chatId: z.ZodString;
712
+ messageId: z.ZodString;
713
+ sessionId: z.ZodString;
714
+ turnId: z.ZodString;
715
+ }, z.core.$strip>;
716
+ }, z.core.$strip>;
717
+ kind: z.ZodLiteral<"turn.terminal_output">;
718
+ payload: z.ZodObject<{
719
+ state: z.ZodEnum<{
720
+ completed: "completed";
721
+ failed: "failed";
722
+ interrupted: "interrupted";
723
+ }>;
724
+ assistantMessageId: z.ZodOptional<z.ZodString>;
725
+ content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
726
+ type: z.ZodLiteral<"text">;
727
+ text: z.ZodString;
728
+ }, z.core.$strip>, z.ZodObject<{
729
+ type: z.ZodLiteral<"artifact">;
730
+ artifactId: z.ZodString;
731
+ name: z.ZodOptional<z.ZodString>;
732
+ mediaType: z.ZodOptional<z.ZodString>;
733
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
734
+ }, z.core.$strip>], "type">>>;
735
+ error: z.ZodOptional<z.ZodObject<{
736
+ code: z.ZodEnum<{
737
+ INVALID_REQUEST: "INVALID_REQUEST";
738
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
739
+ UNAUTHENTICATED: "UNAUTHENTICATED";
740
+ PERMISSION_DENIED: "PERMISSION_DENIED";
741
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
742
+ NOT_FOUND: "NOT_FOUND";
743
+ RATE_LIMITED: "RATE_LIMITED";
744
+ OVERLOADED: "OVERLOADED";
745
+ UNAVAILABLE: "UNAVAILABLE";
746
+ INTERNAL: "INTERNAL";
747
+ }>;
748
+ category: z.ZodEnum<{
749
+ validation: "validation";
750
+ authentication: "authentication";
751
+ authorization: "authorization";
752
+ capacity: "capacity";
753
+ availability: "availability";
754
+ internal: "internal";
755
+ }>;
756
+ retryable: z.ZodBoolean;
757
+ correlationId: z.ZodOptional<z.ZodString>;
758
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
759
+ }, z.core.$strip>>;
760
+ }, z.core.$strip>;
761
+ }, z.core.$strip>, z.ZodObject<{
762
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
763
+ schemaVersion: z.ZodLiteral<1>;
764
+ eventId: z.ZodString;
765
+ occurredAt: z.ZodString;
766
+ sequence: z.ZodNumber;
767
+ correlation: z.ZodObject<{
768
+ correlationId: z.ZodString;
769
+ causationId: z.ZodOptional<z.ZodString>;
770
+ ingressRequestId: z.ZodString;
771
+ binding: z.ZodObject<{
772
+ channelInstanceId: z.ZodString;
773
+ agentId: z.ZodString;
774
+ chatId: z.ZodString;
775
+ messageId: z.ZodString;
776
+ sessionId: z.ZodString;
777
+ turnId: z.ZodString;
778
+ }, z.core.$strip>;
779
+ }, z.core.$strip>;
780
+ kind: z.ZodLiteral<"turn.tool_summary">;
781
+ payload: z.ZodObject<{
782
+ toolCallId: z.ZodString;
783
+ toolName: z.ZodString;
784
+ phase: z.ZodEnum<{
785
+ running: "running";
786
+ completed: "completed";
787
+ failed: "failed";
788
+ requested: "requested";
789
+ denied: "denied";
790
+ }>;
791
+ presentation: z.ZodOptional<z.ZodObject<{
792
+ title: z.ZodString;
793
+ summary: z.ZodOptional<z.ZodString>;
794
+ category: z.ZodOptional<z.ZodString>;
795
+ operation: z.ZodOptional<z.ZodEnum<{
796
+ read: "read";
797
+ mutate: "mutate";
798
+ execute: "execute";
799
+ ask: "ask";
800
+ }>>;
801
+ risk: z.ZodOptional<z.ZodEnum<{
802
+ low: "low";
803
+ medium: "medium";
804
+ high: "high";
805
+ destructive: "destructive";
806
+ }>>;
807
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
808
+ name: z.ZodString;
809
+ label: z.ZodOptional<z.ZodString>;
810
+ value: z.ZodOptional<z.ZodString>;
811
+ redacted: z.ZodOptional<z.ZodBoolean>;
812
+ }, z.core.$strip>>>;
813
+ }, z.core.$strip>>;
814
+ durationMs: z.ZodOptional<z.ZodNumber>;
815
+ error: z.ZodOptional<z.ZodObject<{
816
+ code: z.ZodEnum<{
817
+ INVALID_REQUEST: "INVALID_REQUEST";
818
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
819
+ UNAUTHENTICATED: "UNAUTHENTICATED";
820
+ PERMISSION_DENIED: "PERMISSION_DENIED";
821
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
822
+ NOT_FOUND: "NOT_FOUND";
823
+ RATE_LIMITED: "RATE_LIMITED";
824
+ OVERLOADED: "OVERLOADED";
825
+ UNAVAILABLE: "UNAVAILABLE";
826
+ INTERNAL: "INTERNAL";
827
+ }>;
828
+ category: z.ZodEnum<{
829
+ validation: "validation";
830
+ authentication: "authentication";
831
+ authorization: "authorization";
832
+ capacity: "capacity";
833
+ availability: "availability";
834
+ internal: "internal";
835
+ }>;
836
+ retryable: z.ZodBoolean;
837
+ correlationId: z.ZodOptional<z.ZodString>;
838
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
839
+ }, z.core.$strip>>;
840
+ }, z.core.$strip>;
841
+ }, z.core.$strip>, z.ZodObject<{
842
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
843
+ schemaVersion: z.ZodLiteral<1>;
844
+ eventId: z.ZodString;
845
+ occurredAt: z.ZodString;
846
+ sequence: z.ZodNumber;
847
+ correlation: z.ZodObject<{
848
+ correlationId: z.ZodString;
849
+ causationId: z.ZodOptional<z.ZodString>;
850
+ ingressRequestId: z.ZodString;
851
+ binding: z.ZodObject<{
852
+ channelInstanceId: z.ZodString;
853
+ agentId: z.ZodString;
854
+ chatId: z.ZodString;
855
+ messageId: z.ZodString;
856
+ sessionId: z.ZodString;
857
+ turnId: z.ZodString;
858
+ }, z.core.$strip>;
859
+ }, z.core.$strip>;
860
+ kind: z.ZodLiteral<"turn.approval_requested">;
861
+ payload: z.ZodObject<{
862
+ approvalId: z.ZodString;
863
+ action: z.ZodString;
864
+ risk: z.ZodOptional<z.ZodEnum<{
865
+ low: "low";
866
+ medium: "medium";
867
+ high: "high";
868
+ }>>;
869
+ expiresAt: z.ZodOptional<z.ZodString>;
870
+ }, z.core.$strip>;
871
+ }, z.core.$strip>, z.ZodObject<{
872
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
873
+ schemaVersion: z.ZodLiteral<1>;
874
+ eventId: z.ZodString;
875
+ occurredAt: z.ZodString;
876
+ sequence: z.ZodNumber;
877
+ correlation: z.ZodObject<{
878
+ correlationId: z.ZodString;
879
+ causationId: z.ZodOptional<z.ZodString>;
880
+ ingressRequestId: z.ZodString;
881
+ binding: z.ZodObject<{
882
+ channelInstanceId: z.ZodString;
883
+ agentId: z.ZodString;
884
+ chatId: z.ZodString;
885
+ messageId: z.ZodString;
886
+ sessionId: z.ZodString;
887
+ turnId: z.ZodString;
888
+ }, z.core.$strip>;
889
+ }, z.core.$strip>;
890
+ kind: z.ZodLiteral<"turn.approval_resolved">;
891
+ payload: z.ZodObject<{
892
+ approvalId: z.ZodString;
893
+ decision: z.ZodEnum<{
894
+ denied: "denied";
895
+ approved: "approved";
896
+ cancelled: "cancelled";
897
+ expired: "expired";
898
+ }>;
899
+ }, z.core.$strip>;
900
+ }, z.core.$strip>]>;
901
+ export declare const ChannelInterruptRequestSchema: z.ZodObject<{
902
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
903
+ schemaVersion: z.ZodLiteral<1>;
904
+ requestId: z.ZodString;
905
+ idempotencyKey: z.ZodString;
906
+ binding: z.ZodObject<{
907
+ channelInstanceId: z.ZodString;
908
+ agentId: z.ZodString;
909
+ chatId: z.ZodString;
910
+ messageId: z.ZodString;
911
+ sessionId: z.ZodString;
912
+ turnId: z.ZodString;
913
+ }, z.core.$strip>;
914
+ requestedAt: z.ZodString;
915
+ }, z.core.$strip>;
916
+ export declare const ChannelInterruptResultSchema: z.ZodObject<{
917
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
918
+ schemaVersion: z.ZodLiteral<1>;
919
+ requestId: z.ZodString;
920
+ disposition: z.ZodEnum<{
921
+ duplicate: "duplicate";
922
+ rejected: "rejected";
923
+ requested: "requested";
924
+ }>;
925
+ error: z.ZodOptional<z.ZodObject<{
926
+ code: z.ZodEnum<{
927
+ INVALID_REQUEST: "INVALID_REQUEST";
928
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
929
+ UNAUTHENTICATED: "UNAUTHENTICATED";
930
+ PERMISSION_DENIED: "PERMISSION_DENIED";
931
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
932
+ NOT_FOUND: "NOT_FOUND";
933
+ RATE_LIMITED: "RATE_LIMITED";
934
+ OVERLOADED: "OVERLOADED";
935
+ UNAVAILABLE: "UNAVAILABLE";
936
+ INTERNAL: "INTERNAL";
937
+ }>;
938
+ category: z.ZodEnum<{
939
+ validation: "validation";
940
+ authentication: "authentication";
941
+ authorization: "authorization";
942
+ capacity: "capacity";
943
+ availability: "availability";
944
+ internal: "internal";
945
+ }>;
946
+ retryable: z.ZodBoolean;
947
+ correlationId: z.ZodOptional<z.ZodString>;
948
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
949
+ }, z.core.$strip>>;
950
+ acceptedAt: z.ZodString;
951
+ }, z.core.$strip>;
952
+ export declare const ChannelRuntimeReadbackRequestSchema: z.ZodObject<{
953
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
954
+ schemaVersion: z.ZodLiteral<1>;
955
+ requestId: z.ZodString;
956
+ binding: z.ZodObject<{
957
+ channelInstanceId: z.ZodString;
958
+ agentId: z.ZodString;
959
+ chatId: z.ZodString;
960
+ messageId: z.ZodString;
961
+ sessionId: z.ZodString;
962
+ turnId: z.ZodString;
963
+ }, z.core.$strip>;
964
+ }, z.core.$strip>;
965
+ export declare const ChannelRuntimeReadbackResultSchema: z.ZodObject<{
966
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
967
+ schemaVersion: z.ZodLiteral<1>;
968
+ requestId: z.ZodString;
969
+ binding: z.ZodObject<{
970
+ channelInstanceId: z.ZodString;
971
+ agentId: z.ZodString;
972
+ chatId: z.ZodString;
973
+ messageId: z.ZodString;
974
+ sessionId: z.ZodString;
975
+ turnId: z.ZodString;
976
+ }, z.core.$strip>;
977
+ state: z.ZodEnum<{
978
+ accepted: "accepted";
979
+ running: "running";
980
+ waiting_approval: "waiting_approval";
981
+ completed: "completed";
982
+ failed: "failed";
983
+ interrupted: "interrupted";
984
+ }>;
985
+ lastSequence: z.ZodNumber;
986
+ assistantMessageId: z.ZodOptional<z.ZodString>;
987
+ runtimeGenerationId: z.ZodOptional<z.ZodString>;
988
+ lastEventRuntimeGenerationId: z.ZodOptional<z.ZodString>;
989
+ terminalEvent: z.ZodOptional<z.ZodObject<{
990
+ protocol: z.ZodLiteral<"ravi.channel.runtime-events">;
991
+ schemaVersion: z.ZodLiteral<1>;
992
+ eventId: z.ZodString;
993
+ occurredAt: z.ZodString;
994
+ sequence: z.ZodNumber;
995
+ correlation: z.ZodObject<{
996
+ correlationId: z.ZodString;
997
+ causationId: z.ZodOptional<z.ZodString>;
998
+ ingressRequestId: z.ZodString;
999
+ binding: z.ZodObject<{
1000
+ channelInstanceId: z.ZodString;
1001
+ agentId: z.ZodString;
1002
+ chatId: z.ZodString;
1003
+ messageId: z.ZodString;
1004
+ sessionId: z.ZodString;
1005
+ turnId: z.ZodString;
1006
+ }, z.core.$strip>;
1007
+ }, z.core.$strip>;
1008
+ kind: z.ZodLiteral<"turn.terminal_output">;
1009
+ payload: z.ZodObject<{
1010
+ state: z.ZodEnum<{
1011
+ completed: "completed";
1012
+ failed: "failed";
1013
+ interrupted: "interrupted";
1014
+ }>;
1015
+ assistantMessageId: z.ZodOptional<z.ZodString>;
1016
+ content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1017
+ type: z.ZodLiteral<"text">;
1018
+ text: z.ZodString;
1019
+ }, z.core.$strip>, z.ZodObject<{
1020
+ type: z.ZodLiteral<"artifact">;
1021
+ artifactId: z.ZodString;
1022
+ name: z.ZodOptional<z.ZodString>;
1023
+ mediaType: z.ZodOptional<z.ZodString>;
1024
+ sizeBytes: z.ZodOptional<z.ZodNumber>;
1025
+ }, z.core.$strip>], "type">>>;
1026
+ error: z.ZodOptional<z.ZodObject<{
1027
+ code: z.ZodEnum<{
1028
+ INVALID_REQUEST: "INVALID_REQUEST";
1029
+ IDEMPOTENCY_CONFLICT: "IDEMPOTENCY_CONFLICT";
1030
+ UNAUTHENTICATED: "UNAUTHENTICATED";
1031
+ PERMISSION_DENIED: "PERMISSION_DENIED";
1032
+ LOCAL_PERMISSION_DENIED: "LOCAL_PERMISSION_DENIED";
1033
+ NOT_FOUND: "NOT_FOUND";
1034
+ RATE_LIMITED: "RATE_LIMITED";
1035
+ OVERLOADED: "OVERLOADED";
1036
+ UNAVAILABLE: "UNAVAILABLE";
1037
+ INTERNAL: "INTERNAL";
1038
+ }>;
1039
+ category: z.ZodEnum<{
1040
+ validation: "validation";
1041
+ authentication: "authentication";
1042
+ authorization: "authorization";
1043
+ capacity: "capacity";
1044
+ availability: "availability";
1045
+ internal: "internal";
1046
+ }>;
1047
+ retryable: z.ZodBoolean;
1048
+ correlationId: z.ZodOptional<z.ZodString>;
1049
+ retryAfterMs: z.ZodOptional<z.ZodNumber>;
1050
+ }, z.core.$strip>>;
1051
+ }, z.core.$strip>;
1052
+ }, z.core.$strip>>;
1053
+ observedAt: z.ZodString;
1054
+ }, z.core.$strip>;
1055
+ export type ChannelRuntimeCorrelation = z.infer<typeof ChannelRuntimeCorrelationSchema>;
1056
+ export type ChannelTurnState = z.infer<typeof ChannelTurnStateSchema>;
1057
+ export type ChannelToolPresentationParameter = z.infer<typeof ChannelToolPresentationParameterSchema>;
1058
+ export type ChannelToolPresentation = z.infer<typeof ChannelToolPresentationSchema>;
1059
+ export type KnownChannelRuntimeEvent = z.infer<typeof KnownChannelRuntimeEventSchema>;
1060
+ export type ChannelInterruptRequest = z.infer<typeof ChannelInterruptRequestSchema>;
1061
+ export type ChannelInterruptResult = z.infer<typeof ChannelInterruptResultSchema>;
1062
+ export type ChannelRuntimeReadbackRequest = z.infer<typeof ChannelRuntimeReadbackRequestSchema>;
1063
+ export type ChannelRuntimeReadbackResult = z.infer<typeof ChannelRuntimeReadbackResultSchema>;
1064
+ export interface ChannelRuntimeCommandClient {
1065
+ readonly channels: {
1066
+ readonly backend: {
1067
+ readonly runtime: {
1068
+ interrupt(agentId: string, request: ChannelInterruptRequest): Promise<unknown>;
1069
+ readback(agentId: string, request: ChannelRuntimeReadbackRequest): Promise<unknown>;
1070
+ };
1071
+ };
1072
+ };
1073
+ }
1074
+ export declare class RaviChannelRuntimeClient {
1075
+ private readonly client;
1076
+ constructor(client: ChannelRuntimeCommandClient);
1077
+ interrupt(input: ChannelInterruptRequest): Promise<ChannelInterruptResult>;
1078
+ readback(input: ChannelRuntimeReadbackRequest): Promise<ChannelRuntimeReadbackResult>;
1079
+ }
1080
+ export declare function createChannelRuntimeClient(client: ChannelRuntimeCommandClient): RaviChannelRuntimeClient;
1081
+ export interface ChannelRuntimeEventSink {
1082
+ emit(event: KnownChannelRuntimeEvent, target?: ExternalChannelTarget): Promise<void>;
1083
+ }
1084
+ //# sourceMappingURL=channel-runtime-events.d.ts.map