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,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_INTEGRATION_ACTION_TOOL_DEFINITIONS = exports.DEFAULT_INTEGRATION_CONTEXT_TOOL_DEFINITIONS = exports.GENERIC_ACTION_TOOL_DEFINITIONS = exports.GENERIC_CONTEXT_QUERY_TOOL_DEFINITIONS = exports.messageSchema = void 0;
|
|
4
|
+
exports.resolveIntegrationContextQueryDefinitions = resolveIntegrationContextQueryDefinitions;
|
|
5
|
+
exports.resolveIntegrationActionDefinitions = resolveIntegrationActionDefinitions;
|
|
6
|
+
const api_types_1 = require("@n8n/api-types");
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const linear_tool_definitions_1 = require("./platforms/linear-tool-definitions");
|
|
9
|
+
const slack_tool_definitions_1 = require("./platforms/slack-tool-definitions");
|
|
10
|
+
const _assertRichCardButtonStylesAreChatSdkStyles = true;
|
|
11
|
+
void _assertRichCardButtonStylesAreChatSdkStyles;
|
|
12
|
+
exports.messageSchema = api_types_1.richMessageSchema;
|
|
13
|
+
const noInputSchema = zod_1.z.object({}).strict();
|
|
14
|
+
const platformUserIdSchema = zod_1.z
|
|
15
|
+
.string()
|
|
16
|
+
.min(1)
|
|
17
|
+
.describe('Platform user ID, for example a Slack U... ID or Linear user UUID. Do not pass a name.');
|
|
18
|
+
const platformChannelIdSchema = zod_1.z
|
|
19
|
+
.string()
|
|
20
|
+
.min(1)
|
|
21
|
+
.describe('Platform channel ID, for example a Slack C... channel ID. Do not pass a name.');
|
|
22
|
+
const searchLimitSchema = zod_1.z
|
|
23
|
+
.number()
|
|
24
|
+
.int()
|
|
25
|
+
.min(1)
|
|
26
|
+
.max(50)
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('Maximum number of matches to return. Defaults to 10.');
|
|
29
|
+
const searchCursorSchema = zod_1.z
|
|
30
|
+
.string()
|
|
31
|
+
.min(1)
|
|
32
|
+
.optional()
|
|
33
|
+
.describe('Opaque pagination cursor returned as `nextCursor` by a previous call. Pass to fetch the next page of matches.');
|
|
34
|
+
const getCurrentMessageContextInputSchema = zod_1.z.object({
|
|
35
|
+
query: zod_1.z.literal('get_current_message_context'),
|
|
36
|
+
input: noInputSchema,
|
|
37
|
+
});
|
|
38
|
+
const getCurrentSubjectInputSchema = zod_1.z.object({
|
|
39
|
+
query: zod_1.z.literal('get_current_subject'),
|
|
40
|
+
input: noInputSchema,
|
|
41
|
+
});
|
|
42
|
+
const getCurrentUserInputSchema = zod_1.z.object({
|
|
43
|
+
query: zod_1.z.literal('get_current_user'),
|
|
44
|
+
input: noInputSchema,
|
|
45
|
+
});
|
|
46
|
+
const getCurrentChannelInfoInputSchema = zod_1.z.object({
|
|
47
|
+
query: zod_1.z.literal('get_current_channel_info'),
|
|
48
|
+
input: noInputSchema,
|
|
49
|
+
});
|
|
50
|
+
const getUserInputSchema = zod_1.z.object({
|
|
51
|
+
query: zod_1.z.literal('get_user'),
|
|
52
|
+
input: zod_1.z
|
|
53
|
+
.object({
|
|
54
|
+
userId: platformUserIdSchema,
|
|
55
|
+
})
|
|
56
|
+
.strict(),
|
|
57
|
+
});
|
|
58
|
+
const getChannelInfoInputSchema = zod_1.z.object({
|
|
59
|
+
query: zod_1.z.literal('get_channel_info'),
|
|
60
|
+
input: zod_1.z
|
|
61
|
+
.object({
|
|
62
|
+
channelId: platformChannelIdSchema,
|
|
63
|
+
})
|
|
64
|
+
.strict(),
|
|
65
|
+
});
|
|
66
|
+
const searchUsersInputSchema = zod_1.z.object({
|
|
67
|
+
query: zod_1.z.literal('search_users'),
|
|
68
|
+
input: zod_1.z
|
|
69
|
+
.object({
|
|
70
|
+
query: zod_1.z
|
|
71
|
+
.string()
|
|
72
|
+
.min(1)
|
|
73
|
+
.optional()
|
|
74
|
+
.describe('User name, display name, handle, user ID, or email fragment to search for.'),
|
|
75
|
+
email: zod_1.z.string().min(1).optional().describe('Exact email address to look up when known.'),
|
|
76
|
+
limit: searchLimitSchema,
|
|
77
|
+
cursor: searchCursorSchema,
|
|
78
|
+
includeBots: zod_1.z
|
|
79
|
+
.boolean()
|
|
80
|
+
.optional()
|
|
81
|
+
.describe('Whether to include bot users. Defaults to false.'),
|
|
82
|
+
includeDeleted: zod_1.z
|
|
83
|
+
.boolean()
|
|
84
|
+
.optional()
|
|
85
|
+
.describe('Whether to include deleted/deactivated users. Defaults to false.'),
|
|
86
|
+
})
|
|
87
|
+
.strict()
|
|
88
|
+
.refine((input) => input.query !== undefined || input.email !== undefined, {
|
|
89
|
+
message: 'Provide query or email.',
|
|
90
|
+
}),
|
|
91
|
+
});
|
|
92
|
+
const searchChannelsInputSchema = zod_1.z.object({
|
|
93
|
+
query: zod_1.z.literal('search_channels'),
|
|
94
|
+
input: zod_1.z
|
|
95
|
+
.object({
|
|
96
|
+
query: zod_1.z.string().min(1).describe('Channel name, channel ID, or #channel search term.'),
|
|
97
|
+
limit: searchLimitSchema,
|
|
98
|
+
cursor: searchCursorSchema,
|
|
99
|
+
includeArchived: zod_1.z
|
|
100
|
+
.boolean()
|
|
101
|
+
.optional()
|
|
102
|
+
.describe('Whether to include archived channels. Defaults to false.'),
|
|
103
|
+
})
|
|
104
|
+
.strict(),
|
|
105
|
+
});
|
|
106
|
+
const respondActionInputSchema = zod_1.z.object({
|
|
107
|
+
action: zod_1.z.literal('respond'),
|
|
108
|
+
input: zod_1.z
|
|
109
|
+
.object({
|
|
110
|
+
message: exports.messageSchema,
|
|
111
|
+
})
|
|
112
|
+
.strict(),
|
|
113
|
+
});
|
|
114
|
+
const sendDmActionInputSchema = zod_1.z.object({
|
|
115
|
+
action: zod_1.z.literal('send_dm'),
|
|
116
|
+
input: zod_1.z
|
|
117
|
+
.object({
|
|
118
|
+
userId: platformUserIdSchema,
|
|
119
|
+
message: exports.messageSchema,
|
|
120
|
+
})
|
|
121
|
+
.strict(),
|
|
122
|
+
});
|
|
123
|
+
const sendChannelMessageActionInputSchema = zod_1.z.object({
|
|
124
|
+
action: zod_1.z.literal('send_channel_message'),
|
|
125
|
+
input: zod_1.z
|
|
126
|
+
.object({
|
|
127
|
+
channelId: platformChannelIdSchema,
|
|
128
|
+
message: exports.messageSchema,
|
|
129
|
+
})
|
|
130
|
+
.strict(),
|
|
131
|
+
});
|
|
132
|
+
exports.GENERIC_CONTEXT_QUERY_TOOL_DEFINITIONS = [
|
|
133
|
+
{
|
|
134
|
+
name: 'get_current_message_context',
|
|
135
|
+
inputSchema: getCurrentMessageContextInputSchema,
|
|
136
|
+
description: 'get_current_message_context: no input. Returns the latest place this agent communicated in this thread. For Slack, context.agentUserId is the bot user ID for this agent; do not look it up as another user.',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'get_current_subject',
|
|
140
|
+
inputSchema: getCurrentSubjectInputSchema,
|
|
141
|
+
description: 'get_current_subject: no input. Returns the subject of the latest message context, such as a Linear issue, when available.',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'get_current_user',
|
|
145
|
+
inputSchema: getCurrentUserInputSchema,
|
|
146
|
+
description: 'get_current_user: no input. Returns the latest user who interacted in the current message context.',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'get_current_channel_info',
|
|
150
|
+
inputSchema: getCurrentChannelInfoInputSchema,
|
|
151
|
+
description: 'get_current_channel_info: no input. Returns metadata for the latest channel in the current message context.',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'get_user',
|
|
155
|
+
inputSchema: getUserInputSchema,
|
|
156
|
+
description: 'get_user: input.userId is required. Use a platform user ID such as a Slack U... ID or Linear user UUID, not a name, handle, or email.',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'get_channel_info',
|
|
160
|
+
inputSchema: getChannelInfoInputSchema,
|
|
161
|
+
description: 'get_channel_info: input.channelId is required. Use a platform channel ID such as a Slack C... ID, not a channel name.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'search_users',
|
|
165
|
+
inputSchema: searchUsersInputSchema,
|
|
166
|
+
description: 'search_users: input.query or input.email is required. Returns matching platform user IDs for names, handles, or emails. When the response includes nextCursor, pass it back as input.cursor to fetch the next page.',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'search_channels',
|
|
170
|
+
inputSchema: searchChannelsInputSchema,
|
|
171
|
+
description: 'search_channels: input.query is required. Returns matching platform channel IDs for channel names or IDs. When the response includes nextCursor, pass it back as input.cursor to fetch the next page.',
|
|
172
|
+
},
|
|
173
|
+
];
|
|
174
|
+
exports.GENERIC_ACTION_TOOL_DEFINITIONS = [
|
|
175
|
+
{
|
|
176
|
+
name: 'respond',
|
|
177
|
+
inputSchema: respondActionInputSchema,
|
|
178
|
+
description: 'respond: input.message is required. Responds in the latest message context for this integration connection.',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'send_dm',
|
|
182
|
+
inputSchema: sendDmActionInputSchema,
|
|
183
|
+
description: 'send_dm: input.userId and input.message are required. userId must be a platform user ID, not a name, handle, or email.',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'send_channel_message',
|
|
187
|
+
inputSchema: sendChannelMessageActionInputSchema,
|
|
188
|
+
description: 'send_channel_message: input.channelId and input.message are required. channelId must be a platform channel ID, not a channel name.',
|
|
189
|
+
},
|
|
190
|
+
];
|
|
191
|
+
exports.DEFAULT_INTEGRATION_CONTEXT_TOOL_DEFINITIONS = exports.GENERIC_CONTEXT_QUERY_TOOL_DEFINITIONS;
|
|
192
|
+
exports.DEFAULT_INTEGRATION_ACTION_TOOL_DEFINITIONS = exports.GENERIC_ACTION_TOOL_DEFINITIONS;
|
|
193
|
+
const ALL_CONTEXT_QUERY_TOOL_DEFINITIONS = [
|
|
194
|
+
...exports.GENERIC_CONTEXT_QUERY_TOOL_DEFINITIONS,
|
|
195
|
+
...linear_tool_definitions_1.LINEAR_CONTEXT_QUERY_TOOL_DEFINITIONS,
|
|
196
|
+
];
|
|
197
|
+
const ALL_ACTION_TOOL_DEFINITIONS = [
|
|
198
|
+
...exports.GENERIC_ACTION_TOOL_DEFINITIONS,
|
|
199
|
+
...slack_tool_definitions_1.SLACK_ACTION_TOOL_DEFINITIONS,
|
|
200
|
+
...linear_tool_definitions_1.LINEAR_ACTION_TOOL_DEFINITIONS,
|
|
201
|
+
];
|
|
202
|
+
const _assertContextQueryDefinitionsAreExhaustive = true;
|
|
203
|
+
const _assertActionDefinitionsAreExhaustive = true;
|
|
204
|
+
void _assertContextQueryDefinitionsAreExhaustive;
|
|
205
|
+
void _assertActionDefinitionsAreExhaustive;
|
|
206
|
+
const contextDefinitionsByName = toDefinitionMap(ALL_CONTEXT_QUERY_TOOL_DEFINITIONS);
|
|
207
|
+
const actionDefinitionsByName = toDefinitionMap(ALL_ACTION_TOOL_DEFINITIONS);
|
|
208
|
+
function resolveIntegrationContextQueryDefinitions(queries) {
|
|
209
|
+
return queries.map((query) => requireDefinition(contextDefinitionsByName, query));
|
|
210
|
+
}
|
|
211
|
+
function resolveIntegrationActionDefinitions(actions) {
|
|
212
|
+
return actions.map((action) => requireDefinition(actionDefinitionsByName, action));
|
|
213
|
+
}
|
|
214
|
+
function toDefinitionMap(definitions) {
|
|
215
|
+
const definitionsByName = new Map();
|
|
216
|
+
for (const definition of definitions) {
|
|
217
|
+
if (definitionsByName.has(definition.name)) {
|
|
218
|
+
throw new Error(`Duplicate integration tool operation definition: ${definition.name}`);
|
|
219
|
+
}
|
|
220
|
+
definitionsByName.set(definition.name, definition);
|
|
221
|
+
}
|
|
222
|
+
return definitionsByName;
|
|
223
|
+
}
|
|
224
|
+
function requireDefinition(definitionsByName, name) {
|
|
225
|
+
const definition = definitionsByName.get(name);
|
|
226
|
+
if (!definition) {
|
|
227
|
+
throw new Error(`Unknown integration tool operation definition: ${name}`);
|
|
228
|
+
}
|
|
229
|
+
return definition;
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=integration-tool-definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-tool-definitions.js","sourceRoot":"","sources":["../../../../src/modules/agents/integrations/integration-tool-definitions.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IntegrationToolConnectionDescriptor } from './integration-tool-types';
|
|
2
|
+
export declare function buildContextToolDescription(descriptor: IntegrationToolConnectionDescriptor): string;
|
|
3
|
+
export declare function buildActionToolDescription(descriptor: IntegrationToolConnectionDescriptor): string;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildContextToolDescription = buildContextToolDescription;
|
|
4
|
+
exports.buildActionToolDescription = buildActionToolDescription;
|
|
5
|
+
const integration_tool_schema_1 = require("./integration-tool-schema");
|
|
6
|
+
function buildContextToolDescription(descriptor) {
|
|
7
|
+
return [
|
|
8
|
+
`Read context from the ${descriptor.integration.type} integration connection.`,
|
|
9
|
+
`Available queries: ${descriptor.contextQueries.join(', ')}.`,
|
|
10
|
+
...(descriptor.contextToolGuidance ?? []),
|
|
11
|
+
'Query inputs:',
|
|
12
|
+
...descriptor.contextToolDefinitions.map((definition) => `- ${definition.description}`),
|
|
13
|
+
`Batch form: pass queries as an array of up to ${integration_tool_schema_1.MAX_BATCH_OPERATIONS} { query, input } objects to fetch multiple pieces of context in one tool call.`,
|
|
14
|
+
'Use this tool for read-only lookup before choosing an action target.',
|
|
15
|
+
].join('\n\n');
|
|
16
|
+
}
|
|
17
|
+
function buildActionToolDescription(descriptor) {
|
|
18
|
+
return [
|
|
19
|
+
`Take actions in the ${descriptor.integration.type} integration connection.`,
|
|
20
|
+
`Available actions: ${descriptor.actions.join(', ')}.`,
|
|
21
|
+
...(descriptor.actionToolGuidance ?? []),
|
|
22
|
+
'Action inputs:',
|
|
23
|
+
...descriptor.actionToolDefinitions.map((definition) => `- ${definition.description}`),
|
|
24
|
+
`Batch form: pass actions as an array of up to ${integration_tool_schema_1.MAX_BATCH_OPERATIONS} { action, input } objects. Batch actions run sequentially and cannot include cards that wait for a user response.`,
|
|
25
|
+
'respond uses the latest message context for this integration connection.',
|
|
26
|
+
'Use message.card for cards, images, key-value summaries, and feedback requests. Include components such as section, fields, image, divider, button, select, or radio_select.',
|
|
27
|
+
'For fields components, use { type: "fields", fields: [{ label: "Account", value: "Acme" }] }. The key items is also accepted as a fields alias.',
|
|
28
|
+
'For button components, use { type: "button", label: "Approve", value: "approve" }. If label is omitted, text is used as the button label.',
|
|
29
|
+
'For radio-style choices, use { type: "radio_select", label: "Next step", options: [{ label: "Approve", value: "approve" }] }.',
|
|
30
|
+
'Use only the generic shape: message.text plus optional message.card. Do not provide platform-native component payloads, formatted text objects, or attachments; rendering is handled internally.',
|
|
31
|
+
...buildGenericCardGuidance(),
|
|
32
|
+
'Interactive message.card components (button, select, or radio_select) send the message first, then suspend this action until the user responds.',
|
|
33
|
+
'Display-only message.card components without buttons/selects render the card and let the agent continue immediately.',
|
|
34
|
+
].join('\n\n');
|
|
35
|
+
}
|
|
36
|
+
function buildGenericCardGuidance() {
|
|
37
|
+
return [
|
|
38
|
+
'Generic card examples:',
|
|
39
|
+
[
|
|
40
|
+
'Radio choice card:',
|
|
41
|
+
'```json',
|
|
42
|
+
JSON.stringify({
|
|
43
|
+
action: 'respond',
|
|
44
|
+
input: {
|
|
45
|
+
message: {
|
|
46
|
+
text: 'Acme Executive Briefing — Next Steps',
|
|
47
|
+
card: {
|
|
48
|
+
title: 'Acme Corporation — Executive Briefing Next Steps',
|
|
49
|
+
components: [
|
|
50
|
+
{
|
|
51
|
+
type: 'section',
|
|
52
|
+
text: '30X Expansion Briefing ($3.75M) — Internal owner: Paul G | Briefing contact: Mike D\n\nWhat should happen next?',
|
|
53
|
+
},
|
|
54
|
+
{ type: 'divider' },
|
|
55
|
+
{
|
|
56
|
+
type: 'radio_select',
|
|
57
|
+
id: 'next_step_selection',
|
|
58
|
+
label: 'Next step',
|
|
59
|
+
options: [
|
|
60
|
+
{
|
|
61
|
+
label: 'Schedule exec briefing prep call with Paul G',
|
|
62
|
+
value: 'schedule_prep_call',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: 'Draft briefing agenda doc for Mike D',
|
|
66
|
+
value: 'draft_briefing_doc',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
}, null, 2),
|
|
75
|
+
'```',
|
|
76
|
+
].join('\n'),
|
|
77
|
+
[
|
|
78
|
+
'Button card:',
|
|
79
|
+
'```json',
|
|
80
|
+
JSON.stringify({
|
|
81
|
+
action: 'respond',
|
|
82
|
+
input: {
|
|
83
|
+
message: {
|
|
84
|
+
text: 'Approve or revise the briefing draft',
|
|
85
|
+
card: {
|
|
86
|
+
components: [
|
|
87
|
+
{ type: 'section', text: 'Review the briefing draft.' },
|
|
88
|
+
{ type: 'button', label: 'Approve', value: 'approve', style: 'primary' },
|
|
89
|
+
{ type: 'button', label: 'Revise', value: 'revise', style: 'default' },
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
}, null, 2),
|
|
95
|
+
'```',
|
|
96
|
+
].join('\n'),
|
|
97
|
+
'Never send message.blocks, components of type actions, elements arrays, action_id, radio_buttons, or formatted text objects such as { type: "plain_text", text: "..." } or { type: "mrkdwn", text: "..." }.',
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=integration-tool-descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-tool-descriptions.js","sourceRoot":"","sources":["../../../../src/modules/agents/integrations/integration-tool-descriptions.ts"],"names":[],"mappings":";;AAGA,kEAYC;AAED,gEAoBC;AArCD,uEAAiE;AAGjE,SAAgB,2BAA2B,CAC1C,UAA+C;IAE/C,OAAO;QACN,yBAAyB,UAAU,CAAC,WAAW,CAAC,IAAI,0BAA0B;QAC9E,sBAAsB,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QAC7D,GAAG,CAAC,UAAU,CAAC,mBAAmB,IAAI,EAAE,CAAC;QACzC,eAAe;QACf,GAAG,UAAU,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,KAAK,UAAU,CAAC,WAAW,EAAE,CAAC;QACvF,iDAAiD,8CAAoB,iFAAiF;QACtJ,sEAAsE;KACtE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAChB,CAAC;AAED,SAAgB,0BAA0B,CACzC,UAA+C;IAE/C,OAAO;QACN,uBAAuB,UAAU,CAAC,WAAW,CAAC,IAAI,0BAA0B;QAC5E,sBAAsB,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QACtD,GAAG,CAAC,UAAU,CAAC,kBAAkB,IAAI,EAAE,CAAC;QACxC,gBAAgB;QAChB,GAAG,UAAU,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,KAAK,UAAU,CAAC,WAAW,EAAE,CAAC;QACtF,iDAAiD,8CAAoB,oHAAoH;QACzL,0EAA0E;QAC1E,8KAA8K;QAC9K,iJAAiJ;QACjJ,2IAA2I;QAC3I,+HAA+H;QAC/H,kMAAkM;QAClM,GAAG,wBAAwB,EAAE;QAC7B,iJAAiJ;QACjJ,sHAAsH;KACtH,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAChB,CAAC;AAED,SAAS,wBAAwB;IAChC,OAAO;QACN,wBAAwB;QACxB;YACC,oBAAoB;YACpB,SAAS;YACT,IAAI,CAAC,SAAS,CACb;gBACC,MAAM,EAAE,SAAS;gBACjB,KAAK,EAAE;oBACN,OAAO,EAAE;wBACR,IAAI,EAAE,sCAAsC;wBAC5C,IAAI,EAAE;4BACL,KAAK,EAAE,kDAAkD;4BACzD,UAAU,EAAE;gCACX;oCACC,IAAI,EAAE,SAAS;oCACf,IAAI,EAAE,iHAAiH;iCACvH;gCACD,EAAE,IAAI,EAAE,SAAS,EAAE;gCACnB;oCACC,IAAI,EAAE,cAAc;oCACpB,EAAE,EAAE,qBAAqB;oCACzB,KAAK,EAAE,WAAW;oCAClB,OAAO,EAAE;wCACR;4CACC,KAAK,EAAE,8CAA8C;4CACrD,KAAK,EAAE,oBAAoB;yCAC3B;wCACD;4CACC,KAAK,EAAE,sCAAsC;4CAC7C,KAAK,EAAE,oBAAoB;yCAC3B;qCACD;iCACD;6BACD;yBACD;qBACD;iBACD;aACD,EACD,IAAI,EACJ,CAAC,CACD;YACD,KAAK;SACL,CAAC,IAAI,CAAC,IAAI,CAAC;QACZ;YACC,cAAc;YACd,SAAS;YACT,IAAI,CAAC,SAAS,CACb;gBACC,MAAM,EAAE,SAAS;gBACjB,KAAK,EAAE;oBACN,OAAO,EAAE;wBACR,IAAI,EAAE,sCAAsC;wBAC5C,IAAI,EAAE;4BACL,UAAU,EAAE;gCACX,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,4BAA4B,EAAE;gCACvD,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;gCACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;6BACtE;yBACD;qBACD;iBACD;aACD,EACD,IAAI,EACJ,CAAC,CACD;YACD,KAAK;SACL,CAAC,IAAI,CAAC,IAAI,CAAC;QACZ,6MAA6M;KAC7M,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { InterruptibleToolContext, ToolContext } from '@n8n/agents';
|
|
2
|
+
import type { IntegrationActionExecutor, IntegrationMessageContext, IntegrationMessageContextStore, IntegrationContextQueryExecutor, IntegrationToolConnectionDescriptor } from './integration-tool-types';
|
|
3
|
+
import type { RawActionToolOperation, RawContextToolOperation } from './integration-tool-schema';
|
|
4
|
+
export declare function executeContextToolOperation(params: {
|
|
5
|
+
operation: RawContextToolOperation;
|
|
6
|
+
descriptor: IntegrationToolConnectionDescriptor;
|
|
7
|
+
messageContextStore: IntegrationMessageContextStore;
|
|
8
|
+
queryExecutor: IntegrationContextQueryExecutor;
|
|
9
|
+
persistence: ToolContext['persistence'];
|
|
10
|
+
}): Promise<unknown>;
|
|
11
|
+
export declare function executeActionToolBatch(params: {
|
|
12
|
+
operations: RawActionToolOperation[];
|
|
13
|
+
descriptor: IntegrationToolConnectionDescriptor;
|
|
14
|
+
messageContextStore: IntegrationMessageContextStore;
|
|
15
|
+
actionExecutor: IntegrationActionExecutor;
|
|
16
|
+
ctx: ToolContext;
|
|
17
|
+
}): Promise<unknown>;
|
|
18
|
+
export declare function executeActionToolOperation(params: {
|
|
19
|
+
operation: RawActionToolOperation;
|
|
20
|
+
descriptor: IntegrationToolConnectionDescriptor;
|
|
21
|
+
messageContextStore: IntegrationMessageContextStore;
|
|
22
|
+
actionExecutor: IntegrationActionExecutor;
|
|
23
|
+
ctx: ToolContext;
|
|
24
|
+
interruptCtx?: InterruptibleToolContext;
|
|
25
|
+
currentMessageContext?: IntegrationMessageContext;
|
|
26
|
+
allowSuspend: boolean;
|
|
27
|
+
}): Promise<unknown>;
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeContextToolOperation = executeContextToolOperation;
|
|
4
|
+
exports.executeActionToolBatch = executeActionToolBatch;
|
|
5
|
+
exports.executeActionToolOperation = executeActionToolOperation;
|
|
6
|
+
const utils_1 = require("@n8n/utils");
|
|
7
|
+
const integration_tool_definitions_1 = require("./integration-tool-definitions");
|
|
8
|
+
const integration_error_codes_1 = require("./integration-error-codes");
|
|
9
|
+
async function executeContextToolOperation(params) {
|
|
10
|
+
const { operation, descriptor, messageContextStore, queryExecutor, persistence } = params;
|
|
11
|
+
if (isCurrentContextQuery(operation.query)) {
|
|
12
|
+
if (!persistence) {
|
|
13
|
+
return {
|
|
14
|
+
ok: false,
|
|
15
|
+
error: {
|
|
16
|
+
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_THREAD_CONTEXT,
|
|
17
|
+
message: 'There is no current agent thread context.',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const context = await messageContextStore.getLatest(persistence.threadId);
|
|
22
|
+
if (!context || context.integrationConnectionId !== descriptor.integrationConnectionId) {
|
|
23
|
+
if (operation.query === 'get_current_message_context') {
|
|
24
|
+
return { ok: true, context: null };
|
|
25
|
+
}
|
|
26
|
+
if (operation.query === 'get_current_subject') {
|
|
27
|
+
return { ok: true, subject: null };
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
ok: false,
|
|
31
|
+
error: {
|
|
32
|
+
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_MESSAGE_CONTEXT,
|
|
33
|
+
message: 'There is no current message context for this integration connection.',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
if (operation.query === 'get_current_message_context') {
|
|
38
|
+
return { ok: true, context };
|
|
39
|
+
}
|
|
40
|
+
if (operation.query === 'get_current_subject') {
|
|
41
|
+
return { ok: true, subject: context.subject ?? null };
|
|
42
|
+
}
|
|
43
|
+
if (operation.query === 'get_current_user') {
|
|
44
|
+
if (!context.interactingUserId) {
|
|
45
|
+
return {
|
|
46
|
+
ok: false,
|
|
47
|
+
error: {
|
|
48
|
+
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_INTERACTING_USER_CONTEXT,
|
|
49
|
+
message: 'The latest message context does not include an interacting user ID.',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return await queryExecutor.execute({
|
|
54
|
+
descriptor,
|
|
55
|
+
query: 'get_user',
|
|
56
|
+
input: { userId: context.interactingUserId },
|
|
57
|
+
persistence,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
const channelId = getTargetChannelId(context.target);
|
|
61
|
+
if (!channelId) {
|
|
62
|
+
return {
|
|
63
|
+
ok: false,
|
|
64
|
+
error: {
|
|
65
|
+
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_CHANNEL_CONTEXT,
|
|
66
|
+
message: 'The latest message context does not include a channel ID.',
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return await queryExecutor.execute({
|
|
71
|
+
descriptor,
|
|
72
|
+
query: 'get_channel_info',
|
|
73
|
+
input: { channelId },
|
|
74
|
+
persistence,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return await queryExecutor.execute({
|
|
78
|
+
descriptor,
|
|
79
|
+
query: operation.query,
|
|
80
|
+
input: operation.input,
|
|
81
|
+
persistence,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
async function executeActionToolBatch(params) {
|
|
85
|
+
const { operations, descriptor, messageContextStore, actionExecutor, ctx } = params;
|
|
86
|
+
let currentMessageContext = ctx.persistence !== undefined
|
|
87
|
+
? await getOptionalCurrentContext({
|
|
88
|
+
descriptor,
|
|
89
|
+
messageContextStore,
|
|
90
|
+
threadId: ctx.persistence.threadId,
|
|
91
|
+
})
|
|
92
|
+
: undefined;
|
|
93
|
+
const results = [];
|
|
94
|
+
for (const operation of operations) {
|
|
95
|
+
const result = await executeActionToolOperation({
|
|
96
|
+
operation,
|
|
97
|
+
descriptor,
|
|
98
|
+
messageContextStore,
|
|
99
|
+
actionExecutor,
|
|
100
|
+
ctx,
|
|
101
|
+
currentMessageContext,
|
|
102
|
+
allowSuspend: false,
|
|
103
|
+
});
|
|
104
|
+
const nextMessageContext = extractSuccessfulMessageContext(result);
|
|
105
|
+
if (nextMessageContext)
|
|
106
|
+
currentMessageContext = nextMessageContext;
|
|
107
|
+
results.push({ action: operation.action, result });
|
|
108
|
+
}
|
|
109
|
+
return { ok: true, results };
|
|
110
|
+
}
|
|
111
|
+
async function executeActionToolOperation(params) {
|
|
112
|
+
const { operation, descriptor, messageContextStore, actionExecutor, ctx, interruptCtx, allowSuspend, } = params;
|
|
113
|
+
const persistence = ctx.persistence;
|
|
114
|
+
const message = parseMessage(operation.input.message);
|
|
115
|
+
const actionInput = message === undefined ? operation.input : { ...operation.input, message };
|
|
116
|
+
const awaitsResponse = shouldAwaitResponse(message);
|
|
117
|
+
if (awaitsResponse && !allowSuspend) {
|
|
118
|
+
return {
|
|
119
|
+
ok: false,
|
|
120
|
+
error: {
|
|
121
|
+
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.ACTION_FAILED,
|
|
122
|
+
message: 'Batch actions cannot include cards that wait for a user response. Send that action separately.',
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
let currentMessageContext = params.currentMessageContext;
|
|
127
|
+
if (operation.action === 'respond') {
|
|
128
|
+
if (!currentMessageContext) {
|
|
129
|
+
const contextResult = await getRespondContext({
|
|
130
|
+
descriptor,
|
|
131
|
+
messageContextStore,
|
|
132
|
+
persistence,
|
|
133
|
+
});
|
|
134
|
+
if (!contextResult.ok) {
|
|
135
|
+
return contextResult;
|
|
136
|
+
}
|
|
137
|
+
currentMessageContext = contextResult.context;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
else if (!currentMessageContext && persistence) {
|
|
141
|
+
currentMessageContext = await getOptionalCurrentContext({
|
|
142
|
+
descriptor,
|
|
143
|
+
messageContextStore,
|
|
144
|
+
threadId: persistence.threadId,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
const result = await actionExecutor.execute({
|
|
148
|
+
descriptor,
|
|
149
|
+
action: operation.action,
|
|
150
|
+
input: actionInput,
|
|
151
|
+
awaitResponse: awaitsResponse,
|
|
152
|
+
runId: ctx.runId,
|
|
153
|
+
toolCallId: ctx.toolCallId,
|
|
154
|
+
currentMessageContext,
|
|
155
|
+
});
|
|
156
|
+
if (!result.ok)
|
|
157
|
+
return result;
|
|
158
|
+
let actionResult = result;
|
|
159
|
+
if (result.messageContext && persistence) {
|
|
160
|
+
const messageContext = withPreviousSubject(result.messageContext, currentMessageContext);
|
|
161
|
+
await messageContextStore.setLatest(persistence.threadId, persistence.resourceId, messageContext);
|
|
162
|
+
actionResult = { ...result, messageContext };
|
|
163
|
+
}
|
|
164
|
+
if (!awaitsResponse)
|
|
165
|
+
return actionResult;
|
|
166
|
+
return await interruptCtx?.suspend({
|
|
167
|
+
type: 'integration_action',
|
|
168
|
+
action: operation.action,
|
|
169
|
+
integrationConnectionId: descriptor.integrationConnectionId,
|
|
170
|
+
messageContext: actionResult.messageContext,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function isCurrentContextQuery(query) {
|
|
174
|
+
return (query === 'get_current_message_context' ||
|
|
175
|
+
query === 'get_current_subject' ||
|
|
176
|
+
query === 'get_current_user' ||
|
|
177
|
+
query === 'get_current_channel_info');
|
|
178
|
+
}
|
|
179
|
+
function parseMessage(value) {
|
|
180
|
+
const result = integration_tool_definitions_1.messageSchema.safeParse(value);
|
|
181
|
+
return result.success ? result.data : undefined;
|
|
182
|
+
}
|
|
183
|
+
function shouldAwaitResponse(message) {
|
|
184
|
+
const card = message?.card;
|
|
185
|
+
if (card?.awaitResponse === true)
|
|
186
|
+
return true;
|
|
187
|
+
return card?.components.some(isInteractiveCardComponent) ?? false;
|
|
188
|
+
}
|
|
189
|
+
function isInteractiveCardComponent(component) {
|
|
190
|
+
switch (component.type) {
|
|
191
|
+
case 'button':
|
|
192
|
+
case 'select':
|
|
193
|
+
case 'radio_select':
|
|
194
|
+
return true;
|
|
195
|
+
case 'section':
|
|
196
|
+
return component.button !== undefined;
|
|
197
|
+
default:
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function withPreviousSubject(context, previousContext) {
|
|
202
|
+
if (!previousContext)
|
|
203
|
+
return context;
|
|
204
|
+
if (context.integrationConnectionId !== previousContext.integrationConnectionId)
|
|
205
|
+
return context;
|
|
206
|
+
return {
|
|
207
|
+
...context,
|
|
208
|
+
...(!context.subject && previousContext.subject ? { subject: previousContext.subject } : {}),
|
|
209
|
+
...(!context.agentUserId && previousContext.agentUserId
|
|
210
|
+
? { agentUserId: previousContext.agentUserId }
|
|
211
|
+
: {}),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function extractSuccessfulMessageContext(result) {
|
|
215
|
+
if (!(0, utils_1.isRecord)(result) || result.ok !== true)
|
|
216
|
+
return undefined;
|
|
217
|
+
const messageContext = result.messageContext;
|
|
218
|
+
return isIntegrationMessageContext(messageContext) ? messageContext : undefined;
|
|
219
|
+
}
|
|
220
|
+
function isIntegrationMessageContext(value) {
|
|
221
|
+
return ((0, utils_1.isRecord)(value) &&
|
|
222
|
+
typeof value.integrationConnectionId === 'string' &&
|
|
223
|
+
typeof value.platform === 'string' &&
|
|
224
|
+
(0, utils_1.isRecord)(value.target) &&
|
|
225
|
+
(value.agentUserId === undefined || typeof value.agentUserId === 'string') &&
|
|
226
|
+
typeof value.updatedAt === 'string');
|
|
227
|
+
}
|
|
228
|
+
async function getOptionalCurrentContext(params) {
|
|
229
|
+
try {
|
|
230
|
+
const context = await params.messageContextStore.getLatest(params.threadId);
|
|
231
|
+
if (context?.integrationConnectionId !== params.descriptor.integrationConnectionId) {
|
|
232
|
+
return undefined;
|
|
233
|
+
}
|
|
234
|
+
return context;
|
|
235
|
+
}
|
|
236
|
+
catch {
|
|
237
|
+
return undefined;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
async function getRespondContext(params) {
|
|
241
|
+
const { descriptor, messageContextStore, persistence } = params;
|
|
242
|
+
if (!persistence) {
|
|
243
|
+
return {
|
|
244
|
+
ok: false,
|
|
245
|
+
error: {
|
|
246
|
+
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_MESSAGE_CONTEXT,
|
|
247
|
+
message: 'There is no current message context. Use an explicit send action.',
|
|
248
|
+
},
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
const context = await messageContextStore.getLatest(persistence.threadId);
|
|
252
|
+
if (!context) {
|
|
253
|
+
return {
|
|
254
|
+
ok: false,
|
|
255
|
+
error: {
|
|
256
|
+
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_MESSAGE_CONTEXT,
|
|
257
|
+
message: 'There is no current message context. Use an explicit send action.',
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
if (context.integrationConnectionId !== descriptor.integrationConnectionId) {
|
|
262
|
+
return {
|
|
263
|
+
ok: false,
|
|
264
|
+
error: {
|
|
265
|
+
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_MESSAGE_CONTEXT_FOR_INTEGRATION,
|
|
266
|
+
message: 'The latest message context belongs to another integration connection.',
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
return { ok: true, context };
|
|
271
|
+
}
|
|
272
|
+
function getTargetChannelId(target) {
|
|
273
|
+
if (target.type === 'thread' || target.type === 'channel') {
|
|
274
|
+
return target.channelId;
|
|
275
|
+
}
|
|
276
|
+
return undefined;
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=integration-tool-execution.js.map
|