n8n 2.44.4 → 2.45.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/activation-errors.service.d.ts +1 -1
- package/dist/active-executions.js +1 -1
- package/dist/active-executions.js.map +1 -1
- package/dist/active-workflow-manager.d.ts +1 -1
- package/dist/agent-library-bundle.js +5 -0
- package/dist/auth/auth.service.d.ts +1 -2
- package/dist/auth/auth.service.js +1 -2
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/execute-batch.js +1 -1
- package/dist/commands/execute-batch.js.map +1 -1
- package/dist/commands/execute.js +1 -1
- package/dist/commands/execute.js.map +1 -1
- package/dist/commands/start.js +1 -4
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/webhook.js +2 -2
- package/dist/commands/webhook.js.map +1 -1
- package/dist/commands/worker.js +2 -2
- package/dist/commands/worker.js.map +1 -1
- package/dist/controllers/debug.controller.d.ts +1 -1
- package/dist/controllers/e2e.controller.js +1 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.d.ts +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js +15 -3
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +1 -2
- package/dist/controllers/users.controller.js +1 -2
- package/dist/controllers/users.controller.js.map +1 -1
- package/dist/credentials/credential-data-merge.d.ts +7 -0
- package/dist/credentials/credential-data-merge.js +55 -0
- package/dist/credentials/credential-data-merge.js.map +1 -0
- package/dist/credentials/credential-dependency.service.d.ts +1 -1
- package/dist/credentials/credential-dependency.service.js +4 -4
- package/dist/credentials/credential-dependency.service.js.map +1 -1
- package/dist/credentials/credentials.controller.js +6 -2
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +5 -1
- package/dist/credentials/credentials.service.js +11 -3
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/pending-authorization-cleanup.task.d.ts +2 -3
- package/dist/credentials/pending-authorization-cleanup.task.js +6 -6
- package/dist/credentials/pending-authorization-cleanup.task.js.map +1 -1
- package/dist/deprecation/deprecation.service.js +24 -0
- package/dist/deprecation/deprecation.service.js.map +1 -1
- package/dist/evaluation.ee/evaluation-dataset.service.d.ts +2 -5
- package/dist/evaluation.ee/evaluation-dataset.service.js +3 -11
- package/dist/evaluation.ee/evaluation-dataset.service.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-mcp.d.ts +1 -1
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +3 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/eventbus/message-event-bus/event-bus-unsent-message-flush.task.d.ts +2 -3
- package/dist/eventbus/message-event-bus/event-bus-unsent-message-flush.task.js +1 -5
- package/dist/eventbus/message-event-bus/event-bus-unsent-message-flush.task.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +18 -2
- package/dist/events/relays/log-streaming.event-relay.d.ts +3 -0
- package/dist/events/relays/log-streaming.event-relay.js +39 -0
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.js +15 -3
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +1 -2
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution.service.d.ts +1 -2
- package/dist/executions/execution.service.js +1 -2
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/idempotency/idempotency-request.d.ts +29 -0
- package/dist/idempotency/idempotency-request.js +125 -0
- package/dist/idempotency/idempotency-request.js.map +1 -0
- package/dist/idempotency/idempotency.middleware.d.ts +7 -0
- package/dist/idempotency/idempotency.middleware.js +80 -0
- package/dist/idempotency/idempotency.middleware.js.map +1 -0
- package/dist/idempotency/idempotency.types.d.ts +21 -0
- package/dist/{modules/quick-connect/handlers/handler.interface.js → idempotency/idempotency.types.js} +1 -1
- package/dist/idempotency/idempotency.types.js.map +1 -0
- package/dist/instance-settings-loader/loaders/log-streaming.instance-settings-loader.js +3 -0
- package/dist/instance-settings-loader/loaders/log-streaming.instance-settings-loader.js.map +1 -1
- package/dist/jwks/jwks.controller.d.ts +1 -1
- package/dist/jwks/jwks.controller.js +4 -4
- package/dist/jwks/jwks.controller.js.map +1 -1
- package/dist/license/license-renewal.task.d.ts +2 -6
- package/dist/license/license-renewal.task.js +10 -8
- package/dist/license/license-renewal.task.js.map +1 -1
- package/dist/load-nodes-and-credentials.d.ts +1 -0
- package/dist/load-nodes-and-credentials.js +16 -1
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/modules/agents/adapters/agents-credential-provider.js +1 -0
- package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -1
- package/dist/modules/agents/agent-channel-media-retention.task.d.ts +15 -0
- package/dist/modules/agents/agent-channel-media-retention.task.js +64 -0
- package/dist/modules/agents/agent-channel-media-retention.task.js.map +1 -0
- package/dist/modules/agents/agent-chat-attachment.service.d.ts +4 -0
- package/dist/modules/agents/agent-chat-attachment.service.js +15 -0
- package/dist/modules/agents/agent-chat-attachment.service.js.map +1 -1
- package/dist/modules/agents/agent-chat-execution.service.d.ts +2 -1
- package/dist/modules/agents/agent-chat-execution.service.js +19 -10
- package/dist/modules/agents/agent-chat-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-chat-relay.service.d.ts +31 -0
- package/dist/modules/agents/agent-chat-relay.service.js +164 -0
- package/dist/modules/agents/agent-chat-relay.service.js.map +1 -0
- package/dist/modules/agents/agent-chat.controller.d.ts +5 -9
- package/dist/modules/agents/agent-chat.controller.js +18 -150
- package/dist/modules/agents/agent-chat.controller.js.map +1 -1
- package/dist/modules/agents/agent-checkpoint-pruning.task.d.ts +2 -5
- package/dist/modules/agents/agent-checkpoint-pruning.task.js +10 -8
- package/dist/modules/agents/agent-checkpoint-pruning.task.js.map +1 -1
- package/dist/modules/agents/agent-config-preparation.service.d.ts +10 -13
- package/dist/modules/agents/agent-config.service.d.ts +1 -3
- package/dist/modules/agents/agent-config.service.js +8 -7
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-definition.service.d.ts +1 -1
- package/dist/modules/agents/agent-definition.service.js +11 -6
- package/dist/modules/agents/agent-definition.service.js.map +1 -1
- package/dist/modules/agents/agent-dependency-index.listener.js +5 -0
- package/dist/modules/agents/agent-dependency-index.listener.js.map +1 -1
- package/dist/modules/agents/agent-dependency-index.service.d.ts +1 -0
- package/dist/modules/agents/agent-dependency-index.service.js +7 -0
- package/dist/modules/agents/agent-dependency-index.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +4 -4
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.js +4 -0
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +5 -5
- package/dist/modules/agents/agent-integration-management.service.js +1 -1
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-persistence.service.d.ts +3 -3
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
- package/dist/modules/agents/agent-interrupted-execution-sweep.task.d.ts +2 -3
- package/dist/modules/agents/agent-interrupted-execution-sweep.task.js +4 -6
- package/dist/modules/agents/agent-interrupted-execution-sweep.task.js.map +1 -1
- package/dist/modules/agents/agent-message-queue-consumer.service.js +1 -1
- package/dist/modules/agents/agent-message-queue-consumer.service.js.map +1 -1
- package/dist/modules/agents/agent-message-queue.service.js +14 -6
- package/dist/modules/agents/agent-message-queue.service.js.map +1 -1
- package/dist/modules/agents/agent-modification-telemetry.service.d.ts +13 -13
- package/dist/modules/agents/agent-publish.controller.d.ts +8 -0
- package/dist/modules/agents/agent-publish.service.d.ts +6 -7
- package/dist/modules/agents/agent-publish.service.js +17 -28
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-runnable-state.service.d.ts +3 -0
- package/dist/modules/agents/agent-runnable-state.service.js +8 -2
- package/dist/modules/agents/agent-runnable-state.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +5 -2
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +35 -8
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-skill-refs.service.d.ts +38 -6
- package/dist/modules/agents/agent-skill-refs.service.js +245 -18
- package/dist/modules/agents/agent-skill-refs.service.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.d.ts +12 -13
- package/dist/modules/agents/agent-skills.service.js +211 -123
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-task.service.js +6 -5
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-teams-integrations.controller.d.ts +47 -3
- package/dist/modules/agents/agent-teams-integrations.controller.js +225 -3
- package/dist/modules/agents/agent-teams-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.d.ts +1 -0
- package/dist/modules/agents/agent-validation.service.js +17 -2
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-whatsapp-integrations.controller.d.ts +22 -0
- package/dist/modules/agents/agent-whatsapp-integrations.controller.js +74 -0
- package/dist/modules/agents/agent-whatsapp-integrations.controller.js.map +1 -0
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +1 -0
- package/dist/modules/agents/agent-workflow-execution.service.js +56 -23
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +10 -13
- package/dist/modules/agents/agents-skills.controller.d.ts +2 -2
- package/dist/modules/agents/agents-skills.controller.js +6 -5
- package/dist/modules/agents/agents-skills.controller.js.map +1 -1
- package/dist/modules/agents/agents-tools.service.js +12 -8
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +4 -0
- package/dist/modules/agents/agents.module.d.ts +3 -2
- package/dist/modules/agents/agents.module.js +25 -2
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +7 -6
- package/dist/modules/agents/agents.service.js +10 -8
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/background/agent-wake.service.js.map +1 -1
- package/dist/modules/agents/budget-guardrail.d.ts +2 -4
- package/dist/modules/agents/budget-guardrail.js +29 -10
- package/dist/modules/agents/budget-guardrail.js.map +1 -1
- package/dist/modules/agents/builder/agent-builder-session-context.d.ts +1 -0
- package/dist/modules/agents/builder/agent-builder-session-context.js +16 -0
- package/dist/modules/agents/builder/agent-builder-session-context.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-model-recommendations.js +4 -4
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -0
- package/dist/modules/agents/builder/agents-builder-tools.service.js +166 -33
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-tool-names.d.ts +17 -14
- package/dist/modules/agents/builder/builder-tool-names.js +18 -14
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/call-agent-failure.js +2 -2
- package/dist/modules/agents/builder/call-agent-failure.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.js +7 -5
- package/dist/modules/agents/builder/get-resource-locator-options.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +5 -3
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-questions.tool.js +2 -1
- package/dist/modules/agents/builder/interactive/ask-questions.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/configure-channel.tool.js +1 -0
- package/dist/modules/agents/builder/interactive/configure-channel.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +21 -0
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js +81 -12
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +6 -5
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +27 -18
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +2 -2
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/initial-build.prompt.d.ts +1 -2
- package/dist/modules/agents/builder/prompts/initial-build.prompt.js +2 -70
- package/dist/modules/agents/builder/prompts/initial-build.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/config.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/config.skill.js +14 -0
- package/dist/modules/agents/builder/skills/config.skill.js.map +1 -0
- package/dist/modules/agents/builder/skills/custom-tools.skill.js +14 -10
- package/dist/modules/agents/builder/skills/custom-tools.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js +81 -63
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/index.js +11 -1
- package/dist/modules/agents/builder/skills/index.js.map +1 -1
- package/dist/modules/agents/builder/skills/memory.skill.js +14 -14
- package/dist/modules/agents/builder/skills/memory.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/node-tools.skill.js +25 -22
- package/dist/modules/agents/builder/skills/node-tools.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/resource-locators.skill.js +32 -30
- package/dist/modules/agents/builder/skills/resource-locators.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/sub-agents.skill.js +14 -5
- package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +46 -41
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +33 -33
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/builder/verify-mcp-server.tool.js +13 -4
- package/dist/modules/agents/builder/verify-mcp-server.tool.js.map +1 -1
- package/dist/modules/agents/entities/agent-skill-dependency.entity.d.ts +6 -0
- package/dist/modules/agents/entities/agent-skill-dependency.entity.js +34 -0
- package/dist/modules/agents/entities/agent-skill-dependency.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-version-skill-dependency.entity.d.ts +6 -0
- package/dist/modules/agents/entities/agent-version-skill-dependency.entity.js +35 -0
- package/dist/modules/agents/entities/agent-version-skill-dependency.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent.entity.d.ts +9 -2
- package/dist/modules/agents/entities/agent.entity.js +14 -4
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/entities/skill-file.entity.d.ts +6 -0
- package/dist/modules/agents/entities/skill-file.entity.js +33 -0
- package/dist/modules/agents/entities/skill-file.entity.js.map +1 -0
- package/dist/modules/agents/entities/skill-version.entity.d.ts +13 -0
- package/dist/modules/agents/entities/skill-version.entity.js +59 -0
- package/dist/modules/agents/entities/skill-version.entity.js.map +1 -0
- package/dist/modules/agents/entities/skill.entity.d.ts +9 -0
- package/dist/modules/agents/entities/skill.entity.js +43 -0
- package/dist/modules/agents/entities/skill.entity.js.map +1 -0
- package/dist/modules/agents/instance-ai-agent-context.adapter.d.ts +3 -1
- package/dist/modules/agents/instance-ai-agent-context.adapter.js +12 -5
- package/dist/modules/agents/instance-ai-agent-context.adapter.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +7 -5
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +55 -92
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-channel-reconciler.service.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js +29 -4
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +16 -2
- package/dist/modules/agents/integrations/agent-chat-integration.js +9 -1
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-credential-lookup.service.js +1 -0
- package/dist/modules/agents/integrations/agent-credential-lookup.service.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +3 -3
- package/dist/modules/agents/integrations/chat-integration.service.js +4 -2
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.js +15 -2
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-error-codes.d.ts +1 -0
- package/dist/modules/agents/integrations/integration-error-codes.js +1 -0
- package/dist/modules/agents/integrations/integration-error-codes.js.map +1 -1
- package/dist/modules/agents/integrations/integrations-sync.d.ts +2 -2
- package/dist/modules/agents/integrations/integrations-sync.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/assets/n8n-bot-icon.png +0 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-managed-setup.service.d.ts +2 -2
- package/dist/modules/agents/integrations/platforms/slack/slack-managed-setup.service.js +2 -2
- package/dist/modules/agents/integrations/platforms/slack/slack-managed-setup.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.d.ts +3 -3
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-admin-consent.d.ts +5 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-admin-consent.js +23 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-admin-consent.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-app-icons.d.ts +15 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-app-icons.js +136 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-app-icons.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-arm-template.service.d.ts +2 -3
- package/dist/modules/agents/integrations/platforms/teams/teams-arm-template.service.js +3 -4
- package/dist/modules/agents/integrations/platforms/teams/teams-arm-template.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-arm.service.d.ts +14 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-arm.service.js +83 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-arm.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-bot-provisioning.service.d.ts +39 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-bot-provisioning.service.js +202 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-bot-provisioning.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-catalog.service.d.ts +51 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-catalog.service.js +241 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-catalog.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-cleanup.service.d.ts +13 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-cleanup.service.js +43 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-cleanup.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-credential-check.service.d.ts +3 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-credential-check.service.js +65 -24
- package/dist/modules/agents/integrations/platforms/teams/teams-credential-check.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-credential-notes.service.d.ts +11 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-credential-notes.service.js +58 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-credential-notes.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-entra-provisioning.service.d.ts +36 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-entra-provisioning.service.js +318 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-entra-provisioning.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-graph-permissions.d.ts +4 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-graph-permissions.js +10 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-graph-permissions.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-graph.service.d.ts +19 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-graph.service.js +128 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-graph.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-integration.d.ts +17 -3
- package/dist/modules/agents/integrations/platforms/teams/teams-integration.js +63 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-managed-setup.service.d.ts +28 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-managed-setup.service.js +146 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-managed-setup.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-manager-token.service.d.ts +23 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-manager-token.service.js +155 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-manager-token.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.d.ts +3 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.js +18 -8
- package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-message-files.d.ts +18 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-message-files.js +174 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-message-files.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-operations.d.ts +7 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-operations.js +175 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-setup-telemetry.service.d.ts +20 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-setup-telemetry.service.js +68 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-setup-telemetry.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-setup.service.d.ts +15 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-setup.service.js +77 -3
- package/dist/modules/agents/integrations/platforms/teams/teams-setup.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-credential-check.service.d.ts +17 -0
- package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-credential-check.service.js +148 -0
- package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-credential-check.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/{whatsapp-integration.d.ts → whatsapp/whatsapp-integration.d.ts} +17 -7
- package/dist/modules/agents/integrations/platforms/{whatsapp-integration.js → whatsapp/whatsapp-integration.js} +48 -12
- package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-webhook-verification.store.d.ts +11 -0
- package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-webhook-verification.store.js +58 -0
- package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-webhook-verification.store.js.map +1 -0
- package/dist/modules/agents/json-config/agent-document.d.ts +1 -0
- package/dist/modules/agents/json-config/agent-document.js +5 -0
- package/dist/modules/agents/json-config/agent-document.js.map +1 -1
- package/dist/modules/agents/json-config/credential-field-mapping.js +11 -2
- package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.js +5 -6
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/mcp-client-factory.d.ts +1 -1
- package/dist/modules/agents/json-config/mcp-client-factory.js +16 -69
- package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -1
- package/dist/modules/agents/json-config/model-config.js.map +1 -1
- package/dist/modules/agents/json-config/prune-missing-config-references.d.ts +1 -1
- package/dist/modules/agents/json-config/prune-missing-config-references.js +0 -4
- package/dist/modules/agents/json-config/prune-missing-config-references.js.map +1 -1
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.d.ts +4 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js +31 -4
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js.map +1 -1
- package/dist/modules/agents/plans/agent-plan-tools.d.ts +50 -1
- package/dist/modules/agents/plans/agent-plan-tools.js +122 -9
- package/dist/modules/agents/plans/agent-plan-tools.js.map +1 -1
- package/dist/modules/agents/plans/agent-plan-work-state.d.ts +36 -0
- package/dist/modules/agents/plans/agent-plan-work-state.js +13 -0
- package/dist/modules/agents/plans/agent-plan-work-state.js.map +1 -0
- package/dist/modules/agents/plans/agent-plan.validation.d.ts +2 -1
- package/dist/modules/agents/plans/agent-plan.validation.js +6 -4
- package/dist/modules/agents/plans/agent-plan.validation.js.map +1 -1
- package/dist/modules/agents/register-favorite-resolver.js +1 -1
- package/dist/modules/agents/register-favorite-resolver.js.map +1 -1
- package/dist/modules/agents/repositories/agent-chat-attachment.repository.d.ts +4 -0
- package/dist/modules/agents/repositories/agent-chat-attachment.repository.js +7 -0
- package/dist/modules/agents/repositories/agent-chat-attachment.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +16 -0
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +63 -0
- 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 +1 -1
- package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-message-queue.repository.d.ts +4 -0
- package/dist/modules/agents/repositories/agent-message-queue.repository.js +6 -1
- package/dist/modules/agents/repositories/agent-message-queue.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-thread-grant.repository.d.ts +1 -0
- package/dist/modules/agents/repositories/agent-thread-grant.repository.js +3 -0
- package/dist/modules/agents/repositories/agent-thread-grant.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-workflow-dependency.repository.js +1 -1
- package/dist/modules/agents/repositories/agent-workflow-dependency.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +22 -14
- package/dist/modules/agents/repositories/agent.repository.js +159 -40
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/repositories/skill.repository.d.ts +98 -0
- package/dist/modules/agents/repositories/skill.repository.js +569 -0
- package/dist/modules/agents/repositories/skill.repository.js.map +1 -0
- package/dist/modules/agents/scheduling/agent-task-job-registrar.js.map +1 -1
- package/dist/modules/agents/skills/skill-content-hash.d.ts +13 -0
- package/dist/modules/agents/skills/skill-content-hash.js +31 -0
- package/dist/modules/agents/skills/skill-content-hash.js.map +1 -0
- package/dist/modules/agents/skills/skill-name-taken.error.d.ts +6 -0
- package/dist/modules/agents/skills/skill-name-taken.error.js +18 -0
- package/dist/modules/agents/skills/skill-name-taken.error.js.map +1 -0
- package/dist/modules/agents/skills/skill-names.d.ts +3 -0
- package/dist/modules/agents/skills/skill-names.js +32 -0
- package/dist/modules/agents/skills/skill-names.js.map +1 -0
- package/dist/modules/agents/skills/skill.service.d.ts +82 -0
- package/dist/modules/agents/skills/skill.service.js +368 -0
- package/dist/modules/agents/skills/skill.service.js.map +1 -0
- package/dist/modules/agents/skills/skills-api.service.d.ts +28 -0
- package/dist/modules/agents/skills/skills-api.service.js +249 -0
- package/dist/modules/agents/skills/skills-api.service.js.map +1 -0
- package/dist/modules/agents/skills/skills-hub-rollout.d.ts +10 -0
- package/dist/modules/agents/skills/skills-hub-rollout.js +35 -0
- package/dist/modules/agents/skills/skills-hub-rollout.js.map +1 -0
- package/dist/modules/agents/skills/skills-hub-startup-copy.d.ts +40 -0
- package/dist/modules/agents/skills/skills-hub-startup-copy.js +402 -0
- package/dist/modules/agents/skills/skills-hub-startup-copy.js.map +1 -0
- package/dist/modules/agents/skills/skills-telemetry.d.ts +21 -0
- package/dist/modules/agents/skills/skills-telemetry.js +98 -0
- package/dist/modules/agents/skills/skills-telemetry.js.map +1 -0
- package/dist/modules/agents/skills.controller.d.ts +19 -0
- package/dist/modules/agents/skills.controller.js +106 -0
- package/dist/modules/agents/skills.controller.js.map +1 -0
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +6 -0
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-runner.d.ts +2 -1
- package/dist/modules/agents/sub-agents/sub-agent-runner.js +23 -4
- package/dist/modules/agents/sub-agents/sub-agent-runner.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js +9 -6
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js +4 -0
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/policy-refusal.d.ts +8 -0
- package/dist/modules/agents/tools/policy-refusal.js +9 -0
- package/dist/modules/agents/tools/policy-refusal.js.map +1 -0
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +1 -0
- package/dist/modules/agents/tools/workflow-tool-factory.js +106 -52
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.d.ts +1 -1
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +2 -2
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -1
- package/dist/modules/agents/types/agent-queued-message.d.ts +4 -1
- package/dist/modules/agents/types/agent-queued-message.js +1 -1
- package/dist/modules/agents/types/agent-queued-message.js.map +1 -1
- package/dist/modules/agents/utils/agent-definition.d.ts +15 -17
- package/dist/modules/agents/utils/agent-definition.js +2 -2
- package/dist/modules/agents/utils/agent-definition.js.map +1 -1
- package/dist/modules/agents/utils/agent-memory-scope.d.ts +2 -0
- package/dist/modules/agents/utils/agent-memory-scope.js +12 -0
- package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -1
- package/dist/modules/agents/utils/agent-missing-skill-ids.js +0 -2
- package/dist/modules/agents/utils/agent-missing-skill-ids.js.map +1 -1
- package/dist/modules/agents/utils/agent-published-snapshot.d.ts +6 -4
- package/dist/modules/agents/utils/agent-published-snapshot.js +2 -3
- package/dist/modules/agents/utils/agent-published-snapshot.js.map +1 -1
- package/dist/modules/agents/utils/agent-runtime-assets.d.ts +3 -2
- package/dist/modules/agents/utils/agent-runtime-assets.js +2 -2
- package/dist/modules/agents/utils/agent-runtime-assets.js.map +1 -1
- package/dist/modules/agents/utils/agent-thread-access.d.ts +3 -1
- package/dist/modules/agents/utils/agent-thread-access.js +16 -4
- package/dist/modules/agents/utils/agent-thread-access.js.map +1 -1
- package/dist/modules/agents/utils/get-agent-or-throw.d.ts +2 -2
- package/dist/modules/breaking-changes/breaking-changes.controller.d.ts +5 -2
- package/dist/modules/breaking-changes/breaking-changes.controller.js +16 -2
- package/dist/modules/breaking-changes/breaking-changes.controller.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.module.d.ts +1 -1
- package/dist/modules/breaking-changes/database/repositories/migration-finding.repository.d.ts +6 -6
- package/dist/modules/breaking-changes/database/repositories/migration-finding.repository.js +31 -21
- package/dist/modules/breaking-changes/database/repositories/migration-finding.repository.js.map +1 -1
- package/dist/modules/breaking-changes/migrations/index.js +2 -2
- package/dist/modules/breaking-changes/migrations/index.js.map +1 -1
- package/dist/modules/breaking-changes/migrations/node-migration.d.ts +1 -0
- package/dist/modules/breaking-changes/migrations/node-migration.js +17 -0
- package/dist/modules/breaking-changes/migrations/node-migration.js.map +1 -1
- package/dist/modules/breaking-changes/migrations/node-removals/ai-transform-to-code.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/node-removals/ai-transform-to-code.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/document-loaders.migration.d.ts +3 -0
- package/dist/modules/breaking-changes/migrations/node-removals/document-loaders.migration.js +79 -0
- package/dist/modules/breaking-changes/migrations/node-removals/document-loaders.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/html-extract-to-html.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/node-removals/html-extract-to-html.migration.js +40 -0
- package/dist/modules/breaking-changes/migrations/node-removals/html-extract-to-html.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/ical-to-convert-to-file.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/node-removals/ical-to-convert-to-file.migration.js +17 -0
- package/dist/modules/breaking-changes/migrations/node-removals/ical-to-convert-to-file.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/index.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/node-removals/index.js +32 -0
- package/dist/modules/breaking-changes/migrations/node-removals/index.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/item-lists-checks.d.ts +4 -0
- package/dist/modules/breaking-changes/migrations/node-removals/item-lists-checks.js +46 -0
- package/dist/modules/breaking-changes/migrations/node-removals/item-lists-checks.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/item-lists-legacy.d.ts +10 -0
- package/dist/modules/breaking-changes/migrations/node-removals/item-lists-legacy.js +252 -0
- package/dist/modules/breaking-changes/migrations/node-removals/item-lists-legacy.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/item-lists.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/node-removals/item-lists.migration.js +85 -0
- package/dist/modules/breaking-changes/migrations/node-removals/item-lists.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/read-pdf-to-extract-from-file.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/node-removals/read-pdf-to-extract-from-file.migration.js +28 -0
- package/dist/modules/breaking-changes/migrations/node-removals/read-pdf-to-extract-from-file.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/schedule-trigger.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/node-removals/schedule-trigger.migration.js +91 -0
- package/dist/modules/breaking-changes/migrations/node-removals/schedule-trigger.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/vector-stores.migration.d.ts +7 -0
- package/dist/modules/breaking-changes/migrations/node-removals/vector-stores.migration.js +133 -0
- package/dist/modules/breaking-changes/migrations/node-removals/vector-stores.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/workflow-trigger-to-n8n-trigger.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/node-removals/workflow-trigger-to-n8n-trigger.migration.js +26 -0
- package/dist/modules/breaking-changes/migrations/node-removals/workflow-trigger-to-n8n-trigger.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-removals/write-binary-file-to-read-write-file.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/node-removals/write-binary-file-to-read-write-file.migration.js +27 -0
- package/dist/modules/breaking-changes/migrations/node-removals/write-binary-file-to-read-write-file.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/parameter-readers.d.ts +10 -0
- package/dist/modules/breaking-changes/migrations/parameter-readers.js +51 -0
- package/dist/modules/breaking-changes/migrations/parameter-readers.js.map +1 -0
- package/dist/modules/breaking-changes/notifications/migration-finding-notification.service.d.ts +20 -0
- package/dist/modules/breaking-changes/notifications/migration-finding-notification.service.js +136 -0
- package/dist/modules/breaking-changes/notifications/migration-finding-notification.service.js.map +1 -0
- package/dist/modules/breaking-changes/query/migration-finding-query.service.js +3 -2
- package/dist/modules/breaking-changes/query/migration-finding-query.service.js.map +1 -1
- package/dist/modules/breaking-changes/sync/migration-finding-diff.js +2 -2
- package/dist/modules/breaking-changes/sync/migration-finding-diff.js.map +1 -1
- package/dist/modules/breaking-changes/sync/migration-finding-sync.service.js +1 -1
- package/dist/modules/breaking-changes/sync/migration-finding-sync.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-extractor.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub-extractor.js +2 -2
- package/dist/modules/chat-hub/chat-hub-extractor.js.map +1 -1
- package/dist/modules/data-table/data-table-file-cleanup.task.d.ts +2 -3
- package/dist/modules/data-table/data-table-file-cleanup.task.js +1 -5
- package/dist/modules/data-table/data-table-file-cleanup.task.js.map +1 -1
- package/dist/modules/data-table/data-table-permissions.d.ts +2 -0
- package/dist/modules/data-table/data-table-permissions.js +6 -0
- package/dist/modules/data-table/data-table-permissions.js.map +1 -1
- package/dist/modules/data-table/data-table-proxy.service.d.ts +0 -1
- package/dist/modules/data-table/data-table-proxy.service.js +8 -17
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/data-table/data-table.controller.d.ts +0 -1
- package/dist/modules/data-table/data-table.controller.js +7 -17
- package/dist/modules/data-table/data-table.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +2 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-refresh.task.d.ts +2 -3
- package/dist/modules/external-secrets.ee/external-secrets-refresh.task.js +1 -5
- package/dist/modules/external-secrets.ee/external-secrets-refresh.task.js.map +1 -1
- package/dist/modules/inbound-auth-core/authentication-pipeline.js +7 -0
- package/dist/modules/inbound-auth-core/authentication-pipeline.js.map +1 -1
- package/dist/modules/inbound-auth-core/constants.d.ts +42 -0
- package/dist/modules/inbound-auth-core/constants.js +24 -0
- package/dist/modules/inbound-auth-core/constants.js.map +1 -0
- package/dist/modules/inbound-auth-core/grant-authorization.d.ts +2 -2
- package/dist/modules/inbound-auth-core/grant-authorization.js.map +1 -1
- package/dist/modules/inbound-auth-core/identity/trusted-source-identity.service.d.ts +1 -1
- package/dist/modules/inbound-auth-core/identity/trusted-source-identity.service.js +2 -2
- package/dist/modules/inbound-auth-core/identity/trusted-source-identity.service.js.map +1 -1
- package/dist/modules/inbound-auth-core/inbound-auth-core.module.d.ts +3 -0
- package/dist/modules/inbound-auth-core/inbound-auth-core.module.js +32 -10
- package/dist/modules/inbound-auth-core/inbound-auth-core.module.js.map +1 -1
- package/dist/modules/inbound-auth-core/local-authorization-server.proxy.d.ts +15 -0
- package/dist/modules/inbound-auth-core/local-authorization-server.proxy.js +47 -0
- package/dist/modules/inbound-auth-core/local-authorization-server.proxy.js.map +1 -0
- package/dist/modules/inbound-auth-core/oauth2-bearer.driver.d.ts +3 -2
- package/dist/modules/inbound-auth-core/oauth2-bearer.driver.js +7 -2
- package/dist/modules/inbound-auth-core/oauth2-bearer.driver.js.map +1 -1
- package/dist/modules/inbound-auth-core/public-api-oauth.strategy.d.ts +16 -0
- package/dist/modules/inbound-auth-core/public-api-oauth.strategy.js +71 -0
- package/dist/modules/inbound-auth-core/public-api-oauth.strategy.js.map +1 -0
- package/dist/modules/inbound-auth-core/public-api-protected-resource.d.ts +21 -0
- package/dist/modules/inbound-auth-core/public-api-protected-resource.js +51 -0
- package/dist/modules/inbound-auth-core/public-api-protected-resource.js.map +1 -0
- package/dist/modules/inbound-auth-core/resource-admission.d.ts +12 -0
- package/dist/modules/inbound-auth-core/resource-admission.js +65 -0
- package/dist/modules/inbound-auth-core/resource-admission.js.map +1 -0
- package/dist/modules/inbound-auth-core/system-trusted-source.seeder.d.ts +0 -42
- package/dist/modules/inbound-auth-core/system-trusted-source.seeder.js +7 -26
- package/dist/modules/inbound-auth-core/system-trusted-source.seeder.js.map +1 -1
- package/dist/modules/inbound-auth-core/trusted-source-directory.service.d.ts +7 -0
- package/dist/modules/inbound-auth-core/trusted-source-directory.service.js +32 -0
- package/dist/modules/inbound-auth-core/trusted-source-directory.service.js.map +1 -0
- package/dist/modules/inbound-auth-core/trusted-source-discovery.task.d.ts +2 -3
- package/dist/modules/inbound-auth-core/trusted-source-discovery.task.js +1 -2
- package/dist/modules/inbound-auth-core/trusted-source-discovery.task.js.map +1 -1
- package/dist/modules/inbound-auth-core/trusted-source.controller.d.ts +27 -0
- package/dist/modules/inbound-auth-core/trusted-source.controller.js +190 -0
- package/dist/modules/inbound-auth-core/trusted-source.controller.js.map +1 -0
- package/dist/modules/inbound-auth-core/trusted-source.store.d.ts +1 -0
- package/dist/modules/inbound-auth-core/trusted-source.store.js +6 -3
- package/dist/modules/inbound-auth-core/trusted-source.store.js.map +1 -1
- package/dist/modules/inbox/inbox-source.registry.d.ts +39 -0
- package/dist/modules/inbox/inbox-source.registry.js +64 -0
- package/dist/modules/inbox/inbox-source.registry.js.map +1 -0
- package/dist/modules/inbox/inbox.controller.d.ts +10 -0
- package/dist/modules/{quick-connect/quick-connect.controller.js → inbox/inbox.controller.js} +26 -17
- package/dist/modules/inbox/inbox.controller.js.map +1 -0
- package/dist/modules/inbox/inbox.module.d.ts +4 -0
- package/dist/modules/{workflow-builder/workflow-builder.module.js → inbox/inbox.module.js} +9 -10
- package/dist/modules/inbox/inbox.module.js.map +1 -0
- package/dist/modules/inbox/inbox.service.d.ts +17 -0
- package/dist/modules/inbox/inbox.service.js +184 -0
- package/dist/modules/inbox/inbox.service.js.map +1 -0
- package/dist/modules/instance-ai/agent-preview-handoff.js +1 -1
- package/dist/modules/instance-ai/agent-preview-handoff.js.map +1 -1
- package/dist/modules/instance-ai/agents-access.d.ts +2 -0
- package/dist/modules/instance-ai/agents-access.js +9 -0
- package/dist/modules/instance-ai/agents-access.js.map +1 -0
- package/dist/modules/instance-ai/conversation-history-content.d.ts +3 -2
- package/dist/modules/instance-ai/conversation-history-content.js +8 -2
- package/dist/modules/instance-ai/conversation-history-content.js.map +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.js +14 -7
- package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +11 -10
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-utils.js +2 -0
- package/dist/modules/instance-ai/eval/mock-utils.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-credential-allowlist.service.d.ts +8 -0
- package/dist/modules/instance-ai/eval/thread-credential-allowlist.service.js +10 -0
- package/dist/modules/instance-ai/eval/thread-credential-allowlist.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.js +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +6 -6
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/durable-event-log.d.ts +1 -0
- package/dist/modules/instance-ai/event-bus/durable-event-log.js +65 -7
- package/dist/modules/instance-ai/event-bus/durable-event-log.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.d.ts +2 -5
- package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js +10 -8
- package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-conversation-history.service.js +1 -1
- package/dist/modules/instance-ai/instance-ai-conversation-history.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-credit.service.d.ts +1 -11
- package/dist/modules/instance-ai/instance-ai-credit.service.js +9 -52
- package/dist/modules/instance-ai/instance-ai-credit.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-model.service.d.ts +9 -2
- package/dist/modules/instance-ai/instance-ai-model.service.js +35 -6
- package/dist/modules/instance-ai/instance-ai-model.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-pending-agent.service.d.ts +2 -0
- package/dist/modules/instance-ai/instance-ai-pending-agent.service.js +2 -1
- package/dist/modules/instance-ai/instance-ai-pending-agent.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-run-pin-data.js +1 -1
- package/dist/modules/instance-ai/instance-ai-run-pin-data.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +1 -2
- package/dist/modules/instance-ai/instance-ai-settings.service.js +5 -18
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-skills.service.d.ts +26 -0
- package/dist/modules/instance-ai/instance-ai-skills.service.js +63 -0
- package/dist/modules/instance-ai/instance-ai-skills.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +17 -15
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +13 -15
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +7 -1
- package/dist/modules/instance-ai/instance-ai.controller.js +19 -0
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -2
- package/dist/modules/instance-ai/instance-ai.module.js +9 -1
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +3 -3
- package/dist/modules/instance-ai/instance-ai.service.js +52 -73
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-context.service.js +3 -3
- package/dist/modules/instance-ai/instance-context.service.js.map +1 -1
- package/dist/modules/instance-ai/internal-messages.js +5 -5
- package/dist/modules/instance-ai/internal-messages.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +2 -5
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +8 -26
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js.map +1 -1
- package/dist/modules/instance-ai/model-config-name.d.ts +5 -0
- package/dist/modules/instance-ai/model-config-name.js +25 -0
- package/dist/modules/instance-ai/model-config-name.js.map +1 -0
- package/dist/modules/instance-ai/onboarding.d.ts +0 -2
- package/dist/modules/instance-ai/onboarding.js +1 -14
- package/dist/modules/instance-ai/onboarding.js.map +1 -1
- package/dist/modules/instance-ai/repositories/conversation-history-search.d.ts +5 -1
- package/dist/modules/instance-ai/repositories/conversation-history-search.js +10 -5
- package/dist/modules/instance-ai/repositories/conversation-history-search.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-conversation-history.repository.js +2 -2
- package/dist/modules/instance-ai/repositories/instance-ai-conversation-history.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.d.ts +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js +11 -0
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.d.ts +0 -1
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.js +0 -10
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.d.ts +2 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +4 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.d.ts +42 -2
- package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.js +63 -2
- package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.js.map +1 -1
- package/dist/modules/instance-ai/self-healing/self-healing-result.service.d.ts +10 -3
- package/dist/modules/instance-ai/self-healing/self-healing-result.service.js +30 -2
- package/dist/modules/instance-ai/self-healing/self-healing-result.service.js.map +1 -1
- package/dist/modules/instance-registry/checks/instance-registry-reconciliation.task.d.ts +2 -4
- package/dist/modules/instance-registry/checks/instance-registry-reconciliation.task.js +4 -7
- package/dist/modules/instance-registry/checks/instance-registry-reconciliation.task.js.map +1 -1
- package/dist/modules/instance-registry/instance-registry-heartbeat.task.d.ts +2 -3
- package/dist/modules/instance-registry/instance-registry-heartbeat.task.js +1 -5
- package/dist/modules/instance-registry/instance-registry-heartbeat.task.js.map +1 -1
- package/dist/modules/instance-registry/instance-registry.module.js +1 -1
- package/dist/modules/instance-registry/instance-registry.module.js.map +1 -1
- package/dist/modules/instance-registry/stale-member-cleanup.task.d.ts +2 -3
- package/dist/modules/instance-registry/stale-member-cleanup.task.js +1 -2
- package/dist/modules/instance-registry/stale-member-cleanup.task.js.map +1 -1
- package/dist/modules/instance-reporting.ee/instance-reporting.task.d.ts +2 -4
- package/dist/modules/instance-reporting.ee/instance-reporting.task.js +4 -7
- package/dist/modules/instance-reporting.ee/instance-reporting.task.js.map +1 -1
- package/dist/modules/log-streaming.ee/log-streaming.controller.js +12 -1
- package/dist/modules/log-streaming.ee/log-streaming.controller.js.map +1 -1
- package/dist/modules/mcp/mcp-api-key.service.d.ts +2 -3
- package/dist/modules/mcp/mcp-api-key.service.js +3 -3
- package/dist/modules/mcp/mcp-api-key.service.js.map +1 -1
- package/dist/modules/mcp/mcp-protected-resource.d.ts +2 -2
- package/dist/modules/mcp/mcp-protected-resource.js +5 -3
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
- package/dist/modules/mcp/mcp-scopes.d.ts +1 -0
- package/dist/modules/mcp/mcp-scopes.js +7 -1
- package/dist/modules/mcp/mcp-scopes.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.d.ts +2 -2
- package/dist/modules/mcp/mcp-server-middleware.service.js +3 -3
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp-tool-availability.d.ts +1 -0
- package/dist/modules/mcp/mcp-tool-availability.js +4 -0
- package/dist/modules/mcp/mcp-tool-availability.js.map +1 -1
- package/dist/modules/mcp/mcp.module.js +1 -1
- package/dist/modules/mcp/mcp.module.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +1 -3
- package/dist/modules/mcp/mcp.service.js +5 -3
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +12 -8
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-slack-setup.d.ts +5 -5
- package/dist/modules/mcp/tools/agents/agent-slack-setup.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +24 -9
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/get-execution.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/skills/skill-tools.service.d.ts +11 -0
- package/dist/modules/mcp/tools/skills/skill-tools.service.js +242 -0
- package/dist/modules/mcp/tools/skills/skill-tools.service.js.map +1 -0
- package/dist/modules/mcp/tools/tool-result.utils.d.ts +8 -0
- package/dist/modules/mcp/tools/tool-result.utils.js +11 -0
- package/dist/modules/mcp/tools/tool-result.utils.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-auth-fetch.d.ts +15 -0
- package/dist/modules/mcp-registry/mcp-auth-fetch.js +64 -0
- package/dist/modules/mcp-registry/mcp-auth-fetch.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-connection-discovery.service.d.ts +23 -0
- package/dist/modules/mcp-registry/mcp-connection-discovery.service.js +219 -0
- package/dist/modules/mcp-registry/mcp-connection-discovery.service.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-registry-refresh.task.d.ts +2 -3
- package/dist/modules/mcp-registry/mcp-registry-refresh.task.js +4 -6
- package/dist/modules/mcp-registry/mcp-registry-refresh.task.js.map +1 -1
- package/dist/modules/mcp-registry/mcp-registry-response.d.ts +3 -0
- package/dist/modules/mcp-registry/mcp-registry-response.js +35 -0
- package/dist/modules/mcp-registry/mcp-registry-response.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-registry.controller.d.ts +6 -2
- package/dist/modules/mcp-registry/mcp-registry.controller.js +25 -28
- package/dist/modules/mcp-registry/mcp-registry.controller.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mock-servers.js +3 -3
- package/dist/modules/mcp-registry/registry/mock-servers.js.map +1 -1
- package/dist/modules/modules.manifest.js +2 -0
- package/dist/modules/modules.manifest.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-blocked.error.js +1 -0
- package/dist/modules/n8n-packages/engine/import-blocked.error.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-gates.d.ts +6 -0
- package/dist/modules/n8n-packages/engine/import-gates.js +8 -0
- package/dist/modules/n8n-packages/engine/import-gates.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +20 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.js +3 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +3 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +38 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/package-layout.d.ts +10 -2
- package/dist/modules/n8n-packages/engine/package-layout.js +26 -0
- package/dist/modules/n8n-packages/engine/package-layout.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.js +29 -4
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +19 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/agent/agent.exporter.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/agent/agent.exporter.js +6 -0
- package/dist/modules/n8n-packages/entities/agent/agent.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/agent/agent.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-conflict-policy.d.ts +20 -0
- package/dist/modules/n8n-packages/entities/credential/credential-conflict-policy.js +98 -0
- package/dist/modules/n8n-packages/entities/credential/credential-conflict-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js +16 -2
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-importer.d.ts +7 -3
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js +95 -5
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.d.ts +3 -1
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js +14 -4
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +13 -2
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.d.ts +2 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js +2 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +39 -3
- package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.types.d.ts +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js +2 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +16 -2
- package/dist/modules/n8n-packages/n8n-packages.types.js +6 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/agent.schema.d.ts +133 -164
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +3 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js +1 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js.map +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.d.ts +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.js.map +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe-jwks.provider.d.ts +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe.module.d.ts +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe.module.js +4 -5
- package/dist/modules/oauth-jwe/oauth-jwe.module.js.map +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe.schemas.js +3 -3
- package/dist/modules/oauth-jwe/oauth-jwe.schemas.js.map +1 -1
- package/dist/modules/oauth-server/database/repositories/oauth-access-token.repository.d.ts +1 -0
- package/dist/modules/oauth-server/database/repositories/oauth-access-token.repository.js +3 -0
- package/dist/modules/oauth-server/database/repositories/oauth-access-token.repository.js.map +1 -1
- package/dist/modules/oauth-server/dto/approve-consent-request.dto.d.ts +3 -1
- package/dist/modules/oauth-server/dto/approve-consent-request.dto.js +8 -1
- package/dist/modules/oauth-server/dto/approve-consent-request.dto.js.map +1 -1
- package/dist/modules/oauth-server/oauth-consent.controller.d.ts +5 -1
- package/dist/modules/oauth-server/oauth-consent.controller.js +15 -14
- package/dist/modules/oauth-server/oauth-consent.controller.js.map +1 -1
- package/dist/modules/oauth-server/oauth-consent.service.d.ts +1 -1
- package/dist/modules/oauth-server/oauth-consent.service.js +2 -2
- package/dist/modules/oauth-server/oauth-consent.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-flow.service.d.ts +23 -9
- package/dist/modules/oauth-server/oauth-flow.service.js +279 -43
- package/dist/modules/oauth-server/oauth-flow.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-local-authorization-server.d.ts +5 -2
- package/dist/modules/oauth-server/oauth-local-authorization-server.js +8 -3
- package/dist/modules/oauth-server/oauth-local-authorization-server.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.module.js +6 -6
- package/dist/modules/oauth-server/oauth-server.module.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.service.d.ts +1 -1
- package/dist/modules/oauth-server/oauth-server.service.js +8 -6
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-session.service.d.ts +13 -7
- package/dist/modules/oauth-server/oauth-session.service.js +48 -13
- package/dist/modules/oauth-server/oauth-session.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-signing-jwks.provider.d.ts +1 -1
- package/dist/modules/oauth-server/oauth-signing-key.schemas.js +2 -2
- package/dist/modules/oauth-server/oauth-signing-key.schemas.js.map +1 -1
- package/dist/modules/oauth-server/oauth-signing-key.service.d.ts +1 -1
- package/dist/modules/oauth-server/oauth-signing-key.service.js +2 -2
- package/dist/modules/oauth-server/oauth-signing-key.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +2 -4
- package/dist/modules/oauth-server/oauth-token.service.js +2 -3
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth.controller.d.ts +4 -2
- package/dist/modules/oauth-server/oauth.controller.js +41 -8
- package/dist/modules/oauth-server/oauth.controller.js.map +1 -1
- package/dist/modules/oauth-server/oauth.helpers.d.ts +1 -0
- package/dist/modules/oauth-server/oauth.helpers.js +14 -0
- package/dist/modules/oauth-server/oauth.helpers.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.d.ts +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.d.ts +7 -5
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.d.ts +7 -5
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/index.js +9 -9
- package/dist/modules/oauth-server/protected-resource-resolvers/index.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.d.ts +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js +8 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.d.ts +3 -3
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.d.ts +3 -3
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.d.ts +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.js +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-trigger-resource.resolver.d.ts +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/resource-gate.d.ts +1 -1
- package/dist/modules/oauth-server/resource-gate.js.map +1 -1
- package/dist/modules/oauth-server/resource-identity.d.ts +1 -1
- package/dist/modules/promotions.ee/constants.d.ts +1 -1
- package/dist/modules/promotions.ee/constants.js +1 -1
- package/dist/modules/promotions.ee/constants.js.map +1 -1
- package/dist/modules/promotions.ee/database/entities/promotion-connection.entity.d.ts +3 -2
- package/dist/modules/promotions.ee/database/entities/promotion-connection.entity.js.map +1 -1
- package/dist/modules/promotions.ee/database/entities/promotion-review.entity.d.ts +21 -0
- package/dist/modules/promotions.ee/database/entities/promotion-review.entity.js +95 -0
- package/dist/modules/promotions.ee/database/entities/promotion-review.entity.js.map +1 -0
- package/dist/modules/promotions.ee/database/entities/promotion-run.entity.d.ts +18 -0
- package/dist/modules/promotions.ee/database/entities/promotion-run.entity.js +82 -0
- package/dist/modules/promotions.ee/database/entities/promotion-run.entity.js.map +1 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-connection.repository.d.ts +2 -1
- package/dist/modules/promotions.ee/database/repositories/promotion-connection.repository.js +6 -2
- package/dist/modules/promotions.ee/database/repositories/promotion-connection.repository.js.map +1 -1
- package/dist/modules/promotions.ee/database/repositories/promotion-review.repository.d.ts +18 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-review.repository.js +61 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-review.repository.js.map +1 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-run.repository.d.ts +9 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-run.repository.js +33 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-run.repository.js.map +1 -0
- package/dist/modules/promotions.ee/git-hosts/git-host-target.d.ts +30 -0
- package/dist/modules/promotions.ee/git-hosts/git-host-target.js +97 -0
- package/dist/modules/promotions.ee/git-hosts/git-host-target.js.map +1 -0
- package/dist/modules/promotions.ee/git-hosts/git-host.types.d.ts +12 -0
- package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.d.ts +4 -1
- package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.js +73 -6
- package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.d.ts +1 -0
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.js +12 -0
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-config.resolver.js +3 -5
- package/dist/modules/promotions.ee/promotion-config.resolver.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-connections.service.d.ts +1 -0
- package/dist/modules/promotions.ee/promotion-connections.service.js +39 -12
- package/dist/modules/promotions.ee/promotion-connections.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-providers.service.d.ts +13 -0
- package/dist/modules/promotions.ee/promotion-providers.service.js +28 -0
- package/dist/modules/promotions.ee/promotion-providers.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions-git.service.d.ts +3 -0
- package/dist/modules/promotions.ee/promotions-git.service.js +30 -4
- package/dist/modules/promotions.ee/promotions-git.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions.module.d.ts +1 -1
- package/dist/modules/promotions.ee/promotions.module.js +10 -1
- package/dist/modules/promotions.ee/promotions.module.js.map +1 -1
- package/dist/modules/promotions.ee/promotions.service.d.ts +0 -1
- package/dist/modules/promotions.ee/promotions.service.js +45 -19
- package/dist/modules/promotions.ee/promotions.service.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.module.js +1 -1
- package/dist/modules/provisioning.ee/provisioning.module.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.service.ee.d.ts +1 -0
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +14 -2
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-provider.ee.d.ts +1 -1
- package/dist/modules/provisioning.ee/role-resolver-types.d.ts +1 -1
- package/dist/modules/redaction/dynamic-credentials-context-hook.d.ts +1 -1
- package/dist/modules/redaction/dynamic-credentials-context-hook.js +2 -2
- package/dist/modules/redaction/dynamic-credentials-context-hook.js.map +1 -1
- package/dist/modules/redaction/executions/execution-redaction.interfaces.d.ts +3 -1
- package/dist/modules/redaction/executions/execution-redaction.service.d.ts +4 -2
- package/dist/modules/redaction/executions/execution-redaction.service.js +35 -11
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/redaction/executions/strategies/full-item-redaction.strategy.d.ts +1 -1
- package/dist/modules/redaction/executions/strategies/full-item-redaction.strategy.js +6 -1
- package/dist/modules/redaction/executions/strategies/full-item-redaction.strategy.js.map +1 -1
- package/dist/modules/redaction/executions/strategies/node-defined-field-redaction.strategy.d.ts +1 -1
- package/dist/modules/redaction/redaction.module.js +2 -2
- package/dist/modules/redaction/redaction.module.js.map +1 -1
- package/dist/modules/runtime-credentials/runtime-credentials-access.service.d.ts +1 -1
- package/dist/modules/runtime-credentials/runtime-credentials.module.js +2 -2
- package/dist/modules/runtime-credentials/runtime-credentials.module.js.map +1 -1
- package/dist/modules/scim/database/scim-api-key.repository.js +2 -2
- package/dist/modules/scim/database/scim-api-key.repository.js.map +1 -1
- package/dist/modules/scim/database/scim-user.repository.d.ts +23 -0
- package/dist/modules/scim/database/scim-user.repository.js +53 -0
- package/dist/modules/scim/database/scim-user.repository.js.map +1 -0
- package/dist/modules/scim/scim-body-parser.d.ts +2 -0
- package/dist/modules/scim/scim-body-parser.js +19 -0
- package/dist/modules/scim/scim-body-parser.js.map +1 -0
- package/dist/modules/scim/scim-discovery.controller.js +84 -7
- package/dist/modules/scim/scim-discovery.controller.js.map +1 -1
- package/dist/modules/scim/scim-route.js +2 -1
- package/dist/modules/scim/scim-route.js.map +1 -1
- package/dist/modules/scim/scim-token.service.d.ts +1 -2
- package/dist/modules/scim/scim-token.service.js +1 -2
- package/dist/modules/scim/scim-token.service.js.map +1 -1
- package/dist/modules/scim/scim.controller.d.ts +19 -0
- package/dist/modules/scim/scim.controller.js +163 -0
- package/dist/modules/scim/scim.controller.js.map +1 -0
- package/dist/modules/scim/scim.errors.d.ts +13 -0
- package/dist/modules/scim/scim.errors.js +29 -0
- package/dist/modules/scim/scim.errors.js.map +1 -0
- package/dist/modules/scim/scim.module.js +1 -0
- package/dist/modules/scim/scim.module.js.map +1 -1
- package/dist/modules/scim/scim.service.d.ts +38 -0
- package/dist/modules/scim/scim.service.js +329 -0
- package/dist/modules/scim/scim.service.js.map +1 -0
- package/dist/modules/source-control.ee/source-control-git.service.ee.js +2 -0
- package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-helper.ee.js +6 -51
- package/dist/modules/source-control.ee/source-control-helper.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +3 -2
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +59 -13
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +4 -0
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +2 -0
- package/dist/modules/source-control.ee/source-control.service.ee.js +6 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.d.ts +1 -2
- package/dist/modules/sso-oidc/oidc.service.ee.js +1 -2
- package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
- package/dist/modules/token-exchange/services/jti-cleanup.task.d.ts +2 -3
- package/dist/modules/token-exchange/services/jti-cleanup.task.js +1 -2
- package/dist/modules/token-exchange/services/jti-cleanup.task.js.map +1 -1
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.d.ts +2 -2
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.js +2 -2
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.js.map +1 -1
- package/dist/modules/token-exchange/services/token-exchange.service.d.ts +1 -1
- package/dist/modules/token-exchange/services/token-exchange.service.js +2 -2
- package/dist/modules/token-exchange/services/token-exchange.service.js.map +1 -1
- package/dist/modules/token-exchange/services/trusted-key-refresh.task.d.ts +2 -3
- package/dist/modules/token-exchange/services/trusted-key-refresh.task.js +1 -2
- package/dist/modules/token-exchange/services/trusted-key-refresh.task.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.module.js +1 -1
- package/dist/modules/token-exchange/token-exchange.module.js.map +1 -1
- package/dist/modules/type-availability-policies/credential-type-policy-instance.controller.d.ts +5 -7
- package/dist/modules/type-availability-policies/credential-type-policy-instance.controller.js +13 -1
- package/dist/modules/type-availability-policies/credential-type-policy-instance.controller.js.map +1 -1
- package/dist/modules/type-availability-policies/credential-type-policy-project.controller.d.ts +1 -1
- package/dist/modules/type-availability-policies/credential-type-policy.check.js +3 -14
- package/dist/modules/type-availability-policies/credential-type-policy.check.js.map +1 -1
- package/dist/modules/type-availability-policies/node-type-policy.check.js +2 -13
- package/dist/modules/type-availability-policies/node-type-policy.check.js.map +1 -1
- package/dist/modules/type-availability-policies/package-resolver.d.ts +2 -0
- package/dist/modules/type-availability-policies/package-resolver.js +17 -0
- package/dist/modules/type-availability-policies/package-resolver.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-rule-lint.d.ts +14 -0
- package/dist/modules/type-availability-policies/policy-rule-lint.js +19 -0
- package/dist/modules/type-availability-policies/policy-rule-lint.js.map +1 -0
- package/dist/modules/type-availability-policies/policy-shadow-lint.d.ts +1 -0
- package/dist/modules/type-availability-policies/policy-shadow-lint.js +1 -1
- package/dist/modules/type-availability-policies/policy-shadow-lint.js.map +1 -1
- package/dist/modules/type-availability-policies/restricted-node-types.provider.d.ts +1 -1
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +2 -2
- package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policy-instance.controller.d.ts +5 -7
- package/dist/modules/type-availability-policies/type-availability-policy-instance.controller.js +13 -1
- package/dist/modules/type-availability-policies/type-availability-policy-instance.controller.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policy-project.controller.d.ts +1 -1
- package/dist/modules/type-availability-policies/type-availability-policy.service.d.ts +10 -7
- package/dist/modules/type-availability-policies/type-availability-policy.service.js +39 -36
- package/dist/modules/type-availability-policies/type-availability-policy.service.js.map +1 -1
- package/dist/modules/type-availability-policies/type-violation.d.ts +10 -0
- package/dist/modules/type-availability-policies/type-violation.js +29 -0
- package/dist/modules/type-availability-policies/type-violation.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +5 -5
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +12 -32
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.d.ts +1 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.d.ts +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.d.ts +1 -3
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js +0 -21
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js +12 -4
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js.map +1 -1
- package/dist/node-execution/ephemeral-node-executor.d.ts +2 -0
- package/dist/node-execution/ephemeral-node-executor.js +21 -6
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +3 -1
- package/dist/oauth/oauth.service.js +30 -3
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/output-schema-parameter-defaults.d.ts +7 -0
- package/dist/output-schema-parameter-defaults.js +23 -0
- package/dist/output-schema-parameter-defaults.js.map +1 -0
- package/dist/policy/policy-violation.error.d.ts +1 -0
- package/dist/policy/policy-violation.error.js +12 -0
- package/dist/policy/policy-violation.error.js.map +1 -1
- package/dist/public-api/idempotency-key-cleanup.task.d.ts +2 -3
- package/dist/public-api/idempotency-key-cleanup.task.js +6 -6
- package/dist/public-api/idempotency-key-cleanup.task.js.map +1 -1
- package/dist/public-api/idempotency-key.service.d.ts +9 -1
- package/dist/public-api/idempotency-key.service.js +41 -0
- package/dist/public-api/idempotency-key.service.js.map +1 -1
- package/dist/public-api/index.js +14 -138
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/media-types/request-body/multipart-parser.js.map +1 -1
- package/dist/public-api/public-api-controller.registry.d.ts +12 -2
- package/dist/public-api/public-api-controller.registry.js +98 -12
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/public-api-rate-limit.service.d.ts +17 -0
- package/dist/public-api/public-api-rate-limit.service.js +127 -0
- package/dist/public-api/public-api-rate-limit.service.js.map +1 -0
- package/dist/public-api/public-api-route-resolver.d.ts +0 -3
- package/dist/public-api/public-api-route-resolver.js +0 -19
- package/dist/public-api/public-api-route-resolver.js.map +1 -1
- package/dist/public-api/types.d.ts +1 -66
- package/dist/public-api/v1/controllers/credential-type-policies.public.controller.d.ts +1 -0
- package/dist/public-api/v1/controllers/credential-type-policies.public.controller.js +54 -29
- package/dist/public-api/v1/controllers/credential-type-policies.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/credentials.public.controller.d.ts +3 -1
- package/dist/public-api/v1/controllers/credentials.public.controller.js +22 -3
- package/dist/public-api/v1/controllers/credentials.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/executions.public.controller.d.ts +1 -2
- package/dist/public-api/v1/controllers/executions.public.controller.js +3 -5
- package/dist/public-api/v1/controllers/executions.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/log-streaming.mapper.d.ts +3 -3
- package/dist/public-api/v1/controllers/n8n-packages.public.controller.d.ts +3 -1
- package/dist/public-api/v1/controllers/n8n-packages.public.controller.js +95 -2
- package/dist/public-api/v1/controllers/n8n-packages.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.d.ts +1 -0
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js +54 -29
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/openapi/n8n-packages.openapi.d.ts +5 -1
- package/dist/public-api/v1/controllers/openapi/n8n-packages.openapi.js +29 -2
- package/dist/public-api/v1/controllers/openapi/n8n-packages.openapi.js.map +1 -1
- package/dist/public-api/v1/controllers/promotions.public.controller.d.ts +4 -1
- package/dist/public-api/v1/controllers/promotions.public.controller.js +70 -4
- package/dist/public-api/v1/controllers/promotions.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/source-control.public.controller.d.ts +2 -2
- package/dist/public-api/v1/controllers/source-control.public.controller.js +3 -2
- package/dist/public-api/v1/controllers/source-control.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +2 -2
- package/dist/public-api/v1/controllers/workflows.public.controller.js +13 -2
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.service.js +7 -86
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.js +15 -5
- package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/generate.d.ts +1 -1
- package/dist/public-api/v1/openapi-gen/generate.js +28 -47
- package/dist/public-api/v1/openapi-gen/generate.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +3915 -3646
- package/dist/public-api/v1/public-api-error-response.d.ts +1 -2
- package/dist/public-api/v1/public-api-error-response.js +46 -2
- package/dist/public-api/v1/public-api-error-response.js.map +1 -1
- package/dist/requests.d.ts +6 -1
- package/dist/scaling/job-outcome-tracker.d.ts +7 -6
- package/dist/scaling/job-outcome-tracker.js +59 -38
- package/dist/scaling/job-outcome-tracker.js.map +1 -1
- package/dist/scaling/job-processor.d.ts +3 -0
- package/dist/scaling/job-processor.js +39 -0
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +1 -0
- package/dist/scaling/scaling.service.d.ts +1 -1
- package/dist/scaling/scaling.service.js +8 -5
- package/dist/scaling/scaling.service.js.map +1 -1
- package/dist/scaling/scaling.types.d.ts +1 -0
- package/dist/scaling/worker-status.service.ee.js +2 -2
- package/dist/scaling/worker-status.service.ee.js.map +1 -1
- package/dist/scheduling/durable-scheduler.js +3 -4
- package/dist/scheduling/durable-scheduler.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-job-provider.js.map +1 -1
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-job-registrar.d.ts +0 -1
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-job-registrar.js +1 -3
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-job-registrar.js.map +1 -1
- package/dist/scheduling/system-tasks/in-memory-system-task-runner.d.ts +1 -0
- package/dist/scheduling/system-tasks/in-memory-system-task-runner.js +2 -2
- package/dist/scheduling/system-tasks/in-memory-system-task-runner.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-job-registrar.d.ts +9 -3
- package/dist/scheduling/system-tasks/system-task-job-registrar.js +16 -5
- package/dist/scheduling/system-tasks/system-task-job-registrar.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-run-observer.js +3 -3
- package/dist/scheduling/system-tasks/system-task-run-observer.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-runner.d.ts +1 -1
- package/dist/scheduling/system-tasks/system-task-runner.js +21 -21
- package/dist/scheduling/system-tasks/system-task-runner.js.map +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/services/active-workflows.service.d.ts +6 -1
- package/dist/services/active-workflows.service.js +22 -8
- package/dist/services/active-workflows.service.js.map +1 -1
- package/dist/services/ai-workflow-builder.service.d.ts +1 -1
- package/dist/services/ai-workflow-builder.service.js +2 -2
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/ai.service.d.ts +0 -1
- package/dist/services/ai.service.js +0 -4
- package/dist/services/ai.service.js.map +1 -1
- package/dist/services/api-key-auth.strategy.d.ts +2 -2
- package/dist/services/api-key-auth.strategy.js +4 -4
- package/dist/services/api-key-auth.strategy.js.map +1 -1
- package/dist/services/frontend.service.d.ts +3 -1
- package/dist/services/frontend.service.js +7 -2
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
- package/dist/services/pruning/activity-pruning.task.d.ts +2 -3
- package/dist/services/pruning/activity-pruning.task.js +8 -6
- package/dist/services/pruning/activity-pruning.task.js.map +1 -1
- package/dist/services/pruning/execution-pruning-hard-delete.task.d.ts +2 -5
- package/dist/services/pruning/execution-pruning-hard-delete.task.js +9 -4
- package/dist/services/pruning/execution-pruning-hard-delete.task.js.map +1 -1
- package/dist/services/pruning/execution-pruning-soft-delete.task.d.ts +2 -4
- package/dist/services/pruning/execution-pruning-soft-delete.task.js +6 -3
- package/dist/services/pruning/execution-pruning-soft-delete.task.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction-optimize.task.d.ts +2 -4
- package/dist/services/pruning/workflow-history-compaction-optimize.task.js +6 -3
- package/dist/services/pruning/workflow-history-compaction-optimize.task.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction-trim.task.d.ts +2 -5
- package/dist/services/pruning/workflow-history-compaction-trim.task.js +7 -4
- package/dist/services/pruning/workflow-history-compaction-trim.task.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.d.ts +2 -10
- package/dist/services/pruning/workflow-history-compaction.service.js +2 -46
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/pruning/workflow-history-pruning.task.d.ts +2 -4
- package/dist/services/pruning/workflow-history-pruning.task.js +9 -7
- package/dist/services/pruning/workflow-history-pruning.task.js.map +1 -1
- package/dist/services/public-api-key.service.d.ts +1 -1
- package/dist/services/public-api-key.service.js +2 -2
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/services/rate-limit.service.d.ts +5 -0
- package/dist/services/rate-limit.service.js +14 -0
- package/dist/services/rate-limit.service.js.map +1 -1
- package/dist/services/session-cookie-auth.strategy.d.ts +1 -1
- package/dist/services/user.service.d.ts +1 -2
- package/dist/services/user.service.js +1 -2
- package/dist/services/user.service.js.map +1 -1
- package/dist/services/workflow-statistics-rollup.task.d.ts +4 -5
- package/dist/services/workflow-statistics-rollup.task.js +9 -10
- package/dist/services/workflow-statistics-rollup.task.js.map +1 -1
- package/dist/services/workflow-statistics.service.d.ts +0 -1
- package/dist/services/workflow-statistics.service.js +0 -5
- package/dist/services/workflow-statistics.service.js.map +1 -1
- package/dist/telemetry/telemetry-buffer-flush.task.d.ts +2 -3
- package/dist/telemetry/telemetry-buffer-flush.task.js +1 -5
- package/dist/telemetry/telemetry-buffer-flush.task.js.map +1 -1
- package/dist/telemetry/telemetry-pulse.task.d.ts +2 -5
- package/dist/telemetry/telemetry-pulse.task.js +7 -4
- package/dist/telemetry/telemetry-pulse.task.js.map +1 -1
- package/dist/user-management/email/node-mailer.js.map +1 -1
- package/dist/user-management/email/templates/migration-findings.handlebars +212 -0
- package/dist/user-management/email/user-management-mailer.d.ts +13 -1
- package/dist/user-management/email/user-management-mailer.js +22 -0
- package/dist/user-management/email/user-management-mailer.js.map +1 -1
- package/dist/utils/container-limits.d.ts +9 -0
- package/dist/utils/container-limits.js +59 -0
- package/dist/utils/container-limits.js.map +1 -0
- package/dist/utils/detect-runtime.d.ts +4 -0
- package/dist/utils/detect-runtime.js +27 -0
- package/dist/utils/detect-runtime.js.map +1 -0
- package/dist/utils/object-to-error.js +1 -1
- package/dist/utils/object-to-error.js.map +1 -1
- package/dist/utils.js +8 -3
- package/dist/utils.js.map +1 -1
- package/dist/wait-tracker.js +8 -0
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/hitl-interaction-webhooks.js +4 -1
- package/dist/webhooks/hitl-interaction-webhooks.js.map +1 -1
- package/dist/webhooks/live-webhooks.d.ts +1 -1
- package/dist/webhooks/live-webhooks.js +2 -2
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/test-webhook-registrations.service.d.ts +1 -1
- package/dist/webhooks/waiting-forms.js +3 -2
- package/dist/webhooks/waiting-forms.js.map +1 -1
- package/dist/webhooks/waiting-webhooks.js +3 -0
- package/dist/webhooks/waiting-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +43 -27
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-request-sanitizer.js +4 -2
- package/dist/webhooks/webhook-request-sanitizer.js.map +1 -1
- package/dist/webhooks/webhook.types.d.ts +2 -0
- package/dist/workflow-execute-additional-data.js +12 -9
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.js +19 -3
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +6 -5
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/error-workflow-validation.service.d.ts +1 -1
- package/dist/workflows/error-workflow-validation.service.js +2 -2
- package/dist/workflows/error-workflow-validation.service.js.map +1 -1
- package/dist/workflows/publication/format-node-failures.d.ts +4 -0
- package/dist/workflows/publication/format-node-failures.js +6 -0
- package/dist/workflows/publication/format-node-failures.js.map +1 -1
- package/dist/workflows/publication/publication-status-reporter.d.ts +1 -1
- package/dist/workflows/publication/publication-status-reporter.js +9 -6
- package/dist/workflows/publication/publication-status-reporter.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.d.ts +1 -1
- package/dist/workflows/publication/workflow-publication-applier.js +3 -4
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.task.d.ts +2 -4
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.task.js +7 -7
- package/dist/workflows/publication/workflow-publication-outbox-cleanup.task.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-status.service.d.ts +2 -0
- package/dist/workflows/publication/workflow-publication-status.service.js +14 -0
- package/dist/workflows/publication/workflow-publication-status.service.js.map +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +1 -2
- package/dist/workflows/triggers/trigger-execution-context.factory.js +1 -2
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/workflow-execution.service.d.ts +1 -2
- package/dist/workflows/workflow-execution.service.js +1 -2
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +1 -0
- package/dist/workflows/workflow-finder.service.js +2 -1
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +1 -4
- package/dist/workflows/workflow.service.ee.d.ts +8 -5
- package/dist/workflows/workflow.service.ee.js +57 -12
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +1 -4
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +45 -44
- package/templates/admin-consent-callback.handlebars +19 -0
- package/dist/credentials/executing-user-identifier-proxy.d.ts +0 -7
- package/dist/credentials/executing-user-identifier-proxy.js +0 -25
- package/dist/credentials/executing-user-identifier-proxy.js.map +0 -1
- package/dist/credentials/executing-user-identifier.interface.d.ts +0 -4
- package/dist/credentials/executing-user-identifier.interface.js +0 -3
- package/dist/credentials/executing-user-identifier.interface.js.map +0 -1
- package/dist/executions/execution-redaction-proxy.service.d.ts +0 -7
- package/dist/executions/execution-redaction-proxy.service.js +0 -31
- package/dist/executions/execution-redaction-proxy.service.js.map +0 -1
- package/dist/executions/execution-redaction.d.ts +0 -21
- package/dist/executions/execution-redaction.js +0 -7
- package/dist/executions/execution-redaction.js.map +0 -1
- package/dist/jwks/jwks.registry.d.ts +0 -10
- package/dist/jwks/jwks.registry.js +0 -31
- package/dist/jwks/jwks.registry.js.map +0 -1
- package/dist/jwks/jwks.schemas.d.ts +0 -178
- package/dist/jwks/jwks.schemas.js +0 -31
- package/dist/jwks/jwks.schemas.js.map +0 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +0 -16
- package/dist/modules/agents/builder/agents-builder-prompts.js +0 -425
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +0 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +0 -47
- package/dist/modules/agents/builder/agents-builder.service.js +0 -222
- package/dist/modules/agents/builder/agents-builder.service.js.map +0 -1
- package/dist/modules/agents/builder/errors.d.ts +0 -9
- package/dist/modules/agents/builder/errors.js +0 -22
- package/dist/modules/agents/builder/errors.js.map +0 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.d.ts +0 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +0 -62
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +0 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +0 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.js +0 -43
- package/dist/modules/agents/builder/prompts/memory.prompt.js.map +0 -1
- package/dist/modules/agents/builder/prompts/planner-todos.prompt.d.ts +0 -2
- package/dist/modules/agents/builder/prompts/planner-todos.prompt.js +0 -22
- package/dist/modules/agents/builder/prompts/planner-todos.prompt.js.map +0 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +0 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +0 -102
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/whatsapp-integration.js.map +0 -1
- package/dist/modules/breaking-changes/migrations/ai-transform-to-code.migration.d.ts +0 -2
- package/dist/modules/breaking-changes/migrations/ai-transform-to-code.migration.js.map +0 -1
- package/dist/modules/data-table/middleware/branch-write-access-middleware.d.ts +0 -2
- package/dist/modules/data-table/middleware/branch-write-access-middleware.js +0 -14
- package/dist/modules/data-table/middleware/branch-write-access-middleware.js.map +0 -1
- package/dist/modules/instance-ai/eval/api-docs.d.ts +0 -1
- package/dist/modules/instance-ai/eval/api-docs.js +0 -78
- package/dist/modules/instance-ai/eval/api-docs.js.map +0 -1
- package/dist/modules/instance-ai/instance-ai-credit-display.d.ts +0 -9
- package/dist/modules/instance-ai/instance-ai-credit-display.js +0 -15
- package/dist/modules/instance-ai/instance-ai-credit-display.js.map +0 -1
- package/dist/modules/quick-connect/handlers/firecrawl.handler.d.ts +0 -13
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js +0 -50
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js.map +0 -1
- package/dist/modules/quick-connect/handlers/handler.interface.d.ts +0 -9
- package/dist/modules/quick-connect/handlers/handler.interface.js.map +0 -1
- package/dist/modules/quick-connect/quick-connect.config.d.ts +0 -462
- package/dist/modules/quick-connect/quick-connect.config.js +0 -72
- package/dist/modules/quick-connect/quick-connect.config.js.map +0 -1
- package/dist/modules/quick-connect/quick-connect.controller.d.ts +0 -10
- package/dist/modules/quick-connect/quick-connect.controller.js.map +0 -1
- package/dist/modules/quick-connect/quick-connect.errors.d.ts +0 -5
- package/dist/modules/quick-connect/quick-connect.errors.js +0 -12
- package/dist/modules/quick-connect/quick-connect.errors.js.map +0 -1
- package/dist/modules/quick-connect/quick-connect.module.d.ts +0 -49
- package/dist/modules/quick-connect/quick-connect.module.js +0 -36
- package/dist/modules/quick-connect/quick-connect.module.js.map +0 -1
- package/dist/modules/quick-connect/quick-connect.service.d.ts +0 -13
- package/dist/modules/quick-connect/quick-connect.service.js +0 -61
- package/dist/modules/quick-connect/quick-connect.service.js.map +0 -1
- package/dist/modules/workflow-builder/index.d.ts +0 -3
- package/dist/modules/workflow-builder/index.js +0 -10
- package/dist/modules/workflow-builder/index.js.map +0 -1
- package/dist/modules/workflow-builder/workflow-builder-session.entity.d.ts +0 -26
- package/dist/modules/workflow-builder/workflow-builder-session.entity.js +0 -72
- package/dist/modules/workflow-builder/workflow-builder-session.entity.js.map +0 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.d.ts +0 -10
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js +0 -79
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js.map +0 -1
- package/dist/modules/workflow-builder/workflow-builder.module.d.ts +0 -4
- package/dist/modules/workflow-builder/workflow-builder.module.js.map +0 -1
- package/dist/oauth/oauth-jwe-service.proxy.d.ts +0 -19
- package/dist/oauth/oauth-jwe-service.proxy.js +0 -32
- package/dist/oauth/oauth-jwe-service.proxy.js.map +0 -1
- package/dist/public-api/v1/handlers/decorator-routed.handler.d.ts +0 -2
- package/dist/public-api/v1/handlers/decorator-routed.handler.js +0 -10
- package/dist/public-api/v1/handlers/decorator-routed.handler.js.map +0 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +0 -9
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +0 -113
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +0 -1
- package/dist/public-api/v1/shared/handler.types.d.ts +0 -9
- package/dist/public-api/v1/shared/handler.types.js +0 -3
- package/dist/public-api/v1/shared/handler.types.js.map +0 -1
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +0 -31
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +0 -126
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +0 -1
- package/dist/public-api/v1/shared/public-api-scope-lookup.d.ts +0 -5
- package/dist/public-api/v1/shared/public-api-scope-lookup.js +0 -60
- package/dist/public-api/v1/shared/public-api-scope-lookup.js.map +0 -1
- package/dist/services/auth-strategy.registry.d.ts +0 -8
- package/dist/services/auth-strategy.registry.js +0 -44
- package/dist/services/auth-strategy.registry.js.map +0 -1
- package/dist/services/auth-strategy.types.d.ts +0 -10
- package/dist/services/auth-strategy.types.js +0 -3
- package/dist/services/auth-strategy.types.js.map +0 -1
- package/dist/services/instance-activation.service.d.ts +0 -10
- package/dist/services/instance-activation.service.js +0 -48
- package/dist/services/instance-activation.service.js.map +0 -1
- package/dist/services/instance-registry-proxy.service.d.ts +0 -11
- package/dist/services/instance-registry-proxy.service.js +0 -33
- package/dist/services/instance-registry-proxy.service.js.map +0 -1
- package/dist/services/jwt.service.d.ts +0 -24
- package/dist/services/jwt.service.js +0 -104
- package/dist/services/jwt.service.js.map +0 -1
- package/dist/services/oauth-token-verifier-proxy.service.d.ts +0 -33
- package/dist/services/oauth-token-verifier-proxy.service.js +0 -36
- package/dist/services/oauth-token-verifier-proxy.service.js.map +0 -1
- package/dist/services/oauth2-flow-proxy.service.d.ts +0 -13
- package/dist/services/oauth2-flow-proxy.service.js +0 -39
- package/dist/services/oauth2-flow-proxy.service.js.map +0 -1
- package/dist/services/protected-resource.registry.d.ts +0 -25
- package/dist/services/protected-resource.registry.js +0 -124
- package/dist/services/protected-resource.registry.js.map +0 -1
- package/dist/services/role-mapping-proxy.service.d.ts +0 -53
- package/dist/services/role-mapping-proxy.service.js +0 -26
- package/dist/services/role-mapping-proxy.service.js.map +0 -1
- package/dist/services/runtime-credential-proxy.service.d.ts +0 -9
- package/dist/services/runtime-credential-proxy.service.js +0 -29
- package/dist/services/runtime-credential-proxy.service.js.map +0 -1
- package/dist/services/token-purposes.d.ts +0 -21
- package/dist/services/token-purposes.js +0 -27
- package/dist/services/token-purposes.js.map +0 -1
- package/dist/workflows/restricted-node-types-provider-proxy.service.d.ts +0 -9
- package/dist/workflows/restricted-node-types-provider-proxy.service.js +0 -26
- package/dist/workflows/restricted-node-types-provider-proxy.service.js.map +0 -1
- package/dist/workflows/workflow-mutation-hooks-proxy.service.d.ts +0 -24
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js +0 -38
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js.map +0 -1
- package/dist/workflows/workflow-publish-guard-proxy.service.d.ts +0 -8
- package/dist/workflows/workflow-publish-guard-proxy.service.js +0 -26
- package/dist/workflows/workflow-publish-guard-proxy.service.js.map +0 -1
- package/dist/workflows/workflow-published-data.service.d.ts +0 -19
- package/dist/workflows/workflow-published-data.service.js +0 -70
- package/dist/workflows/workflow-published-data.service.js.map +0 -1
- /package/dist/modules/breaking-changes/migrations/{ai-transform-to-code.migration.js → node-removals/ai-transform-to-code.migration.js} +0 -0
|
@@ -22,8 +22,13 @@ const component_mapper_1 = require("../../component-mapper");
|
|
|
22
22
|
const credential_claim_1 = require("../../credential-claim");
|
|
23
23
|
const esm_loader_1 = require("../../esm-loader");
|
|
24
24
|
const integration_tool_definitions_1 = require("../../integration-tool-definitions");
|
|
25
|
+
const integration_error_codes_1 = require("../../integration-error-codes");
|
|
26
|
+
const integration_helpers_1 = require("../../integration-helpers");
|
|
25
27
|
const typing_indicator_1 = require("../typing-indicator");
|
|
28
|
+
const teams_cleanup_service_1 = require("./teams-cleanup.service");
|
|
26
29
|
const teams_manifest_service_1 = require("./teams-manifest.service");
|
|
30
|
+
const teams_message_files_1 = require("./teams-message-files");
|
|
31
|
+
const teams_operations_1 = require("./teams-operations");
|
|
27
32
|
const TEAMS_API_URL = 'https://smba.trafficmanager.net/teams';
|
|
28
33
|
const GLOBAL_GRAPH_API_BASE_URL = 'https://graph.microsoft.com';
|
|
29
34
|
const ANSWER_AS_TEXT = 'To answer, write your answer as normal text. It is posted for you. Do not use the respond action for it.';
|
|
@@ -54,10 +59,24 @@ function isFromBot(activity) {
|
|
|
54
59
|
const { id, role } = activity.from;
|
|
55
60
|
return role === 'bot' || (typeof id === 'string' && id.startsWith('28:'));
|
|
56
61
|
}
|
|
62
|
+
const SEND_DENIED = {
|
|
63
|
+
send_dm: 'Teams did not allow this direct message. The person must have the app installed in Teams first. Ask them, or a Teams admin, to add the app, then try again.',
|
|
64
|
+
send_channel_message: 'Teams did not allow this post. The app must be added to the team or group chat first. Ask a team owner to add the app, then try again.',
|
|
65
|
+
};
|
|
66
|
+
function canEncodeThreadId(adapter) {
|
|
67
|
+
return (0, is_record_1.isRecord)(adapter) && typeof adapter.encodeThreadId === 'function';
|
|
68
|
+
}
|
|
57
69
|
const TEAMS_TYPING_REFRESH_MS = 8000;
|
|
58
70
|
const TENANT_ID_GUID = /^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/;
|
|
59
71
|
const TENANT_ID_DOMAIN = /^[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)+$/;
|
|
60
72
|
let TeamsIntegration = class TeamsIntegration extends agent_chat_integration_1.AgentChatIntegration {
|
|
73
|
+
async onRemove(ctx) {
|
|
74
|
+
return await di_1.Container.get(teams_cleanup_service_1.TeamsCleanupService).describeLeftovers({
|
|
75
|
+
user: ctx.user,
|
|
76
|
+
projectId: ctx.projectId,
|
|
77
|
+
credentialId: ctx.credentialId,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
61
80
|
shouldHandleUnmentionedMessage({ message, integration, }) {
|
|
62
81
|
if (isFromBot(message.raw))
|
|
63
82
|
return false;
|
|
@@ -73,6 +92,31 @@ let TeamsIntegration = class TeamsIntegration extends agent_chat_integration_1.A
|
|
|
73
92
|
return 'required';
|
|
74
93
|
return conversationTypeOf(message.raw) === 'personal' ? 'required' : 'optional';
|
|
75
94
|
}
|
|
95
|
+
normalizeChannelId(channelId, adapter) {
|
|
96
|
+
if (!channelId.startsWith('19:') || !canEncodeThreadId(adapter)) {
|
|
97
|
+
return super.normalizeChannelId(channelId, adapter);
|
|
98
|
+
}
|
|
99
|
+
return adapter.encodeThreadId({ conversationId: channelId, serviceUrl: `${TEAMS_API_URL}/` });
|
|
100
|
+
}
|
|
101
|
+
describeActionError(action, error) {
|
|
102
|
+
const message = SEND_DENIED[action];
|
|
103
|
+
if (!message || !(0, is_record_1.isRecord)(error) || error.code !== 'PERMISSION_DENIED')
|
|
104
|
+
return undefined;
|
|
105
|
+
return { code: integration_error_codes_1.INTEGRATION_ERROR_CODES.PERMISSION_NOT_GRANTED, message };
|
|
106
|
+
}
|
|
107
|
+
async executeContextQuery(params) {
|
|
108
|
+
if (!params.chat)
|
|
109
|
+
return (0, integration_helpers_1.connectionUnavailable)();
|
|
110
|
+
return await (0, teams_operations_1.executeTeamsContextQuery)({
|
|
111
|
+
chat: params.chat,
|
|
112
|
+
query: params.query,
|
|
113
|
+
input: params.input,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
async fetchInboundAttachments({ thread, message, }) {
|
|
117
|
+
const http = (0, teams_message_files_1.graphHttpOf)(thread.adapter);
|
|
118
|
+
return http ? await (0, teams_message_files_1.fetchTeamsMessageFiles)(http, message.raw) : [];
|
|
119
|
+
}
|
|
76
120
|
constructor(logger, agentRepository) {
|
|
77
121
|
super();
|
|
78
122
|
this.logger = logger;
|
|
@@ -86,6 +130,7 @@ let TeamsIntegration = class TeamsIntegration extends agent_chat_integration_1.A
|
|
|
86
130
|
capabilities: [
|
|
87
131
|
'Receive Microsoft Teams direct messages, team channel messages and group chat messages as agent triggers.',
|
|
88
132
|
'Respond in the same Microsoft Teams conversation, and in the same channel thread.',
|
|
133
|
+
'Send direct messages to people and post new messages to team channels and group chats, including from scheduled tasks with no inbound message.',
|
|
89
134
|
'In a team channel or group chat, run when @-mentioned. When the setup turns on reading all messages there, run on every message and decide whether to reply, or stay silent.',
|
|
90
135
|
'Add emoji reactions to messages.',
|
|
91
136
|
'Render Adaptive Cards with buttons.',
|
|
@@ -94,6 +139,7 @@ let TeamsIntegration = class TeamsIntegration extends agent_chat_integration_1.A
|
|
|
94
139
|
'The agent should be chatted with from Microsoft Teams or act as a Teams bot.',
|
|
95
140
|
'The agent needs to reply to Teams users in the same conversation context.',
|
|
96
141
|
'The agent should take part in a Microsoft Teams channel or group chat.',
|
|
142
|
+
'A scheduled Agent task should proactively send a Teams direct message or channel message through the connected bot.',
|
|
97
143
|
],
|
|
98
144
|
useNodeToolWhen: [
|
|
99
145
|
'Microsoft Teams is only a backend API step and the agent does not need to be connected as a Teams chat surface.',
|
|
@@ -107,13 +153,30 @@ let TeamsIntegration = class TeamsIntegration extends agent_chat_integration_1.A
|
|
|
107
153
|
'fields',
|
|
108
154
|
'image',
|
|
109
155
|
];
|
|
156
|
+
this.contextToolDefinitions = (0, integration_tool_definitions_1.resolveIntegrationContextQueryDefinitions)([
|
|
157
|
+
'get_current_message_context',
|
|
158
|
+
'get_current_subject',
|
|
159
|
+
'get_current_user',
|
|
160
|
+
'get_user',
|
|
161
|
+
'search_users',
|
|
162
|
+
'search_channels',
|
|
163
|
+
]);
|
|
164
|
+
this.contextToolGuidance = [
|
|
165
|
+
'For search_users, pass input.email to find a person by email address. The returned userId works with send_dm.',
|
|
166
|
+
'search_channels matches team and channel names, for example "Marketing General". The returned channelId works with send_channel_message.',
|
|
167
|
+
];
|
|
110
168
|
this.actionToolDefinitions = (0, integration_tool_definitions_1.resolveIntegrationActionDefinitions)([
|
|
111
169
|
'respond',
|
|
170
|
+
'send_dm',
|
|
171
|
+
'send_channel_message',
|
|
112
172
|
'edit_message',
|
|
113
173
|
'add_reaction',
|
|
114
174
|
'do_not_respond',
|
|
115
175
|
]);
|
|
116
176
|
this.actionToolGuidance = [
|
|
177
|
+
'respond works only in reply to an inbound Teams message. In a scheduled task, or to reach another person or conversation, use send_dm or send_channel_message.',
|
|
178
|
+
'For send_dm, userId is a Teams user ID (29:...) or the Microsoft Entra object ID of the person, never an email or a name. To reach someone by email, call search_users first.',
|
|
179
|
+
'For send_channel_message, channelId is a Teams conversation ID such as 19:...@thread.tacv2 for a team channel or 19:...@thread.v2 for a group chat, a channelId from search_channels, or one from get_current_message_context. Each call starts a new post.',
|
|
117
180
|
'For edit_message, pass the messageId returned by a previous Teams action or get_current_message_context. The current Teams conversation is selected automatically.',
|
|
118
181
|
'For add_reaction, use one of thumbs_up, eyes, check, x, rocket, thinking or pin, or a Teams reaction type such as like, heart or laugh.',
|
|
119
182
|
'A channel or group chat message that does not mention you needs no reply. Use do_not_respond unless you have something useful to add.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teams-integration.js","sourceRoot":"","sources":["../../../../../../src/modules/agents/integrations/platforms/teams/teams-integration.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"teams-integration.js","sourceRoot":"","sources":["../../../../../../src/modules/agents/integrations/platforms/teams/teams-integration.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,wDAA6C;AAC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AAC;QACH,CAAC;QAED,MAAM,eAAe,GAAG,IAAA,mCAAe,EAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;QACvE,IAAI,eAAe,IAAI,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,yBAAyB,EAAE,CAAC;YAC1F,MAAM,IAAI,wBAAS,CAClB,kEAAkE;gBACjE,wFAAwF,CACzF,CAAC;QACH,CAAC;QAED,MAAM,WAAW,GAAG,IAAA,0CAAsB,EACzC,UAAU,EACV,UAAU,EACV,oJAAoJ,CACpJ,CAAC;QACF,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;YAC9E,MAAM,IAAI,wBAAS,CAClB,uEAAuE;gBACtE,wGAAwG,CACzG,CAAC;QACH,CAAC;QAED,OAAO;YACN,KAAK,EAAE,IAAA,0CAAsB,EAC5B,UAAU,EACV,UAAU,EACV,uJAAuJ,CACvJ;YACD,WAAW,EAAE,IAAA,0CAAsB,EAClC,UAAU,EACV,cAAc,EACd,6HAA6H,CAC7H;YACD,WAAW;SACX,CAAC;IACH,CAAC;CACD,CAAA;;2BAhVY,gBAAgB;IAD5B,IAAA,YAAO,GAAE;qCA6LiB,uBAAM,EACG,kCAAe;GA7LtC,gBAAgB,CAgV5B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CreateTeamsManagerCredentialResponse, TeamsManagedSetupState } from '@n8n/api-types';
|
|
2
|
+
import type { User } from '@n8n/db';
|
|
3
|
+
import { CredentialsFinderService } from '@n8n/backend-services';
|
|
4
|
+
import { CredentialsService } from '../../../../../credentials/credentials.service';
|
|
5
|
+
import { CredentialsOverwrites } from '../../../../../credentials-overwrites';
|
|
6
|
+
import { OauthService } from '../../../../../oauth/oauth.service';
|
|
7
|
+
import { NamingService } from '../../../../../services/naming.service';
|
|
8
|
+
export declare const TEAMS_MANAGER_CREDENTIAL_TYPE = "microsoftTeamsManagerOAuth2Api";
|
|
9
|
+
export declare const REQUIRED_MANAGER_SCOPES: readonly ['https://graph.microsoft.com/Application.ReadWrite.All', 'https://graph.microsoft.com/AppCatalog.ReadWrite.All', 'https://graph.microsoft.com/AppCatalog.Submit'];
|
|
10
|
+
export interface TeamsManagedSetupScope {
|
|
11
|
+
projectId: string;
|
|
12
|
+
agentId: string;
|
|
13
|
+
user: User;
|
|
14
|
+
}
|
|
15
|
+
export declare class TeamsManagedSetupService {
|
|
16
|
+
private readonly credentialsService;
|
|
17
|
+
private readonly credentialsFinderService;
|
|
18
|
+
private readonly credentialsOverwrites;
|
|
19
|
+
private readonly oauthService;
|
|
20
|
+
private readonly namingService;
|
|
21
|
+
constructor(credentialsService: CredentialsService, credentialsFinderService: CredentialsFinderService, credentialsOverwrites: CredentialsOverwrites, oauthService: OauthService, namingService: NamingService);
|
|
22
|
+
isSetupAvailable(): boolean;
|
|
23
|
+
assertSetupAvailable(): void;
|
|
24
|
+
adminConsentUrl(): string | null;
|
|
25
|
+
getSetupState(options: TeamsManagedSetupScope): Promise<TeamsManagedSetupState>;
|
|
26
|
+
createManagerCredential(options: TeamsManagedSetupScope): Promise<CreateTeamsManagerCredentialResponse>;
|
|
27
|
+
private summarizeGrant;
|
|
28
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TeamsManagedSetupService = exports.REQUIRED_MANAGER_SCOPES = exports.TEAMS_MANAGER_CREDENTIAL_TYPE = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const is_record_1 = require("@n8n/utils/is-record");
|
|
15
|
+
const backend_services_1 = require("@n8n/backend-services");
|
|
16
|
+
const credentials_service_1 = require("../../../../../credentials/credentials.service");
|
|
17
|
+
const credentials_overwrites_1 = require("../../../../../credentials-overwrites");
|
|
18
|
+
const oauth_service_1 = require("../../../../../oauth/oauth.service");
|
|
19
|
+
const naming_service_1 = require("../../../../../services/naming.service");
|
|
20
|
+
const errors_1 = require("@n8n/errors");
|
|
21
|
+
const integration_helpers_1 = require("../../integration-helpers");
|
|
22
|
+
exports.TEAMS_MANAGER_CREDENTIAL_TYPE = 'microsoftTeamsManagerOAuth2Api';
|
|
23
|
+
const ADMIN_CONSENT_URL = 'https://login.microsoftonline.com/organizations/v2.0/adminconsent';
|
|
24
|
+
const DEFAULT_MANAGER_CREDENTIAL_NAME = 'Microsoft organization';
|
|
25
|
+
exports.REQUIRED_MANAGER_SCOPES = [
|
|
26
|
+
'https://graph.microsoft.com/Application.ReadWrite.All',
|
|
27
|
+
'https://graph.microsoft.com/AppCatalog.ReadWrite.All',
|
|
28
|
+
'https://graph.microsoft.com/AppCatalog.Submit',
|
|
29
|
+
];
|
|
30
|
+
function childRecord(record, key) {
|
|
31
|
+
const child = record[key];
|
|
32
|
+
return (0, is_record_1.isRecord)(child) ? child : undefined;
|
|
33
|
+
}
|
|
34
|
+
function grantedScopes(scope) {
|
|
35
|
+
if (!scope)
|
|
36
|
+
return new Set();
|
|
37
|
+
const granted = new Set();
|
|
38
|
+
for (const entry of scope.split(' ')) {
|
|
39
|
+
if (!entry)
|
|
40
|
+
continue;
|
|
41
|
+
granted.add(entry);
|
|
42
|
+
const short = entry.split('/').pop();
|
|
43
|
+
if (short)
|
|
44
|
+
granted.add(short);
|
|
45
|
+
}
|
|
46
|
+
return granted;
|
|
47
|
+
}
|
|
48
|
+
function isMissingScope(granted, required) {
|
|
49
|
+
const short = required.split('/').pop();
|
|
50
|
+
return !granted.has(required) && !(short !== undefined && granted.has(short));
|
|
51
|
+
}
|
|
52
|
+
let TeamsManagedSetupService = class TeamsManagedSetupService {
|
|
53
|
+
constructor(credentialsService, credentialsFinderService, credentialsOverwrites, oauthService, namingService) {
|
|
54
|
+
this.credentialsService = credentialsService;
|
|
55
|
+
this.credentialsFinderService = credentialsFinderService;
|
|
56
|
+
this.credentialsOverwrites = credentialsOverwrites;
|
|
57
|
+
this.oauthService = oauthService;
|
|
58
|
+
this.namingService = namingService;
|
|
59
|
+
}
|
|
60
|
+
isSetupAvailable() {
|
|
61
|
+
const overwrite = this.credentialsOverwrites.getOverwrites(exports.TEAMS_MANAGER_CREDENTIAL_TYPE);
|
|
62
|
+
return (typeof overwrite?.clientId === 'string' &&
|
|
63
|
+
overwrite.clientId.trim().length > 0 &&
|
|
64
|
+
typeof overwrite.clientSecret === 'string' &&
|
|
65
|
+
overwrite.clientSecret.trim().length > 0);
|
|
66
|
+
}
|
|
67
|
+
assertSetupAvailable() {
|
|
68
|
+
if (!this.isSetupAvailable()) {
|
|
69
|
+
throw new errors_1.BadRequestError('The recommended Microsoft Teams setup is not available here.');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
adminConsentUrl() {
|
|
73
|
+
const overwrite = this.credentialsOverwrites.getOverwrites(exports.TEAMS_MANAGER_CREDENTIAL_TYPE);
|
|
74
|
+
const clientId = typeof overwrite?.clientId === 'string' ? overwrite.clientId.trim() : '';
|
|
75
|
+
if (!clientId)
|
|
76
|
+
return null;
|
|
77
|
+
const query = new URLSearchParams({
|
|
78
|
+
client_id: clientId,
|
|
79
|
+
scope: 'https://graph.microsoft.com/.default',
|
|
80
|
+
redirect_uri: `${this.oauthService.getBaseUrl(2)}/callback`,
|
|
81
|
+
});
|
|
82
|
+
return `${ADMIN_CONSENT_URL}?${query.toString()}`;
|
|
83
|
+
}
|
|
84
|
+
async getSetupState(options) {
|
|
85
|
+
if (!this.isSetupAvailable()) {
|
|
86
|
+
return { managedSetupAvailable: false, managerCredentials: [], adminConsentUrl: null };
|
|
87
|
+
}
|
|
88
|
+
const usable = await this.credentialsService.getCredentialsAUserCanUseInAWorkflow(options.user, {
|
|
89
|
+
projectId: options.projectId,
|
|
90
|
+
});
|
|
91
|
+
const managerCredentials = [];
|
|
92
|
+
for (const candidate of usable) {
|
|
93
|
+
if (candidate.type !== exports.TEAMS_MANAGER_CREDENTIAL_TYPE)
|
|
94
|
+
continue;
|
|
95
|
+
const credential = await this.credentialsFinderService.findCredentialForUser(candidate.id, options.user, ['credential:read']);
|
|
96
|
+
if (!credential)
|
|
97
|
+
continue;
|
|
98
|
+
const rawData = await this.credentialsService.decrypt(credential, true);
|
|
99
|
+
managerCredentials.push({
|
|
100
|
+
id: credential.id,
|
|
101
|
+
name: credential.name,
|
|
102
|
+
...this.summarizeGrant(rawData),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
managedSetupAvailable: true,
|
|
107
|
+
managerCredentials,
|
|
108
|
+
adminConsentUrl: this.adminConsentUrl(),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
async createManagerCredential(options) {
|
|
112
|
+
this.assertSetupAvailable();
|
|
113
|
+
const credential = await this.credentialsService.createUnmanagedCredential({
|
|
114
|
+
name: await this.namingService.getUniqueCredentialName(DEFAULT_MANAGER_CREDENTIAL_NAME),
|
|
115
|
+
type: exports.TEAMS_MANAGER_CREDENTIAL_TYPE,
|
|
116
|
+
data: {},
|
|
117
|
+
projectId: options.projectId,
|
|
118
|
+
}, options.user);
|
|
119
|
+
return {
|
|
120
|
+
id: credential.id,
|
|
121
|
+
name: credential.name,
|
|
122
|
+
type: exports.TEAMS_MANAGER_CREDENTIAL_TYPE,
|
|
123
|
+
isResolvable: false,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
summarizeGrant(rawData) {
|
|
127
|
+
const data = rawData;
|
|
128
|
+
const tokenData = childRecord(data, 'oauthTokenData');
|
|
129
|
+
const connected = typeof (0, integration_helpers_1.stringProperty)(tokenData, 'access_token') === 'string';
|
|
130
|
+
const granted = grantedScopes((0, integration_helpers_1.stringProperty)(tokenData, 'scope'));
|
|
131
|
+
const canRefresh = typeof (0, integration_helpers_1.stringProperty)(tokenData, 'refresh_token') === 'string';
|
|
132
|
+
return {
|
|
133
|
+
connected,
|
|
134
|
+
reconnectRequired: connected &&
|
|
135
|
+
(!canRefresh || exports.REQUIRED_MANAGER_SCOPES.some((scope) => isMissingScope(granted, scope))),
|
|
136
|
+
organizationName: (0, integration_helpers_1.stringProperty)(data, 'organizationName') ?? null,
|
|
137
|
+
tenantId: (0, integration_helpers_1.stringProperty)(data, 'tenantId') ?? null,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
exports.TeamsManagedSetupService = TeamsManagedSetupService;
|
|
142
|
+
exports.TeamsManagedSetupService = TeamsManagedSetupService = __decorate([
|
|
143
|
+
(0, di_1.Service)(),
|
|
144
|
+
__metadata("design:paramtypes", [credentials_service_1.CredentialsService, backend_services_1.CredentialsFinderService, credentials_overwrites_1.CredentialsOverwrites, oauth_service_1.OauthService, naming_service_1.NamingService])
|
|
145
|
+
], TeamsManagedSetupService);
|
|
146
|
+
//# sourceMappingURL=teams-managed-setup.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teams-managed-setup.service.js","sourceRoot":"","sources":["../../../../../../src/modules/agents/integrations/platforms/teams/teams-managed-setup.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,gCAAkC;AAClC,oDAAgD;AAGhD,4DA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IAAI,EAAE,UAAU,CAAC,IAAI,IAAI;SAClD,CAAC;IACH,CAAC;CACD,CAAA;;mCAhJY,wBAAwB;IADpC,IAAA,YAAO,GAAE;qCAG6B,wCAAkB,EACZ,2CAAwB,EAC3B,8CAAqB,EAC9B,4BAAY,EACX,8BAAa;GANlC,wBAAwB,CAgJpC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OutboundHttp } from '@n8n/backend-network';
|
|
2
|
+
import { Logger } from '@n8n/backend-common';
|
|
3
|
+
import { type CredentialsEntity, CredentialsRepository } from '@n8n/db';
|
|
4
|
+
import { CredentialsService } from '../../../../../credentials/credentials.service';
|
|
5
|
+
import { CredentialsOverwrites } from '../../../../../credentials-overwrites';
|
|
6
|
+
export declare const GRAPH_RESOURCE = "https://graph.microsoft.com";
|
|
7
|
+
export declare const AZURE_RESOURCE = "https://management.azure.com";
|
|
8
|
+
export type ManagerResource = typeof GRAPH_RESOURCE | typeof AZURE_RESOURCE;
|
|
9
|
+
export declare const RESOURCE_SCOPES: Record<ManagerResource, string>;
|
|
10
|
+
export declare class TeamsManagerTokenService {
|
|
11
|
+
private readonly credentialsService;
|
|
12
|
+
private readonly credentialsRepository;
|
|
13
|
+
private readonly credentialsOverwrites;
|
|
14
|
+
private readonly outboundHttp;
|
|
15
|
+
private readonly logger;
|
|
16
|
+
constructor(credentialsService: CredentialsService, credentialsRepository: CredentialsRepository, credentialsOverwrites: CredentialsOverwrites, outboundHttp: OutboundHttp, logger: Logger);
|
|
17
|
+
private readonly inFlight;
|
|
18
|
+
acquire(credential: CredentialsEntity, resource: ManagerResource): Promise<string>;
|
|
19
|
+
private redeem;
|
|
20
|
+
private persistRotatedRefreshToken;
|
|
21
|
+
private tokenDataOf;
|
|
22
|
+
private clientCredentials;
|
|
23
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TeamsManagerTokenService = exports.RESOURCE_SCOPES = exports.AZURE_RESOURCE = exports.GRAPH_RESOURCE = void 0;
|
|
13
|
+
const backend_network_1 = require("@n8n/backend-network");
|
|
14
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
15
|
+
const db_1 = require("@n8n/db");
|
|
16
|
+
const di_1 = require("@n8n/di");
|
|
17
|
+
const is_record_1 = require("@n8n/utils/is-record");
|
|
18
|
+
const credentials_service_1 = require("../../../../../credentials/credentials.service");
|
|
19
|
+
const credentials_overwrites_1 = require("../../../../../credentials-overwrites");
|
|
20
|
+
const errors_1 = require("@n8n/errors");
|
|
21
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
22
|
+
const teams_managed_setup_service_1 = require("./teams-managed-setup.service");
|
|
23
|
+
const teams_setup_telemetry_service_1 = require("./teams-setup-telemetry.service");
|
|
24
|
+
const integration_helpers_1 = require("../../integration-helpers");
|
|
25
|
+
const TOKEN_ENDPOINT = 'https://login.microsoftonline.com/organizations/oauth2/v2.0/token';
|
|
26
|
+
const TOKEN_TIMEOUT_MS = 30_000;
|
|
27
|
+
exports.GRAPH_RESOURCE = 'https://graph.microsoft.com';
|
|
28
|
+
exports.AZURE_RESOURCE = 'https://management.azure.com';
|
|
29
|
+
function resourceName(resource) {
|
|
30
|
+
return resource === exports.AZURE_RESOURCE ? 'Azure' : 'Microsoft Graph';
|
|
31
|
+
}
|
|
32
|
+
exports.RESOURCE_SCOPES = {
|
|
33
|
+
[exports.GRAPH_RESOURCE]: [
|
|
34
|
+
'offline_access',
|
|
35
|
+
`${exports.GRAPH_RESOURCE}/Application.ReadWrite.All`,
|
|
36
|
+
`${exports.GRAPH_RESOURCE}/AppCatalog.ReadWrite.All`,
|
|
37
|
+
`${exports.GRAPH_RESOURCE}/AppCatalog.Submit`,
|
|
38
|
+
`${exports.GRAPH_RESOURCE}/User.Read`,
|
|
39
|
+
].join(' '),
|
|
40
|
+
[exports.AZURE_RESOURCE]: ['offline_access', `${exports.AZURE_RESOURCE}/user_impersonation`].join(' '),
|
|
41
|
+
};
|
|
42
|
+
function mergeScopes(stored, granted) {
|
|
43
|
+
const all = [...(stored ?? '').split(' '), ...granted.split(' ')].filter(Boolean);
|
|
44
|
+
return [...new Set(all)].join(' ');
|
|
45
|
+
}
|
|
46
|
+
let TeamsManagerTokenService = class TeamsManagerTokenService {
|
|
47
|
+
constructor(credentialsService, credentialsRepository, credentialsOverwrites, outboundHttp, logger) {
|
|
48
|
+
this.credentialsService = credentialsService;
|
|
49
|
+
this.credentialsRepository = credentialsRepository;
|
|
50
|
+
this.credentialsOverwrites = credentialsOverwrites;
|
|
51
|
+
this.outboundHttp = outboundHttp;
|
|
52
|
+
this.logger = logger;
|
|
53
|
+
this.inFlight = new Map();
|
|
54
|
+
}
|
|
55
|
+
async acquire(credential, resource) {
|
|
56
|
+
if (credential.type !== teams_managed_setup_service_1.TEAMS_MANAGER_CREDENTIAL_TYPE) {
|
|
57
|
+
throw new errors_1.BadRequestError('That credential is not a Microsoft setup sign-in.');
|
|
58
|
+
}
|
|
59
|
+
const running = this.inFlight.get(credential.id);
|
|
60
|
+
const next = running
|
|
61
|
+
? running.then(async () => await this.redeem(credential, resource), async () => await this.redeem(credential, resource))
|
|
62
|
+
: this.redeem(credential, resource);
|
|
63
|
+
this.inFlight.set(credential.id, next);
|
|
64
|
+
next
|
|
65
|
+
.finally(() => {
|
|
66
|
+
if (this.inFlight.get(credential.id) === next)
|
|
67
|
+
this.inFlight.delete(credential.id);
|
|
68
|
+
})
|
|
69
|
+
.catch(() => { });
|
|
70
|
+
return await next;
|
|
71
|
+
}
|
|
72
|
+
async redeem(credential, resource) {
|
|
73
|
+
const current = (await this.credentialsRepository.findOneBy({ id: credential.id })) ?? credential;
|
|
74
|
+
const rawData = await this.credentialsService.decrypt(current, true);
|
|
75
|
+
const tokenData = this.tokenDataOf(rawData);
|
|
76
|
+
const refreshToken = (0, integration_helpers_1.stringProperty)(tokenData, 'refresh_token');
|
|
77
|
+
if (!refreshToken) {
|
|
78
|
+
throw (0, teams_setup_telemetry_service_1.withTeamsFailure)(new errors_1.BadRequestError('Sign in with Microsoft again to continue.'), 'not_signed_in');
|
|
79
|
+
}
|
|
80
|
+
const client = this.clientCredentials();
|
|
81
|
+
const response = await this.outboundHttp
|
|
82
|
+
.requests({ useDefaultSsrfPolicy: 'unsafe' })
|
|
83
|
+
.request({
|
|
84
|
+
method: 'POST',
|
|
85
|
+
url: TOKEN_ENDPOINT,
|
|
86
|
+
headers: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
87
|
+
body: new URLSearchParams({
|
|
88
|
+
grant_type: 'refresh_token',
|
|
89
|
+
refresh_token: refreshToken,
|
|
90
|
+
client_id: client.clientId,
|
|
91
|
+
client_secret: client.clientSecret,
|
|
92
|
+
scope: exports.RESOURCE_SCOPES[resource],
|
|
93
|
+
}).toString(),
|
|
94
|
+
returnFullResponse: true,
|
|
95
|
+
ignoreHttpStatusErrors: true,
|
|
96
|
+
timeout: TOKEN_TIMEOUT_MS,
|
|
97
|
+
});
|
|
98
|
+
const body = response.body;
|
|
99
|
+
const accessToken = (0, integration_helpers_1.stringProperty)(body, 'access_token');
|
|
100
|
+
if (response.statusCode !== 200 || !accessToken) {
|
|
101
|
+
this.logger.debug('[TeamsManagerToken] Microsoft refused the refresh', {
|
|
102
|
+
statusCode: response.statusCode,
|
|
103
|
+
resource,
|
|
104
|
+
error: (0, integration_helpers_1.stringProperty)(body, 'error'),
|
|
105
|
+
suberror: (0, integration_helpers_1.stringProperty)(body, 'suberror'),
|
|
106
|
+
errorDescription: (0, integration_helpers_1.stringProperty)(body, 'error_description'),
|
|
107
|
+
});
|
|
108
|
+
if ((0, integration_helpers_1.stringProperty)(body, 'error') === 'invalid_grant') {
|
|
109
|
+
throw (0, teams_setup_telemetry_service_1.withTeamsFailure)(new errors_1.BadRequestError(`This Microsoft sign-in does not reach ${resourceName(resource)}. Sign in again, and make sure the organisation approved n8n for it.`), 'not_signed_in');
|
|
110
|
+
}
|
|
111
|
+
throw new n8n_workflow_1.OperationalError(`Microsoft would not issue a token for ${resourceName(resource)}. Sign in again and retry.`);
|
|
112
|
+
}
|
|
113
|
+
await this.persistRotatedRefreshToken(credential, rawData, tokenData, body);
|
|
114
|
+
return accessToken;
|
|
115
|
+
}
|
|
116
|
+
async persistRotatedRefreshToken(credential, rawData, tokenData, body) {
|
|
117
|
+
const rotated = (0, integration_helpers_1.stringProperty)(body, 'refresh_token');
|
|
118
|
+
if (!rotated)
|
|
119
|
+
return;
|
|
120
|
+
const oauthTokenData = { ...tokenData, refresh_token: rotated };
|
|
121
|
+
const scope = (0, integration_helpers_1.stringProperty)(body, 'scope');
|
|
122
|
+
if (scope !== undefined) {
|
|
123
|
+
oauthTokenData.scope = mergeScopes((0, integration_helpers_1.stringProperty)(tokenData, 'scope'), scope);
|
|
124
|
+
}
|
|
125
|
+
const updated = { ...rawData, oauthTokenData };
|
|
126
|
+
const encrypted = await this.credentialsService.createEncryptedData({
|
|
127
|
+
id: credential.id,
|
|
128
|
+
name: credential.name,
|
|
129
|
+
type: credential.type,
|
|
130
|
+
data: updated,
|
|
131
|
+
});
|
|
132
|
+
await this.credentialsService.update(credential.id, encrypted, { kind: 'system', reason: 'integration' }, updated);
|
|
133
|
+
if (encrypted.data)
|
|
134
|
+
credential.data = encrypted.data;
|
|
135
|
+
}
|
|
136
|
+
tokenDataOf(rawData) {
|
|
137
|
+
const tokenData = rawData.oauthTokenData;
|
|
138
|
+
return (0, is_record_1.isRecord)(tokenData) ? tokenData : {};
|
|
139
|
+
}
|
|
140
|
+
clientCredentials() {
|
|
141
|
+
const overwrite = this.credentialsOverwrites.getOverwrites(teams_managed_setup_service_1.TEAMS_MANAGER_CREDENTIAL_TYPE);
|
|
142
|
+
const clientId = typeof overwrite?.clientId === 'string' ? overwrite.clientId.trim() : '';
|
|
143
|
+
const clientSecret = typeof overwrite?.clientSecret === 'string' ? overwrite.clientSecret.trim() : '';
|
|
144
|
+
if (!clientId || !clientSecret) {
|
|
145
|
+
throw new errors_1.BadRequestError('The recommended Microsoft Teams setup is not available here.');
|
|
146
|
+
}
|
|
147
|
+
return { clientId, clientSecret };
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
exports.TeamsManagerTokenService = TeamsManagerTokenService;
|
|
151
|
+
exports.TeamsManagerTokenService = TeamsManagerTokenService = __decorate([
|
|
152
|
+
(0, di_1.Service)(),
|
|
153
|
+
__metadata("design:paramtypes", [credentials_service_1.CredentialsService, db_1.CredentialsRepository, credentials_overwrites_1.CredentialsOverwrites, backend_network_1.OutboundHttp, backend_common_1.Logger])
|
|
154
|
+
], TeamsManagerTokenService);
|
|
155
|
+
//# sourceMappingURL=teams-manager-token.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teams-manager-token.service.js","sourceRoot":"","sources":["../../../../../../src/modules/agents/integrations/platforms/teams/teams-manager-token.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0DAAoD;AACpD,wDAA6C;AAC7C,gCAAwE;AACxE,gCAAkC;AAClC,oDAAgD;AAGhD,2EAAuE;AACvE,qEAAiE;AACjE,wCAA8C;AAC9C,+CAAgD;AAEhD,+EAA8E;AAC9E,mFA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QAClF,IAAI,CAAC,QAAQ,IAAI,CAAC,YAAY,EAAE,CAAC;YAChC,MAAM,IAAI,wBAAe,CAAC,8DAA8D,CAAC,CAAC;QAC3F,CAAC;QACD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;IACnC,CAAC;CACD,CAAA;;mCAtLY,wBAAwB;IADpC,IAAA,YAAO,GAAE;qCAG6B,wCAAkB,EACf,0BAAqB,EACrB,8CAAqB,EAC9B,8BAAY,EAClB,uBAAM;GANpB,wBAAwB,CAsLpC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type AgentTeamsIntegrationSettings, type TeamsAgentAppManifest } from '@n8n/api-types';
|
|
2
|
+
import type { TeamsAppIcons } from './teams-app-icons';
|
|
2
3
|
export interface BuildTeamsManifestOptions {
|
|
3
4
|
agentName: string;
|
|
4
5
|
agentId: string;
|
|
5
6
|
botId: string;
|
|
6
7
|
versionAt: Date;
|
|
7
8
|
settings?: AgentTeamsIntegrationSettings;
|
|
9
|
+
icons?: TeamsAppIcons;
|
|
8
10
|
}
|
|
9
11
|
export declare const READ_PERMISSIONS: readonly [{
|
|
10
12
|
readonly setting: 'readAllChannelMessages';
|
|
@@ -19,6 +21,7 @@ export declare const READ_PERMISSIONS: readonly [{
|
|
|
19
21
|
}];
|
|
20
22
|
export declare class TeamsManifestService {
|
|
21
23
|
buildManifest(options: BuildTeamsManifestOptions): TeamsAgentAppManifest;
|
|
24
|
+
fingerprint(manifest: TeamsAgentAppManifest, icon?: unknown): string;
|
|
22
25
|
buildPackage(options: BuildTeamsManifestOptions): Promise<Buffer>;
|
|
23
26
|
private buildScopes;
|
|
24
27
|
private buildReadPermissions;
|
|
@@ -10,6 +10,7 @@ exports.TeamsManifestService = exports.READ_PERMISSIONS = void 0;
|
|
|
10
10
|
const api_types_1 = require("@n8n/api-types");
|
|
11
11
|
const di_1 = require("@n8n/di");
|
|
12
12
|
const fflate_1 = require("fflate");
|
|
13
|
+
const node_crypto_1 = require("node:crypto");
|
|
13
14
|
const promises_1 = require("node:fs/promises");
|
|
14
15
|
const node_path_1 = require("node:path");
|
|
15
16
|
const uuid_1 = require("uuid");
|
|
@@ -26,6 +27,7 @@ const LIMITS = {
|
|
|
26
27
|
fullDescription: 4000,
|
|
27
28
|
developerName: 32,
|
|
28
29
|
};
|
|
30
|
+
const RSC_RESOURCE = 'https://RscBasedStoreApp';
|
|
29
31
|
exports.READ_PERMISSIONS = [
|
|
30
32
|
{
|
|
31
33
|
setting: 'readAllChannelMessages',
|
|
@@ -71,13 +73,13 @@ let TeamsManifestService = class TeamsManifestService {
|
|
|
71
73
|
color: 'color.png',
|
|
72
74
|
outline: 'outline.png',
|
|
73
75
|
},
|
|
74
|
-
accentColor: ACCENT_COLOR,
|
|
76
|
+
accentColor: options.icons?.accentColor ?? ACCENT_COLOR,
|
|
75
77
|
bots: [
|
|
76
78
|
{
|
|
77
79
|
botId: options.botId,
|
|
78
80
|
scopes: this.buildScopes(options.settings),
|
|
79
81
|
isNotificationOnly: false,
|
|
80
|
-
supportsFiles:
|
|
82
|
+
supportsFiles: true,
|
|
81
83
|
},
|
|
82
84
|
],
|
|
83
85
|
permissions: ['identity', 'messageTeamMembers'],
|
|
@@ -85,12 +87,20 @@ let TeamsManifestService = class TeamsManifestService {
|
|
|
85
87
|
...this.buildReadPermissions(options.botId, options.settings),
|
|
86
88
|
};
|
|
87
89
|
}
|
|
90
|
+
fingerprint(manifest, icon) {
|
|
91
|
+
const { version: _version, ...content } = manifest;
|
|
92
|
+
return (0, node_crypto_1.createHash)('sha256')
|
|
93
|
+
.update(JSON.stringify({ content, icon: icon ?? null }))
|
|
94
|
+
.digest('hex');
|
|
95
|
+
}
|
|
88
96
|
async buildPackage(options) {
|
|
89
97
|
const manifest = this.buildManifest(options);
|
|
90
|
-
const [color, outline] =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
const [color, outline] = options.icons
|
|
99
|
+
? [options.icons.color, options.icons.outline]
|
|
100
|
+
: await Promise.all([
|
|
101
|
+
(0, promises_1.readFile)((0, node_path_1.join)(__dirname, 'assets', 'color.png')),
|
|
102
|
+
(0, promises_1.readFile)((0, node_path_1.join)(__dirname, 'assets', 'outline.png')),
|
|
103
|
+
]);
|
|
94
104
|
return Buffer.from((0, fflate_1.zipSync)({
|
|
95
105
|
'manifest.json': Buffer.from(JSON.stringify(manifest, null, 2), 'utf8'),
|
|
96
106
|
'color.png': color,
|
|
@@ -105,11 +115,11 @@ let TeamsManifestService = class TeamsManifestService {
|
|
|
105
115
|
];
|
|
106
116
|
}
|
|
107
117
|
buildReadPermissions(botId, availability) {
|
|
108
|
-
const resourceSpecific = exports.READ_PERMISSIONS.filter(({
|
|
118
|
+
const resourceSpecific = exports.READ_PERMISSIONS.filter(({ requires }) => availability?.[requires]).map(({ name }) => ({ name, type: 'Application' }));
|
|
109
119
|
if (resourceSpecific.length === 0)
|
|
110
120
|
return {};
|
|
111
121
|
return {
|
|
112
|
-
webApplicationInfo: { id: botId },
|
|
122
|
+
webApplicationInfo: { id: botId, resource: RSC_RESOURCE },
|
|
113
123
|
authorization: { permissions: { resourceSpecific } },
|
|
114
124
|
};
|
|
115
125
|
}
|