@n8n/instance-ai 1.4.1 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/instance-agent.js +0 -1
- package/dist/agent/instance-agent.js.map +1 -1
- package/dist/agent/sub-agent-debriefing.d.ts +2 -2
- package/dist/agent/system-prompt.js +36 -14
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/constants/model-settings.d.ts +3 -0
- package/dist/constants/model-settings.js +7 -0
- package/dist/constants/model-settings.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +6 -0
- package/dist/planned-tasks/planned-task-permissions.d.ts +2 -0
- package/dist/planned-tasks/planned-task-permissions.js +8 -2
- package/dist/planned-tasks/planned-task-permissions.js.map +1 -1
- package/dist/planned-tasks/planned-task-service.d.ts +14 -1
- package/dist/planned-tasks/planned-task-service.js +138 -2
- package/dist/planned-tasks/planned-task-service.js.map +1 -1
- package/dist/runtime/background-task-manager.d.ts +25 -1
- package/dist/runtime/background-task-manager.js +66 -2
- package/dist/runtime/background-task-manager.js.map +1 -1
- package/dist/runtime/builder-sandbox-session-registry.d.ts +45 -0
- package/dist/runtime/builder-sandbox-session-registry.js +159 -0
- package/dist/runtime/builder-sandbox-session-registry.js.map +1 -0
- package/dist/runtime/run-state-registry.d.ts +7 -4
- package/dist/runtime/run-state-registry.js +9 -0
- package/dist/runtime/run-state-registry.js.map +1 -1
- package/dist/storage/planned-task-storage.js +2 -1
- package/dist/storage/planned-task-storage.js.map +1 -1
- package/dist/storage/workflow-loop-storage.d.ts +292 -12
- package/dist/stream/consume-with-hitl.d.ts +1 -0
- package/dist/stream/consume-with-hitl.js +1 -0
- package/dist/stream/consume-with-hitl.js.map +1 -1
- package/dist/tools/data-tables.tool.js +60 -22
- package/dist/tools/data-tables.tool.js.map +1 -1
- package/dist/tools/executions.tool.js +4 -1
- package/dist/tools/executions.tool.js.map +1 -1
- package/dist/tools/index.d.ts +1 -2
- package/dist/tools/index.js +2 -3
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/orchestration/add-plan-item.tool.js +3 -1
- package/dist/tools/orchestration/add-plan-item.tool.js.map +1 -1
- package/dist/tools/orchestration/blueprint-accumulator.d.ts +4 -1
- package/dist/tools/orchestration/blueprint-accumulator.js +28 -0
- package/dist/tools/orchestration/blueprint-accumulator.js.map +1 -1
- package/dist/tools/orchestration/blueprint.schema.d.ts +60 -15
- package/dist/tools/orchestration/blueprint.schema.js +15 -1
- package/dist/tools/orchestration/blueprint.schema.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.prompt.js +41 -12
- package/dist/tools/orchestration/build-workflow-agent.prompt.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.tool.d.ts +51 -3
- package/dist/tools/orchestration/build-workflow-agent.tool.js +837 -272
- package/dist/tools/orchestration/build-workflow-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/builder-memory-compaction.d.ts +38 -0
- package/dist/tools/orchestration/builder-memory-compaction.js +146 -0
- package/dist/tools/orchestration/builder-memory-compaction.js.map +1 -0
- package/dist/tools/orchestration/complete-checkpoint.tool.d.ts +2 -0
- package/dist/tools/orchestration/complete-checkpoint.tool.js +76 -0
- package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -0
- package/dist/tools/orchestration/data-table-agent.tool.js +33 -17
- package/dist/tools/orchestration/data-table-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/delegate.tool.js +32 -16
- package/dist/tools/orchestration/delegate.tool.js.map +1 -1
- package/dist/tools/orchestration/plan-agent-prompt.d.ts +1 -1
- package/dist/tools/orchestration/plan-agent-prompt.js +6 -0
- package/dist/tools/orchestration/plan-agent-prompt.js.map +1 -1
- package/dist/tools/orchestration/plan-with-agent.tool.d.ts +8 -0
- package/dist/tools/orchestration/plan-with-agent.tool.js +43 -12
- package/dist/tools/orchestration/plan-with-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/plan.tool.js +17 -1
- package/dist/tools/orchestration/plan.tool.js.map +1 -1
- package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +40 -2
- package/dist/tools/orchestration/report-verification-verdict.tool.js +85 -6
- package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
- package/dist/tools/orchestration/research-with-agent.tool.js +32 -16
- package/dist/tools/orchestration/research-with-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +8 -2
- package/dist/tools/orchestration/verify-built-workflow.tool.js +476 -6
- package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
- package/dist/tools/research.tool.js +2 -2
- package/dist/tools/research.tool.js.map +1 -1
- package/dist/tools/templates.tool.js +5 -90
- package/dist/tools/templates.tool.js.map +1 -1
- package/dist/tools/web-research/sanitize-web-content.d.ts +0 -1
- package/dist/tools/web-research/sanitize-web-content.js +0 -9
- package/dist/tools/web-research/sanitize-web-content.js.map +1 -1
- package/dist/tools/workflows/apply-workflow-credentials.tool.d.ts +2 -2
- package/dist/tools/workflows/build-workflow.tool.d.ts +2 -2
- package/dist/tools/workflows/build-workflow.tool.js +3 -1
- package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/materialize-node-type.tool.d.ts +8 -8
- package/dist/tools/workflows/submit-workflow-identity.d.ts +23 -1
- package/dist/tools/workflows/submit-workflow-identity.js +92 -5
- package/dist/tools/workflows/submit-workflow-identity.js.map +1 -1
- package/dist/tools/workflows/submit-workflow.tool.d.ts +48 -3
- package/dist/tools/workflows/submit-workflow.tool.js +81 -11
- package/dist/tools/workflows/submit-workflow.tool.js.map +1 -1
- package/dist/tracing/langsmith-tracing.js +8 -3
- package/dist/tracing/langsmith-tracing.js.map +1 -1
- package/dist/tracing/trace-replay.d.ts +3 -0
- package/dist/tracing/trace-replay.js +65 -0
- package/dist/tracing/trace-replay.js.map +1 -1
- package/dist/types.d.ts +79 -12
- package/dist/workflow-builder/parse-validate.d.ts +5 -1
- package/dist/workflow-builder/parse-validate.js +4 -3
- package/dist/workflow-builder/parse-validate.js.map +1 -1
- package/dist/workflow-loop/guidance.js +8 -2
- package/dist/workflow-loop/guidance.js.map +1 -1
- package/dist/workflow-loop/index.d.ts +3 -2
- package/dist/workflow-loop/index.js +9 -1
- package/dist/workflow-loop/index.js.map +1 -1
- package/dist/workflow-loop/remediation.d.ts +13 -0
- package/dist/workflow-loop/remediation.js +36 -0
- package/dist/workflow-loop/remediation.js.map +1 -0
- package/dist/workflow-loop/runtime.js +7 -0
- package/dist/workflow-loop/runtime.js.map +1 -1
- package/dist/workflow-loop/workflow-loop-controller.d.ts +1 -1
- package/dist/workflow-loop/workflow-loop-controller.js +196 -29
- package/dist/workflow-loop/workflow-loop-controller.js.map +1 -1
- package/dist/workflow-loop/workflow-loop-state.d.ts +338 -8
- package/dist/workflow-loop/workflow-loop-state.js +44 -1
- package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
- package/dist/workflow-loop/workflow-task-service.d.ts +2 -1
- package/dist/workflow-loop/workflow-task-service.js +4 -0
- package/dist/workflow-loop/workflow-task-service.js.map +1 -1
- package/dist/workspace/builder-sandbox-factory.d.ts +3 -2
- package/dist/workspace/builder-sandbox-factory.js +74 -27
- package/dist/workspace/builder-sandbox-factory.js.map +1 -1
- package/dist/workspace/create-workspace.d.ts +2 -0
- package/dist/workspace/create-workspace.js.map +1 -1
- package/dist/workspace/sandbox-setup.js +36 -8
- package/dist/workspace/sandbox-setup.js.map +1 -1
- package/dist/workspace/snapshot-manager.d.ts +14 -2
- package/dist/workspace/snapshot-manager.js +57 -1
- package/dist/workspace/snapshot-manager.js.map +1 -1
- package/package.json +13 -7
- package/dist/tools/templates/template-api.d.ts +0 -21
- package/dist/tools/templates/template-api.js +0 -104
- package/dist/tools/templates/template-api.js.map +0 -1
- package/dist/tools/templates/types.d.ts +0 -52
- package/dist/tools/templates/types.js +0 -37
- package/dist/tools/templates/types.js.map +0 -1
- package/dist/tools/utils/mermaid.utils.d.ts +0 -15
- package/dist/tools/utils/mermaid.utils.js +0 -622
- package/dist/tools/utils/mermaid.utils.js.map +0 -1
- package/dist/tools/utils/node-configuration.utils.d.ts +0 -6
- package/dist/tools/utils/node-configuration.utils.js +0 -77
- package/dist/tools/utils/node-configuration.utils.js.map +0 -1
|
@@ -8,16 +8,16 @@ export declare const blueprintWorkflowItemSchema: z.ZodObject<{
|
|
|
8
8
|
existingWorkflowId: z.ZodOptional<z.ZodString>;
|
|
9
9
|
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
id: string;
|
|
12
11
|
name: string;
|
|
12
|
+
id: string;
|
|
13
13
|
purpose: string;
|
|
14
14
|
integrations: string[];
|
|
15
15
|
dependsOn: string[];
|
|
16
16
|
triggerDescription?: string | undefined;
|
|
17
17
|
existingWorkflowId?: string | undefined;
|
|
18
18
|
}, {
|
|
19
|
-
id: string;
|
|
20
19
|
name: string;
|
|
20
|
+
id: string;
|
|
21
21
|
purpose: string;
|
|
22
22
|
integrations: string[];
|
|
23
23
|
triggerDescription?: string | undefined;
|
|
@@ -40,8 +40,8 @@ export declare const blueprintDataTableItemSchema: z.ZodObject<{
|
|
|
40
40
|
}>, "many">>;
|
|
41
41
|
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
id: string;
|
|
44
43
|
name: string;
|
|
44
|
+
id: string;
|
|
45
45
|
purpose: string;
|
|
46
46
|
dependsOn: string[];
|
|
47
47
|
columns?: {
|
|
@@ -49,8 +49,8 @@ export declare const blueprintDataTableItemSchema: z.ZodObject<{
|
|
|
49
49
|
name: string;
|
|
50
50
|
}[] | undefined;
|
|
51
51
|
}, {
|
|
52
|
-
id: string;
|
|
53
52
|
name: string;
|
|
53
|
+
id: string;
|
|
54
54
|
purpose: string;
|
|
55
55
|
columns?: {
|
|
56
56
|
type: "string" | "number" | "boolean" | "date";
|
|
@@ -83,8 +83,8 @@ export declare const blueprintDelegateItemSchema: z.ZodObject<{
|
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
84
|
id: string;
|
|
85
85
|
description: string;
|
|
86
|
-
dependsOn: string[];
|
|
87
86
|
title: string;
|
|
87
|
+
dependsOn: string[];
|
|
88
88
|
requiredTools: string[];
|
|
89
89
|
}, {
|
|
90
90
|
id: string;
|
|
@@ -93,6 +93,22 @@ export declare const blueprintDelegateItemSchema: z.ZodObject<{
|
|
|
93
93
|
requiredTools: string[];
|
|
94
94
|
dependsOn?: string[] | undefined;
|
|
95
95
|
}>;
|
|
96
|
+
export declare const blueprintCheckpointItemSchema: z.ZodObject<{
|
|
97
|
+
id: z.ZodString;
|
|
98
|
+
title: z.ZodString;
|
|
99
|
+
instructions: z.ZodString;
|
|
100
|
+
dependsOn: z.ZodArray<z.ZodString, "many">;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
id: string;
|
|
103
|
+
instructions: string;
|
|
104
|
+
title: string;
|
|
105
|
+
dependsOn: string[];
|
|
106
|
+
}, {
|
|
107
|
+
id: string;
|
|
108
|
+
instructions: string;
|
|
109
|
+
title: string;
|
|
110
|
+
dependsOn: string[];
|
|
111
|
+
}>;
|
|
96
112
|
export declare const planningBlueprintSchema: z.ZodObject<{
|
|
97
113
|
summary: z.ZodString;
|
|
98
114
|
workflows: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -104,16 +120,16 @@ export declare const planningBlueprintSchema: z.ZodObject<{
|
|
|
104
120
|
existingWorkflowId: z.ZodOptional<z.ZodString>;
|
|
105
121
|
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
106
122
|
}, "strip", z.ZodTypeAny, {
|
|
107
|
-
id: string;
|
|
108
123
|
name: string;
|
|
124
|
+
id: string;
|
|
109
125
|
purpose: string;
|
|
110
126
|
integrations: string[];
|
|
111
127
|
dependsOn: string[];
|
|
112
128
|
triggerDescription?: string | undefined;
|
|
113
129
|
existingWorkflowId?: string | undefined;
|
|
114
130
|
}, {
|
|
115
|
-
id: string;
|
|
116
131
|
name: string;
|
|
132
|
+
id: string;
|
|
117
133
|
purpose: string;
|
|
118
134
|
integrations: string[];
|
|
119
135
|
triggerDescription?: string | undefined;
|
|
@@ -136,8 +152,8 @@ export declare const planningBlueprintSchema: z.ZodObject<{
|
|
|
136
152
|
}>, "many">>;
|
|
137
153
|
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
138
154
|
}, "strip", z.ZodTypeAny, {
|
|
139
|
-
id: string;
|
|
140
155
|
name: string;
|
|
156
|
+
id: string;
|
|
141
157
|
purpose: string;
|
|
142
158
|
dependsOn: string[];
|
|
143
159
|
columns?: {
|
|
@@ -145,8 +161,8 @@ export declare const planningBlueprintSchema: z.ZodObject<{
|
|
|
145
161
|
name: string;
|
|
146
162
|
}[] | undefined;
|
|
147
163
|
}, {
|
|
148
|
-
id: string;
|
|
149
164
|
name: string;
|
|
165
|
+
id: string;
|
|
150
166
|
purpose: string;
|
|
151
167
|
columns?: {
|
|
152
168
|
type: "string" | "number" | "boolean" | "date";
|
|
@@ -179,8 +195,8 @@ export declare const planningBlueprintSchema: z.ZodObject<{
|
|
|
179
195
|
}, "strip", z.ZodTypeAny, {
|
|
180
196
|
id: string;
|
|
181
197
|
description: string;
|
|
182
|
-
dependsOn: string[];
|
|
183
198
|
title: string;
|
|
199
|
+
dependsOn: string[];
|
|
184
200
|
requiredTools: string[];
|
|
185
201
|
}, {
|
|
186
202
|
id: string;
|
|
@@ -189,13 +205,29 @@ export declare const planningBlueprintSchema: z.ZodObject<{
|
|
|
189
205
|
requiredTools: string[];
|
|
190
206
|
dependsOn?: string[] | undefined;
|
|
191
207
|
}>, "many">>;
|
|
208
|
+
checkpointItems: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
title: z.ZodString;
|
|
211
|
+
instructions: z.ZodString;
|
|
212
|
+
dependsOn: z.ZodArray<z.ZodString, "many">;
|
|
213
|
+
}, "strip", z.ZodTypeAny, {
|
|
214
|
+
id: string;
|
|
215
|
+
instructions: string;
|
|
216
|
+
title: string;
|
|
217
|
+
dependsOn: string[];
|
|
218
|
+
}, {
|
|
219
|
+
id: string;
|
|
220
|
+
instructions: string;
|
|
221
|
+
title: string;
|
|
222
|
+
dependsOn: string[];
|
|
223
|
+
}>, "many">>;
|
|
192
224
|
assumptions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
193
225
|
openQuestions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
194
226
|
}, "strip", z.ZodTypeAny, {
|
|
195
227
|
summary: string;
|
|
196
228
|
workflows: {
|
|
197
|
-
id: string;
|
|
198
229
|
name: string;
|
|
230
|
+
id: string;
|
|
199
231
|
purpose: string;
|
|
200
232
|
integrations: string[];
|
|
201
233
|
dependsOn: string[];
|
|
@@ -203,8 +235,8 @@ export declare const planningBlueprintSchema: z.ZodObject<{
|
|
|
203
235
|
existingWorkflowId?: string | undefined;
|
|
204
236
|
}[];
|
|
205
237
|
dataTables: {
|
|
206
|
-
id: string;
|
|
207
238
|
name: string;
|
|
239
|
+
id: string;
|
|
208
240
|
purpose: string;
|
|
209
241
|
dependsOn: string[];
|
|
210
242
|
columns?: {
|
|
@@ -221,17 +253,23 @@ export declare const planningBlueprintSchema: z.ZodObject<{
|
|
|
221
253
|
delegateItems: {
|
|
222
254
|
id: string;
|
|
223
255
|
description: string;
|
|
224
|
-
dependsOn: string[];
|
|
225
256
|
title: string;
|
|
257
|
+
dependsOn: string[];
|
|
226
258
|
requiredTools: string[];
|
|
227
259
|
}[];
|
|
260
|
+
checkpointItems: {
|
|
261
|
+
id: string;
|
|
262
|
+
instructions: string;
|
|
263
|
+
title: string;
|
|
264
|
+
dependsOn: string[];
|
|
265
|
+
}[];
|
|
228
266
|
assumptions: string[];
|
|
229
267
|
openQuestions: string[];
|
|
230
268
|
}, {
|
|
231
269
|
summary: string;
|
|
232
270
|
workflows?: {
|
|
233
|
-
id: string;
|
|
234
271
|
name: string;
|
|
272
|
+
id: string;
|
|
235
273
|
purpose: string;
|
|
236
274
|
integrations: string[];
|
|
237
275
|
triggerDescription?: string | undefined;
|
|
@@ -239,8 +277,8 @@ export declare const planningBlueprintSchema: z.ZodObject<{
|
|
|
239
277
|
dependsOn?: string[] | undefined;
|
|
240
278
|
}[] | undefined;
|
|
241
279
|
dataTables?: {
|
|
242
|
-
id: string;
|
|
243
280
|
name: string;
|
|
281
|
+
id: string;
|
|
244
282
|
purpose: string;
|
|
245
283
|
columns?: {
|
|
246
284
|
type: "string" | "number" | "boolean" | "date";
|
|
@@ -261,6 +299,12 @@ export declare const planningBlueprintSchema: z.ZodObject<{
|
|
|
261
299
|
requiredTools: string[];
|
|
262
300
|
dependsOn?: string[] | undefined;
|
|
263
301
|
}[] | undefined;
|
|
302
|
+
checkpointItems?: {
|
|
303
|
+
id: string;
|
|
304
|
+
instructions: string;
|
|
305
|
+
title: string;
|
|
306
|
+
dependsOn: string[];
|
|
307
|
+
}[] | undefined;
|
|
264
308
|
assumptions?: string[] | undefined;
|
|
265
309
|
openQuestions?: string[] | undefined;
|
|
266
310
|
}>;
|
|
@@ -269,3 +313,4 @@ export type BlueprintWorkflowItem = z.infer<typeof blueprintWorkflowItemSchema>;
|
|
|
269
313
|
export type BlueprintDataTableItem = z.infer<typeof blueprintDataTableItemSchema>;
|
|
270
314
|
export type BlueprintResearchItem = z.infer<typeof blueprintResearchItemSchema>;
|
|
271
315
|
export type BlueprintDelegateItem = z.infer<typeof blueprintDelegateItemSchema>;
|
|
316
|
+
export type BlueprintCheckpointItem = z.infer<typeof blueprintCheckpointItemSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.planningBlueprintSchema = exports.blueprintDelegateItemSchema = exports.blueprintResearchItemSchema = exports.blueprintDataTableItemSchema = exports.blueprintWorkflowItemSchema = void 0;
|
|
3
|
+
exports.planningBlueprintSchema = exports.blueprintCheckpointItemSchema = exports.blueprintDelegateItemSchema = exports.blueprintResearchItemSchema = exports.blueprintDataTableItemSchema = exports.blueprintWorkflowItemSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.blueprintWorkflowItemSchema = zod_1.z.object({
|
|
6
6
|
id: zod_1.z.string().describe('Stable ID — preserved as task ID in the execution plan'),
|
|
@@ -46,12 +46,26 @@ exports.blueprintDelegateItemSchema = zod_1.z.object({
|
|
|
46
46
|
requiredTools: zod_1.z.array(zod_1.z.string()).describe('Tool names the delegate needs'),
|
|
47
47
|
dependsOn: zod_1.z.array(zod_1.z.string()).default([]),
|
|
48
48
|
});
|
|
49
|
+
exports.blueprintCheckpointItemSchema = zod_1.z.object({
|
|
50
|
+
id: zod_1.z.string().describe('Stable ID — preserved as task ID'),
|
|
51
|
+
title: zod_1.z
|
|
52
|
+
.string()
|
|
53
|
+
.describe('User-readable verification goal (e.g., "Verify Daily Email workflow runs without errors")'),
|
|
54
|
+
instructions: zod_1.z
|
|
55
|
+
.string()
|
|
56
|
+
.describe('Detailed verification steps the orchestrator must execute — which tools to call, the expected pass condition. The orchestrator runs this itself (no sub-agent).'),
|
|
57
|
+
dependsOn: zod_1.z
|
|
58
|
+
.array(zod_1.z.string())
|
|
59
|
+
.min(1)
|
|
60
|
+
.describe('IDs of items this checkpoint verifies. Must include at least one workflow item ID.'),
|
|
61
|
+
});
|
|
49
62
|
exports.planningBlueprintSchema = zod_1.z.object({
|
|
50
63
|
summary: zod_1.z.string().describe('1-2 sentence overview of the solution'),
|
|
51
64
|
workflows: zod_1.z.array(exports.blueprintWorkflowItemSchema).default([]),
|
|
52
65
|
dataTables: zod_1.z.array(exports.blueprintDataTableItemSchema).default([]),
|
|
53
66
|
researchItems: zod_1.z.array(exports.blueprintResearchItemSchema).default([]),
|
|
54
67
|
delegateItems: zod_1.z.array(exports.blueprintDelegateItemSchema).default([]),
|
|
68
|
+
checkpointItems: zod_1.z.array(exports.blueprintCheckpointItemSchema).default([]),
|
|
55
69
|
assumptions: zod_1.z.array(zod_1.z.string()).default([]).describe('Assumptions the plan relies on'),
|
|
56
70
|
openQuestions: zod_1.z
|
|
57
71
|
.array(zod_1.z.string())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprint.schema.js","sourceRoot":"","sources":["../../../src/tools/orchestration/blueprint.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAMX,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;IACjF,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAClD,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4DAA4D,CAAC;IAC1F,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAClF,kBAAkB,EAAE,OAAC;SACnB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,sEAAsE,CAAC;IAClF,kBAAkB,EAAE,OAAC;SACnB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,4DAA4D,CAAC;IACxE,SAAS,EAAE,OAAC;SACV,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,wDAAwD,CAAC;CACpE,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ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;IACF,YAAY,EAAE,OAAC;SACb,MAAM,EAAE;SACR,QAAQ,CACR,iKAAiK,CACjK;IACF,SAAS,EAAE,OAAC;SACV,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,oFAAoF,CAAC;CAChG,CAAC,CAAC;AAMU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;IACrE,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,mCAA2B,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC3D,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,oCAA4B,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7D,aAAa,EAAE,OAAC,CAAC,KAAK,CAAC,mCAA2B,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/D,aAAa,EAAE,OAAC,CAAC,KAAK,CAAC,mCAA2B,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/D,eAAe,EAAE,OAAC,CAAC,KAAK,CAAC,qCAA6B,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACnE,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IACvF,aAAa,EAAE,OAAC;SACd,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,OAAO,CAAC,EAAE,CAAC;SACX,QAAQ,CAAC,gEAAgE,CAAC;CAC5E,CAAC,CAAC"}
|
|
@@ -53,6 +53,16 @@ After writing any workflow with IF, Switch, or Filter nodes, verify:
|
|
|
53
53
|
|
|
54
54
|
### AI Agent with Subnodes — use factory functions in subnodes config
|
|
55
55
|
\`\`\`javascript
|
|
56
|
+
const chatTrigger = trigger({
|
|
57
|
+
type: '@n8n/n8n-nodes-langchain.chatTrigger',
|
|
58
|
+
version: 1.3,
|
|
59
|
+
config: {
|
|
60
|
+
name: 'Chat Trigger',
|
|
61
|
+
parameters: { public: false },
|
|
62
|
+
output: [{ sessionId: 'chat-session-id', chatInput: 'Hello' }]
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
56
66
|
const model = languageModel({
|
|
57
67
|
type: '@n8n/n8n-nodes-langchain.lmChatOpenAi',
|
|
58
68
|
version: 1.3,
|
|
@@ -75,6 +85,19 @@ const parser = outputParser({
|
|
|
75
85
|
}
|
|
76
86
|
});
|
|
77
87
|
|
|
88
|
+
const memoryNode = memory({
|
|
89
|
+
type: '@n8n/n8n-nodes-langchain.memoryBufferWindow',
|
|
90
|
+
version: 1.3,
|
|
91
|
+
config: {
|
|
92
|
+
name: 'Conversation Memory',
|
|
93
|
+
parameters: {
|
|
94
|
+
sessionIdType: 'customKey',
|
|
95
|
+
sessionKey: nodeJson(chatTrigger, 'sessionId'),
|
|
96
|
+
contextWindowLength: 10
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
78
101
|
const agent = node({
|
|
79
102
|
type: '@n8n/n8n-nodes-langchain.agent',
|
|
80
103
|
version: 3.1,
|
|
@@ -86,11 +109,12 @@ const agent = node({
|
|
|
86
109
|
hasOutputParser: true,
|
|
87
110
|
options: { systemMessage: 'You are an expert...' }
|
|
88
111
|
},
|
|
89
|
-
subnodes: { model: model, outputParser: parser }
|
|
112
|
+
subnodes: { model: model, memory: memoryNode, outputParser: parser }
|
|
90
113
|
}
|
|
91
114
|
});
|
|
92
115
|
\`\`\`
|
|
93
116
|
WRONG: \`.to(agent, { connectionType: 'ai_languageModel' })\` — subnodes MUST be in the config object.
|
|
117
|
+
For values inside AI subnodes, use explicit references such as \`nodeJson(triggerNode, 'sessionId')\` instead of \`$json.sessionId\`. For Chat Trigger memory specifically, \`sessionIdType: 'fromInput'\` is also valid.
|
|
94
118
|
|
|
95
119
|
### Code Node
|
|
96
120
|
\`\`\`javascript
|
|
@@ -192,10 +216,6 @@ export default workflow('id', 'name')
|
|
|
192
216
|
.add(scheduleTrigger).to(processNode);
|
|
193
217
|
\`\`\`
|
|
194
218
|
|
|
195
|
-
### Web App (SPA served from a webhook)
|
|
196
|
-
|
|
197
|
-
When the workflow serves HTML from a webhook (dashboards, admin UIs, custom forms), call \`templates(action="best-practices", technique="web_app")\` for the full file-based HTML pattern, data-injection recipe, multi-route architecture, and a complete multi-route dashboard example. Embedding large HTML inline in Code nodes breaks at ~20KB — always use the file-based pattern from the guide.
|
|
198
|
-
|
|
199
219
|
### Google Sheets — documentId and sheetName (RLC fields)
|
|
200
220
|
|
|
201
221
|
These are Resource Locator fields that require the \`__rl\` object format:
|
|
@@ -234,17 +254,24 @@ const SANDBOX_WORKFLOW_RULES = `Follow these rules strictly when generating work
|
|
|
234
254
|
- Example: \`credentials: { slackApi: { id: 'yXYBqho73obh58ZS', name: 'Slack Bot' } }\`
|
|
235
255
|
- The key (e.g. \`slackApi\`) is the credential **type** from the node type definition
|
|
236
256
|
|
|
237
|
-
2. **
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
-
|
|
241
|
-
-
|
|
242
|
-
-
|
|
257
|
+
2. **Trust empty item lists — don't synthesize fake items**
|
|
258
|
+
- When a query returns 0 items, downstream nodes simply don't run for that execution. For scheduled or polling triggers this is the correct "nothing to do this round" signal — the next run will execute normally when data appears.
|
|
259
|
+
- DO NOT add \`alwaysOutputData: true\` just to "keep the chain alive." Forcing an empty \`{}\` item downstream is what causes \`undefined\` reads, failed HTTP calls to \`GET undefined\`, and Code-node crashes on missing fields.
|
|
260
|
+
- DO NOT add an IF gate before a loop to check "has items?" — loops (\`splitInBatches\`, per-item nodes, \`filter\`) already no-op on empty input. The gate is redundant and adds a failure surface.
|
|
261
|
+
- \`alwaysOutputData: true\` is only correct when you specifically need a downstream branch to run on the "empty" case — e.g. a dedicated "no matches found" notification path. In that case, pair it with an \`IF\` that explicitly checks for the empty case and routes accordingly. Never use it as a default.
|
|
262
|
+
- To drop invalid items mid-pipeline, use a \`filter\` node. A \`filter\` that rejects everything emits 0 items and the chain correctly stops — no \`IF\` + \`splitInBatches\` composition needed.
|
|
243
263
|
|
|
244
264
|
3. **Use \`executeOnce: true\` for single-execution nodes**
|
|
245
265
|
- When a node receives N items but should only execute once (not N times), set \`executeOnce: true\`
|
|
246
266
|
- Common cases: sending a summary notification, generating a report, calling an API that doesn't need per-item execution
|
|
247
|
-
- Example: \`config: { ..., executeOnce: true }
|
|
267
|
+
- Example: \`config: { ..., executeOnce: true }\`
|
|
268
|
+
|
|
269
|
+
4. **Pick the right control-flow primitive**
|
|
270
|
+
- **Per-item loop with side effects (fetch, embed, write)** → \`splitInBatches\` with \`batchSize: 1\` feeding the per-item work, loop back via \`nextBatch\`. No \`IF\` gate before it.
|
|
271
|
+
- **Drop items that don't match a predicate** → \`filter\`. It emits 0 items when nothing matches, and the chain stops cleanly.
|
|
272
|
+
- **Two mutually exclusive paths that both do real work** → \`IF\` (\`onTrue\` / \`onFalse\`).
|
|
273
|
+
- **Many mutually exclusive paths keyed off a value** → \`switch\` (\`onCase\`).
|
|
274
|
+
- Nested control flow is supported: \`ifNode.onTrue(loopBuilder)\`, \`switchNode.onCase(0, loopBuilder)\`, and \`splitInBatches(sib).onEachBatch(ifElseBuilder)\` all compile and wire correctly. Use them when the semantics genuinely call for it, not as a workaround for empty-list handling.`;
|
|
248
275
|
function composeSdkRulesAndPatterns(mode) {
|
|
249
276
|
const sandboxOverride = mode === 'sandbox'
|
|
250
277
|
? "> **Sandbox credential override**: The SDK pattern examples below use `newCredential('X')`. " +
|
|
@@ -508,6 +535,8 @@ The key (\`openWeatherMapApi\`) is the credential **type** from the node type de
|
|
|
508
535
|
|
|
509
536
|
If the required credential type is not in \`credentials(action="list")\` results, call \`credentials(action="search-types")\` with the service name (e.g. "linear", "notion") to discover available dedicated credential types. Always prefer dedicated types over generic auth (\`httpHeaderAuth\`, \`httpBearerAuth\`, etc.). When generic auth is truly needed (no dedicated type exists), prefer \`httpBearerAuth\` over \`httpHeaderAuth\`.
|
|
510
537
|
|
|
538
|
+
The credential-selection guidance above applies to outbound service calls. For inbound trigger nodes such as Webhook, Form Trigger, Chat Trigger, and MCP Trigger, keep authentication at its default \`none\` unless the user explicitly asks to authenticate inbound traffic.
|
|
539
|
+
|
|
511
540
|
## Data Tables
|
|
512
541
|
|
|
513
542
|
n8n normalizes column names to snake_case (e.g., \`dayName\` → \`day_name\`). Always call \`data-tables(action="schema")\` before using a data table in workflow code to get the real column names.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-workflow-agent.prompt.js","sourceRoot":"","sources":["../../../src/tools/orchestration/build-workflow-agent.prompt.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"build-workflow-agent.prompt.js","sourceRoot":"","sources":["../../../src/tools/orchestration/build-workflow-agent.prompt.ts"],"names":[],"mappings":";;;AAgYA,0EA4SC;AApqBD,+FAQkE;AAClE,6EAIkD;AAClD,2EAKiD;AAEjD,+DAAkF;AAIlF,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;0GAkBwE,CAAC;AAI3G,MAAM,cAAc,GAAG;;;;;;;;;;qFAU8D,CAAC;AAKtF,SAAS,4BAA4B,CAAC,IAAwB;IAC7D,MAAM,iBAAiB,GACtB,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,0CAA0C,CAAC,CAAC,CAAC,yBAAyB,CAAC;IAC7F,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA+BwB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EAMzB,kCAAiB;;EAEjB,kCAAiB;;;;;;;;;;;;;;;;;EAiBjB,2BAA2B;CAC5B,CAAC;AAIF,SAAgB,+BAA+B,CAAC,aAAqB;IACpE,OAAO;;EAEN,yBAAyB;;;;0BAID,aAAa,6DAA6D,aAAa;;;EAG/G,aAAa;;;;;;;;;;;;;;;;;;KAkBV,aAAa;;;;;;;;;;;;;;;KAeb,aAAa;;;;;;;;;;;;;;;;;;;;;KAqBb,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsDb,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwChB,kCAAiB;;;;;;;;;;;;;;;;;EAiBjB,kCAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCA4DmB,aAAa;;;;;;;;;;;;;;kCAcjB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;6BAwBlB,aAAa;;;;sCAIJ,aAAa;;;;;;;yFAOsC,aAAa;;;;;;;;;;;;;;EAcpG,8BAA8B;CAC/B,CAAC;AACF,CAAC"}
|
|
@@ -1,18 +1,57 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type {
|
|
3
|
-
import { type
|
|
2
|
+
import type { OrchestrationContext } from '../../types';
|
|
3
|
+
import { type WorkflowBuildOutcome, type WorkflowLoopState } from '../../workflow-loop';
|
|
4
|
+
import { type SubmitWorkflowAttempt, type SubmitWorkflowOutput } from '../workflows/submit-workflow.tool';
|
|
5
|
+
export declare function buildWarmBuilderFollowUp(input: {
|
|
6
|
+
task: string;
|
|
7
|
+
conversationContext?: string;
|
|
8
|
+
workflowId: string;
|
|
9
|
+
workItemId: string;
|
|
10
|
+
}): string;
|
|
4
11
|
export declare function recordSuccessfulWorkflowBuilds(tool: unknown, onWorkflowId: (workflowId: string) => void): void;
|
|
12
|
+
export declare function mergeLatestVerificationIntoOutcome(outcome: WorkflowBuildOutcome, latestOutcome: WorkflowBuildOutcome | undefined): WorkflowBuildOutcome;
|
|
13
|
+
export declare function withTerminalLoopState(outcome: WorkflowBuildOutcome, state: WorkflowLoopState | undefined): WorkflowBuildOutcome;
|
|
14
|
+
export declare function finalizeBuildResult(context: OrchestrationContext, workItemId: string, result: {
|
|
15
|
+
text: string;
|
|
16
|
+
outcome: WorkflowBuildOutcome;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
text: string;
|
|
19
|
+
outcome: WorkflowBuildOutcome;
|
|
20
|
+
}>;
|
|
5
21
|
export declare function resultFromPostStreamError(input: {
|
|
6
22
|
error: unknown;
|
|
7
23
|
submitAttempts: SubmitWorkflowAttempt[];
|
|
8
24
|
mainWorkflowPath: string;
|
|
9
25
|
workItemId: string;
|
|
26
|
+
runId: string;
|
|
27
|
+
taskId: string;
|
|
28
|
+
}): {
|
|
29
|
+
text: string;
|
|
30
|
+
outcome: WorkflowBuildOutcome;
|
|
31
|
+
} | undefined;
|
|
32
|
+
export declare function resultFromLaterFailedMainSubmit(input: {
|
|
33
|
+
failedAttempt: SubmitWorkflowAttempt;
|
|
34
|
+
submitAttempts: SubmitWorkflowAttempt[];
|
|
35
|
+
mainWorkflowPath: string;
|
|
36
|
+
workItemId: string;
|
|
37
|
+
runId: string;
|
|
10
38
|
taskId: string;
|
|
11
|
-
}):
|
|
39
|
+
}): {
|
|
40
|
+
text: string;
|
|
41
|
+
outcome: WorkflowBuildOutcome;
|
|
42
|
+
} | undefined;
|
|
43
|
+
export declare function attemptFromAutoResubmit(input: {
|
|
44
|
+
latestAttempt: SubmitWorkflowAttempt | undefined;
|
|
45
|
+
resubmit: SubmitWorkflowOutput;
|
|
46
|
+
filePath: string;
|
|
47
|
+
sourceHash: string;
|
|
48
|
+
}): SubmitWorkflowAttempt | undefined;
|
|
49
|
+
export declare function shouldRecoverSavedWorkflowAfterFailedSubmit(attempt: SubmitWorkflowAttempt): boolean;
|
|
12
50
|
export interface StartBuildWorkflowAgentInput {
|
|
13
51
|
task: string;
|
|
14
52
|
workflowId?: string;
|
|
15
53
|
conversationContext?: string;
|
|
54
|
+
workItemId?: string;
|
|
16
55
|
taskId?: string;
|
|
17
56
|
agentId?: string;
|
|
18
57
|
plannedTaskId?: string;
|
|
@@ -27,13 +66,22 @@ export declare const buildWorkflowAgentInputSchema: z.ZodObject<{
|
|
|
27
66
|
task: z.ZodString;
|
|
28
67
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
29
68
|
conversationContext: z.ZodOptional<z.ZodString>;
|
|
69
|
+
workItemId: z.ZodOptional<z.ZodString>;
|
|
70
|
+
bypassPlan: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
30
72
|
}, "strip", z.ZodTypeAny, {
|
|
31
73
|
task: string;
|
|
32
74
|
workflowId?: string | undefined;
|
|
75
|
+
reason?: string | undefined;
|
|
76
|
+
workItemId?: string | undefined;
|
|
33
77
|
conversationContext?: string | undefined;
|
|
78
|
+
bypassPlan?: boolean | undefined;
|
|
34
79
|
}, {
|
|
35
80
|
task: string;
|
|
36
81
|
workflowId?: string | undefined;
|
|
82
|
+
reason?: string | undefined;
|
|
83
|
+
workItemId?: string | undefined;
|
|
37
84
|
conversationContext?: string | undefined;
|
|
85
|
+
bypassPlan?: boolean | undefined;
|
|
38
86
|
}>;
|
|
39
87
|
export declare function createBuildWorkflowAgentTool(context: OrchestrationContext): import("@mastra/core/tools").Tool<InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, InferPublicSchema<T>, import("@mastra/core/tools").ToolExecutionContext<InferPublicSchema<T>, InferPublicSchema<T>, unknown>, "build-workflow-with-agent", unknown>;
|