n8n 2.28.3 → 2.29.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/abstract-server.js +1 -1
- package/dist/abstract-server.js.map +1 -1
- package/dist/active-executions.js +2 -2
- package/dist/active-executions.js.map +1 -1
- package/dist/active-workflow-manager.js +1 -1
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/auth/auth.service.js +12 -12
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/blob-storage/azure-byte-store.ee.d.ts +10 -0
- package/dist/blob-storage/azure-byte-store.ee.js +57 -0
- package/dist/blob-storage/azure-byte-store.ee.js.map +1 -0
- package/dist/blob-storage/fs-byte-store.d.ts +14 -0
- package/dist/blob-storage/fs-byte-store.js +97 -0
- package/dist/blob-storage/fs-byte-store.js.map +1 -0
- package/dist/blob-storage/json-store.d.ts +18 -0
- package/dist/blob-storage/json-store.js +125 -0
- package/dist/blob-storage/json-store.js.map +1 -0
- package/dist/blob-storage/s3-byte-store.ee.d.ts +10 -0
- package/dist/blob-storage/s3-byte-store.ee.js +52 -0
- package/dist/blob-storage/s3-byte-store.ee.js.map +1 -0
- package/dist/blob-storage/skipped-entry-deletion.error.d.ts +5 -0
- package/dist/blob-storage/skipped-entry-deletion.error.js +13 -0
- package/dist/blob-storage/skipped-entry-deletion.error.js.map +1 -0
- package/dist/blob-storage/types.d.ts +23 -0
- package/dist/blob-storage/types.js +3 -0
- package/dist/blob-storage/types.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -1
- package/dist/chat/chat-server.js +1 -1
- package/dist/chat/chat-server.js.map +1 -1
- package/dist/chat/chat-service.js +1 -1
- package/dist/chat/chat-service.js.map +1 -1
- package/dist/chat/chat-service.types.d.ts +2 -2
- package/dist/collaboration/collaboration.service.d.ts +2 -2
- package/dist/collaboration/collaboration.service.js +2 -2
- package/dist/collaboration/collaboration.service.js.map +1 -1
- package/dist/commands/base-command.d.ts +1 -1
- package/dist/commands/base-command.js +27 -3
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/export/entities.js +3 -3
- package/dist/commands/export/entities.js.map +1 -1
- package/dist/commands/export/workflow.js.map +1 -1
- package/dist/commands/import/entities.js +3 -3
- package/dist/commands/import/entities.js.map +1 -1
- package/dist/commands/import/workflow.js +1 -1
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.js +5 -5
- package/dist/commands/start.js.map +1 -1
- package/dist/controller.registry.d.ts +1 -1
- package/dist/controller.registry.js +8 -8
- package/dist/controller.registry.js.map +1 -1
- package/dist/controllers/ai.controller.d.ts +1 -0
- package/dist/controllers/ai.controller.js +20 -11
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.js +1 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/folder.controller.d.ts +1 -1
- package/dist/controllers/folder.controller.js +1 -1
- package/dist/controllers/folder.controller.js.map +1 -1
- package/dist/controllers/invitation.controller.d.ts +1 -1
- package/dist/controllers/invitation.controller.js +5 -5
- package/dist/controllers/invitation.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.d.ts +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.js +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/orchestration.controller.js.map +1 -1
- package/dist/controllers/owner.controller.d.ts +1 -1
- package/dist/controllers/owner.controller.js +1 -1
- package/dist/controllers/owner.controller.js.map +1 -1
- package/dist/controllers/password-reset.controller.d.ts +1 -1
- package/dist/controllers/password-reset.controller.js +3 -3
- package/dist/controllers/password-reset.controller.js.map +1 -1
- package/dist/controllers/posthog.controller.d.ts +2 -5
- package/dist/controllers/posthog.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +2 -1
- package/dist/controllers/role.controller.js +12 -0
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.d.ts +1 -1
- package/dist/controllers/third-party-licenses.controller.js +1 -1
- package/dist/controllers/third-party-licenses.controller.js.map +1 -1
- package/dist/controllers/translation.controller.js +1 -1
- package/dist/controllers/translation.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +8 -6
- package/dist/controllers/users.controller.js +59 -9
- package/dist/controllers/users.controller.js.map +1 -1
- package/dist/credentials/credentials.service.ee.js +7 -0
- package/dist/credentials/credentials.service.ee.js.map +1 -1
- package/dist/credentials/credentials.service.js +1 -1
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/validation.js +1 -1
- package/dist/credentials/validation.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -1
- package/dist/credentials-helper.js +33 -5
- package/dist/credentials-helper.js.map +1 -1
- package/dist/credentials-overwrites.js.map +1 -1
- package/dist/evaluation.ee/evaluation-config.service.js +1 -1
- package/dist/evaluation.ee/evaluation-config.service.js.map +1 -1
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +3 -3
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +11 -5
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
- package/dist/events/relays/workflow-failure-notification.event-relay.js +1 -1
- package/dist/events/relays/workflow-failure-notification.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.js +1 -0
- package/dist/execution-lifecycle/shared/shared-hook-functions.js.map +1 -1
- package/dist/executions/execution-data/azure-store.ee.js +2 -2
- package/dist/executions/execution-data/azure-store.ee.js.map +1 -1
- package/dist/executions/execution-data/types.d.ts +1 -1
- package/dist/executions/execution-persistence.js +11 -4
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution.service.js +5 -4
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/executions.controller.d.ts +2 -2
- package/dist/executions/executions.controller.js +4 -4
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/instance-settings-loader/loaders/log-streaming.instance-settings-loader.js +1 -1
- package/dist/instance-settings-loader/loaders/log-streaming.instance-settings-loader.js.map +1 -1
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js +1 -1
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js.map +1 -1
- package/dist/license/license.controller.js +1 -0
- package/dist/license/license.controller.js.map +1 -1
- package/dist/license/license.service.js +3 -4
- package/dist/license/license.service.js.map +1 -1
- package/dist/metrics/prometheus/db-pool-metrics.service.d.ts +13 -0
- package/dist/metrics/prometheus/db-pool-metrics.service.js +71 -0
- package/dist/metrics/prometheus/db-pool-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/prometheus.service.d.ts +2 -1
- package/dist/metrics/prometheus/prometheus.service.js +5 -2
- package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
- package/dist/mfa/mfa.service.d.ts +1 -1
- package/dist/mfa/mfa.service.js +1 -1
- package/dist/mfa/mfa.service.js.map +1 -1
- package/dist/mfa/totp.service.js +41 -11
- package/dist/mfa/totp.service.js.map +1 -1
- package/dist/modules/agents/agent-builder.controller.d.ts +28 -0
- package/dist/modules/agents/agent-builder.controller.js +168 -0
- package/dist/modules/agents/agent-builder.controller.js.map +1 -0
- package/dist/modules/agents/agent-chat.controller.d.ts +41 -0
- package/dist/modules/agents/agent-chat.controller.js +206 -0
- package/dist/modules/agents/agent-chat.controller.js.map +1 -0
- package/dist/modules/agents/agent-config.service.d.ts +33 -0
- package/dist/modules/agents/agent-config.service.js +288 -0
- package/dist/modules/agents/agent-config.service.js.map +1 -0
- package/dist/modules/agents/agent-custom-tools.service.d.ts +22 -0
- package/dist/modules/agents/agent-custom-tools.service.js +98 -0
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +110 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.js +482 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -0
- package/dist/modules/agents/agent-execution.service.d.ts +4 -4
- package/dist/modules/agents/agent-execution.service.js +6 -5
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-persistence.service.d.ts +19 -0
- package/dist/modules/agents/agent-integration-persistence.service.js +90 -0
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -0
- package/dist/modules/agents/agent-integrations.controller.d.ts +60 -0
- package/dist/modules/agents/agent-integrations.controller.js +275 -0
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -0
- package/dist/modules/agents/agent-knowledge-sandbox.service.d.ts +1 -1
- package/dist/modules/agents/agent-knowledge-sandbox.service.js +3 -3
- package/dist/modules/agents/agent-knowledge-sandbox.service.js.map +1 -1
- package/dist/modules/agents/agent-knowledge.controller.d.ts +26 -0
- package/dist/modules/agents/agent-knowledge.controller.js +112 -0
- package/dist/modules/agents/agent-knowledge.controller.js.map +1 -0
- package/dist/modules/agents/agent-publish.controller.d.ts +38 -0
- package/dist/modules/agents/agent-publish.controller.js +94 -0
- package/dist/modules/agents/agent-publish.controller.js.map +1 -0
- package/dist/modules/agents/agent-publish.service.d.ts +30 -0
- package/dist/modules/agents/agent-publish.service.js +293 -0
- package/dist/modules/agents/agent-publish.service.js.map +1 -0
- package/dist/modules/agents/agent-runnable-state.service.d.ts +15 -0
- package/dist/modules/agents/agent-runnable-state.service.js +43 -0
- package/dist/modules/agents/agent-runnable-state.service.js.map +1 -0
- package/dist/modules/agents/agent-runtime-cache.service.d.ts +44 -0
- package/dist/modules/agents/agent-runtime-cache.service.js +169 -0
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -0
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +5 -9
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +68 -41
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-sandbox.controller.d.ts +3 -3
- package/dist/modules/agents/agent-sandbox.controller.js +9 -8
- package/dist/modules/agents/agent-sandbox.controller.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.d.ts +3 -4
- package/dist/modules/agents/agent-skills.service.js +54 -28
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-task.service.d.ts +5 -5
- package/dist/modules/agents/agent-task.service.js +46 -46
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-tasks.controller.d.ts +30 -0
- package/dist/modules/agents/agent-tasks.controller.js +106 -0
- package/dist/modules/agents/agent-tasks.controller.js.map +1 -0
- package/dist/modules/agents/agent-telemetry.js +0 -4
- package/dist/modules/agents/agent-telemetry.js.map +1 -1
- package/dist/modules/agents/agent-test-chat.service.d.ts +9 -0
- package/dist/modules/agents/agent-test-chat.service.js +49 -0
- package/dist/modules/agents/agent-test-chat.service.js.map +1 -0
- package/dist/modules/agents/agent-threads.controller.d.ts +28 -0
- package/dist/modules/agents/agent-threads.controller.js +66 -0
- package/dist/modules/agents/agent-threads.controller.js.map +1 -0
- package/dist/modules/agents/agent-validation.service.d.ts +13 -0
- package/dist/modules/agents/agent-validation.service.js +142 -0
- package/dist/modules/agents/agent-validation.service.js.map +1 -0
- package/dist/modules/agents/agents-catalog.controller.d.ts +8 -0
- package/dist/modules/agents/agents-catalog.controller.js +80 -0
- package/dist/modules/agents/agents-catalog.controller.js.map +1 -0
- package/dist/modules/agents/agents-config.controller.d.ts +181 -0
- package/dist/modules/agents/agents-config.controller.js +71 -0
- package/dist/modules/agents/agents-config.controller.js.map +1 -0
- package/dist/modules/agents/agents-skills.controller.d.ts +33 -0
- package/dist/modules/agents/agents-skills.controller.js +94 -0
- package/dist/modules/agents/agents-skills.controller.js.map +1 -0
- package/dist/modules/agents/agents-tools.service.d.ts +1 -7
- package/dist/modules/agents/agents-tools.service.js +3 -80
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +7 -393
- package/dist/modules/agents/agents.controller.js +6 -990
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +2 -2
- package/dist/modules/agents/agents.module.js +12 -0
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +8 -166
- package/dist/modules/agents/agents.service.js +10 -1287
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +2 -2
- package/dist/modules/agents/builder/agents-builder-prompts.js +3 -5
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +11 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +60 -25
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +4 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +36 -12
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js +1 -3
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/index.d.ts +1 -1
- package/dist/modules/agents/builder/interactive/index.js +2 -1
- package/dist/modules/agents/builder/interactive/index.js.map +1 -1
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js +1 -1
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +3 -2
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +3 -5
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +4 -6
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.js +4 -4
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +8 -3
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/integrations.skill.js +8 -0
- package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/mcp.skill.js +16 -0
- package/dist/modules/agents/builder/skills/mcp.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/resource-locators.skill.js +18 -0
- package/dist/modules/agents/builder/skills/resource-locators.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/sub-agents.skill.js +34 -8
- package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +22 -3
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +12 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-memory-entry.entity.d.ts +1 -1
- package/dist/modules/agents/entities/agent-memory-entry.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent.entity.d.ts +1 -2
- package/dist/modules/agents/entities/agent.entity.js +0 -4
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +7 -23
- package/dist/modules/agents/integrations/agent-chat-bridge.js +60 -646
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +44 -0
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +110 -0
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +38 -4
- package/dist/modules/agents/integrations/agent-chat-integration.js +10 -3
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.d.ts +22 -0
- package/dist/modules/agents/integrations/agent-chat-message-context.js +104 -0
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.d.ts +29 -0
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +205 -0
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.d.ts +10 -0
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.js +90 -0
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.js.map +1 -0
- package/dist/modules/agents/integrations/chat-integration.service.js +6 -3
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +1 -1
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.d.ts +6037 -0
- package/dist/modules/agents/integrations/integration-tool-definitions.js +231 -0
- package/dist/modules/agents/integrations/integration-tool-definitions.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-descriptions.d.ts +3 -0
- package/dist/modules/agents/integrations/integration-tool-descriptions.js +100 -0
- package/dist/modules/agents/integrations/integration-tool-descriptions.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-execution.d.ts +27 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js +278 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-factory.d.ts +121 -0
- package/dist/modules/agents/integrations/integration-tool-factory.js +133 -0
- package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-schema.d.ts +107 -0
- package/dist/modules/agents/integrations/integration-tool-schema.js +140 -0
- package/dist/modules/agents/integrations/integration-tool-schema.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +105 -0
- package/dist/modules/agents/integrations/integration-tool-types.js +3 -0
- package/dist/modules/agents/integrations/integration-tool-types.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tools.d.ts +3 -213
- package/dist/modules/agents/integrations/integration-tools.js +16 -998
- package/dist/modules/agents/integrations/integration-tools.js.map +1 -1
- package/dist/modules/agents/integrations/integrations-sync.d.ts +1 -1
- package/dist/modules/agents/integrations/n8n-memory.d.ts +1 -1
- package/dist/modules/agents/integrations/n8n-memory.js +2 -2
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-integration.d.ts +3 -3
- package/dist/modules/agents/integrations/platforms/linear-integration.js +14 -19
- package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-tool-definitions.d.ts +473 -0
- package/dist/modules/agents/integrations/platforms/linear-tool-definitions.js +270 -0
- package/dist/modules/agents/integrations/platforms/linear-tool-definitions.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/n8n-chat-integration.d.ts +4 -3
- package/dist/modules/agents/integrations/platforms/n8n-chat-integration.js +6 -2
- package/dist/modules/agents/integrations/platforms/n8n-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.d.ts +12 -0
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js +198 -0
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.d.ts +14 -4
- package/dist/modules/agents/integrations/platforms/slack-integration.js +20 -7
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.js +1 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.d.ts +35 -0
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js +33 -0
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +1 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +2 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +5 -3
- package/dist/modules/agents/integrations/slack-app-setup.service.js +11 -6
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.d.ts +7 -0
- package/dist/modules/agents/json-config/from-json-config.js +60 -15
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js +17 -6
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +2 -5
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-history.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.d.ts +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -1
- package/dist/modules/agents/tools/agent-data-utils.d.ts +22 -0
- package/dist/modules/agents/tools/agent-data-utils.js +64 -0
- package/dist/modules/agents/tools/agent-data-utils.js.map +1 -0
- package/dist/modules/agents/tools/input-data-tool.d.ts +3 -0
- package/dist/modules/agents/tools/input-data-tool.js +40 -0
- package/dist/modules/agents/tools/input-data-tool.js.map +1 -0
- package/dist/modules/agents/tools/node-tool-factory.d.ts +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-context-tool.d.ts +3 -0
- package/dist/modules/agents/tools/workflow-context-tool.js +84 -0
- package/dist/modules/agents/tools/workflow-context-tool.js.map +1 -0
- package/dist/modules/agents/utils/agent-credential-provider.d.ts +4 -0
- package/dist/modules/agents/utils/agent-credential-provider.js +8 -0
- package/dist/modules/agents/utils/agent-credential-provider.js.map +1 -0
- package/dist/modules/agents/utils/agent-missing-skill-ids.d.ts +2 -0
- package/dist/modules/agents/utils/agent-missing-skill-ids.js +17 -0
- package/dist/modules/agents/utils/agent-missing-skill-ids.js.map +1 -0
- package/dist/modules/agents/utils/agent-published-snapshot.d.ts +2 -0
- package/dist/modules/agents/utils/agent-published-snapshot.js +17 -0
- package/dist/modules/agents/utils/agent-published-snapshot.js.map +1 -0
- package/dist/modules/agents/utils/agent-resource-id.d.ts +1 -1
- package/dist/modules/agents/utils/sub-agent-resolver.d.ts +14 -0
- package/dist/modules/agents/utils/sub-agent-resolver.js +23 -0
- package/dist/modules/agents/utils/sub-agent-resolver.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v2/file-access.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/oauth-callback-auth.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/process-env-access.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/pyodide-removed.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/queue-worker-max-stalled-count.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/removed-nodes.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/settings-file-permissions.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/start-node-removed.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/task-runner-docker-image.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/tunnel-option.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/wait-node-subworkflow.rule.js +1 -1
- package/dist/modules/breaking-changes/rules/v2/wait-node-subworkflow.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/workflow-hooks-deprecated.rule.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-agent.service.d.ts +5 -5
- package/dist/modules/chat-hub/chat-hub-agent.service.js +9 -9
- package/dist/modules/chat-hub/chat-hub-agent.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-message.entity.d.ts +2 -2
- package/dist/modules/chat-hub/chat-hub-message.entity.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-session.entity.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub.controller.d.ts +5 -2
- package/dist/modules/chat-hub/chat-hub.controller.js +23 -5
- package/dist/modules/chat-hub/chat-hub.controller.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.module.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub.service.js +1 -1
- package/dist/modules/chat-hub/chat-hub.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +8 -4
- package/dist/modules/chat-hub/chat-hub.settings.controller.js +28 -18
- package/dist/modules/chat-hub/chat-hub.settings.controller.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.settings.service.js +3 -3
- package/dist/modules/chat-hub/chat-hub.settings.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.types.d.ts +1 -1
- package/dist/modules/chat-hub/chat-session.repository.js +1 -1
- package/dist/modules/chat-hub/chat-session.repository.js.map +1 -1
- package/dist/modules/community-packages/community-node-types.service.js +2 -2
- package/dist/modules/community-packages/community-node-types.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.config.d.ts +2 -0
- package/dist/modules/community-packages/community-packages.config.js +10 -0
- package/dist/modules/community-packages/community-packages.config.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.d.ts +3 -3
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +3 -3
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.service.js +3 -3
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/community-packages/npm-utils.js +1 -1
- package/dist/modules/community-packages/npm-utils.js.map +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.js +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.js.map +1 -1
- package/dist/modules/data-table/data-table-file-cleanup.service.js +1 -1
- package/dist/modules/data-table/data-table-file-cleanup.service.js.map +1 -1
- package/dist/modules/data-table/data-table-proxy.service.d.ts +2 -2
- package/dist/modules/data-table/data-table-proxy.service.js +3 -3
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/data-table/data-table.controller.d.ts +2 -2
- package/dist/modules/data-table/data-table.controller.js +3 -3
- package/dist/modules/data-table/data-table.controller.js.map +1 -1
- package/dist/modules/data-table/utils/sql-utils.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/slack-signature-extractor.js +1 -1
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/slack-signature-extractor.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js +0 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.d.ts +0 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js +3 -3
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js +0 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/slack-signature-identifier.js +2 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/slack-signature-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/slack-credential-resolver.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/storage/dynamic-credential-entry-storage.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/storage/dynamic-credential-entry-storage.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.js +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js +2 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-web.service.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-web.service.js +2 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-web.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js +1 -1
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/utils.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.d.ts +3 -1
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js +14 -2
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.d.ts +3 -4
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js +20 -46
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.d.ts +21 -0
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js +142 -0
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js.map +1 -0
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.d.ts +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/provider-registry.service.d.ts +1 -1
- package/dist/modules/external-secrets.ee/provider-registry.service.js +1 -1
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js +5 -1
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/infisical.js +4 -4
- package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/vault.js +10 -10
- package/dist/modules/external-secrets.ee/providers/vault.js.map +1 -1
- package/dist/modules/external-secrets.ee/redaction.service.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.d.ts +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-types.controller.ee.d.ts +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-types.controller.ee.js +2 -2
- package/dist/modules/external-secrets.ee/secrets-providers-types.controller.ee.js.map +1 -1
- package/dist/modules/favorites/favorites.controller.d.ts +1 -1
- package/dist/modules/favorites/favorites.controller.js +2 -2
- package/dist/modules/favorites/favorites.controller.js.map +1 -1
- package/dist/modules/favorites/favorites.event-relay.d.ts +1 -1
- package/dist/modules/favorites/favorites.event-relay.js +1 -1
- package/dist/modules/favorites/favorites.event-relay.js.map +1 -1
- package/dist/modules/favorites/favorites.service.d.ts +2 -2
- package/dist/modules/favorites/favorites.service.js +2 -2
- package/dist/modules/favorites/favorites.service.js.map +1 -1
- 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 +6 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -1
- package/dist/modules/insights/insights.module.d.ts +1 -0
- package/dist/modules/insights/insights.module.js +1 -1
- package/dist/modules/insights/insights.module.js.map +1 -1
- package/dist/modules/insights/insights.settings.d.ts +6 -3
- package/dist/modules/insights/insights.settings.js +8 -3
- package/dist/modules/insights/insights.settings.js.map +1 -1
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.d.ts +23 -0
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js +123 -0
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js.map +1 -0
- package/dist/modules/instance-ai/browser/browser-use-server.d.ts +11 -0
- package/dist/modules/instance-ai/browser/browser-use-server.js +68 -0
- package/dist/modules/instance-ai/browser/browser-use-server.js.map +1 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.d.ts +7 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js +6 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js.map +1 -0
- package/dist/modules/instance-ai/browser/composite-local-mcp-server.d.ts +14 -0
- package/dist/modules/instance-ai/browser/composite-local-mcp-server.js +57 -0
- package/dist/modules/instance-ai/browser/composite-local-mcp-server.js.map +1 -0
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.d.ts +40 -0
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js +297 -0
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js.map +1 -0
- package/dist/modules/instance-ai/eval/execution.service.js +2 -2
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +5 -1
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.js +1 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +14 -0
- package/dist/modules/instance-ai/eval/thread-restore.service.js +149 -0
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js +1 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js.map +1 -1
- package/dist/modules/instance-ai/filesystem/local-gateway.d.ts +3 -0
- package/dist/modules/instance-ai/filesystem/local-gateway.js +20 -3
- package/dist/modules/instance-ai/filesystem/local-gateway.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-event-relay.service.d.ts +12 -0
- package/dist/modules/instance-ai/instance-ai-event-relay.service.js +56 -0
- package/dist/modules/instance-ai/instance-ai-event-relay.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-gateway.service.d.ts +5 -1
- package/dist/modules/instance-ai/instance-ai-gateway.service.js +10 -3
- package/dist/modules/instance-ai/instance-ai-gateway.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +5 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.js +38 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-run-pin-data.d.ts +29 -0
- package/dist/modules/instance-ai/instance-ai-run-pin-data.js +222 -0
- package/dist/modules/instance-ai/instance-ai-run-pin-data.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +9 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.d.ts +72 -0
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +352 -0
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-test.controller.d.ts +2 -2
- package/dist/modules/instance-ai/instance-ai-test.controller.js +2 -2
- package/dist/modules/instance-ai/instance-ai-test.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +78 -193
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +19 -2
- package/dist/modules/instance-ai/instance-ai.controller.js +96 -6
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -0
- package/dist/modules/instance-ai/instance-ai.module.js +4 -0
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +10 -33
- package/dist/modules/instance-ai/instance-ai.service.js +293 -767
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/internal-messages.d.ts +2 -0
- package/dist/modules/instance-ai/internal-messages.js +4 -2
- package/dist/modules/instance-ai/internal-messages.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 +4 -7
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +2 -2
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.js +4 -3
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/node-definition-resolver.js +2 -1
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
- package/dist/modules/instance-ai/planned-task-action-runner.d.ts +1 -1
- package/dist/modules/instance-ai/planned-task-action-runner.js +3 -3
- package/dist/modules/instance-ai/planned-task-action-runner.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +1 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +29 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
- package/dist/modules/instance-ai/suspended-run-restorer.service.d.ts +4 -8
- package/dist/modules/instance-ai/suspended-run-restorer.service.js +2 -2
- package/dist/modules/instance-ai/suspended-run-restorer.service.js.map +1 -1
- package/dist/modules/instance-ai/suspended-thread-persistence.service.d.ts +0 -14
- package/dist/modules/instance-ai/suspended-thread-persistence.service.js +0 -26
- package/dist/modules/instance-ai/suspended-thread-persistence.service.js.map +1 -1
- package/dist/modules/instance-ai/tracing/index.d.ts +1 -0
- package/dist/modules/instance-ai/tracing/index.js +6 -0
- package/dist/modules/instance-ai/tracing/index.js.map +1 -0
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.d.ts +81 -0
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js +341 -0
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -0
- package/dist/modules/instance-ai/workflow-verification-task-projector.js +1 -2
- package/dist/modules/instance-ai/workflow-verification-task-projector.js.map +1 -1
- package/dist/modules/instance-registry/instance-registry.controller.js +1 -0
- package/dist/modules/instance-registry/instance-registry.controller.js.map +1 -1
- package/dist/modules/instance-registry/instance-registry.service.js +1 -1
- package/dist/modules/instance-registry/instance-registry.service.js.map +1 -1
- package/dist/modules/instance-version-history/instance-version-history.service.d.ts +1 -1
- package/dist/modules/instance-version-history/instance-version-history.service.js +1 -1
- package/dist/modules/instance-version-history/instance-version-history.service.js.map +1 -1
- package/dist/modules/ldap.ee/ldap.service.ee.d.ts +1 -1
- package/dist/modules/ldap.ee/ldap.service.ee.js +1 -1
- package/dist/modules/ldap.ee/ldap.service.ee.js.map +1 -1
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-sentry.ee.js.map +1 -1
- package/dist/modules/mcp/dto/update-allowed-redirect-uris.dto.js +1 -1
- package/dist/modules/mcp/dto/update-allowed-redirect-uris.dto.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +5 -1
- package/dist/modules/mcp/mcp.service.js +18 -3
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/execution-utils.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.d.ts +3 -3
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-history.tool.d.ts +49 -0
- package/dist/modules/mcp/tools/get-workflow-history.tool.js +115 -0
- package/dist/modules/mcp/tools/get-workflow-history.tool.js.map +1 -0
- package/dist/modules/mcp/tools/get-workflow-version.tool.d.ts +30 -0
- package/dist/modules/mcp/tools/get-workflow-version.tool.js +118 -0
- package/dist/modules/mcp/tools/get-workflow-version.tool.js.map +1 -0
- package/dist/modules/mcp/tools/prepare-workflow-pin-data.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/prepare-workflow-pin-data.tool.js.map +1 -1
- package/dist/modules/mcp/tools/publish-workflow.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/publish-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +25 -11
- package/dist/modules/mcp/tools/schemas.js +7 -4
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-projects.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
- package/dist/modules/mcp/tools/test-workflow.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/test-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/unpublish-workflow.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/unpublish-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/webhook-utils.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +18 -2
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/delete-workflow.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/delete-workflow.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/delete-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +4 -2
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.d.ts +20 -0
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.js +108 -0
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +3 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +117 -4
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +4 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +195 -3
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +69 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-history.utils.d.ts +3 -0
- package/dist/modules/mcp/tools/workflow-history.utils.js +18 -0
- package/dist/modules/mcp/tools/workflow-history.utils.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +4 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
- package/dist/modules/mcp-registry/synthesize-type-def.d.ts +1 -1
- package/dist/modules/mcp-registry/synthesize-type-def.js +3 -3
- package/dist/modules/mcp-registry/synthesize-type-def.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/utils/import-package-upload.js +1 -1
- package/dist/modules/n8n-packages/utils/import-package-upload.js.map +1 -1
- package/dist/modules/oauth-server/oauth-consent.service.d.ts +3 -1
- package/dist/modules/oauth-server/oauth-consent.service.js +8 -4
- package/dist/modules/oauth-server/oauth-consent.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth.controller.js +1 -0
- package/dist/modules/oauth-server/oauth.controller.js.map +1 -1
- package/dist/modules/oauth-server/oauth.helpers.d.ts +2 -2
- package/dist/modules/oauth-server/oauth.helpers.js +4 -2
- package/dist/modules/oauth-server/oauth.helpers.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.module.js +4 -0
- package/dist/modules/provisioning.ee/provisioning.module.js.map +1 -1
- package/dist/modules/provisioning.ee/role-deletion-checker.ee.d.ts +7 -0
- package/dist/modules/provisioning.ee/role-deletion-checker.ee.js +33 -0
- package/dist/modules/provisioning.ee/role-deletion-checker.ee.js.map +1 -0
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js +3 -3
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js.map +1 -1
- package/dist/modules/quick-connect/quick-connect.config.d.ts +10 -10
- package/dist/modules/quick-connect/quick-connect.module.d.ts +2 -2
- package/dist/modules/quick-connect/quick-connect.service.js +1 -1
- package/dist/modules/quick-connect/quick-connect.service.js.map +1 -1
- package/dist/modules/redaction/executions/execution-redaction.service.d.ts +1 -1
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/runtime-credentials/runtime-credentials.service.js +1 -1
- package/dist/modules/runtime-credentials/runtime-credentials.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-context.factory.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +1 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +2 -2
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-scoped.service.d.ts +3 -2
- package/dist/modules/source-control.ee/source-control-scoped.service.js +10 -1
- package/dist/modules/source-control.ee/source-control-scoped.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +3 -3
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +4 -4
- package/dist/modules/source-control.ee/source-control.controller.ee.js +5 -4
- package/dist/modules/source-control.ee/source-control.controller.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +8 -5
- package/dist/modules/source-control.ee/source-control.service.ee.js +25 -10
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml-helpers.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.d.ts +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.js +4 -3
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js +1 -1
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js.map +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -1
- package/dist/modules/token-exchange/services/trusted-key.service.js +1 -1
- package/dist/modules/token-exchange/services/trusted-key.service.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.schemas.d.ts +2 -2
- package/dist/modules/workflow-builder/workflow-builder-session.entity.js +1 -1
- package/dist/modules/workflow-builder/workflow-builder-session.entity.js.map +1 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js +1 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js.map +1 -1
- package/dist/node-catalog/node-catalog.service.d.ts +3 -2
- package/dist/node-catalog/node-catalog.service.js +50 -18
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +1 -1
- package/dist/oauth/oauth.service.js +7 -6
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/permissions.ee/check-access.js +1 -1
- package/dist/permissions.ee/check-access.js.map +1 -1
- package/dist/public-api/index.js +24 -3
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.service.js +38 -2
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/scaling/job-processor.js +1 -0
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/leader-election-client.d.ts +1 -1
- package/dist/scaling/leader-election-client.js +1 -1
- package/dist/scaling/leader-election-client.js.map +1 -1
- package/dist/scaling/pubsub/subscriber.service.js +1 -1
- package/dist/scaling/pubsub/subscriber.service.js.map +1 -1
- package/dist/scaling/redis/redis.types.d.ts +1 -1
- package/dist/scaling/redis-lock.service.d.ts +15 -0
- package/dist/scaling/redis-lock.service.js +154 -0
- package/dist/scaling/redis-lock.service.js.map +1 -0
- package/dist/security-audit/risk-reporters/instance-risk-reporter.js +3 -3
- package/dist/security-audit/risk-reporters/instance-risk-reporter.js.map +1 -1
- package/dist/server.js +4 -0
- package/dist/server.js.map +1 -1
- package/dist/services/ai-gateway.service.d.ts +1 -1
- package/dist/services/ai-gateway.service.js +1 -1
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/ai-workflow-builder.service.js +5 -4
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/credentials-tester.service.d.ts +1 -1
- package/dist/services/credentials-tester.service.js +3 -3
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/dynamic-node-parameters.service.d.ts +3 -3
- package/dist/services/dynamic-node-parameters.service.js +4 -4
- package/dist/services/dynamic-node-parameters.service.js.map +1 -1
- package/dist/services/dynamic-templates.service.js +3 -3
- package/dist/services/dynamic-templates.service.js.map +1 -1
- package/dist/services/export.service.js +3 -3
- package/dist/services/export.service.js.map +1 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/ownership.service.d.ts +3 -3
- package/dist/services/ownership.service.js +5 -5
- package/dist/services/ownership.service.js.map +1 -1
- package/dist/services/project.service.ee.js +2 -2
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.d.ts +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.js +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/rate-limit.service.d.ts +1 -1
- package/dist/services/rate-limit.service.js.map +1 -1
- package/dist/services/role-deletion-check-proxy.service.d.ts +8 -0
- package/dist/services/role-deletion-check-proxy.service.js +28 -0
- package/dist/services/role-deletion-check-proxy.service.js.map +1 -0
- package/dist/services/role.service.d.ts +5 -2
- package/dist/services/role.service.js +18 -2
- package/dist/services/role.service.js.map +1 -1
- package/dist/services/user.service.js +5 -0
- package/dist/services/user.service.js.map +1 -1
- package/dist/task-runners/task-managers/data-request-response-builder.js +1 -0
- package/dist/task-runners/task-managers/data-request-response-builder.js.map +1 -1
- package/dist/task-runners/task-runner-process-js.js +2 -0
- package/dist/task-runners/task-runner-process-js.js.map +1 -1
- package/dist/tool-generation/hitl-tools.js.map +1 -1
- package/dist/utils/compression.util.js +2 -2
- package/dist/utils/compression.util.js.map +1 -1
- package/dist/utils/health-endpoint.util.js.map +1 -1
- package/dist/utils/strapi-utils.js +2 -3
- package/dist/utils/strapi-utils.js.map +1 -1
- package/dist/webhooks/test-webhook-registrations.service.js +1 -1
- package/dist/webhooks/test-webhook-registrations.service.js.map +1 -1
- package/dist/webhooks/test-webhooks.d.ts +1 -1
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-forms.js +2 -2
- package/dist/webhooks/waiting-forms.js.map +1 -1
- package/dist/webhooks/webhook.service.d.ts +1 -0
- package/dist/webhooks/webhook.service.js +4 -1
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +2 -2
- package/dist/workflow-execute-additional-data.js +5 -4
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.js +1 -9
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +1 -0
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.d.ts +3 -1
- package/dist/workflows/publication/workflow-publication-applier.js +10 -2
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/triggers/non-webhook-trigger-registrar.d.ts +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.js +4 -5
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +4 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.js +36 -9
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.d.ts +3 -0
- package/dist/workflows/triggers/workflow-trigger-activator.js +66 -32
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-creation.service.js +1 -1
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.d.ts +4 -3
- package/dist/workflows/workflow-history/workflow-history.service.js +4 -3
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/dist/workflows/workflow-published-data.service.d.ts +16 -6
- package/dist/workflows/workflow-published-data.service.js +42 -2
- package/dist/workflows/workflow-published-data.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +4 -22
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +2 -2
- package/dist/workflows/workflow.service.ee.d.ts +1 -1
- package/dist/workflows/workflow.service.ee.js +1 -1
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +7 -7
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +6 -6
- package/dist/workflows/workflows.controller.js +3 -3
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +68 -56
- package/dist/modules/instance-ai/eval/proxy-loopback.d.ts +0 -1
- package/dist/modules/instance-ai/eval/proxy-loopback.js +0 -44
- package/dist/modules/instance-ai/eval/proxy-loopback.js.map +0 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AgentBuilderController = void 0;
|
|
16
|
+
const api_types_1 = require("@n8n/api-types");
|
|
17
|
+
const decorators_1 = require("@n8n/decorators");
|
|
18
|
+
const credentials_service_1 = require("../../credentials/credentials.service");
|
|
19
|
+
const not_found_error_1 = require("../../errors/response-errors/not-found.error");
|
|
20
|
+
const agents_credential_provider_1 = require("./adapters/agents-credential-provider");
|
|
21
|
+
const agent_message_mapper_1 = require("./agent-message-mapper");
|
|
22
|
+
const agent_sse_stream_1 = require("./agent-sse-stream");
|
|
23
|
+
const agents_service_1 = require("./agents.service");
|
|
24
|
+
const agents_builder_service_1 = require("./builder/agents-builder.service");
|
|
25
|
+
const builder_tool_names_1 = require("./builder/builder-tool-names");
|
|
26
|
+
const messages_envelope_1 = require("./utils/messages-envelope");
|
|
27
|
+
function makeBuilderToolEvents(send) {
|
|
28
|
+
let streamingToolName;
|
|
29
|
+
return {
|
|
30
|
+
toolInputStart: (name) => {
|
|
31
|
+
streamingToolName = name;
|
|
32
|
+
},
|
|
33
|
+
toolInputDelta: (_toolCallId, delta) => {
|
|
34
|
+
if (streamingToolName === builder_tool_names_1.BUILDER_TOOLS.BUILD_CUSTOM_TOOL) {
|
|
35
|
+
send({ type: 'code-delta', delta });
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
toolResult: (name) => {
|
|
39
|
+
if (name === builder_tool_names_1.BUILDER_TOOLS.WRITE_CONFIG || name === builder_tool_names_1.BUILDER_TOOLS.PATCH_CONFIG) {
|
|
40
|
+
send({ type: 'config-updated' });
|
|
41
|
+
streamingToolName = undefined;
|
|
42
|
+
}
|
|
43
|
+
if (name === builder_tool_names_1.BUILDER_TOOLS.CREATE_SKILL) {
|
|
44
|
+
send({ type: 'config-updated' });
|
|
45
|
+
streamingToolName = undefined;
|
|
46
|
+
}
|
|
47
|
+
if (name === builder_tool_names_1.BUILDER_TOOLS.CREATE_TASK) {
|
|
48
|
+
send({ type: 'config-updated' });
|
|
49
|
+
streamingToolName = undefined;
|
|
50
|
+
}
|
|
51
|
+
if (name === builder_tool_names_1.BUILDER_TOOLS.BUILD_CUSTOM_TOOL) {
|
|
52
|
+
send({ type: 'tool-updated' });
|
|
53
|
+
streamingToolName = undefined;
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
let AgentBuilderController = class AgentBuilderController {
|
|
59
|
+
constructor(agentsBuilderService, credentialsService, agentsService) {
|
|
60
|
+
this.agentsBuilderService = agentsBuilderService;
|
|
61
|
+
this.credentialsService = credentialsService;
|
|
62
|
+
this.agentsService = agentsService;
|
|
63
|
+
}
|
|
64
|
+
async getBuilderMessages(req) {
|
|
65
|
+
const { projectId, agentId } = req.params;
|
|
66
|
+
const agent = await this.agentsService.findById(agentId, projectId);
|
|
67
|
+
if (!agent)
|
|
68
|
+
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
69
|
+
const memory = await this.agentsBuilderService.getBuilderMessages(agentId);
|
|
70
|
+
const checkpoint = await this.agentsBuilderService.findOpenBuilderCheckpoint(agentId);
|
|
71
|
+
return (0, messages_envelope_1.withOpenSuspensions)((0, agent_message_mapper_1.messagesToDto)(memory), checkpoint);
|
|
72
|
+
}
|
|
73
|
+
async clearBuilderMessages(req) {
|
|
74
|
+
const { projectId, agentId } = req.params;
|
|
75
|
+
const agent = await this.agentsService.findById(agentId, projectId);
|
|
76
|
+
if (!agent)
|
|
77
|
+
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
78
|
+
await this.agentsBuilderService.clearBuilderMessages(agentId);
|
|
79
|
+
return { ok: true };
|
|
80
|
+
}
|
|
81
|
+
async build(req, res, agentId, payload) {
|
|
82
|
+
const { projectId } = req.params;
|
|
83
|
+
const { message } = payload;
|
|
84
|
+
const agent = await this.agentsService.findById(agentId, projectId);
|
|
85
|
+
if (!agent)
|
|
86
|
+
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
87
|
+
const credentialProvider = new agents_credential_provider_1.AgentsCredentialProvider(this.credentialsService, projectId, req.user);
|
|
88
|
+
const { send } = (0, agent_sse_stream_1.initSseStream)(res);
|
|
89
|
+
try {
|
|
90
|
+
const suspended = await (0, agent_sse_stream_1.pumpChunks)(this.agentsBuilderService.buildAgent(agentId, projectId, message, credentialProvider, req.user), send, makeBuilderToolEvents(send));
|
|
91
|
+
if (!suspended) {
|
|
92
|
+
send({ type: 'done' });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
const errorMessage = error instanceof Error ? error.message : 'Build failed';
|
|
97
|
+
const errorCode = error && typeof error === 'object' && 'code' in error
|
|
98
|
+
? error.code
|
|
99
|
+
: undefined;
|
|
100
|
+
send({
|
|
101
|
+
type: 'error',
|
|
102
|
+
message: errorMessage,
|
|
103
|
+
...(typeof errorCode === 'string' ? { code: errorCode } : {}),
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
res.end();
|
|
107
|
+
}
|
|
108
|
+
async buildResume(req, res, agentId, payload) {
|
|
109
|
+
const { projectId } = req.params;
|
|
110
|
+
const { runId, toolCallId, resumeData } = payload;
|
|
111
|
+
const agent = await this.agentsService.findById(agentId, projectId);
|
|
112
|
+
if (!agent)
|
|
113
|
+
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
114
|
+
const credentialProvider = new agents_credential_provider_1.AgentsCredentialProvider(this.credentialsService, projectId, req.user);
|
|
115
|
+
const { send } = (0, agent_sse_stream_1.initSseStream)(res);
|
|
116
|
+
try {
|
|
117
|
+
const suspended = await (0, agent_sse_stream_1.pumpChunks)(this.agentsBuilderService.resumeBuild(agentId, projectId, runId, toolCallId, resumeData, credentialProvider, req.user), send, makeBuilderToolEvents(send));
|
|
118
|
+
if (!suspended) {
|
|
119
|
+
send({ type: 'done' });
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
const errorMessage = error instanceof Error ? error.message : 'Resume failed';
|
|
124
|
+
send({ type: 'error', message: errorMessage });
|
|
125
|
+
}
|
|
126
|
+
res.end();
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.AgentBuilderController = AgentBuilderController;
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, decorators_1.Get)('/:agentId/build/messages'),
|
|
132
|
+
(0, decorators_1.ProjectScope)('agent:read'),
|
|
133
|
+
__metadata("design:type", Function),
|
|
134
|
+
__metadata("design:paramtypes", [Object]),
|
|
135
|
+
__metadata("design:returntype", Promise)
|
|
136
|
+
], AgentBuilderController.prototype, "getBuilderMessages", null);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, decorators_1.Delete)('/:agentId/build/messages'),
|
|
139
|
+
(0, decorators_1.ProjectScope)('agent:update'),
|
|
140
|
+
__metadata("design:type", Function),
|
|
141
|
+
__metadata("design:paramtypes", [Object]),
|
|
142
|
+
__metadata("design:returntype", Promise)
|
|
143
|
+
], AgentBuilderController.prototype, "clearBuilderMessages", null);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, decorators_1.Post)('/:agentId/build', { usesTemplates: true }),
|
|
146
|
+
(0, decorators_1.ProjectScope)('agent:update'),
|
|
147
|
+
__param(2, (0, decorators_1.Param)('agentId')),
|
|
148
|
+
__param(3, decorators_1.Body),
|
|
149
|
+
__metadata("design:type", Function),
|
|
150
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.AgentChatMessageDto]),
|
|
151
|
+
__metadata("design:returntype", Promise)
|
|
152
|
+
], AgentBuilderController.prototype, "build", null);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, decorators_1.Post)('/:agentId/build/resume', { usesTemplates: true }),
|
|
155
|
+
(0, decorators_1.ProjectScope)('agent:update'),
|
|
156
|
+
__param(2, (0, decorators_1.Param)('agentId')),
|
|
157
|
+
__param(3, decorators_1.Body),
|
|
158
|
+
__metadata("design:type", Function),
|
|
159
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.AgentBuildResumeDto]),
|
|
160
|
+
__metadata("design:returntype", Promise)
|
|
161
|
+
], AgentBuilderController.prototype, "buildResume", null);
|
|
162
|
+
exports.AgentBuilderController = AgentBuilderController = __decorate([
|
|
163
|
+
(0, decorators_1.RestController)('/projects/:projectId/agents/v2'),
|
|
164
|
+
__metadata("design:paramtypes", [agents_builder_service_1.AgentsBuilderService,
|
|
165
|
+
credentials_service_1.CredentialsService,
|
|
166
|
+
agents_service_1.AgentsService])
|
|
167
|
+
], AgentBuilderController);
|
|
168
|
+
//# sourceMappingURL=agent-builder.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-builder.controller.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-builder.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAKwB;AAExB,gDAA+F;AAE/F,2EAAuE;AACvE,8EAAyE;AAEzE,sFAAiF;AACjF,iEAAuD;AACvD,yDAK4B;AAC5B,qDAAiD;AACjD,6EAAwE;AACxE,qEAA6D;AAC7D,iEAAgE;AAUhE,SAAS,qBAAqB,CAAC,IAAgC;IAC9D,IAAI,iBAAqC,CAAC;IAC1C,OAAO;QACN,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE;YACxB,iBAAiB,GAAG,IAAI,CAAC;QAC1B,CAAC;QACD,cAAc,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE;YACtC,IAAI,iBAAiB,KAAK,kCAAa,CAAC,iBAAiB,EAAE,CAAC;gBAC3D,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;YACrC,CAAC;QACF,CAAC;QACD,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACpB,IAAI,IAAI,KAAK,kCAAa,CAAC,YAAY,IAAI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E,CAAC;IAChD,IAAA,yBAAY,EAAC,cAAc,CAAC;IAI3B,WAAA,IAAA,kBAAK,EAAC,SAAS,CAAC,CAAA;IAChB,WAAA,iBAAI,CAAA;;6DAAU,+BAAmB;;mDAiDlC;AAIK;IAFL,IAAA,iBAAI,EAAC,wBAAwB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACvD,IAAA,yBAAY,EAAC,cAAc,CAAC;IAI3B,WAAA,IAAA,kBAAK,EAAC,SAAS,CAAC,CAAA;IAChB,WAAA,iBAAI,CAAA;;6DAAU,+BAAmB;;yDA2ClC;iCA7IW,sBAAsB;IADlC,IAAA,2BAAc,EAAC,gCAAgC,CAAC;qCAGR,6CAAoB;QACtB,wCAAkB;QACvB,8BAAa;GAJlC,sBAAsB,CA8IlC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AgentChatMessageDto, type AgentChatMessagesResponse, AgentChatResumeDto } from '@n8n/api-types';
|
|
2
|
+
import type { AuthenticatedRequest } from '@n8n/db';
|
|
3
|
+
import { CredentialsService } from '../../credentials/credentials.service';
|
|
4
|
+
import { AgentExecutionOrchestratorService } from './agent-execution-orchestrator.service';
|
|
5
|
+
import { AgentExecutionService } from './agent-execution.service';
|
|
6
|
+
import { type FlushableResponse } from './agent-sse-stream';
|
|
7
|
+
import { AgentTestChatService } from './agent-test-chat.service';
|
|
8
|
+
import { AgentValidationService } from './agent-validation.service';
|
|
9
|
+
import { AgentsService } from './agents.service';
|
|
10
|
+
import { AgentsBuilderService } from './builder/agents-builder.service';
|
|
11
|
+
export declare class AgentChatController {
|
|
12
|
+
private readonly agentExecutionOrchestratorService;
|
|
13
|
+
private readonly agentTestChatService;
|
|
14
|
+
private readonly agentValidationService;
|
|
15
|
+
private readonly agentsBuilderService;
|
|
16
|
+
private readonly credentialsService;
|
|
17
|
+
private readonly agentExecutionService;
|
|
18
|
+
private readonly agentsService;
|
|
19
|
+
constructor(agentExecutionOrchestratorService: AgentExecutionOrchestratorService, agentTestChatService: AgentTestChatService, agentValidationService: AgentValidationService, agentsBuilderService: AgentsBuilderService, credentialsService: CredentialsService, agentExecutionService: AgentExecutionService, agentsService: AgentsService);
|
|
20
|
+
chat(req: AuthenticatedRequest<{
|
|
21
|
+
projectId: string;
|
|
22
|
+
}>, res: FlushableResponse, agentId: string, payload: AgentChatMessageDto): Promise<void>;
|
|
23
|
+
chatResume(req: AuthenticatedRequest<{
|
|
24
|
+
projectId: string;
|
|
25
|
+
}>, res: FlushableResponse, agentId: string, payload: AgentChatResumeDto): Promise<void>;
|
|
26
|
+
getChatMessages(req: AuthenticatedRequest<{
|
|
27
|
+
projectId: string;
|
|
28
|
+
agentId: string;
|
|
29
|
+
threadId: string;
|
|
30
|
+
}>): Promise<AgentChatMessagesResponse>;
|
|
31
|
+
getTestChatMessages(req: AuthenticatedRequest<{
|
|
32
|
+
projectId: string;
|
|
33
|
+
agentId: string;
|
|
34
|
+
}>): Promise<AgentChatMessagesResponse>;
|
|
35
|
+
clearTestChatMessages(req: AuthenticatedRequest<{
|
|
36
|
+
projectId: string;
|
|
37
|
+
agentId: string;
|
|
38
|
+
}>): Promise<{
|
|
39
|
+
ok: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AgentChatController = void 0;
|
|
16
|
+
const api_types_1 = require("@n8n/api-types");
|
|
17
|
+
const decorators_1 = require("@n8n/decorators");
|
|
18
|
+
const crypto_1 = require("crypto");
|
|
19
|
+
const credentials_service_1 = require("../../credentials/credentials.service");
|
|
20
|
+
const not_found_error_1 = require("../../errors/response-errors/not-found.error");
|
|
21
|
+
const agents_credential_provider_1 = require("./adapters/agents-credential-provider");
|
|
22
|
+
const agent_execution_orchestrator_service_1 = require("./agent-execution-orchestrator.service");
|
|
23
|
+
const agent_execution_service_1 = require("./agent-execution.service");
|
|
24
|
+
const agent_message_mapper_1 = require("./agent-message-mapper");
|
|
25
|
+
const agent_sse_stream_1 = require("./agent-sse-stream");
|
|
26
|
+
const agent_test_chat_service_1 = require("./agent-test-chat.service");
|
|
27
|
+
const agent_validation_service_1 = require("./agent-validation.service");
|
|
28
|
+
const agents_service_1 = require("./agents.service");
|
|
29
|
+
const agents_builder_service_1 = require("./builder/agents-builder.service");
|
|
30
|
+
const agent_memory_scope_1 = require("./utils/agent-memory-scope");
|
|
31
|
+
const messages_envelope_1 = require("./utils/messages-envelope");
|
|
32
|
+
let AgentChatController = class AgentChatController {
|
|
33
|
+
constructor(agentExecutionOrchestratorService, agentTestChatService, agentValidationService, agentsBuilderService, credentialsService, agentExecutionService, agentsService) {
|
|
34
|
+
this.agentExecutionOrchestratorService = agentExecutionOrchestratorService;
|
|
35
|
+
this.agentTestChatService = agentTestChatService;
|
|
36
|
+
this.agentValidationService = agentValidationService;
|
|
37
|
+
this.agentsBuilderService = agentsBuilderService;
|
|
38
|
+
this.credentialsService = credentialsService;
|
|
39
|
+
this.agentExecutionService = agentExecutionService;
|
|
40
|
+
this.agentsService = agentsService;
|
|
41
|
+
}
|
|
42
|
+
async chat(req, res, agentId, payload) {
|
|
43
|
+
const { projectId } = req.params;
|
|
44
|
+
const { message, sessionId } = payload;
|
|
45
|
+
const credentialProvider = new agents_credential_provider_1.AgentsCredentialProvider(this.credentialsService, projectId, req.user);
|
|
46
|
+
const { send } = (0, agent_sse_stream_1.initSseStream)(res);
|
|
47
|
+
if (sessionId) {
|
|
48
|
+
const existing = await this.agentExecutionService.findThreadById(sessionId);
|
|
49
|
+
if (existing && !(0, agent_execution_service_1.threadBelongsTo)(existing, projectId, agentId)) {
|
|
50
|
+
send({ type: 'error', message: 'Session not found' });
|
|
51
|
+
res.end();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const threadId = sessionId ?? (0, crypto_1.randomUUID)();
|
|
56
|
+
const { missing } = await this.agentValidationService.validateAgentIsRunnable(agentId, projectId, credentialProvider);
|
|
57
|
+
if (missing.length > 0) {
|
|
58
|
+
send({
|
|
59
|
+
type: 'error',
|
|
60
|
+
message: 'This agent is not ready to run yet.',
|
|
61
|
+
errorCode: 'agent_misconfigured',
|
|
62
|
+
missing,
|
|
63
|
+
});
|
|
64
|
+
res.end();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
const suspended = await (0, agent_sse_stream_1.pumpChunks)(this.agentExecutionOrchestratorService.executeForChat({
|
|
69
|
+
agentId,
|
|
70
|
+
projectId,
|
|
71
|
+
message,
|
|
72
|
+
userId: req.user.id,
|
|
73
|
+
memory: {
|
|
74
|
+
threadId,
|
|
75
|
+
resourceId: (0, agent_memory_scope_1.draftChatMemoryResourceId)(req.user.id),
|
|
76
|
+
},
|
|
77
|
+
}), send);
|
|
78
|
+
if (!suspended) {
|
|
79
|
+
send({ type: 'done', sessionId: threadId });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
const errorMessage = error instanceof Error ? error.message : 'Chat failed';
|
|
84
|
+
send({ type: 'error', message: errorMessage });
|
|
85
|
+
}
|
|
86
|
+
res.end();
|
|
87
|
+
}
|
|
88
|
+
async chatResume(req, res, agentId, payload) {
|
|
89
|
+
const { projectId } = req.params;
|
|
90
|
+
const { runId, toolCallId, resumeData } = payload;
|
|
91
|
+
const { send } = (0, agent_sse_stream_1.initSseStream)(res);
|
|
92
|
+
try {
|
|
93
|
+
const suspended = await (0, agent_sse_stream_1.pumpChunks)(this.agentExecutionOrchestratorService.resumeForChat({
|
|
94
|
+
agentId,
|
|
95
|
+
projectId,
|
|
96
|
+
runId,
|
|
97
|
+
toolCallId,
|
|
98
|
+
resumeData,
|
|
99
|
+
userId: req.user.id,
|
|
100
|
+
usePublishedVersion: false,
|
|
101
|
+
integrationType: api_types_1.N8N_CHAT_INTEGRATION_TYPE,
|
|
102
|
+
}), send);
|
|
103
|
+
if (!suspended) {
|
|
104
|
+
send({ type: 'done' });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
const errorMessage = error instanceof Error ? error.message : 'Resume failed';
|
|
109
|
+
send({ type: 'error', message: errorMessage });
|
|
110
|
+
}
|
|
111
|
+
res.end();
|
|
112
|
+
}
|
|
113
|
+
async getChatMessages(req) {
|
|
114
|
+
const { projectId, agentId, threadId } = req.params;
|
|
115
|
+
const agent = await this.agentsService.findById(agentId, projectId);
|
|
116
|
+
if (!agent)
|
|
117
|
+
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
118
|
+
const history = await this.agentExecutionOrchestratorService.getConversationHistory({
|
|
119
|
+
threadId,
|
|
120
|
+
projectId,
|
|
121
|
+
agentId,
|
|
122
|
+
});
|
|
123
|
+
let checkpoint = await this.agentsBuilderService.findOpenCheckpointForThread(agentId, threadId);
|
|
124
|
+
if (!history) {
|
|
125
|
+
if (checkpoint)
|
|
126
|
+
return (0, messages_envelope_1.withOpenSuspensions)([], checkpoint);
|
|
127
|
+
throw new not_found_error_1.NotFoundError(`Thread "${threadId}" not found`);
|
|
128
|
+
}
|
|
129
|
+
if (!checkpoint) {
|
|
130
|
+
checkpoint = await this.agentsBuilderService.findOpenCheckpointForThread(agentId, threadId, {
|
|
131
|
+
includeUnscoped: true,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
return (0, messages_envelope_1.withOpenSuspensions)(history, checkpoint, {
|
|
135
|
+
appendInactiveCheckpointMessages: false,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
async getTestChatMessages(req) {
|
|
139
|
+
const { projectId, agentId } = req.params;
|
|
140
|
+
const agent = await this.agentsService.findById(agentId, projectId);
|
|
141
|
+
if (!agent)
|
|
142
|
+
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
143
|
+
const messages = await this.agentTestChatService.getTestChatMessages(agentId, req.user.id);
|
|
144
|
+
const checkpoint = await this.agentsBuilderService.findOpenCheckpointForThread(agentId, (0, agent_test_chat_service_1.chatThreadId)(agentId, req.user.id));
|
|
145
|
+
return (0, messages_envelope_1.withOpenSuspensions)((0, agent_message_mapper_1.messagesToDto)(messages), checkpoint);
|
|
146
|
+
}
|
|
147
|
+
async clearTestChatMessages(req) {
|
|
148
|
+
const { projectId, agentId } = req.params;
|
|
149
|
+
const agent = await this.agentsService.findById(agentId, projectId);
|
|
150
|
+
if (!agent)
|
|
151
|
+
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
152
|
+
await this.agentTestChatService.clearTestChatMessages(agentId, req.user.id);
|
|
153
|
+
return { ok: true };
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
exports.AgentChatController = AgentChatController;
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, decorators_1.Post)('/:agentId/chat', { usesTemplates: true }),
|
|
159
|
+
(0, decorators_1.ProjectScope)('agent:execute'),
|
|
160
|
+
__param(2, (0, decorators_1.Param)('agentId')),
|
|
161
|
+
__param(3, decorators_1.Body),
|
|
162
|
+
__metadata("design:type", Function),
|
|
163
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.AgentChatMessageDto]),
|
|
164
|
+
__metadata("design:returntype", Promise)
|
|
165
|
+
], AgentChatController.prototype, "chat", null);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, decorators_1.Post)('/:agentId/chat/resume', { usesTemplates: true }),
|
|
168
|
+
(0, decorators_1.ProjectScope)('agent:execute'),
|
|
169
|
+
__param(2, (0, decorators_1.Param)('agentId')),
|
|
170
|
+
__param(3, decorators_1.Body),
|
|
171
|
+
__metadata("design:type", Function),
|
|
172
|
+
__metadata("design:paramtypes", [Object, Object, String, api_types_1.AgentChatResumeDto]),
|
|
173
|
+
__metadata("design:returntype", Promise)
|
|
174
|
+
], AgentChatController.prototype, "chatResume", null);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, decorators_1.Get)('/:agentId/chat/:threadId/messages'),
|
|
177
|
+
(0, decorators_1.ProjectScope)('agent:read'),
|
|
178
|
+
__metadata("design:type", Function),
|
|
179
|
+
__metadata("design:paramtypes", [Object]),
|
|
180
|
+
__metadata("design:returntype", Promise)
|
|
181
|
+
], AgentChatController.prototype, "getChatMessages", null);
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, decorators_1.Get)('/:agentId/chat/messages'),
|
|
184
|
+
(0, decorators_1.ProjectScope)('agent:read'),
|
|
185
|
+
__metadata("design:type", Function),
|
|
186
|
+
__metadata("design:paramtypes", [Object]),
|
|
187
|
+
__metadata("design:returntype", Promise)
|
|
188
|
+
], AgentChatController.prototype, "getTestChatMessages", null);
|
|
189
|
+
__decorate([
|
|
190
|
+
(0, decorators_1.Delete)('/:agentId/chat/messages'),
|
|
191
|
+
(0, decorators_1.ProjectScope)('agent:update'),
|
|
192
|
+
__metadata("design:type", Function),
|
|
193
|
+
__metadata("design:paramtypes", [Object]),
|
|
194
|
+
__metadata("design:returntype", Promise)
|
|
195
|
+
], AgentChatController.prototype, "clearTestChatMessages", null);
|
|
196
|
+
exports.AgentChatController = AgentChatController = __decorate([
|
|
197
|
+
(0, decorators_1.RestController)('/projects/:projectId/agents/v2'),
|
|
198
|
+
__metadata("design:paramtypes", [agent_execution_orchestrator_service_1.AgentExecutionOrchestratorService,
|
|
199
|
+
agent_test_chat_service_1.AgentTestChatService,
|
|
200
|
+
agent_validation_service_1.AgentValidationService,
|
|
201
|
+
agents_builder_service_1.AgentsBuilderService,
|
|
202
|
+
credentials_service_1.CredentialsService,
|
|
203
|
+
agent_execution_service_1.AgentExecutionService,
|
|
204
|
+
agents_service_1.AgentsService])
|
|
205
|
+
], AgentChatController);
|
|
206
|
+
//# sourceMappingURL=agent-chat.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-chat.controller.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-chat.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAKwB;AAExB,gDAA+F;AAC/F,mCAAoC;AAEpC,2EAAuE;AACvE,8EAAyE;AAEzE,sFAAiF;AACjF,iGAA2F;AAC3F,uEAAmF;AACnF,iEAAuD;AACvD,yDAAuF;AACvF,uEAA+E;AAC/E,yEAAoE;AACpE,qDAAiD;AACjD,6EAAwE;AACxE,mEAAuE;AACvE,iEAAgE;AAGzD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC/B,YACkB,iCAAoE,EACpE,oBAA0C,EAC1C,sBAA8C,EAC9C,oBAA0C,EAC1C,kBAAsC,EACtC,qBAA4C,EAC5C,aAA4B;QAN5B,sCAAiC,GAAjC,iCAAiC,CAAmC;QACpE,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,kBAAa,GAAb,aAAa,CAAe;IAC3C,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n/api-types';
|
|
2
|
+
import { Logger } from '@n8n/backend-common';
|
|
3
|
+
import { CredentialsService } from '../../credentials/credentials.service';
|
|
4
|
+
import { AgentRuntimeCacheService } from './agent-runtime-cache.service';
|
|
5
|
+
import { AgentSkillsService } from './agent-skills.service';
|
|
6
|
+
import { AgentTaskRepository } from './repositories/agent-task.repository';
|
|
7
|
+
import { AgentRepository } from './repositories/agent.repository';
|
|
8
|
+
export declare class AgentConfigService {
|
|
9
|
+
private readonly logger;
|
|
10
|
+
private readonly agentRepository;
|
|
11
|
+
private readonly agentTaskRepository;
|
|
12
|
+
private readonly agentSkillsService;
|
|
13
|
+
private readonly runtimeCacheService;
|
|
14
|
+
private readonly credentialsService;
|
|
15
|
+
constructor(logger: Logger, agentRepository: AgentRepository, agentTaskRepository: AgentTaskRepository, agentSkillsService: AgentSkillsService, runtimeCacheService: AgentRuntimeCacheService, credentialsService: CredentialsService);
|
|
16
|
+
getConfig(agentId: string, projectId: string): Promise<AgentJsonConfig>;
|
|
17
|
+
validateConfig(raw: unknown): Promise<{
|
|
18
|
+
valid: true;
|
|
19
|
+
config: AgentJsonConfig;
|
|
20
|
+
} | {
|
|
21
|
+
valid: false;
|
|
22
|
+
error: string;
|
|
23
|
+
}>;
|
|
24
|
+
private validateNodeToolExpressions;
|
|
25
|
+
updateConfig(agentId: string, projectId: string, config: unknown): Promise<{
|
|
26
|
+
config: AgentJsonConfig;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
versionId: string | null;
|
|
29
|
+
}>;
|
|
30
|
+
private validateNodeToolConfigs;
|
|
31
|
+
private removeMissingConfigRefs;
|
|
32
|
+
private validateSubAgentRefs;
|
|
33
|
+
}
|