n8n 2.15.1 → 2.17.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/README.md +1 -1
- package/dist/active-workflow-manager.d.ts +3 -1
- package/dist/active-workflow-manager.js +62 -16
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/auth/auth.service.d.ts +5 -2
- package/dist/auth/auth.service.js +11 -6
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/base-command.js +13 -1
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/start.d.ts +1 -0
- package/dist/commands/start.js +7 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +5 -1
- package/dist/constants.js.map +1 -1
- package/dist/controllers/ai.controller.d.ts +11 -2
- package/dist/controllers/ai.controller.js +56 -4
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/auth.controller.js +1 -1
- package/dist/controllers/auth.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.js +5 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/me.controller.d.ts +1 -0
- package/dist/controllers/me.controller.js +12 -0
- package/dist/controllers/me.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +3 -1
- package/dist/controllers/project.controller.js +9 -2
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +6 -4
- package/dist/controllers/role.controller.js +28 -8
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +4 -1
- package/dist/controllers/users.controller.js +8 -2
- package/dist/controllers/users.controller.js.map +1 -1
- package/dist/credentials/credentials.controller.js +4 -1
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +10 -6
- package/dist/credentials/credentials.service.js +98 -26
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/validation.js +2 -2
- package/dist/credentials/validation.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -1
- package/dist/credentials-helper.js +21 -3
- package/dist/credentials-helper.js.map +1 -1
- package/dist/errors/http-error-classifier.d.ts +31 -0
- package/dist/errors/http-error-classifier.js +60 -0
- package/dist/errors/http-error-classifier.js.map +1 -0
- package/dist/errors/http-error-serializers.d.ts +18 -0
- package/dist/errors/http-error-serializers.js +64 -0
- package/dist/errors/http-error-serializers.js.map +1 -0
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +10 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +114 -0
- package/dist/events/relays/log-streaming.event-relay.d.ts +10 -0
- package/dist/events/relays/log-streaming.event-relay.js +108 -2
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +5 -0
- package/dist/events/relays/telemetry.event-relay.js +58 -5
- 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 +24 -9
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution.service.js +2 -1
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/instance-settings-loader/instance-settings-loader.service.d.ts +9 -0
- package/dist/instance-settings-loader/instance-settings-loader.service.js +36 -0
- package/dist/instance-settings-loader/instance-settings-loader.service.js.map +1 -0
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.d.ts +10 -0
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js +72 -0
- package/dist/instance-settings-loader/loaders/owner.instance-settings-loader.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub-workflow.service.d.ts +1 -0
- package/dist/modules/chat-hub/chat-hub-workflow.service.js +18 -2
- package/dist/modules/chat-hub/chat-hub-workflow.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.types.d.ts +5 -0
- package/dist/modules/chat-hub/chat-hub.types.js +1 -0
- package/dist/modules/chat-hub/chat-hub.types.js.map +1 -1
- package/dist/modules/chat-hub/context-limits.js +10 -0
- package/dist/modules/chat-hub/context-limits.js.map +1 -1
- package/dist/modules/chat-hub/stream-capturer.js +3 -0
- package/dist/modules/chat-hub/stream-capturer.js.map +1 -1
- package/dist/modules/community-packages/community-node-types-utils.d.ts +2 -2
- package/dist/modules/community-packages/community-node-types-utils.js +4 -4
- package/dist/modules/community-packages/community-node-types-utils.js.map +1 -1
- package/dist/modules/community-packages/strapi-utils.d.ts +1 -1
- package/dist/modules/data-table/data-table-proxy.service.d.ts +44 -2
- package/dist/modules/data-table/data-table-proxy.service.js +86 -2
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/services/resolver-config-expression.service.js +10 -4
- package/dist/modules/dynamic-credentials.ee/services/resolver-config-expression.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.d.ts +5 -2
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js +10 -3
- package/dist/modules/external-secrets.ee/external-secrets-settings.controller.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.controller.ee.js +5 -5
- package/dist/modules/external-secrets.ee/secrets-providers-connections.controller.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.d.ts +6 -6
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js +14 -9
- package/dist/modules/external-secrets.ee/secrets-providers-connections.service.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-providers-project.controller.ee.js +3 -3
- package/dist/modules/external-secrets.ee/secrets-providers-project.controller.ee.js.map +1 -1
- package/dist/modules/instance-ai/compaction.service.d.ts +19 -0
- package/dist/modules/instance-ai/compaction.service.js +213 -0
- package/dist/modules/instance-ai/compaction.service.js.map +1 -0
- package/dist/modules/instance-ai/entities/index.d.ts +7 -0
- package/dist/modules/instance-ai/entities/index.js +18 -0
- package/dist/modules/instance-ai/entities/index.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-iteration-log.entity.d.ts +7 -0
- package/dist/modules/instance-ai/entities/instance-ai-iteration-log.entity.js +38 -0
- package/dist/modules/instance-ai/entities/instance-ai-iteration-log.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-message.entity.d.ts +9 -0
- package/dist/modules/instance-ai/entities/instance-ai-message.entity.js +47 -0
- package/dist/modules/instance-ai/entities/instance-ai-message.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.d.ts +33 -0
- package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js +145 -0
- package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-resource.entity.d.ts +6 -0
- package/dist/modules/instance-ai/entities/instance-ai-resource.entity.js +33 -0
- package/dist/modules/instance-ai/entities/instance-ai-resource.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.d.ts +8 -0
- package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js +43 -0
- package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.d.ts +7 -0
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js +38 -0
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.d.ts +8 -0
- package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.js +41 -0
- package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.js.map +1 -0
- package/dist/modules/instance-ai/eval/api-docs.d.ts +1 -0
- package/dist/modules/instance-ai/eval/api-docs.js +78 -0
- package/dist/modules/instance-ai/eval/api-docs.js.map +1 -0
- package/dist/modules/instance-ai/eval/execution.service.d.ts +25 -0
- package/dist/modules/instance-ai/eval/execution.service.js +291 -0
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -0
- package/dist/modules/instance-ai/eval/mock-handler.d.ts +9 -0
- package/dist/modules/instance-ai/eval/mock-handler.js +264 -0
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -0
- package/dist/modules/instance-ai/eval/node-config.d.ts +2 -0
- package/dist/modules/instance-ai/eval/node-config.js +15 -0
- package/dist/modules/instance-ai/eval/node-config.js.map +1 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.d.ts +12 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.js +301 -0
- package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.d.ts +3 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.js +50 -0
- package/dist/modules/instance-ai/eval/request-sanitizer.js.map +1 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +16 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js +217 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -0
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +19 -0
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +98 -0
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -0
- package/dist/modules/instance-ai/filesystem/index.d.ts +3 -0
- package/dist/modules/instance-ai/filesystem/index.js +8 -0
- package/dist/modules/instance-ai/filesystem/index.js.map +1 -0
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.d.ts +29 -0
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js +137 -0
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js.map +1 -0
- package/dist/modules/instance-ai/filesystem/local-gateway.d.ts +35 -0
- package/dist/modules/instance-ai/filesystem/local-gateway.js +99 -0
- package/dist/modules/instance-ai/filesystem/local-gateway.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +40 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.js +245 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +59 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +450 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +91 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +1885 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +101 -0
- package/dist/modules/instance-ai/instance-ai.controller.js +670 -0
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.module.d.ts +12 -0
- package/dist/modules/instance-ai/instance-ai.module.js +118 -0
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.service.d.ts +133 -0
- package/dist/modules/instance-ai/instance-ai.service.js +1802 -0
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -0
- package/dist/modules/instance-ai/internal-messages.d.ts +2 -0
- package/dist/modules/instance-ai/internal-messages.js +11 -0
- package/dist/modules/instance-ai/internal-messages.js.map +1 -0
- package/dist/modules/instance-ai/message-parser.d.ts +12 -0
- package/dist/modules/instance-ai/message-parser.js +171 -0
- package/dist/modules/instance-ai/message-parser.js.map +1 -0
- package/dist/modules/instance-ai/node-definition-resolver.d.ts +19 -0
- package/dist/modules/instance-ai/node-definition-resolver.js +290 -0
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -0
- package/dist/modules/instance-ai/proxy-token-manager.d.ts +15 -0
- package/dist/modules/instance-ai/proxy-token-manager.js +64 -0
- package/dist/modules/instance-ai/proxy-token-manager.js.map +1 -0
- package/dist/modules/instance-ai/repositories/index.d.ts +7 -0
- package/dist/modules/instance-ai/repositories/index.js +18 -0
- package/dist/modules/instance-ai/repositories/index.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-iteration-log.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-iteration-log.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-iteration-log.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-resource.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-resource.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-resource.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-thread.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-thread.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-thread.repository.js.map +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.js.map +1 -0
- package/dist/modules/instance-ai/snapshot-pruning.service.d.ts +17 -0
- package/dist/modules/instance-ai/snapshot-pruning.service.js +89 -0
- package/dist/modules/instance-ai/snapshot-pruning.service.js.map +1 -0
- package/dist/modules/instance-ai/storage/db-iteration-log-storage.d.ts +9 -0
- package/dist/modules/instance-ai/storage/db-iteration-log-storage.js +45 -0
- package/dist/modules/instance-ai/storage/db-iteration-log-storage.js.map +1 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +14 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +99 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -0
- package/dist/modules/instance-ai/storage/index.d.ts +5 -0
- package/dist/modules/instance-ai/storage/index.js +14 -0
- package/dist/modules/instance-ai/storage/index.js.map +1 -0
- package/dist/modules/instance-ai/storage/typeorm-composite-store.d.ts +9 -0
- package/dist/modules/instance-ai/storage/typeorm-composite-store.js +33 -0
- package/dist/modules/instance-ai/storage/typeorm-composite-store.js.map +1 -0
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.d.ts +96 -0
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +853 -0
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +1 -0
- package/dist/modules/instance-ai/storage/typeorm-workflows-storage.d.ts +44 -0
- package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js +156 -0
- package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js.map +1 -0
- package/dist/modules/instance-ai/web-research/brave-search.d.ts +10 -0
- package/dist/modules/instance-ai/web-research/brave-search.js +44 -0
- package/dist/modules/instance-ai/web-research/brave-search.js.map +1 -0
- package/dist/modules/instance-ai/web-research/cache.d.ts +13 -0
- package/dist/modules/instance-ai/web-research/cache.js +43 -0
- package/dist/modules/instance-ai/web-research/cache.js.map +1 -0
- package/dist/modules/instance-ai/web-research/fetch-and-extract.d.ts +8 -0
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js +231 -0
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -0
- package/dist/modules/instance-ai/web-research/index.d.ts +7 -0
- package/dist/modules/instance-ai/web-research/index.js +16 -0
- package/dist/modules/instance-ai/web-research/index.js.map +1 -0
- package/dist/modules/instance-ai/web-research/searxng-search.d.ts +6 -0
- package/dist/modules/instance-ai/web-research/searxng-search.js +39 -0
- package/dist/modules/instance-ai/web-research/searxng-search.js.map +1 -0
- package/dist/modules/instance-ai/web-research/ssrf-guard.d.ts +1 -0
- package/dist/modules/instance-ai/web-research/ssrf-guard.js +85 -0
- package/dist/modules/instance-ai/web-research/ssrf-guard.js.map +1 -0
- package/dist/modules/instance-ai/web-research/summarize-content.d.ts +4 -0
- package/dist/modules/instance-ai/web-research/summarize-content.js +34 -0
- package/dist/modules/instance-ai/web-research/summarize-content.js.map +1 -0
- package/dist/modules/instance-registry/instance-registry.types.d.ts +1 -0
- package/dist/modules/instance-registry/instance-registry.types.js +2 -1
- package/dist/modules/instance-registry/instance-registry.types.js.map +1 -1
- package/dist/modules/instance-registry/storage/instance-storage.interface.d.ts +1 -0
- package/dist/modules/instance-registry/storage/lua-scripts.d.ts +4 -0
- package/dist/modules/instance-registry/storage/lua-scripts.js +39 -0
- package/dist/modules/instance-registry/storage/lua-scripts.js.map +1 -0
- package/dist/modules/instance-registry/storage/memory-storage.d.ts +1 -0
- package/dist/modules/instance-registry/storage/memory-storage.js +1 -0
- package/dist/modules/instance-registry/storage/memory-storage.js.map +1 -1
- package/dist/modules/instance-registry/storage/redis-instance-storage.d.ts +25 -0
- package/dist/modules/instance-registry/storage/redis-instance-storage.js +185 -0
- package/dist/modules/instance-registry/storage/redis-instance-storage.js.map +1 -0
- package/dist/modules/instance-version-history/database/entities/instance-version-history.entity.d.ts +7 -0
- package/dist/modules/instance-version-history/database/entities/instance-version-history.entity.js +37 -0
- package/dist/modules/instance-version-history/database/entities/instance-version-history.entity.js.map +1 -0
- package/dist/modules/instance-version-history/database/repositories/instance-version-history.repository.d.ts +5 -0
- package/dist/modules/instance-version-history/database/repositories/instance-version-history.repository.js +26 -0
- package/dist/modules/instance-version-history/database/repositories/instance-version-history.repository.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.d.ts +26 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.js +85 -0
- package/dist/modules/instance-version-history/instance-version-history.controller.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.module.d.ts +5 -0
- package/dist/modules/instance-version-history/instance-version-history.module.js +60 -0
- package/dist/modules/instance-version-history/instance-version-history.module.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.service.d.ts +18 -0
- package/dist/modules/instance-version-history/instance-version-history.service.js +120 -0
- package/dist/modules/instance-version-history/instance-version-history.service.js.map +1 -0
- package/dist/modules/instance-version-history/instance-version-history.types.d.ts +12 -0
- package/dist/modules/instance-version-history/instance-version-history.types.js +27 -0
- package/dist/modules/instance-version-history/instance-version-history.types.js.map +1 -0
- package/dist/modules/log-streaming.ee/log-streaming.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +3 -1
- package/dist/modules/mcp/mcp.service.js +22 -3
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +1 -1
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.d.ts +13 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.js +69 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-column.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.js +77 -0
- package/dist/modules/mcp/tools/data-table/add-data-table-rows.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.d.ts +21 -0
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.js +92 -0
- package/dist/modules/mcp/tools/data-table/create-data-table.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.js +60 -0
- package/dist/modules/mcp/tools/data-table/delete-data-table-column.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/index.d.ts +7 -0
- package/dist/modules/mcp/tools/data-table/index.js +18 -0
- package/dist/modules/mcp/tools/data-table/index.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.d.ts +13 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.js +70 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table-column.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.js +60 -0
- package/dist/modules/mcp/tools/data-table/rename-data-table.tool.js.map +1 -0
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.d.ts +12 -0
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.js +93 -0
- package/dist/modules/mcp/tools/data-table/search-data-tables.tool.js.map +1 -0
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +3 -4
- package/dist/modules/mcp/tools/execute-workflow.tool.js +10 -25
- package/dist/modules/mcp/tools/execute-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-execution.tool.js +4 -8
- package/dist/modules/mcp/tools/get-execution.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +73 -2
- package/dist/modules/mcp/tools/schemas.js +41 -1
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js +2 -7
- package/dist/modules/mcp/tools/search-folders.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-projects.tool.js +2 -7
- package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +2 -7
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js +1 -37
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +1 -37
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +1 -37
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-builder-tools.service.d.ts +17 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js +48 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js.map +1 -1
- package/dist/modules/otel/handlers/node-end.handler.d.ts +8 -0
- package/dist/modules/otel/handlers/node-end.handler.js +71 -0
- package/dist/modules/otel/handlers/node-end.handler.js.map +1 -0
- package/dist/modules/otel/handlers/node-start.handler.d.ts +7 -0
- package/dist/modules/otel/handlers/node-start.handler.js +37 -0
- package/dist/modules/otel/handlers/node-start.handler.js.map +1 -0
- package/dist/modules/otel/handlers/workflow-end.handler.d.ts +1 -0
- package/dist/modules/otel/handlers/workflow-end.handler.js +8 -0
- package/dist/modules/otel/handlers/workflow-end.handler.js.map +1 -1
- package/dist/modules/otel/n8n-instrumentation.d.ts +8 -2
- package/dist/modules/otel/n8n-instrumentation.js +32 -1
- package/dist/modules/otel/n8n-instrumentation.js.map +1 -1
- package/dist/modules/otel/otel.config.d.ts +1 -0
- package/dist/modules/otel/otel.config.js +5 -0
- package/dist/modules/otel/otel.config.js.map +1 -1
- package/dist/modules/otel/otel.constants.d.ts +7 -0
- package/dist/modules/otel/otel.constants.js +7 -0
- package/dist/modules/otel/otel.constants.js.map +1 -1
- package/dist/modules/otel/otel.service.d.ts +1 -1
- package/dist/modules/otel/otel.service.js +20 -23
- package/dist/modules/otel/otel.service.js.map +1 -1
- package/dist/modules/otel/span-registry.d.ts +1 -0
- package/dist/modules/otel/span-registry.js +11 -0
- package/dist/modules/otel/span-registry.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.service.ee.d.ts +17 -3
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +195 -8
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.d.ts +7 -5
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js +40 -10
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.d.ts +3 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js +1 -0
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-resolver-types.d.ts +14 -2
- package/dist/modules/provisioning.ee/role-resolver.service.ee.js +16 -6
- package/dist/modules/provisioning.ee/role-resolver.service.ee.js.map +1 -1
- package/dist/modules/redaction/executions/execution-redaction.service.d.ts +3 -2
- package/dist/modules/redaction/executions/execution-redaction.service.js +5 -1
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/redaction/redaction.module.js +0 -6
- package/dist/modules/redaction/redaction.module.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-context.factory.d.ts +12 -0
- package/dist/modules/source-control.ee/source-control-context.factory.js +112 -0
- package/dist/modules/source-control.ee/source-control-context.factory.js.map +1 -0
- package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +9 -11
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-git.service.ee.js +3 -3
- package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +6 -4
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +29 -85
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-scoped.service.d.ts +4 -4
- package/dist/modules/source-control.ee/source-control-scoped.service.js +9 -40
- package/dist/modules/source-control.ee/source-control-scoped.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.d.ts +3 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +99 -59
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +3 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js +6 -4
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/types/source-control-context.d.ts +12 -4
- package/dist/modules/source-control.ee/types/source-control-context.js +32 -6
- package/dist/modules/source-control.ee/types/source-control-context.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +4 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js +39 -3
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.d.ts +14 -2
- package/dist/modules/sso-oidc/oidc.service.ee.js +86 -8
- package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
- package/dist/modules/sso-oidc/views/oidc-test-result.d.ts +5 -0
- package/dist/modules/sso-oidc/views/oidc-test-result.js +58 -0
- package/dist/modules/sso-oidc/views/oidc-test-result.js.map +1 -0
- package/dist/modules/sso-saml/saml-helpers.d.ts +1 -0
- package/dist/modules/sso-saml/saml-helpers.js +2 -0
- package/dist/modules/sso-saml/saml-helpers.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.d.ts +2 -3
- package/dist/modules/sso-saml/saml.controller.ee.js +3 -15
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml.service.ee.d.ts +4 -1
- package/dist/modules/sso-saml/saml.service.ee.js +13 -7
- package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
- package/dist/modules/token-exchange/controllers/embed-auth.controller.d.ts +19 -0
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js +106 -0
- package/dist/modules/token-exchange/controllers/embed-auth.controller.js.map +1 -0
- package/dist/modules/token-exchange/controllers/token-exchange.controller.d.ts +9 -0
- package/dist/modules/token-exchange/controllers/token-exchange.controller.js +148 -0
- package/dist/modules/token-exchange/controllers/token-exchange.controller.js.map +1 -0
- package/dist/modules/token-exchange/database/entities/token-exchange-jti.entity.d.ts +5 -0
- package/dist/modules/token-exchange/database/entities/token-exchange-jti.entity.js +33 -0
- package/dist/modules/token-exchange/database/entities/token-exchange-jti.entity.js.map +1 -0
- package/dist/modules/token-exchange/database/entities/trusted-key-source.entity.d.ts +10 -0
- package/dist/modules/token-exchange/database/entities/trusted-key-source.entity.js +45 -0
- package/dist/modules/token-exchange/database/entities/trusted-key-source.entity.js.map +1 -0
- package/dist/modules/token-exchange/database/entities/trusted-key.entity.d.ts +9 -0
- package/dist/modules/token-exchange/database/entities/trusted-key.entity.js +43 -0
- package/dist/modules/token-exchange/database/entities/trusted-key.entity.js.map +1 -0
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.d.ts +10 -0
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.js +106 -0
- package/dist/modules/token-exchange/database/repositories/token-exchange-jti.repository.js.map +1 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key-source.repository.d.ts +5 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key-source.repository.js +26 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key-source.repository.js.map +1 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key.repository.d.ts +7 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key.repository.js +32 -0
- package/dist/modules/token-exchange/database/repositories/trusted-key.repository.js.map +1 -0
- package/dist/modules/token-exchange/services/identity-resolution.service.d.ts +23 -0
- package/dist/modules/token-exchange/services/identity-resolution.service.js +195 -0
- package/dist/modules/token-exchange/services/identity-resolution.service.js.map +1 -0
- package/dist/modules/token-exchange/services/jti-cleanup.service.d.ts +18 -0
- package/dist/modules/token-exchange/services/jti-cleanup.service.js +90 -0
- package/dist/modules/token-exchange/services/jti-cleanup.service.js.map +1 -0
- package/dist/modules/token-exchange/services/jti-store.service.d.ts +6 -0
- package/dist/modules/token-exchange/services/jti-store.service.js +30 -0
- package/dist/modules/token-exchange/services/jti-store.service.js.map +1 -0
- package/dist/modules/token-exchange/services/jwks-resolver.d.ts +30 -0
- package/dist/modules/token-exchange/services/jwks-resolver.js +190 -0
- package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -0
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.d.ts +12 -0
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.js +92 -0
- package/dist/modules/token-exchange/services/scoped-jwt.strategy.js.map +1 -0
- package/dist/modules/token-exchange/services/token-exchange.service.d.ts +31 -0
- package/dist/modules/token-exchange/services/token-exchange.service.js +152 -0
- package/dist/modules/token-exchange/services/token-exchange.service.js.map +1 -0
- package/dist/modules/token-exchange/services/trusted-key.service.d.ts +47 -0
- package/dist/modules/token-exchange/services/trusted-key.service.js +465 -0
- package/dist/modules/token-exchange/services/trusted-key.service.js.map +1 -0
- package/dist/modules/token-exchange/token-exchange.config.d.ts +11 -0
- package/dist/modules/token-exchange/token-exchange.config.js +67 -0
- package/dist/modules/token-exchange/token-exchange.config.js.map +1 -0
- package/dist/modules/token-exchange/token-exchange.module.d.ts +5 -0
- package/dist/modules/token-exchange/token-exchange.module.js +79 -0
- package/dist/modules/token-exchange/token-exchange.module.js.map +1 -0
- package/dist/modules/token-exchange/token-exchange.schemas.d.ts +161 -0
- package/dist/modules/token-exchange/token-exchange.schemas.js +69 -0
- package/dist/modules/token-exchange/token-exchange.schemas.js.map +1 -0
- package/dist/modules/token-exchange/token-exchange.types.d.ts +53 -0
- package/dist/modules/token-exchange/token-exchange.types.js +5 -0
- package/dist/modules/token-exchange/token-exchange.types.js.map +1 -0
- package/dist/oauth/oauth.service.d.ts +1 -0
- package/dist/oauth/oauth.service.js +39 -2
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/public-api/index.js +37 -9
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/types.d.ts +28 -1
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.d.ts +19 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js +71 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.mapper.d.ts +27 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.mapper.js +35 -0
- package/dist/public-api/v1/handlers/community-packages/community-packages.mapper.js.map +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +7 -12
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.service.d.ts +3 -4
- package/dist/public-api/v1/handlers/credentials/credentials.service.js +21 -33
- package/dist/public-api/v1/handlers/credentials/credentials.service.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +5 -5
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +5 -5
- package/dist/public-api/v1/handlers/executions/executions.handler.js +56 -12
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/insights/insights.handler.d.ts +6 -0
- package/dist/public-api/v1/handlers/insights/insights.handler.js +57 -0
- package/dist/public-api/v1/handlers/insights/insights.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +14 -35
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.service.d.ts +6 -4
- package/dist/public-api/v1/handlers/workflows/workflows.service.js +7 -15
- package/dist/public-api/v1/handlers/workflows/workflows.service.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +530 -9
- package/dist/public-api/v1/public-api-error-response.d.ts +2 -0
- package/dist/public-api/v1/public-api-error-response.js +11 -0
- package/dist/public-api/v1/public-api-error-response.js.map +1 -0
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -1
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +19 -8
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/push/abstract.push.d.ts +1 -0
- package/dist/push/abstract.push.js +3 -0
- package/dist/push/abstract.push.js.map +1 -1
- package/dist/push/sse.push.js +5 -1
- package/dist/push/sse.push.js.map +1 -1
- package/dist/push/websocket.push.js +3 -1
- package/dist/push/websocket.push.js.map +1 -1
- package/dist/response-helper.js +6 -29
- package/dist/response-helper.js.map +1 -1
- package/dist/scaling/pubsub/subscriber.service.d.ts +2 -0
- package/dist/scaling/pubsub/subscriber.service.js +17 -8
- package/dist/scaling/pubsub/subscriber.service.js.map +1 -1
- package/dist/scaling/redis/redis.types.d.ts +1 -1
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.d.ts +2 -3
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js +2 -5
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js.map +1 -1
- package/dist/services/ai-gateway.service.d.ts +44 -0
- package/dist/services/ai-gateway.service.js +228 -0
- package/dist/services/ai-gateway.service.js.map +1 -0
- package/dist/services/ai-workflow-builder.service.d.ts +2 -2
- package/dist/services/ai-workflow-builder.service.js +4 -4
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/ai.service.d.ts +4 -0
- package/dist/services/ai.service.js +20 -18
- package/dist/services/ai.service.js.map +1 -1
- package/dist/services/api-key-auth.strategy.d.ts +10 -0
- package/dist/services/api-key-auth.strategy.js +71 -0
- package/dist/services/api-key-auth.strategy.js.map +1 -0
- package/dist/services/auth-strategy.registry.d.ts +7 -0
- package/dist/services/auth-strategy.registry.js +32 -0
- package/dist/services/auth-strategy.registry.js.map +1 -0
- package/dist/services/auth-strategy.types.d.ts +4 -0
- package/dist/services/auth-strategy.types.js +3 -0
- package/dist/services/auth-strategy.types.js.map +1 -0
- package/dist/services/credentials-tester.service.js +2 -0
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/db-clock.service.d.ts +10 -0
- package/dist/services/db-clock.service.js +48 -0
- package/dist/services/db-clock.service.js.map +1 -0
- package/dist/services/frontend.service.js +9 -0
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.d.ts +1 -0
- package/dist/services/import.service.js +25 -2
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/ownership.service.d.ts +4 -1
- package/dist/services/ownership.service.js +11 -5
- package/dist/services/ownership.service.js.map +1 -1
- package/dist/services/project.service.ee.js +1 -1
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.js +4 -4
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/public-api-key.service.d.ts +6 -13
- package/dist/services/public-api-key.service.js +12 -80
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/services/user.service.js +6 -0
- package/dist/services/user.service.js.map +1 -1
- package/dist/utils/validate-redirect-url.d.ts +1 -0
- package/dist/utils/validate-redirect-url.js +17 -0
- package/dist/utils/validate-redirect-url.js.map +1 -0
- package/dist/wait-tracker.d.ts +6 -2
- package/dist/wait-tracker.js +94 -63
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/live-webhooks.js +24 -18
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/test-webhooks.js +96 -78
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-webhooks.js +27 -21
- package/dist/webhooks/waiting-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-form-data.js +6 -2
- package/dist/webhooks/webhook-form-data.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +21 -6
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-last-node-response-extractor.d.ts +5 -2
- package/dist/webhooks/webhook-last-node-response-extractor.js +5 -8
- package/dist/webhooks/webhook-last-node-response-extractor.js.map +1 -1
- package/dist/webhooks/webhook.service.js +19 -4
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-execute-additional-data.js +2 -0
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +1 -0
- package/dist/workflow-helpers.js +21 -0
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +25 -1
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +8 -5
- package/dist/workflows/workflow-creation.service.js +40 -17
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-execution.service.js +1 -1
- package/dist/workflows/workflow-execution.service.js.map +1 -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.js +3 -3
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.ee.js +4 -1
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +16 -2
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +4 -4
- package/package.json +32 -30
|
@@ -0,0 +1,26 @@
|
|
|
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.InstanceAiThreadRepository = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
const instance_ai_thread_entity_1 = require("../entities/instance-ai-thread.entity");
|
|
16
|
+
let InstanceAiThreadRepository = class InstanceAiThreadRepository extends typeorm_1.Repository {
|
|
17
|
+
constructor(dataSource) {
|
|
18
|
+
super(instance_ai_thread_entity_1.InstanceAiThread, dataSource.manager);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.InstanceAiThreadRepository = InstanceAiThreadRepository;
|
|
22
|
+
exports.InstanceAiThreadRepository = InstanceAiThreadRepository = __decorate([
|
|
23
|
+
(0, di_1.Service)(),
|
|
24
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource])
|
|
25
|
+
], InstanceAiThreadRepository);
|
|
26
|
+
//# sourceMappingURL=instance-ai-thread.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-ai-thread.repository.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/repositories/instance-ai-thread.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,0CAAsD;AAEtD,qFAAyE;AAGlE,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,oBAA4B;IAC3E,YAAY,UAAsB;QACjC,KAAK,CAAC,4CAAgB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;CACD,CAAA;AAJY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,YAAO,GAAE;qCAEe,oBAAU;GADtB,0BAA0B,CAItC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataSource, Repository } from '@n8n/typeorm';
|
|
2
|
+
import { InstanceAiWorkflowSnapshot } from '../entities/instance-ai-workflow-snapshot.entity';
|
|
3
|
+
export declare class InstanceAiWorkflowSnapshotRepository extends Repository<InstanceAiWorkflowSnapshot> {
|
|
4
|
+
constructor(dataSource: DataSource);
|
|
5
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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.InstanceAiWorkflowSnapshotRepository = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
const instance_ai_workflow_snapshot_entity_1 = require("../entities/instance-ai-workflow-snapshot.entity");
|
|
16
|
+
let InstanceAiWorkflowSnapshotRepository = class InstanceAiWorkflowSnapshotRepository extends typeorm_1.Repository {
|
|
17
|
+
constructor(dataSource) {
|
|
18
|
+
super(instance_ai_workflow_snapshot_entity_1.InstanceAiWorkflowSnapshot, dataSource.manager);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.InstanceAiWorkflowSnapshotRepository = InstanceAiWorkflowSnapshotRepository;
|
|
22
|
+
exports.InstanceAiWorkflowSnapshotRepository = InstanceAiWorkflowSnapshotRepository = __decorate([
|
|
23
|
+
(0, di_1.Service)(),
|
|
24
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource])
|
|
25
|
+
], InstanceAiWorkflowSnapshotRepository);
|
|
26
|
+
//# sourceMappingURL=instance-ai-workflow-snapshot.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-ai-workflow-snapshot.repository.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,0CAAsD;AAEtD,2GAA8F;AAGvF,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,oBAAsC;IAC/F,YAAY,UAAsB;QACjC,KAAK,CAAC,iEAA0B,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;CACD,CAAA;AAJY,oFAAoC;+CAApC,oCAAoC;IADhD,IAAA,YAAO,GAAE;qCAEe,oBAAU;GADtB,oCAAoC,CAIhD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Logger } from '@n8n/backend-common';
|
|
2
|
+
import { InstanceAiConfig } from '@n8n/config';
|
|
3
|
+
import { InstanceSettings } from 'n8n-core';
|
|
4
|
+
import { InstanceAiWorkflowSnapshotRepository } from './repositories/instance-ai-workflow-snapshot.repository';
|
|
5
|
+
export declare class SnapshotPruningService {
|
|
6
|
+
private readonly logger;
|
|
7
|
+
private readonly config;
|
|
8
|
+
private readonly snapshotRepo;
|
|
9
|
+
private readonly instanceSettings;
|
|
10
|
+
private pruningInterval;
|
|
11
|
+
constructor(logger: Logger, config: InstanceAiConfig, snapshotRepo: InstanceAiWorkflowSnapshotRepository, instanceSettings: InstanceSettings);
|
|
12
|
+
init(): void;
|
|
13
|
+
startPruning(): void;
|
|
14
|
+
stopPruning(): void;
|
|
15
|
+
shutdown(): void;
|
|
16
|
+
prune(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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.SnapshotPruningService = void 0;
|
|
13
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
14
|
+
const config_1 = require("@n8n/config");
|
|
15
|
+
const decorators_1 = require("@n8n/decorators");
|
|
16
|
+
const di_1 = require("@n8n/di");
|
|
17
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
18
|
+
const n8n_core_1 = require("n8n-core");
|
|
19
|
+
const instance_ai_workflow_snapshot_repository_1 = require("./repositories/instance-ai-workflow-snapshot.repository");
|
|
20
|
+
let SnapshotPruningService = class SnapshotPruningService {
|
|
21
|
+
constructor(logger, config, snapshotRepo, instanceSettings) {
|
|
22
|
+
this.logger = logger;
|
|
23
|
+
this.config = config;
|
|
24
|
+
this.snapshotRepo = snapshotRepo;
|
|
25
|
+
this.instanceSettings = instanceSettings;
|
|
26
|
+
this.logger = this.logger.scoped('instance-ai');
|
|
27
|
+
}
|
|
28
|
+
init() {
|
|
29
|
+
if (this.instanceSettings.isLeader)
|
|
30
|
+
this.startPruning();
|
|
31
|
+
}
|
|
32
|
+
startPruning() {
|
|
33
|
+
if (this.config.snapshotPruneInterval <= 0)
|
|
34
|
+
return;
|
|
35
|
+
this.pruningInterval = setInterval(async () => await this.prune(), this.config.snapshotPruneInterval);
|
|
36
|
+
this.logger.debug('Started snapshot pruning timer', {
|
|
37
|
+
pruneIntervalMs: this.config.snapshotPruneInterval,
|
|
38
|
+
retentionMs: this.config.snapshotRetention,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
stopPruning() {
|
|
42
|
+
if (this.pruningInterval) {
|
|
43
|
+
clearInterval(this.pruningInterval);
|
|
44
|
+
this.pruningInterval = undefined;
|
|
45
|
+
this.logger.debug('Stopped snapshot pruning timer');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
shutdown() {
|
|
49
|
+
this.stopPruning();
|
|
50
|
+
}
|
|
51
|
+
async prune() {
|
|
52
|
+
const cutoff = new Date(Date.now() - this.config.snapshotRetention);
|
|
53
|
+
const { affected } = await this.snapshotRepo.delete({
|
|
54
|
+
updatedAt: (0, typeorm_1.LessThan)(cutoff),
|
|
55
|
+
});
|
|
56
|
+
if (affected === 0) {
|
|
57
|
+
this.logger.debug('Found no workflow snapshots to prune');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
this.logger.debug('Pruned stale workflow snapshots', { count: affected });
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
exports.SnapshotPruningService = SnapshotPruningService;
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, decorators_1.OnLeaderTakeover)(),
|
|
66
|
+
__metadata("design:type", Function),
|
|
67
|
+
__metadata("design:paramtypes", []),
|
|
68
|
+
__metadata("design:returntype", void 0)
|
|
69
|
+
], SnapshotPruningService.prototype, "startPruning", null);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, decorators_1.OnLeaderStepdown)(),
|
|
72
|
+
__metadata("design:type", Function),
|
|
73
|
+
__metadata("design:paramtypes", []),
|
|
74
|
+
__metadata("design:returntype", void 0)
|
|
75
|
+
], SnapshotPruningService.prototype, "stopPruning", null);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, decorators_1.OnShutdown)(),
|
|
78
|
+
__metadata("design:type", Function),
|
|
79
|
+
__metadata("design:paramtypes", []),
|
|
80
|
+
__metadata("design:returntype", void 0)
|
|
81
|
+
], SnapshotPruningService.prototype, "shutdown", null);
|
|
82
|
+
exports.SnapshotPruningService = SnapshotPruningService = __decorate([
|
|
83
|
+
(0, di_1.Service)(),
|
|
84
|
+
__metadata("design:paramtypes", [backend_common_1.Logger,
|
|
85
|
+
config_1.InstanceAiConfig,
|
|
86
|
+
instance_ai_workflow_snapshot_repository_1.InstanceAiWorkflowSnapshotRepository,
|
|
87
|
+
n8n_core_1.InstanceSettings])
|
|
88
|
+
], SnapshotPruningService);
|
|
89
|
+
//# sourceMappingURL=snapshot-pruning.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot-pruning.service.js","sourceRoot":"","sources":["../../../src/modules/instance-ai/snapshot-pruning.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,wCAA+C;AAC/C,gDAAiF;AACjF,gCAAkC;AAClC,0CAAwC;AACxC,uCAA4C;AAE5C,sHAA+G;AAGxG,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAGlC,YACkB,MAAc,EACd,MAAwB,EACxB,YAAkD,EAClD,gBAAkC;QAHlC,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAkB;QACxB,iBAAY,GAAZ,YAAY,CAAsC;QAClD,qBAAgB,GAAhB,gBAAgB,CAAkB;QAEnD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAED,IAAI;QACH,IAAI,IAAI,CAAC,gBAAgB,CAAC,QAAQ;YAAE,IAAI,CAAC,YAAY,EAAE,CAAC;IACzD,CAAC;IAGD,YAAY;QACX,IAAI,IAAI,CAAC,MAAM,CAAC,qBAAqB,IAAI,CAAC;YAAE,OAAO;QAEnD,IAAI,CAAC,eAAe,GAAG,WAAW,CACjC,KAAK,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,EAC9B,IAAI,CAAC,MAAM,CAAC,qBAAqB,CACjC,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,EAAE;YACnD,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB;YAClD,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB;SAC1C,CAAC,CAAC;IACJ,CAAC;IAGD,WAAW;QACV,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YAC1B,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YACpC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;YACjC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACrD,CAAC;IACF,CAAC;IAGD,QAAQ;QACP,IAAI,CAAC,WAAW,EAAE,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,KAAK;QACV,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAEpE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;YACnD,SAAS,EAAE,IAAA,kBAAQ,EAAC,MAAM,CAAC;SAC3B,CAAC,CAAC;QAEH,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;YAC1D,OAAO;QACR,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3E,CAAC;CACD,CAAA;AA1DY,wDAAsB;AAiBlC;IADC,IAAA,6BAAgB,GAAE;;;;0DAYlB;AAGD;IADC,IAAA,6BAAgB,GAAE;;;;yDAOlB;AAGD;IADC,IAAA,uBAAU,GAAE;;;;sDAGZ;iCA1CW,sBAAsB;IADlC,IAAA,YAAO,GAAE;qCAKiB,uBAAM;QACN,yBAAgB;QACV,+EAAoC;QAChC,2BAAgB;GAPxC,sBAAsB,CA0DlC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IterationEntry, IterationLog } from '@n8n/instance-ai';
|
|
2
|
+
import { InstanceAiIterationLogRepository } from '../repositories/instance-ai-iteration-log.repository';
|
|
3
|
+
export declare class DbIterationLogStorage implements IterationLog {
|
|
4
|
+
private readonly repo;
|
|
5
|
+
constructor(repo: InstanceAiIterationLogRepository);
|
|
6
|
+
append(threadId: string, taskKey: string, entry: IterationEntry): Promise<void>;
|
|
7
|
+
getForTask(threadId: string, taskKey: string): Promise<IterationEntry[]>;
|
|
8
|
+
clear(threadId: string): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.DbIterationLogStorage = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const utils_1 = require("@n8n/utils");
|
|
15
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
16
|
+
const instance_ai_iteration_log_repository_1 = require("../repositories/instance-ai-iteration-log.repository");
|
|
17
|
+
let DbIterationLogStorage = class DbIterationLogStorage {
|
|
18
|
+
constructor(repo) {
|
|
19
|
+
this.repo = repo;
|
|
20
|
+
}
|
|
21
|
+
async append(threadId, taskKey, entry) {
|
|
22
|
+
await this.repo.insert({
|
|
23
|
+
id: (0, utils_1.generateNanoId)(),
|
|
24
|
+
threadId,
|
|
25
|
+
taskKey,
|
|
26
|
+
entry: JSON.stringify(entry),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
async getForTask(threadId, taskKey) {
|
|
30
|
+
const rows = await this.repo.find({
|
|
31
|
+
where: { threadId, taskKey },
|
|
32
|
+
order: { createdAt: 'ASC' },
|
|
33
|
+
});
|
|
34
|
+
return rows.map((r) => (0, n8n_workflow_1.jsonParse)(r.entry));
|
|
35
|
+
}
|
|
36
|
+
async clear(threadId) {
|
|
37
|
+
await this.repo.delete({ threadId });
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.DbIterationLogStorage = DbIterationLogStorage;
|
|
41
|
+
exports.DbIterationLogStorage = DbIterationLogStorage = __decorate([
|
|
42
|
+
(0, di_1.Service)(),
|
|
43
|
+
__metadata("design:paramtypes", [instance_ai_iteration_log_repository_1.InstanceAiIterationLogRepository])
|
|
44
|
+
], DbIterationLogStorage);
|
|
45
|
+
//# sourceMappingURL=db-iteration-log-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db-iteration-log-storage.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/db-iteration-log-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAElC,sCAA4C;AAC5C,+CAAyC;AAEzC,+GAAwG;AAGjG,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACjC,YAA6B,IAAsC;QAAtC,SAAI,GAAJ,IAAI,CAAkC;IAAG,CAAC;IAEvE,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,OAAe,EAAE,KAAqB;QACpE,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YACtB,EAAE,EAAE,IAAA,sBAAc,GAAE;YACpB,QAAQ;YACR,OAAO;YACP,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;SAC5B,CAAC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,QAAgB,EAAE,OAAe;QACjD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACjC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE;YAC5B,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;SAC3B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,wBAAS,EAAiB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,QAAgB;QAC3B,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IACtC,CAAC;CACD,CAAA;AAvBY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,YAAO,GAAE;qCAE0B,uEAAgC;GADvD,qBAAqB,CAuBjC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { InstanceAiAgentNode } from '@n8n/api-types';
|
|
2
|
+
import type { AgentTreeSnapshot } from '@n8n/instance-ai';
|
|
3
|
+
import { InstanceAiRunSnapshotRepository } from '../repositories/instance-ai-run-snapshot.repository';
|
|
4
|
+
export declare class DbSnapshotStorage {
|
|
5
|
+
private readonly repo;
|
|
6
|
+
constructor(repo: InstanceAiRunSnapshotRepository);
|
|
7
|
+
getLatest(threadId: string, options?: {
|
|
8
|
+
messageGroupId?: string;
|
|
9
|
+
runId?: string;
|
|
10
|
+
}): Promise<AgentTreeSnapshot | undefined>;
|
|
11
|
+
save(threadId: string, agentTree: InstanceAiAgentNode, runId: string, messageGroupId?: string, runIds?: string[]): Promise<void>;
|
|
12
|
+
updateLast(threadId: string, agentTree: InstanceAiAgentNode, runId: string, messageGroupId?: string, runIds?: string[]): Promise<void>;
|
|
13
|
+
getAll(threadId: string): Promise<AgentTreeSnapshot[]>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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.DbSnapshotStorage = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
15
|
+
const instance_ai_run_snapshot_repository_1 = require("../repositories/instance-ai-run-snapshot.repository");
|
|
16
|
+
let DbSnapshotStorage = class DbSnapshotStorage {
|
|
17
|
+
constructor(repo) {
|
|
18
|
+
this.repo = repo;
|
|
19
|
+
}
|
|
20
|
+
async getLatest(threadId, options = {}) {
|
|
21
|
+
const { messageGroupId, runId } = options;
|
|
22
|
+
const row = messageGroupId
|
|
23
|
+
? await this.repo.findOne({
|
|
24
|
+
where: { threadId, messageGroupId },
|
|
25
|
+
order: { createdAt: 'DESC' },
|
|
26
|
+
})
|
|
27
|
+
: runId
|
|
28
|
+
? await this.repo.findOne({
|
|
29
|
+
where: { threadId, runId },
|
|
30
|
+
order: { createdAt: 'DESC' },
|
|
31
|
+
})
|
|
32
|
+
: await this.repo.findOne({
|
|
33
|
+
where: { threadId },
|
|
34
|
+
order: { createdAt: 'DESC' },
|
|
35
|
+
});
|
|
36
|
+
if (!row)
|
|
37
|
+
return undefined;
|
|
38
|
+
return {
|
|
39
|
+
tree: (0, n8n_workflow_1.jsonParse)(row.tree),
|
|
40
|
+
runId: row.runId,
|
|
41
|
+
messageGroupId: row.messageGroupId ?? undefined,
|
|
42
|
+
runIds: row.runIds ?? undefined,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
async save(threadId, agentTree, runId, messageGroupId, runIds) {
|
|
46
|
+
await this.repo.upsert({
|
|
47
|
+
threadId,
|
|
48
|
+
runId,
|
|
49
|
+
messageGroupId: messageGroupId ?? null,
|
|
50
|
+
runIds: runIds ?? null,
|
|
51
|
+
tree: JSON.stringify(agentTree),
|
|
52
|
+
}, ['threadId', 'runId']);
|
|
53
|
+
}
|
|
54
|
+
async updateLast(threadId, agentTree, runId, messageGroupId, runIds) {
|
|
55
|
+
if (messageGroupId) {
|
|
56
|
+
const existing = await this.repo.findOne({
|
|
57
|
+
where: { threadId, messageGroupId },
|
|
58
|
+
order: { createdAt: 'DESC' },
|
|
59
|
+
});
|
|
60
|
+
if (existing) {
|
|
61
|
+
await this.repo.update({ threadId: existing.threadId, runId: existing.runId }, {
|
|
62
|
+
runId,
|
|
63
|
+
tree: JSON.stringify(agentTree),
|
|
64
|
+
messageGroupId,
|
|
65
|
+
runIds: runIds ?? existing.runIds,
|
|
66
|
+
});
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const byRunId = await this.repo.findOneBy({ threadId, runId });
|
|
71
|
+
if (byRunId) {
|
|
72
|
+
await this.repo.update({ threadId, runId }, {
|
|
73
|
+
tree: JSON.stringify(agentTree),
|
|
74
|
+
messageGroupId: messageGroupId ?? byRunId.messageGroupId,
|
|
75
|
+
runIds: runIds ?? byRunId.runIds,
|
|
76
|
+
});
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
await this.save(threadId, agentTree, runId, messageGroupId, runIds);
|
|
80
|
+
}
|
|
81
|
+
async getAll(threadId) {
|
|
82
|
+
const rows = await this.repo.find({
|
|
83
|
+
where: { threadId },
|
|
84
|
+
order: { createdAt: 'ASC' },
|
|
85
|
+
});
|
|
86
|
+
return rows.map((r) => ({
|
|
87
|
+
tree: (0, n8n_workflow_1.jsonParse)(r.tree),
|
|
88
|
+
runId: r.runId,
|
|
89
|
+
messageGroupId: r.messageGroupId ?? undefined,
|
|
90
|
+
runIds: r.runIds ?? undefined,
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
exports.DbSnapshotStorage = DbSnapshotStorage;
|
|
95
|
+
exports.DbSnapshotStorage = DbSnapshotStorage = __decorate([
|
|
96
|
+
(0, di_1.Service)(),
|
|
97
|
+
__metadata("design:paramtypes", [instance_ai_run_snapshot_repository_1.InstanceAiRunSnapshotRepository])
|
|
98
|
+
], DbSnapshotStorage);
|
|
99
|
+
//# sourceMappingURL=db-snapshot-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db-snapshot-storage.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/db-snapshot-storage.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAElC,+CAAyC;AAEzC,6GAAsG;AAG/F,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC7B,YAA6B,IAAqC;QAArC,SAAI,GAAJ,IAAI,CAAiC;IAAG,CAAC;IAEtE,KAAK,CAAC,SAAS,CACd,QAAgB,EAChB,UAAuD,EAAE;QAEzD,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAE1C,MAAM,GAAG,GAAG,cAAc;YACzB,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;gBACxB,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE;gBACnC,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;aAC5B,CAAC;YACH,CAAC,CAAC,KAAK;gBACN,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;oBACxB,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE;oBAC1B,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;iBAC5B,CAAC;gBACH,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;oBACxB,KAAK,EAAE,EAAE,QAAQ,EAAE;oBACnB,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;iBAC5B,CAAC,CAAC;QAEN,IAAI,CAAC,GAAG;YAAE,OAAO,SAAS,CAAC;QAE3B,OAAO;YACN,IAAI,EAAE,IAAA,wBAAS,EAAsB,GAAG,CAAC,IAAI,CAAC;YAC9C,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,cAAc,EAAE,GAAG,CAAC,cAAc,IAAI,SAAS;YAC/C,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,SAAS;SAC/B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CACT,QAAgB,EAChB,SAA8B,EAC9B,KAAa,EACb,cAAuB,EACvB,MAAiB;QAEjB,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CACrB;YACC,QAAQ;YACR,KAAK;YACL,cAAc,EAAE,cAAc,IAAI,IAAI;YACtC,MAAM,EAAE,MAAM,IAAI,IAAI;YACtB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;SAC/B,EACD,CAAC,UAAU,EAAE,OAAO,CAAC,CACrB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,UAAU,CACf,QAAgB,EAChB,SAA8B,EAC9B,KAAa,EACb,cAAuB,EACvB,MAAiB;QAGjB,IAAI,cAAc,EAAE,CAAC;YACpB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;gBACxC,KAAK,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE;gBACnC,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;aAC5B,CAAC,CAAC;YACH,IAAI,QAAQ,EAAE,CAAC;gBACd,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CACrB,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,EACtD;oBACC,KAAK;oBACL,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;oBAC/B,cAAc;oBACd,MAAM,EAAE,MAAM,IAAI,QAAQ,CAAC,MAAM;iBACjC,CACD,CAAC;gBACF,OAAO;YACR,CAAC;QACF,CAAC;QAGD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/D,IAAI,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CACrB,EAAE,QAAQ,EAAE,KAAK,EAAE,EACnB;gBACC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;gBAC/B,cAAc,EAAE,cAAc,IAAI,OAAO,CAAC,cAAc;gBACxD,MAAM,EAAE,MAAM,IAAI,OAAO,CAAC,MAAM;aAChC,CACD,CAAC;YACF,OAAO;QACR,CAAC;QAGD,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAgB;QAC5B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YACjC,KAAK,EAAE,EAAE,QAAQ,EAAE;YACnB,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;SAC3B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACvB,IAAI,EAAE,IAAA,wBAAS,EAAsB,CAAC,CAAC,IAAI,CAAC;YAC5C,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,cAAc,EAAE,CAAC,CAAC,cAAc,IAAI,SAAS;YAC7C,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,SAAS;SAC7B,CAAC,CAAC,CAAC;IACL,CAAC;CACD,CAAA;AA9GY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,YAAO,GAAE;qCAE0B,qEAA+B;GADtD,iBAAiB,CA8G7B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { TypeORMMemoryStorage } from './typeorm-memory-storage';
|
|
2
|
+
export { TypeORMWorkflowsStorage } from './typeorm-workflows-storage';
|
|
3
|
+
export { TypeORMCompositeStore } from './typeorm-composite-store';
|
|
4
|
+
export { DbSnapshotStorage } from './db-snapshot-storage';
|
|
5
|
+
export { DbIterationLogStorage } from './db-iteration-log-storage';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DbIterationLogStorage = exports.DbSnapshotStorage = exports.TypeORMCompositeStore = exports.TypeORMWorkflowsStorage = exports.TypeORMMemoryStorage = void 0;
|
|
4
|
+
var typeorm_memory_storage_1 = require("./typeorm-memory-storage");
|
|
5
|
+
Object.defineProperty(exports, "TypeORMMemoryStorage", { enumerable: true, get: function () { return typeorm_memory_storage_1.TypeORMMemoryStorage; } });
|
|
6
|
+
var typeorm_workflows_storage_1 = require("./typeorm-workflows-storage");
|
|
7
|
+
Object.defineProperty(exports, "TypeORMWorkflowsStorage", { enumerable: true, get: function () { return typeorm_workflows_storage_1.TypeORMWorkflowsStorage; } });
|
|
8
|
+
var typeorm_composite_store_1 = require("./typeorm-composite-store");
|
|
9
|
+
Object.defineProperty(exports, "TypeORMCompositeStore", { enumerable: true, get: function () { return typeorm_composite_store_1.TypeORMCompositeStore; } });
|
|
10
|
+
var db_snapshot_storage_1 = require("./db-snapshot-storage");
|
|
11
|
+
Object.defineProperty(exports, "DbSnapshotStorage", { enumerable: true, get: function () { return db_snapshot_storage_1.DbSnapshotStorage; } });
|
|
12
|
+
var db_iteration_log_storage_1 = require("./db-iteration-log-storage");
|
|
13
|
+
Object.defineProperty(exports, "DbIterationLogStorage", { enumerable: true, get: function () { return db_iteration_log_storage_1.DbIterationLogStorage; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/index.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,yEAAsE;AAA7D,oIAAA,uBAAuB,OAAA;AAChC,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA;AAC9B,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MastraCompositeStore } from '@mastra/core/storage';
|
|
2
|
+
import type { StorageDomains } from '@mastra/core/storage';
|
|
3
|
+
import { TypeORMMemoryStorage } from './typeorm-memory-storage';
|
|
4
|
+
import { TypeORMWorkflowsStorage } from './typeorm-workflows-storage';
|
|
5
|
+
export declare class TypeORMCompositeStore extends MastraCompositeStore {
|
|
6
|
+
stores: StorageDomains;
|
|
7
|
+
constructor(memoryStorage: TypeORMMemoryStorage, workflowsStorage: TypeORMWorkflowsStorage);
|
|
8
|
+
init(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.TypeORMCompositeStore = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const storage_1 = require("@mastra/core/storage");
|
|
15
|
+
const typeorm_memory_storage_1 = require("./typeorm-memory-storage");
|
|
16
|
+
const typeorm_workflows_storage_1 = require("./typeorm-workflows-storage");
|
|
17
|
+
let TypeORMCompositeStore = class TypeORMCompositeStore extends storage_1.MastraCompositeStore {
|
|
18
|
+
constructor(memoryStorage, workflowsStorage) {
|
|
19
|
+
super({ id: 'n8n-instance-ai-store', disableInit: true });
|
|
20
|
+
this.stores = {
|
|
21
|
+
memory: memoryStorage,
|
|
22
|
+
workflows: workflowsStorage,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
async init() {
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.TypeORMCompositeStore = TypeORMCompositeStore;
|
|
29
|
+
exports.TypeORMCompositeStore = TypeORMCompositeStore = __decorate([
|
|
30
|
+
(0, di_1.Service)(),
|
|
31
|
+
__metadata("design:paramtypes", [typeorm_memory_storage_1.TypeORMMemoryStorage, typeorm_workflows_storage_1.TypeORMWorkflowsStorage])
|
|
32
|
+
], TypeORMCompositeStore);
|
|
33
|
+
//# sourceMappingURL=typeorm-composite-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeorm-composite-store.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/storage/typeorm-composite-store.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,kDAA4D;AAG5D,qEAAgE;AAChE,2EAAsE;AAG/D,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,8BAAoB;IAG9D,YAAY,aAAmC,EAAE,gBAAyC;QACzF,KAAK,CAAC,EAAE,EAAE,EAAE,uBAAuB,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QAG1D,IAAI,CAAC,MAAM,GAAG;YACb,MAAM,EAAE,aAAa;YACrB,SAAS,EAAE,gBAAgB;SACE,CAAC;IAChC,CAAC;IAEQ,KAAK,CAAC,IAAI;IAEnB,CAAC;CACD,CAAA;AAhBY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,YAAO,GAAE;qCAIkB,6CAAoB,EAAoB,mDAAuB;GAH9E,qBAAqB,CAgBjC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
2
|
+
import type { MastraDBMessage, StorageThreadType } from '@mastra/core/memory';
|
|
3
|
+
import type { CreateObservationalMemoryInput, CreateReflectionGenerationInput, ObservationalMemoryRecord, StorageCloneThreadInput, StorageCloneThreadOutput, StorageListMessagesByResourceIdInput, StorageListMessagesInput, StorageListMessagesOutput, StorageListThreadsInput, StorageListThreadsOutput, StorageResourceType, SwapBufferedReflectionToActiveInput, SwapBufferedToActiveInput, SwapBufferedToActiveResult, UpdateBufferedReflectionInput, UpdateBufferedObservationsInput, UpdateActiveObservationsInput } from '@mastra/core/storage';
|
|
4
|
+
import { MemoryStorage } from '@mastra/core/storage';
|
|
5
|
+
import { InstanceAiMessageRepository } from '../repositories/instance-ai-message.repository';
|
|
6
|
+
import { InstanceAiObservationalMemoryRepository } from '../repositories/instance-ai-observational-memory.repository';
|
|
7
|
+
import { InstanceAiResourceRepository } from '../repositories/instance-ai-resource.repository';
|
|
8
|
+
import { InstanceAiThreadRepository } from '../repositories/instance-ai-thread.repository';
|
|
9
|
+
export declare class TypeORMMemoryStorage extends MemoryStorage {
|
|
10
|
+
private readonly threadRepo;
|
|
11
|
+
private readonly messageRepo;
|
|
12
|
+
private readonly resourceRepo;
|
|
13
|
+
private readonly omRepo;
|
|
14
|
+
readonly supportsObservationalMemory = true;
|
|
15
|
+
private static readonly threadMutationQueues;
|
|
16
|
+
constructor(threadRepo: InstanceAiThreadRepository, messageRepo: InstanceAiMessageRepository, resourceRepo: InstanceAiResourceRepository, omRepo: InstanceAiObservationalMemoryRepository);
|
|
17
|
+
dangerouslyClearAll(): Promise<void>;
|
|
18
|
+
getThreadById({ threadId }: {
|
|
19
|
+
threadId: string;
|
|
20
|
+
}): Promise<StorageThreadType | null>;
|
|
21
|
+
listThreads(args: StorageListThreadsInput): Promise<StorageListThreadsOutput>;
|
|
22
|
+
saveThread({ thread, }: {
|
|
23
|
+
thread: StorageThreadType;
|
|
24
|
+
}): Promise<StorageThreadType>;
|
|
25
|
+
updateThread({ id, title, metadata, }: {
|
|
26
|
+
id: string;
|
|
27
|
+
title: string;
|
|
28
|
+
metadata: Record<string, unknown>;
|
|
29
|
+
}): Promise<StorageThreadType>;
|
|
30
|
+
patchThread({ threadId, update, }: {
|
|
31
|
+
threadId: string;
|
|
32
|
+
update: (current: StorageThreadType) => {
|
|
33
|
+
title?: string;
|
|
34
|
+
metadata?: Record<string, unknown>;
|
|
35
|
+
} | null | undefined;
|
|
36
|
+
}): Promise<StorageThreadType | null>;
|
|
37
|
+
deleteThread({ threadId }: {
|
|
38
|
+
threadId: string;
|
|
39
|
+
}): Promise<void>;
|
|
40
|
+
private toStorageThread;
|
|
41
|
+
private serializeThreadMutation;
|
|
42
|
+
listMessages(args: StorageListMessagesInput): Promise<StorageListMessagesOutput>;
|
|
43
|
+
private getIncludedMessages;
|
|
44
|
+
listMessagesByResourceId(args: StorageListMessagesByResourceIdInput): Promise<StorageListMessagesOutput>;
|
|
45
|
+
listMessagesById({ messageIds, }: {
|
|
46
|
+
messageIds: string[];
|
|
47
|
+
}): Promise<{
|
|
48
|
+
messages: MastraDBMessage[];
|
|
49
|
+
}>;
|
|
50
|
+
saveMessages({ messages, }: {
|
|
51
|
+
messages: MastraDBMessage[];
|
|
52
|
+
}): Promise<{
|
|
53
|
+
messages: MastraDBMessage[];
|
|
54
|
+
}>;
|
|
55
|
+
updateMessages({ messages, }: {
|
|
56
|
+
messages: Array<Partial<Omit<MastraDBMessage, 'createdAt'>> & {
|
|
57
|
+
id: string;
|
|
58
|
+
content?: {
|
|
59
|
+
metadata?: MastraMessageContentV2['metadata'];
|
|
60
|
+
content?: MastraMessageContentV2['content'];
|
|
61
|
+
};
|
|
62
|
+
}>;
|
|
63
|
+
}): Promise<MastraDBMessage[]>;
|
|
64
|
+
deleteMessages(messageIds: string[]): Promise<void>;
|
|
65
|
+
getResourceById({ resourceId, }: {
|
|
66
|
+
resourceId: string;
|
|
67
|
+
}): Promise<StorageResourceType | null>;
|
|
68
|
+
saveResource({ resource, }: {
|
|
69
|
+
resource: StorageResourceType;
|
|
70
|
+
}): Promise<StorageResourceType>;
|
|
71
|
+
updateResource({ resourceId, workingMemory, metadata, }: {
|
|
72
|
+
resourceId: string;
|
|
73
|
+
workingMemory?: string;
|
|
74
|
+
metadata?: Record<string, unknown>;
|
|
75
|
+
}): Promise<StorageResourceType>;
|
|
76
|
+
cloneThread(args: StorageCloneThreadInput): Promise<StorageCloneThreadOutput>;
|
|
77
|
+
private omLookupKey;
|
|
78
|
+
private entityToOMRecord;
|
|
79
|
+
getObservationalMemory(threadId: string | null, resourceId: string): Promise<ObservationalMemoryRecord | null>;
|
|
80
|
+
getObservationalMemoryHistory(threadId: string | null, resourceId: string, limit?: number): Promise<ObservationalMemoryRecord[]>;
|
|
81
|
+
initializeObservationalMemory(input: CreateObservationalMemoryInput): Promise<ObservationalMemoryRecord>;
|
|
82
|
+
insertObservationalMemoryRecord(record: ObservationalMemoryRecord): Promise<void>;
|
|
83
|
+
updateActiveObservations(input: UpdateActiveObservationsInput): Promise<void>;
|
|
84
|
+
updateBufferedObservations(input: UpdateBufferedObservationsInput): Promise<void>;
|
|
85
|
+
swapBufferedToActive(input: SwapBufferedToActiveInput): Promise<SwapBufferedToActiveResult>;
|
|
86
|
+
createReflectionGeneration(input: CreateReflectionGenerationInput): Promise<ObservationalMemoryRecord>;
|
|
87
|
+
updateBufferedReflection(input: UpdateBufferedReflectionInput): Promise<void>;
|
|
88
|
+
swapBufferedReflectionToActive(input: SwapBufferedReflectionToActiveInput): Promise<ObservationalMemoryRecord>;
|
|
89
|
+
setReflectingFlag(id: string, isReflecting: boolean): Promise<void>;
|
|
90
|
+
setObservingFlag(id: string, isObserving: boolean): Promise<void>;
|
|
91
|
+
setBufferingObservationFlag(id: string, isBuffering: boolean, lastBufferedAtTokens?: number): Promise<void>;
|
|
92
|
+
setBufferingReflectionFlag(id: string, isBuffering: boolean): Promise<void>;
|
|
93
|
+
clearObservationalMemory(threadId: string | null, resourceId: string): Promise<void>;
|
|
94
|
+
setPendingMessageTokens(id: string, tokenCount: number): Promise<void>;
|
|
95
|
+
private entityToMessage;
|
|
96
|
+
}
|