n8n 2.21.6 → 2.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-workflow-manager.js +4 -0
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/base-command.js +2 -1
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/export/entities.d.ts +3 -0
- package/dist/commands/export/entities.js +8 -1
- package/dist/commands/export/entities.js.map +1 -1
- package/dist/concurrency/concurrency-control.service.d.ts +7 -2
- package/dist/concurrency/concurrency-control.service.js +72 -47
- package/dist/concurrency/concurrency-control.service.js.map +1 -1
- package/dist/constants.js +3 -0
- package/dist/constants.js.map +1 -1
- package/dist/controllers/e2e.controller.js +2 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +1 -1
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/evaluation.ee/evaluation-collection.service.d.ts +38 -0
- package/dist/evaluation.ee/evaluation-collection.service.js +327 -0
- package/dist/evaluation.ee/evaluation-collection.service.js.map +1 -0
- package/dist/evaluation.ee/evaluation-collections.controller.ee.d.ts +50 -0
- package/dist/evaluation.ee/evaluation-collections.controller.ee.js +148 -0
- package/dist/evaluation.ee/evaluation-collections.controller.ee.js.map +1 -0
- package/dist/evaluation.ee/evaluation-concurrency.helper.d.ts +11 -0
- package/dist/evaluation.ee/evaluation-concurrency.helper.js +40 -0
- package/dist/evaluation.ee/evaluation-concurrency.helper.js.map +1 -0
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +22 -6
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +105 -15
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runs.controller.ee.d.ts +5 -6
- package/dist/evaluation.ee/test-runs.controller.ee.js +4 -24
- package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
- package/dist/interfaces.d.ts +6 -0
- package/dist/modules/agents/adapters/agents-credential-provider.d.ts +2 -1
- package/dist/modules/agents/adapters/agents-credential-provider.js +25 -24
- package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.js +0 -1
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.d.ts +1 -2
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-sse-stream.d.ts +1 -1
- package/dist/modules/agents/agent-sse-stream.js +0 -31
- package/dist/modules/agents/agent-sse-stream.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +64 -37
- package/dist/modules/agents/agents.controller.js +54 -40
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +15 -5
- package/dist/modules/agents/agents.service.js +79 -71
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agent-builder-preview-path.d.ts +1 -0
- package/dist/modules/agents/builder/agent-builder-preview-path.js +9 -0
- package/dist/modules/agents/builder/agent-builder-preview-path.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-model-recommendations.d.ts +3 -0
- package/dist/modules/agents/builder/agents-builder-model-recommendations.js +106 -0
- package/dist/modules/agents/builder/agents-builder-model-recommendations.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +12 -11
- package/dist/modules/agents/builder/agents-builder-prompts.js +61 -32
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +7 -8
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.js +6 -3
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js +1 -1
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +0 -1
- package/dist/modules/agents/entities/agent-execution.entity.js +0 -4
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-observation-lock.entity.d.ts +2 -0
- package/dist/modules/agents/entities/agent-observation-lock.entity.js +4 -0
- package/dist/modules/agents/entities/agent-observation-lock.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-observation.entity.d.ts +9 -5
- package/dist/modules/agents/entities/agent-observation.entity.js +21 -11
- package/dist/modules/agents/entities/agent-observation.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-published-version.entity.d.ts +1 -2
- package/dist/modules/agents/entities/agent-published-version.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent.entity.d.ts +2 -3
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/execution-recorder.d.ts +1 -8
- package/dist/modules/agents/execution-recorder.js +67 -42
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +6 -4
- package/dist/modules/agents/integrations/agent-chat-bridge.js +22 -13
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +4 -1
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +17 -8
- package/dist/modules/agents/integrations/chat-integration.service.js +53 -37
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/integrations-sync.d.ts +2 -2
- package/dist/modules/agents/integrations/integrations-sync.js +1 -1
- package/dist/modules/agents/integrations/integrations-sync.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-memory.d.ts +31 -35
- package/dist/modules/agents/integrations/n8n-memory.js +121 -127
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +9 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +51 -6
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/json-config/agent-config-composition.d.ts +2 -3
- package/dist/modules/agents/json-config/agent-config-composition.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.d.ts +1 -2
- package/dist/modules/agents/json-config/from-json-config.js +31 -34
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/observation-log-observer.d.ts +2 -0
- package/dist/modules/agents/observation-log-observer.js +10 -0
- package/dist/modules/agents/observation-log-observer.js.map +1 -0
- package/dist/modules/agents/observation-log-reflector.d.ts +2 -0
- package/dist/modules/agents/observation-log-reflector.js +9 -0
- package/dist/modules/agents/observation-log-reflector.js.map +1 -0
- package/dist/modules/agents/repositories/agent-published-version.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent.repository.js +1 -1
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/tools/node-tool-factory.d.ts +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.js +40 -2
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/execution-to-message-mapper.d.ts +6 -0
- package/dist/modules/agents/utils/execution-to-message-mapper.js +133 -0
- package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub-workflow.service.js +9 -0
- package/dist/modules/chat-hub/chat-hub-workflow.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.constants.js +4 -0
- package/dist/modules/chat-hub/chat-hub.constants.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.models.service.d.ts +1 -0
- package/dist/modules/chat-hub/chat-hub.models.service.js +43 -0
- package/dist/modules/chat-hub/chat-hub.models.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.module.d.ts +3 -3
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +7 -7
- package/dist/modules/chat-hub/context-limits.js +1 -0
- package/dist/modules/chat-hub/context-limits.js.map +1 -1
- package/dist/modules/chat-hub/dto/chat-models-request.dto.d.ts +2 -2
- package/dist/modules/community-packages/community-node-types-utils.d.ts +1 -1
- package/dist/modules/community-packages/community-node-types-utils.js +1 -1
- package/dist/modules/community-packages/community-node-types-utils.js.map +1 -1
- package/dist/modules/community-packages/community-node-types.service.js +1 -1
- package/dist/modules/community-packages/community-node-types.service.js.map +1 -1
- package/dist/modules/data-table/utils/sql-utils.d.ts +2 -0
- package/dist/modules/data-table/utils/sql-utils.js +26 -9
- package/dist/modules/data-table/utils/sql-utils.js.map +1 -1
- package/dist/modules/inbound-secrets/inbound-secrets-context-hook.d.ts +10 -0
- package/dist/modules/inbound-secrets/inbound-secrets-context-hook.js +55 -0
- package/dist/modules/inbound-secrets/inbound-secrets-context-hook.js.map +1 -0
- package/dist/modules/inbound-secrets/inbound-secrets.config.d.ts +3 -0
- package/dist/modules/inbound-secrets/inbound-secrets.config.js +27 -0
- package/dist/modules/inbound-secrets/inbound-secrets.config.js.map +1 -0
- package/dist/modules/inbound-secrets/inbound-secrets.module.d.ts +4 -0
- package/dist/modules/inbound-secrets/inbound-secrets.module.js +61 -0
- package/dist/modules/inbound-secrets/inbound-secrets.module.js.map +1 -0
- package/dist/modules/inbound-secrets/inbound-secrets.schemas.d.ts +3 -0
- package/dist/modules/inbound-secrets/inbound-secrets.schemas.js +6 -0
- package/dist/modules/inbound-secrets/inbound-secrets.schemas.js.map +1 -0
- package/dist/modules/inbound-secrets/inbound-secrets.service.d.ts +17 -0
- package/dist/modules/inbound-secrets/inbound-secrets.service.js +76 -0
- package/dist/modules/inbound-secrets/inbound-secrets.service.js.map +1 -0
- package/dist/modules/inbound-secrets/path-traversal.d.ts +4 -0
- package/dist/modules/inbound-secrets/path-traversal.js +51 -0
- package/dist/modules/inbound-secrets/path-traversal.js.map +1 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +1 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +19 -4
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -1
- package/dist/modules/insights/database/repositories/insights-raw.repository.js +1 -0
- package/dist/modules/insights/database/repositories/insights-raw.repository.js.map +1 -1
- package/dist/modules/insights/insights-compaction.service.d.ts +5 -0
- package/dist/modules/insights/insights-compaction.service.js +93 -18
- package/dist/modules/insights/insights-compaction.service.js.map +1 -1
- package/dist/modules/insights/insights.config.d.ts +3 -0
- package/dist/modules/insights/insights.config.js +15 -0
- package/dist/modules/insights/insights.config.js.map +1 -1
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +17 -0
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +61 -0
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js.map +1 -0
- package/dist/modules/instance-ai/eval/execution.service.js +8 -2
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.d.ts +1 -0
- package/dist/modules/instance-ai/eval/mock-handler.js +116 -72
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-quirks.d.ts +10 -0
- package/dist/modules/instance-ai/eval/mock-quirks.js +25 -0
- package/dist/modules/instance-ai/eval/mock-quirks.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +14 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +25 -5
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +10 -3
- package/dist/modules/instance-ai/instance-ai.controller.js +34 -2
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +2 -1
- package/dist/modules/instance-ai/instance-ai.service.js +75 -29
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/index.d.ts +1 -1
- package/dist/modules/instance-ai/liveness/index.js.map +1 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +12 -3
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +21 -11
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/run-timeout-details.d.ts +8 -0
- package/dist/modules/instance-ai/run-timeout-details.js +3 -0
- package/dist/modules/instance-ai/run-timeout-details.js.map +1 -0
- package/dist/modules/instance-ai/run-trace-metadata.d.ts +15 -0
- package/dist/modules/instance-ai/run-trace-metadata.js +63 -0
- package/dist/modules/instance-ai/run-trace-metadata.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.d.ts +5 -3
- package/dist/modules/instance-version-history/instance-version-history.controller.js +9 -9
- package/dist/modules/instance-version-history/instance-version-history.controller.js.map +1 -1
- package/dist/modules/mcp/mcp-api-key.service.js +1 -0
- package/dist/modules/mcp/mcp-api-key.service.js.map +1 -1
- package/dist/modules/mcp/mcp-oauth-token.service.d.ts +7 -2
- package/dist/modules/mcp/mcp-oauth-token.service.js +16 -6
- package/dist/modules/mcp/mcp-oauth-token.service.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +2 -0
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +1 -0
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +2 -0
- package/dist/modules/mcp/tools/workflow-builder/credential-validation.d.ts +15 -0
- package/dist/modules/mcp/tools/workflow-builder/credential-validation.js +91 -0
- package/dist/modules/mcp/tools/workflow-builder/credential-validation.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +228 -3
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +74 -60
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +251 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +447 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.d.ts +4 -3
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js +6 -3
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js.map +1 -1
- package/dist/modules/mcp-registry/mcp-registry-test.controller.d.ts +12 -0
- package/dist/modules/mcp-registry/mcp-registry-test.controller.js +49 -0
- package/dist/modules/mcp-registry/mcp-registry-test.controller.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-registry.module.d.ts +2 -0
- package/dist/modules/mcp-registry/mcp-registry.module.js +12 -2
- package/dist/modules/mcp-registry/mcp-registry.module.js.map +1 -1
- package/dist/modules/mcp-registry/node-description-transform.js +16 -2
- package/dist/modules/mcp-registry/node-description-transform.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-api.client.d.ts +8 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js +58 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.entity.d.ts +36 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.entity.js +46 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.entity.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.repository.d.ts +5 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.repository.js +26 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-server.repository.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +37 -4
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +196 -12
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +9 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js +29 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mock-servers.js +2 -0
- package/dist/modules/mcp-registry/registry/mock-servers.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.js +4 -2
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/otel.constants.d.ts +1 -0
- package/dist/modules/otel/otel.constants.js +1 -0
- package/dist/modules/otel/otel.constants.js.map +1 -1
- package/dist/modules/otel/otel.module.d.ts +3 -0
- package/dist/modules/otel/otel.module.js +5 -0
- package/dist/modules/otel/otel.module.js.map +1 -1
- package/dist/modules/redaction/executions/execution-redaction.service.js +8 -3
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/redaction/instance-redaction-enforcement.service.d.ts +14 -0
- package/dist/modules/redaction/instance-redaction-enforcement.service.js +91 -0
- package/dist/modules/redaction/instance-redaction-enforcement.service.js.map +1 -0
- package/dist/modules/redaction/redaction-enforcement.feature-flag.d.ts +2 -0
- package/dist/modules/redaction/redaction-enforcement.feature-flag.js +9 -0
- package/dist/modules/redaction/redaction-enforcement.feature-flag.js.map +1 -0
- package/dist/modules/redaction/redaction-enforcement.service.d.ts +8 -0
- package/dist/modules/redaction/redaction-enforcement.service.js +38 -0
- package/dist/modules/redaction/redaction-enforcement.service.js.map +1 -0
- package/dist/modules/redaction/redaction.config.d.ts +3 -0
- package/dist/modules/redaction/redaction.config.js +27 -0
- package/dist/modules/redaction/redaction.config.js.map +1 -0
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +3 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +14 -6
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +1 -1
- package/dist/modules/workflow-index/workflow-index.service.js.map +1 -1
- package/dist/oauth/oauth.service.js +1 -0
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/posthog/index.d.ts +0 -1
- package/dist/posthog/index.js +2 -10
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +2 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +6 -3
- package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
- package/dist/scaling/scaling.service.js +3 -2
- package/dist/scaling/scaling.service.js.map +1 -1
- package/dist/server.d.ts +1 -0
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/dist/services/export.service.d.ts +6 -1
- package/dist/services/export.service.js +97 -1
- package/dist/services/export.service.js.map +1 -1
- package/dist/services/frontend.service.js +3 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.d.ts +2 -1
- package/dist/services/import.service.js +70 -22
- package/dist/services/import.service.js.map +1 -1
- package/dist/telemetry/index.d.ts +13 -1
- package/dist/telemetry/index.js +54 -18
- package/dist/telemetry/index.js.map +1 -1
- package/dist/{modules/community-packages → utils}/strapi-utils.js +2 -2
- package/dist/utils/strapi-utils.js.map +1 -0
- package/dist/workflows/workflow-history/workflow-history.controller.d.ts +9 -0
- package/dist/workflows/workflow-history/workflow-history.controller.js +17 -0
- package/dist/workflows/workflow-history/workflow-history.controller.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.d.ts +16 -2
- package/dist/workflows/workflow-history/workflow-history.service.js +55 -1
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +3 -1
- package/dist/workflows/workflow.service.js +6 -2
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +36 -36
- package/dist/modules/agents/json-config/agent-json-config.d.ts +0 -1022
- package/dist/modules/agents/json-config/agent-json-config.js +0 -128
- package/dist/modules/agents/json-config/agent-json-config.js.map +0 -1
- package/dist/modules/agents/json-config/integration-config.d.ts +0 -61
- package/dist/modules/agents/json-config/integration-config.js +0 -33
- package/dist/modules/agents/json-config/integration-config.js.map +0 -1
- package/dist/modules/community-packages/strapi-utils.js.map +0 -1
- package/dist/modules/mcp-registry/mcp-registry-node-loader.test.d.ts +0 -1
- package/dist/modules/mcp-registry/mcp-registry-node-loader.test.js +0 -244
- package/dist/modules/mcp-registry/mcp-registry-node-loader.test.js.map +0 -1
- package/dist/modules/mcp-registry/node-description-transform.test.d.ts +0 -1
- package/dist/modules/mcp-registry/node-description-transform.test.js +0 -286
- package/dist/modules/mcp-registry/node-description-transform.test.js.map +0 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.test.d.ts +0 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.test.js +0 -41
- package/dist/modules/mcp-registry/registry/mcp-registry.service.test.js.map +0 -1
- /package/dist/{modules/community-packages → utils}/strapi-utils.d.ts +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateCredentialReferences = validateCredentialReferences;
|
|
4
|
+
const not_found_error_1 = require("../../../../errors/response-errors/not-found.error");
|
|
5
|
+
const fail = (opIndex, message) => ({
|
|
6
|
+
ok: false,
|
|
7
|
+
opIndex,
|
|
8
|
+
error: `Operation ${opIndex} failed: ${message}`,
|
|
9
|
+
});
|
|
10
|
+
async function validateCredentialReferences(operations, existingWorkflow, user, credentialsService, nodeTypes) {
|
|
11
|
+
const nameToNodeMeta = new Map();
|
|
12
|
+
for (const node of existingWorkflow.nodes) {
|
|
13
|
+
nameToNodeMeta.set(node.name, { type: node.type, typeVersion: node.typeVersion });
|
|
14
|
+
}
|
|
15
|
+
const credentialCache = new Map();
|
|
16
|
+
const lookupCredential = async (credentialId) => {
|
|
17
|
+
const cached = credentialCache.get(credentialId);
|
|
18
|
+
if (cached)
|
|
19
|
+
return cached;
|
|
20
|
+
try {
|
|
21
|
+
const credential = await credentialsService.getOne(user, credentialId, false);
|
|
22
|
+
const result = { type: credential.type };
|
|
23
|
+
credentialCache.set(credentialId, result);
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (error instanceof not_found_error_1.NotFoundError) {
|
|
28
|
+
credentialCache.set(credentialId, 'not-found');
|
|
29
|
+
return 'not-found';
|
|
30
|
+
}
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const checkCredentialReference = async (opIndex, nodeMeta, credentialKey, credentialId) => {
|
|
35
|
+
let description;
|
|
36
|
+
try {
|
|
37
|
+
description = nodeTypes.getByNameAndVersion(nodeMeta.type, nodeMeta.typeVersion).description;
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const accepted = description.credentials?.find((c) => c.name === credentialKey);
|
|
43
|
+
if (!accepted) {
|
|
44
|
+
return fail(opIndex, `node type '${nodeMeta.type}' does not accept credential '${credentialKey}'`);
|
|
45
|
+
}
|
|
46
|
+
const credential = await lookupCredential(credentialId);
|
|
47
|
+
if (credential === 'not-found') {
|
|
48
|
+
return fail(opIndex, `credential '${credentialId}' not found or not accessible`);
|
|
49
|
+
}
|
|
50
|
+
if (credential.type !== credentialKey) {
|
|
51
|
+
return fail(opIndex, `credential '${credentialId}' is type '${credential.type}' but '${credentialKey}' is expected`);
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
};
|
|
55
|
+
for (let i = 0; i < operations.length; i++) {
|
|
56
|
+
const op = operations[i];
|
|
57
|
+
if (op.type === 'addNode') {
|
|
58
|
+
const nodeMeta = { type: op.node.type, typeVersion: op.node.typeVersion };
|
|
59
|
+
if (op.node.credentials) {
|
|
60
|
+
for (const [key, value] of Object.entries(op.node.credentials)) {
|
|
61
|
+
if (!value.id)
|
|
62
|
+
continue;
|
|
63
|
+
const failure = await checkCredentialReference(i, nodeMeta, key, value.id);
|
|
64
|
+
if (failure)
|
|
65
|
+
return failure;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
nameToNodeMeta.set(op.node.name, nodeMeta);
|
|
69
|
+
}
|
|
70
|
+
else if (op.type === 'renameNode') {
|
|
71
|
+
const meta = nameToNodeMeta.get(op.oldName);
|
|
72
|
+
if (meta) {
|
|
73
|
+
nameToNodeMeta.delete(op.oldName);
|
|
74
|
+
nameToNodeMeta.set(op.newName, meta);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else if (op.type === 'removeNode') {
|
|
78
|
+
nameToNodeMeta.delete(op.nodeName);
|
|
79
|
+
}
|
|
80
|
+
else if (op.type === 'setNodeCredential') {
|
|
81
|
+
const meta = nameToNodeMeta.get(op.nodeName);
|
|
82
|
+
if (!meta)
|
|
83
|
+
continue;
|
|
84
|
+
const failure = await checkCredentialReference(i, meta, op.credentialKey, op.credentialId);
|
|
85
|
+
if (failure)
|
|
86
|
+
return failure;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return { ok: true };
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=credential-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-validation.js","sourceRoot":"","sources":["../../../../../src/modules/mcp/tools/workflow-builder/credential-validation.ts"],"names":[],"mappings":";;AA6CA,oEAiGC;AA1ID,8EAAyE;AAsBzE,MAAM,IAAI,GAAG,CAAC,OAAe,EAAE,OAAe,EAA+B,EAAE,CAAC,CAAC;IAChF,EAAE,EAAE,KAAK;IACT,OAAO;IACP,KAAK,EAAE,aAAa,OAAO,YAAY,OAAO,EAAE;CAChD,CAAC,CAAC;AAeI,KAAK,UAAU,4BAA4B,CACjD,UAA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AC;IACF,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -22,7 +22,7 @@ To build n8n workflows, follow these steps in order:
|
|
|
22
22
|
|
|
23
23
|
7. Create: Call ${constants_1.MCP_CREATE_WORKFLOW_FROM_CODE_TOOL.toolName} with the validated code to save the workflow to n8n. Include a short \`description\` (1-2 sentences) summarizing what the workflow does — this helps users find and understand their workflows.
|
|
24
24
|
|
|
25
|
-
8. Update: Call ${constants_1.MCP_UPDATE_WORKFLOW_TOOL.toolName} with the workflow ID and
|
|
25
|
+
8. Update: Call ${constants_1.MCP_UPDATE_WORKFLOW_TOOL.toolName} with the workflow ID and a list of operations (addNode, removeNode, updateNodeParameters, setNodeParameter, renameNode, addConnection, removeConnection, setNodeCredential, setNodePosition, setNodeDisabled, setWorkflowMetadata). The whole batch is atomic: if any op fails the workflow is unchanged. To modify an existing node's configuration, use updateNodeParameters or setNodeParameter — do NOT use removeNode followed by addNode for the same node, as this disconnects any attached sub-nodes (LLM models, memory, tools) and they will not be re-attached automatically.
|
|
26
26
|
|
|
27
27
|
9. Archive: Call ${constants_1.MCP_ARCHIVE_WORKFLOW_TOOL.toolName} with the workflow ID.`;
|
|
28
28
|
return isBuilderEnabled ? `${INTRO}\n\n${BUILDER_INSTRUCTIONS}` : INTRO;
|
|
@@ -10,9 +10,234 @@ import type { WorkflowFinderService } from '../../../../workflows/workflow-finde
|
|
|
10
10
|
import type { WorkflowService } from '../../../../workflows/workflow.service';
|
|
11
11
|
declare const inputSchema: {
|
|
12
12
|
workflowId: z.ZodString;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
operations: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
14
|
+
type: z.ZodLiteral<"updateNodeParameters">;
|
|
15
|
+
nodeName: z.ZodString;
|
|
16
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
17
|
+
replace: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
type: "updateNodeParameters";
|
|
20
|
+
nodeName: string;
|
|
21
|
+
parameters: Record<string, unknown>;
|
|
22
|
+
replace?: boolean | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
type: "updateNodeParameters";
|
|
25
|
+
nodeName: string;
|
|
26
|
+
parameters: Record<string, unknown>;
|
|
27
|
+
replace?: boolean | undefined;
|
|
28
|
+
}>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"setNodeParameter">;
|
|
30
|
+
nodeName: z.ZodString;
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
value: z.ZodEffects<z.ZodUnknown, {} | null, unknown>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
value: {} | null;
|
|
35
|
+
path: string;
|
|
36
|
+
type: "setNodeParameter";
|
|
37
|
+
nodeName: string;
|
|
38
|
+
}, {
|
|
39
|
+
path: string;
|
|
40
|
+
type: "setNodeParameter";
|
|
41
|
+
nodeName: string;
|
|
42
|
+
value?: unknown;
|
|
43
|
+
}>, z.ZodObject<{
|
|
44
|
+
type: z.ZodLiteral<"addNode">;
|
|
45
|
+
node: z.ZodObject<{
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
type: z.ZodString;
|
|
48
|
+
typeVersion: z.ZodNumber;
|
|
49
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
50
|
+
position: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, [number, number], number[]>>;
|
|
51
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
52
|
+
id: z.ZodOptional<z.ZodString>;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
name: string;
|
|
56
|
+
id?: string | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
name: string;
|
|
59
|
+
id?: string | undefined;
|
|
60
|
+
}>>>;
|
|
61
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
63
|
+
id: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
name: string;
|
|
66
|
+
type: string;
|
|
67
|
+
typeVersion: number;
|
|
68
|
+
id?: string | undefined;
|
|
69
|
+
credentials?: Record<string, {
|
|
70
|
+
name: string;
|
|
71
|
+
id?: string | undefined;
|
|
72
|
+
}> | undefined;
|
|
73
|
+
disabled?: boolean | undefined;
|
|
74
|
+
position?: [number, number] | undefined;
|
|
75
|
+
notes?: string | undefined;
|
|
76
|
+
parameters?: Record<string, unknown> | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
name: string;
|
|
79
|
+
type: string;
|
|
80
|
+
typeVersion: number;
|
|
81
|
+
id?: string | undefined;
|
|
82
|
+
credentials?: Record<string, {
|
|
83
|
+
name: string;
|
|
84
|
+
id?: string | undefined;
|
|
85
|
+
}> | undefined;
|
|
86
|
+
disabled?: boolean | undefined;
|
|
87
|
+
position?: number[] | undefined;
|
|
88
|
+
notes?: string | undefined;
|
|
89
|
+
parameters?: Record<string, unknown> | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
type: "addNode";
|
|
93
|
+
node: {
|
|
94
|
+
name: string;
|
|
95
|
+
type: string;
|
|
96
|
+
typeVersion: number;
|
|
97
|
+
id?: string | undefined;
|
|
98
|
+
credentials?: Record<string, {
|
|
99
|
+
name: string;
|
|
100
|
+
id?: string | undefined;
|
|
101
|
+
}> | undefined;
|
|
102
|
+
disabled?: boolean | undefined;
|
|
103
|
+
position?: [number, number] | undefined;
|
|
104
|
+
notes?: string | undefined;
|
|
105
|
+
parameters?: Record<string, unknown> | undefined;
|
|
106
|
+
};
|
|
107
|
+
}, {
|
|
108
|
+
type: "addNode";
|
|
109
|
+
node: {
|
|
110
|
+
name: string;
|
|
111
|
+
type: string;
|
|
112
|
+
typeVersion: number;
|
|
113
|
+
id?: string | undefined;
|
|
114
|
+
credentials?: Record<string, {
|
|
115
|
+
name: string;
|
|
116
|
+
id?: string | undefined;
|
|
117
|
+
}> | undefined;
|
|
118
|
+
disabled?: boolean | undefined;
|
|
119
|
+
position?: number[] | undefined;
|
|
120
|
+
notes?: string | undefined;
|
|
121
|
+
parameters?: Record<string, unknown> | undefined;
|
|
122
|
+
};
|
|
123
|
+
}>, z.ZodObject<{
|
|
124
|
+
type: z.ZodLiteral<"removeNode">;
|
|
125
|
+
nodeName: z.ZodString;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
type: "removeNode";
|
|
128
|
+
nodeName: string;
|
|
129
|
+
}, {
|
|
130
|
+
type: "removeNode";
|
|
131
|
+
nodeName: string;
|
|
132
|
+
}>, z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"renameNode">;
|
|
134
|
+
oldName: z.ZodString;
|
|
135
|
+
newName: z.ZodString;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
type: "renameNode";
|
|
138
|
+
oldName: string;
|
|
139
|
+
newName: string;
|
|
140
|
+
}, {
|
|
141
|
+
type: "renameNode";
|
|
142
|
+
oldName: string;
|
|
143
|
+
newName: string;
|
|
144
|
+
}>, z.ZodObject<{
|
|
145
|
+
type: z.ZodLiteral<"addConnection">;
|
|
146
|
+
source: z.ZodString;
|
|
147
|
+
target: z.ZodString;
|
|
148
|
+
sourceIndex: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
targetIndex: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
connectionType: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
type: "addConnection";
|
|
153
|
+
source: string;
|
|
154
|
+
target: string;
|
|
155
|
+
connectionType?: string | undefined;
|
|
156
|
+
sourceIndex?: number | undefined;
|
|
157
|
+
targetIndex?: number | undefined;
|
|
158
|
+
}, {
|
|
159
|
+
type: "addConnection";
|
|
160
|
+
source: string;
|
|
161
|
+
target: string;
|
|
162
|
+
connectionType?: string | undefined;
|
|
163
|
+
sourceIndex?: number | undefined;
|
|
164
|
+
targetIndex?: number | undefined;
|
|
165
|
+
}>, z.ZodObject<{
|
|
166
|
+
type: z.ZodLiteral<"removeConnection">;
|
|
167
|
+
source: z.ZodString;
|
|
168
|
+
target: z.ZodString;
|
|
169
|
+
sourceIndex: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
targetIndex: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
connectionType: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
type: "removeConnection";
|
|
174
|
+
source: string;
|
|
175
|
+
target: string;
|
|
176
|
+
connectionType?: string | undefined;
|
|
177
|
+
sourceIndex?: number | undefined;
|
|
178
|
+
targetIndex?: number | undefined;
|
|
179
|
+
}, {
|
|
180
|
+
type: "removeConnection";
|
|
181
|
+
source: string;
|
|
182
|
+
target: string;
|
|
183
|
+
connectionType?: string | undefined;
|
|
184
|
+
sourceIndex?: number | undefined;
|
|
185
|
+
targetIndex?: number | undefined;
|
|
186
|
+
}>, z.ZodObject<{
|
|
187
|
+
type: z.ZodLiteral<"setNodeCredential">;
|
|
188
|
+
nodeName: z.ZodString;
|
|
189
|
+
credentialKey: z.ZodString;
|
|
190
|
+
credentialId: z.ZodString;
|
|
191
|
+
credentialName: z.ZodString;
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
type: "setNodeCredential";
|
|
194
|
+
credentialName: string;
|
|
195
|
+
nodeName: string;
|
|
196
|
+
credentialId: string;
|
|
197
|
+
credentialKey: string;
|
|
198
|
+
}, {
|
|
199
|
+
type: "setNodeCredential";
|
|
200
|
+
credentialName: string;
|
|
201
|
+
nodeName: string;
|
|
202
|
+
credentialId: string;
|
|
203
|
+
credentialKey: string;
|
|
204
|
+
}>, z.ZodObject<{
|
|
205
|
+
type: z.ZodLiteral<"setNodePosition">;
|
|
206
|
+
nodeName: z.ZodString;
|
|
207
|
+
position: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, [number, number], number[]>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
type: "setNodePosition";
|
|
210
|
+
nodeName: string;
|
|
211
|
+
position: [number, number];
|
|
212
|
+
}, {
|
|
213
|
+
type: "setNodePosition";
|
|
214
|
+
nodeName: string;
|
|
215
|
+
position: number[];
|
|
216
|
+
}>, z.ZodObject<{
|
|
217
|
+
type: z.ZodLiteral<"setNodeDisabled">;
|
|
218
|
+
nodeName: z.ZodString;
|
|
219
|
+
disabled: z.ZodBoolean;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
|
+
type: "setNodeDisabled";
|
|
222
|
+
disabled: boolean;
|
|
223
|
+
nodeName: string;
|
|
224
|
+
}, {
|
|
225
|
+
type: "setNodeDisabled";
|
|
226
|
+
disabled: boolean;
|
|
227
|
+
nodeName: string;
|
|
228
|
+
}>, z.ZodObject<{
|
|
229
|
+
type: z.ZodLiteral<"setWorkflowMetadata">;
|
|
230
|
+
name: z.ZodOptional<z.ZodString>;
|
|
231
|
+
description: z.ZodOptional<z.ZodString>;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
type: "setWorkflowMetadata";
|
|
234
|
+
description?: string | undefined;
|
|
235
|
+
name?: string | undefined;
|
|
236
|
+
}, {
|
|
237
|
+
type: "setWorkflowMetadata";
|
|
238
|
+
description?: string | undefined;
|
|
239
|
+
name?: string | undefined;
|
|
240
|
+
}>]>, "many">;
|
|
16
241
|
};
|
|
17
242
|
export declare const createUpdateWorkflowTool: (user: User, workflowFinderService: WorkflowFinderService, workflowService: WorkflowService, urlService: UrlService, telemetry: Telemetry, nodeTypes: NodeTypes, credentialsService: CredentialsService, sharedWorkflowRepository: SharedWorkflowRepository, collaborationService: CollaborationService) => ToolDefinition<typeof inputSchema>;
|
|
18
243
|
export {};
|
|
@@ -41,99 +41,112 @@ const db_1 = require("@n8n/db");
|
|
|
41
41
|
const zod_1 = __importDefault(require("zod"));
|
|
42
42
|
const mcp_constants_1 = require("../../mcp.constants");
|
|
43
43
|
const constants_1 = require("./constants");
|
|
44
|
+
const credential_validation_1 = require("./credential-validation");
|
|
44
45
|
const credentials_auto_assign_1 = require("./credentials-auto-assign");
|
|
46
|
+
const workflow_operations_1 = require("./workflow-operations");
|
|
45
47
|
const workflow_helpers_1 = require("../../../../workflow-helpers");
|
|
46
48
|
const workflow_validation_utils_1 = require("../workflow-validation.utils");
|
|
49
|
+
const MAX_OPERATIONS_PER_CALL = 100;
|
|
47
50
|
const inputSchema = {
|
|
48
|
-
workflowId: zod_1.default.string().describe('The ID of the workflow to update'),
|
|
49
|
-
|
|
50
|
-
.
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
.
|
|
54
|
-
.max(128)
|
|
55
|
-
.optional()
|
|
56
|
-
.describe('Optional workflow name. If not provided, uses the name from the code.'),
|
|
57
|
-
description: zod_1.default
|
|
58
|
-
.string()
|
|
59
|
-
.max(255)
|
|
60
|
-
.optional()
|
|
61
|
-
.describe('Short workflow description summarizing what it does (1-2 sentences, max 255 chars).'),
|
|
51
|
+
workflowId: zod_1.default.string().describe('The ID of the workflow to update.'),
|
|
52
|
+
operations: zod_1.default
|
|
53
|
+
.array(workflow_operations_1.partialUpdateOperationSchema)
|
|
54
|
+
.min(1)
|
|
55
|
+
.max(MAX_OPERATIONS_PER_CALL)
|
|
56
|
+
.describe(`Ordered list of operations to apply (max ${MAX_OPERATIONS_PER_CALL}). Operations are applied atomically: if any operation fails (e.g. node not found, duplicate name), the whole batch is rejected and no changes are saved.`),
|
|
62
57
|
};
|
|
63
58
|
const outputSchema = {
|
|
64
|
-
workflowId: zod_1.default.string()
|
|
65
|
-
name: zod_1.default.string()
|
|
66
|
-
nodeCount: zod_1.default.number()
|
|
67
|
-
url: zod_1.default.string()
|
|
59
|
+
workflowId: zod_1.default.string(),
|
|
60
|
+
name: zod_1.default.string(),
|
|
61
|
+
nodeCount: zod_1.default.number(),
|
|
62
|
+
url: zod_1.default.string(),
|
|
63
|
+
appliedOperations: zod_1.default.number().describe('Number of operations applied.'),
|
|
68
64
|
autoAssignedCredentials: zod_1.default
|
|
69
65
|
.array(zod_1.default.object({
|
|
70
|
-
nodeName: zod_1.default.string()
|
|
71
|
-
credentialName: zod_1.default.string()
|
|
72
|
-
credentialType: zod_1.default.string()
|
|
66
|
+
nodeName: zod_1.default.string(),
|
|
67
|
+
credentialName: zod_1.default.string(),
|
|
68
|
+
credentialType: zod_1.default.string(),
|
|
73
69
|
}))
|
|
74
|
-
.describe('
|
|
75
|
-
|
|
76
|
-
.
|
|
77
|
-
.
|
|
78
|
-
.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
.
|
|
82
|
-
|
|
70
|
+
.describe('Credentials auto-assigned to nodes that were added in this update.'),
|
|
71
|
+
validationWarnings: zod_1.default
|
|
72
|
+
.array(zod_1.default.object({
|
|
73
|
+
code: zod_1.default.string(),
|
|
74
|
+
message: zod_1.default.string(),
|
|
75
|
+
nodeName: zod_1.default.string().optional(),
|
|
76
|
+
}))
|
|
77
|
+
.describe('Graph and JSON validation warnings on the resulting workflow. Use these to self-correct on the next call.'),
|
|
78
|
+
note: zod_1.default.string().optional(),
|
|
83
79
|
};
|
|
84
80
|
const createUpdateWorkflowTool = (user, workflowFinderService, workflowService, urlService, telemetry, nodeTypes, credentialsService, sharedWorkflowRepository, collaborationService) => ({
|
|
85
81
|
name: constants_1.MCP_UPDATE_WORKFLOW_TOOL.toolName,
|
|
86
82
|
config: {
|
|
87
|
-
description:
|
|
83
|
+
description: 'Apply a small list of operations to an existing workflow (see the operations input schema for the supported op types). The whole batch is atomic: if any op fails the workflow is left unchanged.',
|
|
88
84
|
inputSchema,
|
|
89
85
|
outputSchema,
|
|
90
86
|
annotations: {
|
|
91
87
|
title: constants_1.MCP_UPDATE_WORKFLOW_TOOL.displayTitle,
|
|
92
88
|
readOnlyHint: false,
|
|
93
89
|
destructiveHint: true,
|
|
94
|
-
idempotentHint:
|
|
90
|
+
idempotentHint: false,
|
|
95
91
|
openWorldHint: false,
|
|
96
92
|
},
|
|
97
93
|
},
|
|
98
|
-
handler: async ({ workflowId,
|
|
94
|
+
handler: async ({ workflowId, operations, }) => {
|
|
99
95
|
const telemetryPayload = {
|
|
100
96
|
user_id: user.id,
|
|
101
97
|
tool_name: constants_1.MCP_UPDATE_WORKFLOW_TOOL.toolName,
|
|
102
|
-
parameters: {
|
|
98
|
+
parameters: {
|
|
99
|
+
workflowId,
|
|
100
|
+
opCount: operations.length,
|
|
101
|
+
opTypes: operations.map((op) => op.type),
|
|
102
|
+
},
|
|
103
103
|
};
|
|
104
104
|
try {
|
|
105
105
|
const existingWorkflow = await (0, workflow_validation_utils_1.getMcpWorkflow)(workflowId, user, ['workflow:update'], workflowFinderService);
|
|
106
106
|
await collaborationService.ensureWorkflowEditable(existingWorkflow.id);
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const
|
|
107
|
+
const result = (0, workflow_operations_1.applyOperations)((0, workflow_operations_1.toWorkflowSlice)(existingWorkflow), operations);
|
|
108
|
+
if (!result.success) {
|
|
109
|
+
throw new Error(result.error);
|
|
110
|
+
}
|
|
111
|
+
const credentialCheck = await (0, credential_validation_1.validateCredentialReferences)(operations, existingWorkflow, user, credentialsService, nodeTypes);
|
|
112
|
+
if (!credentialCheck.ok) {
|
|
113
|
+
throw new Error(credentialCheck.error);
|
|
114
|
+
}
|
|
112
115
|
const workflowUpdateData = new db_1.WorkflowEntity();
|
|
113
116
|
Object.assign(workflowUpdateData, {
|
|
114
|
-
name:
|
|
115
|
-
...(description !== undefined
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
name: result.workflow.name,
|
|
118
|
+
...(result.workflow.description !== undefined
|
|
119
|
+
? { description: result.workflow.description }
|
|
120
|
+
: {}),
|
|
121
|
+
nodes: result.workflow.nodes,
|
|
122
|
+
connections: result.workflow.connections,
|
|
123
|
+
meta: {
|
|
124
|
+
...(existingWorkflow.meta ?? {}),
|
|
125
|
+
aiBuilderAssisted: true,
|
|
126
|
+
builderVariant: 'mcp',
|
|
127
|
+
},
|
|
120
128
|
});
|
|
121
129
|
(0, workflow_helpers_1.resolveNodeWebhookIds)(workflowUpdateData, nodeTypes);
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
130
|
+
let credentialAssignments = [];
|
|
131
|
+
let skippedHttpNodes = [];
|
|
132
|
+
if (result.addedNodeNames.length > 0) {
|
|
133
|
+
const addedNodeSet = new Set(result.addedNodeNames);
|
|
134
|
+
const addedNodes = workflowUpdateData.nodes.filter((n) => addedNodeSet.has(n.name));
|
|
135
|
+
const sharedWorkflow = await sharedWorkflowRepository.findOneOrFail({
|
|
136
|
+
where: { workflowId, role: 'workflow:owner' },
|
|
137
|
+
select: ['projectId'],
|
|
138
|
+
});
|
|
139
|
+
const autoAssign = await (0, credentials_auto_assign_1.autoPopulateNodeCredentials)({ ...workflowUpdateData, nodes: addedNodes }, user, nodeTypes, credentialsService, sharedWorkflow.projectId);
|
|
140
|
+
credentialAssignments = autoAssign.assignments;
|
|
141
|
+
skippedHttpNodes = autoAssign.skippedHttpNodes;
|
|
131
142
|
}
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
143
|
+
const { ParseValidateHandler } = await Promise.resolve().then(() => __importStar(require('@n8n/ai-workflow-builder')));
|
|
144
|
+
const validator = new ParseValidateHandler({ generatePinData: false });
|
|
145
|
+
const validationWarnings = validator.validateJSON({
|
|
146
|
+
name: workflowUpdateData.name,
|
|
147
|
+
nodes: workflowUpdateData.nodes,
|
|
148
|
+
connections: workflowUpdateData.connections,
|
|
135
149
|
});
|
|
136
|
-
const { assignments: credentialAssignments, skippedHttpNodes } = await (0, credentials_auto_assign_1.autoPopulateNodeCredentials)(workflowUpdateData, user, nodeTypes, credentialsService, sharedWorkflow.projectId);
|
|
137
150
|
const updatedWorkflow = await workflowService.update(user, workflowUpdateData, workflowId, {
|
|
138
151
|
aiBuilderAssisted: true,
|
|
139
152
|
source: 'n8n-mcp',
|
|
@@ -154,7 +167,9 @@ const createUpdateWorkflowTool = (user, workflowFinderService, workflowService,
|
|
|
154
167
|
name: updatedWorkflow.name,
|
|
155
168
|
nodeCount: updatedWorkflow.nodes.length,
|
|
156
169
|
url: workflowUrl,
|
|
170
|
+
appliedOperations: operations.length,
|
|
157
171
|
autoAssignedCredentials: credentialAssignments,
|
|
172
|
+
validationWarnings,
|
|
158
173
|
note: skippedHttpNodes.length
|
|
159
174
|
? `HTTP Request nodes (${skippedHttpNodes.join(', ')}) were skipped during credential auto-assignment. Their credentials must be configured manually.`
|
|
160
175
|
: undefined,
|
|
@@ -171,8 +186,7 @@ const createUpdateWorkflowTool = (user, workflowFinderService, workflowService,
|
|
|
171
186
|
error: errorMessage,
|
|
172
187
|
};
|
|
173
188
|
telemetry.track(mcp_constants_1.USER_CALLED_MCP_TOOL_EVENT, telemetryPayload);
|
|
174
|
-
const
|
|
175
|
-
const output = { error: errorMessage, ...(hint ? { hint } : {}) };
|
|
189
|
+
const output = { error: errorMessage };
|
|
176
190
|
return {
|
|
177
191
|
content: [{ type: 'text', text: JSON.stringify(output, null, 2) }],
|
|
178
192
|
structuredContent: output,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-workflow.tool.js","sourceRoot":"","sources":["../../../../../src/modules/mcp/tools/workflow-builder/update-workflow.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gCAAmF;
|
|
1
|
+
{"version":3,"file":"update-workflow.tool.js","sourceRoot":"","sources":["../../../../../src/modules/mcp/tools/workflow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