@roll-agent/relay-client 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1088 @@
1
+ import { type RelayInteractionRequestV11 } from "@roll-agent/relay-protocol";
2
+ import { z } from "zod/v4";
3
+ export declare const RELAY_CONNECTION_STATUSES: {
4
+ readonly idle: "idle";
5
+ readonly connecting: "connecting";
6
+ readonly connected: "connected";
7
+ readonly reconnecting: "reconnecting";
8
+ readonly closed: "closed";
9
+ };
10
+ export declare const relayConnectionStateSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
11
+ status: z.ZodLiteral<"idle">;
12
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
13
+ status: z.ZodLiteral<"connecting">;
14
+ attempt: z.ZodNumber;
15
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
16
+ status: z.ZodLiteral<"connected">;
17
+ workspaceStatus: z.ZodEnum<{
18
+ online: "online";
19
+ offline: "offline";
20
+ }>;
21
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
22
+ status: z.ZodLiteral<"reconnecting">;
23
+ attempt: z.ZodNumber;
24
+ retryAt: z.ZodString;
25
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
26
+ status: z.ZodLiteral<"closed">;
27
+ reason: z.ZodEnum<{
28
+ client: "client";
29
+ session: "session";
30
+ transport: "transport";
31
+ protocol: "protocol";
32
+ }>;
33
+ }, z.core.$strict>>]>;
34
+ export declare const RELAY_CLIENT_TRANSPORT_ERROR_CODES: {
35
+ readonly aborted: "ABORTED";
36
+ readonly closed: "CLIENT_CLOSED";
37
+ readonly connectionUnavailable: "CONNECTION_UNAVAILABLE";
38
+ readonly invalidSession: "INVALID_SESSION";
39
+ readonly outcomeUnknown: "OUTCOME_UNKNOWN";
40
+ readonly protocolError: "PROTOCOL_ERROR";
41
+ readonly requestTimeout: "REQUEST_TIMEOUT";
42
+ readonly transportError: "TRANSPORT_ERROR";
43
+ readonly workspaceOffline: "WORKSPACE_OFFLINE";
44
+ };
45
+ export declare const relayClientTransportErrorCodeSchema: z.ZodEnum<{
46
+ readonly aborted: "ABORTED";
47
+ readonly closed: "CLIENT_CLOSED";
48
+ readonly connectionUnavailable: "CONNECTION_UNAVAILABLE";
49
+ readonly invalidSession: "INVALID_SESSION";
50
+ readonly outcomeUnknown: "OUTCOME_UNKNOWN";
51
+ readonly protocolError: "PROTOCOL_ERROR";
52
+ readonly requestTimeout: "REQUEST_TIMEOUT";
53
+ readonly transportError: "TRANSPORT_ERROR";
54
+ readonly workspaceOffline: "WORKSPACE_OFFLINE";
55
+ }>;
56
+ export declare const relayClientErrorDetailsSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
57
+ code: z.ZodEnum<{
58
+ readonly aborted: "ABORTED";
59
+ readonly closed: "CLIENT_CLOSED";
60
+ readonly connectionUnavailable: "CONNECTION_UNAVAILABLE";
61
+ readonly invalidSession: "INVALID_SESSION";
62
+ readonly outcomeUnknown: "OUTCOME_UNKNOWN";
63
+ readonly protocolError: "PROTOCOL_ERROR";
64
+ readonly requestTimeout: "REQUEST_TIMEOUT";
65
+ readonly transportError: "TRANSPORT_ERROR";
66
+ readonly workspaceOffline: "WORKSPACE_OFFLINE";
67
+ }>;
68
+ message: z.ZodString;
69
+ retryable: z.ZodBoolean;
70
+ kind: z.ZodLiteral<"transport">;
71
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
72
+ code: z.ZodEnum<{
73
+ RELAY_PROTOCOL_VERSION_UNSUPPORTED: "RELAY_PROTOCOL_VERSION_UNSUPPORTED";
74
+ WORKSPACE_NOT_FOUND: "WORKSPACE_NOT_FOUND";
75
+ WORKSPACE_OFFLINE: "WORKSPACE_OFFLINE";
76
+ CONTROLLER_CONFLICT: "CONTROLLER_CONFLICT";
77
+ RATE_LIMITED: "RATE_LIMITED";
78
+ RELAY_INTERNAL_ERROR: "RELAY_INTERNAL_ERROR";
79
+ }>;
80
+ message: z.ZodString;
81
+ retryable: z.ZodBoolean;
82
+ kind: z.ZodLiteral<"session">;
83
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
84
+ code: z.ZodString;
85
+ message: z.ZodString;
86
+ retryable: z.ZodBoolean;
87
+ kind: z.ZodLiteral<"remote">;
88
+ }, z.core.$strict>>]>;
89
+ export declare const relayLiveAssistantMessageSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
90
+ status: z.ZodLiteral<"streaming">;
91
+ streamId: z.ZodString;
92
+ text: z.ZodString;
93
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
94
+ status: z.ZodLiteral<"completed">;
95
+ streamId: z.ZodString;
96
+ text: z.ZodString;
97
+ }, z.core.$strict>>]>;
98
+ export declare const relayInteractionStateSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
99
+ status: z.ZodLiteral<"pending">;
100
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
101
+ method: z.ZodLiteral<"approval.request">;
102
+ projection: z.ZodReadonly<z.ZodObject<{
103
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
104
+ agentName: z.ZodString;
105
+ toolName: z.ZodString;
106
+ explanation: z.ZodOptional<z.ZodString>;
107
+ }, z.core.$strict>>;
108
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
109
+ relaySequence: z.ZodNumber;
110
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
111
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
112
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
113
+ expiresAt: z.ZodString;
114
+ sensitivity: z.ZodLiteral<"normal">;
115
+ type: z.ZodLiteral<"interaction.request">;
116
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
117
+ method: z.ZodLiteral<"userInput.request">;
118
+ projection: z.ZodReadonly<z.ZodObject<{
119
+ title: z.ZodOptional<z.ZodString>;
120
+ description: z.ZodOptional<z.ZodString>;
121
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
122
+ minLength: z.ZodOptional<z.ZodNumber>;
123
+ maxLength: z.ZodOptional<z.ZodNumber>;
124
+ id: z.ZodString;
125
+ label: z.ZodString;
126
+ description: z.ZodOptional<z.ZodString>;
127
+ required: z.ZodBoolean;
128
+ type: z.ZodLiteral<"text">;
129
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
130
+ minLength: z.ZodOptional<z.ZodNumber>;
131
+ maxLength: z.ZodOptional<z.ZodNumber>;
132
+ id: z.ZodString;
133
+ label: z.ZodString;
134
+ description: z.ZodOptional<z.ZodString>;
135
+ required: z.ZodBoolean;
136
+ type: z.ZodLiteral<"multiline">;
137
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
138
+ min: z.ZodOptional<z.ZodNumber>;
139
+ max: z.ZodOptional<z.ZodNumber>;
140
+ integer: z.ZodOptional<z.ZodBoolean>;
141
+ id: z.ZodString;
142
+ label: z.ZodString;
143
+ description: z.ZodOptional<z.ZodString>;
144
+ required: z.ZodBoolean;
145
+ type: z.ZodLiteral<"number">;
146
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
147
+ id: z.ZodString;
148
+ label: z.ZodString;
149
+ description: z.ZodOptional<z.ZodString>;
150
+ required: z.ZodBoolean;
151
+ type: z.ZodLiteral<"boolean">;
152
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
153
+ multiple: z.ZodBoolean;
154
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
155
+ id: z.ZodString;
156
+ label: z.ZodString;
157
+ description: z.ZodOptional<z.ZodString>;
158
+ }, z.core.$strict>>>;
159
+ minSelections: z.ZodOptional<z.ZodNumber>;
160
+ maxSelections: z.ZodOptional<z.ZodNumber>;
161
+ id: z.ZodString;
162
+ label: z.ZodString;
163
+ description: z.ZodOptional<z.ZodString>;
164
+ required: z.ZodBoolean;
165
+ type: z.ZodLiteral<"choice">;
166
+ }, z.core.$strict>>]>>;
167
+ }, z.core.$strict>>;
168
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
169
+ relaySequence: z.ZodNumber;
170
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
171
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
172
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
173
+ expiresAt: z.ZodString;
174
+ sensitivity: z.ZodLiteral<"normal">;
175
+ type: z.ZodLiteral<"interaction.request">;
176
+ }, z.core.$strict>>]>;
177
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
178
+ status: z.ZodLiteral<"responding">;
179
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
180
+ method: z.ZodLiteral<"approval.request">;
181
+ projection: z.ZodReadonly<z.ZodObject<{
182
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
183
+ agentName: z.ZodString;
184
+ toolName: z.ZodString;
185
+ explanation: z.ZodOptional<z.ZodString>;
186
+ }, z.core.$strict>>;
187
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
188
+ relaySequence: z.ZodNumber;
189
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
190
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
191
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
192
+ expiresAt: z.ZodString;
193
+ sensitivity: z.ZodLiteral<"normal">;
194
+ type: z.ZodLiteral<"interaction.request">;
195
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
196
+ method: z.ZodLiteral<"userInput.request">;
197
+ projection: z.ZodReadonly<z.ZodObject<{
198
+ title: z.ZodOptional<z.ZodString>;
199
+ description: z.ZodOptional<z.ZodString>;
200
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
201
+ minLength: z.ZodOptional<z.ZodNumber>;
202
+ maxLength: z.ZodOptional<z.ZodNumber>;
203
+ id: z.ZodString;
204
+ label: z.ZodString;
205
+ description: z.ZodOptional<z.ZodString>;
206
+ required: z.ZodBoolean;
207
+ type: z.ZodLiteral<"text">;
208
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
209
+ minLength: z.ZodOptional<z.ZodNumber>;
210
+ maxLength: z.ZodOptional<z.ZodNumber>;
211
+ id: z.ZodString;
212
+ label: z.ZodString;
213
+ description: z.ZodOptional<z.ZodString>;
214
+ required: z.ZodBoolean;
215
+ type: z.ZodLiteral<"multiline">;
216
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
217
+ min: z.ZodOptional<z.ZodNumber>;
218
+ max: z.ZodOptional<z.ZodNumber>;
219
+ integer: z.ZodOptional<z.ZodBoolean>;
220
+ id: z.ZodString;
221
+ label: z.ZodString;
222
+ description: z.ZodOptional<z.ZodString>;
223
+ required: z.ZodBoolean;
224
+ type: z.ZodLiteral<"number">;
225
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
226
+ id: z.ZodString;
227
+ label: z.ZodString;
228
+ description: z.ZodOptional<z.ZodString>;
229
+ required: z.ZodBoolean;
230
+ type: z.ZodLiteral<"boolean">;
231
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
232
+ multiple: z.ZodBoolean;
233
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
234
+ id: z.ZodString;
235
+ label: z.ZodString;
236
+ description: z.ZodOptional<z.ZodString>;
237
+ }, z.core.$strict>>>;
238
+ minSelections: z.ZodOptional<z.ZodNumber>;
239
+ maxSelections: z.ZodOptional<z.ZodNumber>;
240
+ id: z.ZodString;
241
+ label: z.ZodString;
242
+ description: z.ZodOptional<z.ZodString>;
243
+ required: z.ZodBoolean;
244
+ type: z.ZodLiteral<"choice">;
245
+ }, z.core.$strict>>]>>;
246
+ }, z.core.$strict>>;
247
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
248
+ relaySequence: z.ZodNumber;
249
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
250
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
251
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
252
+ expiresAt: z.ZodString;
253
+ sensitivity: z.ZodLiteral<"normal">;
254
+ type: z.ZodLiteral<"interaction.request">;
255
+ }, z.core.$strict>>]>;
256
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
257
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
258
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
259
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
260
+ method: z.ZodUnion<[z.ZodLiteral<"approval.request">, z.ZodLiteral<"userInput.request">]>;
261
+ status: z.ZodLiteral<"resolved">;
262
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
263
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
264
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
265
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
266
+ method: z.ZodUnion<[z.ZodLiteral<"approval.request">, z.ZodLiteral<"userInput.request">]>;
267
+ status: z.ZodLiteral<"cancelled">;
268
+ }, z.core.$strict>>]>;
269
+ export declare const relayTurnStateSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
270
+ status: z.ZodLiteral<"idle">;
271
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
272
+ status: z.ZodLiteral<"running">;
273
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
274
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
275
+ status: z.ZodLiteral<"cancelling">;
276
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
277
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
278
+ status: z.ZodLiteral<"completed">;
279
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
280
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
281
+ status: z.ZodLiteral<"cancelled">;
282
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
283
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
284
+ status: z.ZodLiteral<"failed">;
285
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
286
+ stage: z.ZodEnum<{
287
+ bootstrap: "bootstrap";
288
+ plan: "plan";
289
+ execute: "execute";
290
+ }>;
291
+ }, z.core.$strict>>]>;
292
+ export declare const relayThreadViewSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
293
+ snapshot: z.ZodNull;
294
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
295
+ liveAssistantMessages: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
296
+ status: z.ZodLiteral<"streaming">;
297
+ streamId: z.ZodString;
298
+ text: z.ZodString;
299
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
300
+ status: z.ZodLiteral<"completed">;
301
+ streamId: z.ZodString;
302
+ text: z.ZodString;
303
+ }, z.core.$strict>>]>>>;
304
+ interactions: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
305
+ status: z.ZodLiteral<"pending">;
306
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
307
+ method: z.ZodLiteral<"approval.request">;
308
+ projection: z.ZodReadonly<z.ZodObject<{
309
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
310
+ agentName: z.ZodString;
311
+ toolName: z.ZodString;
312
+ explanation: z.ZodOptional<z.ZodString>;
313
+ }, z.core.$strict>>;
314
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
315
+ relaySequence: z.ZodNumber;
316
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
317
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
318
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
319
+ expiresAt: z.ZodString;
320
+ sensitivity: z.ZodLiteral<"normal">;
321
+ type: z.ZodLiteral<"interaction.request">;
322
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
323
+ method: z.ZodLiteral<"userInput.request">;
324
+ projection: z.ZodReadonly<z.ZodObject<{
325
+ title: z.ZodOptional<z.ZodString>;
326
+ description: z.ZodOptional<z.ZodString>;
327
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
328
+ minLength: z.ZodOptional<z.ZodNumber>;
329
+ maxLength: z.ZodOptional<z.ZodNumber>;
330
+ id: z.ZodString;
331
+ label: z.ZodString;
332
+ description: z.ZodOptional<z.ZodString>;
333
+ required: z.ZodBoolean;
334
+ type: z.ZodLiteral<"text">;
335
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
336
+ minLength: z.ZodOptional<z.ZodNumber>;
337
+ maxLength: z.ZodOptional<z.ZodNumber>;
338
+ id: z.ZodString;
339
+ label: z.ZodString;
340
+ description: z.ZodOptional<z.ZodString>;
341
+ required: z.ZodBoolean;
342
+ type: z.ZodLiteral<"multiline">;
343
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
344
+ min: z.ZodOptional<z.ZodNumber>;
345
+ max: z.ZodOptional<z.ZodNumber>;
346
+ integer: z.ZodOptional<z.ZodBoolean>;
347
+ id: z.ZodString;
348
+ label: z.ZodString;
349
+ description: z.ZodOptional<z.ZodString>;
350
+ required: z.ZodBoolean;
351
+ type: z.ZodLiteral<"number">;
352
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
353
+ id: z.ZodString;
354
+ label: z.ZodString;
355
+ description: z.ZodOptional<z.ZodString>;
356
+ required: z.ZodBoolean;
357
+ type: z.ZodLiteral<"boolean">;
358
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
359
+ multiple: z.ZodBoolean;
360
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
361
+ id: z.ZodString;
362
+ label: z.ZodString;
363
+ description: z.ZodOptional<z.ZodString>;
364
+ }, z.core.$strict>>>;
365
+ minSelections: z.ZodOptional<z.ZodNumber>;
366
+ maxSelections: z.ZodOptional<z.ZodNumber>;
367
+ id: z.ZodString;
368
+ label: z.ZodString;
369
+ description: z.ZodOptional<z.ZodString>;
370
+ required: z.ZodBoolean;
371
+ type: z.ZodLiteral<"choice">;
372
+ }, z.core.$strict>>]>>;
373
+ }, z.core.$strict>>;
374
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
375
+ relaySequence: z.ZodNumber;
376
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
377
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
378
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
379
+ expiresAt: z.ZodString;
380
+ sensitivity: z.ZodLiteral<"normal">;
381
+ type: z.ZodLiteral<"interaction.request">;
382
+ }, z.core.$strict>>]>;
383
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
384
+ status: z.ZodLiteral<"responding">;
385
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
386
+ method: z.ZodLiteral<"approval.request">;
387
+ projection: z.ZodReadonly<z.ZodObject<{
388
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
389
+ agentName: z.ZodString;
390
+ toolName: z.ZodString;
391
+ explanation: z.ZodOptional<z.ZodString>;
392
+ }, z.core.$strict>>;
393
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
394
+ relaySequence: z.ZodNumber;
395
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
396
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
397
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
398
+ expiresAt: z.ZodString;
399
+ sensitivity: z.ZodLiteral<"normal">;
400
+ type: z.ZodLiteral<"interaction.request">;
401
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
402
+ method: z.ZodLiteral<"userInput.request">;
403
+ projection: z.ZodReadonly<z.ZodObject<{
404
+ title: z.ZodOptional<z.ZodString>;
405
+ description: z.ZodOptional<z.ZodString>;
406
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
407
+ minLength: z.ZodOptional<z.ZodNumber>;
408
+ maxLength: z.ZodOptional<z.ZodNumber>;
409
+ id: z.ZodString;
410
+ label: z.ZodString;
411
+ description: z.ZodOptional<z.ZodString>;
412
+ required: z.ZodBoolean;
413
+ type: z.ZodLiteral<"text">;
414
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
415
+ minLength: z.ZodOptional<z.ZodNumber>;
416
+ maxLength: z.ZodOptional<z.ZodNumber>;
417
+ id: z.ZodString;
418
+ label: z.ZodString;
419
+ description: z.ZodOptional<z.ZodString>;
420
+ required: z.ZodBoolean;
421
+ type: z.ZodLiteral<"multiline">;
422
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
423
+ min: z.ZodOptional<z.ZodNumber>;
424
+ max: z.ZodOptional<z.ZodNumber>;
425
+ integer: z.ZodOptional<z.ZodBoolean>;
426
+ id: z.ZodString;
427
+ label: z.ZodString;
428
+ description: z.ZodOptional<z.ZodString>;
429
+ required: z.ZodBoolean;
430
+ type: z.ZodLiteral<"number">;
431
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
432
+ id: z.ZodString;
433
+ label: z.ZodString;
434
+ description: z.ZodOptional<z.ZodString>;
435
+ required: z.ZodBoolean;
436
+ type: z.ZodLiteral<"boolean">;
437
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
438
+ multiple: z.ZodBoolean;
439
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
440
+ id: z.ZodString;
441
+ label: z.ZodString;
442
+ description: z.ZodOptional<z.ZodString>;
443
+ }, z.core.$strict>>>;
444
+ minSelections: z.ZodOptional<z.ZodNumber>;
445
+ maxSelections: z.ZodOptional<z.ZodNumber>;
446
+ id: z.ZodString;
447
+ label: z.ZodString;
448
+ description: z.ZodOptional<z.ZodString>;
449
+ required: z.ZodBoolean;
450
+ type: z.ZodLiteral<"choice">;
451
+ }, z.core.$strict>>]>>;
452
+ }, z.core.$strict>>;
453
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
454
+ relaySequence: z.ZodNumber;
455
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
456
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
457
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
458
+ expiresAt: z.ZodString;
459
+ sensitivity: z.ZodLiteral<"normal">;
460
+ type: z.ZodLiteral<"interaction.request">;
461
+ }, z.core.$strict>>]>;
462
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
463
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
464
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
465
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
466
+ method: z.ZodUnion<[z.ZodLiteral<"approval.request">, z.ZodLiteral<"userInput.request">]>;
467
+ status: z.ZodLiteral<"resolved">;
468
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
469
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
470
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
471
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
472
+ method: z.ZodUnion<[z.ZodLiteral<"approval.request">, z.ZodLiteral<"userInput.request">]>;
473
+ status: z.ZodLiteral<"cancelled">;
474
+ }, z.core.$strict>>]>>>;
475
+ turn: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
476
+ status: z.ZodLiteral<"idle">;
477
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
478
+ status: z.ZodLiteral<"running">;
479
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
480
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
481
+ status: z.ZodLiteral<"cancelling">;
482
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
483
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
484
+ status: z.ZodLiteral<"completed">;
485
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
486
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
487
+ status: z.ZodLiteral<"cancelled">;
488
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
489
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
490
+ status: z.ZodLiteral<"failed">;
491
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
492
+ stage: z.ZodEnum<{
493
+ bootstrap: "bootstrap";
494
+ plan: "plan";
495
+ execute: "execute";
496
+ }>;
497
+ }, z.core.$strict>>]>;
498
+ status: z.ZodLiteral<"loading">;
499
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
500
+ snapshot: z.ZodReadonly<z.ZodObject<{
501
+ thread: z.ZodReadonly<z.ZodObject<{
502
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
503
+ title: z.ZodOptional<z.ZodString>;
504
+ model: z.ZodOptional<z.ZodString>;
505
+ createdAt: z.ZodString;
506
+ updatedAt: z.ZodString;
507
+ messageCount: z.ZodNumber;
508
+ }, z.core.$strict>>;
509
+ messages: z.ZodReadonly<z.ZodObject<{
510
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
511
+ sequence: z.ZodNumber;
512
+ role: z.ZodEnum<{
513
+ user: "user";
514
+ assistant: "assistant";
515
+ }>;
516
+ createdAt: z.ZodString;
517
+ parts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
518
+ type: z.ZodLiteral<"text">;
519
+ text: z.ZodString;
520
+ }, z.core.$strict>>>;
521
+ }, z.core.$strict>>>;
522
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
523
+ }, z.core.$strict>>;
524
+ operations: z.ZodReadonly<z.ZodObject<{
525
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
526
+ id: z.core.$ZodBranded<z.ZodString, "OperationId">;
527
+ sequence: z.ZodNumber;
528
+ toolCallId: z.ZodString;
529
+ agentName: z.ZodString;
530
+ toolName: z.ZodString;
531
+ createdAt: z.ZodString;
532
+ outcome: z.ZodReadonly<z.ZodObject<{
533
+ kind: z.ZodEnum<{
534
+ success: "success";
535
+ user_rejected: "user_rejected";
536
+ policy_denied: "policy_denied";
537
+ invalid_input: "invalid_input";
538
+ cancelled: "cancelled";
539
+ tool_failed: "tool_failed";
540
+ }>;
541
+ reason: z.ZodOptional<z.ZodString>;
542
+ }, z.core.$strict>>;
543
+ display: z.ZodJSONSchema;
544
+ }, z.core.$strict>>>;
545
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
546
+ }, z.core.$strict>>;
547
+ activeTurn: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
548
+ id: z.core.$ZodBranded<z.ZodString, "TurnId">;
549
+ status: z.ZodEnum<{
550
+ running: "running";
551
+ cancelling: "cancelling";
552
+ }>;
553
+ startedAt: z.ZodString;
554
+ }, z.core.$strict>>>;
555
+ pendingApprovals: z.ZodArray<z.ZodReadonly<z.ZodObject<{
556
+ id: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
557
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
558
+ agentName: z.ZodString;
559
+ toolName: z.ZodString;
560
+ preview: z.ZodJSONSchema;
561
+ reason: z.ZodOptional<z.ZodString>;
562
+ }, z.core.$strict>>>;
563
+ transcriptCompleteness: z.ZodEnum<{
564
+ complete: "complete";
565
+ legacy_snapshot: "legacy_snapshot";
566
+ }>;
567
+ }, z.core.$strict>>;
568
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
569
+ liveAssistantMessages: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
570
+ status: z.ZodLiteral<"streaming">;
571
+ streamId: z.ZodString;
572
+ text: z.ZodString;
573
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
574
+ status: z.ZodLiteral<"completed">;
575
+ streamId: z.ZodString;
576
+ text: z.ZodString;
577
+ }, z.core.$strict>>]>>>;
578
+ interactions: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
579
+ status: z.ZodLiteral<"pending">;
580
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
581
+ method: z.ZodLiteral<"approval.request">;
582
+ projection: z.ZodReadonly<z.ZodObject<{
583
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
584
+ agentName: z.ZodString;
585
+ toolName: z.ZodString;
586
+ explanation: z.ZodOptional<z.ZodString>;
587
+ }, z.core.$strict>>;
588
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
589
+ relaySequence: z.ZodNumber;
590
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
591
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
592
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
593
+ expiresAt: z.ZodString;
594
+ sensitivity: z.ZodLiteral<"normal">;
595
+ type: z.ZodLiteral<"interaction.request">;
596
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
597
+ method: z.ZodLiteral<"userInput.request">;
598
+ projection: z.ZodReadonly<z.ZodObject<{
599
+ title: z.ZodOptional<z.ZodString>;
600
+ description: z.ZodOptional<z.ZodString>;
601
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
602
+ minLength: z.ZodOptional<z.ZodNumber>;
603
+ maxLength: z.ZodOptional<z.ZodNumber>;
604
+ id: z.ZodString;
605
+ label: z.ZodString;
606
+ description: z.ZodOptional<z.ZodString>;
607
+ required: z.ZodBoolean;
608
+ type: z.ZodLiteral<"text">;
609
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
610
+ minLength: z.ZodOptional<z.ZodNumber>;
611
+ maxLength: z.ZodOptional<z.ZodNumber>;
612
+ id: z.ZodString;
613
+ label: z.ZodString;
614
+ description: z.ZodOptional<z.ZodString>;
615
+ required: z.ZodBoolean;
616
+ type: z.ZodLiteral<"multiline">;
617
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
618
+ min: z.ZodOptional<z.ZodNumber>;
619
+ max: z.ZodOptional<z.ZodNumber>;
620
+ integer: z.ZodOptional<z.ZodBoolean>;
621
+ id: z.ZodString;
622
+ label: z.ZodString;
623
+ description: z.ZodOptional<z.ZodString>;
624
+ required: z.ZodBoolean;
625
+ type: z.ZodLiteral<"number">;
626
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
627
+ id: z.ZodString;
628
+ label: z.ZodString;
629
+ description: z.ZodOptional<z.ZodString>;
630
+ required: z.ZodBoolean;
631
+ type: z.ZodLiteral<"boolean">;
632
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
633
+ multiple: z.ZodBoolean;
634
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
635
+ id: z.ZodString;
636
+ label: z.ZodString;
637
+ description: z.ZodOptional<z.ZodString>;
638
+ }, z.core.$strict>>>;
639
+ minSelections: z.ZodOptional<z.ZodNumber>;
640
+ maxSelections: z.ZodOptional<z.ZodNumber>;
641
+ id: z.ZodString;
642
+ label: z.ZodString;
643
+ description: z.ZodOptional<z.ZodString>;
644
+ required: z.ZodBoolean;
645
+ type: z.ZodLiteral<"choice">;
646
+ }, z.core.$strict>>]>>;
647
+ }, z.core.$strict>>;
648
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
649
+ relaySequence: z.ZodNumber;
650
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
651
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
652
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
653
+ expiresAt: z.ZodString;
654
+ sensitivity: z.ZodLiteral<"normal">;
655
+ type: z.ZodLiteral<"interaction.request">;
656
+ }, z.core.$strict>>]>;
657
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
658
+ status: z.ZodLiteral<"responding">;
659
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
660
+ method: z.ZodLiteral<"approval.request">;
661
+ projection: z.ZodReadonly<z.ZodObject<{
662
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
663
+ agentName: z.ZodString;
664
+ toolName: z.ZodString;
665
+ explanation: z.ZodOptional<z.ZodString>;
666
+ }, z.core.$strict>>;
667
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
668
+ relaySequence: z.ZodNumber;
669
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
670
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
671
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
672
+ expiresAt: z.ZodString;
673
+ sensitivity: z.ZodLiteral<"normal">;
674
+ type: z.ZodLiteral<"interaction.request">;
675
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
676
+ method: z.ZodLiteral<"userInput.request">;
677
+ projection: z.ZodReadonly<z.ZodObject<{
678
+ title: z.ZodOptional<z.ZodString>;
679
+ description: z.ZodOptional<z.ZodString>;
680
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
681
+ minLength: z.ZodOptional<z.ZodNumber>;
682
+ maxLength: z.ZodOptional<z.ZodNumber>;
683
+ id: z.ZodString;
684
+ label: z.ZodString;
685
+ description: z.ZodOptional<z.ZodString>;
686
+ required: z.ZodBoolean;
687
+ type: z.ZodLiteral<"text">;
688
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
689
+ minLength: z.ZodOptional<z.ZodNumber>;
690
+ maxLength: z.ZodOptional<z.ZodNumber>;
691
+ id: z.ZodString;
692
+ label: z.ZodString;
693
+ description: z.ZodOptional<z.ZodString>;
694
+ required: z.ZodBoolean;
695
+ type: z.ZodLiteral<"multiline">;
696
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
697
+ min: z.ZodOptional<z.ZodNumber>;
698
+ max: z.ZodOptional<z.ZodNumber>;
699
+ integer: z.ZodOptional<z.ZodBoolean>;
700
+ id: z.ZodString;
701
+ label: z.ZodString;
702
+ description: z.ZodOptional<z.ZodString>;
703
+ required: z.ZodBoolean;
704
+ type: z.ZodLiteral<"number">;
705
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
706
+ id: z.ZodString;
707
+ label: z.ZodString;
708
+ description: z.ZodOptional<z.ZodString>;
709
+ required: z.ZodBoolean;
710
+ type: z.ZodLiteral<"boolean">;
711
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
712
+ multiple: z.ZodBoolean;
713
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
714
+ id: z.ZodString;
715
+ label: z.ZodString;
716
+ description: z.ZodOptional<z.ZodString>;
717
+ }, z.core.$strict>>>;
718
+ minSelections: z.ZodOptional<z.ZodNumber>;
719
+ maxSelections: z.ZodOptional<z.ZodNumber>;
720
+ id: z.ZodString;
721
+ label: z.ZodString;
722
+ description: z.ZodOptional<z.ZodString>;
723
+ required: z.ZodBoolean;
724
+ type: z.ZodLiteral<"choice">;
725
+ }, z.core.$strict>>]>>;
726
+ }, z.core.$strict>>;
727
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
728
+ relaySequence: z.ZodNumber;
729
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
730
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
731
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
732
+ expiresAt: z.ZodString;
733
+ sensitivity: z.ZodLiteral<"normal">;
734
+ type: z.ZodLiteral<"interaction.request">;
735
+ }, z.core.$strict>>]>;
736
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
737
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
738
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
739
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
740
+ method: z.ZodUnion<[z.ZodLiteral<"approval.request">, z.ZodLiteral<"userInput.request">]>;
741
+ status: z.ZodLiteral<"resolved">;
742
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
743
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
744
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
745
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
746
+ method: z.ZodUnion<[z.ZodLiteral<"approval.request">, z.ZodLiteral<"userInput.request">]>;
747
+ status: z.ZodLiteral<"cancelled">;
748
+ }, z.core.$strict>>]>>>;
749
+ turn: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
750
+ status: z.ZodLiteral<"idle">;
751
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
752
+ status: z.ZodLiteral<"running">;
753
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
754
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
755
+ status: z.ZodLiteral<"cancelling">;
756
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
757
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
758
+ status: z.ZodLiteral<"completed">;
759
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
760
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
761
+ status: z.ZodLiteral<"cancelled">;
762
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
763
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
764
+ status: z.ZodLiteral<"failed">;
765
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
766
+ stage: z.ZodEnum<{
767
+ bootstrap: "bootstrap";
768
+ plan: "plan";
769
+ execute: "execute";
770
+ }>;
771
+ }, z.core.$strict>>]>;
772
+ status: z.ZodLiteral<"ready">;
773
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
774
+ snapshot: z.ZodNullable<z.ZodReadonly<z.ZodObject<{
775
+ thread: z.ZodReadonly<z.ZodObject<{
776
+ id: z.core.$ZodBranded<z.ZodString, "ThreadId">;
777
+ title: z.ZodOptional<z.ZodString>;
778
+ model: z.ZodOptional<z.ZodString>;
779
+ createdAt: z.ZodString;
780
+ updatedAt: z.ZodString;
781
+ messageCount: z.ZodNumber;
782
+ }, z.core.$strict>>;
783
+ messages: z.ZodReadonly<z.ZodObject<{
784
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
785
+ sequence: z.ZodNumber;
786
+ role: z.ZodEnum<{
787
+ user: "user";
788
+ assistant: "assistant";
789
+ }>;
790
+ createdAt: z.ZodString;
791
+ parts: z.ZodArray<z.ZodReadonly<z.ZodObject<{
792
+ type: z.ZodLiteral<"text">;
793
+ text: z.ZodString;
794
+ }, z.core.$strict>>>;
795
+ }, z.core.$strict>>>;
796
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
797
+ }, z.core.$strict>>;
798
+ operations: z.ZodReadonly<z.ZodObject<{
799
+ items: z.ZodArray<z.ZodReadonly<z.ZodObject<{
800
+ id: z.core.$ZodBranded<z.ZodString, "OperationId">;
801
+ sequence: z.ZodNumber;
802
+ toolCallId: z.ZodString;
803
+ agentName: z.ZodString;
804
+ toolName: z.ZodString;
805
+ createdAt: z.ZodString;
806
+ outcome: z.ZodReadonly<z.ZodObject<{
807
+ kind: z.ZodEnum<{
808
+ success: "success";
809
+ user_rejected: "user_rejected";
810
+ policy_denied: "policy_denied";
811
+ invalid_input: "invalid_input";
812
+ cancelled: "cancelled";
813
+ tool_failed: "tool_failed";
814
+ }>;
815
+ reason: z.ZodOptional<z.ZodString>;
816
+ }, z.core.$strict>>;
817
+ display: z.ZodJSONSchema;
818
+ }, z.core.$strict>>>;
819
+ nextBeforeSequence: z.ZodNullable<z.ZodNumber>;
820
+ }, z.core.$strict>>;
821
+ activeTurn: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
822
+ id: z.core.$ZodBranded<z.ZodString, "TurnId">;
823
+ status: z.ZodEnum<{
824
+ running: "running";
825
+ cancelling: "cancelling";
826
+ }>;
827
+ startedAt: z.ZodString;
828
+ }, z.core.$strict>>>;
829
+ pendingApprovals: z.ZodArray<z.ZodReadonly<z.ZodObject<{
830
+ id: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
831
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
832
+ agentName: z.ZodString;
833
+ toolName: z.ZodString;
834
+ preview: z.ZodJSONSchema;
835
+ reason: z.ZodOptional<z.ZodString>;
836
+ }, z.core.$strict>>>;
837
+ transcriptCompleteness: z.ZodEnum<{
838
+ complete: "complete";
839
+ legacy_snapshot: "legacy_snapshot";
840
+ }>;
841
+ }, z.core.$strict>>>;
842
+ error: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
843
+ code: z.ZodEnum<{
844
+ readonly aborted: "ABORTED";
845
+ readonly closed: "CLIENT_CLOSED";
846
+ readonly connectionUnavailable: "CONNECTION_UNAVAILABLE";
847
+ readonly invalidSession: "INVALID_SESSION";
848
+ readonly outcomeUnknown: "OUTCOME_UNKNOWN";
849
+ readonly protocolError: "PROTOCOL_ERROR";
850
+ readonly requestTimeout: "REQUEST_TIMEOUT";
851
+ readonly transportError: "TRANSPORT_ERROR";
852
+ readonly workspaceOffline: "WORKSPACE_OFFLINE";
853
+ }>;
854
+ message: z.ZodString;
855
+ retryable: z.ZodBoolean;
856
+ kind: z.ZodLiteral<"transport">;
857
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
858
+ code: z.ZodEnum<{
859
+ RELAY_PROTOCOL_VERSION_UNSUPPORTED: "RELAY_PROTOCOL_VERSION_UNSUPPORTED";
860
+ WORKSPACE_NOT_FOUND: "WORKSPACE_NOT_FOUND";
861
+ WORKSPACE_OFFLINE: "WORKSPACE_OFFLINE";
862
+ CONTROLLER_CONFLICT: "CONTROLLER_CONFLICT";
863
+ RATE_LIMITED: "RATE_LIMITED";
864
+ RELAY_INTERNAL_ERROR: "RELAY_INTERNAL_ERROR";
865
+ }>;
866
+ message: z.ZodString;
867
+ retryable: z.ZodBoolean;
868
+ kind: z.ZodLiteral<"session">;
869
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
870
+ code: z.ZodString;
871
+ message: z.ZodString;
872
+ retryable: z.ZodBoolean;
873
+ kind: z.ZodLiteral<"remote">;
874
+ }, z.core.$strict>>]>;
875
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
876
+ liveAssistantMessages: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
877
+ status: z.ZodLiteral<"streaming">;
878
+ streamId: z.ZodString;
879
+ text: z.ZodString;
880
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
881
+ status: z.ZodLiteral<"completed">;
882
+ streamId: z.ZodString;
883
+ text: z.ZodString;
884
+ }, z.core.$strict>>]>>>;
885
+ interactions: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
886
+ status: z.ZodLiteral<"pending">;
887
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
888
+ method: z.ZodLiteral<"approval.request">;
889
+ projection: z.ZodReadonly<z.ZodObject<{
890
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
891
+ agentName: z.ZodString;
892
+ toolName: z.ZodString;
893
+ explanation: z.ZodOptional<z.ZodString>;
894
+ }, z.core.$strict>>;
895
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
896
+ relaySequence: z.ZodNumber;
897
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
898
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
899
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
900
+ expiresAt: z.ZodString;
901
+ sensitivity: z.ZodLiteral<"normal">;
902
+ type: z.ZodLiteral<"interaction.request">;
903
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
904
+ method: z.ZodLiteral<"userInput.request">;
905
+ projection: z.ZodReadonly<z.ZodObject<{
906
+ title: z.ZodOptional<z.ZodString>;
907
+ description: z.ZodOptional<z.ZodString>;
908
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
909
+ minLength: z.ZodOptional<z.ZodNumber>;
910
+ maxLength: z.ZodOptional<z.ZodNumber>;
911
+ id: z.ZodString;
912
+ label: z.ZodString;
913
+ description: z.ZodOptional<z.ZodString>;
914
+ required: z.ZodBoolean;
915
+ type: z.ZodLiteral<"text">;
916
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
917
+ minLength: z.ZodOptional<z.ZodNumber>;
918
+ maxLength: z.ZodOptional<z.ZodNumber>;
919
+ id: z.ZodString;
920
+ label: z.ZodString;
921
+ description: z.ZodOptional<z.ZodString>;
922
+ required: z.ZodBoolean;
923
+ type: z.ZodLiteral<"multiline">;
924
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
925
+ min: z.ZodOptional<z.ZodNumber>;
926
+ max: z.ZodOptional<z.ZodNumber>;
927
+ integer: z.ZodOptional<z.ZodBoolean>;
928
+ id: z.ZodString;
929
+ label: z.ZodString;
930
+ description: z.ZodOptional<z.ZodString>;
931
+ required: z.ZodBoolean;
932
+ type: z.ZodLiteral<"number">;
933
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
934
+ id: z.ZodString;
935
+ label: z.ZodString;
936
+ description: z.ZodOptional<z.ZodString>;
937
+ required: z.ZodBoolean;
938
+ type: z.ZodLiteral<"boolean">;
939
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
940
+ multiple: z.ZodBoolean;
941
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
942
+ id: z.ZodString;
943
+ label: z.ZodString;
944
+ description: z.ZodOptional<z.ZodString>;
945
+ }, z.core.$strict>>>;
946
+ minSelections: z.ZodOptional<z.ZodNumber>;
947
+ maxSelections: z.ZodOptional<z.ZodNumber>;
948
+ id: z.ZodString;
949
+ label: z.ZodString;
950
+ description: z.ZodOptional<z.ZodString>;
951
+ required: z.ZodBoolean;
952
+ type: z.ZodLiteral<"choice">;
953
+ }, z.core.$strict>>]>>;
954
+ }, z.core.$strict>>;
955
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
956
+ relaySequence: z.ZodNumber;
957
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
958
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
959
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
960
+ expiresAt: z.ZodString;
961
+ sensitivity: z.ZodLiteral<"normal">;
962
+ type: z.ZodLiteral<"interaction.request">;
963
+ }, z.core.$strict>>]>;
964
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
965
+ status: z.ZodLiteral<"responding">;
966
+ request: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
967
+ method: z.ZodLiteral<"approval.request">;
968
+ projection: z.ZodReadonly<z.ZodObject<{
969
+ approvalId: z.core.$ZodBranded<z.ZodString, "ApprovalId">;
970
+ agentName: z.ZodString;
971
+ toolName: z.ZodString;
972
+ explanation: z.ZodOptional<z.ZodString>;
973
+ }, z.core.$strict>>;
974
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
975
+ relaySequence: z.ZodNumber;
976
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
977
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
978
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
979
+ expiresAt: z.ZodString;
980
+ sensitivity: z.ZodLiteral<"normal">;
981
+ type: z.ZodLiteral<"interaction.request">;
982
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
983
+ method: z.ZodLiteral<"userInput.request">;
984
+ projection: z.ZodReadonly<z.ZodObject<{
985
+ title: z.ZodOptional<z.ZodString>;
986
+ description: z.ZodOptional<z.ZodString>;
987
+ controls: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
988
+ minLength: z.ZodOptional<z.ZodNumber>;
989
+ maxLength: z.ZodOptional<z.ZodNumber>;
990
+ id: z.ZodString;
991
+ label: z.ZodString;
992
+ description: z.ZodOptional<z.ZodString>;
993
+ required: z.ZodBoolean;
994
+ type: z.ZodLiteral<"text">;
995
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
996
+ minLength: z.ZodOptional<z.ZodNumber>;
997
+ maxLength: z.ZodOptional<z.ZodNumber>;
998
+ id: z.ZodString;
999
+ label: z.ZodString;
1000
+ description: z.ZodOptional<z.ZodString>;
1001
+ required: z.ZodBoolean;
1002
+ type: z.ZodLiteral<"multiline">;
1003
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1004
+ min: z.ZodOptional<z.ZodNumber>;
1005
+ max: z.ZodOptional<z.ZodNumber>;
1006
+ integer: z.ZodOptional<z.ZodBoolean>;
1007
+ id: z.ZodString;
1008
+ label: z.ZodString;
1009
+ description: z.ZodOptional<z.ZodString>;
1010
+ required: z.ZodBoolean;
1011
+ type: z.ZodLiteral<"number">;
1012
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1013
+ id: z.ZodString;
1014
+ label: z.ZodString;
1015
+ description: z.ZodOptional<z.ZodString>;
1016
+ required: z.ZodBoolean;
1017
+ type: z.ZodLiteral<"boolean">;
1018
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1019
+ multiple: z.ZodBoolean;
1020
+ options: z.ZodArray<z.ZodReadonly<z.ZodObject<{
1021
+ id: z.ZodString;
1022
+ label: z.ZodString;
1023
+ description: z.ZodOptional<z.ZodString>;
1024
+ }, z.core.$strict>>>;
1025
+ minSelections: z.ZodOptional<z.ZodNumber>;
1026
+ maxSelections: z.ZodOptional<z.ZodNumber>;
1027
+ id: z.ZodString;
1028
+ label: z.ZodString;
1029
+ description: z.ZodOptional<z.ZodString>;
1030
+ required: z.ZodBoolean;
1031
+ type: z.ZodLiteral<"choice">;
1032
+ }, z.core.$strict>>]>>;
1033
+ }, z.core.$strict>>;
1034
+ workspaceId: z.core.$ZodBranded<z.ZodString, "WorkspaceId">;
1035
+ relaySequence: z.ZodNumber;
1036
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
1037
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
1038
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
1039
+ expiresAt: z.ZodString;
1040
+ sensitivity: z.ZodLiteral<"normal">;
1041
+ type: z.ZodLiteral<"interaction.request">;
1042
+ }, z.core.$strict>>]>;
1043
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1044
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
1045
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
1046
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
1047
+ method: z.ZodUnion<[z.ZodLiteral<"approval.request">, z.ZodLiteral<"userInput.request">]>;
1048
+ status: z.ZodLiteral<"resolved">;
1049
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1050
+ interactionId: z.core.$ZodBranded<z.ZodString, "InteractionId">;
1051
+ threadId: z.core.$ZodBranded<z.ZodString, "ThreadId">;
1052
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
1053
+ method: z.ZodUnion<[z.ZodLiteral<"approval.request">, z.ZodLiteral<"userInput.request">]>;
1054
+ status: z.ZodLiteral<"cancelled">;
1055
+ }, z.core.$strict>>]>>>;
1056
+ turn: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.ZodObject<{
1057
+ status: z.ZodLiteral<"idle">;
1058
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1059
+ status: z.ZodLiteral<"running">;
1060
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
1061
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1062
+ status: z.ZodLiteral<"cancelling">;
1063
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
1064
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1065
+ status: z.ZodLiteral<"completed">;
1066
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
1067
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1068
+ status: z.ZodLiteral<"cancelled">;
1069
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
1070
+ }, z.core.$strict>>, z.ZodReadonly<z.ZodObject<{
1071
+ status: z.ZodLiteral<"failed">;
1072
+ turnId: z.core.$ZodBranded<z.ZodString, "TurnId">;
1073
+ stage: z.ZodEnum<{
1074
+ bootstrap: "bootstrap";
1075
+ plan: "plan";
1076
+ execute: "execute";
1077
+ }>;
1078
+ }, z.core.$strict>>]>;
1079
+ status: z.ZodLiteral<"error">;
1080
+ }, z.core.$strict>>]>;
1081
+ export type RelayConnectionState = z.output<typeof relayConnectionStateSchema>;
1082
+ export type RelayClientTransportErrorCode = z.output<typeof relayClientTransportErrorCodeSchema>;
1083
+ export type RelayClientErrorDetails = z.output<typeof relayClientErrorDetailsSchema>;
1084
+ export type RelayLiveAssistantMessage = z.output<typeof relayLiveAssistantMessageSchema>;
1085
+ export type RelayInteractionState = z.output<typeof relayInteractionStateSchema>;
1086
+ export type RelayTurnState = z.output<typeof relayTurnStateSchema>;
1087
+ export type RelayThreadView = z.output<typeof relayThreadViewSchema>;
1088
+ export declare function getPendingInteractionRequest(interaction: RelayInteractionState): RelayInteractionRequestV11 | undefined;