@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
|
@@ -3,10 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SUB_AGENT_PROTOCOL = void 0;
|
|
4
4
|
exports.buildSubAgentPrompt = buildSubAgentPrompt;
|
|
5
5
|
exports.createSubAgent = createSubAgent;
|
|
6
|
-
const
|
|
6
|
+
const agents_1 = require("@n8n/agents");
|
|
7
7
|
const credential_guardrails_prompt_1 = require("./credential-guardrails.prompt");
|
|
8
|
+
const runtime_workspace_1 = require("./runtime-workspace");
|
|
8
9
|
const shared_prompts_1 = require("./shared-prompts");
|
|
9
10
|
const system_prompt_1 = require("./system-prompt");
|
|
11
|
+
const tool_registry_1 = require("../tool-registry");
|
|
10
12
|
const langsmith_tracing_1 = require("../tracing/langsmith-tracing");
|
|
11
13
|
const SUB_AGENT_PROTOCOL = `${shared_prompts_1.SUBAGENT_OUTPUT_CONTRACT}
|
|
12
14
|
|
|
@@ -38,21 +40,30 @@ You are a sub-agent with the role: ${role}.
|
|
|
38
40
|
${instructions}`;
|
|
39
41
|
}
|
|
40
42
|
function createSubAgent(options) {
|
|
41
|
-
const {
|
|
43
|
+
const { role, instructions, tools, modelId, traceRun, timeZone } = options;
|
|
42
44
|
const systemPrompt = buildSubAgentPrompt(role, instructions, timeZone);
|
|
43
|
-
const agent = new
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
content: systemPrompt,
|
|
49
|
-
providerOptions: {
|
|
50
|
-
anthropic: { cacheControl: { type: 'ephemeral' } },
|
|
51
|
-
},
|
|
45
|
+
const agent = new agents_1.Agent(`Sub-Agent: ${role}`)
|
|
46
|
+
.model(modelId)
|
|
47
|
+
.instructions(systemPrompt, {
|
|
48
|
+
providerOptions: {
|
|
49
|
+
anthropic: { cacheControl: { type: 'ephemeral' } },
|
|
52
50
|
},
|
|
53
|
-
|
|
54
|
-
tools
|
|
51
|
+
})
|
|
52
|
+
.tool((0, tool_registry_1.toolRegistryValues)(tools))
|
|
53
|
+
.checkpoint(options.checkpointStore ?? 'memory');
|
|
54
|
+
(0, runtime_workspace_1.attachRuntimeWorkspaceCapabilities)(agent, {
|
|
55
|
+
workspace: options.workspace,
|
|
56
|
+
runtimeSkills: options.runtimeSkills,
|
|
57
|
+
});
|
|
58
|
+
const telemetry = options.tracing?.getTelemetry?.({
|
|
59
|
+
agentRole: role,
|
|
60
|
+
functionId: `instance-ai.subagent.${role.replace(/[^a-zA-Z0-9._-]+/g, '-')}`,
|
|
61
|
+
executionMode: options.tracing.traceKind === 'background_subagent' ? 'background_subagent' : 'background',
|
|
62
|
+
metadata: { agent_id: options.agentId },
|
|
55
63
|
});
|
|
64
|
+
if (telemetry) {
|
|
65
|
+
agent.telemetry(telemetry);
|
|
66
|
+
}
|
|
56
67
|
(0, langsmith_tracing_1.mergeTraceRunInputs)(traceRun, (0, langsmith_tracing_1.buildAgentTraceInputs)({
|
|
57
68
|
systemPrompt,
|
|
58
69
|
tools,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-agent-factory.js","sourceRoot":"","sources":["../../src/agent/sub-agent-factory.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"sub-agent-factory.js","sourceRoot":"","sources":["../../src/agent/sub-agent-factory.ts"],"names":[],"mappings":";;;AAgEA,kDAQC;AAED,wCAuCC;AAjHD,wCAAmG;AAEnG,iFAAsE;AACtE,2DAAyE;AACzE,qDAA+E;AAC/E,mDAAqD;AACrD,oDAAsD;AACtD,oEAA0F;AAmC1F,MAAM,kBAAkB,GAAG,GAAG,yCAAwB;;;;;;;;;;;;;;;;;IAiBlD,kCAAiB;IACjB,mDAAoB,EAAE,CAAC;AAElB,gDAAkB;AAE3B,SAAgB,mBAAmB,CAAC,IAAY,EAAE,YAAoB,EAAE,QAAiB;IACxF,OAAO,GAAG,kBAAkB;EAC3B,IAAA,kCAAkB,EAAC,QAAQ,CAAC;;qCAEO,IAAI;;;EAGvC,YAAY,EAAE,CAAC;AACjB,CAAC;AAED,SAAgB,cAAc,CAAC,OAAwB;IACtD,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAE3E,MAAM,YAAY,GAAG,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;IAEvE,MAAM,KAAK,GAAG,IAAI,cAAK,CAAC,cAAc,IAAI,EAAE,CAAC;SAC3C,KAAK,CAAC,OAAO,CAAC;SACd,YAAY,CAAC,YAAY,EAAE;QAC3B,eAAe,EAAE;YAChB,SAAS,EAAE,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE;SAClD;KACD,CAAC;SACD,IAAI,CAAC,IAAA,kCAAkB,EAAC,KAAK,CAAC,CAAC;SAC/B,UAAU,CAAC,OAAO,CAAC,eAAe,IAAI,QAAQ,CAAC,CAAC;IAClD,IAAA,sDAAkC,EAAC,KAAK,EAAE;QACzC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;KACpC,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC;QACjD,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,wBAAwB,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,GAAG,CAAC,EAAE;QAC5E,aAAa,EACZ,OAAO,CAAC,OAAO,CAAC,SAAS,KAAK,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,YAAY;QAC3F,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE;KACvC,CAAC,CAAC;IACH,IAAI,SAAS,EAAE,CAAC;QACf,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IAED,IAAA,uCAAmB,EAClB,QAAQ,EACR,IAAA,yCAAqB,EAAC;QACrB,YAAY;QACZ,KAAK;QACL,OAAO;KACP,CAAC,CACF,CAAC;IAEF,OAAO,KAAK,CAAC;AACd,CAAC"}
|
|
@@ -27,7 +27,10 @@ Some trigger nodes expose HTTP endpoints. Always share the full production URL w
|
|
|
27
27
|
|
|
28
28
|
- **Webhook Trigger**: ${webhookBaseUrl}/{path} (where {path} is the node's webhook path parameter).
|
|
29
29
|
- **Form Trigger**: ${formBaseUrl}/{path} (or ${formBaseUrl}/{webhookId} if no custom path is set). The Form Trigger lives under /form/, NOT /webhook/ — they are separate URL prefixes. Do NOT use the Webhook base URL for Form Triggers.
|
|
30
|
-
- **Chat Trigger**:
|
|
30
|
+
- **Chat Trigger**: how the end user reaches this workflow depends on the node's \`public\` parameter — pick the right guidance for the current value, do not default to sharing a URL.
|
|
31
|
+
- **\`public: false\` (the default)**: there is NO end-user HTTP URL. Tell the user to open the workflow in the editor and click the **Open chat** button on the workflow canvas — that opens the built-in test chat where they can talk to the workflow. Do NOT share a webhook URL, and do NOT suggest flipping \`public: true\` just to enable testing — the in-editor chat is the intended testing path for private chat workflows.
|
|
32
|
+
- **\`public: true\`**: the public chat URL is ${webhookBaseUrl}/{webhookId}/chat — share it after the workflow is published. {webhookId} is the node's unique webhook ID; read it from the workflow JSON, never guess. End users can open this URL in a browser.
|
|
33
|
+
The /chat suffix is unique to Chat Trigger — do NOT append it to Form Trigger or Webhook URLs. (Your own testing via \`executions(action="run")\` and \`verify-built-workflow\` works regardless of \`public\` or publish state.)
|
|
31
34
|
|
|
32
35
|
**These URLs are for sharing with the user only.** Do NOT include them in \`build-workflow-with-agent\` task descriptions — the builder cannot reach the n8n instance via HTTP and will fail if it tries to curl/fetch these URLs.`;
|
|
33
36
|
}
|
|
@@ -65,13 +68,15 @@ You have access to workflow, execution, and credential tools plus a specialized
|
|
|
65
68
|
|
|
66
69
|
Route by **what you are touching**, not by how risky the change feels:
|
|
67
70
|
|
|
68
|
-
1. **New workflow (no \`workflowId\`)
|
|
71
|
+
1. **New workflow (no \`workflowId\`) or multi-workflow build** → call \`plan\`. If the workflow will create, read, update, seed, import, or store records in n8n Data Tables, load the \`data-table-manager\` skill before \`plan\` and carry the relevant table guidance into \`guidance\` or \`conversationContext\`. The planner sub-agent discovers credentials, data tables, and best practices; workflow tasks include any data table names, columns, seed/import needs, or existing-table requirements in the workflow spec, and the builder creates/uses them. The orchestrator-run checkpoint independently proves every workflow deliverable works. Do NOT ask the user questions first — the planner asks targeted questions itself if needed. Only pass \`guidance\` when the conversation is ambiguous or when you need to pass loaded skill guidance. When \`plan\` returns, tasks are already dispatched.
|
|
69
72
|
|
|
70
73
|
2. **Any edit to an existing workflow that runs the builder** (add/remove/rewire a node, change an expression, swap a credential, change a schedule, fix a Code node) → call \`build-workflow-with-agent\` directly with \`bypassPlan: true\`, the existing \`workflowId\`, and a one-sentence \`reason\`. A plan-for-every-edit is too slow; the orchestrator runs a lightweight verify afterwards (see **Post-build flow**).
|
|
71
74
|
|
|
72
75
|
3. **Non-build ops on an existing workflow** (rename, toggle active, duplicate, move to folder, describe, read executions, publish, delete) → use the specific direct tool (\`workflows\`, \`executions\`, etc.). The builder does not run.
|
|
73
76
|
|
|
74
|
-
4. **
|
|
77
|
+
4. **Standalone data-table work** (list/show/inspect/schema/query/create/import/seed/insert/update/delete/rename columns/clean up rows without building a workflow) → load the \`data-table-manager\` skill, then call \`data-tables\` and \`parse-file\` directly. Natural requests like "what data tables do I have?", "show/list my tables", "what columns are in this table?", "query this table", and "insert/update/delete rows" all count as standalone data-table work. Do not call \`plan\`, \`create-tasks\`, or \`delegate\` for standalone data-table work.
|
|
78
|
+
|
|
79
|
+
5. **Replan follow-up** (\`<planned-task-follow-up type="replan">\`) → route, don't re-plan. If one simple task remains (e.g. a single data-table op, credential setup, or single-workflow patch), handle it directly with the matching tool. If multiple dependent tasks still need scheduling, call \`create-tasks\` (a runtime guard rejects \`create-tasks\` outside a replan context). If nothing sensible remains, explain the blocker to the user. **Never end a replan turn with only an acknowledgement** — the scheduler will not fire another follow-up until you act, and the thread will silently stall.
|
|
75
80
|
|
|
76
81
|
Use \`task-control(action="update-checklist")\` only for lightweight visible checklists that do not need scheduler-driven execution.
|
|
77
82
|
|
|
@@ -85,7 +90,7 @@ When \`credentials(action="setup")\` returns \`needsBrowserSetup=true\`, call \`
|
|
|
85
90
|
|
|
86
91
|
Never use \`delegate\` to build, patch, fix, or update workflows — delegate does not have access to the builder sandbox, verification, or submit tools.
|
|
87
92
|
|
|
88
|
-
To edit an existing workflow, call \`build-workflow-with-agent\` directly with \`bypassPlan: true\`, the existing \`workflowId\`, a one-sentence \`reason\`, and a \`task\` spec describing what to change. The orchestrator verifies the result afterwards via \`verify-built-workflow\` when the build outcome says verification is ready (see **Post-build flow**). Use \`plan\` only when the change spans multiple workflows, creates new workflows, or needs new or changed data-table schemas — then the orchestrator-run checkpoint drives verification.
|
|
93
|
+
To edit an existing workflow, call \`build-workflow-with-agent\` directly with \`bypassPlan: true\`, the existing \`workflowId\`, a one-sentence \`reason\`, and a \`task\` spec describing what to change. The orchestrator verifies the result afterwards via \`verify-built-workflow\` when the build outcome says verification is ready (see **Post-build flow**). Use \`plan\` only when the change spans multiple workflows, creates new workflows, or a workflow build needs new or changed data-table schemas — then the orchestrator-run checkpoint drives verification.
|
|
89
94
|
|
|
90
95
|
The detached builder handles node discovery, schema lookups, resource discovery, code generation, validation, and saving. Describe **what** to build (or fix), not **how**: user goal, integrations, credential names, data flow, data table schemas. Don't specify node types or parameter configurations. Mention integrations by service name (Slack, Google Calendar) but don't specify which channels, calendars, spreadsheets, folders, or other resources to use — the builder resolves real resource IDs at build time.
|
|
91
96
|
|
|
@@ -93,7 +98,7 @@ The detached builder handles node discovery, schema lookups, resource discovery,
|
|
|
93
98
|
|
|
94
99
|
**Never hardcode fake user data in the task spec** — no \`user@example.com\`, \`YOUR_API_KEY\`, \`Bearer YOUR_TOKEN\`, sample Slack channel IDs, fake Telegram chat IDs, fake Teams thread IDs, sample recipient lists (\`alice@company.com\`, etc.). When the user hasn't provided a specific value, describe the slot generically ("user's email address", "target Slack channel", "API bearer token") and let the builder wrap it with \`placeholder()\` so \`workflows(action="setup")\` can collect it after the build through the inline setup card in the AI Assistant panel.
|
|
95
100
|
|
|
96
|
-
Always pass \`conversationContext\` when spawning background agents (\`build-workflow-with-agent\`, \`delegate
|
|
101
|
+
Always pass \`conversationContext\` when spawning background agents (\`build-workflow-with-agent\`, \`delegate\`) — summarize what was discussed, decisions made, and information gathered. Exception: \`plan\` reads the conversation history directly — only pass \`guidance\` if the context is ambiguous.
|
|
97
102
|
|
|
98
103
|
**After spawning any background agent** (\`build-workflow-with-agent\`, \`delegate\`, \`plan\`, or \`create-tasks\`): do not write any text. The task card shows the user what's being built or done; restating it (e.g. the workflow name, what the agent will do) is redundant. Do NOT summarize the plan, list credentials, describe what the agent will do, or add status details. The agent's progress is already visible to the user in real time.
|
|
99
104
|
|
|
@@ -101,6 +106,8 @@ Always pass \`conversationContext\` when spawning background agents (\`build-wor
|
|
|
101
106
|
|
|
102
107
|
**Ask once when a service has multiple credentials of the same type.** If \`credentials(action="list")\` shows more than one entry of the type a requested integration needs (e.g. two \`openAiApi\` accounts, three Google Calendar accounts), use \`ask-user\` with a single-select to let the user pick one before dispatching the builder, and pass the choice through \`conversationContext\` by name. Exception: the user already named the credential in their message — use it directly. With a single candidate, auto-apply and do not ask.
|
|
103
108
|
|
|
109
|
+
**Ask which auth type to use when a service supports more than one.** \`credentials(action="setup")\` opens a picker locked to a single \`credentialType\` — the user cannot switch auth types from there. So when \`credentials(action="search-types")\` returns more than one auth option for a service (e.g. \`notionApi\` and \`notionOAuth2Api\`, or \`slackApi\` and \`slackOAuth2Api\`), use \`ask-user\` with a single-select to let the user pick the auth type before calling \`credentials(action="setup")\`. List OAuth2 first and present it as the recommended option. Exception: the user has clearly indicated an auth type (e.g. "api key", "oauth", "personal token") — map it to the matching \`credentialType\` and use it directly without asking.
|
|
110
|
+
|
|
104
111
|
${credential_guardrails_prompt_1.SECRET_ASK_GUARDRAIL}
|
|
105
112
|
|
|
106
113
|
**Post-build flow** (for direct \`build-workflow-with-agent\` calls with \`bypassPlan: true\` — checkpoint follow-ups must apply the same setup handoff before completing):
|
|
@@ -122,7 +129,7 @@ ${credential_guardrails_prompt_1.SECRET_ASK_GUARDRAIL}
|
|
|
122
129
|
|
|
123
130
|
- **Testing event-triggered workflows**: use \`executions(action="run")\` with \`inputData\` matching the trigger's output shape — do not rebuild the workflow with a Manual Trigger.
|
|
124
131
|
- **Include entity names** — when a tool accepts an optional name parameter (e.g. \`workflowName\`, \`folderName\`, \`credentialName\`), always pass it. The name is shown to the user in confirmation dialogs.
|
|
125
|
-
- **Data tables**:
|
|
132
|
+
- **Data tables**: load the \`data-table-manager\` skill before standalone list/schema/query/create/delete/add-column/delete-column/rename-column/insert-rows/update-rows/delete-rows work, then call \`data-tables\` directly; use \`parse-file\` for attached CSV/XLSX/JSON inputs. Always pass \`dataTableName\` and \`projectId\` after a list/lookup reveals them so previews and approval cards can target the right table. Do not call \`plan\`, \`create-tasks\`, or \`delegate\` for standalone data-table work. When building workflows that need tables, load the skill before planning/building and describe table requirements in the workflow task spec — the builder creates/uses them.
|
|
126
133
|
|
|
127
134
|
${toolSearchEnabled
|
|
128
135
|
? `## Tool Discovery
|
|
@@ -140,7 +147,7 @@ Examples: search "credential" for the credentials tool, search "file" for filesy
|
|
|
140
147
|
- No emojis unless the user explicitly requests them.
|
|
141
148
|
- At the beginning of a normal user-visible turn, before your first tool call, write one short sentence explaining what you are about to do or what decision you need. Keep it tied to the user's goal, not the tool name. For system-generated background or checkpoint follow-up turns, follow the follow-up instructions.
|
|
142
149
|
- Never let an empty assistant message or a \`[Calling tools: ...]\` placeholder be the first visible response.
|
|
143
|
-
- End every tool call sequence with a brief text summary — the user cannot see raw tool output. Do not end your turn silently after tool calls. Exception: after spawning a background agent (\`build-workflow-with-agent\`, \`plan\`, \`create-tasks\`, \`delegate
|
|
150
|
+
- End every tool call sequence with a brief text summary — the user cannot see raw tool output. Do not end your turn silently after tool calls. Exception: after spawning a background agent (\`build-workflow-with-agent\`, \`plan\`, \`create-tasks\`, \`delegate\`) the task card replaces your reply — do not write text.
|
|
144
151
|
|
|
145
152
|
## Safety
|
|
146
153
|
|
|
@@ -163,11 +170,7 @@ The following features require a license that is not active on this instance. If
|
|
|
163
170
|
${licenseHints.map((h) => `- ${h}`).join('\n')}
|
|
164
171
|
|
|
165
172
|
`
|
|
166
|
-
: ''}${getReadOnlySection(branchReadOnly)}##
|
|
167
|
-
|
|
168
|
-
When \`<conversation-summary>\` is present in your input, treat it as compressed prior context from earlier turns. Use the recent raw messages for exact wording and details; use the summary for long-range continuity (user goals, past decisions, workflow state). Do not repeat the summary back to the user.
|
|
169
|
-
|
|
170
|
-
## Working Memory
|
|
173
|
+
: ''}${getReadOnlySection(branchReadOnly)}## Working Memory
|
|
171
174
|
|
|
172
175
|
Working memory persists across all your conversations with this user. Keep it focused and useful:
|
|
173
176
|
|
|
@@ -180,17 +183,17 @@ Working memory persists across all your conversations with this user. Keep it fo
|
|
|
180
183
|
|
|
181
184
|
When \`plan\` or \`create-tasks\` returns, tasks are already running. Write one short sentence acknowledging the work, then end your turn. Do not summarize — the user already approved the plan. Wait for \`<planned-task-follow-up>\` to arrive; do not invent synthetic follow-up turns.
|
|
182
185
|
|
|
183
|
-
**Never poll and never sleep.** Background tasks (\`build-workflow-with-agent\`, \`
|
|
186
|
+
**Never poll and never sleep.** Background tasks (\`build-workflow-with-agent\`, \`delegate\`) settle via \`<planned-task-follow-up>\` turns that arrive automatically when work finishes. After you spawn or acknowledge one, end your turn. Do not call \`workflows(action="list")\`, \`executions(action="list")\`, or any shell command to check progress — you will receive a follow-up turn the moment the task settles. If a task appears stuck, tell the user and stop; do not try to detect completion yourself. Do not re-dispatch a build whose task ID is already visible in \`<running-tasks>\` — a duplicate call is rejected with a \`Build already in progress\` message.
|
|
184
187
|
|
|
185
188
|
When \`<running-tasks>\` context is present, use it only to reference active task IDs for cancellation or corrections.
|
|
186
189
|
|
|
187
190
|
When \`<planned-task-follow-up type="synthesize">\` is present, all planned tasks completed successfully. Treat verified workflow drafts as finished deliverables — they are ready to use. Write a concise completion message that names each delivered artifact (data tables, workflows) and summarizes what it does, using the user's time zone for any scheduled timings. Do not hedge with phrases like "ready to go live" or "let me know when you're ready" — the work is done. If any workflow is unpublished, state that plainly as a one-line next-step note ("Publish when you want it live — you can do that from the workflow editor."), not as a gating condition. Do not create another plan.
|
|
188
191
|
|
|
189
|
-
When \`<planned-task-follow-up type="replan">\` is present, a planned task failed and the graph is in \`awaiting_replan\`. You MUST take action in this same turn — handle a single simple task directly (matching tool: \`build-workflow-with-agent\`, \`
|
|
192
|
+
When \`<planned-task-follow-up type="replan">\` is present, a planned task failed and the graph is in \`awaiting_replan\`. You MUST take action in this same turn — handle a single simple task directly (matching tool: \`build-workflow-with-agent\`, \`data-tables\`, \`delegate\`, etc.), call \`create-tasks\` for multiple dependent tasks, or explain the blocker to the user if nothing sensible remains. Do NOT reply with an acknowledgement or status update alone — the scheduler will not fire another follow-up until you act, and the thread will silently stall. Apply the replan branch from \`## When to Plan\` above.
|
|
190
193
|
|
|
191
194
|
When \`<planned-task-follow-up type="checkpoint">\` is present, the block contains exactly one checkpoint task (\`checkpoint.id\`, \`checkpoint.title\`, \`checkpoint.instructions\`, and \`checkpoint.dependsOn\` — the outcomes of prior tasks, including workflow build outcomes with their \`outcome.workItemId\` / \`outcome.workflowId\`). **Always require structured verification evidence — never trust builder prose.** If a dependency outcome contains successful \`outcome.verification\` tool evidence (\`attempted: true\`, \`success: true\`, an \`executionId\`, and executed-node evidence), use that evidence without re-running verification. Otherwise execute \`checkpoint.instructions\` using your tools — typically \`verify-built-workflow\` with the work item ID from the dependency outcome, or \`executions(action="run")\` for a built workflow with real credentials and a testable trigger. If verification succeeds and any verified workflow dependency outcome has \`outcome.setupRequirement.status === "required"\`, call \`workflows(action="setup")\` with that workflowId before \`complete-checkpoint\`; the inline setup card appears automatically in the AI Assistant panel, so do not tell the user to open the editor, use the canvas, or click a Setup button. If setup returns \`deferred: true\`, respect it and still complete the checkpoint with a result that says setup was deferred. Do not call \`credentials(action="setup")\` or \`apply-workflow-credentials\` for workflow setup. Then call \`complete-checkpoint(taskId, status, result)\` **exactly once** to report the outcome (\`status: "succeeded"\` on pass, \`"failed"\` on a verification failure). Do not create a new plan, do not write a user-facing message — the checkpoint card in the plan checklist is the user-visible surface. End your turn as soon as \`complete-checkpoint\` returns.
|
|
192
195
|
|
|
193
|
-
When \`<background-task-completed>\` is present, a detached background task (builder
|
|
196
|
+
When \`<background-task-completed>\` is present, a detached background task (builder or delegate) finished. The \`result\` field holds the sub-agent's authoritative summary of what was actually done. **When you write the user-facing recap, take factual details — model IDs, node names, resource IDs, parameter values — directly from this \`result\` text.** Do not substitute values from conversation history or training priors: if the \`result\` says \`gpt-5.4-mini\`, write \`gpt-5.4-mini\`, not "GPT-4o mini" or any other name you associate with the provider. The task spec describes intent; the \`result\` describes what actually happened.
|
|
194
197
|
|
|
195
198
|
**If your verification surfaced a bug you can patch in place** (e.g., a Code-node shape issue), you MAY call \`build-workflow-with-agent\` directly during this checkpoint turn to apply the fix. When the patch builder settles, you will receive another \`<planned-task-follow-up type="checkpoint">\` for the SAME checkpoint — re-verify, then on the next re-entry either call \`complete-checkpoint\` (succeeded / failed) OR spawn one more in-checkpoint patch when the first surfaced a new narrow bug. Do NOT end a checkpoint turn that had an in-turn patch spawned without either calling \`complete-checkpoint\` on the next re-entry or spawning another bounded patch. Keep the patch count small: if the issue cannot be narrowed within two rounds, call \`complete-checkpoint(status="failed", error=...)\` with a summary of what remains and let replan take over.
|
|
196
199
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/agent/system-prompt.ts"],"names":[],"mappings":";;AAqBA,gDASC;
|
|
1
|
+
{"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/agent/system-prompt.ts"],"names":[],"mappings":";;AAqBA,gDASC;AA2CD,0CAsKC;AA/OD,iCAAiC;AAEjC,+DAA6D;AAC7D,iFAAsE;AACtE,qDAA8D;AAiB9D,SAAgB,kBAAkB,CAAC,QAAiB;IACnD,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,gBAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAQ,CAAC,GAAG,EAAE,CAAC;IACzE,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,OAAO;;;6CAGqC,OAAO,GAAG,OAAO;0DACJ,CAAC;AAC3D,CAAC;AAED,SAAS,sBAAsB,CAAC,cAAsB,EAAE,WAAmB;IAC1E,OAAO;;;oBAGY,cAAc;iBACjB,WAAW;;;;yBAIH,cAAc;sBACjB,WAAW,eAAe,WAAW;;;mDAGR,cAAc;;;mOAGkK,CAAC;AACpO,CAAC;AAED,SAAS,kBAAkB,CAAC,cAAwB;IACnD,IAAI,CAAC,cAAc;QAAE,OAAO,EAAE,CAAC;IAC/B,OAAO;;;;;;;;;;;;;;;;;CAiBP,CAAC;AACF,CAAC;AAED,SAAgB,eAAe,CAAC,UAA+B,EAAE;IAChE,MAAM,EACL,cAAc,EACd,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,cAAc,GACd,GAAG,OAAO,CAAC;IAEZ,OAAO;EACN,kBAAkB,CAAC,QAAQ,CAAC;EAC5B,cAAc,IAAI,WAAW,CAAC,CAAC,CAAC,sBAAsB,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDxF,mDAAoB;;;;;;;;;;;;;;;;;;;;;;;EAwBrB,iBAAiB;QAChB,CAAC,CAAC;;;;;;;;CAQH;QACC,CAAC,CAAC,EACJ;;;;;;;;;;;;;;;;;;EAkBE,2CAA0B;EAC1B,IAAA,0CAAoB,EAAC,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC;;EAGzD,YAAY,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC;QACtC,CAAC,CAAC;;;;EAIF,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;CAE7C;QACC,CAAC,CAAC,EACJ,GAAG,kBAAkB,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uIAqCkG,CAAC;AACxI,CAAC"}
|