@n8n/instance-ai 1.14.7 → 1.15.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 (171) hide show
  1. package/dist/agent/apply-agent-thinking.js +3 -3
  2. package/dist/agent/apply-agent-thinking.js.map +1 -1
  3. package/dist/agent/computer-use-prompt.js +12 -10
  4. package/dist/agent/computer-use-prompt.js.map +1 -1
  5. package/dist/agent/instance-agent.js +5 -2
  6. package/dist/agent/instance-agent.js.map +1 -1
  7. package/dist/agent/sanitize-mcp-schemas.js +3 -3
  8. package/dist/agent/sanitize-mcp-schemas.js.map +1 -1
  9. package/dist/agent/shared-prompts.js +3 -5
  10. package/dist/agent/shared-prompts.js.map +1 -1
  11. package/dist/agent/sub-agent-debriefing.d.ts +4 -4
  12. package/dist/agent/system-prompt.d.ts +1 -0
  13. package/dist/agent/system-prompt.js +10 -5
  14. package/dist/agent/system-prompt.js.map +1 -1
  15. package/dist/build.tsbuildinfo +1 -1
  16. package/dist/debug/run-debug-buffer.js +4 -4
  17. package/dist/debug/run-debug-buffer.js.map +1 -1
  18. package/dist/debug/sanitize-debug-snapshot.js +6 -5
  19. package/dist/debug/sanitize-debug-snapshot.js.map +1 -1
  20. package/dist/domain-access/domain-access-tracker.d.ts +8 -4
  21. package/dist/domain-access/domain-access-tracker.js +12 -7
  22. package/dist/domain-access/domain-access-tracker.js.map +1 -1
  23. package/dist/domain-access/domain-gating.d.ts +4 -4
  24. package/dist/domain-access/domain-gating.js +5 -5
  25. package/dist/domain-access/domain-gating.js.map +1 -1
  26. package/dist/error-formatting.js +3 -3
  27. package/dist/error-formatting.js.map +1 -1
  28. package/dist/index.d.ts +3 -20
  29. package/dist/index.js +4 -22
  30. package/dist/index.js.map +1 -1
  31. package/dist/mcp/mcp-client-manager.d.ts +11 -2
  32. package/dist/mcp/mcp-client-manager.js +17 -9
  33. package/dist/mcp/mcp-client-manager.js.map +1 -1
  34. package/dist/runtime/resumable-stream-executor.js +8 -8
  35. package/dist/runtime/resumable-stream-executor.js.map +1 -1
  36. package/dist/runtime/run-state-registry.d.ts +4 -0
  37. package/dist/runtime/run-state-registry.js +22 -8
  38. package/dist/runtime/run-state-registry.js.map +1 -1
  39. package/dist/runtime/terminal-response-guard.js +6 -1
  40. package/dist/runtime/terminal-response-guard.js.map +1 -1
  41. package/dist/storage/terminal-outcome-storage.d.ts +4 -4
  42. package/dist/storage/workflow-loop-storage.d.ts +94 -94
  43. package/dist/stream/map-chunk.js +17 -17
  44. package/dist/stream/map-chunk.js.map +1 -1
  45. package/dist/stream/output-redaction.js +8 -6
  46. package/dist/stream/output-redaction.js.map +1 -1
  47. package/dist/stream/usage-accumulator.d.ts +18 -18
  48. package/dist/stream/work-summary-accumulator.d.ts +6 -6
  49. package/dist/tools/attachments/parse-file.tool.d.ts +18 -18
  50. package/dist/tools/credentials.tool.d.ts +2 -2
  51. package/dist/tools/data-tables.tool.js +2 -2
  52. package/dist/tools/data-tables.tool.js.map +1 -1
  53. package/dist/tools/evals/column-ref-utils.js +4 -4
  54. package/dist/tools/evals/column-ref-utils.js.map +1 -1
  55. package/dist/tools/evals/describe-metric-for-workflow.service.js +3 -3
  56. package/dist/tools/evals/describe-metric-for-workflow.service.js.map +1 -1
  57. package/dist/tools/evals/detect-tool-refs.service.js +2 -2
  58. package/dist/tools/evals/detect-tool-refs.service.js.map +1 -1
  59. package/dist/tools/evals/eval-data-requirements.service.js +10 -10
  60. package/dist/tools/evals/eval-data-requirements.service.js.map +1 -1
  61. package/dist/tools/evals/evals.tool.js +7 -8
  62. package/dist/tools/evals/evals.tool.js.map +1 -1
  63. package/dist/tools/evals/extract-rows-from-history.service.js +7 -7
  64. package/dist/tools/evals/extract-rows-from-history.service.js.map +1 -1
  65. package/dist/tools/evals/generate-sample-rows.service.js +5 -5
  66. package/dist/tools/evals/generate-sample-rows.service.js.map +1 -1
  67. package/dist/tools/evals/metric-catalog.js +3 -3
  68. package/dist/tools/evals/metric-catalog.js.map +1 -1
  69. package/dist/tools/executions.tool.js +4 -6
  70. package/dist/tools/executions.tool.js.map +1 -1
  71. package/dist/tools/filesystem/create-tools-from-mcp-server.js +6 -6
  72. package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
  73. package/dist/tools/n8n-docs/schemas.d.ts +4 -4
  74. package/dist/tools/nodes/node-search-engine.js +3 -3
  75. package/dist/tools/nodes/node-search-engine.js.map +1 -1
  76. package/dist/tools/nodes.tool.js +13 -30
  77. package/dist/tools/nodes.tool.js.map +1 -1
  78. package/dist/tools/orchestration/complete-checkpoint.tool.js +2 -2
  79. package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -1
  80. package/dist/tools/orchestration/delegate.schemas.d.ts +1 -1
  81. package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +8 -8
  82. package/dist/tools/orchestration/verification/analyze-result.js +4 -3
  83. package/dist/tools/orchestration/verification/analyze-result.js.map +1 -1
  84. package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +2 -2
  85. package/dist/tools/orchestration/verify-built-workflow.tool.js +4 -7
  86. package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
  87. package/dist/tools/research.tool.js +2 -2
  88. package/dist/tools/research.tool.js.map +1 -1
  89. package/dist/tools/shared/ask-user.tool.d.ts +4 -4
  90. package/dist/tools/shared/ask-user.tool.js +11 -21
  91. package/dist/tools/shared/ask-user.tool.js.map +1 -1
  92. package/dist/tools/tool-ids.d.ts +1 -0
  93. package/dist/tools/tool-ids.js +2 -1
  94. package/dist/tools/tool-ids.js.map +1 -1
  95. package/dist/tools/workflows/apply-workflow-credentials.tool.js +6 -11
  96. package/dist/tools/workflows/apply-workflow-credentials.tool.js.map +1 -1
  97. package/dist/tools/workflows/build-workflow.tool.d.ts +9 -2
  98. package/dist/tools/workflows/build-workflow.tool.js +127 -5
  99. package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
  100. package/dist/tools/workflows/classify-node-destructiveness.service.js +4 -4
  101. package/dist/tools/workflows/classify-node-destructiveness.service.js.map +1 -1
  102. package/dist/tools/workflows/credential-url-resolver.d.ts +21 -0
  103. package/dist/tools/workflows/credential-url-resolver.js +79 -0
  104. package/dist/tools/workflows/credential-url-resolver.js.map +1 -0
  105. package/dist/tools/workflows/credential-utils.d.ts +28 -0
  106. package/dist/tools/workflows/credential-utils.js +61 -0
  107. package/dist/tools/workflows/credential-utils.js.map +1 -0
  108. package/dist/tools/workflows/detect-array-input-collapse.js +4 -4
  109. package/dist/tools/workflows/detect-array-input-collapse.js.map +1 -1
  110. package/dist/tools/workflows/detect-wrong-kind-locator.d.ts +10 -0
  111. package/dist/tools/workflows/detect-wrong-kind-locator.js +105 -0
  112. package/dist/tools/workflows/detect-wrong-kind-locator.js.map +1 -0
  113. package/dist/tools/workflows/generate-simulation-fixtures.service.js +3 -3
  114. package/dist/tools/workflows/generate-simulation-fixtures.service.js.map +1 -1
  115. package/dist/tools/workflows/materialize-node-type.tool.d.ts +4 -4
  116. package/dist/tools/workflows/setup-workflow.schema.d.ts +63 -27
  117. package/dist/tools/workflows/setup-workflow.service.js +26 -43
  118. package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
  119. package/dist/tools/workflows/summarize-workflow.d.ts +5 -0
  120. package/dist/tools/workflows/summarize-workflow.js +114 -0
  121. package/dist/tools/workflows/summarize-workflow.js.map +1 -0
  122. package/dist/tools/workflows/workflow-json-utils.js +6 -5
  123. package/dist/tools/workflows/workflow-json-utils.js.map +1 -1
  124. package/dist/tools/workflows/workflow-source-compiler.js +48 -9
  125. package/dist/tools/workflows/workflow-source-compiler.js.map +1 -1
  126. package/dist/tools/workflows/workflow-validation-warnings.js +5 -1
  127. package/dist/tools/workflows/workflow-validation-warnings.js.map +1 -1
  128. package/dist/tools/workflows.tool.d.ts +1 -1
  129. package/dist/tools/workflows.tool.js +47 -22
  130. package/dist/tools/workflows.tool.js.map +1 -1
  131. package/dist/tracing/langsmith-tracing.d.ts +5 -1
  132. package/dist/tracing/langsmith-tracing.js +66 -13
  133. package/dist/tracing/langsmith-tracing.js.map +1 -1
  134. package/dist/tracing/trace-payloads.d.ts +1 -0
  135. package/dist/tracing/trace-payloads.js +46 -29
  136. package/dist/tracing/trace-payloads.js.map +1 -1
  137. package/dist/types.d.ts +16 -1
  138. package/dist/types.js.map +1 -1
  139. package/dist/utils/stream-helpers.js +5 -5
  140. package/dist/utils/stream-helpers.js.map +1 -1
  141. package/dist/workflow-builder/index.d.ts +0 -1
  142. package/dist/workflow-builder/index.js +1 -6
  143. package/dist/workflow-builder/index.js.map +1 -1
  144. package/dist/workflow-loop/index.d.ts +0 -1
  145. package/dist/workflow-loop/index.js +1 -3
  146. package/dist/workflow-loop/index.js.map +1 -1
  147. package/dist/workflow-loop/workflow-loop-state.d.ts +112 -112
  148. package/dist/workspace/snapshot-image-context.js +24 -11
  149. package/dist/workspace/snapshot-image-context.js.map +1 -1
  150. package/dist/workspace/snapshot-manager.d.ts +0 -1
  151. package/dist/workspace/snapshot-manager.js +0 -7
  152. package/dist/workspace/snapshot-manager.js.map +1 -1
  153. package/dist/workspace/template-telemetry.js +5 -4
  154. package/dist/workspace/template-telemetry.js.map +1 -1
  155. package/dist/workspace/workspace-manifest.js +2 -2
  156. package/dist/workspace/workspace-manifest.js.map +1 -1
  157. package/knowledge-base/reference/workflow-builder-guardrails.md +33 -0
  158. package/package.json +14 -12
  159. package/skills/post-build-flow/SKILL.md +106 -10
  160. package/skills/workflow-builder/SKILL.md +174 -225
  161. package/skills/workflow-builder/references/compositional-workflows.md +66 -0
  162. package/skills/workflow-builder/references/error-workflows.md +35 -0
  163. package/dist/tools/nodes/suggested-nodes-data.d.ts +0 -11
  164. package/dist/tools/nodes/suggested-nodes-data.js +0 -333
  165. package/dist/tools/nodes/suggested-nodes-data.js.map +0 -1
  166. package/dist/workflow-builder/sdk-prompt-sections.d.ts +0 -1
  167. package/dist/workflow-builder/sdk-prompt-sections.js +0 -9
  168. package/dist/workflow-builder/sdk-prompt-sections.js.map +0 -1
  169. package/dist/workflow-loop/terminal-remediation-guard.d.ts +0 -6
  170. package/dist/workflow-loop/terminal-remediation-guard.js +0 -18
  171. package/dist/workflow-loop/terminal-remediation-guard.js.map +0 -1
@@ -46,14 +46,14 @@ declare const workItemRecordSchema: z.ZodObject<{
46
46
  remainingSubmitFixes: z.ZodOptional<z.ZodNumber>;
47
47
  attemptCount: z.ZodOptional<z.ZodNumber>;
48
48
  }, "strip", z.ZodTypeAny, {
49
- category: "code_fixable" | "needs_setup" | "blocked";
49
+ category: "blocked" | "code_fixable" | "needs_setup";
50
50
  shouldEdit: boolean;
51
51
  guidance: string;
52
52
  reason?: string | undefined;
53
53
  remainingSubmitFixes?: number | undefined;
54
54
  attemptCount?: number | undefined;
55
55
  }, {
56
- category: "code_fixable" | "needs_setup" | "blocked";
56
+ category: "blocked" | "code_fixable" | "needs_setup";
57
57
  shouldEdit: boolean;
58
58
  guidance: string;
59
59
  reason?: string | undefined;
@@ -66,11 +66,12 @@ declare const workItemRecordSchema: z.ZodObject<{
66
66
  setupRoutingClaimExpiresAt: z.ZodOptional<z.ZodString>;
67
67
  }, "strip", z.ZodTypeAny, {
68
68
  status: "blocked" | "active" | "completed";
69
+ threadId: string;
69
70
  source: "create" | "modify";
70
71
  workItemId: string;
71
- threadId: string;
72
- phase: "blocked" | "building" | "verifying" | "repairing" | "done";
72
+ phase: "building" | "verifying" | "repairing" | "done" | "blocked";
73
73
  rebuildAttempts: number;
74
+ runId?: string | undefined;
74
75
  owner?: {
75
76
  type: "direct";
76
77
  } | {
@@ -78,7 +79,6 @@ declare const workItemRecordSchema: z.ZodObject<{
78
79
  taskId: string;
79
80
  } | undefined;
80
81
  plannedTaskId?: string | undefined;
81
- runId?: string | undefined;
82
82
  workflowId?: string | undefined;
83
83
  sourceFilePath?: string | undefined;
84
84
  lastTaskId?: string | undefined;
@@ -91,7 +91,7 @@ declare const workItemRecordSchema: z.ZodObject<{
91
91
  preSaveSubmitFailures?: number | undefined;
92
92
  postSubmitRemediationSubmitsUsed?: number | undefined;
93
93
  lastRemediation?: {
94
- category: "code_fixable" | "needs_setup" | "blocked";
94
+ category: "blocked" | "code_fixable" | "needs_setup";
95
95
  shouldEdit: boolean;
96
96
  guidance: string;
97
97
  reason?: string | undefined;
@@ -104,11 +104,12 @@ declare const workItemRecordSchema: z.ZodObject<{
104
104
  setupRoutingClaimExpiresAt?: string | undefined;
105
105
  }, {
106
106
  status: "blocked" | "active" | "completed";
107
+ threadId: string;
107
108
  source: "create" | "modify";
108
109
  workItemId: string;
109
- threadId: string;
110
- phase: "blocked" | "building" | "verifying" | "repairing" | "done";
110
+ phase: "building" | "verifying" | "repairing" | "done" | "blocked";
111
111
  rebuildAttempts: number;
112
+ runId?: string | undefined;
112
113
  owner?: {
113
114
  type: "direct";
114
115
  } | {
@@ -116,7 +117,6 @@ declare const workItemRecordSchema: z.ZodObject<{
116
117
  taskId: string;
117
118
  } | undefined;
118
119
  plannedTaskId?: string | undefined;
119
- runId?: string | undefined;
120
120
  workflowId?: string | undefined;
121
121
  sourceFilePath?: string | undefined;
122
122
  lastTaskId?: string | undefined;
@@ -129,7 +129,7 @@ declare const workItemRecordSchema: z.ZodObject<{
129
129
  preSaveSubmitFailures?: number | undefined;
130
130
  postSubmitRemediationSubmitsUsed?: number | undefined;
131
131
  lastRemediation?: {
132
- category: "code_fixable" | "needs_setup" | "blocked";
132
+ category: "blocked" | "code_fixable" | "needs_setup";
133
133
  shouldEdit: boolean;
134
134
  guidance: string;
135
135
  reason?: string | undefined;
@@ -159,34 +159,34 @@ declare const workItemRecordSchema: z.ZodObject<{
159
159
  createdAt: z.ZodString;
160
160
  }, "strip", z.ZodTypeAny, {
161
161
  attempt: number;
162
- action: "build" | "verify" | "rebuild" | "patch";
163
- result: "blocked" | "success" | "failure";
162
+ action: "patch" | "build" | "verify" | "rebuild";
163
+ result: "success" | "blocked" | "failure";
164
164
  workItemId: string;
165
- phase: "blocked" | "building" | "verifying" | "repairing" | "done";
165
+ phase: "building" | "verifying" | "repairing" | "done" | "blocked";
166
166
  createdAt: string;
167
167
  diagnosis?: string | undefined;
168
168
  fixApplied?: string | undefined;
169
+ workflowId?: string | undefined;
169
170
  executionId?: string | undefined;
170
171
  failureSignature?: string | undefined;
171
- workflowId?: string | undefined;
172
172
  workflowInspection?: string | undefined;
173
- remediationCategory?: "code_fixable" | "needs_setup" | "blocked" | undefined;
173
+ remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
174
174
  remediationShouldEdit?: boolean | undefined;
175
175
  remediationGuidance?: string | undefined;
176
176
  }, {
177
177
  attempt: number;
178
- action: "build" | "verify" | "rebuild" | "patch";
179
- result: "blocked" | "success" | "failure";
178
+ action: "patch" | "build" | "verify" | "rebuild";
179
+ result: "success" | "blocked" | "failure";
180
180
  workItemId: string;
181
- phase: "blocked" | "building" | "verifying" | "repairing" | "done";
181
+ phase: "building" | "verifying" | "repairing" | "done" | "blocked";
182
182
  createdAt: string;
183
183
  diagnosis?: string | undefined;
184
184
  fixApplied?: string | undefined;
185
+ workflowId?: string | undefined;
185
186
  executionId?: string | undefined;
186
187
  failureSignature?: string | undefined;
187
- workflowId?: string | undefined;
188
188
  workflowInspection?: string | undefined;
189
- remediationCategory?: "code_fixable" | "needs_setup" | "blocked" | undefined;
189
+ remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
190
190
  remediationShouldEdit?: boolean | undefined;
191
191
  remediationGuidance?: string | undefined;
192
192
  }>, "many">;
@@ -240,17 +240,17 @@ declare const workItemRecordSchema: z.ZodObject<{
240
240
  confidence: z.ZodEnum<["high", "low"]>;
241
241
  source: z.ZodEnum<["deterministic", "llm", "fallback"]>;
242
242
  }, "strip", z.ZodTypeAny, {
243
+ source: "deterministic" | "llm" | "fallback";
243
244
  reason: string;
244
245
  nodeName: string;
245
246
  verdict: "execute" | "simulate";
246
- confidence: "high" | "low";
247
- source: "deterministic" | "llm" | "fallback";
247
+ confidence: "low" | "high";
248
248
  }, {
249
+ source: "deterministic" | "llm" | "fallback";
249
250
  reason: string;
250
251
  nodeName: string;
251
252
  verdict: "execute" | "simulate";
252
- confidence: "high" | "low";
253
- source: "deterministic" | "llm" | "fallback";
253
+ confidence: "low" | "high";
254
254
  }>, "many">>;
255
255
  simulationFixtures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>>;
256
256
  supportingWorkflowIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -273,24 +273,24 @@ declare const workItemRecordSchema: z.ZodObject<{
273
273
  guidance: z.ZodString;
274
274
  }, "strip", z.ZodTypeAny, {
275
275
  status: "needs_setup";
276
- guidance: string;
277
276
  reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
277
+ guidance: string;
278
278
  }, {
279
279
  status: "needs_setup";
280
- guidance: string;
281
280
  reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
281
+ guidance: string;
282
282
  }>, z.ZodObject<{
283
283
  status: z.ZodLiteral<"not_verifiable">;
284
284
  reason: z.ZodEnum<["not-submitted", "missing-workflow-id", "non-mockable-trigger"]>;
285
285
  guidance: z.ZodString;
286
286
  }, "strip", z.ZodTypeAny, {
287
287
  status: "not_verifiable";
288
- guidance: string;
289
288
  reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
289
+ guidance: string;
290
290
  }, {
291
291
  status: "not_verifiable";
292
- guidance: string;
293
292
  reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
293
+ guidance: string;
294
294
  }>]>>;
295
295
  setupRequirement: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
296
296
  status: z.ZodLiteral<"not_required">;
@@ -304,12 +304,12 @@ declare const workItemRecordSchema: z.ZodObject<{
304
304
  guidance: z.ZodString;
305
305
  }, "strip", z.ZodTypeAny, {
306
306
  status: "required";
307
- guidance: string;
308
307
  reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
308
+ guidance: string;
309
309
  }, {
310
310
  status: "required";
311
- guidance: string;
312
311
  reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
312
+ guidance: string;
313
313
  }>]>>;
314
314
  remediation: z.ZodOptional<z.ZodObject<{
315
315
  category: z.ZodEnum<["code_fixable", "needs_setup", "blocked"]>;
@@ -319,14 +319,14 @@ declare const workItemRecordSchema: z.ZodObject<{
319
319
  remainingSubmitFixes: z.ZodOptional<z.ZodNumber>;
320
320
  attemptCount: z.ZodOptional<z.ZodNumber>;
321
321
  }, "strip", z.ZodTypeAny, {
322
- category: "code_fixable" | "needs_setup" | "blocked";
322
+ category: "blocked" | "code_fixable" | "needs_setup";
323
323
  shouldEdit: boolean;
324
324
  guidance: string;
325
325
  reason?: string | undefined;
326
326
  remainingSubmitFixes?: number | undefined;
327
327
  attemptCount?: number | undefined;
328
328
  }, {
329
- category: "code_fixable" | "needs_setup" | "blocked";
329
+ category: "blocked" | "code_fixable" | "needs_setup";
330
330
  shouldEdit: boolean;
331
331
  guidance: string;
332
332
  reason?: string | undefined;
@@ -361,9 +361,9 @@ declare const workItemRecordSchema: z.ZodObject<{
361
361
  }>>;
362
362
  verifiedAt: z.ZodOptional<z.ZodString>;
363
363
  }, "strip", z.ZodTypeAny, {
364
- attempted: boolean;
365
364
  success: boolean;
366
- status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
365
+ attempted: boolean;
366
+ status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
367
367
  executionId?: string | undefined;
368
368
  failureSignature?: string | undefined;
369
369
  evidence?: {
@@ -375,9 +375,9 @@ declare const workItemRecordSchema: z.ZodObject<{
375
375
  } | undefined;
376
376
  verifiedAt?: string | undefined;
377
377
  }, {
378
- attempted: boolean;
379
378
  success: boolean;
380
- status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
379
+ attempted: boolean;
380
+ status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
381
381
  executionId?: string | undefined;
382
382
  failureSignature?: string | undefined;
383
383
  evidence?: {
@@ -397,6 +397,7 @@ declare const workItemRecordSchema: z.ZodObject<{
397
397
  triggerType: "manual_or_testable" | "trigger_only";
398
398
  needsUserInput: boolean;
399
399
  summary: string;
400
+ runId?: string | undefined;
400
401
  owner?: {
401
402
  type: "direct";
402
403
  } | {
@@ -404,12 +405,11 @@ declare const workItemRecordSchema: z.ZodObject<{
404
405
  taskId: string;
405
406
  } | undefined;
406
407
  plannedTaskId?: string | undefined;
407
- failureSignature?: string | undefined;
408
- runId?: string | undefined;
409
408
  workflowId?: string | undefined;
410
409
  sourceFilePath?: string | undefined;
411
410
  mockedCredentialTypes?: string[] | undefined;
412
411
  hasUnresolvedPlaceholders?: boolean | undefined;
412
+ failureSignature?: string | undefined;
413
413
  triggerNodes?: {
414
414
  nodeName: string;
415
415
  nodeType: string;
@@ -420,11 +420,11 @@ declare const workItemRecordSchema: z.ZodObject<{
420
420
  verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
421
421
  usesWorkflowPinDataForVerification?: boolean | undefined;
422
422
  nodeSimulationPlan?: {
423
+ source: "deterministic" | "llm" | "fallback";
423
424
  reason: string;
424
425
  nodeName: string;
425
426
  verdict: "execute" | "simulate";
426
- confidence: "high" | "low";
427
- source: "deterministic" | "llm" | "fallback";
427
+ confidence: "low" | "high";
428
428
  }[] | undefined;
429
429
  simulationFixtures?: Record<string, Record<string, unknown>[]> | undefined;
430
430
  supportingWorkflowIds?: string[] | undefined;
@@ -434,22 +434,22 @@ declare const workItemRecordSchema: z.ZodObject<{
434
434
  status: "already_verified";
435
435
  } | {
436
436
  status: "needs_setup";
437
- guidance: string;
438
437
  reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
438
+ guidance: string;
439
439
  } | {
440
440
  status: "not_verifiable";
441
- guidance: string;
442
441
  reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
442
+ guidance: string;
443
443
  } | undefined;
444
444
  setupRequirement?: {
445
445
  status: "not_required";
446
446
  } | {
447
447
  status: "required";
448
- guidance: string;
449
448
  reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
449
+ guidance: string;
450
450
  } | undefined;
451
451
  remediation?: {
452
- category: "code_fixable" | "needs_setup" | "blocked";
452
+ category: "blocked" | "code_fixable" | "needs_setup";
453
453
  shouldEdit: boolean;
454
454
  guidance: string;
455
455
  reason?: string | undefined;
@@ -458,9 +458,9 @@ declare const workItemRecordSchema: z.ZodObject<{
458
458
  } | undefined;
459
459
  verifyAttempts?: number | undefined;
460
460
  verification?: {
461
- attempted: boolean;
462
461
  success: boolean;
463
- status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
462
+ attempted: boolean;
463
+ status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
464
464
  executionId?: string | undefined;
465
465
  failureSignature?: string | undefined;
466
466
  evidence?: {
@@ -479,6 +479,7 @@ declare const workItemRecordSchema: z.ZodObject<{
479
479
  triggerType: "manual_or_testable" | "trigger_only";
480
480
  needsUserInput: boolean;
481
481
  summary: string;
482
+ runId?: string | undefined;
482
483
  owner?: {
483
484
  type: "direct";
484
485
  } | {
@@ -486,12 +487,11 @@ declare const workItemRecordSchema: z.ZodObject<{
486
487
  taskId: string;
487
488
  } | undefined;
488
489
  plannedTaskId?: string | undefined;
489
- failureSignature?: string | undefined;
490
- runId?: string | undefined;
491
490
  workflowId?: string | undefined;
492
491
  sourceFilePath?: string | undefined;
493
492
  mockedCredentialTypes?: string[] | undefined;
494
493
  hasUnresolvedPlaceholders?: boolean | undefined;
494
+ failureSignature?: string | undefined;
495
495
  triggerNodes?: {
496
496
  nodeName: string;
497
497
  nodeType: string;
@@ -502,11 +502,11 @@ declare const workItemRecordSchema: z.ZodObject<{
502
502
  verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
503
503
  usesWorkflowPinDataForVerification?: boolean | undefined;
504
504
  nodeSimulationPlan?: {
505
+ source: "deterministic" | "llm" | "fallback";
505
506
  reason: string;
506
507
  nodeName: string;
507
508
  verdict: "execute" | "simulate";
508
- confidence: "high" | "low";
509
- source: "deterministic" | "llm" | "fallback";
509
+ confidence: "low" | "high";
510
510
  }[] | undefined;
511
511
  simulationFixtures?: Record<string, Record<string, unknown>[]> | undefined;
512
512
  supportingWorkflowIds?: string[] | undefined;
@@ -516,22 +516,22 @@ declare const workItemRecordSchema: z.ZodObject<{
516
516
  status: "already_verified";
517
517
  } | {
518
518
  status: "needs_setup";
519
- guidance: string;
520
519
  reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
520
+ guidance: string;
521
521
  } | {
522
522
  status: "not_verifiable";
523
- guidance: string;
524
523
  reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
524
+ guidance: string;
525
525
  } | undefined;
526
526
  setupRequirement?: {
527
527
  status: "not_required";
528
528
  } | {
529
529
  status: "required";
530
- guidance: string;
531
530
  reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
531
+ guidance: string;
532
532
  } | undefined;
533
533
  remediation?: {
534
- category: "code_fixable" | "needs_setup" | "blocked";
534
+ category: "blocked" | "code_fixable" | "needs_setup";
535
535
  shouldEdit: boolean;
536
536
  guidance: string;
537
537
  reason?: string | undefined;
@@ -540,9 +540,9 @@ declare const workItemRecordSchema: z.ZodObject<{
540
540
  } | undefined;
541
541
  verifyAttempts?: number | undefined;
542
542
  verification?: {
543
- attempted: boolean;
544
543
  success: boolean;
545
- status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
544
+ attempted: boolean;
545
+ status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
546
546
  executionId?: string | undefined;
547
547
  failureSignature?: string | undefined;
548
548
  evidence?: {
@@ -558,11 +558,12 @@ declare const workItemRecordSchema: z.ZodObject<{
558
558
  }, "strip", z.ZodTypeAny, {
559
559
  state: {
560
560
  status: "blocked" | "active" | "completed";
561
+ threadId: string;
561
562
  source: "create" | "modify";
562
563
  workItemId: string;
563
- threadId: string;
564
- phase: "blocked" | "building" | "verifying" | "repairing" | "done";
564
+ phase: "building" | "verifying" | "repairing" | "done" | "blocked";
565
565
  rebuildAttempts: number;
566
+ runId?: string | undefined;
566
567
  owner?: {
567
568
  type: "direct";
568
569
  } | {
@@ -570,7 +571,6 @@ declare const workItemRecordSchema: z.ZodObject<{
570
571
  taskId: string;
571
572
  } | undefined;
572
573
  plannedTaskId?: string | undefined;
573
- runId?: string | undefined;
574
574
  workflowId?: string | undefined;
575
575
  sourceFilePath?: string | undefined;
576
576
  lastTaskId?: string | undefined;
@@ -583,7 +583,7 @@ declare const workItemRecordSchema: z.ZodObject<{
583
583
  preSaveSubmitFailures?: number | undefined;
584
584
  postSubmitRemediationSubmitsUsed?: number | undefined;
585
585
  lastRemediation?: {
586
- category: "code_fixable" | "needs_setup" | "blocked";
586
+ category: "blocked" | "code_fixable" | "needs_setup";
587
587
  shouldEdit: boolean;
588
588
  guidance: string;
589
589
  reason?: string | undefined;
@@ -597,18 +597,18 @@ declare const workItemRecordSchema: z.ZodObject<{
597
597
  };
598
598
  attempts: {
599
599
  attempt: number;
600
- action: "build" | "verify" | "rebuild" | "patch";
601
- result: "blocked" | "success" | "failure";
600
+ action: "patch" | "build" | "verify" | "rebuild";
601
+ result: "success" | "blocked" | "failure";
602
602
  workItemId: string;
603
- phase: "blocked" | "building" | "verifying" | "repairing" | "done";
603
+ phase: "building" | "verifying" | "repairing" | "done" | "blocked";
604
604
  createdAt: string;
605
605
  diagnosis?: string | undefined;
606
606
  fixApplied?: string | undefined;
607
+ workflowId?: string | undefined;
607
608
  executionId?: string | undefined;
608
609
  failureSignature?: string | undefined;
609
- workflowId?: string | undefined;
610
610
  workflowInspection?: string | undefined;
611
- remediationCategory?: "code_fixable" | "needs_setup" | "blocked" | undefined;
611
+ remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
612
612
  remediationShouldEdit?: boolean | undefined;
613
613
  remediationGuidance?: string | undefined;
614
614
  }[];
@@ -619,6 +619,7 @@ declare const workItemRecordSchema: z.ZodObject<{
619
619
  triggerType: "manual_or_testable" | "trigger_only";
620
620
  needsUserInput: boolean;
621
621
  summary: string;
622
+ runId?: string | undefined;
622
623
  owner?: {
623
624
  type: "direct";
624
625
  } | {
@@ -626,12 +627,11 @@ declare const workItemRecordSchema: z.ZodObject<{
626
627
  taskId: string;
627
628
  } | undefined;
628
629
  plannedTaskId?: string | undefined;
629
- failureSignature?: string | undefined;
630
- runId?: string | undefined;
631
630
  workflowId?: string | undefined;
632
631
  sourceFilePath?: string | undefined;
633
632
  mockedCredentialTypes?: string[] | undefined;
634
633
  hasUnresolvedPlaceholders?: boolean | undefined;
634
+ failureSignature?: string | undefined;
635
635
  triggerNodes?: {
636
636
  nodeName: string;
637
637
  nodeType: string;
@@ -642,11 +642,11 @@ declare const workItemRecordSchema: z.ZodObject<{
642
642
  verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
643
643
  usesWorkflowPinDataForVerification?: boolean | undefined;
644
644
  nodeSimulationPlan?: {
645
+ source: "deterministic" | "llm" | "fallback";
645
646
  reason: string;
646
647
  nodeName: string;
647
648
  verdict: "execute" | "simulate";
648
- confidence: "high" | "low";
649
- source: "deterministic" | "llm" | "fallback";
649
+ confidence: "low" | "high";
650
650
  }[] | undefined;
651
651
  simulationFixtures?: Record<string, Record<string, unknown>[]> | undefined;
652
652
  supportingWorkflowIds?: string[] | undefined;
@@ -656,22 +656,22 @@ declare const workItemRecordSchema: z.ZodObject<{
656
656
  status: "already_verified";
657
657
  } | {
658
658
  status: "needs_setup";
659
- guidance: string;
660
659
  reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
660
+ guidance: string;
661
661
  } | {
662
662
  status: "not_verifiable";
663
- guidance: string;
664
663
  reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
664
+ guidance: string;
665
665
  } | undefined;
666
666
  setupRequirement?: {
667
667
  status: "not_required";
668
668
  } | {
669
669
  status: "required";
670
- guidance: string;
671
670
  reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
671
+ guidance: string;
672
672
  } | undefined;
673
673
  remediation?: {
674
- category: "code_fixable" | "needs_setup" | "blocked";
674
+ category: "blocked" | "code_fixable" | "needs_setup";
675
675
  shouldEdit: boolean;
676
676
  guidance: string;
677
677
  reason?: string | undefined;
@@ -680,9 +680,9 @@ declare const workItemRecordSchema: z.ZodObject<{
680
680
  } | undefined;
681
681
  verifyAttempts?: number | undefined;
682
682
  verification?: {
683
- attempted: boolean;
684
683
  success: boolean;
685
- status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
684
+ attempted: boolean;
685
+ status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
686
686
  executionId?: string | undefined;
687
687
  failureSignature?: string | undefined;
688
688
  evidence?: {
@@ -698,11 +698,12 @@ declare const workItemRecordSchema: z.ZodObject<{
698
698
  }, {
699
699
  state: {
700
700
  status: "blocked" | "active" | "completed";
701
+ threadId: string;
701
702
  source: "create" | "modify";
702
703
  workItemId: string;
703
- threadId: string;
704
- phase: "blocked" | "building" | "verifying" | "repairing" | "done";
704
+ phase: "building" | "verifying" | "repairing" | "done" | "blocked";
705
705
  rebuildAttempts: number;
706
+ runId?: string | undefined;
706
707
  owner?: {
707
708
  type: "direct";
708
709
  } | {
@@ -710,7 +711,6 @@ declare const workItemRecordSchema: z.ZodObject<{
710
711
  taskId: string;
711
712
  } | undefined;
712
713
  plannedTaskId?: string | undefined;
713
- runId?: string | undefined;
714
714
  workflowId?: string | undefined;
715
715
  sourceFilePath?: string | undefined;
716
716
  lastTaskId?: string | undefined;
@@ -723,7 +723,7 @@ declare const workItemRecordSchema: z.ZodObject<{
723
723
  preSaveSubmitFailures?: number | undefined;
724
724
  postSubmitRemediationSubmitsUsed?: number | undefined;
725
725
  lastRemediation?: {
726
- category: "code_fixable" | "needs_setup" | "blocked";
726
+ category: "blocked" | "code_fixable" | "needs_setup";
727
727
  shouldEdit: boolean;
728
728
  guidance: string;
729
729
  reason?: string | undefined;
@@ -737,18 +737,18 @@ declare const workItemRecordSchema: z.ZodObject<{
737
737
  };
738
738
  attempts: {
739
739
  attempt: number;
740
- action: "build" | "verify" | "rebuild" | "patch";
741
- result: "blocked" | "success" | "failure";
740
+ action: "patch" | "build" | "verify" | "rebuild";
741
+ result: "success" | "blocked" | "failure";
742
742
  workItemId: string;
743
- phase: "blocked" | "building" | "verifying" | "repairing" | "done";
743
+ phase: "building" | "verifying" | "repairing" | "done" | "blocked";
744
744
  createdAt: string;
745
745
  diagnosis?: string | undefined;
746
746
  fixApplied?: string | undefined;
747
+ workflowId?: string | undefined;
747
748
  executionId?: string | undefined;
748
749
  failureSignature?: string | undefined;
749
- workflowId?: string | undefined;
750
750
  workflowInspection?: string | undefined;
751
- remediationCategory?: "code_fixable" | "needs_setup" | "blocked" | undefined;
751
+ remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
752
752
  remediationShouldEdit?: boolean | undefined;
753
753
  remediationGuidance?: string | undefined;
754
754
  }[];
@@ -759,6 +759,7 @@ declare const workItemRecordSchema: z.ZodObject<{
759
759
  triggerType: "manual_or_testable" | "trigger_only";
760
760
  needsUserInput: boolean;
761
761
  summary: string;
762
+ runId?: string | undefined;
762
763
  owner?: {
763
764
  type: "direct";
764
765
  } | {
@@ -766,12 +767,11 @@ declare const workItemRecordSchema: z.ZodObject<{
766
767
  taskId: string;
767
768
  } | undefined;
768
769
  plannedTaskId?: string | undefined;
769
- failureSignature?: string | undefined;
770
- runId?: string | undefined;
771
770
  workflowId?: string | undefined;
772
771
  sourceFilePath?: string | undefined;
773
772
  mockedCredentialTypes?: string[] | undefined;
774
773
  hasUnresolvedPlaceholders?: boolean | undefined;
774
+ failureSignature?: string | undefined;
775
775
  triggerNodes?: {
776
776
  nodeName: string;
777
777
  nodeType: string;
@@ -782,11 +782,11 @@ declare const workItemRecordSchema: z.ZodObject<{
782
782
  verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
783
783
  usesWorkflowPinDataForVerification?: boolean | undefined;
784
784
  nodeSimulationPlan?: {
785
+ source: "deterministic" | "llm" | "fallback";
785
786
  reason: string;
786
787
  nodeName: string;
787
788
  verdict: "execute" | "simulate";
788
- confidence: "high" | "low";
789
- source: "deterministic" | "llm" | "fallback";
789
+ confidence: "low" | "high";
790
790
  }[] | undefined;
791
791
  simulationFixtures?: Record<string, Record<string, unknown>[]> | undefined;
792
792
  supportingWorkflowIds?: string[] | undefined;
@@ -796,22 +796,22 @@ declare const workItemRecordSchema: z.ZodObject<{
796
796
  status: "already_verified";
797
797
  } | {
798
798
  status: "needs_setup";
799
- guidance: string;
800
799
  reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
800
+ guidance: string;
801
801
  } | {
802
802
  status: "not_verifiable";
803
- guidance: string;
804
803
  reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
804
+ guidance: string;
805
805
  } | undefined;
806
806
  setupRequirement?: {
807
807
  status: "not_required";
808
808
  } | {
809
809
  status: "required";
810
- guidance: string;
811
810
  reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
811
+ guidance: string;
812
812
  } | undefined;
813
813
  remediation?: {
814
- category: "code_fixable" | "needs_setup" | "blocked";
814
+ category: "blocked" | "code_fixable" | "needs_setup";
815
815
  shouldEdit: boolean;
816
816
  guidance: string;
817
817
  reason?: string | undefined;
@@ -820,9 +820,9 @@ declare const workItemRecordSchema: z.ZodObject<{
820
820
  } | undefined;
821
821
  verifyAttempts?: number | undefined;
822
822
  verification?: {
823
- attempted: boolean;
824
823
  success: boolean;
825
- status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
824
+ attempted: boolean;
825
+ status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
826
826
  executionId?: string | undefined;
827
827
  failureSignature?: string | undefined;
828
828
  evidence?: {