@n8n/instance-ai 1.16.2 → 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.
- package/dist/agent/instance-agent.js +7 -1
- package/dist/agent/instance-agent.js.map +1 -1
- package/dist/agent/system-prompt.js +3 -3
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/event-bus/event-bus.interface.d.ts +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/parsers/xlsx-parser.js +1 -1
- package/dist/parsers/xlsx-parser.js.map +1 -1
- package/dist/runtime/terminal-response-guard.js +2 -1
- package/dist/runtime/terminal-response-guard.js.map +1 -1
- package/dist/skills/skill-gates.d.ts +5 -0
- package/dist/skills/skill-gates.js +12 -0
- package/dist/skills/skill-gates.js.map +1 -0
- package/dist/storage/workflow-loop-storage.d.ts +7 -7
- package/dist/stream/consume-with-hitl.d.ts +3 -0
- package/dist/stream/consume-with-hitl.js +2 -0
- package/dist/stream/consume-with-hitl.js.map +1 -1
- package/dist/stream/map-chunk.js +7 -0
- package/dist/stream/map-chunk.js.map +1 -1
- package/dist/stream/usage-accumulator.d.ts +2 -0
- package/dist/stream/usage-accumulator.js +13 -3
- package/dist/stream/usage-accumulator.js.map +1 -1
- package/dist/tool-registry.js +5 -1
- package/dist/tool-registry.js.map +1 -1
- package/dist/tools/agents.tool.d.ts +2 -0
- package/dist/tools/agents.tool.js +40 -0
- package/dist/tools/agents.tool.js.map +1 -0
- package/dist/tools/credentials.tool.js +8 -3
- package/dist/tools/credentials.tool.js.map +1 -1
- package/dist/tools/evals/eval-config.tool.js +10 -2
- package/dist/tools/evals/eval-config.tool.js.map +1 -1
- package/dist/tools/executions.tool.js +3 -2
- package/dist/tools/executions.tool.js.map +1 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.js +2 -2
- package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
- package/dist/tools/index.js +15 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/n8n-docs/registry.d.ts +2 -2
- package/dist/tools/n8n-docs/registry.js +20 -8
- package/dist/tools/n8n-docs/registry.js.map +1 -1
- package/dist/tools/n8n-docs.tool.js +18 -12
- package/dist/tools/n8n-docs.tool.js.map +1 -1
- package/dist/tools/nodes.tool.js +1 -1
- package/dist/tools/orchestration/agent-preview-session-binding.d.ts +20 -0
- package/dist/tools/orchestration/agent-preview-session-binding.js +47 -0
- package/dist/tools/orchestration/agent-preview-session-binding.js.map +1 -0
- package/dist/tools/orchestration/agent-target-binding.d.ts +6 -1
- package/dist/tools/orchestration/agent-target-binding.js +43 -4
- package/dist/tools/orchestration/agent-target-binding.js.map +1 -1
- package/dist/tools/orchestration/build-agent.tool.js +365 -71
- package/dist/tools/orchestration/build-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/builder-thread-id.d.ts +1 -0
- package/dist/tools/orchestration/builder-thread-id.js +7 -0
- package/dist/tools/orchestration/builder-thread-id.js.map +1 -0
- package/dist/tools/orchestration/get-session.tool.d.ts +2 -0
- package/dist/tools/orchestration/get-session.tool.js +49 -0
- package/dist/tools/orchestration/get-session.tool.js.map +1 -0
- package/dist/tools/orchestration/verification/reconcile-plan.js +4 -1
- package/dist/tools/orchestration/verification/reconcile-plan.js.map +1 -1
- package/dist/tools/orchestration/verify-built-workflow.tool.js +1 -0
- package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
- package/dist/tools/research.tool.js +2 -0
- package/dist/tools/research.tool.js.map +1 -1
- package/dist/tools/tool-ids.d.ts +2 -0
- package/dist/tools/tool-ids.js +3 -0
- package/dist/tools/tool-ids.js.map +1 -1
- package/dist/tools/workflows/build-workflow.tool.js +12 -4
- package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/classify-node-destructiveness.service.d.ts +1 -1
- package/dist/tools/workflows/classify-node-destructiveness.service.js +5 -7
- package/dist/tools/workflows/classify-node-destructiveness.service.js.map +1 -1
- package/dist/tools/workflows/credential-utils.d.ts +1 -1
- package/dist/tools/workflows/credential-utils.js +2 -2
- package/dist/tools/workflows/credential-utils.js.map +1 -1
- package/dist/tools/workflows/detect-unparseable-openai-schema.d.ts +3 -0
- package/dist/tools/workflows/detect-unparseable-openai-schema.js +85 -0
- package/dist/tools/workflows/detect-unparseable-openai-schema.js.map +1 -0
- package/dist/tools/workflows/generate-simulation-fixtures.service.d.ts +2 -1
- package/dist/tools/workflows/generate-simulation-fixtures.service.js +27 -5
- package/dist/tools/workflows/generate-simulation-fixtures.service.js.map +1 -1
- package/dist/tools/workflows/materialize-node-type.tool.js +4 -2
- package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
- package/dist/tools/workflows/plan-verification-simulation.d.ts +5 -2
- package/dist/tools/workflows/plan-verification-simulation.js +117 -2
- package/dist/tools/workflows/plan-verification-simulation.js.map +1 -1
- package/dist/tools/workflows/reconcile-simulation-plan.js +48 -17
- package/dist/tools/workflows/reconcile-simulation-plan.js.map +1 -1
- package/dist/tools/workflows/resolve-credentials.js +35 -1
- package/dist/tools/workflows/resolve-credentials.js.map +1 -1
- package/dist/tools/workflows/setup-workflow.schema.d.ts +66 -66
- package/dist/tools/workflows/validate-workflow.service.js +4 -4
- package/dist/tools/workflows/workflow-build-routing.js +3 -3
- package/dist/tools/workflows/workflow-build-routing.js.map +1 -1
- package/dist/tools/workflows/workflow-file-bindings.d.ts +1 -1
- package/dist/tools/workflows/workflow-file-bindings.js +2 -1
- package/dist/tools/workflows/workflow-file-bindings.js.map +1 -1
- package/dist/tools/workflows/workflow-json-utils.js +11 -12
- package/dist/tools/workflows/workflow-json-utils.js.map +1 -1
- package/dist/tools/workflows/workflow-source-compiler.d.ts +1 -1
- package/dist/tools/workflows/workflow-source-compiler.js +11 -4
- package/dist/tools/workflows/workflow-source-compiler.js.map +1 -1
- package/dist/tools/workflows/write-sandbox-file.tool.js +4 -2
- package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
- package/dist/tracing/langsmith-tracing.d.ts +1 -0
- package/dist/tracing/langsmith-tracing.js +69 -9
- package/dist/tracing/langsmith-tracing.js.map +1 -1
- package/dist/tracing/trace-payloads.js +8 -0
- package/dist/tracing/trace-payloads.js.map +1 -1
- package/dist/types.d.ts +52 -5
- package/dist/types.js.map +1 -1
- package/dist/utils/stream-helpers.d.ts +1 -0
- package/dist/utils/stream-helpers.js +2 -1
- package/dist/utils/stream-helpers.js.map +1 -1
- package/dist/workflow-loop/workflow-loop-state.d.ts +13 -13
- package/dist/workflow-loop/workflow-loop-state.js +6 -1
- package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
- package/dist/workspace/create-workspace.js +24 -1
- package/dist/workspace/create-workspace.js.map +1 -1
- package/dist/workspace/lazy-runtime-workspace.js +19 -19
- package/dist/workspace/lazy-runtime-workspace.js.map +1 -1
- package/dist/workspace/sandbox-fs.d.ts +16 -4
- package/dist/workspace/sandbox-fs.js +80 -25
- package/dist/workspace/sandbox-fs.js.map +1 -1
- package/dist/workspace/scoped-workspace.js +6 -6
- package/dist/workspace/scoped-workspace.js.map +1 -1
- package/dist/workspace/snapshot-manager.d.ts +1 -0
- package/dist/workspace/snapshot-manager.js +37 -5
- package/dist/workspace/snapshot-manager.js.map +1 -1
- package/dist/workspace/workspace-files.d.ts +4 -0
- package/dist/workspace/workspace-files.js +21 -7
- package/dist/workspace/workspace-files.js.map +1 -1
- package/knowledge-base/reference/workflow-builder-guardrails.md +3 -0
- package/package.json +12 -12
- package/skills/config-evals/SKILL.md +96 -0
- package/skills/config-evals/references/config-eval-playbook.md +109 -0
- package/skills/intent-recognition/SKILL.md +145 -34
- package/skills/workflow-builder/SKILL.md +25 -17
|
@@ -36,12 +36,10 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
36
36
|
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
37
37
|
id: z.ZodString;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
type: string;
|
|
40
|
-
id: string;
|
|
41
39
|
name: string;
|
|
40
|
+
type: string;
|
|
42
41
|
typeVersion: number;
|
|
43
42
|
parameters: Record<string, unknown>;
|
|
44
|
-
position: [number, number];
|
|
45
43
|
credentials?: Record<string, {
|
|
46
44
|
id: string;
|
|
47
45
|
name: string;
|
|
@@ -50,13 +48,13 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
50
48
|
name: string;
|
|
51
49
|
__aiGatewayManaged: true;
|
|
52
50
|
}> | undefined;
|
|
53
|
-
|
|
54
|
-
type: string;
|
|
51
|
+
position: [number, number];
|
|
55
52
|
id: string;
|
|
53
|
+
}, {
|
|
56
54
|
name: string;
|
|
55
|
+
type: string;
|
|
57
56
|
typeVersion: number;
|
|
58
57
|
parameters: Record<string, unknown>;
|
|
59
|
-
position: [number, number];
|
|
60
58
|
credentials?: Record<string, {
|
|
61
59
|
id: string;
|
|
62
60
|
name: string;
|
|
@@ -65,6 +63,8 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
65
63
|
name: string;
|
|
66
64
|
__aiGatewayManaged: true;
|
|
67
65
|
}> | undefined;
|
|
66
|
+
position: [number, number];
|
|
67
|
+
id: string;
|
|
68
68
|
}>;
|
|
69
69
|
credentialType: z.ZodOptional<z.ZodString>;
|
|
70
70
|
existingCredentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -95,10 +95,10 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
95
95
|
status: z.ZodEnum<["success", "error", "listening"]>;
|
|
96
96
|
error: z.ZodOptional<z.ZodString>;
|
|
97
97
|
}, "strip", z.ZodTypeAny, {
|
|
98
|
-
status: "error" | "
|
|
98
|
+
status: "error" | "listening" | "success";
|
|
99
99
|
error?: string | undefined;
|
|
100
100
|
}, {
|
|
101
|
-
status: "error" | "
|
|
101
|
+
status: "error" | "listening" | "success";
|
|
102
102
|
error?: string | undefined;
|
|
103
103
|
}>>;
|
|
104
104
|
parameterIssues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -112,32 +112,32 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
112
112
|
name: z.ZodString;
|
|
113
113
|
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
114
114
|
}, "strip", z.ZodTypeAny, {
|
|
115
|
-
value: string | number | boolean;
|
|
116
115
|
name: string;
|
|
117
|
-
}, {
|
|
118
116
|
value: string | number | boolean;
|
|
117
|
+
}, {
|
|
119
118
|
name: string;
|
|
119
|
+
value: string | number | boolean;
|
|
120
120
|
}>, "many">>;
|
|
121
121
|
}, "strip", z.ZodTypeAny, {
|
|
122
|
-
type: string;
|
|
123
122
|
name: string;
|
|
124
123
|
displayName: string;
|
|
124
|
+
type: string;
|
|
125
|
+
required?: boolean | undefined;
|
|
126
|
+
default?: unknown;
|
|
125
127
|
options?: {
|
|
126
|
-
value: string | number | boolean;
|
|
127
128
|
name: string;
|
|
129
|
+
value: string | number | boolean;
|
|
128
130
|
}[] | undefined;
|
|
129
|
-
required?: boolean | undefined;
|
|
130
|
-
default?: unknown;
|
|
131
131
|
}, {
|
|
132
|
-
type: string;
|
|
133
132
|
name: string;
|
|
134
133
|
displayName: string;
|
|
134
|
+
type: string;
|
|
135
|
+
required?: boolean | undefined;
|
|
136
|
+
default?: unknown;
|
|
135
137
|
options?: {
|
|
136
|
-
value: string | number | boolean;
|
|
137
138
|
name: string;
|
|
139
|
+
value: string | number | boolean;
|
|
138
140
|
}[] | undefined;
|
|
139
|
-
required?: boolean | undefined;
|
|
140
|
-
default?: unknown;
|
|
141
141
|
}>, "many">>;
|
|
142
142
|
needsAction: z.ZodOptional<z.ZodBoolean>;
|
|
143
143
|
subnodeRootNode: z.ZodOptional<z.ZodObject<{
|
|
@@ -146,24 +146,22 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
146
146
|
typeVersion: z.ZodNumber;
|
|
147
147
|
id: z.ZodString;
|
|
148
148
|
}, "strip", z.ZodTypeAny, {
|
|
149
|
-
type: string;
|
|
150
|
-
id: string;
|
|
151
149
|
name: string;
|
|
152
|
-
typeVersion: number;
|
|
153
|
-
}, {
|
|
154
150
|
type: string;
|
|
151
|
+
typeVersion: number;
|
|
155
152
|
id: string;
|
|
153
|
+
}, {
|
|
156
154
|
name: string;
|
|
155
|
+
type: string;
|
|
157
156
|
typeVersion: number;
|
|
157
|
+
id: string;
|
|
158
158
|
}>>;
|
|
159
159
|
}, "strip", z.ZodTypeAny, {
|
|
160
160
|
node: {
|
|
161
|
-
type: string;
|
|
162
|
-
id: string;
|
|
163
161
|
name: string;
|
|
162
|
+
type: string;
|
|
164
163
|
typeVersion: number;
|
|
165
164
|
parameters: Record<string, unknown>;
|
|
166
|
-
position: [number, number];
|
|
167
165
|
credentials?: Record<string, {
|
|
168
166
|
id: string;
|
|
169
167
|
name: string;
|
|
@@ -172,13 +170,15 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
172
170
|
name: string;
|
|
173
171
|
__aiGatewayManaged: true;
|
|
174
172
|
}> | undefined;
|
|
173
|
+
position: [number, number];
|
|
174
|
+
id: string;
|
|
175
175
|
};
|
|
176
|
-
isTrigger: boolean;
|
|
177
176
|
credentialType?: string | undefined;
|
|
178
177
|
existingCredentials?: {
|
|
179
178
|
id: string;
|
|
180
179
|
name: string;
|
|
181
180
|
}[] | undefined;
|
|
181
|
+
isTrigger: boolean;
|
|
182
182
|
isFirstTrigger?: boolean | undefined;
|
|
183
183
|
isTestable?: boolean | undefined;
|
|
184
184
|
isAutoApplied?: boolean | undefined;
|
|
@@ -187,36 +187,34 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
187
187
|
message?: string | undefined;
|
|
188
188
|
} | undefined;
|
|
189
189
|
triggerTestResult?: {
|
|
190
|
-
status: "error" | "
|
|
190
|
+
status: "error" | "listening" | "success";
|
|
191
191
|
error?: string | undefined;
|
|
192
192
|
} | undefined;
|
|
193
193
|
parameterIssues?: Record<string, string[]> | undefined;
|
|
194
194
|
editableParameters?: {
|
|
195
|
-
type: string;
|
|
196
195
|
name: string;
|
|
197
196
|
displayName: string;
|
|
197
|
+
type: string;
|
|
198
|
+
required?: boolean | undefined;
|
|
199
|
+
default?: unknown;
|
|
198
200
|
options?: {
|
|
199
|
-
value: string | number | boolean;
|
|
200
201
|
name: string;
|
|
202
|
+
value: string | number | boolean;
|
|
201
203
|
}[] | undefined;
|
|
202
|
-
required?: boolean | undefined;
|
|
203
|
-
default?: unknown;
|
|
204
204
|
}[] | undefined;
|
|
205
205
|
needsAction?: boolean | undefined;
|
|
206
206
|
subnodeRootNode?: {
|
|
207
|
-
type: string;
|
|
208
|
-
id: string;
|
|
209
207
|
name: string;
|
|
208
|
+
type: string;
|
|
210
209
|
typeVersion: number;
|
|
210
|
+
id: string;
|
|
211
211
|
} | undefined;
|
|
212
212
|
}, {
|
|
213
213
|
node: {
|
|
214
|
-
type: string;
|
|
215
|
-
id: string;
|
|
216
214
|
name: string;
|
|
215
|
+
type: string;
|
|
217
216
|
typeVersion: number;
|
|
218
217
|
parameters: Record<string, unknown>;
|
|
219
|
-
position: [number, number];
|
|
220
218
|
credentials?: Record<string, {
|
|
221
219
|
id: string;
|
|
222
220
|
name: string;
|
|
@@ -225,13 +223,15 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
225
223
|
name: string;
|
|
226
224
|
__aiGatewayManaged: true;
|
|
227
225
|
}> | undefined;
|
|
226
|
+
position: [number, number];
|
|
227
|
+
id: string;
|
|
228
228
|
};
|
|
229
|
-
isTrigger: boolean;
|
|
230
229
|
credentialType?: string | undefined;
|
|
231
230
|
existingCredentials?: {
|
|
232
231
|
id: string;
|
|
233
232
|
name: string;
|
|
234
233
|
}[] | undefined;
|
|
234
|
+
isTrigger: boolean;
|
|
235
235
|
isFirstTrigger?: boolean | undefined;
|
|
236
236
|
isTestable?: boolean | undefined;
|
|
237
237
|
isAutoApplied?: boolean | undefined;
|
|
@@ -240,27 +240,27 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
240
240
|
message?: string | undefined;
|
|
241
241
|
} | undefined;
|
|
242
242
|
triggerTestResult?: {
|
|
243
|
-
status: "error" | "
|
|
243
|
+
status: "error" | "listening" | "success";
|
|
244
244
|
error?: string | undefined;
|
|
245
245
|
} | undefined;
|
|
246
246
|
parameterIssues?: Record<string, string[]> | undefined;
|
|
247
247
|
editableParameters?: {
|
|
248
|
-
type: string;
|
|
249
248
|
name: string;
|
|
250
249
|
displayName: string;
|
|
250
|
+
type: string;
|
|
251
|
+
required?: boolean | undefined;
|
|
252
|
+
default?: unknown;
|
|
251
253
|
options?: {
|
|
252
|
-
value: string | number | boolean;
|
|
253
254
|
name: string;
|
|
255
|
+
value: string | number | boolean;
|
|
254
256
|
}[] | undefined;
|
|
255
|
-
required?: boolean | undefined;
|
|
256
|
-
default?: unknown;
|
|
257
257
|
}[] | undefined;
|
|
258
258
|
needsAction?: boolean | undefined;
|
|
259
259
|
subnodeRootNode?: {
|
|
260
|
-
type: string;
|
|
261
|
-
id: string;
|
|
262
260
|
name: string;
|
|
261
|
+
type: string;
|
|
263
262
|
typeVersion: number;
|
|
263
|
+
id: string;
|
|
264
264
|
} | undefined;
|
|
265
265
|
}>, "many">;
|
|
266
266
|
workflowId: z.ZodString;
|
|
@@ -271,12 +271,10 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
271
271
|
severity: "destructive" | "info" | "warning";
|
|
272
272
|
setupRequests: {
|
|
273
273
|
node: {
|
|
274
|
-
type: string;
|
|
275
|
-
id: string;
|
|
276
274
|
name: string;
|
|
275
|
+
type: string;
|
|
277
276
|
typeVersion: number;
|
|
278
277
|
parameters: Record<string, unknown>;
|
|
279
|
-
position: [number, number];
|
|
280
278
|
credentials?: Record<string, {
|
|
281
279
|
id: string;
|
|
282
280
|
name: string;
|
|
@@ -285,13 +283,15 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
285
283
|
name: string;
|
|
286
284
|
__aiGatewayManaged: true;
|
|
287
285
|
}> | undefined;
|
|
286
|
+
position: [number, number];
|
|
287
|
+
id: string;
|
|
288
288
|
};
|
|
289
|
-
isTrigger: boolean;
|
|
290
289
|
credentialType?: string | undefined;
|
|
291
290
|
existingCredentials?: {
|
|
292
291
|
id: string;
|
|
293
292
|
name: string;
|
|
294
293
|
}[] | undefined;
|
|
294
|
+
isTrigger: boolean;
|
|
295
295
|
isFirstTrigger?: boolean | undefined;
|
|
296
296
|
isTestable?: boolean | undefined;
|
|
297
297
|
isAutoApplied?: boolean | undefined;
|
|
@@ -300,27 +300,27 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
300
300
|
message?: string | undefined;
|
|
301
301
|
} | undefined;
|
|
302
302
|
triggerTestResult?: {
|
|
303
|
-
status: "error" | "
|
|
303
|
+
status: "error" | "listening" | "success";
|
|
304
304
|
error?: string | undefined;
|
|
305
305
|
} | undefined;
|
|
306
306
|
parameterIssues?: Record<string, string[]> | undefined;
|
|
307
307
|
editableParameters?: {
|
|
308
|
-
type: string;
|
|
309
308
|
name: string;
|
|
310
309
|
displayName: string;
|
|
310
|
+
type: string;
|
|
311
|
+
required?: boolean | undefined;
|
|
312
|
+
default?: unknown;
|
|
311
313
|
options?: {
|
|
312
|
-
value: string | number | boolean;
|
|
313
314
|
name: string;
|
|
315
|
+
value: string | number | boolean;
|
|
314
316
|
}[] | undefined;
|
|
315
|
-
required?: boolean | undefined;
|
|
316
|
-
default?: unknown;
|
|
317
317
|
}[] | undefined;
|
|
318
318
|
needsAction?: boolean | undefined;
|
|
319
319
|
subnodeRootNode?: {
|
|
320
|
-
type: string;
|
|
321
|
-
id: string;
|
|
322
320
|
name: string;
|
|
321
|
+
type: string;
|
|
323
322
|
typeVersion: number;
|
|
323
|
+
id: string;
|
|
324
324
|
} | undefined;
|
|
325
325
|
}[];
|
|
326
326
|
workflowId: string;
|
|
@@ -331,12 +331,10 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
331
331
|
severity: "destructive" | "info" | "warning";
|
|
332
332
|
setupRequests: {
|
|
333
333
|
node: {
|
|
334
|
-
type: string;
|
|
335
|
-
id: string;
|
|
336
334
|
name: string;
|
|
335
|
+
type: string;
|
|
337
336
|
typeVersion: number;
|
|
338
337
|
parameters: Record<string, unknown>;
|
|
339
|
-
position: [number, number];
|
|
340
338
|
credentials?: Record<string, {
|
|
341
339
|
id: string;
|
|
342
340
|
name: string;
|
|
@@ -345,13 +343,15 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
345
343
|
name: string;
|
|
346
344
|
__aiGatewayManaged: true;
|
|
347
345
|
}> | undefined;
|
|
346
|
+
position: [number, number];
|
|
347
|
+
id: string;
|
|
348
348
|
};
|
|
349
|
-
isTrigger: boolean;
|
|
350
349
|
credentialType?: string | undefined;
|
|
351
350
|
existingCredentials?: {
|
|
352
351
|
id: string;
|
|
353
352
|
name: string;
|
|
354
353
|
}[] | undefined;
|
|
354
|
+
isTrigger: boolean;
|
|
355
355
|
isFirstTrigger?: boolean | undefined;
|
|
356
356
|
isTestable?: boolean | undefined;
|
|
357
357
|
isAutoApplied?: boolean | undefined;
|
|
@@ -360,27 +360,27 @@ export declare const setupSuspendSchema: z.ZodObject<{
|
|
|
360
360
|
message?: string | undefined;
|
|
361
361
|
} | undefined;
|
|
362
362
|
triggerTestResult?: {
|
|
363
|
-
status: "error" | "
|
|
363
|
+
status: "error" | "listening" | "success";
|
|
364
364
|
error?: string | undefined;
|
|
365
365
|
} | undefined;
|
|
366
366
|
parameterIssues?: Record<string, string[]> | undefined;
|
|
367
367
|
editableParameters?: {
|
|
368
|
-
type: string;
|
|
369
368
|
name: string;
|
|
370
369
|
displayName: string;
|
|
370
|
+
type: string;
|
|
371
|
+
required?: boolean | undefined;
|
|
372
|
+
default?: unknown;
|
|
371
373
|
options?: {
|
|
372
|
-
value: string | number | boolean;
|
|
373
374
|
name: string;
|
|
375
|
+
value: string | number | boolean;
|
|
374
376
|
}[] | undefined;
|
|
375
|
-
required?: boolean | undefined;
|
|
376
|
-
default?: unknown;
|
|
377
377
|
}[] | undefined;
|
|
378
378
|
needsAction?: boolean | undefined;
|
|
379
379
|
subnodeRootNode?: {
|
|
380
|
-
type: string;
|
|
381
|
-
id: string;
|
|
382
380
|
name: string;
|
|
381
|
+
type: string;
|
|
383
382
|
typeVersion: number;
|
|
383
|
+
id: string;
|
|
384
384
|
} | undefined;
|
|
385
385
|
}[];
|
|
386
386
|
workflowId: string;
|
|
@@ -158,7 +158,7 @@ async function computeAiGatewayIssues(context, node, nodeDesc) {
|
|
|
158
158
|
.isAiGatewayCredentialType(credType)
|
|
159
159
|
.catch(() => true);
|
|
160
160
|
if (!supported) {
|
|
161
|
-
(issues.unsupportedCredentialType ??= []).push(`Credential type "${credType}" is not supported by n8n
|
|
161
|
+
(issues.unsupportedCredentialType ??= []).push(`Credential type "${credType}" is not supported by n8n credits. Use a stored credential of that type or pick a different node.`);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -174,7 +174,7 @@ async function computeAiGatewayIssues(context, node, nodeDesc) {
|
|
|
174
174
|
if (gatewayMeta.minVersion !== undefined) {
|
|
175
175
|
const typeVersion = node.typeVersion ?? 1;
|
|
176
176
|
if (typeVersion < gatewayMeta.minVersion) {
|
|
177
|
-
(issues.belowMinVersion ??= []).push(`n8n
|
|
177
|
+
(issues.belowMinVersion ??= []).push(`n8n credits requires typeVersion >= ${gatewayMeta.minVersion} for this node; current version is ${typeVersion}.`);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
if (gatewayMeta.operations) {
|
|
@@ -186,7 +186,7 @@ async function computeAiGatewayIssues(context, node, nodeDesc) {
|
|
|
186
186
|
const allowed = gatewayMeta.operations[resource];
|
|
187
187
|
if (!allowed?.includes(operation)) {
|
|
188
188
|
const scope = resource === AI_GATEWAY_OPERATION_ONLY_MARKER ? '' : ` on resource "${resource}"`;
|
|
189
|
-
(issues.unsupportedOperation ??= []).push(`Operation "${operation}"${scope} is not supported via n8n
|
|
189
|
+
(issues.unsupportedOperation ??= []).push(`Operation "${operation}"${scope} is not supported via n8n credits. Switch to a supported operation or use a stored credential.`);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
}
|
|
@@ -195,7 +195,7 @@ async function computeAiGatewayIssues(context, node, nodeDesc) {
|
|
|
195
195
|
const value = parameters[propName];
|
|
196
196
|
if (value === undefined || value === null || value === '')
|
|
197
197
|
continue;
|
|
198
|
-
(issues.hiddenPropertySet ??= []).push(`Property "${propName}" is not supported via n8n
|
|
198
|
+
(issues.hiddenPropertySet ??= []).push(`Property "${propName}" is not supported via n8n credits for this node. Remove it or use a stored credential.`);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
if (Object.keys(issues).length === 0)
|
|
@@ -21,11 +21,11 @@ function determineVerificationReadiness(outcome) {
|
|
|
21
21
|
guidance: 'The build outcome does not include a workflow ID.',
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
if (!outcome.triggerNodes?.some((node) => (0, workflow_json_utils_1.
|
|
24
|
+
if (!outcome.triggerNodes?.some((node) => (0, workflow_json_utils_1.isTriggerNodeType)(node.nodeType))) {
|
|
25
25
|
return {
|
|
26
26
|
status: 'not_verifiable',
|
|
27
|
-
reason: '
|
|
28
|
-
guidance: 'The workflow does not have a trigger the post-build verifier can
|
|
27
|
+
reason: 'no-trigger-node',
|
|
28
|
+
guidance: 'The workflow does not have a trigger node the post-build verifier can start from.',
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
return { status: 'ready' };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-build-routing.js","sourceRoot":"","sources":["../../../src/tools/workflows/workflow-build-routing.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"workflow-build-routing.js","sourceRoot":"","sources":["../../../src/tools/workflows/workflow-build-routing.ts"],"names":[],"mappings":";;;AA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E;SACpF,CAAC;IACH,CAAC;IAED,IAAI,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,OAAO;YACN,MAAM,EAAE,UAAU;YAClB,MAAM,EAAE,oBAAoB;YAC5B,QAAQ,EAAE,wEAAwE;SAClF,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAChC,OAAO;YACN,MAAM,EAAE,UAAU;YAClB,MAAM,EAAE,sBAAsB;YAC9B,QAAQ,EAAE,kFAAkF;SAC5F,CAAC;IACH,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;AACnC,CAAC;AAED,kCAAyC,OAAkC;IAC1E,MAAM,EAAE,kBAAkB,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IACxD,OAAO;QACN,GAAG,YAAY;QACf,qBAAqB,EAAE,8BAA8B,CAAC,OAAO,CAAC;QAC9D,gBAAgB,EAAE,yBAAyB,CAAC,OAAO,CAAC;KACpD,CAAC;AACH,CAAC"}
|
|
@@ -30,7 +30,7 @@ export declare function refreshWorkflowSourceFileBindingFromSave(context: Instan
|
|
|
30
30
|
versionId: string;
|
|
31
31
|
checksum?: string;
|
|
32
32
|
}): Promise<void>;
|
|
33
|
-
export declare function readWorkflowSourceFile(context: InstanceAiContext, filePath: string): Promise<{
|
|
33
|
+
export declare function readWorkflowSourceFile(context: InstanceAiContext, filePath: string, abortSignal?: AbortSignal): Promise<{
|
|
34
34
|
source: string;
|
|
35
35
|
sourceHash: string;
|
|
36
36
|
}>;
|
|
@@ -137,7 +137,7 @@ async function refreshWorkflowSourceFileBindingFromSave(context, workflowId, sav
|
|
|
137
137
|
await saveWorkflowSourceFileBinding(context, nextBinding);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
async function readWorkflowSourceFile(context, filePath) {
|
|
140
|
+
async function readWorkflowSourceFile(context, filePath, abortSignal) {
|
|
141
141
|
if (!context.workspace) {
|
|
142
142
|
throw new Error('Runtime workspace is required for workflow source files.');
|
|
143
143
|
}
|
|
@@ -145,6 +145,7 @@ async function readWorkflowSourceFile(context, filePath) {
|
|
|
145
145
|
const source = await (0, workspace_files_1.readWorkspaceFile)(context.workspace, normalizedFilePath, {
|
|
146
146
|
logger: context.logger,
|
|
147
147
|
resourceLabel: 'Workflow source file',
|
|
148
|
+
abortSignal,
|
|
148
149
|
});
|
|
149
150
|
if (source === null) {
|
|
150
151
|
throw new Error(`Workflow source file not found: ${normalizedFilePath}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-file-bindings.js","sourceRoot":"","sources":["../../../src/tools/workflows/workflow-file-bindings.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,6CAAyC;AACzC,6BAAwB;AAExB,6DAAoE;AAEpE,qEAAoE;AACpE,qEAAiF;AAEjF,MAAM,YAAY,GAAG,+BAA+B,CAAC;AAErD,MAAM,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAEH,MAAM,gCAAgC,GAAG,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,+BAA+B,CAAC,CAAC;AAI/F,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAA6D,CAAC;AAElG,4BAAmC,MAAc;IAChD,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC;AAED,yCAAgD,Q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CAAC,CAAC;IAC9C,MAAM,OAAO,GAAgC,EAAE,CAAC;IAEhD,IAAI,cAAc,EAAE,CAAC;QACpB,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;YACrD,IAAI,OAAO,CAAC,UAAU,KAAK,UAAU;gBAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,CAAC;IACF,CAAC;IACD,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;QACzC,IACC,OAAO,CAAC,UAAU,KAAK,UAAU;YACjC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ,CAAC,EACpD,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;IACF,CAAC;IAED,KAAK,MAAM,OAAO,IAAI,OAAO,EAAE,CAAC;QAC/B,MAAM,WAAW,GAA8B;YAC9C,GAAG,OAAO;YACV,iBAAiB,EAAE,KAAK,CAAC,SAAS;SAClC,CAAC;QACF,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAClC,WAAW,CAAC,gBAAgB,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/C,CAAC;aAAM,CAAC;YACP,OAAO,WAAW,CAAC,gBAAgB,CAAC;QACrC,CAAC;QACD,MAAM,6BAA6B,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3D,CAAC;AACF,CAAC;AAEM,KAAK,iCACX,OAA0B,EAC1B,QAAgB;
|
|
1
|
+
{"version":3,"file":"workflow-file-bindings.js","sourceRoot":"","sources":["../../../src/tools/workflows/workflow-file-bindings.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,6CAAyC;AACzC,6BAAwB;AAExB,6DAAoE;AAEpE,qEAAoE;AACpE,qEAAiF;AAEjF,MAAM,YAAY,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AC,OAAO,CAAC,CAAC;QACvB,CAAC;IACF,CAAC;IAED,KAAK,MAAM,OAAO,IAAI,OAAO,EAAE,CAAC;QAC/B,MAAM,WAAW,GAA8B;YAC9C,GAAG,OAAO;YACV,iBAAiB,EAAE,KAAK,CAAC,SAAS;SAClC,CAAC;QACF,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAClC,WAAW,CAAC,gBAAgB,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/C,CAAC;aAAM,CAAC;YACP,OAAO,WAAW,CAAC,gBAAgB,CAAC;QACrC,CAAC;QACD,MAAM,6BAA6B,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3D,CAAC;AACF,CAAC;AAEM,KAAK,iCACX,OAA0B,EAC1B,QAAgB,EAChB,WAAyB;IAEzB,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM,kBAAkB,GAAG,+BAA+B,CAAC,QAAQ,CAAC,CAAC;IACrE,MAAM,MAAM,GAAG,MAAM,IAAA,mCAAiB,EAAC,OAAO,CAAC,SAAS,EAAE,kBAAkB,EAAE;QAC7E,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,aAAa,EAAE,sBAAsB;QACrC,WAAW;KACX,CAAC,CAAC;IAEH,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,mCAAmC,kBAAkB,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -8,19 +8,20 @@ exports.preserveExistingNodeGroupIds = preserveExistingNodeGroupIds;
|
|
|
8
8
|
exports.preserveExistingSetupValues = preserveExistingSetupValues;
|
|
9
9
|
const is_record_1 = require("@n8n/utils/is-record");
|
|
10
10
|
const placeholder_1 = require("@n8n/utils/placeholder");
|
|
11
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
11
12
|
const node_crypto_1 = require("node:crypto");
|
|
12
13
|
const KNOWN_MOCKABLE_TRIGGER_TYPES = new Set([
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
n8n_workflow_1.MANUAL_TRIGGER_NODE_TYPE,
|
|
15
|
+
n8n_workflow_1.WEBHOOK_NODE_TYPE,
|
|
16
|
+
n8n_workflow_1.FORM_TRIGGER_NODE_TYPE,
|
|
17
|
+
n8n_workflow_1.SCHEDULE_TRIGGER_NODE_TYPE,
|
|
18
|
+
n8n_workflow_1.CHAT_TRIGGER_NODE_TYPE,
|
|
18
19
|
]);
|
|
19
20
|
const WEBHOOK_NODE_TYPES = new Set([
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
n8n_workflow_1.WEBHOOK_NODE_TYPE,
|
|
22
|
+
n8n_workflow_1.FORM_TRIGGER_NODE_TYPE,
|
|
23
|
+
n8n_workflow_1.MCP_TRIGGER_NODE_TYPE,
|
|
24
|
+
n8n_workflow_1.CHAT_TRIGGER_NODE_TYPE,
|
|
24
25
|
]);
|
|
25
26
|
function isMockableTriggerNodeType(nodeType) {
|
|
26
27
|
return nodeType !== undefined && KNOWN_MOCKABLE_TRIGGER_TYPES.has(nodeType);
|
|
@@ -28,9 +29,7 @@ function isMockableTriggerNodeType(nodeType) {
|
|
|
28
29
|
function isTriggerNodeType(nodeType) {
|
|
29
30
|
if (!nodeType)
|
|
30
31
|
return false;
|
|
31
|
-
|
|
32
|
-
return true;
|
|
33
|
-
return nodeType.endsWith('Trigger') || nodeType.endsWith('trigger');
|
|
32
|
+
return (0, n8n_workflow_1.isTriggerNodeType)(nodeType);
|
|
34
33
|
}
|
|
35
34
|
function extractWorkflowIdParameter(value) {
|
|
36
35
|
const rawValue = (0, is_record_1.isRecord)(value) ? value.value : value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-json-utils.js","sourceRoot":"","sources":["../../../src/tools/workflows/workflow-json-utils.ts"],"names":[],"mappings":";;;;;;;;AAAA,oDAAgD;AAChD,wDAAqF;AAErF,6CAAyC;
|
|
1
|
+
{"version":3,"file":"workflow-json-utils.js","sourceRoot":"","sources":["../../../src/tools/workflows/workflow-json-utils.ts"],"names":[],"mappings":";;;;;;;;AAAA,oDAAgD;AAChD,wDAAqF;AAErF,+CAQsB;AACtB,6CAAyC;AASzC,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAC;IAC5C,uCAAwB;IACxB,gCAAiB;IACjB,qCAAsB;IACtB,yCAA0B;IAC1B,qCAAsB;CACtB,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IAClC,gCAAiB;IACjB,qCAAsB;IACtB,oCAAqB;IACrB,qCAAsB;CACtB,CAAC,CAAC;AAEH,mCAA0C,QAA4B;IACrE,OAAO,QAAQ,KAAK,SAAS,IAAI,4BAA4B,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC7E,CAAC;AAOD,2BAAkC,QAA4B;IAC7D,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,OAAO,IAAA,gCAA0B,EAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,0BAA0B,CAAC,KAAc;IACjD,MAAM,QAAQ,GAAG,IAAA,oBAAQ,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACvD,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAEnD,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,IAAI,UAAU,KAAK,EAAE,IAAI,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IA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AY,EAAE,UAAU;YAAE,SAAS;QAExC,IAAI,CAAC,UAAU,GAAG,uBAAuB,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACrF,CAAC;AACF,CAAC"}
|
|
@@ -17,4 +17,4 @@ export type WorkflowSourceCompileResult = {
|
|
|
17
17
|
summary: string;
|
|
18
18
|
};
|
|
19
19
|
export declare function isWorkflowJsonSourceFile(filePath: string): boolean;
|
|
20
|
-
export declare function compileWorkflowSource(context: InstanceAiContext, filePath: string, source: string): Promise<WorkflowSourceCompileResult>;
|
|
20
|
+
export declare function compileWorkflowSource(context: InstanceAiContext, filePath: string, source: string, abortSignal?: AbortSignal): Promise<WorkflowSourceCompileResult>;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isWorkflowJsonSourceFile = isWorkflowJsonSourceFile;
|
|
4
4
|
exports.compileWorkflowSource = compileWorkflowSource;
|
|
5
|
+
const agents_1 = require("@n8n/agents");
|
|
5
6
|
const sandbox_1 = require("@n8n/agents/sandbox");
|
|
6
7
|
const is_record_1 = require("@n8n/utils/is-record");
|
|
7
8
|
const workflow_sdk_1 = require("@n8n/workflow-sdk");
|
|
8
9
|
const credential_url_resolver_1 = require("./credential-url-resolver");
|
|
9
10
|
const detect_array_input_collapse_1 = require("./detect-array-input-collapse");
|
|
11
|
+
const detect_unparseable_openai_schema_1 = require("./detect-unparseable-openai-schema");
|
|
10
12
|
const detect_wrong_kind_locator_1 = require("./detect-wrong-kind-locator");
|
|
11
13
|
const workflow_validation_warnings_1 = require("./workflow-validation-warnings");
|
|
12
14
|
const sandbox_fs_1 = require("../../workspace/sandbox-fs");
|
|
@@ -42,6 +44,7 @@ function validateCompiledWorkflow(json, context, compilerWarnings = []) {
|
|
|
42
44
|
(0, workflow_validation_warnings_1.collectValidationIssues)(schemaValidation.warnings, warnings);
|
|
43
45
|
warnings.push(...(0, detect_array_input_collapse_1.detectArrayInputCollapse)(json));
|
|
44
46
|
warnings.push(...(0, detect_wrong_kind_locator_1.detectWrongKindLocatorValues)(json, context.nodeTypesProvider));
|
|
47
|
+
warnings.push(...(0, detect_unparseable_openai_schema_1.detectUnparseableOpenAiSchema)(json));
|
|
45
48
|
return warnings;
|
|
46
49
|
}
|
|
47
50
|
function parseWorkflowJsonSource(source) {
|
|
@@ -153,7 +156,7 @@ function enhanceBuildErrors(errors) {
|
|
|
153
156
|
'Code node guidance: for large HTML, write it to a separate file (e.g., chunks/page.html), then in your SDK TypeScript use readFileSync + JSON.stringify to safely embed it. NEVER embed large HTML directly in jsCode. See the web_app_pattern in your instructions.',
|
|
154
157
|
];
|
|
155
158
|
}
|
|
156
|
-
async function compileTypeScriptWorkflowSource(context, filePath) {
|
|
159
|
+
async function compileTypeScriptWorkflowSource(context, filePath, abortSignal) {
|
|
157
160
|
if (!context.workspace) {
|
|
158
161
|
return {
|
|
159
162
|
success: false,
|
|
@@ -170,9 +173,13 @@ async function compileTypeScriptWorkflowSource(context, filePath) {
|
|
|
170
173
|
try {
|
|
171
174
|
root = await (0, sandbox_1.getWorkspaceRoot)(context.workspace);
|
|
172
175
|
const sandboxFilePath = (0, workspace_paths_1.joinWorkspacePath)(root, filePath);
|
|
173
|
-
buildResult = await (0, sandbox_fs_1.runInSandbox)(context.workspace, `node --import tsx build.mjs '${(0, sandbox_fs_1.escapeSingleQuotes)(sandboxFilePath)}'`, root);
|
|
176
|
+
buildResult = await (0, sandbox_fs_1.runInSandbox)(context.workspace, `node --import tsx build.mjs '${(0, sandbox_fs_1.escapeSingleQuotes)(sandboxFilePath)}'`, { cwd: root, abortSignal });
|
|
174
177
|
}
|
|
175
178
|
catch (error) {
|
|
179
|
+
if ((0, agents_1.isAbortError)(error))
|
|
180
|
+
throw error;
|
|
181
|
+
if (abortSignal?.aborted)
|
|
182
|
+
throw (0, agents_1.createAbortError)(abortSignal.reason);
|
|
176
183
|
return {
|
|
177
184
|
success: false,
|
|
178
185
|
reason: 'workflow_source_sandbox_unavailable',
|
|
@@ -246,13 +253,13 @@ async function collectCredentialResolutionWarnings(json, context) {
|
|
|
246
253
|
}
|
|
247
254
|
return warnings;
|
|
248
255
|
}
|
|
249
|
-
async function compileWorkflowSource(context, filePath, source) {
|
|
256
|
+
async function compileWorkflowSource(context, filePath, source, abortSignal) {
|
|
250
257
|
let result;
|
|
251
258
|
if (isWorkflowJsonSourceFile(filePath)) {
|
|
252
259
|
result = parseWorkflowJsonSource(source);
|
|
253
260
|
}
|
|
254
261
|
else if (isTypeScriptWorkflowSource(filePath)) {
|
|
255
|
-
result = await compileTypeScriptWorkflowSource(context, filePath);
|
|
262
|
+
result = await compileTypeScriptWorkflowSource(context, filePath, abortSignal);
|
|
256
263
|
}
|
|
257
264
|
else {
|
|
258
265
|
result = {
|