n8n 2.28.3 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract-server.js +1 -1
- package/dist/abstract-server.js.map +1 -1
- package/dist/active-executions.js +2 -2
- package/dist/active-executions.js.map +1 -1
- package/dist/active-workflow-manager.js +1 -1
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/auth/auth.service.js +12 -12
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/blob-storage/azure-byte-store.ee.d.ts +10 -0
- package/dist/blob-storage/azure-byte-store.ee.js +57 -0
- package/dist/blob-storage/azure-byte-store.ee.js.map +1 -0
- package/dist/blob-storage/fs-byte-store.d.ts +14 -0
- package/dist/blob-storage/fs-byte-store.js +97 -0
- package/dist/blob-storage/fs-byte-store.js.map +1 -0
- package/dist/blob-storage/json-store.d.ts +18 -0
- package/dist/blob-storage/json-store.js +125 -0
- package/dist/blob-storage/json-store.js.map +1 -0
- package/dist/blob-storage/s3-byte-store.ee.d.ts +10 -0
- package/dist/blob-storage/s3-byte-store.ee.js +52 -0
- package/dist/blob-storage/s3-byte-store.ee.js.map +1 -0
- package/dist/blob-storage/skipped-entry-deletion.error.d.ts +5 -0
- package/dist/blob-storage/skipped-entry-deletion.error.js +13 -0
- package/dist/blob-storage/skipped-entry-deletion.error.js.map +1 -0
- package/dist/blob-storage/types.d.ts +23 -0
- package/dist/blob-storage/types.js +3 -0
- package/dist/blob-storage/types.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -1
- package/dist/chat/chat-server.js +1 -1
- package/dist/chat/chat-server.js.map +1 -1
- package/dist/chat/chat-service.js +1 -1
- package/dist/chat/chat-service.js.map +1 -1
- package/dist/chat/chat-service.types.d.ts +2 -2
- package/dist/collaboration/collaboration.service.d.ts +2 -2
- package/dist/collaboration/collaboration.service.js +2 -2
- package/dist/collaboration/collaboration.service.js.map +1 -1
- package/dist/commands/base-command.d.ts +1 -1
- package/dist/commands/base-command.js +27 -3
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/export/entities.js +3 -3
- package/dist/commands/export/entities.js.map +1 -1
- package/dist/commands/export/workflow.js.map +1 -1
- package/dist/commands/import/entities.js +3 -3
- package/dist/commands/import/entities.js.map +1 -1
- package/dist/commands/import/workflow.js +1 -1
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.js +5 -5
- package/dist/commands/start.js.map +1 -1
- package/dist/controller.registry.d.ts +1 -1
- package/dist/controller.registry.js +8 -8
- package/dist/controller.registry.js.map +1 -1
- package/dist/controllers/ai.controller.d.ts +1 -0
- package/dist/controllers/ai.controller.js +20 -11
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.js +1 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/folder.controller.d.ts +1 -1
- package/dist/controllers/folder.controller.js +1 -1
- package/dist/controllers/folder.controller.js.map +1 -1
- package/dist/controllers/invitation.controller.d.ts +1 -1
- package/dist/controllers/invitation.controller.js +5 -5
- package/dist/controllers/invitation.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.d.ts +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.js +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/orchestration.controller.js.map +1 -1
- package/dist/controllers/owner.controller.d.ts +1 -1
- package/dist/controllers/owner.controller.js +1 -1
- package/dist/controllers/owner.controller.js.map +1 -1
- package/dist/controllers/password-reset.controller.d.ts +1 -1
- package/dist/controllers/password-reset.controller.js +3 -3
- package/dist/controllers/password-reset.controller.js.map +1 -1
- package/dist/controllers/posthog.controller.d.ts +2 -5
- package/dist/controllers/posthog.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +2 -1
- package/dist/controllers/role.controller.js +12 -0
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.d.ts +1 -1
- package/dist/controllers/third-party-licenses.controller.js +1 -1
- package/dist/controllers/third-party-licenses.controller.js.map +1 -1
- package/dist/controllers/translation.controller.js +1 -1
- package/dist/controllers/translation.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +8 -6
- package/dist/controllers/users.controller.js +59 -9
- package/dist/controllers/users.controller.js.map +1 -1
- package/dist/credentials/credentials.service.ee.js +7 -0
- package/dist/credentials/credentials.service.ee.js.map +1 -1
- package/dist/credentials/credentials.service.js +1 -1
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/validation.js +1 -1
- package/dist/credentials/validation.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -1
- package/dist/credentials-helper.js +33 -5
- package/dist/credentials-helper.js.map +1 -1
- package/dist/credentials-overwrites.js.map +1 -1
- package/dist/evaluation.ee/evaluation-config.service.js +1 -1
- package/dist/evaluation.ee/evaluation-config.service.js.map +1 -1
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +3 -3
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +11 -5
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
- package/dist/events/relays/workflow-failure-notification.event-relay.js +1 -1
- package/dist/events/relays/workflow-failure-notification.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.js +1 -0
- package/dist/execution-lifecycle/shared/shared-hook-functions.js.map +1 -1
- package/dist/executions/execution-data/azure-store.ee.js +2 -2
- package/dist/executions/execution-data/azure-store.ee.js.map +1 -1
- package/dist/executions/execution-data/types.d.ts +1 -1
- package/dist/executions/execution-persistence.js +11 -4
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution.service.js +5 -4
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/executions.controller.d.ts +2 -2
- package/dist/executions/executions.controller.js +4 -4
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/instance-settings-loader/loaders/log-streaming.instance-settings-loader.js +1 -1
- package/dist/instance-settings-loader/loaders/log-streaming.instance-settings-loader.js.map +1 -1
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js +1 -1
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js.map +1 -1
- package/dist/license/license.controller.js +1 -0
- package/dist/license/license.controller.js.map +1 -1
- package/dist/license/license.service.js +3 -4
- package/dist/license/license.service.js.map +1 -1
- package/dist/metrics/prometheus/db-pool-metrics.service.d.ts +13 -0
- package/dist/metrics/prometheus/db-pool-metrics.service.js +71 -0
- package/dist/metrics/prometheus/db-pool-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/prometheus.service.d.ts +2 -1
- package/dist/metrics/prometheus/prometheus.service.js +5 -2
- package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
- package/dist/mfa/mfa.service.d.ts +1 -1
- package/dist/mfa/mfa.service.js +1 -1
- package/dist/mfa/mfa.service.js.map +1 -1
- package/dist/mfa/totp.service.js +41 -11
- package/dist/mfa/totp.service.js.map +1 -1
- package/dist/modules/agents/agent-builder.controller.d.ts +28 -0
- package/dist/modules/agents/agent-builder.controller.js +168 -0
- package/dist/modules/agents/agent-builder.controller.js.map +1 -0
- package/dist/modules/agents/agent-chat.controller.d.ts +41 -0
- package/dist/modules/agents/agent-chat.controller.js +206 -0
- package/dist/modules/agents/agent-chat.controller.js.map +1 -0
- package/dist/modules/agents/agent-config.service.d.ts +33 -0
- package/dist/modules/agents/agent-config.service.js +288 -0
- package/dist/modules/agents/agent-config.service.js.map +1 -0
- package/dist/modules/agents/agent-custom-tools.service.d.ts +22 -0
- package/dist/modules/agents/agent-custom-tools.service.js +98 -0
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +110 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.js +482 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -0
- package/dist/modules/agents/agent-execution.service.d.ts +4 -4
- package/dist/modules/agents/agent-execution.service.js +6 -5
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-persistence.service.d.ts +19 -0
- package/dist/modules/agents/agent-integration-persistence.service.js +90 -0
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -0
- package/dist/modules/agents/agent-integrations.controller.d.ts +60 -0
- package/dist/modules/agents/agent-integrations.controller.js +275 -0
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -0
- package/dist/modules/agents/agent-knowledge-sandbox.service.d.ts +1 -1
- package/dist/modules/agents/agent-knowledge-sandbox.service.js +3 -3
- package/dist/modules/agents/agent-knowledge-sandbox.service.js.map +1 -1
- package/dist/modules/agents/agent-knowledge.controller.d.ts +26 -0
- package/dist/modules/agents/agent-knowledge.controller.js +112 -0
- package/dist/modules/agents/agent-knowledge.controller.js.map +1 -0
- package/dist/modules/agents/agent-publish.controller.d.ts +38 -0
- package/dist/modules/agents/agent-publish.controller.js +94 -0
- package/dist/modules/agents/agent-publish.controller.js.map +1 -0
- package/dist/modules/agents/agent-publish.service.d.ts +30 -0
- package/dist/modules/agents/agent-publish.service.js +293 -0
- package/dist/modules/agents/agent-publish.service.js.map +1 -0
- package/dist/modules/agents/agent-runnable-state.service.d.ts +15 -0
- package/dist/modules/agents/agent-runnable-state.service.js +43 -0
- package/dist/modules/agents/agent-runnable-state.service.js.map +1 -0
- package/dist/modules/agents/agent-runtime-cache.service.d.ts +44 -0
- package/dist/modules/agents/agent-runtime-cache.service.js +169 -0
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -0
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +5 -9
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +68 -41
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-sandbox.controller.d.ts +3 -3
- package/dist/modules/agents/agent-sandbox.controller.js +9 -8
- package/dist/modules/agents/agent-sandbox.controller.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.d.ts +3 -4
- package/dist/modules/agents/agent-skills.service.js +54 -28
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-task.service.d.ts +5 -5
- package/dist/modules/agents/agent-task.service.js +46 -46
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-tasks.controller.d.ts +30 -0
- package/dist/modules/agents/agent-tasks.controller.js +106 -0
- package/dist/modules/agents/agent-tasks.controller.js.map +1 -0
- package/dist/modules/agents/agent-telemetry.js +0 -4
- package/dist/modules/agents/agent-telemetry.js.map +1 -1
- package/dist/modules/agents/agent-test-chat.service.d.ts +9 -0
- package/dist/modules/agents/agent-test-chat.service.js +49 -0
- package/dist/modules/agents/agent-test-chat.service.js.map +1 -0
- package/dist/modules/agents/agent-threads.controller.d.ts +28 -0
- package/dist/modules/agents/agent-threads.controller.js +66 -0
- package/dist/modules/agents/agent-threads.controller.js.map +1 -0
- package/dist/modules/agents/agent-validation.service.d.ts +13 -0
- package/dist/modules/agents/agent-validation.service.js +142 -0
- package/dist/modules/agents/agent-validation.service.js.map +1 -0
- package/dist/modules/agents/agents-catalog.controller.d.ts +8 -0
- package/dist/modules/agents/agents-catalog.controller.js +80 -0
- package/dist/modules/agents/agents-catalog.controller.js.map +1 -0
- package/dist/modules/agents/agents-config.controller.d.ts +181 -0
- package/dist/modules/agents/agents-config.controller.js +71 -0
- package/dist/modules/agents/agents-config.controller.js.map +1 -0
- package/dist/modules/agents/agents-skills.controller.d.ts +33 -0
- package/dist/modules/agents/agents-skills.controller.js +94 -0
- package/dist/modules/agents/agents-skills.controller.js.map +1 -0
- package/dist/modules/agents/agents-tools.service.d.ts +1 -7
- package/dist/modules/agents/agents-tools.service.js +3 -80
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +7 -393
- package/dist/modules/agents/agents.controller.js +6 -990
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +2 -2
- package/dist/modules/agents/agents.module.js +12 -0
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +8 -166
- package/dist/modules/agents/agents.service.js +10 -1287
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +2 -2
- package/dist/modules/agents/builder/agents-builder-prompts.js +3 -5
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +11 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +60 -25
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +4 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +36 -12
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js +1 -3
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/index.d.ts +1 -1
- package/dist/modules/agents/builder/interactive/index.js +2 -1
- package/dist/modules/agents/builder/interactive/index.js.map +1 -1
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js +1 -1
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +3 -2
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +3 -5
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +4 -6
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.js +4 -4
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +8 -3
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/integrations.skill.js +8 -0
- package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/mcp.skill.js +16 -0
- package/dist/modules/agents/builder/skills/mcp.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/resource-locators.skill.js +18 -0
- package/dist/modules/agents/builder/skills/resource-locators.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/sub-agents.skill.js +34 -8
- package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +22 -3
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +12 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-memory-entry.entity.d.ts +1 -1
- package/dist/modules/agents/entities/agent-memory-entry.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent.entity.d.ts +1 -2
- package/dist/modules/agents/entities/agent.entity.js +0 -4
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +7 -23
- package/dist/modules/agents/integrations/agent-chat-bridge.js +60 -646
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +44 -0
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +110 -0
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +38 -4
- package/dist/modules/agents/integrations/agent-chat-integration.js +10 -3
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.d.ts +22 -0
- package/dist/modules/agents/integrations/agent-chat-message-context.js +104 -0
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.d.ts +29 -0
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +205 -0
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.d.ts +10 -0
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.js +90 -0
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.js.map +1 -0
- package/dist/modules/agents/integrations/chat-integration.service.js +6 -3
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +1 -1
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.d.ts +6037 -0
- package/dist/modules/agents/integrations/integration-tool-definitions.js +231 -0
- package/dist/modules/agents/integrations/integration-tool-definitions.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-descriptions.d.ts +3 -0
- package/dist/modules/agents/integrations/integration-tool-descriptions.js +100 -0
- package/dist/modules/agents/integrations/integration-tool-descriptions.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-execution.d.ts +27 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js +278 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-factory.d.ts +121 -0
- package/dist/modules/agents/integrations/integration-tool-factory.js +133 -0
- package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-schema.d.ts +107 -0
- package/dist/modules/agents/integrations/integration-tool-schema.js +140 -0
- package/dist/modules/agents/integrations/integration-tool-schema.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +105 -0
- package/dist/modules/agents/integrations/integration-tool-types.js +3 -0
- package/dist/modules/agents/integrations/integration-tool-types.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tools.d.ts +3 -213
- package/dist/modules/agents/integrations/integration-tools.js +16 -998
- package/dist/modules/agents/integrations/integration-tools.js.map +1 -1
- package/dist/modules/agents/integrations/integrations-sync.d.ts +1 -1
- package/dist/modules/agents/integrations/n8n-memory.d.ts +1 -1
- package/dist/modules/agents/integrations/n8n-memory.js +2 -2
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-integration.d.ts +3 -3
- package/dist/modules/agents/integrations/platforms/linear-integration.js +14 -19
- package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-tool-definitions.d.ts +473 -0
- package/dist/modules/agents/integrations/platforms/linear-tool-definitions.js +270 -0
- package/dist/modules/agents/integrations/platforms/linear-tool-definitions.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/n8n-chat-integration.d.ts +4 -3
- package/dist/modules/agents/integrations/platforms/n8n-chat-integration.js +6 -2
- package/dist/modules/agents/integrations/platforms/n8n-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.d.ts +12 -0
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js +198 -0
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.d.ts +14 -4
- package/dist/modules/agents/integrations/platforms/slack-integration.js +20 -7
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.js +1 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.d.ts +35 -0
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js +33 -0
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +1 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +2 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +5 -3
- package/dist/modules/agents/integrations/slack-app-setup.service.js +11 -6
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.d.ts +7 -0
- package/dist/modules/agents/json-config/from-json-config.js +60 -15
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js +17 -6
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +2 -5
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-history.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.d.ts +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -1
- package/dist/modules/agents/tools/agent-data-utils.d.ts +22 -0
- package/dist/modules/agents/tools/agent-data-utils.js +64 -0
- package/dist/modules/agents/tools/agent-data-utils.js.map +1 -0
- package/dist/modules/agents/tools/input-data-tool.d.ts +3 -0
- package/dist/modules/agents/tools/input-data-tool.js +40 -0
- package/dist/modules/agents/tools/input-data-tool.js.map +1 -0
- package/dist/modules/agents/tools/node-tool-factory.d.ts +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-context-tool.d.ts +3 -0
- package/dist/modules/agents/tools/workflow-context-tool.js +84 -0
- package/dist/modules/agents/tools/workflow-context-tool.js.map +1 -0
- package/dist/modules/agents/utils/agent-credential-provider.d.ts +4 -0
- package/dist/modules/agents/utils/agent-credential-provider.js +8 -0
- package/dist/modules/agents/utils/agent-credential-provider.js.map +1 -0
- package/dist/modules/agents/utils/agent-missing-skill-ids.d.ts +2 -0
- package/dist/modules/agents/utils/agent-missing-skill-ids.js +17 -0
- package/dist/modules/agents/utils/agent-missing-skill-ids.js.map +1 -0
- package/dist/modules/agents/utils/agent-published-snapshot.d.ts +2 -0
- package/dist/modules/agents/utils/agent-published-snapshot.js +17 -0
- package/dist/modules/agents/utils/agent-published-snapshot.js.map +1 -0
- package/dist/modules/agents/utils/agent-resource-id.d.ts +1 -1
- package/dist/modules/agents/utils/sub-agent-resolver.d.ts +14 -0
- package/dist/modules/agents/utils/sub-agent-resolver.js +23 -0
- package/dist/modules/agents/utils/sub-agent-resolver.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v2/file-access.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/oauth-callback-auth.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/process-env-access.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/pyodide-removed.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/queue-worker-max-stalled-count.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/removed-nodes.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/settings-file-permissions.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/start-node-removed.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/task-runner-docker-image.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/tunnel-option.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/wait-node-subworkflow.rule.js +1 -1
- package/dist/modules/breaking-changes/rules/v2/wait-node-subworkflow.rule.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v2/workflow-hooks-deprecated.rule.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-agent.service.d.ts +5 -5
- package/dist/modules/chat-hub/chat-hub-agent.service.js +9 -9
- package/dist/modules/chat-hub/chat-hub-agent.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-message.entity.d.ts +2 -2
- package/dist/modules/chat-hub/chat-hub-message.entity.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-session.entity.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub.controller.d.ts +5 -2
- package/dist/modules/chat-hub/chat-hub.controller.js +23 -5
- package/dist/modules/chat-hub/chat-hub.controller.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.module.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub.service.js +1 -1
- package/dist/modules/chat-hub/chat-hub.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +8 -4
- package/dist/modules/chat-hub/chat-hub.settings.controller.js +28 -18
- package/dist/modules/chat-hub/chat-hub.settings.controller.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.settings.service.js +3 -3
- package/dist/modules/chat-hub/chat-hub.settings.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.types.d.ts +1 -1
- package/dist/modules/chat-hub/chat-session.repository.js +1 -1
- package/dist/modules/chat-hub/chat-session.repository.js.map +1 -1
- package/dist/modules/community-packages/community-node-types.service.js +2 -2
- package/dist/modules/community-packages/community-node-types.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.config.d.ts +2 -0
- package/dist/modules/community-packages/community-packages.config.js +10 -0
- package/dist/modules/community-packages/community-packages.config.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.d.ts +3 -3
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +3 -3
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.service.js +3 -3
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/community-packages/npm-utils.js +1 -1
- package/dist/modules/community-packages/npm-utils.js.map +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.js +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.js.map +1 -1
- package/dist/modules/data-table/data-table-file-cleanup.service.js +1 -1
- package/dist/modules/data-table/data-table-file-cleanup.service.js.map +1 -1
- package/dist/modules/data-table/data-table-proxy.service.d.ts +2 -2
- package/dist/modules/data-table/data-table-proxy.service.js +3 -3
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/data-table/data-table.controller.d.ts +2 -2
- package/dist/modules/data-table/data-table.controller.js +3 -3
- package/dist/modules/data-table/data-table.controller.js.map +1 -1
- package/dist/modules/data-table/utils/sql-utils.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/slack-signature-extractor.js +1 -1
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/slack-signature-extractor.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js +0 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.d.ts +0 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js +3 -3
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js +0 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/slack-signature-identifier.js +2 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/slack-signature-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/slack-credential-resolver.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/storage/dynamic-credential-entry-storage.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/storage/dynamic-credential-entry-storage.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.js +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-cors.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js +2 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-web.service.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-web.service.js +2 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-web.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js +1 -1
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/utils.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.d.ts +3 -1
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js +14 -2
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.d.ts +3 -4
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js +20 -46
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.d.ts +21 -0
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js +142 -0
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js.map +1 -0
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.d.ts +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/provider-registry.service.d.ts +1 -1
- package/dist/modules/external-secrets.ee/provider-registry.service.js +1 -1
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js +5 -1
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/infisical.js +4 -4
- package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/vault.js +10 -10
- package/dist/modules/external-secrets.ee/providers/vault.js.map +1 -1
- package/dist/modules/external-secrets.ee/redaction.service.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.d.ts +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-types.controller.ee.d.ts +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-types.controller.ee.js +2 -2
- package/dist/modules/external-secrets.ee/secrets-providers-types.controller.ee.js.map +1 -1
- package/dist/modules/favorites/favorites.controller.d.ts +1 -1
- package/dist/modules/favorites/favorites.controller.js +2 -2
- package/dist/modules/favorites/favorites.controller.js.map +1 -1
- package/dist/modules/favorites/favorites.event-relay.d.ts +1 -1
- package/dist/modules/favorites/favorites.event-relay.js +1 -1
- package/dist/modules/favorites/favorites.event-relay.js.map +1 -1
- package/dist/modules/favorites/favorites.service.d.ts +2 -2
- package/dist/modules/favorites/favorites.service.js +2 -2
- package/dist/modules/favorites/favorites.service.js.map +1 -1
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +1 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +6 -0
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -1
- package/dist/modules/insights/insights.module.d.ts +1 -0
- package/dist/modules/insights/insights.module.js +1 -1
- package/dist/modules/insights/insights.module.js.map +1 -1
- package/dist/modules/insights/insights.settings.d.ts +6 -3
- package/dist/modules/insights/insights.settings.js +8 -3
- package/dist/modules/insights/insights.settings.js.map +1 -1
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.d.ts +23 -0
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js +123 -0
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js.map +1 -0
- package/dist/modules/instance-ai/browser/browser-use-server.d.ts +11 -0
- package/dist/modules/instance-ai/browser/browser-use-server.js +68 -0
- package/dist/modules/instance-ai/browser/browser-use-server.js.map +1 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.d.ts +7 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js +6 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js.map +1 -0
- package/dist/modules/instance-ai/browser/composite-local-mcp-server.d.ts +14 -0
- package/dist/modules/instance-ai/browser/composite-local-mcp-server.js +57 -0
- package/dist/modules/instance-ai/browser/composite-local-mcp-server.js.map +1 -0
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.d.ts +40 -0
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js +297 -0
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js.map +1 -0
- package/dist/modules/instance-ai/eval/execution.service.js +2 -2
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +5 -1
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.js +1 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +14 -0
- package/dist/modules/instance-ai/eval/thread-restore.service.js +149 -0
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js +1 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js.map +1 -1
- package/dist/modules/instance-ai/filesystem/local-gateway.d.ts +3 -0
- package/dist/modules/instance-ai/filesystem/local-gateway.js +20 -3
- package/dist/modules/instance-ai/filesystem/local-gateway.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-event-relay.service.d.ts +12 -0
- package/dist/modules/instance-ai/instance-ai-event-relay.service.js +56 -0
- package/dist/modules/instance-ai/instance-ai-event-relay.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-gateway.service.d.ts +5 -1
- package/dist/modules/instance-ai/instance-ai-gateway.service.js +10 -3
- package/dist/modules/instance-ai/instance-ai-gateway.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +5 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.js +38 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-run-pin-data.d.ts +29 -0
- package/dist/modules/instance-ai/instance-ai-run-pin-data.js +222 -0
- package/dist/modules/instance-ai/instance-ai-run-pin-data.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +9 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.d.ts +72 -0
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +352 -0
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-test.controller.d.ts +2 -2
- package/dist/modules/instance-ai/instance-ai-test.controller.js +2 -2
- package/dist/modules/instance-ai/instance-ai-test.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +78 -193
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +19 -2
- package/dist/modules/instance-ai/instance-ai.controller.js +96 -6
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -0
- package/dist/modules/instance-ai/instance-ai.module.js +4 -0
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +10 -33
- package/dist/modules/instance-ai/instance-ai.service.js +293 -767
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/internal-messages.d.ts +2 -0
- package/dist/modules/instance-ai/internal-messages.js +4 -2
- package/dist/modules/instance-ai/internal-messages.js.map +1 -1
- package/dist/modules/instance-ai/liveness/index.d.ts +1 -1
- package/dist/modules/instance-ai/liveness/index.js.map +1 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +4 -7
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +2 -2
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.js +4 -3
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/node-definition-resolver.js +2 -1
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
- package/dist/modules/instance-ai/planned-task-action-runner.d.ts +1 -1
- package/dist/modules/instance-ai/planned-task-action-runner.js +3 -3
- package/dist/modules/instance-ai/planned-task-action-runner.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +1 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +29 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
- package/dist/modules/instance-ai/suspended-run-restorer.service.d.ts +4 -8
- package/dist/modules/instance-ai/suspended-run-restorer.service.js +2 -2
- package/dist/modules/instance-ai/suspended-run-restorer.service.js.map +1 -1
- package/dist/modules/instance-ai/suspended-thread-persistence.service.d.ts +0 -14
- package/dist/modules/instance-ai/suspended-thread-persistence.service.js +0 -26
- package/dist/modules/instance-ai/suspended-thread-persistence.service.js.map +1 -1
- package/dist/modules/instance-ai/tracing/index.d.ts +1 -0
- package/dist/modules/instance-ai/tracing/index.js +6 -0
- package/dist/modules/instance-ai/tracing/index.js.map +1 -0
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.d.ts +81 -0
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js +341 -0
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -0
- package/dist/modules/instance-ai/workflow-verification-task-projector.js +1 -2
- package/dist/modules/instance-ai/workflow-verification-task-projector.js.map +1 -1
- package/dist/modules/instance-registry/instance-registry.controller.js +1 -0
- package/dist/modules/instance-registry/instance-registry.controller.js.map +1 -1
- package/dist/modules/instance-registry/instance-registry.service.js +1 -1
- package/dist/modules/instance-registry/instance-registry.service.js.map +1 -1
- package/dist/modules/instance-version-history/instance-version-history.service.d.ts +1 -1
- package/dist/modules/instance-version-history/instance-version-history.service.js +1 -1
- package/dist/modules/instance-version-history/instance-version-history.service.js.map +1 -1
- package/dist/modules/ldap.ee/ldap.service.ee.d.ts +1 -1
- package/dist/modules/ldap.ee/ldap.service.ee.js +1 -1
- package/dist/modules/ldap.ee/ldap.service.ee.js.map +1 -1
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-sentry.ee.js.map +1 -1
- package/dist/modules/mcp/dto/update-allowed-redirect-uris.dto.js +1 -1
- package/dist/modules/mcp/dto/update-allowed-redirect-uris.dto.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +5 -1
- package/dist/modules/mcp/mcp.service.js +18 -3
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.js.map +1 -1
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/execution-utils.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.d.ts +3 -3
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-history.tool.d.ts +49 -0
- package/dist/modules/mcp/tools/get-workflow-history.tool.js +115 -0
- package/dist/modules/mcp/tools/get-workflow-history.tool.js.map +1 -0
- package/dist/modules/mcp/tools/get-workflow-version.tool.d.ts +30 -0
- package/dist/modules/mcp/tools/get-workflow-version.tool.js +118 -0
- package/dist/modules/mcp/tools/get-workflow-version.tool.js.map +1 -0
- package/dist/modules/mcp/tools/prepare-workflow-pin-data.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/prepare-workflow-pin-data.tool.js.map +1 -1
- package/dist/modules/mcp/tools/publish-workflow.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/publish-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +25 -11
- package/dist/modules/mcp/tools/schemas.js +7 -4
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-projects.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
- package/dist/modules/mcp/tools/test-workflow.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/test-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/unpublish-workflow.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/unpublish-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/webhook-utils.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +18 -2
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/delete-workflow.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/delete-workflow.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/delete-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +4 -2
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.d.ts +20 -0
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.js +108 -0
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +3 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +117 -4
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +4 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +195 -3
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +69 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-history.utils.d.ts +3 -0
- package/dist/modules/mcp/tools/workflow-history.utils.js +18 -0
- package/dist/modules/mcp/tools/workflow-history.utils.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +4 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
- package/dist/modules/mcp-registry/synthesize-type-def.d.ts +1 -1
- package/dist/modules/mcp-registry/synthesize-type-def.js +3 -3
- package/dist/modules/mcp-registry/synthesize-type-def.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/utils/import-package-upload.js +1 -1
- package/dist/modules/n8n-packages/utils/import-package-upload.js.map +1 -1
- package/dist/modules/oauth-server/oauth-consent.service.d.ts +3 -1
- package/dist/modules/oauth-server/oauth-consent.service.js +8 -4
- package/dist/modules/oauth-server/oauth-consent.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth.controller.js +1 -0
- package/dist/modules/oauth-server/oauth.controller.js.map +1 -1
- package/dist/modules/oauth-server/oauth.helpers.d.ts +2 -2
- package/dist/modules/oauth-server/oauth.helpers.js +4 -2
- package/dist/modules/oauth-server/oauth.helpers.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.module.js +4 -0
- package/dist/modules/provisioning.ee/provisioning.module.js.map +1 -1
- package/dist/modules/provisioning.ee/role-deletion-checker.ee.d.ts +7 -0
- package/dist/modules/provisioning.ee/role-deletion-checker.ee.js +33 -0
- package/dist/modules/provisioning.ee/role-deletion-checker.ee.js.map +1 -0
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js +3 -3
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js.map +1 -1
- package/dist/modules/quick-connect/quick-connect.config.d.ts +10 -10
- package/dist/modules/quick-connect/quick-connect.module.d.ts +2 -2
- package/dist/modules/quick-connect/quick-connect.service.js +1 -1
- package/dist/modules/quick-connect/quick-connect.service.js.map +1 -1
- package/dist/modules/redaction/executions/execution-redaction.service.d.ts +1 -1
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/runtime-credentials/runtime-credentials.service.js +1 -1
- package/dist/modules/runtime-credentials/runtime-credentials.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-context.factory.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +1 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +2 -2
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-scoped.service.d.ts +3 -2
- package/dist/modules/source-control.ee/source-control-scoped.service.js +10 -1
- package/dist/modules/source-control.ee/source-control-scoped.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +3 -3
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +4 -4
- package/dist/modules/source-control.ee/source-control.controller.ee.js +5 -4
- package/dist/modules/source-control.ee/source-control.controller.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +8 -5
- package/dist/modules/source-control.ee/source-control.service.ee.js +25 -10
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml-helpers.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.d.ts +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.js +4 -3
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js +1 -1
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js.map +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -1
- package/dist/modules/token-exchange/services/trusted-key.service.js +1 -1
- package/dist/modules/token-exchange/services/trusted-key.service.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.schemas.d.ts +2 -2
- package/dist/modules/workflow-builder/workflow-builder-session.entity.js +1 -1
- package/dist/modules/workflow-builder/workflow-builder-session.entity.js.map +1 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js +1 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js.map +1 -1
- package/dist/node-catalog/node-catalog.service.d.ts +3 -2
- package/dist/node-catalog/node-catalog.service.js +50 -18
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +1 -1
- package/dist/oauth/oauth.service.js +7 -6
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/permissions.ee/check-access.js +1 -1
- package/dist/permissions.ee/check-access.js.map +1 -1
- package/dist/public-api/index.js +24 -3
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.service.js +38 -2
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/scaling/job-processor.js +1 -0
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/leader-election-client.d.ts +1 -1
- package/dist/scaling/leader-election-client.js +1 -1
- package/dist/scaling/leader-election-client.js.map +1 -1
- package/dist/scaling/pubsub/subscriber.service.js +1 -1
- package/dist/scaling/pubsub/subscriber.service.js.map +1 -1
- package/dist/scaling/redis/redis.types.d.ts +1 -1
- package/dist/scaling/redis-lock.service.d.ts +15 -0
- package/dist/scaling/redis-lock.service.js +154 -0
- package/dist/scaling/redis-lock.service.js.map +1 -0
- package/dist/security-audit/risk-reporters/instance-risk-reporter.js +3 -3
- package/dist/security-audit/risk-reporters/instance-risk-reporter.js.map +1 -1
- package/dist/server.js +4 -0
- package/dist/server.js.map +1 -1
- package/dist/services/ai-gateway.service.d.ts +1 -1
- package/dist/services/ai-gateway.service.js +1 -1
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/ai-workflow-builder.service.js +5 -4
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/credentials-tester.service.d.ts +1 -1
- package/dist/services/credentials-tester.service.js +3 -3
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/dynamic-node-parameters.service.d.ts +3 -3
- package/dist/services/dynamic-node-parameters.service.js +4 -4
- package/dist/services/dynamic-node-parameters.service.js.map +1 -1
- package/dist/services/dynamic-templates.service.js +3 -3
- package/dist/services/dynamic-templates.service.js.map +1 -1
- package/dist/services/export.service.js +3 -3
- package/dist/services/export.service.js.map +1 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/ownership.service.d.ts +3 -3
- package/dist/services/ownership.service.js +5 -5
- package/dist/services/ownership.service.js.map +1 -1
- package/dist/services/project.service.ee.js +2 -2
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.d.ts +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.js +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/rate-limit.service.d.ts +1 -1
- package/dist/services/rate-limit.service.js.map +1 -1
- package/dist/services/role-deletion-check-proxy.service.d.ts +8 -0
- package/dist/services/role-deletion-check-proxy.service.js +28 -0
- package/dist/services/role-deletion-check-proxy.service.js.map +1 -0
- package/dist/services/role.service.d.ts +5 -2
- package/dist/services/role.service.js +18 -2
- package/dist/services/role.service.js.map +1 -1
- package/dist/services/user.service.js +5 -0
- package/dist/services/user.service.js.map +1 -1
- package/dist/task-runners/task-managers/data-request-response-builder.js +1 -0
- package/dist/task-runners/task-managers/data-request-response-builder.js.map +1 -1
- package/dist/task-runners/task-runner-process-js.js +2 -0
- package/dist/task-runners/task-runner-process-js.js.map +1 -1
- package/dist/tool-generation/hitl-tools.js.map +1 -1
- package/dist/utils/compression.util.js +2 -2
- package/dist/utils/compression.util.js.map +1 -1
- package/dist/utils/health-endpoint.util.js.map +1 -1
- package/dist/utils/strapi-utils.js +2 -3
- package/dist/utils/strapi-utils.js.map +1 -1
- package/dist/webhooks/test-webhook-registrations.service.js +1 -1
- package/dist/webhooks/test-webhook-registrations.service.js.map +1 -1
- package/dist/webhooks/test-webhooks.d.ts +1 -1
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-forms.js +2 -2
- package/dist/webhooks/waiting-forms.js.map +1 -1
- package/dist/webhooks/webhook.service.d.ts +1 -0
- package/dist/webhooks/webhook.service.js +4 -1
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +2 -2
- package/dist/workflow-execute-additional-data.js +5 -4
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.js +1 -9
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +1 -0
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.d.ts +3 -1
- package/dist/workflows/publication/workflow-publication-applier.js +10 -2
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/triggers/non-webhook-trigger-registrar.d.ts +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.js +4 -5
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +4 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.js +36 -9
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.d.ts +3 -0
- package/dist/workflows/triggers/workflow-trigger-activator.js +66 -32
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-creation.service.js +1 -1
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.d.ts +4 -3
- package/dist/workflows/workflow-history/workflow-history.service.js +4 -3
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/dist/workflows/workflow-published-data.service.d.ts +16 -6
- package/dist/workflows/workflow-published-data.service.js +42 -2
- package/dist/workflows/workflow-published-data.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +4 -22
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +2 -2
- package/dist/workflows/workflow.service.ee.d.ts +1 -1
- package/dist/workflows/workflow.service.ee.js +1 -1
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +7 -7
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +6 -6
- package/dist/workflows/workflows.controller.js +3 -3
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +68 -56
- package/dist/modules/instance-ai/eval/proxy-loopback.d.ts +0 -1
- package/dist/modules/instance-ai/eval/proxy-loopback.js +0 -44
- package/dist/modules/instance-ai/eval/proxy-loopback.js.map +0 -1
|
@@ -1,1001 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
exports
|
|
15
|
-
'get_current_message_context',
|
|
16
|
-
'get_current_subject',
|
|
17
|
-
'get_current_user',
|
|
18
|
-
'get_current_channel_info',
|
|
19
|
-
'get_user',
|
|
20
|
-
'get_channel_info',
|
|
21
|
-
'search_users',
|
|
22
|
-
'search_channels',
|
|
23
|
-
];
|
|
24
|
-
exports.DEFAULT_INTEGRATION_ACTIONS = [
|
|
25
|
-
'respond',
|
|
26
|
-
'send_dm',
|
|
27
|
-
'send_channel_message',
|
|
28
|
-
];
|
|
29
|
-
exports.richCardButtonStylesAreChatSdkStyles = true;
|
|
30
|
-
const messageSchema = api_types_1.richMessageSchema;
|
|
31
|
-
const noInputSchema = zod_1.z.object({}).strict();
|
|
32
|
-
const platformUserIdSchema = zod_1.z
|
|
33
|
-
.string()
|
|
34
|
-
.min(1)
|
|
35
|
-
.describe('Platform user ID, for example a Slack U... ID or Linear user UUID. Do not pass a name.');
|
|
36
|
-
const platformChannelIdSchema = zod_1.z
|
|
37
|
-
.string()
|
|
38
|
-
.min(1)
|
|
39
|
-
.describe('Platform channel ID, for example a Slack C... channel ID. Do not pass a name.');
|
|
40
|
-
const searchLimitSchema = zod_1.z
|
|
41
|
-
.number()
|
|
42
|
-
.int()
|
|
43
|
-
.min(1)
|
|
44
|
-
.max(50)
|
|
45
|
-
.optional()
|
|
46
|
-
.describe('Maximum number of matches to return. Defaults to 10.');
|
|
47
|
-
const searchCursorSchema = zod_1.z
|
|
48
|
-
.string()
|
|
49
|
-
.min(1)
|
|
50
|
-
.optional()
|
|
51
|
-
.describe('Opaque pagination cursor returned as `nextCursor` by a previous call. Pass to fetch the next page of matches.');
|
|
52
|
-
const linearTeamIdSchema = zod_1.z
|
|
53
|
-
.string()
|
|
54
|
-
.min(1)
|
|
55
|
-
.describe('Linear team UUID returned by get_team or search_teams.');
|
|
56
|
-
const linearProjectIdSchema = zod_1.z
|
|
57
|
-
.string()
|
|
58
|
-
.min(1)
|
|
59
|
-
.describe('Linear project UUID returned by get_project or search_projects.');
|
|
60
|
-
const optionalLinearSearchQuerySchema = zod_1.z
|
|
61
|
-
.string()
|
|
62
|
-
.min(1)
|
|
63
|
-
.optional()
|
|
64
|
-
.describe('Optional search term. Omit to list the first page.');
|
|
65
|
-
const getCurrentMessageContextInputSchema = zod_1.z.object({
|
|
66
|
-
query: zod_1.z.literal('get_current_message_context'),
|
|
67
|
-
input: noInputSchema,
|
|
68
|
-
});
|
|
69
|
-
const getCurrentSubjectInputSchema = zod_1.z.object({
|
|
70
|
-
query: zod_1.z.literal('get_current_subject'),
|
|
71
|
-
input: noInputSchema,
|
|
72
|
-
});
|
|
73
|
-
const getCurrentUserInputSchema = zod_1.z.object({
|
|
74
|
-
query: zod_1.z.literal('get_current_user'),
|
|
75
|
-
input: noInputSchema,
|
|
76
|
-
});
|
|
77
|
-
const getCurrentChannelInfoInputSchema = zod_1.z.object({
|
|
78
|
-
query: zod_1.z.literal('get_current_channel_info'),
|
|
79
|
-
input: noInputSchema,
|
|
80
|
-
});
|
|
81
|
-
const getUserInputSchema = zod_1.z.object({
|
|
82
|
-
query: zod_1.z.literal('get_user'),
|
|
83
|
-
input: zod_1.z
|
|
84
|
-
.object({
|
|
85
|
-
userId: platformUserIdSchema,
|
|
86
|
-
})
|
|
87
|
-
.strict(),
|
|
88
|
-
});
|
|
89
|
-
const getChannelInfoInputSchema = zod_1.z.object({
|
|
90
|
-
query: zod_1.z.literal('get_channel_info'),
|
|
91
|
-
input: zod_1.z
|
|
92
|
-
.object({
|
|
93
|
-
channelId: platformChannelIdSchema,
|
|
94
|
-
})
|
|
95
|
-
.strict(),
|
|
96
|
-
});
|
|
97
|
-
const searchUsersInputSchema = zod_1.z.object({
|
|
98
|
-
query: zod_1.z.literal('search_users'),
|
|
99
|
-
input: zod_1.z
|
|
100
|
-
.object({
|
|
101
|
-
query: zod_1.z
|
|
102
|
-
.string()
|
|
103
|
-
.min(1)
|
|
104
|
-
.optional()
|
|
105
|
-
.describe('User name, display name, handle, user ID, or email fragment to search for.'),
|
|
106
|
-
email: zod_1.z.string().min(1).optional().describe('Exact email address to look up when known.'),
|
|
107
|
-
limit: searchLimitSchema,
|
|
108
|
-
cursor: searchCursorSchema,
|
|
109
|
-
includeBots: zod_1.z
|
|
110
|
-
.boolean()
|
|
111
|
-
.optional()
|
|
112
|
-
.describe('Whether to include bot users. Defaults to false.'),
|
|
113
|
-
includeDeleted: zod_1.z
|
|
114
|
-
.boolean()
|
|
115
|
-
.optional()
|
|
116
|
-
.describe('Whether to include deleted/deactivated users. Defaults to false.'),
|
|
117
|
-
})
|
|
118
|
-
.strict()
|
|
119
|
-
.refine((input) => input.query !== undefined || input.email !== undefined, {
|
|
120
|
-
message: 'Provide query or email.',
|
|
121
|
-
}),
|
|
122
|
-
});
|
|
123
|
-
const searchChannelsInputSchema = zod_1.z.object({
|
|
124
|
-
query: zod_1.z.literal('search_channels'),
|
|
125
|
-
input: zod_1.z
|
|
126
|
-
.object({
|
|
127
|
-
query: zod_1.z.string().min(1).describe('Channel name, channel ID, or #channel search term.'),
|
|
128
|
-
limit: searchLimitSchema,
|
|
129
|
-
cursor: searchCursorSchema,
|
|
130
|
-
includeArchived: zod_1.z
|
|
131
|
-
.boolean()
|
|
132
|
-
.optional()
|
|
133
|
-
.describe('Whether to include archived channels. Defaults to false.'),
|
|
134
|
-
})
|
|
135
|
-
.strict(),
|
|
136
|
-
});
|
|
137
|
-
const getIssueInputSchema = zod_1.z.object({
|
|
138
|
-
query: zod_1.z.literal('get_issue'),
|
|
139
|
-
input: zod_1.z
|
|
140
|
-
.object({
|
|
141
|
-
issueId: zod_1.z.string().min(1).describe('Linear issue UUID or identifier such as ENG-123.'),
|
|
142
|
-
includeComments: zod_1.z
|
|
143
|
-
.boolean()
|
|
144
|
-
.optional()
|
|
145
|
-
.describe('Whether to include recent comments. Defaults to false.'),
|
|
146
|
-
commentsLimit: zod_1.z
|
|
147
|
-
.number()
|
|
148
|
-
.int()
|
|
149
|
-
.min(1)
|
|
150
|
-
.max(20)
|
|
151
|
-
.optional()
|
|
152
|
-
.describe('Maximum number of recent comments to return. Defaults to 10.'),
|
|
153
|
-
})
|
|
154
|
-
.strict(),
|
|
155
|
-
});
|
|
156
|
-
const searchIssuesInputSchema = zod_1.z.object({
|
|
157
|
-
query: zod_1.z.literal('search_issues'),
|
|
158
|
-
input: zod_1.z
|
|
159
|
-
.object({
|
|
160
|
-
query: zod_1.z.string().min(1).describe('Search term for Linear issue title/content.'),
|
|
161
|
-
limit: searchLimitSchema,
|
|
162
|
-
cursor: searchCursorSchema,
|
|
163
|
-
teamId: zod_1.z.string().min(1).optional().describe('Optional Linear team ID to scope search.'),
|
|
164
|
-
includeArchived: zod_1.z
|
|
165
|
-
.boolean()
|
|
166
|
-
.optional()
|
|
167
|
-
.describe('Whether to include archived issues. Defaults to false.'),
|
|
168
|
-
})
|
|
169
|
-
.strict(),
|
|
170
|
-
});
|
|
171
|
-
const getTeamInputSchema = zod_1.z.object({
|
|
172
|
-
query: zod_1.z.literal('get_team'),
|
|
173
|
-
input: zod_1.z
|
|
174
|
-
.object({
|
|
175
|
-
teamId: linearTeamIdSchema,
|
|
176
|
-
})
|
|
177
|
-
.strict(),
|
|
178
|
-
});
|
|
179
|
-
const searchTeamsInputSchema = zod_1.z.object({
|
|
180
|
-
query: zod_1.z.literal('search_teams'),
|
|
181
|
-
input: zod_1.z
|
|
182
|
-
.object({
|
|
183
|
-
query: optionalLinearSearchQuerySchema,
|
|
184
|
-
limit: searchLimitSchema,
|
|
185
|
-
cursor: searchCursorSchema,
|
|
186
|
-
includeArchived: zod_1.z
|
|
187
|
-
.boolean()
|
|
188
|
-
.optional()
|
|
189
|
-
.describe('Whether to include archived teams. Defaults to false.'),
|
|
190
|
-
})
|
|
191
|
-
.strict(),
|
|
192
|
-
});
|
|
193
|
-
const getProjectInputSchema = zod_1.z.object({
|
|
194
|
-
query: zod_1.z.literal('get_project'),
|
|
195
|
-
input: zod_1.z
|
|
196
|
-
.object({
|
|
197
|
-
projectId: linearProjectIdSchema,
|
|
198
|
-
})
|
|
199
|
-
.strict(),
|
|
200
|
-
});
|
|
201
|
-
const searchProjectsInputSchema = zod_1.z.object({
|
|
202
|
-
query: zod_1.z.literal('search_projects'),
|
|
203
|
-
input: zod_1.z
|
|
204
|
-
.object({
|
|
205
|
-
query: optionalLinearSearchQuerySchema,
|
|
206
|
-
limit: searchLimitSchema,
|
|
207
|
-
cursor: searchCursorSchema,
|
|
208
|
-
teamId: linearTeamIdSchema.optional().describe('Optional Linear team UUID to scope search.'),
|
|
209
|
-
includeArchived: zod_1.z
|
|
210
|
-
.boolean()
|
|
211
|
-
.optional()
|
|
212
|
-
.describe('Whether to include archived projects. Defaults to false.'),
|
|
213
|
-
})
|
|
214
|
-
.strict(),
|
|
215
|
-
});
|
|
216
|
-
const searchLabelsInputSchema = zod_1.z.object({
|
|
217
|
-
query: zod_1.z.literal('search_labels'),
|
|
218
|
-
input: zod_1.z
|
|
219
|
-
.object({
|
|
220
|
-
query: optionalLinearSearchQuerySchema,
|
|
221
|
-
limit: searchLimitSchema,
|
|
222
|
-
cursor: searchCursorSchema,
|
|
223
|
-
teamId: linearTeamIdSchema.optional().describe('Optional Linear team UUID to scope search.'),
|
|
224
|
-
})
|
|
225
|
-
.strict(),
|
|
226
|
-
});
|
|
227
|
-
const searchIssueStatesInputSchema = zod_1.z.object({
|
|
228
|
-
query: zod_1.z.literal('search_issue_states'),
|
|
229
|
-
input: zod_1.z
|
|
230
|
-
.object({
|
|
231
|
-
query: optionalLinearSearchQuerySchema,
|
|
232
|
-
limit: searchLimitSchema,
|
|
233
|
-
cursor: searchCursorSchema,
|
|
234
|
-
teamId: linearTeamIdSchema.optional().describe('Optional Linear team UUID to scope search.'),
|
|
235
|
-
type: zod_1.z
|
|
236
|
-
.enum(['backlog', 'unstarted', 'started', 'completed', 'canceled'])
|
|
237
|
-
.optional()
|
|
238
|
-
.describe('Optional Linear workflow state type to filter by.'),
|
|
239
|
-
})
|
|
240
|
-
.strict(),
|
|
241
|
-
});
|
|
242
|
-
const CONTEXT_QUERY_INPUT_SCHEMAS = {
|
|
243
|
-
get_current_message_context: getCurrentMessageContextInputSchema,
|
|
244
|
-
get_current_subject: getCurrentSubjectInputSchema,
|
|
245
|
-
get_current_user: getCurrentUserInputSchema,
|
|
246
|
-
get_current_channel_info: getCurrentChannelInfoInputSchema,
|
|
247
|
-
get_user: getUserInputSchema,
|
|
248
|
-
get_channel_info: getChannelInfoInputSchema,
|
|
249
|
-
search_users: searchUsersInputSchema,
|
|
250
|
-
search_channels: searchChannelsInputSchema,
|
|
251
|
-
get_team: getTeamInputSchema,
|
|
252
|
-
search_teams: searchTeamsInputSchema,
|
|
253
|
-
get_project: getProjectInputSchema,
|
|
254
|
-
search_projects: searchProjectsInputSchema,
|
|
255
|
-
search_labels: searchLabelsInputSchema,
|
|
256
|
-
search_issue_states: searchIssueStatesInputSchema,
|
|
257
|
-
get_issue: getIssueInputSchema,
|
|
258
|
-
search_issues: searchIssuesInputSchema,
|
|
259
|
-
};
|
|
260
|
-
const MAX_BATCH_OPERATIONS = 20;
|
|
261
|
-
function buildContextInputSchema(queries) {
|
|
262
|
-
const querySchema = zod_1.z.enum(toZodEnumValues(queries));
|
|
263
|
-
const operationSchema = zod_1.z
|
|
264
|
-
.object({
|
|
265
|
-
query: querySchema,
|
|
266
|
-
input: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
267
|
-
})
|
|
268
|
-
.strict();
|
|
269
|
-
return zod_1.z
|
|
270
|
-
.object({
|
|
271
|
-
query: querySchema.optional(),
|
|
272
|
-
input: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
273
|
-
queries: zod_1.z.array(operationSchema).min(1).max(MAX_BATCH_OPERATIONS).optional(),
|
|
274
|
-
})
|
|
275
|
-
.strict()
|
|
276
|
-
.superRefine((input, ctx) => {
|
|
277
|
-
if (input.queries !== undefined) {
|
|
278
|
-
if (input.query !== undefined || input.input !== undefined) {
|
|
279
|
-
ctx.addIssue({
|
|
280
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
281
|
-
message: 'Provide either query/input or queries, not both.',
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
input.queries.forEach((operation, index) => {
|
|
285
|
-
validateContextOperationSchema(operation, ctx, ['queries', index]);
|
|
286
|
-
});
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
if (input.query === undefined || input.input === undefined) {
|
|
290
|
-
ctx.addIssue({
|
|
291
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
292
|
-
message: 'Provide query and input, or provide queries for a batch.',
|
|
293
|
-
});
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
validateContextOperationSchema({ query: input.query, input: input.input }, ctx);
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
const respondActionInputSchema = zod_1.z.object({
|
|
300
|
-
action: zod_1.z.literal('respond'),
|
|
301
|
-
input: zod_1.z
|
|
302
|
-
.object({
|
|
303
|
-
message: messageSchema,
|
|
304
|
-
})
|
|
305
|
-
.strict(),
|
|
306
|
-
});
|
|
307
|
-
const sendDmActionInputSchema = zod_1.z.object({
|
|
308
|
-
action: zod_1.z.literal('send_dm'),
|
|
309
|
-
input: zod_1.z
|
|
310
|
-
.object({
|
|
311
|
-
userId: platformUserIdSchema,
|
|
312
|
-
message: messageSchema,
|
|
313
|
-
})
|
|
314
|
-
.strict(),
|
|
315
|
-
});
|
|
316
|
-
const sendChannelMessageActionInputSchema = zod_1.z.object({
|
|
317
|
-
action: zod_1.z.literal('send_channel_message'),
|
|
318
|
-
input: zod_1.z
|
|
319
|
-
.object({
|
|
320
|
-
channelId: platformChannelIdSchema,
|
|
321
|
-
message: messageSchema,
|
|
322
|
-
})
|
|
323
|
-
.strict(),
|
|
324
|
-
});
|
|
325
|
-
const addReactionActionInputSchema = zod_1.z.object({
|
|
326
|
-
action: zod_1.z.literal('add_reaction'),
|
|
327
|
-
input: zod_1.z
|
|
328
|
-
.object({
|
|
329
|
-
emoji: zod_1.z
|
|
330
|
-
.string()
|
|
331
|
-
.min(1)
|
|
332
|
-
.describe('Emoji name or shortcode to add, for example eyes or :white_check_mark:.'),
|
|
333
|
-
threadId: zod_1.z
|
|
334
|
-
.string()
|
|
335
|
-
.min(1)
|
|
336
|
-
.optional()
|
|
337
|
-
.describe('Optional Slack thread ID. Defaults to the latest message context.'),
|
|
338
|
-
messageId: zod_1.z
|
|
339
|
-
.string()
|
|
340
|
-
.min(1)
|
|
341
|
-
.optional()
|
|
342
|
-
.describe('Optional Slack message timestamp. Defaults to the latest message context.'),
|
|
343
|
-
})
|
|
344
|
-
.strict(),
|
|
345
|
-
});
|
|
346
|
-
const createIssueActionInputSchema = zod_1.z.object({
|
|
347
|
-
action: zod_1.z.literal('create_issue'),
|
|
348
|
-
input: zod_1.z
|
|
349
|
-
.object({
|
|
350
|
-
teamId: zod_1.z
|
|
351
|
-
.string()
|
|
352
|
-
.min(1)
|
|
353
|
-
.describe('Linear team UUID where the issue should be created. Use search_teams first.'),
|
|
354
|
-
title: zod_1.z.string().min(1).describe('Linear issue title.'),
|
|
355
|
-
description: zod_1.z.string().min(1).optional().describe('Optional Linear issue description.'),
|
|
356
|
-
assigneeId: zod_1.z.string().min(1).optional().describe('Optional Linear assignee user ID.'),
|
|
357
|
-
projectId: zod_1.z.string().min(1).optional().describe('Optional Linear project ID.'),
|
|
358
|
-
labelIds: zod_1.z.array(zod_1.z.string().min(1)).optional().describe('Optional Linear label IDs.'),
|
|
359
|
-
priority: zod_1.z.number().int().optional().describe('Optional Linear priority value.'),
|
|
360
|
-
stateId: zod_1.z.string().min(1).optional().describe('Optional Linear workflow state ID.'),
|
|
361
|
-
parentId: zod_1.z.string().min(1).optional().describe('Optional parent Linear issue ID.'),
|
|
362
|
-
})
|
|
363
|
-
.strict(),
|
|
364
|
-
});
|
|
365
|
-
const nullableLinearIdSchema = zod_1.z.string().min(1).nullable();
|
|
366
|
-
const updateIssueActionInputSchema = zod_1.z.object({
|
|
367
|
-
action: zod_1.z.literal('update_issue'),
|
|
368
|
-
input: zod_1.z
|
|
369
|
-
.object({
|
|
370
|
-
issueId: zod_1.z.string().min(1).describe('Linear issue UUID to update.'),
|
|
371
|
-
teamId: nullableLinearIdSchema
|
|
372
|
-
.optional()
|
|
373
|
-
.describe('Optional Linear team UUID. Pass null to clear when Linear allows it.'),
|
|
374
|
-
title: zod_1.z.string().min(1).optional().describe('Optional updated Linear issue title.'),
|
|
375
|
-
description: zod_1.z
|
|
376
|
-
.string()
|
|
377
|
-
.min(1)
|
|
378
|
-
.nullable()
|
|
379
|
-
.optional()
|
|
380
|
-
.describe('Optional updated Linear issue description. Pass null to clear.'),
|
|
381
|
-
assigneeId: nullableLinearIdSchema
|
|
382
|
-
.optional()
|
|
383
|
-
.describe('Optional Linear assignee user ID. Pass null to unassign.'),
|
|
384
|
-
projectId: nullableLinearIdSchema
|
|
385
|
-
.optional()
|
|
386
|
-
.describe('Optional Linear project ID. Pass null to remove the project.'),
|
|
387
|
-
labelIds: zod_1.z
|
|
388
|
-
.array(zod_1.z.string().min(1))
|
|
389
|
-
.optional()
|
|
390
|
-
.describe('Optional complete set of Linear label IDs. Pass [] to clear labels.'),
|
|
391
|
-
priority: zod_1.z
|
|
392
|
-
.number()
|
|
393
|
-
.int()
|
|
394
|
-
.nullable()
|
|
395
|
-
.optional()
|
|
396
|
-
.describe('Optional Linear priority value. Pass null to clear.'),
|
|
397
|
-
stateId: nullableLinearIdSchema.optional().describe('Optional Linear workflow state ID.'),
|
|
398
|
-
parentId: nullableLinearIdSchema
|
|
399
|
-
.optional()
|
|
400
|
-
.describe('Optional parent Linear issue ID. Pass null to clear.'),
|
|
401
|
-
})
|
|
402
|
-
.strict()
|
|
403
|
-
.refine(integration_helpers_1.hasUpdateIssueField, {
|
|
404
|
-
message: 'Provide at least one issue field to update.',
|
|
405
|
-
}),
|
|
406
|
-
});
|
|
407
|
-
const createCommentActionInputSchema = zod_1.z.object({
|
|
408
|
-
action: zod_1.z.literal('create_comment'),
|
|
409
|
-
input: zod_1.z
|
|
410
|
-
.object({
|
|
411
|
-
issueId: zod_1.z.string().min(1).describe('Linear issue UUID where the comment should be added.'),
|
|
412
|
-
body: zod_1.z.string().min(1).describe('Linear comment body.'),
|
|
413
|
-
parentCommentId: zod_1.z
|
|
414
|
-
.string()
|
|
415
|
-
.min(1)
|
|
416
|
-
.optional()
|
|
417
|
-
.describe('Optional parent Linear comment ID for threaded replies.'),
|
|
418
|
-
})
|
|
419
|
-
.strict(),
|
|
420
|
-
});
|
|
421
|
-
const ACTION_INPUT_SCHEMAS = {
|
|
422
|
-
respond: respondActionInputSchema,
|
|
423
|
-
send_dm: sendDmActionInputSchema,
|
|
424
|
-
send_channel_message: sendChannelMessageActionInputSchema,
|
|
425
|
-
add_reaction: addReactionActionInputSchema,
|
|
426
|
-
create_issue: createIssueActionInputSchema,
|
|
427
|
-
update_issue: updateIssueActionInputSchema,
|
|
428
|
-
create_comment: createCommentActionInputSchema,
|
|
429
|
-
};
|
|
430
|
-
function buildActionInputSchema(actions) {
|
|
431
|
-
const actionSchema = zod_1.z.enum(toZodEnumValues(actions));
|
|
432
|
-
const operationSchema = zod_1.z
|
|
433
|
-
.object({
|
|
434
|
-
action: actionSchema,
|
|
435
|
-
input: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
436
|
-
})
|
|
437
|
-
.strict();
|
|
438
|
-
return zod_1.z
|
|
439
|
-
.object({
|
|
440
|
-
action: actionSchema.optional(),
|
|
441
|
-
input: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
442
|
-
actions: zod_1.z.array(operationSchema).min(1).max(MAX_BATCH_OPERATIONS).optional(),
|
|
443
|
-
})
|
|
444
|
-
.strict()
|
|
445
|
-
.superRefine((input, ctx) => {
|
|
446
|
-
if (input.actions !== undefined) {
|
|
447
|
-
if (input.action !== undefined || input.input !== undefined) {
|
|
448
|
-
ctx.addIssue({
|
|
449
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
450
|
-
message: 'Provide either action/input or actions, not both.',
|
|
451
|
-
});
|
|
452
|
-
}
|
|
453
|
-
input.actions.forEach((operation, index) => {
|
|
454
|
-
validateActionOperationSchema(operation, ctx, ['actions', index]);
|
|
455
|
-
});
|
|
456
|
-
return;
|
|
457
|
-
}
|
|
458
|
-
if (input.action === undefined || input.input === undefined) {
|
|
459
|
-
ctx.addIssue({
|
|
460
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
461
|
-
message: 'Provide action and input, or provide actions for a batch.',
|
|
462
|
-
});
|
|
463
|
-
return;
|
|
464
|
-
}
|
|
465
|
-
validateActionOperationSchema({ action: input.action, input: input.input }, ctx);
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
const CONTEXT_QUERY_DESCRIPTIONS = {
|
|
469
|
-
get_current_message_context: 'get_current_message_context: no input. Returns the latest place this agent communicated in this thread. For Slack, context.agentUserId is the bot user ID for this agent; do not look it up as another user.',
|
|
470
|
-
get_current_subject: 'get_current_subject: no input. Returns the subject of the latest message context, such as a Linear issue, when available.',
|
|
471
|
-
get_current_user: 'get_current_user: no input. Returns the latest user who interacted in the current message context.',
|
|
472
|
-
get_current_channel_info: 'get_current_channel_info: no input. Returns metadata for the latest channel in the current message context.',
|
|
473
|
-
get_user: 'get_user: input.userId is required. Use a platform user ID such as a Slack U... ID or Linear user UUID, not a name, handle, or email.',
|
|
474
|
-
get_channel_info: 'get_channel_info: input.channelId is required. Use a platform channel ID such as a Slack C... ID, not a channel name.',
|
|
475
|
-
search_users: 'search_users: input.query or input.email is required. Returns matching platform user IDs for names, handles, or emails. When the response includes nextCursor, pass it back as input.cursor to fetch the next page.',
|
|
476
|
-
search_channels: 'search_channels: input.query is required. Returns matching platform channel IDs for channel names or IDs. When the response includes nextCursor, pass it back as input.cursor to fetch the next page.',
|
|
477
|
-
get_team: 'get_team: input.teamId is required. For Linear, returns team metadata including the team UUID/key/name.',
|
|
478
|
-
search_teams: 'search_teams: optional input.query. For Linear, returns team UUIDs/keys/names. Omit query to list teams. When the response includes nextCursor, pass it back as input.cursor to fetch the next page.',
|
|
479
|
-
get_project: 'get_project: input.projectId is required. For Linear, returns project metadata.',
|
|
480
|
-
search_projects: 'search_projects: optional input.query. For Linear, returns project IDs/names; optional input.teamId scopes results to a team. Omit query to list projects. When the response includes nextCursor, pass it back as input.cursor to fetch the next page.',
|
|
481
|
-
search_labels: 'search_labels: optional input.query. For Linear, returns label IDs/names; optional input.teamId scopes results to a team. Omit query to list labels. When the response includes nextCursor, pass it back as input.cursor to fetch the next page.',
|
|
482
|
-
search_issue_states: 'search_issue_states: optional input.query. For Linear, returns workflow state IDs/names/types; optional input.teamId and input.type narrow results. Omit query to list states. When the response includes nextCursor, pass it back as input.cursor to fetch the next page.',
|
|
483
|
-
get_issue: 'get_issue: input.issueId is required. For Linear, use an issue UUID or identifier such as ENG-123. Optional input.includeComments and input.commentsLimit add recent comments.',
|
|
484
|
-
search_issues: 'search_issues: input.query is required. For Linear, returns matching issue IDs/identifiers; optional input.teamId, input.limit, and input.includeArchived narrow results. When the response includes nextCursor, pass it back as input.cursor to fetch the next page.',
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
485
15
|
};
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
send_channel_message: 'send_channel_message: input.channelId and input.message are required. channelId must be a platform channel ID, not a channel name.',
|
|
490
|
-
add_reaction: 'add_reaction: input.emoji is required. For Slack, optional input.threadId and input.messageId target a specific message; otherwise the latest message context is used.',
|
|
491
|
-
create_issue: 'create_issue: input.teamId and input.title are required. For Linear, optional input.description, input.assigneeId, input.projectId, input.labelIds, input.priority, input.stateId, and input.parentId configure the issue.',
|
|
492
|
-
update_issue: 'update_issue: input.issueId and at least one field are required. For Linear, optional input.title, input.description, input.teamId, input.assigneeId, input.projectId, input.labelIds, input.priority, input.stateId, and input.parentId update the issue. Some fields accept null to clear them.',
|
|
493
|
-
create_comment: 'create_comment: input.issueId and input.body are required. For Linear, optional input.parentCommentId creates a threaded reply.',
|
|
494
|
-
};
|
|
495
|
-
const actionSuspendSchema = zod_1.z.object({
|
|
496
|
-
type: zod_1.z.literal('integration_action'),
|
|
497
|
-
action: zod_1.z.string(),
|
|
498
|
-
integrationConnectionId: zod_1.z.string(),
|
|
499
|
-
messageContext: zod_1.z.unknown(),
|
|
500
|
-
});
|
|
501
|
-
const actionResumeSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
|
|
502
|
-
function getIntegrationToolConnectionDescriptors(integrations, agentId, capabilitiesFor) {
|
|
503
|
-
const sorted = [...integrations].sort((a, b) => {
|
|
504
|
-
const byType = a.type.localeCompare(b.type);
|
|
505
|
-
if (byType !== 0)
|
|
506
|
-
return byType;
|
|
507
|
-
return a.credentialId.localeCompare(b.credentialId);
|
|
508
|
-
});
|
|
509
|
-
const seenByType = new Map();
|
|
510
|
-
return sorted.map((integration) => {
|
|
511
|
-
const seenCount = seenByType.get(integration.type) ?? 0;
|
|
512
|
-
const nextCount = seenCount + 1;
|
|
513
|
-
seenByType.set(integration.type, nextCount);
|
|
514
|
-
const suffix = nextCount === 1 ? '' : `_${nextCount}`;
|
|
515
|
-
const baseName = `${integration.type}${suffix}`;
|
|
516
|
-
const capabilities = capabilitiesFor?.(integration);
|
|
517
|
-
return {
|
|
518
|
-
agentId,
|
|
519
|
-
integration,
|
|
520
|
-
integrationConnectionId: buildIntegrationConnectionId(integration),
|
|
521
|
-
contextToolName: `${baseName}_context`,
|
|
522
|
-
actionToolName: `${baseName}_action`,
|
|
523
|
-
contextQueries: capabilities?.contextQueries ?? exports.DEFAULT_INTEGRATION_CONTEXT_QUERIES,
|
|
524
|
-
actions: capabilities?.actions ?? exports.DEFAULT_INTEGRATION_ACTIONS,
|
|
525
|
-
};
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
function buildIntegrationConnectionId(integration) {
|
|
529
|
-
return integration.credentialId === undefined
|
|
530
|
-
? integration.type
|
|
531
|
-
: `${integration.type}:${integration.credentialId}`;
|
|
532
|
-
}
|
|
533
|
-
function createIntegrationContextTool(params) {
|
|
534
|
-
const { descriptor, messageContextStore, queryExecutor } = params;
|
|
535
|
-
return new agents_1.Tool(descriptor.contextToolName)
|
|
536
|
-
.description(buildContextToolDescription(descriptor))
|
|
537
|
-
.input(buildContextInputSchema(descriptor.contextQueries))
|
|
538
|
-
.handler(async (input, ctx) => {
|
|
539
|
-
const toolInput = input;
|
|
540
|
-
if (toolInput.queries !== undefined) {
|
|
541
|
-
const results = await Promise.all(toolInput.queries.map(async (operation) => ({
|
|
542
|
-
query: operation.query,
|
|
543
|
-
result: await executeContextToolOperation({
|
|
544
|
-
operation,
|
|
545
|
-
descriptor,
|
|
546
|
-
messageContextStore,
|
|
547
|
-
queryExecutor,
|
|
548
|
-
persistence: ctx.persistence,
|
|
549
|
-
}),
|
|
550
|
-
})));
|
|
551
|
-
return { ok: true, results };
|
|
552
|
-
}
|
|
553
|
-
return await executeContextToolOperation({
|
|
554
|
-
operation: toSingleContextOperation(toolInput),
|
|
555
|
-
descriptor,
|
|
556
|
-
messageContextStore,
|
|
557
|
-
queryExecutor,
|
|
558
|
-
persistence: ctx.persistence,
|
|
559
|
-
});
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
function createIntegrationActionTool(params) {
|
|
563
|
-
const { descriptor, messageContextStore, actionExecutor } = params;
|
|
564
|
-
return new agents_1.Tool(descriptor.actionToolName)
|
|
565
|
-
.description(buildActionToolDescription(descriptor))
|
|
566
|
-
.input(buildActionInputSchema(descriptor.actions))
|
|
567
|
-
.suspend(actionSuspendSchema)
|
|
568
|
-
.resume(actionResumeSchema)
|
|
569
|
-
.handler(async (input, ctx) => {
|
|
570
|
-
if (ctx.resumeData) {
|
|
571
|
-
return ctx.resumeData;
|
|
572
|
-
}
|
|
573
|
-
const interruptCtx = ctx;
|
|
574
|
-
const toolInput = input;
|
|
575
|
-
if (toolInput.actions !== undefined) {
|
|
576
|
-
return await executeActionToolBatch({
|
|
577
|
-
operations: toolInput.actions,
|
|
578
|
-
descriptor,
|
|
579
|
-
messageContextStore,
|
|
580
|
-
actionExecutor,
|
|
581
|
-
ctx,
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
return await executeActionToolOperation({
|
|
585
|
-
operation: toSingleActionOperation(toolInput),
|
|
586
|
-
descriptor,
|
|
587
|
-
messageContextStore,
|
|
588
|
-
actionExecutor,
|
|
589
|
-
ctx,
|
|
590
|
-
interruptCtx,
|
|
591
|
-
allowSuspend: true,
|
|
592
|
-
});
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
function buildContextToolDescription(descriptor) {
|
|
596
|
-
return [
|
|
597
|
-
`Read context from the ${descriptor.integration.type} integration connection.`,
|
|
598
|
-
`Available queries: ${descriptor.contextQueries.join(', ')}.`,
|
|
599
|
-
'Query inputs:',
|
|
600
|
-
...descriptor.contextQueries.map((query) => `- ${CONTEXT_QUERY_DESCRIPTIONS[query]}`),
|
|
601
|
-
`Batch form: pass queries as an array of up to ${MAX_BATCH_OPERATIONS} { query, input } objects to fetch multiple pieces of context in one tool call.`,
|
|
602
|
-
'Use this tool for read-only lookup before choosing an action target.',
|
|
603
|
-
].join('\n\n');
|
|
604
|
-
}
|
|
605
|
-
function buildActionToolDescription(descriptor) {
|
|
606
|
-
const n8nChatGuidance = descriptor.integration.type === api_types_1.N8N_CHAT_INTEGRATION_TYPE
|
|
607
|
-
? [
|
|
608
|
-
'This is the built-in n8n chat: your normal assistant reply already reaches the user. NEVER call respond with only message.text — write that text directly in your reply instead. Call this tool only with message.card, to render a rich card or collect structured input.',
|
|
609
|
-
]
|
|
610
|
-
: [];
|
|
611
|
-
return [
|
|
612
|
-
`Take actions in the ${descriptor.integration.type} integration connection.`,
|
|
613
|
-
`Available actions: ${descriptor.actions.join(', ')}.`,
|
|
614
|
-
...n8nChatGuidance,
|
|
615
|
-
'Action inputs:',
|
|
616
|
-
...descriptor.actions.map((action) => `- ${ACTION_DESCRIPTIONS[action]}`),
|
|
617
|
-
`Batch form: pass actions as an array of up to ${MAX_BATCH_OPERATIONS} { action, input } objects. Batch actions run sequentially and cannot include cards that wait for a user response.`,
|
|
618
|
-
'respond uses the latest message context for this integration connection.',
|
|
619
|
-
'Use message.card for cards, images, key-value summaries, and feedback requests. Include components such as section, fields, image, divider, button, select, or radio_select.',
|
|
620
|
-
'For fields components, use { type: "fields", fields: [{ label: "Account", value: "Acme" }] }. The key items is also accepted as a fields alias.',
|
|
621
|
-
'For button components, use { type: "button", label: "Approve", value: "approve" }. If label is omitted, text is used as the button label.',
|
|
622
|
-
'For radio-style choices, use { type: "radio_select", label: "Next step", options: [{ label: "Approve", value: "approve" }] }.',
|
|
623
|
-
'Use only the generic shape: message.text plus optional message.card. Do not provide platform-native component payloads, formatted text objects, or attachments; rendering is handled internally.',
|
|
624
|
-
...buildGenericCardGuidance(),
|
|
625
|
-
'Interactive message.card components (button, select, or radio_select) send the message first, then suspend this action until the user responds.',
|
|
626
|
-
'Display-only message.card components without buttons/selects render the card and let the agent continue immediately.',
|
|
627
|
-
].join('\n\n');
|
|
628
|
-
}
|
|
629
|
-
function buildGenericCardGuidance() {
|
|
630
|
-
return [
|
|
631
|
-
'Generic card examples:',
|
|
632
|
-
[
|
|
633
|
-
'Radio choice card:',
|
|
634
|
-
'```json',
|
|
635
|
-
JSON.stringify({
|
|
636
|
-
action: 'respond',
|
|
637
|
-
input: {
|
|
638
|
-
message: {
|
|
639
|
-
text: 'Acme Executive Briefing — Next Steps',
|
|
640
|
-
card: {
|
|
641
|
-
title: 'Acme Corporation — Executive Briefing Next Steps',
|
|
642
|
-
components: [
|
|
643
|
-
{
|
|
644
|
-
type: 'section',
|
|
645
|
-
text: '30X Expansion Briefing ($3.75M) — Internal owner: Paul G | Briefing contact: Mike D\n\nWhat should happen next?',
|
|
646
|
-
},
|
|
647
|
-
{ type: 'divider' },
|
|
648
|
-
{
|
|
649
|
-
type: 'radio_select',
|
|
650
|
-
id: 'next_step_selection',
|
|
651
|
-
label: 'Next step',
|
|
652
|
-
options: [
|
|
653
|
-
{
|
|
654
|
-
label: 'Schedule exec briefing prep call with Paul G',
|
|
655
|
-
value: 'schedule_prep_call',
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
label: 'Draft briefing agenda doc for Mike D',
|
|
659
|
-
value: 'draft_briefing_doc',
|
|
660
|
-
},
|
|
661
|
-
],
|
|
662
|
-
},
|
|
663
|
-
],
|
|
664
|
-
},
|
|
665
|
-
},
|
|
666
|
-
},
|
|
667
|
-
}, null, 2),
|
|
668
|
-
'```',
|
|
669
|
-
].join('\n'),
|
|
670
|
-
[
|
|
671
|
-
'Button card:',
|
|
672
|
-
'```json',
|
|
673
|
-
JSON.stringify({
|
|
674
|
-
action: 'respond',
|
|
675
|
-
input: {
|
|
676
|
-
message: {
|
|
677
|
-
text: 'Approve or revise the briefing draft',
|
|
678
|
-
card: {
|
|
679
|
-
components: [
|
|
680
|
-
{ type: 'section', text: 'Review the briefing draft.' },
|
|
681
|
-
{ type: 'button', label: 'Approve', value: 'approve', style: 'primary' },
|
|
682
|
-
{ type: 'button', label: 'Revise', value: 'revise', style: 'default' },
|
|
683
|
-
],
|
|
684
|
-
},
|
|
685
|
-
},
|
|
686
|
-
},
|
|
687
|
-
}, null, 2),
|
|
688
|
-
'```',
|
|
689
|
-
].join('\n'),
|
|
690
|
-
'Never send message.blocks, components of type actions, elements arrays, action_id, radio_buttons, or formatted text objects such as { type: "plain_text", text: "..." } or { type: "mrkdwn", text: "..." }.',
|
|
691
|
-
];
|
|
692
|
-
}
|
|
693
|
-
function toSingleContextOperation(input) {
|
|
694
|
-
if (input.query === undefined || input.input === undefined) {
|
|
695
|
-
throw new Error('Integration context tool input was not validated.');
|
|
696
|
-
}
|
|
697
|
-
return { query: input.query, input: input.input };
|
|
698
|
-
}
|
|
699
|
-
function toSingleActionOperation(input) {
|
|
700
|
-
if (input.action === undefined || input.input === undefined) {
|
|
701
|
-
throw new Error('Integration action tool input was not validated.');
|
|
702
|
-
}
|
|
703
|
-
return { action: input.action, input: input.input };
|
|
704
|
-
}
|
|
705
|
-
function validateContextOperationSchema(operation, ctx, pathPrefix = []) {
|
|
706
|
-
const operationSchema = CONTEXT_QUERY_INPUT_SCHEMAS[operation.query];
|
|
707
|
-
const result = operationSchema.safeParse(operation);
|
|
708
|
-
if (!result.success)
|
|
709
|
-
addSchemaIssues(ctx, result.error, pathPrefix);
|
|
710
|
-
}
|
|
711
|
-
function validateActionOperationSchema(operation, ctx, pathPrefix = []) {
|
|
712
|
-
const operationSchema = ACTION_INPUT_SCHEMAS[operation.action];
|
|
713
|
-
const result = operationSchema.safeParse(operation);
|
|
714
|
-
if (!result.success)
|
|
715
|
-
addSchemaIssues(ctx, result.error, pathPrefix);
|
|
716
|
-
}
|
|
717
|
-
async function executeContextToolOperation(params) {
|
|
718
|
-
const { operation, descriptor, messageContextStore, queryExecutor, persistence } = params;
|
|
719
|
-
if (isCurrentContextQuery(operation.query)) {
|
|
720
|
-
if (!persistence) {
|
|
721
|
-
return {
|
|
722
|
-
ok: false,
|
|
723
|
-
error: {
|
|
724
|
-
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_THREAD_CONTEXT,
|
|
725
|
-
message: 'There is no current agent thread context.',
|
|
726
|
-
},
|
|
727
|
-
};
|
|
728
|
-
}
|
|
729
|
-
const context = await messageContextStore.getLatest(persistence.threadId);
|
|
730
|
-
if (!context || context.integrationConnectionId !== descriptor.integrationConnectionId) {
|
|
731
|
-
if (operation.query === 'get_current_message_context') {
|
|
732
|
-
return { ok: true, context: null };
|
|
733
|
-
}
|
|
734
|
-
if (operation.query === 'get_current_subject') {
|
|
735
|
-
return { ok: true, subject: null };
|
|
736
|
-
}
|
|
737
|
-
return {
|
|
738
|
-
ok: false,
|
|
739
|
-
error: {
|
|
740
|
-
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_MESSAGE_CONTEXT,
|
|
741
|
-
message: 'There is no current message context for this integration connection.',
|
|
742
|
-
},
|
|
743
|
-
};
|
|
744
|
-
}
|
|
745
|
-
if (operation.query === 'get_current_message_context') {
|
|
746
|
-
return { ok: true, context };
|
|
747
|
-
}
|
|
748
|
-
if (operation.query === 'get_current_subject') {
|
|
749
|
-
return { ok: true, subject: context.subject ?? null };
|
|
750
|
-
}
|
|
751
|
-
if (operation.query === 'get_current_user') {
|
|
752
|
-
if (!context.interactingUserId) {
|
|
753
|
-
return {
|
|
754
|
-
ok: false,
|
|
755
|
-
error: {
|
|
756
|
-
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_INTERACTING_USER_CONTEXT,
|
|
757
|
-
message: 'The latest message context does not include an interacting user ID.',
|
|
758
|
-
},
|
|
759
|
-
};
|
|
760
|
-
}
|
|
761
|
-
return await queryExecutor.execute({
|
|
762
|
-
descriptor,
|
|
763
|
-
query: 'get_user',
|
|
764
|
-
input: { userId: context.interactingUserId },
|
|
765
|
-
persistence,
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
const channelId = getTargetChannelId(context.target);
|
|
769
|
-
if (!channelId) {
|
|
770
|
-
return {
|
|
771
|
-
ok: false,
|
|
772
|
-
error: {
|
|
773
|
-
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_CHANNEL_CONTEXT,
|
|
774
|
-
message: 'The latest message context does not include a channel ID.',
|
|
775
|
-
},
|
|
776
|
-
};
|
|
777
|
-
}
|
|
778
|
-
return await queryExecutor.execute({
|
|
779
|
-
descriptor,
|
|
780
|
-
query: 'get_channel_info',
|
|
781
|
-
input: { channelId },
|
|
782
|
-
persistence,
|
|
783
|
-
});
|
|
784
|
-
}
|
|
785
|
-
return await queryExecutor.execute({
|
|
786
|
-
descriptor,
|
|
787
|
-
query: operation.query,
|
|
788
|
-
input: operation.input,
|
|
789
|
-
persistence,
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
function isCurrentContextQuery(query) {
|
|
793
|
-
return (query === 'get_current_message_context' ||
|
|
794
|
-
query === 'get_current_subject' ||
|
|
795
|
-
query === 'get_current_user' ||
|
|
796
|
-
query === 'get_current_channel_info');
|
|
797
|
-
}
|
|
798
|
-
async function executeActionToolBatch(params) {
|
|
799
|
-
const { operations, descriptor, messageContextStore, actionExecutor, ctx } = params;
|
|
800
|
-
let currentMessageContext = ctx.persistence !== undefined
|
|
801
|
-
? await getOptionalCurrentContext({
|
|
802
|
-
descriptor,
|
|
803
|
-
messageContextStore,
|
|
804
|
-
threadId: ctx.persistence.threadId,
|
|
805
|
-
})
|
|
806
|
-
: undefined;
|
|
807
|
-
const results = [];
|
|
808
|
-
for (const operation of operations) {
|
|
809
|
-
const result = await executeActionToolOperation({
|
|
810
|
-
operation,
|
|
811
|
-
descriptor,
|
|
812
|
-
messageContextStore,
|
|
813
|
-
actionExecutor,
|
|
814
|
-
ctx,
|
|
815
|
-
currentMessageContext,
|
|
816
|
-
allowSuspend: false,
|
|
817
|
-
});
|
|
818
|
-
const nextMessageContext = extractSuccessfulMessageContext(result);
|
|
819
|
-
if (nextMessageContext)
|
|
820
|
-
currentMessageContext = nextMessageContext;
|
|
821
|
-
results.push({ action: operation.action, result });
|
|
822
|
-
}
|
|
823
|
-
return { ok: true, results };
|
|
824
|
-
}
|
|
825
|
-
async function executeActionToolOperation(params) {
|
|
826
|
-
const { operation, descriptor, messageContextStore, actionExecutor, ctx, interruptCtx, allowSuspend, } = params;
|
|
827
|
-
const persistence = ctx.persistence;
|
|
828
|
-
const message = parseMessage(operation.input.message);
|
|
829
|
-
const actionInput = message === undefined ? operation.input : { ...operation.input, message };
|
|
830
|
-
const awaitsResponse = shouldAwaitResponse(message);
|
|
831
|
-
if (awaitsResponse && !allowSuspend) {
|
|
832
|
-
return {
|
|
833
|
-
ok: false,
|
|
834
|
-
error: {
|
|
835
|
-
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.ACTION_FAILED,
|
|
836
|
-
message: 'Batch actions cannot include cards that wait for a user response. Send that action separately.',
|
|
837
|
-
},
|
|
838
|
-
};
|
|
839
|
-
}
|
|
840
|
-
let currentMessageContext = params.currentMessageContext;
|
|
841
|
-
if (operation.action === 'respond') {
|
|
842
|
-
if (!currentMessageContext) {
|
|
843
|
-
const contextResult = await getRespondContext({
|
|
844
|
-
descriptor,
|
|
845
|
-
messageContextStore,
|
|
846
|
-
persistence,
|
|
847
|
-
});
|
|
848
|
-
if (!contextResult.ok) {
|
|
849
|
-
return contextResult;
|
|
850
|
-
}
|
|
851
|
-
currentMessageContext = contextResult.context;
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
else if (!currentMessageContext && persistence) {
|
|
855
|
-
currentMessageContext = await getOptionalCurrentContext({
|
|
856
|
-
descriptor,
|
|
857
|
-
messageContextStore,
|
|
858
|
-
threadId: persistence.threadId,
|
|
859
|
-
});
|
|
860
|
-
}
|
|
861
|
-
const result = await actionExecutor.execute({
|
|
862
|
-
descriptor,
|
|
863
|
-
action: operation.action,
|
|
864
|
-
input: actionInput,
|
|
865
|
-
awaitResponse: awaitsResponse,
|
|
866
|
-
runId: ctx.runId,
|
|
867
|
-
toolCallId: ctx.toolCallId,
|
|
868
|
-
currentMessageContext,
|
|
869
|
-
});
|
|
870
|
-
if (!result.ok)
|
|
871
|
-
return result;
|
|
872
|
-
let actionResult = result;
|
|
873
|
-
if (result.messageContext && persistence) {
|
|
874
|
-
const messageContext = withPreviousSubject(result.messageContext, currentMessageContext);
|
|
875
|
-
await messageContextStore.setLatest(persistence.threadId, persistence.resourceId, messageContext);
|
|
876
|
-
actionResult = { ...result, messageContext };
|
|
877
|
-
}
|
|
878
|
-
if (!awaitsResponse)
|
|
879
|
-
return actionResult;
|
|
880
|
-
return await interruptCtx?.suspend({
|
|
881
|
-
type: 'integration_action',
|
|
882
|
-
action: operation.action,
|
|
883
|
-
integrationConnectionId: descriptor.integrationConnectionId,
|
|
884
|
-
messageContext: actionResult.messageContext,
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
function addSchemaIssues(ctx, error, pathPrefix = []) {
|
|
888
|
-
for (const issue of error.issues) {
|
|
889
|
-
ctx.addIssue({
|
|
890
|
-
code: zod_1.z.ZodIssueCode.custom,
|
|
891
|
-
path: [...pathPrefix, ...issue.path],
|
|
892
|
-
message: issue.message,
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
function toZodEnumValues(values) {
|
|
897
|
-
if (values.length === 0) {
|
|
898
|
-
throw new Error('Integration tools require at least one operation.');
|
|
899
|
-
}
|
|
900
|
-
return values;
|
|
901
|
-
}
|
|
902
|
-
function parseMessage(value) {
|
|
903
|
-
const result = messageSchema.safeParse(value);
|
|
904
|
-
return result.success ? result.data : undefined;
|
|
905
|
-
}
|
|
906
|
-
function shouldAwaitResponse(message) {
|
|
907
|
-
const card = message?.card;
|
|
908
|
-
if (card?.awaitResponse === true)
|
|
909
|
-
return true;
|
|
910
|
-
return card?.components.some(isInteractiveCardComponent) ?? false;
|
|
911
|
-
}
|
|
912
|
-
function isInteractiveCardComponent(component) {
|
|
913
|
-
switch (component.type) {
|
|
914
|
-
case 'button':
|
|
915
|
-
case 'select':
|
|
916
|
-
case 'radio_select':
|
|
917
|
-
return true;
|
|
918
|
-
case 'section':
|
|
919
|
-
return component.button !== undefined;
|
|
920
|
-
default:
|
|
921
|
-
return false;
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
function withPreviousSubject(context, previousContext) {
|
|
925
|
-
if (!previousContext)
|
|
926
|
-
return context;
|
|
927
|
-
if (context.integrationConnectionId !== previousContext.integrationConnectionId)
|
|
928
|
-
return context;
|
|
929
|
-
return {
|
|
930
|
-
...context,
|
|
931
|
-
...(!context.subject && previousContext.subject ? { subject: previousContext.subject } : {}),
|
|
932
|
-
...(!context.agentUserId && previousContext.agentUserId
|
|
933
|
-
? { agentUserId: previousContext.agentUserId }
|
|
934
|
-
: {}),
|
|
935
|
-
};
|
|
936
|
-
}
|
|
937
|
-
function extractSuccessfulMessageContext(result) {
|
|
938
|
-
if (!(0, utils_1.isRecord)(result) || result.ok !== true)
|
|
939
|
-
return undefined;
|
|
940
|
-
const messageContext = result.messageContext;
|
|
941
|
-
return isIntegrationMessageContext(messageContext) ? messageContext : undefined;
|
|
942
|
-
}
|
|
943
|
-
function isIntegrationMessageContext(value) {
|
|
944
|
-
return ((0, utils_1.isRecord)(value) &&
|
|
945
|
-
typeof value.integrationConnectionId === 'string' &&
|
|
946
|
-
typeof value.platform === 'string' &&
|
|
947
|
-
(0, utils_1.isRecord)(value.target) &&
|
|
948
|
-
(value.agentUserId === undefined || typeof value.agentUserId === 'string') &&
|
|
949
|
-
typeof value.updatedAt === 'string');
|
|
950
|
-
}
|
|
951
|
-
async function getOptionalCurrentContext(params) {
|
|
952
|
-
try {
|
|
953
|
-
const context = await params.messageContextStore.getLatest(params.threadId);
|
|
954
|
-
if (context?.integrationConnectionId !== params.descriptor.integrationConnectionId) {
|
|
955
|
-
return undefined;
|
|
956
|
-
}
|
|
957
|
-
return context;
|
|
958
|
-
}
|
|
959
|
-
catch {
|
|
960
|
-
return undefined;
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
async function getRespondContext(params) {
|
|
964
|
-
const { descriptor, messageContextStore, persistence } = params;
|
|
965
|
-
if (!persistence) {
|
|
966
|
-
return {
|
|
967
|
-
ok: false,
|
|
968
|
-
error: {
|
|
969
|
-
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_MESSAGE_CONTEXT,
|
|
970
|
-
message: 'There is no current message context. Use an explicit send action.',
|
|
971
|
-
},
|
|
972
|
-
};
|
|
973
|
-
}
|
|
974
|
-
const context = await messageContextStore.getLatest(persistence.threadId);
|
|
975
|
-
if (!context) {
|
|
976
|
-
return {
|
|
977
|
-
ok: false,
|
|
978
|
-
error: {
|
|
979
|
-
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_MESSAGE_CONTEXT,
|
|
980
|
-
message: 'There is no current message context. Use an explicit send action.',
|
|
981
|
-
},
|
|
982
|
-
};
|
|
983
|
-
}
|
|
984
|
-
if (context.integrationConnectionId !== descriptor.integrationConnectionId) {
|
|
985
|
-
return {
|
|
986
|
-
ok: false,
|
|
987
|
-
error: {
|
|
988
|
-
code: integration_error_codes_1.INTEGRATION_ERROR_CODES.NO_MESSAGE_CONTEXT_FOR_INTEGRATION,
|
|
989
|
-
message: 'The latest message context belongs to another integration connection.',
|
|
990
|
-
},
|
|
991
|
-
};
|
|
992
|
-
}
|
|
993
|
-
return { ok: true, context };
|
|
994
|
-
}
|
|
995
|
-
function getTargetChannelId(target) {
|
|
996
|
-
if (target.type === 'thread' || target.type === 'channel') {
|
|
997
|
-
return target.channelId;
|
|
998
|
-
}
|
|
999
|
-
return undefined;
|
|
1000
|
-
}
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./integration-tool-definitions"), exports);
|
|
18
|
+
__exportStar(require("./integration-tool-factory"), exports);
|
|
1001
19
|
//# sourceMappingURL=integration-tools.js.map
|