n8n 2.22.3 → 2.23.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/auth/auth.service.d.ts +2 -0
- package/dist/auth/auth.service.js +15 -4
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/chat/chat-service.types.d.ts +4 -4
- package/dist/commands/execute.d.ts +2 -2
- package/dist/commands/export/workflow.js +1 -0
- package/dist/commands/export/workflow.js.map +1 -1
- package/dist/commands/license/info.js +4 -4
- package/dist/commands/license/info.js.map +1 -1
- package/dist/commands/start.js +21 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/controllers/annotation-tags.controller.ee.d.ts +1 -1
- package/dist/controllers/e2e.controller.js +1 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.d.ts +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.js +4 -7
- package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js +3 -6
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/redaction-enforcement-mapper.d.ts +3 -0
- package/dist/controllers/redaction-enforcement-mapper.js +27 -0
- package/dist/controllers/redaction-enforcement-mapper.js.map +1 -0
- package/dist/controllers/security-settings.controller.d.ts +8 -2
- package/dist/controllers/security-settings.controller.js +35 -25
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/credentials/credential-connection-status-provider.interface.d.ts +3 -0
- package/dist/credentials/credential-connection-status-provider.interface.js +3 -0
- package/dist/credentials/credential-connection-status-provider.interface.js.map +1 -0
- package/dist/credentials/credential-connection-status-proxy.d.ts +6 -0
- package/dist/credentials/credential-connection-status-proxy.js +25 -0
- package/dist/credentials/credential-connection-status-proxy.js.map +1 -0
- package/dist/credentials/credential-resolution-provider.interface.d.ts +1 -0
- package/dist/credentials/credentials.controller.d.ts +2 -0
- package/dist/credentials/credentials.service.d.ts +10 -1
- package/dist/credentials/credentials.service.ee.d.ts +2 -0
- package/dist/credentials/credentials.service.ee.js +13 -3
- package/dist/credentials/credentials.service.ee.js.map +1 -1
- package/dist/credentials/credentials.service.js +34 -7
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/dynamic-credentials-proxy.d.ts +2 -0
- package/dist/credentials/dynamic-credentials-proxy.js +9 -0
- package/dist/credentials/dynamic-credentials-proxy.js.map +1 -1
- package/dist/credentials-helper.js +2 -1
- package/dist/credentials-helper.js.map +1 -1
- package/dist/errors/feature-not-licensed.error.d.ts +3 -1
- package/dist/errors/feature-not-licensed.error.js +2 -2
- package/dist/errors/feature-not-licensed.error.js.map +1 -1
- package/dist/evaluation.ee/evaluation-collection.service.js +2 -0
- package/dist/evaluation.ee/evaluation-collection.service.js.map +1 -1
- package/dist/evaluation.ee/insights/eval-insights.controller.ee.d.ts +41 -0
- package/dist/evaluation.ee/insights/eval-insights.controller.ee.js +62 -0
- package/dist/evaluation.ee/insights/eval-insights.controller.ee.js.map +1 -0
- package/dist/evaluation.ee/insights/eval-insights.service.d.ts +25 -0
- package/dist/evaluation.ee/insights/eval-insights.service.js +206 -0
- package/dist/evaluation.ee/insights/eval-insights.service.js.map +1 -0
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +3 -2
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +16 -2
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +3 -1
- package/dist/events/relays/telemetry.event-relay.js +9 -3
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.d.ts +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +4 -2
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution-data/db-store.d.ts +4 -2
- package/dist/executions/execution-data/db-store.js +9 -4
- package/dist/executions/execution-data/db-store.js.map +1 -1
- package/dist/executions/execution-data/missing-execution-data.error.d.ts +5 -0
- package/dist/executions/execution-data/missing-execution-data.error.js +11 -0
- package/dist/executions/execution-data/missing-execution-data.error.js.map +1 -0
- package/dist/executions/execution-data/types.d.ts +3 -2
- package/dist/executions/execution-data/types.js.map +1 -1
- package/dist/executions/execution-persistence.d.ts +12 -3
- package/dist/executions/execution-persistence.js +102 -26
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/external-hooks.d.ts +6 -1
- package/dist/external-hooks.js.map +1 -1
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.d.ts +3 -2
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js +17 -12
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js.map +1 -1
- package/dist/interfaces.d.ts +1 -0
- package/dist/license.d.ts +2 -0
- package/dist/license.js +6 -0
- package/dist/license.js.map +1 -1
- package/dist/load-nodes-and-credentials.d.ts +32 -6
- package/dist/load-nodes-and-credentials.js +8 -79
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/manual-execution.service.js +3 -0
- package/dist/manual-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.js +5 -5
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-sse-stream.js +17 -1
- package/dist/modules/agents/agent-sse-stream.js.map +1 -1
- package/dist/modules/agents/agents-tools.service.js +7 -5
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +29 -3
- package/dist/modules/agents/agents.controller.js +88 -7
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +1 -1
- package/dist/modules/agents/agents.module.js +12 -6
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +7 -8
- package/dist/modules/agents/agents.service.js +120 -65
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-model-recommendations.d.ts +1 -1
- package/dist/modules/agents/builder/agents-builder-model-recommendations.js +3 -3
- package/dist/modules/agents/builder/agents-builder-model-recommendations.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +9 -17
- package/dist/modules/agents/builder/agents-builder-prompts.js +145 -549
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-settings.service.js +2 -2
- package/dist/modules/agents/builder/agents-builder-settings.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +10 -10
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +3 -1
- package/dist/modules/agents/builder/agents-builder.service.js +58 -9
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +2 -2
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js +2 -2
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-question.tool.js +2 -2
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +2 -2
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.d.ts +1 -0
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +132 -0
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -0
- package/dist/modules/agents/builder/prompts/config-rules.prompt.d.ts +2 -0
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +63 -0
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -0
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.d.ts +1 -0
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +47 -0
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -0
- package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -0
- package/dist/modules/agents/builder/prompts/memory.prompt.js +60 -0
- package/dist/modules/agents/builder/prompts/memory.prompt.js.map +1 -0
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -0
- package/dist/modules/agents/builder/prompts/tools.prompt.js +81 -0
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -0
- package/dist/modules/agents/builder/skills/index.d.ts +2 -0
- package/dist/modules/agents/builder/skills/index.js +12 -0
- package/dist/modules/agents/builder/skills/index.js.map +1 -0
- package/dist/modules/agents/builder/skills/integrations.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/integrations.skill.js +53 -0
- package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -0
- package/dist/modules/agents/builder/skills/research.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/research.skill.js +42 -0
- package/dist/modules/agents/builder/skills/research.skill.js.map +1 -0
- package/dist/modules/agents/builder/skills/target-skills.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/target-skills.skill.js +59 -0
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -0
- package/dist/modules/agents/entities/{agent-published-version.entity.d.ts → agent-history.entity.d.ts} +4 -7
- package/dist/modules/agents/entities/{agent-published-version.entity.js → agent-history.entity.js} +22 -34
- package/dist/modules/agents/entities/agent-history.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.d.ts +7 -0
- package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js +38 -0
- package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-memory-entry-lock.entity.d.ts +7 -0
- package/dist/modules/{instance-ai/entities/instance-ai-workflow-snapshot.entity.js → agents/entities/agent-memory-entry-lock.entity.js} +16 -19
- package/dist/modules/agents/entities/agent-memory-entry-lock.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-memory-entry-source.entity.d.ts +9 -0
- package/dist/modules/agents/entities/agent-memory-entry-source.entity.js +49 -0
- package/dist/modules/agents/entities/agent-memory-entry-source.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-memory-entry.entity.d.ts +15 -0
- package/dist/modules/agents/entities/agent-memory-entry.entity.js +65 -0
- package/dist/modules/agents/entities/agent-memory-entry.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-observation-cursor.entity.d.ts +2 -3
- package/dist/modules/agents/entities/agent-observation-cursor.entity.js +5 -4
- package/dist/modules/agents/entities/agent-observation-cursor.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-observation-lock.entity.d.ts +2 -3
- package/dist/modules/agents/entities/agent-observation-lock.entity.js +5 -4
- package/dist/modules/agents/entities/agent-observation-lock.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-observation.entity.d.ts +2 -3
- package/dist/modules/agents/entities/agent-observation.entity.js +6 -5
- package/dist/modules/agents/entities/agent-observation.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent.entity.d.ts +3 -5
- package/dist/modules/agents/entities/agent.entity.js +7 -14
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/episodic-memory.d.ts +2 -0
- package/dist/modules/agents/episodic-memory.js +12 -0
- package/dist/modules/agents/episodic-memory.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +2 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.js +19 -5
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-schedule.service.js +10 -6
- package/dist/modules/agents/integrations/agent-schedule.service.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.js +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-memory.d.ts +41 -18
- package/dist/modules/agents/integrations/n8n-memory.js +519 -77
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js +2 -12
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/rich-interaction-tool.d.ts +1 -1
- package/dist/modules/agents/integrations/rich-interaction-tool.js +2 -2
- package/dist/modules/agents/integrations/rich-interaction-tool.js.map +1 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +52 -0
- package/dist/modules/agents/integrations/slack-app-setup.service.js +316 -0
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -0
- package/dist/modules/agents/json-config/from-json-config.d.ts +2 -3
- package/dist/modules/agents/json-config/from-json-config.js +76 -61
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/schema-text-serializer.js +2 -1
- package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -1
- package/dist/modules/agents/repositories/agent-history.repository.d.ts +19 -0
- package/dist/modules/agents/repositories/agent-history.repository.js +51 -0
- package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.d.ts +5 -0
- package/dist/modules/{instance-ai/repositories/instance-ai-workflow-snapshot.repository.js → agents/repositories/agent-memory-entry-cursor.repository.js} +8 -8
- package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-memory-entry-lock.repository.d.ts +5 -0
- package/dist/modules/{instance-ai/repositories/instance-ai-observational-memory.repository.js → agents/repositories/agent-memory-entry-lock.repository.js} +8 -8
- package/dist/modules/agents/repositories/agent-memory-entry-lock.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-memory-entry-source.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-memory-entry-source.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-memory-entry-source.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-memory-entry.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-memory-entry.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-memory-entry.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent.repository.js +3 -3
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/runtime/agent-secure-runtime.js +5 -5
- package/dist/modules/agents/runtime/agent-secure-runtime.js.map +1 -1
- package/dist/modules/agents/tools/environment-tool.d.ts +1 -1
- package/dist/modules/agents/tools/environment-tool.js +3 -3
- package/dist/modules/agents/tools/environment-tool.js.map +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js +5 -5
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.js +3 -3
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/tracing/builder-telemetry.d.ts +2 -3
- package/dist/modules/agents/tracing/builder-telemetry.js +36 -3
- package/dist/modules/agents/tracing/builder-telemetry.js.map +1 -1
- package/dist/modules/agents/utils/agent-draft.utils.js +1 -2
- package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
- package/dist/modules/agents/utils/agent-memory-scope.d.ts +3 -0
- package/dist/modules/agents/utils/agent-memory-scope.js +15 -0
- package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub.constants.js +4 -0
- package/dist/modules/chat-hub/chat-hub.constants.js.map +1 -1
- package/dist/modules/chat-hub/context-limits.js +1 -0
- package/dist/modules/chat-hub/context-limits.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/constants.d.ts +3 -0
- package/dist/modules/dynamic-credentials.ee/constants.js +7 -0
- package/dist/modules/dynamic-credentials.ee/constants.js.map +1 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +14 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js +18 -4
- package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +4 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.d.ts +4 -0
- package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.js +11 -0
- package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.js.map +1 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +7 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +40 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.d.ts +3 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js +6 -3
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.d.ts +2 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js +22 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.d.ts +3 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js +7 -3
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.d.ts +4 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +11 -3
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/index.d.ts +2 -0
- package/dist/modules/dynamic-credentials.ee/services/index.js +2 -0
- package/dist/modules/dynamic-credentials.ee/services/index.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.d.ts +14 -0
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js +70 -0
- package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js.map +1 -0
- package/dist/modules/insights/insights-collection.service.js +1 -1
- package/dist/modules/insights/insights-collection.service.js.map +1 -1
- package/dist/modules/instance-ai/entities/index.d.ts +6 -2
- package/dist/modules/instance-ai/entities/index.js +9 -5
- package/dist/modules/instance-ai/entities/index.js.map +1 -1
- package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.d.ts +12 -0
- package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.js +54 -0
- package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.d.ts +6 -0
- package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.js +33 -0
- package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.d.ts +8 -0
- package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.js +37 -0
- package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-observation.entity.d.ts +12 -0
- package/dist/modules/instance-ai/entities/instance-ai-observation.entity.js +52 -0
- package/dist/modules/instance-ai/entities/instance-ai-observation.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.d.ts +19 -0
- package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js +82 -0
- package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.d.ts +2 -0
- package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js +8 -0
- package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js.map +1 -1
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +12 -2
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +40 -4
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +8 -2
- package/dist/modules/instance-ai/eval/execution.service.js +137 -47
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/llm-wire-server.d.ts +31 -0
- package/dist/modules/instance-ai/eval/llm-wire-server.js +127 -0
- package/dist/modules/instance-ai/eval/llm-wire-server.js.map +1 -0
- package/dist/modules/instance-ai/eval/openai-envelope.d.ts +6 -0
- package/dist/modules/instance-ai/eval/openai-envelope.js +96 -0
- package/dist/modules/instance-ai/eval/openai-envelope.js.map +1 -0
- package/dist/modules/instance-ai/eval/proxy-loopback.d.ts +1 -0
- package/dist/modules/instance-ai/eval/proxy-loopback.js +44 -0
- package/dist/modules/instance-ai/eval/proxy-loopback.js.map +1 -0
- package/dist/modules/instance-ai/eval/sub-agent-eval.service.js +29 -7
- package/dist/modules/instance-ai/eval/sub-agent-eval.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +7 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +178 -3
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +6 -6
- package/dist/modules/instance-ai/instance-ai-memory.service.js +44 -85
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +2 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +11 -22
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +2 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +105 -13
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.module.js +10 -6
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +34 -12
- package/dist/modules/instance-ai/instance-ai.service.js +724 -264
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +4 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +3 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.d.ts +3 -3
- package/dist/modules/instance-ai/message-parser.js +65 -61
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/node-definition-resolver.js +12 -48
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
- package/dist/modules/instance-ai/repositories/index.d.ts +4 -2
- package/dist/modules/instance-ai/repositories/index.js +9 -5
- package/dist/modules/instance-ai/repositories/index.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.d.ts +5 -0
- package/dist/modules/{agents/repositories/agent-published-version.repository.js → instance-ai/repositories/instance-ai-observation.repository.js} +8 -17
- package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.js.map +1 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +2 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +12 -2
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/index.d.ts +2 -3
- package/dist/modules/instance-ai/storage/index.js +5 -7
- package/dist/modules/instance-ai/storage/index.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.d.ts +15 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js +94 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +94 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +324 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -0
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.d.ts +37 -0
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js +212 -0
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js.map +1 -0
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js +34 -11
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -1
- package/dist/modules/mcp/mcp.service.js +5 -5
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +24 -24
- package/dist/modules/mcp/tools/search-projects.tool.js +59 -13
- package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
- package/dist/modules/mcp/tools/test-workflow.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.d.ts +35 -0
- package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js +88 -0
- package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +3 -2
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +41 -9
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/data-table-validation.d.ts +13 -0
- package/dist/modules/mcp/tools/workflow-builder/data-table-validation.js +87 -0
- package/dist/modules/mcp/tools/workflow-builder/data-table-validation.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +2 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +42 -6
- 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.d.ts +2 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +5 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-validation.utils.js +1 -1
- package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
- package/dist/modules/mcp-registry/mcp-registry-test.controller.js +5 -1
- package/dist/modules/mcp-registry/mcp-registry-test.controller.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +18 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +73 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +31 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -0
- package/dist/modules/n8n-packages/io/package-writer.d.ts +6 -0
- package/dist/{scaling/multi-main-setup.types.js → modules/n8n-packages/io/package-writer.js} +1 -1
- package/dist/modules/n8n-packages/io/package-writer.js.map +1 -0
- package/dist/modules/n8n-packages/io/slug.utils.d.ts +1 -0
- package/dist/modules/n8n-packages/io/slug.utils.js +16 -0
- package/dist/modules/n8n-packages/io/slug.utils.js.map +1 -0
- package/dist/modules/n8n-packages/io/tar/tar-package-writer.d.ts +9 -0
- package/dist/modules/n8n-packages/io/tar/tar-package-writer.js +71 -0
- package/dist/modules/n8n-packages/io/tar/tar-package-writer.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.controller.d.ts +10 -0
- package/dist/modules/n8n-packages/n8n-packages.controller.js +45 -0
- package/dist/modules/n8n-packages/n8n-packages.controller.js.map +1 -0
- package/dist/modules/{inbound-secrets/inbound-secrets.module.d.ts → n8n-packages/n8n-packages.module.d.ts} +1 -1
- package/dist/modules/{inbound-secrets/inbound-secrets.module.js → n8n-packages/n8n-packages.module.js} +12 -16
- package/dist/modules/n8n-packages/n8n-packages.module.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +10 -0
- package/dist/modules/n8n-packages/n8n-packages.service.js +49 -0
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +5 -0
- package/dist/modules/n8n-packages/n8n-packages.types.js +3 -0
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -0
- package/dist/modules/n8n-packages/spec/constants.d.ts +1 -0
- package/dist/modules/n8n-packages/spec/constants.js +5 -0
- package/dist/modules/n8n-packages/spec/constants.js.map +1 -0
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +55 -0
- package/dist/modules/n8n-packages/spec/manifest.schema.js +17 -0
- package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +169 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +46 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -0
- package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.d.ts +5 -1
- package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.js +18 -2
- package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.js.map +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe.utils.js +27 -2
- package/dist/modules/oauth-jwe/oauth-jwe.utils.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.js +1 -0
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.types.d.ts +11 -6
- package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
- package/dist/modules/otel/otel-lifecycle-handler.d.ts +5 -1
- package/dist/modules/otel/otel-lifecycle-handler.js +30 -2
- package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
- package/dist/modules/otel/otel.constants.d.ts +1 -0
- package/dist/modules/otel/otel.constants.js +1 -0
- package/dist/modules/otel/otel.constants.js.map +1 -1
- package/dist/modules/runtime-credentials/path-traversal.js.map +1 -0
- package/dist/modules/runtime-credentials/runtime-credentials-access.service.d.ts +8 -0
- package/dist/modules/runtime-credentials/runtime-credentials-access.service.js +35 -0
- package/dist/modules/runtime-credentials/runtime-credentials-access.service.js.map +1 -0
- package/dist/modules/{inbound-secrets/inbound-secrets-context-hook.d.ts → runtime-credentials/runtime-credentials-context-hook.d.ts} +4 -5
- package/dist/modules/{inbound-secrets/inbound-secrets-context-hook.js → runtime-credentials/runtime-credentials-context-hook.js} +14 -22
- package/dist/modules/runtime-credentials/runtime-credentials-context-hook.js.map +1 -0
- package/dist/modules/runtime-credentials/runtime-credentials.config.d.ts +3 -0
- package/dist/modules/{inbound-secrets/inbound-secrets.config.js → runtime-credentials/runtime-credentials.config.js} +7 -7
- package/dist/modules/runtime-credentials/runtime-credentials.config.js.map +1 -0
- package/dist/modules/runtime-credentials/runtime-credentials.module.d.ts +4 -0
- package/dist/modules/runtime-credentials/runtime-credentials.module.js +65 -0
- package/dist/modules/runtime-credentials/runtime-credentials.module.js.map +1 -0
- package/dist/modules/runtime-credentials/runtime-credentials.schemas.d.ts +23 -0
- package/dist/modules/runtime-credentials/runtime-credentials.schemas.js +10 -0
- package/dist/modules/runtime-credentials/runtime-credentials.schemas.js.map +1 -0
- package/dist/modules/runtime-credentials/runtime-credentials.service.d.ts +18 -0
- package/dist/modules/{inbound-secrets/inbound-secrets.service.js → runtime-credentials/runtime-credentials.service.js} +31 -28
- package/dist/modules/runtime-credentials/runtime-credentials.service.js.map +1 -0
- package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +1 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +3 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +29 -8
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +4 -4
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +1 -1
- package/dist/modules/source-control.ee/types/exportable-workflow.d.ts +2 -1
- package/dist/modules/sso-saml/saml.service.ee.js +5 -1
- package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
- package/dist/modules/workflow-index/workflow-dependency.controller.d.ts +1 -4
- package/dist/modules/workflow-index/workflow-dependency.controller.js +2 -13
- package/dist/modules/workflow-index/workflow-dependency.controller.js.map +1 -1
- package/dist/node-catalog/node-catalog.service.d.ts +1 -2
- package/dist/node-catalog/node-catalog.service.js +6 -10
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/node-execution/ephemeral-node-executor.js +19 -11
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/oauth/oauth-jwe-service.proxy.d.ts +12 -2
- package/dist/oauth/oauth-jwe-service.proxy.js +5 -0
- package/dist/oauth/oauth-jwe-service.proxy.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +6 -1
- package/dist/oauth/oauth.service.js +42 -4
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/permissions.ee/check-access.d.ts +2 -2
- package/dist/permissions.ee/check-access.js +15 -11
- package/dist/permissions.ee/check-access.js.map +1 -1
- package/dist/posthog/index.d.ts +2 -0
- package/dist/posthog/index.js +28 -6
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +10 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +42 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -0
- package/dist/public-api/v1/openapi.yml +55 -0
- package/dist/requests.d.ts +1 -1
- package/dist/scaling/constants.js +3 -0
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/multi-main-setup.ee.d.ts +12 -7
- package/dist/scaling/multi-main-setup.ee.js +125 -22
- package/dist/scaling/multi-main-setup.ee.js.map +1 -1
- package/dist/server.d.ts +1 -0
- package/dist/server.js +3 -4
- package/dist/server.js.map +1 -1
- package/dist/services/dynamic-node-parameters.service.d.ts +0 -1
- package/dist/services/dynamic-node-parameters.service.js +6 -14
- package/dist/services/dynamic-node-parameters.service.js.map +1 -1
- package/dist/services/frontend.service.js +1 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.js +3 -1
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/proxy-token-manager.js +2 -13
- package/dist/services/proxy-token-manager.js.map +1 -1
- package/dist/services/runtime-credential-proxy.service.d.ts +9 -0
- package/dist/services/runtime-credential-proxy.service.js +29 -0
- package/dist/services/runtime-credential-proxy.service.js.map +1 -0
- package/dist/services/url.service.d.ts +1 -0
- package/dist/services/url.service.js +3 -0
- package/dist/services/url.service.js.map +1 -1
- package/dist/telemetry/index.d.ts +4 -1
- package/dist/telemetry/index.js +16 -8
- package/dist/telemetry/index.js.map +1 -1
- package/dist/utils.d.ts +2 -1
- package/dist/utils.js +10 -0
- package/dist/utils.js.map +1 -1
- package/dist/webhooks/live-webhooks.js +2 -2
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +1 -1
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +3 -1
- package/dist/workflow-execute-additional-data.js +26 -3
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +3 -1
- package/dist/workflow-helpers.js +39 -5
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-hook-context.service.d.ts +6 -0
- package/dist/workflow-hook-context.service.js +32 -0
- package/dist/workflow-hook-context.service.js.map +1 -0
- package/dist/workflow-runner.js +2 -1
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/utils.d.ts +3 -0
- package/dist/workflows/utils.js +19 -0
- package/dist/workflows/utils.js.map +1 -1
- package/dist/workflows/workflow-creation.service.js +4 -2
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-execution.service.d.ts +4 -3
- package/dist/workflows/workflow-execution.service.js +8 -3
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +6 -2
- package/dist/workflows/workflow-finder.service.js +18 -0
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.controller.d.ts +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.d.ts +2 -1
- package/dist/workflows/workflow-history/workflow-history.service.js +1 -0
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.d.ts +3 -1
- package/dist/workflows/workflow-validation.service.js +6 -3
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +3 -3
- package/dist/workflows/workflow.service.js +26 -4
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +31 -21
- package/dist/workflows/workflows.controller.js +6 -2
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +37 -35
- package/dist/modules/agents/entities/agent-published-version.entity.js.map +0 -1
- package/dist/modules/agents/repositories/agent-published-version.repository.d.ts +0 -20
- package/dist/modules/agents/repositories/agent-published-version.repository.js.map +0 -1
- package/dist/modules/inbound-secrets/inbound-secrets-context-hook.js.map +0 -1
- package/dist/modules/inbound-secrets/inbound-secrets.config.d.ts +0 -3
- package/dist/modules/inbound-secrets/inbound-secrets.config.js.map +0 -1
- package/dist/modules/inbound-secrets/inbound-secrets.module.js.map +0 -1
- package/dist/modules/inbound-secrets/inbound-secrets.schemas.d.ts +0 -3
- package/dist/modules/inbound-secrets/inbound-secrets.schemas.js +0 -6
- package/dist/modules/inbound-secrets/inbound-secrets.schemas.js.map +0 -1
- package/dist/modules/inbound-secrets/inbound-secrets.service.d.ts +0 -17
- package/dist/modules/inbound-secrets/inbound-secrets.service.js.map +0 -1
- package/dist/modules/inbound-secrets/path-traversal.js.map +0 -1
- package/dist/modules/instance-ai/compaction.service.d.ts +0 -24
- package/dist/modules/instance-ai/compaction.service.js +0 -213
- package/dist/modules/instance-ai/compaction.service.js.map +0 -1
- package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.d.ts +0 -33
- package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js +0 -145
- package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js.map +0 -1
- package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.d.ts +0 -8
- package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.js.map +0 -1
- package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.d.ts +0 -5
- package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.js.map +0 -1
- package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.d.ts +0 -5
- package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.js.map +0 -1
- package/dist/modules/instance-ai/snapshot-pruning.service.d.ts +0 -17
- package/dist/modules/instance-ai/snapshot-pruning.service.js +0 -89
- package/dist/modules/instance-ai/snapshot-pruning.service.js.map +0 -1
- package/dist/modules/instance-ai/storage/typeorm-composite-store.d.ts +0 -9
- package/dist/modules/instance-ai/storage/typeorm-composite-store.js +0 -33
- package/dist/modules/instance-ai/storage/typeorm-composite-store.js.map +0 -1
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.d.ts +0 -96
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +0 -864
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +0 -1
- package/dist/modules/instance-ai/storage/typeorm-workflows-storage.d.ts +0 -44
- package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js +0 -156
- package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js.map +0 -1
- package/dist/scaling/multi-main-setup-legacy.d.ts +0 -25
- package/dist/scaling/multi-main-setup-legacy.js +0 -75
- package/dist/scaling/multi-main-setup-legacy.js.map +0 -1
- package/dist/scaling/multi-main-setup-v2.d.ts +0 -25
- package/dist/scaling/multi-main-setup-v2.js +0 -143
- package/dist/scaling/multi-main-setup-v2.js.map +0 -1
- package/dist/scaling/multi-main-setup.types.d.ts +0 -6
- package/dist/scaling/multi-main-setup.types.js.map +0 -1
- /package/dist/modules/{inbound-secrets → runtime-credentials}/path-traversal.d.ts +0 -0
- /package/dist/modules/{inbound-secrets → runtime-credentials}/path-traversal.js +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataSource, Repository } from '@n8n/typeorm';
|
|
2
|
+
import { InstanceAiObservation } from '../entities/instance-ai-observation.entity';
|
|
3
|
+
export declare class InstanceAiObservationRepository extends Repository<InstanceAiObservation> {
|
|
4
|
+
constructor(dataSource: DataSource);
|
|
5
|
+
}
|
|
@@ -9,27 +9,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.InstanceAiObservationRepository = void 0;
|
|
13
13
|
const di_1 = require("@n8n/di");
|
|
14
14
|
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
-
const
|
|
16
|
-
let
|
|
15
|
+
const instance_ai_observation_entity_1 = require("../entities/instance-ai-observation.entity");
|
|
16
|
+
let InstanceAiObservationRepository = class InstanceAiObservationRepository extends typeorm_1.Repository {
|
|
17
17
|
constructor(dataSource) {
|
|
18
|
-
super(
|
|
19
|
-
}
|
|
20
|
-
async savePublishedVersion(data, trx) {
|
|
21
|
-
const repo = trx?.getRepository(agent_published_version_entity_1.AgentPublishedVersion) ?? this;
|
|
22
|
-
await repo.upsert({ ...data, updatedAt: new Date() }, ['agentId']);
|
|
23
|
-
return await repo.findOneByOrFail({ agentId: data.agentId });
|
|
24
|
-
}
|
|
25
|
-
async deleteByAgentId(agentId, trx) {
|
|
26
|
-
const repo = trx?.getRepository(agent_published_version_entity_1.AgentPublishedVersion) ?? this;
|
|
27
|
-
await repo.delete({ agentId });
|
|
18
|
+
super(instance_ai_observation_entity_1.InstanceAiObservation, dataSource.manager);
|
|
28
19
|
}
|
|
29
20
|
};
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
21
|
+
exports.InstanceAiObservationRepository = InstanceAiObservationRepository;
|
|
22
|
+
exports.InstanceAiObservationRepository = InstanceAiObservationRepository = __decorate([
|
|
32
23
|
(0, di_1.Service)(),
|
|
33
24
|
__metadata("design:paramtypes", [typeorm_1.DataSource])
|
|
34
|
-
],
|
|
35
|
-
//# sourceMappingURL=
|
|
25
|
+
], InstanceAiObservationRepository);
|
|
26
|
+
//# sourceMappingURL=instance-ai-observation.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-ai-observation.repository.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/repositories/instance-ai-observation.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,0CAAsD;AAEtD,+FAAmF;AAG5E,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,oBAAiC;IACrF,YAAY,UAAsB;QACjC,KAAK,CAAC,sDAAqB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;CACD,CAAA;AAJY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,YAAO,GAAE;qCAEe,oBAAU;GADtB,+BAA+B,CAI3C"}
|
|
@@ -4,6 +4,8 @@ import { InstanceAiRunSnapshotRepository } from '../repositories/instance-ai-run
|
|
|
4
4
|
export interface SaveSnapshotOptions {
|
|
5
5
|
messageGroupId?: string;
|
|
6
6
|
runIds?: string[];
|
|
7
|
+
traceId?: string;
|
|
8
|
+
spanId?: string;
|
|
7
9
|
langsmithRunId?: string;
|
|
8
10
|
langsmithTraceId?: string;
|
|
9
11
|
}
|
|
@@ -40,6 +40,8 @@ let DbSnapshotStorage = class DbSnapshotStorage {
|
|
|
40
40
|
runId: row.runId,
|
|
41
41
|
messageGroupId: row.messageGroupId ?? undefined,
|
|
42
42
|
runIds: row.runIds ?? undefined,
|
|
43
|
+
traceId: row.traceId ?? undefined,
|
|
44
|
+
spanId: row.spanId ?? undefined,
|
|
43
45
|
langsmithRunId: row.langsmithRunId ?? undefined,
|
|
44
46
|
langsmithTraceId: row.langsmithTraceId ?? undefined,
|
|
45
47
|
createdAt: row.createdAt,
|
|
@@ -47,19 +49,21 @@ let DbSnapshotStorage = class DbSnapshotStorage {
|
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
async save(threadId, agentTree, runId, options = {}) {
|
|
50
|
-
const { messageGroupId, runIds, langsmithRunId, langsmithTraceId } = options;
|
|
52
|
+
const { messageGroupId, runIds, traceId, spanId, langsmithRunId, langsmithTraceId } = options;
|
|
51
53
|
await this.repo.upsert({
|
|
52
54
|
threadId,
|
|
53
55
|
runId,
|
|
54
56
|
messageGroupId: messageGroupId ?? null,
|
|
55
57
|
runIds: runIds ?? null,
|
|
56
58
|
tree: JSON.stringify(agentTree),
|
|
59
|
+
traceId: traceId ?? null,
|
|
60
|
+
spanId: spanId ?? null,
|
|
57
61
|
langsmithRunId: langsmithRunId ?? null,
|
|
58
62
|
langsmithTraceId: langsmithTraceId ?? null,
|
|
59
63
|
}, ['threadId', 'runId']);
|
|
60
64
|
}
|
|
61
65
|
async updateLast(threadId, agentTree, runId, options = {}) {
|
|
62
|
-
const { messageGroupId, runIds, langsmithRunId, langsmithTraceId } = options;
|
|
66
|
+
const { messageGroupId, runIds, traceId, spanId, langsmithRunId, langsmithTraceId } = options;
|
|
63
67
|
if (messageGroupId) {
|
|
64
68
|
const existing = await this.repo.findOne({
|
|
65
69
|
where: { threadId, messageGroupId },
|
|
@@ -71,6 +75,8 @@ let DbSnapshotStorage = class DbSnapshotStorage {
|
|
|
71
75
|
tree: JSON.stringify(agentTree),
|
|
72
76
|
messageGroupId,
|
|
73
77
|
runIds: runIds ?? existing.runIds,
|
|
78
|
+
traceId: traceId ?? existing.traceId,
|
|
79
|
+
spanId: spanId ?? existing.spanId,
|
|
74
80
|
langsmithRunId: langsmithRunId ?? existing.langsmithRunId,
|
|
75
81
|
langsmithTraceId: langsmithTraceId ?? existing.langsmithTraceId,
|
|
76
82
|
});
|
|
@@ -83,6 +89,8 @@ let DbSnapshotStorage = class DbSnapshotStorage {
|
|
|
83
89
|
tree: JSON.stringify(agentTree),
|
|
84
90
|
messageGroupId: messageGroupId ?? byRunId.messageGroupId,
|
|
85
91
|
runIds: runIds ?? byRunId.runIds,
|
|
92
|
+
traceId: traceId ?? byRunId.traceId,
|
|
93
|
+
spanId: spanId ?? byRunId.spanId,
|
|
86
94
|
langsmithRunId: langsmithRunId ?? byRunId.langsmithRunId,
|
|
87
95
|
langsmithTraceId: langsmithTraceId ?? byRunId.langsmithTraceId,
|
|
88
96
|
});
|
|
@@ -100,6 +108,8 @@ let DbSnapshotStorage = class DbSnapshotStorage {
|
|
|
100
108
|
runId: r.runId,
|
|
101
109
|
messageGroupId: r.messageGroupId ?? undefined,
|
|
102
110
|
runIds: r.runIds ?? undefined,
|
|
111
|
+
traceId: r.traceId ?? undefined,
|
|
112
|
+
spanId: r.spanId ?? undefined,
|
|
103
113
|
langsmithRunId: r.langsmithRunId ?? undefined,
|
|
104
114
|
langsmithTraceId: r.langsmithTraceId ?? undefined,
|
|
105
115
|
createdAt: r.createdAt,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db-snapshot-storage.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/db-snapshot-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAElC,+CAAyC;AAEzC,6GAAsG;
|
|
1
|
+
{"version":3,"file":"db-snapshot-storage.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/db-snapshot-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAElC,+CAAyC;AAEzC,6GAAsG;AAY/F,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC7B,YAA6B,IAAqC;QAArC,SAAI,GAAJ,IAAI,CAAiC;IAAG,CAAC;IAEtE,KAAK,CAAC,SAAS,CACd,QAAgB,EAChB,UAAuD,EAAE;QAEzD,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAE1C,MAAM,GAAG,GAAG,cAAc;YACzB,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;gBACxB,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE;gBACnC,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;aAC5B,CAAC;YACH,CAAC,CAAC,KAAK;gBACN,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;oBACxB,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;oBAC1B,KAAK,EAAE,EAA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AAgB,EAAE,CAAC,CAAC,gBAAgB,IAAI,SAAS;YACjD,SAAS,EAAE,CAAC,CAAC,SAAS;YACtB,SAAS,EAAE,CAAC,CAAC,SAAS;SACtB,CAAC,CAAC,CAAC;IACL,CAAC;IAOD,KAAK,CAAC,mBAAmB,CACxB,QAAgB,EAChB,UAAkB;QAElB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvC,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE;YAC/C,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;SAC3B,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,OAAO,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;QACpF,IAAI,CAAC,GAAG,EAAE,cAAc,IAAI,CAAC,GAAG,CAAC,gBAAgB;YAAE,OAAO,SAAS,CAAC;QACpE,OAAO,EAAE,cAAc,EAAE,GAAG,CAAC,cAAc,EAAE,gBAAgB,EAAE,GAAG,CAAC,gBAAgB,EAAE,CAAC;IACvF,CAAC;CACD,CAAA;AA1JY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,YAAO,GAAE;qCAE0B,qEAA+B;GADtD,iBAAiB,CA0J7B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { TypeORMMemoryStorage } from './typeorm-memory-storage';
|
|
2
|
-
export { TypeORMWorkflowsStorage } from './typeorm-workflows-storage';
|
|
3
|
-
export { TypeORMCompositeStore } from './typeorm-composite-store';
|
|
4
1
|
export { DbSnapshotStorage } from './db-snapshot-storage';
|
|
5
2
|
export { DbIterationLogStorage } from './db-iteration-log-storage';
|
|
3
|
+
export { TypeORMAgentCheckpointStore } from './typeorm-agent-checkpoint-store';
|
|
4
|
+
export { TypeORMAgentMemory } from './typeorm-agent-memory';
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var typeorm_memory_storage_1 = require("./typeorm-memory-storage");
|
|
5
|
-
Object.defineProperty(exports, "TypeORMMemoryStorage", { enumerable: true, get: function () { return typeorm_memory_storage_1.TypeORMMemoryStorage; } });
|
|
6
|
-
var typeorm_workflows_storage_1 = require("./typeorm-workflows-storage");
|
|
7
|
-
Object.defineProperty(exports, "TypeORMWorkflowsStorage", { enumerable: true, get: function () { return typeorm_workflows_storage_1.TypeORMWorkflowsStorage; } });
|
|
8
|
-
var typeorm_composite_store_1 = require("./typeorm-composite-store");
|
|
9
|
-
Object.defineProperty(exports, "TypeORMCompositeStore", { enumerable: true, get: function () { return typeorm_composite_store_1.TypeORMCompositeStore; } });
|
|
3
|
+
exports.TypeORMAgentMemory = exports.TypeORMAgentCheckpointStore = exports.DbIterationLogStorage = exports.DbSnapshotStorage = void 0;
|
|
10
4
|
var db_snapshot_storage_1 = require("./db-snapshot-storage");
|
|
11
5
|
Object.defineProperty(exports, "DbSnapshotStorage", { enumerable: true, get: function () { return db_snapshot_storage_1.DbSnapshotStorage; } });
|
|
12
6
|
var db_iteration_log_storage_1 = require("./db-iteration-log-storage");
|
|
13
7
|
Object.defineProperty(exports, "DbIterationLogStorage", { enumerable: true, get: function () { return db_iteration_log_storage_1.DbIterationLogStorage; } });
|
|
8
|
+
var typeorm_agent_checkpoint_store_1 = require("./typeorm-agent-checkpoint-store");
|
|
9
|
+
Object.defineProperty(exports, "TypeORMAgentCheckpointStore", { enumerable: true, get: function () { return typeorm_agent_checkpoint_store_1.TypeORMAgentCheckpointStore; } });
|
|
10
|
+
var typeorm_agent_memory_1 = require("./typeorm-agent-memory");
|
|
11
|
+
Object.defineProperty(exports, "TypeORMAgentMemory", { enumerable: true, get: function () { return typeorm_agent_memory_1.TypeORMAgentMemory; } });
|
|
14
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/index.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA;AAC9B,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CheckpointStore, SerializableAgentState } from '@n8n/instance-ai';
|
|
2
|
+
import { InstanceAiCheckpointRepository } from '../repositories/instance-ai-checkpoint.repository';
|
|
3
|
+
export declare class TypeORMAgentCheckpointStore implements CheckpointStore {
|
|
4
|
+
private readonly checkpointRepo;
|
|
5
|
+
private readonly loadQueues;
|
|
6
|
+
constructor(checkpointRepo: InstanceAiCheckpointRepository);
|
|
7
|
+
save(key: string, state: SerializableAgentState): Promise<void>;
|
|
8
|
+
load(key: string): Promise<SerializableAgentState | undefined>;
|
|
9
|
+
delete(key: string): Promise<void>;
|
|
10
|
+
deleteOlderThan(olderThan: Date): Promise<number>;
|
|
11
|
+
private loadAndDelete;
|
|
12
|
+
private getRunId;
|
|
13
|
+
private supportsPessimisticWriteLock;
|
|
14
|
+
private serializeLoad;
|
|
15
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
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.TypeORMAgentCheckpointStore = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
16
|
+
const instance_ai_checkpoint_entity_1 = require("../entities/instance-ai-checkpoint.entity");
|
|
17
|
+
const instance_ai_checkpoint_repository_1 = require("../repositories/instance-ai-checkpoint.repository");
|
|
18
|
+
let TypeORMAgentCheckpointStore = class TypeORMAgentCheckpointStore {
|
|
19
|
+
constructor(checkpointRepo) {
|
|
20
|
+
this.checkpointRepo = checkpointRepo;
|
|
21
|
+
this.loadQueues = new Map();
|
|
22
|
+
}
|
|
23
|
+
async save(key, state) {
|
|
24
|
+
const threadId = state.persistence?.threadId;
|
|
25
|
+
if (!threadId) {
|
|
26
|
+
throw new n8n_workflow_1.UnexpectedError('Instance AI checkpoint state is missing a thread id', {
|
|
27
|
+
extra: { key },
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
const checkpoint = this.checkpointRepo.create({
|
|
31
|
+
key,
|
|
32
|
+
runId: this.getRunId(key),
|
|
33
|
+
threadId,
|
|
34
|
+
resourceId: state.persistence?.resourceId ?? null,
|
|
35
|
+
state,
|
|
36
|
+
});
|
|
37
|
+
await this.checkpointRepo.save(checkpoint);
|
|
38
|
+
}
|
|
39
|
+
async load(key) {
|
|
40
|
+
return await this.serializeLoad(key, async () => await this.loadAndDelete(key));
|
|
41
|
+
}
|
|
42
|
+
async delete(key) {
|
|
43
|
+
await this.checkpointRepo.delete({ key });
|
|
44
|
+
}
|
|
45
|
+
async deleteOlderThan(olderThan) {
|
|
46
|
+
const result = await this.checkpointRepo.delete({ updatedAt: (0, typeorm_1.LessThan)(olderThan) });
|
|
47
|
+
return result.affected ?? 0;
|
|
48
|
+
}
|
|
49
|
+
async loadAndDelete(key) {
|
|
50
|
+
return await this.checkpointRepo.manager.transaction(async (manager) => {
|
|
51
|
+
const repo = manager.getRepository(instance_ai_checkpoint_entity_1.InstanceAiCheckpoint);
|
|
52
|
+
const checkpoint = await repo.findOne({
|
|
53
|
+
where: { key },
|
|
54
|
+
...(this.supportsPessimisticWriteLock(manager)
|
|
55
|
+
? { lock: { mode: 'pessimistic_write' } }
|
|
56
|
+
: {}),
|
|
57
|
+
});
|
|
58
|
+
if (!checkpoint)
|
|
59
|
+
return undefined;
|
|
60
|
+
const result = await repo.delete({ key });
|
|
61
|
+
if (result.affected === 0)
|
|
62
|
+
return undefined;
|
|
63
|
+
return checkpoint.state ?? undefined;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
getRunId(key) {
|
|
67
|
+
const separatorIndex = key.lastIndexOf(':');
|
|
68
|
+
if (separatorIndex < 0 || separatorIndex === key.length - 1)
|
|
69
|
+
return null;
|
|
70
|
+
return key.slice(separatorIndex + 1);
|
|
71
|
+
}
|
|
72
|
+
supportsPessimisticWriteLock(manager) {
|
|
73
|
+
return manager.connection.options.type === 'postgres';
|
|
74
|
+
}
|
|
75
|
+
async serializeLoad(key, load) {
|
|
76
|
+
const previous = this.loadQueues.get(key) ?? Promise.resolve(undefined);
|
|
77
|
+
const next = previous.catch(() => undefined).then(load);
|
|
78
|
+
this.loadQueues.set(key, next);
|
|
79
|
+
try {
|
|
80
|
+
return await next;
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
if (this.loadQueues.get(key) === next) {
|
|
84
|
+
this.loadQueues.delete(key);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.TypeORMAgentCheckpointStore = TypeORMAgentCheckpointStore;
|
|
90
|
+
exports.TypeORMAgentCheckpointStore = TypeORMAgentCheckpointStore = __decorate([
|
|
91
|
+
(0, di_1.Service)(),
|
|
92
|
+
__metadata("design:paramtypes", [instance_ai_checkpoint_repository_1.InstanceAiCheckpointRepository])
|
|
93
|
+
], TypeORMAgentCheckpointStore);
|
|
94
|
+
//# sourceMappingURL=typeorm-agent-checkpoint-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeorm-agent-checkpoint-store.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/typeorm-agent-checkpoint-store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAElC,0CAA4D;AAC5D,+CAA+C;AAE/C,6FAAiF;AACjF,yGAAmG;AAG5F,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAGvC,YAA6B,cAA8C;QAA9C,mBAAc,GAAd,cAAc,CAAgC;QAF1D,eAAU,GAAG,IAAI,GAAG,EAAuD,CAAC;IAEf,CAAC;IAE/E,KAAK,CAAC,IAAI,CAAC,GAAW,EAAE,KAA6B;QACpD,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,QAAQ,CAAC;QAC7C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,IAAI,8BAAe,CAAC,qDAAqD,EAAE;gBAChF,KAAK,EAAE,EAAE,GAAG,EAAE;aACd,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;YAC7C,GAAG;YACH,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YACzB,QAAQ;YACR,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE,UAAU,IAAI,IAAI;YACjD,KAAK;SACL,CAAC,CAAC;QAEH,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CA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94 @@
|
|
|
1
|
+
import { type BuiltObservationLogStore, type BuiltObservationLogTaskLockStore, type MemoryDescriptor, type NewObservationLogEntry, type ObservationCursor, type ObservationLogEntry, type ObservationLogReadOptions, type ObservationLogReflection, type ObservationLogReflectionResult, type ObservationLogScope, type ObservationLogTaskKind, type ObservationLogTaskLockHandle } from '@n8n/agents';
|
|
2
|
+
import { Logger } from '@n8n/backend-common';
|
|
3
|
+
import type { AgentDbMessage, BuiltMemory, Thread, ThreadPatch } from '@n8n/instance-ai';
|
|
4
|
+
import { InstanceAiMessageRepository } from '../repositories/instance-ai-message.repository';
|
|
5
|
+
import { InstanceAiObservationCursorRepository } from '../repositories/instance-ai-observation-cursor.repository';
|
|
6
|
+
import { InstanceAiObservationLockRepository } from '../repositories/instance-ai-observation-lock.repository';
|
|
7
|
+
import { InstanceAiObservationRepository } from '../repositories/instance-ai-observation.repository';
|
|
8
|
+
import { InstanceAiResourceRepository } from '../repositories/instance-ai-resource.repository';
|
|
9
|
+
import { InstanceAiThreadRepository } from '../repositories/instance-ai-thread.repository';
|
|
10
|
+
export declare class TypeORMAgentMemory implements BuiltMemory, BuiltObservationLogStore, BuiltObservationLogTaskLockStore {
|
|
11
|
+
private readonly threadRepo;
|
|
12
|
+
private readonly messageRepo;
|
|
13
|
+
private readonly resourceRepo;
|
|
14
|
+
private readonly threadMutationQueues;
|
|
15
|
+
private readonly observationLog;
|
|
16
|
+
constructor(threadRepo: InstanceAiThreadRepository, messageRepo: InstanceAiMessageRepository, resourceRepo: InstanceAiResourceRepository, observationRepo: InstanceAiObservationRepository, observationCursorRepo: InstanceAiObservationCursorRepository, observationLockRepo: InstanceAiObservationLockRepository, logger: Logger);
|
|
17
|
+
private readonly logger;
|
|
18
|
+
describe(): MemoryDescriptor;
|
|
19
|
+
getThread(threadId: string): Promise<Thread | null>;
|
|
20
|
+
listThreads(args: {
|
|
21
|
+
filter?: {
|
|
22
|
+
resourceId?: string;
|
|
23
|
+
};
|
|
24
|
+
perPage?: number;
|
|
25
|
+
page?: number;
|
|
26
|
+
orderBy?: {
|
|
27
|
+
field: 'createdAt' | 'updatedAt';
|
|
28
|
+
direction: 'ASC' | 'DESC';
|
|
29
|
+
};
|
|
30
|
+
}): Promise<{
|
|
31
|
+
threads: Thread[];
|
|
32
|
+
total: number;
|
|
33
|
+
page: number;
|
|
34
|
+
hasMore: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
saveThread(thread: Omit<Thread, 'createdAt' | 'updatedAt'>): Promise<Thread>;
|
|
37
|
+
patchThread(args: {
|
|
38
|
+
threadId: string;
|
|
39
|
+
update: (current: Thread) => ThreadPatch | null | undefined;
|
|
40
|
+
}): Promise<Thread | null>;
|
|
41
|
+
deleteThread(threadId: string): Promise<void>;
|
|
42
|
+
deleteThreadsByResourceIdPrefix(resourceIdPrefix: string): Promise<void>;
|
|
43
|
+
getMessages(threadId: string, opts?: {
|
|
44
|
+
limit?: number;
|
|
45
|
+
before?: Date;
|
|
46
|
+
}): Promise<AgentDbMessage[]>;
|
|
47
|
+
listMessages(args: {
|
|
48
|
+
threadId: string;
|
|
49
|
+
limit?: number;
|
|
50
|
+
page?: number;
|
|
51
|
+
}): Promise<{
|
|
52
|
+
messages: AgentDbMessage[];
|
|
53
|
+
}>;
|
|
54
|
+
saveMessages(args: {
|
|
55
|
+
threadId: string;
|
|
56
|
+
resourceId: string;
|
|
57
|
+
messages: AgentDbMessage[];
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
deleteMessages(messageIds: string[]): Promise<void>;
|
|
60
|
+
getWorkingMemory(params: {
|
|
61
|
+
threadId: string;
|
|
62
|
+
resourceId: string;
|
|
63
|
+
scope: 'resource' | 'thread';
|
|
64
|
+
}): Promise<string | null>;
|
|
65
|
+
saveWorkingMemory(params: {
|
|
66
|
+
threadId: string;
|
|
67
|
+
resourceId: string;
|
|
68
|
+
scope: 'resource' | 'thread';
|
|
69
|
+
}, content: string): Promise<void>;
|
|
70
|
+
appendObservationLogEntries(rows: NewObservationLogEntry[]): Promise<ObservationLogEntry[]>;
|
|
71
|
+
getActiveObservationLog(scope: ObservationLogScope & {
|
|
72
|
+
limit?: number;
|
|
73
|
+
order?: 'asc' | 'desc';
|
|
74
|
+
}): Promise<ObservationLogEntry[]>;
|
|
75
|
+
getObservationLog(opts: ObservationLogReadOptions): Promise<ObservationLogEntry[]>;
|
|
76
|
+
getMessagesForObservationScope(observationScopeId: string, opts?: {
|
|
77
|
+
since?: {
|
|
78
|
+
sinceCreatedAt: Date;
|
|
79
|
+
sinceMessageId: string;
|
|
80
|
+
};
|
|
81
|
+
}): Promise<AgentDbMessage[]>;
|
|
82
|
+
dropObservationLogEntries(ids: string[]): Promise<void>;
|
|
83
|
+
supersedeObservationLogEntries(ids: string[], supersededBy: string): Promise<void>;
|
|
84
|
+
applyObservationLogReflection(scope: ObservationLogScope, reflection: ObservationLogReflection): Promise<ObservationLogReflectionResult>;
|
|
85
|
+
getCursor(observationScopeId: string): Promise<ObservationCursor | null>;
|
|
86
|
+
setCursor(cursor: ObservationCursor): Promise<void>;
|
|
87
|
+
acquireObservationLogTaskLock(observationScopeId: string, taskKind: ObservationLogTaskKind, opts: {
|
|
88
|
+
ttlMs: number;
|
|
89
|
+
holderId: string;
|
|
90
|
+
}): Promise<ObservationLogTaskLockHandle | null>;
|
|
91
|
+
releaseObservationLogTaskLock(handle: ObservationLogTaskLockHandle): Promise<void>;
|
|
92
|
+
private serializeThreadMutation;
|
|
93
|
+
private toAgentMessage;
|
|
94
|
+
}
|