@n8n/api-types 1.15.0 → 1.17.0

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