@n8n/api-types 1.30.3 → 1.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/agent-builder-interactive.d.ts +5 -182
  2. package/dist/agent-builder-interactive.js +6 -50
  3. package/dist/agent-builder-interactive.js.map +1 -1
  4. package/dist/agents/agent-interaction.schema.d.ts +262 -0
  5. package/dist/agents/agent-interaction.schema.js +56 -0
  6. package/dist/agents/agent-interaction.schema.js.map +1 -0
  7. package/dist/agents/agent-json-config.schema.d.ts +1878 -752
  8. package/dist/agents/agent-json-config.schema.js +82 -1
  9. package/dist/agents/agent-json-config.schema.js.map +1 -1
  10. package/dist/agents/dto.d.ts +232 -103
  11. package/dist/agents/dto.js +8 -3
  12. package/dist/agents/dto.js.map +1 -1
  13. package/dist/agents/index.d.ts +2 -1
  14. package/dist/agents/index.js +2 -11
  15. package/dist/agents/index.js.map +1 -1
  16. package/dist/agents/rich-card.schema.d.ts +108 -108
  17. package/dist/agents/types.d.ts +39 -8
  18. package/dist/agents/types.js.map +1 -1
  19. package/dist/build.tsbuildinfo +1 -1
  20. package/dist/chat-hub.d.ts +85 -85
  21. package/dist/dto/ai/ai-ask-request.dto.d.ts +13 -13
  22. package/dist/dto/ai/ai-build-request.dto.d.ts +3 -3
  23. package/dist/dto/ai/ai-truncate-messages-request.dto.d.ts +1 -1
  24. package/dist/dto/api-keys/list-api-keys-query.dto.d.ts +1 -1
  25. package/dist/dto/data-table/list-data-table-query.dto.d.ts +4 -4
  26. package/dist/dto/dynamic-node-parameters/action-result-request.dto.d.ts +1 -1
  27. package/dist/dto/dynamic-node-parameters/base-dynamic-parameters-request.dto.d.ts +1 -1
  28. package/dist/dto/dynamic-node-parameters/options-request.dto.d.ts +1 -1
  29. package/dist/dto/dynamic-node-parameters/resource-locator-request.dto.d.ts +1 -1
  30. package/dist/dto/dynamic-node-parameters/resource-mapper-fields-request.dto.d.ts +1 -1
  31. package/dist/dto/evaluations/evaluation-config.dto.d.ts +78 -78
  32. package/dist/dto/folders/list-folder-query.dto.d.ts +2 -2
  33. package/dist/dto/index.d.ts +2 -0
  34. package/dist/dto/index.js +7 -3
  35. package/dist/dto/index.js.map +1 -1
  36. package/dist/dto/insights/list-workflow-query.dto.d.ts +1 -1
  37. package/dist/dto/instance-ai/instance-ai-confirm-request.dto.d.ts +8 -8
  38. package/dist/dto/instance-ai/instance-ai-rename-thread-request.dto.d.ts +1 -1
  39. package/dist/dto/oauth/oauth-client.dto.d.ts +4 -4
  40. package/dist/dto/oidc/config.dto.d.ts +1 -1
  41. package/dist/dto/packages/import-package-request.dto.d.ts +11 -5
  42. package/dist/dto/packages/import-package-request.dto.js +19 -19
  43. package/dist/dto/packages/import-package-request.dto.js.map +1 -1
  44. package/dist/dto/project/update-project.dto.d.ts +2 -2
  45. package/dist/dto/roles/role-member.schema.d.ts +2 -2
  46. package/dist/dto/roles/role-members-response.dto.d.ts +3 -3
  47. package/dist/dto/roles/role-project-members-response.dto.d.ts +3 -3
  48. package/dist/dto/roles/update-role.dto.d.ts +1 -1
  49. package/dist/dto/security-settings/security-policy.dto.d.ts +32 -0
  50. package/dist/dto/security-settings/security-policy.dto.js +17 -0
  51. package/dist/dto/security-settings/security-policy.dto.js.map +1 -0
  52. package/dist/dto/security-settings/security-settings.dto.d.ts +20 -0
  53. package/dist/dto/security-settings/security-settings.dto.js +4 -0
  54. package/dist/dto/security-settings/security-settings.dto.js.map +1 -1
  55. package/dist/dto/source-control/push-work-folder-request.dto.d.ts +9 -9
  56. package/dist/dto/variables/update-variable-request.dto.d.ts +1 -1
  57. package/dist/dto/workflow-history/update-workflow-history-version.dto.d.ts +1 -1
  58. package/dist/dto/workflows/activate-workflow.dto.d.ts +1 -1
  59. package/dist/dto/workflows/base-workflow.dto.d.ts +7 -7
  60. package/dist/dto/workflows/create-workflow.dto.d.ts +8 -8
  61. package/dist/dto/workflows/get-resource-dependencies.dto.d.ts +1 -1
  62. package/dist/dto/workflows/get-resource-dependency-counts.dto.d.ts +1 -1
  63. package/dist/dto/workflows/manual-run.dto.d.ts +112 -0
  64. package/dist/dto/workflows/manual-run.dto.js +51 -0
  65. package/dist/dto/workflows/manual-run.dto.js.map +1 -0
  66. package/dist/dto/workflows/update-workflow.dto.d.ts +8 -8
  67. package/dist/frontend-settings.d.ts +4 -0
  68. package/dist/index.d.ts +5 -3
  69. package/dist/index.js +8 -3
  70. package/dist/index.js.map +1 -1
  71. package/dist/instance-registry-types.d.ts +16 -16
  72. package/dist/schemas/agent-run-reducer.js +63 -1
  73. package/dist/schemas/agent-run-reducer.js.map +1 -1
  74. package/dist/schemas/breaking-changes.schema.d.ts +128 -128
  75. package/dist/schemas/credential-resolver.schema.d.ts +8 -8
  76. package/dist/schemas/credential-response.schema.d.ts +2 -2
  77. package/dist/schemas/data-table.schema.d.ts +6 -6
  78. package/dist/schemas/encryption-key.schema.d.ts +6 -6
  79. package/dist/schemas/eval-collections.schema.d.ts +3 -3
  80. package/dist/schemas/favorites.schema.d.ts +2 -2
  81. package/dist/schemas/favorites.schema.js +7 -1
  82. package/dist/schemas/favorites.schema.js.map +1 -1
  83. package/dist/schemas/insights.schema.d.ts +22 -22
  84. package/dist/schemas/instance-ai.schema.d.ts +611 -419
  85. package/dist/schemas/instance-ai.schema.js +61 -8
  86. package/dist/schemas/instance-ai.schema.js.map +1 -1
  87. package/dist/schemas/secrets-provider.schema.d.ts +16 -16
  88. package/dist/schemas/source-controlled-file.schema.d.ts +6 -6
  89. package/dist/schemas/user.schema.d.ts +18 -18
  90. package/dist/schemas/workflow-execution-status.schema.d.ts +4 -4
  91. package/dist/schemas/workflow-publication-status.schema.d.ts +2 -2
  92. package/dist/workflow-reviews-policy.d.ts +9 -0
  93. package/dist/workflow-reviews-policy.js +8 -0
  94. package/dist/workflow-reviews-policy.js.map +1 -0
  95. package/package.json +10 -9
@@ -24,15 +24,16 @@ export type ThreadId = string & {
24
24
  export type ToolCallId = string & {
25
25
  readonly __brand: 'ToolCallId';
26
26
  };
27
- 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"]>;
27
+ export declare const instanceAiEventTypeSchema: z.ZodEnum<["run-start", "run-finish", "agent-spawned", "agent-completed", "text-delta", "reasoning-delta", "text-block", "reasoning-block", "tool-call", "tool-result", "tool-error", "tool-interrupted", "confirmation-request", "tasks-update", "filesystem-request", "thread-title-updated", "status", "error"]>;
28
28
  export type InstanceAiEventType = z.infer<typeof instanceAiEventTypeSchema>;
29
- export declare const instanceAiRunStatusSchema: z.ZodEnum<["completed", "cancelled", "error"]>;
29
+ export declare const INSTANCE_AI_EPHEMERAL_EVENT_TYPES: ReadonlySet<InstanceAiEventType>;
30
+ export declare const instanceAiRunStatusSchema: z.ZodEnum<["completed", "cancelled", "error", "interrupted"]>;
30
31
  export type InstanceAiRunStatus = z.infer<typeof instanceAiRunStatusSchema>;
31
32
  export declare const instanceAiConfirmationSeveritySchema: z.ZodEnum<["destructive", "warning", "info"]>;
32
33
  export type InstanceAiConfirmationSeverity = z.infer<typeof instanceAiConfirmationSeveritySchema>;
33
34
  export declare const instanceAiAgentStatusSchema: z.ZodEnum<["active", "completed", "cancelled", "error"]>;
34
35
  export type InstanceAiAgentStatus = z.infer<typeof instanceAiAgentStatusSchema>;
35
- export declare const instanceAiAgentKindSchema: z.ZodEnum<["builder", "data-table", "delegate", "planner", "eval-setup"]>;
36
+ export declare const instanceAiAgentKindSchema: z.ZodEnum<["builder", "data-table", "planner", "eval-setup", "agent-builder"]>;
36
37
  export type InstanceAiAgentKind = z.infer<typeof instanceAiAgentKindSchema>;
37
38
  export declare const domainAccessActionSchema: z.ZodEnum<["allow_once", "allow_domain", "allow_all"]>;
38
39
  export type DomainAccessAction = z.infer<typeof domainAccessActionSchema>;
@@ -71,30 +72,33 @@ export declare const runStartPayloadSchema: z.ZodObject<{
71
72
  messageGroupId?: string | undefined;
72
73
  }>;
73
74
  export declare const runFinishPayloadSchema: z.ZodObject<{
74
- status: z.ZodEnum<["completed", "cancelled", "error"]>;
75
+ status: z.ZodEnum<["completed", "cancelled", "error", "interrupted"]>;
75
76
  reason: z.ZodOptional<z.ZodString>;
76
77
  archivedWorkflowIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
77
78
  }, "strip", z.ZodTypeAny, {
78
- status: "error" | "cancelled" | "completed";
79
+ status: "error" | "completed" | "cancelled" | "interrupted";
79
80
  reason?: string | undefined;
80
81
  archivedWorkflowIds?: string[] | undefined;
81
82
  }, {
82
- status: "error" | "cancelled" | "completed";
83
+ status: "error" | "completed" | "cancelled" | "interrupted";
83
84
  reason?: string | undefined;
84
85
  archivedWorkflowIds?: string[] | undefined;
85
86
  }>;
86
87
  export declare const agentSpawnedTargetResourceSchema: z.ZodObject<{
87
- type: z.ZodEnum<["workflow", "data-table", "credential", "other"]>;
88
+ type: z.ZodEnum<["workflow", "data-table", "credential", "agent", "other"]>;
88
89
  id: z.ZodOptional<z.ZodString>;
89
90
  name: z.ZodOptional<z.ZodString>;
91
+ projectId: z.ZodOptional<z.ZodString>;
90
92
  }, "strip", z.ZodTypeAny, {
91
- type: "credential" | "workflow" | "other" | "data-table";
92
- name?: string | undefined;
93
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
93
94
  id?: string | undefined;
94
- }, {
95
- type: "credential" | "workflow" | "other" | "data-table";
96
95
  name?: string | undefined;
96
+ projectId?: string | undefined;
97
+ }, {
98
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
97
99
  id?: string | undefined;
100
+ name?: string | undefined;
101
+ projectId?: string | undefined;
98
102
  }>;
99
103
  export type InstanceAiTargetResource = z.infer<typeof agentSpawnedTargetResourceSchema>;
100
104
  export declare const agentSpawnedPayloadSchema: z.ZodObject<{
@@ -102,50 +106,55 @@ export declare const agentSpawnedPayloadSchema: z.ZodObject<{
102
106
  role: z.ZodString;
103
107
  tools: z.ZodArray<z.ZodString, "many">;
104
108
  taskId: z.ZodOptional<z.ZodString>;
105
- kind: z.ZodOptional<z.ZodEnum<["builder", "data-table", "delegate", "planner", "eval-setup"]>>;
109
+ kind: z.ZodOptional<z.ZodEnum<["builder", "data-table", "planner", "eval-setup", "agent-builder"]>>;
106
110
  title: z.ZodOptional<z.ZodString>;
107
111
  subtitle: z.ZodOptional<z.ZodString>;
108
112
  goal: z.ZodOptional<z.ZodString>;
109
113
  targetResource: z.ZodOptional<z.ZodObject<{
110
- type: z.ZodEnum<["workflow", "data-table", "credential", "other"]>;
114
+ type: z.ZodEnum<["workflow", "data-table", "credential", "agent", "other"]>;
111
115
  id: z.ZodOptional<z.ZodString>;
112
116
  name: z.ZodOptional<z.ZodString>;
117
+ projectId: z.ZodOptional<z.ZodString>;
113
118
  }, "strip", z.ZodTypeAny, {
114
- type: "credential" | "workflow" | "other" | "data-table";
115
- name?: string | undefined;
119
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
116
120
  id?: string | undefined;
117
- }, {
118
- type: "credential" | "workflow" | "other" | "data-table";
119
121
  name?: string | undefined;
122
+ projectId?: string | undefined;
123
+ }, {
124
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
120
125
  id?: string | undefined;
126
+ name?: string | undefined;
127
+ projectId?: string | undefined;
121
128
  }>>;
122
129
  }, "strip", z.ZodTypeAny, {
123
- tools: string[];
124
- role: string;
125
130
  parentId: string;
126
- title?: string | undefined;
131
+ role: string;
132
+ tools: string[];
127
133
  taskId?: string | undefined;
128
- kind?: "builder" | "data-table" | "delegate" | "planner" | "eval-setup" | undefined;
134
+ kind?: "builder" | "data-table" | "planner" | "eval-setup" | "agent-builder" | undefined;
135
+ title?: string | undefined;
129
136
  subtitle?: string | undefined;
130
137
  goal?: string | undefined;
131
138
  targetResource?: {
132
- type: "credential" | "workflow" | "other" | "data-table";
133
- name?: string | undefined;
139
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
134
140
  id?: string | undefined;
141
+ name?: string | undefined;
142
+ projectId?: string | undefined;
135
143
  } | undefined;
136
144
  }, {
137
- tools: string[];
138
- role: string;
139
145
  parentId: string;
140
- title?: string | undefined;
146
+ role: string;
147
+ tools: string[];
141
148
  taskId?: string | undefined;
142
- kind?: "builder" | "data-table" | "delegate" | "planner" | "eval-setup" | undefined;
149
+ kind?: "builder" | "data-table" | "planner" | "eval-setup" | "agent-builder" | undefined;
150
+ title?: string | undefined;
143
151
  subtitle?: string | undefined;
144
152
  goal?: string | undefined;
145
153
  targetResource?: {
146
- type: "credential" | "workflow" | "other" | "data-table";
147
- name?: string | undefined;
154
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
148
155
  id?: string | undefined;
156
+ name?: string | undefined;
157
+ projectId?: string | undefined;
149
158
  } | undefined;
150
159
  }>;
151
160
  export declare const agentCompletedPayloadSchema: z.ZodObject<{
@@ -202,11 +211,11 @@ export declare const toolErrorPayloadSchema: z.ZodObject<{
202
211
  toolCallId: z.ZodString;
203
212
  error: z.ZodString;
204
213
  }, "strip", z.ZodTypeAny, {
205
- toolCallId: string;
206
214
  error: string;
207
- }, {
208
215
  toolCallId: string;
216
+ }, {
209
217
  error: string;
218
+ toolCallId: string;
210
219
  }>;
211
220
  export declare const credentialRequestSchema: z.ZodObject<{
212
221
  credentialType: z.ZodString;
@@ -215,27 +224,27 @@ export declare const credentialRequestSchema: z.ZodObject<{
215
224
  id: z.ZodString;
216
225
  name: z.ZodString;
217
226
  }, "strip", z.ZodTypeAny, {
218
- name: string;
219
227
  id: string;
220
- }, {
221
228
  name: string;
229
+ }, {
222
230
  id: string;
231
+ name: string;
223
232
  }>, "many">;
224
233
  suggestedName: z.ZodOptional<z.ZodString>;
225
234
  }, "strip", z.ZodTypeAny, {
226
- credentialType: string;
227
235
  reason: string;
236
+ credentialType: string;
228
237
  existingCredentials: {
229
- name: string;
230
238
  id: string;
239
+ name: string;
231
240
  }[];
232
241
  suggestedName?: string | undefined;
233
242
  }, {
234
- credentialType: string;
235
243
  reason: string;
244
+ credentialType: string;
236
245
  existingCredentials: {
237
- name: string;
238
246
  id: string;
247
+ name: string;
239
248
  }[];
240
249
  suggestedName?: string | undefined;
241
250
  }>;
@@ -258,54 +267,54 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
258
267
  id: z.ZodString;
259
268
  name: z.ZodString;
260
269
  }, "strip", z.ZodTypeAny, {
261
- name: string;
262
270
  id: string;
263
- }, {
264
271
  name: string;
272
+ }, {
265
273
  id: string;
274
+ name: string;
266
275
  }>, z.ZodObject<{
267
276
  id: z.ZodNull;
268
277
  name: z.ZodString;
269
278
  __aiGatewayManaged: z.ZodLiteral<true>;
270
279
  }, "strip", z.ZodTypeAny, {
271
- name: string;
272
280
  id: null;
281
+ name: string;
273
282
  __aiGatewayManaged: true;
274
283
  }, {
275
- name: string;
276
284
  id: null;
285
+ name: string;
277
286
  __aiGatewayManaged: true;
278
287
  }>]>>>;
279
288
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
280
289
  id: z.ZodString;
281
290
  }, "strip", z.ZodTypeAny, {
282
291
  type: string;
283
- name: string;
284
292
  id: string;
293
+ name: string;
285
294
  typeVersion: number;
286
295
  parameters: Record<string, unknown>;
287
296
  position: [number, number];
288
297
  credentials?: Record<string, {
289
- name: string;
290
298
  id: string;
291
- } | {
292
299
  name: string;
300
+ } | {
293
301
  id: null;
302
+ name: string;
294
303
  __aiGatewayManaged: true;
295
304
  }> | undefined;
296
305
  }, {
297
306
  type: string;
298
- name: string;
299
307
  id: string;
308
+ name: string;
300
309
  typeVersion: number;
301
310
  parameters: Record<string, unknown>;
302
311
  position: [number, number];
303
312
  credentials?: Record<string, {
304
- name: string;
305
313
  id: string;
306
- } | {
307
314
  name: string;
315
+ } | {
308
316
  id: null;
317
+ name: string;
309
318
  __aiGatewayManaged: true;
310
319
  }> | undefined;
311
320
  }>;
@@ -314,11 +323,11 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
314
323
  id: z.ZodString;
315
324
  name: z.ZodString;
316
325
  }, "strip", z.ZodTypeAny, {
317
- name: string;
318
326
  id: string;
319
- }, {
320
327
  name: string;
328
+ }, {
321
329
  id: string;
330
+ name: string;
322
331
  }>, "many">>;
323
332
  isTrigger: z.ZodBoolean;
324
333
  isFirstTrigger: z.ZodOptional<z.ZodBoolean>;
@@ -369,8 +378,8 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
369
378
  value: string | number | boolean;
370
379
  name: string;
371
380
  }[] | undefined;
372
- default?: unknown;
373
381
  required?: boolean | undefined;
382
+ default?: unknown;
374
383
  }, {
375
384
  type: string;
376
385
  name: string;
@@ -379,8 +388,8 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
379
388
  value: string | number | boolean;
380
389
  name: string;
381
390
  }[] | undefined;
382
- default?: unknown;
383
391
  required?: boolean | undefined;
392
+ default?: unknown;
384
393
  }>, "many">>;
385
394
  needsAction: z.ZodOptional<z.ZodBoolean>;
386
395
  subnodeRootNode: z.ZodOptional<z.ZodObject<{
@@ -390,37 +399,37 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
390
399
  id: z.ZodString;
391
400
  }, "strip", z.ZodTypeAny, {
392
401
  type: string;
393
- name: string;
394
402
  id: string;
403
+ name: string;
395
404
  typeVersion: number;
396
405
  }, {
397
406
  type: string;
398
- name: string;
399
407
  id: string;
408
+ name: string;
400
409
  typeVersion: number;
401
410
  }>>;
402
411
  }, "strip", z.ZodTypeAny, {
403
412
  node: {
404
413
  type: string;
405
- name: string;
406
414
  id: string;
415
+ name: string;
407
416
  typeVersion: number;
408
417
  parameters: Record<string, unknown>;
409
418
  position: [number, number];
410
419
  credentials?: Record<string, {
411
- name: string;
412
420
  id: string;
413
- } | {
414
421
  name: string;
422
+ } | {
415
423
  id: null;
424
+ name: string;
416
425
  __aiGatewayManaged: true;
417
426
  }> | undefined;
418
427
  };
419
428
  isTrigger: boolean;
420
429
  credentialType?: string | undefined;
421
430
  existingCredentials?: {
422
- name: string;
423
431
  id: string;
432
+ name: string;
424
433
  }[] | undefined;
425
434
  isFirstTrigger?: boolean | undefined;
426
435
  isTestable?: boolean | undefined;
@@ -442,38 +451,38 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
442
451
  value: string | number | boolean;
443
452
  name: string;
444
453
  }[] | undefined;
445
- default?: unknown;
446
454
  required?: boolean | undefined;
455
+ default?: unknown;
447
456
  }[] | undefined;
448
457
  needsAction?: boolean | undefined;
449
458
  subnodeRootNode?: {
450
459
  type: string;
451
- name: string;
452
460
  id: string;
461
+ name: string;
453
462
  typeVersion: number;
454
463
  } | undefined;
455
464
  }, {
456
465
  node: {
457
466
  type: string;
458
- name: string;
459
467
  id: string;
468
+ name: string;
460
469
  typeVersion: number;
461
470
  parameters: Record<string, unknown>;
462
471
  position: [number, number];
463
472
  credentials?: Record<string, {
464
- name: string;
465
473
  id: string;
466
- } | {
467
474
  name: string;
475
+ } | {
468
476
  id: null;
477
+ name: string;
469
478
  __aiGatewayManaged: true;
470
479
  }> | undefined;
471
480
  };
472
481
  isTrigger: boolean;
473
482
  credentialType?: string | undefined;
474
483
  existingCredentials?: {
475
- name: string;
476
484
  id: string;
485
+ name: string;
477
486
  }[] | undefined;
478
487
  isFirstTrigger?: boolean | undefined;
479
488
  isTestable?: boolean | undefined;
@@ -495,14 +504,14 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
495
504
  value: string | number | boolean;
496
505
  name: string;
497
506
  }[] | undefined;
498
- default?: unknown;
499
507
  required?: boolean | undefined;
508
+ default?: unknown;
500
509
  }[] | undefined;
501
510
  needsAction?: boolean | undefined;
502
511
  subnodeRootNode?: {
503
512
  type: string;
504
- name: string;
505
513
  id: string;
514
+ name: string;
506
515
  typeVersion: number;
507
516
  } | undefined;
508
517
  }>;
@@ -513,14 +522,14 @@ export declare const taskItemSchema: z.ZodObject<{
513
522
  detail: z.ZodOptional<z.ZodString>;
514
523
  status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
515
524
  }, "strip", z.ZodTypeAny, {
516
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
517
- description: string;
525
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
518
526
  id: string;
527
+ description: string;
519
528
  detail?: string | undefined;
520
529
  }, {
521
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
522
- description: string;
530
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
523
531
  id: string;
532
+ description: string;
524
533
  detail?: string | undefined;
525
534
  }>;
526
535
  export type TaskItem = z.infer<typeof taskItemSchema>;
@@ -531,28 +540,28 @@ export declare const taskListSchema: z.ZodObject<{
531
540
  detail: z.ZodOptional<z.ZodString>;
532
541
  status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
533
542
  }, "strip", z.ZodTypeAny, {
534
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
535
- description: string;
543
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
536
544
  id: string;
545
+ description: string;
537
546
  detail?: string | undefined;
538
547
  }, {
539
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
540
- description: string;
548
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
541
549
  id: string;
550
+ description: string;
542
551
  detail?: string | undefined;
543
552
  }>, "many">;
544
553
  }, "strip", z.ZodTypeAny, {
545
554
  tasks: {
546
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
547
- description: string;
555
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
548
556
  id: string;
557
+ description: string;
549
558
  detail?: string | undefined;
550
559
  }[];
551
560
  }, {
552
561
  tasks: {
553
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
554
- description: string;
562
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
555
563
  id: string;
564
+ description: string;
556
565
  detail?: string | undefined;
557
566
  }[];
558
567
  }>;
@@ -568,8 +577,8 @@ export declare const plannedTaskArgSchema: z.ZodObject<{
568
577
  isSupportingWorkflow: z.ZodOptional<z.ZodBoolean>;
569
578
  }, "strip", z.ZodTypeAny, {
570
579
  id: string;
571
- title: string;
572
580
  kind: string;
581
+ title: string;
573
582
  spec: string;
574
583
  deps: string[];
575
584
  tools?: string[] | undefined;
@@ -577,8 +586,8 @@ export declare const plannedTaskArgSchema: z.ZodObject<{
577
586
  isSupportingWorkflow?: boolean | undefined;
578
587
  }, {
579
588
  id: string;
580
- title: string;
581
589
  kind: string;
590
+ title: string;
582
591
  spec: string;
583
592
  deps: string[];
584
593
  tools?: string[] | undefined;
@@ -624,6 +633,17 @@ export declare const gatewayConfirmationRequiredPayloadSchema: z.ZodObject<{
624
633
  resource: string;
625
634
  }>;
626
635
  export type GatewayConfirmationRequiredPayload = z.infer<typeof gatewayConfirmationRequiredPayloadSchema>;
636
+ export declare const channelConfigSchema: z.ZodObject<{
637
+ integrationType: z.ZodString;
638
+ agentId: z.ZodString;
639
+ }, "strip", z.ZodTypeAny, {
640
+ integrationType: string;
641
+ agentId: string;
642
+ }, {
643
+ integrationType: string;
644
+ agentId: string;
645
+ }>;
646
+ export type InstanceAiChannelConfig = z.infer<typeof channelConfigSchema>;
627
647
  export declare const confirmationInputTypeSchema: z.ZodEnum<["approval", "text", "questions", "plan-review", "resource-decision", "continue"]>;
628
648
  export type InstanceAiConfirmationInputType = z.infer<typeof confirmationInputTypeSchema>;
629
649
  export declare const confirmationRequestPayloadSchema: z.ZodObject<{
@@ -641,27 +661,27 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
641
661
  id: z.ZodString;
642
662
  name: z.ZodString;
643
663
  }, "strip", z.ZodTypeAny, {
644
- name: string;
645
664
  id: string;
646
- }, {
647
665
  name: string;
666
+ }, {
648
667
  id: string;
668
+ name: string;
649
669
  }>, "many">;
650
670
  suggestedName: z.ZodOptional<z.ZodString>;
651
671
  }, "strip", z.ZodTypeAny, {
652
- credentialType: string;
653
672
  reason: string;
673
+ credentialType: string;
654
674
  existingCredentials: {
655
- name: string;
656
675
  id: string;
676
+ name: string;
657
677
  }[];
658
678
  suggestedName?: string | undefined;
659
679
  }, {
660
- credentialType: string;
661
680
  reason: string;
681
+ credentialType: string;
662
682
  existingCredentials: {
663
- name: string;
664
683
  id: string;
684
+ name: string;
665
685
  }[];
666
686
  suggestedName?: string | undefined;
667
687
  }>, "many">>;
@@ -674,13 +694,13 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
674
694
  options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
675
695
  }, "strip", z.ZodTypeAny, {
676
696
  type: "text" | "single" | "multi";
677
- question: string;
678
697
  id: string;
698
+ question: string;
679
699
  options?: string[] | undefined;
680
700
  }, {
681
701
  type: "text" | "single" | "multi";
682
- question: string;
683
702
  id: string;
703
+ question: string;
684
704
  options?: string[] | undefined;
685
705
  }>, "many">>;
686
706
  introMessage: z.ZodOptional<z.ZodString>;
@@ -691,28 +711,28 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
691
711
  detail: z.ZodOptional<z.ZodString>;
692
712
  status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
693
713
  }, "strip", z.ZodTypeAny, {
694
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
695
- description: string;
714
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
696
715
  id: string;
716
+ description: string;
697
717
  detail?: string | undefined;
698
718
  }, {
699
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
700
- description: string;
719
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
701
720
  id: string;
721
+ description: string;
702
722
  detail?: string | undefined;
703
723
  }>, "many">;
704
724
  }, "strip", z.ZodTypeAny, {
705
725
  tasks: {
706
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
707
- description: string;
726
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
708
727
  id: string;
728
+ description: string;
709
729
  detail?: string | undefined;
710
730
  }[];
711
731
  }, {
712
732
  tasks: {
713
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
714
- description: string;
733
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
715
734
  id: string;
735
+ description: string;
716
736
  detail?: string | undefined;
717
737
  }[];
718
738
  }>>;
@@ -727,8 +747,8 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
727
747
  isSupportingWorkflow: z.ZodOptional<z.ZodBoolean>;
728
748
  }, "strip", z.ZodTypeAny, {
729
749
  id: string;
730
- title: string;
731
750
  kind: string;
751
+ title: string;
732
752
  spec: string;
733
753
  deps: string[];
734
754
  tools?: string[] | undefined;
@@ -736,8 +756,8 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
736
756
  isSupportingWorkflow?: boolean | undefined;
737
757
  }, {
738
758
  id: string;
739
- title: string;
740
759
  kind: string;
760
+ title: string;
741
761
  spec: string;
742
762
  deps: string[];
743
763
  tools?: string[] | undefined;
@@ -778,54 +798,54 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
778
798
  id: z.ZodString;
779
799
  name: z.ZodString;
780
800
  }, "strip", z.ZodTypeAny, {
781
- name: string;
782
801
  id: string;
783
- }, {
784
802
  name: string;
803
+ }, {
785
804
  id: string;
805
+ name: string;
786
806
  }>, z.ZodObject<{
787
807
  id: z.ZodNull;
788
808
  name: z.ZodString;
789
809
  __aiGatewayManaged: z.ZodLiteral<true>;
790
810
  }, "strip", z.ZodTypeAny, {
791
- name: string;
792
811
  id: null;
812
+ name: string;
793
813
  __aiGatewayManaged: true;
794
814
  }, {
795
- name: string;
796
815
  id: null;
816
+ name: string;
797
817
  __aiGatewayManaged: true;
798
818
  }>]>>>;
799
819
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
800
820
  id: z.ZodString;
801
821
  }, "strip", z.ZodTypeAny, {
802
822
  type: string;
803
- name: string;
804
823
  id: string;
824
+ name: string;
805
825
  typeVersion: number;
806
826
  parameters: Record<string, unknown>;
807
827
  position: [number, number];
808
828
  credentials?: Record<string, {
809
- name: string;
810
829
  id: string;
811
- } | {
812
830
  name: string;
831
+ } | {
813
832
  id: null;
833
+ name: string;
814
834
  __aiGatewayManaged: true;
815
835
  }> | undefined;
816
836
  }, {
817
837
  type: string;
818
- name: string;
819
838
  id: string;
839
+ name: string;
820
840
  typeVersion: number;
821
841
  parameters: Record<string, unknown>;
822
842
  position: [number, number];
823
843
  credentials?: Record<string, {
824
- name: string;
825
844
  id: string;
826
- } | {
827
845
  name: string;
846
+ } | {
828
847
  id: null;
848
+ name: string;
829
849
  __aiGatewayManaged: true;
830
850
  }> | undefined;
831
851
  }>;
@@ -834,11 +854,11 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
834
854
  id: z.ZodString;
835
855
  name: z.ZodString;
836
856
  }, "strip", z.ZodTypeAny, {
837
- name: string;
838
857
  id: string;
839
- }, {
840
858
  name: string;
859
+ }, {
841
860
  id: string;
861
+ name: string;
842
862
  }>, "many">>;
843
863
  isTrigger: z.ZodBoolean;
844
864
  isFirstTrigger: z.ZodOptional<z.ZodBoolean>;
@@ -889,8 +909,8 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
889
909
  value: string | number | boolean;
890
910
  name: string;
891
911
  }[] | undefined;
892
- default?: unknown;
893
912
  required?: boolean | undefined;
913
+ default?: unknown;
894
914
  }, {
895
915
  type: string;
896
916
  name: string;
@@ -899,8 +919,8 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
899
919
  value: string | number | boolean;
900
920
  name: string;
901
921
  }[] | undefined;
902
- default?: unknown;
903
922
  required?: boolean | undefined;
923
+ default?: unknown;
904
924
  }>, "many">>;
905
925
  needsAction: z.ZodOptional<z.ZodBoolean>;
906
926
  subnodeRootNode: z.ZodOptional<z.ZodObject<{
@@ -910,37 +930,37 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
910
930
  id: z.ZodString;
911
931
  }, "strip", z.ZodTypeAny, {
912
932
  type: string;
913
- name: string;
914
933
  id: string;
934
+ name: string;
915
935
  typeVersion: number;
916
936
  }, {
917
937
  type: string;
918
- name: string;
919
938
  id: string;
939
+ name: string;
920
940
  typeVersion: number;
921
941
  }>>;
922
942
  }, "strip", z.ZodTypeAny, {
923
943
  node: {
924
944
  type: string;
925
- name: string;
926
945
  id: string;
946
+ name: string;
927
947
  typeVersion: number;
928
948
  parameters: Record<string, unknown>;
929
949
  position: [number, number];
930
950
  credentials?: Record<string, {
931
- name: string;
932
951
  id: string;
933
- } | {
934
952
  name: string;
953
+ } | {
935
954
  id: null;
955
+ name: string;
936
956
  __aiGatewayManaged: true;
937
957
  }> | undefined;
938
958
  };
939
959
  isTrigger: boolean;
940
960
  credentialType?: string | undefined;
941
961
  existingCredentials?: {
942
- name: string;
943
962
  id: string;
963
+ name: string;
944
964
  }[] | undefined;
945
965
  isFirstTrigger?: boolean | undefined;
946
966
  isTestable?: boolean | undefined;
@@ -962,38 +982,38 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
962
982
  value: string | number | boolean;
963
983
  name: string;
964
984
  }[] | undefined;
965
- default?: unknown;
966
985
  required?: boolean | undefined;
986
+ default?: unknown;
967
987
  }[] | undefined;
968
988
  needsAction?: boolean | undefined;
969
989
  subnodeRootNode?: {
970
990
  type: string;
971
- name: string;
972
991
  id: string;
992
+ name: string;
973
993
  typeVersion: number;
974
994
  } | undefined;
975
995
  }, {
976
996
  node: {
977
997
  type: string;
978
- name: string;
979
998
  id: string;
999
+ name: string;
980
1000
  typeVersion: number;
981
1001
  parameters: Record<string, unknown>;
982
1002
  position: [number, number];
983
1003
  credentials?: Record<string, {
984
- name: string;
985
1004
  id: string;
986
- } | {
987
1005
  name: string;
1006
+ } | {
988
1007
  id: null;
1008
+ name: string;
989
1009
  __aiGatewayManaged: true;
990
1010
  }> | undefined;
991
1011
  };
992
1012
  isTrigger: boolean;
993
1013
  credentialType?: string | undefined;
994
1014
  existingCredentials?: {
995
- name: string;
996
1015
  id: string;
1016
+ name: string;
997
1017
  }[] | undefined;
998
1018
  isFirstTrigger?: boolean | undefined;
999
1019
  isTestable?: boolean | undefined;
@@ -1015,14 +1035,14 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1015
1035
  value: string | number | boolean;
1016
1036
  name: string;
1017
1037
  }[] | undefined;
1018
- default?: unknown;
1019
1038
  required?: boolean | undefined;
1039
+ default?: unknown;
1020
1040
  }[] | undefined;
1021
1041
  needsAction?: boolean | undefined;
1022
1042
  subnodeRootNode?: {
1023
1043
  type: string;
1024
- name: string;
1025
1044
  id: string;
1045
+ name: string;
1026
1046
  typeVersion: number;
1027
1047
  } | undefined;
1028
1048
  }>, "many">>;
@@ -1044,48 +1064,55 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1044
1064
  toolGroup: string;
1045
1065
  resource: string;
1046
1066
  }>>;
1067
+ channelConfig: z.ZodOptional<z.ZodObject<{
1068
+ integrationType: z.ZodString;
1069
+ agentId: z.ZodString;
1070
+ }, "strip", z.ZodTypeAny, {
1071
+ integrationType: string;
1072
+ agentId: string;
1073
+ }, {
1074
+ integrationType: string;
1075
+ agentId: string;
1076
+ }>>;
1047
1077
  }, "strip", z.ZodTypeAny, {
1048
1078
  message: string;
1049
1079
  toolCallId: string;
1050
1080
  toolName: string;
1051
1081
  args: Record<string, unknown>;
1052
1082
  requestId: string;
1053
- severity: "info" | "destructive" | "warning";
1083
+ severity: "destructive" | "warning" | "info";
1084
+ projectId?: string | undefined;
1054
1085
  tasks?: {
1055
1086
  tasks: {
1056
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
1057
- description: string;
1087
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
1058
1088
  id: string;
1089
+ description: string;
1059
1090
  detail?: string | undefined;
1060
1091
  }[];
1061
1092
  } | undefined;
1062
- webSearch?: {
1063
- query: string;
1064
- } | undefined;
1065
1093
  workflowId?: string | undefined;
1066
- projectId?: string | undefined;
1067
1094
  questions?: {
1068
1095
  type: "text" | "single" | "multi";
1069
- question: string;
1070
1096
  id: string;
1097
+ question: string;
1071
1098
  options?: string[] | undefined;
1072
1099
  }[] | undefined;
1073
1100
  inputThreadId?: string | undefined;
1074
1101
  credentialRequests?: {
1075
- credentialType: string;
1076
1102
  reason: string;
1103
+ credentialType: string;
1077
1104
  existingCredentials: {
1078
- name: string;
1079
1105
  id: string;
1106
+ name: string;
1080
1107
  }[];
1081
1108
  suggestedName?: string | undefined;
1082
1109
  }[] | undefined;
1083
- inputType?: "approval" | "text" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
1110
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
1084
1111
  introMessage?: string | undefined;
1085
1112
  planItems?: {
1086
1113
  id: string;
1087
- title: string;
1088
1114
  kind: string;
1115
+ title: string;
1089
1116
  spec: string;
1090
1117
  deps: string[];
1091
1118
  tools?: string[] | undefined;
@@ -1096,31 +1123,34 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1096
1123
  url: string;
1097
1124
  host: string;
1098
1125
  } | undefined;
1126
+ webSearch?: {
1127
+ query: string;
1128
+ } | undefined;
1099
1129
  credentialFlow?: {
1100
1130
  stage: "generic" | "finalize";
1101
1131
  } | undefined;
1102
1132
  setupRequests?: {
1103
1133
  node: {
1104
1134
  type: string;
1105
- name: string;
1106
1135
  id: string;
1136
+ name: string;
1107
1137
  typeVersion: number;
1108
1138
  parameters: Record<string, unknown>;
1109
1139
  position: [number, number];
1110
1140
  credentials?: Record<string, {
1111
- name: string;
1112
1141
  id: string;
1113
- } | {
1114
1142
  name: string;
1143
+ } | {
1115
1144
  id: null;
1145
+ name: string;
1116
1146
  __aiGatewayManaged: true;
1117
1147
  }> | undefined;
1118
1148
  };
1119
1149
  isTrigger: boolean;
1120
1150
  credentialType?: string | undefined;
1121
1151
  existingCredentials?: {
1122
- name: string;
1123
1152
  id: string;
1153
+ name: string;
1124
1154
  }[] | undefined;
1125
1155
  isFirstTrigger?: boolean | undefined;
1126
1156
  isTestable?: boolean | undefined;
@@ -1142,14 +1172,14 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1142
1172
  value: string | number | boolean;
1143
1173
  name: string;
1144
1174
  }[] | undefined;
1145
- default?: unknown;
1146
1175
  required?: boolean | undefined;
1176
+ default?: unknown;
1147
1177
  }[] | undefined;
1148
1178
  needsAction?: boolean | undefined;
1149
1179
  subnodeRootNode?: {
1150
1180
  type: string;
1151
- name: string;
1152
1181
  id: string;
1182
+ name: string;
1153
1183
  typeVersion: number;
1154
1184
  } | undefined;
1155
1185
  }[] | undefined;
@@ -1159,48 +1189,49 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1159
1189
  toolGroup: string;
1160
1190
  resource: string;
1161
1191
  } | undefined;
1192
+ channelConfig?: {
1193
+ integrationType: string;
1194
+ agentId: string;
1195
+ } | undefined;
1162
1196
  }, {
1163
1197
  message: string;
1164
1198
  toolCallId: string;
1165
1199
  toolName: string;
1166
1200
  args: Record<string, unknown>;
1167
1201
  requestId: string;
1168
- severity: "info" | "destructive" | "warning";
1202
+ severity: "destructive" | "warning" | "info";
1203
+ projectId?: string | undefined;
1169
1204
  tasks?: {
1170
1205
  tasks: {
1171
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
1172
- description: string;
1206
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
1173
1207
  id: string;
1208
+ description: string;
1174
1209
  detail?: string | undefined;
1175
1210
  }[];
1176
1211
  } | undefined;
1177
- webSearch?: {
1178
- query: string;
1179
- } | undefined;
1180
1212
  workflowId?: string | undefined;
1181
- projectId?: string | undefined;
1182
1213
  questions?: {
1183
1214
  type: "text" | "single" | "multi";
1184
- question: string;
1185
1215
  id: string;
1216
+ question: string;
1186
1217
  options?: string[] | undefined;
1187
1218
  }[] | undefined;
1188
1219
  inputThreadId?: string | undefined;
1189
1220
  credentialRequests?: {
1190
- credentialType: string;
1191
1221
  reason: string;
1222
+ credentialType: string;
1192
1223
  existingCredentials: {
1193
- name: string;
1194
1224
  id: string;
1225
+ name: string;
1195
1226
  }[];
1196
1227
  suggestedName?: string | undefined;
1197
1228
  }[] | undefined;
1198
- inputType?: "approval" | "text" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
1229
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
1199
1230
  introMessage?: string | undefined;
1200
1231
  planItems?: {
1201
1232
  id: string;
1202
- title: string;
1203
1233
  kind: string;
1234
+ title: string;
1204
1235
  spec: string;
1205
1236
  deps: string[];
1206
1237
  tools?: string[] | undefined;
@@ -1211,31 +1242,34 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1211
1242
  url: string;
1212
1243
  host: string;
1213
1244
  } | undefined;
1245
+ webSearch?: {
1246
+ query: string;
1247
+ } | undefined;
1214
1248
  credentialFlow?: {
1215
1249
  stage: "generic" | "finalize";
1216
1250
  } | undefined;
1217
1251
  setupRequests?: {
1218
1252
  node: {
1219
1253
  type: string;
1220
- name: string;
1221
1254
  id: string;
1255
+ name: string;
1222
1256
  typeVersion: number;
1223
1257
  parameters: Record<string, unknown>;
1224
1258
  position: [number, number];
1225
1259
  credentials?: Record<string, {
1226
- name: string;
1227
1260
  id: string;
1228
- } | {
1229
1261
  name: string;
1262
+ } | {
1230
1263
  id: null;
1264
+ name: string;
1231
1265
  __aiGatewayManaged: true;
1232
1266
  }> | undefined;
1233
1267
  };
1234
1268
  isTrigger: boolean;
1235
1269
  credentialType?: string | undefined;
1236
1270
  existingCredentials?: {
1237
- name: string;
1238
1271
  id: string;
1272
+ name: string;
1239
1273
  }[] | undefined;
1240
1274
  isFirstTrigger?: boolean | undefined;
1241
1275
  isTestable?: boolean | undefined;
@@ -1257,14 +1291,14 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1257
1291
  value: string | number | boolean;
1258
1292
  name: string;
1259
1293
  }[] | undefined;
1260
- default?: unknown;
1261
1294
  required?: boolean | undefined;
1295
+ default?: unknown;
1262
1296
  }[] | undefined;
1263
1297
  needsAction?: boolean | undefined;
1264
1298
  subnodeRootNode?: {
1265
1299
  type: string;
1266
- name: string;
1267
1300
  id: string;
1301
+ name: string;
1268
1302
  typeVersion: number;
1269
1303
  } | undefined;
1270
1304
  }[] | undefined;
@@ -1274,6 +1308,10 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1274
1308
  toolGroup: string;
1275
1309
  resource: string;
1276
1310
  } | undefined;
1311
+ channelConfig?: {
1312
+ integrationType: string;
1313
+ agentId: string;
1314
+ } | undefined;
1277
1315
  }>;
1278
1316
  export type InstanceAiConfirmationRequestPayload = z.infer<typeof confirmationRequestPayloadSchema>;
1279
1317
  export declare function isDisplayableConfirmationRequest(payload: InstanceAiConfirmationRequestPayload): boolean;
@@ -1284,20 +1322,26 @@ export declare const statusPayloadSchema: z.ZodObject<{
1284
1322
  }, {
1285
1323
  message: string;
1286
1324
  }>;
1325
+ export declare const INSTANCE_AI_ERROR_CODES: readonly ["quota_exhausted"];
1326
+ export type InstanceAiErrorCode = (typeof INSTANCE_AI_ERROR_CODES)[number];
1327
+ export declare function isKnownInstanceAiErrorCode(code: string | undefined): code is InstanceAiErrorCode;
1287
1328
  export declare const errorPayloadSchema: z.ZodObject<{
1288
1329
  content: z.ZodString;
1289
1330
  statusCode: z.ZodOptional<z.ZodNumber>;
1331
+ code: z.ZodOptional<z.ZodString>;
1290
1332
  provider: z.ZodOptional<z.ZodString>;
1291
1333
  technicalDetails: z.ZodOptional<z.ZodString>;
1292
1334
  }, "strip", z.ZodTypeAny, {
1293
1335
  content: string;
1294
- provider?: string | undefined;
1336
+ code?: string | undefined;
1295
1337
  statusCode?: number | undefined;
1338
+ provider?: string | undefined;
1296
1339
  technicalDetails?: string | undefined;
1297
1340
  }, {
1298
1341
  content: string;
1299
- provider?: string | undefined;
1342
+ code?: string | undefined;
1300
1343
  statusCode?: number | undefined;
1344
+ provider?: string | undefined;
1301
1345
  technicalDetails?: string | undefined;
1302
1346
  }>;
1303
1347
  export declare const mcpToolAnnotationsSchema: z.ZodObject<{
@@ -1951,28 +1995,28 @@ export declare const tasksUpdatePayloadSchema: z.ZodObject<{
1951
1995
  detail: z.ZodOptional<z.ZodString>;
1952
1996
  status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
1953
1997
  }, "strip", z.ZodTypeAny, {
1954
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
1955
- description: string;
1998
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
1956
1999
  id: string;
2000
+ description: string;
1957
2001
  detail?: string | undefined;
1958
2002
  }, {
1959
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
1960
- description: string;
2003
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
1961
2004
  id: string;
2005
+ description: string;
1962
2006
  detail?: string | undefined;
1963
2007
  }>, "many">;
1964
2008
  }, "strip", z.ZodTypeAny, {
1965
2009
  tasks: {
1966
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
1967
- description: string;
2010
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
1968
2011
  id: string;
2012
+ description: string;
1969
2013
  detail?: string | undefined;
1970
2014
  }[];
1971
2015
  }, {
1972
2016
  tasks: {
1973
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
1974
- description: string;
2017
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
1975
2018
  id: string;
2019
+ description: string;
1976
2020
  detail?: string | undefined;
1977
2021
  }[];
1978
2022
  }>;
@@ -1987,8 +2031,8 @@ export declare const tasksUpdatePayloadSchema: z.ZodObject<{
1987
2031
  isSupportingWorkflow: z.ZodOptional<z.ZodBoolean>;
1988
2032
  }, "strip", z.ZodTypeAny, {
1989
2033
  id: string;
1990
- title: string;
1991
2034
  kind: string;
2035
+ title: string;
1992
2036
  spec: string;
1993
2037
  deps: string[];
1994
2038
  tools?: string[] | undefined;
@@ -1996,8 +2040,8 @@ export declare const tasksUpdatePayloadSchema: z.ZodObject<{
1996
2040
  isSupportingWorkflow?: boolean | undefined;
1997
2041
  }, {
1998
2042
  id: string;
1999
- title: string;
2000
2043
  kind: string;
2044
+ title: string;
2001
2045
  spec: string;
2002
2046
  deps: string[];
2003
2047
  tools?: string[] | undefined;
@@ -2007,16 +2051,16 @@ export declare const tasksUpdatePayloadSchema: z.ZodObject<{
2007
2051
  }, "strip", z.ZodTypeAny, {
2008
2052
  tasks: {
2009
2053
  tasks: {
2010
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
2011
- description: string;
2054
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
2012
2055
  id: string;
2056
+ description: string;
2013
2057
  detail?: string | undefined;
2014
2058
  }[];
2015
2059
  };
2016
2060
  planItems?: {
2017
2061
  id: string;
2018
- title: string;
2019
2062
  kind: string;
2063
+ title: string;
2020
2064
  spec: string;
2021
2065
  deps: string[];
2022
2066
  tools?: string[] | undefined;
@@ -2026,16 +2070,16 @@ export declare const tasksUpdatePayloadSchema: z.ZodObject<{
2026
2070
  }, {
2027
2071
  tasks: {
2028
2072
  tasks: {
2029
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
2030
- description: string;
2073
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
2031
2074
  id: string;
2075
+ description: string;
2032
2076
  detail?: string | undefined;
2033
2077
  }[];
2034
2078
  };
2035
2079
  planItems?: {
2036
2080
  id: string;
2037
- title: string;
2038
2081
  kind: string;
2082
+ title: string;
2039
2083
  spec: string;
2040
2084
  deps: string[];
2041
2085
  tools?: string[] | undefined;
@@ -2072,36 +2116,36 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2072
2116
  }, "strip", z.ZodTypeAny, {
2073
2117
  type: "run-start";
2074
2118
  agentId: string;
2075
- runId: string;
2076
2119
  payload: {
2077
2120
  messageId: string;
2078
2121
  traceId?: string | undefined;
2079
2122
  messageGroupId?: string | undefined;
2080
2123
  };
2124
+ runId: string;
2081
2125
  userId?: string | undefined;
2082
2126
  responseId?: string | undefined;
2083
2127
  }, {
2084
2128
  type: "run-start";
2085
2129
  agentId: string;
2086
- runId: string;
2087
2130
  payload: {
2088
2131
  messageId: string;
2089
2132
  traceId?: string | undefined;
2090
2133
  messageGroupId?: string | undefined;
2091
2134
  };
2135
+ runId: string;
2092
2136
  userId?: string | undefined;
2093
2137
  responseId?: string | undefined;
2094
2138
  }>, z.ZodObject<{
2095
2139
  payload: z.ZodObject<{
2096
- status: z.ZodEnum<["completed", "cancelled", "error"]>;
2140
+ status: z.ZodEnum<["completed", "cancelled", "error", "interrupted"]>;
2097
2141
  reason: z.ZodOptional<z.ZodString>;
2098
2142
  archivedWorkflowIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2099
2143
  }, "strip", z.ZodTypeAny, {
2100
- status: "error" | "cancelled" | "completed";
2144
+ status: "error" | "completed" | "cancelled" | "interrupted";
2101
2145
  reason?: string | undefined;
2102
2146
  archivedWorkflowIds?: string[] | undefined;
2103
2147
  }, {
2104
- status: "error" | "cancelled" | "completed";
2148
+ status: "error" | "completed" | "cancelled" | "interrupted";
2105
2149
  reason?: string | undefined;
2106
2150
  archivedWorkflowIds?: string[] | undefined;
2107
2151
  }>;
@@ -2113,23 +2157,23 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2113
2157
  }, "strip", z.ZodTypeAny, {
2114
2158
  type: "run-finish";
2115
2159
  agentId: string;
2116
- runId: string;
2117
2160
  payload: {
2118
- status: "error" | "cancelled" | "completed";
2161
+ status: "error" | "completed" | "cancelled" | "interrupted";
2119
2162
  reason?: string | undefined;
2120
2163
  archivedWorkflowIds?: string[] | undefined;
2121
2164
  };
2165
+ runId: string;
2122
2166
  userId?: string | undefined;
2123
2167
  responseId?: string | undefined;
2124
2168
  }, {
2125
2169
  type: "run-finish";
2126
2170
  agentId: string;
2127
- runId: string;
2128
2171
  payload: {
2129
- status: "error" | "cancelled" | "completed";
2172
+ status: "error" | "completed" | "cancelled" | "interrupted";
2130
2173
  reason?: string | undefined;
2131
2174
  archivedWorkflowIds?: string[] | undefined;
2132
2175
  };
2176
+ runId: string;
2133
2177
  userId?: string | undefined;
2134
2178
  responseId?: string | undefined;
2135
2179
  }>, z.ZodObject<{
@@ -2138,50 +2182,55 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2138
2182
  role: z.ZodString;
2139
2183
  tools: z.ZodArray<z.ZodString, "many">;
2140
2184
  taskId: z.ZodOptional<z.ZodString>;
2141
- kind: z.ZodOptional<z.ZodEnum<["builder", "data-table", "delegate", "planner", "eval-setup"]>>;
2185
+ kind: z.ZodOptional<z.ZodEnum<["builder", "data-table", "planner", "eval-setup", "agent-builder"]>>;
2142
2186
  title: z.ZodOptional<z.ZodString>;
2143
2187
  subtitle: z.ZodOptional<z.ZodString>;
2144
2188
  goal: z.ZodOptional<z.ZodString>;
2145
2189
  targetResource: z.ZodOptional<z.ZodObject<{
2146
- type: z.ZodEnum<["workflow", "data-table", "credential", "other"]>;
2190
+ type: z.ZodEnum<["workflow", "data-table", "credential", "agent", "other"]>;
2147
2191
  id: z.ZodOptional<z.ZodString>;
2148
2192
  name: z.ZodOptional<z.ZodString>;
2193
+ projectId: z.ZodOptional<z.ZodString>;
2149
2194
  }, "strip", z.ZodTypeAny, {
2150
- type: "credential" | "workflow" | "other" | "data-table";
2151
- name?: string | undefined;
2195
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
2152
2196
  id?: string | undefined;
2153
- }, {
2154
- type: "credential" | "workflow" | "other" | "data-table";
2155
2197
  name?: string | undefined;
2198
+ projectId?: string | undefined;
2199
+ }, {
2200
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
2156
2201
  id?: string | undefined;
2202
+ name?: string | undefined;
2203
+ projectId?: string | undefined;
2157
2204
  }>>;
2158
2205
  }, "strip", z.ZodTypeAny, {
2159
- tools: string[];
2160
- role: string;
2161
2206
  parentId: string;
2162
- title?: string | undefined;
2207
+ role: string;
2208
+ tools: string[];
2163
2209
  taskId?: string | undefined;
2164
- kind?: "builder" | "data-table" | "delegate" | "planner" | "eval-setup" | undefined;
2210
+ kind?: "builder" | "data-table" | "planner" | "eval-setup" | "agent-builder" | undefined;
2211
+ title?: string | undefined;
2165
2212
  subtitle?: string | undefined;
2166
2213
  goal?: string | undefined;
2167
2214
  targetResource?: {
2168
- type: "credential" | "workflow" | "other" | "data-table";
2169
- name?: string | undefined;
2215
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
2170
2216
  id?: string | undefined;
2217
+ name?: string | undefined;
2218
+ projectId?: string | undefined;
2171
2219
  } | undefined;
2172
2220
  }, {
2173
- tools: string[];
2174
- role: string;
2175
2221
  parentId: string;
2176
- title?: string | undefined;
2222
+ role: string;
2223
+ tools: string[];
2177
2224
  taskId?: string | undefined;
2178
- kind?: "builder" | "data-table" | "delegate" | "planner" | "eval-setup" | undefined;
2225
+ kind?: "builder" | "data-table" | "planner" | "eval-setup" | "agent-builder" | undefined;
2226
+ title?: string | undefined;
2179
2227
  subtitle?: string | undefined;
2180
2228
  goal?: string | undefined;
2181
2229
  targetResource?: {
2182
- type: "credential" | "workflow" | "other" | "data-table";
2183
- name?: string | undefined;
2230
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
2184
2231
  id?: string | undefined;
2232
+ name?: string | undefined;
2233
+ projectId?: string | undefined;
2185
2234
  } | undefined;
2186
2235
  }>;
2187
2236
  runId: z.ZodString;
@@ -2192,43 +2241,45 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2192
2241
  }, "strip", z.ZodTypeAny, {
2193
2242
  type: "agent-spawned";
2194
2243
  agentId: string;
2195
- runId: string;
2196
2244
  payload: {
2197
- tools: string[];
2198
- role: string;
2199
2245
  parentId: string;
2200
- title?: string | undefined;
2246
+ role: string;
2247
+ tools: string[];
2201
2248
  taskId?: string | undefined;
2202
- kind?: "builder" | "data-table" | "delegate" | "planner" | "eval-setup" | undefined;
2249
+ kind?: "builder" | "data-table" | "planner" | "eval-setup" | "agent-builder" | undefined;
2250
+ title?: string | undefined;
2203
2251
  subtitle?: string | undefined;
2204
2252
  goal?: string | undefined;
2205
2253
  targetResource?: {
2206
- type: "credential" | "workflow" | "other" | "data-table";
2207
- name?: string | undefined;
2254
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
2208
2255
  id?: string | undefined;
2256
+ name?: string | undefined;
2257
+ projectId?: string | undefined;
2209
2258
  } | undefined;
2210
2259
  };
2260
+ runId: string;
2211
2261
  userId?: string | undefined;
2212
2262
  responseId?: string | undefined;
2213
2263
  }, {
2214
2264
  type: "agent-spawned";
2215
2265
  agentId: string;
2216
- runId: string;
2217
2266
  payload: {
2218
- tools: string[];
2219
- role: string;
2220
2267
  parentId: string;
2221
- title?: string | undefined;
2268
+ role: string;
2269
+ tools: string[];
2222
2270
  taskId?: string | undefined;
2223
- kind?: "builder" | "data-table" | "delegate" | "planner" | "eval-setup" | undefined;
2271
+ kind?: "builder" | "data-table" | "planner" | "eval-setup" | "agent-builder" | undefined;
2272
+ title?: string | undefined;
2224
2273
  subtitle?: string | undefined;
2225
2274
  goal?: string | undefined;
2226
2275
  targetResource?: {
2227
- type: "credential" | "workflow" | "other" | "data-table";
2228
- name?: string | undefined;
2276
+ type: "data-table" | "workflow" | "credential" | "agent" | "other";
2229
2277
  id?: string | undefined;
2278
+ name?: string | undefined;
2279
+ projectId?: string | undefined;
2230
2280
  } | undefined;
2231
2281
  };
2282
+ runId: string;
2232
2283
  userId?: string | undefined;
2233
2284
  responseId?: string | undefined;
2234
2285
  }>, z.ZodObject<{
@@ -2253,23 +2304,23 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2253
2304
  }, "strip", z.ZodTypeAny, {
2254
2305
  type: "agent-completed";
2255
2306
  agentId: string;
2256
- runId: string;
2257
2307
  payload: {
2258
2308
  role: string;
2259
2309
  result: string;
2260
2310
  error?: string | undefined;
2261
2311
  };
2312
+ runId: string;
2262
2313
  userId?: string | undefined;
2263
2314
  responseId?: string | undefined;
2264
2315
  }, {
2265
2316
  type: "agent-completed";
2266
2317
  agentId: string;
2267
- runId: string;
2268
2318
  payload: {
2269
2319
  role: string;
2270
2320
  result: string;
2271
2321
  error?: string | undefined;
2272
2322
  };
2323
+ runId: string;
2273
2324
  userId?: string | undefined;
2274
2325
  responseId?: string | undefined;
2275
2326
  }>, z.ZodObject<{
@@ -2288,19 +2339,19 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2288
2339
  }, "strip", z.ZodTypeAny, {
2289
2340
  type: "text-delta";
2290
2341
  agentId: string;
2291
- runId: string;
2292
2342
  payload: {
2293
2343
  text: string;
2294
2344
  };
2345
+ runId: string;
2295
2346
  userId?: string | undefined;
2296
2347
  responseId?: string | undefined;
2297
2348
  }, {
2298
2349
  type: "text-delta";
2299
2350
  agentId: string;
2300
- runId: string;
2301
2351
  payload: {
2302
2352
  text: string;
2303
2353
  };
2354
+ runId: string;
2304
2355
  userId?: string | undefined;
2305
2356
  responseId?: string | undefined;
2306
2357
  }>, z.ZodObject<{
@@ -2319,19 +2370,81 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2319
2370
  }, "strip", z.ZodTypeAny, {
2320
2371
  type: "reasoning-delta";
2321
2372
  agentId: string;
2322
- runId: string;
2323
2373
  payload: {
2324
2374
  text: string;
2325
2375
  };
2376
+ runId: string;
2326
2377
  userId?: string | undefined;
2327
2378
  responseId?: string | undefined;
2328
2379
  }, {
2329
2380
  type: "reasoning-delta";
2330
2381
  agentId: string;
2382
+ payload: {
2383
+ text: string;
2384
+ };
2385
+ runId: string;
2386
+ userId?: string | undefined;
2387
+ responseId?: string | undefined;
2388
+ }>, z.ZodObject<{
2389
+ payload: z.ZodObject<{
2390
+ text: z.ZodString;
2391
+ }, "strip", z.ZodTypeAny, {
2392
+ text: string;
2393
+ }, {
2394
+ text: string;
2395
+ }>;
2396
+ runId: z.ZodString;
2397
+ agentId: z.ZodString;
2398
+ userId: z.ZodOptional<z.ZodString>;
2399
+ responseId: z.ZodOptional<z.ZodString>;
2400
+ type: z.ZodLiteral<"text-block">;
2401
+ }, "strip", z.ZodTypeAny, {
2402
+ type: "text-block";
2403
+ agentId: string;
2404
+ payload: {
2405
+ text: string;
2406
+ };
2407
+ runId: string;
2408
+ userId?: string | undefined;
2409
+ responseId?: string | undefined;
2410
+ }, {
2411
+ type: "text-block";
2412
+ agentId: string;
2413
+ payload: {
2414
+ text: string;
2415
+ };
2416
+ runId: string;
2417
+ userId?: string | undefined;
2418
+ responseId?: string | undefined;
2419
+ }>, z.ZodObject<{
2420
+ payload: z.ZodObject<{
2421
+ text: z.ZodString;
2422
+ }, "strip", z.ZodTypeAny, {
2423
+ text: string;
2424
+ }, {
2425
+ text: string;
2426
+ }>;
2427
+ runId: z.ZodString;
2428
+ agentId: z.ZodString;
2429
+ userId: z.ZodOptional<z.ZodString>;
2430
+ responseId: z.ZodOptional<z.ZodString>;
2431
+ type: z.ZodLiteral<"reasoning-block">;
2432
+ }, "strip", z.ZodTypeAny, {
2433
+ type: "reasoning-block";
2434
+ agentId: string;
2435
+ payload: {
2436
+ text: string;
2437
+ };
2331
2438
  runId: string;
2439
+ userId?: string | undefined;
2440
+ responseId?: string | undefined;
2441
+ }, {
2442
+ type: "reasoning-block";
2443
+ agentId: string;
2332
2444
  payload: {
2333
2445
  text: string;
2334
2446
  };
2447
+ runId: string;
2335
2448
  userId?: string | undefined;
2336
2449
  responseId?: string | undefined;
2337
2450
  }>, z.ZodObject<{
@@ -2356,23 +2469,23 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2356
2469
  }, "strip", z.ZodTypeAny, {
2357
2470
  type: "tool-call";
2358
2471
  agentId: string;
2359
- runId: string;
2360
2472
  payload: {
2361
2473
  toolCallId: string;
2362
2474
  toolName: string;
2363
2475
  args: Record<string, unknown>;
2364
2476
  };
2477
+ runId: string;
2365
2478
  userId?: string | undefined;
2366
2479
  responseId?: string | undefined;
2367
2480
  }, {
2368
2481
  type: "tool-call";
2369
2482
  agentId: string;
2370
- runId: string;
2371
2483
  payload: {
2372
2484
  toolCallId: string;
2373
2485
  toolName: string;
2374
2486
  args: Record<string, unknown>;
2375
2487
  };
2488
+ runId: string;
2376
2489
  userId?: string | undefined;
2377
2490
  responseId?: string | undefined;
2378
2491
  }>, z.ZodObject<{
@@ -2394,21 +2507,21 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2394
2507
  }, "strip", z.ZodTypeAny, {
2395
2508
  type: "tool-result";
2396
2509
  agentId: string;
2397
- runId: string;
2398
2510
  payload: {
2399
2511
  toolCallId: string;
2400
2512
  result?: unknown;
2401
2513
  };
2514
+ runId: string;
2402
2515
  userId?: string | undefined;
2403
2516
  responseId?: string | undefined;
2404
2517
  }, {
2405
2518
  type: "tool-result";
2406
2519
  agentId: string;
2407
- runId: string;
2408
2520
  payload: {
2409
2521
  toolCallId: string;
2410
2522
  result?: unknown;
2411
2523
  };
2524
+ runId: string;
2412
2525
  userId?: string | undefined;
2413
2526
  responseId?: string | undefined;
2414
2527
  }>, z.ZodObject<{
@@ -2416,11 +2529,11 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2416
2529
  toolCallId: z.ZodString;
2417
2530
  error: z.ZodString;
2418
2531
  }, "strip", z.ZodTypeAny, {
2419
- toolCallId: string;
2420
2532
  error: string;
2421
- }, {
2422
2533
  toolCallId: string;
2534
+ }, {
2423
2535
  error: string;
2536
+ toolCallId: string;
2424
2537
  }>;
2425
2538
  runId: z.ZodString;
2426
2539
  agentId: z.ZodString;
@@ -2430,21 +2543,57 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2430
2543
  }, "strip", z.ZodTypeAny, {
2431
2544
  type: "tool-error";
2432
2545
  agentId: string;
2433
- runId: string;
2434
2546
  payload: {
2435
- toolCallId: string;
2436
2547
  error: string;
2548
+ toolCallId: string;
2437
2549
  };
2550
+ runId: string;
2438
2551
  userId?: string | undefined;
2439
2552
  responseId?: string | undefined;
2440
2553
  }, {
2441
2554
  type: "tool-error";
2442
2555
  agentId: string;
2556
+ payload: {
2557
+ error: string;
2558
+ toolCallId: string;
2559
+ };
2443
2560
  runId: string;
2561
+ userId?: string | undefined;
2562
+ responseId?: string | undefined;
2563
+ }>, z.ZodObject<{
2564
+ payload: z.ZodObject<{
2565
+ toolCallId: z.ZodString;
2566
+ error: z.ZodString;
2567
+ }, "strip", z.ZodTypeAny, {
2568
+ error: string;
2569
+ toolCallId: string;
2570
+ }, {
2571
+ error: string;
2572
+ toolCallId: string;
2573
+ }>;
2574
+ runId: z.ZodString;
2575
+ agentId: z.ZodString;
2576
+ userId: z.ZodOptional<z.ZodString>;
2577
+ responseId: z.ZodOptional<z.ZodString>;
2578
+ type: z.ZodLiteral<"tool-interrupted">;
2579
+ }, "strip", z.ZodTypeAny, {
2580
+ type: "tool-interrupted";
2581
+ agentId: string;
2444
2582
  payload: {
2583
+ error: string;
2445
2584
  toolCallId: string;
2585
+ };
2586
+ runId: string;
2587
+ userId?: string | undefined;
2588
+ responseId?: string | undefined;
2589
+ }, {
2590
+ type: "tool-interrupted";
2591
+ agentId: string;
2592
+ payload: {
2446
2593
  error: string;
2594
+ toolCallId: string;
2447
2595
  };
2596
+ runId: string;
2448
2597
  userId?: string | undefined;
2449
2598
  responseId?: string | undefined;
2450
2599
  }>, z.ZodObject<{
@@ -2463,27 +2612,27 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2463
2612
  id: z.ZodString;
2464
2613
  name: z.ZodString;
2465
2614
  }, "strip", z.ZodTypeAny, {
2466
- name: string;
2467
2615
  id: string;
2468
- }, {
2469
2616
  name: string;
2617
+ }, {
2470
2618
  id: string;
2619
+ name: string;
2471
2620
  }>, "many">;
2472
2621
  suggestedName: z.ZodOptional<z.ZodString>;
2473
2622
  }, "strip", z.ZodTypeAny, {
2474
- credentialType: string;
2475
2623
  reason: string;
2624
+ credentialType: string;
2476
2625
  existingCredentials: {
2477
- name: string;
2478
2626
  id: string;
2627
+ name: string;
2479
2628
  }[];
2480
2629
  suggestedName?: string | undefined;
2481
2630
  }, {
2482
- credentialType: string;
2483
2631
  reason: string;
2632
+ credentialType: string;
2484
2633
  existingCredentials: {
2485
- name: string;
2486
2634
  id: string;
2635
+ name: string;
2487
2636
  }[];
2488
2637
  suggestedName?: string | undefined;
2489
2638
  }>, "many">>;
@@ -2496,13 +2645,13 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2496
2645
  options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2497
2646
  }, "strip", z.ZodTypeAny, {
2498
2647
  type: "text" | "single" | "multi";
2499
- question: string;
2500
2648
  id: string;
2649
+ question: string;
2501
2650
  options?: string[] | undefined;
2502
2651
  }, {
2503
2652
  type: "text" | "single" | "multi";
2504
- question: string;
2505
2653
  id: string;
2654
+ question: string;
2506
2655
  options?: string[] | undefined;
2507
2656
  }>, "many">>;
2508
2657
  introMessage: z.ZodOptional<z.ZodString>;
@@ -2513,28 +2662,28 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2513
2662
  detail: z.ZodOptional<z.ZodString>;
2514
2663
  status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
2515
2664
  }, "strip", z.ZodTypeAny, {
2516
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
2517
- description: string;
2665
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
2518
2666
  id: string;
2667
+ description: string;
2519
2668
  detail?: string | undefined;
2520
2669
  }, {
2521
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
2522
- description: string;
2670
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
2523
2671
  id: string;
2672
+ description: string;
2524
2673
  detail?: string | undefined;
2525
2674
  }>, "many">;
2526
2675
  }, "strip", z.ZodTypeAny, {
2527
2676
  tasks: {
2528
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
2529
- description: string;
2677
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
2530
2678
  id: string;
2679
+ description: string;
2531
2680
  detail?: string | undefined;
2532
2681
  }[];
2533
2682
  }, {
2534
2683
  tasks: {
2535
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
2536
- description: string;
2684
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
2537
2685
  id: string;
2686
+ description: string;
2538
2687
  detail?: string | undefined;
2539
2688
  }[];
2540
2689
  }>>;
@@ -2549,8 +2698,8 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2549
2698
  isSupportingWorkflow: z.ZodOptional<z.ZodBoolean>;
2550
2699
  }, "strip", z.ZodTypeAny, {
2551
2700
  id: string;
2552
- title: string;
2553
2701
  kind: string;
2702
+ title: string;
2554
2703
  spec: string;
2555
2704
  deps: string[];
2556
2705
  tools?: string[] | undefined;
@@ -2558,8 +2707,8 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2558
2707
  isSupportingWorkflow?: boolean | undefined;
2559
2708
  }, {
2560
2709
  id: string;
2561
- title: string;
2562
2710
  kind: string;
2711
+ title: string;
2563
2712
  spec: string;
2564
2713
  deps: string[];
2565
2714
  tools?: string[] | undefined;
@@ -2600,54 +2749,54 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2600
2749
  id: z.ZodString;
2601
2750
  name: z.ZodString;
2602
2751
  }, "strip", z.ZodTypeAny, {
2603
- name: string;
2604
2752
  id: string;
2605
- }, {
2606
2753
  name: string;
2754
+ }, {
2607
2755
  id: string;
2756
+ name: string;
2608
2757
  }>, z.ZodObject<{
2609
2758
  id: z.ZodNull;
2610
2759
  name: z.ZodString;
2611
2760
  __aiGatewayManaged: z.ZodLiteral<true>;
2612
2761
  }, "strip", z.ZodTypeAny, {
2613
- name: string;
2614
2762
  id: null;
2763
+ name: string;
2615
2764
  __aiGatewayManaged: true;
2616
2765
  }, {
2617
- name: string;
2618
2766
  id: null;
2767
+ name: string;
2619
2768
  __aiGatewayManaged: true;
2620
2769
  }>]>>>;
2621
2770
  position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
2622
2771
  id: z.ZodString;
2623
2772
  }, "strip", z.ZodTypeAny, {
2624
2773
  type: string;
2625
- name: string;
2626
2774
  id: string;
2775
+ name: string;
2627
2776
  typeVersion: number;
2628
2777
  parameters: Record<string, unknown>;
2629
2778
  position: [number, number];
2630
2779
  credentials?: Record<string, {
2631
- name: string;
2632
2780
  id: string;
2633
- } | {
2634
2781
  name: string;
2782
+ } | {
2635
2783
  id: null;
2784
+ name: string;
2636
2785
  __aiGatewayManaged: true;
2637
2786
  }> | undefined;
2638
2787
  }, {
2639
2788
  type: string;
2640
- name: string;
2641
2789
  id: string;
2790
+ name: string;
2642
2791
  typeVersion: number;
2643
2792
  parameters: Record<string, unknown>;
2644
2793
  position: [number, number];
2645
2794
  credentials?: Record<string, {
2646
- name: string;
2647
2795
  id: string;
2648
- } | {
2649
2796
  name: string;
2797
+ } | {
2650
2798
  id: null;
2799
+ name: string;
2651
2800
  __aiGatewayManaged: true;
2652
2801
  }> | undefined;
2653
2802
  }>;
@@ -2656,11 +2805,11 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2656
2805
  id: z.ZodString;
2657
2806
  name: z.ZodString;
2658
2807
  }, "strip", z.ZodTypeAny, {
2659
- name: string;
2660
2808
  id: string;
2661
- }, {
2662
2809
  name: string;
2810
+ }, {
2663
2811
  id: string;
2812
+ name: string;
2664
2813
  }>, "many">>;
2665
2814
  isTrigger: z.ZodBoolean;
2666
2815
  isFirstTrigger: z.ZodOptional<z.ZodBoolean>;
@@ -2711,8 +2860,8 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2711
2860
  value: string | number | boolean;
2712
2861
  name: string;
2713
2862
  }[] | undefined;
2714
- default?: unknown;
2715
2863
  required?: boolean | undefined;
2864
+ default?: unknown;
2716
2865
  }, {
2717
2866
  type: string;
2718
2867
  name: string;
@@ -2721,8 +2870,8 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2721
2870
  value: string | number | boolean;
2722
2871
  name: string;
2723
2872
  }[] | undefined;
2724
- default?: unknown;
2725
2873
  required?: boolean | undefined;
2874
+ default?: unknown;
2726
2875
  }>, "many">>;
2727
2876
  needsAction: z.ZodOptional<z.ZodBoolean>;
2728
2877
  subnodeRootNode: z.ZodOptional<z.ZodObject<{
@@ -2732,37 +2881,37 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2732
2881
  id: z.ZodString;
2733
2882
  }, "strip", z.ZodTypeAny, {
2734
2883
  type: string;
2735
- name: string;
2736
2884
  id: string;
2885
+ name: string;
2737
2886
  typeVersion: number;
2738
2887
  }, {
2739
2888
  type: string;
2740
- name: string;
2741
2889
  id: string;
2890
+ name: string;
2742
2891
  typeVersion: number;
2743
2892
  }>>;
2744
2893
  }, "strip", z.ZodTypeAny, {
2745
2894
  node: {
2746
2895
  type: string;
2747
- name: string;
2748
2896
  id: string;
2897
+ name: string;
2749
2898
  typeVersion: number;
2750
2899
  parameters: Record<string, unknown>;
2751
2900
  position: [number, number];
2752
2901
  credentials?: Record<string, {
2753
- name: string;
2754
2902
  id: string;
2755
- } | {
2756
2903
  name: string;
2904
+ } | {
2757
2905
  id: null;
2906
+ name: string;
2758
2907
  __aiGatewayManaged: true;
2759
2908
  }> | undefined;
2760
2909
  };
2761
2910
  isTrigger: boolean;
2762
2911
  credentialType?: string | undefined;
2763
2912
  existingCredentials?: {
2764
- name: string;
2765
2913
  id: string;
2914
+ name: string;
2766
2915
  }[] | undefined;
2767
2916
  isFirstTrigger?: boolean | undefined;
2768
2917
  isTestable?: boolean | undefined;
@@ -2784,38 +2933,38 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2784
2933
  value: string | number | boolean;
2785
2934
  name: string;
2786
2935
  }[] | undefined;
2787
- default?: unknown;
2788
2936
  required?: boolean | undefined;
2937
+ default?: unknown;
2789
2938
  }[] | undefined;
2790
2939
  needsAction?: boolean | undefined;
2791
2940
  subnodeRootNode?: {
2792
2941
  type: string;
2793
- name: string;
2794
2942
  id: string;
2943
+ name: string;
2795
2944
  typeVersion: number;
2796
2945
  } | undefined;
2797
2946
  }, {
2798
2947
  node: {
2799
2948
  type: string;
2800
- name: string;
2801
2949
  id: string;
2950
+ name: string;
2802
2951
  typeVersion: number;
2803
2952
  parameters: Record<string, unknown>;
2804
2953
  position: [number, number];
2805
2954
  credentials?: Record<string, {
2806
- name: string;
2807
2955
  id: string;
2808
- } | {
2809
2956
  name: string;
2957
+ } | {
2810
2958
  id: null;
2959
+ name: string;
2811
2960
  __aiGatewayManaged: true;
2812
2961
  }> | undefined;
2813
2962
  };
2814
2963
  isTrigger: boolean;
2815
2964
  credentialType?: string | undefined;
2816
2965
  existingCredentials?: {
2817
- name: string;
2818
2966
  id: string;
2967
+ name: string;
2819
2968
  }[] | undefined;
2820
2969
  isFirstTrigger?: boolean | undefined;
2821
2970
  isTestable?: boolean | undefined;
@@ -2837,14 +2986,14 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2837
2986
  value: string | number | boolean;
2838
2987
  name: string;
2839
2988
  }[] | undefined;
2840
- default?: unknown;
2841
2989
  required?: boolean | undefined;
2990
+ default?: unknown;
2842
2991
  }[] | undefined;
2843
2992
  needsAction?: boolean | undefined;
2844
2993
  subnodeRootNode?: {
2845
2994
  type: string;
2846
- name: string;
2847
2995
  id: string;
2996
+ name: string;
2848
2997
  typeVersion: number;
2849
2998
  } | undefined;
2850
2999
  }>, "many">>;
@@ -2866,48 +3015,55 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2866
3015
  toolGroup: string;
2867
3016
  resource: string;
2868
3017
  }>>;
3018
+ channelConfig: z.ZodOptional<z.ZodObject<{
3019
+ integrationType: z.ZodString;
3020
+ agentId: z.ZodString;
3021
+ }, "strip", z.ZodTypeAny, {
3022
+ integrationType: string;
3023
+ agentId: string;
3024
+ }, {
3025
+ integrationType: string;
3026
+ agentId: string;
3027
+ }>>;
2869
3028
  }, "strip", z.ZodTypeAny, {
2870
3029
  message: string;
2871
3030
  toolCallId: string;
2872
3031
  toolName: string;
2873
3032
  args: Record<string, unknown>;
2874
3033
  requestId: string;
2875
- severity: "info" | "destructive" | "warning";
3034
+ severity: "destructive" | "warning" | "info";
3035
+ projectId?: string | undefined;
2876
3036
  tasks?: {
2877
3037
  tasks: {
2878
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
2879
- description: string;
3038
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
2880
3039
  id: string;
3040
+ description: string;
2881
3041
  detail?: string | undefined;
2882
3042
  }[];
2883
3043
  } | undefined;
2884
- webSearch?: {
2885
- query: string;
2886
- } | undefined;
2887
3044
  workflowId?: string | undefined;
2888
- projectId?: string | undefined;
2889
3045
  questions?: {
2890
3046
  type: "text" | "single" | "multi";
2891
- question: string;
2892
3047
  id: string;
3048
+ question: string;
2893
3049
  options?: string[] | undefined;
2894
3050
  }[] | undefined;
2895
3051
  inputThreadId?: string | undefined;
2896
3052
  credentialRequests?: {
2897
- credentialType: string;
2898
3053
  reason: string;
3054
+ credentialType: string;
2899
3055
  existingCredentials: {
2900
- name: string;
2901
3056
  id: string;
3057
+ name: string;
2902
3058
  }[];
2903
3059
  suggestedName?: string | undefined;
2904
3060
  }[] | undefined;
2905
- inputType?: "approval" | "text" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
3061
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
2906
3062
  introMessage?: string | undefined;
2907
3063
  planItems?: {
2908
3064
  id: string;
2909
- title: string;
2910
3065
  kind: string;
3066
+ title: string;
2911
3067
  spec: string;
2912
3068
  deps: string[];
2913
3069
  tools?: string[] | undefined;
@@ -2918,31 +3074,34 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2918
3074
  url: string;
2919
3075
  host: string;
2920
3076
  } | undefined;
3077
+ webSearch?: {
3078
+ query: string;
3079
+ } | undefined;
2921
3080
  credentialFlow?: {
2922
3081
  stage: "generic" | "finalize";
2923
3082
  } | undefined;
2924
3083
  setupRequests?: {
2925
3084
  node: {
2926
3085
  type: string;
2927
- name: string;
2928
3086
  id: string;
3087
+ name: string;
2929
3088
  typeVersion: number;
2930
3089
  parameters: Record<string, unknown>;
2931
3090
  position: [number, number];
2932
3091
  credentials?: Record<string, {
2933
- name: string;
2934
3092
  id: string;
2935
- } | {
2936
3093
  name: string;
3094
+ } | {
2937
3095
  id: null;
3096
+ name: string;
2938
3097
  __aiGatewayManaged: true;
2939
3098
  }> | undefined;
2940
3099
  };
2941
3100
  isTrigger: boolean;
2942
3101
  credentialType?: string | undefined;
2943
3102
  existingCredentials?: {
2944
- name: string;
2945
3103
  id: string;
3104
+ name: string;
2946
3105
  }[] | undefined;
2947
3106
  isFirstTrigger?: boolean | undefined;
2948
3107
  isTestable?: boolean | undefined;
@@ -2964,14 +3123,14 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2964
3123
  value: string | number | boolean;
2965
3124
  name: string;
2966
3125
  }[] | undefined;
2967
- default?: unknown;
2968
3126
  required?: boolean | undefined;
3127
+ default?: unknown;
2969
3128
  }[] | undefined;
2970
3129
  needsAction?: boolean | undefined;
2971
3130
  subnodeRootNode?: {
2972
3131
  type: string;
2973
- name: string;
2974
3132
  id: string;
3133
+ name: string;
2975
3134
  typeVersion: number;
2976
3135
  } | undefined;
2977
3136
  }[] | undefined;
@@ -2981,48 +3140,49 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
2981
3140
  toolGroup: string;
2982
3141
  resource: string;
2983
3142
  } | undefined;
3143
+ channelConfig?: {
3144
+ integrationType: string;
3145
+ agentId: string;
3146
+ } | undefined;
2984
3147
  }, {
2985
3148
  message: string;
2986
3149
  toolCallId: string;
2987
3150
  toolName: string;
2988
3151
  args: Record<string, unknown>;
2989
3152
  requestId: string;
2990
- severity: "info" | "destructive" | "warning";
3153
+ severity: "destructive" | "warning" | "info";
3154
+ projectId?: string | undefined;
2991
3155
  tasks?: {
2992
3156
  tasks: {
2993
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
2994
- description: string;
3157
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
2995
3158
  id: string;
3159
+ description: string;
2996
3160
  detail?: string | undefined;
2997
3161
  }[];
2998
3162
  } | undefined;
2999
- webSearch?: {
3000
- query: string;
3001
- } | undefined;
3002
3163
  workflowId?: string | undefined;
3003
- projectId?: string | undefined;
3004
3164
  questions?: {
3005
3165
  type: "text" | "single" | "multi";
3006
- question: string;
3007
3166
  id: string;
3167
+ question: string;
3008
3168
  options?: string[] | undefined;
3009
3169
  }[] | undefined;
3010
3170
  inputThreadId?: string | undefined;
3011
3171
  credentialRequests?: {
3012
- credentialType: string;
3013
3172
  reason: string;
3173
+ credentialType: string;
3014
3174
  existingCredentials: {
3015
- name: string;
3016
3175
  id: string;
3176
+ name: string;
3017
3177
  }[];
3018
3178
  suggestedName?: string | undefined;
3019
3179
  }[] | undefined;
3020
- inputType?: "approval" | "text" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
3180
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
3021
3181
  introMessage?: string | undefined;
3022
3182
  planItems?: {
3023
3183
  id: string;
3024
- title: string;
3025
3184
  kind: string;
3185
+ title: string;
3026
3186
  spec: string;
3027
3187
  deps: string[];
3028
3188
  tools?: string[] | undefined;
@@ -3033,31 +3193,34 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3033
3193
  url: string;
3034
3194
  host: string;
3035
3195
  } | undefined;
3196
+ webSearch?: {
3197
+ query: string;
3198
+ } | undefined;
3036
3199
  credentialFlow?: {
3037
3200
  stage: "generic" | "finalize";
3038
3201
  } | undefined;
3039
3202
  setupRequests?: {
3040
3203
  node: {
3041
3204
  type: string;
3042
- name: string;
3043
3205
  id: string;
3206
+ name: string;
3044
3207
  typeVersion: number;
3045
3208
  parameters: Record<string, unknown>;
3046
3209
  position: [number, number];
3047
3210
  credentials?: Record<string, {
3048
- name: string;
3049
3211
  id: string;
3050
- } | {
3051
3212
  name: string;
3213
+ } | {
3052
3214
  id: null;
3215
+ name: string;
3053
3216
  __aiGatewayManaged: true;
3054
3217
  }> | undefined;
3055
3218
  };
3056
3219
  isTrigger: boolean;
3057
3220
  credentialType?: string | undefined;
3058
3221
  existingCredentials?: {
3059
- name: string;
3060
3222
  id: string;
3223
+ name: string;
3061
3224
  }[] | undefined;
3062
3225
  isFirstTrigger?: boolean | undefined;
3063
3226
  isTestable?: boolean | undefined;
@@ -3079,14 +3242,14 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3079
3242
  value: string | number | boolean;
3080
3243
  name: string;
3081
3244
  }[] | undefined;
3082
- default?: unknown;
3083
3245
  required?: boolean | undefined;
3246
+ default?: unknown;
3084
3247
  }[] | undefined;
3085
3248
  needsAction?: boolean | undefined;
3086
3249
  subnodeRootNode?: {
3087
3250
  type: string;
3088
- name: string;
3089
3251
  id: string;
3252
+ name: string;
3090
3253
  typeVersion: number;
3091
3254
  } | undefined;
3092
3255
  }[] | undefined;
@@ -3096,6 +3259,10 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3096
3259
  toolGroup: string;
3097
3260
  resource: string;
3098
3261
  } | undefined;
3262
+ channelConfig?: {
3263
+ integrationType: string;
3264
+ agentId: string;
3265
+ } | undefined;
3099
3266
  }>;
3100
3267
  runId: z.ZodString;
3101
3268
  agentId: z.ZodString;
@@ -3105,49 +3272,45 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3105
3272
  }, "strip", z.ZodTypeAny, {
3106
3273
  type: "confirmation-request";
3107
3274
  agentId: string;
3108
- runId: string;
3109
3275
  payload: {
3110
3276
  message: string;
3111
3277
  toolCallId: string;
3112
3278
  toolName: string;
3113
3279
  args: Record<string, unknown>;
3114
3280
  requestId: string;
3115
- severity: "info" | "destructive" | "warning";
3281
+ severity: "destructive" | "warning" | "info";
3282
+ projectId?: string | undefined;
3116
3283
  tasks?: {
3117
3284
  tasks: {
3118
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3119
- description: string;
3285
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3120
3286
  id: string;
3287
+ description: string;
3121
3288
  detail?: string | undefined;
3122
3289
  }[];
3123
3290
  } | undefined;
3124
- webSearch?: {
3125
- query: string;
3126
- } | undefined;
3127
3291
  workflowId?: string | undefined;
3128
- projectId?: string | undefined;
3129
3292
  questions?: {
3130
3293
  type: "text" | "single" | "multi";
3131
- question: string;
3132
3294
  id: string;
3295
+ question: string;
3133
3296
  options?: string[] | undefined;
3134
3297
  }[] | undefined;
3135
3298
  inputThreadId?: string | undefined;
3136
3299
  credentialRequests?: {
3137
- credentialType: string;
3138
3300
  reason: string;
3301
+ credentialType: string;
3139
3302
  existingCredentials: {
3140
- name: string;
3141
3303
  id: string;
3304
+ name: string;
3142
3305
  }[];
3143
3306
  suggestedName?: string | undefined;
3144
3307
  }[] | undefined;
3145
- inputType?: "approval" | "text" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
3308
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
3146
3309
  introMessage?: string | undefined;
3147
3310
  planItems?: {
3148
3311
  id: string;
3149
- title: string;
3150
3312
  kind: string;
3313
+ title: string;
3151
3314
  spec: string;
3152
3315
  deps: string[];
3153
3316
  tools?: string[] | undefined;
@@ -3158,31 +3321,34 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3158
3321
  url: string;
3159
3322
  host: string;
3160
3323
  } | undefined;
3324
+ webSearch?: {
3325
+ query: string;
3326
+ } | undefined;
3161
3327
  credentialFlow?: {
3162
3328
  stage: "generic" | "finalize";
3163
3329
  } | undefined;
3164
3330
  setupRequests?: {
3165
3331
  node: {
3166
3332
  type: string;
3167
- name: string;
3168
3333
  id: string;
3334
+ name: string;
3169
3335
  typeVersion: number;
3170
3336
  parameters: Record<string, unknown>;
3171
3337
  position: [number, number];
3172
3338
  credentials?: Record<string, {
3173
- name: string;
3174
3339
  id: string;
3175
- } | {
3176
3340
  name: string;
3341
+ } | {
3177
3342
  id: null;
3343
+ name: string;
3178
3344
  __aiGatewayManaged: true;
3179
3345
  }> | undefined;
3180
3346
  };
3181
3347
  isTrigger: boolean;
3182
3348
  credentialType?: string | undefined;
3183
3349
  existingCredentials?: {
3184
- name: string;
3185
3350
  id: string;
3351
+ name: string;
3186
3352
  }[] | undefined;
3187
3353
  isFirstTrigger?: boolean | undefined;
3188
3354
  isTestable?: boolean | undefined;
@@ -3204,14 +3370,14 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3204
3370
  value: string | number | boolean;
3205
3371
  name: string;
3206
3372
  }[] | undefined;
3207
- default?: unknown;
3208
3373
  required?: boolean | undefined;
3374
+ default?: unknown;
3209
3375
  }[] | undefined;
3210
3376
  needsAction?: boolean | undefined;
3211
3377
  subnodeRootNode?: {
3212
3378
  type: string;
3213
- name: string;
3214
3379
  id: string;
3380
+ name: string;
3215
3381
  typeVersion: number;
3216
3382
  } | undefined;
3217
3383
  }[] | undefined;
@@ -3221,55 +3387,56 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3221
3387
  toolGroup: string;
3222
3388
  resource: string;
3223
3389
  } | undefined;
3390
+ channelConfig?: {
3391
+ integrationType: string;
3392
+ agentId: string;
3393
+ } | undefined;
3224
3394
  };
3395
+ runId: string;
3225
3396
  userId?: string | undefined;
3226
3397
  responseId?: string | undefined;
3227
3398
  }, {
3228
3399
  type: "confirmation-request";
3229
3400
  agentId: string;
3230
- runId: string;
3231
3401
  payload: {
3232
3402
  message: string;
3233
3403
  toolCallId: string;
3234
3404
  toolName: string;
3235
3405
  args: Record<string, unknown>;
3236
3406
  requestId: string;
3237
- severity: "info" | "destructive" | "warning";
3407
+ severity: "destructive" | "warning" | "info";
3408
+ projectId?: string | undefined;
3238
3409
  tasks?: {
3239
3410
  tasks: {
3240
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3241
- description: string;
3411
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3242
3412
  id: string;
3413
+ description: string;
3243
3414
  detail?: string | undefined;
3244
3415
  }[];
3245
3416
  } | undefined;
3246
- webSearch?: {
3247
- query: string;
3248
- } | undefined;
3249
3417
  workflowId?: string | undefined;
3250
- projectId?: string | undefined;
3251
3418
  questions?: {
3252
3419
  type: "text" | "single" | "multi";
3253
- question: string;
3254
3420
  id: string;
3421
+ question: string;
3255
3422
  options?: string[] | undefined;
3256
3423
  }[] | undefined;
3257
3424
  inputThreadId?: string | undefined;
3258
3425
  credentialRequests?: {
3259
- credentialType: string;
3260
3426
  reason: string;
3427
+ credentialType: string;
3261
3428
  existingCredentials: {
3262
- name: string;
3263
3429
  id: string;
3430
+ name: string;
3264
3431
  }[];
3265
3432
  suggestedName?: string | undefined;
3266
3433
  }[] | undefined;
3267
- inputType?: "approval" | "text" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
3434
+ inputType?: "text" | "approval" | "questions" | "plan-review" | "resource-decision" | "continue" | undefined;
3268
3435
  introMessage?: string | undefined;
3269
3436
  planItems?: {
3270
3437
  id: string;
3271
- title: string;
3272
3438
  kind: string;
3439
+ title: string;
3273
3440
  spec: string;
3274
3441
  deps: string[];
3275
3442
  tools?: string[] | undefined;
@@ -3280,31 +3447,34 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3280
3447
  url: string;
3281
3448
  host: string;
3282
3449
  } | undefined;
3450
+ webSearch?: {
3451
+ query: string;
3452
+ } | undefined;
3283
3453
  credentialFlow?: {
3284
3454
  stage: "generic" | "finalize";
3285
3455
  } | undefined;
3286
3456
  setupRequests?: {
3287
3457
  node: {
3288
3458
  type: string;
3289
- name: string;
3290
3459
  id: string;
3460
+ name: string;
3291
3461
  typeVersion: number;
3292
3462
  parameters: Record<string, unknown>;
3293
3463
  position: [number, number];
3294
3464
  credentials?: Record<string, {
3295
- name: string;
3296
3465
  id: string;
3297
- } | {
3298
3466
  name: string;
3467
+ } | {
3299
3468
  id: null;
3469
+ name: string;
3300
3470
  __aiGatewayManaged: true;
3301
3471
  }> | undefined;
3302
3472
  };
3303
3473
  isTrigger: boolean;
3304
3474
  credentialType?: string | undefined;
3305
3475
  existingCredentials?: {
3306
- name: string;
3307
3476
  id: string;
3477
+ name: string;
3308
3478
  }[] | undefined;
3309
3479
  isFirstTrigger?: boolean | undefined;
3310
3480
  isTestable?: boolean | undefined;
@@ -3326,14 +3496,14 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3326
3496
  value: string | number | boolean;
3327
3497
  name: string;
3328
3498
  }[] | undefined;
3329
- default?: unknown;
3330
3499
  required?: boolean | undefined;
3500
+ default?: unknown;
3331
3501
  }[] | undefined;
3332
3502
  needsAction?: boolean | undefined;
3333
3503
  subnodeRootNode?: {
3334
3504
  type: string;
3335
- name: string;
3336
3505
  id: string;
3506
+ name: string;
3337
3507
  typeVersion: number;
3338
3508
  } | undefined;
3339
3509
  }[] | undefined;
@@ -3343,7 +3513,12 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3343
3513
  toolGroup: string;
3344
3514
  resource: string;
3345
3515
  } | undefined;
3516
+ channelConfig?: {
3517
+ integrationType: string;
3518
+ agentId: string;
3519
+ } | undefined;
3346
3520
  };
3521
+ runId: string;
3347
3522
  userId?: string | undefined;
3348
3523
  responseId?: string | undefined;
3349
3524
  }>, z.ZodObject<{
@@ -3355,28 +3530,28 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3355
3530
  detail: z.ZodOptional<z.ZodString>;
3356
3531
  status: z.ZodEnum<["todo", "in_progress", "done", "failed", "cancelled"]>;
3357
3532
  }, "strip", z.ZodTypeAny, {
3358
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3359
- description: string;
3533
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3360
3534
  id: string;
3535
+ description: string;
3361
3536
  detail?: string | undefined;
3362
3537
  }, {
3363
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3364
- description: string;
3538
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3365
3539
  id: string;
3540
+ description: string;
3366
3541
  detail?: string | undefined;
3367
3542
  }>, "many">;
3368
3543
  }, "strip", z.ZodTypeAny, {
3369
3544
  tasks: {
3370
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3371
- description: string;
3545
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3372
3546
  id: string;
3547
+ description: string;
3373
3548
  detail?: string | undefined;
3374
3549
  }[];
3375
3550
  }, {
3376
3551
  tasks: {
3377
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3378
- description: string;
3552
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3379
3553
  id: string;
3554
+ description: string;
3380
3555
  detail?: string | undefined;
3381
3556
  }[];
3382
3557
  }>;
@@ -3391,8 +3566,8 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3391
3566
  isSupportingWorkflow: z.ZodOptional<z.ZodBoolean>;
3392
3567
  }, "strip", z.ZodTypeAny, {
3393
3568
  id: string;
3394
- title: string;
3395
3569
  kind: string;
3570
+ title: string;
3396
3571
  spec: string;
3397
3572
  deps: string[];
3398
3573
  tools?: string[] | undefined;
@@ -3400,8 +3575,8 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3400
3575
  isSupportingWorkflow?: boolean | undefined;
3401
3576
  }, {
3402
3577
  id: string;
3403
- title: string;
3404
3578
  kind: string;
3579
+ title: string;
3405
3580
  spec: string;
3406
3581
  deps: string[];
3407
3582
  tools?: string[] | undefined;
@@ -3411,16 +3586,16 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3411
3586
  }, "strip", z.ZodTypeAny, {
3412
3587
  tasks: {
3413
3588
  tasks: {
3414
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3415
- description: string;
3589
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3416
3590
  id: string;
3591
+ description: string;
3417
3592
  detail?: string | undefined;
3418
3593
  }[];
3419
3594
  };
3420
3595
  planItems?: {
3421
3596
  id: string;
3422
- title: string;
3423
3597
  kind: string;
3598
+ title: string;
3424
3599
  spec: string;
3425
3600
  deps: string[];
3426
3601
  tools?: string[] | undefined;
@@ -3430,16 +3605,16 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3430
3605
  }, {
3431
3606
  tasks: {
3432
3607
  tasks: {
3433
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3434
- description: string;
3608
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3435
3609
  id: string;
3610
+ description: string;
3436
3611
  detail?: string | undefined;
3437
3612
  }[];
3438
3613
  };
3439
3614
  planItems?: {
3440
3615
  id: string;
3441
- title: string;
3442
3616
  kind: string;
3617
+ title: string;
3443
3618
  spec: string;
3444
3619
  deps: string[];
3445
3620
  tools?: string[] | undefined;
@@ -3455,20 +3630,19 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3455
3630
  }, "strip", z.ZodTypeAny, {
3456
3631
  type: "tasks-update";
3457
3632
  agentId: string;
3458
- runId: string;
3459
3633
  payload: {
3460
3634
  tasks: {
3461
3635
  tasks: {
3462
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3463
- description: string;
3636
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3464
3637
  id: string;
3638
+ description: string;
3465
3639
  detail?: string | undefined;
3466
3640
  }[];
3467
3641
  };
3468
3642
  planItems?: {
3469
3643
  id: string;
3470
- title: string;
3471
3644
  kind: string;
3645
+ title: string;
3472
3646
  spec: string;
3473
3647
  deps: string[];
3474
3648
  tools?: string[] | undefined;
@@ -3476,25 +3650,25 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3476
3650
  isSupportingWorkflow?: boolean | undefined;
3477
3651
  }[] | undefined;
3478
3652
  };
3653
+ runId: string;
3479
3654
  userId?: string | undefined;
3480
3655
  responseId?: string | undefined;
3481
3656
  }, {
3482
3657
  type: "tasks-update";
3483
3658
  agentId: string;
3484
- runId: string;
3485
3659
  payload: {
3486
3660
  tasks: {
3487
3661
  tasks: {
3488
- status: "done" | "cancelled" | "failed" | "todo" | "in_progress";
3489
- description: string;
3662
+ status: "cancelled" | "todo" | "in_progress" | "done" | "failed";
3490
3663
  id: string;
3664
+ description: string;
3491
3665
  detail?: string | undefined;
3492
3666
  }[];
3493
3667
  };
3494
3668
  planItems?: {
3495
3669
  id: string;
3496
- title: string;
3497
3670
  kind: string;
3671
+ title: string;
3498
3672
  spec: string;
3499
3673
  deps: string[];
3500
3674
  tools?: string[] | undefined;
@@ -3502,6 +3676,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3502
3676
  isSupportingWorkflow?: boolean | undefined;
3503
3677
  }[] | undefined;
3504
3678
  };
3679
+ runId: string;
3505
3680
  userId?: string | undefined;
3506
3681
  responseId?: string | undefined;
3507
3682
  }>, z.ZodObject<{
@@ -3520,36 +3695,39 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3520
3695
  }, "strip", z.ZodTypeAny, {
3521
3696
  type: "status";
3522
3697
  agentId: string;
3523
- runId: string;
3524
3698
  payload: {
3525
3699
  message: string;
3526
3700
  };
3701
+ runId: string;
3527
3702
  userId?: string | undefined;
3528
3703
  responseId?: string | undefined;
3529
3704
  }, {
3530
3705
  type: "status";
3531
3706
  agentId: string;
3532
- runId: string;
3533
3707
  payload: {
3534
3708
  message: string;
3535
3709
  };
3710
+ runId: string;
3536
3711
  userId?: string | undefined;
3537
3712
  responseId?: string | undefined;
3538
3713
  }>, z.ZodObject<{
3539
3714
  payload: z.ZodObject<{
3540
3715
  content: z.ZodString;
3541
3716
  statusCode: z.ZodOptional<z.ZodNumber>;
3717
+ code: z.ZodOptional<z.ZodString>;
3542
3718
  provider: z.ZodOptional<z.ZodString>;
3543
3719
  technicalDetails: z.ZodOptional<z.ZodString>;
3544
3720
  }, "strip", z.ZodTypeAny, {
3545
3721
  content: string;
3546
- provider?: string | undefined;
3722
+ code?: string | undefined;
3547
3723
  statusCode?: number | undefined;
3724
+ provider?: string | undefined;
3548
3725
  technicalDetails?: string | undefined;
3549
3726
  }, {
3550
3727
  content: string;
3551
- provider?: string | undefined;
3728
+ code?: string | undefined;
3552
3729
  statusCode?: number | undefined;
3730
+ provider?: string | undefined;
3553
3731
  technicalDetails?: string | undefined;
3554
3732
  }>;
3555
3733
  runId: z.ZodString;
@@ -3560,25 +3738,27 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3560
3738
  }, "strip", z.ZodTypeAny, {
3561
3739
  type: "error";
3562
3740
  agentId: string;
3563
- runId: string;
3564
3741
  payload: {
3565
3742
  content: string;
3566
- provider?: string | undefined;
3743
+ code?: string | undefined;
3567
3744
  statusCode?: number | undefined;
3745
+ provider?: string | undefined;
3568
3746
  technicalDetails?: string | undefined;
3569
3747
  };
3748
+ runId: string;
3570
3749
  userId?: string | undefined;
3571
3750
  responseId?: string | undefined;
3572
3751
  }, {
3573
3752
  type: "error";
3574
3753
  agentId: string;
3575
- runId: string;
3576
3754
  payload: {
3577
3755
  content: string;
3578
- provider?: string | undefined;
3756
+ code?: string | undefined;
3579
3757
  statusCode?: number | undefined;
3758
+ provider?: string | undefined;
3580
3759
  technicalDetails?: string | undefined;
3581
3760
  };
3761
+ runId: string;
3582
3762
  userId?: string | undefined;
3583
3763
  responseId?: string | undefined;
3584
3764
  }>, z.ZodObject<{
@@ -3615,7 +3795,6 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3615
3795
  }, "strip", z.ZodTypeAny, {
3616
3796
  type: "filesystem-request";
3617
3797
  agentId: string;
3618
- runId: string;
3619
3798
  payload: {
3620
3799
  requestId: string;
3621
3800
  toolCall: {
@@ -3623,12 +3802,12 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3623
3802
  arguments: Record<string, unknown>;
3624
3803
  };
3625
3804
  };
3805
+ runId: string;
3626
3806
  userId?: string | undefined;
3627
3807
  responseId?: string | undefined;
3628
3808
  }, {
3629
3809
  type: "filesystem-request";
3630
3810
  agentId: string;
3631
- runId: string;
3632
3811
  payload: {
3633
3812
  requestId: string;
3634
3813
  toolCall: {
@@ -3636,6 +3815,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3636
3815
  arguments: Record<string, unknown>;
3637
3816
  };
3638
3817
  };
3818
+ runId: string;
3639
3819
  userId?: string | undefined;
3640
3820
  responseId?: string | undefined;
3641
3821
  }>, z.ZodObject<{
@@ -3654,19 +3834,19 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3654
3834
  }, "strip", z.ZodTypeAny, {
3655
3835
  type: "thread-title-updated";
3656
3836
  agentId: string;
3657
- runId: string;
3658
3837
  payload: {
3659
3838
  title: string;
3660
3839
  };
3840
+ runId: string;
3661
3841
  userId?: string | undefined;
3662
3842
  responseId?: string | undefined;
3663
3843
  }, {
3664
3844
  type: "thread-title-updated";
3665
3845
  agentId: string;
3666
- runId: string;
3667
3846
  payload: {
3668
3847
  title: string;
3669
3848
  };
3849
+ runId: string;
3670
3850
  userId?: string | undefined;
3671
3851
  responseId?: string | undefined;
3672
3852
  }>]>;
@@ -3796,17 +3976,17 @@ export declare const instanceAiCredentialHandoffContextSchema: z.ZodObject<{
3796
3976
  }, "strip", z.ZodTypeAny, {
3797
3977
  credentialType: string;
3798
3978
  displayName: string;
3799
- nodeType?: string | undefined;
3800
3979
  id?: string | undefined;
3801
3980
  nodeName?: string | undefined;
3981
+ nodeType?: string | undefined;
3802
3982
  documentationUrl?: string | undefined;
3803
3983
  oauthRedirectUrl?: string | undefined;
3804
3984
  }, {
3805
3985
  credentialType: string;
3806
3986
  displayName: string;
3807
- nodeType?: string | undefined;
3808
3987
  id?: string | undefined;
3809
3988
  nodeName?: string | undefined;
3989
+ nodeType?: string | undefined;
3810
3990
  documentationUrl?: string | undefined;
3811
3991
  oauthRedirectUrl?: string | undefined;
3812
3992
  }>;
@@ -3814,9 +3994,9 @@ export declare const instanceAiCredentialHandoffContextSchema: z.ZodObject<{
3814
3994
  credential: {
3815
3995
  credentialType: string;
3816
3996
  displayName: string;
3817
- nodeType?: string | undefined;
3818
3997
  id?: string | undefined;
3819
3998
  nodeName?: string | undefined;
3999
+ nodeType?: string | undefined;
3820
4000
  documentationUrl?: string | undefined;
3821
4001
  oauthRedirectUrl?: string | undefined;
3822
4002
  };
@@ -3825,9 +4005,9 @@ export declare const instanceAiCredentialHandoffContextSchema: z.ZodObject<{
3825
4005
  credential: {
3826
4006
  credentialType: string;
3827
4007
  displayName: string;
3828
- nodeType?: string | undefined;
3829
4008
  id?: string | undefined;
3830
4009
  nodeName?: string | undefined;
4010
+ nodeType?: string | undefined;
3831
4011
  documentationUrl?: string | undefined;
3832
4012
  oauthRedirectUrl?: string | undefined;
3833
4013
  };
@@ -3847,17 +4027,17 @@ export declare const instanceAiHandoffContextSchema: z.ZodDiscriminatedUnion<"so
3847
4027
  }, "strip", z.ZodTypeAny, {
3848
4028
  credentialType: string;
3849
4029
  displayName: string;
3850
- nodeType?: string | undefined;
3851
4030
  id?: string | undefined;
3852
4031
  nodeName?: string | undefined;
4032
+ nodeType?: string | undefined;
3853
4033
  documentationUrl?: string | undefined;
3854
4034
  oauthRedirectUrl?: string | undefined;
3855
4035
  }, {
3856
4036
  credentialType: string;
3857
4037
  displayName: string;
3858
- nodeType?: string | undefined;
3859
4038
  id?: string | undefined;
3860
4039
  nodeName?: string | undefined;
4040
+ nodeType?: string | undefined;
3861
4041
  documentationUrl?: string | undefined;
3862
4042
  oauthRedirectUrl?: string | undefined;
3863
4043
  }>;
@@ -3865,9 +4045,9 @@ export declare const instanceAiHandoffContextSchema: z.ZodDiscriminatedUnion<"so
3865
4045
  credential: {
3866
4046
  credentialType: string;
3867
4047
  displayName: string;
3868
- nodeType?: string | undefined;
3869
4048
  id?: string | undefined;
3870
4049
  nodeName?: string | undefined;
4050
+ nodeType?: string | undefined;
3871
4051
  documentationUrl?: string | undefined;
3872
4052
  oauthRedirectUrl?: string | undefined;
3873
4053
  };
@@ -3876,9 +4056,9 @@ export declare const instanceAiHandoffContextSchema: z.ZodDiscriminatedUnion<"so
3876
4056
  credential: {
3877
4057
  credentialType: string;
3878
4058
  displayName: string;
3879
- nodeType?: string | undefined;
3880
4059
  id?: string | undefined;
3881
4060
  nodeName?: string | undefined;
4061
+ nodeType?: string | undefined;
3882
4062
  documentationUrl?: string | undefined;
3883
4063
  oauthRedirectUrl?: string | undefined;
3884
4064
  };
@@ -3903,9 +4083,9 @@ declare const InstanceAiSendMessageRequest_base: import("../zod-class").ZodClass
3903
4083
  credential: {
3904
4084
  credentialType: string;
3905
4085
  displayName: string;
3906
- nodeType?: string | undefined;
3907
4086
  id?: string | undefined;
3908
4087
  nodeName?: string | undefined;
4088
+ nodeType?: string | undefined;
3909
4089
  documentationUrl?: string | undefined;
3910
4090
  oauthRedirectUrl?: string | undefined;
3911
4091
  };
@@ -3958,17 +4138,17 @@ declare const InstanceAiSendMessageRequest_base: import("../zod-class").ZodClass
3958
4138
  }, "strip", z.ZodTypeAny, {
3959
4139
  credentialType: string;
3960
4140
  displayName: string;
3961
- nodeType?: string | undefined;
3962
4141
  id?: string | undefined;
3963
4142
  nodeName?: string | undefined;
4143
+ nodeType?: string | undefined;
3964
4144
  documentationUrl?: string | undefined;
3965
4145
  oauthRedirectUrl?: string | undefined;
3966
4146
  }, {
3967
4147
  credentialType: string;
3968
4148
  displayName: string;
3969
- nodeType?: string | undefined;
3970
4149
  id?: string | undefined;
3971
4150
  nodeName?: string | undefined;
4151
+ nodeType?: string | undefined;
3972
4152
  documentationUrl?: string | undefined;
3973
4153
  oauthRedirectUrl?: string | undefined;
3974
4154
  }>;
@@ -3976,9 +4156,9 @@ declare const InstanceAiSendMessageRequest_base: import("../zod-class").ZodClass
3976
4156
  credential: {
3977
4157
  credentialType: string;
3978
4158
  displayName: string;
3979
- nodeType?: string | undefined;
3980
4159
  id?: string | undefined;
3981
4160
  nodeName?: string | undefined;
4161
+ nodeType?: string | undefined;
3982
4162
  documentationUrl?: string | undefined;
3983
4163
  oauthRedirectUrl?: string | undefined;
3984
4164
  };
@@ -3987,9 +4167,9 @@ declare const InstanceAiSendMessageRequest_base: import("../zod-class").ZodClass
3987
4167
  credential: {
3988
4168
  credentialType: string;
3989
4169
  displayName: string;
3990
- nodeType?: string | undefined;
3991
4170
  id?: string | undefined;
3992
4171
  nodeName?: string | undefined;
4172
+ nodeType?: string | undefined;
3993
4173
  documentationUrl?: string | undefined;
3994
4174
  oauthRedirectUrl?: string | undefined;
3995
4175
  };
@@ -4007,12 +4187,25 @@ declare const InstanceAiCorrectTaskRequest_base: import("../zod-class").ZodClass
4007
4187
  }>;
4008
4188
  export declare class InstanceAiCorrectTaskRequest extends InstanceAiCorrectTaskRequest_base {
4009
4189
  }
4190
+ export declare const INSTANCE_AI_THREAD_SOURCES: readonly ["website-template", "template-view"];
4191
+ export type InstanceAiThreadSource = (typeof INSTANCE_AI_THREAD_SOURCES)[number];
4192
+ export declare const INSTANCE_AI_THREAD_SOURCE_FALLBACK = "unknown";
4193
+ export type InstanceAiThreadSourcePersisted = InstanceAiThreadSource | typeof INSTANCE_AI_THREAD_SOURCE_FALLBACK;
4194
+ export declare const INSTANCE_AI_THREAD_ORIGINS: readonly ["internal", "external"];
4195
+ export type InstanceAiThreadOrigin = (typeof INSTANCE_AI_THREAD_ORIGINS)[number];
4196
+ export declare function normalizeInstanceAiThreadSource(value: string | undefined): InstanceAiThreadSourcePersisted;
4010
4197
  declare const InstanceAiEnsureThreadRequest_base: import("../zod-class").ZodClass<{
4011
4198
  projectId: string;
4199
+ source?: string | undefined;
4012
4200
  threadId?: string | undefined;
4201
+ origin?: "internal" | "external" | undefined;
4202
+ sourceContext?: Record<string, unknown> | undefined;
4013
4203
  }, {
4014
4204
  threadId: z.ZodOptional<z.ZodString>;
4015
4205
  projectId: z.ZodString;
4206
+ source: z.ZodOptional<z.ZodString>;
4207
+ origin: z.ZodOptional<z.ZodEnum<["internal", "external"]>>;
4208
+ sourceContext: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
4016
4209
  }>;
4017
4210
  export declare class InstanceAiEnsureThreadRequest extends InstanceAiEnsureThreadRequest_base {
4018
4211
  }
@@ -4068,6 +4261,7 @@ export interface InstanceAiConfirmation {
4068
4261
  introMessage?: string;
4069
4262
  tasks?: TaskList;
4070
4263
  resourceDecision?: GatewayConfirmationRequiredPayload;
4264
+ channelConfig?: InstanceAiChannelConfig;
4071
4265
  expired?: boolean;
4072
4266
  }
4073
4267
  export interface InstanceAiToolCallState {
@@ -4077,7 +4271,7 @@ export interface InstanceAiToolCallState {
4077
4271
  result?: unknown;
4078
4272
  error?: string;
4079
4273
  isLoading: boolean;
4080
- renderHint?: 'tasks' | 'delegate' | 'builder' | 'researcher' | 'data-table' | 'planner' | 'eval-setup' | 'skill' | 'default';
4274
+ renderHint?: 'tasks' | 'builder' | 'researcher' | 'data-table' | 'planner' | 'eval-setup' | 'skill' | 'default';
4081
4275
  confirmation?: InstanceAiConfirmation;
4082
4276
  confirmationStatus?: 'pending' | 'approved' | 'denied';
4083
4277
  startedAt?: string;
@@ -4123,12 +4317,13 @@ export interface InstanceAiAgentNode {
4123
4317
  error?: string;
4124
4318
  errorDetails?: {
4125
4319
  statusCode?: number;
4320
+ code?: string;
4126
4321
  provider?: string;
4127
4322
  technicalDetails?: string;
4128
4323
  };
4129
4324
  cancellationReason?: InstanceAiCancellationReason;
4130
4325
  }
4131
- export type InstanceAiCancellationReason = 'user' | 'timeout' | 'shutdown';
4326
+ export type InstanceAiCancellationReason = 'user' | 'timeout' | 'shutdown' | 'interrupted';
4132
4327
  export interface InstanceAiMessage {
4133
4328
  id: string;
4134
4329
  runId?: string;
@@ -4323,7 +4518,6 @@ export type InstanceAiSandboxProvider = z.infer<typeof instanceAiSandboxProvider
4323
4518
  export declare function isInstanceAiSandboxProvider(value: unknown): value is InstanceAiSandboxProvider;
4324
4519
  export interface InstanceAiAdminSettingsResponse {
4325
4520
  enabled: boolean;
4326
- subAgentMaxSteps: number;
4327
4521
  permissions: InstanceAiPermissions;
4328
4522
  mcpServers: string;
4329
4523
  mcpAccessEnabled: boolean;
@@ -4339,8 +4533,6 @@ export interface InstanceAiAdminSettingsResponse {
4339
4533
  }
4340
4534
  declare const InstanceAiAdminSettingsUpdateRequest_base: import("../zod-class").ZodClass<{
4341
4535
  enabled?: boolean | undefined;
4342
- mcpServers?: string | undefined;
4343
- subAgentMaxSteps?: number | undefined;
4344
4536
  permissions?: {
4345
4537
  webSearch?: "require_approval" | "always_allow" | "blocked" | undefined;
4346
4538
  createWorkflow?: "require_approval" | "always_allow" | "blocked" | undefined;
@@ -4363,6 +4555,7 @@ declare const InstanceAiAdminSettingsUpdateRequest_base: import("../zod-class").
4363
4555
  restoreWorkflowVersion?: "require_approval" | "always_allow" | "blocked" | undefined;
4364
4556
  executeMcpTool?: "require_approval" | "always_allow" | "blocked" | undefined;
4365
4557
  } | undefined;
4558
+ mcpServers?: string | undefined;
4366
4559
  mcpAccessEnabled?: boolean | undefined;
4367
4560
  sandboxEnabled?: boolean | undefined;
4368
4561
  sandboxProvider?: "n8n-sandbox" | "daytona" | undefined;
@@ -4375,7 +4568,6 @@ declare const InstanceAiAdminSettingsUpdateRequest_base: import("../zod-class").
4375
4568
  browserUseEnabled?: boolean | undefined;
4376
4569
  }, {
4377
4570
  enabled: z.ZodOptional<z.ZodBoolean>;
4378
- subAgentMaxSteps: z.ZodOptional<z.ZodNumber>;
4379
4571
  permissions: z.ZodOptional<z.ZodObject<{
4380
4572
  createWorkflow: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow", "blocked"]>>;
4381
4573
  updateWorkflow: z.ZodOptional<z.ZodEnum<["require_approval", "always_allow", "blocked"]>>;
@@ -4462,9 +4654,9 @@ export interface InstanceAiUserPreferencesResponse {
4462
4654
  localGatewayDisabled: boolean;
4463
4655
  }
4464
4656
  declare const InstanceAiUserPreferencesUpdateRequest_base: import("../zod-class").ZodClass<{
4657
+ localGatewayDisabled?: boolean | undefined;
4465
4658
  credentialId?: string | null | undefined;
4466
4659
  modelName?: string | undefined;
4467
- localGatewayDisabled?: boolean | undefined;
4468
4660
  }, {
4469
4661
  credentialId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4470
4662
  modelName: z.ZodOptional<z.ZodString>;
@@ -4572,13 +4764,13 @@ declare const instanceAiEvalSeedWorkflowSchema: z.ZodObject<{
4572
4764
  nodes: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
4573
4765
  connections: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4574
4766
  }, "strip", z.ZodTypeAny, {
4575
- name: string;
4576
4767
  id: string;
4768
+ name: string;
4577
4769
  nodes: Record<string, unknown>[];
4578
4770
  connections: Record<string, unknown>;
4579
4771
  }, {
4580
- name: string;
4581
4772
  id: string;
4773
+ name: string;
4582
4774
  nodes: Record<string, unknown>[];
4583
4775
  connections: Record<string, unknown>;
4584
4776
  }>;
@@ -4597,15 +4789,15 @@ declare const instanceAiEvalSeedDataTableSchema: z.ZodObject<{
4597
4789
  name: string;
4598
4790
  }>, "many">;
4599
4791
  }, "strip", z.ZodTypeAny, {
4600
- name: string;
4601
4792
  id: string;
4793
+ name: string;
4602
4794
  columns: {
4603
4795
  type: "string" | "number" | "boolean" | "date";
4604
4796
  name: string;
4605
4797
  }[];
4606
4798
  }, {
4607
- name: string;
4608
4799
  id: string;
4800
+ name: string;
4609
4801
  columns: {
4610
4802
  type: "string" | "number" | "boolean" | "date";
4611
4803
  name: string;
@@ -4616,16 +4808,16 @@ declare const InstanceAiEvalRestoreThreadRequest_base: import("../zod-class").Zo
4616
4808
  threadId: string;
4617
4809
  messages: Record<string, unknown>[];
4618
4810
  dataTables?: {
4619
- name: string;
4620
4811
  id: string;
4812
+ name: string;
4621
4813
  columns: {
4622
4814
  type: "string" | "number" | "boolean" | "date";
4623
4815
  name: string;
4624
4816
  }[];
4625
4817
  }[] | undefined;
4626
4818
  workflows?: {
4627
- name: string;
4628
4819
  id: string;
4820
+ name: string;
4629
4821
  nodes: Record<string, unknown>[];
4630
4822
  connections: Record<string, unknown>;
4631
4823
  }[] | undefined;
@@ -4646,15 +4838,15 @@ declare const InstanceAiEvalRestoreThreadRequest_base: import("../zod-class").Zo
4646
4838
  name: string;
4647
4839
  }>, "many">;
4648
4840
  }, "strip", z.ZodTypeAny, {
4649
- name: string;
4650
4841
  id: string;
4842
+ name: string;
4651
4843
  columns: {
4652
4844
  type: "string" | "number" | "boolean" | "date";
4653
4845
  name: string;
4654
4846
  }[];
4655
4847
  }, {
4656
- name: string;
4657
4848
  id: string;
4849
+ name: string;
4658
4850
  columns: {
4659
4851
  type: "string" | "number" | "boolean" | "date";
4660
4852
  name: string;
@@ -4666,13 +4858,13 @@ declare const InstanceAiEvalRestoreThreadRequest_base: import("../zod-class").Zo
4666
4858
  nodes: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
4667
4859
  connections: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4668
4860
  }, "strip", z.ZodTypeAny, {
4669
- name: string;
4670
4861
  id: string;
4862
+ name: string;
4671
4863
  nodes: Record<string, unknown>[];
4672
4864
  connections: Record<string, unknown>;
4673
4865
  }, {
4674
- name: string;
4675
4866
  id: string;
4867
+ name: string;
4676
4868
  nodes: Record<string, unknown>[];
4677
4869
  connections: Record<string, unknown>;
4678
4870
  }>, "many">>;