n8n 2.22.4 → 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 -4
- 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 +36 -34
- 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,324 @@
|
|
|
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.TypeORMAgentMemory = void 0;
|
|
13
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
14
|
+
const di_1 = require("@n8n/di");
|
|
15
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
16
|
+
const typeorm_observation_log_store_1 = require("./typeorm-observation-log-store");
|
|
17
|
+
const instance_ai_message_repository_1 = require("../repositories/instance-ai-message.repository");
|
|
18
|
+
const instance_ai_observation_cursor_repository_1 = require("../repositories/instance-ai-observation-cursor.repository");
|
|
19
|
+
const instance_ai_observation_lock_repository_1 = require("../repositories/instance-ai-observation-lock.repository");
|
|
20
|
+
const instance_ai_observation_repository_1 = require("../repositories/instance-ai-observation.repository");
|
|
21
|
+
const instance_ai_resource_repository_1 = require("../repositories/instance-ai-resource.repository");
|
|
22
|
+
const instance_ai_thread_repository_1 = require("../repositories/instance-ai-thread.repository");
|
|
23
|
+
function parseJsonSafe(text) {
|
|
24
|
+
try {
|
|
25
|
+
return JSON.parse(text);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function isRecord(value) {
|
|
32
|
+
return typeof value === 'object' && value !== null;
|
|
33
|
+
}
|
|
34
|
+
function isAgentMessage(value) {
|
|
35
|
+
if (!isRecord(value))
|
|
36
|
+
return false;
|
|
37
|
+
if (value.type === 'custom') {
|
|
38
|
+
return 'data' in value;
|
|
39
|
+
}
|
|
40
|
+
return typeof value.role === 'string' && Array.isArray(value.content);
|
|
41
|
+
}
|
|
42
|
+
function toThread(entity) {
|
|
43
|
+
return {
|
|
44
|
+
id: entity.id,
|
|
45
|
+
resourceId: entity.resourceId,
|
|
46
|
+
title: entity.title || undefined,
|
|
47
|
+
createdAt: entity.createdAt,
|
|
48
|
+
updatedAt: entity.updatedAt,
|
|
49
|
+
metadata: entity.metadata ?? undefined,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function getMessageRole(message) {
|
|
53
|
+
return 'role' in message ? message.role : 'custom';
|
|
54
|
+
}
|
|
55
|
+
function getMessageType(message) {
|
|
56
|
+
if (message.type === 'custom')
|
|
57
|
+
return 'custom';
|
|
58
|
+
if (message.type === 'llm')
|
|
59
|
+
return 'llm';
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
function toAgentMessage(entity) {
|
|
63
|
+
const parsed = parseJsonSafe(entity.content);
|
|
64
|
+
if (!isAgentMessage(parsed))
|
|
65
|
+
return undefined;
|
|
66
|
+
return { ...parsed, id: entity.id, createdAt: entity.createdAt };
|
|
67
|
+
}
|
|
68
|
+
function workingMemoryKey(params) {
|
|
69
|
+
return params.scope === 'thread' ? `thread:${params.threadId}` : params.resourceId;
|
|
70
|
+
}
|
|
71
|
+
const PATCH_ONLY_METADATA_KEYS = new Set([
|
|
72
|
+
'instanceAiIterationLog',
|
|
73
|
+
'instanceAiPlannedTasks',
|
|
74
|
+
'instanceAiTasks',
|
|
75
|
+
'instanceAiTerminalOutcomes',
|
|
76
|
+
'instanceAiWorkflowLoop',
|
|
77
|
+
]);
|
|
78
|
+
function cloneThreadForPatch(thread) {
|
|
79
|
+
return {
|
|
80
|
+
...thread,
|
|
81
|
+
metadata: { ...(thread.metadata ?? {}) },
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function mergeSaveThreadMetadata(current, incoming) {
|
|
85
|
+
const safeIncoming = { ...incoming };
|
|
86
|
+
for (const key of PATCH_ONLY_METADATA_KEYS) {
|
|
87
|
+
delete safeIncoming[key];
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
...(current ?? {}),
|
|
91
|
+
...safeIncoming,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
let TypeORMAgentMemory = class TypeORMAgentMemory {
|
|
95
|
+
constructor(threadRepo, messageRepo, resourceRepo, observationRepo, observationCursorRepo, observationLockRepo, logger) {
|
|
96
|
+
this.threadRepo = threadRepo;
|
|
97
|
+
this.messageRepo = messageRepo;
|
|
98
|
+
this.resourceRepo = resourceRepo;
|
|
99
|
+
this.threadMutationQueues = new Map();
|
|
100
|
+
this.logger = logger.scoped('instance-ai');
|
|
101
|
+
this.observationLog = new typeorm_observation_log_store_1.TypeORMObservationLogStore(observationRepo, observationCursorRepo, observationLockRepo, this.messageRepo, (entity) => this.toAgentMessage(entity));
|
|
102
|
+
}
|
|
103
|
+
describe() {
|
|
104
|
+
return {
|
|
105
|
+
name: 'typeorm-agent-memory',
|
|
106
|
+
constructorName: this.constructor.name,
|
|
107
|
+
connectionParams: null,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
async getThread(threadId) {
|
|
111
|
+
const thread = await this.threadRepo.findOneBy({ id: threadId });
|
|
112
|
+
return thread ? toThread(thread) : null;
|
|
113
|
+
}
|
|
114
|
+
async listThreads(args) {
|
|
115
|
+
const perPage = args.perPage ?? 100;
|
|
116
|
+
const page = args.page ?? 0;
|
|
117
|
+
const field = args.orderBy?.field ?? 'updatedAt';
|
|
118
|
+
const direction = args.orderBy?.direction ?? 'DESC';
|
|
119
|
+
const [threads, total] = await this.threadRepo.findAndCount({
|
|
120
|
+
where: args.filter?.resourceId ? { resourceId: args.filter.resourceId } : {},
|
|
121
|
+
order: { [field]: direction, id: direction },
|
|
122
|
+
take: perPage,
|
|
123
|
+
skip: page * perPage,
|
|
124
|
+
});
|
|
125
|
+
return {
|
|
126
|
+
threads: threads.map(toThread),
|
|
127
|
+
total,
|
|
128
|
+
page,
|
|
129
|
+
hasMore: (page + 1) * perPage < total,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
async saveThread(thread) {
|
|
133
|
+
return await this.serializeThreadMutation(thread.id, async () => {
|
|
134
|
+
const existing = await this.threadRepo.findOneBy({ id: thread.id });
|
|
135
|
+
if (existing) {
|
|
136
|
+
existing.resourceId = thread.resourceId;
|
|
137
|
+
if (thread.title !== undefined)
|
|
138
|
+
existing.title = thread.title;
|
|
139
|
+
if (thread.metadata !== undefined) {
|
|
140
|
+
existing.metadata = mergeSaveThreadMetadata(existing.metadata, thread.metadata);
|
|
141
|
+
}
|
|
142
|
+
return toThread(await this.threadRepo.save(existing));
|
|
143
|
+
}
|
|
144
|
+
const saved = await this.threadRepo.save(this.threadRepo.create({
|
|
145
|
+
id: thread.id,
|
|
146
|
+
resourceId: thread.resourceId,
|
|
147
|
+
title: thread.title ?? '',
|
|
148
|
+
metadata: thread.metadata ?? null,
|
|
149
|
+
}));
|
|
150
|
+
return toThread(saved);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
async patchThread(args) {
|
|
154
|
+
return await this.serializeThreadMutation(args.threadId, async () => {
|
|
155
|
+
const existing = await this.threadRepo.findOneBy({ id: args.threadId });
|
|
156
|
+
if (!existing)
|
|
157
|
+
return null;
|
|
158
|
+
const current = toThread(existing);
|
|
159
|
+
const patch = args.update(cloneThreadForPatch(current));
|
|
160
|
+
if (!patch)
|
|
161
|
+
return current;
|
|
162
|
+
if (patch.title !== undefined)
|
|
163
|
+
existing.title = patch.title;
|
|
164
|
+
if (patch.metadata !== undefined)
|
|
165
|
+
existing.metadata = patch.metadata;
|
|
166
|
+
return toThread(await this.threadRepo.save(existing));
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
async deleteThread(threadId) {
|
|
170
|
+
await this.threadRepo.delete({ id: threadId });
|
|
171
|
+
}
|
|
172
|
+
async deleteThreadsByResourceIdPrefix(resourceIdPrefix) {
|
|
173
|
+
const threads = await this.threadRepo.find({
|
|
174
|
+
where: { resourceId: (0, typeorm_1.Like)(`${resourceIdPrefix}%`) },
|
|
175
|
+
});
|
|
176
|
+
if (threads.length === 0)
|
|
177
|
+
return;
|
|
178
|
+
const threadIds = threads.map((thread) => thread.id);
|
|
179
|
+
const resourceIds = Array.from(new Set(threads.map((thread) => thread.resourceId)));
|
|
180
|
+
await this.resourceRepo.delete({ id: (0, typeorm_1.In)(resourceIds) });
|
|
181
|
+
await this.resourceRepo.delete({
|
|
182
|
+
id: (0, typeorm_1.In)(threadIds.map((threadId) => `thread:${threadId}`)),
|
|
183
|
+
});
|
|
184
|
+
await this.threadRepo.delete({ id: (0, typeorm_1.In)(threadIds) });
|
|
185
|
+
}
|
|
186
|
+
async getMessages(threadId, opts) {
|
|
187
|
+
const where = opts?.before ? { threadId, createdAt: (0, typeorm_1.LessThan)(opts.before) } : { threadId };
|
|
188
|
+
const entities = await this.messageRepo.find({
|
|
189
|
+
where,
|
|
190
|
+
order: opts?.limit ? { createdAt: 'DESC', id: 'DESC' } : { createdAt: 'ASC', id: 'ASC' },
|
|
191
|
+
...(opts?.limit ? { take: opts.limit } : {}),
|
|
192
|
+
});
|
|
193
|
+
const ordered = opts?.limit ? entities.reverse() : entities;
|
|
194
|
+
return ordered.flatMap((entity) => {
|
|
195
|
+
const message = this.toAgentMessage(entity);
|
|
196
|
+
return message ? [message] : [];
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
async listMessages(args) {
|
|
200
|
+
const limit = args.limit ?? 50;
|
|
201
|
+
const page = args.page ?? 0;
|
|
202
|
+
const entities = await this.messageRepo.find({
|
|
203
|
+
where: { threadId: args.threadId },
|
|
204
|
+
order: { createdAt: 'DESC', id: 'DESC' },
|
|
205
|
+
take: limit,
|
|
206
|
+
skip: page * limit,
|
|
207
|
+
});
|
|
208
|
+
return {
|
|
209
|
+
messages: entities.reverse().flatMap((entity) => {
|
|
210
|
+
const message = this.toAgentMessage(entity);
|
|
211
|
+
return message ? [message] : [];
|
|
212
|
+
}),
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
async saveMessages(args) {
|
|
216
|
+
if (args.messages.length === 0)
|
|
217
|
+
return;
|
|
218
|
+
const entities = args.messages.map((message) => this.messageRepo.create({
|
|
219
|
+
id: message.id,
|
|
220
|
+
threadId: args.threadId,
|
|
221
|
+
content: JSON.stringify(message),
|
|
222
|
+
role: getMessageRole(message),
|
|
223
|
+
type: getMessageType(message),
|
|
224
|
+
resourceId: args.resourceId,
|
|
225
|
+
createdAt: message.createdAt,
|
|
226
|
+
updatedAt: message.createdAt,
|
|
227
|
+
}));
|
|
228
|
+
await this.messageRepo.save(entities);
|
|
229
|
+
}
|
|
230
|
+
async deleteMessages(messageIds) {
|
|
231
|
+
if (messageIds.length === 0)
|
|
232
|
+
return;
|
|
233
|
+
await this.messageRepo.delete({ id: (0, typeorm_1.In)(messageIds) });
|
|
234
|
+
}
|
|
235
|
+
async getWorkingMemory(params) {
|
|
236
|
+
const resource = await this.resourceRepo.findOneBy({ id: workingMemoryKey(params) });
|
|
237
|
+
return resource?.workingMemory ?? null;
|
|
238
|
+
}
|
|
239
|
+
async saveWorkingMemory(params, content) {
|
|
240
|
+
const id = workingMemoryKey(params);
|
|
241
|
+
const existing = await this.resourceRepo.findOneBy({ id });
|
|
242
|
+
if (existing) {
|
|
243
|
+
existing.workingMemory = content;
|
|
244
|
+
await this.resourceRepo.save(existing);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
await this.resourceRepo.save(this.resourceRepo.create({
|
|
248
|
+
id,
|
|
249
|
+
workingMemory: content,
|
|
250
|
+
metadata: { scope: params.scope },
|
|
251
|
+
}));
|
|
252
|
+
}
|
|
253
|
+
async appendObservationLogEntries(rows) {
|
|
254
|
+
return await this.observationLog.appendObservationLogEntries(rows);
|
|
255
|
+
}
|
|
256
|
+
async getActiveObservationLog(scope) {
|
|
257
|
+
return await this.observationLog.getActiveObservationLog(scope);
|
|
258
|
+
}
|
|
259
|
+
async getObservationLog(opts) {
|
|
260
|
+
return await this.observationLog.getObservationLog(opts);
|
|
261
|
+
}
|
|
262
|
+
async getMessagesForObservationScope(observationScopeId, opts) {
|
|
263
|
+
return await this.observationLog.getMessagesForObservationScope(observationScopeId, opts);
|
|
264
|
+
}
|
|
265
|
+
async dropObservationLogEntries(ids) {
|
|
266
|
+
return await this.observationLog.dropObservationLogEntries(ids);
|
|
267
|
+
}
|
|
268
|
+
async supersedeObservationLogEntries(ids, supersededBy) {
|
|
269
|
+
return await this.observationLog.supersedeObservationLogEntries(ids, supersededBy);
|
|
270
|
+
}
|
|
271
|
+
async applyObservationLogReflection(scope, reflection) {
|
|
272
|
+
return await this.observationLog.applyObservationLogReflection(scope, reflection);
|
|
273
|
+
}
|
|
274
|
+
async getCursor(observationScopeId) {
|
|
275
|
+
return await this.observationLog.getCursor(observationScopeId);
|
|
276
|
+
}
|
|
277
|
+
async setCursor(cursor) {
|
|
278
|
+
return await this.observationLog.setCursor(cursor);
|
|
279
|
+
}
|
|
280
|
+
async acquireObservationLogTaskLock(observationScopeId, taskKind, opts) {
|
|
281
|
+
return await this.observationLog.acquireObservationLogTaskLock(observationScopeId, taskKind, opts);
|
|
282
|
+
}
|
|
283
|
+
async releaseObservationLogTaskLock(handle) {
|
|
284
|
+
return await this.observationLog.releaseObservationLogTaskLock(handle);
|
|
285
|
+
}
|
|
286
|
+
async serializeThreadMutation(threadId, mutation) {
|
|
287
|
+
const previous = this.threadMutationQueues.get(threadId) ?? Promise.resolve();
|
|
288
|
+
const next = previous.catch(() => undefined).then(mutation);
|
|
289
|
+
this.threadMutationQueues.set(threadId, next);
|
|
290
|
+
try {
|
|
291
|
+
return await next;
|
|
292
|
+
}
|
|
293
|
+
finally {
|
|
294
|
+
if (this.threadMutationQueues.get(threadId) === next) {
|
|
295
|
+
this.threadMutationQueues.delete(threadId);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
toAgentMessage(entity) {
|
|
300
|
+
const message = toAgentMessage(entity);
|
|
301
|
+
if (!message) {
|
|
302
|
+
this.logger.warn('Skipping invalid Instance AI message row', {
|
|
303
|
+
messageId: entity.id,
|
|
304
|
+
threadId: entity.threadId,
|
|
305
|
+
resourceId: entity.resourceId,
|
|
306
|
+
role: entity.role,
|
|
307
|
+
type: entity.type,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
return message;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
exports.TypeORMAgentMemory = TypeORMAgentMemory;
|
|
314
|
+
exports.TypeORMAgentMemory = TypeORMAgentMemory = __decorate([
|
|
315
|
+
(0, di_1.Service)(),
|
|
316
|
+
__metadata("design:paramtypes", [instance_ai_thread_repository_1.InstanceAiThreadRepository,
|
|
317
|
+
instance_ai_message_repository_1.InstanceAiMessageRepository,
|
|
318
|
+
instance_ai_resource_repository_1.InstanceAiResourceRepository,
|
|
319
|
+
instance_ai_observation_repository_1.InstanceAiObservationRepository,
|
|
320
|
+
instance_ai_observation_cursor_repository_1.InstanceAiObservationCursorRepository,
|
|
321
|
+
instance_ai_observation_lock_repository_1.InstanceAiObservationLockRepository,
|
|
322
|
+
backend_common_1.Logger])
|
|
323
|
+
], TypeORMAgentMemory);
|
|
324
|
+
//# sourceMappingURL=typeorm-agent-memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeorm-agent-memory.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/typeorm-agent-memory.ts"],"names":[],"mappings":";;;;;;;;;;;;AAcA,wDAA6C;AAC7C,gCAAkC;AAQlC,0CAAkD;AAElD,mFAA6E;AAG7E,mGAA6F;AAC7F,yHAAkH;AAClH,qHAA8G;AAC9G,2GAAqG;AACrG,qGAA+F;AAC/F,iGAA2F;AAE3F,SAAS,aAAa,CAAC,IAAY;IAClC,IAAI,CAAC;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAA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AI,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC;gBACtD,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC5C,CAAC;QACF,CAAC;IACF,CAAC;IAEO,cAAc,CAAC,MAAyB;QAC/C,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0CAA0C,EAAE;gBAC5D,SAAS,EAAE,MAAM,CAAC,EAAE;gBACpB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,IAAI,EAAE,MAAM,CAAC,IAAI;aACjB,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,CAAC;IAChB,CAAC;CACD,CAAA;AA9TY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,YAAO,GAAE;qCAQqB,0DAA0B;QACzB,4DAA2B;QAC1B,8DAA4B;QAC1C,oEAA+B;QACzB,iFAAqC;QACvC,6EAAmC;QAChD,uBAAM;GAbH,kBAAkB,CA8T9B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type BuiltObservationLogStore, type BuiltObservationLogTaskLockStore, type NewObservationLogEntry, type ObservationCursor, type ObservationLogEntry, type ObservationLogReadOptions, type ObservationLogReflection, type ObservationLogReflectionResult, type ObservationLogScope, type ObservationLogTaskKind, type ObservationLogTaskLockHandle } from '@n8n/agents';
|
|
2
|
+
import type { AgentDbMessage } from '@n8n/instance-ai';
|
|
3
|
+
import type { InstanceAiMessage } from '../entities/instance-ai-message.entity';
|
|
4
|
+
import type { InstanceAiMessageRepository } from '../repositories/instance-ai-message.repository';
|
|
5
|
+
import type { InstanceAiObservationCursorRepository } from '../repositories/instance-ai-observation-cursor.repository';
|
|
6
|
+
import type { InstanceAiObservationLockRepository } from '../repositories/instance-ai-observation-lock.repository';
|
|
7
|
+
import type { InstanceAiObservationRepository } from '../repositories/instance-ai-observation.repository';
|
|
8
|
+
export declare class TypeORMObservationLogStore implements BuiltObservationLogStore, BuiltObservationLogTaskLockStore {
|
|
9
|
+
private readonly observationRepo;
|
|
10
|
+
private readonly observationCursorRepo;
|
|
11
|
+
private readonly observationLockRepo;
|
|
12
|
+
private readonly messageRepo;
|
|
13
|
+
private readonly toAgentMessage;
|
|
14
|
+
constructor(observationRepo: InstanceAiObservationRepository, observationCursorRepo: InstanceAiObservationCursorRepository, observationLockRepo: InstanceAiObservationLockRepository, messageRepo: InstanceAiMessageRepository, toAgentMessage: (entity: InstanceAiMessage) => AgentDbMessage | undefined);
|
|
15
|
+
appendObservationLogEntries(rows: NewObservationLogEntry[]): Promise<ObservationLogEntry[]>;
|
|
16
|
+
getActiveObservationLog(scope: ObservationLogScope & {
|
|
17
|
+
limit?: number;
|
|
18
|
+
order?: 'asc' | 'desc';
|
|
19
|
+
}): Promise<ObservationLogEntry[]>;
|
|
20
|
+
getObservationLog(opts: ObservationLogReadOptions): Promise<ObservationLogEntry[]>;
|
|
21
|
+
getMessagesForObservationScope(observationScopeId: string, opts?: {
|
|
22
|
+
since?: {
|
|
23
|
+
sinceCreatedAt: Date;
|
|
24
|
+
sinceMessageId: string;
|
|
25
|
+
};
|
|
26
|
+
}): Promise<AgentDbMessage[]>;
|
|
27
|
+
dropObservationLogEntries(ids: string[]): Promise<void>;
|
|
28
|
+
supersedeObservationLogEntries(ids: string[], supersededBy: string): Promise<void>;
|
|
29
|
+
applyObservationLogReflection(scope: ObservationLogScope, reflection: ObservationLogReflection): Promise<ObservationLogReflectionResult>;
|
|
30
|
+
getCursor(observationScopeId: string): Promise<ObservationCursor | null>;
|
|
31
|
+
setCursor(cursor: ObservationCursor): Promise<void>;
|
|
32
|
+
acquireObservationLogTaskLock(observationScopeId: string, taskKind: ObservationLogTaskKind, opts: {
|
|
33
|
+
ttlMs: number;
|
|
34
|
+
holderId: string;
|
|
35
|
+
}): Promise<ObservationLogTaskLockHandle | null>;
|
|
36
|
+
releaseObservationLogTaskLock(handle: ObservationLogTaskLockHandle): Promise<void>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeORMObservationLogStore = void 0;
|
|
4
|
+
const agents_1 = require("@n8n/agents");
|
|
5
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
6
|
+
const instance_ai_observation_lock_entity_1 = require("../entities/instance-ai-observation-lock.entity");
|
|
7
|
+
const instance_ai_observation_entity_1 = require("../entities/instance-ai-observation.entity");
|
|
8
|
+
function toObservationLogEntry(entity) {
|
|
9
|
+
return {
|
|
10
|
+
id: entity.id,
|
|
11
|
+
observationScopeId: entity.observationScopeId,
|
|
12
|
+
marker: entity.marker,
|
|
13
|
+
text: entity.text,
|
|
14
|
+
parentId: entity.parentId,
|
|
15
|
+
tokenCount: Number(entity.tokenCount),
|
|
16
|
+
status: entity.status,
|
|
17
|
+
supersededBy: entity.supersededBy,
|
|
18
|
+
createdAt: entity.createdAt,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
class TypeORMObservationLogStore {
|
|
22
|
+
constructor(observationRepo, observationCursorRepo, observationLockRepo, messageRepo, toAgentMessage) {
|
|
23
|
+
this.observationRepo = observationRepo;
|
|
24
|
+
this.observationCursorRepo = observationCursorRepo;
|
|
25
|
+
this.observationLockRepo = observationLockRepo;
|
|
26
|
+
this.messageRepo = messageRepo;
|
|
27
|
+
this.toAgentMessage = toAgentMessage;
|
|
28
|
+
}
|
|
29
|
+
async appendObservationLogEntries(rows) {
|
|
30
|
+
if (rows.length === 0)
|
|
31
|
+
return [];
|
|
32
|
+
const entities = rows.map((row) => this.observationRepo.create({
|
|
33
|
+
observationScopeId: row.observationScopeId,
|
|
34
|
+
marker: row.marker,
|
|
35
|
+
text: row.text,
|
|
36
|
+
parentId: row.parentId ?? null,
|
|
37
|
+
tokenCount: row.tokenCount ?? (0, agents_1.estimateObservationTokens)(row.text),
|
|
38
|
+
...(0, agents_1.activeLifecycleState)(),
|
|
39
|
+
createdAt: row.createdAt,
|
|
40
|
+
}));
|
|
41
|
+
const saved = await this.observationRepo.save(entities);
|
|
42
|
+
return saved.map((entity) => toObservationLogEntry(entity));
|
|
43
|
+
}
|
|
44
|
+
async getActiveObservationLog(scope) {
|
|
45
|
+
return await this.getObservationLog({ ...scope, status: 'active' });
|
|
46
|
+
}
|
|
47
|
+
async getObservationLog(opts) {
|
|
48
|
+
const baseWhere = {
|
|
49
|
+
observationScopeId: opts.observationScopeId,
|
|
50
|
+
...(opts.status !== undefined && { status: opts.status }),
|
|
51
|
+
...(opts.parentId !== undefined && { parentId: opts.parentId ?? (0, typeorm_1.IsNull)() }),
|
|
52
|
+
};
|
|
53
|
+
const entities = await this.observationRepo.find({
|
|
54
|
+
where: [baseWhere],
|
|
55
|
+
order: {
|
|
56
|
+
createdAt: opts.order === 'desc' ? 'DESC' : 'ASC',
|
|
57
|
+
id: opts.order === 'desc' ? 'DESC' : 'ASC',
|
|
58
|
+
},
|
|
59
|
+
...(opts.limit !== undefined && { take: opts.limit }),
|
|
60
|
+
});
|
|
61
|
+
return entities.map((entity) => toObservationLogEntry(entity));
|
|
62
|
+
}
|
|
63
|
+
async getMessagesForObservationScope(observationScopeId, opts) {
|
|
64
|
+
const baseWhere = {
|
|
65
|
+
threadId: observationScopeId,
|
|
66
|
+
};
|
|
67
|
+
const where = opts?.since
|
|
68
|
+
? [
|
|
69
|
+
{ ...baseWhere, createdAt: (0, typeorm_1.MoreThan)(opts.since.sinceCreatedAt) },
|
|
70
|
+
{
|
|
71
|
+
...baseWhere,
|
|
72
|
+
createdAt: (0, typeorm_1.Equal)(opts.since.sinceCreatedAt),
|
|
73
|
+
id: (0, typeorm_1.MoreThan)(opts.since.sinceMessageId),
|
|
74
|
+
},
|
|
75
|
+
]
|
|
76
|
+
: [baseWhere];
|
|
77
|
+
const entities = await this.messageRepo.find({
|
|
78
|
+
where,
|
|
79
|
+
order: { createdAt: 'ASC', id: 'ASC' },
|
|
80
|
+
});
|
|
81
|
+
return entities.flatMap((entity) => {
|
|
82
|
+
const message = this.toAgentMessage(entity);
|
|
83
|
+
return message ? [message] : [];
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async dropObservationLogEntries(ids) {
|
|
87
|
+
if (ids.length === 0)
|
|
88
|
+
return;
|
|
89
|
+
await this.observationRepo.update({ id: (0, typeorm_1.In)(ids) }, (0, agents_1.droppedLifecycleState)());
|
|
90
|
+
}
|
|
91
|
+
async supersedeObservationLogEntries(ids, supersededBy) {
|
|
92
|
+
if (ids.length === 0)
|
|
93
|
+
return;
|
|
94
|
+
await this.observationRepo.update({ id: (0, typeorm_1.In)(ids) }, (0, agents_1.supersededLifecycleState)(supersededBy));
|
|
95
|
+
}
|
|
96
|
+
async applyObservationLogReflection(scope, reflection) {
|
|
97
|
+
return await this.observationRepo.manager.transaction(async (trx) => {
|
|
98
|
+
const repo = trx.getRepository(instance_ai_observation_entity_1.InstanceAiObservation);
|
|
99
|
+
const activeEntries = await repo.find({
|
|
100
|
+
where: {
|
|
101
|
+
observationScopeId: scope.observationScopeId,
|
|
102
|
+
status: 'active',
|
|
103
|
+
},
|
|
104
|
+
order: { createdAt: 'ASC', id: 'ASC' },
|
|
105
|
+
});
|
|
106
|
+
const normalized = (0, agents_1.normalizeObservationLogReflection)(activeEntries.map((entry) => toObservationLogEntry(entry)), reflection);
|
|
107
|
+
const inserted = normalized.merge.length
|
|
108
|
+
? await repo.save(normalized.merge.map((entry) => repo.create({
|
|
109
|
+
observationScopeId: scope.observationScopeId,
|
|
110
|
+
marker: entry.marker,
|
|
111
|
+
text: entry.text,
|
|
112
|
+
parentId: entry.parentId ?? null,
|
|
113
|
+
tokenCount: entry.tokenCount ?? (0, agents_1.estimateObservationTokens)(entry.text),
|
|
114
|
+
...(0, agents_1.activeLifecycleState)(),
|
|
115
|
+
createdAt: entry.createdAt,
|
|
116
|
+
})))
|
|
117
|
+
: [];
|
|
118
|
+
if (normalized.drop.length > 0) {
|
|
119
|
+
await repo.update({
|
|
120
|
+
observationScopeId: scope.observationScopeId,
|
|
121
|
+
id: (0, typeorm_1.In)(normalized.drop),
|
|
122
|
+
}, (0, agents_1.droppedLifecycleState)());
|
|
123
|
+
}
|
|
124
|
+
for (const [index, merge] of normalized.merge.entries()) {
|
|
125
|
+
const replacement = inserted[index];
|
|
126
|
+
if (replacement && merge.supersedes.length > 0) {
|
|
127
|
+
await repo.update({
|
|
128
|
+
observationScopeId: scope.observationScopeId,
|
|
129
|
+
id: (0, typeorm_1.In)(merge.supersedes),
|
|
130
|
+
}, (0, agents_1.supersededLifecycleState)(replacement.id));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
droppedIds: [...normalized.drop],
|
|
135
|
+
supersededIds: normalized.merge.flatMap((entry) => entry.supersedes),
|
|
136
|
+
inserted: inserted.map((entry) => toObservationLogEntry(entry)),
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
async getCursor(observationScopeId) {
|
|
141
|
+
const entity = await this.observationCursorRepo.findOneBy({ observationScopeId });
|
|
142
|
+
if (!entity)
|
|
143
|
+
return null;
|
|
144
|
+
return {
|
|
145
|
+
observationScopeId: entity.observationScopeId,
|
|
146
|
+
lastObservedMessageId: entity.lastObservedMessageId,
|
|
147
|
+
lastObservedAt: entity.lastObservedAt,
|
|
148
|
+
updatedAt: entity.updatedAt,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
async setCursor(cursor) {
|
|
152
|
+
await this.observationCursorRepo.upsert({
|
|
153
|
+
observationScopeId: cursor.observationScopeId,
|
|
154
|
+
lastObservedMessageId: cursor.lastObservedMessageId,
|
|
155
|
+
lastObservedAt: cursor.lastObservedAt,
|
|
156
|
+
updatedAt: cursor.updatedAt,
|
|
157
|
+
}, {
|
|
158
|
+
conflictPaths: ['observationScopeId'],
|
|
159
|
+
skipUpdateIfNoValuesChanged: false,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
async acquireObservationLogTaskLock(observationScopeId, taskKind, opts) {
|
|
163
|
+
const now = new Date();
|
|
164
|
+
const heldUntil = new Date(now.getTime() + opts.ttlMs);
|
|
165
|
+
const updateResult = await this.observationLockRepo
|
|
166
|
+
.createQueryBuilder()
|
|
167
|
+
.update(instance_ai_observation_lock_entity_1.InstanceAiObservationLock)
|
|
168
|
+
.set({ taskKind, holderId: opts.holderId, heldUntil })
|
|
169
|
+
.where('"observationScopeId" = :observationScopeId')
|
|
170
|
+
.andWhere('"taskKind" = :taskKind')
|
|
171
|
+
.andWhere('("holderId" = :holderId OR "heldUntil" <= :now)')
|
|
172
|
+
.setParameters({
|
|
173
|
+
observationScopeId,
|
|
174
|
+
taskKind,
|
|
175
|
+
holderId: opts.holderId,
|
|
176
|
+
now,
|
|
177
|
+
})
|
|
178
|
+
.execute();
|
|
179
|
+
if ((updateResult.affected ?? 0) > 0) {
|
|
180
|
+
return { observationScopeId, taskKind, holderId: opts.holderId, heldUntil };
|
|
181
|
+
}
|
|
182
|
+
await this.observationLockRepo
|
|
183
|
+
.createQueryBuilder()
|
|
184
|
+
.insert()
|
|
185
|
+
.into(instance_ai_observation_lock_entity_1.InstanceAiObservationLock)
|
|
186
|
+
.values({
|
|
187
|
+
observationScopeId,
|
|
188
|
+
taskKind,
|
|
189
|
+
holderId: opts.holderId,
|
|
190
|
+
heldUntil,
|
|
191
|
+
})
|
|
192
|
+
.orIgnore()
|
|
193
|
+
.execute();
|
|
194
|
+
const claimed = await this.observationLockRepo.findOneBy({
|
|
195
|
+
observationScopeId,
|
|
196
|
+
taskKind,
|
|
197
|
+
holderId: opts.holderId,
|
|
198
|
+
});
|
|
199
|
+
if (!claimed)
|
|
200
|
+
return null;
|
|
201
|
+
return { observationScopeId, taskKind, holderId: opts.holderId, heldUntil };
|
|
202
|
+
}
|
|
203
|
+
async releaseObservationLogTaskLock(handle) {
|
|
204
|
+
await this.observationLockRepo.delete({
|
|
205
|
+
observationScopeId: handle.observationScopeId,
|
|
206
|
+
taskKind: handle.taskKind,
|
|
207
|
+
holderId: handle.holderId,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
exports.TypeORMObservationLogStore = TypeORMObservationLogStore;
|
|
212
|
+
//# sourceMappingURL=typeorm-observation-log-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeorm-observation-log-store.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/typeorm-observation-log-store.ts"],"names":[],"mappings":";;;AAAA,wCAiBqB;AAErB,0CAAkF;AAGlF,yGAA4F;AAC5F,+FAAmF;AAMnF,SAAS,qBAAqB,CAAC,MAA6B;IAC3D,OAAO;QACN,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;QAC7C,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;QACrC,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,SAAS,EAAE,MAAM,CAAC,SAAS;KAC3B,CAAC;AACH,CAAC;AAED,MAAa,0BAA0B;IAGtC,YACkB,eAAgD,EAChD,qBAA4D,EAC5D,mBAAwD,EACxD,WAAwC,EACxC,cAAyE;QAJzE,oBAAe,GAAf,eAAe,CAAiC;QAChD,0BAAqB,GAArB,qBAAqB,CAAuC;QAC5D,wBAAmB,GAAnB,mBAAmB,CAAqC;QACxD,gBAAW,GAAX,WAAW,CAA6B;QACxC,mBAAc,GAAd,cA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