memento-mcp-server 1.36.0 → 2.0.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/config/ranking-profiles/default.toml +0 -4
- package/config/ranking-profiles/feedback-heavy.toml +0 -4
- package/config/ranking-weights.toml +1 -19
- package/dist/cli/agent-ops-core.js +1 -1
- package/dist/cli/agent-ops-core.js.map +1 -1
- package/dist/cli/agent-ops.js +2 -2
- package/dist/cli/agent-ops.js.map +1 -1
- package/dist/cli/claude-code-hook.js +1 -1
- package/dist/cli/claude-code-hook.js.map +1 -1
- package/dist/cli/codex-hook.js +1 -1
- package/dist/cli/codex-hook.js.map +1 -1
- package/dist/cli/project-connect.d.ts +17 -0
- package/dist/cli/project-connect.d.ts.map +1 -0
- package/dist/cli/project-connect.js +201 -0
- package/dist/cli/project-connect.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -1
- package/dist/node_modules/@memento/agent-integration/package.json +2 -2
- package/dist/node_modules/@memento/core/dist/bootstrap/batch-telemetry-relation.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/bootstrap/batch-telemetry-relation.js +3 -1
- package/dist/node_modules/@memento/core/dist/bootstrap/batch-telemetry-relation.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/bootstrap/write-and-meta.d.ts +1 -5
- package/dist/node_modules/@memento/core/dist/bootstrap/write-and-meta.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/bootstrap/write-and-meta.js +2 -48
- package/dist/node_modules/@memento/core/dist/bootstrap/write-and-meta.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/bootstrap.d.ts +0 -4
- package/dist/node_modules/@memento/core/dist/bootstrap.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/bootstrap.js +2 -18
- package/dist/node_modules/@memento/core/dist/bootstrap.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/config/ranking-profiles/default.toml +0 -4
- package/dist/node_modules/@memento/core/dist/config/ranking-profiles/feedback-heavy.toml +0 -4
- package/dist/node_modules/@memento/core/dist/config/ranking-weights.toml +1 -19
- package/dist/node_modules/@memento/core/dist/context.d.ts +2 -0
- package/dist/node_modules/@memento/core/dist/context.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/context.js +1 -2
- package/dist/node_modules/@memento/core/dist/context.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/database/schema.sql +0 -36
- package/dist/node_modules/@memento/core/dist/domains/consolidation/repositories/consolidation-repository.d.ts +4 -2
- package/dist/node_modules/@memento/core/dist/domains/consolidation/repositories/consolidation-repository.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/consolidation/repositories/consolidation-repository.js +14 -5
- package/dist/node_modules/@memento/core/dist/domains/consolidation/repositories/consolidation-repository.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/cluster-judge.d.ts +28 -0
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/cluster-judge.d.ts.map +1 -0
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/cluster-judge.js +83 -0
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/cluster-judge.js.map +1 -0
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/sleep-consolidation-service.d.ts +21 -4
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/sleep-consolidation-service.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/sleep-consolidation-service.js +125 -43
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/sleep-consolidation-service.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/template-label-normalizer.d.ts +2 -0
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/template-label-normalizer.d.ts.map +1 -0
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/template-label-normalizer.js +10 -0
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/template-label-normalizer.js.map +1 -0
- package/dist/node_modules/@memento/core/dist/domains/embedding/services/vector-compatibility-service.js +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/introspection/meta-memory-service.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/introspection/meta-memory-service.js +1 -5
- package/dist/node_modules/@memento/core/dist/domains/memory/introspection/meta-memory-service.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-definition.d.ts +3 -3
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-definition.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-definition.js +1 -4
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-definition.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-envelope.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-envelope.js +0 -24
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-envelope.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-post-search.d.ts +0 -6
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-post-search.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-post-search.js +0 -85
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-post-search.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-results.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-results.js +0 -5
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-results.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-schema.d.ts +12 -12
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-types.d.ts +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool-types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool.js +2 -9
- package/dist/node_modules/@memento/core/dist/domains/memory/recall/recall-tool.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-near-duplicate.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-near-duplicate.js +1 -3
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-near-duplicate.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-augmentation.d.ts +1 -9
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-augmentation.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-augmentation.js +1 -141
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-augmentation.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-db-helpers.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-db-helpers.js +1 -3
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-db-helpers.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-memory-item.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-memory-item.js +9 -43
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-memory-item.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-schema.d.ts +12 -19
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-schema.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-schema.js +0 -2
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-schema.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-types.d.ts +0 -2
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool-types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool.d.ts +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool.js +8 -17
- package/dist/node_modules/@memento/core/dist/domains/memory/remember/remember-tool.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/services/knowledge-context-bundle-builder.d.ts +0 -4
- package/dist/node_modules/@memento/core/dist/domains/memory/services/knowledge-context-bundle-builder.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/services/knowledge-context-bundle-builder.js +3 -110
- package/dist/node_modules/@memento/core/dist/domains/memory/services/knowledge-context-bundle-builder.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/tools/forget-tool.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/tools/forget-tool.js +0 -21
- package/dist/node_modules/@memento/core/dist/domains/memory/tools/forget-tool.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/tools/memory-injection-prompt.d.ts +2 -0
- package/dist/node_modules/@memento/core/dist/domains/memory/tools/memory-injection-prompt.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/tools/memory-injection-prompt.js +49 -5
- package/dist/node_modules/@memento/core/dist/domains/memory/tools/memory-injection-prompt.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/quality-metrics-collector.d.ts +2 -4
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/quality-metrics-collector.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/quality-metrics-collector.js +0 -9
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/quality-metrics-collector.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/quality-metrics-types.d.ts +1 -14
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/quality-metrics-types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/quality-threshold-manager.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/quality-threshold-manager.js +0 -3
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/quality-threshold-manager.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-baseline.d.ts +2 -18
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-baseline.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-baseline.js +2 -20
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-baseline.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-comparison.d.ts +2 -4
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-comparison.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-comparison.js +1 -2
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-comparison.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-degradation-alerts.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-degradation-alerts.js +0 -11
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-degradation-alerts.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-files.d.ts +0 -40
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-files.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-files.js +0 -278
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-files.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics.d.ts +2 -2
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics.js +1 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/personal-agent/adapters/tool-context-knowledge-context-adapter.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/personal-agent/adapters/tool-context-knowledge-context-adapter.js +0 -2
- package/dist/node_modules/@memento/core/dist/domains/personal-agent/adapters/tool-context-knowledge-context-adapter.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/personal-agent/mappers/knowledge-candidate-to-remember-params.js +1 -1
- package/dist/node_modules/@memento/core/dist/domains/personal-agent/mappers/knowledge-candidate-to-remember-params.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/tools/add-relation-tool.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/tools/add-relation-tool.js +0 -15
- package/dist/node_modules/@memento/core/dist/domains/relation/tools/add-relation-tool.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/hybrid-result-ranker.d.ts +1 -2
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/hybrid-result-ranker.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/hybrid-result-ranker.js +10 -63
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/hybrid-result-ranker.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/hybrid-search-engine.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/hybrid-search-engine.js +1 -27
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/hybrid-search-engine.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/hybrid-search-types.d.ts +0 -11
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/hybrid-search-types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-engine/search-engine-ranking.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-engine/search-engine-ranking.js +0 -11
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-engine/search-engine-ranking.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-engine/search-engine-sql-builder.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-engine/search-engine-sql-builder.js +0 -4
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-engine/search-engine-sql-builder.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-engine/search-engine.types.d.ts +0 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-engine/search-engine.types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking-composite.d.ts +2 -15
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking-composite.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking-composite.js +6 -65
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking-composite.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking-signals.d.ts +0 -9
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking-signals.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking-signals.js +0 -32
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking-signals.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking.types.d.ts +0 -15
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking/search-ranking.types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking.d.ts +2 -8
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking.js +2 -11
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/search-ranking.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/repositories/telemetry-memory-quality-query.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/repositories/telemetry-memory-quality-query.js +1 -41
- package/dist/node_modules/@memento/core/dist/domains/telemetry/repositories/telemetry-memory-quality-query.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/repositories/telemetry-repository.d.ts +0 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/repositories/telemetry-repository.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/repositories/telemetry-repository.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/tools/get-telemetry-summary-tool.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/tools/get-telemetry-summary-tool.js +0 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/tools/get-telemetry-summary-tool.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/index.d.ts +0 -10
- package/dist/node_modules/@memento/core/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/index.js +0 -12
- package/dist/node_modules/@memento/core/dist/index.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/init.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/init.js +0 -2
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/init.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migration-repair-helpers.d.ts +43 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migration-repair-helpers.d.ts.map +1 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migration-repair-helpers.js +255 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migration-repair-helpers.js.map +1 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/048-repair-duplicate-semantic-content.d.ts +3 -4
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/048-repair-duplicate-semantic-content.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/048-repair-duplicate-semantic-content.js +4 -5
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/048-repair-duplicate-semantic-content.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/049-repair-triple-sentence-memories.d.ts +1 -14
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/049-repair-triple-sentence-memories.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/049-repair-triple-sentence-memories.js +34 -19
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/049-repair-triple-sentence-memories.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/050-drop-triple-schema.d.ts +17 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/050-drop-triple-schema.d.ts.map +1 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/050-drop-triple-schema.js +102 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/050-drop-triple-schema.js.map +1 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/051-drop-consolidation-score-columns.d.ts +17 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/051-drop-consolidation-score-columns.d.ts.map +1 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/051-drop-consolidation-score-columns.js +58 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/051-drop-consolidation-score-columns.js.map +1 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/052-drop-event-outbox.d.ts +17 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/052-drop-event-outbox.d.ts.map +1 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/052-drop-event-outbox.js +42 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/migration/migrations/052-drop-event-outbox.js.map +1 -0
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation-paths.d.ts +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation-paths.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation-paths.js +0 -2
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation-paths.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation-policies.d.ts +0 -2
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation-policies.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation-policies.js +0 -3
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation-policies.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation.d.ts +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation.js +0 -47
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/log-rotation.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-job-execution-coordinator.d.ts +2 -2
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-job-execution-coordinator.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-job-execution-coordinator.js +49 -27
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-job-execution-coordinator.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-job-timeout-resolver.d.ts +2 -7
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-job-timeout-resolver.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-job-timeout-resolver.js +2 -12
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-job-timeout-resolver.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-recurring-schedules.d.ts +1 -12
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-recurring-schedules.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-recurring-schedules.js +8 -76
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-recurring-schedules.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-context.d.ts +1 -12
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-context.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-context.js +0 -10
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-context.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-default-config.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-default-config.js +0 -12
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-default-config.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-interval.d.ts +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-interval.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-interval.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-control.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-control.js +1 -10
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-control.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-processor.d.ts +2 -10
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-processor.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-processor.js +0 -4
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-processor.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-runners.d.ts +1 -5
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-runners.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-runners.js +2 -18
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-job-runners.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-service-wiring.d.ts +1 -13
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-service-wiring.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-service-wiring.js +0 -15
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-service-wiring.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-types.d.ts +0 -13
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-types.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-validate-config.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-validate-config.js +0 -33
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler-validate-config.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler.d.ts +5 -9
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler.js +85 -29
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/batch-scheduler/batch-scheduler.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-augmentation-handlers.d.ts +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-augmentation-handlers.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-augmentation-handlers.js +0 -51
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-augmentation-handlers.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-consolidation-relation-handlers.d.ts +0 -3
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-consolidation-relation-handlers.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-consolidation-relation-handlers.js +0 -149
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-consolidation-relation-handlers.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-run-context.d.ts +0 -6
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/handlers/batch-scheduler-run-context.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/job-queue.d.ts +2 -2
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/job-queue.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/job-queue.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/api-tokens.d.ts +2 -7
- package/dist/node_modules/@memento/core/dist/shared/config/api-tokens.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/api-tokens.js +22 -40
- package/dist/node_modules/@memento/core/dist/shared/config/api-tokens.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/constants.d.ts +1 -25
- package/dist/node_modules/@memento/core/dist/shared/config/constants.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/constants.js +1 -15
- package/dist/node_modules/@memento/core/dist/shared/config/constants.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/environment.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/environment.js +1 -2
- package/dist/node_modules/@memento/core/dist/shared/config/environment.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/index.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/index.js +0 -10
- package/dist/node_modules/@memento/core/dist/shared/config/index.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/llm-model-resolver.d.ts +2 -2
- package/dist/node_modules/@memento/core/dist/shared/config/llm-model-resolver.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/llm-model-resolver.js +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/llm-model-resolver.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/ranking-weights-loader.d.ts +0 -6
- package/dist/node_modules/@memento/core/dist/shared/config/ranking-weights-loader.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/config/ranking-weights-loader.js +2 -18
- package/dist/node_modules/@memento/core/dist/shared/config/ranking-weights-loader.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/types/api-token.d.ts +1 -0
- package/dist/node_modules/@memento/core/dist/shared/types/api-token.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/types/memory.types.d.ts +0 -4
- package/dist/node_modules/@memento/core/dist/shared/types/memory.types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/types/relation.types.d.ts +0 -1
- package/dist/node_modules/@memento/core/dist/shared/types/relation.types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/types/search.types.d.ts +0 -1
- package/dist/node_modules/@memento/core/dist/shared/types/search.types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/utils/type-param-validator.d.ts +6 -27
- package/dist/node_modules/@memento/core/dist/shared/utils/type-param-validator.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/shared/utils/type-param-validator.js +11 -71
- package/dist/node_modules/@memento/core/dist/shared/utils/type-param-validator.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/tools/index.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/tools/index.js +0 -2
- package/dist/node_modules/@memento/core/dist/tools/index.js.map +1 -1
- package/dist/node_modules/@memento/core/dist/tools/types.d.ts +3 -8
- package/dist/node_modules/@memento/core/dist/tools/types.d.ts.map +1 -1
- package/dist/node_modules/@memento/core/dist/tools/types.js +0 -1
- package/dist/node_modules/@memento/core/dist/tools/types.js.map +1 -1
- package/dist/node_modules/@memento/core/package.json +1 -1
- package/dist/node_modules/@memento/core/scripts/copy-assets.js +2 -10
- package/dist/server/audit-tool-dispatch.d.ts +8 -0
- package/dist/server/audit-tool-dispatch.d.ts.map +1 -1
- package/dist/server/audit-tool-dispatch.js +26 -2
- package/dist/server/audit-tool-dispatch.js.map +1 -1
- package/dist/server/auth/api-token-registry.d.ts +1 -0
- package/dist/server/auth/api-token-registry.d.ts.map +1 -1
- package/dist/server/auth/api-token-registry.js +5 -1
- package/dist/server/auth/api-token-registry.js.map +1 -1
- package/dist/server/http-server-websocket.d.ts +17 -2
- package/dist/server/http-server-websocket.d.ts.map +1 -1
- package/dist/server/http-server-websocket.js +45 -3
- package/dist/server/http-server-websocket.js.map +1 -1
- package/dist/server/http-server.d.ts.map +1 -1
- package/dist/server/http-server.js +14 -6
- package/dist/server/http-server.js.map +1 -1
- package/dist/server/mcp-server-factory.d.ts +1 -1
- package/dist/server/mcp-server-factory.d.ts.map +1 -1
- package/dist/server/mcp-server-factory.js +1 -1
- package/dist/server/mcp-server-factory.js.map +1 -1
- package/dist/server/middleware/http-audit.middleware.d.ts.map +1 -1
- package/dist/server/middleware/http-audit.middleware.js +2 -0
- package/dist/server/middleware/http-audit.middleware.js.map +1 -1
- package/dist/server/middleware/index.d.ts +1 -1
- package/dist/server/middleware/index.d.ts.map +1 -1
- package/dist/server/middleware/index.js +1 -1
- package/dist/server/middleware/index.js.map +1 -1
- package/dist/server/middleware/programmatic-auth.middleware.d.ts +5 -0
- package/dist/server/middleware/programmatic-auth.middleware.d.ts.map +1 -1
- package/dist/server/middleware/programmatic-auth.middleware.js +35 -2
- package/dist/server/middleware/programmatic-auth.middleware.js.map +1 -1
- package/dist/server/middleware/tool-context.middleware.d.ts.map +1 -1
- package/dist/server/middleware/tool-context.middleware.js +5 -2
- package/dist/server/middleware/tool-context.middleware.js.map +1 -1
- package/dist/server/routes/admin/admin-batch.routes.d.ts.map +1 -1
- package/dist/server/routes/admin/admin-batch.routes.js +18 -11
- package/dist/server/routes/admin/admin-batch.routes.js.map +1 -1
- package/dist/server/routes/admin/admin-memory-search.routes.d.ts +23 -0
- package/dist/server/routes/admin/admin-memory-search.routes.d.ts.map +1 -0
- package/dist/server/routes/admin/admin-memory-search.routes.js +90 -0
- package/dist/server/routes/admin/admin-memory-search.routes.js.map +1 -0
- package/dist/server/routes/admin/admin-tools.routes.d.ts.map +1 -1
- package/dist/server/routes/admin/admin-tools.routes.js +1 -36
- package/dist/server/routes/admin/admin-tools.routes.js.map +1 -1
- package/dist/server/routes/admin.routes.d.ts.map +1 -1
- package/dist/server/routes/admin.routes.js +2 -0
- package/dist/server/routes/admin.routes.js.map +1 -1
- package/dist/server/routes/auth.routes.d.ts.map +1 -1
- package/dist/server/routes/auth.routes.js +9 -1
- package/dist/server/routes/auth.routes.js.map +1 -1
- package/dist/server/routes/mcp/handlers.d.ts.map +1 -1
- package/dist/server/routes/mcp/handlers.js +7 -2
- package/dist/server/routes/mcp/handlers.js.map +1 -1
- package/dist/server/routes/tools.routes.d.ts.map +1 -1
- package/dist/server/routes/tools.routes.js +2 -0
- package/dist/server/routes/tools.routes.js.map +1 -1
- package/dist/server/server-info.js +1 -1
- package/dist/server/server-info.js.map +1 -1
- package/dist/server/utils/project-id-header.d.ts +4 -0
- package/dist/server/utils/project-id-header.d.ts.map +1 -0
- package/dist/server/utils/project-id-header.js +9 -0
- package/dist/server/utils/project-id-header.js.map +1 -0
- package/dist/tools/types.d.ts +0 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/types.js +0 -2
- package/dist/tools/types.js.map +1 -1
- package/package.json +4 -10
- package/static/css/dashboard.css +79 -0
- package/static/dashboard.html +54 -0
- package/static/js/dashboard-auth-render-tabs.js +13 -0
- package/static/js/dashboard-tabs-init.js +11 -0
- package/static/js/dashboard-tabs-panels.js +1 -0
- package/static/js/memory-finder-panel.js +155 -0
- package/static/js/memory-finder-search.js +170 -0
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/consolidation-outbox-worker.d.ts +0 -20
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/consolidation-outbox-worker.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/consolidation-outbox-worker.js +0 -28
- package/dist/node_modules/@memento/core/dist/domains/consolidation/services/consolidation-outbox-worker.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/repositories/kg-triple-repository.interface.d.ts +0 -32
- package/dist/node_modules/@memento/core/dist/domains/memory/repositories/kg-triple-repository.interface.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/repositories/kg-triple-repository.interface.js +0 -5
- package/dist/node_modules/@memento/core/dist/domains/memory/repositories/kg-triple-repository.interface.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/convert-episodic-to-semantic-tool.d.ts +0 -35
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/convert-episodic-to-semantic-tool.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/convert-episodic-to-semantic-tool.js +0 -247
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/convert-episodic-to-semantic-tool.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/duplicate-content-plan.d.ts +0 -29
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/duplicate-content-plan.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/duplicate-content-plan.js +0 -104
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/duplicate-content-plan.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/episodic-semantic-conversion.d.ts +0 -43
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/episodic-semantic-conversion.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/episodic-semantic-conversion.js +0 -233
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/episodic-semantic-conversion.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-crud.d.ts +0 -52
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-crud.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-crud.js +0 -353
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-crud.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-relations.d.ts +0 -19
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-relations.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-relations.js +0 -140
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-relations.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-scoring.d.ts +0 -35
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-scoring.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-scoring.js +0 -104
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-scoring.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-similarity.d.ts +0 -39
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-similarity.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-similarity.js +0 -189
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-similarity.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-statistics.d.ts +0 -64
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-statistics.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-statistics.js +0 -113
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-statistics.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-pipeline.d.ts +0 -38
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-pipeline.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-pipeline.js +0 -404
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-pipeline.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-service.d.ts +0 -38
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-service.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-service.js +0 -117
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-service.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-types.d.ts +0 -91
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-types.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-types.js +0 -16
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/semantic-memory-update-types.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-extraction-metadata.d.ts +0 -24
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-extraction-metadata.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-extraction-metadata.js +0 -47
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-extraction-metadata.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-repair-plan.d.ts +0 -27
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-repair-plan.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-repair-plan.js +0 -47
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-repair-plan.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-sentence.d.ts +0 -25
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-sentence.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-sentence.js +0 -92
- package/dist/node_modules/@memento/core/dist/domains/memory/semantic/triple-sentence.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/consolidation-metrics-collector.d.ts +0 -8
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/consolidation-metrics-collector.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/consolidation-metrics-collector.js +0 -207
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/consolidation-metrics-collector.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-extreme-scenarios.d.ts +0 -218
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-extreme-scenarios.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-extreme-scenarios.js +0 -317
- package/dist/node_modules/@memento/core/dist/domains/monitoring/services/quality-assurance/vector-search-quality-metrics/report-extreme-scenarios.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/entity-linker.d.ts +0 -55
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/entity-linker.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/entity-linker.js +0 -154
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/entity-linker.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/interfaces.d.ts +0 -99
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/interfaces.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/interfaces.js +0 -6
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/interfaces.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/predicate-canonicalizer.d.ts +0 -65
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/predicate-canonicalizer.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/predicate-canonicalizer.js +0 -219
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/predicate-canonicalizer.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-chunk-merge.d.ts +0 -7
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-chunk-merge.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-chunk-merge.js +0 -26
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-chunk-merge.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-errors.d.ts +0 -8
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-errors.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-errors.js +0 -86
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-errors.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-pipeline.d.ts +0 -50
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-pipeline.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-pipeline.js +0 -120
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-pipeline.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-providers.d.ts +0 -20
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-providers.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-providers.js +0 -232
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-llm-providers.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-result-helpers.d.ts +0 -12
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-result-helpers.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-result-helpers.js +0 -93
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-result-helpers.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-service.d.ts +0 -68
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-service.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-service.js +0 -327
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-service.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-statistics.d.ts +0 -74
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-statistics.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-statistics.js +0 -146
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extraction-statistics.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extractor.d.ts +0 -102
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extractor.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extractor.js +0 -443
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-extractor.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-input-normalizer.d.ts +0 -12
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-input-normalizer.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-input-normalizer.js +0 -10
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-input-normalizer.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-normalizer.d.ts +0 -28
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-normalizer.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-normalizer.js +0 -83
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-normalizer.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-parser.d.ts +0 -49
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-parser.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-parser.js +0 -130
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-parser.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-pipeline-orchestrator.d.ts +0 -3
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-pipeline-orchestrator.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-pipeline-orchestrator.js +0 -55
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-pipeline-orchestrator.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-text-chunker.d.ts +0 -9
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-text-chunker.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-text-chunker.js +0 -31
- package/dist/node_modules/@memento/core/dist/domains/relation/services/triple-extraction/triple-text-chunker.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/tools/extract-triples-tool.d.ts +0 -13
- package/dist/node_modules/@memento/core/dist/domains/relation/tools/extract-triples-tool.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/relation/tools/extract-triples-tool.js +0 -153
- package/dist/node_modules/@memento/core/dist/domains/relation/tools/extract-triples-tool.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/relation-recall-candidate-expansion.d.ts +0 -41
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/relation-recall-candidate-expansion.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/relation-recall-candidate-expansion.js +0 -203
- package/dist/node_modules/@memento/core/dist/domains/search/algorithms/relation-recall-candidate-expansion.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/services/event-outbox-service.d.ts +0 -38
- package/dist/node_modules/@memento/core/dist/domains/telemetry/services/event-outbox-service.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/domains/telemetry/services/event-outbox-service.js +0 -81
- package/dist/node_modules/@memento/core/dist/domains/telemetry/services/event-outbox-service.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/consolidation-score-service.d.ts +0 -81
- package/dist/node_modules/@memento/core/dist/infrastructure/consolidation-score-service.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/consolidation-score-service.js +0 -182
- package/dist/node_modules/@memento/core/dist/infrastructure/consolidation-score-service.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/repositories/kg-triple-repository-sqlite.impl.d.ts +0 -16
- package/dist/node_modules/@memento/core/dist/infrastructure/database/repositories/kg-triple-repository-sqlite.impl.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/repositories/kg-triple-repository-sqlite.impl.js +0 -37
- package/dist/node_modules/@memento/core/dist/infrastructure/database/repositories/kg-triple-repository-sqlite.impl.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/ensure-memory-item-triple-extraction-columns.d.ts +0 -7
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/ensure-memory-item-triple-extraction-columns.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/ensure-memory-item-triple-extraction-columns.js +0 -37
- package/dist/node_modules/@memento/core/dist/infrastructure/database/sqlite/ensure-memory-item-triple-extraction-columns.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/triple-extraction-logger.d.ts +0 -98
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/triple-extraction-logger.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/triple-extraction-logger.js +0 -236
- package/dist/node_modules/@memento/core/dist/infrastructure/logging/triple-extraction-logger.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-chunk.d.ts +0 -5
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-chunk.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-chunk.js +0 -11
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-chunk.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-memory-status.d.ts +0 -6
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-memory-status.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-memory-status.js +0 -6
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-memory-status.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-retry.d.ts +0 -31
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-retry.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-retry.js +0 -210
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job-retry.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job.types.d.ts +0 -82
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job.types.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job.types.js +0 -6
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job/triple-extraction-batch-job.types.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job.d.ts +0 -30
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job.js +0 -175
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/jobs/triple-extraction-batch-job.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/relation-validator-executor.d.ts +0 -40
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/relation-validator-executor.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/relation-validator-executor.js +0 -159
- package/dist/node_modules/@memento/core/dist/infrastructure/scheduler/relation-validator-executor.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/prompts/triple-extraction.txt +0 -81
- package/dist/node_modules/@memento/core/dist/shared/interfaces/consolidation-score.interface.d.ts +0 -11
- package/dist/node_modules/@memento/core/dist/shared/interfaces/consolidation-score.interface.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/interfaces/consolidation-score.interface.js +0 -6
- package/dist/node_modules/@memento/core/dist/shared/interfaces/consolidation-score.interface.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/types/consolidation-score.types.d.ts +0 -67
- package/dist/node_modules/@memento/core/dist/shared/types/consolidation-score.types.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/types/consolidation-score.types.js +0 -5
- package/dist/node_modules/@memento/core/dist/shared/types/consolidation-score.types.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/types/triple-extraction.d.ts +0 -133
- package/dist/node_modules/@memento/core/dist/shared/types/triple-extraction.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/types/triple-extraction.js +0 -6
- package/dist/node_modules/@memento/core/dist/shared/types/triple-extraction.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/utils/prompt-template-loader.d.ts +0 -48
- package/dist/node_modules/@memento/core/dist/shared/utils/prompt-template-loader.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/utils/prompt-template-loader.js +0 -104
- package/dist/node_modules/@memento/core/dist/shared/utils/prompt-template-loader.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/utils/triple-cache.d.ts +0 -90
- package/dist/node_modules/@memento/core/dist/shared/utils/triple-cache.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/utils/triple-cache.js +0 -124
- package/dist/node_modules/@memento/core/dist/shared/utils/triple-cache.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/utils/write-coalescing.d.ts +0 -77
- package/dist/node_modules/@memento/core/dist/shared/utils/write-coalescing.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/shared/utils/write-coalescing.js +0 -189
- package/dist/node_modules/@memento/core/dist/shared/utils/write-coalescing.js.map +0 -1
- package/dist/node_modules/@memento/core/dist/workers/consolidation-score-worker.d.ts +0 -99
- package/dist/node_modules/@memento/core/dist/workers/consolidation-score-worker.d.ts.map +0 -1
- package/dist/node_modules/@memento/core/dist/workers/consolidation-score-worker.js +0 -405
- package/dist/node_modules/@memento/core/dist/workers/consolidation-score-worker.js.map +0 -1
- package/dist/node_modules/@memento/core/prompts/triple-extraction.txt +0 -81
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import Database from 'better-sqlite3';
|
|
2
|
-
import { WriteCoalescingManager } from '../shared/utils/write-coalescing.js';
|
|
3
|
-
import { ConsolidationScoreService } from '../infrastructure/consolidation-score-service.js';
|
|
4
2
|
import { MetaMemoryService } from '../domains/memory/introspection/meta-memory-service.js';
|
|
5
|
-
export declare function
|
|
6
|
-
writeCoalescingManager: WriteCoalescingManager;
|
|
7
|
-
consolidationScoreService: ConsolidationScoreService | undefined;
|
|
3
|
+
export declare function createMetaMemoryService(db: Database.Database): {
|
|
8
4
|
metaMemoryService: MetaMemoryService;
|
|
9
5
|
};
|
|
10
6
|
//# sourceMappingURL=write-and-meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-and-meta.d.ts","sourceRoot":"","sources":["../../src/bootstrap/write-and-meta.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"write-and-meta.d.ts","sourceRoot":"","sources":["../../src/bootstrap/write-and-meta.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAE3F,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG;IAC9D,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,CAIA"}
|
|
@@ -1,55 +1,9 @@
|
|
|
1
1
|
import Database from 'better-sqlite3';
|
|
2
|
-
import { mementoConfig } from '../shared/config/index.js';
|
|
3
|
-
import { WriteCoalescingManager } from '../shared/utils/write-coalescing.js';
|
|
4
|
-
import { DatabaseUtils } from '../shared/utils/database.js';
|
|
5
2
|
import { logger } from '../shared/utils/logger.js';
|
|
6
|
-
import { ConsolidationScoreService } from '../infrastructure/consolidation-score-service.js';
|
|
7
3
|
import { MetaMemoryService } from '../domains/memory/introspection/meta-memory-service.js';
|
|
8
|
-
export function
|
|
9
|
-
let consolidationScoreService;
|
|
10
|
-
const writeCoalescingManager = new WriteCoalescingManager(1000, async (writes) => {
|
|
11
|
-
if (!db || writes.length === 0)
|
|
12
|
-
return;
|
|
13
|
-
const currentDb = db;
|
|
14
|
-
try {
|
|
15
|
-
await DatabaseUtils.runTransaction(currentDb, async () => {
|
|
16
|
-
for (const write of writes) {
|
|
17
|
-
const updates = [];
|
|
18
|
-
const params = [];
|
|
19
|
-
if (write.fields.recall_count !== undefined) {
|
|
20
|
-
updates.push('recall_count = ?');
|
|
21
|
-
params.push(write.fields.recall_count);
|
|
22
|
-
}
|
|
23
|
-
if (write.fields.last_accessed_at !== undefined) {
|
|
24
|
-
updates.push('last_accessed_at = ?');
|
|
25
|
-
params.push(write.fields.last_accessed_at);
|
|
26
|
-
}
|
|
27
|
-
if (mementoConfig.consolidationScoreEnabled) {
|
|
28
|
-
if (write.fields.g_value !== undefined) {
|
|
29
|
-
updates.push('g_value = ?');
|
|
30
|
-
params.push(write.fields.g_value);
|
|
31
|
-
}
|
|
32
|
-
if (write.fields.consolidation_score !== undefined) {
|
|
33
|
-
updates.push('consolidation_score = ?');
|
|
34
|
-
params.push(write.fields.consolidation_score);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (updates.length > 0) {
|
|
38
|
-
params.push(write.memoryId);
|
|
39
|
-
DatabaseUtils.run(currentDb, `UPDATE memory_item SET ${updates.join(', ')} WHERE id = ?`, params);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
logger.error(`⚠️ Write coalescing flush 실패: ${error instanceof Error ? error.message : String(error)}`);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
if (mementoConfig.consolidationScoreEnabled) {
|
|
49
|
-
consolidationScoreService = new ConsolidationScoreService();
|
|
50
|
-
}
|
|
4
|
+
export function createMetaMemoryService(db) {
|
|
51
5
|
const metaMemoryService = new MetaMemoryService(db);
|
|
52
6
|
logger.info('MetaMemoryService 초기화 완료');
|
|
53
|
-
return {
|
|
7
|
+
return { metaMemoryService };
|
|
54
8
|
}
|
|
55
9
|
//# sourceMappingURL=write-and-meta.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-and-meta.js","sourceRoot":"","sources":["../../src/bootstrap/write-and-meta.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"write-and-meta.js","sourceRoot":"","sources":["../../src/bootstrap/write-and-meta.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAE3F,MAAM,UAAU,uBAAuB,CAAC,EAAqB;IAG3D,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,EAAE,CAAC,CAAC;IACpD,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IACxC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -10,11 +10,9 @@ import { MemoryEmbeddingService } from './domains/memory/services/memory-embeddi
|
|
|
10
10
|
import { ForgettingPolicyService } from './domains/forgetting/services/forgetting-policy-service.js';
|
|
11
11
|
import { getPerformanceMonitor } from './domains/monitoring/services/performance-monitor.js';
|
|
12
12
|
import { ErrorLoggingService } from './domains/monitoring/services/error-logging-service.js';
|
|
13
|
-
import type { WriteCoalescingManager } from './shared/utils/write-coalescing.js';
|
|
14
13
|
import type { AnchorManager } from './domains/anchor/services/anchor/anchor-manager.js';
|
|
15
14
|
import type { FailureDetector } from './domains/monitoring/services/failure-detector.js';
|
|
16
15
|
import type { IBatchScheduler } from './shared/interfaces/batch-scheduler.interface.js';
|
|
17
|
-
import type { IConsolidationScoreService } from './shared/interfaces/consolidation-score.interface.js';
|
|
18
16
|
import type { IDatabaseOptimizer } from './shared/interfaces/database-optimizer.interface.js';
|
|
19
17
|
import type { IReflexionWorker } from './shared/interfaces/reflexion-worker.interface.js';
|
|
20
18
|
import { getVectorSearchEngine } from './domains/search/algorithms/vector-search-engine.js';
|
|
@@ -34,8 +32,6 @@ export interface ServerServices {
|
|
|
34
32
|
performanceMonitor: ReturnType<typeof getPerformanceMonitor>;
|
|
35
33
|
databaseOptimizer: IDatabaseOptimizer;
|
|
36
34
|
errorLoggingService: ErrorLoggingService;
|
|
37
|
-
consolidationScoreService?: IConsolidationScoreService;
|
|
38
|
-
writeCoalescingManager: WriteCoalescingManager;
|
|
39
35
|
metaMemoryService: MetaMemoryService;
|
|
40
36
|
anchorManager: AnchorManager;
|
|
41
37
|
relationGraph: RelationGraphPort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAEtC,OAAO,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,CAAC,IAAI,CAAC,CAAC;CACxD;AAED,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CA0EvF;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCjG"}
|
|
@@ -12,7 +12,7 @@ import { ForgettingPolicyService } from './domains/forgetting/services/forgettin
|
|
|
12
12
|
import { getPerformanceMonitor } from './domains/monitoring/services/performance-monitor.js';
|
|
13
13
|
import { ErrorLoggingService } from './domains/monitoring/services/error-logging-service.js';
|
|
14
14
|
import { createAnchorStack } from './bootstrap/anchor-stack.js';
|
|
15
|
-
import {
|
|
15
|
+
import { createMetaMemoryService } from './bootstrap/write-and-meta.js';
|
|
16
16
|
import { createMonitoringAndSchedulers } from './bootstrap/monitoring-schedulers.js';
|
|
17
17
|
import { createBatchTelemetryRelationAndSleep } from './bootstrap/batch-telemetry-relation.js';
|
|
18
18
|
import { createRuntimeDiagnosticsSampler } from './bootstrap/runtime-diagnostics-sampler.js';
|
|
@@ -33,7 +33,7 @@ export async function initializeServices(db) {
|
|
|
33
33
|
const { vectorSearchEngine, anchorManager, anchorSearchService } = await createAnchorStack(db, embeddingService, hybridSearchEngine, errorLoggingService);
|
|
34
34
|
const { failureDetector, reflexionWorker } = await startFailureAndReflexion(db);
|
|
35
35
|
const { performanceMonitor, runtimeDiagnosticsLogger, walCheckpointScheduler, databaseLockMonitor } = await createMonitoringAndSchedulers(db);
|
|
36
|
-
const {
|
|
36
|
+
const { metaMemoryService } = createMetaMemoryService(db);
|
|
37
37
|
const { introspectionScanCache, batchScheduler, telemetryService, relationGraph, sleepConsolidationService } = await createBatchTelemetryRelationAndSleep(db, embeddingService, runtimeDiagnosticsLogger, reflexionWorker, anchorManager, mementoConfig.walCheckpointEnabled ? walCheckpointScheduler : undefined, mementoConfig.dbLockMonitorEnabled ? databaseLockMonitor : undefined);
|
|
38
38
|
anchorSearchService.setRelationGraph(relationGraph);
|
|
39
39
|
hybridSearchEngine.setRelationGraph(relationGraph);
|
|
@@ -51,8 +51,6 @@ export async function initializeServices(db) {
|
|
|
51
51
|
performanceMonitor,
|
|
52
52
|
databaseOptimizer,
|
|
53
53
|
errorLoggingService,
|
|
54
|
-
consolidationScoreService,
|
|
55
|
-
writeCoalescingManager,
|
|
56
54
|
metaMemoryService,
|
|
57
55
|
anchorManager,
|
|
58
56
|
relationGraph,
|
|
@@ -116,20 +114,6 @@ export async function shutdownServices(services) {
|
|
|
116
114
|
catch (error) {
|
|
117
115
|
logger.warn('데이터베이스 락 모니터 중지 실패', { error });
|
|
118
116
|
}
|
|
119
|
-
if (services.writeCoalescingManager) {
|
|
120
|
-
try {
|
|
121
|
-
await services.writeCoalescingManager.flush();
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
logger.warn('Write Coalescing Manager flush 실패', { error });
|
|
125
|
-
}
|
|
126
|
-
try {
|
|
127
|
-
await services.writeCoalescingManager.destroy();
|
|
128
|
-
}
|
|
129
|
-
catch (error) {
|
|
130
|
-
logger.warn('Write Coalescing Manager destroy 실패', { error });
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
117
|
try {
|
|
134
118
|
resetBatchScheduler();
|
|
135
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AACzF,OAAO,EAAE,yCAAyC,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAC/F,OAAO,EAA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C,uBAAuB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,CAAC,sBAAsB,EAAE,IAAI,EAAE,CAAC;IAChD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,CAAC;QACH,QAAQ,CAAC,mBAAmB,EAAE,IAAI,EAAE,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,CAAC;QACH,mBAAmB,EAAE,CAAC;IACxB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 검색 랭킹 가중치 설정
|
|
2
2
|
# 관계 추론 엔진의 검색 랭킹 공식에 사용되는 가중치 값들
|
|
3
3
|
#
|
|
4
|
-
# 랭킹 공식(요약): S = α·relevance + β·recency + γ·importance + δ·usage
|
|
4
|
+
# 랭킹 공식(요약): S = α·relevance + β·recency + γ·importance + δ·usage
|
|
5
5
|
# + ζ_fb·(feedback_norm − 0.5) + θ·process_attribute_fit − ε·duplication_penalty
|
|
6
6
|
# (relevance 슬롯에 절차 부스트 등이 합산되는 경우는 구현·스펙 FR-008 참고)
|
|
7
7
|
|
|
@@ -18,11 +18,6 @@ gamma = 0.20
|
|
|
18
18
|
# usage: 사용 빈도 점수 (access_count 기반)
|
|
19
19
|
delta = 0.10
|
|
20
20
|
|
|
21
|
-
# relation_weight: 관계 가중치 (관계 그래프 기반)
|
|
22
|
-
# 기본 0 (#1185). 관계 수는 질의와 무관한 문서 출처 prior 라, 링크가 없는 클리핑 정답을 관계 많은 비정답 아래로 눌렀다.
|
|
23
|
-
# 운영 실측(고성 왕곡마을 클리핑/semantic top-20): 0.15 에서 비정답(관계 12개)이 4위, 0 에서 정답 4건이 1~4위.
|
|
24
|
-
zeta = 0.0
|
|
25
|
-
|
|
26
21
|
# duplication_penalty: 중복 패널티 (중복 기억에 대한 감점)
|
|
27
22
|
epsilon = 0.10
|
|
28
23
|
|
|
@@ -32,19 +27,6 @@ theta = 0.10
|
|
|
32
27
|
# zeta_fb: 피드백 신호(helpful/not_helpful 집계, 시그모이드 정규화 후) 가중치
|
|
33
28
|
zeta_fb = 0.05
|
|
34
29
|
|
|
35
|
-
# consolidation: α 슬롯 안에서 relevance 와 섞는 consolidation_score 가중치 (#1184).
|
|
36
|
-
# relevance_score = (1 - consolidation) * relevance + consolidation * consolidation_score
|
|
37
|
-
# consolidation_score 는 recall·memory_injection 이 반환한 후보마다 다시 쓰므로,
|
|
38
|
-
# 0 이 아니면 한 번 반환된 기억이 다음 질의에서 관련성 가산을 받는다(자기강화).
|
|
39
|
-
# 운영 실측: 1회 호출 뒤 top-10 전원 0.28 → 0.6225, relevance 슬롯 +0.025~0.049.
|
|
40
|
-
# 상한 0.4 (SEARCH_RANKING.CONSOLIDATION_SCORE_MAX). #1184 이전 코드 상수는 0.2 였다.
|
|
41
|
-
consolidation = 0.0
|
|
42
|
-
|
|
43
|
-
[relation_weights]
|
|
44
|
-
# 관계 가중치 = 평균(confidence × type_boost) × min(n, max_relations) / max_relations (#1185)
|
|
45
|
-
# 관계 수에 단조 증가하고 max_relations 이상에서 평균에 포화합니다.
|
|
46
|
-
max_relations = 5
|
|
47
|
-
|
|
48
30
|
# #921: soft length decay on hybrid vector similarity — factor = len/(len+k)
|
|
49
31
|
# Applied before HYBRID_VECTOR_THRESHOLD / under-fill / fusion. No create-time gate.
|
|
50
32
|
[vector_length_decay]
|
|
@@ -10,6 +10,8 @@ export interface ServerContext {
|
|
|
10
10
|
services: ServerServices;
|
|
11
11
|
/** HTTP/MCP 요청별 에이전트 식별자 (미설정 시 ToolContext.agentId 생략) */
|
|
12
12
|
agentId?: string;
|
|
13
|
+
/** HTTP/MCP 요청별 프로젝트 식별자 (미설정 시 ToolContext.projectId 생략) */
|
|
14
|
+
projectId?: string;
|
|
13
15
|
}
|
|
14
16
|
export declare function createServerContext(db: Database.Database, services: ServerServices): ServerContext;
|
|
15
17
|
export declare function createToolContext(serverContext: ServerContext): ToolContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACtB,QAAQ,EAAE,cAAc,CAAC;IACzB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACtB,QAAQ,EAAE,cAAc,CAAC;IACzB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CACjC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,QAAQ,EAAE,cAAc,GACvB,aAAa,CAEf;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,aAAa,GAAG,WAAW,CAAC;AAC7E,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,GAAG,WAAW,CAAC"}
|
|
@@ -18,6 +18,7 @@ function createToolContextFromServerContext(serverContext) {
|
|
|
18
18
|
return {
|
|
19
19
|
db: serverContext.db,
|
|
20
20
|
...(serverContext.agentId ? { agentId: serverContext.agentId } : {}),
|
|
21
|
+
...(serverContext.projectId ? { projectId: serverContext.projectId } : {}),
|
|
21
22
|
services: {
|
|
22
23
|
searchEngine: serverContext.services.searchEngine,
|
|
23
24
|
hybridSearchEngine: serverContext.services.hybridSearchEngine,
|
|
@@ -27,8 +28,6 @@ function createToolContextFromServerContext(serverContext) {
|
|
|
27
28
|
performanceMonitor: serverContext.services.performanceMonitor,
|
|
28
29
|
databaseOptimizer: serverContext.services.databaseOptimizer,
|
|
29
30
|
errorLoggingService: serverContext.services.errorLoggingService,
|
|
30
|
-
consolidationScoreService: serverContext.services.consolidationScoreService,
|
|
31
|
-
writeCoalescingManager: serverContext.services.writeCoalescingManager,
|
|
32
31
|
anchorManager: serverContext.services.anchorManager,
|
|
33
32
|
relationGraph: serverContext.services.relationGraph,
|
|
34
33
|
failureDetector: serverContext.services.failureDetector,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":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AQ,CAAC,iBAAiB;YAC3D,mBAAmB,EAAE,aAAa,CAAC,QAAQ,CAAC,mBAAmB;YAC/D,aAAa,EAAE,aAAa,CAAC,QAAQ,CAAC,aAAa;YACnD,aAAa,EAAE,aAAa,CAAC,QAAQ,CAAC,aAAa;YACnD,eAAe,EAAE,aAAa,CAAC,QAAQ,CAAC,eAAe;YACvD,eAAe,EAAE,aAAa,CAAC,QAAQ,CAAC,eAAe;YACvD,iBAAiB,EAAE,aAAa,CAAC,QAAQ,CAAC,iBAAiB;YAC3D,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,cAAc;YACrD,sBAAsB,EAAE,aAAa,CAAC,QAAQ,CAAC,sBAAsB;YACrE,gBAAgB,EAAE,aAAa,CAAC,QAAQ,CAAC,gBAAgB;SAC1D;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -42,35 +42,18 @@ CREATE TABLE IF NOT EXISTS memory_item (
|
|
|
42
42
|
-- Consolidation score (migration 003)
|
|
43
43
|
recall_count INTEGER NOT NULL DEFAULT 0,
|
|
44
44
|
last_accessed_at TIMESTAMP,
|
|
45
|
-
consolidation_score REAL,
|
|
46
|
-
g_value REAL,
|
|
47
|
-
-- Arigraph/Semantic triple (migration 008): semantic memory structural storage
|
|
48
|
-
subject TEXT,
|
|
49
|
-
predicate TEXT,
|
|
50
|
-
object TEXT,
|
|
51
45
|
is_consolidated BOOLEAN DEFAULT FALSE,
|
|
52
|
-
triple_extracted BOOLEAN DEFAULT FALSE NOT NULL,
|
|
53
|
-
triple_extracted_status TEXT,
|
|
54
|
-
triple_extraction_metadata TEXT,
|
|
55
46
|
is_deleted BOOLEAN DEFAULT FALSE NOT NULL,
|
|
56
47
|
deleted_at TEXT,
|
|
57
48
|
-- Project-scoped memory (Issue #81, migration 032)
|
|
58
49
|
project_id TEXT
|
|
59
50
|
);
|
|
60
|
-
CREATE INDEX IF NOT EXISTS idx_memory_item_triple_extracted_episodic
|
|
61
|
-
ON memory_item(triple_extracted)
|
|
62
|
-
WHERE type = 'episodic';
|
|
63
|
-
CREATE INDEX IF NOT EXISTS idx_memory_item_triple_extracted_status_episodic
|
|
64
|
-
ON memory_item(triple_extracted_status)
|
|
65
|
-
WHERE type = 'episodic';
|
|
66
51
|
CREATE INDEX IF NOT EXISTS idx_memory_item_is_deleted_active
|
|
67
52
|
ON memory_item(is_deleted)
|
|
68
53
|
WHERE COALESCE(is_deleted, 0) = 0;
|
|
69
54
|
CREATE INDEX IF NOT EXISTS idx_memory_item_project_id_type
|
|
70
55
|
ON memory_item(project_id, type)
|
|
71
56
|
WHERE project_id IS NOT NULL;
|
|
72
|
-
CREATE INDEX IF NOT EXISTS idx_memory_item_triple ON memory_item(subject, predicate, object)
|
|
73
|
-
WHERE type='semantic' AND subject IS NOT NULL AND predicate IS NOT NULL AND object IS NOT NULL;
|
|
74
57
|
|
|
75
58
|
-- 태그 테이블
|
|
76
59
|
CREATE TABLE IF NOT EXISTS memory_tag (
|
|
@@ -156,25 +139,6 @@ VALUES ('CAUSES', 'Causal', '인과 관계', '["episodic", "semantic"]', 0.7, 1.
|
|
|
156
139
|
('extracted_from', 'Structural', 'Semantic→Episodic 출처(에피소딕에서 시맨틱 추출)', '["semantic", "episodic"]', 0.7, 1.0),
|
|
157
140
|
('supported_by', 'Structural', 'Episodic→Semantic 지지(시맨틱이 에피소딕을 지지)', '["episodic", "semantic"]', 0.7, 1.0);
|
|
158
141
|
|
|
159
|
-
-- kg_triple (migration 018 호환, Issue #90)
|
|
160
|
-
CREATE TABLE IF NOT EXISTS kg_triple (
|
|
161
|
-
id TEXT PRIMARY KEY,
|
|
162
|
-
subject TEXT NOT NULL,
|
|
163
|
-
predicate TEXT NOT NULL,
|
|
164
|
-
object TEXT NOT NULL,
|
|
165
|
-
owner_id TEXT NULL,
|
|
166
|
-
process_id TEXT NULL,
|
|
167
|
-
session_id TEXT NULL,
|
|
168
|
-
representative_memory_id TEXT NULL,
|
|
169
|
-
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
170
|
-
FOREIGN KEY (representative_memory_id) REFERENCES memory_item(id) ON DELETE SET NULL,
|
|
171
|
-
UNIQUE(subject, predicate, object)
|
|
172
|
-
);
|
|
173
|
-
CREATE INDEX IF NOT EXISTS idx_kg_triple_spo ON kg_triple(subject, predicate, object);
|
|
174
|
-
CREATE INDEX IF NOT EXISTS idx_kg_triple_representative ON kg_triple(representative_memory_id);
|
|
175
|
-
CREATE INDEX IF NOT EXISTS idx_kg_triple_owner ON kg_triple(owner_id);
|
|
176
|
-
CREATE INDEX IF NOT EXISTS idx_kg_triple_process ON kg_triple(process_id);
|
|
177
|
-
|
|
178
142
|
-- 피드백 이벤트 테이블
|
|
179
143
|
CREATE TABLE IF NOT EXISTS feedback_event (
|
|
180
144
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -44,6 +44,8 @@ export declare class ConsolidationRepository {
|
|
|
44
44
|
* 모든 후보는 저장 시점에 이미 임베딩되어 있으므로, 호출부에서 후보마다 임베딩을
|
|
45
45
|
* 다시 만들 이유가 없다. 다시 만들면 클러스터 하나당 시맨틱 기억 수만큼 모델 추론이
|
|
46
46
|
* 돌아 CPU 를 태운다 (#917: 3,902건 × 13ms).
|
|
47
|
+
*
|
|
48
|
+
* Only semantics produced by sleep consolidation are merge targets; triple-extraction semantics must not be overwritten (#1231).
|
|
47
49
|
*/
|
|
48
50
|
findSemanticsByOwner(ownerId: string | null, embeddingFilter: StoredEmbeddingFilter): SemanticOwnerRow[];
|
|
49
51
|
updateSemanticMemory(params: {
|
|
@@ -52,9 +54,9 @@ export declare class ConsolidationRepository {
|
|
|
52
54
|
originSourceJson: string;
|
|
53
55
|
}): void;
|
|
54
56
|
/**
|
|
55
|
-
* memory_id →
|
|
57
|
+
* memory_id → parsed whole-document (projection_type='native') vector; optionally restricted to one provider (#1226).
|
|
56
58
|
*/
|
|
57
|
-
loadEmbeddingsMap(memoryIds: string[]): Map<string, number[]>;
|
|
59
|
+
loadEmbeddingsMap(memoryIds: string[], filter?: StoredEmbeddingFilter): Map<string, number[]>;
|
|
58
60
|
insertSemanticMemory(params: {
|
|
59
61
|
id: string;
|
|
60
62
|
content: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidation-repository.d.ts","sourceRoot":"","sources":["../../../../src/domains/consolidation/repositories/consolidation-repository.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAI3C,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAElD,eAAe,IAAI,MAAM;IAMzB;;OAEG;IACH,sBAAsB,CACpB,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACxC,YAAY,CAAC,EAAE,MAAM,GACpB,oBAAoB,EAAE;IA4CzB
|
|
1
|
+
{"version":3,"file":"consolidation-repository.d.ts","sourceRoot":"","sources":["../../../../src/domains/consolidation/repositories/consolidation-repository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,MAAM,EAAE,EAAE,MAAM,GAAE,qBAA0B,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAmCjG,oBAAoB,CAAC,MAAM,EAAE;QAC3B,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,gBAAgB,EAAE,MAAM,CAAC;QACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GAAG,IAAI;IAmBR,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,aAAa,SAAM,GAAG,IAAI;CAiB1E"}
|
|
@@ -53,9 +53,11 @@ export class ConsolidationRepository {
|
|
|
53
53
|
* 모든 후보는 저장 시점에 이미 임베딩되어 있으므로, 호출부에서 후보마다 임베딩을
|
|
54
54
|
* 다시 만들 이유가 없다. 다시 만들면 클러스터 하나당 시맨틱 기억 수만큼 모델 추론이
|
|
55
55
|
* 돌아 CPU 를 태운다 (#917: 3,902건 × 13ms).
|
|
56
|
+
*
|
|
57
|
+
* Only semantics produced by sleep consolidation are merge targets; triple-extraction semantics must not be overwritten (#1231).
|
|
56
58
|
*/
|
|
57
59
|
findSemanticsByOwner(ownerId, embeddingFilter) {
|
|
58
|
-
const joinConditions = ["me.memory_id = mi.id", "COALESCE(me.model, '') = COALESCE(?, '')"];
|
|
60
|
+
const joinConditions = ["me.memory_id = mi.id", "me.projection_type = 'native'", "COALESCE(me.model, '') = COALESCE(?, '')"];
|
|
59
61
|
const joinParams = [embeddingFilter.model ?? null];
|
|
60
62
|
if (embeddingFilter.provider) {
|
|
61
63
|
joinConditions.push('me.embedding_provider = ?');
|
|
@@ -73,6 +75,7 @@ export class ConsolidationRepository {
|
|
|
73
75
|
WHERE mi.type = 'semantic'
|
|
74
76
|
AND (mi.is_deleted IS NULL OR mi.is_deleted = 0)
|
|
75
77
|
AND COALESCE(mi.owner_id, '') = COALESCE(?, '')
|
|
78
|
+
AND mi.origin_source LIKE '%"tool":"sleep-consolidation"%'
|
|
76
79
|
ORDER BY mi.created_at ASC
|
|
77
80
|
`, [...joinParams, ownerId ?? null]);
|
|
78
81
|
// UNIQUE 는 (memory_id, embedding_provider, projection_type) 이라 provider 를 고정해도
|
|
@@ -106,20 +109,26 @@ export class ConsolidationRepository {
|
|
|
106
109
|
`, [params.content, params.originSourceJson, params.id]);
|
|
107
110
|
}
|
|
108
111
|
/**
|
|
109
|
-
* memory_id →
|
|
112
|
+
* memory_id → parsed whole-document (projection_type='native') vector; optionally restricted to one provider (#1226).
|
|
110
113
|
*/
|
|
111
|
-
loadEmbeddingsMap(memoryIds) {
|
|
114
|
+
loadEmbeddingsMap(memoryIds, filter = {}) {
|
|
112
115
|
const out = new Map();
|
|
113
116
|
if (memoryIds.length === 0) {
|
|
114
117
|
return out;
|
|
115
118
|
}
|
|
116
119
|
const placeholders = memoryIds.map(() => '?').join(',');
|
|
120
|
+
const whereParts = [`memory_id IN (${placeholders})`, "projection_type = 'native'"];
|
|
121
|
+
const params = [...memoryIds];
|
|
122
|
+
if (filter.provider) {
|
|
123
|
+
whereParts.push('embedding_provider = ?');
|
|
124
|
+
params.push(filter.provider);
|
|
125
|
+
}
|
|
117
126
|
const rows = DatabaseUtils.all(this.db, `
|
|
118
127
|
SELECT memory_id, embedding
|
|
119
128
|
FROM memory_embedding
|
|
120
|
-
WHERE
|
|
129
|
+
WHERE ${whereParts.join(' AND ')}
|
|
121
130
|
ORDER BY memory_id, created_at DESC
|
|
122
|
-
`,
|
|
131
|
+
`, params);
|
|
123
132
|
for (const row of rows) {
|
|
124
133
|
if (out.has(row.memory_id)) {
|
|
125
134
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidation-repository.js","sourceRoot":"","sources":["../../../../src/domains/consolidation/repositories/consolidation-repository.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,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AC;YACvB,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC3B,SAAS;YACX,CAAC;YACD,MAAM,GAAG,GAAG,wBAAwB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YACpD,IAAI,GAAG,EAAE,CAAC;gBACR,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,oBAAoB,CAAC,MAOpB;QACC,aAAa,CAAC,GAAG,CACf,IAAI,CAAC,EAAE,EACP;;;;KAID,EACC;YACE,MAAM,CAAC,EAAE;YACT,MAAM,CAAC,OAAO;YACd,MAAM,CAAC,UAAU;YACjB,MAAM,CAAC,YAAY,IAAI,SAAS;YAChC,MAAM,CAAC,gBAAgB;YACvB,MAAM,CAAC,OAAO;SACf,CACF,CAAC;IACJ,CAAC;IAED,yBAAyB,CAAC,SAAmB,EAAE,aAAa,GAAG,GAAG;QAChE,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO;QACT,CAAC;QACD,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxD,aAAa,CAAC,GAAG,CACf,IAAI,CAAC,EAAE,EACP;;;;qBAIe,YAAY;;KAE5B,EACC,CAAC,aAAa,EAAE,GAAG,SAAS,CAAC,CAC9B,CAAC;IACJ,CAAC;CACF"}
|
package/dist/node_modules/@memento/core/dist/domains/consolidation/services/cluster-judge.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ClusterJudgePair {
|
|
2
|
+
a: string;
|
|
3
|
+
b: string;
|
|
4
|
+
}
|
|
5
|
+
export interface IClusterJudge {
|
|
6
|
+
/** One P(same task or topic) per pair, in order. Never throws; NaN where no score was obtained. */
|
|
7
|
+
scorePairs(pairs: ClusterJudgePair[]): Promise<number[]>;
|
|
8
|
+
}
|
|
9
|
+
/** 40 labeled production pairs (2026-10-03): 0.6 kept 14/15 same-topic and 0/25 different-topic pairs. */
|
|
10
|
+
export declare function getClusterJudgeThreshold(): number;
|
|
11
|
+
export interface JevClusterJudgeOptions {
|
|
12
|
+
apiKey: string;
|
|
13
|
+
model?: string;
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
timeoutMs?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare class JevClusterJudge implements IClusterJudge {
|
|
18
|
+
private readonly apiKey;
|
|
19
|
+
private readonly model;
|
|
20
|
+
private readonly baseUrl;
|
|
21
|
+
private readonly timeoutMs;
|
|
22
|
+
constructor(options: JevClusterJudgeOptions);
|
|
23
|
+
scorePairs(pairs: ClusterJudgePair[]): Promise<number[]>;
|
|
24
|
+
private scoreBatch;
|
|
25
|
+
}
|
|
26
|
+
/** CONSOLIDATION_JUDGE=typesafe enables the judge; anything else keeps cosine-only clustering. */
|
|
27
|
+
export declare function createClusterJudge(apiKey: string | undefined, model: string | undefined): IClusterJudge | null;
|
|
28
|
+
//# sourceMappingURL=cluster-judge.d.ts.map
|
package/dist/node_modules/@memento/core/dist/domains/consolidation/services/cluster-judge.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster-judge.d.ts","sourceRoot":"","sources":["../../../../src/domains/consolidation/services/cluster-judge.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,gBAAgB;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,aAAa;IAC5B,mGAAmG;IACnG,UAAU,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1D;AAED,0GAA0G;AAC1G,wBAAgB,wBAAwB,IAAI,MAAM,CAIjD;AAMD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,eAAgB,YAAW,aAAa;IACnD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,OAAO,EAAE,sBAAsB;IAOrC,UAAU,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAQhD,UAAU;CAmCzB;AAED,kGAAkG;AAClG,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,CAS9G"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #1225: second opinion on consolidation clusters. MiniLM cosine similarity groups records of
|
|
3
|
+
* the same genre (e.g. two unrelated work logs) above the cluster threshold; a judge model
|
|
4
|
+
* decides whether two texts cover the same task or topic.
|
|
5
|
+
*/
|
|
6
|
+
import { logger } from '../../../shared/utils/logger.js';
|
|
7
|
+
import { stripMemoryTemplateLabels } from './template-label-normalizer.js';
|
|
8
|
+
/** 40 labeled production pairs (2026-10-03): 0.6 kept 14/15 same-topic and 0/25 different-topic pairs. */
|
|
9
|
+
export function getClusterJudgeThreshold() {
|
|
10
|
+
const raw = process.env.CONSOLIDATION_JUDGE_THRESHOLD;
|
|
11
|
+
const n = raw ? parseFloat(raw) : 0.6;
|
|
12
|
+
return Number.isFinite(n) && n > 0 && n <= 1 ? n : 0.6;
|
|
13
|
+
}
|
|
14
|
+
const QUESTION = '기억 A 와 기억 B 는 같은 작업이나 같은 주제를 다룬다';
|
|
15
|
+
const BATCH_SIZE = 10;
|
|
16
|
+
const TEXT_CHARS = 400;
|
|
17
|
+
export class JevClusterJudge {
|
|
18
|
+
apiKey;
|
|
19
|
+
model;
|
|
20
|
+
baseUrl;
|
|
21
|
+
timeoutMs;
|
|
22
|
+
constructor(options) {
|
|
23
|
+
this.apiKey = options.apiKey;
|
|
24
|
+
this.model = options.model ?? 'jev-latest';
|
|
25
|
+
this.baseUrl = options.baseUrl ?? 'https://api.typesafe.ai/v1/systemone';
|
|
26
|
+
this.timeoutMs = options.timeoutMs ?? 10000;
|
|
27
|
+
}
|
|
28
|
+
async scorePairs(pairs) {
|
|
29
|
+
const scores = [];
|
|
30
|
+
for (let i = 0; i < pairs.length; i += BATCH_SIZE) {
|
|
31
|
+
scores.push(...(await this.scoreBatch(pairs.slice(i, i + BATCH_SIZE))));
|
|
32
|
+
}
|
|
33
|
+
return scores;
|
|
34
|
+
}
|
|
35
|
+
async scoreBatch(batch) {
|
|
36
|
+
const state = {};
|
|
37
|
+
const questions = {};
|
|
38
|
+
batch.forEach((pair, k) => {
|
|
39
|
+
state[`a${k}`] = stripMemoryTemplateLabels(pair.a).slice(0, TEXT_CHARS);
|
|
40
|
+
state[`b${k}`] = stripMemoryTemplateLabels(pair.b).slice(0, TEXT_CHARS);
|
|
41
|
+
questions[`q${k}`] = { type: 'noul', instructions: `${QUESTION} (기억 A = a${k}, 기억 B = b${k})` };
|
|
42
|
+
});
|
|
43
|
+
const controller = new AbortController();
|
|
44
|
+
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
45
|
+
try {
|
|
46
|
+
const res = await fetch(this.baseUrl, {
|
|
47
|
+
method: 'POST',
|
|
48
|
+
headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${this.apiKey}` },
|
|
49
|
+
body: JSON.stringify({ model: this.model, state, questions }),
|
|
50
|
+
signal: controller.signal
|
|
51
|
+
});
|
|
52
|
+
if (!res.ok) {
|
|
53
|
+
logger.warn(`Consolidation judge: request failed (status ${res.status}, pairs ${batch.length})`);
|
|
54
|
+
return batch.map(() => Number.NaN);
|
|
55
|
+
}
|
|
56
|
+
const data = (await res.json());
|
|
57
|
+
return batch.map((_, k) => {
|
|
58
|
+
const noul = data.answers?.[`q${k}`]?.noul;
|
|
59
|
+
return typeof noul === 'number' ? noul : Number.NaN;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
64
|
+
logger.warn(`Consolidation judge: ${message} (pairs ${batch.length})`);
|
|
65
|
+
return batch.map(() => Number.NaN);
|
|
66
|
+
}
|
|
67
|
+
finally {
|
|
68
|
+
clearTimeout(timer);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/** CONSOLIDATION_JUDGE=typesafe enables the judge; anything else keeps cosine-only clustering. */
|
|
73
|
+
export function createClusterJudge(apiKey, model) {
|
|
74
|
+
if (process.env.CONSOLIDATION_JUDGE !== 'typesafe') {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
if (!apiKey || apiKey.trim() === '') {
|
|
78
|
+
logger.error('CONSOLIDATION_JUDGE=typesafe but TYPESAFE_API_KEY is empty; consolidation runs without the judge.');
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return new JevClusterJudge({ apiKey, model: model || undefined });
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=cluster-judge.js.map
|
package/dist/node_modules/@memento/core/dist/domains/consolidation/services/cluster-judge.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster-judge.js","sourceRoot":"","sources":["../../../../src/domains/consolidation/services/cluster-judge.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAY3E,0GAA0G;AAC1G,MAAM,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