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,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentJsonConfigPartialSchema = exports.AgentJsonConfigSchema = exports.NodeConfigSchema = void 0;
|
|
4
|
+
exports.tryParseConfigJson = tryParseConfigJson;
|
|
5
|
+
exports.formatZodErrors = formatZodErrors;
|
|
6
|
+
exports.isNodeToolsEnabled = isNodeToolsEnabled;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const integration_config_1 = require("./integration-config");
|
|
9
|
+
const SemanticRecallSchema = zod_1.z.object({
|
|
10
|
+
topK: zod_1.z.number().int().min(1).max(100),
|
|
11
|
+
scope: zod_1.z.enum(['thread', 'resource']).optional(),
|
|
12
|
+
messageRange: zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
before: zod_1.z.number().int().min(0),
|
|
15
|
+
after: zod_1.z.number().int().min(0),
|
|
16
|
+
})
|
|
17
|
+
.optional(),
|
|
18
|
+
embedder: zod_1.z.string().optional(),
|
|
19
|
+
});
|
|
20
|
+
const MemoryConfigSchema = zod_1.z.object({
|
|
21
|
+
enabled: zod_1.z.boolean(),
|
|
22
|
+
storage: zod_1.z.enum(['n8n', 'sqlite', 'postgres']),
|
|
23
|
+
connection: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
24
|
+
lastMessages: zod_1.z.number().int().min(1).max(200).optional(),
|
|
25
|
+
semanticRecall: SemanticRecallSchema.optional(),
|
|
26
|
+
});
|
|
27
|
+
const ThinkingConfigSchema = zod_1.z.object({
|
|
28
|
+
provider: zod_1.z.enum(['anthropic', 'openai']),
|
|
29
|
+
budgetTokens: zod_1.z.number().int().optional(),
|
|
30
|
+
reasoningEffort: zod_1.z.string().optional(),
|
|
31
|
+
});
|
|
32
|
+
const NodeToolCredentialSchema = zod_1.z.object({
|
|
33
|
+
id: zod_1.z.string(),
|
|
34
|
+
name: zod_1.z.string(),
|
|
35
|
+
});
|
|
36
|
+
exports.NodeConfigSchema = zod_1.z.object({
|
|
37
|
+
nodeType: zod_1.z.string().min(1),
|
|
38
|
+
nodeTypeVersion: zod_1.z.number(),
|
|
39
|
+
nodeParameters: zod_1.z.record(zod_1.z.unknown()).optional().default({}),
|
|
40
|
+
credentials: zod_1.z.record(NodeToolCredentialSchema).optional(),
|
|
41
|
+
});
|
|
42
|
+
const AgentJsonSkillConfigSchema = zod_1.z.object({
|
|
43
|
+
type: zod_1.z.literal('skill'),
|
|
44
|
+
id: zod_1.z
|
|
45
|
+
.string()
|
|
46
|
+
.min(1)
|
|
47
|
+
.regex(/^[A-Za-z0-9_-]+$/),
|
|
48
|
+
});
|
|
49
|
+
const AgentJsonToolConfigSchema = zod_1.z.discriminatedUnion('type', [
|
|
50
|
+
zod_1.z.object({
|
|
51
|
+
type: zod_1.z.literal('custom'),
|
|
52
|
+
id: zod_1.z
|
|
53
|
+
.string()
|
|
54
|
+
.min(1)
|
|
55
|
+
.regex(/^[A-Za-z0-9_-]+$/),
|
|
56
|
+
requireApproval: zod_1.z.boolean().optional(),
|
|
57
|
+
}),
|
|
58
|
+
zod_1.z
|
|
59
|
+
.object({
|
|
60
|
+
type: zod_1.z.literal('workflow'),
|
|
61
|
+
workflow: zod_1.z.string().min(1),
|
|
62
|
+
name: zod_1.z.string().optional(),
|
|
63
|
+
description: zod_1.z.string().optional(),
|
|
64
|
+
requireApproval: zod_1.z.boolean().optional(),
|
|
65
|
+
allOutputs: zod_1.z
|
|
66
|
+
.boolean()
|
|
67
|
+
.optional()
|
|
68
|
+
.describe('Whether to return all node outputs instead of just the last node'),
|
|
69
|
+
})
|
|
70
|
+
.strict(),
|
|
71
|
+
zod_1.z
|
|
72
|
+
.object({
|
|
73
|
+
type: zod_1.z.literal('node'),
|
|
74
|
+
name: zod_1.z.string().min(1),
|
|
75
|
+
description: zod_1.z.string().optional(),
|
|
76
|
+
node: exports.NodeConfigSchema,
|
|
77
|
+
requireApproval: zod_1.z.boolean().optional(),
|
|
78
|
+
})
|
|
79
|
+
.strict(),
|
|
80
|
+
]);
|
|
81
|
+
exports.AgentJsonConfigSchema = zod_1.z.object({
|
|
82
|
+
name: zod_1.z.string().min(1).max(128),
|
|
83
|
+
description: zod_1.z.string().max(512).optional(),
|
|
84
|
+
model: zod_1.z
|
|
85
|
+
.string()
|
|
86
|
+
.min(1)
|
|
87
|
+
.regex(/^[a-z0-9-]+\/(?:[a-z0-9._-]+\/)*[a-z0-9._-]+$/i, 'Model must be "provider/model-name" format (e.g. "anthropic/claude-sonnet-4-5" or "openrouter/amazon/nova-micro-v1")'),
|
|
88
|
+
credential: zod_1.z.string().optional(),
|
|
89
|
+
instructions: zod_1.z.string(),
|
|
90
|
+
memory: MemoryConfigSchema.optional(),
|
|
91
|
+
tools: zod_1.z.array(AgentJsonToolConfigSchema).optional(),
|
|
92
|
+
skills: zod_1.z.array(AgentJsonSkillConfigSchema).optional(),
|
|
93
|
+
providerTools: zod_1.z.record(zod_1.z.record(zod_1.z.unknown())).optional(),
|
|
94
|
+
integrations: zod_1.z.array(integration_config_1.AgentIntegrationSchema).optional(),
|
|
95
|
+
config: zod_1.z
|
|
96
|
+
.object({
|
|
97
|
+
thinking: ThinkingConfigSchema.optional(),
|
|
98
|
+
toolCallConcurrency: zod_1.z.number().int().min(1).max(20).optional(),
|
|
99
|
+
nodeTools: zod_1.z
|
|
100
|
+
.object({
|
|
101
|
+
enabled: zod_1.z.boolean(),
|
|
102
|
+
})
|
|
103
|
+
.optional(),
|
|
104
|
+
})
|
|
105
|
+
.optional(),
|
|
106
|
+
});
|
|
107
|
+
exports.AgentJsonConfigPartialSchema = exports.AgentJsonConfigSchema.partial();
|
|
108
|
+
function tryParseConfigJson(raw) {
|
|
109
|
+
try {
|
|
110
|
+
return { ok: true, data: JSON.parse(raw) };
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
const msg = e instanceof SyntaxError ? e.message : String(e);
|
|
114
|
+
return { ok: false, errors: [{ path: '(root)', message: `JSON parse error: ${msg}` }] };
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function formatZodErrors(error) {
|
|
118
|
+
return error.issues.map((issue) => ({
|
|
119
|
+
path: issue.path.join('.') || '(root)',
|
|
120
|
+
message: issue.message,
|
|
121
|
+
expected: 'expected' in issue ? String(issue.expected) : undefined,
|
|
122
|
+
received: 'received' in issue ? String(issue.received) : undefined,
|
|
123
|
+
}));
|
|
124
|
+
}
|
|
125
|
+
function isNodeToolsEnabled(config) {
|
|
126
|
+
return config?.nodeTools?.enabled === true;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=agent-json-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-json-config.js","sourceRoot":"","sources":["../../../../src/modules/agents/json-config/agent-json-config.ts"],"names":[],"mappings":";;;AAsIA,gDASC;AAED,0CAOC;AASD,gDAEC;AAnKD,6BAAuC;AAEvC,6DAA8D;AAE9D,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACtC,KAAK,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChD,YAAY,EAAE,OAAC;SACb,MAAM,CAAC;QACP,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAC9B,CAAC;SACD,QAAQ,EAAE;IACZ,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAGH,MAAM,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,OAAO,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC9C,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC5C,YAAY,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,SAAgB,kBAAkB,CACjC,GAAW;IAEX,IAAI,CAAC;QACJ,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACZ,MAAM,GAAG,GAAG,CAAC,YAAY,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC7D,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC;IACzF,CAAC;AACF,CAAC;AAED,SAAgB,eAAe,CAAC,KAAe;IAC9C,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,QAAQ;QACtC,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,QAAQ,EAAE,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;QAClE,QAAQ,EAAE,UAAU,IAAI,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;KAClE,CAAC,CAAC,CAAC;AACL,CAAC;AASD,SAAgB,kBAAkB,CAAC,MAAiC;IACnE,OAAO,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ResolvedCredential } from '@n8n/agents';
|
|
2
|
+
export declare function mapCredentialForProvider(provider: string, raw: ResolvedCredential): Record<string, unknown>;
|
|
3
|
+
export declare const SUPPORTED_AGENT_PROVIDERS: readonly string[];
|
|
4
|
+
export declare function isSupportedAgentProvider(provider: string): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUPPORTED_AGENT_PROVIDERS = void 0;
|
|
4
|
+
exports.mapCredentialForProvider = mapCredentialForProvider;
|
|
5
|
+
exports.isSupportedAgentProvider = isSupportedAgentProvider;
|
|
6
|
+
const PROVIDER_CREDENTIAL_MAPPERS = {
|
|
7
|
+
openai: (c) => ({ apiKey: c.apiKey, baseURL: c.url }),
|
|
8
|
+
anthropic: (c) => ({ apiKey: c.apiKey, baseURL: c.url }),
|
|
9
|
+
google: (c) => ({ apiKey: c.apiKey, baseURL: c.host }),
|
|
10
|
+
xai: (c) => ({ apiKey: c.apiKey, baseURL: c.url }),
|
|
11
|
+
groq: (c) => ({ apiKey: c.apiKey }),
|
|
12
|
+
deepseek: (c) => ({ apiKey: c.apiKey, baseURL: c.url }),
|
|
13
|
+
cohere: (c) => ({ apiKey: c.apiKey, baseURL: c.url }),
|
|
14
|
+
mistral: (c) => ({ apiKey: c.apiKey }),
|
|
15
|
+
vercel: (c) => ({ apiKey: c.apiKey, baseURL: c.url }),
|
|
16
|
+
openrouter: (c) => ({ apiKey: c.apiKey, baseURL: c.url }),
|
|
17
|
+
'azure-openai': (c) => ({
|
|
18
|
+
apiKey: c.apiKey,
|
|
19
|
+
resourceName: c.resourceName,
|
|
20
|
+
apiVersion: c.apiVersion,
|
|
21
|
+
baseURL: c.endpoint,
|
|
22
|
+
}),
|
|
23
|
+
'aws-bedrock': (c) => ({
|
|
24
|
+
region: c.region,
|
|
25
|
+
accessKeyId: c.accessKeyId,
|
|
26
|
+
secretAccessKey: c.secretAccessKey,
|
|
27
|
+
sessionToken: c.sessionToken,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
function mapCredentialForProvider(provider, raw) {
|
|
31
|
+
const mapper = PROVIDER_CREDENTIAL_MAPPERS[provider];
|
|
32
|
+
if (!mapper)
|
|
33
|
+
return raw;
|
|
34
|
+
const mapped = mapper(raw);
|
|
35
|
+
return Object.fromEntries(Object.entries(mapped).filter(([, v]) => v !== undefined));
|
|
36
|
+
}
|
|
37
|
+
exports.SUPPORTED_AGENT_PROVIDERS = Object.keys(PROVIDER_CREDENTIAL_MAPPERS);
|
|
38
|
+
function isSupportedAgentProvider(provider) {
|
|
39
|
+
return provider in PROVIDER_CREDENTIAL_MAPPERS;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=credential-field-mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-field-mapping.js","sourceRoot":"","sources":["../../../../src/modules/agents/json-config/credential-field-mapping.ts"],"names":[],"mappings":";;;AAgEA,4DASC;AAQD,4DAEC;AApED,MAAM,2BAA2B,GAA+B;IAE/D,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;IAErD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;IAExD,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAEtD,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;IAElD,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,E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,MAAM;QAAE,OAAO,GAA8B,CAAC;IAEnD,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3B,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC;AACtF,CAAC;AAGY,QAAA,yBAAyB,GAAG,MAAM,CAAC,IAAI,CACnD,2BAA2B,CACN,CAAC;AAGvB,SAAgB,wBAAwB,CAAC,QAAgB;IACxD,OAAO,QAAQ,IAAI,2BAA2B,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BuiltMemory, BuiltTool, CredentialProvider, ToolDescriptor } from '@n8n/agents';
|
|
2
|
+
import { Agent } from '@n8n/agents';
|
|
3
|
+
import type { AgentSkill } from '@n8n/api-types';
|
|
4
|
+
import type { AgentJsonConfig, AgentJsonMemoryConfig, AgentJsonToolConfig } from './agent-json-config';
|
|
5
|
+
export type ToolResolver = (toolSchema: AgentJsonToolConfig) => Promise<BuiltTool | null | undefined>;
|
|
6
|
+
export interface ToolExecutor {
|
|
7
|
+
executeTool(toolName: string, input: unknown, ctx: unknown): Promise<unknown>;
|
|
8
|
+
executeToMessageSync?(toolName: string, output: unknown): unknown;
|
|
9
|
+
}
|
|
10
|
+
export type MemoryFactory = (params: AgentJsonMemoryConfig) => BuiltMemory | Promise<BuiltMemory>;
|
|
11
|
+
export interface BuildFromJsonOptions {
|
|
12
|
+
toolExecutor: ToolExecutor;
|
|
13
|
+
credentialProvider: CredentialProvider;
|
|
14
|
+
resolveTool?: ToolResolver;
|
|
15
|
+
skills?: Record<string, AgentSkill>;
|
|
16
|
+
memoryFactory: MemoryFactory;
|
|
17
|
+
}
|
|
18
|
+
export declare function buildFromJson(config: AgentJsonConfig, toolDescriptors: Record<string, ToolDescriptor>, options: BuildFromJsonOptions): Promise<Agent>;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildFromJson = buildFromJson;
|
|
4
|
+
const agents_1 = require("@n8n/agents");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const credential_field_mapping_1 = require("./credential-field-mapping");
|
|
7
|
+
const provider_tool_aliases_1 = require("./provider-tool-aliases");
|
|
8
|
+
const DEFAULT_WORKING_MEMORY_TEMPLATE = `# Thread memory
|
|
9
|
+
- User facts:
|
|
10
|
+
- User preferences/instructions:
|
|
11
|
+
- Current goal/task:
|
|
12
|
+
- Current state:
|
|
13
|
+
- Key active items:
|
|
14
|
+
- Decisions made:
|
|
15
|
+
- Open follow-ups:
|
|
16
|
+
- Resolved or superseded:`;
|
|
17
|
+
const DEFAULT_WORKING_MEMORY_INSTRUCTION = [
|
|
18
|
+
'You have thread-scoped working memory for this conversation.',
|
|
19
|
+
`When the user shares durable facts, preferences, decisions, goals, or unresolved follow-ups that will help later turns in this same thread, call ${agents_1.UPDATE_WORKING_MEMORY_TOOL_NAME} with the complete updated memory.`,
|
|
20
|
+
'Treat working memory as a current-state snapshot, not an append-only log.',
|
|
21
|
+
'Keep it concise, factual, and current.',
|
|
22
|
+
'When facts, preferences, priorities, goals, decisions, or statuses change, replace outdated active items with the latest state.',
|
|
23
|
+
'Preserve distinctions the user makes between primary, secondary, active, resolved, and superseded items.',
|
|
24
|
+
'Move resolved or superseded items to that section only when they will help later; otherwise remove them.',
|
|
25
|
+
'Preserve useful existing notes, remove stale or contradicted notes, and do not store secrets or one-off details.',
|
|
26
|
+
`Only call ${agents_1.UPDATE_WORKING_MEMORY_TOOL_NAME} when the memory should change.`,
|
|
27
|
+
].join(' ');
|
|
28
|
+
async function buildFromJson(config, toolDescriptors, options) {
|
|
29
|
+
const agent = new agents_1.Agent(config.name);
|
|
30
|
+
const slashIdx = config.model.indexOf('/');
|
|
31
|
+
const providerPrefix = slashIdx !== -1 ? config.model.slice(0, slashIdx) : '';
|
|
32
|
+
if (config.credential) {
|
|
33
|
+
const raw = await options.credentialProvider.resolve(config.credential);
|
|
34
|
+
const mapped = (0, credential_field_mapping_1.mapCredentialForProvider)(providerPrefix, raw);
|
|
35
|
+
agent.model({ id: config.model, ...mapped });
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
agent.model(config.model);
|
|
39
|
+
}
|
|
40
|
+
const configuredSkills = getConfiguredSkills(config.skills ?? [], options.skills ?? {});
|
|
41
|
+
agent.instructions(withSkillCatalog(config.instructions, configuredSkills));
|
|
42
|
+
if (config.tools) {
|
|
43
|
+
for (const ref of config.tools) {
|
|
44
|
+
const built = await resolveToolRef(ref, toolDescriptors, options);
|
|
45
|
+
if (built) {
|
|
46
|
+
agent.tool(built);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (configuredSkills.length > 0) {
|
|
51
|
+
agent.tool(createLoadSkillTool(configuredSkills));
|
|
52
|
+
}
|
|
53
|
+
if (config.providerTools) {
|
|
54
|
+
for (const [name, args] of Object.entries(config.providerTools)) {
|
|
55
|
+
const resolved = (0, provider_tool_aliases_1.resolveProviderToolName)(name);
|
|
56
|
+
agent.providerTool({ name: resolved, args });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (config.memory?.enabled) {
|
|
60
|
+
await applyMemoryFromConfig(agent, config.memory, options.memoryFactory);
|
|
61
|
+
}
|
|
62
|
+
if (config.config) {
|
|
63
|
+
if (config.config.thinking) {
|
|
64
|
+
const { provider, ...rest } = config.config.thinking;
|
|
65
|
+
agent.thinking(provider, rest);
|
|
66
|
+
}
|
|
67
|
+
if (config.config.toolCallConcurrency) {
|
|
68
|
+
agent.toolCallConcurrency(config.config.toolCallConcurrency);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return agent;
|
|
72
|
+
}
|
|
73
|
+
function getConfiguredSkills(refs, skills) {
|
|
74
|
+
const seen = new Set();
|
|
75
|
+
const configured = [];
|
|
76
|
+
for (const ref of refs) {
|
|
77
|
+
if (seen.has(ref.id))
|
|
78
|
+
continue;
|
|
79
|
+
seen.add(ref.id);
|
|
80
|
+
const skill = skills[ref.id];
|
|
81
|
+
if (!skill)
|
|
82
|
+
throw new Error(`Skill "${ref.id}" not found in stored skill bodies`);
|
|
83
|
+
configured.push({ id: ref.id, skill });
|
|
84
|
+
}
|
|
85
|
+
return configured;
|
|
86
|
+
}
|
|
87
|
+
function withSkillCatalog(instructions, skills) {
|
|
88
|
+
if (skills.length === 0)
|
|
89
|
+
return instructions;
|
|
90
|
+
const catalog = formatSkillCatalog(skills);
|
|
91
|
+
const baseInstructions = instructions.trimEnd();
|
|
92
|
+
return `Skill loading protocol:
|
|
93
|
+
Skills are optional instruction packs, not execution tools. Use them to get extra guidance only when they are relevant to the user's current request.
|
|
94
|
+
|
|
95
|
+
Available skills:
|
|
96
|
+
${catalog}
|
|
97
|
+
|
|
98
|
+
When deciding whether to load a skill:
|
|
99
|
+
- Match the user's request against the skill name and description.
|
|
100
|
+
- If one skill clearly matches, call load_skill once with that skill's id, then follow the returned instructions.
|
|
101
|
+
- If the relevant skill was already loaded for this request, do not call load_skill again.
|
|
102
|
+
- If no skill clearly matches, do not call load_skill.
|
|
103
|
+
- Do not load a skill just because it is listed here.${baseInstructions ? `\n\n${baseInstructions}` : ''}`;
|
|
104
|
+
}
|
|
105
|
+
function createLoadSkillTool(skills) {
|
|
106
|
+
const skillsById = new Map(skills.map(({ id, skill }) => [id, skill]));
|
|
107
|
+
return new agents_1.Tool('load_skill')
|
|
108
|
+
.description('Load the full instructions for an attached skill. Use the skill id listed in the system instructions.')
|
|
109
|
+
.input(zod_1.z.object({
|
|
110
|
+
skillId: zod_1.z.string().describe('The skill id from the Available skills list'),
|
|
111
|
+
}))
|
|
112
|
+
.handler(async ({ skillId }) => {
|
|
113
|
+
const skill = skillsById.get(skillId);
|
|
114
|
+
if (!skill) {
|
|
115
|
+
return {
|
|
116
|
+
ok: false,
|
|
117
|
+
error: `Skill "${skillId}" is not attached to this agent.`,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
ok: true,
|
|
122
|
+
skillId,
|
|
123
|
+
name: skill.name,
|
|
124
|
+
description: skill.description,
|
|
125
|
+
instructions: skill.instructions,
|
|
126
|
+
};
|
|
127
|
+
})
|
|
128
|
+
.build();
|
|
129
|
+
}
|
|
130
|
+
function formatSkillCatalog(skills) {
|
|
131
|
+
return skills
|
|
132
|
+
.map(({ id, skill }) => `- name: ${skill.name}\n description: ${skill.description}\n id: ${id}`)
|
|
133
|
+
.join('\n');
|
|
134
|
+
}
|
|
135
|
+
async function resolveToolRef(ref, descriptors, options) {
|
|
136
|
+
switch (ref.type) {
|
|
137
|
+
case 'custom': {
|
|
138
|
+
const descriptor = descriptors[ref.id];
|
|
139
|
+
if (!descriptor) {
|
|
140
|
+
throw new Error(`Custom tool "${ref.id}" not found in tool descriptors`);
|
|
141
|
+
}
|
|
142
|
+
const builtTool = {
|
|
143
|
+
name: descriptor.name,
|
|
144
|
+
description: descriptor.description,
|
|
145
|
+
systemInstruction: descriptor.systemInstruction ?? undefined,
|
|
146
|
+
inputSchema: descriptor.inputSchema ?? undefined,
|
|
147
|
+
handler: async (input, ctx) => {
|
|
148
|
+
return await options.toolExecutor.executeTool(descriptor.name, input, {
|
|
149
|
+
resumeData: 'resumeData' in ctx ? ctx.resumeData : undefined,
|
|
150
|
+
parentTelemetry: ctx.parentTelemetry,
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
providerOptions: descriptor.providerOptions,
|
|
154
|
+
};
|
|
155
|
+
if (ref.requireApproval) {
|
|
156
|
+
return (0, agents_1.wrapToolForApproval)(builtTool, { requireApproval: true });
|
|
157
|
+
}
|
|
158
|
+
return builtTool;
|
|
159
|
+
}
|
|
160
|
+
case 'workflow': {
|
|
161
|
+
const marker = {
|
|
162
|
+
name: ref.name ?? ref.workflow,
|
|
163
|
+
description: ref.description ?? `Execute the "${ref.workflow}" workflow`,
|
|
164
|
+
editable: false,
|
|
165
|
+
metadata: {
|
|
166
|
+
workflowTool: true,
|
|
167
|
+
workflowName: ref.workflow,
|
|
168
|
+
options: { name: ref.name, description: ref.description },
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
const tool = (await options.resolveTool?.(ref)) ?? marker;
|
|
172
|
+
if (ref.requireApproval) {
|
|
173
|
+
return (0, agents_1.wrapToolForApproval)(tool, { requireApproval: true });
|
|
174
|
+
}
|
|
175
|
+
return tool;
|
|
176
|
+
}
|
|
177
|
+
case 'node': {
|
|
178
|
+
const marker = {
|
|
179
|
+
name: ref.name,
|
|
180
|
+
description: ref.description ?? `Execute node ${ref.name}`,
|
|
181
|
+
editable: false,
|
|
182
|
+
metadata: { nodeTool: true, ...ref.node },
|
|
183
|
+
};
|
|
184
|
+
const tool = (await options.resolveTool?.(ref)) ?? marker;
|
|
185
|
+
if (ref.requireApproval) {
|
|
186
|
+
return (0, agents_1.wrapToolForApproval)(tool, { requireApproval: true });
|
|
187
|
+
}
|
|
188
|
+
return tool;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
async function applyMemoryFromConfig(agent, memoryConfig, memoryFactory) {
|
|
193
|
+
const memory = new agents_1.Memory();
|
|
194
|
+
const builtMemory = memoryFactory(memoryConfig);
|
|
195
|
+
memory.storage(await Promise.resolve(builtMemory));
|
|
196
|
+
memory
|
|
197
|
+
.freeform(DEFAULT_WORKING_MEMORY_TEMPLATE)
|
|
198
|
+
.scope('thread')
|
|
199
|
+
.instruction(DEFAULT_WORKING_MEMORY_INSTRUCTION);
|
|
200
|
+
if (memoryConfig.lastMessages) {
|
|
201
|
+
memory.lastMessages(memoryConfig.lastMessages);
|
|
202
|
+
}
|
|
203
|
+
if (memoryConfig.semanticRecall) {
|
|
204
|
+
memory.semanticRecall(memoryConfig.semanticRecall);
|
|
205
|
+
}
|
|
206
|
+
memory.titleGeneration({ sync: true });
|
|
207
|
+
agent.memory(memory);
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=from-json-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-json-config.js","sourceRoot":"","sources":["../../../../src/modules/agents/json-config/from-json-config.ts"],"names":[],"mappings":";;AAiFA,sCA8DC;AAtID,wCAMqB;AAErB,6BAAwB;AAQxB,yEAAsE;AACtE,mEAAkE;AAclE,MAAM,+BAA+B,GAAG;;;;;;;;0BAQd,CAAC;AAE3B,MAAM,kCAAkC,GAAG;IAC1C,8DAA8D;IAC9D,oJAAoJ,wCAA+B,oCAAoC;IACvN,2EAA2E;IAC3E,wCAAwC;IACxC,iIAAiI;IACjI,0GAA0G;IAC1G,0GAA0G;IAC1G,kHAAkH;IAClH,aAAa,wCAA+B,iCAAiC;CAC7E,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAqBL,KAAK,UAAU,aAAa,CAClC,MAAuB,EACvB,eAA+C,EAC/C,OAA6B;IAE7B,MAAM,KAAK,GAAG,IAAI,cAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAGrC,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3C,MAAM,cAAc,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAI9E,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,IAAA,mDAAwB,EAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC7D,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,E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eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7D,CAAC;YACD,OAAO,IAAI,CAAC;QACb,CAAC;IACF,CAAC;AACF,CAAC;AAED,KAAK,UAAU,qBAAqB,CACnC,KAAmB,EACnB,YAAmC,EACnC,aAA4B;IAE5B,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;IAE5B,MAAM,WAAW,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;IAChD,MAAM,CAAC,OAAO,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IACnD,MAAM;SACJ,QAAQ,CAAC,+BAA+B,CAAC;SACzC,KAAK,CAAC,QAAQ,CAAC;SACf,WAAW,CAAC,kCAAkC,CAAC,CAAC;IAElD,IAAI,YAAY,CAAC,YAAY,EAAE,CAAC;QAC/B,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,YAAY,CAAC,cAAc,EAAE,CAAC;QACjC,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AgentScheduleIntegrationSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"schedule">;
|
|
4
|
+
active: z.ZodBoolean;
|
|
5
|
+
cronExpression: z.ZodEffects<z.ZodString, string, string>;
|
|
6
|
+
wakeUpPrompt: z.ZodString;
|
|
7
|
+
}, "strict", z.ZodTypeAny, {
|
|
8
|
+
active: boolean;
|
|
9
|
+
type: "schedule";
|
|
10
|
+
cronExpression: string;
|
|
11
|
+
wakeUpPrompt: string;
|
|
12
|
+
}, {
|
|
13
|
+
active: boolean;
|
|
14
|
+
type: "schedule";
|
|
15
|
+
cronExpression: string;
|
|
16
|
+
wakeUpPrompt: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const AgentCredentialIntegrationSchema: z.ZodObject<{
|
|
19
|
+
type: z.ZodEffects<z.ZodString, string, string>;
|
|
20
|
+
credentialId: z.ZodString;
|
|
21
|
+
credentialName: z.ZodString;
|
|
22
|
+
}, "strict", z.ZodTypeAny, {
|
|
23
|
+
type: string;
|
|
24
|
+
credentialName: string;
|
|
25
|
+
credentialId: string;
|
|
26
|
+
}, {
|
|
27
|
+
type: string;
|
|
28
|
+
credentialName: string;
|
|
29
|
+
credentialId: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const AgentIntegrationSchema: z.ZodUnion<[z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<"schedule">;
|
|
33
|
+
active: z.ZodBoolean;
|
|
34
|
+
cronExpression: z.ZodEffects<z.ZodString, string, string>;
|
|
35
|
+
wakeUpPrompt: z.ZodString;
|
|
36
|
+
}, "strict", z.ZodTypeAny, {
|
|
37
|
+
active: boolean;
|
|
38
|
+
type: "schedule";
|
|
39
|
+
cronExpression: string;
|
|
40
|
+
wakeUpPrompt: string;
|
|
41
|
+
}, {
|
|
42
|
+
active: boolean;
|
|
43
|
+
type: "schedule";
|
|
44
|
+
cronExpression: string;
|
|
45
|
+
wakeUpPrompt: string;
|
|
46
|
+
}>, z.ZodObject<{
|
|
47
|
+
type: z.ZodEffects<z.ZodString, string, string>;
|
|
48
|
+
credentialId: z.ZodString;
|
|
49
|
+
credentialName: z.ZodString;
|
|
50
|
+
}, "strict", z.ZodTypeAny, {
|
|
51
|
+
type: string;
|
|
52
|
+
credentialName: string;
|
|
53
|
+
credentialId: string;
|
|
54
|
+
}, {
|
|
55
|
+
type: string;
|
|
56
|
+
credentialName: string;
|
|
57
|
+
credentialId: string;
|
|
58
|
+
}>]>;
|
|
59
|
+
export type AgentScheduleIntegrationConfig = z.infer<typeof AgentScheduleIntegrationSchema>;
|
|
60
|
+
export type AgentCredentialIntegrationConfig = z.infer<typeof AgentCredentialIntegrationSchema>;
|
|
61
|
+
export type AgentIntegrationConfig = z.infer<typeof AgentIntegrationSchema>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentIntegrationSchema = exports.AgentCredentialIntegrationSchema = exports.AgentScheduleIntegrationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const cron_validation_1 = require("../integrations/cron-validation");
|
|
6
|
+
exports.AgentScheduleIntegrationSchema = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
type: zod_1.z.literal('schedule'),
|
|
9
|
+
active: zod_1.z.boolean(),
|
|
10
|
+
cronExpression: zod_1.z
|
|
11
|
+
.string()
|
|
12
|
+
.min(1, 'cronExpression is required')
|
|
13
|
+
.refine(cron_validation_1.isValidCronExpression, { message: 'Invalid cron expression' }),
|
|
14
|
+
wakeUpPrompt: zod_1.z.string().min(1, 'wakeUpPrompt is required'),
|
|
15
|
+
})
|
|
16
|
+
.strict();
|
|
17
|
+
exports.AgentCredentialIntegrationSchema = zod_1.z
|
|
18
|
+
.object({
|
|
19
|
+
type: zod_1.z
|
|
20
|
+
.string()
|
|
21
|
+
.min(1)
|
|
22
|
+
.refine((value) => value !== 'schedule', {
|
|
23
|
+
message: 'Type "schedule" is reserved for the schedule trigger',
|
|
24
|
+
}),
|
|
25
|
+
credentialId: zod_1.z.string().min(1),
|
|
26
|
+
credentialName: zod_1.z.string().min(1),
|
|
27
|
+
})
|
|
28
|
+
.strict();
|
|
29
|
+
exports.AgentIntegrationSchema = zod_1.z.union([
|
|
30
|
+
exports.AgentScheduleIntegrationSchema,
|
|
31
|
+
exports.AgentCredentialIntegrationSchema,
|
|
32
|
+
]);
|
|
33
|
+
//# sourceMappingURL=integration-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-config.js","sourceRoot":"","sources":["../../../../src/modules/agents/json-config/integration-config.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,qEAAwE;AAE3D,QAAA,8BAA8B,GAAG,OAAC;KAC7C,MAAM,CAAC;IACP,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,cAAc,EAAE,OAAC;SACf,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,4BAA4B,CAAC;SACpC,MAAM,CAAC,uCAAqB,EAAE,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACvE,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;CAC3D,CAAC;KACD,MAAM,EAAE,CAAC;AAEE,QAAA,gCAAgC,GAAG,OAAC;KAC/C,MAAM,CAAC;IACP,IAAI,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,UAAU,EAAE;QACxC,OAAO,EAAE,sDAAsD;KAC/D,CAAC;IACH,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACjC,CAAC;KACD,MAAM,EAAE,CAAC;AAEE,QAAA,sBAAsB,GAAG,OAAC,CAAC,KAAK,CAAC;IAC7C,sCAA8B;IAC9B,wCAAgC;CAChC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveProviderToolName(name: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveProviderToolName = resolveProviderToolName;
|
|
4
|
+
const ANTHROPIC_TOOL_ALIASES = {
|
|
5
|
+
'anthropic.web_search': 'anthropic.web_search_20250305',
|
|
6
|
+
};
|
|
7
|
+
const OPENAI_TOOL_ALIASES = {};
|
|
8
|
+
const PROVIDER_TOOL_ALIASES = {
|
|
9
|
+
...ANTHROPIC_TOOL_ALIASES,
|
|
10
|
+
...OPENAI_TOOL_ALIASES,
|
|
11
|
+
};
|
|
12
|
+
function resolveProviderToolName(name) {
|
|
13
|
+
return PROVIDER_TOOL_ALIASES[name] ?? name;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=provider-tool-aliases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-tool-aliases.js","sourceRoot":"","sources":["../../../../src/modules/agents/json-config/provider-tool-aliases.ts"],"names":[],"mappings":";;AA4CA,0DAEC;AAzBD,MAAM,sBAAsB,GAA2B;IACtD,sBAAsB,EAAE,+BAA+B;CACvD,CAAC;AAQF,MAAM,mBAAmB,GAA2B,EAAE,CAAC;AAEvD,MAAM,qBAAqB,GAA2B;IACrD,GAAG,sBAAsB;IACzB,GAAG,mBAAmB;CACtB,CAAC;AAQF,SAAgB,uBAAuB,CAAC,IAAY;IACnD,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AAC5C,CAAC"}
|