@remnic/core 9.45.4 → 9.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.d.ts +10 -10
- package/dist/access-admin-ops-surface.js +30 -29
- package/dist/access-authorization-probe.d.ts +10 -10
- package/dist/access-authorization-probe.js +31 -30
- package/dist/access-boundary.d.ts +10 -10
- package/dist/access-boundary.js +30 -29
- package/dist/access-cli.js +91 -87
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +10 -10
- package/dist/access-extraction-force-flush.js +30 -29
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +10 -10
- package/dist/access-http-lifecycle-flush.d.ts +10 -10
- package/dist/access-http-offline-stream.d.ts +10 -10
- package/dist/access-http-offline-stream.js +1 -1
- package/dist/access-http-query.js +30 -29
- package/dist/access-http.d.ts +10 -11
- package/dist/access-http.js +42 -41
- package/dist/access-identity-continuity-surface.d.ts +8 -8
- package/dist/access-identity-continuity-surface.js +30 -29
- package/dist/access-lcm-surface.d.ts +10 -10
- package/dist/access-lcm-surface.js +30 -29
- package/dist/access-mcp.d.ts +10 -10
- package/dist/access-mcp.js +36 -35
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-CWUDwB4M.d.ts → access-namespace-preflight--H6HwN85.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +30 -29
- package/dist/access-observe-write-surface.d.ts +10 -10
- package/dist/access-observe-write-surface.js +30 -29
- package/dist/access-offline-manifest.d.ts +8 -8
- package/dist/access-operations-batch.js +31 -30
- package/dist/access-operations.d.ts +13 -13
- package/dist/access-operations.js +35 -34
- package/dist/access-recall-concurrency.d.ts +10 -10
- package/dist/access-recall-concurrency.js +30 -29
- package/dist/access-recall-response.d.ts +10 -10
- package/dist/access-recall-response.js +30 -29
- package/dist/access-recall-surface.d.ts +10 -10
- package/dist/access-recall-surface.js +30 -29
- package/dist/access-schema.d.ts +84 -84
- package/dist/access-service-helpers.d.ts +10 -10
- package/dist/{access-service-CsU-ljFD.d.ts → access-service-loJadYd7.d.ts} +7 -7
- package/dist/access-service.d.ts +10 -10
- package/dist/access-service.js +30 -29
- package/dist/access-surface-catalog.d.ts +10 -10
- package/dist/access-wearables-meetings-surface.d.ts +3 -3
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/ambient-provenance.d.ts +109 -0
- package/dist/ambient-provenance.js +22 -0
- package/dist/ambient-provenance.js.map +1 -0
- package/dist/{auto-sync-UPTUVE4X.js → auto-sync-7O6RP2RT.js} +3 -2
- package/dist/{auto-sync-UPTUVE4X.js.map → auto-sync-7O6RP2RT.js.map} +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +8 -8
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +6 -5
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer-turn-helpers.js +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/buffer.js +5 -5
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{catalog-bctMURhN.d.ts → catalog-Iwbk9h5E.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +7 -6
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-7RZJWZ46.js → chunk-227UFSEQ.js} +5 -5
- package/dist/{chunk-ER7W6H4T.js → chunk-2AD5SXO4.js} +5 -2
- package/dist/chunk-2AD5SXO4.js.map +1 -0
- package/dist/{chunk-XSFHWBQO.js → chunk-2DSUT7DZ.js} +10 -64
- package/dist/{chunk-XSFHWBQO.js.map → chunk-2DSUT7DZ.js.map} +1 -1
- package/dist/{chunk-DZPFMQZ7.js → chunk-3S63QIFQ.js} +1 -1
- package/dist/chunk-3S63QIFQ.js.map +1 -0
- package/dist/{chunk-UQWIKLQK.js → chunk-47J4EDGR.js} +9 -9
- package/dist/{chunk-5SNZSWWR.js → chunk-5LRDM4R7.js} +42 -42
- package/dist/{chunk-7YERSTN7.js → chunk-5R6S4DJZ.js} +7 -7
- package/dist/{chunk-C26TE27X.js → chunk-5VQPZ4GV.js} +3 -3
- package/dist/{chunk-U2VLVBBH.js → chunk-64BHFFKZ.js} +3 -3
- package/dist/{chunk-AJQ57VV3.js → chunk-6H744ZBH.js} +4 -4
- package/dist/chunk-6H744ZBH.js.map +1 -0
- package/dist/{chunk-7CITSYSH.js → chunk-7T4TOGMS.js} +2 -2
- package/dist/{chunk-ZMAYKGPN.js → chunk-7YQ6ESEA.js} +12 -41
- package/dist/chunk-7YQ6ESEA.js.map +1 -0
- package/dist/{chunk-YMAQDHQM.js → chunk-BDNL34CT.js} +2 -2
- package/dist/{chunk-GQL52GQ5.js → chunk-CDKHKZL5.js} +15 -12
- package/dist/chunk-CDKHKZL5.js.map +1 -0
- package/dist/{chunk-WGP57SR3.js → chunk-CK5KOVHW.js} +3 -2
- package/dist/{chunk-WGP57SR3.js.map → chunk-CK5KOVHW.js.map} +1 -1
- package/dist/{chunk-JH6BPLOP.js → chunk-E4FOAENZ.js} +4 -4
- package/dist/{chunk-ZFGZ6PZ2.js → chunk-FULKGK7P.js} +2 -2
- package/dist/{chunk-BGHFOD5A.js → chunk-HJ3SVHUW.js} +3 -3
- package/dist/{chunk-TYISDI6B.js → chunk-HXXTXLKA.js} +2 -2
- package/dist/{chunk-FZP32336.js → chunk-IDE5AR5W.js} +53 -31
- package/dist/chunk-IDE5AR5W.js.map +1 -0
- package/dist/{chunk-7SHJHPTY.js → chunk-ILBLZ5Y5.js} +2 -2
- package/dist/chunk-J7T4MX7P.js +131 -0
- package/dist/chunk-J7T4MX7P.js.map +1 -0
- package/dist/{chunk-DSUAAZZX.js → chunk-JFO5QZ7N.js} +2 -2
- package/dist/{chunk-EJHEWCGQ.js → chunk-KA47C7BF.js} +2 -2
- package/dist/{chunk-NUEQKLNB.js → chunk-KMWYZTIE.js} +2 -2
- package/dist/{chunk-TQ4GD737.js → chunk-L7G72WY4.js} +2 -2
- package/dist/{chunk-CLB32OHM.js → chunk-LI7OE7G6.js} +2 -2
- package/dist/{chunk-TN76AKO3.js → chunk-M2INOSTA.js} +2 -2
- package/dist/{chunk-DYVMXPCF.js → chunk-M32URQXV.js} +665 -614
- package/dist/chunk-M32URQXV.js.map +1 -0
- package/dist/{chunk-WQIHRA5F.js → chunk-N3LL5NEU.js} +2 -2
- package/dist/{chunk-HFPASSFV.js → chunk-P2OTGMTR.js} +2 -2
- package/dist/{chunk-Y7HRYCNW.js → chunk-PFJXPOD4.js} +2 -2
- package/dist/{chunk-MDISBSYA.js → chunk-PKCLQ7KM.js} +43 -143
- package/dist/chunk-PKCLQ7KM.js.map +1 -0
- package/dist/chunk-QW27DOHG.js +84 -0
- package/dist/chunk-QW27DOHG.js.map +1 -0
- package/dist/{chunk-ZI32MKDW.js → chunk-RCU25Z66.js} +32 -35
- package/dist/chunk-RCU25Z66.js.map +1 -0
- package/dist/{chunk-2QSZNTDO.js → chunk-RKNJBZ55.js} +4 -4
- package/dist/{chunk-QCECHYZL.js → chunk-RVO6TCTU.js} +6 -6
- package/dist/{chunk-D3I2MCN7.js → chunk-RVPTS4U5.js} +3 -3
- package/dist/{chunk-W3IC7QOY.js → chunk-RVYVMQK4.js} +3 -3
- package/dist/chunk-S2HLHAZ4.js +16 -0
- package/dist/chunk-S2HLHAZ4.js.map +1 -0
- package/dist/{chunk-2MRHJNWL.js → chunk-ST5IEK3H.js} +2 -2
- package/dist/{chunk-O4KMGRXE.js → chunk-SXWHN7GC.js} +2 -2
- package/dist/{chunk-KXEFRMCF.js → chunk-T6JRMVOV.js} +2 -2
- package/dist/{chunk-R5RFK3CB.js → chunk-U6JGQ37L.js} +2 -2
- package/dist/{chunk-UV72DEZD.js → chunk-UYUYZ4WY.js} +36 -10
- package/dist/chunk-UYUYZ4WY.js.map +1 -0
- package/dist/{chunk-EITZHSX6.js → chunk-V5FE3UAI.js} +2 -2
- package/dist/chunk-VL35ZFSZ.js +102 -0
- package/dist/chunk-VL35ZFSZ.js.map +1 -0
- package/dist/{chunk-NTOIP2E6.js → chunk-W2ZSNIBP.js} +2 -2
- package/dist/{chunk-QVSBTCVP.js → chunk-WHWDBTCJ.js} +2 -2
- package/dist/{chunk-5CEECY6P.js → chunk-WOC6DXP5.js} +3 -3
- package/dist/{chunk-XTAUXTDO.js → chunk-XBMJ35IP.js} +2 -2
- package/dist/{chunk-VOUOLGIP.js → chunk-YRFAYOFQ.js} +11 -13
- package/dist/chunk-YRFAYOFQ.js.map +1 -0
- package/dist/{chunk-P7NGM24P.js → chunk-YWCOJOUI.js} +2 -2
- package/dist/{chunk-6NNNURLK.js → chunk-Z54EM5YZ.js} +4 -4
- package/dist/{chunk-ULVR5KG7.js → chunk-ZDAYWJV6.js} +2 -2
- package/dist/chunk-ZDAYWJV6.js.map +1 -0
- package/dist/{cli-BBHDtG36.d.ts → cli-D_RcqXfZ.d.ts} +5 -5
- package/dist/cli.d.ts +12 -12
- package/dist/cli.js +61 -60
- package/dist/compat/checks.js +1 -1
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +6 -5
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +6 -5
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +6 -5
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +8 -7
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/backend.js +2 -2
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +17 -16
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +6 -5
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +8 -8
- package/dist/external-wiki-access.d.ts +10 -10
- package/dist/external-wiki-access.js +33 -32
- package/dist/external-wiki-cli.js +4 -90
- package/dist/external-wiki-cli.js.map +1 -1
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +10 -10
- package/dist/external-wiki-search.js +2 -2
- package/dist/external-wiki.d.ts +1 -5
- package/dist/external-wiki.js +1 -3
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-prompt.d.ts +36 -0
- package/dist/extraction-prompt.js +16 -0
- package/dist/extraction-prompt.js.map +1 -0
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction.d.ts +6 -14
- package/dist/extraction.js +13 -10
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{first-start-migration-F2QJD66E.js → first-start-migration-ZSHEFEI3.js} +10 -12
- package/dist/{first-start-migration-F2QJD66E.js.map → first-start-migration-ZSHEFEI3.js.map} +1 -1
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/index.d.ts +701 -697
- package/dist/index.js +133 -128
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +2 -2
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +6 -5
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +6 -5
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +7 -6
- package/dist/{maintenance-D2mveyCd.d.ts → maintenance-DQrL93Uu.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +10 -10
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-snapshot.d.ts +10 -0
- package/dist/memory-snapshot.js +8 -0
- package/dist/memory-snapshot.js.map +1 -0
- package/dist/memory-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +16 -15
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +9 -9
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +6 -5
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +18 -17
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +22 -21
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +11 -10
- package/dist/{orchestrator-DJYlwiUv.d.ts → orchestrator-LPGegii3.d.ts} +8 -8
- package/dist/orchestrator.d.ts +8 -8
- package/dist/orchestrator.js +93 -89
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-CNjY4wk3.d.ts → pipeline-1h2GpiHP.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{qmd-C0UDZidt.d.ts → qmd-UdwoF71D.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/qmd.js +4 -4
- package/dist/recall-concurrency-config.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/manifest.d.ts +1 -1
- package/dist/reconcile/plan.d.ts +1 -1
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/retrieval-agents.d.ts +2 -2
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/salvage-envelope.d.ts +1 -1
- package/dist/schemas.d.ts +76 -76
- package/dist/{scope-profiles-BJzp2F5A.d.ts → scope-profiles-APjhSe-w.d.ts} +1 -1
- package/dist/sdk-compat.js.map +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +8 -8
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +14 -14
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-D4KAZO2G.d.ts → semantic-consolidation-CrySDbk3.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +7 -6
- package/dist/semantic-rule-promotion.js +6 -5
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +6 -5
- package/dist/{service-BeDxSqE-.d.ts → service-DJ0LDyuN.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +9 -9
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +4 -1
- package/dist/source-agent-qualifier.js +10 -9
- package/dist/{storage-DfjxusTE.d.ts → storage-y340tYKb.d.ts} +5 -2
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +5 -4
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +2 -2
- package/dist/tier-migration.js +1 -1
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/types.d.ts +66 -66
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-yX_FwERf.d.ts → types-D_Au9qJO.d.ts} +13 -2
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +6 -5
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -12
- package/src/access-http-offline-stream.ts +1 -0
- package/src/access-http.ts +0 -57
- package/src/access-operations-batch.ts +1 -1
- package/src/access-service-observe-lcm-parity.test.ts +45 -20
- package/src/access-service.ts +3 -4
- package/src/ambient-provenance.test.ts +510 -0
- package/src/ambient-provenance.ts +229 -0
- package/src/buffer-turn-helpers.ts +17 -1
- package/src/compat/checks.test.ts +45 -1
- package/src/compat/checks.ts +16 -16
- package/src/external-wiki-cli.ts +28 -20
- package/src/external-wiki-search.test.ts +68 -2
- package/src/external-wiki.ts +12 -38
- package/src/extraction-prompt.ts +142 -0
- package/src/extraction.ts +37 -148
- package/src/index.ts +1 -5
- package/src/maintenance/first-start-migration.ts +11 -11
- package/src/meetings/memory-gen.test.ts +51 -0
- package/src/meetings/memory-gen.ts +36 -8
- package/src/meetings/summary-extractor.ts +4 -2
- package/src/memory-snapshot.ts +15 -0
- package/src/orchestration/recall-internal.ts +5 -148
- package/src/orchestration/recall-profile-storage.ts +194 -0
- package/src/orchestration/recall-search-pipeline.ts +13 -182
- package/src/orchestration/recall-search-prefilter.ts +254 -0
- package/src/orchestration/session-context.ts +1 -1
- package/src/orchestrator.ts +1 -1
- package/src/sdk-compat.ts +2 -4
- package/src/source-agent-qualifier.ts +3 -0
- package/src/storage-contract/cache-coherence.test.ts +99 -0
- package/src/storage-fact-hash-index-defer.test.ts +14 -7
- package/src/storage.ts +47 -48
- package/src/testing/subjects/first-start-tier-migration.test.ts +75 -0
- package/src/testing/subjects/recall-profile-storage.test.ts +362 -0
- package/src/testing/subjects/recall-search-prefilter.test.ts +365 -0
- package/src/tier-migration.ts +10 -12
- package/src/types.ts +2 -2
- package/src/wearables/memory-gen.test.ts +82 -0
- package/src/wearables/memory-gen.ts +54 -5
- package/src/wearables/trust.ts +19 -2
- package/dist/chunk-AJQ57VV3.js.map +0 -1
- package/dist/chunk-DYVMXPCF.js.map +0 -1
- package/dist/chunk-DZPFMQZ7.js.map +0 -1
- package/dist/chunk-ER7W6H4T.js.map +0 -1
- package/dist/chunk-FZP32336.js.map +0 -1
- package/dist/chunk-GQL52GQ5.js.map +0 -1
- package/dist/chunk-MDISBSYA.js.map +0 -1
- package/dist/chunk-ULVR5KG7.js.map +0 -1
- package/dist/chunk-UV72DEZD.js.map +0 -1
- package/dist/chunk-VOUOLGIP.js.map +0 -1
- package/dist/chunk-ZI32MKDW.js.map +0 -1
- package/dist/chunk-ZMAYKGPN.js.map +0 -1
- package/dist/legacy-hook-compat.d.ts +0 -3
- package/dist/legacy-hook-compat.js +0 -36
- package/dist/legacy-hook-compat.js.map +0 -1
- package/src/legacy-hook-compat.test.ts +0 -20
- package/src/legacy-hook-compat.ts +0 -45
- /package/dist/{chunk-7RZJWZ46.js.map → chunk-227UFSEQ.js.map} +0 -0
- /package/dist/{chunk-UQWIKLQK.js.map → chunk-47J4EDGR.js.map} +0 -0
- /package/dist/{chunk-5SNZSWWR.js.map → chunk-5LRDM4R7.js.map} +0 -0
- /package/dist/{chunk-7YERSTN7.js.map → chunk-5R6S4DJZ.js.map} +0 -0
- /package/dist/{chunk-C26TE27X.js.map → chunk-5VQPZ4GV.js.map} +0 -0
- /package/dist/{chunk-U2VLVBBH.js.map → chunk-64BHFFKZ.js.map} +0 -0
- /package/dist/{chunk-7CITSYSH.js.map → chunk-7T4TOGMS.js.map} +0 -0
- /package/dist/{chunk-YMAQDHQM.js.map → chunk-BDNL34CT.js.map} +0 -0
- /package/dist/{chunk-JH6BPLOP.js.map → chunk-E4FOAENZ.js.map} +0 -0
- /package/dist/{chunk-ZFGZ6PZ2.js.map → chunk-FULKGK7P.js.map} +0 -0
- /package/dist/{chunk-BGHFOD5A.js.map → chunk-HJ3SVHUW.js.map} +0 -0
- /package/dist/{chunk-TYISDI6B.js.map → chunk-HXXTXLKA.js.map} +0 -0
- /package/dist/{chunk-7SHJHPTY.js.map → chunk-ILBLZ5Y5.js.map} +0 -0
- /package/dist/{chunk-DSUAAZZX.js.map → chunk-JFO5QZ7N.js.map} +0 -0
- /package/dist/{chunk-EJHEWCGQ.js.map → chunk-KA47C7BF.js.map} +0 -0
- /package/dist/{chunk-NUEQKLNB.js.map → chunk-KMWYZTIE.js.map} +0 -0
- /package/dist/{chunk-TQ4GD737.js.map → chunk-L7G72WY4.js.map} +0 -0
- /package/dist/{chunk-CLB32OHM.js.map → chunk-LI7OE7G6.js.map} +0 -0
- /package/dist/{chunk-TN76AKO3.js.map → chunk-M2INOSTA.js.map} +0 -0
- /package/dist/{chunk-WQIHRA5F.js.map → chunk-N3LL5NEU.js.map} +0 -0
- /package/dist/{chunk-HFPASSFV.js.map → chunk-P2OTGMTR.js.map} +0 -0
- /package/dist/{chunk-Y7HRYCNW.js.map → chunk-PFJXPOD4.js.map} +0 -0
- /package/dist/{chunk-2QSZNTDO.js.map → chunk-RKNJBZ55.js.map} +0 -0
- /package/dist/{chunk-QCECHYZL.js.map → chunk-RVO6TCTU.js.map} +0 -0
- /package/dist/{chunk-D3I2MCN7.js.map → chunk-RVPTS4U5.js.map} +0 -0
- /package/dist/{chunk-W3IC7QOY.js.map → chunk-RVYVMQK4.js.map} +0 -0
- /package/dist/{chunk-2MRHJNWL.js.map → chunk-ST5IEK3H.js.map} +0 -0
- /package/dist/{chunk-O4KMGRXE.js.map → chunk-SXWHN7GC.js.map} +0 -0
- /package/dist/{chunk-KXEFRMCF.js.map → chunk-T6JRMVOV.js.map} +0 -0
- /package/dist/{chunk-R5RFK3CB.js.map → chunk-U6JGQ37L.js.map} +0 -0
- /package/dist/{chunk-EITZHSX6.js.map → chunk-V5FE3UAI.js.map} +0 -0
- /package/dist/{chunk-NTOIP2E6.js.map → chunk-W2ZSNIBP.js.map} +0 -0
- /package/dist/{chunk-QVSBTCVP.js.map → chunk-WHWDBTCJ.js.map} +0 -0
- /package/dist/{chunk-5CEECY6P.js.map → chunk-WOC6DXP5.js.map} +0 -0
- /package/dist/{chunk-XTAUXTDO.js.map → chunk-XBMJ35IP.js.map} +0 -0
- /package/dist/{chunk-P7NGM24P.js.map → chunk-YWCOJOUI.js.map} +0 -0
- /package/dist/{chunk-6NNNURLK.js.map → chunk-Z54EM5YZ.js.map} +0 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recall-profile-storage contract lifecycle subject for the scenario-matrix harness.
|
|
3
|
+
* Exercises resolveCompositeProfileStorage across single-storage pass-through,
|
|
4
|
+
* empty storage fallback, multi-storage precedence, and aggregation deduplication.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import assert from "node:assert/strict";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
type CompositeProfileStorageResult,
|
|
12
|
+
resolveCompositeProfileStorage,
|
|
13
|
+
} from "../../orchestration/recall-profile-storage.js";
|
|
14
|
+
import { StorageManager } from "../../storage.js";
|
|
15
|
+
import { type LifecycleSubject, type MatrixRow, runLifecycleMatrix } from "../lifecycle-matrix.js";
|
|
16
|
+
import { cleanupDir, mkTempMemoryDir } from "../orchestrator-lite.js";
|
|
17
|
+
|
|
18
|
+
interface RecallProfileStorageState {
|
|
19
|
+
readonly memoryDir: string;
|
|
20
|
+
readonly storages: StorageManager[];
|
|
21
|
+
readonly extraDirs: string[];
|
|
22
|
+
result?: CompositeProfileStorageResult;
|
|
23
|
+
readProfileResult?: string;
|
|
24
|
+
readQuestionsResult?: unknown[];
|
|
25
|
+
readIdentityAnchorResult?: string | null;
|
|
26
|
+
readIdentityImprovementLoopsResult?: string | null;
|
|
27
|
+
readContinuityIncidentsResult?: unknown[];
|
|
28
|
+
listEntityNamesResult?: string[];
|
|
29
|
+
readEntityResult?: unknown;
|
|
30
|
+
readMemoryByPathResult?: unknown;
|
|
31
|
+
readAllMemoriesResult?: unknown[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const subject: LifecycleSubject<RecallProfileStorageState> = {
|
|
35
|
+
appliesTo(row: MatrixRow): boolean | string {
|
|
36
|
+
if (row.id === "compaction-flush") {
|
|
37
|
+
return "profile storage proxying has no compaction flush behavior; compaction operates on transcripts";
|
|
38
|
+
}
|
|
39
|
+
if (row.id === "before-reset") {
|
|
40
|
+
return "profile storage proxying has no before_reset lifecycle hook; reset operates on session state";
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
async setup(row: MatrixRow): Promise<RecallProfileStorageState> {
|
|
46
|
+
const memoryDir = await mkTempMemoryDir(`recall-profile-storage-${row.id}`);
|
|
47
|
+
const extraDirs: string[] = [];
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
if (row.id === "sparse-metadata-without-binding") {
|
|
51
|
+
return { memoryDir, storages: [], extraDirs };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (row.id === "sparse-metadata-with-binding") {
|
|
55
|
+
const s1 = new StorageManager(memoryDir);
|
|
56
|
+
await s1.writeProfile("# Single Profile\n- Fact 1");
|
|
57
|
+
return { memoryDir, storages: [s1], extraDirs };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (row.id === "explicit-provider-identity") {
|
|
61
|
+
const dir2 = await mkTempMemoryDir(`recall-profile-storage-${row.id}-2`);
|
|
62
|
+
extraDirs.push(dir2);
|
|
63
|
+
const dir3 = await mkTempMemoryDir(`recall-profile-storage-${row.id}-3`);
|
|
64
|
+
extraDirs.push(dir3);
|
|
65
|
+
|
|
66
|
+
const s1 = new StorageManager(memoryDir);
|
|
67
|
+
const s2 = new StorageManager(dir2);
|
|
68
|
+
const s3 = new StorageManager(dir3);
|
|
69
|
+
|
|
70
|
+
await s1.writeEntity("Alice", "person", ["Alice works on Remnic"]);
|
|
71
|
+
|
|
72
|
+
await s2.writeProfile("# Profile 2\n- User prefers TypeScript");
|
|
73
|
+
await s2.writeIdentityAnchor("# Identity Anchor 2\n- Value: Integrity");
|
|
74
|
+
await s2.writeEntity("Bob", "person", ["Bob works on Remnic"]);
|
|
75
|
+
|
|
76
|
+
await s3.writeProfile("# Profile 3\n- User prefers Rust");
|
|
77
|
+
await s3.writeIdentityAnchor("# Identity Anchor 3\n- Value: Speed");
|
|
78
|
+
|
|
79
|
+
return { memoryDir, storages: [s1, s2, s3], extraDirs };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (row.id === "provider-rebinding") {
|
|
83
|
+
const dir2 = await mkTempMemoryDir(`recall-profile-storage-${row.id}-2`);
|
|
84
|
+
extraDirs.push(dir2);
|
|
85
|
+
|
|
86
|
+
const s1 = new StorageManager(memoryDir);
|
|
87
|
+
const s2 = new StorageManager(memoryDir);
|
|
88
|
+
const s3 = new StorageManager(dir2);
|
|
89
|
+
const s4 = { dir: "" } as unknown as StorageManager;
|
|
90
|
+
|
|
91
|
+
return { memoryDir, storages: [s1, s2, s3, s4], extraDirs };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (row.id === "restart-reload-recovery") {
|
|
95
|
+
const dir2 = await mkTempMemoryDir(`recall-profile-storage-${row.id}-2`);
|
|
96
|
+
extraDirs.push(dir2);
|
|
97
|
+
|
|
98
|
+
const s1Seed = new StorageManager(memoryDir);
|
|
99
|
+
const s2Seed = new StorageManager(dir2);
|
|
100
|
+
await s2Seed.writeProfile("# Recovered Profile\n- Persisted value");
|
|
101
|
+
await s2Seed.writeIdentityAnchor("# Recovered Anchor\n- Persisted anchor");
|
|
102
|
+
|
|
103
|
+
const seedResult = resolveCompositeProfileStorage({
|
|
104
|
+
profileStorages: [s1Seed, s2Seed],
|
|
105
|
+
memoryDir,
|
|
106
|
+
});
|
|
107
|
+
const seedProfile = await seedResult.profileStorage.readProfile();
|
|
108
|
+
assert.ok(seedProfile.includes("Recovered Profile"));
|
|
109
|
+
|
|
110
|
+
const s1Recovered = new StorageManager(memoryDir);
|
|
111
|
+
const s2Recovered = new StorageManager(dir2);
|
|
112
|
+
|
|
113
|
+
return { memoryDir, storages: [s1Recovered, s2Recovered], extraDirs };
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (row.id === "session-end") {
|
|
117
|
+
const dir2 = await mkTempMemoryDir(`recall-profile-storage-${row.id}-2`);
|
|
118
|
+
extraDirs.push(dir2);
|
|
119
|
+
|
|
120
|
+
const s1 = new StorageManager(memoryDir);
|
|
121
|
+
const s2 = new StorageManager(dir2);
|
|
122
|
+
|
|
123
|
+
await s2.writeProfile("# Final Session Profile\n- Summary");
|
|
124
|
+
|
|
125
|
+
return { memoryDir, storages: [s1, s2], extraDirs };
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (row.id === "dedupe-replay") {
|
|
129
|
+
const dir2 = await mkTempMemoryDir(`recall-profile-storage-${row.id}-2`);
|
|
130
|
+
extraDirs.push(dir2);
|
|
131
|
+
|
|
132
|
+
const s1 = new StorageManager(memoryDir);
|
|
133
|
+
const s2 = new StorageManager(memoryDir);
|
|
134
|
+
const s3 = new StorageManager(dir2);
|
|
135
|
+
|
|
136
|
+
await s1.writeQuestion("What is Remnic?", "context 1", 5);
|
|
137
|
+
await s1.writeQuestion("How does recall work?", "context 2", 10);
|
|
138
|
+
await s1.appendContinuityIncident({
|
|
139
|
+
symptom: "Incident 1 symptom",
|
|
140
|
+
suspectedCause: "Cause 1",
|
|
141
|
+
triggerWindow: "2026-08-01",
|
|
142
|
+
});
|
|
143
|
+
await s1.writeIdentityImprovementLoops("# Improvement Loop A");
|
|
144
|
+
await s1.writeEntity("ProjectX", "project", ["Fact X1"]);
|
|
145
|
+
await s1.writeMemory("fact", "Memory fact 1");
|
|
146
|
+
|
|
147
|
+
await s3.writeQuestion("Where are memories saved?", "context 3", 1);
|
|
148
|
+
await s3.appendContinuityIncident({
|
|
149
|
+
symptom: "Incident 2 symptom",
|
|
150
|
+
suspectedCause: "Cause 2",
|
|
151
|
+
triggerWindow: "2026-08-01",
|
|
152
|
+
});
|
|
153
|
+
await s3.writeIdentityImprovementLoops("# Improvement Loop B");
|
|
154
|
+
await s3.writeEntity("ProjectY", "project", ["Fact Y1"]);
|
|
155
|
+
await s3.writeMemory("fact", "Memory fact 2");
|
|
156
|
+
|
|
157
|
+
return { memoryDir, storages: [s1, s2, s3], extraDirs };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return { memoryDir, storages: [], extraDirs };
|
|
161
|
+
} catch (error) {
|
|
162
|
+
await cleanupDir(memoryDir);
|
|
163
|
+
for (const dir of extraDirs) {
|
|
164
|
+
await cleanupDir(dir);
|
|
165
|
+
}
|
|
166
|
+
throw error;
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
async exercise(state: RecallProfileStorageState, row: MatrixRow): Promise<void> {
|
|
171
|
+
const result = resolveCompositeProfileStorage({
|
|
172
|
+
profileStorages: state.storages,
|
|
173
|
+
memoryDir: state.memoryDir,
|
|
174
|
+
});
|
|
175
|
+
state.result = result;
|
|
176
|
+
|
|
177
|
+
const storage = result.profileStorage;
|
|
178
|
+
|
|
179
|
+
if (row.id === "sparse-metadata-without-binding") {
|
|
180
|
+
state.readProfileResult = await storage.readProfile();
|
|
181
|
+
state.readQuestionsResult = await storage.readQuestions();
|
|
182
|
+
state.readIdentityAnchorResult = await storage.readIdentityAnchor();
|
|
183
|
+
state.readIdentityImprovementLoopsResult = await storage.readIdentityImprovementLoops();
|
|
184
|
+
state.readContinuityIncidentsResult = await storage.readContinuityIncidents();
|
|
185
|
+
state.listEntityNamesResult = await storage.listEntityNames();
|
|
186
|
+
state.readEntityResult = await storage.readEntity("Alice");
|
|
187
|
+
state.readMemoryByPathResult = await storage.readMemoryByPath("fact/1.md");
|
|
188
|
+
state.readAllMemoriesResult = await storage.readAllMemories();
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (row.id === "sparse-metadata-with-binding") {
|
|
193
|
+
state.readProfileResult = await storage.readProfile();
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (row.id === "explicit-provider-identity") {
|
|
198
|
+
state.readProfileResult = await storage.readProfile();
|
|
199
|
+
state.readIdentityAnchorResult = await storage.readIdentityAnchor();
|
|
200
|
+
state.readEntityResult = await storage.readEntity("person-bob");
|
|
201
|
+
state.readMemoryByPathResult = await storage.readMemoryByPath("nonexistent.md");
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (row.id === "restart-reload-recovery") {
|
|
206
|
+
state.readProfileResult = await storage.readProfile();
|
|
207
|
+
state.readIdentityAnchorResult = await storage.readIdentityAnchor();
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (row.id === "session-end") {
|
|
212
|
+
state.readProfileResult = await storage.readProfile();
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
if (row.id === "dedupe-replay") {
|
|
217
|
+
state.readQuestionsResult = await storage.readQuestions();
|
|
218
|
+
state.readIdentityImprovementLoopsResult = await storage.readIdentityImprovementLoops();
|
|
219
|
+
state.readContinuityIncidentsResult = await storage.readContinuityIncidents(10);
|
|
220
|
+
state.listEntityNamesResult = await storage.listEntityNames();
|
|
221
|
+
state.readAllMemoriesResult = await storage.readAllMemories();
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
async invariants(state: RecallProfileStorageState, row: MatrixRow): Promise<void> {
|
|
227
|
+
assert.ok(state.result, "composite profile storage result was populated");
|
|
228
|
+
|
|
229
|
+
if (row.id === "sparse-metadata-without-binding") {
|
|
230
|
+
assert.equal(state.result.profileStorageDirs.length, 0, "empty storage list returns empty storage dirs");
|
|
231
|
+
assert.equal(
|
|
232
|
+
state.result.profileStorage.dir,
|
|
233
|
+
path.join(state.memoryDir, ".empty-scope-profile"),
|
|
234
|
+
"empty storage fallback has .empty-scope-profile dir"
|
|
235
|
+
);
|
|
236
|
+
assert.equal(state.readProfileResult, "", "empty storage readProfile returns empty string");
|
|
237
|
+
assert.deepEqual(state.readQuestionsResult, [], "empty storage readQuestions returns empty array");
|
|
238
|
+
assert.equal(state.readIdentityAnchorResult, "", "empty storage readIdentityAnchor returns empty string");
|
|
239
|
+
assert.equal(
|
|
240
|
+
state.readIdentityImprovementLoopsResult,
|
|
241
|
+
"",
|
|
242
|
+
"empty storage readIdentityImprovementLoops returns empty string"
|
|
243
|
+
);
|
|
244
|
+
assert.deepEqual(
|
|
245
|
+
state.readContinuityIncidentsResult,
|
|
246
|
+
[],
|
|
247
|
+
"empty storage readContinuityIncidents returns empty array"
|
|
248
|
+
);
|
|
249
|
+
assert.deepEqual(state.listEntityNamesResult, [], "empty storage listEntityNames returns empty array");
|
|
250
|
+
assert.equal(state.readEntityResult, null, "empty storage readEntity returns null");
|
|
251
|
+
assert.equal(state.readMemoryByPathResult, null, "empty storage readMemoryByPath returns null");
|
|
252
|
+
assert.deepEqual(state.readAllMemoriesResult, [], "empty storage readAllMemories returns empty array");
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (row.id === "sparse-metadata-with-binding") {
|
|
257
|
+
assert.strictEqual(
|
|
258
|
+
state.result.profileStorage,
|
|
259
|
+
state.storages[0],
|
|
260
|
+
"single storage pass-through returns unproxied target instance"
|
|
261
|
+
);
|
|
262
|
+
assert.deepEqual(
|
|
263
|
+
state.result.profileStorageDirs,
|
|
264
|
+
[state.memoryDir],
|
|
265
|
+
"single storage pass-through returns target storage directory"
|
|
266
|
+
);
|
|
267
|
+
assert.ok(
|
|
268
|
+
state.readProfileResult?.includes("Single Profile"),
|
|
269
|
+
"single storage readProfile delegates to target storage"
|
|
270
|
+
);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if (row.id === "explicit-provider-identity") {
|
|
275
|
+
assert.ok(
|
|
276
|
+
state.readProfileResult?.includes("Profile 2"),
|
|
277
|
+
"readProfile returns first non-empty profile in composite order"
|
|
278
|
+
);
|
|
279
|
+
assert.ok(
|
|
280
|
+
state.readIdentityAnchorResult?.includes("Identity Anchor 2"),
|
|
281
|
+
"readIdentityAnchor returns first non-empty anchor in composite order"
|
|
282
|
+
);
|
|
283
|
+
assert.ok(typeof state.readEntityResult === "string", "readEntity returns raw entity string");
|
|
284
|
+
assert.ok(
|
|
285
|
+
(state.readEntityResult as string).includes("Bob"),
|
|
286
|
+
"readEntity returns entity content from matching storage"
|
|
287
|
+
);
|
|
288
|
+
assert.equal(state.readMemoryByPathResult, null, "readMemoryByPath returns null when absent in all storages");
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
if (row.id === "provider-rebinding") {
|
|
293
|
+
assert.deepEqual(
|
|
294
|
+
state.result.profileStorageDirs,
|
|
295
|
+
[state.memoryDir, state.extraDirs[0]],
|
|
296
|
+
"profileStorageDirs deduplicates directories and filters out empty strings"
|
|
297
|
+
);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
if (row.id === "restart-reload-recovery") {
|
|
302
|
+
assert.ok(
|
|
303
|
+
state.readProfileResult?.includes("Recovered Profile"),
|
|
304
|
+
"composite profile storage recovers state over fresh instances after restart"
|
|
305
|
+
);
|
|
306
|
+
assert.ok(
|
|
307
|
+
state.readIdentityAnchorResult?.includes("Recovered Anchor"),
|
|
308
|
+
"composite identity anchor recovers state over fresh instances after restart"
|
|
309
|
+
);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if (row.id === "session-end") {
|
|
314
|
+
assert.ok(
|
|
315
|
+
state.readProfileResult?.includes("Final Session Profile"),
|
|
316
|
+
"session-end readProfile correctly falls back past blank profile to non-empty profile"
|
|
317
|
+
);
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if (row.id === "dedupe-replay") {
|
|
322
|
+
const questions = state.readQuestionsResult;
|
|
323
|
+
assert.ok(Array.isArray(questions), "readQuestions returns an array");
|
|
324
|
+
assert.equal(questions.length, 3, "readQuestions deduplicates repeated storage records");
|
|
325
|
+
const firstQ = questions[0];
|
|
326
|
+
assert.ok(firstQ && typeof firstQ === "object" && "question" in firstQ && "priority" in firstQ);
|
|
327
|
+
assert.equal(firstQ.question, "How does recall work?", "readQuestions sorts by priority descending");
|
|
328
|
+
assert.equal(firstQ.priority, 10, "highest priority question comes first");
|
|
329
|
+
|
|
330
|
+
const loops = state.readIdentityImprovementLoopsResult;
|
|
331
|
+
assert.equal(
|
|
332
|
+
loops,
|
|
333
|
+
"# Improvement Loop A\n\n# Improvement Loop B",
|
|
334
|
+
"readIdentityImprovementLoops deduplicates identical sections and joins with double newline"
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
const incidents = state.readContinuityIncidentsResult as unknown[];
|
|
338
|
+
assert.ok(Array.isArray(incidents), "readContinuityIncidents returns an array");
|
|
339
|
+
assert.equal(incidents.length, 2, "readContinuityIncidents deduplicates repeated storage records");
|
|
340
|
+
|
|
341
|
+
const entityNames = state.listEntityNamesResult;
|
|
342
|
+
assert.ok(Array.isArray(entityNames), "listEntityNames returns an array");
|
|
343
|
+
assert.deepEqual(new Set(entityNames), new Set(["project-projectx", "project-projecty"]));
|
|
344
|
+
|
|
345
|
+
const memories = state.readAllMemoriesResult as unknown[];
|
|
346
|
+
assert.ok(Array.isArray(memories), "readAllMemories returns an array");
|
|
347
|
+
assert.equal(memories.length, 2, "readAllMemories aggregates memories across composite storages");
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
|
|
352
|
+
async teardown(state: RecallProfileStorageState): Promise<void> {
|
|
353
|
+
if (state.memoryDir) {
|
|
354
|
+
await cleanupDir(state.memoryDir);
|
|
355
|
+
}
|
|
356
|
+
for (const dir of state.extraDirs) {
|
|
357
|
+
await cleanupDir(dir);
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
runLifecycleMatrix("recall-profile-storage", subject);
|