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,17 @@
|
|
|
1
|
+
import type { User } from '@n8n/db';
|
|
2
|
+
import { ProjectRepository } from '@n8n/db';
|
|
3
|
+
import { CredentialsFinderService } from '../../../credentials/credentials-finder.service';
|
|
4
|
+
import { NodeTypes } from '../../../node-types';
|
|
5
|
+
import { DynamicNodeParametersService } from '../../../services/dynamic-node-parameters.service';
|
|
6
|
+
import type { ModelLookupConfig } from './interactive/llm-provider-defaults';
|
|
7
|
+
export declare class BuilderModelLookupService {
|
|
8
|
+
private readonly credentialsFinderService;
|
|
9
|
+
private readonly projectRepository;
|
|
10
|
+
private readonly dynamicNodeParametersService;
|
|
11
|
+
private readonly nodeTypes;
|
|
12
|
+
constructor(credentialsFinderService: CredentialsFinderService, projectRepository: ProjectRepository, dynamicNodeParametersService: DynamicNodeParametersService, nodeTypes: NodeTypes);
|
|
13
|
+
list(user: User, credentialId: string, credentialType: string, lookup: ModelLookupConfig): Promise<Array<{
|
|
14
|
+
name: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}>>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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.BuilderModelLookupService = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const di_1 = require("@n8n/di");
|
|
15
|
+
const credentials_finder_service_1 = require("../../../credentials/credentials-finder.service");
|
|
16
|
+
const node_types_1 = require("../../../node-types");
|
|
17
|
+
const dynamic_node_parameters_service_1 = require("../../../services/dynamic-node-parameters.service");
|
|
18
|
+
const workflow_execute_additional_data_1 = require("../../../workflow-execute-additional-data");
|
|
19
|
+
let BuilderModelLookupService = class BuilderModelLookupService {
|
|
20
|
+
constructor(credentialsFinderService, projectRepository, dynamicNodeParametersService, nodeTypes) {
|
|
21
|
+
this.credentialsFinderService = credentialsFinderService;
|
|
22
|
+
this.projectRepository = projectRepository;
|
|
23
|
+
this.dynamicNodeParametersService = dynamicNodeParametersService;
|
|
24
|
+
this.nodeTypes = nodeTypes;
|
|
25
|
+
}
|
|
26
|
+
async list(user, credentialId, credentialType, lookup) {
|
|
27
|
+
const credential = await this.credentialsFinderService.findCredentialForUser(credentialId, user, ['credential:read']);
|
|
28
|
+
if (!credential || credential.type !== credentialType) {
|
|
29
|
+
throw new Error(`Credential ${credentialId} not found or not accessible`);
|
|
30
|
+
}
|
|
31
|
+
const personalProject = await this.projectRepository.getPersonalProjectForUserOrFail(user.id);
|
|
32
|
+
const currentNodeParameters = {};
|
|
33
|
+
const credentials = {
|
|
34
|
+
[credential.type]: { id: credential.id, name: credential.name },
|
|
35
|
+
};
|
|
36
|
+
const additionalData = await (0, workflow_execute_additional_data_1.getBase)({
|
|
37
|
+
userId: user.id,
|
|
38
|
+
projectId: personalProject.id,
|
|
39
|
+
currentNodeParameters,
|
|
40
|
+
});
|
|
41
|
+
const nodeTypeAndVersion = { name: lookup.nodeType, version: lookup.version };
|
|
42
|
+
if (lookup.kind === 'listSearch') {
|
|
43
|
+
const result = await this.dynamicNodeParametersService.getResourceLocatorResults(lookup.methodName, '', additionalData, nodeTypeAndVersion, currentNodeParameters, credentials);
|
|
44
|
+
return (result.results ?? []).map((r) => ({
|
|
45
|
+
name: String(r.name),
|
|
46
|
+
value: String(r.value),
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
const nodeType = this.nodeTypes.getByNameAndVersion(lookup.nodeType, lookup.version);
|
|
50
|
+
const property = nodeType.description.properties.find((p) => p.name === lookup.propertyName);
|
|
51
|
+
const loadOptions = property?.typeOptions?.loadOptions;
|
|
52
|
+
if (!loadOptions) {
|
|
53
|
+
throw new Error(`Property "${lookup.propertyName}" on ${lookup.nodeType} has no loadOptions config`);
|
|
54
|
+
}
|
|
55
|
+
const options = await this.dynamicNodeParametersService.getOptionsViaLoadOptions(loadOptions, additionalData, nodeTypeAndVersion, currentNodeParameters, credentials);
|
|
56
|
+
return options.map((o) => ({ name: String(o.name), value: String(o.value) }));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.BuilderModelLookupService = BuilderModelLookupService;
|
|
60
|
+
exports.BuilderModelLookupService = BuilderModelLookupService = __decorate([
|
|
61
|
+
(0, di_1.Service)(),
|
|
62
|
+
__metadata("design:paramtypes", [credentials_finder_service_1.CredentialsFinderService,
|
|
63
|
+
db_1.ProjectRepository,
|
|
64
|
+
dynamic_node_parameters_service_1.DynamicNodeParametersService,
|
|
65
|
+
node_types_1.NodeTypes])
|
|
66
|
+
], BuilderModelLookupService);
|
|
67
|
+
//# sourceMappingURL=builder-model-lookup.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-model-lookup.service.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/builder-model-lookup.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAA4C;AAC5C,gCAAkC;AAGlC,yFAAoF;AACpF,6CAAyC;AACzC,gGAA0F;AAC1F,yFAA6D;AAKtD,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IACrC,YACkB,wBAAkD,EAClD,iBAAoC,EACpC,4BAA0D,EAC1D,SAAoB;QAHpB,6BAAwB,GAAxB,wBAAwB,CAA0B;QAClD,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,iCAA4B,GAA5B,4BAA4B,CAA8B;QAC1D,cAAS,GAAT,SAAS,CAAW;IACnC,CAAC;IAEJ,KAAK,CAAC,IAAI,CACT,IAAU,EACV,YAAoB,EACpB,cAAsB,EACtB,MAAyB;QAEzB,MAAM,UAAU,GAAG,MAA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CUSTOM_TOOL: "build_custom_tool";
|
|
6
|
+
readonly CREATE_SKILL: "create_skill";
|
|
7
|
+
readonly LIST_INTEGRATION_TYPES: "list_integration_types";
|
|
8
|
+
readonly RESOLVE_LLM: "resolve_llm";
|
|
9
|
+
};
|
|
10
|
+
export type BuilderToolName = (typeof BUILDER_TOOLS)[keyof typeof BUILDER_TOOLS];
|
|
11
|
+
export declare const AGENT_THREAD_PREFIX: {
|
|
12
|
+
readonly TEST: "test-";
|
|
13
|
+
readonly BUILDER: "builder:";
|
|
14
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AGENT_THREAD_PREFIX = exports.BUILDER_TOOLS = void 0;
|
|
4
|
+
exports.BUILDER_TOOLS = {
|
|
5
|
+
READ_CONFIG: 'read_config',
|
|
6
|
+
WRITE_CONFIG: 'write_config',
|
|
7
|
+
PATCH_CONFIG: 'patch_config',
|
|
8
|
+
BUILD_CUSTOM_TOOL: 'build_custom_tool',
|
|
9
|
+
CREATE_SKILL: 'create_skill',
|
|
10
|
+
LIST_INTEGRATION_TYPES: 'list_integration_types',
|
|
11
|
+
RESOLVE_LLM: 'resolve_llm',
|
|
12
|
+
};
|
|
13
|
+
exports.AGENT_THREAD_PREFIX = {
|
|
14
|
+
TEST: 'test-',
|
|
15
|
+
BUILDER: 'builder:',
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=builder-tool-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder-tool-names.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/builder-tool-names.ts"],"names":[],"mappings":";;;AAIa,QAAA,aAAa,GAAG;IAC5B,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,iBAAiB,EAAE,mBAAmB;IACtC,YAAY,EAAE,cAAc;IAC5B,sBAAsB,EAAE,wBAAwB;IAChD,WAAW,EAAE,aAAa;CACjB,CAAC;AAKE,QAAA,mBAAmB,GAAG;IAClC,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,UAAU;CACV,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BuilderNotConfiguredError = exports.BUILDER_NOT_CONFIGURED_CODE = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
exports.BUILDER_NOT_CONFIGURED_CODE = 'BUILDER_NOT_CONFIGURED';
|
|
6
|
+
class BuilderNotConfiguredError extends n8n_workflow_1.UserError {
|
|
7
|
+
constructor() {
|
|
8
|
+
super('Agent builder is not configured. An admin must select a provider and credential, or configure the n8n AI assistant proxy.');
|
|
9
|
+
this.code = exports.BUILDER_NOT_CONFIGURED_CODE;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.BuilderNotConfiguredError = BuilderNotConfiguredError;
|
|
13
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/errors.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AAO5B,QAAA,2BAA2B,GAAG,wBAAwB,CAAC;AAEpE,MAAa,yBAA0B,SAAQ,wBAAS;IAGvD;QACC,KAAK,CACJ,2HAA2H,CAC3H,CAAC;QALM,SAAI,GAAG,mCAA2B,CAAC;IAM5C,CAAC;CACD;AARD,8DAQC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildAskCredentialTool = buildAskCredentialTool;
|
|
4
|
+
const agents_1 = require("@n8n/agents");
|
|
5
|
+
const api_types_1 = require("@n8n/api-types");
|
|
6
|
+
function buildAskCredentialTool(deps) {
|
|
7
|
+
return (new agents_1.Tool(api_types_1.ASK_CREDENTIAL_TOOL_NAME)
|
|
8
|
+
.description('Show a credential picker card in the chat UI and suspend until the user selects ' +
|
|
9
|
+
'a credential. Call ONCE per credential slot, BEFORE the write_config / patch_config ' +
|
|
10
|
+
'that introduces the node tool. Returns { credentialId, credentialName } on success ' +
|
|
11
|
+
'or { skipped: true } if the user skips credential setup so the tool can be added ' +
|
|
12
|
+
'without credentials. Auto-resolves without ' +
|
|
13
|
+
'rendering a card when the user has exactly one credential of the requested type.')
|
|
14
|
+
.input(api_types_1.askCredentialInputSchema)
|
|
15
|
+
.suspend(api_types_1.askCredentialInputSchema)
|
|
16
|
+
.resume(api_types_1.askCredentialResumeSchema)
|
|
17
|
+
.handler(async (input, ctx) => {
|
|
18
|
+
if (ctx.resumeData !== undefined)
|
|
19
|
+
return ctx.resumeData;
|
|
20
|
+
const all = await deps.credentialProvider.list();
|
|
21
|
+
const matching = all.filter((c) => c.type === input.credentialType);
|
|
22
|
+
if (matching.length === 1) {
|
|
23
|
+
return { credentialId: matching[0].id, credentialName: matching[0].name };
|
|
24
|
+
}
|
|
25
|
+
return await ctx.suspend(input);
|
|
26
|
+
})
|
|
27
|
+
.build());
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=ask-credential.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-credential.tool.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/interactive/ask-credential.tool.ts"],"names":[],"mappings":";;AAcA,wDAmCC;AAjDD,wCAAmC;AAEnC,8CAMwB;AAMxB,SAAgB,sBAAsB,CAAC,IAA2B;IACjE,OAAO,CACN,IAAI,aAAI,CAAC,oCAAwB,CAAC;SAChC,WAAW,CACX,kFAAkF;QACjF,sFAAsF;QACtF,qFAAqF;QACrF,mFAAmF;QACnF,6CAA6C;QAC7C,kFAAkF,CACnF;SACA,KAAK,CAAC,oCAAwB,CAAC;SAG/B,OAAO,CAAC,oCAAwB,CAAC;SACjC,MAAM,CAAC,qCAAyB,CAAC;SACjC,OAAO,CACP,KAAK,EACJ,KAAyB,EACzB,GAAsE,EACrE,EAAE;QACH,IAAI,GAAG,CAAC,UAAU,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC,UAAU,CAAC;QAIxD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;QACjD,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,cAAc,CAAC,CAAC;QACpE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC3E,CAAC;QACD,OAAO,MAAM,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CACD;SACA,KAAK,EAAE,CACT,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildAskLlmTool = buildAskLlmTool;
|
|
4
|
+
const agents_1 = require("@n8n/agents");
|
|
5
|
+
const api_types_1 = require("@n8n/api-types");
|
|
6
|
+
function buildAskLlmTool() {
|
|
7
|
+
return new agents_1.Tool(api_types_1.ASK_LLM_TOOL_NAME)
|
|
8
|
+
.description('Show a model + credential picker card in the chat UI and suspend until the user ' +
|
|
9
|
+
'selects a provider, model and credential. Use only when resolve_llm returns an ' +
|
|
10
|
+
'ambiguous result, when credentials are missing and the user must choose/configure one, ' +
|
|
11
|
+
'or when the user explicitly asks to pick/change the model. ' +
|
|
12
|
+
'After resume: set model = "{provider}/{model}" and credential = credentialName ' +
|
|
13
|
+
'via write_config or patch_config.')
|
|
14
|
+
.systemInstruction('Never ask the user in plain text to choose, confirm, configure, or change the agent ' +
|
|
15
|
+
'main LLM, provider, model, or main LLM credential. If the user needs to make that ' +
|
|
16
|
+
'choice, call ask_llm so the picker card is shown.')
|
|
17
|
+
.input(api_types_1.askLlmInputSchema)
|
|
18
|
+
.suspend(api_types_1.askLlmInputSchema)
|
|
19
|
+
.resume(api_types_1.askLlmResumeSchema)
|
|
20
|
+
.handler(async (input, ctx) => {
|
|
21
|
+
if (ctx.resumeData !== undefined)
|
|
22
|
+
return ctx.resumeData;
|
|
23
|
+
return await ctx.suspend(input);
|
|
24
|
+
})
|
|
25
|
+
.build();
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=ask-llm.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-llm.tool.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/interactive/ask-llm.tool.ts"],"names":[],"mappings":";;AAUA,0CAyBC;AAnCD,wCAAmC;AAEnC,8CAMwB;AAExB,SAAgB,eAAe;IAC9B,OAAO,IAAI,aAAI,CAAC,6BAAiB,CAAC;SAChC,WAAW,CACX,kFAAkF;QACjF,iFAAiF;QACjF,yFAAyF;QACzF,6DAA6D;QAC7D,iFAAiF;QACjF,mCAAmC,CACpC;SACA,iBAAiB,CACjB,sFAAsF;QACrF,oFAAoF;QACpF,mDAAmD,CACpD;SACA,KAAK,CAAC,6BAAiB,CAAC;SACxB,OAAO,CAAC,6BAAiB,CAAC;SAC1B,MAAM,CAAC,8BAAkB,CAAC;SAC1B,OAAO,CACP,KAAK,EAAE,KAAkB,EAAE,GAAwD,EAAE,EAAE;QACtF,IAAI,GAAG,CAAC,UAAU,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC,UAAU,CAAC;QACxD,OAAO,MAAM,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CACD;SACA,KAAK,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildAskQuestionTool = buildAskQuestionTool;
|
|
4
|
+
const agents_1 = require("@n8n/agents");
|
|
5
|
+
const api_types_1 = require("@n8n/api-types");
|
|
6
|
+
function buildAskQuestionTool() {
|
|
7
|
+
return new agents_1.Tool(api_types_1.ASK_QUESTION_TOOL_NAME)
|
|
8
|
+
.description('Show a multiple-choice card in the chat UI and suspend until the user picks an ' +
|
|
9
|
+
'answer. Use when the request is ambiguous and the answer is one (or more) of a ' +
|
|
10
|
+
'known list of options. The UI also includes an Other field, so returned values ' +
|
|
11
|
+
'may include user-entered freeform text when the listed options are incomplete. ' +
|
|
12
|
+
'Returns { values: string[] } with selected option values and/or Other text.')
|
|
13
|
+
.input(api_types_1.askQuestionInputSchema)
|
|
14
|
+
.suspend(api_types_1.askQuestionInputSchema)
|
|
15
|
+
.resume(api_types_1.askQuestionResumeSchema)
|
|
16
|
+
.handler(async (input, ctx) => {
|
|
17
|
+
if (ctx.resumeData !== undefined)
|
|
18
|
+
return ctx.resumeData;
|
|
19
|
+
if (input.options.length === 1) {
|
|
20
|
+
return { values: [input.options[0].value] };
|
|
21
|
+
}
|
|
22
|
+
return await ctx.suspend(input);
|
|
23
|
+
})
|
|
24
|
+
.build();
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=ask-question.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-question.tool.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/interactive/ask-question.tool.ts"],"names":[],"mappings":";;AAUA,oDA2BC;AArCD,wCAAmC;AAEnC,8CAMwB;AAExB,SAAgB,oBAAoB;IACnC,OAAO,IAAI,aAAI,CAAC,kCAAsB,CAAC;SACrC,WAAW,CACX,iFAAiF;QAChF,iFAAiF;QACjF,iFAAiF;QACjF,iFAAiF;QACjF,6EAA6E,CAC9E;SACA,KAAK,CAAC,kCAAsB,CAAC;SAC7B,OAAO,CAAC,kCAAsB,CAAC;SAC/B,MAAM,CAAC,mCAAuB,CAAC;SAC/B,OAAO,CACP,KAAK,EACJ,KAAuB,EACvB,GAAkE,EACjE,EAAE;QACH,IAAI,GAAG,CAAC,UAAU,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC,UAAU,CAAC;QAGxD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7C,CAAC;QACD,OAAO,MAAM,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CACD;SACA,KAAK,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildResolveLlmTool = exports.buildAskQuestionTool = exports.buildAskLlmTool = exports.buildAskCredentialTool = void 0;
|
|
4
|
+
var ask_credential_tool_1 = require("./ask-credential.tool");
|
|
5
|
+
Object.defineProperty(exports, "buildAskCredentialTool", { enumerable: true, get: function () { return ask_credential_tool_1.buildAskCredentialTool; } });
|
|
6
|
+
var ask_llm_tool_1 = require("./ask-llm.tool");
|
|
7
|
+
Object.defineProperty(exports, "buildAskLlmTool", { enumerable: true, get: function () { return ask_llm_tool_1.buildAskLlmTool; } });
|
|
8
|
+
var ask_question_tool_1 = require("./ask-question.tool");
|
|
9
|
+
Object.defineProperty(exports, "buildAskQuestionTool", { enumerable: true, get: function () { return ask_question_tool_1.buildAskQuestionTool; } });
|
|
10
|
+
var resolve_llm_tool_1 = require("./resolve-llm.tool");
|
|
11
|
+
Object.defineProperty(exports, "buildResolveLlmTool", { enumerable: true, get: function () { return resolve_llm_tool_1.buildResolveLlmTool; } });
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/interactive/index.ts"],"names":[],"mappings":";;;AAAA,6DAA+D;AAAtD,6HAAA,sBAAsB,OAAA;AAC/B,+CAAiD;AAAxC,+GAAA,eAAe,OAAA;AACxB,yDAA2D;AAAlD,yHAAA,oBAAoB,OAAA;AAC7B,uDAAyD;AAAhD,uHAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ModelLookupConfig = {
|
|
2
|
+
kind: 'listSearch';
|
|
3
|
+
nodeType: string;
|
|
4
|
+
version: number;
|
|
5
|
+
methodName: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'loadOptionsRouting';
|
|
8
|
+
nodeType: string;
|
|
9
|
+
version: number;
|
|
10
|
+
propertyName: string;
|
|
11
|
+
};
|
|
12
|
+
export interface LlmProviderDefault {
|
|
13
|
+
provider: string;
|
|
14
|
+
defaultModel: string;
|
|
15
|
+
modelLookup?: ModelLookupConfig;
|
|
16
|
+
}
|
|
17
|
+
export declare const LLM_PROVIDER_DEFAULTS: Record<string, LlmProviderDefault>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LLM_PROVIDER_DEFAULTS = void 0;
|
|
4
|
+
exports.LLM_PROVIDER_DEFAULTS = {
|
|
5
|
+
anthropicApi: {
|
|
6
|
+
provider: 'anthropic',
|
|
7
|
+
defaultModel: 'claude-sonnet-4-6',
|
|
8
|
+
modelLookup: {
|
|
9
|
+
kind: 'listSearch',
|
|
10
|
+
nodeType: '@n8n/n8n-nodes-langchain.lmChatAnthropic',
|
|
11
|
+
version: 1.5,
|
|
12
|
+
methodName: 'searchModels',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
openAiApi: {
|
|
16
|
+
provider: 'openai',
|
|
17
|
+
defaultModel: 'gpt-5',
|
|
18
|
+
modelLookup: {
|
|
19
|
+
kind: 'listSearch',
|
|
20
|
+
nodeType: '@n8n/n8n-nodes-langchain.lmChatOpenAi',
|
|
21
|
+
version: 1.2,
|
|
22
|
+
methodName: 'searchModels',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
googlePalmApi: {
|
|
26
|
+
provider: 'google',
|
|
27
|
+
defaultModel: 'gemini-2.5-pro',
|
|
28
|
+
modelLookup: {
|
|
29
|
+
kind: 'loadOptionsRouting',
|
|
30
|
+
nodeType: '@n8n/n8n-nodes-langchain.lmChatGoogleGemini',
|
|
31
|
+
version: 1.1,
|
|
32
|
+
propertyName: 'modelName',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
xAiApi: { provider: 'xai', defaultModel: 'grok-4' },
|
|
36
|
+
groqApi: { provider: 'groq', defaultModel: 'llama-3.1-70b-versatile' },
|
|
37
|
+
mistralCloudApi: {
|
|
38
|
+
provider: 'mistral',
|
|
39
|
+
defaultModel: 'mistral-large-latest',
|
|
40
|
+
modelLookup: {
|
|
41
|
+
kind: 'loadOptionsRouting',
|
|
42
|
+
nodeType: '@n8n/n8n-nodes-langchain.lmChatMistralCloud',
|
|
43
|
+
version: 1,
|
|
44
|
+
propertyName: 'model',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
deepSeekApi: { provider: 'deepseek', defaultModel: 'deepseek-chat' },
|
|
48
|
+
cohereApi: { provider: 'cohere', defaultModel: 'command-r-plus' },
|
|
49
|
+
openRouterApi: {
|
|
50
|
+
provider: 'openrouter',
|
|
51
|
+
defaultModel: 'anthropic/claude-sonnet-4.6',
|
|
52
|
+
modelLookup: {
|
|
53
|
+
kind: 'loadOptionsRouting',
|
|
54
|
+
nodeType: '@n8n/n8n-nodes-langchain.lmChatOpenRouter',
|
|
55
|
+
version: 1,
|
|
56
|
+
propertyName: 'model',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=llm-provider-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-provider-defaults.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/interactive/llm-provider-defaults.ts"],"names":[],"mappings":";;;AAuCa,QAAA,qBAAqB,GAAuC;IACxE,YAAY,EAAE;QACb,QAAQ,EAAE,WAAW;QACrB,YAAY,EAAE,mBAAmB;QACjC,WAAW,EAAE;YACZ,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,0CAA0C;YACpD,OAAO,EAAE,GAAG;YACZ,UAAU,EAAE,cAAc;SAC1B;KACD;IACD,SAAS,EAAE;QACV,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,OAAO;QACrB,WAAW,EAAE;YACZ,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,uCAAuC;YACjD,OAAO,EAAE,GAAG;YACZ,UAAU,EAAE,cAAc;SAC1B;KACD;IACD,aAAa,EAAE;QACd,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,gBAAgB;QAC9B,WAAW,EAAE;YACZ,IAAI,EAAE,oBAAoB;YAC1B,QAAQ,EAAE,6CAA6C;YACvD,OAAO,EAAE,GAAG;YACZ,YAAY,EAAE,WAAW;SACzB;KACD;IACD,MAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE;IACnD,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,yBAAyB,EAAE;IACtE,eAAe,EAAE;QAChB,QAAQ,EAAE,SAAS;QACnB,YAAY,EAAE,sBAAsB;QACpC,WAAW,EAAE;YACZ,IAAI,EAAE,oBAAoB;YAC1B,QAAQ,EAAE,6CAA6C;YACvD,OAAO,EAAE,CAAC;YACV,YAAY,EAAE,OAAO;SACrB;KACD;IACD,WAAW,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE;IACpE,SAAS,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,gBAAgB,EAAE;IACjE,aAAa,EAAE;QACd,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,6BAA6B;QAC3C,WAAW,EAAE;YACZ,IAAI,EAAE,oBAAoB;YAC1B,QAAQ,EAAE,2CAA2C;YACrD,OAAO,EAAE,CAAC;YACV,YAAY,EAAE,OAAO;SACrB;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BuiltTool, CredentialProvider } from '@n8n/agents';
|
|
2
|
+
import { type ModelLookupConfig } from './llm-provider-defaults';
|
|
3
|
+
export interface ModelLookup {
|
|
4
|
+
list(credentialId: string, credentialType: string, lookup: ModelLookupConfig): Promise<Array<{
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}>>;
|
|
8
|
+
}
|
|
9
|
+
export interface ResolveLlmToolDeps {
|
|
10
|
+
credentialProvider: CredentialProvider;
|
|
11
|
+
modelLookup: ModelLookup;
|
|
12
|
+
}
|
|
13
|
+
export declare function buildResolveLlmTool(deps: ResolveLlmToolDeps): BuiltTool;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildResolveLlmTool = buildResolveLlmTool;
|
|
4
|
+
const agents_1 = require("@n8n/agents");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const builder_tool_names_1 = require("../builder-tool-names");
|
|
7
|
+
const llm_provider_defaults_1 = require("./llm-provider-defaults");
|
|
8
|
+
function findProviderDefault(provider) {
|
|
9
|
+
const requestedProvider = provider.trim();
|
|
10
|
+
return Object.entries(llm_provider_defaults_1.LLM_PROVIDER_DEFAULTS).find(([, defaults]) => defaults.provider === requestedProvider);
|
|
11
|
+
}
|
|
12
|
+
function toLlmResolution(credential, defaults, model) {
|
|
13
|
+
return {
|
|
14
|
+
ok: true,
|
|
15
|
+
provider: defaults.provider,
|
|
16
|
+
model: model?.trim() || defaults.defaultModel,
|
|
17
|
+
credentialId: credential.id,
|
|
18
|
+
credentialName: credential.name,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
async function resolveModelAgainstLookup(credential, defaults, requestedModel, modelLookup) {
|
|
22
|
+
const trimmedModel = requestedModel.trim();
|
|
23
|
+
if (!defaults.modelLookup || !trimmedModel) {
|
|
24
|
+
return toLlmResolution(credential, defaults, requestedModel);
|
|
25
|
+
}
|
|
26
|
+
let availableModels;
|
|
27
|
+
try {
|
|
28
|
+
availableModels = await modelLookup.list(credential.id, credential.type, defaults.modelLookup);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
return {
|
|
32
|
+
ok: false,
|
|
33
|
+
reason: 'model_lookup_failed',
|
|
34
|
+
provider: defaults.provider,
|
|
35
|
+
requestedModel: trimmedModel,
|
|
36
|
+
error: error instanceof Error ? error.message : String(error),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const lowerHint = trimmedModel.toLowerCase();
|
|
40
|
+
const exactMatch = availableModels.find((m) => m.value.toLowerCase() === lowerHint);
|
|
41
|
+
if (exactMatch) {
|
|
42
|
+
return toLlmResolution(credential, defaults, exactMatch.value);
|
|
43
|
+
}
|
|
44
|
+
const candidates = availableModels.filter((m) => m.value.toLowerCase().includes(lowerHint) || m.name.toLowerCase().includes(lowerHint));
|
|
45
|
+
if (candidates.length === 1) {
|
|
46
|
+
return toLlmResolution(credential, defaults, candidates[0].value);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
ok: false,
|
|
50
|
+
reason: 'unknown_model',
|
|
51
|
+
provider: defaults.provider,
|
|
52
|
+
requestedModel: trimmedModel,
|
|
53
|
+
availableModels: candidates.length > 0 ? candidates : availableModels,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function buildResolveLlmTool(deps) {
|
|
57
|
+
return new agents_1.Tool(builder_tool_names_1.BUILDER_TOOLS.RESOLVE_LLM)
|
|
58
|
+
.description('Resolve the agent main LLM without showing a picker. Use this when the user ' +
|
|
59
|
+
'explicitly requests a provider/model, or when a fresh agent needs a default LLM. ' +
|
|
60
|
+
'If provider is given, resolves only that provider; if model is omitted, uses the ' +
|
|
61
|
+
'provider default model. For "Anthropic via OpenRouter", pass provider="openrouter" ' +
|
|
62
|
+
'and omit model unless the user named a concrete OpenRouter model id. Returns ok=false ' +
|
|
63
|
+
'when credentials are missing, unsupported, or ambiguous; use ask_llm only when the ' +
|
|
64
|
+
'user must choose.')
|
|
65
|
+
.input(zod_1.z.object({
|
|
66
|
+
provider: zod_1.z
|
|
67
|
+
.string()
|
|
68
|
+
.optional()
|
|
69
|
+
.describe('Requested provider, e.g. "anthropic", "openai", or "openrouter".'),
|
|
70
|
+
model: zod_1.z
|
|
71
|
+
.string()
|
|
72
|
+
.optional()
|
|
73
|
+
.describe('Requested model without the selected provider prefix. For OpenRouter use the routed id, e.g. "anthropic/claude-sonnet-4.6".'),
|
|
74
|
+
}))
|
|
75
|
+
.handler(async ({ provider, model }) => {
|
|
76
|
+
const all = await deps.credentialProvider.list();
|
|
77
|
+
const llmCredentials = all.filter((credential) => llm_provider_defaults_1.LLM_PROVIDER_DEFAULTS[credential.type]);
|
|
78
|
+
if (provider) {
|
|
79
|
+
const providerEntry = findProviderDefault(provider);
|
|
80
|
+
if (!providerEntry) {
|
|
81
|
+
return {
|
|
82
|
+
ok: false,
|
|
83
|
+
reason: 'unsupported_provider',
|
|
84
|
+
provider,
|
|
85
|
+
supportedProviders: Object.values(llm_provider_defaults_1.LLM_PROVIDER_DEFAULTS).map((defaults) => defaults.provider),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
const [credentialType, defaults] = providerEntry;
|
|
89
|
+
const matchingCredentials = llmCredentials.filter((credential) => credential.type === credentialType);
|
|
90
|
+
if (matchingCredentials.length === 1) {
|
|
91
|
+
const credential = matchingCredentials[0];
|
|
92
|
+
if (model?.trim()) {
|
|
93
|
+
return await resolveModelAgainstLookup(credential, defaults, model, deps.modelLookup);
|
|
94
|
+
}
|
|
95
|
+
return toLlmResolution(credential, defaults);
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
ok: false,
|
|
99
|
+
reason: matchingCredentials.length === 0
|
|
100
|
+
? 'missing_credential'
|
|
101
|
+
: 'ambiguous_credential',
|
|
102
|
+
provider: defaults.provider,
|
|
103
|
+
credentialType,
|
|
104
|
+
credentials: matchingCredentials.map((credential) => ({
|
|
105
|
+
id: credential.id,
|
|
106
|
+
name: credential.name,
|
|
107
|
+
})),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
if (llmCredentials.length === 1) {
|
|
111
|
+
const credential = llmCredentials[0];
|
|
112
|
+
const defaults = llm_provider_defaults_1.LLM_PROVIDER_DEFAULTS[credential.type];
|
|
113
|
+
if (model?.trim()) {
|
|
114
|
+
return await resolveModelAgainstLookup(credential, defaults, model, deps.modelLookup);
|
|
115
|
+
}
|
|
116
|
+
return toLlmResolution(credential, defaults);
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
ok: false,
|
|
120
|
+
reason: llmCredentials.length === 0
|
|
121
|
+
? 'missing_credential'
|
|
122
|
+
: 'ambiguous_provider_or_credential',
|
|
123
|
+
credentials: llmCredentials.map((credential) => {
|
|
124
|
+
const defaults = llm_provider_defaults_1.LLM_PROVIDER_DEFAULTS[credential.type];
|
|
125
|
+
return {
|
|
126
|
+
id: credential.id,
|
|
127
|
+
name: credential.name,
|
|
128
|
+
type: credential.type,
|
|
129
|
+
provider: defaults.provider,
|
|
130
|
+
};
|
|
131
|
+
}),
|
|
132
|
+
};
|
|
133
|
+
})
|
|
134
|
+
.build();
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=resolve-llm.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-llm.tool.js","sourceRoot":"","sources":["../../../../../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,CAAE,oBAA8B;gBACjC,CAAC,CAAE,kCAA4C;YACjD,WAAW,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;gBAC9C,MAAM,QAAQ,GAAG,6CAAqB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBACxD,OAAO;oBACN,EAAE,EAAE,UAAU,CAAC,EAAE;oBACjB,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;iBAC3B,CAAC;YACH,CAAC,CAAC;SACF,CAAC;IACH,CAAC,CAAC;SACD,KAAK,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.AgentCheckpoint = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
const agent_entity_1 = require("./agent.entity");
|
|
16
|
+
let AgentCheckpoint = class AgentCheckpoint extends db_1.WithTimestamps {
|
|
17
|
+
};
|
|
18
|
+
exports.AgentCheckpoint = AgentCheckpoint;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryColumn)({ type: 'varchar', length: 255 }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], AgentCheckpoint.prototype, "runId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.ManyToOne)(() => agent_entity_1.Agent, { nullable: true, onDelete: 'CASCADE' }),
|
|
25
|
+
(0, typeorm_1.JoinColumn)({ name: 'agentId' }),
|
|
26
|
+
__metadata("design:type", Object)
|
|
27
|
+
], AgentCheckpoint.prototype, "agent", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], AgentCheckpoint.prototype, "agentId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], AgentCheckpoint.prototype, "state", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], AgentCheckpoint.prototype, "expired", void 0);
|
|
40
|
+
exports.AgentCheckpoint = AgentCheckpoint = __decorate([
|
|
41
|
+
(0, typeorm_1.Entity)({ name: 'agent_checkpoints' })
|
|
42
|
+
], AgentCheckpoint);
|
|
43
|
+
//# sourceMappingURL=agent-checkpoint.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-checkpoint.entity.js","sourceRoot":"","sources":["../../../../src/modules/agents/entities/agent-checkpoint.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAyC;AACzC,0CAAoF;AAEpF,iDAAuC;AAGhC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,mBAAc;CAgBlD,CAAA;AAhBY,0CAAe;AAE3B;IADC,IAAA,uBAAa,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;8CAClC;AAId;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC/D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;8CACZ;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAClC;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACpB;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gDAC3B;0BAfL,eAAe;IAD3B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;GACzB,eAAe,CAgB3B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Project, WithTimestampsAndStringId } from '@n8n/db';
|
|
2
|
+
import { Agent } from './agent.entity';
|
|
3
|
+
export declare class AgentExecutionThread extends WithTimestampsAndStringId {
|
|
4
|
+
agent: Agent;
|
|
5
|
+
agentId: string;
|
|
6
|
+
agentName: string;
|
|
7
|
+
title: string | null;
|
|
8
|
+
emoji: string | null;
|
|
9
|
+
project: Project;
|
|
10
|
+
projectId: string;
|
|
11
|
+
sessionNumber: number;
|
|
12
|
+
totalPromptTokens: number;
|
|
13
|
+
totalCompletionTokens: number;
|
|
14
|
+
totalCost: number;
|
|
15
|
+
totalDuration: number;
|
|
16
|
+
}
|