@n8n/instance-ai 1.15.2 → 1.16.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 (283) hide show
  1. package/README.md +1 -1
  2. package/dist/agent/apply-agent-thinking.js.map +1 -1
  3. package/dist/agent/computer-use-prompt.js.map +1 -1
  4. package/dist/agent/instance-agent.js.map +1 -1
  5. package/dist/agent/mcp-tool-name-validation.js.map +1 -1
  6. package/dist/agent/runtime-workspace.js.map +1 -1
  7. package/dist/agent/sanitize-mcp-schemas.js.map +1 -1
  8. package/dist/agent/shared-prompts.js +5 -3
  9. package/dist/agent/shared-prompts.js.map +1 -1
  10. package/dist/agent/sub-agent-briefing.js.map +1 -1
  11. package/dist/agent/sub-agent-debriefing.d.ts +14 -14
  12. package/dist/agent/sub-agent-debriefing.js.map +1 -1
  13. package/dist/agent/sub-agent-factory.js.map +1 -1
  14. package/dist/agent/system-prompt.js +29 -18
  15. package/dist/agent/system-prompt.js.map +1 -1
  16. package/dist/build.tsbuildinfo +1 -1
  17. package/dist/constants/max-steps.d.ts +0 -1
  18. package/dist/constants/max-steps.js +0 -1
  19. package/dist/constants/max-steps.js.map +1 -1
  20. package/dist/debug/run-debug-buffer.js.map +1 -1
  21. package/dist/debug/sanitize-debug-snapshot.js.map +1 -1
  22. package/dist/domain-access/domain-access-tracker.js.map +1 -1
  23. package/dist/domain-access/domain-gating.d.ts +6 -6
  24. package/dist/domain-access/domain-gating.js.map +1 -1
  25. package/dist/error-formatting.js.map +1 -1
  26. package/dist/errors/workflow-save-conflict.error.d.ts +4 -0
  27. package/dist/errors/workflow-save-conflict.error.js +13 -0
  28. package/dist/errors/workflow-save-conflict.error.js.map +1 -0
  29. package/dist/event-bus/event-bus.interface.d.ts +1 -1
  30. package/dist/index.d.ts +3 -4
  31. package/dist/index.js +8 -4
  32. package/dist/index.js.map +1 -1
  33. package/dist/knowledge-base/build-templates-index.js.map +1 -1
  34. package/dist/knowledge-base/extract-builder-templates-archive.js.map +1 -1
  35. package/dist/knowledge-base/materialize-knowledge-base.js.map +1 -1
  36. package/dist/mcp/mcp-client-manager.js.map +1 -1
  37. package/dist/memory/title-utils.js.map +1 -1
  38. package/dist/parsers/docx-parser.js +1 -34
  39. package/dist/parsers/docx-parser.js.map +1 -1
  40. package/dist/parsers/html-parser.js +2 -35
  41. package/dist/parsers/html-parser.js.map +1 -1
  42. package/dist/parsers/ooxml-guard.js.map +1 -1
  43. package/dist/parsers/pdf-parser.js +2 -35
  44. package/dist/parsers/pdf-parser.js.map +1 -1
  45. package/dist/parsers/structured-file-parser.js.map +1 -1
  46. package/dist/parsers/validate-attachments.js.map +1 -1
  47. package/dist/parsers/xlsx-parser.js +1 -34
  48. package/dist/parsers/xlsx-parser.js.map +1 -1
  49. package/dist/planned-tasks/planned-task-permissions.d.ts +2 -2
  50. package/dist/planned-tasks/planned-task-permissions.js.map +1 -1
  51. package/dist/planned-tasks/planned-task-service.js +0 -3
  52. package/dist/planned-tasks/planned-task-service.js.map +1 -1
  53. package/dist/runtime/background-task-manager.js.map +1 -1
  54. package/dist/runtime/liveness-policy.js.map +1 -1
  55. package/dist/runtime/memory-task-registry.js.map +1 -1
  56. package/dist/runtime/orchestrator-identity.js.map +1 -1
  57. package/dist/runtime/orchestrator-run-control.js.map +1 -1
  58. package/dist/runtime/resumable-stream-executor.js +12 -1
  59. package/dist/runtime/resumable-stream-executor.js.map +1 -1
  60. package/dist/runtime/run-state-registry.js.map +1 -1
  61. package/dist/runtime/stream-runner.js.map +1 -1
  62. package/dist/runtime/terminal-response-guard.js.map +1 -1
  63. package/dist/skills/materialize-runtime-skills.js.map +1 -1
  64. package/dist/skills/runtime-skills.js +5 -1
  65. package/dist/skills/runtime-skills.js.map +1 -1
  66. package/dist/source-map-filter.d.ts +1 -17
  67. package/dist/source-map-filter.js +1 -0
  68. package/dist/source-map-filter.js.map +1 -1
  69. package/dist/storage/iteration-log.js.map +1 -1
  70. package/dist/storage/planned-task-storage.js.map +1 -1
  71. package/dist/storage/terminal-outcome-storage.d.ts +10 -10
  72. package/dist/storage/terminal-outcome-storage.js.map +1 -1
  73. package/dist/storage/thread-iteration-log-storage.js.map +1 -1
  74. package/dist/storage/thread-patch.js.map +1 -1
  75. package/dist/storage/thread-task-storage.js.map +1 -1
  76. package/dist/storage/workflow-loop-storage.d.ts +246 -136
  77. package/dist/storage/workflow-loop-storage.js.map +1 -1
  78. package/dist/stream/consume-with-hitl.js.map +1 -1
  79. package/dist/stream/map-chunk.js +2 -0
  80. package/dist/stream/map-chunk.js.map +1 -1
  81. package/dist/stream/output-redaction.js.map +1 -1
  82. package/dist/stream/usage-accumulator.d.ts +12 -12
  83. package/dist/stream/usage-accumulator.js.map +1 -1
  84. package/dist/stream/work-summary-accumulator.d.ts +6 -6
  85. package/dist/stream/work-summary-accumulator.js.map +1 -1
  86. package/dist/tool-registry.js.map +1 -1
  87. package/dist/tools/attachments/parse-file.tool.d.ts +32 -32
  88. package/dist/tools/attachments/parse-file.tool.js.map +1 -1
  89. package/dist/tools/credentials.tool.d.ts +10 -7
  90. package/dist/tools/credentials.tool.js +41 -5
  91. package/dist/tools/credentials.tool.js.map +1 -1
  92. package/dist/tools/data-tables.tool.js.map +1 -1
  93. package/dist/tools/evals/analyze-agent-input-columns.service.js.map +1 -1
  94. package/dist/tools/evals/apply-pin-data.service.js.map +1 -1
  95. package/dist/tools/evals/column-ref-utils.js.map +1 -1
  96. package/dist/tools/evals/describe-metric-for-workflow.service.js.map +1 -1
  97. package/dist/tools/evals/detect-agent-named-refs.service.js.map +1 -1
  98. package/dist/tools/evals/detect-ai-nodes.js.map +1 -1
  99. package/dist/tools/evals/detect-tool-refs.service.js.map +1 -1
  100. package/dist/tools/evals/ensure-eval-data-table.service.js.map +1 -1
  101. package/dist/tools/evals/eval-config.tool.d.ts +4 -0
  102. package/dist/tools/evals/eval-config.tool.js +205 -0
  103. package/dist/tools/evals/eval-config.tool.js.map +1 -0
  104. package/dist/tools/evals/eval-data-requirements.service.js.map +1 -1
  105. package/dist/tools/evals/evals.tool.js +6 -1
  106. package/dist/tools/evals/evals.tool.js.map +1 -1
  107. package/dist/tools/evals/extract-rows-from-history.service.js.map +1 -1
  108. package/dist/tools/evals/format-eval-setup-task.js.map +1 -1
  109. package/dist/tools/evals/generate-sample-rows.service.js.map +1 -1
  110. package/dist/tools/evals/generate-tool-ref-pin-data.service.js.map +1 -1
  111. package/dist/tools/evals/metric-catalog.d.ts +1 -1
  112. package/dist/tools/evals/metric-catalog.js.map +1 -1
  113. package/dist/tools/executions.tool.js.map +1 -1
  114. package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
  115. package/dist/tools/index.js +13 -2
  116. package/dist/tools/index.js.map +1 -1
  117. package/dist/tools/n8n-docs/ranking.js.map +1 -1
  118. package/dist/tools/n8n-docs/registry.js.map +1 -1
  119. package/dist/tools/n8n-docs/schemas.d.ts +44 -44
  120. package/dist/tools/n8n-docs/schemas.js.map +1 -1
  121. package/dist/tools/n8n-docs.tool.js +1 -1
  122. package/dist/tools/n8n-docs.tool.js.map +1 -1
  123. package/dist/tools/nodes/node-search-engine.js.map +1 -1
  124. package/dist/tools/nodes/node-search-engine.types.d.ts +1 -1
  125. package/dist/tools/nodes/preferred-chat-model.js.map +1 -1
  126. package/dist/tools/nodes.tool.d.ts +21 -0
  127. package/dist/tools/nodes.tool.js +21 -13
  128. package/dist/tools/nodes.tool.js.map +1 -1
  129. package/dist/tools/orchestration/agent-persistence.js.map +1 -1
  130. package/dist/tools/orchestration/agent-target-binding.d.ts +19 -0
  131. package/dist/tools/orchestration/agent-target-binding.js +45 -0
  132. package/dist/tools/orchestration/agent-target-binding.js.map +1 -0
  133. package/dist/tools/orchestration/build-agent.tool.d.ts +2 -0
  134. package/dist/tools/orchestration/build-agent.tool.js +194 -0
  135. package/dist/tools/orchestration/build-agent.tool.js.map +1 -0
  136. package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -1
  137. package/dist/tools/orchestration/display-utils.js.map +1 -1
  138. package/dist/tools/orchestration/eval-data-agent.tool.js.map +1 -1
  139. package/dist/tools/orchestration/eval-setup-agent.tool.js.map +1 -1
  140. package/dist/tools/orchestration/plan.tool.d.ts +2 -2
  141. package/dist/tools/orchestration/plan.tool.js +10 -7
  142. package/dist/tools/orchestration/plan.tool.js.map +1 -1
  143. package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +12 -12
  144. package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
  145. package/dist/tools/orchestration/tracing-utils.js.map +1 -1
  146. package/dist/tools/orchestration/verification/analyze-result.d.ts +4 -0
  147. package/dist/tools/orchestration/verification/analyze-result.js +17 -3
  148. package/dist/tools/orchestration/verification/analyze-result.js.map +1 -1
  149. package/dist/tools/orchestration/verification/finalize-result.js +4 -2
  150. package/dist/tools/orchestration/verification/finalize-result.js.map +1 -1
  151. package/dist/tools/orchestration/verification/prepare-run.js.map +1 -1
  152. package/dist/tools/orchestration/verification/reconcile-plan.d.ts +10 -0
  153. package/dist/tools/orchestration/verification/reconcile-plan.js +33 -0
  154. package/dist/tools/orchestration/verification/reconcile-plan.js.map +1 -0
  155. package/dist/tools/orchestration/verification/resolve-target.js.map +1 -1
  156. package/dist/tools/orchestration/verification/types.d.ts +2 -1
  157. package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +6 -6
  158. package/dist/tools/orchestration/verify-built-workflow.tool.js +13 -2
  159. package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
  160. package/dist/tools/research.tool.js +1 -34
  161. package/dist/tools/research.tool.js.map +1 -1
  162. package/dist/tools/shared/ask-user.tool.d.ts +4 -4
  163. package/dist/tools/shared/ask-user.tool.js.map +1 -1
  164. package/dist/tools/task-control.tool.js.map +1 -1
  165. package/dist/tools/templates.tool.d.ts +2 -0
  166. package/dist/tools/templates.tool.js +20 -0
  167. package/dist/tools/templates.tool.js.map +1 -0
  168. package/dist/tools/tool-ids.d.ts +25 -22
  169. package/dist/tools/tool-ids.js +6 -6
  170. package/dist/tools/tool-ids.js.map +1 -1
  171. package/dist/tools/web-research/sanitize-web-content.js.map +1 -1
  172. package/dist/tools/workflows/apply-workflow-credentials.tool.js +24 -7
  173. package/dist/tools/workflows/apply-workflow-credentials.tool.js.map +1 -1
  174. package/dist/tools/workflows/build-workflow.tool.d.ts +6 -6
  175. package/dist/tools/workflows/build-workflow.tool.js +63 -7
  176. package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
  177. package/dist/tools/workflows/classify-node-destructiveness.service.js.map +1 -1
  178. package/dist/tools/workflows/credential-url-resolver.js.map +1 -1
  179. package/dist/tools/workflows/credential-utils.d.ts +4 -4
  180. package/dist/tools/workflows/credential-utils.js +2 -1
  181. package/dist/tools/workflows/credential-utils.js.map +1 -1
  182. package/dist/tools/workflows/detect-array-input-collapse.js.map +1 -1
  183. package/dist/tools/workflows/detect-wrong-kind-locator.js.map +1 -1
  184. package/dist/tools/workflows/generate-simulation-fixtures.service.js.map +1 -1
  185. package/dist/tools/workflows/materialize-node-type.tool.d.ts +4 -4
  186. package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
  187. package/dist/tools/workflows/plan-verification-simulation.js.map +1 -1
  188. package/dist/tools/workflows/reconcile-simulation-plan.d.ts +9 -0
  189. package/dist/tools/workflows/reconcile-simulation-plan.js +70 -0
  190. package/dist/tools/workflows/reconcile-simulation-plan.js.map +1 -0
  191. package/dist/tools/workflows/resolve-credentials.d.ts +4 -0
  192. package/dist/tools/workflows/resolve-credentials.js +86 -4
  193. package/dist/tools/workflows/resolve-credentials.js.map +1 -1
  194. package/dist/tools/workflows/resolved-credential.schema.d.ts +30 -0
  195. package/dist/tools/workflows/resolved-credential.schema.js +18 -0
  196. package/dist/tools/workflows/resolved-credential.schema.js.map +1 -0
  197. package/dist/tools/workflows/setup-workflow.schema.d.ts +46 -46
  198. package/dist/tools/workflows/setup-workflow.service.js +109 -19
  199. package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
  200. package/dist/tools/workflows/summarize-workflow.js +1 -34
  201. package/dist/tools/workflows/summarize-workflow.js.map +1 -1
  202. package/dist/tools/workflows/validate-workflow.service.js +79 -4
  203. package/dist/tools/workflows/validate-workflow.service.js.map +1 -1
  204. package/dist/tools/workflows/workflow-build-context.js.map +1 -1
  205. package/dist/tools/workflows/workflow-build-remediation.d.ts +1 -0
  206. package/dist/tools/workflows/workflow-build-remediation.js +11 -0
  207. package/dist/tools/workflows/workflow-build-remediation.js.map +1 -1
  208. package/dist/tools/workflows/workflow-build-reporting.js.map +1 -1
  209. package/dist/tools/workflows/workflow-build-routing.js.map +1 -1
  210. package/dist/tools/workflows/workflow-build-telemetry.d.ts +1 -1
  211. package/dist/tools/workflows/workflow-build-telemetry.js.map +1 -1
  212. package/dist/tools/workflows/workflow-file-bindings.d.ts +9 -0
  213. package/dist/tools/workflows/workflow-file-bindings.js +50 -0
  214. package/dist/tools/workflows/workflow-file-bindings.js.map +1 -1
  215. package/dist/tools/workflows/workflow-json-utils.js.map +1 -1
  216. package/dist/tools/workflows/workflow-source-compiler.js.map +1 -1
  217. package/dist/tools/workflows/workflow-validation-warnings.js.map +1 -1
  218. package/dist/tools/workflows/write-sandbox-file.tool.d.ts +2 -2
  219. package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
  220. package/dist/tools/workflows.tool.js +14 -34
  221. package/dist/tools/workflows.tool.js.map +1 -1
  222. package/dist/tools/workspace.tool.js.map +1 -1
  223. package/dist/tracing/langsmith-tracing.js.map +1 -1
  224. package/dist/tracing/trace-labels.js.map +1 -1
  225. package/dist/tracing/trace-payloads.js.map +1 -1
  226. package/dist/tracing/trace-replay.js.map +1 -1
  227. package/dist/types.d.ts +104 -7
  228. package/dist/types.js +7 -3
  229. package/dist/types.js.map +1 -1
  230. package/dist/utils/agent-feature-enabled.d.ts +1 -0
  231. package/dist/utils/agent-feature-enabled.js +12 -0
  232. package/dist/utils/agent-feature-enabled.js.map +1 -0
  233. package/dist/utils/agent-tree.js.map +1 -1
  234. package/dist/utils/eval-agents.d.ts +1 -1
  235. package/dist/utils/eval-agents.js.map +1 -1
  236. package/dist/utils/format-timestamp.js.map +1 -1
  237. package/dist/utils/generate-validated-json.js.map +1 -1
  238. package/dist/utils/stream-helpers.js.map +1 -1
  239. package/dist/workflow-builder/build-failure-tracker.js.map +1 -1
  240. package/dist/workflow-loop/guidance.js.map +1 -1
  241. package/dist/workflow-loop/remediation.js.map +1 -1
  242. package/dist/workflow-loop/runtime.js.map +1 -1
  243. package/dist/workflow-loop/setup-verification-policy.js.map +1 -1
  244. package/dist/workflow-loop/verification-obligation.js.map +1 -1
  245. package/dist/workflow-loop/workflow-loop-controller.js.map +1 -1
  246. package/dist/workflow-loop/workflow-loop-state.d.ts +319 -167
  247. package/dist/workflow-loop/workflow-loop-state.js +8 -1
  248. package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
  249. package/dist/workflow-loop/workflow-task-service.js.map +1 -1
  250. package/dist/workspace/builder-templates-service.js.map +1 -1
  251. package/dist/workspace/compute-workspace-content-hash.js.map +1 -1
  252. package/dist/workspace/create-workspace.js.map +1 -1
  253. package/dist/workspace/lazy-runtime-workspace.d.ts +1 -0
  254. package/dist/workspace/lazy-runtime-workspace.js +12 -1
  255. package/dist/workspace/lazy-runtime-workspace.js.map +1 -1
  256. package/dist/workspace/pack-workspace-sdk.js.map +1 -1
  257. package/dist/workspace/prebaked-workspace-bundle.js.map +1 -1
  258. package/dist/workspace/sandbox-fs.js.map +1 -1
  259. package/dist/workspace/sandbox-setup.js.map +1 -1
  260. package/dist/workspace/scoped-workspace.js.map +1 -1
  261. package/dist/workspace/snapshot-image-context.js.map +1 -1
  262. package/dist/workspace/snapshot-manager.js.map +1 -1
  263. package/dist/workspace/template-telemetry.js.map +1 -1
  264. package/dist/workspace/workspace-file-content.js.map +1 -1
  265. package/dist/workspace/workspace-files.js.map +1 -1
  266. package/dist/workspace/workspace-manifest.js.map +1 -1
  267. package/dist/workspace/workspace-paths.js.map +1 -1
  268. package/package.json +13 -10
  269. package/skills/credential-setup-with-computer-use/SKILL.md +3 -2
  270. package/skills/data-table-manager/SKILL.md +3 -3
  271. package/skills/intent-recognition/SKILL.md +269 -0
  272. package/skills/n8n-docs-assistant/SKILL.md +6 -3
  273. package/skills/planned-task-runtime/SKILL.md +12 -14
  274. package/skills/planning/SKILL.md +12 -11
  275. package/skills/post-build-flow/SKILL.md +9 -0
  276. package/skills/workflow-builder/SKILL.md +55 -3
  277. package/skills/workflow-builder/references/compositional-workflows.md +1 -2
  278. package/dist/tools/orchestration/delegate.schemas.d.ts +0 -44
  279. package/dist/tools/orchestration/delegate.schemas.js +0 -46
  280. package/dist/tools/orchestration/delegate.schemas.js.map +0 -1
  281. package/dist/tools/orchestration/delegate.tool.d.ts +0 -18
  282. package/dist/tools/orchestration/delegate.tool.js +0 -334
  283. package/dist/tools/orchestration/delegate.tool.js.map +0 -1
@@ -65,13 +65,14 @@ declare const workItemRecordSchema: z.ZodObject<{
65
65
  setupRoutingClaimedAt: z.ZodOptional<z.ZodString>;
66
66
  setupRoutingClaimExpiresAt: z.ZodOptional<z.ZodString>;
67
67
  }, "strip", z.ZodTypeAny, {
68
- status: "blocked" | "active" | "completed";
69
- threadId: string;
70
- source: "create" | "modify";
71
68
  workItemId: string;
72
- phase: "building" | "verifying" | "repairing" | "done" | "blocked";
73
- rebuildAttempts: number;
69
+ threadId: string;
74
70
  runId?: string | undefined;
71
+ workflowId?: string | undefined;
72
+ sourceFilePath?: string | undefined;
73
+ phase: "blocked" | "building" | "done" | "repairing" | "verifying";
74
+ status: "active" | "blocked" | "completed";
75
+ source: "create" | "modify";
75
76
  owner?: {
76
77
  type: "direct";
77
78
  } | {
@@ -79,12 +80,11 @@ declare const workItemRecordSchema: z.ZodObject<{
79
80
  taskId: string;
80
81
  } | undefined;
81
82
  plannedTaskId?: string | undefined;
82
- workflowId?: string | undefined;
83
- sourceFilePath?: string | undefined;
84
83
  lastTaskId?: string | undefined;
85
84
  lastExecutionId?: string | undefined;
86
85
  lastFailureSignature?: string | undefined;
87
86
  lastWorkflowInspection?: string | undefined;
87
+ rebuildAttempts: number;
88
88
  mockedCredentialTypes?: string[] | undefined;
89
89
  hasUnresolvedPlaceholders?: boolean | undefined;
90
90
  successfulSubmitSeen?: boolean | undefined;
@@ -103,13 +103,14 @@ declare const workItemRecordSchema: z.ZodObject<{
103
103
  setupRoutingClaimedAt?: string | undefined;
104
104
  setupRoutingClaimExpiresAt?: string | undefined;
105
105
  }, {
106
- status: "blocked" | "active" | "completed";
107
- threadId: string;
108
- source: "create" | "modify";
109
106
  workItemId: string;
110
- phase: "building" | "verifying" | "repairing" | "done" | "blocked";
111
- rebuildAttempts: number;
107
+ threadId: string;
112
108
  runId?: string | undefined;
109
+ workflowId?: string | undefined;
110
+ sourceFilePath?: string | undefined;
111
+ phase: "blocked" | "building" | "done" | "repairing" | "verifying";
112
+ status: "active" | "blocked" | "completed";
113
+ source: "create" | "modify";
113
114
  owner?: {
114
115
  type: "direct";
115
116
  } | {
@@ -117,12 +118,11 @@ declare const workItemRecordSchema: z.ZodObject<{
117
118
  taskId: string;
118
119
  } | undefined;
119
120
  plannedTaskId?: string | undefined;
120
- workflowId?: string | undefined;
121
- sourceFilePath?: string | undefined;
122
121
  lastTaskId?: string | undefined;
123
122
  lastExecutionId?: string | undefined;
124
123
  lastFailureSignature?: string | undefined;
125
124
  lastWorkflowInspection?: string | undefined;
125
+ rebuildAttempts: number;
126
126
  mockedCredentialTypes?: string[] | undefined;
127
127
  hasUnresolvedPlaceholders?: boolean | undefined;
128
128
  successfulSubmitSeen?: boolean | undefined;
@@ -158,37 +158,37 @@ declare const workItemRecordSchema: z.ZodObject<{
158
158
  remediationGuidance: z.ZodOptional<z.ZodString>;
159
159
  createdAt: z.ZodString;
160
160
  }, "strip", z.ZodTypeAny, {
161
- attempt: number;
162
- action: "patch" | "build" | "verify" | "rebuild";
163
- result: "success" | "blocked" | "failure";
164
161
  workItemId: string;
165
- phase: "building" | "verifying" | "repairing" | "done" | "blocked";
166
- createdAt: string;
167
- diagnosis?: string | undefined;
168
- fixApplied?: string | undefined;
162
+ phase: "blocked" | "building" | "done" | "repairing" | "verifying";
163
+ attempt: number;
164
+ action: "build" | "patch" | "rebuild" | "verify";
165
+ result: "blocked" | "failure" | "success";
169
166
  workflowId?: string | undefined;
170
167
  executionId?: string | undefined;
171
168
  failureSignature?: string | undefined;
172
169
  workflowInspection?: string | undefined;
170
+ diagnosis?: string | undefined;
171
+ fixApplied?: string | undefined;
173
172
  remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
174
173
  remediationShouldEdit?: boolean | undefined;
175
174
  remediationGuidance?: string | undefined;
175
+ createdAt: string;
176
176
  }, {
177
- attempt: number;
178
- action: "patch" | "build" | "verify" | "rebuild";
179
- result: "success" | "blocked" | "failure";
180
177
  workItemId: string;
181
- phase: "building" | "verifying" | "repairing" | "done" | "blocked";
182
- createdAt: string;
183
- diagnosis?: string | undefined;
184
- fixApplied?: string | undefined;
178
+ phase: "blocked" | "building" | "done" | "repairing" | "verifying";
179
+ attempt: number;
180
+ action: "build" | "patch" | "rebuild" | "verify";
181
+ result: "blocked" | "failure" | "success";
185
182
  workflowId?: string | undefined;
186
183
  executionId?: string | undefined;
187
184
  failureSignature?: string | undefined;
188
185
  workflowInspection?: string | undefined;
186
+ diagnosis?: string | undefined;
187
+ fixApplied?: string | undefined;
189
188
  remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
190
189
  remediationShouldEdit?: boolean | undefined;
191
190
  remediationGuidance?: string | undefined;
191
+ createdAt: string;
192
192
  }>, "many">;
193
193
  lastBuildOutcome: z.ZodOptional<z.ZodObject<{
194
194
  workItemId: z.ZodString;
@@ -231,6 +231,34 @@ declare const workItemRecordSchema: z.ZodObject<{
231
231
  mockedNodeNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
232
232
  mockedCredentialTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
233
233
  mockedCredentialsByNode: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
234
+ resolvedCredentialsByNode: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
235
+ type: z.ZodString;
236
+ id: z.ZodString;
237
+ name: z.ZodString;
238
+ }, "strip", z.ZodTypeAny, {
239
+ type: string;
240
+ id: string;
241
+ name: string;
242
+ }, {
243
+ type: string;
244
+ id: string;
245
+ name: string;
246
+ }>, z.ZodObject<{
247
+ type: z.ZodString;
248
+ id: z.ZodNull;
249
+ name: z.ZodString;
250
+ __aiGatewayManaged: z.ZodLiteral<true>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ type: string;
253
+ id: null;
254
+ name: string;
255
+ __aiGatewayManaged: true;
256
+ }, {
257
+ type: string;
258
+ id: null;
259
+ name: string;
260
+ __aiGatewayManaged: true;
261
+ }>]>, "many">>>;
234
262
  verificationPinData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>>;
235
263
  usesWorkflowPinDataForVerification: z.ZodOptional<z.ZodBoolean>;
236
264
  nodeSimulationPlan: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -240,17 +268,17 @@ declare const workItemRecordSchema: z.ZodObject<{
240
268
  confidence: z.ZodEnum<["high", "low"]>;
241
269
  source: z.ZodEnum<["deterministic", "llm", "fallback"]>;
242
270
  }, "strip", z.ZodTypeAny, {
243
- source: "deterministic" | "llm" | "fallback";
244
- reason: string;
245
271
  nodeName: string;
246
272
  verdict: "execute" | "simulate";
247
- confidence: "low" | "high";
248
- }, {
249
- source: "deterministic" | "llm" | "fallback";
250
273
  reason: string;
274
+ confidence: "high" | "low";
275
+ source: "deterministic" | "fallback" | "llm";
276
+ }, {
251
277
  nodeName: string;
252
278
  verdict: "execute" | "simulate";
253
- confidence: "low" | "high";
279
+ reason: string;
280
+ confidence: "high" | "low";
281
+ source: "deterministic" | "fallback" | "llm";
254
282
  }>, "many">>;
255
283
  simulationFixtures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>>;
256
284
  supportingWorkflowIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -273,11 +301,11 @@ declare const workItemRecordSchema: z.ZodObject<{
273
301
  guidance: z.ZodString;
274
302
  }, "strip", z.ZodTypeAny, {
275
303
  status: "needs_setup";
276
- reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
304
+ reason: "missing-mocked-credential-pin-data" | "unresolved-placeholders" | "workflow-needs-setup";
277
305
  guidance: string;
278
306
  }, {
279
307
  status: "needs_setup";
280
- reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
308
+ reason: "missing-mocked-credential-pin-data" | "unresolved-placeholders" | "workflow-needs-setup";
281
309
  guidance: string;
282
310
  }>, z.ZodObject<{
283
311
  status: z.ZodLiteral<"not_verifiable">;
@@ -285,11 +313,11 @@ declare const workItemRecordSchema: z.ZodObject<{
285
313
  guidance: z.ZodString;
286
314
  }, "strip", z.ZodTypeAny, {
287
315
  status: "not_verifiable";
288
- reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
316
+ reason: "missing-workflow-id" | "non-mockable-trigger" | "not-submitted";
289
317
  guidance: string;
290
318
  }, {
291
319
  status: "not_verifiable";
292
- reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
320
+ reason: "missing-workflow-id" | "non-mockable-trigger" | "not-submitted";
293
321
  guidance: string;
294
322
  }>]>>;
295
323
  setupRequirement: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
@@ -304,11 +332,11 @@ declare const workItemRecordSchema: z.ZodObject<{
304
332
  guidance: z.ZodString;
305
333
  }, "strip", z.ZodTypeAny, {
306
334
  status: "required";
307
- reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
335
+ reason: "mocked-credentials" | "unresolved-placeholders" | "workflow-needs-setup";
308
336
  guidance: string;
309
337
  }, {
310
338
  status: "required";
311
- reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
339
+ reason: "mocked-credentials" | "unresolved-placeholders" | "workflow-needs-setup";
312
340
  guidance: string;
313
341
  }>]>>;
314
342
  remediation: z.ZodOptional<z.ZodObject<{
@@ -346,25 +374,43 @@ declare const workItemRecordSchema: z.ZodObject<{
346
374
  producedOutputRows: z.ZodOptional<z.ZodNumber>;
347
375
  errorNodeName: z.ZodOptional<z.ZodString>;
348
376
  errorMessage: z.ZodOptional<z.ZodString>;
377
+ nodeErrors: z.ZodOptional<z.ZodArray<z.ZodObject<{
378
+ nodeName: z.ZodString;
379
+ message: z.ZodOptional<z.ZodString>;
380
+ }, "strip", z.ZodTypeAny, {
381
+ nodeName: string;
382
+ message?: string | undefined;
383
+ }, {
384
+ nodeName: string;
385
+ message?: string | undefined;
386
+ }>, "many">>;
349
387
  }, "strip", z.ZodTypeAny, {
350
388
  nodesExecuted?: string[] | undefined;
351
389
  nodesNotReached?: string[] | undefined;
352
390
  producedOutputRows?: number | undefined;
353
391
  errorNodeName?: string | undefined;
354
392
  errorMessage?: string | undefined;
393
+ nodeErrors?: {
394
+ nodeName: string;
395
+ message?: string | undefined;
396
+ }[] | undefined;
355
397
  }, {
356
398
  nodesExecuted?: string[] | undefined;
357
399
  nodesNotReached?: string[] | undefined;
358
400
  producedOutputRows?: number | undefined;
359
401
  errorNodeName?: string | undefined;
360
402
  errorMessage?: string | undefined;
403
+ nodeErrors?: {
404
+ nodeName: string;
405
+ message?: string | undefined;
406
+ }[] | undefined;
361
407
  }>>;
362
408
  verifiedAt: z.ZodOptional<z.ZodString>;
363
409
  }, "strip", z.ZodTypeAny, {
364
- success: boolean;
365
410
  attempted: boolean;
366
- status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
411
+ success: boolean;
367
412
  executionId?: string | undefined;
413
+ status?: "error" | "running" | "success" | "unknown" | "waiting" | undefined;
368
414
  failureSignature?: string | undefined;
369
415
  evidence?: {
370
416
  nodesExecuted?: string[] | undefined;
@@ -372,13 +418,17 @@ declare const workItemRecordSchema: z.ZodObject<{
372
418
  producedOutputRows?: number | undefined;
373
419
  errorNodeName?: string | undefined;
374
420
  errorMessage?: string | undefined;
421
+ nodeErrors?: {
422
+ nodeName: string;
423
+ message?: string | undefined;
424
+ }[] | undefined;
375
425
  } | undefined;
376
426
  verifiedAt?: string | undefined;
377
427
  }, {
378
- success: boolean;
379
428
  attempted: boolean;
380
- status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
429
+ success: boolean;
381
430
  executionId?: string | undefined;
431
+ status?: "error" | "running" | "success" | "unknown" | "waiting" | undefined;
382
432
  failureSignature?: string | undefined;
383
433
  evidence?: {
384
434
  nodesExecuted?: string[] | undefined;
@@ -386,18 +436,18 @@ declare const workItemRecordSchema: z.ZodObject<{
386
436
  producedOutputRows?: number | undefined;
387
437
  errorNodeName?: string | undefined;
388
438
  errorMessage?: string | undefined;
439
+ nodeErrors?: {
440
+ nodeName: string;
441
+ message?: string | undefined;
442
+ }[] | undefined;
389
443
  } | undefined;
390
444
  verifiedAt?: string | undefined;
391
445
  }>>;
392
446
  summary: z.ZodString;
393
447
  }, "strip", z.ZodTypeAny, {
394
- taskId: string;
395
448
  workItemId: string;
396
- submitted: boolean;
397
- triggerType: "manual_or_testable" | "trigger_only";
398
- needsUserInput: boolean;
399
- summary: string;
400
449
  runId?: string | undefined;
450
+ taskId: string;
401
451
  owner?: {
402
452
  type: "direct";
403
453
  } | {
@@ -407,45 +457,58 @@ declare const workItemRecordSchema: z.ZodObject<{
407
457
  plannedTaskId?: string | undefined;
408
458
  workflowId?: string | undefined;
409
459
  sourceFilePath?: string | undefined;
410
- mockedCredentialTypes?: string[] | undefined;
411
- hasUnresolvedPlaceholders?: boolean | undefined;
412
- failureSignature?: string | undefined;
460
+ submitted: boolean;
461
+ triggerType: "manual_or_testable" | "trigger_only";
413
462
  triggerNodes?: {
414
463
  nodeName: string;
415
464
  nodeType: string;
416
465
  }[] | undefined;
466
+ needsUserInput: boolean;
417
467
  blockingReason?: string | undefined;
468
+ failureSignature?: string | undefined;
418
469
  mockedNodeNames?: string[] | undefined;
470
+ mockedCredentialTypes?: string[] | undefined;
419
471
  mockedCredentialsByNode?: Record<string, string[]> | undefined;
472
+ resolvedCredentialsByNode?: Record<string, ({
473
+ type: string;
474
+ id: string;
475
+ name: string;
476
+ } | {
477
+ type: string;
478
+ id: null;
479
+ name: string;
480
+ __aiGatewayManaged: true;
481
+ })[]> | undefined;
420
482
  verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
421
483
  usesWorkflowPinDataForVerification?: boolean | undefined;
422
484
  nodeSimulationPlan?: {
423
- source: "deterministic" | "llm" | "fallback";
424
- reason: string;
425
485
  nodeName: string;
426
486
  verdict: "execute" | "simulate";
427
- confidence: "low" | "high";
487
+ reason: string;
488
+ confidence: "high" | "low";
489
+ source: "deterministic" | "fallback" | "llm";
428
490
  }[] | undefined;
429
491
  simulationFixtures?: Record<string, Record<string, unknown>[]> | undefined;
430
492
  supportingWorkflowIds?: string[] | undefined;
493
+ hasUnresolvedPlaceholders?: boolean | undefined;
431
494
  verificationReadiness?: {
432
495
  status: "ready";
433
496
  } | {
434
497
  status: "already_verified";
435
498
  } | {
436
499
  status: "needs_setup";
437
- reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
500
+ reason: "missing-mocked-credential-pin-data" | "unresolved-placeholders" | "workflow-needs-setup";
438
501
  guidance: string;
439
502
  } | {
440
503
  status: "not_verifiable";
441
- reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
504
+ reason: "missing-workflow-id" | "non-mockable-trigger" | "not-submitted";
442
505
  guidance: string;
443
506
  } | undefined;
444
507
  setupRequirement?: {
445
508
  status: "not_required";
446
509
  } | {
447
510
  status: "required";
448
- reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
511
+ reason: "mocked-credentials" | "unresolved-placeholders" | "workflow-needs-setup";
449
512
  guidance: string;
450
513
  } | undefined;
451
514
  remediation?: {
@@ -458,10 +521,10 @@ declare const workItemRecordSchema: z.ZodObject<{
458
521
  } | undefined;
459
522
  verifyAttempts?: number | undefined;
460
523
  verification?: {
461
- success: boolean;
462
524
  attempted: boolean;
463
- status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
525
+ success: boolean;
464
526
  executionId?: string | undefined;
527
+ status?: "error" | "running" | "success" | "unknown" | "waiting" | undefined;
465
528
  failureSignature?: string | undefined;
466
529
  evidence?: {
467
530
  nodesExecuted?: string[] | undefined;
@@ -469,17 +532,18 @@ declare const workItemRecordSchema: z.ZodObject<{
469
532
  producedOutputRows?: number | undefined;
470
533
  errorNodeName?: string | undefined;
471
534
  errorMessage?: string | undefined;
535
+ nodeErrors?: {
536
+ nodeName: string;
537
+ message?: string | undefined;
538
+ }[] | undefined;
472
539
  } | undefined;
473
540
  verifiedAt?: string | undefined;
474
541
  } | undefined;
542
+ summary: string;
475
543
  }, {
476
- taskId: string;
477
544
  workItemId: string;
478
- submitted: boolean;
479
- triggerType: "manual_or_testable" | "trigger_only";
480
- needsUserInput: boolean;
481
- summary: string;
482
545
  runId?: string | undefined;
546
+ taskId: string;
483
547
  owner?: {
484
548
  type: "direct";
485
549
  } | {
@@ -489,45 +553,58 @@ declare const workItemRecordSchema: z.ZodObject<{
489
553
  plannedTaskId?: string | undefined;
490
554
  workflowId?: string | undefined;
491
555
  sourceFilePath?: string | undefined;
492
- mockedCredentialTypes?: string[] | undefined;
493
- hasUnresolvedPlaceholders?: boolean | undefined;
494
- failureSignature?: string | undefined;
556
+ submitted: boolean;
557
+ triggerType: "manual_or_testable" | "trigger_only";
495
558
  triggerNodes?: {
496
559
  nodeName: string;
497
560
  nodeType: string;
498
561
  }[] | undefined;
562
+ needsUserInput: boolean;
499
563
  blockingReason?: string | undefined;
564
+ failureSignature?: string | undefined;
500
565
  mockedNodeNames?: string[] | undefined;
566
+ mockedCredentialTypes?: string[] | undefined;
501
567
  mockedCredentialsByNode?: Record<string, string[]> | undefined;
568
+ resolvedCredentialsByNode?: Record<string, ({
569
+ type: string;
570
+ id: string;
571
+ name: string;
572
+ } | {
573
+ type: string;
574
+ id: null;
575
+ name: string;
576
+ __aiGatewayManaged: true;
577
+ })[]> | undefined;
502
578
  verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
503
579
  usesWorkflowPinDataForVerification?: boolean | undefined;
504
580
  nodeSimulationPlan?: {
505
- source: "deterministic" | "llm" | "fallback";
506
- reason: string;
507
581
  nodeName: string;
508
582
  verdict: "execute" | "simulate";
509
- confidence: "low" | "high";
583
+ reason: string;
584
+ confidence: "high" | "low";
585
+ source: "deterministic" | "fallback" | "llm";
510
586
  }[] | undefined;
511
587
  simulationFixtures?: Record<string, Record<string, unknown>[]> | undefined;
512
588
  supportingWorkflowIds?: string[] | undefined;
589
+ hasUnresolvedPlaceholders?: boolean | undefined;
513
590
  verificationReadiness?: {
514
591
  status: "ready";
515
592
  } | {
516
593
  status: "already_verified";
517
594
  } | {
518
595
  status: "needs_setup";
519
- reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
596
+ reason: "missing-mocked-credential-pin-data" | "unresolved-placeholders" | "workflow-needs-setup";
520
597
  guidance: string;
521
598
  } | {
522
599
  status: "not_verifiable";
523
- reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
600
+ reason: "missing-workflow-id" | "non-mockable-trigger" | "not-submitted";
524
601
  guidance: string;
525
602
  } | undefined;
526
603
  setupRequirement?: {
527
604
  status: "not_required";
528
605
  } | {
529
606
  status: "required";
530
- reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
607
+ reason: "mocked-credentials" | "unresolved-placeholders" | "workflow-needs-setup";
531
608
  guidance: string;
532
609
  } | undefined;
533
610
  remediation?: {
@@ -540,10 +617,10 @@ declare const workItemRecordSchema: z.ZodObject<{
540
617
  } | undefined;
541
618
  verifyAttempts?: number | undefined;
542
619
  verification?: {
543
- success: boolean;
544
620
  attempted: boolean;
545
- status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
621
+ success: boolean;
546
622
  executionId?: string | undefined;
623
+ status?: "error" | "running" | "success" | "unknown" | "waiting" | undefined;
547
624
  failureSignature?: string | undefined;
548
625
  evidence?: {
549
626
  nodesExecuted?: string[] | undefined;
@@ -551,19 +628,25 @@ declare const workItemRecordSchema: z.ZodObject<{
551
628
  producedOutputRows?: number | undefined;
552
629
  errorNodeName?: string | undefined;
553
630
  errorMessage?: string | undefined;
631
+ nodeErrors?: {
632
+ nodeName: string;
633
+ message?: string | undefined;
634
+ }[] | undefined;
554
635
  } | undefined;
555
636
  verifiedAt?: string | undefined;
556
637
  } | undefined;
638
+ summary: string;
557
639
  }>>;
558
640
  }, "strip", z.ZodTypeAny, {
559
641
  state: {
560
- status: "blocked" | "active" | "completed";
561
- threadId: string;
562
- source: "create" | "modify";
563
642
  workItemId: string;
564
- phase: "building" | "verifying" | "repairing" | "done" | "blocked";
565
- rebuildAttempts: number;
643
+ threadId: string;
566
644
  runId?: string | undefined;
645
+ workflowId?: string | undefined;
646
+ sourceFilePath?: string | undefined;
647
+ phase: "blocked" | "building" | "done" | "repairing" | "verifying";
648
+ status: "active" | "blocked" | "completed";
649
+ source: "create" | "modify";
567
650
  owner?: {
568
651
  type: "direct";
569
652
  } | {
@@ -571,12 +654,11 @@ declare const workItemRecordSchema: z.ZodObject<{
571
654
  taskId: string;
572
655
  } | undefined;
573
656
  plannedTaskId?: string | undefined;
574
- workflowId?: string | undefined;
575
- sourceFilePath?: string | undefined;
576
657
  lastTaskId?: string | undefined;
577
658
  lastExecutionId?: string | undefined;
578
659
  lastFailureSignature?: string | undefined;
579
660
  lastWorkflowInspection?: string | undefined;
661
+ rebuildAttempts: number;
580
662
  mockedCredentialTypes?: string[] | undefined;
581
663
  hasUnresolvedPlaceholders?: boolean | undefined;
582
664
  successfulSubmitSeen?: boolean | undefined;
@@ -596,30 +678,26 @@ declare const workItemRecordSchema: z.ZodObject<{
596
678
  setupRoutingClaimExpiresAt?: string | undefined;
597
679
  };
598
680
  attempts: {
599
- attempt: number;
600
- action: "patch" | "build" | "verify" | "rebuild";
601
- result: "success" | "blocked" | "failure";
602
681
  workItemId: string;
603
- phase: "building" | "verifying" | "repairing" | "done" | "blocked";
604
- createdAt: string;
605
- diagnosis?: string | undefined;
606
- fixApplied?: string | undefined;
682
+ phase: "blocked" | "building" | "done" | "repairing" | "verifying";
683
+ attempt: number;
684
+ action: "build" | "patch" | "rebuild" | "verify";
685
+ result: "blocked" | "failure" | "success";
607
686
  workflowId?: string | undefined;
608
687
  executionId?: string | undefined;
609
688
  failureSignature?: string | undefined;
610
689
  workflowInspection?: string | undefined;
690
+ diagnosis?: string | undefined;
691
+ fixApplied?: string | undefined;
611
692
  remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
612
693
  remediationShouldEdit?: boolean | undefined;
613
694
  remediationGuidance?: string | undefined;
695
+ createdAt: string;
614
696
  }[];
615
697
  lastBuildOutcome?: {
616
- taskId: string;
617
698
  workItemId: string;
618
- submitted: boolean;
619
- triggerType: "manual_or_testable" | "trigger_only";
620
- needsUserInput: boolean;
621
- summary: string;
622
699
  runId?: string | undefined;
700
+ taskId: string;
623
701
  owner?: {
624
702
  type: "direct";
625
703
  } | {
@@ -629,45 +707,58 @@ declare const workItemRecordSchema: z.ZodObject<{
629
707
  plannedTaskId?: string | undefined;
630
708
  workflowId?: string | undefined;
631
709
  sourceFilePath?: string | undefined;
632
- mockedCredentialTypes?: string[] | undefined;
633
- hasUnresolvedPlaceholders?: boolean | undefined;
634
- failureSignature?: string | undefined;
710
+ submitted: boolean;
711
+ triggerType: "manual_or_testable" | "trigger_only";
635
712
  triggerNodes?: {
636
713
  nodeName: string;
637
714
  nodeType: string;
638
715
  }[] | undefined;
716
+ needsUserInput: boolean;
639
717
  blockingReason?: string | undefined;
718
+ failureSignature?: string | undefined;
640
719
  mockedNodeNames?: string[] | undefined;
720
+ mockedCredentialTypes?: string[] | undefined;
641
721
  mockedCredentialsByNode?: Record<string, string[]> | undefined;
722
+ resolvedCredentialsByNode?: Record<string, ({
723
+ type: string;
724
+ id: string;
725
+ name: string;
726
+ } | {
727
+ type: string;
728
+ id: null;
729
+ name: string;
730
+ __aiGatewayManaged: true;
731
+ })[]> | undefined;
642
732
  verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
643
733
  usesWorkflowPinDataForVerification?: boolean | undefined;
644
734
  nodeSimulationPlan?: {
645
- source: "deterministic" | "llm" | "fallback";
646
- reason: string;
647
735
  nodeName: string;
648
736
  verdict: "execute" | "simulate";
649
- confidence: "low" | "high";
737
+ reason: string;
738
+ confidence: "high" | "low";
739
+ source: "deterministic" | "fallback" | "llm";
650
740
  }[] | undefined;
651
741
  simulationFixtures?: Record<string, Record<string, unknown>[]> | undefined;
652
742
  supportingWorkflowIds?: string[] | undefined;
743
+ hasUnresolvedPlaceholders?: boolean | undefined;
653
744
  verificationReadiness?: {
654
745
  status: "ready";
655
746
  } | {
656
747
  status: "already_verified";
657
748
  } | {
658
749
  status: "needs_setup";
659
- reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
750
+ reason: "missing-mocked-credential-pin-data" | "unresolved-placeholders" | "workflow-needs-setup";
660
751
  guidance: string;
661
752
  } | {
662
753
  status: "not_verifiable";
663
- reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
754
+ reason: "missing-workflow-id" | "non-mockable-trigger" | "not-submitted";
664
755
  guidance: string;
665
756
  } | undefined;
666
757
  setupRequirement?: {
667
758
  status: "not_required";
668
759
  } | {
669
760
  status: "required";
670
- reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
761
+ reason: "mocked-credentials" | "unresolved-placeholders" | "workflow-needs-setup";
671
762
  guidance: string;
672
763
  } | undefined;
673
764
  remediation?: {
@@ -680,10 +771,10 @@ declare const workItemRecordSchema: z.ZodObject<{
680
771
  } | undefined;
681
772
  verifyAttempts?: number | undefined;
682
773
  verification?: {
683
- success: boolean;
684
774
  attempted: boolean;
685
- status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
775
+ success: boolean;
686
776
  executionId?: string | undefined;
777
+ status?: "error" | "running" | "success" | "unknown" | "waiting" | undefined;
687
778
  failureSignature?: string | undefined;
688
779
  evidence?: {
689
780
  nodesExecuted?: string[] | undefined;
@@ -691,19 +782,25 @@ declare const workItemRecordSchema: z.ZodObject<{
691
782
  producedOutputRows?: number | undefined;
692
783
  errorNodeName?: string | undefined;
693
784
  errorMessage?: string | undefined;
785
+ nodeErrors?: {
786
+ nodeName: string;
787
+ message?: string | undefined;
788
+ }[] | undefined;
694
789
  } | undefined;
695
790
  verifiedAt?: string | undefined;
696
791
  } | undefined;
792
+ summary: string;
697
793
  } | undefined;
698
794
  }, {
699
795
  state: {
700
- status: "blocked" | "active" | "completed";
701
- threadId: string;
702
- source: "create" | "modify";
703
796
  workItemId: string;
704
- phase: "building" | "verifying" | "repairing" | "done" | "blocked";
705
- rebuildAttempts: number;
797
+ threadId: string;
706
798
  runId?: string | undefined;
799
+ workflowId?: string | undefined;
800
+ sourceFilePath?: string | undefined;
801
+ phase: "blocked" | "building" | "done" | "repairing" | "verifying";
802
+ status: "active" | "blocked" | "completed";
803
+ source: "create" | "modify";
707
804
  owner?: {
708
805
  type: "direct";
709
806
  } | {
@@ -711,12 +808,11 @@ declare const workItemRecordSchema: z.ZodObject<{
711
808
  taskId: string;
712
809
  } | undefined;
713
810
  plannedTaskId?: string | undefined;
714
- workflowId?: string | undefined;
715
- sourceFilePath?: string | undefined;
716
811
  lastTaskId?: string | undefined;
717
812
  lastExecutionId?: string | undefined;
718
813
  lastFailureSignature?: string | undefined;
719
814
  lastWorkflowInspection?: string | undefined;
815
+ rebuildAttempts: number;
720
816
  mockedCredentialTypes?: string[] | undefined;
721
817
  hasUnresolvedPlaceholders?: boolean | undefined;
722
818
  successfulSubmitSeen?: boolean | undefined;
@@ -736,30 +832,26 @@ declare const workItemRecordSchema: z.ZodObject<{
736
832
  setupRoutingClaimExpiresAt?: string | undefined;
737
833
  };
738
834
  attempts: {
739
- attempt: number;
740
- action: "patch" | "build" | "verify" | "rebuild";
741
- result: "success" | "blocked" | "failure";
742
835
  workItemId: string;
743
- phase: "building" | "verifying" | "repairing" | "done" | "blocked";
744
- createdAt: string;
745
- diagnosis?: string | undefined;
746
- fixApplied?: string | undefined;
836
+ phase: "blocked" | "building" | "done" | "repairing" | "verifying";
837
+ attempt: number;
838
+ action: "build" | "patch" | "rebuild" | "verify";
839
+ result: "blocked" | "failure" | "success";
747
840
  workflowId?: string | undefined;
748
841
  executionId?: string | undefined;
749
842
  failureSignature?: string | undefined;
750
843
  workflowInspection?: string | undefined;
844
+ diagnosis?: string | undefined;
845
+ fixApplied?: string | undefined;
751
846
  remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
752
847
  remediationShouldEdit?: boolean | undefined;
753
848
  remediationGuidance?: string | undefined;
849
+ createdAt: string;
754
850
  }[];
755
851
  lastBuildOutcome?: {
756
- taskId: string;
757
852
  workItemId: string;
758
- submitted: boolean;
759
- triggerType: "manual_or_testable" | "trigger_only";
760
- needsUserInput: boolean;
761
- summary: string;
762
853
  runId?: string | undefined;
854
+ taskId: string;
763
855
  owner?: {
764
856
  type: "direct";
765
857
  } | {
@@ -769,45 +861,58 @@ declare const workItemRecordSchema: z.ZodObject<{
769
861
  plannedTaskId?: string | undefined;
770
862
  workflowId?: string | undefined;
771
863
  sourceFilePath?: string | undefined;
772
- mockedCredentialTypes?: string[] | undefined;
773
- hasUnresolvedPlaceholders?: boolean | undefined;
774
- failureSignature?: string | undefined;
864
+ submitted: boolean;
865
+ triggerType: "manual_or_testable" | "trigger_only";
775
866
  triggerNodes?: {
776
867
  nodeName: string;
777
868
  nodeType: string;
778
869
  }[] | undefined;
870
+ needsUserInput: boolean;
779
871
  blockingReason?: string | undefined;
872
+ failureSignature?: string | undefined;
780
873
  mockedNodeNames?: string[] | undefined;
874
+ mockedCredentialTypes?: string[] | undefined;
781
875
  mockedCredentialsByNode?: Record<string, string[]> | undefined;
876
+ resolvedCredentialsByNode?: Record<string, ({
877
+ type: string;
878
+ id: string;
879
+ name: string;
880
+ } | {
881
+ type: string;
882
+ id: null;
883
+ name: string;
884
+ __aiGatewayManaged: true;
885
+ })[]> | undefined;
782
886
  verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
783
887
  usesWorkflowPinDataForVerification?: boolean | undefined;
784
888
  nodeSimulationPlan?: {
785
- source: "deterministic" | "llm" | "fallback";
786
- reason: string;
787
889
  nodeName: string;
788
890
  verdict: "execute" | "simulate";
789
- confidence: "low" | "high";
891
+ reason: string;
892
+ confidence: "high" | "low";
893
+ source: "deterministic" | "fallback" | "llm";
790
894
  }[] | undefined;
791
895
  simulationFixtures?: Record<string, Record<string, unknown>[]> | undefined;
792
896
  supportingWorkflowIds?: string[] | undefined;
897
+ hasUnresolvedPlaceholders?: boolean | undefined;
793
898
  verificationReadiness?: {
794
899
  status: "ready";
795
900
  } | {
796
901
  status: "already_verified";
797
902
  } | {
798
903
  status: "needs_setup";
799
- reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
904
+ reason: "missing-mocked-credential-pin-data" | "unresolved-placeholders" | "workflow-needs-setup";
800
905
  guidance: string;
801
906
  } | {
802
907
  status: "not_verifiable";
803
- reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
908
+ reason: "missing-workflow-id" | "non-mockable-trigger" | "not-submitted";
804
909
  guidance: string;
805
910
  } | undefined;
806
911
  setupRequirement?: {
807
912
  status: "not_required";
808
913
  } | {
809
914
  status: "required";
810
- reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
915
+ reason: "mocked-credentials" | "unresolved-placeholders" | "workflow-needs-setup";
811
916
  guidance: string;
812
917
  } | undefined;
813
918
  remediation?: {
@@ -820,10 +925,10 @@ declare const workItemRecordSchema: z.ZodObject<{
820
925
  } | undefined;
821
926
  verifyAttempts?: number | undefined;
822
927
  verification?: {
823
- success: boolean;
824
928
  attempted: boolean;
825
- status?: "unknown" | "success" | "error" | "waiting" | "running" | undefined;
929
+ success: boolean;
826
930
  executionId?: string | undefined;
931
+ status?: "error" | "running" | "success" | "unknown" | "waiting" | undefined;
827
932
  failureSignature?: string | undefined;
828
933
  evidence?: {
829
934
  nodesExecuted?: string[] | undefined;
@@ -831,9 +936,14 @@ declare const workItemRecordSchema: z.ZodObject<{
831
936
  producedOutputRows?: number | undefined;
832
937
  errorNodeName?: string | undefined;
833
938
  errorMessage?: string | undefined;
939
+ nodeErrors?: {
940
+ nodeName: string;
941
+ message?: string | undefined;
942
+ }[] | undefined;
834
943
  } | undefined;
835
944
  verifiedAt?: string | undefined;
836
945
  } | undefined;
946
+ summary: string;
837
947
  } | undefined;
838
948
  }>;
839
949
  export type WorkflowLoopWorkItemRecord = z.infer<typeof workItemRecordSchema>;