n8n 2.20.6 → 2.21.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.d.ts +1 -0
- package/dist/abstract-server.js +10 -3
- package/dist/abstract-server.js.map +1 -1
- package/dist/agent-library-bundle.js +5989 -0
- package/dist/auth/auth.service.js +3 -3
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/execute-batch.d.ts +2 -2
- package/dist/commands/export/workflow.d.ts +2 -2
- package/dist/commands/import/workflow.d.ts +3 -0
- package/dist/commands/import/workflow.js +15 -1
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.js +2 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +6 -1
- package/dist/constants.js.map +1 -1
- package/dist/controller.registry.js +6 -0
- package/dist/controller.registry.js.map +1 -1
- package/dist/controllers/auth.controller.js +7 -2
- package/dist/controllers/auth.controller.js.map +1 -1
- package/dist/controllers/me.controller.d.ts +1 -0
- package/dist/controllers/me.controller.js +4 -1
- package/dist/controllers/me.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +2 -2
- package/dist/credentials/credentials.service.d.ts +1 -0
- package/dist/credentials/credentials.service.js +11 -4
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/evaluation.ee/evaluation-api-error.d.ts +7 -0
- package/dist/evaluation.ee/evaluation-api-error.js +16 -0
- package/dist/evaluation.ee/evaluation-api-error.js.map +1 -0
- package/dist/evaluation.ee/evaluation-config-validator.d.ts +30 -0
- package/dist/evaluation.ee/evaluation-config-validator.js +236 -0
- package/dist/evaluation.ee/evaluation-config-validator.js.map +1 -0
- package/dist/evaluation.ee/evaluation-config.controller.d.ts +24 -0
- package/dist/evaluation.ee/evaluation-config.controller.js +94 -0
- package/dist/evaluation.ee/evaluation-config.controller.js.map +1 -0
- package/dist/evaluation.ee/evaluation-config.service.d.ts +18 -0
- package/dist/evaluation.ee/evaluation-config.service.js +74 -0
- package/dist/evaluation.ee/evaluation-config.service.js.map +1 -0
- package/dist/evaluation.ee/llm-judge-provider-registry.d.ts +13 -0
- package/dist/evaluation.ee/llm-judge-provider-registry.js +122 -0
- package/dist/evaluation.ee/llm-judge-provider-registry.js.map +1 -0
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +5 -0
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +32 -10
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.d.ts +22 -0
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js +285 -0
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js.map +1 -0
- package/dist/evaluation.ee/test-runs.controller.ee.d.ts +3 -0
- package/dist/evaluation.ee/test-runs.controller.ee.js +26 -9
- package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runs.types.ee.d.ts +3 -0
- package/dist/eventbus/message-event-bus/message-event-bus.d.ts +2 -0
- package/dist/eventbus/message-event-bus/message-event-bus.js +54 -46
- package/dist/eventbus/message-event-bus/message-event-bus.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +3 -0
- package/dist/instance-settings-loader/instance-settings-loader.service.d.ts +4 -2
- package/dist/instance-settings-loader/instance-settings-loader.service.js +7 -3
- package/dist/instance-settings-loader/instance-settings-loader.service.js.map +1 -1
- package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.d.ts +20 -0
- package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.js +235 -0
- package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.js.map +1 -0
- package/dist/instance-settings-loader/loaders/{sso.instance-settings-loader.d.ts → sso/oidc.instance-settings-loader.d.ts} +4 -10
- package/dist/instance-settings-loader/loaders/sso/oidc.instance-settings-loader.js +98 -0
- package/dist/instance-settings-loader/loaders/sso/oidc.instance-settings-loader.js.map +1 -0
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.d.ts +10 -0
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js +65 -0
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js.map +1 -0
- package/dist/instance-settings-loader/loaders/sso/saml.instance-settings-loader.d.ts +12 -0
- package/dist/instance-settings-loader/loaders/sso/saml.instance-settings-loader.js +75 -0
- package/dist/instance-settings-loader/loaders/sso/saml.instance-settings-loader.js.map +1 -0
- package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.d.ts +15 -0
- package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.js +75 -0
- package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.js.map +1 -0
- package/dist/load-nodes-and-credentials.d.ts +3 -3
- package/dist/load-nodes-and-credentials.js +25 -17
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/modules/agents/adapters/agents-credential-provider.d.ts +12 -0
- package/dist/modules/agents/adapters/agents-credential-provider.js +63 -0
- package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -0
- package/dist/modules/agents/agent-execution.service.d.ts +42 -0
- package/dist/modules/agents/agent-execution.service.js +153 -0
- package/dist/modules/agents/agent-execution.service.js.map +1 -0
- package/dist/modules/agents/agent-message-mapper.d.ts +5 -0
- package/dist/modules/agents/agent-message-mapper.js +43 -0
- package/dist/modules/agents/agent-message-mapper.js.map +1 -0
- package/dist/modules/agents/agent-skills.service.d.ts +24 -0
- package/dist/modules/agents/agent-skills.service.js +166 -0
- package/dist/modules/agents/agent-skills.service.js.map +1 -0
- package/dist/modules/agents/agent-sse-stream.d.ts +15 -0
- package/dist/modules/agents/agent-sse-stream.js +194 -0
- package/dist/modules/agents/agent-sse-stream.js.map +1 -0
- package/dist/modules/agents/agents-tools.service.d.ts +18 -0
- package/dist/modules/agents/agents-tools.service.js +193 -0
- package/dist/modules/agents/agents-tools.service.js.map +1 -0
- package/dist/modules/agents/agents.controller.d.ts +260 -0
- package/dist/modules/agents/agents.controller.js +818 -0
- package/dist/modules/agents/agents.controller.js.map +1 -0
- package/dist/modules/agents/agents.module.d.ts +12 -0
- package/dist/modules/agents/agents.module.js +136 -0
- package/dist/modules/agents/agents.module.js.map +1 -0
- package/dist/modules/agents/agents.service.d.ts +151 -0
- package/dist/modules/agents/agents.service.js +1134 -0
- package/dist/modules/agents/agents.service.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +27 -0
- package/dist/modules/agents/builder/agents-builder-prompts.js +584 -0
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-settings.controller.d.ts +11 -0
- package/dist/modules/agents/builder/agents-builder-settings.controller.js +61 -0
- package/dist/modules/agents/builder/agents-builder-settings.controller.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-settings.service.d.ts +31 -0
- package/dist/modules/agents/builder/agents-builder-settings.service.js +199 -0
- package/dist/modules/agents/builder/agents-builder-settings.service.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +31 -0
- package/dist/modules/agents/builder/agents-builder-tools.service.js +420 -0
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder.service.d.ts +26 -0
- package/dist/modules/agents/builder/agents-builder.service.js +164 -0
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -0
- package/dist/modules/agents/builder/builder-model-lookup.service.d.ts +17 -0
- package/dist/modules/agents/builder/builder-model-lookup.service.js +67 -0
- package/dist/modules/agents/builder/builder-model-lookup.service.js.map +1 -0
- package/dist/modules/agents/builder/builder-tool-names.d.ts +14 -0
- package/dist/modules/agents/builder/builder-tool-names.js +17 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -0
- package/dist/modules/agents/builder/errors.d.ts +6 -0
- package/dist/modules/agents/builder/errors.js +13 -0
- package/dist/modules/agents/builder/errors.js.map +1 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +5 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +29 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -0
- package/dist/modules/agents/builder/interactive/ask-llm.tool.d.ts +2 -0
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js +27 -0
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -0
- package/dist/modules/agents/builder/interactive/ask-question.tool.d.ts +2 -0
- package/dist/modules/agents/builder/interactive/ask-question.tool.js +26 -0
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -0
- package/dist/modules/agents/builder/interactive/index.d.ts +4 -0
- package/dist/modules/agents/builder/interactive/index.js +12 -0
- package/dist/modules/agents/builder/interactive/index.js.map +1 -0
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.d.ts +17 -0
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js +60 -0
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js.map +1 -0
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.d.ts +13 -0
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +136 -0
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -0
- package/dist/modules/agents/entities/agent-checkpoint.entity.d.ts +9 -0
- package/dist/modules/agents/entities/agent-checkpoint.entity.js +43 -0
- package/dist/modules/agents/entities/agent-checkpoint.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.d.ts +16 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js +74 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +26 -0
- package/dist/modules/agents/entities/agent-execution.entity.js +100 -0
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-message.entity.d.ts +10 -0
- package/dist/modules/agents/entities/agent-message.entity.js +47 -0
- package/dist/modules/agents/entities/agent-message.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-observation-cursor.entity.d.ts +8 -0
- package/dist/modules/agents/entities/agent-observation-cursor.entity.js +37 -0
- package/dist/modules/agents/entities/agent-observation-cursor.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-observation-lock.entity.d.ts +8 -0
- package/dist/modules/agents/entities/agent-observation-lock.entity.js +37 -0
- package/dist/modules/agents/entities/agent-observation-lock.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-observation.entity.d.ts +10 -0
- package/dist/modules/agents/entities/agent-observation.entity.js +47 -0
- package/dist/modules/agents/entities/agent-observation.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-published-version.entity.d.ts +22 -0
- package/dist/modules/agents/entities/agent-published-version.entity.js +67 -0
- package/dist/modules/agents/entities/agent-published-version.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-resource.entity.d.ts +5 -0
- package/dist/modules/agents/entities/agent-resource.entity.js +29 -0
- package/dist/modules/agents/entities/agent-resource.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-thread.entity.d.ts +6 -0
- package/dist/modules/agents/entities/agent-thread.entity.js +33 -0
- package/dist/modules/agents/entities/agent-thread.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent.entity.d.ts +24 -0
- package/dist/modules/agents/entities/agent.entity.js +74 -0
- package/dist/modules/agents/entities/agent.entity.js.map +1 -0
- package/dist/modules/agents/execution-recorder.d.ts +82 -0
- package/dist/modules/agents/execution-recorder.js +272 -0
- package/dist/modules/agents/execution-recorder.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +62 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js +540 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +39 -0
- package/dist/modules/agents/integrations/agent-chat-integration.js +45 -0
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -0
- package/dist/modules/agents/integrations/agent-schedule.service.d.ts +30 -0
- package/dist/modules/agents/integrations/agent-schedule.service.js +327 -0
- package/dist/modules/agents/integrations/agent-schedule.service.js.map +1 -0
- package/dist/modules/agents/integrations/callback-store.d.ts +11 -0
- package/dist/modules/agents/integrations/callback-store.js +30 -0
- package/dist/modules/agents/integrations/callback-store.js.map +1 -0
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +58 -0
- package/dist/modules/agents/integrations/chat-integration.service.js +397 -0
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -0
- package/dist/modules/agents/integrations/component-mapper.d.ts +57 -0
- package/dist/modules/agents/integrations/component-mapper.js +223 -0
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -0
- package/dist/modules/agents/integrations/cron-validation.d.ts +1 -0
- package/dist/modules/agents/integrations/cron-validation.js +8 -0
- package/dist/modules/agents/integrations/cron-validation.js.map +1 -0
- package/dist/modules/agents/integrations/esm-loader.d.ts +5 -0
- package/dist/modules/agents/integrations/esm-loader.js +24 -0
- package/dist/modules/agents/integrations/esm-loader.js.map +1 -0
- package/dist/modules/agents/integrations/integrations-sync.d.ts +4 -0
- package/dist/modules/agents/integrations/integrations-sync.js +78 -0
- package/dist/modules/agents/integrations/integrations-sync.js.map +1 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +36 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +148 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -0
- package/dist/modules/agents/integrations/n8n-memory.d.ts +76 -0
- package/dist/modules/agents/integrations/n8n-memory.js +383 -0
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/linear-integration.d.ts +14 -0
- package/dist/modules/agents/integrations/platforms/linear-integration.js +83 -0
- package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.d.ts +12 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.js +81 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +30 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +122 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -0
- package/dist/modules/agents/integrations/rich-interaction-tool.d.ts +47 -0
- package/dist/modules/agents/integrations/rich-interaction-tool.js +109 -0
- package/dist/modules/agents/integrations/rich-interaction-tool.js.map +1 -0
- package/dist/modules/agents/integrations/types.d.ts +8 -0
- package/dist/modules/agents/integrations/types.js +12 -0
- package/dist/modules/agents/integrations/types.js.map +1 -0
- package/dist/modules/agents/json-config/agent-config-composition.d.ts +9 -0
- package/dist/modules/agents/json-config/agent-config-composition.js +27 -0
- package/dist/modules/agents/json-config/agent-config-composition.js.map +1 -0
- package/dist/modules/agents/json-config/agent-json-config.d.ts +1022 -0
- package/dist/modules/agents/json-config/agent-json-config.js +128 -0
- package/dist/modules/agents/json-config/agent-json-config.js.map +1 -0
- package/dist/modules/agents/json-config/credential-field-mapping.d.ts +4 -0
- package/dist/modules/agents/json-config/credential-field-mapping.js +41 -0
- package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -0
- package/dist/modules/agents/json-config/from-json-config.d.ts +18 -0
- package/dist/modules/agents/json-config/from-json-config.js +209 -0
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -0
- package/dist/modules/agents/json-config/integration-config.d.ts +61 -0
- package/dist/modules/agents/json-config/integration-config.js +33 -0
- package/dist/modules/agents/json-config/integration-config.js.map +1 -0
- package/dist/modules/agents/json-config/provider-tool-aliases.d.ts +1 -0
- package/dist/modules/agents/json-config/provider-tool-aliases.js +15 -0
- package/dist/modules/agents/json-config/provider-tool-aliases.js.map +1 -0
- package/dist/modules/agents/json-config/schema-text-serializer.d.ts +2 -0
- package/dist/modules/agents/json-config/schema-text-serializer.js +205 -0
- package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -0
- package/dist/modules/agents/repositories/agent-checkpoint.repository.d.ts +6 -0
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js +35 -0
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +18 -0
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +120 -0
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +10 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js +59 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-message.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-message.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-message.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-observation-cursor.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-observation-cursor.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-observation-cursor.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-observation-lock.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-observation-lock.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-observation-lock.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-observation.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-observation.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-observation.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-published-version.repository.d.ts +20 -0
- package/dist/modules/agents/repositories/agent-published-version.repository.js +35 -0
- package/dist/modules/agents/repositories/agent-published-version.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-resource.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-resource.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-resource.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-thread.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-thread.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-thread.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent.repository.d.ts +9 -0
- package/dist/modules/agents/repositories/agent.repository.js +50 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -0
- package/dist/modules/agents/runtime/agent-isolate-pool.d.ts +48 -0
- package/dist/modules/agents/runtime/agent-isolate-pool.js +246 -0
- package/dist/modules/agents/runtime/agent-isolate-pool.js.map +1 -0
- package/dist/modules/agents/runtime/agent-secure-runtime.d.ts +21 -0
- package/dist/modules/agents/runtime/agent-secure-runtime.js +281 -0
- package/dist/modules/agents/runtime/agent-secure-runtime.js.map +1 -0
- package/dist/modules/agents/runtime/sandbox-polyfills.d.ts +1 -0
- package/dist/modules/agents/runtime/sandbox-polyfills.js +74 -0
- package/dist/modules/agents/runtime/sandbox-polyfills.js.map +1 -0
- package/dist/modules/agents/tool-registry.d.ts +13 -0
- package/dist/modules/agents/tool-registry.js +42 -0
- package/dist/modules/agents/tool-registry.js.map +1 -0
- package/dist/modules/agents/tools/environment-tool.d.ts +3 -0
- package/dist/modules/agents/tools/environment-tool.js +26 -0
- package/dist/modules/agents/tools/environment-tool.js.map +1 -0
- package/dist/modules/agents/tools/node-tool-factory.d.ts +10 -0
- package/dist/modules/agents/tools/node-tool-factory.js +100 -0
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -0
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +43 -0
- package/dist/modules/agents/tools/workflow-tool-factory.js +404 -0
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -0
- package/dist/modules/agents/tracing/builder-telemetry.d.ts +12 -0
- package/dist/modules/agents/tracing/builder-telemetry.js +48 -0
- package/dist/modules/agents/tracing/builder-telemetry.js.map +1 -0
- package/dist/modules/agents/types/components.d.ts +71 -0
- package/dist/modules/agents/types/components.js +3 -0
- package/dist/modules/agents/types/components.js.map +1 -0
- package/dist/modules/agents/types/index.d.ts +1 -0
- package/dist/modules/agents/types/index.js +3 -0
- package/dist/modules/agents/types/index.js.map +1 -0
- package/dist/modules/agents/utils/agent-draft.utils.d.ts +2 -0
- package/dist/modules/agents/utils/agent-draft.utils.js +11 -0
- package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -0
- package/dist/modules/agents/utils/agent-resource-id.d.ts +3 -0
- package/dist/modules/agents/utils/agent-resource-id.js +14 -0
- package/dist/modules/agents/utils/agent-resource-id.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub.module.d.ts +2 -2
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +4 -4
- package/dist/modules/chat-hub/chat-hub.types.d.ts +2 -2
- package/dist/modules/chat-hub/dto/chat-models-request.dto.d.ts +1 -1
- package/dist/modules/community-packages/community-packages.config.js +2 -2
- package/dist/modules/community-packages/community-packages.config.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.d.ts +4 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +14 -2
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.module.d.ts +1 -1
- package/dist/modules/community-packages/community-packages.module.js +10 -5
- package/dist/modules/community-packages/community-packages.module.js.map +1 -1
- package/dist/modules/data-table/data-table.service.js +6 -0
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/slack-signature-identifier.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.d.ts +2 -0
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.js +10 -0
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +16 -4
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.d.ts +3 -3
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js +11 -3
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js.map +1 -1
- package/dist/modules/encryption-key-manager/encryption-bootstrap.service.js +4 -2
- package/dist/modules/encryption-key-manager/encryption-bootstrap.service.js.map +1 -1
- package/dist/modules/encryption-key-manager/encryption-key-manager.module.js +5 -2
- package/dist/modules/encryption-key-manager/encryption-key-manager.module.js.map +1 -1
- package/dist/modules/encryption-key-manager/encryption-key.controller.d.ts +3 -3
- package/dist/modules/encryption-key-manager/encryption-key.controller.js +8 -2
- package/dist/modules/encryption-key-manager/encryption-key.controller.js.map +1 -1
- package/dist/modules/encryption-key-manager/key-manager.service.d.ts +5 -1
- package/dist/modules/encryption-key-manager/key-manager.service.js +11 -4
- package/dist/modules/encryption-key-manager/key-manager.service.js.map +1 -1
- package/dist/modules/insights/insights-collection.service.js +1 -0
- package/dist/modules/insights/insights-collection.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +17 -49
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.d.ts +1 -0
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js +21 -3
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +3 -2
- package/dist/modules/instance-ai/instance-ai-settings.service.js +10 -9
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-test.controller.d.ts +21 -2
- package/dist/modules/instance-ai/instance-ai-test.controller.js +35 -3
- package/dist/modules/instance-ai/instance-ai-test.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +72 -42
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +2 -0
- package/dist/modules/instance-ai/instance-ai.controller.js +25 -1
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +0 -1
- package/dist/modules/instance-ai/instance-ai.module.js +0 -2
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +34 -5
- package/dist/modules/instance-ai/instance-ai.service.js +723 -76
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/index.d.ts +1 -0
- package/dist/modules/instance-ai/liveness/index.js +7 -0
- package/dist/modules/instance-ai/liveness/index.js.map +1 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +72 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +123 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -0
- package/dist/modules/instance-ai/message-parser.js +85 -6
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +4 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +1 -0
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +1 -1
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js +23 -7
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +3 -3
- package/dist/modules/mcp/mcp.service.js +12 -9
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/tools/get-execution.tool.js +6 -4
- package/dist/modules/mcp/tools/get-execution.tool.js.map +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.d.ts +40 -0
- package/dist/modules/mcp/tools/list-credentials.tool.js +148 -0
- package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +5 -4
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js +3 -3
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +2 -2
- 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.js +3 -2
- 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 +3 -3
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js +12 -4
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +12 -5
- 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.js +1 -2
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-validation.utils.d.ts +5 -1
- package/dist/modules/mcp/tools/workflow-validation.utils.js +4 -2
- package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
- package/dist/modules/mcp-registry/mcp-registry-node-loader.d.ts +27 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js +105 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.test.d.ts +1 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.test.js +244 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.test.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-registry.module.d.ts +4 -0
- package/dist/modules/mcp-registry/mcp-registry.module.js +60 -0
- package/dist/modules/mcp-registry/mcp-registry.module.js.map +1 -0
- package/dist/modules/mcp-registry/node-description-transform.d.ts +8 -0
- package/dist/modules/mcp-registry/node-description-transform.js +133 -0
- package/dist/modules/mcp-registry/node-description-transform.js.map +1 -0
- package/dist/modules/mcp-registry/node-description-transform.test.d.ts +1 -0
- package/dist/modules/mcp-registry/node-description-transform.test.js +286 -0
- package/dist/modules/mcp-registry/node-description-transform.test.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +8 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +31 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.test.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.test.js +41 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.test.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +36 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js +3 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mock-servers.d.ts +3 -0
- package/dist/modules/mcp-registry/registry/mock-servers.js +80 -0
- package/dist/modules/mcp-registry/registry/mock-servers.js.map +1 -0
- package/dist/modules/otel/execution-level-tracer.d.ts +1 -1
- package/dist/modules/otel/execution-level-tracer.js +24 -9
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.types.d.ts +9 -7
- package/dist/modules/otel/execution-level-tracer.types.js +14 -0
- package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
- package/dist/modules/quick-connect/quick-connect.config.d.ts +176 -0
- package/dist/modules/quick-connect/quick-connect.config.js +8 -0
- package/dist/modules/quick-connect/quick-connect.config.js.map +1 -1
- package/dist/modules/quick-connect/quick-connect.module.d.ts +15 -0
- package/dist/modules/redaction/executions/execution-redaction.service.d.ts +1 -3
- package/dist/modules/redaction/executions/execution-redaction.service.js +2 -6
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +1 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +3 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js +8 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/node-catalog/index.d.ts +1 -0
- package/dist/node-catalog/index.js +6 -0
- package/dist/node-catalog/index.js.map +1 -0
- package/dist/{modules/mcp/tools/workflow-builder/workflow-builder-tools.service.d.ts → node-catalog/node-catalog.service.d.ts} +9 -15
- package/dist/{modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js → node-catalog/node-catalog.service.js} +38 -28
- package/dist/node-catalog/node-catalog.service.js.map +1 -0
- package/dist/node-execution/ephemeral-node-executor.d.ts +47 -0
- package/dist/node-execution/ephemeral-node-executor.js +289 -0
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -0
- package/dist/node-execution/index.d.ts +2 -0
- package/dist/node-execution/index.js +8 -0
- package/dist/node-execution/index.js.map +1 -0
- package/dist/public-api/v1/handlers/audit/audit.handler.d.ts +5 -4
- package/dist/public-api/v1/handlers/audit/audit.handler.js +5 -9
- package/dist/public-api/v1/handlers/audit/audit.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.d.ts +20 -17
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js +12 -39
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.handler.d.ts +12 -49
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +6 -5
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.columns.handler.d.ts +8 -19
- package/dist/public-api/v1/handlers/data-tables/data-tables.columns.handler.js +11 -11
- package/dist/public-api/v1/handlers/data-tables/data-tables.columns.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.d.ts +9 -17
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +19 -23
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.d.ts +9 -23
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +17 -27
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.handler.d.ts +11 -9
- package/dist/public-api/v1/handlers/discover/discover.handler.js +5 -3
- package/dist/public-api/v1/handlers/discover/discover.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.d.ts +12 -11
- package/dist/public-api/v1/handlers/executions/executions.handler.js +46 -80
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/folders/folders.handler.d.ts +12 -17
- package/dist/public-api/v1/handlers/folders/folders.handler.js +17 -20
- package/dist/public-api/v1/handlers/folders/folders.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/insights/insights.handler.d.ts +5 -4
- package/dist/public-api/v1/handlers/insights/insights.handler.js +9 -5
- package/dist/public-api/v1/handlers/insights/insights.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.d.ts +28 -11
- package/dist/public-api/v1/handlers/projects/projects.handler.js +44 -75
- package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/source-control/source-control.handler.d.ts +5 -6
- package/dist/public-api/v1/handlers/source-control/source-control.handler.js +3 -2
- package/dist/public-api/v1/handlers/source-control/source-control.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/tags/tags.handler.d.ts +9 -8
- package/dist/public-api/v1/handlers/tags/tags.handler.js +11 -8
- package/dist/public-api/v1/handlers/tags/tags.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/users/users.handler.ee.d.ts +14 -11
- package/dist/public-api/v1/handlers/users/users.handler.ee.js +7 -8
- package/dist/public-api/v1/handlers/users/users.handler.ee.js.map +1 -1
- package/dist/public-api/v1/handlers/variables/variables.handler.d.ts +13 -7
- package/dist/public-api/v1/handlers/variables/variables.handler.js +5 -3
- package/dist/public-api/v1/handlers/variables/variables.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +17 -49
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +27 -46
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/shared/handler.types.d.ts +7 -1
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -2
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +7 -6
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/job-processor.js +2 -0
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +9 -0
- package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
- package/dist/scaling/scaling.types.d.ts +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/services/frontend.service.js +7 -14
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.d.ts +9 -3
- package/dist/services/import.service.js +72 -5
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/proxy-token-manager.js.map +1 -0
- package/dist/services/workflow-statistics.service.js +1 -0
- package/dist/services/workflow-statistics.service.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker.service.d.ts +2 -0
- package/dist/task-runners/task-broker/task-broker.service.js +13 -1
- package/dist/task-runners/task-broker/task-broker.service.js.map +1 -1
- package/dist/utils/ttl-map.d.ts +17 -0
- package/dist/utils/ttl-map.js +80 -0
- package/dist/utils/ttl-map.js.map +1 -0
- package/dist/webhooks/test-webhooks.d.ts +3 -1
- package/dist/webhooks/test-webhooks.js +11 -3
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +2 -1
- package/dist/workflow-execute-additional-data.js +34 -0
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +1 -0
- package/dist/workflow-helpers.js +15 -0
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +2 -0
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/workflow-creation.service.js +1 -0
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow.service.js +4 -0
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +40 -25
- package/dist/instance-settings-loader/loaders/sso.instance-settings-loader.js +0 -203
- package/dist/instance-settings-loader/loaders/sso.instance-settings-loader.js.map +0 -1
- package/dist/modules/instance-ai/proxy-token-manager.js.map +0 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js.map +0 -1
- /package/dist/{modules/instance-ai → services}/proxy-token-manager.d.ts +0 -0
- /package/dist/{modules/instance-ai → services}/proxy-token-manager.js +0 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AgentsToolsService = exports.isAgentToolNodeType = exports.isExecutableNodeType = void 0;
|
|
13
|
+
const agents_1 = require("@n8n/agents");
|
|
14
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
15
|
+
const di_1 = require("@n8n/di");
|
|
16
|
+
const workflow_sdk_1 = require("@n8n/workflow-sdk");
|
|
17
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
18
|
+
const zod_1 = require("zod");
|
|
19
|
+
const node_execution_1 = require("../../node-execution");
|
|
20
|
+
const node_catalog_1 = require("../../node-catalog");
|
|
21
|
+
const isExecutableNodeType = (nodeId) => !(0, n8n_workflow_1.isTriggerNodeType)(nodeId);
|
|
22
|
+
exports.isExecutableNodeType = isExecutableNodeType;
|
|
23
|
+
const isAgentToolNodeType = (nodeId) => (0, exports.isExecutableNodeType)(nodeId) &&
|
|
24
|
+
((0, n8n_workflow_1.isToolType)(nodeId, { includeHitl: false }) || (0, node_execution_1.isAgentProviderNode)(nodeId));
|
|
25
|
+
exports.isAgentToolNodeType = isAgentToolNodeType;
|
|
26
|
+
const searchNodesInputSchema = zod_1.z.object({
|
|
27
|
+
queries: zod_1.z.array(zod_1.z.string()).min(1).describe('Search queries (e.g., ["gmail", "slack", "http"])'),
|
|
28
|
+
});
|
|
29
|
+
const nodeVersionSchema = zod_1.z.number().describe('Tool node type version from search_nodes');
|
|
30
|
+
const getNodeTypesInputSchema = zod_1.z.object({
|
|
31
|
+
nodeIds: zod_1.z
|
|
32
|
+
.array(zod_1.z.union([
|
|
33
|
+
zod_1.z.string(),
|
|
34
|
+
zod_1.z.object({
|
|
35
|
+
nodeId: zod_1.z.string(),
|
|
36
|
+
version: nodeVersionSchema.optional(),
|
|
37
|
+
resource: zod_1.z.string().optional(),
|
|
38
|
+
operation: zod_1.z.string().optional(),
|
|
39
|
+
mode: zod_1.z.string().optional(),
|
|
40
|
+
}),
|
|
41
|
+
]))
|
|
42
|
+
.min(1)
|
|
43
|
+
.describe('Tool node IDs from search_nodes (e.g., ["n8n-nodes-base.gmailTool"])'),
|
|
44
|
+
});
|
|
45
|
+
const listCredentialsInputSchema = zod_1.z.object({
|
|
46
|
+
types: zod_1.z
|
|
47
|
+
.array(zod_1.z.string())
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('Optional credential types to filter by (e.g., ["gmailOAuth2", "httpHeaderAuth"]). ' +
|
|
50
|
+
'When omitted, returns all credentials. Use the credential types declared in the ' +
|
|
51
|
+
'node schema from get_node_types to narrow the results.'),
|
|
52
|
+
});
|
|
53
|
+
const runNodeInputSchema = zod_1.z.object({
|
|
54
|
+
nodeType: zod_1.z.string().describe('Tool node type identifier from search_nodes'),
|
|
55
|
+
nodeTypeVersion: nodeVersionSchema,
|
|
56
|
+
nodeParameters: zod_1.z
|
|
57
|
+
.record(zod_1.z.unknown())
|
|
58
|
+
.optional()
|
|
59
|
+
.describe('Static node config. Use expressions like ={{ $json.url }} to reference inputData fields.'),
|
|
60
|
+
credentials: zod_1.z
|
|
61
|
+
.record(zod_1.z.object({ id: zod_1.z.string(), name: zod_1.z.string() }))
|
|
62
|
+
.optional()
|
|
63
|
+
.describe('Credential slot → { id, name }. Copy from list_credentials results.'),
|
|
64
|
+
inputData: zod_1.z
|
|
65
|
+
.record(zod_1.z.unknown())
|
|
66
|
+
.optional()
|
|
67
|
+
.describe('Runtime input, available as $json inside nodeParameters expressions.'),
|
|
68
|
+
});
|
|
69
|
+
let AgentsToolsService = class AgentsToolsService {
|
|
70
|
+
constructor(logger, nodeCatalogService, ephemeralNodeExecutor) {
|
|
71
|
+
this.logger = logger;
|
|
72
|
+
this.nodeCatalogService = nodeCatalogService;
|
|
73
|
+
this.ephemeralNodeExecutor = ephemeralNodeExecutor;
|
|
74
|
+
}
|
|
75
|
+
getSharedTools(credentialProvider, listCredentialsUsageHint) {
|
|
76
|
+
return [
|
|
77
|
+
this.buildSearchNodesTool(),
|
|
78
|
+
this.buildGetNodeTypesTool(),
|
|
79
|
+
this.buildListCredentialsTool(credentialProvider, listCredentialsUsageHint),
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
getRuntimeTools(credentialProvider, projectId) {
|
|
83
|
+
return [
|
|
84
|
+
...this.getSharedTools(credentialProvider, 'Call this before run_node_tool to know which credential to pass.'),
|
|
85
|
+
this.buildRunNodeTool(projectId),
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
buildSearchNodesTool() {
|
|
89
|
+
return new agents_1.Tool('search_nodes')
|
|
90
|
+
.description('Search for n8n nodes by name or service. Use this to find nodes that can be executed. ' +
|
|
91
|
+
'Returns tool node IDs, display names, versions, and descriptions. ' +
|
|
92
|
+
'After finding a node, call get_node_types to get its parameter schema.')
|
|
93
|
+
.input(searchNodesInputSchema)
|
|
94
|
+
.handler(async ({ queries }) => {
|
|
95
|
+
const { results } = await this.nodeCatalogService.searchNodes(queries, {
|
|
96
|
+
nodeFilter: exports.isAgentToolNodeType,
|
|
97
|
+
});
|
|
98
|
+
return { results };
|
|
99
|
+
})
|
|
100
|
+
.build();
|
|
101
|
+
}
|
|
102
|
+
buildGetNodeTypesTool() {
|
|
103
|
+
return new agents_1.Tool('get_node_types')
|
|
104
|
+
.description('Get detailed parameter schema for specific n8n nodes. Use the node IDs returned ' +
|
|
105
|
+
'by search_nodes. Returns parameter definitions needed to configure a node for execution. ' +
|
|
106
|
+
'Use the tool node IDs from search_nodes. ' +
|
|
107
|
+
'You can optionally filter by resource/operation/mode.')
|
|
108
|
+
.input(getNodeTypesInputSchema)
|
|
109
|
+
.handler(async ({ nodeIds }) => {
|
|
110
|
+
const results = await this.nodeCatalogService.getNodeTypes(nodeIds.map(normalizeNodeRequestForCatalog));
|
|
111
|
+
return { results };
|
|
112
|
+
})
|
|
113
|
+
.build();
|
|
114
|
+
}
|
|
115
|
+
buildListCredentialsTool(credentialProvider, usageHint) {
|
|
116
|
+
return new agents_1.Tool('list_credentials')
|
|
117
|
+
.description('List the credentials available to the user. Returns an array of credential names and types. ' +
|
|
118
|
+
'Accepts an optional `types` filter to return only credentials matching the given types. ' +
|
|
119
|
+
usageHint)
|
|
120
|
+
.input(listCredentialsInputSchema)
|
|
121
|
+
.handler(async ({ types }) => {
|
|
122
|
+
const creds = await credentialProvider.list();
|
|
123
|
+
if (!types || types.length === 0)
|
|
124
|
+
return { credentials: creds };
|
|
125
|
+
const allowed = new Set(types);
|
|
126
|
+
return { credentials: creds.filter((c) => allowed.has(c.type)) };
|
|
127
|
+
})
|
|
128
|
+
.build();
|
|
129
|
+
}
|
|
130
|
+
buildRunNodeTool(projectId) {
|
|
131
|
+
return new agents_1.Tool('run_node_tool')
|
|
132
|
+
.description('Execute an n8n node for the current request. ' +
|
|
133
|
+
'Use the tool nodeType and nodeTypeVersion from search_nodes. ' +
|
|
134
|
+
'Call get_node_types first to understand what nodeParameters the node accepts. ' +
|
|
135
|
+
'nodeParameters holds static node config; use n8n expressions like ={{ $json.url }} to map inputData fields. ' +
|
|
136
|
+
'credentials maps slot names to { id, name } — copy from the list_credentials results. ' +
|
|
137
|
+
'inputData is the runtime payload available as $json inside expressions. ' +
|
|
138
|
+
'Parameters are validated against the node schema before execution.')
|
|
139
|
+
.input(runNodeInputSchema)
|
|
140
|
+
.handler(async ({ nodeType, nodeTypeVersion, nodeParameters, credentials, inputData }) => {
|
|
141
|
+
if (!(0, exports.isExecutableNodeType)(nodeType)) {
|
|
142
|
+
return {
|
|
143
|
+
status: 'error',
|
|
144
|
+
message: `Node type "${nodeType}" cannot be executed directly — trigger nodes are not supported here.`,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
if (nodeParameters) {
|
|
148
|
+
const { valid, errors } = (0, workflow_sdk_1.validateNodeConfig)(nodeType, nodeTypeVersion, {
|
|
149
|
+
parameters: nodeParameters,
|
|
150
|
+
}, { isToolNode: true });
|
|
151
|
+
if (!valid) {
|
|
152
|
+
return {
|
|
153
|
+
status: 'error',
|
|
154
|
+
message: `Invalid nodeParameters: ${errors.map((e) => e.message).join('; ')}`,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
try {
|
|
159
|
+
return await this.ephemeralNodeExecutor.executeInline({
|
|
160
|
+
nodeType,
|
|
161
|
+
nodeTypeVersion,
|
|
162
|
+
nodeParameters: (nodeParameters ?? {}),
|
|
163
|
+
credentialDetails: credentials,
|
|
164
|
+
inputData: [{ json: (inputData ?? {}) }],
|
|
165
|
+
projectId,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
170
|
+
this.logger.warn('run_node_tool execution failed', { nodeType, error });
|
|
171
|
+
return {
|
|
172
|
+
status: 'error',
|
|
173
|
+
message: `Node execution failed: ${message}`,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
})
|
|
177
|
+
.build();
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
exports.AgentsToolsService = AgentsToolsService;
|
|
181
|
+
exports.AgentsToolsService = AgentsToolsService = __decorate([
|
|
182
|
+
(0, di_1.Service)(),
|
|
183
|
+
__metadata("design:paramtypes", [backend_common_1.Logger,
|
|
184
|
+
node_catalog_1.NodeCatalogService,
|
|
185
|
+
node_execution_1.EphemeralNodeExecutor])
|
|
186
|
+
], AgentsToolsService);
|
|
187
|
+
function normalizeNodeRequestForCatalog(req) {
|
|
188
|
+
if (typeof req === 'string')
|
|
189
|
+
return req;
|
|
190
|
+
const { version, ...rest } = req;
|
|
191
|
+
return version === undefined ? rest : { ...rest, version: String(version) };
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=agents-tools.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-tools.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agents-tools.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAmC;AAEnC,wDAA6C;AAC7C,gCAAkC;AAClC,oDAAuD;AACvD,+CAA6D;AAE7D,6BAAwB;AAExB,qDAA8E;AAC9E,iDAAoD;AAgB7C,MAAM,oBAAoB,GAAG,CAAC,MAAc,EAAW,EAAE,CAAC,CAAC,IAAA,gCAAiB,EAAC,MAAM,CAAC,CAAC;AAA/E,QAAA,oBAAoB,wBAA2D;AAcrF,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAW,EAAE,CAC9D,IAAA,4BAAoB,EAAC,MAAM,CAAC;IAC5B,CAAC,IAAA,yBAAU,EAAC,MAAM,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,IAAI,IAAA,oCAAmB,EAAC,MAAM,CAAC,CAAC,CAAC;AAFhE,QAAA,mBAAmB,uBAE6C;AAE7E,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,mDAAmD,CAAC;CACjG,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC,CAAC;AAE1F,MAAM,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,OAAO,EAAE,OAAC;SACR,KAAK,CACL,OAAC,CAAC,KAAK,CAAC;QACP,OAAC,CAAC,MAAM,EAAE;QACV,OAAC,CAAC,MAAM,CAAC;YACR,MAAM,EAAE,OAAC,CAAC,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,EAAE,0BAA0B,OAAO,EAAE;iBAC5C,CAAC;YACH,CAAC;QACF,CAAC,CAAC;aACD,KAAK,EAAE,CAAC;IACX,CAAC;CACD,CAAA;AApJY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,YAAO,GAAE;qCAGiB,uBAAM;QACM,iCAAkB;QACf,sCAAqB;GAJlD,kBAAkB,CAoJ9B;AAOD,SAAS,8BAA8B,CAAC,GAAgB;IASvD,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IACxC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,GAAG,CAAC;IACjC,OAAO,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { type AgentBuilderMessagesResponse, type AgentIntegrationStatusResponse, type AgentPersistedMessageDto, type AgentSkill, type AgentScheduleConfig, type ChatIntegrationDescriptor, AgentBuildResumeDto, AgentChatMessageDto, CreateAgentSkillDto, AgentIntegrationDto, CreateAgentDto, UpdateAgentSkillDto, UpdateAgentConfigDto, UpdateAgentScheduleDto, UpdateAgentDto } from '@n8n/api-types';
|
|
2
|
+
import { AuthenticatedRequest } from '@n8n/db';
|
|
3
|
+
import type { Request, Response } from 'express';
|
|
4
|
+
import { CredentialsService } from '../../credentials/credentials.service';
|
|
5
|
+
import { AgentExecutionService } from './agent-execution.service';
|
|
6
|
+
import { type FlushableResponse } from './agent-sse-stream';
|
|
7
|
+
import { AgentsService } from './agents.service';
|
|
8
|
+
import { AgentsBuilderService } from './builder/agents-builder.service';
|
|
9
|
+
import { ChatIntegrationRegistry } from './integrations/agent-chat-integration';
|
|
10
|
+
import { AgentScheduleService } from './integrations/agent-schedule.service';
|
|
11
|
+
import { ChatIntegrationService } from './integrations/chat-integration.service';
|
|
12
|
+
import { AgentRepository } from './repositories/agent.repository';
|
|
13
|
+
export declare class AgentsController {
|
|
14
|
+
private readonly agentsService;
|
|
15
|
+
private readonly agentsBuilderService;
|
|
16
|
+
private readonly credentialsService;
|
|
17
|
+
private readonly chatIntegrationService;
|
|
18
|
+
private readonly agentScheduleService;
|
|
19
|
+
private readonly agentRepository;
|
|
20
|
+
private readonly agentExecutionService;
|
|
21
|
+
private readonly chatIntegrationRegistry;
|
|
22
|
+
constructor(agentsService: AgentsService, agentsBuilderService: AgentsBuilderService, credentialsService: CredentialsService, chatIntegrationService: ChatIntegrationService, agentScheduleService: AgentScheduleService, agentRepository: AgentRepository, agentExecutionService: AgentExecutionService, chatIntegrationRegistry: ChatIntegrationRegistry);
|
|
23
|
+
create(req: AuthenticatedRequest<{
|
|
24
|
+
projectId: string;
|
|
25
|
+
}>, _res: Response, payload: CreateAgentDto): Promise<import("./entities/agent.entity").Agent>;
|
|
26
|
+
list(req: AuthenticatedRequest<{
|
|
27
|
+
projectId: string;
|
|
28
|
+
}, unknown, unknown, {
|
|
29
|
+
all?: string;
|
|
30
|
+
}>): Promise<import("./entities/agent.entity").Agent[]>;
|
|
31
|
+
getConfig(req: AuthenticatedRequest<{
|
|
32
|
+
projectId: string;
|
|
33
|
+
agentId: string;
|
|
34
|
+
}>): Promise<{
|
|
35
|
+
name: string;
|
|
36
|
+
instructions: string;
|
|
37
|
+
model: string;
|
|
38
|
+
description?: string | undefined;
|
|
39
|
+
credential?: string | undefined;
|
|
40
|
+
memory?: {
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
storage: "n8n" | "sqlite" | "postgres";
|
|
43
|
+
connection?: Record<string, unknown> | undefined;
|
|
44
|
+
lastMessages?: number | undefined;
|
|
45
|
+
semanticRecall?: {
|
|
46
|
+
topK: number;
|
|
47
|
+
scope?: "resource" | "thread" | undefined;
|
|
48
|
+
messageRange?: {
|
|
49
|
+
before: number;
|
|
50
|
+
after: number;
|
|
51
|
+
} | undefined;
|
|
52
|
+
embedder?: string | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
config?: {
|
|
56
|
+
thinking?: {
|
|
57
|
+
provider: "anthropic" | "openai";
|
|
58
|
+
budgetTokens?: number | undefined;
|
|
59
|
+
reasoningEffort?: string | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
toolCallConcurrency?: number | undefined;
|
|
62
|
+
nodeTools?: {
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
} | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
tools?: ({
|
|
67
|
+
id: string;
|
|
68
|
+
type: "custom";
|
|
69
|
+
requireApproval?: boolean | undefined;
|
|
70
|
+
} | {
|
|
71
|
+
type: "workflow";
|
|
72
|
+
workflow: string;
|
|
73
|
+
description?: string | undefined;
|
|
74
|
+
name?: string | undefined;
|
|
75
|
+
requireApproval?: boolean | undefined;
|
|
76
|
+
allOutputs?: boolean | undefined;
|
|
77
|
+
} | {
|
|
78
|
+
name: string;
|
|
79
|
+
type: "node";
|
|
80
|
+
node: {
|
|
81
|
+
nodeType: string;
|
|
82
|
+
nodeTypeVersion: number;
|
|
83
|
+
nodeParameters: Record<string, unknown>;
|
|
84
|
+
credentials?: Record<string, {
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
}> | undefined;
|
|
88
|
+
};
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
requireApproval?: boolean | undefined;
|
|
91
|
+
})[] | undefined;
|
|
92
|
+
skills?: {
|
|
93
|
+
id: string;
|
|
94
|
+
type: "skill";
|
|
95
|
+
}[] | undefined;
|
|
96
|
+
providerTools?: Record<string, Record<string, unknown>> | undefined;
|
|
97
|
+
integrations?: ({
|
|
98
|
+
active: boolean;
|
|
99
|
+
type: "schedule";
|
|
100
|
+
cronExpression: string;
|
|
101
|
+
wakeUpPrompt: string;
|
|
102
|
+
} | {
|
|
103
|
+
type: string;
|
|
104
|
+
credentialName: string;
|
|
105
|
+
credentialId: string;
|
|
106
|
+
})[] | undefined;
|
|
107
|
+
}>;
|
|
108
|
+
putConfig(req: AuthenticatedRequest<{
|
|
109
|
+
projectId: string;
|
|
110
|
+
agentId: string;
|
|
111
|
+
}>, _res: Response, agentId: string, payload: UpdateAgentConfigDto): Promise<{
|
|
112
|
+
config: import("./json-config/agent-json-config").AgentJsonConfig;
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
versionId: string | null;
|
|
115
|
+
}>;
|
|
116
|
+
deleteTool(req: AuthenticatedRequest<{
|
|
117
|
+
projectId: string;
|
|
118
|
+
agentId: string;
|
|
119
|
+
toolId: string;
|
|
120
|
+
}>, _res: Response, agentId: string, toolId: string): Promise<{
|
|
121
|
+
ok: boolean;
|
|
122
|
+
}>;
|
|
123
|
+
listSkills(req: AuthenticatedRequest<{
|
|
124
|
+
projectId: string;
|
|
125
|
+
agentId: string;
|
|
126
|
+
}>): Promise<Record<string, AgentSkill>>;
|
|
127
|
+
getSkill(req: AuthenticatedRequest<{
|
|
128
|
+
projectId: string;
|
|
129
|
+
agentId: string;
|
|
130
|
+
skillId: string;
|
|
131
|
+
}>, _res: Response, agentId: string, skillId: string): Promise<AgentSkill>;
|
|
132
|
+
createSkill(req: AuthenticatedRequest<{
|
|
133
|
+
projectId: string;
|
|
134
|
+
agentId: string;
|
|
135
|
+
}>, _res: Response, agentId: string, payload: CreateAgentSkillDto): Promise<import("@n8n/api-types").AgentSkillMutationResponse>;
|
|
136
|
+
updateSkill(req: AuthenticatedRequest<{
|
|
137
|
+
projectId: string;
|
|
138
|
+
agentId: string;
|
|
139
|
+
skillId: string;
|
|
140
|
+
}>, _res: Response, agentId: string, skillId: string, payload: UpdateAgentSkillDto): Promise<import("@n8n/api-types").AgentSkillMutationResponse>;
|
|
141
|
+
deleteSkill(req: AuthenticatedRequest<{
|
|
142
|
+
projectId: string;
|
|
143
|
+
agentId: string;
|
|
144
|
+
skillId: string;
|
|
145
|
+
}>, _res: Response, agentId: string, skillId: string): Promise<{
|
|
146
|
+
ok: boolean;
|
|
147
|
+
}>;
|
|
148
|
+
listCredentials(req: AuthenticatedRequest<{
|
|
149
|
+
projectId: string;
|
|
150
|
+
agentId: string;
|
|
151
|
+
}>): Promise<import("@n8n/agents").CredentialListItem[]>;
|
|
152
|
+
getModelCatalog(): Promise<import("@n8n/agents").ProviderCatalog>;
|
|
153
|
+
listIntegrations(): ChatIntegrationDescriptor[];
|
|
154
|
+
listThreads(req: AuthenticatedRequest<{
|
|
155
|
+
projectId: string;
|
|
156
|
+
}, {}, {}, {
|
|
157
|
+
cursor?: string;
|
|
158
|
+
limit?: string;
|
|
159
|
+
agentId?: string;
|
|
160
|
+
}>): Promise<{
|
|
161
|
+
threads: import("./agent-execution.service").ThreadListItem[];
|
|
162
|
+
nextCursor: string | null;
|
|
163
|
+
}>;
|
|
164
|
+
getThread(req: AuthenticatedRequest<{
|
|
165
|
+
projectId: string;
|
|
166
|
+
threadId: string;
|
|
167
|
+
}, {}, {}, {
|
|
168
|
+
agentId?: string;
|
|
169
|
+
}>): Promise<import("./agent-execution.service").ThreadDetail>;
|
|
170
|
+
deleteThread(req: AuthenticatedRequest<{
|
|
171
|
+
projectId: string;
|
|
172
|
+
threadId: string;
|
|
173
|
+
}>): Promise<{
|
|
174
|
+
success: boolean;
|
|
175
|
+
}>;
|
|
176
|
+
get(req: AuthenticatedRequest<{
|
|
177
|
+
projectId: string;
|
|
178
|
+
}>, _res: Response, agentId: string): Promise<import("./entities/agent.entity").Agent>;
|
|
179
|
+
update(req: AuthenticatedRequest<{
|
|
180
|
+
projectId: string;
|
|
181
|
+
}>, _res: Response, agentId: string, payload: UpdateAgentDto): Promise<import("./entities/agent.entity").Agent | null>;
|
|
182
|
+
delete(req: AuthenticatedRequest<{
|
|
183
|
+
projectId: string;
|
|
184
|
+
}>, _res: Response, agentId: string): Promise<{
|
|
185
|
+
success: boolean;
|
|
186
|
+
}>;
|
|
187
|
+
publish(req: AuthenticatedRequest<{
|
|
188
|
+
projectId: string;
|
|
189
|
+
}>, _res: Response, agentId: string): Promise<import("./entities/agent.entity").Agent>;
|
|
190
|
+
unpublish(req: AuthenticatedRequest<{
|
|
191
|
+
projectId: string;
|
|
192
|
+
}>, _res: Response, agentId: string): Promise<import("./entities/agent.entity").Agent>;
|
|
193
|
+
revertToPublished(req: AuthenticatedRequest<{
|
|
194
|
+
projectId: string;
|
|
195
|
+
}>, _res: Response, agentId: string): Promise<import("./entities/agent.entity").Agent>;
|
|
196
|
+
chat(req: AuthenticatedRequest<{
|
|
197
|
+
projectId: string;
|
|
198
|
+
}>, res: FlushableResponse, agentId: string, payload: AgentChatMessageDto): Promise<void>;
|
|
199
|
+
getChatMessages(req: AuthenticatedRequest<{
|
|
200
|
+
projectId: string;
|
|
201
|
+
agentId: string;
|
|
202
|
+
threadId: string;
|
|
203
|
+
}>): Promise<import("@n8n/agents").AgentDbMessage[]>;
|
|
204
|
+
getBuilderMessages(req: AuthenticatedRequest<{
|
|
205
|
+
projectId: string;
|
|
206
|
+
agentId: string;
|
|
207
|
+
}>): Promise<AgentBuilderMessagesResponse>;
|
|
208
|
+
clearBuilderMessages(req: AuthenticatedRequest<{
|
|
209
|
+
projectId: string;
|
|
210
|
+
agentId: string;
|
|
211
|
+
}>): Promise<{
|
|
212
|
+
ok: boolean;
|
|
213
|
+
}>;
|
|
214
|
+
getTestChatMessages(req: AuthenticatedRequest<{
|
|
215
|
+
projectId: string;
|
|
216
|
+
agentId: string;
|
|
217
|
+
}>): Promise<AgentPersistedMessageDto[]>;
|
|
218
|
+
clearTestChatMessages(req: AuthenticatedRequest<{
|
|
219
|
+
projectId: string;
|
|
220
|
+
agentId: string;
|
|
221
|
+
}>): Promise<{
|
|
222
|
+
ok: boolean;
|
|
223
|
+
}>;
|
|
224
|
+
build(req: AuthenticatedRequest<{
|
|
225
|
+
projectId: string;
|
|
226
|
+
}>, res: FlushableResponse, agentId: string, payload: AgentChatMessageDto): Promise<void>;
|
|
227
|
+
buildResume(req: AuthenticatedRequest<{
|
|
228
|
+
projectId: string;
|
|
229
|
+
}>, res: FlushableResponse, agentId: string, payload: AgentBuildResumeDto): Promise<void>;
|
|
230
|
+
connectIntegration(req: AuthenticatedRequest<{
|
|
231
|
+
projectId: string;
|
|
232
|
+
}>, _res: Response, agentId: string, payload: AgentIntegrationDto): Promise<{
|
|
233
|
+
status: string;
|
|
234
|
+
}>;
|
|
235
|
+
disconnectIntegration(req: AuthenticatedRequest<{
|
|
236
|
+
projectId: string;
|
|
237
|
+
}>, _res: Response, agentId: string, payload: AgentIntegrationDto): Promise<{
|
|
238
|
+
status: string;
|
|
239
|
+
}>;
|
|
240
|
+
getScheduleIntegration(req: AuthenticatedRequest<{
|
|
241
|
+
projectId: string;
|
|
242
|
+
}>, _res: Response, agentId: string): Promise<AgentScheduleConfig>;
|
|
243
|
+
updateScheduleIntegration(req: AuthenticatedRequest<{
|
|
244
|
+
projectId: string;
|
|
245
|
+
}>, _res: Response, agentId: string, payload: UpdateAgentScheduleDto): Promise<AgentScheduleConfig>;
|
|
246
|
+
activateScheduleIntegration(req: AuthenticatedRequest<{
|
|
247
|
+
projectId: string;
|
|
248
|
+
}>, _res: Response, agentId: string): Promise<AgentScheduleConfig>;
|
|
249
|
+
deactivateScheduleIntegration(req: AuthenticatedRequest<{
|
|
250
|
+
projectId: string;
|
|
251
|
+
}>, _res: Response, agentId: string): Promise<AgentScheduleConfig>;
|
|
252
|
+
integrationStatus(req: AuthenticatedRequest<{
|
|
253
|
+
projectId: string;
|
|
254
|
+
}>, _res: Response, agentId: string): Promise<AgentIntegrationStatusResponse>;
|
|
255
|
+
handleWebhook(req: Request<{
|
|
256
|
+
projectId: string;
|
|
257
|
+
agentId: string;
|
|
258
|
+
platform: string;
|
|
259
|
+
}>, res: Response): Promise<void>;
|
|
260
|
+
}
|