@n8n/api-types 1.15.0 → 1.16.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.
Files changed (64) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/chat-hub.d.ts +3 -6
  3. package/dist/chat-hub.js +12 -26
  4. package/dist/chat-hub.js.map +1 -1
  5. package/dist/dto/ai/ai-build-request.dto.d.ts +0 -6
  6. package/dist/dto/ai/ai-build-request.dto.js +0 -1
  7. package/dist/dto/ai/ai-build-request.dto.js.map +1 -1
  8. package/dist/dto/ai/ai-session-retrieval-request.dto.d.ts +0 -2
  9. package/dist/dto/ai/ai-session-retrieval-request.dto.js +0 -1
  10. package/dist/dto/ai/ai-session-retrieval-request.dto.js.map +1 -1
  11. package/dist/dto/ai/ai-truncate-messages-request.dto.d.ts +0 -2
  12. package/dist/dto/ai/ai-truncate-messages-request.dto.js +0 -1
  13. package/dist/dto/ai/ai-truncate-messages-request.dto.js.map +1 -1
  14. package/dist/dto/auth/embed-login-body.dto.d.ts +9 -0
  15. package/dist/dto/auth/embed-login-body.dto.js +11 -0
  16. package/dist/dto/auth/embed-login-body.dto.js.map +1 -0
  17. package/dist/dto/auth/embed-login-query.dto.d.ts +9 -0
  18. package/dist/dto/auth/embed-login-query.dto.js +11 -0
  19. package/dist/dto/auth/embed-login-query.dto.js.map +1 -0
  20. package/dist/dto/executions/execution-redaction-query.dto.d.ts +3 -3
  21. package/dist/dto/executions/execution-redaction-query.dto.js +2 -1
  22. package/dist/dto/executions/execution-redaction-query.dto.js.map +1 -1
  23. package/dist/dto/index.d.ts +5 -0
  24. package/dist/dto/index.js +13 -3
  25. package/dist/dto/index.js.map +1 -1
  26. package/dist/dto/instance-ai/instance-ai-confirm-request.dto.d.ts +59 -0
  27. package/dist/dto/instance-ai/instance-ai-confirm-request.dto.js +30 -0
  28. package/dist/dto/instance-ai/instance-ai-confirm-request.dto.js.map +1 -0
  29. package/dist/dto/instance-ai/instance-ai-rename-thread-request.dto.d.ts +9 -0
  30. package/dist/dto/instance-ai/instance-ai-rename-thread-request.dto.js +11 -0
  31. package/dist/dto/instance-ai/instance-ai-rename-thread-request.dto.js.map +1 -0
  32. package/dist/dto/oidc/test-oidc-config-response.dto.d.ts +9 -0
  33. package/dist/dto/oidc/test-oidc-config-response.dto.js +11 -0
  34. package/dist/dto/oidc/test-oidc-config-response.dto.js.map +1 -0
  35. package/dist/dto/provisioning/config.dto.d.ts +4 -0
  36. package/dist/dto/provisioning/config.dto.js +2 -0
  37. package/dist/dto/provisioning/config.dto.js.map +1 -1
  38. package/dist/frontend-settings.d.ts +9 -1
  39. package/dist/index.d.ts +7 -0
  40. package/dist/index.js +64 -2
  41. package/dist/index.js.map +1 -1
  42. package/dist/instance-registry-types.js +3 -1
  43. package/dist/instance-registry-types.js.map +1 -1
  44. package/dist/push/index.d.ts +2 -1
  45. package/dist/push/instance-ai.d.ts +16 -0
  46. package/dist/push/instance-ai.js +3 -0
  47. package/dist/push/instance-ai.js.map +1 -0
  48. package/dist/schemas/agent-run-reducer.d.ts +33 -0
  49. package/dist/schemas/agent-run-reducer.js +336 -0
  50. package/dist/schemas/agent-run-reducer.js.map +1 -0
  51. package/dist/schemas/community-package.schema.d.ts +13 -0
  52. package/dist/schemas/community-package.schema.js +17 -0
  53. package/dist/schemas/community-package.schema.js.map +1 -0
  54. package/dist/schemas/instance-ai.schema.d.ts +3444 -0
  55. package/dist/schemas/instance-ai.schema.js +464 -0
  56. package/dist/schemas/instance-ai.schema.js.map +1 -0
  57. package/dist/schemas/secrets-provider.schema.d.ts +2 -2
  58. package/dist/schemas/timezone.schema.d.ts +4 -0
  59. package/dist/schemas/timezone.schema.js +24 -0
  60. package/dist/schemas/timezone.schema.js.map +1 -0
  61. package/dist/utils/allowed-domains.d.ts +2 -0
  62. package/dist/utils/allowed-domains.js +210 -0
  63. package/dist/utils/allowed-domains.js.map +1 -0
  64. package/package.json +5 -5
@@ -0,0 +1,3444 @@
1
+ import { z } from 'zod';
2
+ export declare const UNLIMITED_CREDITS = -1;
3
+ export type RunId = string & {
4
+ readonly __brand: 'RunId';
5
+ };
6
+ export type AgentId = string & {
7
+ readonly __brand: 'AgentId';
8
+ };
9
+ export type ThreadId = string & {
10
+ readonly __brand: 'ThreadId';
11
+ };
12
+ export type ToolCallId = string & {
13
+ readonly __brand: 'ToolCallId';
14
+ };
15
+ export declare const instanceAiEventTypeSchema: z.ZodEnum<["run-start", "run-finish", "agent-spawned", "agent-completed", "text-delta", "reasoning-delta", "tool-call", "tool-result", "tool-error", "confirmation-request", "tasks-update", "filesystem-request", "thread-title-updated", "status", "error"]>;
16
+ export type InstanceAiEventType = z.infer<typeof instanceAiEventTypeSchema>;
17
+ export declare const instanceAiRunStatusSchema: z.ZodEnum<["completed", "cancelled", "error"]>;
18
+ export type InstanceAiRunStatus = z.infer<typeof instanceAiRunStatusSchema>;
19
+ export declare const instanceAiConfirmationSeveritySchema: z.ZodEnum<["destructive", "warning", "info"]>;
20
+ export type InstanceAiConfirmationSeverity = z.infer<typeof instanceAiConfirmationSeveritySchema>;
21
+ export declare const instanceAiAgentStatusSchema: z.ZodEnum<["active", "completed", "cancelled", "error"]>;
22
+ export type InstanceAiAgentStatus = z.infer<typeof instanceAiAgentStatusSchema>;
23
+ export declare const instanceAiAgentKindSchema: z.ZodEnum<["builder", "data-table", "researcher", "delegate", "browser-setup"]>;
24
+ export type InstanceAiAgentKind = z.infer<typeof instanceAiAgentKindSchema>;
25
+ export declare const domainAccessActionSchema: z.ZodEnum<["allow_once", "allow_domain", "allow_all"]>;
26
+ export type DomainAccessAction = z.infer<typeof domainAccessActionSchema>;
27
+ export declare const domainAccessMetaSchema: z.ZodObject<{
28
+ url: z.ZodString;
29
+ host: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ url: string;
32
+ host: string;
33
+ }, {
34
+ url: string;
35
+ host: string;
36
+ }>;
37
+ export type DomainAccessMeta = z.infer<typeof domainAccessMetaSchema>;
38
+ export declare const UNSAFE_OBJECT_KEYS: Set<string>;
39
+ export declare function isSafeObjectKey(key: string): boolean;
40
+ export declare const runStartPayloadSchema: z.ZodObject<{
41
+ messageId: z.ZodString;
42
+ messageGroupId: z.ZodOptional<z.ZodString>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ messageId: string;
45
+ messageGroupId?: string | undefined;
46
+ }, {
47
+ messageId: string;
48
+ messageGroupId?: string | undefined;
49
+ }>;
50
+ export declare const runFinishPayloadSchema: z.ZodObject<{
51
+ status: z.ZodEnum<["completed", "cancelled", "error"]>;
52
+ reason: z.ZodOptional<z.ZodString>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ status: "error" | "cancelled" | "completed";
55
+ reason?: string | undefined;
56
+ }, {
57
+ status: "error" | "cancelled" | "completed";
58
+ reason?: string | undefined;
59
+ }>;
60
+ export declare const agentSpawnedTargetResourceSchema: z.ZodObject<{
61
+ type: z.ZodEnum<["workflow", "data-table", "credential", "other"]>;
62
+ id: z.ZodOptional<z.ZodString>;
63
+ name: z.ZodOptional<z.ZodString>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ type: "workflow" | "credential" | "data-table" | "other";
66
+ id?: string | undefined;
67
+ name?: string | undefined;
68
+ }, {
69
+ type: "workflow" | "credential" | "data-table" | "other";
70
+ id?: string | undefined;
71
+ name?: string | undefined;
72
+ }>;
73
+ export type InstanceAiTargetResource = z.infer<typeof agentSpawnedTargetResourceSchema>;
74
+ export declare const agentSpawnedPayloadSchema: z.ZodObject<{
75
+ parentId: z.ZodString;
76
+ role: z.ZodString;
77
+ tools: z.ZodArray<z.ZodString, "many">;
78
+ taskId: z.ZodOptional<z.ZodString>;
79
+ kind: z.ZodOptional<z.ZodEnum<["builder", "data-table", "researcher", "delegate", "browser-setup"]>>;
80
+ title: z.ZodOptional<z.ZodString>;
81
+ subtitle: z.ZodOptional<z.ZodString>;
82
+ goal: z.ZodOptional<z.ZodString>;
83
+ targetResource: z.ZodOptional<z.ZodObject<{
84
+ type: z.ZodEnum<["workflow", "data-table", "credential", "other"]>;
85
+ id: z.ZodOptional<z.ZodString>;
86
+ name: z.ZodOptional<z.ZodString>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ type: "workflow" | "credential" | "data-table" | "other";
89
+ id?: string | undefined;
90
+ name?: string | undefined;
91
+ }, {
92
+ type: "workflow" | "credential" | "data-table" | "other";
93
+ id?: string | undefined;
94
+ name?: string | undefined;
95
+ }>>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ role: string;
98
+ parentId: string;
99
+ tools: string[];
100
+ title?: string | undefined;
101
+ taskId?: string | undefined;
102
+ kind?: "builder" | "data-table" | "researcher" | "delegate" | "browser-setup" | undefined;
103
+ subtitle?: string | undefined;
104
+ goal?: string | undefined;
105
+ targetResource?: {
106
+ type: "workflow" | "credential" | "data-table" | "other";
107
+ id?: string | undefined;
108
+ name?: string | undefined;
109
+ } | undefined;
110
+ }, {
111
+ role: string;
112
+ parentId: string;
113
+ tools: string[];
114
+ title?: string | undefined;
115
+ taskId?: string | undefined;
116
+ kind?: "builder" | "data-table" | "researcher" | "delegate" | "browser-setup" | undefined;
117
+ subtitle?: string | undefined;
118
+ goal?: string | undefined;
119
+ targetResource?: {
120
+ type: "workflow" | "credential" | "data-table" | "other";
121
+ id?: string | undefined;
122
+ name?: string | undefined;
123
+ } | undefined;
124
+ }>;
125
+ export declare const agentCompletedPayloadSchema: z.ZodObject<{
126
+ role: z.ZodString;
127
+ result: z.ZodString;
128
+ error: z.ZodOptional<z.ZodString>;
129
+ }, "strip", z.ZodTypeAny, {
130
+ role: string;
131
+ result: string;
132
+ error?: string | undefined;
133
+ }, {
134
+ role: string;
135
+ result: string;
136
+ error?: string | undefined;
137
+ }>;
138
+ export declare const textDeltaPayloadSchema: z.ZodObject<{
139
+ text: z.ZodString;
140
+ }, "strip", z.ZodTypeAny, {
141
+ text: string;
142
+ }, {
143
+ text: string;
144
+ }>;
145
+ export declare const reasoningDeltaPayloadSchema: z.ZodObject<{
146
+ text: z.ZodString;
147
+ }, "strip", z.ZodTypeAny, {
148
+ text: string;
149
+ }, {
150
+ text: string;
151
+ }>;
152
+ export declare const toolCallPayloadSchema: z.ZodObject<{
153
+ toolCallId: z.ZodString;
154
+ toolName: z.ZodString;
155
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ toolCallId: string;
158
+ toolName: string;
159
+ args: Record<string, unknown>;
160
+ }, {
161
+ toolCallId: string;
162
+ toolName: string;
163
+ args: Record<string, unknown>;
164
+ }>;
165
+ export declare const toolResultPayloadSchema: z.ZodObject<{
166
+ toolCallId: z.ZodString;
167
+ result: z.ZodUnknown;
168
+ }, "strip", z.ZodTypeAny, {
169
+ toolCallId: string;
170
+ result?: unknown;
171
+ }, {
172
+ toolCallId: string;
173
+ result?: unknown;
174
+ }>;
175
+ export declare const toolErrorPayloadSchema: z.ZodObject<{
176
+ toolCallId: z.ZodString;
177
+ error: z.ZodString;
178
+ }, "strip", z.ZodTypeAny, {
179
+ error: string;
180
+ toolCallId: string;
181
+ }, {
182
+ error: string;
183
+ toolCallId: string;
184
+ }>;
185
+ export declare const credentialRequestSchema: z.ZodObject<{
186
+ credentialType: z.ZodString;
187
+ reason: z.ZodString;
188
+ existingCredentials: z.ZodArray<z.ZodObject<{
189
+ id: z.ZodString;
190
+ name: z.ZodString;
191
+ }, "strip", z.ZodTypeAny, {
192
+ id: string;
193
+ name: string;
194
+ }, {
195
+ id: string;
196
+ name: string;
197
+ }>, "many">;
198
+ suggestedName: z.ZodOptional<z.ZodString>;
199
+ }, "strip", z.ZodTypeAny, {
200
+ credentialType: string;
201
+ reason: string;
202
+ existingCredentials: {
203
+ id: string;
204
+ name: string;
205
+ }[];
206
+ suggestedName?: string | undefined;
207
+ }, {
208
+ credentialType: string;
209
+ reason: string;
210
+ existingCredentials: {
211
+ id: string;
212
+ name: string;
213
+ }[];
214
+ suggestedName?: string | undefined;
215
+ }>;
216
+ export type InstanceAiCredentialRequest = z.infer<typeof credentialRequestSchema>;
217
+ export declare const credentialFlowSchema: z.ZodObject<{
218
+ stage: z.ZodEnum<["generic", "finalize"]>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ stage: "generic" | "finalize";
221
+ }, {
222
+ stage: "generic" | "finalize";
223
+ }>;
224
+ export type InstanceAiCredentialFlow = z.infer<typeof credentialFlowSchema>;
225
+ export declare const workflowSetupNodeSchema: z.ZodObject<{
226
+ node: z.ZodObject<{
227
+ name: z.ZodString;
228
+ type: z.ZodString;
229
+ typeVersion: z.ZodNumber;
230
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
231
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
232
+ id: z.ZodString;
233
+ name: z.ZodString;
234
+ }, "strip", z.ZodTypeAny, {
235
+ id: string;
236
+ name: string;
237
+ }, {
238
+ id: string;
239
+ name: string;
240
+ }>>>;
241
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
242
+ id: z.ZodString;
243
+ }, "strip", z.ZodTypeAny, {
244
+ type: string;
245
+ id: string;
246
+ name: string;
247
+ typeVersion: number;
248
+ parameters: Record<string, unknown>;
249
+ position: [number, number];
250
+ credentials?: Record<string, {
251
+ id: string;
252
+ name: string;
253
+ }> | undefined;
254
+ }, {
255
+ type: string;
256
+ id: string;
257
+ name: string;
258
+ typeVersion: number;
259
+ parameters: Record<string, unknown>;
260
+ position: [number, number];
261
+ credentials?: Record<string, {
262
+ id: string;
263
+ name: string;
264
+ }> | undefined;
265
+ }>;
266
+ credentialType: z.ZodOptional<z.ZodString>;
267
+ existingCredentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
268
+ id: z.ZodString;
269
+ name: z.ZodString;
270
+ }, "strip", z.ZodTypeAny, {
271
+ id: string;
272
+ name: string;
273
+ }, {
274
+ id: string;
275
+ name: string;
276
+ }>, "many">>;
277
+ isTrigger: z.ZodBoolean;
278
+ isFirstTrigger: z.ZodOptional<z.ZodBoolean>;
279
+ isTestable: z.ZodOptional<z.ZodBoolean>;
280
+ isAutoApplied: z.ZodOptional<z.ZodBoolean>;
281
+ credentialTestResult: z.ZodOptional<z.ZodObject<{
282
+ success: z.ZodBoolean;
283
+ message: z.ZodOptional<z.ZodString>;
284
+ }, "strip", z.ZodTypeAny, {
285
+ success: boolean;
286
+ message?: string | undefined;
287
+ }, {
288
+ success: boolean;
289
+ message?: string | undefined;
290
+ }>>;
291
+ triggerTestResult: z.ZodOptional<z.ZodObject<{
292
+ status: z.ZodEnum<["success", "error", "listening"]>;
293
+ error: z.ZodOptional<z.ZodString>;
294
+ }, "strip", z.ZodTypeAny, {
295
+ status: "error" | "success" | "listening";
296
+ error?: string | undefined;
297
+ }, {
298
+ status: "error" | "success" | "listening";
299
+ error?: string | undefined;
300
+ }>>;
301
+ parameterIssues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
302
+ editableParameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
303
+ name: z.ZodString;
304
+ displayName: z.ZodString;
305
+ type: z.ZodString;
306
+ required: z.ZodOptional<z.ZodBoolean>;
307
+ default: z.ZodOptional<z.ZodUnknown>;
308
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
309
+ name: z.ZodString;
310
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ value: string | number | boolean;
313
+ name: string;
314
+ }, {
315
+ value: string | number | boolean;
316
+ name: string;
317
+ }>, "many">>;
318
+ }, "strip", z.ZodTypeAny, {
319
+ type: string;
320
+ name: string;
321
+ displayName: string;
322
+ options?: {
323
+ value: string | number | boolean;
324
+ name: string;
325
+ }[] | undefined;
326
+ default?: unknown;
327
+ required?: boolean | undefined;
328
+ }, {
329
+ type: string;
330
+ name: string;
331
+ displayName: string;
332
+ options?: {
333
+ value: string | number | boolean;
334
+ name: string;
335
+ }[] | undefined;
336
+ default?: unknown;
337
+ required?: boolean | undefined;
338
+ }>, "many">>;
339
+ needsAction: z.ZodOptional<z.ZodBoolean>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ node: {
342
+ type: string;
343
+ id: string;
344
+ name: string;
345
+ typeVersion: number;
346
+ parameters: Record<string, unknown>;
347
+ position: [number, number];
348
+ credentials?: Record<string, {
349
+ id: string;
350
+ name: string;
351
+ }> | undefined;
352
+ };
353
+ isTrigger: boolean;
354
+ credentialType?: string | undefined;
355
+ existingCredentials?: {
356
+ id: string;
357
+ name: string;
358
+ }[] | undefined;
359
+ isFirstTrigger?: boolean | undefined;
360
+ isTestable?: boolean | undefined;
361
+ isAutoApplied?: boolean | undefined;
362
+ credentialTestResult?: {
363
+ success: boolean;
364
+ message?: string | undefined;
365
+ } | undefined;
366
+ triggerTestResult?: {
367
+ status: "error" | "success" | "listening";
368
+ error?: string | undefined;
369
+ } | undefined;
370
+ parameterIssues?: Record<string, string[]> | undefined;
371
+ editableParameters?: {
372
+ type: string;
373
+ name: string;
374
+ displayName: string;
375
+ options?: {
376
+ value: string | number | boolean;
377
+ name: string;
378
+ }[] | undefined;
379
+ default?: unknown;
380
+ required?: boolean | undefined;
381
+ }[] | undefined;
382
+ needsAction?: boolean | undefined;
383
+ }, {
384
+ node: {
385
+ type: string;
386
+ id: string;
387
+ name: string;
388
+ typeVersion: number;
389
+ parameters: Record<string, unknown>;
390
+ position: [number, number];
391
+ credentials?: Record<string, {
392
+ id: string;
393
+ name: string;
394
+ }> | undefined;
395
+ };
396
+ isTrigger: boolean;
397
+ credentialType?: string | undefined;
398
+ existingCredentials?: {
399
+ id: string;
400
+ name: string;
401
+ }[] | undefined;
402
+ isFirstTrigger?: boolean | undefined;
403
+ isTestable?: boolean | undefined;
404
+ isAutoApplied?: boolean | undefined;
405
+ credentialTestResult?: {
406
+ success: boolean;
407
+ message?: string | undefined;
408
+ } | undefined;
409
+ triggerTestResult?: {
410
+ status: "error" | "success" | "listening";
411
+ error?: string | undefined;
412
+ } | undefined;
413
+ parameterIssues?: Record<string, string[]> | undefined;
414
+ editableParameters?: {
415
+ type: string;
416
+ name: string;
417
+ displayName: string;
418
+ options?: {
419
+ value: string | number | boolean;
420
+ name: string;
421
+ }[] | undefined;
422
+ default?: unknown;
423
+ required?: boolean | undefined;
424
+ }[] | undefined;
425
+ needsAction?: boolean | undefined;
426
+ }>;
427
+ export type InstanceAiWorkflowSetupNode = z.infer<typeof workflowSetupNodeSchema>;
428
+ export declare const taskItemSchema: z.ZodObject<{
429
+ id: z.ZodString;
430
+ description: z.ZodString;
431
+ status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
432
+ }, "strip", z.ZodTypeAny, {
433
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
434
+ id: string;
435
+ description: string;
436
+ }, {
437
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
438
+ id: string;
439
+ description: string;
440
+ }>;
441
+ export type TaskItem = z.infer<typeof taskItemSchema>;
442
+ export declare const taskListSchema: z.ZodObject<{
443
+ tasks: z.ZodArray<z.ZodObject<{
444
+ id: z.ZodString;
445
+ description: z.ZodString;
446
+ status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
447
+ }, "strip", z.ZodTypeAny, {
448
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
449
+ id: string;
450
+ description: string;
451
+ }, {
452
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
453
+ id: string;
454
+ description: string;
455
+ }>, "many">;
456
+ }, "strip", z.ZodTypeAny, {
457
+ tasks: {
458
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
459
+ id: string;
460
+ description: string;
461
+ }[];
462
+ }, {
463
+ tasks: {
464
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
465
+ id: string;
466
+ description: string;
467
+ }[];
468
+ }>;
469
+ export type TaskList = z.infer<typeof taskListSchema>;
470
+ export declare const GATEWAY_CONFIRMATION_REQUIRED_PREFIX = "GATEWAY_CONFIRMATION_REQUIRED::";
471
+ export declare const gatewayConfirmationRequiredPayloadSchema: z.ZodObject<{
472
+ toolGroup: z.ZodString;
473
+ resource: z.ZodString;
474
+ description: z.ZodString;
475
+ options: z.ZodArray<z.ZodString, "many">;
476
+ }, "strip", z.ZodTypeAny, {
477
+ options: string[];
478
+ description: string;
479
+ toolGroup: string;
480
+ resource: string;
481
+ }, {
482
+ options: string[];
483
+ description: string;
484
+ toolGroup: string;
485
+ resource: string;
486
+ }>;
487
+ export type GatewayConfirmationRequiredPayload = z.infer<typeof gatewayConfirmationRequiredPayloadSchema>;
488
+ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
489
+ requestId: z.ZodString;
490
+ toolCallId: z.ZodString;
491
+ toolName: z.ZodString;
492
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
493
+ severity: z.ZodEnum<["destructive", "warning", "info"]>;
494
+ message: z.ZodString;
495
+ credentialRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
496
+ credentialType: z.ZodString;
497
+ reason: z.ZodString;
498
+ existingCredentials: z.ZodArray<z.ZodObject<{
499
+ id: z.ZodString;
500
+ name: z.ZodString;
501
+ }, "strip", z.ZodTypeAny, {
502
+ id: string;
503
+ name: string;
504
+ }, {
505
+ id: string;
506
+ name: string;
507
+ }>, "many">;
508
+ suggestedName: z.ZodOptional<z.ZodString>;
509
+ }, "strip", z.ZodTypeAny, {
510
+ credentialType: string;
511
+ reason: string;
512
+ existingCredentials: {
513
+ id: string;
514
+ name: string;
515
+ }[];
516
+ suggestedName?: string | undefined;
517
+ }, {
518
+ credentialType: string;
519
+ reason: string;
520
+ existingCredentials: {
521
+ id: string;
522
+ name: string;
523
+ }[];
524
+ suggestedName?: string | undefined;
525
+ }>, "many">>;
526
+ projectId: z.ZodOptional<z.ZodString>;
527
+ inputType: z.ZodOptional<z.ZodEnum<["approval", "text", "questions", "plan-review", "resource-decision"]>>;
528
+ questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
529
+ id: z.ZodString;
530
+ question: z.ZodString;
531
+ type: z.ZodEnum<["single", "multi", "text"]>;
532
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
533
+ }, "strip", z.ZodTypeAny, {
534
+ type: "text" | "single" | "multi";
535
+ id: string;
536
+ question: string;
537
+ options?: string[] | undefined;
538
+ }, {
539
+ type: "text" | "single" | "multi";
540
+ id: string;
541
+ question: string;
542
+ options?: string[] | undefined;
543
+ }>, "many">>;
544
+ introMessage: z.ZodOptional<z.ZodString>;
545
+ tasks: z.ZodOptional<z.ZodObject<{
546
+ tasks: z.ZodArray<z.ZodObject<{
547
+ id: z.ZodString;
548
+ description: z.ZodString;
549
+ status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
550
+ }, "strip", z.ZodTypeAny, {
551
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
552
+ id: string;
553
+ description: string;
554
+ }, {
555
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
556
+ id: string;
557
+ description: string;
558
+ }>, "many">;
559
+ }, "strip", z.ZodTypeAny, {
560
+ tasks: {
561
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
562
+ id: string;
563
+ description: string;
564
+ }[];
565
+ }, {
566
+ tasks: {
567
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
568
+ id: string;
569
+ description: string;
570
+ }[];
571
+ }>>;
572
+ domainAccess: z.ZodOptional<z.ZodObject<{
573
+ url: z.ZodString;
574
+ host: z.ZodString;
575
+ }, "strip", z.ZodTypeAny, {
576
+ url: string;
577
+ host: string;
578
+ }, {
579
+ url: string;
580
+ host: string;
581
+ }>>;
582
+ credentialFlow: z.ZodOptional<z.ZodObject<{
583
+ stage: z.ZodEnum<["generic", "finalize"]>;
584
+ }, "strip", z.ZodTypeAny, {
585
+ stage: "generic" | "finalize";
586
+ }, {
587
+ stage: "generic" | "finalize";
588
+ }>>;
589
+ setupRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
590
+ node: z.ZodObject<{
591
+ name: z.ZodString;
592
+ type: z.ZodString;
593
+ typeVersion: z.ZodNumber;
594
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
595
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
596
+ id: z.ZodString;
597
+ name: z.ZodString;
598
+ }, "strip", z.ZodTypeAny, {
599
+ id: string;
600
+ name: string;
601
+ }, {
602
+ id: string;
603
+ name: string;
604
+ }>>>;
605
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
606
+ id: z.ZodString;
607
+ }, "strip", z.ZodTypeAny, {
608
+ type: string;
609
+ id: string;
610
+ name: string;
611
+ typeVersion: number;
612
+ parameters: Record<string, unknown>;
613
+ position: [number, number];
614
+ credentials?: Record<string, {
615
+ id: string;
616
+ name: string;
617
+ }> | undefined;
618
+ }, {
619
+ type: string;
620
+ id: string;
621
+ name: string;
622
+ typeVersion: number;
623
+ parameters: Record<string, unknown>;
624
+ position: [number, number];
625
+ credentials?: Record<string, {
626
+ id: string;
627
+ name: string;
628
+ }> | undefined;
629
+ }>;
630
+ credentialType: z.ZodOptional<z.ZodString>;
631
+ existingCredentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
632
+ id: z.ZodString;
633
+ name: z.ZodString;
634
+ }, "strip", z.ZodTypeAny, {
635
+ id: string;
636
+ name: string;
637
+ }, {
638
+ id: string;
639
+ name: string;
640
+ }>, "many">>;
641
+ isTrigger: z.ZodBoolean;
642
+ isFirstTrigger: z.ZodOptional<z.ZodBoolean>;
643
+ isTestable: z.ZodOptional<z.ZodBoolean>;
644
+ isAutoApplied: z.ZodOptional<z.ZodBoolean>;
645
+ credentialTestResult: z.ZodOptional<z.ZodObject<{
646
+ success: z.ZodBoolean;
647
+ message: z.ZodOptional<z.ZodString>;
648
+ }, "strip", z.ZodTypeAny, {
649
+ success: boolean;
650
+ message?: string | undefined;
651
+ }, {
652
+ success: boolean;
653
+ message?: string | undefined;
654
+ }>>;
655
+ triggerTestResult: z.ZodOptional<z.ZodObject<{
656
+ status: z.ZodEnum<["success", "error", "listening"]>;
657
+ error: z.ZodOptional<z.ZodString>;
658
+ }, "strip", z.ZodTypeAny, {
659
+ status: "error" | "success" | "listening";
660
+ error?: string | undefined;
661
+ }, {
662
+ status: "error" | "success" | "listening";
663
+ error?: string | undefined;
664
+ }>>;
665
+ parameterIssues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
666
+ editableParameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
667
+ name: z.ZodString;
668
+ displayName: z.ZodString;
669
+ type: z.ZodString;
670
+ required: z.ZodOptional<z.ZodBoolean>;
671
+ default: z.ZodOptional<z.ZodUnknown>;
672
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
673
+ name: z.ZodString;
674
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
675
+ }, "strip", z.ZodTypeAny, {
676
+ value: string | number | boolean;
677
+ name: string;
678
+ }, {
679
+ value: string | number | boolean;
680
+ name: string;
681
+ }>, "many">>;
682
+ }, "strip", z.ZodTypeAny, {
683
+ type: string;
684
+ name: string;
685
+ displayName: string;
686
+ options?: {
687
+ value: string | number | boolean;
688
+ name: string;
689
+ }[] | undefined;
690
+ default?: unknown;
691
+ required?: boolean | undefined;
692
+ }, {
693
+ type: string;
694
+ name: string;
695
+ displayName: string;
696
+ options?: {
697
+ value: string | number | boolean;
698
+ name: string;
699
+ }[] | undefined;
700
+ default?: unknown;
701
+ required?: boolean | undefined;
702
+ }>, "many">>;
703
+ needsAction: z.ZodOptional<z.ZodBoolean>;
704
+ }, "strip", z.ZodTypeAny, {
705
+ node: {
706
+ type: string;
707
+ id: string;
708
+ name: string;
709
+ typeVersion: number;
710
+ parameters: Record<string, unknown>;
711
+ position: [number, number];
712
+ credentials?: Record<string, {
713
+ id: string;
714
+ name: string;
715
+ }> | undefined;
716
+ };
717
+ isTrigger: boolean;
718
+ credentialType?: string | undefined;
719
+ existingCredentials?: {
720
+ id: string;
721
+ name: string;
722
+ }[] | undefined;
723
+ isFirstTrigger?: boolean | undefined;
724
+ isTestable?: boolean | undefined;
725
+ isAutoApplied?: boolean | undefined;
726
+ credentialTestResult?: {
727
+ success: boolean;
728
+ message?: string | undefined;
729
+ } | undefined;
730
+ triggerTestResult?: {
731
+ status: "error" | "success" | "listening";
732
+ error?: string | undefined;
733
+ } | undefined;
734
+ parameterIssues?: Record<string, string[]> | undefined;
735
+ editableParameters?: {
736
+ type: string;
737
+ name: string;
738
+ displayName: string;
739
+ options?: {
740
+ value: string | number | boolean;
741
+ name: string;
742
+ }[] | undefined;
743
+ default?: unknown;
744
+ required?: boolean | undefined;
745
+ }[] | undefined;
746
+ needsAction?: boolean | undefined;
747
+ }, {
748
+ node: {
749
+ type: string;
750
+ id: string;
751
+ name: string;
752
+ typeVersion: number;
753
+ parameters: Record<string, unknown>;
754
+ position: [number, number];
755
+ credentials?: Record<string, {
756
+ id: string;
757
+ name: string;
758
+ }> | undefined;
759
+ };
760
+ isTrigger: boolean;
761
+ credentialType?: string | undefined;
762
+ existingCredentials?: {
763
+ id: string;
764
+ name: string;
765
+ }[] | undefined;
766
+ isFirstTrigger?: boolean | undefined;
767
+ isTestable?: boolean | undefined;
768
+ isAutoApplied?: boolean | undefined;
769
+ credentialTestResult?: {
770
+ success: boolean;
771
+ message?: string | undefined;
772
+ } | undefined;
773
+ triggerTestResult?: {
774
+ status: "error" | "success" | "listening";
775
+ error?: string | undefined;
776
+ } | undefined;
777
+ parameterIssues?: Record<string, string[]> | undefined;
778
+ editableParameters?: {
779
+ type: string;
780
+ name: string;
781
+ displayName: string;
782
+ options?: {
783
+ value: string | number | boolean;
784
+ name: string;
785
+ }[] | undefined;
786
+ default?: unknown;
787
+ required?: boolean | undefined;
788
+ }[] | undefined;
789
+ needsAction?: boolean | undefined;
790
+ }>, "many">>;
791
+ workflowId: z.ZodOptional<z.ZodString>;
792
+ resourceDecision: z.ZodOptional<z.ZodObject<{
793
+ toolGroup: z.ZodString;
794
+ resource: z.ZodString;
795
+ description: z.ZodString;
796
+ options: z.ZodArray<z.ZodString, "many">;
797
+ }, "strip", z.ZodTypeAny, {
798
+ options: string[];
799
+ description: string;
800
+ toolGroup: string;
801
+ resource: string;
802
+ }, {
803
+ options: string[];
804
+ description: string;
805
+ toolGroup: string;
806
+ resource: string;
807
+ }>>;
808
+ }, "strip", z.ZodTypeAny, {
809
+ message: string;
810
+ toolCallId: string;
811
+ toolName: string;
812
+ args: Record<string, unknown>;
813
+ requestId: string;
814
+ severity: "info" | "destructive" | "warning";
815
+ workflowId?: string | undefined;
816
+ projectId?: string | undefined;
817
+ tasks?: {
818
+ tasks: {
819
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
820
+ id: string;
821
+ description: string;
822
+ }[];
823
+ } | undefined;
824
+ credentialRequests?: {
825
+ credentialType: string;
826
+ reason: string;
827
+ existingCredentials: {
828
+ id: string;
829
+ name: string;
830
+ }[];
831
+ suggestedName?: string | undefined;
832
+ }[] | undefined;
833
+ questions?: {
834
+ type: "text" | "single" | "multi";
835
+ id: string;
836
+ question: string;
837
+ options?: string[] | undefined;
838
+ }[] | undefined;
839
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | undefined;
840
+ introMessage?: string | undefined;
841
+ domainAccess?: {
842
+ url: string;
843
+ host: string;
844
+ } | undefined;
845
+ credentialFlow?: {
846
+ stage: "generic" | "finalize";
847
+ } | undefined;
848
+ setupRequests?: {
849
+ node: {
850
+ type: string;
851
+ id: string;
852
+ name: string;
853
+ typeVersion: number;
854
+ parameters: Record<string, unknown>;
855
+ position: [number, number];
856
+ credentials?: Record<string, {
857
+ id: string;
858
+ name: string;
859
+ }> | undefined;
860
+ };
861
+ isTrigger: boolean;
862
+ credentialType?: string | undefined;
863
+ existingCredentials?: {
864
+ id: string;
865
+ name: string;
866
+ }[] | undefined;
867
+ isFirstTrigger?: boolean | undefined;
868
+ isTestable?: boolean | undefined;
869
+ isAutoApplied?: boolean | undefined;
870
+ credentialTestResult?: {
871
+ success: boolean;
872
+ message?: string | undefined;
873
+ } | undefined;
874
+ triggerTestResult?: {
875
+ status: "error" | "success" | "listening";
876
+ error?: string | undefined;
877
+ } | undefined;
878
+ parameterIssues?: Record<string, string[]> | undefined;
879
+ editableParameters?: {
880
+ type: string;
881
+ name: string;
882
+ displayName: string;
883
+ options?: {
884
+ value: string | number | boolean;
885
+ name: string;
886
+ }[] | undefined;
887
+ default?: unknown;
888
+ required?: boolean | undefined;
889
+ }[] | undefined;
890
+ needsAction?: boolean | undefined;
891
+ }[] | undefined;
892
+ resourceDecision?: {
893
+ options: string[];
894
+ description: string;
895
+ toolGroup: string;
896
+ resource: string;
897
+ } | undefined;
898
+ }, {
899
+ message: string;
900
+ toolCallId: string;
901
+ toolName: string;
902
+ args: Record<string, unknown>;
903
+ requestId: string;
904
+ severity: "info" | "destructive" | "warning";
905
+ workflowId?: string | undefined;
906
+ projectId?: string | undefined;
907
+ tasks?: {
908
+ tasks: {
909
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
910
+ id: string;
911
+ description: string;
912
+ }[];
913
+ } | undefined;
914
+ credentialRequests?: {
915
+ credentialType: string;
916
+ reason: string;
917
+ existingCredentials: {
918
+ id: string;
919
+ name: string;
920
+ }[];
921
+ suggestedName?: string | undefined;
922
+ }[] | undefined;
923
+ questions?: {
924
+ type: "text" | "single" | "multi";
925
+ id: string;
926
+ question: string;
927
+ options?: string[] | undefined;
928
+ }[] | undefined;
929
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | undefined;
930
+ introMessage?: string | undefined;
931
+ domainAccess?: {
932
+ url: string;
933
+ host: string;
934
+ } | undefined;
935
+ credentialFlow?: {
936
+ stage: "generic" | "finalize";
937
+ } | undefined;
938
+ setupRequests?: {
939
+ node: {
940
+ type: string;
941
+ id: string;
942
+ name: string;
943
+ typeVersion: number;
944
+ parameters: Record<string, unknown>;
945
+ position: [number, number];
946
+ credentials?: Record<string, {
947
+ id: string;
948
+ name: string;
949
+ }> | undefined;
950
+ };
951
+ isTrigger: boolean;
952
+ credentialType?: string | undefined;
953
+ existingCredentials?: {
954
+ id: string;
955
+ name: string;
956
+ }[] | undefined;
957
+ isFirstTrigger?: boolean | undefined;
958
+ isTestable?: boolean | undefined;
959
+ isAutoApplied?: boolean | undefined;
960
+ credentialTestResult?: {
961
+ success: boolean;
962
+ message?: string | undefined;
963
+ } | undefined;
964
+ triggerTestResult?: {
965
+ status: "error" | "success" | "listening";
966
+ error?: string | undefined;
967
+ } | undefined;
968
+ parameterIssues?: Record<string, string[]> | undefined;
969
+ editableParameters?: {
970
+ type: string;
971
+ name: string;
972
+ displayName: string;
973
+ options?: {
974
+ value: string | number | boolean;
975
+ name: string;
976
+ }[] | undefined;
977
+ default?: unknown;
978
+ required?: boolean | undefined;
979
+ }[] | undefined;
980
+ needsAction?: boolean | undefined;
981
+ }[] | undefined;
982
+ resourceDecision?: {
983
+ options: string[];
984
+ description: string;
985
+ toolGroup: string;
986
+ resource: string;
987
+ } | undefined;
988
+ }>;
989
+ export declare const statusPayloadSchema: z.ZodObject<{
990
+ message: z.ZodString;
991
+ }, "strip", z.ZodTypeAny, {
992
+ message: string;
993
+ }, {
994
+ message: string;
995
+ }>;
996
+ export declare const errorPayloadSchema: z.ZodObject<{
997
+ content: z.ZodString;
998
+ statusCode: z.ZodOptional<z.ZodNumber>;
999
+ provider: z.ZodOptional<z.ZodString>;
1000
+ technicalDetails: z.ZodOptional<z.ZodString>;
1001
+ }, "strip", z.ZodTypeAny, {
1002
+ content: string;
1003
+ provider?: string | undefined;
1004
+ statusCode?: number | undefined;
1005
+ technicalDetails?: string | undefined;
1006
+ }, {
1007
+ content: string;
1008
+ provider?: string | undefined;
1009
+ statusCode?: number | undefined;
1010
+ technicalDetails?: string | undefined;
1011
+ }>;
1012
+ export declare const mcpToolAnnotationsSchema: z.ZodObject<{
1013
+ category: z.ZodOptional<z.ZodString>;
1014
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
1015
+ destructiveHint: z.ZodOptional<z.ZodBoolean>;
1016
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
1017
+ openWorldHint: z.ZodOptional<z.ZodBoolean>;
1018
+ }, "strip", z.ZodTypeAny, {
1019
+ category?: string | undefined;
1020
+ readOnlyHint?: boolean | undefined;
1021
+ destructiveHint?: boolean | undefined;
1022
+ idempotentHint?: boolean | undefined;
1023
+ openWorldHint?: boolean | undefined;
1024
+ }, {
1025
+ category?: string | undefined;
1026
+ readOnlyHint?: boolean | undefined;
1027
+ destructiveHint?: boolean | undefined;
1028
+ idempotentHint?: boolean | undefined;
1029
+ openWorldHint?: boolean | undefined;
1030
+ }>;
1031
+ export type McpToolAnnotations = z.infer<typeof mcpToolAnnotationsSchema>;
1032
+ export declare const mcpToolSchema: z.ZodObject<{
1033
+ name: z.ZodString;
1034
+ description: z.ZodOptional<z.ZodString>;
1035
+ inputSchema: z.ZodUnion<[z.ZodObject<{
1036
+ type: z.ZodLiteral<"object">;
1037
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1038
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1039
+ }, "strip", z.ZodTypeAny, {
1040
+ type: "object";
1041
+ properties: Record<string, unknown>;
1042
+ required?: string[] | undefined;
1043
+ }, {
1044
+ type: "object";
1045
+ properties: Record<string, unknown>;
1046
+ required?: string[] | undefined;
1047
+ }>, z.ZodObject<{
1048
+ anyOf: z.ZodArray<z.ZodObject<{
1049
+ type: z.ZodLiteral<"object">;
1050
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1051
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1052
+ }, "strip", z.ZodTypeAny, {
1053
+ type: "object";
1054
+ properties: Record<string, unknown>;
1055
+ required?: string[] | undefined;
1056
+ }, {
1057
+ type: "object";
1058
+ properties: Record<string, unknown>;
1059
+ required?: string[] | undefined;
1060
+ }>, "many">;
1061
+ }, "strip", z.ZodTypeAny, {
1062
+ anyOf: {
1063
+ type: "object";
1064
+ properties: Record<string, unknown>;
1065
+ required?: string[] | undefined;
1066
+ }[];
1067
+ }, {
1068
+ anyOf: {
1069
+ type: "object";
1070
+ properties: Record<string, unknown>;
1071
+ required?: string[] | undefined;
1072
+ }[];
1073
+ }>, z.ZodObject<{
1074
+ oneOf: z.ZodArray<z.ZodObject<{
1075
+ type: z.ZodLiteral<"object">;
1076
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1077
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1078
+ }, "strip", z.ZodTypeAny, {
1079
+ type: "object";
1080
+ properties: Record<string, unknown>;
1081
+ required?: string[] | undefined;
1082
+ }, {
1083
+ type: "object";
1084
+ properties: Record<string, unknown>;
1085
+ required?: string[] | undefined;
1086
+ }>, "many">;
1087
+ }, "strip", z.ZodTypeAny, {
1088
+ oneOf: {
1089
+ type: "object";
1090
+ properties: Record<string, unknown>;
1091
+ required?: string[] | undefined;
1092
+ }[];
1093
+ }, {
1094
+ oneOf: {
1095
+ type: "object";
1096
+ properties: Record<string, unknown>;
1097
+ required?: string[] | undefined;
1098
+ }[];
1099
+ }>]>;
1100
+ annotations: z.ZodOptional<z.ZodObject<{
1101
+ category: z.ZodOptional<z.ZodString>;
1102
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
1103
+ destructiveHint: z.ZodOptional<z.ZodBoolean>;
1104
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
1105
+ openWorldHint: z.ZodOptional<z.ZodBoolean>;
1106
+ }, "strip", z.ZodTypeAny, {
1107
+ category?: string | undefined;
1108
+ readOnlyHint?: boolean | undefined;
1109
+ destructiveHint?: boolean | undefined;
1110
+ idempotentHint?: boolean | undefined;
1111
+ openWorldHint?: boolean | undefined;
1112
+ }, {
1113
+ category?: string | undefined;
1114
+ readOnlyHint?: boolean | undefined;
1115
+ destructiveHint?: boolean | undefined;
1116
+ idempotentHint?: boolean | undefined;
1117
+ openWorldHint?: boolean | undefined;
1118
+ }>>;
1119
+ }, "strip", z.ZodTypeAny, {
1120
+ name: string;
1121
+ inputSchema: {
1122
+ type: "object";
1123
+ properties: Record<string, unknown>;
1124
+ required?: string[] | undefined;
1125
+ } | {
1126
+ anyOf: {
1127
+ type: "object";
1128
+ properties: Record<string, unknown>;
1129
+ required?: string[] | undefined;
1130
+ }[];
1131
+ } | {
1132
+ oneOf: {
1133
+ type: "object";
1134
+ properties: Record<string, unknown>;
1135
+ required?: string[] | undefined;
1136
+ }[];
1137
+ };
1138
+ description?: string | undefined;
1139
+ annotations?: {
1140
+ category?: string | undefined;
1141
+ readOnlyHint?: boolean | undefined;
1142
+ destructiveHint?: boolean | undefined;
1143
+ idempotentHint?: boolean | undefined;
1144
+ openWorldHint?: boolean | undefined;
1145
+ } | undefined;
1146
+ }, {
1147
+ name: string;
1148
+ inputSchema: {
1149
+ type: "object";
1150
+ properties: Record<string, unknown>;
1151
+ required?: string[] | undefined;
1152
+ } | {
1153
+ anyOf: {
1154
+ type: "object";
1155
+ properties: Record<string, unknown>;
1156
+ required?: string[] | undefined;
1157
+ }[];
1158
+ } | {
1159
+ oneOf: {
1160
+ type: "object";
1161
+ properties: Record<string, unknown>;
1162
+ required?: string[] | undefined;
1163
+ }[];
1164
+ };
1165
+ description?: string | undefined;
1166
+ annotations?: {
1167
+ category?: string | undefined;
1168
+ readOnlyHint?: boolean | undefined;
1169
+ destructiveHint?: boolean | undefined;
1170
+ idempotentHint?: boolean | undefined;
1171
+ openWorldHint?: boolean | undefined;
1172
+ } | undefined;
1173
+ }>;
1174
+ export type McpTool = z.infer<typeof mcpToolSchema>;
1175
+ export declare const mcpToolCallRequestSchema: z.ZodObject<{
1176
+ name: z.ZodString;
1177
+ arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ name: string;
1180
+ arguments: Record<string, unknown>;
1181
+ }, {
1182
+ name: string;
1183
+ arguments: Record<string, unknown>;
1184
+ }>;
1185
+ export type McpToolCallRequest = z.infer<typeof mcpToolCallRequestSchema>;
1186
+ export declare const mcpToolCallResultSchema: z.ZodObject<{
1187
+ content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1188
+ type: z.ZodLiteral<"text">;
1189
+ text: z.ZodString;
1190
+ }, "strip", z.ZodTypeAny, {
1191
+ type: "text";
1192
+ text: string;
1193
+ }, {
1194
+ type: "text";
1195
+ text: string;
1196
+ }>, z.ZodObject<{
1197
+ type: z.ZodLiteral<"image">;
1198
+ data: z.ZodString;
1199
+ mimeType: z.ZodString;
1200
+ }, "strip", z.ZodTypeAny, {
1201
+ type: "image";
1202
+ data: string;
1203
+ mimeType: string;
1204
+ }, {
1205
+ type: "image";
1206
+ data: string;
1207
+ mimeType: string;
1208
+ }>]>, "many">;
1209
+ structuredContent: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1210
+ isError: z.ZodOptional<z.ZodBoolean>;
1211
+ }, "strip", z.ZodTypeAny, {
1212
+ content: ({
1213
+ type: "text";
1214
+ text: string;
1215
+ } | {
1216
+ type: "image";
1217
+ data: string;
1218
+ mimeType: string;
1219
+ })[];
1220
+ structuredContent?: Record<string, unknown> | undefined;
1221
+ isError?: boolean | undefined;
1222
+ }, {
1223
+ content: ({
1224
+ type: "text";
1225
+ text: string;
1226
+ } | {
1227
+ type: "image";
1228
+ data: string;
1229
+ mimeType: string;
1230
+ })[];
1231
+ structuredContent?: Record<string, unknown> | undefined;
1232
+ isError?: boolean | undefined;
1233
+ }>;
1234
+ export type McpToolCallResult = z.infer<typeof mcpToolCallResultSchema>;
1235
+ export declare const toolCategorySchema: z.ZodObject<{
1236
+ name: z.ZodString;
1237
+ enabled: z.ZodBoolean;
1238
+ writeAccess: z.ZodOptional<z.ZodBoolean>;
1239
+ }, "strip", z.ZodTypeAny, {
1240
+ name: string;
1241
+ enabled: boolean;
1242
+ writeAccess?: boolean | undefined;
1243
+ }, {
1244
+ name: string;
1245
+ enabled: boolean;
1246
+ writeAccess?: boolean | undefined;
1247
+ }>;
1248
+ export type ToolCategory = z.infer<typeof toolCategorySchema>;
1249
+ export declare const instanceAiGatewayCapabilitiesSchema: z.ZodObject<{
1250
+ rootPath: z.ZodString;
1251
+ tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
1252
+ name: z.ZodString;
1253
+ description: z.ZodOptional<z.ZodString>;
1254
+ inputSchema: z.ZodUnion<[z.ZodObject<{
1255
+ type: z.ZodLiteral<"object">;
1256
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1257
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1258
+ }, "strip", z.ZodTypeAny, {
1259
+ type: "object";
1260
+ properties: Record<string, unknown>;
1261
+ required?: string[] | undefined;
1262
+ }, {
1263
+ type: "object";
1264
+ properties: Record<string, unknown>;
1265
+ required?: string[] | undefined;
1266
+ }>, z.ZodObject<{
1267
+ anyOf: z.ZodArray<z.ZodObject<{
1268
+ type: z.ZodLiteral<"object">;
1269
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1270
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1271
+ }, "strip", z.ZodTypeAny, {
1272
+ type: "object";
1273
+ properties: Record<string, unknown>;
1274
+ required?: string[] | undefined;
1275
+ }, {
1276
+ type: "object";
1277
+ properties: Record<string, unknown>;
1278
+ required?: string[] | undefined;
1279
+ }>, "many">;
1280
+ }, "strip", z.ZodTypeAny, {
1281
+ anyOf: {
1282
+ type: "object";
1283
+ properties: Record<string, unknown>;
1284
+ required?: string[] | undefined;
1285
+ }[];
1286
+ }, {
1287
+ anyOf: {
1288
+ type: "object";
1289
+ properties: Record<string, unknown>;
1290
+ required?: string[] | undefined;
1291
+ }[];
1292
+ }>, z.ZodObject<{
1293
+ oneOf: z.ZodArray<z.ZodObject<{
1294
+ type: z.ZodLiteral<"object">;
1295
+ properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1296
+ required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1297
+ }, "strip", z.ZodTypeAny, {
1298
+ type: "object";
1299
+ properties: Record<string, unknown>;
1300
+ required?: string[] | undefined;
1301
+ }, {
1302
+ type: "object";
1303
+ properties: Record<string, unknown>;
1304
+ required?: string[] | undefined;
1305
+ }>, "many">;
1306
+ }, "strip", z.ZodTypeAny, {
1307
+ oneOf: {
1308
+ type: "object";
1309
+ properties: Record<string, unknown>;
1310
+ required?: string[] | undefined;
1311
+ }[];
1312
+ }, {
1313
+ oneOf: {
1314
+ type: "object";
1315
+ properties: Record<string, unknown>;
1316
+ required?: string[] | undefined;
1317
+ }[];
1318
+ }>]>;
1319
+ annotations: z.ZodOptional<z.ZodObject<{
1320
+ category: z.ZodOptional<z.ZodString>;
1321
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
1322
+ destructiveHint: z.ZodOptional<z.ZodBoolean>;
1323
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
1324
+ openWorldHint: z.ZodOptional<z.ZodBoolean>;
1325
+ }, "strip", z.ZodTypeAny, {
1326
+ category?: string | undefined;
1327
+ readOnlyHint?: boolean | undefined;
1328
+ destructiveHint?: boolean | undefined;
1329
+ idempotentHint?: boolean | undefined;
1330
+ openWorldHint?: boolean | undefined;
1331
+ }, {
1332
+ category?: string | undefined;
1333
+ readOnlyHint?: boolean | undefined;
1334
+ destructiveHint?: boolean | undefined;
1335
+ idempotentHint?: boolean | undefined;
1336
+ openWorldHint?: boolean | undefined;
1337
+ }>>;
1338
+ }, "strip", z.ZodTypeAny, {
1339
+ name: string;
1340
+ inputSchema: {
1341
+ type: "object";
1342
+ properties: Record<string, unknown>;
1343
+ required?: string[] | undefined;
1344
+ } | {
1345
+ anyOf: {
1346
+ type: "object";
1347
+ properties: Record<string, unknown>;
1348
+ required?: string[] | undefined;
1349
+ }[];
1350
+ } | {
1351
+ oneOf: {
1352
+ type: "object";
1353
+ properties: Record<string, unknown>;
1354
+ required?: string[] | undefined;
1355
+ }[];
1356
+ };
1357
+ description?: string | undefined;
1358
+ annotations?: {
1359
+ category?: string | undefined;
1360
+ readOnlyHint?: boolean | undefined;
1361
+ destructiveHint?: boolean | undefined;
1362
+ idempotentHint?: boolean | undefined;
1363
+ openWorldHint?: boolean | undefined;
1364
+ } | undefined;
1365
+ }, {
1366
+ name: string;
1367
+ inputSchema: {
1368
+ type: "object";
1369
+ properties: Record<string, unknown>;
1370
+ required?: string[] | undefined;
1371
+ } | {
1372
+ anyOf: {
1373
+ type: "object";
1374
+ properties: Record<string, unknown>;
1375
+ required?: string[] | undefined;
1376
+ }[];
1377
+ } | {
1378
+ oneOf: {
1379
+ type: "object";
1380
+ properties: Record<string, unknown>;
1381
+ required?: string[] | undefined;
1382
+ }[];
1383
+ };
1384
+ description?: string | undefined;
1385
+ annotations?: {
1386
+ category?: string | undefined;
1387
+ readOnlyHint?: boolean | undefined;
1388
+ destructiveHint?: boolean | undefined;
1389
+ idempotentHint?: boolean | undefined;
1390
+ openWorldHint?: boolean | undefined;
1391
+ } | undefined;
1392
+ }>, "many">>;
1393
+ hostIdentifier: z.ZodOptional<z.ZodString>;
1394
+ toolCategories: z.ZodDefault<z.ZodArray<z.ZodObject<{
1395
+ name: z.ZodString;
1396
+ enabled: z.ZodBoolean;
1397
+ writeAccess: z.ZodOptional<z.ZodBoolean>;
1398
+ }, "strip", z.ZodTypeAny, {
1399
+ name: string;
1400
+ enabled: boolean;
1401
+ writeAccess?: boolean | undefined;
1402
+ }, {
1403
+ name: string;
1404
+ enabled: boolean;
1405
+ writeAccess?: boolean | undefined;
1406
+ }>, "many">>;
1407
+ }, "strip", z.ZodTypeAny, {
1408
+ tools: {
1409
+ name: string;
1410
+ inputSchema: {
1411
+ type: "object";
1412
+ properties: Record<string, unknown>;
1413
+ required?: string[] | undefined;
1414
+ } | {
1415
+ anyOf: {
1416
+ type: "object";
1417
+ properties: Record<string, unknown>;
1418
+ required?: string[] | undefined;
1419
+ }[];
1420
+ } | {
1421
+ oneOf: {
1422
+ type: "object";
1423
+ properties: Record<string, unknown>;
1424
+ required?: string[] | undefined;
1425
+ }[];
1426
+ };
1427
+ description?: string | undefined;
1428
+ annotations?: {
1429
+ category?: string | undefined;
1430
+ readOnlyHint?: boolean | undefined;
1431
+ destructiveHint?: boolean | undefined;
1432
+ idempotentHint?: boolean | undefined;
1433
+ openWorldHint?: boolean | undefined;
1434
+ } | undefined;
1435
+ }[];
1436
+ rootPath: string;
1437
+ toolCategories: {
1438
+ name: string;
1439
+ enabled: boolean;
1440
+ writeAccess?: boolean | undefined;
1441
+ }[];
1442
+ hostIdentifier?: string | undefined;
1443
+ }, {
1444
+ rootPath: string;
1445
+ tools?: {
1446
+ name: string;
1447
+ inputSchema: {
1448
+ type: "object";
1449
+ properties: Record<string, unknown>;
1450
+ required?: string[] | undefined;
1451
+ } | {
1452
+ anyOf: {
1453
+ type: "object";
1454
+ properties: Record<string, unknown>;
1455
+ required?: string[] | undefined;
1456
+ }[];
1457
+ } | {
1458
+ oneOf: {
1459
+ type: "object";
1460
+ properties: Record<string, unknown>;
1461
+ required?: string[] | undefined;
1462
+ }[];
1463
+ };
1464
+ description?: string | undefined;
1465
+ annotations?: {
1466
+ category?: string | undefined;
1467
+ readOnlyHint?: boolean | undefined;
1468
+ destructiveHint?: boolean | undefined;
1469
+ idempotentHint?: boolean | undefined;
1470
+ openWorldHint?: boolean | undefined;
1471
+ } | undefined;
1472
+ }[] | undefined;
1473
+ hostIdentifier?: string | undefined;
1474
+ toolCategories?: {
1475
+ name: string;
1476
+ enabled: boolean;
1477
+ writeAccess?: boolean | undefined;
1478
+ }[] | undefined;
1479
+ }>;
1480
+ export type InstanceAiGatewayCapabilities = z.infer<typeof instanceAiGatewayCapabilitiesSchema>;
1481
+ export declare const filesystemRequestPayloadSchema: z.ZodObject<{
1482
+ requestId: z.ZodString;
1483
+ toolCall: z.ZodObject<{
1484
+ name: z.ZodString;
1485
+ arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1486
+ }, "strip", z.ZodTypeAny, {
1487
+ name: string;
1488
+ arguments: Record<string, unknown>;
1489
+ }, {
1490
+ name: string;
1491
+ arguments: Record<string, unknown>;
1492
+ }>;
1493
+ }, "strip", z.ZodTypeAny, {
1494
+ requestId: string;
1495
+ toolCall: {
1496
+ name: string;
1497
+ arguments: Record<string, unknown>;
1498
+ };
1499
+ }, {
1500
+ requestId: string;
1501
+ toolCall: {
1502
+ name: string;
1503
+ arguments: Record<string, unknown>;
1504
+ };
1505
+ }>;
1506
+ export declare const instanceAiFilesystemResponseSchema: z.ZodObject<{
1507
+ result: z.ZodOptional<z.ZodObject<{
1508
+ content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1509
+ type: z.ZodLiteral<"text">;
1510
+ text: z.ZodString;
1511
+ }, "strip", z.ZodTypeAny, {
1512
+ type: "text";
1513
+ text: string;
1514
+ }, {
1515
+ type: "text";
1516
+ text: string;
1517
+ }>, z.ZodObject<{
1518
+ type: z.ZodLiteral<"image">;
1519
+ data: z.ZodString;
1520
+ mimeType: z.ZodString;
1521
+ }, "strip", z.ZodTypeAny, {
1522
+ type: "image";
1523
+ data: string;
1524
+ mimeType: string;
1525
+ }, {
1526
+ type: "image";
1527
+ data: string;
1528
+ mimeType: string;
1529
+ }>]>, "many">;
1530
+ structuredContent: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1531
+ isError: z.ZodOptional<z.ZodBoolean>;
1532
+ }, "strip", z.ZodTypeAny, {
1533
+ content: ({
1534
+ type: "text";
1535
+ text: string;
1536
+ } | {
1537
+ type: "image";
1538
+ data: string;
1539
+ mimeType: string;
1540
+ })[];
1541
+ structuredContent?: Record<string, unknown> | undefined;
1542
+ isError?: boolean | undefined;
1543
+ }, {
1544
+ content: ({
1545
+ type: "text";
1546
+ text: string;
1547
+ } | {
1548
+ type: "image";
1549
+ data: string;
1550
+ mimeType: string;
1551
+ })[];
1552
+ structuredContent?: Record<string, unknown> | undefined;
1553
+ isError?: boolean | undefined;
1554
+ }>>;
1555
+ error: z.ZodOptional<z.ZodString>;
1556
+ }, "strip", z.ZodTypeAny, {
1557
+ error?: string | undefined;
1558
+ result?: {
1559
+ content: ({
1560
+ type: "text";
1561
+ text: string;
1562
+ } | {
1563
+ type: "image";
1564
+ data: string;
1565
+ mimeType: string;
1566
+ })[];
1567
+ structuredContent?: Record<string, unknown> | undefined;
1568
+ isError?: boolean | undefined;
1569
+ } | undefined;
1570
+ }, {
1571
+ error?: string | undefined;
1572
+ result?: {
1573
+ content: ({
1574
+ type: "text";
1575
+ text: string;
1576
+ } | {
1577
+ type: "image";
1578
+ data: string;
1579
+ mimeType: string;
1580
+ })[];
1581
+ structuredContent?: Record<string, unknown> | undefined;
1582
+ isError?: boolean | undefined;
1583
+ } | undefined;
1584
+ }>;
1585
+ export declare const tasksUpdatePayloadSchema: z.ZodObject<{
1586
+ tasks: z.ZodObject<{
1587
+ tasks: z.ZodArray<z.ZodObject<{
1588
+ id: z.ZodString;
1589
+ description: z.ZodString;
1590
+ status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
1591
+ }, "strip", z.ZodTypeAny, {
1592
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
1593
+ id: string;
1594
+ description: string;
1595
+ }, {
1596
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
1597
+ id: string;
1598
+ description: string;
1599
+ }>, "many">;
1600
+ }, "strip", z.ZodTypeAny, {
1601
+ tasks: {
1602
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
1603
+ id: string;
1604
+ description: string;
1605
+ }[];
1606
+ }, {
1607
+ tasks: {
1608
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
1609
+ id: string;
1610
+ description: string;
1611
+ }[];
1612
+ }>;
1613
+ }, "strip", z.ZodTypeAny, {
1614
+ tasks: {
1615
+ tasks: {
1616
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
1617
+ id: string;
1618
+ description: string;
1619
+ }[];
1620
+ };
1621
+ }, {
1622
+ tasks: {
1623
+ tasks: {
1624
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
1625
+ id: string;
1626
+ description: string;
1627
+ }[];
1628
+ };
1629
+ }>;
1630
+ export declare const threadTitleUpdatedPayloadSchema: z.ZodObject<{
1631
+ title: z.ZodString;
1632
+ }, "strip", z.ZodTypeAny, {
1633
+ title: string;
1634
+ }, {
1635
+ title: string;
1636
+ }>;
1637
+ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1638
+ payload: z.ZodObject<{
1639
+ messageId: z.ZodString;
1640
+ messageGroupId: z.ZodOptional<z.ZodString>;
1641
+ }, "strip", z.ZodTypeAny, {
1642
+ messageId: string;
1643
+ messageGroupId?: string | undefined;
1644
+ }, {
1645
+ messageId: string;
1646
+ messageGroupId?: string | undefined;
1647
+ }>;
1648
+ runId: z.ZodString;
1649
+ agentId: z.ZodString;
1650
+ userId: z.ZodOptional<z.ZodString>;
1651
+ type: z.ZodLiteral<"run-start">;
1652
+ }, "strip", z.ZodTypeAny, {
1653
+ type: "run-start";
1654
+ agentId: string;
1655
+ payload: {
1656
+ messageId: string;
1657
+ messageGroupId?: string | undefined;
1658
+ };
1659
+ runId: string;
1660
+ userId?: string | undefined;
1661
+ }, {
1662
+ type: "run-start";
1663
+ agentId: string;
1664
+ payload: {
1665
+ messageId: string;
1666
+ messageGroupId?: string | undefined;
1667
+ };
1668
+ runId: string;
1669
+ userId?: string | undefined;
1670
+ }>, z.ZodObject<{
1671
+ payload: z.ZodObject<{
1672
+ status: z.ZodEnum<["completed", "cancelled", "error"]>;
1673
+ reason: z.ZodOptional<z.ZodString>;
1674
+ }, "strip", z.ZodTypeAny, {
1675
+ status: "error" | "cancelled" | "completed";
1676
+ reason?: string | undefined;
1677
+ }, {
1678
+ status: "error" | "cancelled" | "completed";
1679
+ reason?: string | undefined;
1680
+ }>;
1681
+ runId: z.ZodString;
1682
+ agentId: z.ZodString;
1683
+ userId: z.ZodOptional<z.ZodString>;
1684
+ type: z.ZodLiteral<"run-finish">;
1685
+ }, "strip", z.ZodTypeAny, {
1686
+ type: "run-finish";
1687
+ agentId: string;
1688
+ payload: {
1689
+ status: "error" | "cancelled" | "completed";
1690
+ reason?: string | undefined;
1691
+ };
1692
+ runId: string;
1693
+ userId?: string | undefined;
1694
+ }, {
1695
+ type: "run-finish";
1696
+ agentId: string;
1697
+ payload: {
1698
+ status: "error" | "cancelled" | "completed";
1699
+ reason?: string | undefined;
1700
+ };
1701
+ runId: string;
1702
+ userId?: string | undefined;
1703
+ }>, z.ZodObject<{
1704
+ payload: z.ZodObject<{
1705
+ parentId: z.ZodString;
1706
+ role: z.ZodString;
1707
+ tools: z.ZodArray<z.ZodString, "many">;
1708
+ taskId: z.ZodOptional<z.ZodString>;
1709
+ kind: z.ZodOptional<z.ZodEnum<["builder", "data-table", "researcher", "delegate", "browser-setup"]>>;
1710
+ title: z.ZodOptional<z.ZodString>;
1711
+ subtitle: z.ZodOptional<z.ZodString>;
1712
+ goal: z.ZodOptional<z.ZodString>;
1713
+ targetResource: z.ZodOptional<z.ZodObject<{
1714
+ type: z.ZodEnum<["workflow", "data-table", "credential", "other"]>;
1715
+ id: z.ZodOptional<z.ZodString>;
1716
+ name: z.ZodOptional<z.ZodString>;
1717
+ }, "strip", z.ZodTypeAny, {
1718
+ type: "workflow" | "credential" | "data-table" | "other";
1719
+ id?: string | undefined;
1720
+ name?: string | undefined;
1721
+ }, {
1722
+ type: "workflow" | "credential" | "data-table" | "other";
1723
+ id?: string | undefined;
1724
+ name?: string | undefined;
1725
+ }>>;
1726
+ }, "strip", z.ZodTypeAny, {
1727
+ role: string;
1728
+ parentId: string;
1729
+ tools: string[];
1730
+ title?: string | undefined;
1731
+ taskId?: string | undefined;
1732
+ kind?: "builder" | "data-table" | "researcher" | "delegate" | "browser-setup" | undefined;
1733
+ subtitle?: string | undefined;
1734
+ goal?: string | undefined;
1735
+ targetResource?: {
1736
+ type: "workflow" | "credential" | "data-table" | "other";
1737
+ id?: string | undefined;
1738
+ name?: string | undefined;
1739
+ } | undefined;
1740
+ }, {
1741
+ role: string;
1742
+ parentId: string;
1743
+ tools: string[];
1744
+ title?: string | undefined;
1745
+ taskId?: string | undefined;
1746
+ kind?: "builder" | "data-table" | "researcher" | "delegate" | "browser-setup" | undefined;
1747
+ subtitle?: string | undefined;
1748
+ goal?: string | undefined;
1749
+ targetResource?: {
1750
+ type: "workflow" | "credential" | "data-table" | "other";
1751
+ id?: string | undefined;
1752
+ name?: string | undefined;
1753
+ } | undefined;
1754
+ }>;
1755
+ runId: z.ZodString;
1756
+ agentId: z.ZodString;
1757
+ userId: z.ZodOptional<z.ZodString>;
1758
+ type: z.ZodLiteral<"agent-spawned">;
1759
+ }, "strip", z.ZodTypeAny, {
1760
+ type: "agent-spawned";
1761
+ agentId: string;
1762
+ payload: {
1763
+ role: string;
1764
+ parentId: string;
1765
+ tools: string[];
1766
+ title?: string | undefined;
1767
+ taskId?: string | undefined;
1768
+ kind?: "builder" | "data-table" | "researcher" | "delegate" | "browser-setup" | undefined;
1769
+ subtitle?: string | undefined;
1770
+ goal?: string | undefined;
1771
+ targetResource?: {
1772
+ type: "workflow" | "credential" | "data-table" | "other";
1773
+ id?: string | undefined;
1774
+ name?: string | undefined;
1775
+ } | undefined;
1776
+ };
1777
+ runId: string;
1778
+ userId?: string | undefined;
1779
+ }, {
1780
+ type: "agent-spawned";
1781
+ agentId: string;
1782
+ payload: {
1783
+ role: string;
1784
+ parentId: string;
1785
+ tools: string[];
1786
+ title?: string | undefined;
1787
+ taskId?: string | undefined;
1788
+ kind?: "builder" | "data-table" | "researcher" | "delegate" | "browser-setup" | undefined;
1789
+ subtitle?: string | undefined;
1790
+ goal?: string | undefined;
1791
+ targetResource?: {
1792
+ type: "workflow" | "credential" | "data-table" | "other";
1793
+ id?: string | undefined;
1794
+ name?: string | undefined;
1795
+ } | undefined;
1796
+ };
1797
+ runId: string;
1798
+ userId?: string | undefined;
1799
+ }>, z.ZodObject<{
1800
+ payload: z.ZodObject<{
1801
+ role: z.ZodString;
1802
+ result: z.ZodString;
1803
+ error: z.ZodOptional<z.ZodString>;
1804
+ }, "strip", z.ZodTypeAny, {
1805
+ role: string;
1806
+ result: string;
1807
+ error?: string | undefined;
1808
+ }, {
1809
+ role: string;
1810
+ result: string;
1811
+ error?: string | undefined;
1812
+ }>;
1813
+ runId: z.ZodString;
1814
+ agentId: z.ZodString;
1815
+ userId: z.ZodOptional<z.ZodString>;
1816
+ type: z.ZodLiteral<"agent-completed">;
1817
+ }, "strip", z.ZodTypeAny, {
1818
+ type: "agent-completed";
1819
+ agentId: string;
1820
+ payload: {
1821
+ role: string;
1822
+ result: string;
1823
+ error?: string | undefined;
1824
+ };
1825
+ runId: string;
1826
+ userId?: string | undefined;
1827
+ }, {
1828
+ type: "agent-completed";
1829
+ agentId: string;
1830
+ payload: {
1831
+ role: string;
1832
+ result: string;
1833
+ error?: string | undefined;
1834
+ };
1835
+ runId: string;
1836
+ userId?: string | undefined;
1837
+ }>, z.ZodObject<{
1838
+ payload: z.ZodObject<{
1839
+ text: z.ZodString;
1840
+ }, "strip", z.ZodTypeAny, {
1841
+ text: string;
1842
+ }, {
1843
+ text: string;
1844
+ }>;
1845
+ runId: z.ZodString;
1846
+ agentId: z.ZodString;
1847
+ userId: z.ZodOptional<z.ZodString>;
1848
+ type: z.ZodLiteral<"text-delta">;
1849
+ }, "strip", z.ZodTypeAny, {
1850
+ type: "text-delta";
1851
+ agentId: string;
1852
+ payload: {
1853
+ text: string;
1854
+ };
1855
+ runId: string;
1856
+ userId?: string | undefined;
1857
+ }, {
1858
+ type: "text-delta";
1859
+ agentId: string;
1860
+ payload: {
1861
+ text: string;
1862
+ };
1863
+ runId: string;
1864
+ userId?: string | undefined;
1865
+ }>, z.ZodObject<{
1866
+ payload: z.ZodObject<{
1867
+ text: z.ZodString;
1868
+ }, "strip", z.ZodTypeAny, {
1869
+ text: string;
1870
+ }, {
1871
+ text: string;
1872
+ }>;
1873
+ runId: z.ZodString;
1874
+ agentId: z.ZodString;
1875
+ userId: z.ZodOptional<z.ZodString>;
1876
+ type: z.ZodLiteral<"reasoning-delta">;
1877
+ }, "strip", z.ZodTypeAny, {
1878
+ type: "reasoning-delta";
1879
+ agentId: string;
1880
+ payload: {
1881
+ text: string;
1882
+ };
1883
+ runId: string;
1884
+ userId?: string | undefined;
1885
+ }, {
1886
+ type: "reasoning-delta";
1887
+ agentId: string;
1888
+ payload: {
1889
+ text: string;
1890
+ };
1891
+ runId: string;
1892
+ userId?: string | undefined;
1893
+ }>, z.ZodObject<{
1894
+ payload: z.ZodObject<{
1895
+ toolCallId: z.ZodString;
1896
+ toolName: z.ZodString;
1897
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1898
+ }, "strip", z.ZodTypeAny, {
1899
+ toolCallId: string;
1900
+ toolName: string;
1901
+ args: Record<string, unknown>;
1902
+ }, {
1903
+ toolCallId: string;
1904
+ toolName: string;
1905
+ args: Record<string, unknown>;
1906
+ }>;
1907
+ runId: z.ZodString;
1908
+ agentId: z.ZodString;
1909
+ userId: z.ZodOptional<z.ZodString>;
1910
+ type: z.ZodLiteral<"tool-call">;
1911
+ }, "strip", z.ZodTypeAny, {
1912
+ type: "tool-call";
1913
+ agentId: string;
1914
+ payload: {
1915
+ toolCallId: string;
1916
+ toolName: string;
1917
+ args: Record<string, unknown>;
1918
+ };
1919
+ runId: string;
1920
+ userId?: string | undefined;
1921
+ }, {
1922
+ type: "tool-call";
1923
+ agentId: string;
1924
+ payload: {
1925
+ toolCallId: string;
1926
+ toolName: string;
1927
+ args: Record<string, unknown>;
1928
+ };
1929
+ runId: string;
1930
+ userId?: string | undefined;
1931
+ }>, z.ZodObject<{
1932
+ payload: z.ZodObject<{
1933
+ toolCallId: z.ZodString;
1934
+ result: z.ZodUnknown;
1935
+ }, "strip", z.ZodTypeAny, {
1936
+ toolCallId: string;
1937
+ result?: unknown;
1938
+ }, {
1939
+ toolCallId: string;
1940
+ result?: unknown;
1941
+ }>;
1942
+ runId: z.ZodString;
1943
+ agentId: z.ZodString;
1944
+ userId: z.ZodOptional<z.ZodString>;
1945
+ type: z.ZodLiteral<"tool-result">;
1946
+ }, "strip", z.ZodTypeAny, {
1947
+ type: "tool-result";
1948
+ agentId: string;
1949
+ payload: {
1950
+ toolCallId: string;
1951
+ result?: unknown;
1952
+ };
1953
+ runId: string;
1954
+ userId?: string | undefined;
1955
+ }, {
1956
+ type: "tool-result";
1957
+ agentId: string;
1958
+ payload: {
1959
+ toolCallId: string;
1960
+ result?: unknown;
1961
+ };
1962
+ runId: string;
1963
+ userId?: string | undefined;
1964
+ }>, z.ZodObject<{
1965
+ payload: z.ZodObject<{
1966
+ toolCallId: z.ZodString;
1967
+ error: z.ZodString;
1968
+ }, "strip", z.ZodTypeAny, {
1969
+ error: string;
1970
+ toolCallId: string;
1971
+ }, {
1972
+ error: string;
1973
+ toolCallId: string;
1974
+ }>;
1975
+ runId: z.ZodString;
1976
+ agentId: z.ZodString;
1977
+ userId: z.ZodOptional<z.ZodString>;
1978
+ type: z.ZodLiteral<"tool-error">;
1979
+ }, "strip", z.ZodTypeAny, {
1980
+ type: "tool-error";
1981
+ agentId: string;
1982
+ payload: {
1983
+ error: string;
1984
+ toolCallId: string;
1985
+ };
1986
+ runId: string;
1987
+ userId?: string | undefined;
1988
+ }, {
1989
+ type: "tool-error";
1990
+ agentId: string;
1991
+ payload: {
1992
+ error: string;
1993
+ toolCallId: string;
1994
+ };
1995
+ runId: string;
1996
+ userId?: string | undefined;
1997
+ }>, z.ZodObject<{
1998
+ payload: z.ZodObject<{
1999
+ requestId: z.ZodString;
2000
+ toolCallId: z.ZodString;
2001
+ toolName: z.ZodString;
2002
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2003
+ severity: z.ZodEnum<["destructive", "warning", "info"]>;
2004
+ message: z.ZodString;
2005
+ credentialRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2006
+ credentialType: z.ZodString;
2007
+ reason: z.ZodString;
2008
+ existingCredentials: z.ZodArray<z.ZodObject<{
2009
+ id: z.ZodString;
2010
+ name: z.ZodString;
2011
+ }, "strip", z.ZodTypeAny, {
2012
+ id: string;
2013
+ name: string;
2014
+ }, {
2015
+ id: string;
2016
+ name: string;
2017
+ }>, "many">;
2018
+ suggestedName: z.ZodOptional<z.ZodString>;
2019
+ }, "strip", z.ZodTypeAny, {
2020
+ credentialType: string;
2021
+ reason: string;
2022
+ existingCredentials: {
2023
+ id: string;
2024
+ name: string;
2025
+ }[];
2026
+ suggestedName?: string | undefined;
2027
+ }, {
2028
+ credentialType: string;
2029
+ reason: string;
2030
+ existingCredentials: {
2031
+ id: string;
2032
+ name: string;
2033
+ }[];
2034
+ suggestedName?: string | undefined;
2035
+ }>, "many">>;
2036
+ projectId: z.ZodOptional<z.ZodString>;
2037
+ inputType: z.ZodOptional<z.ZodEnum<["approval", "text", "questions", "plan-review", "resource-decision"]>>;
2038
+ questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2039
+ id: z.ZodString;
2040
+ question: z.ZodString;
2041
+ type: z.ZodEnum<["single", "multi", "text"]>;
2042
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2043
+ }, "strip", z.ZodTypeAny, {
2044
+ type: "text" | "single" | "multi";
2045
+ id: string;
2046
+ question: string;
2047
+ options?: string[] | undefined;
2048
+ }, {
2049
+ type: "text" | "single" | "multi";
2050
+ id: string;
2051
+ question: string;
2052
+ options?: string[] | undefined;
2053
+ }>, "many">>;
2054
+ introMessage: z.ZodOptional<z.ZodString>;
2055
+ tasks: z.ZodOptional<z.ZodObject<{
2056
+ tasks: z.ZodArray<z.ZodObject<{
2057
+ id: z.ZodString;
2058
+ description: z.ZodString;
2059
+ status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
2060
+ }, "strip", z.ZodTypeAny, {
2061
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2062
+ id: string;
2063
+ description: string;
2064
+ }, {
2065
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2066
+ id: string;
2067
+ description: string;
2068
+ }>, "many">;
2069
+ }, "strip", z.ZodTypeAny, {
2070
+ tasks: {
2071
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2072
+ id: string;
2073
+ description: string;
2074
+ }[];
2075
+ }, {
2076
+ tasks: {
2077
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2078
+ id: string;
2079
+ description: string;
2080
+ }[];
2081
+ }>>;
2082
+ domainAccess: z.ZodOptional<z.ZodObject<{
2083
+ url: z.ZodString;
2084
+ host: z.ZodString;
2085
+ }, "strip", z.ZodTypeAny, {
2086
+ url: string;
2087
+ host: string;
2088
+ }, {
2089
+ url: string;
2090
+ host: string;
2091
+ }>>;
2092
+ credentialFlow: z.ZodOptional<z.ZodObject<{
2093
+ stage: z.ZodEnum<["generic", "finalize"]>;
2094
+ }, "strip", z.ZodTypeAny, {
2095
+ stage: "generic" | "finalize";
2096
+ }, {
2097
+ stage: "generic" | "finalize";
2098
+ }>>;
2099
+ setupRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2100
+ node: z.ZodObject<{
2101
+ name: z.ZodString;
2102
+ type: z.ZodString;
2103
+ typeVersion: z.ZodNumber;
2104
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2105
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2106
+ id: z.ZodString;
2107
+ name: z.ZodString;
2108
+ }, "strip", z.ZodTypeAny, {
2109
+ id: string;
2110
+ name: string;
2111
+ }, {
2112
+ id: string;
2113
+ name: string;
2114
+ }>>>;
2115
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
2116
+ id: z.ZodString;
2117
+ }, "strip", z.ZodTypeAny, {
2118
+ type: string;
2119
+ id: string;
2120
+ name: string;
2121
+ typeVersion: number;
2122
+ parameters: Record<string, unknown>;
2123
+ position: [number, number];
2124
+ credentials?: Record<string, {
2125
+ id: string;
2126
+ name: string;
2127
+ }> | undefined;
2128
+ }, {
2129
+ type: string;
2130
+ id: string;
2131
+ name: string;
2132
+ typeVersion: number;
2133
+ parameters: Record<string, unknown>;
2134
+ position: [number, number];
2135
+ credentials?: Record<string, {
2136
+ id: string;
2137
+ name: string;
2138
+ }> | undefined;
2139
+ }>;
2140
+ credentialType: z.ZodOptional<z.ZodString>;
2141
+ existingCredentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
2142
+ id: z.ZodString;
2143
+ name: z.ZodString;
2144
+ }, "strip", z.ZodTypeAny, {
2145
+ id: string;
2146
+ name: string;
2147
+ }, {
2148
+ id: string;
2149
+ name: string;
2150
+ }>, "many">>;
2151
+ isTrigger: z.ZodBoolean;
2152
+ isFirstTrigger: z.ZodOptional<z.ZodBoolean>;
2153
+ isTestable: z.ZodOptional<z.ZodBoolean>;
2154
+ isAutoApplied: z.ZodOptional<z.ZodBoolean>;
2155
+ credentialTestResult: z.ZodOptional<z.ZodObject<{
2156
+ success: z.ZodBoolean;
2157
+ message: z.ZodOptional<z.ZodString>;
2158
+ }, "strip", z.ZodTypeAny, {
2159
+ success: boolean;
2160
+ message?: string | undefined;
2161
+ }, {
2162
+ success: boolean;
2163
+ message?: string | undefined;
2164
+ }>>;
2165
+ triggerTestResult: z.ZodOptional<z.ZodObject<{
2166
+ status: z.ZodEnum<["success", "error", "listening"]>;
2167
+ error: z.ZodOptional<z.ZodString>;
2168
+ }, "strip", z.ZodTypeAny, {
2169
+ status: "error" | "success" | "listening";
2170
+ error?: string | undefined;
2171
+ }, {
2172
+ status: "error" | "success" | "listening";
2173
+ error?: string | undefined;
2174
+ }>>;
2175
+ parameterIssues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
2176
+ editableParameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
2177
+ name: z.ZodString;
2178
+ displayName: z.ZodString;
2179
+ type: z.ZodString;
2180
+ required: z.ZodOptional<z.ZodBoolean>;
2181
+ default: z.ZodOptional<z.ZodUnknown>;
2182
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2183
+ name: z.ZodString;
2184
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
2185
+ }, "strip", z.ZodTypeAny, {
2186
+ value: string | number | boolean;
2187
+ name: string;
2188
+ }, {
2189
+ value: string | number | boolean;
2190
+ name: string;
2191
+ }>, "many">>;
2192
+ }, "strip", z.ZodTypeAny, {
2193
+ type: string;
2194
+ name: string;
2195
+ displayName: string;
2196
+ options?: {
2197
+ value: string | number | boolean;
2198
+ name: string;
2199
+ }[] | undefined;
2200
+ default?: unknown;
2201
+ required?: boolean | undefined;
2202
+ }, {
2203
+ type: string;
2204
+ name: string;
2205
+ displayName: string;
2206
+ options?: {
2207
+ value: string | number | boolean;
2208
+ name: string;
2209
+ }[] | undefined;
2210
+ default?: unknown;
2211
+ required?: boolean | undefined;
2212
+ }>, "many">>;
2213
+ needsAction: z.ZodOptional<z.ZodBoolean>;
2214
+ }, "strip", z.ZodTypeAny, {
2215
+ node: {
2216
+ type: string;
2217
+ id: string;
2218
+ name: string;
2219
+ typeVersion: number;
2220
+ parameters: Record<string, unknown>;
2221
+ position: [number, number];
2222
+ credentials?: Record<string, {
2223
+ id: string;
2224
+ name: string;
2225
+ }> | undefined;
2226
+ };
2227
+ isTrigger: boolean;
2228
+ credentialType?: string | undefined;
2229
+ existingCredentials?: {
2230
+ id: string;
2231
+ name: string;
2232
+ }[] | undefined;
2233
+ isFirstTrigger?: boolean | undefined;
2234
+ isTestable?: boolean | undefined;
2235
+ isAutoApplied?: boolean | undefined;
2236
+ credentialTestResult?: {
2237
+ success: boolean;
2238
+ message?: string | undefined;
2239
+ } | undefined;
2240
+ triggerTestResult?: {
2241
+ status: "error" | "success" | "listening";
2242
+ error?: string | undefined;
2243
+ } | undefined;
2244
+ parameterIssues?: Record<string, string[]> | undefined;
2245
+ editableParameters?: {
2246
+ type: string;
2247
+ name: string;
2248
+ displayName: string;
2249
+ options?: {
2250
+ value: string | number | boolean;
2251
+ name: string;
2252
+ }[] | undefined;
2253
+ default?: unknown;
2254
+ required?: boolean | undefined;
2255
+ }[] | undefined;
2256
+ needsAction?: boolean | undefined;
2257
+ }, {
2258
+ node: {
2259
+ type: string;
2260
+ id: string;
2261
+ name: string;
2262
+ typeVersion: number;
2263
+ parameters: Record<string, unknown>;
2264
+ position: [number, number];
2265
+ credentials?: Record<string, {
2266
+ id: string;
2267
+ name: string;
2268
+ }> | undefined;
2269
+ };
2270
+ isTrigger: boolean;
2271
+ credentialType?: string | undefined;
2272
+ existingCredentials?: {
2273
+ id: string;
2274
+ name: string;
2275
+ }[] | undefined;
2276
+ isFirstTrigger?: boolean | undefined;
2277
+ isTestable?: boolean | undefined;
2278
+ isAutoApplied?: boolean | undefined;
2279
+ credentialTestResult?: {
2280
+ success: boolean;
2281
+ message?: string | undefined;
2282
+ } | undefined;
2283
+ triggerTestResult?: {
2284
+ status: "error" | "success" | "listening";
2285
+ error?: string | undefined;
2286
+ } | undefined;
2287
+ parameterIssues?: Record<string, string[]> | undefined;
2288
+ editableParameters?: {
2289
+ type: string;
2290
+ name: string;
2291
+ displayName: string;
2292
+ options?: {
2293
+ value: string | number | boolean;
2294
+ name: string;
2295
+ }[] | undefined;
2296
+ default?: unknown;
2297
+ required?: boolean | undefined;
2298
+ }[] | undefined;
2299
+ needsAction?: boolean | undefined;
2300
+ }>, "many">>;
2301
+ workflowId: z.ZodOptional<z.ZodString>;
2302
+ resourceDecision: z.ZodOptional<z.ZodObject<{
2303
+ toolGroup: z.ZodString;
2304
+ resource: z.ZodString;
2305
+ description: z.ZodString;
2306
+ options: z.ZodArray<z.ZodString, "many">;
2307
+ }, "strip", z.ZodTypeAny, {
2308
+ options: string[];
2309
+ description: string;
2310
+ toolGroup: string;
2311
+ resource: string;
2312
+ }, {
2313
+ options: string[];
2314
+ description: string;
2315
+ toolGroup: string;
2316
+ resource: string;
2317
+ }>>;
2318
+ }, "strip", z.ZodTypeAny, {
2319
+ message: string;
2320
+ toolCallId: string;
2321
+ toolName: string;
2322
+ args: Record<string, unknown>;
2323
+ requestId: string;
2324
+ severity: "info" | "destructive" | "warning";
2325
+ workflowId?: string | undefined;
2326
+ projectId?: string | undefined;
2327
+ tasks?: {
2328
+ tasks: {
2329
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2330
+ id: string;
2331
+ description: string;
2332
+ }[];
2333
+ } | undefined;
2334
+ credentialRequests?: {
2335
+ credentialType: string;
2336
+ reason: string;
2337
+ existingCredentials: {
2338
+ id: string;
2339
+ name: string;
2340
+ }[];
2341
+ suggestedName?: string | undefined;
2342
+ }[] | undefined;
2343
+ questions?: {
2344
+ type: "text" | "single" | "multi";
2345
+ id: string;
2346
+ question: string;
2347
+ options?: string[] | undefined;
2348
+ }[] | undefined;
2349
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | undefined;
2350
+ introMessage?: string | undefined;
2351
+ domainAccess?: {
2352
+ url: string;
2353
+ host: string;
2354
+ } | undefined;
2355
+ credentialFlow?: {
2356
+ stage: "generic" | "finalize";
2357
+ } | undefined;
2358
+ setupRequests?: {
2359
+ node: {
2360
+ type: string;
2361
+ id: string;
2362
+ name: string;
2363
+ typeVersion: number;
2364
+ parameters: Record<string, unknown>;
2365
+ position: [number, number];
2366
+ credentials?: Record<string, {
2367
+ id: string;
2368
+ name: string;
2369
+ }> | undefined;
2370
+ };
2371
+ isTrigger: boolean;
2372
+ credentialType?: string | undefined;
2373
+ existingCredentials?: {
2374
+ id: string;
2375
+ name: string;
2376
+ }[] | undefined;
2377
+ isFirstTrigger?: boolean | undefined;
2378
+ isTestable?: boolean | undefined;
2379
+ isAutoApplied?: boolean | undefined;
2380
+ credentialTestResult?: {
2381
+ success: boolean;
2382
+ message?: string | undefined;
2383
+ } | undefined;
2384
+ triggerTestResult?: {
2385
+ status: "error" | "success" | "listening";
2386
+ error?: string | undefined;
2387
+ } | undefined;
2388
+ parameterIssues?: Record<string, string[]> | undefined;
2389
+ editableParameters?: {
2390
+ type: string;
2391
+ name: string;
2392
+ displayName: string;
2393
+ options?: {
2394
+ value: string | number | boolean;
2395
+ name: string;
2396
+ }[] | undefined;
2397
+ default?: unknown;
2398
+ required?: boolean | undefined;
2399
+ }[] | undefined;
2400
+ needsAction?: boolean | undefined;
2401
+ }[] | undefined;
2402
+ resourceDecision?: {
2403
+ options: string[];
2404
+ description: string;
2405
+ toolGroup: string;
2406
+ resource: string;
2407
+ } | undefined;
2408
+ }, {
2409
+ message: string;
2410
+ toolCallId: string;
2411
+ toolName: string;
2412
+ args: Record<string, unknown>;
2413
+ requestId: string;
2414
+ severity: "info" | "destructive" | "warning";
2415
+ workflowId?: string | undefined;
2416
+ projectId?: string | undefined;
2417
+ tasks?: {
2418
+ tasks: {
2419
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2420
+ id: string;
2421
+ description: string;
2422
+ }[];
2423
+ } | undefined;
2424
+ credentialRequests?: {
2425
+ credentialType: string;
2426
+ reason: string;
2427
+ existingCredentials: {
2428
+ id: string;
2429
+ name: string;
2430
+ }[];
2431
+ suggestedName?: string | undefined;
2432
+ }[] | undefined;
2433
+ questions?: {
2434
+ type: "text" | "single" | "multi";
2435
+ id: string;
2436
+ question: string;
2437
+ options?: string[] | undefined;
2438
+ }[] | undefined;
2439
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | undefined;
2440
+ introMessage?: string | undefined;
2441
+ domainAccess?: {
2442
+ url: string;
2443
+ host: string;
2444
+ } | undefined;
2445
+ credentialFlow?: {
2446
+ stage: "generic" | "finalize";
2447
+ } | undefined;
2448
+ setupRequests?: {
2449
+ node: {
2450
+ type: string;
2451
+ id: string;
2452
+ name: string;
2453
+ typeVersion: number;
2454
+ parameters: Record<string, unknown>;
2455
+ position: [number, number];
2456
+ credentials?: Record<string, {
2457
+ id: string;
2458
+ name: string;
2459
+ }> | undefined;
2460
+ };
2461
+ isTrigger: boolean;
2462
+ credentialType?: string | undefined;
2463
+ existingCredentials?: {
2464
+ id: string;
2465
+ name: string;
2466
+ }[] | undefined;
2467
+ isFirstTrigger?: boolean | undefined;
2468
+ isTestable?: boolean | undefined;
2469
+ isAutoApplied?: boolean | undefined;
2470
+ credentialTestResult?: {
2471
+ success: boolean;
2472
+ message?: string | undefined;
2473
+ } | undefined;
2474
+ triggerTestResult?: {
2475
+ status: "error" | "success" | "listening";
2476
+ error?: string | undefined;
2477
+ } | undefined;
2478
+ parameterIssues?: Record<string, string[]> | undefined;
2479
+ editableParameters?: {
2480
+ type: string;
2481
+ name: string;
2482
+ displayName: string;
2483
+ options?: {
2484
+ value: string | number | boolean;
2485
+ name: string;
2486
+ }[] | undefined;
2487
+ default?: unknown;
2488
+ required?: boolean | undefined;
2489
+ }[] | undefined;
2490
+ needsAction?: boolean | undefined;
2491
+ }[] | undefined;
2492
+ resourceDecision?: {
2493
+ options: string[];
2494
+ description: string;
2495
+ toolGroup: string;
2496
+ resource: string;
2497
+ } | undefined;
2498
+ }>;
2499
+ runId: z.ZodString;
2500
+ agentId: z.ZodString;
2501
+ userId: z.ZodOptional<z.ZodString>;
2502
+ type: z.ZodLiteral<"confirmation-request">;
2503
+ }, "strip", z.ZodTypeAny, {
2504
+ type: "confirmation-request";
2505
+ agentId: string;
2506
+ payload: {
2507
+ message: string;
2508
+ toolCallId: string;
2509
+ toolName: string;
2510
+ args: Record<string, unknown>;
2511
+ requestId: string;
2512
+ severity: "info" | "destructive" | "warning";
2513
+ workflowId?: string | undefined;
2514
+ projectId?: string | undefined;
2515
+ tasks?: {
2516
+ tasks: {
2517
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2518
+ id: string;
2519
+ description: string;
2520
+ }[];
2521
+ } | undefined;
2522
+ credentialRequests?: {
2523
+ credentialType: string;
2524
+ reason: string;
2525
+ existingCredentials: {
2526
+ id: string;
2527
+ name: string;
2528
+ }[];
2529
+ suggestedName?: string | undefined;
2530
+ }[] | undefined;
2531
+ questions?: {
2532
+ type: "text" | "single" | "multi";
2533
+ id: string;
2534
+ question: string;
2535
+ options?: string[] | undefined;
2536
+ }[] | undefined;
2537
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | undefined;
2538
+ introMessage?: string | undefined;
2539
+ domainAccess?: {
2540
+ url: string;
2541
+ host: string;
2542
+ } | undefined;
2543
+ credentialFlow?: {
2544
+ stage: "generic" | "finalize";
2545
+ } | undefined;
2546
+ setupRequests?: {
2547
+ node: {
2548
+ type: string;
2549
+ id: string;
2550
+ name: string;
2551
+ typeVersion: number;
2552
+ parameters: Record<string, unknown>;
2553
+ position: [number, number];
2554
+ credentials?: Record<string, {
2555
+ id: string;
2556
+ name: string;
2557
+ }> | undefined;
2558
+ };
2559
+ isTrigger: boolean;
2560
+ credentialType?: string | undefined;
2561
+ existingCredentials?: {
2562
+ id: string;
2563
+ name: string;
2564
+ }[] | undefined;
2565
+ isFirstTrigger?: boolean | undefined;
2566
+ isTestable?: boolean | undefined;
2567
+ isAutoApplied?: boolean | undefined;
2568
+ credentialTestResult?: {
2569
+ success: boolean;
2570
+ message?: string | undefined;
2571
+ } | undefined;
2572
+ triggerTestResult?: {
2573
+ status: "error" | "success" | "listening";
2574
+ error?: string | undefined;
2575
+ } | undefined;
2576
+ parameterIssues?: Record<string, string[]> | undefined;
2577
+ editableParameters?: {
2578
+ type: string;
2579
+ name: string;
2580
+ displayName: string;
2581
+ options?: {
2582
+ value: string | number | boolean;
2583
+ name: string;
2584
+ }[] | undefined;
2585
+ default?: unknown;
2586
+ required?: boolean | undefined;
2587
+ }[] | undefined;
2588
+ needsAction?: boolean | undefined;
2589
+ }[] | undefined;
2590
+ resourceDecision?: {
2591
+ options: string[];
2592
+ description: string;
2593
+ toolGroup: string;
2594
+ resource: string;
2595
+ } | undefined;
2596
+ };
2597
+ runId: string;
2598
+ userId?: string | undefined;
2599
+ }, {
2600
+ type: "confirmation-request";
2601
+ agentId: string;
2602
+ payload: {
2603
+ message: string;
2604
+ toolCallId: string;
2605
+ toolName: string;
2606
+ args: Record<string, unknown>;
2607
+ requestId: string;
2608
+ severity: "info" | "destructive" | "warning";
2609
+ workflowId?: string | undefined;
2610
+ projectId?: string | undefined;
2611
+ tasks?: {
2612
+ tasks: {
2613
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2614
+ id: string;
2615
+ description: string;
2616
+ }[];
2617
+ } | undefined;
2618
+ credentialRequests?: {
2619
+ credentialType: string;
2620
+ reason: string;
2621
+ existingCredentials: {
2622
+ id: string;
2623
+ name: string;
2624
+ }[];
2625
+ suggestedName?: string | undefined;
2626
+ }[] | undefined;
2627
+ questions?: {
2628
+ type: "text" | "single" | "multi";
2629
+ id: string;
2630
+ question: string;
2631
+ options?: string[] | undefined;
2632
+ }[] | undefined;
2633
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | undefined;
2634
+ introMessage?: string | undefined;
2635
+ domainAccess?: {
2636
+ url: string;
2637
+ host: string;
2638
+ } | undefined;
2639
+ credentialFlow?: {
2640
+ stage: "generic" | "finalize";
2641
+ } | undefined;
2642
+ setupRequests?: {
2643
+ node: {
2644
+ type: string;
2645
+ id: string;
2646
+ name: string;
2647
+ typeVersion: number;
2648
+ parameters: Record<string, unknown>;
2649
+ position: [number, number];
2650
+ credentials?: Record<string, {
2651
+ id: string;
2652
+ name: string;
2653
+ }> | undefined;
2654
+ };
2655
+ isTrigger: boolean;
2656
+ credentialType?: string | undefined;
2657
+ existingCredentials?: {
2658
+ id: string;
2659
+ name: string;
2660
+ }[] | undefined;
2661
+ isFirstTrigger?: boolean | undefined;
2662
+ isTestable?: boolean | undefined;
2663
+ isAutoApplied?: boolean | undefined;
2664
+ credentialTestResult?: {
2665
+ success: boolean;
2666
+ message?: string | undefined;
2667
+ } | undefined;
2668
+ triggerTestResult?: {
2669
+ status: "error" | "success" | "listening";
2670
+ error?: string | undefined;
2671
+ } | undefined;
2672
+ parameterIssues?: Record<string, string[]> | undefined;
2673
+ editableParameters?: {
2674
+ type: string;
2675
+ name: string;
2676
+ displayName: string;
2677
+ options?: {
2678
+ value: string | number | boolean;
2679
+ name: string;
2680
+ }[] | undefined;
2681
+ default?: unknown;
2682
+ required?: boolean | undefined;
2683
+ }[] | undefined;
2684
+ needsAction?: boolean | undefined;
2685
+ }[] | undefined;
2686
+ resourceDecision?: {
2687
+ options: string[];
2688
+ description: string;
2689
+ toolGroup: string;
2690
+ resource: string;
2691
+ } | undefined;
2692
+ };
2693
+ runId: string;
2694
+ userId?: string | undefined;
2695
+ }>, z.ZodObject<{
2696
+ payload: z.ZodObject<{
2697
+ tasks: z.ZodObject<{
2698
+ tasks: z.ZodArray<z.ZodObject<{
2699
+ id: z.ZodString;
2700
+ description: z.ZodString;
2701
+ status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
2702
+ }, "strip", z.ZodTypeAny, {
2703
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2704
+ id: string;
2705
+ description: string;
2706
+ }, {
2707
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2708
+ id: string;
2709
+ description: string;
2710
+ }>, "many">;
2711
+ }, "strip", z.ZodTypeAny, {
2712
+ tasks: {
2713
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2714
+ id: string;
2715
+ description: string;
2716
+ }[];
2717
+ }, {
2718
+ tasks: {
2719
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2720
+ id: string;
2721
+ description: string;
2722
+ }[];
2723
+ }>;
2724
+ }, "strip", z.ZodTypeAny, {
2725
+ tasks: {
2726
+ tasks: {
2727
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2728
+ id: string;
2729
+ description: string;
2730
+ }[];
2731
+ };
2732
+ }, {
2733
+ tasks: {
2734
+ tasks: {
2735
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2736
+ id: string;
2737
+ description: string;
2738
+ }[];
2739
+ };
2740
+ }>;
2741
+ runId: z.ZodString;
2742
+ agentId: z.ZodString;
2743
+ userId: z.ZodOptional<z.ZodString>;
2744
+ type: z.ZodLiteral<"tasks-update">;
2745
+ }, "strip", z.ZodTypeAny, {
2746
+ type: "tasks-update";
2747
+ agentId: string;
2748
+ payload: {
2749
+ tasks: {
2750
+ tasks: {
2751
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2752
+ id: string;
2753
+ description: string;
2754
+ }[];
2755
+ };
2756
+ };
2757
+ runId: string;
2758
+ userId?: string | undefined;
2759
+ }, {
2760
+ type: "tasks-update";
2761
+ agentId: string;
2762
+ payload: {
2763
+ tasks: {
2764
+ tasks: {
2765
+ status: "cancelled" | "failed" | "todo" | "in_progress" | "done";
2766
+ id: string;
2767
+ description: string;
2768
+ }[];
2769
+ };
2770
+ };
2771
+ runId: string;
2772
+ userId?: string | undefined;
2773
+ }>, z.ZodObject<{
2774
+ payload: z.ZodObject<{
2775
+ message: z.ZodString;
2776
+ }, "strip", z.ZodTypeAny, {
2777
+ message: string;
2778
+ }, {
2779
+ message: string;
2780
+ }>;
2781
+ runId: z.ZodString;
2782
+ agentId: z.ZodString;
2783
+ userId: z.ZodOptional<z.ZodString>;
2784
+ type: z.ZodLiteral<"status">;
2785
+ }, "strip", z.ZodTypeAny, {
2786
+ type: "status";
2787
+ agentId: string;
2788
+ payload: {
2789
+ message: string;
2790
+ };
2791
+ runId: string;
2792
+ userId?: string | undefined;
2793
+ }, {
2794
+ type: "status";
2795
+ agentId: string;
2796
+ payload: {
2797
+ message: string;
2798
+ };
2799
+ runId: string;
2800
+ userId?: string | undefined;
2801
+ }>, z.ZodObject<{
2802
+ payload: z.ZodObject<{
2803
+ content: z.ZodString;
2804
+ statusCode: z.ZodOptional<z.ZodNumber>;
2805
+ provider: z.ZodOptional<z.ZodString>;
2806
+ technicalDetails: z.ZodOptional<z.ZodString>;
2807
+ }, "strip", z.ZodTypeAny, {
2808
+ content: string;
2809
+ provider?: string | undefined;
2810
+ statusCode?: number | undefined;
2811
+ technicalDetails?: string | undefined;
2812
+ }, {
2813
+ content: string;
2814
+ provider?: string | undefined;
2815
+ statusCode?: number | undefined;
2816
+ technicalDetails?: string | undefined;
2817
+ }>;
2818
+ runId: z.ZodString;
2819
+ agentId: z.ZodString;
2820
+ userId: z.ZodOptional<z.ZodString>;
2821
+ type: z.ZodLiteral<"error">;
2822
+ }, "strip", z.ZodTypeAny, {
2823
+ type: "error";
2824
+ agentId: string;
2825
+ payload: {
2826
+ content: string;
2827
+ provider?: string | undefined;
2828
+ statusCode?: number | undefined;
2829
+ technicalDetails?: string | undefined;
2830
+ };
2831
+ runId: string;
2832
+ userId?: string | undefined;
2833
+ }, {
2834
+ type: "error";
2835
+ agentId: string;
2836
+ payload: {
2837
+ content: string;
2838
+ provider?: string | undefined;
2839
+ statusCode?: number | undefined;
2840
+ technicalDetails?: string | undefined;
2841
+ };
2842
+ runId: string;
2843
+ userId?: string | undefined;
2844
+ }>, z.ZodObject<{
2845
+ payload: z.ZodObject<{
2846
+ requestId: z.ZodString;
2847
+ toolCall: z.ZodObject<{
2848
+ name: z.ZodString;
2849
+ arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2850
+ }, "strip", z.ZodTypeAny, {
2851
+ name: string;
2852
+ arguments: Record<string, unknown>;
2853
+ }, {
2854
+ name: string;
2855
+ arguments: Record<string, unknown>;
2856
+ }>;
2857
+ }, "strip", z.ZodTypeAny, {
2858
+ requestId: string;
2859
+ toolCall: {
2860
+ name: string;
2861
+ arguments: Record<string, unknown>;
2862
+ };
2863
+ }, {
2864
+ requestId: string;
2865
+ toolCall: {
2866
+ name: string;
2867
+ arguments: Record<string, unknown>;
2868
+ };
2869
+ }>;
2870
+ runId: z.ZodString;
2871
+ agentId: z.ZodString;
2872
+ userId: z.ZodOptional<z.ZodString>;
2873
+ type: z.ZodLiteral<"filesystem-request">;
2874
+ }, "strip", z.ZodTypeAny, {
2875
+ type: "filesystem-request";
2876
+ agentId: string;
2877
+ payload: {
2878
+ requestId: string;
2879
+ toolCall: {
2880
+ name: string;
2881
+ arguments: Record<string, unknown>;
2882
+ };
2883
+ };
2884
+ runId: string;
2885
+ userId?: string | undefined;
2886
+ }, {
2887
+ type: "filesystem-request";
2888
+ agentId: string;
2889
+ payload: {
2890
+ requestId: string;
2891
+ toolCall: {
2892
+ name: string;
2893
+ arguments: Record<string, unknown>;
2894
+ };
2895
+ };
2896
+ runId: string;
2897
+ userId?: string | undefined;
2898
+ }>, z.ZodObject<{
2899
+ payload: z.ZodObject<{
2900
+ title: z.ZodString;
2901
+ }, "strip", z.ZodTypeAny, {
2902
+ title: string;
2903
+ }, {
2904
+ title: string;
2905
+ }>;
2906
+ runId: z.ZodString;
2907
+ agentId: z.ZodString;
2908
+ userId: z.ZodOptional<z.ZodString>;
2909
+ type: z.ZodLiteral<"thread-title-updated">;
2910
+ }, "strip", z.ZodTypeAny, {
2911
+ type: "thread-title-updated";
2912
+ agentId: string;
2913
+ payload: {
2914
+ title: string;
2915
+ };
2916
+ runId: string;
2917
+ userId?: string | undefined;
2918
+ }, {
2919
+ type: "thread-title-updated";
2920
+ agentId: string;
2921
+ payload: {
2922
+ title: string;
2923
+ };
2924
+ runId: string;
2925
+ userId?: string | undefined;
2926
+ }>]>;
2927
+ export type InstanceAiEvent = z.infer<typeof instanceAiEventSchema>;
2928
+ export type InstanceAiRunStartEvent = Extract<InstanceAiEvent, {
2929
+ type: 'run-start';
2930
+ }>;
2931
+ export type InstanceAiRunFinishEvent = Extract<InstanceAiEvent, {
2932
+ type: 'run-finish';
2933
+ }>;
2934
+ export type InstanceAiAgentSpawnedEvent = Extract<InstanceAiEvent, {
2935
+ type: 'agent-spawned';
2936
+ }>;
2937
+ export type InstanceAiAgentCompletedEvent = Extract<InstanceAiEvent, {
2938
+ type: 'agent-completed';
2939
+ }>;
2940
+ export type InstanceAiTextDeltaEvent = Extract<InstanceAiEvent, {
2941
+ type: 'text-delta';
2942
+ }>;
2943
+ export type InstanceAiReasoningDeltaEvent = Extract<InstanceAiEvent, {
2944
+ type: 'reasoning-delta';
2945
+ }>;
2946
+ export type InstanceAiToolCallEvent = Extract<InstanceAiEvent, {
2947
+ type: 'tool-call';
2948
+ }>;
2949
+ export type InstanceAiToolResultEvent = Extract<InstanceAiEvent, {
2950
+ type: 'tool-result';
2951
+ }>;
2952
+ export type InstanceAiToolErrorEvent = Extract<InstanceAiEvent, {
2953
+ type: 'tool-error';
2954
+ }>;
2955
+ export type InstanceAiConfirmationRequestEvent = Extract<InstanceAiEvent, {
2956
+ type: 'confirmation-request';
2957
+ }>;
2958
+ export type InstanceAiTasksUpdateEvent = Extract<InstanceAiEvent, {
2959
+ type: 'tasks-update';
2960
+ }>;
2961
+ export type InstanceAiStatusEvent = Extract<InstanceAiEvent, {
2962
+ type: 'status';
2963
+ }>;
2964
+ export type InstanceAiErrorEvent = Extract<InstanceAiEvent, {
2965
+ type: 'error';
2966
+ }>;
2967
+ export type InstanceAiFilesystemRequestEvent = Extract<InstanceAiEvent, {
2968
+ type: 'filesystem-request';
2969
+ }>;
2970
+ export type InstanceAiThreadTitleUpdatedEvent = Extract<InstanceAiEvent, {
2971
+ type: 'thread-title-updated';
2972
+ }>;
2973
+ export type InstanceAiFilesystemResponse = z.infer<typeof instanceAiFilesystemResponseSchema>;
2974
+ declare const instanceAiAttachmentSchema: z.ZodObject<{
2975
+ data: z.ZodString;
2976
+ mimeType: z.ZodString;
2977
+ fileName: z.ZodString;
2978
+ }, "strip", z.ZodTypeAny, {
2979
+ data: string;
2980
+ mimeType: string;
2981
+ fileName: string;
2982
+ }, {
2983
+ data: string;
2984
+ mimeType: string;
2985
+ fileName: string;
2986
+ }>;
2987
+ export type InstanceAiAttachment = z.infer<typeof instanceAiAttachmentSchema>;
2988
+ declare const InstanceAiSendMessageRequest_base: import("../zod-class").ZodClass<{
2989
+ message: string;
2990
+ timeZone?: string | undefined;
2991
+ attachments?: {
2992
+ data: string;
2993
+ mimeType: string;
2994
+ fileName: string;
2995
+ }[] | undefined;
2996
+ pushRef?: string | undefined;
2997
+ researchMode?: boolean | undefined;
2998
+ }, {
2999
+ message: z.ZodString;
3000
+ researchMode: z.ZodOptional<z.ZodBoolean>;
3001
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
3002
+ data: z.ZodString;
3003
+ mimeType: z.ZodString;
3004
+ fileName: z.ZodString;
3005
+ }, "strip", z.ZodTypeAny, {
3006
+ data: string;
3007
+ mimeType: string;
3008
+ fileName: string;
3009
+ }, {
3010
+ data: string;
3011
+ mimeType: string;
3012
+ fileName: string;
3013
+ }>, "many">>;
3014
+ timeZone: z.ZodCatch<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
3015
+ pushRef: z.ZodOptional<z.ZodString>;
3016
+ }>;
3017
+ export declare class InstanceAiSendMessageRequest extends InstanceAiSendMessageRequest_base {
3018
+ }
3019
+ declare const InstanceAiCorrectTaskRequest_base: import("../zod-class").ZodClass<{
3020
+ message: string;
3021
+ }, {
3022
+ message: z.ZodString;
3023
+ }>;
3024
+ export declare class InstanceAiCorrectTaskRequest extends InstanceAiCorrectTaskRequest_base {
3025
+ }
3026
+ declare const InstanceAiUpdateMemoryRequest_base: import("../zod-class").ZodClass<{
3027
+ content: string;
3028
+ }, {
3029
+ content: z.ZodString;
3030
+ }>;
3031
+ export declare class InstanceAiUpdateMemoryRequest extends InstanceAiUpdateMemoryRequest_base {
3032
+ }
3033
+ declare const InstanceAiEnsureThreadRequest_base: import("../zod-class").ZodClass<{
3034
+ threadId?: string | undefined;
3035
+ }, {
3036
+ threadId: z.ZodOptional<z.ZodString>;
3037
+ }>;
3038
+ export declare class InstanceAiEnsureThreadRequest extends InstanceAiEnsureThreadRequest_base {
3039
+ }
3040
+ export declare const instanceAiGatewayKeySchema: z.ZodString;
3041
+ declare const InstanceAiGatewayEventsQuery_base: import("../zod-class").ZodClass<{
3042
+ apiKey: string;
3043
+ }, {
3044
+ apiKey: z.ZodString;
3045
+ }>;
3046
+ export declare class InstanceAiGatewayEventsQuery extends InstanceAiGatewayEventsQuery_base {
3047
+ }
3048
+ declare const InstanceAiEventsQuery_base: import("../zod-class").ZodClass<{
3049
+ lastEventId?: number | undefined;
3050
+ }, {
3051
+ lastEventId: z.ZodOptional<z.ZodNumber>;
3052
+ }>;
3053
+ export declare class InstanceAiEventsQuery extends InstanceAiEventsQuery_base {
3054
+ }
3055
+ declare const InstanceAiThreadMessagesQuery_base: import("../zod-class").ZodClass<{
3056
+ limit: number;
3057
+ page: number;
3058
+ raw?: "true" | "false" | undefined;
3059
+ }, {
3060
+ limit: z.ZodDefault<z.ZodNumber>;
3061
+ page: z.ZodDefault<z.ZodNumber>;
3062
+ raw: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
3063
+ }>;
3064
+ export declare class InstanceAiThreadMessagesQuery extends InstanceAiThreadMessagesQuery_base {
3065
+ }
3066
+ export interface InstanceAiSendMessageResponse {
3067
+ runId: string;
3068
+ }
3069
+ export interface InstanceAiConfirmResponse {
3070
+ approved: boolean;
3071
+ credentialId?: string;
3072
+ credentials?: Record<string, string>;
3073
+ nodeCredentials?: Record<string, Record<string, string>>;
3074
+ autoSetup?: {
3075
+ credentialType: string;
3076
+ };
3077
+ userInput?: string;
3078
+ domainAccessAction?: DomainAccessAction;
3079
+ resourceDecision?: string;
3080
+ action?: 'apply' | 'test-trigger';
3081
+ nodeParameters?: Record<string, Record<string, unknown>>;
3082
+ testTriggerNode?: string;
3083
+ answers?: Array<{
3084
+ questionId: string;
3085
+ selectedOptions: string[];
3086
+ customText?: string;
3087
+ skipped?: boolean;
3088
+ }>;
3089
+ }
3090
+ export interface InstanceAiToolCallState {
3091
+ toolCallId: string;
3092
+ toolName: string;
3093
+ args: Record<string, unknown>;
3094
+ result?: unknown;
3095
+ error?: string;
3096
+ isLoading: boolean;
3097
+ renderHint?: 'tasks' | 'delegate' | 'builder' | 'data-table' | 'researcher' | 'default';
3098
+ confirmation?: {
3099
+ requestId: string;
3100
+ severity: InstanceAiConfirmationSeverity;
3101
+ message: string;
3102
+ credentialRequests?: InstanceAiCredentialRequest[];
3103
+ projectId?: string;
3104
+ inputType?: 'approval' | 'text' | 'questions' | 'plan-review' | 'resource-decision';
3105
+ domainAccess?: DomainAccessMeta;
3106
+ credentialFlow?: InstanceAiCredentialFlow;
3107
+ setupRequests?: InstanceAiWorkflowSetupNode[];
3108
+ workflowId?: string;
3109
+ questions?: Array<{
3110
+ id: string;
3111
+ question: string;
3112
+ type: 'single' | 'multi' | 'text';
3113
+ options?: string[];
3114
+ }>;
3115
+ introMessage?: string;
3116
+ tasks?: TaskList;
3117
+ resourceDecision?: GatewayConfirmationRequiredPayload;
3118
+ };
3119
+ confirmationStatus?: 'pending' | 'approved' | 'denied';
3120
+ startedAt?: string;
3121
+ completedAt?: string;
3122
+ }
3123
+ export type InstanceAiTimelineEntry = {
3124
+ type: 'text';
3125
+ content: string;
3126
+ } | {
3127
+ type: 'tool-call';
3128
+ toolCallId: string;
3129
+ } | {
3130
+ type: 'child';
3131
+ agentId: string;
3132
+ };
3133
+ export interface InstanceAiAgentNode {
3134
+ agentId: string;
3135
+ role: string;
3136
+ tools?: string[];
3137
+ taskId?: string;
3138
+ kind?: InstanceAiAgentKind;
3139
+ title?: string;
3140
+ subtitle?: string;
3141
+ goal?: string;
3142
+ targetResource?: InstanceAiTargetResource;
3143
+ statusMessage?: string;
3144
+ status: InstanceAiAgentStatus;
3145
+ textContent: string;
3146
+ reasoning: string;
3147
+ toolCalls: InstanceAiToolCallState[];
3148
+ children: InstanceAiAgentNode[];
3149
+ timeline: InstanceAiTimelineEntry[];
3150
+ tasks?: TaskList;
3151
+ result?: string;
3152
+ error?: string;
3153
+ errorDetails?: {
3154
+ statusCode?: number;
3155
+ provider?: string;
3156
+ technicalDetails?: string;
3157
+ };
3158
+ }
3159
+ export interface InstanceAiMessage {
3160
+ id: string;
3161
+ runId?: string;
3162
+ messageGroupId?: string;
3163
+ runIds?: string[];
3164
+ role: 'user' | 'assistant';
3165
+ createdAt: string;
3166
+ content: string;
3167
+ reasoning: string;
3168
+ isStreaming: boolean;
3169
+ agentTree?: InstanceAiAgentNode;
3170
+ attachments?: InstanceAiAttachment[];
3171
+ }
3172
+ export interface InstanceAiThreadSummary {
3173
+ id: string;
3174
+ title: string;
3175
+ createdAt: string;
3176
+ }
3177
+ export type InstanceAiSSEConnectionState = 'disconnected' | 'connecting' | 'connected' | 'reconnecting';
3178
+ export interface InstanceAiThreadInfo {
3179
+ id: string;
3180
+ title?: string;
3181
+ resourceId: string;
3182
+ createdAt: string;
3183
+ updatedAt: string;
3184
+ metadata?: Record<string, unknown>;
3185
+ }
3186
+ export interface InstanceAiThreadListResponse {
3187
+ threads: InstanceAiThreadInfo[];
3188
+ total: number;
3189
+ page: number;
3190
+ hasMore: boolean;
3191
+ }
3192
+ export interface InstanceAiEnsureThreadResponse {
3193
+ thread: InstanceAiThreadInfo;
3194
+ created: boolean;
3195
+ }
3196
+ export interface InstanceAiStoredMessage {
3197
+ id: string;
3198
+ role: string;
3199
+ content: unknown;
3200
+ type?: string;
3201
+ createdAt: string;
3202
+ }
3203
+ export interface InstanceAiThreadMessagesResponse {
3204
+ messages: InstanceAiStoredMessage[];
3205
+ threadId: string;
3206
+ }
3207
+ export interface InstanceAiThreadContextResponse {
3208
+ threadId: string;
3209
+ workingMemory: string | null;
3210
+ }
3211
+ export interface InstanceAiRichMessagesResponse {
3212
+ threadId: string;
3213
+ messages: InstanceAiMessage[];
3214
+ nextEventId: number;
3215
+ }
3216
+ export interface InstanceAiThreadStatusResponse {
3217
+ hasActiveRun: boolean;
3218
+ isSuspended: boolean;
3219
+ backgroundTasks: Array<{
3220
+ taskId: string;
3221
+ role: string;
3222
+ agentId: string;
3223
+ status: 'running' | 'completed' | 'failed' | 'cancelled';
3224
+ startedAt: number;
3225
+ runId?: string;
3226
+ messageGroupId?: string;
3227
+ }>;
3228
+ }
3229
+ declare const instanceAiPermissionModeSchema: z.ZodEnum<["require_approval", "always_allow"]>;
3230
+ export type InstanceAiPermissionMode = z.infer<typeof instanceAiPermissionModeSchema>;
3231
+ declare const instanceAiPermissionsSchema: z.ZodObject<{
3232
+ createWorkflow: z.ZodEnum<["require_approval", "always_allow"]>;
3233
+ updateWorkflow: z.ZodEnum<["require_approval", "always_allow"]>;
3234
+ runWorkflow: z.ZodEnum<["require_approval", "always_allow"]>;
3235
+ publishWorkflow: z.ZodEnum<["require_approval", "always_allow"]>;
3236
+ deleteWorkflow: z.ZodEnum<["require_approval", "always_allow"]>;
3237
+ deleteCredential: z.ZodEnum<["require_approval", "always_allow"]>;
3238
+ createFolder: z.ZodEnum<["require_approval", "always_allow"]>;
3239
+ deleteFolder: z.ZodEnum<["require_approval", "always_allow"]>;
3240
+ moveWorkflowToFolder: z.ZodEnum<["require_approval", "always_allow"]>;
3241
+ tagWorkflow: z.ZodEnum<["require_approval", "always_allow"]>;
3242
+ createDataTable: z.ZodEnum<["require_approval", "always_allow"]>;
3243
+ deleteDataTable: z.ZodEnum<["require_approval", "always_allow"]>;
3244
+ mutateDataTableSchema: z.ZodEnum<["require_approval", "always_allow"]>;
3245
+ mutateDataTableRows: z.ZodEnum<["require_approval", "always_allow"]>;
3246
+ cleanupTestExecutions: z.ZodEnum<["require_approval", "always_allow"]>;
3247
+ readFilesystem: z.ZodEnum<["require_approval", "always_allow"]>;
3248
+ fetchUrl: z.ZodEnum<["require_approval", "always_allow"]>;
3249
+ restoreWorkflowVersion: z.ZodEnum<["require_approval", "always_allow"]>;
3250
+ }, "strip", z.ZodTypeAny, {
3251
+ createWorkflow: "require_approval" | "always_allow";
3252
+ updateWorkflow: "require_approval" | "always_allow";
3253
+ runWorkflow: "require_approval" | "always_allow";
3254
+ publishWorkflow: "require_approval" | "always_allow";
3255
+ deleteWorkflow: "require_approval" | "always_allow";
3256
+ deleteCredential: "require_approval" | "always_allow";
3257
+ createFolder: "require_approval" | "always_allow";
3258
+ deleteFolder: "require_approval" | "always_allow";
3259
+ moveWorkflowToFolder: "require_approval" | "always_allow";
3260
+ tagWorkflow: "require_approval" | "always_allow";
3261
+ createDataTable: "require_approval" | "always_allow";
3262
+ deleteDataTable: "require_approval" | "always_allow";
3263
+ mutateDataTableSchema: "require_approval" | "always_allow";
3264
+ mutateDataTableRows: "require_approval" | "always_allow";
3265
+ cleanupTestExecutions: "require_approval" | "always_allow";
3266
+ readFilesystem: "require_approval" | "always_allow";
3267
+ fetchUrl: "require_approval" | "always_allow";
3268
+ restoreWorkflowVersion: "require_approval" | "always_allow";
3269
+ }, {
3270
+ createWorkflow: "require_approval" | "always_allow";
3271
+ updateWorkflow: "require_approval" | "always_allow";
3272
+ runWorkflow: "require_approval" | "always_allow";
3273
+ publishWorkflow: "require_approval" | "always_allow";
3274
+ deleteWorkflow: "require_approval" | "always_allow";
3275
+ deleteCredential: "require_approval" | "always_allow";
3276
+ createFolder: "require_approval" | "always_allow";
3277
+ deleteFolder: "require_approval" | "always_allow";
3278
+ moveWorkflowToFolder: "require_approval" | "always_allow";
3279
+ tagWorkflow: "require_approval" | "always_allow";
3280
+ createDataTable: "require_approval" | "always_allow";
3281
+ deleteDataTable: "require_approval" | "always_allow";
3282
+ mutateDataTableSchema: "require_approval" | "always_allow";
3283
+ mutateDataTableRows: "require_approval" | "always_allow";
3284
+ cleanupTestExecutions: "require_approval" | "always_allow";
3285
+ readFilesystem: "require_approval" | "always_allow";
3286
+ fetchUrl: "require_approval" | "always_allow";
3287
+ restoreWorkflowVersion: "require_approval" | "always_allow";
3288
+ }>;
3289
+ export type InstanceAiPermissions = z.infer<typeof instanceAiPermissionsSchema>;
3290
+ export declare const DEFAULT_INSTANCE_AI_PERMISSIONS: InstanceAiPermissions;
3291
+ export interface InstanceAiAdminSettingsResponse {
3292
+ lastMessages: number;
3293
+ embedderModel: string;
3294
+ semanticRecallTopK: number;
3295
+ subAgentMaxSteps: number;
3296
+ browserMcp: boolean;
3297
+ permissions: InstanceAiPermissions;
3298
+ mcpServers: string;
3299
+ sandboxEnabled: boolean;
3300
+ sandboxProvider: string;
3301
+ sandboxImage: string;
3302
+ sandboxTimeout: number;
3303
+ daytonaCredentialId: string | null;
3304
+ n8nSandboxCredentialId: string | null;
3305
+ searchCredentialId: string | null;
3306
+ localGatewayDisabled: boolean;
3307
+ }
3308
+ declare const InstanceAiAdminSettingsUpdateRequest_base: import("../zod-class").ZodClass<{
3309
+ lastMessages?: number | undefined;
3310
+ embedderModel?: string | undefined;
3311
+ semanticRecallTopK?: number | undefined;
3312
+ subAgentMaxSteps?: number | undefined;
3313
+ browserMcp?: boolean | undefined;
3314
+ permissions?: {
3315
+ createWorkflow?: "require_approval" | "always_allow" | undefined;
3316
+ updateWorkflow?: "require_approval" | "always_allow" | undefined;
3317
+ runWorkflow?: "require_approval" | "always_allow" | undefined;
3318
+ publishWorkflow?: "require_approval" | "always_allow" | undefined;
3319
+ deleteWorkflow?: "require_approval" | "always_allow" | undefined;
3320
+ deleteCredential?: "require_approval" | "always_allow" | undefined;
3321
+ createFolder?: "require_approval" | "always_allow" | undefined;
3322
+ deleteFolder?: "require_approval" | "always_allow" | undefined;
3323
+ moveWorkflowToFolder?: "require_approval" | "always_allow" | undefined;
3324
+ tagWorkflow?: "require_approval" | "always_allow" | undefined;
3325
+ createDataTable?: "require_approval" | "always_allow" | undefined;
3326
+ deleteDataTable?: "require_approval" | "always_allow" | undefined;
3327
+ mutateDataTableSchema?: "require_approval" | "always_allow" | undefined;
3328
+ mutateDataTableRows?: "require_approval" | "always_allow" | undefined;
3329
+ cleanupTestExecutions?: "require_approval" | "always_allow" | undefined;
3330
+ readFilesystem?: "require_approval" | "always_allow" | undefined;
3331
+ fetchUrl?: "require_approval" | "always_allow" | undefined;
3332
+ restoreWorkflowVersion?: "require_approval" | "always_allow" | undefined;
3333
+ } | undefined;
3334
+ mcpServers?: string | undefined;
3335
+ sandboxEnabled?: boolean | undefined;
3336
+ sandboxProvider?: string | undefined;
3337
+ sandboxImage?: string | undefined;
3338
+ sandboxTimeout?: number | undefined;
3339
+ daytonaCredentialId?: string | null | undefined;
3340
+ n8nSandboxCredentialId?: string | null | undefined;
3341
+ searchCredentialId?: string | null | undefined;
3342
+ localGatewayDisabled?: boolean | undefined;
3343
+ }, {
3344
+ lastMessages: z.ZodOptional<z.ZodNumber>;
3345
+ embedderModel: z.ZodOptional<z.ZodString>;
3346
+ semanticRecallTopK: z.ZodOptional<z.ZodNumber>;
3347
+ subAgentMaxSteps: z.ZodOptional<z.ZodNumber>;
3348
+ browserMcp: z.ZodOptional<z.ZodBoolean>;
3349
+ permissions: z.ZodOptional<z.ZodObject<{
3350
+ createWorkflow: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3351
+ updateWorkflow: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3352
+ runWorkflow: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3353
+ publishWorkflow: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3354
+ deleteWorkflow: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3355
+ deleteCredential: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3356
+ createFolder: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3357
+ deleteFolder: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3358
+ moveWorkflowToFolder: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3359
+ tagWorkflow: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3360
+ createDataTable: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3361
+ deleteDataTable: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3362
+ mutateDataTableSchema: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3363
+ mutateDataTableRows: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3364
+ cleanupTestExecutions: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3365
+ readFilesystem: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3366
+ fetchUrl: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3367
+ restoreWorkflowVersion: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow"]>>;
3368
+ }, "strip", z.ZodTypeAny, {
3369
+ createWorkflow?: "require_approval" | "always_allow" | undefined;
3370
+ updateWorkflow?: "require_approval" | "always_allow" | undefined;
3371
+ runWorkflow?: "require_approval" | "always_allow" | undefined;
3372
+ publishWorkflow?: "require_approval" | "always_allow" | undefined;
3373
+ deleteWorkflow?: "require_approval" | "always_allow" | undefined;
3374
+ deleteCredential?: "require_approval" | "always_allow" | undefined;
3375
+ createFolder?: "require_approval" | "always_allow" | undefined;
3376
+ deleteFolder?: "require_approval" | "always_allow" | undefined;
3377
+ moveWorkflowToFolder?: "require_approval" | "always_allow" | undefined;
3378
+ tagWorkflow?: "require_approval" | "always_allow" | undefined;
3379
+ createDataTable?: "require_approval" | "always_allow" | undefined;
3380
+ deleteDataTable?: "require_approval" | "always_allow" | undefined;
3381
+ mutateDataTableSchema?: "require_approval" | "always_allow" | undefined;
3382
+ mutateDataTableRows?: "require_approval" | "always_allow" | undefined;
3383
+ cleanupTestExecutions?: "require_approval" | "always_allow" | undefined;
3384
+ readFilesystem?: "require_approval" | "always_allow" | undefined;
3385
+ fetchUrl?: "require_approval" | "always_allow" | undefined;
3386
+ restoreWorkflowVersion?: "require_approval" | "always_allow" | undefined;
3387
+ }, {
3388
+ createWorkflow?: "require_approval" | "always_allow" | undefined;
3389
+ updateWorkflow?: "require_approval" | "always_allow" | undefined;
3390
+ runWorkflow?: "require_approval" | "always_allow" | undefined;
3391
+ publishWorkflow?: "require_approval" | "always_allow" | undefined;
3392
+ deleteWorkflow?: "require_approval" | "always_allow" | undefined;
3393
+ deleteCredential?: "require_approval" | "always_allow" | undefined;
3394
+ createFolder?: "require_approval" | "always_allow" | undefined;
3395
+ deleteFolder?: "require_approval" | "always_allow" | undefined;
3396
+ moveWorkflowToFolder?: "require_approval" | "always_allow" | undefined;
3397
+ tagWorkflow?: "require_approval" | "always_allow" | undefined;
3398
+ createDataTable?: "require_approval" | "always_allow" | undefined;
3399
+ deleteDataTable?: "require_approval" | "always_allow" | undefined;
3400
+ mutateDataTableSchema?: "require_approval" | "always_allow" | undefined;
3401
+ mutateDataTableRows?: "require_approval" | "always_allow" | undefined;
3402
+ cleanupTestExecutions?: "require_approval" | "always_allow" | undefined;
3403
+ readFilesystem?: "require_approval" | "always_allow" | undefined;
3404
+ fetchUrl?: "require_approval" | "always_allow" | undefined;
3405
+ restoreWorkflowVersion?: "require_approval" | "always_allow" | undefined;
3406
+ }>>;
3407
+ mcpServers: z.ZodOptional<z.ZodString>;
3408
+ sandboxEnabled: z.ZodOptional<z.ZodBoolean>;
3409
+ sandboxProvider: z.ZodOptional<z.ZodString>;
3410
+ sandboxImage: z.ZodOptional<z.ZodString>;
3411
+ sandboxTimeout: z.ZodOptional<z.ZodNumber>;
3412
+ daytonaCredentialId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3413
+ n8nSandboxCredentialId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3414
+ searchCredentialId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3415
+ localGatewayDisabled: z.ZodOptional<z.ZodBoolean>;
3416
+ }>;
3417
+ export declare class InstanceAiAdminSettingsUpdateRequest extends InstanceAiAdminSettingsUpdateRequest_base {
3418
+ }
3419
+ export interface InstanceAiUserPreferencesResponse {
3420
+ credentialId: string | null;
3421
+ credentialType: string | null;
3422
+ credentialName: string | null;
3423
+ modelName: string;
3424
+ localGatewayDisabled: boolean;
3425
+ }
3426
+ declare const InstanceAiUserPreferencesUpdateRequest_base: import("../zod-class").ZodClass<{
3427
+ credentialId?: string | null | undefined;
3428
+ localGatewayDisabled?: boolean | undefined;
3429
+ modelName?: string | undefined;
3430
+ }, {
3431
+ credentialId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3432
+ modelName: z.ZodOptional<z.ZodString>;
3433
+ localGatewayDisabled: z.ZodOptional<z.ZodBoolean>;
3434
+ }>;
3435
+ export declare class InstanceAiUserPreferencesUpdateRequest extends InstanceAiUserPreferencesUpdateRequest_base {
3436
+ }
3437
+ export interface InstanceAiModelCredential {
3438
+ id: string;
3439
+ name: string;
3440
+ type: string;
3441
+ provider: string;
3442
+ }
3443
+ export declare function getRenderHint(toolName: string): InstanceAiToolCallState['renderHint'];
3444
+ export {};