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
|
@@ -9,16 +9,24 @@ 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.N8nMemory = void 0;
|
|
12
|
+
exports.N8nMemoryImpl = exports.N8nMemory = void 0;
|
|
13
13
|
const agents_1 = require("@n8n/agents");
|
|
14
14
|
const di_1 = require("@n8n/di");
|
|
15
15
|
const typeorm_1 = require("@n8n/typeorm");
|
|
16
|
-
const
|
|
16
|
+
const response_helper_1 = require("../../../response-helper");
|
|
17
|
+
const agent_memory_entry_cursor_entity_1 = require("../entities/agent-memory-entry-cursor.entity");
|
|
18
|
+
const agent_memory_entry_entity_1 = require("../entities/agent-memory-entry.entity");
|
|
19
|
+
const agent_memory_entry_lock_entity_1 = require("../entities/agent-memory-entry-lock.entity");
|
|
20
|
+
const agent_memory_entry_source_entity_1 = require("../entities/agent-memory-entry-source.entity");
|
|
17
21
|
const agent_observation_cursor_entity_1 = require("../entities/agent-observation-cursor.entity");
|
|
18
22
|
const agent_observation_lock_entity_1 = require("../entities/agent-observation-lock.entity");
|
|
19
23
|
const agent_observation_entity_1 = require("../entities/agent-observation.entity");
|
|
20
24
|
const agent_thread_entity_1 = require("../entities/agent-thread.entity");
|
|
21
25
|
const agent_message_repository_1 = require("../repositories/agent-message.repository");
|
|
26
|
+
const agent_memory_entry_cursor_repository_1 = require("../repositories/agent-memory-entry-cursor.repository");
|
|
27
|
+
const agent_memory_entry_lock_repository_1 = require("../repositories/agent-memory-entry-lock.repository");
|
|
28
|
+
const agent_memory_entry_source_repository_1 = require("../repositories/agent-memory-entry-source.repository");
|
|
29
|
+
const agent_memory_entry_repository_1 = require("../repositories/agent-memory-entry.repository");
|
|
22
30
|
const agent_observation_cursor_repository_1 = require("../repositories/agent-observation-cursor.repository");
|
|
23
31
|
const agent_observation_lock_repository_1 = require("../repositories/agent-observation-lock.repository");
|
|
24
32
|
const agent_observation_repository_1 = require("../repositories/agent-observation.repository");
|
|
@@ -26,13 +34,61 @@ const agent_resource_repository_1 = require("../repositories/agent-resource.repo
|
|
|
26
34
|
const agent_thread_repository_1 = require("../repositories/agent-thread.repository");
|
|
27
35
|
const estimateObservationTokens = (text) => Math.ceil(text.length / 4);
|
|
28
36
|
let N8nMemory = class N8nMemory {
|
|
29
|
-
constructor(threadRepository, messageRepository, resourceRepository, observationRepository, observationCursorRepository, observationLockRepository) {
|
|
37
|
+
constructor(threadRepository, messageRepository, resourceRepository, observationRepository, observationCursorRepository, observationLockRepository, memoryEntryRepository, memoryEntryLockRepository, memoryEntrySourceRepository, memoryEntryCursorRepository) {
|
|
30
38
|
this.threadRepository = threadRepository;
|
|
31
39
|
this.messageRepository = messageRepository;
|
|
32
40
|
this.resourceRepository = resourceRepository;
|
|
33
41
|
this.observationRepository = observationRepository;
|
|
34
42
|
this.observationCursorRepository = observationCursorRepository;
|
|
35
43
|
this.observationLockRepository = observationLockRepository;
|
|
44
|
+
this.memoryEntryRepository = memoryEntryRepository;
|
|
45
|
+
this.memoryEntryLockRepository = memoryEntryLockRepository;
|
|
46
|
+
this.memoryEntrySourceRepository = memoryEntrySourceRepository;
|
|
47
|
+
this.memoryEntryCursorRepository = memoryEntryCursorRepository;
|
|
48
|
+
}
|
|
49
|
+
getImplementation(agentId) {
|
|
50
|
+
return new N8nMemoryImpl(agentId, this.threadRepository, this.messageRepository, this.resourceRepository, this.observationRepository, this.observationCursorRepository, this.observationLockRepository, this.memoryEntryRepository, this.memoryEntryLockRepository, this.memoryEntrySourceRepository, this.memoryEntryCursorRepository);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.N8nMemory = N8nMemory;
|
|
54
|
+
exports.N8nMemory = N8nMemory = __decorate([
|
|
55
|
+
(0, di_1.Service)(),
|
|
56
|
+
__metadata("design:paramtypes", [agent_thread_repository_1.AgentThreadRepository,
|
|
57
|
+
agent_message_repository_1.AgentMessageRepository,
|
|
58
|
+
agent_resource_repository_1.AgentResourceRepository,
|
|
59
|
+
agent_observation_repository_1.AgentObservationRepository,
|
|
60
|
+
agent_observation_cursor_repository_1.AgentObservationCursorRepository,
|
|
61
|
+
agent_observation_lock_repository_1.AgentObservationLockRepository,
|
|
62
|
+
agent_memory_entry_repository_1.AgentMemoryEntryRepository,
|
|
63
|
+
agent_memory_entry_lock_repository_1.AgentMemoryEntryLockRepository,
|
|
64
|
+
agent_memory_entry_source_repository_1.AgentMemoryEntrySourceRepository,
|
|
65
|
+
agent_memory_entry_cursor_repository_1.AgentMemoryEntryCursorRepository])
|
|
66
|
+
], N8nMemory);
|
|
67
|
+
class N8nMemoryImpl {
|
|
68
|
+
constructor(agentId, threadRepository, messageRepository, resourceRepository, observationRepository, observationCursorRepository, observationLockRepository, memoryEntryRepository, memoryEntryLockRepository, memoryEntrySourceRepository, memoryEntryCursorRepository) {
|
|
69
|
+
this.agentId = agentId;
|
|
70
|
+
this.threadRepository = threadRepository;
|
|
71
|
+
this.messageRepository = messageRepository;
|
|
72
|
+
this.resourceRepository = resourceRepository;
|
|
73
|
+
this.observationRepository = observationRepository;
|
|
74
|
+
this.observationCursorRepository = observationCursorRepository;
|
|
75
|
+
this.observationLockRepository = observationLockRepository;
|
|
76
|
+
this.memoryEntryRepository = memoryEntryRepository;
|
|
77
|
+
this.memoryEntryLockRepository = memoryEntryLockRepository;
|
|
78
|
+
this.memoryEntrySourceRepository = memoryEntrySourceRepository;
|
|
79
|
+
this.memoryEntryCursorRepository = memoryEntryCursorRepository;
|
|
80
|
+
this.episodic = {
|
|
81
|
+
saveEntryWithSources: async (entry, sources) => await this.saveEpisodicMemoryEntryWithSources(entry, sources),
|
|
82
|
+
searchEntries: async (scope, query, opts) => await this.searchEpisodicMemoryEntries(scope, query, opts),
|
|
83
|
+
getEntrySources: async (entryIds) => await this.getEpisodicMemoryEntrySources(entryIds),
|
|
84
|
+
applyReflection: async (scope, reflection) => await this.applyEpisodicMemoryReflection(scope, reflection),
|
|
85
|
+
getCursor: async (scope) => await this.getEpisodicMemoryCursor(scope),
|
|
86
|
+
setCursor: async (cursor) => await this.setEpisodicMemoryCursor(cursor),
|
|
87
|
+
taskLock: {
|
|
88
|
+
acquire: async (resourceId, opts) => await this.acquireEpisodicMemoryTaskLock(resourceId, opts),
|
|
89
|
+
release: async (handle) => await this.releaseEpisodicMemoryTaskLock(handle),
|
|
90
|
+
},
|
|
91
|
+
};
|
|
36
92
|
}
|
|
37
93
|
async getThread(threadId) {
|
|
38
94
|
const entity = await this.threadRepository.findOneBy({ id: threadId });
|
|
@@ -69,33 +125,50 @@ let N8nMemory = class N8nMemory {
|
|
|
69
125
|
}
|
|
70
126
|
async deleteThread(threadId) {
|
|
71
127
|
await this.threadRepository.manager.transaction(async (trx) => {
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
await trx.delete(agent_observation_entity_1.AgentObservationEntity, scope);
|
|
79
|
-
await trx.delete(agent_observation_cursor_entity_1.AgentObservationCursorEntity, scope);
|
|
80
|
-
await trx.delete(agent_observation_lock_entity_1.AgentObservationLockEntity, scope);
|
|
81
|
-
}
|
|
128
|
+
await this.dropEpisodicEntriesWithoutSources(trx, threadId);
|
|
129
|
+
const observationScope = { agentId: this.agentId, observationScopeId: threadId };
|
|
130
|
+
await trx.delete(agent_observation_entity_1.AgentObservationEntity, observationScope);
|
|
131
|
+
await trx.delete(agent_observation_cursor_entity_1.AgentObservationCursorEntity, observationScope);
|
|
132
|
+
await trx.delete(agent_observation_lock_entity_1.AgentObservationLockEntity, observationScope);
|
|
133
|
+
await trx.delete(agent_memory_entry_cursor_entity_1.AgentMemoryEntryCursorEntity, observationScope);
|
|
82
134
|
await trx.delete(agent_thread_entity_1.AgentThreadEntity, { id: threadId });
|
|
83
135
|
});
|
|
84
136
|
}
|
|
85
137
|
async deleteThreadsByPrefix(threadIdPrefix) {
|
|
86
|
-
const
|
|
87
|
-
const resourceScopeId = (0, typeorm_1.Like)(`${(0, agents_1.createObservationLogThreadScopePrefix)(threadIdPrefix)}%`);
|
|
138
|
+
const observationScopeId = (0, typeorm_1.Like)(`${threadIdPrefix}%`);
|
|
88
139
|
await this.threadRepository.manager.transaction(async (trx) => {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
140
|
+
await this.dropEpisodicEntriesWithoutSources(trx, observationScopeId);
|
|
141
|
+
const observationScope = { agentId: this.agentId, observationScopeId };
|
|
142
|
+
await trx.delete(agent_observation_entity_1.AgentObservationEntity, observationScope);
|
|
143
|
+
await trx.delete(agent_observation_cursor_entity_1.AgentObservationCursorEntity, observationScope);
|
|
144
|
+
await trx.delete(agent_observation_lock_entity_1.AgentObservationLockEntity, observationScope);
|
|
145
|
+
await trx.delete(agent_memory_entry_cursor_entity_1.AgentMemoryEntryCursorEntity, observationScope);
|
|
146
|
+
await trx.delete(agent_thread_entity_1.AgentThreadEntity, { id: observationScopeId });
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
async dropEpisodicEntriesWithoutSources(trx, threadId) {
|
|
150
|
+
const sourceRepo = trx.getRepository(agent_memory_entry_source_entity_1.AgentMemoryEntrySourceEntity);
|
|
151
|
+
const entryRepo = trx.getRepository(agent_memory_entry_entity_1.AgentMemoryEntryEntity);
|
|
152
|
+
const affectedSources = await sourceRepo.find({
|
|
153
|
+
select: { memoryEntryId: true },
|
|
154
|
+
where: { agentId: this.agentId, threadId },
|
|
98
155
|
});
|
|
156
|
+
const affectedEntryIds = (0, agents_1.uniqueStrings)(affectedSources.map((source) => source.memoryEntryId));
|
|
157
|
+
if (affectedEntryIds.length === 0)
|
|
158
|
+
return;
|
|
159
|
+
await trx.delete(agent_memory_entry_source_entity_1.AgentMemoryEntrySourceEntity, {
|
|
160
|
+
agentId: this.agentId,
|
|
161
|
+
threadId,
|
|
162
|
+
});
|
|
163
|
+
const remainingSources = await sourceRepo.find({
|
|
164
|
+
select: { memoryEntryId: true },
|
|
165
|
+
where: { agentId: this.agentId, memoryEntryId: (0, typeorm_1.In)(affectedEntryIds) },
|
|
166
|
+
});
|
|
167
|
+
const entriesWithSources = new Set(remainingSources.map((source) => source.memoryEntryId));
|
|
168
|
+
const orphanedEntryIds = affectedEntryIds.filter((id) => !entriesWithSources.has(id));
|
|
169
|
+
if (orphanedEntryIds.length === 0)
|
|
170
|
+
return;
|
|
171
|
+
await entryRepo.update({ agentId: this.agentId, id: (0, typeorm_1.In)(orphanedEntryIds), status: 'active' }, (0, agents_1.droppedLifecycleState)());
|
|
99
172
|
}
|
|
100
173
|
async getMessages(threadId, opts) {
|
|
101
174
|
const where = {
|
|
@@ -148,14 +221,13 @@ let N8nMemory = class N8nMemory {
|
|
|
148
221
|
if (rows.length === 0)
|
|
149
222
|
return [];
|
|
150
223
|
const entities = rows.map((row) => this.observationRepository.create({
|
|
151
|
-
|
|
152
|
-
|
|
224
|
+
agentId: this.agentId,
|
|
225
|
+
observationScopeId: row.observationScopeId,
|
|
153
226
|
marker: row.marker,
|
|
154
227
|
text: row.text,
|
|
155
228
|
parentId: row.parentId ?? null,
|
|
156
229
|
tokenCount: row.tokenCount ?? estimateObservationTokens(row.text),
|
|
157
|
-
|
|
158
|
-
supersededBy: null,
|
|
230
|
+
...(0, agents_1.activeLifecycleState)(),
|
|
159
231
|
createdAt: row.createdAt,
|
|
160
232
|
}));
|
|
161
233
|
const saved = await this.observationRepository.save(entities);
|
|
@@ -166,8 +238,8 @@ let N8nMemory = class N8nMemory {
|
|
|
166
238
|
}
|
|
167
239
|
async getObservationLog(opts) {
|
|
168
240
|
const baseWhere = {
|
|
169
|
-
|
|
170
|
-
|
|
241
|
+
agentId: this.agentId,
|
|
242
|
+
observationScopeId: opts.observationScopeId,
|
|
171
243
|
...(opts.status !== undefined && { status: opts.status }),
|
|
172
244
|
...(opts.parentId !== undefined && { parentId: opts.parentId ?? (0, typeorm_1.IsNull)() }),
|
|
173
245
|
};
|
|
@@ -181,13 +253,9 @@ let N8nMemory = class N8nMemory {
|
|
|
181
253
|
});
|
|
182
254
|
return entities.map((e) => this.toObservationLogEntry(e));
|
|
183
255
|
}
|
|
184
|
-
async
|
|
185
|
-
if (scopeKind !== 'thread') {
|
|
186
|
-
throw new n8n_workflow_1.UnexpectedError(`getMessagesForScope: scopeKind='${scopeKind}' is not supported in observational memory v1`);
|
|
187
|
-
}
|
|
256
|
+
async getMessagesForObservationScope(observationScopeId, opts) {
|
|
188
257
|
const baseWhere = {
|
|
189
|
-
threadId:
|
|
190
|
-
...(opts?.resourceId !== undefined && { resourceId: opts.resourceId }),
|
|
258
|
+
threadId: observationScopeId,
|
|
191
259
|
};
|
|
192
260
|
const where = opts?.since
|
|
193
261
|
? [
|
|
@@ -208,20 +276,20 @@ let N8nMemory = class N8nMemory {
|
|
|
208
276
|
async dropObservationLogEntries(ids) {
|
|
209
277
|
if (ids.length === 0)
|
|
210
278
|
return;
|
|
211
|
-
await this.observationRepository.update({ id: (0, typeorm_1.In)(ids) },
|
|
279
|
+
await this.observationRepository.update({ id: (0, typeorm_1.In)(ids) }, (0, agents_1.droppedLifecycleState)());
|
|
212
280
|
}
|
|
213
281
|
async supersedeObservationLogEntries(ids, supersededBy) {
|
|
214
282
|
if (ids.length === 0)
|
|
215
283
|
return;
|
|
216
|
-
await this.observationRepository.update({ id: (0, typeorm_1.In)(ids) },
|
|
284
|
+
await this.observationRepository.update({ id: (0, typeorm_1.In)(ids) }, (0, agents_1.supersededLifecycleState)(supersededBy));
|
|
217
285
|
}
|
|
218
286
|
async applyObservationLogReflection(scope, reflection) {
|
|
219
287
|
return await this.observationRepository.manager.transaction(async (trx) => {
|
|
220
288
|
const repo = trx.getRepository(agent_observation_entity_1.AgentObservationEntity);
|
|
221
289
|
const activeEntries = await repo.find({
|
|
222
290
|
where: {
|
|
223
|
-
|
|
224
|
-
|
|
291
|
+
agentId: this.agentId,
|
|
292
|
+
observationScopeId: scope.observationScopeId,
|
|
225
293
|
status: 'active',
|
|
226
294
|
},
|
|
227
295
|
order: { createdAt: 'ASC', id: 'ASC' },
|
|
@@ -229,24 +297,31 @@ let N8nMemory = class N8nMemory {
|
|
|
229
297
|
const normalized = (0, agents_1.normalizeObservationLogReflection)(activeEntries.map((entry) => this.toObservationLogEntry(entry)), reflection);
|
|
230
298
|
const inserted = normalized.merge.length
|
|
231
299
|
? await repo.save(normalized.merge.map((entry) => repo.create({
|
|
232
|
-
|
|
233
|
-
|
|
300
|
+
agentId: this.agentId,
|
|
301
|
+
observationScopeId: scope.observationScopeId,
|
|
234
302
|
marker: entry.marker,
|
|
235
303
|
text: entry.text,
|
|
236
304
|
parentId: entry.parentId ?? null,
|
|
237
305
|
tokenCount: entry.tokenCount ?? estimateObservationTokens(entry.text),
|
|
238
|
-
|
|
239
|
-
supersededBy: null,
|
|
306
|
+
...(0, agents_1.activeLifecycleState)(),
|
|
240
307
|
createdAt: entry.createdAt,
|
|
241
308
|
})))
|
|
242
309
|
: [];
|
|
243
310
|
if (normalized.drop.length > 0) {
|
|
244
|
-
await repo.update({
|
|
311
|
+
await repo.update({
|
|
312
|
+
agentId: this.agentId,
|
|
313
|
+
observationScopeId: scope.observationScopeId,
|
|
314
|
+
id: (0, typeorm_1.In)(normalized.drop),
|
|
315
|
+
}, (0, agents_1.droppedLifecycleState)());
|
|
245
316
|
}
|
|
246
317
|
for (const [index, merge] of normalized.merge.entries()) {
|
|
247
318
|
const replacement = inserted[index];
|
|
248
319
|
if (replacement && merge.supersedes.length > 0) {
|
|
249
|
-
await repo.update({
|
|
320
|
+
await repo.update({
|
|
321
|
+
agentId: this.agentId,
|
|
322
|
+
observationScopeId: scope.observationScopeId,
|
|
323
|
+
id: (0, typeorm_1.In)(merge.supersedes),
|
|
324
|
+
}, (0, agents_1.supersededLifecycleState)(replacement.id));
|
|
250
325
|
}
|
|
251
326
|
}
|
|
252
327
|
return {
|
|
@@ -256,13 +331,15 @@ let N8nMemory = class N8nMemory {
|
|
|
256
331
|
};
|
|
257
332
|
});
|
|
258
333
|
}
|
|
259
|
-
async getCursor(
|
|
260
|
-
const entity = await this.observationCursorRepository.findOneBy({
|
|
334
|
+
async getCursor(observationScopeId) {
|
|
335
|
+
const entity = await this.observationCursorRepository.findOneBy({
|
|
336
|
+
agentId: this.agentId,
|
|
337
|
+
observationScopeId,
|
|
338
|
+
});
|
|
261
339
|
if (!entity)
|
|
262
340
|
return null;
|
|
263
341
|
return {
|
|
264
|
-
|
|
265
|
-
scopeId: entity.scopeId,
|
|
342
|
+
observationScopeId: entity.observationScopeId,
|
|
266
343
|
lastObservedMessageId: entity.lastObservedMessageId,
|
|
267
344
|
lastObservedAt: entity.lastObservedAt,
|
|
268
345
|
updatedAt: entity.updatedAt,
|
|
@@ -270,57 +347,406 @@ let N8nMemory = class N8nMemory {
|
|
|
270
347
|
}
|
|
271
348
|
async setCursor(cursor) {
|
|
272
349
|
await this.observationCursorRepository.upsert({
|
|
273
|
-
|
|
274
|
-
|
|
350
|
+
agentId: this.agentId,
|
|
351
|
+
observationScopeId: cursor.observationScopeId,
|
|
275
352
|
lastObservedMessageId: cursor.lastObservedMessageId,
|
|
276
353
|
lastObservedAt: cursor.lastObservedAt,
|
|
277
354
|
updatedAt: cursor.updatedAt,
|
|
278
|
-
}, {
|
|
355
|
+
}, {
|
|
356
|
+
conflictPaths: ['agentId', 'observationScopeId'],
|
|
357
|
+
skipUpdateIfNoValuesChanged: false,
|
|
358
|
+
});
|
|
279
359
|
}
|
|
280
|
-
async acquireObservationLogTaskLock(
|
|
360
|
+
async acquireObservationLogTaskLock(observationScopeId, taskKind, opts) {
|
|
281
361
|
const now = new Date();
|
|
282
362
|
const heldUntil = new Date(now.getTime() + opts.ttlMs);
|
|
283
363
|
const updateResult = await this.observationLockRepository
|
|
284
364
|
.createQueryBuilder()
|
|
285
365
|
.update(agent_observation_lock_entity_1.AgentObservationLockEntity)
|
|
286
366
|
.set({ taskKind, holderId: opts.holderId, heldUntil })
|
|
287
|
-
.where('"
|
|
288
|
-
.andWhere('"
|
|
367
|
+
.where('"agentId" = :agentId')
|
|
368
|
+
.andWhere('"observationScopeId" = :observationScopeId')
|
|
289
369
|
.andWhere('"taskKind" = :taskKind')
|
|
290
370
|
.andWhere('("holderId" = :holderId OR "heldUntil" <= :now)')
|
|
291
|
-
.setParameters({
|
|
371
|
+
.setParameters({
|
|
372
|
+
agentId: this.agentId,
|
|
373
|
+
observationScopeId,
|
|
374
|
+
taskKind,
|
|
375
|
+
holderId: opts.holderId,
|
|
376
|
+
now,
|
|
377
|
+
})
|
|
292
378
|
.execute();
|
|
293
379
|
if ((updateResult.affected ?? 0) > 0) {
|
|
294
|
-
return {
|
|
380
|
+
return { observationScopeId, taskKind, holderId: opts.holderId, heldUntil };
|
|
295
381
|
}
|
|
296
382
|
await this.observationLockRepository
|
|
297
383
|
.createQueryBuilder()
|
|
298
384
|
.insert()
|
|
299
385
|
.into(agent_observation_lock_entity_1.AgentObservationLockEntity)
|
|
300
|
-
.values({
|
|
386
|
+
.values({
|
|
387
|
+
agentId: this.agentId,
|
|
388
|
+
observationScopeId,
|
|
389
|
+
taskKind,
|
|
390
|
+
holderId: opts.holderId,
|
|
391
|
+
heldUntil,
|
|
392
|
+
})
|
|
301
393
|
.orIgnore()
|
|
302
394
|
.execute();
|
|
303
395
|
const claimed = await this.observationLockRepository.findOneBy({
|
|
304
|
-
|
|
305
|
-
|
|
396
|
+
agentId: this.agentId,
|
|
397
|
+
observationScopeId,
|
|
306
398
|
taskKind,
|
|
307
399
|
holderId: opts.holderId,
|
|
308
400
|
});
|
|
309
401
|
if (!claimed)
|
|
310
402
|
return null;
|
|
311
|
-
return {
|
|
403
|
+
return { observationScopeId, taskKind, holderId: opts.holderId, heldUntil };
|
|
312
404
|
}
|
|
313
405
|
async releaseObservationLogTaskLock(handle) {
|
|
314
406
|
await this.releaseScopeLock(handle);
|
|
315
407
|
}
|
|
316
408
|
async releaseScopeLock(handle) {
|
|
317
409
|
await this.observationLockRepository.delete({
|
|
318
|
-
|
|
319
|
-
|
|
410
|
+
agentId: this.agentId,
|
|
411
|
+
observationScopeId: handle.observationScopeId,
|
|
320
412
|
taskKind: handle.taskKind,
|
|
321
413
|
holderId: handle.holderId,
|
|
322
414
|
});
|
|
323
415
|
}
|
|
416
|
+
async acquireEpisodicMemoryTaskLock(resourceId, opts) {
|
|
417
|
+
await this.ensureResource(resourceId);
|
|
418
|
+
const now = new Date();
|
|
419
|
+
const heldUntil = new Date(now.getTime() + opts.ttlMs);
|
|
420
|
+
const updateResult = await this.memoryEntryLockRepository
|
|
421
|
+
.createQueryBuilder()
|
|
422
|
+
.update(agent_memory_entry_lock_entity_1.AgentMemoryEntryLockEntity)
|
|
423
|
+
.set({ holderId: opts.holderId, heldUntil })
|
|
424
|
+
.where('"agentId" = :agentId')
|
|
425
|
+
.andWhere('"resourceId" = :resourceId')
|
|
426
|
+
.andWhere('("holderId" = :holderId OR "heldUntil" <= :now)')
|
|
427
|
+
.setParameters({
|
|
428
|
+
agentId: this.agentId,
|
|
429
|
+
resourceId,
|
|
430
|
+
holderId: opts.holderId,
|
|
431
|
+
now,
|
|
432
|
+
})
|
|
433
|
+
.execute();
|
|
434
|
+
if ((updateResult.affected ?? 0) > 0) {
|
|
435
|
+
return { resourceId, holderId: opts.holderId, heldUntil };
|
|
436
|
+
}
|
|
437
|
+
await this.memoryEntryLockRepository
|
|
438
|
+
.createQueryBuilder()
|
|
439
|
+
.insert()
|
|
440
|
+
.into(agent_memory_entry_lock_entity_1.AgentMemoryEntryLockEntity)
|
|
441
|
+
.values({ agentId: this.agentId, resourceId, holderId: opts.holderId, heldUntil })
|
|
442
|
+
.orIgnore()
|
|
443
|
+
.execute();
|
|
444
|
+
const claimed = await this.memoryEntryLockRepository.findOneBy({
|
|
445
|
+
agentId: this.agentId,
|
|
446
|
+
resourceId,
|
|
447
|
+
holderId: opts.holderId,
|
|
448
|
+
});
|
|
449
|
+
if (!claimed)
|
|
450
|
+
return null;
|
|
451
|
+
return { resourceId, holderId: opts.holderId, heldUntil };
|
|
452
|
+
}
|
|
453
|
+
async releaseEpisodicMemoryTaskLock(handle) {
|
|
454
|
+
await this.memoryEntryLockRepository.delete({
|
|
455
|
+
agentId: this.agentId,
|
|
456
|
+
resourceId: handle.resourceId,
|
|
457
|
+
holderId: handle.holderId,
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
async saveEpisodicMemoryEntryWithSources(entry, sources) {
|
|
461
|
+
await this.ensureResource(entry.resourceId);
|
|
462
|
+
return await this.memoryEntryRepository.manager.transaction(async (trx) => {
|
|
463
|
+
const entryRepo = trx.getRepository(agent_memory_entry_entity_1.AgentMemoryEntryEntity);
|
|
464
|
+
const sourceRepo = trx.getRepository(agent_memory_entry_source_entity_1.AgentMemoryEntrySourceEntity);
|
|
465
|
+
const contentHash = entry.contentHash ?? (0, agents_1.hashEpisodicMemoryContent)(entry.content);
|
|
466
|
+
const now = new Date();
|
|
467
|
+
const entity = entryRepo.create({
|
|
468
|
+
agentId: this.agentId,
|
|
469
|
+
resourceId: entry.resourceId,
|
|
470
|
+
content: entry.content,
|
|
471
|
+
contentHash,
|
|
472
|
+
...(0, agents_1.activeLifecycleState)(),
|
|
473
|
+
embeddingModel: entry.embeddingModel ?? null,
|
|
474
|
+
embedding: entry.embedding ?? null,
|
|
475
|
+
metadata: entry.metadata ?? null,
|
|
476
|
+
createdAt: entry.createdAt ?? now,
|
|
477
|
+
lastSeenAt: entry.lastSeenAt ?? now,
|
|
478
|
+
});
|
|
479
|
+
let persisted = null;
|
|
480
|
+
try {
|
|
481
|
+
const [saved] = await entryRepo.save([entity]);
|
|
482
|
+
persisted = saved ?? null;
|
|
483
|
+
}
|
|
484
|
+
catch (error) {
|
|
485
|
+
if (!(error instanceof Error) || !(0, response_helper_1.isUniqueConstraintError)(error))
|
|
486
|
+
throw error;
|
|
487
|
+
const existing = await entryRepo.findOneBy({
|
|
488
|
+
agentId: this.agentId,
|
|
489
|
+
resourceId: entry.resourceId,
|
|
490
|
+
contentHash,
|
|
491
|
+
});
|
|
492
|
+
if (!existing)
|
|
493
|
+
throw error;
|
|
494
|
+
(0, agents_1.markLifecycleActive)(existing);
|
|
495
|
+
existing.lastSeenAt = entry.lastSeenAt ?? now;
|
|
496
|
+
existing.updatedAt = now;
|
|
497
|
+
const [saved] = await entryRepo.save([existing]);
|
|
498
|
+
persisted = saved ?? existing;
|
|
499
|
+
}
|
|
500
|
+
if (!persisted)
|
|
501
|
+
return null;
|
|
502
|
+
for (const source of sources) {
|
|
503
|
+
const evidenceHash = (0, agents_1.hashEpisodicMemoryEvidence)(source.evidenceText);
|
|
504
|
+
const sourceEntity = sourceRepo.create({
|
|
505
|
+
agentId: this.agentId,
|
|
506
|
+
memoryEntryId: persisted.id,
|
|
507
|
+
observationId: source.observationId,
|
|
508
|
+
threadId: source.threadId,
|
|
509
|
+
evidenceHash,
|
|
510
|
+
evidenceText: source.evidenceText,
|
|
511
|
+
createdAt: source.createdAt,
|
|
512
|
+
});
|
|
513
|
+
try {
|
|
514
|
+
await sourceRepo.save([sourceEntity]);
|
|
515
|
+
}
|
|
516
|
+
catch (error) {
|
|
517
|
+
if (!(error instanceof Error) || !(0, response_helper_1.isUniqueConstraintError)(error))
|
|
518
|
+
throw error;
|
|
519
|
+
const existing = await sourceRepo.findOneBy({
|
|
520
|
+
agentId: this.agentId,
|
|
521
|
+
memoryEntryId: persisted.id,
|
|
522
|
+
observationId: source.observationId,
|
|
523
|
+
evidenceHash,
|
|
524
|
+
});
|
|
525
|
+
if (!existing)
|
|
526
|
+
throw error;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return this.toEpisodicMemoryEntry(persisted);
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
async searchEpisodicMemoryEntries(scope, query, opts) {
|
|
533
|
+
const statuses = opts?.includeStatuses ?? ['active'];
|
|
534
|
+
const entities = await this.memoryEntryRepository.find({
|
|
535
|
+
where: { agentId: this.agentId, resourceId: scope.resourceId, status: (0, typeorm_1.In)(statuses) },
|
|
536
|
+
});
|
|
537
|
+
return (0, agents_1.rankEpisodicMemoryEntries)(entities.map((entity) => this.toEpisodicMemoryEntry(entity)), query, opts);
|
|
538
|
+
}
|
|
539
|
+
async getEpisodicMemoryEntrySources(entryIds) {
|
|
540
|
+
if (entryIds.length === 0)
|
|
541
|
+
return [];
|
|
542
|
+
const entities = await this.memoryEntrySourceRepository.find({
|
|
543
|
+
where: { agentId: this.agentId, memoryEntryId: (0, typeorm_1.In)(entryIds) },
|
|
544
|
+
order: { createdAt: 'ASC', id: 'ASC' },
|
|
545
|
+
});
|
|
546
|
+
return entities.map((entity) => this.toEpisodicMemoryEntrySource(entity));
|
|
547
|
+
}
|
|
548
|
+
async applyEpisodicMemoryReflection(scope, reflection) {
|
|
549
|
+
return await this.memoryEntryRepository.manager.transaction(async (trx) => {
|
|
550
|
+
const entryRepo = trx.getRepository(agent_memory_entry_entity_1.AgentMemoryEntryEntity);
|
|
551
|
+
const sourceRepo = trx.getRepository(agent_memory_entry_source_entity_1.AgentMemoryEntrySourceEntity);
|
|
552
|
+
const actionIds = (0, agents_1.uniqueStrings)([
|
|
553
|
+
...reflection.drop,
|
|
554
|
+
...reflection.merge.flatMap((merge) => merge.supersedes),
|
|
555
|
+
]);
|
|
556
|
+
if (actionIds.length === 0)
|
|
557
|
+
return { droppedIds: [], supersededIds: [], inserted: [] };
|
|
558
|
+
const activeEntries = await entryRepo.find({
|
|
559
|
+
where: {
|
|
560
|
+
agentId: this.agentId,
|
|
561
|
+
resourceId: scope.resourceId,
|
|
562
|
+
id: (0, typeorm_1.In)(actionIds),
|
|
563
|
+
status: 'active',
|
|
564
|
+
},
|
|
565
|
+
});
|
|
566
|
+
const activeIds = new Set(activeEntries.map((entry) => entry.id));
|
|
567
|
+
const normalized = (0, agents_1.normalizeFlatReflectionActions)({
|
|
568
|
+
activeIds,
|
|
569
|
+
drop: reflection.drop,
|
|
570
|
+
merge: reflection.merge,
|
|
571
|
+
normalizeMerge: (entry, supersedes) => ({ ...entry, supersedes }),
|
|
572
|
+
});
|
|
573
|
+
const now = new Date();
|
|
574
|
+
const replacementHashes = (0, agents_1.uniqueStrings)(normalized.merge.map((item) => item.entry.contentHash ?? (0, agents_1.hashEpisodicMemoryContent)(item.entry.content)));
|
|
575
|
+
const existingReplacements = replacementHashes.length
|
|
576
|
+
? await entryRepo.find({
|
|
577
|
+
where: {
|
|
578
|
+
agentId: this.agentId,
|
|
579
|
+
resourceId: scope.resourceId,
|
|
580
|
+
contentHash: (0, typeorm_1.In)(replacementHashes),
|
|
581
|
+
},
|
|
582
|
+
})
|
|
583
|
+
: [];
|
|
584
|
+
const existingByHash = new Map(existingReplacements.map((entry) => [entry.contentHash, entry]));
|
|
585
|
+
const replacements = [];
|
|
586
|
+
for (const item of normalized.merge) {
|
|
587
|
+
const contentHash = item.entry.contentHash ?? (0, agents_1.hashEpisodicMemoryContent)(item.entry.content);
|
|
588
|
+
const existing = existingByHash.get(contentHash);
|
|
589
|
+
const update = {
|
|
590
|
+
...(0, agents_1.activeLifecycleState)(),
|
|
591
|
+
lastSeenAt: item.entry.lastSeenAt ?? now,
|
|
592
|
+
updatedAt: now,
|
|
593
|
+
};
|
|
594
|
+
if (item.entry.embedding !== undefined)
|
|
595
|
+
update.embedding = item.entry.embedding;
|
|
596
|
+
if (item.entry.embeddingModel !== undefined) {
|
|
597
|
+
update.embeddingModel = item.entry.embeddingModel;
|
|
598
|
+
}
|
|
599
|
+
if (item.entry.metadata !== undefined)
|
|
600
|
+
update.metadata = item.entry.metadata;
|
|
601
|
+
if (existing) {
|
|
602
|
+
await entryRepo.update({ agentId: this.agentId, resourceId: scope.resourceId, id: existing.id }, update);
|
|
603
|
+
replacements.push({
|
|
604
|
+
...existing,
|
|
605
|
+
...update,
|
|
606
|
+
});
|
|
607
|
+
continue;
|
|
608
|
+
}
|
|
609
|
+
const entity = entryRepo.create({
|
|
610
|
+
agentId: this.agentId,
|
|
611
|
+
resourceId: scope.resourceId,
|
|
612
|
+
content: item.entry.content,
|
|
613
|
+
contentHash,
|
|
614
|
+
...(0, agents_1.activeLifecycleState)(),
|
|
615
|
+
embeddingModel: item.entry.embeddingModel ?? null,
|
|
616
|
+
embedding: item.entry.embedding ?? null,
|
|
617
|
+
metadata: item.entry.metadata ?? null,
|
|
618
|
+
createdAt: item.entry.createdAt ?? now,
|
|
619
|
+
lastSeenAt: item.entry.lastSeenAt ?? now,
|
|
620
|
+
});
|
|
621
|
+
try {
|
|
622
|
+
const [persisted] = await entryRepo.save([entity]);
|
|
623
|
+
if (persisted) {
|
|
624
|
+
existingByHash.set(contentHash, persisted);
|
|
625
|
+
replacements.push(persisted);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
catch (error) {
|
|
629
|
+
if (!(error instanceof Error) || !(0, response_helper_1.isUniqueConstraintError)(error))
|
|
630
|
+
throw error;
|
|
631
|
+
const persisted = await entryRepo.findOneBy({
|
|
632
|
+
agentId: this.agentId,
|
|
633
|
+
resourceId: scope.resourceId,
|
|
634
|
+
contentHash,
|
|
635
|
+
});
|
|
636
|
+
if (!persisted)
|
|
637
|
+
throw error;
|
|
638
|
+
await entryRepo.update({ agentId: this.agentId, resourceId: scope.resourceId, id: persisted.id }, update);
|
|
639
|
+
existingByHash.set(contentHash, persisted);
|
|
640
|
+
replacements.push({
|
|
641
|
+
...persisted,
|
|
642
|
+
...update,
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
const replacementIds = new Set(replacements.map((entry) => entry.id));
|
|
647
|
+
const effectiveDrop = normalized.drop.filter((id) => !replacementIds.has(id));
|
|
648
|
+
if (effectiveDrop.length > 0) {
|
|
649
|
+
await entryRepo.update({
|
|
650
|
+
agentId: this.agentId,
|
|
651
|
+
resourceId: scope.resourceId,
|
|
652
|
+
id: (0, typeorm_1.In)(effectiveDrop),
|
|
653
|
+
status: 'active',
|
|
654
|
+
}, (0, agents_1.droppedLifecycleState)());
|
|
655
|
+
}
|
|
656
|
+
const supersededIds = [];
|
|
657
|
+
for (const [index, item] of normalized.merge.entries()) {
|
|
658
|
+
const replacement = replacements[index];
|
|
659
|
+
if (!replacement)
|
|
660
|
+
continue;
|
|
661
|
+
const sourceRows = await sourceRepo.find({
|
|
662
|
+
where: { agentId: this.agentId, memoryEntryId: (0, typeorm_1.In)(item.supersedes) },
|
|
663
|
+
order: { createdAt: 'ASC', id: 'ASC' },
|
|
664
|
+
});
|
|
665
|
+
const existingReplacementSources = await sourceRepo.find({
|
|
666
|
+
where: { agentId: this.agentId, memoryEntryId: replacement.id },
|
|
667
|
+
});
|
|
668
|
+
const existingKeys = new Set(existingReplacementSources.map((source) => `${source.observationId}\n${source.evidenceHash}`));
|
|
669
|
+
const copiedSources = sourceRows.flatMap((source) => {
|
|
670
|
+
const key = `${source.observationId}\n${source.evidenceHash}`;
|
|
671
|
+
if (existingKeys.has(key))
|
|
672
|
+
return [];
|
|
673
|
+
existingKeys.add(key);
|
|
674
|
+
return [
|
|
675
|
+
sourceRepo.create({
|
|
676
|
+
agentId: this.agentId,
|
|
677
|
+
memoryEntryId: replacement.id,
|
|
678
|
+
observationId: source.observationId,
|
|
679
|
+
threadId: source.threadId,
|
|
680
|
+
evidenceHash: source.evidenceHash,
|
|
681
|
+
evidenceText: source.evidenceText,
|
|
682
|
+
createdAt: now,
|
|
683
|
+
}),
|
|
684
|
+
];
|
|
685
|
+
});
|
|
686
|
+
if (copiedSources.length > 0)
|
|
687
|
+
await sourceRepo.save(copiedSources);
|
|
688
|
+
const itemSupersededIds = item.supersedes.filter((id) => id !== replacement.id);
|
|
689
|
+
if (itemSupersededIds.length > 0) {
|
|
690
|
+
await entryRepo.update({
|
|
691
|
+
agentId: this.agentId,
|
|
692
|
+
resourceId: scope.resourceId,
|
|
693
|
+
id: (0, typeorm_1.In)(itemSupersededIds),
|
|
694
|
+
status: 'active',
|
|
695
|
+
}, (0, agents_1.supersededLifecycleState)(replacement.id));
|
|
696
|
+
supersededIds.push(...itemSupersededIds);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return {
|
|
700
|
+
droppedIds: effectiveDrop,
|
|
701
|
+
supersededIds,
|
|
702
|
+
inserted: replacements.map((entry) => this.toEpisodicMemoryEntry(entry)),
|
|
703
|
+
};
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
async getEpisodicMemoryCursor(scope) {
|
|
707
|
+
const entity = await this.memoryEntryCursorRepository.findOneBy({
|
|
708
|
+
agentId: this.agentId,
|
|
709
|
+
observationScopeId: scope.observationScopeId,
|
|
710
|
+
});
|
|
711
|
+
if (!entity)
|
|
712
|
+
return null;
|
|
713
|
+
return {
|
|
714
|
+
observationScopeId: entity.observationScopeId,
|
|
715
|
+
lastIndexedObservationId: entity.lastIndexedObservationId,
|
|
716
|
+
lastIndexedObservationCreatedAt: entity.lastIndexedObservationCreatedAt,
|
|
717
|
+
updatedAt: entity.updatedAt,
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
async setEpisodicMemoryCursor(cursor) {
|
|
721
|
+
const cursorRow = {
|
|
722
|
+
agentId: this.agentId,
|
|
723
|
+
observationScopeId: cursor.observationScopeId,
|
|
724
|
+
lastIndexedObservationId: cursor.lastIndexedObservationId,
|
|
725
|
+
lastIndexedObservationCreatedAt: cursor.lastIndexedObservationCreatedAt,
|
|
726
|
+
updatedAt: cursor.updatedAt ?? new Date(),
|
|
727
|
+
};
|
|
728
|
+
await this.memoryEntryCursorRepository
|
|
729
|
+
.createQueryBuilder()
|
|
730
|
+
.insert()
|
|
731
|
+
.into(agent_memory_entry_cursor_entity_1.AgentMemoryEntryCursorEntity)
|
|
732
|
+
.values(cursorRow)
|
|
733
|
+
.orIgnore()
|
|
734
|
+
.execute();
|
|
735
|
+
await this.memoryEntryCursorRepository
|
|
736
|
+
.createQueryBuilder()
|
|
737
|
+
.update(agent_memory_entry_cursor_entity_1.AgentMemoryEntryCursorEntity)
|
|
738
|
+
.set(cursorRow)
|
|
739
|
+
.where('"agentId" = :agentId')
|
|
740
|
+
.andWhere('"observationScopeId" = :observationScopeId')
|
|
741
|
+
.andWhere('("lastIndexedObservationCreatedAt" < :lastIndexedObservationCreatedAt OR ("lastIndexedObservationCreatedAt" = :lastIndexedObservationCreatedAt AND "lastIndexedObservationId" < :lastIndexedObservationId))')
|
|
742
|
+
.setParameters({
|
|
743
|
+
agentId: this.agentId,
|
|
744
|
+
observationScopeId: cursor.observationScopeId,
|
|
745
|
+
lastIndexedObservationId: cursor.lastIndexedObservationId,
|
|
746
|
+
lastIndexedObservationCreatedAt: cursor.lastIndexedObservationCreatedAt,
|
|
747
|
+
})
|
|
748
|
+
.execute();
|
|
749
|
+
}
|
|
324
750
|
describe() {
|
|
325
751
|
return { name: 'n8n', connectionParams: {}, constructorName: this.constructor.name };
|
|
326
752
|
}
|
|
@@ -333,8 +759,7 @@ let N8nMemory = class N8nMemory {
|
|
|
333
759
|
toObservationLogEntry(entity) {
|
|
334
760
|
return {
|
|
335
761
|
id: entity.id,
|
|
336
|
-
|
|
337
|
-
scopeId: entity.scopeId,
|
|
762
|
+
observationScopeId: entity.observationScopeId,
|
|
338
763
|
marker: entity.marker,
|
|
339
764
|
text: entity.text,
|
|
340
765
|
parentId: entity.parentId,
|
|
@@ -344,6 +769,32 @@ let N8nMemory = class N8nMemory {
|
|
|
344
769
|
createdAt: entity.createdAt,
|
|
345
770
|
};
|
|
346
771
|
}
|
|
772
|
+
toEpisodicMemoryEntry(entity) {
|
|
773
|
+
return {
|
|
774
|
+
id: entity.id,
|
|
775
|
+
resourceId: entity.resourceId,
|
|
776
|
+
content: entity.content,
|
|
777
|
+
contentHash: entity.contentHash,
|
|
778
|
+
status: entity.status,
|
|
779
|
+
supersededBy: entity.supersededBy,
|
|
780
|
+
...(entity.embedding ? { embedding: entity.embedding } : {}),
|
|
781
|
+
...(entity.embeddingModel ? { embeddingModel: entity.embeddingModel } : {}),
|
|
782
|
+
metadata: entity.metadata,
|
|
783
|
+
createdAt: entity.createdAt,
|
|
784
|
+
updatedAt: entity.updatedAt,
|
|
785
|
+
lastSeenAt: entity.lastSeenAt,
|
|
786
|
+
};
|
|
787
|
+
}
|
|
788
|
+
toEpisodicMemoryEntrySource(entity) {
|
|
789
|
+
return {
|
|
790
|
+
id: entity.id,
|
|
791
|
+
memoryEntryId: entity.memoryEntryId,
|
|
792
|
+
observationId: entity.observationId,
|
|
793
|
+
threadId: entity.threadId,
|
|
794
|
+
evidenceText: entity.evidenceText,
|
|
795
|
+
createdAt: entity.createdAt,
|
|
796
|
+
};
|
|
797
|
+
}
|
|
347
798
|
toThread(entity) {
|
|
348
799
|
let metadata;
|
|
349
800
|
if (entity.metadata) {
|
|
@@ -363,15 +814,6 @@ let N8nMemory = class N8nMemory {
|
|
|
363
814
|
updatedAt: entity.updatedAt,
|
|
364
815
|
};
|
|
365
816
|
}
|
|
366
|
-
}
|
|
367
|
-
exports.
|
|
368
|
-
exports.N8nMemory = N8nMemory = __decorate([
|
|
369
|
-
(0, di_1.Service)(),
|
|
370
|
-
__metadata("design:paramtypes", [agent_thread_repository_1.AgentThreadRepository,
|
|
371
|
-
agent_message_repository_1.AgentMessageRepository,
|
|
372
|
-
agent_resource_repository_1.AgentResourceRepository,
|
|
373
|
-
agent_observation_repository_1.AgentObservationRepository,
|
|
374
|
-
agent_observation_cursor_repository_1.AgentObservationCursorRepository,
|
|
375
|
-
agent_observation_lock_repository_1.AgentObservationLockRepository])
|
|
376
|
-
], N8nMemory);
|
|
817
|
+
}
|
|
818
|
+
exports.N8nMemoryImpl = N8nMemoryImpl;
|
|
377
819
|
//# sourceMappingURL=n8n-memory.js.map
|