n8n 2.20.7 → 2.21.1
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,24 @@
|
|
|
1
|
+
import type { AgentIntegration, AgentSkill } from '@n8n/api-types';
|
|
2
|
+
import type { ToolDescriptor } from '@n8n/agents';
|
|
3
|
+
import { Project, WithTimestampsAndStringId } from '@n8n/db';
|
|
4
|
+
import { type Relation } from '@n8n/typeorm';
|
|
5
|
+
import type { AgentPublishedVersion } from './agent-published-version.entity';
|
|
6
|
+
import type { AgentJsonConfig } from '../json-config/agent-json-config';
|
|
7
|
+
export declare class Agent extends WithTimestampsAndStringId {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string | null;
|
|
10
|
+
project: Project;
|
|
11
|
+
projectId: string;
|
|
12
|
+
credentialId: string | null;
|
|
13
|
+
provider: string | null;
|
|
14
|
+
model: string | null;
|
|
15
|
+
schema: AgentJsonConfig | null;
|
|
16
|
+
integrations: AgentIntegration[];
|
|
17
|
+
tools: Record<string, {
|
|
18
|
+
code: string;
|
|
19
|
+
descriptor: ToolDescriptor;
|
|
20
|
+
}>;
|
|
21
|
+
skills: Record<string, AgentSkill>;
|
|
22
|
+
versionId: string | null;
|
|
23
|
+
publishedVersion?: Relation<AgentPublishedVersion> | null;
|
|
24
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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.Agent = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
let Agent = class Agent extends db_1.WithTimestampsAndStringId {
|
|
16
|
+
};
|
|
17
|
+
exports.Agent = Agent;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 128 }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], Agent.prototype, "name", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 512, nullable: true }),
|
|
24
|
+
__metadata("design:type", Object)
|
|
25
|
+
], Agent.prototype, "description", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(() => db_1.Project, { onDelete: 'CASCADE' }),
|
|
28
|
+
(0, typeorm_1.JoinColumn)({ name: 'projectId' }),
|
|
29
|
+
__metadata("design:type", db_1.Project)
|
|
30
|
+
], Agent.prototype, "project", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Agent.prototype, "projectId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], Agent.prototype, "credentialId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], Agent.prototype, "provider", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], Agent.prototype, "model", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, db_1.JsonColumn)({ nullable: true, default: null }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], Agent.prototype, "schema", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, db_1.JsonColumn)({ default: '[]' }),
|
|
53
|
+
__metadata("design:type", Array)
|
|
54
|
+
], Agent.prototype, "integrations", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, db_1.JsonColumn)({ default: '{}' }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], Agent.prototype, "tools", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, db_1.JsonColumn)({ default: '{}' }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], Agent.prototype, "skills", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36, nullable: true }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], Agent.prototype, "versionId", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.OneToOne)('AgentPublishedVersion', 'agent', { nullable: true }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], Agent.prototype, "publishedVersion", void 0);
|
|
71
|
+
exports.Agent = Agent = __decorate([
|
|
72
|
+
(0, typeorm_1.Entity)({ name: 'agents' })
|
|
73
|
+
], Agent);
|
|
74
|
+
//# sourceMappingURL=agent.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.entity.js","sourceRoot":"","sources":["../../../../src/modules/agents/entities/agent.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,gCAAyE;AACzE,0CAA8F;AAMvF,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,8BAAyB;CA+CnD,CAAA;AA/CY,sBAAK;AAEjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;mCAC5B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC9B;AAI3B;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,YAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACjD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;8BACzB,YAAO;sCAAC;AAGjB;IADC,IAAA,gBAAM,GAAE;;wCACS;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAChB;AAG5B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACpB;AAGxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oCACvB;AAGrB;IADC,IAAA,eAAU,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;qCACf;AAG/B;IADC,IAAA,eAAU,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2CACG;AAGjC;IADC,IAAA,eAAU,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;oCAO5B;AAGF;IADC,IAAA,eAAU,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;qCACK;AAInC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCAC/B;AAGzB;IADC,IAAA,kBAAQ,EAAC,uBAAuB,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACL;gBA9C9C,KAAK;IADjB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;GACd,KAAK,CA+CjB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type StreamChunk } from '@n8n/agents';
|
|
2
|
+
import type { ToolRegistry } from './tool-registry';
|
|
3
|
+
export interface RecordedUsage {
|
|
4
|
+
promptTokens: number;
|
|
5
|
+
completionTokens: number;
|
|
6
|
+
totalTokens: number;
|
|
7
|
+
}
|
|
8
|
+
export interface RecordedToolCall {
|
|
9
|
+
name: string;
|
|
10
|
+
input: unknown;
|
|
11
|
+
output: unknown;
|
|
12
|
+
}
|
|
13
|
+
export type TimelineEvent = {
|
|
14
|
+
type: 'text';
|
|
15
|
+
content: string;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
endTime?: number;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'tool-call';
|
|
20
|
+
kind: 'tool' | 'workflow' | 'node';
|
|
21
|
+
name: string;
|
|
22
|
+
toolCallId: string;
|
|
23
|
+
input: unknown;
|
|
24
|
+
output: unknown;
|
|
25
|
+
startTime: number;
|
|
26
|
+
endTime: number;
|
|
27
|
+
success: boolean;
|
|
28
|
+
workflowId?: string;
|
|
29
|
+
workflowName?: string;
|
|
30
|
+
workflowExecutionId?: string;
|
|
31
|
+
triggerType?: string;
|
|
32
|
+
nodeType?: string;
|
|
33
|
+
nodeTypeVersion?: number;
|
|
34
|
+
nodeDisplayName?: string;
|
|
35
|
+
nodeParameters?: Record<string, unknown>;
|
|
36
|
+
} | {
|
|
37
|
+
type: 'working-memory';
|
|
38
|
+
content: string;
|
|
39
|
+
timestamp: number;
|
|
40
|
+
} | {
|
|
41
|
+
type: 'suspension';
|
|
42
|
+
toolName: string;
|
|
43
|
+
toolCallId: string;
|
|
44
|
+
timestamp: number;
|
|
45
|
+
};
|
|
46
|
+
export interface MessageRecord {
|
|
47
|
+
assistantResponse: string;
|
|
48
|
+
model: string | null;
|
|
49
|
+
finishReason: string;
|
|
50
|
+
usage: RecordedUsage | null;
|
|
51
|
+
totalCost: number | null;
|
|
52
|
+
toolCalls: RecordedToolCall[];
|
|
53
|
+
timeline: TimelineEvent[];
|
|
54
|
+
startTime: number;
|
|
55
|
+
duration: number;
|
|
56
|
+
error: string | null;
|
|
57
|
+
workingMemory: string | null;
|
|
58
|
+
}
|
|
59
|
+
export declare class ExecutionRecorder {
|
|
60
|
+
private readonly registry;
|
|
61
|
+
constructor(registry?: ToolRegistry);
|
|
62
|
+
private textParts;
|
|
63
|
+
private textBuffer;
|
|
64
|
+
private model;
|
|
65
|
+
private finishReason;
|
|
66
|
+
private usage;
|
|
67
|
+
private totalCost;
|
|
68
|
+
private toolCalls;
|
|
69
|
+
private timeline;
|
|
70
|
+
private textStartTime;
|
|
71
|
+
private _suspended;
|
|
72
|
+
private error;
|
|
73
|
+
private workingMemory;
|
|
74
|
+
private readonly startTime;
|
|
75
|
+
record(chunk: StreamChunk): void;
|
|
76
|
+
get suspended(): boolean;
|
|
77
|
+
getMessageRecord(): MessageRecord;
|
|
78
|
+
private flushTextBuffer;
|
|
79
|
+
private recordWorkingMemoryUpdate;
|
|
80
|
+
private recordToolCall;
|
|
81
|
+
private recordToolResult;
|
|
82
|
+
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExecutionRecorder = void 0;
|
|
4
|
+
const agents_1 = require("@n8n/agents");
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
function workingMemoryContentFromInput(input) {
|
|
7
|
+
if (input && typeof input === 'object' && !Array.isArray(input)) {
|
|
8
|
+
const maybe = input.memory;
|
|
9
|
+
if (typeof maybe === 'string')
|
|
10
|
+
return maybe;
|
|
11
|
+
}
|
|
12
|
+
return JSON.stringify(input, null, 2);
|
|
13
|
+
}
|
|
14
|
+
function resolveFromAIInValue(value, llmArgs) {
|
|
15
|
+
if (typeof value === 'string')
|
|
16
|
+
return resolveFromAIInString(value, llmArgs);
|
|
17
|
+
if (Array.isArray(value))
|
|
18
|
+
return value.map((v) => resolveFromAIInValue(v, llmArgs));
|
|
19
|
+
if (value !== null && typeof value === 'object') {
|
|
20
|
+
const out = {};
|
|
21
|
+
for (const [k, v] of Object.entries(value)) {
|
|
22
|
+
out[k] = resolveFromAIInValue(v, llmArgs);
|
|
23
|
+
}
|
|
24
|
+
return out;
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
function resolveFromAIInString(str, llmArgs) {
|
|
29
|
+
if (!str.includes('$fromAI'))
|
|
30
|
+
return str;
|
|
31
|
+
let calls;
|
|
32
|
+
try {
|
|
33
|
+
calls = (0, n8n_workflow_1.extractFromAICalls)(str);
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return str;
|
|
37
|
+
}
|
|
38
|
+
if (calls.length === 0)
|
|
39
|
+
return str;
|
|
40
|
+
if ((0, n8n_workflow_1.isFromAIOnlyExpression)(str)) {
|
|
41
|
+
const call = calls[0];
|
|
42
|
+
if (call.key in llmArgs)
|
|
43
|
+
return llmArgs[call.key];
|
|
44
|
+
if (call.defaultValue !== undefined)
|
|
45
|
+
return call.defaultValue;
|
|
46
|
+
return str;
|
|
47
|
+
}
|
|
48
|
+
const pattern = /\$fromAI\s*\([^)]*\)/g;
|
|
49
|
+
return str.replace(pattern, (match) => {
|
|
50
|
+
try {
|
|
51
|
+
const inner = (0, n8n_workflow_1.extractFromAICalls)(match);
|
|
52
|
+
if (inner.length === 0)
|
|
53
|
+
return match;
|
|
54
|
+
const call = inner[0];
|
|
55
|
+
const resolved = call.key in llmArgs
|
|
56
|
+
? llmArgs[call.key]
|
|
57
|
+
: call.defaultValue !== undefined
|
|
58
|
+
? call.defaultValue
|
|
59
|
+
: undefined;
|
|
60
|
+
if (resolved === undefined)
|
|
61
|
+
return match;
|
|
62
|
+
if (typeof resolved === 'object')
|
|
63
|
+
return JSON.stringify(resolved);
|
|
64
|
+
return String(resolved);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return match;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function isRecord(v) {
|
|
72
|
+
return typeof v === 'object' && v !== null;
|
|
73
|
+
}
|
|
74
|
+
class ExecutionRecorder {
|
|
75
|
+
constructor(registry) {
|
|
76
|
+
this.textParts = [];
|
|
77
|
+
this.textBuffer = [];
|
|
78
|
+
this.model = null;
|
|
79
|
+
this.finishReason = 'unknown';
|
|
80
|
+
this.usage = null;
|
|
81
|
+
this.totalCost = null;
|
|
82
|
+
this.toolCalls = [];
|
|
83
|
+
this.timeline = [];
|
|
84
|
+
this.textStartTime = null;
|
|
85
|
+
this._suspended = false;
|
|
86
|
+
this.error = null;
|
|
87
|
+
this.workingMemory = null;
|
|
88
|
+
this.startTime = Date.now();
|
|
89
|
+
this.registry = registry ?? new Map();
|
|
90
|
+
}
|
|
91
|
+
record(chunk) {
|
|
92
|
+
switch (chunk.type) {
|
|
93
|
+
case 'text-delta':
|
|
94
|
+
if (this.textStartTime === null)
|
|
95
|
+
this.textStartTime = Date.now();
|
|
96
|
+
this.textParts.push(chunk.delta);
|
|
97
|
+
this.textBuffer.push(chunk.delta);
|
|
98
|
+
break;
|
|
99
|
+
case 'tool-call':
|
|
100
|
+
if (chunk.toolName === agents_1.UPDATE_WORKING_MEMORY_TOOL_NAME) {
|
|
101
|
+
this.recordWorkingMemoryUpdate(workingMemoryContentFromInput(chunk.input));
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
this.recordToolCall(chunk.toolCallId, chunk.toolName, chunk.input);
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
107
|
+
case 'tool-result':
|
|
108
|
+
if (chunk.toolName === agents_1.UPDATE_WORKING_MEMORY_TOOL_NAME) {
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
this.recordToolResult(chunk.toolCallId, chunk.toolName, chunk.output, chunk.isError === true);
|
|
112
|
+
break;
|
|
113
|
+
case 'finish':
|
|
114
|
+
this.flushTextBuffer();
|
|
115
|
+
this.finishReason = chunk.finishReason;
|
|
116
|
+
if (chunk.usage) {
|
|
117
|
+
this.usage = {
|
|
118
|
+
promptTokens: chunk.usage.promptTokens,
|
|
119
|
+
completionTokens: chunk.usage.completionTokens,
|
|
120
|
+
totalTokens: chunk.usage.totalTokens,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
this.model = chunk.model ?? null;
|
|
124
|
+
this.totalCost = chunk.totalCost ?? chunk.usage?.cost ?? null;
|
|
125
|
+
break;
|
|
126
|
+
case 'tool-call-suspended':
|
|
127
|
+
this.flushTextBuffer();
|
|
128
|
+
this._suspended = true;
|
|
129
|
+
this.timeline.push({
|
|
130
|
+
type: 'suspension',
|
|
131
|
+
toolName: chunk.toolName ?? '',
|
|
132
|
+
toolCallId: chunk.toolCallId ?? '',
|
|
133
|
+
timestamp: Date.now(),
|
|
134
|
+
});
|
|
135
|
+
break;
|
|
136
|
+
case 'error': {
|
|
137
|
+
const errMsg = chunk.error instanceof Error ? chunk.error.message : String(chunk.error);
|
|
138
|
+
this.error = errMsg;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
get suspended() {
|
|
144
|
+
return this._suspended;
|
|
145
|
+
}
|
|
146
|
+
getMessageRecord() {
|
|
147
|
+
this.flushTextBuffer();
|
|
148
|
+
return {
|
|
149
|
+
assistantResponse: this.textParts.join(''),
|
|
150
|
+
model: this.model,
|
|
151
|
+
finishReason: this.finishReason,
|
|
152
|
+
usage: this.usage,
|
|
153
|
+
totalCost: this.totalCost,
|
|
154
|
+
toolCalls: this.toolCalls,
|
|
155
|
+
timeline: this.timeline,
|
|
156
|
+
startTime: this.startTime,
|
|
157
|
+
duration: Date.now() - this.startTime,
|
|
158
|
+
error: this.error,
|
|
159
|
+
workingMemory: this.workingMemory,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
flushTextBuffer() {
|
|
163
|
+
if (this.textBuffer.length === 0)
|
|
164
|
+
return;
|
|
165
|
+
const content = this.textBuffer.join('');
|
|
166
|
+
if (content.trim()) {
|
|
167
|
+
const now = Date.now();
|
|
168
|
+
this.timeline.push({
|
|
169
|
+
type: 'text',
|
|
170
|
+
content,
|
|
171
|
+
timestamp: this.textStartTime ?? now,
|
|
172
|
+
endTime: now,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
this.textBuffer = [];
|
|
176
|
+
this.textStartTime = null;
|
|
177
|
+
}
|
|
178
|
+
recordWorkingMemoryUpdate(content) {
|
|
179
|
+
this.flushTextBuffer();
|
|
180
|
+
this.workingMemory = content;
|
|
181
|
+
this.timeline.push({
|
|
182
|
+
type: 'working-memory',
|
|
183
|
+
content,
|
|
184
|
+
timestamp: Date.now(),
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
recordToolCall(toolCallId, name, input) {
|
|
188
|
+
this.flushTextBuffer();
|
|
189
|
+
this.toolCalls.push({ name, input, output: undefined });
|
|
190
|
+
const entry = this.registry.get(name);
|
|
191
|
+
const llmArgs = input !== null && typeof input === 'object' ? input : {};
|
|
192
|
+
const resolvedNodeParameters = entry?.nodeParameters !== undefined
|
|
193
|
+
? resolveFromAIInValue(entry.nodeParameters, llmArgs)
|
|
194
|
+
: undefined;
|
|
195
|
+
this.timeline.push({
|
|
196
|
+
type: 'tool-call',
|
|
197
|
+
kind: entry?.kind ?? 'tool',
|
|
198
|
+
name,
|
|
199
|
+
toolCallId,
|
|
200
|
+
input,
|
|
201
|
+
output: undefined,
|
|
202
|
+
startTime: Date.now(),
|
|
203
|
+
endTime: 0,
|
|
204
|
+
success: false,
|
|
205
|
+
workflowId: entry?.workflowId,
|
|
206
|
+
workflowName: entry?.workflowName,
|
|
207
|
+
triggerType: entry?.triggerType,
|
|
208
|
+
nodeType: entry?.nodeType,
|
|
209
|
+
nodeTypeVersion: entry?.nodeTypeVersion,
|
|
210
|
+
nodeDisplayName: entry?.nodeDisplayName,
|
|
211
|
+
nodeParameters: resolvedNodeParameters,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
recordToolResult(toolCallId, name, output, isError) {
|
|
215
|
+
const pendingFlat = [...this.toolCalls]
|
|
216
|
+
.reverse()
|
|
217
|
+
.find((tc) => tc.name === name && tc.output === undefined);
|
|
218
|
+
if (pendingFlat) {
|
|
219
|
+
pendingFlat.output = output;
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
this.toolCalls.push({ name, input: undefined, output });
|
|
223
|
+
}
|
|
224
|
+
const pendingTimeline = [...this.timeline]
|
|
225
|
+
.reverse()
|
|
226
|
+
.find((e) => e.type === 'tool-call' &&
|
|
227
|
+
(toolCallId ? e.toolCallId === toolCallId : e.name === name) &&
|
|
228
|
+
e.endTime === 0);
|
|
229
|
+
if (pendingTimeline) {
|
|
230
|
+
pendingTimeline.output = output;
|
|
231
|
+
pendingTimeline.endTime = Date.now();
|
|
232
|
+
pendingTimeline.success = !isError;
|
|
233
|
+
if (pendingTimeline.kind === 'workflow' && isRecord(output)) {
|
|
234
|
+
const execId = output.executionId;
|
|
235
|
+
if (typeof execId === 'string') {
|
|
236
|
+
pendingTimeline.workflowExecutionId = execId;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
this.flushTextBuffer();
|
|
242
|
+
const entry = this.registry.get(name);
|
|
243
|
+
const now = Date.now();
|
|
244
|
+
const synthesized = {
|
|
245
|
+
type: 'tool-call',
|
|
246
|
+
kind: entry?.kind ?? 'tool',
|
|
247
|
+
name,
|
|
248
|
+
toolCallId,
|
|
249
|
+
input: undefined,
|
|
250
|
+
output,
|
|
251
|
+
startTime: now,
|
|
252
|
+
endTime: now,
|
|
253
|
+
success: !isError,
|
|
254
|
+
workflowId: entry?.workflowId,
|
|
255
|
+
workflowName: entry?.workflowName,
|
|
256
|
+
triggerType: entry?.triggerType,
|
|
257
|
+
nodeType: entry?.nodeType,
|
|
258
|
+
nodeTypeVersion: entry?.nodeTypeVersion,
|
|
259
|
+
nodeDisplayName: entry?.nodeDisplayName,
|
|
260
|
+
nodeParameters: entry?.nodeParameters,
|
|
261
|
+
};
|
|
262
|
+
if (synthesized.kind === 'workflow' && isRecord(output)) {
|
|
263
|
+
const execId = output.executionId;
|
|
264
|
+
if (typeof execId === 'string') {
|
|
265
|
+
synthesized.workflowExecutionId = execId;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
this.timeline.push(synthesized);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
exports.ExecutionRecorder = ExecutionRecorder;
|
|
272
|
+
//# sourceMappingURL=execution-recorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-recorder.js","sourceRoot":"","sources":["../../../src/modules/agents/execution-recorder.ts"],"names":[],"mappings":";;;AAAA,wCAAgF;AAChF,+CAA0E;AAK1E,SAAS,6BAA6B,CAAC,KAAc;IACpD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjE,MAAM,KAAK,GAAI,KAAiC,CAAC,MAAM,CAAC;QACxD,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;IAC7C,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACvC,CAAC;AAaD,SAAS,oBAAoB,CAAC,KAAc,EAAE,OAAgC;IAC7E,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC5E,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IACpF,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACjD,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC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G;YACZ,OAAO,EAAE,CAAC,OAAO;YACjB,UAAU,EAAE,KAAK,EAAE,UAAU;YAC7B,YAAY,EAAE,KAAK,EAAE,YAAY;YACjC,WAAW,EAAE,KAAK,EAAE,WAAW;YAC/B,QAAQ,EAAE,KAAK,EAAE,QAAQ;YACzB,eAAe,EAAE,KAAK,EAAE,eAAe;YACvC,eAAe,EAAE,KAAK,EAAE,eAAe;YACvC,cAAc,EAAE,KAAK,EAAE,cAAc;SACrC,CAAC;QACF,IAAI,WAAW,CAAC,IAAI,KAAK,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACzD,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC;YAClC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;gBAChC,WAAW,CAAC,mBAAmB,GAAG,MAAM,CAAC;YAC1C,CAAC;QACF,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;CACD;AAtQD,8CAsQC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { StreamChunk } from '@n8n/agents';
|
|
2
|
+
import type { Chat } from 'chat';
|
|
3
|
+
import type { Logger } from 'n8n-workflow';
|
|
4
|
+
import type { AgentsService } from '../agents.service';
|
|
5
|
+
import type { ComponentMapper } from './component-mapper';
|
|
6
|
+
import { type InternalThread } from './types';
|
|
7
|
+
interface AgentExecutor {
|
|
8
|
+
executeForChatPublished(config: {
|
|
9
|
+
agentId: string;
|
|
10
|
+
projectId: string;
|
|
11
|
+
message: string;
|
|
12
|
+
memory: {
|
|
13
|
+
threadId: InternalThread;
|
|
14
|
+
resourceId: string;
|
|
15
|
+
};
|
|
16
|
+
integrationType?: string;
|
|
17
|
+
}): AsyncGenerator<StreamChunk>;
|
|
18
|
+
resumeForChat(config: {
|
|
19
|
+
agentId: string;
|
|
20
|
+
projectId: string;
|
|
21
|
+
runId: string;
|
|
22
|
+
toolCallId: string;
|
|
23
|
+
resumeData: unknown;
|
|
24
|
+
integrationType?: string;
|
|
25
|
+
}): AsyncGenerator<StreamChunk>;
|
|
26
|
+
}
|
|
27
|
+
export declare class AgentChatBridge {
|
|
28
|
+
private readonly chat;
|
|
29
|
+
private readonly agentId;
|
|
30
|
+
private readonly agentService;
|
|
31
|
+
private readonly componentMapper;
|
|
32
|
+
private readonly logger;
|
|
33
|
+
private readonly n8nProjectId;
|
|
34
|
+
private readonly integrationType;
|
|
35
|
+
private readonly activeResumedRuns;
|
|
36
|
+
private readonly callbackStore?;
|
|
37
|
+
private readonly disableStreaming;
|
|
38
|
+
private readonly integration;
|
|
39
|
+
private readonly richInteractionInputs;
|
|
40
|
+
constructor(chat: Chat, agentId: string, agentService: AgentExecutor, componentMapper: ComponentMapper, logger: Logger, n8nProjectId: string, integrationType: string);
|
|
41
|
+
static create(chat: Chat, agentId: string, agentService: AgentsService, componentMapper: ComponentMapper, logger: Logger, n8nProjectId: string, integrationType: string): AgentChatBridge;
|
|
42
|
+
private registerHandlers;
|
|
43
|
+
dispose(): void;
|
|
44
|
+
private resolveThreadId;
|
|
45
|
+
private getShortenCallback;
|
|
46
|
+
private executeAndStream;
|
|
47
|
+
private consumeStream;
|
|
48
|
+
private consumeStreamBuffered;
|
|
49
|
+
private handleSuspension;
|
|
50
|
+
private handleRichInteraction;
|
|
51
|
+
private stashRichInteractionInput;
|
|
52
|
+
private isRichInteractionDisplayOnly;
|
|
53
|
+
private handleDisplayOnly;
|
|
54
|
+
private handleMessage;
|
|
55
|
+
private parseActionId;
|
|
56
|
+
private resolveCallbackData;
|
|
57
|
+
private cleanUpBeforeResume;
|
|
58
|
+
private executeResume;
|
|
59
|
+
private handleAction;
|
|
60
|
+
private postErrorToThread;
|
|
61
|
+
}
|
|
62
|
+
export {};
|