@n8n/instance-ai 1.7.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/instance-agent.d.ts +1 -1
- package/dist/agent/instance-agent.js +88 -75
- package/dist/agent/instance-agent.js.map +1 -1
- package/dist/agent/mcp-tool-name-validation.d.ts +4 -2
- package/dist/agent/mcp-tool-name-validation.js +2 -2
- package/dist/agent/mcp-tool-name-validation.js.map +1 -1
- package/dist/agent/runtime-workspace.d.ts +6 -0
- package/dist/agent/runtime-workspace.js +14 -0
- package/dist/agent/runtime-workspace.js.map +1 -0
- package/dist/agent/sanitize-mcp-schemas.d.ts +4 -3
- package/dist/agent/sanitize-mcp-schemas.js +53 -24
- package/dist/agent/sanitize-mcp-schemas.js.map +1 -1
- package/dist/agent/sub-agent-debriefing.d.ts +2 -2
- package/dist/agent/sub-agent-factory.d.ts +7 -4
- package/dist/agent/sub-agent-factory.js +24 -13
- package/dist/agent/sub-agent-factory.js.map +1 -1
- package/dist/agent/system-prompt.js +18 -15
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/constants/max-steps.d.ts +1 -1
- package/dist/constants/max-steps.js +1 -1
- package/dist/constants/max-steps.js.map +1 -1
- package/dist/domain-access/domain-gating.d.ts +2 -2
- package/dist/error-formatting.d.ts +1 -0
- package/dist/error-formatting.js +159 -0
- package/dist/error-formatting.js.map +1 -0
- package/dist/index.d.ts +65 -24
- package/dist/index.js +96 -52
- package/dist/index.js.map +1 -1
- package/dist/mcp/mcp-client-manager.d.ts +5 -4
- package/dist/mcp/mcp-client-manager.js +42 -17
- package/dist/mcp/mcp-client-manager.js.map +1 -1
- package/dist/memory/title-utils.d.ts +4 -1
- package/dist/memory/title-utils.js +10 -2
- package/dist/memory/title-utils.js.map +1 -1
- package/dist/parsers/structured-file-parser.d.ts +5 -2
- package/dist/parsers/structured-file-parser.js +9 -2
- package/dist/parsers/structured-file-parser.js.map +1 -1
- package/dist/planned-tasks/planned-task-permissions.js +3 -5
- package/dist/planned-tasks/planned-task-permissions.js.map +1 -1
- package/dist/planned-tasks/planned-task-service.d.ts +1 -0
- package/dist/planned-tasks/planned-task-service.js +8 -0
- package/dist/planned-tasks/planned-task-service.js.map +1 -1
- package/dist/runtime/background-task-manager.d.ts +9 -2
- package/dist/runtime/background-task-manager.js +7 -2
- package/dist/runtime/background-task-manager.js.map +1 -1
- package/dist/runtime/liveness-policy.js +4 -3
- package/dist/runtime/liveness-policy.js.map +1 -1
- package/dist/runtime/resumable-stream-executor.d.ts +4 -24
- package/dist/runtime/resumable-stream-executor.js +103 -1318
- package/dist/runtime/resumable-stream-executor.js.map +1 -1
- package/dist/runtime/run-state-registry.d.ts +8 -2
- package/dist/runtime/run-state-registry.js +19 -1
- package/dist/runtime/run-state-registry.js.map +1 -1
- package/dist/runtime/stream-runner.d.ts +4 -4
- package/dist/runtime/stream-runner.js +11 -25
- package/dist/runtime/stream-runner.js.map +1 -1
- package/dist/skills/materialize-runtime-skills.d.ts +62 -0
- package/dist/skills/materialize-runtime-skills.js +465 -0
- package/dist/skills/materialize-runtime-skills.js.map +1 -0
- package/dist/skills/runtime-skills.d.ts +4 -0
- package/dist/skills/runtime-skills.js +17 -0
- package/dist/skills/runtime-skills.js.map +1 -0
- package/dist/source-map-filter.d.ts +17 -0
- package/dist/source-map-filter.js +39 -0
- package/dist/source-map-filter.js.map +1 -0
- package/dist/storage/agent-tree-snapshot.d.ts +2 -0
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +8 -7
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/planned-task-storage.d.ts +3 -3
- package/dist/storage/planned-task-storage.js +3 -8
- package/dist/storage/planned-task-storage.js.map +1 -1
- package/dist/storage/terminal-outcome-storage.d.ts +4 -4
- package/dist/storage/terminal-outcome-storage.js +1 -1
- package/dist/storage/terminal-outcome-storage.js.map +1 -1
- package/dist/storage/{mastra-iteration-log-storage.d.ts → thread-iteration-log-storage.d.ts} +3 -3
- package/dist/storage/{mastra-iteration-log-storage.js → thread-iteration-log-storage.js} +5 -5
- package/dist/storage/thread-iteration-log-storage.js.map +1 -0
- package/dist/storage/thread-patch.d.ts +16 -10
- package/dist/storage/thread-patch.js +37 -36
- package/dist/storage/thread-patch.js.map +1 -1
- package/dist/storage/{mastra-task-storage.d.ts → thread-task-storage.d.ts} +3 -3
- package/dist/storage/{mastra-task-storage.js → thread-task-storage.js} +5 -5
- package/dist/storage/thread-task-storage.js.map +1 -0
- package/dist/storage/workflow-loop-storage.d.ts +28 -28
- package/dist/storage/workflow-loop-storage.js +1 -1
- package/dist/storage/workflow-loop-storage.js.map +1 -1
- package/dist/stream/consume-with-hitl.d.ts +11 -11
- package/dist/stream/consume-with-hitl.js +27 -15
- package/dist/stream/consume-with-hitl.js.map +1 -1
- package/dist/stream/map-chunk.d.ts +1 -1
- package/dist/stream/map-chunk.js +153 -36
- package/dist/stream/map-chunk.js.map +1 -1
- package/dist/tool-registry.d.ts +8 -0
- package/dist/tool-registry.js +45 -0
- package/dist/tool-registry.js.map +1 -0
- package/dist/tools/attachments/parse-file.tool.d.ts +42 -45
- package/dist/tools/attachments/parse-file.tool.js +140 -97
- package/dist/tools/attachments/parse-file.tool.js.map +1 -1
- package/dist/tools/credentials.tool.d.ts +5 -5
- package/dist/tools/credentials.tool.js +31 -34
- package/dist/tools/credentials.tool.js.map +1 -1
- package/dist/tools/data-tables.tool.d.ts +3 -2
- package/dist/tools/data-tables.tool.js +99 -100
- package/dist/tools/data-tables.tool.js.map +1 -1
- package/dist/tools/evals/apply-pin-data.service.d.ts +3 -0
- package/dist/tools/evals/apply-pin-data.service.js +19 -0
- package/dist/tools/evals/apply-pin-data.service.js.map +1 -0
- package/dist/tools/evals/column-ref-utils.d.ts +3 -0
- package/dist/tools/evals/column-ref-utils.js +205 -48
- package/dist/tools/evals/column-ref-utils.js.map +1 -1
- package/dist/tools/evals/detect-agent-named-refs.service.js +20 -4
- package/dist/tools/evals/detect-agent-named-refs.service.js.map +1 -1
- package/dist/tools/evals/ensure-eval-data-table.service.d.ts +15 -0
- package/dist/tools/evals/ensure-eval-data-table.service.js +83 -0
- package/dist/tools/evals/ensure-eval-data-table.service.js.map +1 -0
- package/dist/tools/evals/eval-data-requirements.service.d.ts +1 -0
- package/dist/tools/evals/eval-data-requirements.service.js +23 -4
- package/dist/tools/evals/eval-data-requirements.service.js.map +1 -1
- package/dist/tools/evals/evals.tool.d.ts +2 -0
- package/dist/tools/evals/evals.tool.js +452 -0
- package/dist/tools/evals/evals.tool.js.map +1 -0
- package/dist/tools/evals/extract-rows-from-history.service.d.ts +17 -0
- package/dist/tools/evals/extract-rows-from-history.service.js +103 -0
- package/dist/tools/evals/extract-rows-from-history.service.js.map +1 -0
- package/dist/tools/evals/format-eval-setup-task.d.ts +16 -0
- package/dist/tools/evals/format-eval-setup-task.js +167 -0
- package/dist/tools/evals/format-eval-setup-task.js.map +1 -0
- package/dist/tools/evals/generate-sample-rows.service.d.ts +35 -0
- package/dist/tools/evals/generate-sample-rows.service.js +278 -0
- package/dist/tools/evals/generate-sample-rows.service.js.map +1 -0
- package/dist/tools/evals/generate-tool-ref-pin-data.service.d.ts +11 -0
- package/dist/tools/evals/generate-tool-ref-pin-data.service.js +125 -0
- package/dist/tools/evals/generate-tool-ref-pin-data.service.js.map +1 -0
- package/dist/tools/evals/metric-catalog.d.ts +10 -4
- package/dist/tools/evals/metric-catalog.js.map +1 -1
- package/dist/tools/executions.tool.d.ts +1 -1
- package/dist/tools/executions.tool.js +25 -34
- package/dist/tools/executions.tool.js.map +1 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.d.ts +2 -3
- package/dist/tools/filesystem/create-tools-from-mcp-server.js +129 -67
- package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
- package/dist/tools/index.d.ts +4 -16
- package/dist/tools/index.js +102 -92
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/nodes.tool.d.ts +1 -1
- package/dist/tools/nodes.tool.js +31 -33
- package/dist/tools/nodes.tool.js.map +1 -1
- package/dist/tools/orchestration/add-plan-item.tool.d.ts +2 -2
- package/dist/tools/orchestration/add-plan-item.tool.js +45 -49
- package/dist/tools/orchestration/add-plan-item.tool.js.map +1 -1
- package/dist/tools/orchestration/agent-persistence.d.ts +14 -0
- package/dist/tools/orchestration/agent-persistence.js +43 -0
- package/dist/tools/orchestration/agent-persistence.js.map +1 -0
- package/dist/tools/orchestration/blueprint-accumulator.d.ts +4 -8
- package/dist/tools/orchestration/blueprint-accumulator.js +11 -78
- package/dist/tools/orchestration/blueprint-accumulator.js.map +1 -1
- package/dist/tools/orchestration/blueprint.schema.d.ts +13 -147
- package/dist/tools/orchestration/blueprint.schema.js +4 -23
- package/dist/tools/orchestration/blueprint.schema.js.map +1 -1
- package/dist/tools/orchestration/browser-credential-setup.nudge.d.ts +2 -4
- package/dist/tools/orchestration/browser-credential-setup.nudge.js +1 -1
- package/dist/tools/orchestration/browser-credential-setup.nudge.js.map +1 -1
- package/dist/tools/orchestration/browser-credential-setup.tool.d.ts +10 -2
- package/dist/tools/orchestration/browser-credential-setup.tool.js +299 -270
- package/dist/tools/orchestration/browser-credential-setup.tool.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.prompt.d.ts +7 -1
- package/dist/tools/orchestration/build-workflow-agent.prompt.js +46 -20
- package/dist/tools/orchestration/build-workflow-agent.prompt.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.tool.d.ts +50 -5
- package/dist/tools/orchestration/build-workflow-agent.tool.js +748 -605
- package/dist/tools/orchestration/build-workflow-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/builder-memory-compaction.d.ts +6 -2
- package/dist/tools/orchestration/builder-memory-compaction.js +32 -46
- package/dist/tools/orchestration/builder-memory-compaction.js.map +1 -1
- package/dist/tools/orchestration/complete-checkpoint.tool.d.ts +1 -1
- package/dist/tools/orchestration/complete-checkpoint.tool.js +46 -47
- package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -1
- package/dist/tools/orchestration/delegate.tool.d.ts +1 -1
- package/dist/tools/orchestration/delegate.tool.js +170 -166
- package/dist/tools/orchestration/delegate.tool.js.map +1 -1
- package/dist/tools/orchestration/eval-data-agent.tool.d.ts +2 -0
- package/dist/tools/orchestration/eval-data-agent.tool.js +183 -0
- package/dist/tools/orchestration/eval-data-agent.tool.js.map +1 -0
- package/dist/tools/orchestration/eval-setup-agent.prompt.d.ts +1 -0
- package/dist/tools/orchestration/eval-setup-agent.prompt.js +238 -0
- package/dist/tools/orchestration/eval-setup-agent.prompt.js.map +1 -0
- package/dist/tools/orchestration/eval-setup-agent.tool.d.ts +31 -0
- package/dist/tools/orchestration/eval-setup-agent.tool.js +204 -0
- package/dist/tools/orchestration/eval-setup-agent.tool.js.map +1 -0
- package/dist/tools/orchestration/plan-agent-prompt.d.ts +1 -1
- package/dist/tools/orchestration/plan-agent-prompt.js +9 -9
- package/dist/tools/orchestration/plan-with-agent.tool.d.ts +1 -1
- package/dist/tools/orchestration/plan-with-agent.tool.js +210 -179
- package/dist/tools/orchestration/plan-with-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/plan.tool.d.ts +5 -2
- package/dist/tools/orchestration/plan.tool.js +125 -105
- package/dist/tools/orchestration/plan.tool.js.map +1 -1
- package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +3 -3
- package/dist/tools/orchestration/report-verification-verdict.tool.js +65 -66
- package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
- package/dist/tools/orchestration/submit-plan.tool.d.ts +1 -1
- package/dist/tools/orchestration/submit-plan.tool.js +83 -66
- package/dist/tools/orchestration/submit-plan.tool.js.map +1 -1
- package/dist/tools/orchestration/tracing-utils.d.ts +3 -2
- package/dist/tools/orchestration/tracing-utils.js +58 -39
- package/dist/tools/orchestration/tracing-utils.js.map +1 -1
- package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +5 -5
- package/dist/tools/orchestration/verify-built-workflow.tool.js +166 -166
- package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
- package/dist/tools/research.tool.d.ts +1 -1
- package/dist/tools/research.tool.js +59 -27
- package/dist/tools/research.tool.js.map +1 -1
- package/dist/tools/shared/ask-user.tool.d.ts +3 -2
- package/dist/tools/shared/ask-user.tool.js +61 -63
- package/dist/tools/shared/ask-user.tool.js.map +1 -1
- package/dist/tools/task-control.tool.d.ts +1 -1
- package/dist/tools/task-control.tool.js +15 -16
- package/dist/tools/task-control.tool.js.map +1 -1
- package/dist/tools/templates.tool.d.ts +1 -1
- package/dist/tools/templates.tool.js +6 -7
- package/dist/tools/templates.tool.js.map +1 -1
- package/dist/tools/tool-ids.d.ts +40 -0
- package/dist/tools/tool-ids.js +62 -0
- package/dist/tools/tool-ids.js.map +1 -0
- package/dist/tools/workflows/apply-workflow-credentials.tool.d.ts +3 -3
- package/dist/tools/workflows/apply-workflow-credentials.tool.js +72 -73
- package/dist/tools/workflows/apply-workflow-credentials.tool.js.map +1 -1
- package/dist/tools/workflows/build-workflow.tool.d.ts +3 -3
- package/dist/tools/workflows/build-workflow.tool.js +113 -114
- package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/materialize-node-type.tool.d.ts +6 -6
- package/dist/tools/workflows/materialize-node-type.tool.js +64 -65
- package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
- package/dist/tools/workflows/resolve-credentials.d.ts +3 -5
- package/dist/tools/workflows/resolve-credentials.js +15 -6
- package/dist/tools/workflows/resolve-credentials.js.map +1 -1
- package/dist/tools/workflows/setup-workflow.schema.d.ts +2 -2
- package/dist/tools/workflows/submit-workflow-identity.d.ts +8 -9
- package/dist/tools/workflows/submit-workflow-identity.js +41 -27
- package/dist/tools/workflows/submit-workflow-identity.js.map +1 -1
- package/dist/tools/workflows/submit-workflow.tool.d.ts +10 -7
- package/dist/tools/workflows/submit-workflow.tool.js +224 -191
- package/dist/tools/workflows/submit-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/validate-workflow.service.d.ts +15 -0
- package/dist/tools/workflows/validate-workflow.service.js +289 -0
- package/dist/tools/workflows/validate-workflow.service.js.map +1 -0
- package/dist/tools/workflows/write-sandbox-file.tool.d.ts +2 -2
- package/dist/tools/workflows/write-sandbox-file.tool.js +29 -30
- package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
- package/dist/tools/workflows.tool.d.ts +5 -2
- package/dist/tools/workflows.tool.js +184 -85
- package/dist/tools/workflows.tool.js.map +1 -1
- package/dist/tools/workspace.tool.d.ts +1 -1
- package/dist/tools/workspace.tool.js +49 -65
- package/dist/tools/workspace.tool.js.map +1 -1
- package/dist/tracing/langsmith-tracing.d.ts +17 -18
- package/dist/tracing/langsmith-tracing.js +941 -677
- package/dist/tracing/langsmith-tracing.js.map +1 -1
- package/dist/tracing/trace-labels.d.ts +5 -0
- package/dist/tracing/trace-labels.js +36 -0
- package/dist/tracing/trace-labels.js.map +1 -0
- package/dist/tracing/trace-payloads.d.ts +23 -0
- package/dist/tracing/trace-payloads.js +1008 -0
- package/dist/tracing/trace-payloads.js.map +1 -0
- package/dist/types.d.ts +57 -25
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/eval-agents.js +1 -1
- package/dist/utils/eval-agents.js.map +1 -1
- package/dist/utils/scrub-secrets.js +1 -1
- package/dist/utils/scrub-secrets.js.map +1 -1
- package/dist/utils/stream-helpers.d.ts +2 -5
- package/dist/utils/stream-helpers.js +12 -1
- package/dist/utils/stream-helpers.js.map +1 -1
- package/dist/workflow-loop/workflow-loop-state.d.ts +18 -18
- package/dist/workspace/builder-templates-service.d.ts +54 -0
- package/dist/workspace/builder-templates-service.js +442 -0
- package/dist/workspace/builder-templates-service.js.map +1 -0
- package/dist/workspace/create-workspace.d.ts +16 -3
- package/dist/workspace/create-workspace.js +45 -21
- package/dist/workspace/create-workspace.js.map +1 -1
- package/dist/workspace/daytona-auth-manager.d.ts +26 -0
- package/dist/workspace/daytona-auth-manager.js +90 -0
- package/dist/workspace/daytona-auth-manager.js.map +1 -0
- package/dist/workspace/daytona-filesystem.d.ts +5 -4
- package/dist/workspace/daytona-filesystem.js +25 -15
- package/dist/workspace/daytona-filesystem.js.map +1 -1
- package/dist/workspace/daytona-sandbox.d.ts +65 -0
- package/dist/workspace/daytona-sandbox.js +314 -0
- package/dist/workspace/daytona-sandbox.js.map +1 -0
- package/dist/workspace/lazy-daytona.d.ts +2 -0
- package/dist/workspace/lazy-daytona.js +12 -0
- package/dist/workspace/lazy-daytona.js.map +1 -0
- package/dist/workspace/lazy-runtime-workspace.d.ts +8 -0
- package/dist/workspace/lazy-runtime-workspace.js +246 -0
- package/dist/workspace/lazy-runtime-workspace.js.map +1 -0
- package/dist/workspace/local-filesystem.d.ts +48 -0
- package/dist/workspace/local-filesystem.js +250 -0
- package/dist/workspace/local-filesystem.js.map +1 -0
- package/dist/workspace/local-sandbox.d.ts +28 -0
- package/dist/workspace/local-sandbox.js +121 -0
- package/dist/workspace/local-sandbox.js.map +1 -0
- package/dist/workspace/n8n-sandbox-filesystem.d.ts +3 -3
- package/dist/workspace/n8n-sandbox-filesystem.js +3 -3
- package/dist/workspace/n8n-sandbox-filesystem.js.map +1 -1
- package/dist/workspace/n8n-sandbox-sandbox.d.ts +12 -3
- package/dist/workspace/n8n-sandbox-sandbox.js +54 -10
- package/dist/workspace/n8n-sandbox-sandbox.js.map +1 -1
- package/dist/workspace/sandbox-fs.d.ts +35 -4
- package/dist/workspace/sandbox-fs.js +1 -1
- package/dist/workspace/sandbox-fs.js.map +1 -1
- package/dist/workspace/sandbox-setup.d.ts +13 -4
- package/dist/workspace/sandbox-setup.js +250 -36
- package/dist/workspace/sandbox-setup.js.map +1 -1
- package/dist/workspace/scoped-workspace.d.ts +2 -0
- package/dist/workspace/scoped-workspace.js +141 -0
- package/dist/workspace/scoped-workspace.js.map +1 -0
- package/dist/workspace/snapshot-manager.d.ts +11 -5
- package/dist/workspace/snapshot-manager.js +74 -17
- package/dist/workspace/snapshot-manager.js.map +1 -1
- package/dist/workspace/template-telemetry.d.ts +4 -4
- package/dist/workspace/template-telemetry.js +18 -6
- package/dist/workspace/template-telemetry.js.map +1 -1
- package/package.json +13 -16
- package/skills/data-table-manager/SKILL.md +119 -0
- package/skills/data-table-manager/references/data-table-playbook.md +212 -0
- package/dist/agent/register-with-mastra.d.ts +0 -3
- package/dist/agent/register-with-mastra.js +0 -15
- package/dist/agent/register-with-mastra.js.map +0 -1
- package/dist/compaction/compaction-helper.d.ts +0 -9
- package/dist/compaction/compaction-helper.js +0 -58
- package/dist/compaction/compaction-helper.js.map +0 -1
- package/dist/compaction/index.d.ts +0 -2
- package/dist/compaction/index.js +0 -6
- package/dist/compaction/index.js.map +0 -1
- package/dist/memory/memory-config.d.ts +0 -3
- package/dist/memory/memory-config.js +0 -27
- package/dist/memory/memory-config.js.map +0 -1
- package/dist/runtime/builder-sandbox-session-registry.d.ts +0 -47
- package/dist/runtime/builder-sandbox-session-registry.js +0 -166
- package/dist/runtime/builder-sandbox-session-registry.js.map +0 -1
- package/dist/storage/mastra-iteration-log-storage.js.map +0 -1
- package/dist/storage/mastra-task-storage.js.map +0 -1
- package/dist/tools/orchestration/data-table-agent.prompt.d.ts +0 -1
- package/dist/tools/orchestration/data-table-agent.prompt.js +0 -47
- package/dist/tools/orchestration/data-table-agent.prompt.js.map +0 -1
- package/dist/tools/orchestration/data-table-agent.tool.d.ts +0 -26
- package/dist/tools/orchestration/data-table-agent.tool.js +0 -174
- package/dist/tools/orchestration/data-table-agent.tool.js.map +0 -1
- package/dist/tools/orchestration/research-agent-prompt.d.ts +0 -1
- package/dist/tools/orchestration/research-agent-prompt.js +0 -26
- package/dist/tools/orchestration/research-agent-prompt.js.map +0 -1
- package/dist/tools/orchestration/research-with-agent.tool.d.ts +0 -30
- package/dist/tools/orchestration/research-with-agent.tool.js +0 -179
- package/dist/tools/orchestration/research-with-agent.tool.js.map +0 -1
- package/dist/workspace/builder-sandbox-factory.d.ts +0 -30
- package/dist/workspace/builder-sandbox-factory.js +0 -289
- package/dist/workspace/builder-sandbox-factory.js.map +0 -1
- package/dist/workspace/guarded-filesystem.d.ts +0 -10
- package/dist/workspace/guarded-filesystem.js +0 -136
- package/dist/workspace/guarded-filesystem.js.map +0 -1
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.planResumeSchema = void 0;
|
|
4
4
|
exports.createPlanTool = createPlanTool;
|
|
5
|
-
const
|
|
5
|
+
const agents_1 = require("@n8n/agents");
|
|
6
6
|
const api_types_1 = require("@n8n/api-types");
|
|
7
7
|
const nanoid_1 = require("nanoid");
|
|
8
8
|
const zod_1 = require("zod");
|
|
9
9
|
const planned_task_service_1 = require("../../planned-tasks/planned-task-service");
|
|
10
|
+
const types_1 = require("../../types");
|
|
10
11
|
const plannedTaskSchema = zod_1.z.object({
|
|
11
12
|
id: zod_1.z.string().describe('Stable task identifier used by dependency edges'),
|
|
12
13
|
title: zod_1.z.string().describe('Short user-facing task title'),
|
|
13
|
-
kind: zod_1.z.enum(
|
|
14
|
+
kind: zod_1.z.enum(types_1.PLANNED_TASK_KINDS),
|
|
14
15
|
spec: zod_1.z.string().describe('Detailed executor briefing for this task'),
|
|
15
16
|
deps: zod_1.z
|
|
16
17
|
.array(zod_1.z.string())
|
|
17
18
|
.describe('Task IDs that must succeed before this task can start. ' +
|
|
18
|
-
'
|
|
19
|
+
'Workflows that consume outputs depend on workflows that produce them; independent workflows run in parallel.'),
|
|
19
20
|
tools: zod_1.z.array(zod_1.z.string()).optional().describe('Required tool subset for delegate tasks'),
|
|
20
21
|
workflowId: zod_1.z
|
|
21
22
|
.string()
|
|
@@ -67,132 +68,151 @@ const planOutputSchema = zod_1.z.object({
|
|
|
67
68
|
exports.planResumeSchema = zod_1.z.object({
|
|
68
69
|
approved: zod_1.z.boolean(),
|
|
69
70
|
userInput: zod_1.z.string().optional(),
|
|
71
|
+
denied: zod_1.z.boolean().optional(),
|
|
70
72
|
});
|
|
71
73
|
function createPlanTool(context) {
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
74
|
+
return new agents_1.Tool('create-tasks')
|
|
75
|
+
.description('Submit a pre-built task list for detached multi-step execution. ' +
|
|
76
|
+
'Use ONLY for replanning after a failure — when you already have the task context ' +
|
|
77
|
+
'and do not need resource discovery. For initial planning, call `plan` instead. ' +
|
|
78
|
+
'A runtime guard rejects this tool when no replan context (`<planned-task-follow-up type="replan">`) ' +
|
|
79
|
+
'is present; if you intentionally need to bypass the planner, set `skipPlannerDiscovery: true` ' +
|
|
80
|
+
'and pass a one-sentence `reason`. ' +
|
|
81
|
+
'The task list is shown to the user for approval before execution starts. ' +
|
|
82
|
+
'After calling create-tasks, reply briefly and end your turn.')
|
|
83
|
+
.input(planInputSchema)
|
|
84
|
+
.output(planOutputSchema)
|
|
85
|
+
.suspend(zod_1.z.object({
|
|
86
|
+
requestId: zod_1.z.string(),
|
|
87
|
+
message: zod_1.z.string(),
|
|
88
|
+
severity: zod_1.z.literal('info'),
|
|
89
|
+
inputType: zod_1.z.literal('plan-review'),
|
|
90
|
+
tasks: api_types_1.taskListSchema,
|
|
91
|
+
}))
|
|
92
|
+
.resume(exports.planResumeSchema)
|
|
93
|
+
.handler(async (input, ctx) => {
|
|
94
|
+
if (!context.plannedTaskService || !context.schedulePlannedTasks) {
|
|
95
|
+
return {
|
|
96
|
+
result: 'Planning failed: planned task scheduling is not available.',
|
|
97
|
+
taskCount: 0,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const resumeData = ctx.resumeData;
|
|
101
|
+
const isFirstCall = resumeData === undefined || resumeData === null;
|
|
102
|
+
if (isFirstCall && context.messageGroupId) {
|
|
103
|
+
const existing = await context.plannedTaskService.getGraph(context.threadId);
|
|
104
|
+
if (existing?.status === 'cancelled' &&
|
|
105
|
+
existing.messageGroupId === context.messageGroupId) {
|
|
106
|
+
context.logger.info('create-tasks blocked: user denied a plan earlier in this turn', {
|
|
107
|
+
threadId: context.threadId,
|
|
108
|
+
messageGroupId: context.messageGroupId,
|
|
109
|
+
});
|
|
94
110
|
return {
|
|
95
|
-
result: '
|
|
111
|
+
result: 'The user denied a plan earlier in this turn. Do not invoke create-tasks again — acknowledge briefly and wait for the next user message.',
|
|
96
112
|
taskCount: 0,
|
|
97
113
|
};
|
|
98
114
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (!input.skipPlannerDiscovery) {
|
|
105
|
-
context.logger.warn('create-tasks called without replan context — rejecting', {
|
|
106
|
-
threadId: context.threadId,
|
|
107
|
-
taskCount: input.tasks.length,
|
|
108
|
-
});
|
|
109
|
-
return {
|
|
110
|
-
result: 'Error: `create-tasks` is for replanning only. For initial planning, call `plan` instead — ' +
|
|
111
|
-
'the planner sub-agent will discover credentials, data tables, and best practices for you. ' +
|
|
112
|
-
'If you intentionally want to skip the planner (rare), call `create-tasks` again with ' +
|
|
113
|
-
'`skipPlannerDiscovery: true` and a one-sentence `reason`.',
|
|
114
|
-
taskCount: 0,
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
if (!input.reason || input.reason.trim().length === 0) {
|
|
118
|
-
return {
|
|
119
|
-
result: 'Error: `skipPlannerDiscovery: true` requires a one-sentence `reason` explaining ' +
|
|
120
|
-
'why the planner is being bypassed.',
|
|
121
|
-
taskCount: 0,
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
context.logger.warn('create-tasks bypassing planner with skipPlannerDiscovery=true', {
|
|
115
|
+
}
|
|
116
|
+
const hasExistingPlan = await threadHasExistingPlan(context);
|
|
117
|
+
if (isFirstCall && isReplanGuardEnabled() && !isReplanContext(context) && !hasExistingPlan) {
|
|
118
|
+
if (!input.skipPlannerDiscovery) {
|
|
119
|
+
context.logger.warn('create-tasks called without replan context — rejecting', {
|
|
125
120
|
threadId: context.threadId,
|
|
126
121
|
taskCount: input.tasks.length,
|
|
127
|
-
reason: input.reason,
|
|
128
122
|
});
|
|
123
|
+
return {
|
|
124
|
+
result: 'Error: `create-tasks` is for replanning only. For initial planning, call `plan` instead — ' +
|
|
125
|
+
'the planner sub-agent will discover credentials, data tables, and best practices for you. ' +
|
|
126
|
+
'If you intentionally want to skip the planner (rare), call `create-tasks` again with ' +
|
|
127
|
+
'`skipPlannerDiscovery: true` and a one-sentence `reason`.',
|
|
128
|
+
taskCount: 0,
|
|
129
|
+
};
|
|
129
130
|
}
|
|
130
|
-
if (
|
|
131
|
-
try {
|
|
132
|
-
await context.plannedTaskService.createPlan(context.threadId, input.tasks, {
|
|
133
|
-
planRunId: context.runId,
|
|
134
|
-
messageGroupId: context.messageGroupId,
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
catch (error) {
|
|
138
|
-
if (!(error instanceof planned_task_service_1.PlanValidationError)) {
|
|
139
|
-
throw error;
|
|
140
|
-
}
|
|
141
|
-
context.logger.warn('plan tool: createPlan rejected by validator', {
|
|
142
|
-
threadId: context.threadId,
|
|
143
|
-
taskCount: input.tasks.length,
|
|
144
|
-
error: error.message,
|
|
145
|
-
});
|
|
146
|
-
return {
|
|
147
|
-
result: `Error: ${error.message}. Revise the task graph and call this tool again.`,
|
|
148
|
-
taskCount: 0,
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
const taskItems = input.tasks.map((t) => ({
|
|
152
|
-
id: t.id,
|
|
153
|
-
description: t.title,
|
|
154
|
-
status: 'todo',
|
|
155
|
-
}));
|
|
156
|
-
context.eventBus.publish(context.threadId, {
|
|
157
|
-
type: 'tasks-update',
|
|
158
|
-
runId: context.runId,
|
|
159
|
-
agentId: context.orchestratorAgentId,
|
|
160
|
-
payload: { tasks: { tasks: taskItems } },
|
|
161
|
-
});
|
|
162
|
-
await suspend?.({
|
|
163
|
-
requestId: (0, nanoid_1.nanoid)(),
|
|
164
|
-
message: `Review the plan (${input.tasks.length} task${input.tasks.length === 1 ? '' : 's'}) before execution starts.`,
|
|
165
|
-
severity: 'info',
|
|
166
|
-
inputType: 'plan-review',
|
|
167
|
-
tasks: { tasks: taskItems },
|
|
168
|
-
});
|
|
169
|
-
return { result: 'Awaiting approval', taskCount: input.tasks.length };
|
|
170
|
-
}
|
|
171
|
-
if (resumeData.approved) {
|
|
172
|
-
await context.plannedTaskService.approvePlan(context.threadId);
|
|
173
|
-
await context.schedulePlannedTasks();
|
|
131
|
+
if (!input.reason || input.reason.trim().length === 0) {
|
|
174
132
|
return {
|
|
175
|
-
result: `
|
|
176
|
-
|
|
133
|
+
result: 'Error: `skipPlannerDiscovery: true` requires a one-sentence `reason` explaining ' +
|
|
134
|
+
'why the planner is being bypassed.',
|
|
135
|
+
taskCount: 0,
|
|
177
136
|
};
|
|
178
137
|
}
|
|
138
|
+
context.logger.warn('create-tasks bypassing planner with skipPlannerDiscovery=true', {
|
|
139
|
+
threadId: context.threadId,
|
|
140
|
+
taskCount: input.tasks.length,
|
|
141
|
+
reason: input.reason,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
if (isFirstCall) {
|
|
179
145
|
try {
|
|
180
|
-
await context.
|
|
146
|
+
await context.plannedTaskService.createPlan(context.threadId, input.tasks, {
|
|
147
|
+
planRunId: context.runId,
|
|
148
|
+
messageGroupId: context.messageGroupId,
|
|
149
|
+
});
|
|
181
150
|
}
|
|
182
151
|
catch (error) {
|
|
183
|
-
|
|
152
|
+
if (!(error instanceof planned_task_service_1.PlanValidationError)) {
|
|
153
|
+
throw error;
|
|
154
|
+
}
|
|
155
|
+
context.logger.warn('plan tool: createPlan rejected by validator', {
|
|
156
|
+
threadId: context.threadId,
|
|
157
|
+
taskCount: input.tasks.length,
|
|
158
|
+
error: error.message,
|
|
159
|
+
});
|
|
160
|
+
return {
|
|
161
|
+
result: `Error: ${error.message}. Revise the task graph and call this tool again.`,
|
|
162
|
+
taskCount: 0,
|
|
163
|
+
};
|
|
184
164
|
}
|
|
165
|
+
const taskItems = input.tasks.map((t) => ({
|
|
166
|
+
id: t.id,
|
|
167
|
+
description: t.title,
|
|
168
|
+
status: 'todo',
|
|
169
|
+
}));
|
|
185
170
|
context.eventBus.publish(context.threadId, {
|
|
186
171
|
type: 'tasks-update',
|
|
187
172
|
runId: context.runId,
|
|
188
173
|
agentId: context.orchestratorAgentId,
|
|
189
|
-
payload: { tasks: { tasks:
|
|
174
|
+
payload: { tasks: { tasks: taskItems } },
|
|
175
|
+
});
|
|
176
|
+
return await ctx.suspend({
|
|
177
|
+
requestId: (0, nanoid_1.nanoid)(),
|
|
178
|
+
message: `Review the plan (${input.tasks.length} task${input.tasks.length === 1 ? '' : 's'}) before execution starts.`,
|
|
179
|
+
severity: 'info',
|
|
180
|
+
inputType: 'plan-review',
|
|
181
|
+
tasks: { tasks: taskItems },
|
|
190
182
|
});
|
|
183
|
+
}
|
|
184
|
+
if (resumeData.approved) {
|
|
185
|
+
await context.plannedTaskService.approvePlan(context.threadId);
|
|
186
|
+
await context.schedulePlannedTasks();
|
|
191
187
|
return {
|
|
192
|
-
result: `
|
|
188
|
+
result: `Plan approved. Started ${input.tasks.length} task${input.tasks.length === 1 ? '' : 's'}.`,
|
|
189
|
+
taskCount: input.tasks.length,
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
try {
|
|
193
|
+
await context.taskStorage.save(context.threadId, { tasks: [] });
|
|
194
|
+
}
|
|
195
|
+
catch (error) {
|
|
196
|
+
context.logger.warn('Failed to clear rejected plan checklist', { error });
|
|
197
|
+
}
|
|
198
|
+
context.eventBus.publish(context.threadId, {
|
|
199
|
+
type: 'tasks-update',
|
|
200
|
+
runId: context.runId,
|
|
201
|
+
agentId: context.orchestratorAgentId,
|
|
202
|
+
payload: { tasks: { tasks: [] }, planItems: [] },
|
|
203
|
+
});
|
|
204
|
+
if (resumeData.denied) {
|
|
205
|
+
await context.plannedTaskService.denyPlan(context.threadId);
|
|
206
|
+
return {
|
|
207
|
+
result: 'User denied the plan. Do not revise or call create-tasks again — acknowledge and wait for new instructions.',
|
|
193
208
|
taskCount: 0,
|
|
194
209
|
};
|
|
195
|
-
}
|
|
196
|
-
|
|
210
|
+
}
|
|
211
|
+
return {
|
|
212
|
+
result: `User requested changes: ${resumeData.userInput ?? 'No feedback provided'}. Revise the tasks and call create-tasks again.`,
|
|
213
|
+
taskCount: 0,
|
|
214
|
+
};
|
|
215
|
+
})
|
|
216
|
+
.build();
|
|
197
217
|
}
|
|
198
218
|
//# sourceMappingURL=plan.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/plan.tool.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"plan.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/plan.tool.ts"],"names":[],"mappings":";;;AA+FA,wCAqMC;AApSD,wCAAmC;AACnC,8CAAgD;AAChD,mCAAgC;AAChC,6BAAwB;AAExB,mFAA+E;AAC/E,uCAA8F;AAE9F,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IAC1E,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IAC1D,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,0BAAkB,CAAC;IAChC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACrE,IAAI,EAAE,OAAC;SACL,KAAK,CAAC,OAAC,CAAC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summary: z.ZodString;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
workflowId: string;
|
|
37
36
|
workItemId: string;
|
|
37
|
+
workflowId: string;
|
|
38
38
|
summary: string;
|
|
39
39
|
verdict: "trigger_only" | "verified" | "needs_patch" | "needs_rebuild" | "needs_user_input" | "failed_terminal";
|
|
40
40
|
diagnosis?: string | undefined;
|
|
@@ -51,8 +51,8 @@ export declare const reportVerificationVerdictInputSchema: z.ZodObject<{
|
|
|
51
51
|
} | undefined;
|
|
52
52
|
failedNodeName?: string | undefined;
|
|
53
53
|
}, {
|
|
54
|
-
workflowId: string;
|
|
55
54
|
workItemId: string;
|
|
55
|
+
workflowId: string;
|
|
56
56
|
summary: string;
|
|
57
57
|
verdict: "trigger_only" | "verified" | "needs_patch" | "needs_rebuild" | "needs_user_input" | "failed_terminal";
|
|
58
58
|
diagnosis?: string | undefined;
|
|
@@ -69,4 +69,4 @@ export declare const reportVerificationVerdictInputSchema: z.ZodObject<{
|
|
|
69
69
|
} | undefined;
|
|
70
70
|
failedNodeName?: string | undefined;
|
|
71
71
|
}>;
|
|
72
|
-
export declare function createReportVerificationVerdictTool(context: OrchestrationContext): import("@
|
|
72
|
+
export declare function createReportVerificationVerdictTool(context: OrchestrationContext): import("@n8n/agents").BuiltTool;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.reportVerificationVerdictInputSchema = void 0;
|
|
4
4
|
exports.createReportVerificationVerdictTool = createReportVerificationVerdictTool;
|
|
5
|
-
const
|
|
5
|
+
const agents_1 = require("@n8n/agents");
|
|
6
6
|
const zod_1 = require("zod");
|
|
7
7
|
const guidance_1 = require("../../workflow-loop/guidance");
|
|
8
8
|
const remediation_1 = require("../../workflow-loop/remediation");
|
|
@@ -76,72 +76,71 @@ function defaultRemediationForVerdict(input) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
function createReportVerificationVerdictTool(context) {
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (terminalRemediation) {
|
|
97
|
-
return {
|
|
98
|
-
guidance: (0, guidance_1.formatWorkflowLoopGuidance)({
|
|
99
|
-
type: 'blocked',
|
|
100
|
-
reason: terminalRemediation.guidance,
|
|
101
|
-
}),
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
const remediation = input.remediation ?? defaultRemediationForVerdict(input);
|
|
105
|
-
const forcedTerminalVerdict = remediation && !remediation.shouldEdit
|
|
106
|
-
? remediation.category === 'needs_setup'
|
|
107
|
-
? 'needs_user_input'
|
|
108
|
-
: 'failed_terminal'
|
|
109
|
-
: undefined;
|
|
110
|
-
const action = await context.workflowTaskService.reportVerificationVerdict({
|
|
111
|
-
workItemId: input.workItemId,
|
|
112
|
-
runId: context.runId,
|
|
113
|
-
workflowId: input.workflowId,
|
|
114
|
-
executionId: input.executionId,
|
|
115
|
-
verdict: forcedTerminalVerdict ?? input.verdict,
|
|
116
|
-
failureSignature: forcedTerminalVerdict
|
|
117
|
-
? (remediation?.reason ?? input.failureSignature)
|
|
118
|
-
: input.failureSignature,
|
|
119
|
-
failedNodeName: forcedTerminalVerdict ? undefined : input.failedNodeName,
|
|
120
|
-
diagnosis: forcedTerminalVerdict
|
|
121
|
-
? (remediation?.guidance ?? input.diagnosis)
|
|
122
|
-
: input.diagnosis,
|
|
123
|
-
patch: forcedTerminalVerdict ? undefined : input.patch,
|
|
124
|
-
remediation,
|
|
125
|
-
summary: forcedTerminalVerdict ? (remediation?.guidance ?? input.summary) : input.summary,
|
|
126
|
-
});
|
|
127
|
-
if (action.type === 'blocked') {
|
|
128
|
-
const state = await context.workflowTaskService.getWorkflowLoopState(input.workItemId);
|
|
129
|
-
if (state?.lastRemediation && !state.lastRemediation.shouldEdit) {
|
|
130
|
-
context.trackTelemetry?.('Builder remediation guard fired', {
|
|
131
|
-
thread_id: context.threadId,
|
|
132
|
-
run_id: context.runId,
|
|
133
|
-
work_item_id: input.workItemId,
|
|
134
|
-
workflow_id: input.workflowId,
|
|
135
|
-
category: state.lastRemediation.category,
|
|
136
|
-
attempt_count: state.lastRemediation.attemptCount,
|
|
137
|
-
reason: state.lastRemediation.reason,
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
79
|
+
return new agents_1.Tool('report-verification-verdict')
|
|
80
|
+
.description('Report the result of verifying a workflow after building it. ' +
|
|
81
|
+
'Call this after running a workflow and (optionally) debugging a failed execution. ' +
|
|
82
|
+
'Returns deterministic guidance on what to do next (done, rebuild, or blocked).')
|
|
83
|
+
.input(exports.reportVerificationVerdictInputSchema)
|
|
84
|
+
.output(zod_1.z.object({
|
|
85
|
+
guidance: zod_1.z.string(),
|
|
86
|
+
}))
|
|
87
|
+
.handler(async (input) => {
|
|
88
|
+
if (!context.workflowTaskService) {
|
|
89
|
+
return { guidance: 'Error: verification verdict reporting not available.' };
|
|
90
|
+
}
|
|
91
|
+
const stateBefore = await context.workflowTaskService.getWorkflowLoopState(input.workItemId);
|
|
92
|
+
const terminalRemediation = stateBefore?.lastRemediation && !stateBefore.lastRemediation.shouldEdit
|
|
93
|
+
? (0, remediation_1.terminalRemediationFromState)(stateBefore, context.runId)
|
|
94
|
+
: undefined;
|
|
95
|
+
if (terminalRemediation) {
|
|
141
96
|
return {
|
|
142
|
-
guidance: (0, guidance_1.formatWorkflowLoopGuidance)(
|
|
97
|
+
guidance: (0, guidance_1.formatWorkflowLoopGuidance)({
|
|
98
|
+
type: 'blocked',
|
|
99
|
+
reason: terminalRemediation.guidance,
|
|
100
|
+
}),
|
|
143
101
|
};
|
|
144
|
-
}
|
|
145
|
-
|
|
102
|
+
}
|
|
103
|
+
const remediation = input.remediation ?? defaultRemediationForVerdict(input);
|
|
104
|
+
const forcedTerminalVerdict = remediation && !remediation.shouldEdit
|
|
105
|
+
? remediation.category === 'needs_setup'
|
|
106
|
+
? 'needs_user_input'
|
|
107
|
+
: 'failed_terminal'
|
|
108
|
+
: undefined;
|
|
109
|
+
const action = await context.workflowTaskService.reportVerificationVerdict({
|
|
110
|
+
workItemId: input.workItemId,
|
|
111
|
+
runId: context.runId,
|
|
112
|
+
workflowId: input.workflowId,
|
|
113
|
+
executionId: input.executionId,
|
|
114
|
+
verdict: forcedTerminalVerdict ?? input.verdict,
|
|
115
|
+
failureSignature: forcedTerminalVerdict
|
|
116
|
+
? (remediation?.reason ?? input.failureSignature)
|
|
117
|
+
: input.failureSignature,
|
|
118
|
+
failedNodeName: forcedTerminalVerdict ? undefined : input.failedNodeName,
|
|
119
|
+
diagnosis: forcedTerminalVerdict
|
|
120
|
+
? (remediation?.guidance ?? input.diagnosis)
|
|
121
|
+
: input.diagnosis,
|
|
122
|
+
patch: forcedTerminalVerdict ? undefined : input.patch,
|
|
123
|
+
remediation,
|
|
124
|
+
summary: forcedTerminalVerdict ? (remediation?.guidance ?? input.summary) : input.summary,
|
|
125
|
+
});
|
|
126
|
+
if (action.type === 'blocked') {
|
|
127
|
+
const state = await context.workflowTaskService.getWorkflowLoopState(input.workItemId);
|
|
128
|
+
if (state?.lastRemediation && !state.lastRemediation.shouldEdit) {
|
|
129
|
+
context.trackTelemetry?.('Builder remediation guard fired', {
|
|
130
|
+
thread_id: context.threadId,
|
|
131
|
+
run_id: context.runId,
|
|
132
|
+
work_item_id: input.workItemId,
|
|
133
|
+
workflow_id: input.workflowId,
|
|
134
|
+
category: state.lastRemediation.category,
|
|
135
|
+
attempt_count: state.lastRemediation.attemptCount,
|
|
136
|
+
reason: state.lastRemediation.reason,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
guidance: (0, guidance_1.formatWorkflowLoopGuidance)(action, { workItemId: input.workItemId }),
|
|
142
|
+
};
|
|
143
|
+
})
|
|
144
|
+
.build();
|
|
146
145
|
}
|
|
147
146
|
//# sourceMappingURL=report-verification-verdict.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report-verification-verdict.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/report-verification-verdict.tool.ts"],"names":[],"mappings":";;;AAoGA,
|
|
1
|
+
{"version":3,"file":"report-verification-verdict.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/report-verification-verdict.tool.ts"],"names":[],"mappings":";;;AAoGA,kFA8EC;AAxKD,wCAAmC;AACnC,6BAAwB;AAGxB,2DAA0E;AAC1E,iEAAkG;AAClG,iFAGiD;AAEpC,QAAA,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;IACrF,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACpE,WAAW,EAAE,OAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;IAC5E,OAAO,EAAE,+CAAyB,CAAC,QAAQ,CAC1C,6DAA6D;QAC5D,iDAAiD;QACjD,4DAA4D;QAC5D,6EAA6E;QAC7E,4EAA4E;QAC5E,gEAAgE,CACjE;IACD,gBAAgB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACR,+IAA+I,CAC/I;IACF,cAAc,EAAE,OAAC;SACf,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,uEAAuE,CAAC;IACnF,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACzF,KAAK,EAAE,OAAC;SACN,MAAM,CAAC,OAAC,CAAC,OAAO,EAA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C;YAC/B,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YACvF,IAAI,KAAK,EAAE,eAAe,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;gBACjE,OAAO,CAAC,cAAc,EAAE,CAAC,iCAAiC,EAAE;oBAC3D,SAAS,EAAE,OAAO,CAAC,QAAQ;oBAC3B,MAAM,EAAE,OAAO,CAAC,KAAK;oBACrB,YAAY,EAAE,KAAK,CAAC,UAAU;oBAC9B,WAAW,EAAE,KAAK,CAAC,UAAU;oBAC7B,QAAQ,EAAE,KAAK,CAAC,eAAe,CAAC,QAAQ;oBACxC,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC,YAAY;oBACjD,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,MAAM;iBACpC,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAED,OAAO;YACN,QAAQ,EAAE,IAAA,qCAA0B,EAAC,MAAM,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;SAC9E,CAAC;IACH,CAAC,CAAC;SACD,KAAK,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { BlueprintAccumulator } from './blueprint-accumulator';
|
|
2
2
|
import type { OrchestrationContext } from '../../types';
|
|
3
|
-
export declare function createSubmitPlanTool(accumulator: BlueprintAccumulator, context: OrchestrationContext): import("@
|
|
3
|
+
export declare function createSubmitPlanTool(accumulator: BlueprintAccumulator, context: OrchestrationContext): import("@n8n/agents").BuiltTool;
|