@remnic/core 9.7.13 → 9.7.15
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 +6 -6
- package/dist/access-admin-ops-surface.js +22 -22
- package/dist/access-boundary.d.ts +6 -6
- package/dist/access-boundary.js +23 -23
- package/dist/access-cli.js +51 -51
- package/dist/access-http.d.ts +6 -6
- package/dist/access-http.js +28 -28
- package/dist/access-identity-continuity-surface.d.ts +5 -5
- package/dist/access-identity-continuity-surface.js +22 -22
- package/dist/access-lcm-surface.d.ts +6 -6
- package/dist/access-lcm-surface.js +22 -22
- package/dist/access-mcp.d.ts +6 -6
- package/dist/access-mcp.js +27 -27
- package/dist/access-observe-write-surface.d.ts +6 -6
- package/dist/access-observe-write-surface.js +22 -22
- package/dist/access-operations-batch.js +25 -25
- package/dist/access-operations.d.ts +6 -6
- package/dist/access-operations.js +26 -26
- package/dist/access-recall-surface.d.ts +6 -6
- package/dist/access-recall-surface.js +22 -22
- package/dist/{access-service-tHd3eQpd.d.ts → access-service-DpcYZ9Nl.d.ts} +4 -4
- package/dist/access-service.d.ts +6 -6
- package/dist/access-service.js +22 -22
- package/dist/access-surface-catalog.d.ts +6 -6
- 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/active-recall.js +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +5 -5
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +6 -6
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- 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/{capsule-merge-Z2HUO6IK.js → capsule-merge-5KKJQBWQ.js} +4 -4
- package/dist/{catalog-DEMiw6HZ.d.ts → catalog-C9444P10.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +9 -9
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/causal-trajectory-graph.js +1 -1
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-2RSL6YRA.js → chunk-2AZXIZEN.js} +3 -3
- package/dist/{chunk-OBMR4VIX.js → chunk-2S6QHZGJ.js} +186 -15
- package/dist/chunk-2S6QHZGJ.js.map +1 -0
- package/dist/{chunk-5S7Z5SHA.js → chunk-34RC5RT7.js} +2 -2
- package/dist/{chunk-JKLJ6A7W.js → chunk-3D6AFGQR.js} +2 -2
- package/dist/{chunk-2AL7N3BH.js → chunk-3IY64MV6.js} +4 -2
- package/dist/chunk-3IY64MV6.js.map +1 -0
- package/dist/{chunk-VZ5OJE4X.js → chunk-5VQJBH2G.js} +2 -2
- package/dist/{chunk-N3JDIRBW.js → chunk-74F5STS4.js} +2 -2
- package/dist/{chunk-OC35KQIN.js → chunk-A5UXZRRM.js} +3 -3
- package/dist/{chunk-OKUEZOGW.js → chunk-AITCS2RC.js} +2 -2
- package/dist/{chunk-7XGSIUP5.js → chunk-AJLLIIML.js} +1 -1
- package/dist/{chunk-CE3GMHT4.js → chunk-BS4SGLWV.js} +2 -2
- package/dist/{chunk-2V5QI6NQ.js → chunk-DCFV7A7H.js} +6 -6
- package/dist/{chunk-I3GKTDM2.js → chunk-DMSDUGDM.js} +3 -3
- package/dist/{chunk-D4TLWDYR.js → chunk-DPAENM7O.js} +2 -2
- package/dist/{chunk-AHLPZ2SF.js → chunk-DYP3YYJJ.js} +7 -3
- package/dist/chunk-DYP3YYJJ.js.map +1 -0
- package/dist/{chunk-7MW3CVLD.js → chunk-DZKHSDOM.js} +2 -2
- package/dist/{chunk-HG32URJJ.js → chunk-E6CBU7XP.js} +2 -2
- package/dist/{chunk-675YU5IK.js → chunk-EHCONI6E.js} +2 -2
- package/dist/{chunk-NVXQTRBL.js → chunk-FDCTQWLW.js} +2 -2
- package/dist/{chunk-PA6DMYEK.js → chunk-FIJUY7GG.js} +9 -9
- package/dist/{chunk-UTRJFDP2.js → chunk-FNZQGN76.js} +2 -2
- package/dist/{chunk-V53GJUSL.js → chunk-G4CN3ZXL.js} +6 -6
- package/dist/{chunk-IQULRIZM.js → chunk-G6XXLKC5.js} +3 -3
- package/dist/{chunk-CLFY35ED.js → chunk-HDTQVNWD.js} +3 -3
- package/dist/{chunk-TMGK6YE7.js → chunk-HF77M34J.js} +2 -2
- package/dist/{chunk-6N7R7TR2.js → chunk-INELTPRG.js} +15 -1
- package/dist/chunk-INELTPRG.js.map +1 -0
- package/dist/{chunk-ZC3HG22I.js → chunk-JREB6UFH.js} +2 -2
- package/dist/{chunk-TRH533CA.js → chunk-K7LOWSLU.js} +38 -9
- package/dist/chunk-K7LOWSLU.js.map +1 -0
- package/dist/{chunk-TWGGNUWJ.js → chunk-KDXVOFYY.js} +2 -2
- package/dist/{chunk-RT7IP3D3.js → chunk-KSNVDPDF.js} +2 -2
- package/dist/{chunk-ZIDSD6VC.js → chunk-LRNMRXJO.js} +2 -2
- package/dist/{chunk-QPZCAVDC.js → chunk-LZOV7MX7.js} +12 -12
- package/dist/{chunk-VY6LKKVN.js → chunk-NWTGD4AN.js} +6 -1
- package/dist/chunk-NWTGD4AN.js.map +1 -0
- package/dist/{chunk-Z6WN2KSH.js → chunk-OAZVR2BV.js} +3 -3
- package/dist/{chunk-KQMKF4G2.js → chunk-OVJ2HIPE.js} +21 -21
- package/dist/{chunk-OCY3CRPG.js → chunk-PBNZVPFS.js} +3 -3
- package/dist/{chunk-G5PVJJRA.js → chunk-PBSAPHHA.js} +1 -1
- package/dist/chunk-PBSAPHHA.js.map +1 -0
- package/dist/{chunk-XVLEGMJI.js → chunk-PLQE6MJA.js} +2 -2
- package/dist/{chunk-NKCPUHCI.js → chunk-PQVK2S3J.js} +2 -2
- package/dist/{chunk-OIFZII6J.js → chunk-Q5WG43OP.js} +3 -3
- package/dist/{chunk-YI7XUXLX.js → chunk-QKQYXZVS.js} +28 -26
- package/dist/chunk-QKQYXZVS.js.map +1 -0
- package/dist/{chunk-XUQUBZ7O.js → chunk-QQGPUKMT.js} +2 -2
- package/dist/{chunk-XUQUBZ7O.js.map → chunk-QQGPUKMT.js.map} +1 -1
- package/dist/{chunk-WU46YPY6.js → chunk-RAR2BSEM.js} +1 -1
- package/dist/{chunk-WU46YPY6.js.map → chunk-RAR2BSEM.js.map} +1 -1
- package/dist/{chunk-3SIC3E65.js → chunk-RO4LQGT3.js} +2 -2
- package/dist/{chunk-BQTSGK5Y.js → chunk-RVZRYUQH.js} +2 -2
- package/dist/{chunk-T6U7HDIY.js → chunk-T7Y5KPLN.js} +2 -2
- package/dist/{chunk-HLTAPHZZ.js → chunk-UDQUSU27.js} +2 -2
- package/dist/{chunk-2ZPQUTMW.js → chunk-VDW4VU7B.js} +5 -5
- package/dist/{chunk-ZRXSHGXT.js → chunk-VJVNLNDQ.js} +3 -3
- package/dist/{chunk-UTZW3X2R.js → chunk-XDSXEKYK.js} +2 -2
- package/dist/{chunk-X47LWMKA.js → chunk-XMMESCPD.js} +26 -1
- package/dist/chunk-XMMESCPD.js.map +1 -0
- package/dist/{chunk-FUUF7FMX.js → chunk-ZHIVCODT.js} +2 -2
- package/dist/{cli-D8Tsa4Sh.d.ts → cli-Cd5fMmhq.d.ts} +5 -5
- package/dist/cli.d.ts +8 -8
- package/dist/cli.js +42 -42
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +6 -6
- 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/config.js +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +6 -6
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +6 -6
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-provenance-check.js +4 -4
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/consolidation-undo.js +3 -3
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/conversation-index/backend.d.ts +1 -1
- 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/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 -6
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +5 -5
- 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.d.ts +1 -1
- package/dist/extraction.js +2 -2
- package/dist/fallback-llm.d.ts +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-decay-FO7AM4UR.js → graph-edge-decay-IOGBBAGC.js} +3 -3
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph-snapshot.js +2 -2
- package/dist/graph.d.ts +55 -10
- package/dist/graph.js +1 -1
- package/dist/identity-continuity.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 +14 -14
- package/dist/index.js +51 -51
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- 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-llm.js +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 -6
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +6 -6
- package/dist/maintenance/rebuild-memory-projection.js +7 -7
- package/dist/mcp-memory-inspector-app.d.ts +6 -6
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +44 -2
- package/dist/memory-cache.js +7 -1
- package/dist/memory-corpus-version.js +2 -2
- 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-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 +15 -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 -6
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +2 -2
- package/dist/operator-toolkit.js +21 -21
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +2 -2
- package/dist/orchestration/maintenance.js +8 -8
- package/dist/{orchestrator-B_WXBmuE.d.ts → orchestrator-Bp_jeBHK.d.ts} +4 -4
- package/dist/orchestrator.d.ts +5 -5
- package/dist/orchestrator.js +51 -51
- package/dist/page-versioning.js +3 -3
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-Dvtvt141.d.ts → pipeline-BAj5bx7g.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{qmd-DwBLh_hl.d.ts → qmd-_MDSlj1m.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 +3 -3
- 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-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/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/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +2 -2
- 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/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 +8 -8
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/orama-backend.js +2 -2
- package/dist/search/port.d.ts +12 -1
- package/dist/search/port.js +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/search/remote-backend.js +2 -2
- package/dist/{semantic-consolidation-Dia_6FOn.d.ts → semantic-consolidation-C2m5eHHE.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +7 -7
- package/dist/semantic-rule-promotion.js +6 -6
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +6 -6
- 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 +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/{storage-RshM7i8-.d.ts → storage-hr_Y2z5R.d.ts} +17 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +5 -5
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +2 -2
- 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-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/capsule-import.js +4 -4
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-CHSXOq7s.d.ts → types-Cg8q7W7_.d.ts} +16 -0
- 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 -6
- package/package.json +2 -2
- package/src/config.ts +18 -0
- package/src/graph.test.ts +137 -1
- package/src/graph.ts +274 -17
- package/src/local-llm-thinking.test.ts +55 -1
- package/src/local-llm.ts +14 -0
- package/src/memory-cache.ts +70 -0
- package/src/namespaces/storage.ts +2 -0
- package/src/orchestration/maintenance.ts +7 -0
- package/src/orchestration/workspace-ops.ts +4 -0
- package/src/orchestrator.ts +6 -1
- package/src/qmd.test.ts +22 -0
- package/src/qmd.ts +13 -1
- package/src/search/port.ts +11 -0
- package/src/storage.ts +60 -13
- package/src/types.ts +21 -0
- package/dist/chunk-2AL7N3BH.js.map +0 -1
- package/dist/chunk-6N7R7TR2.js.map +0 -1
- package/dist/chunk-AHLPZ2SF.js.map +0 -1
- package/dist/chunk-G5PVJJRA.js.map +0 -1
- package/dist/chunk-OBMR4VIX.js.map +0 -1
- package/dist/chunk-TRH533CA.js.map +0 -1
- package/dist/chunk-VY6LKKVN.js.map +0 -1
- package/dist/chunk-X47LWMKA.js.map +0 -1
- package/dist/chunk-YI7XUXLX.js.map +0 -1
- /package/dist/{capsule-merge-Z2HUO6IK.js.map → capsule-merge-5KKJQBWQ.js.map} +0 -0
- /package/dist/{chunk-2RSL6YRA.js.map → chunk-2AZXIZEN.js.map} +0 -0
- /package/dist/{chunk-5S7Z5SHA.js.map → chunk-34RC5RT7.js.map} +0 -0
- /package/dist/{chunk-JKLJ6A7W.js.map → chunk-3D6AFGQR.js.map} +0 -0
- /package/dist/{chunk-VZ5OJE4X.js.map → chunk-5VQJBH2G.js.map} +0 -0
- /package/dist/{chunk-N3JDIRBW.js.map → chunk-74F5STS4.js.map} +0 -0
- /package/dist/{chunk-OC35KQIN.js.map → chunk-A5UXZRRM.js.map} +0 -0
- /package/dist/{chunk-OKUEZOGW.js.map → chunk-AITCS2RC.js.map} +0 -0
- /package/dist/{chunk-7XGSIUP5.js.map → chunk-AJLLIIML.js.map} +0 -0
- /package/dist/{chunk-CE3GMHT4.js.map → chunk-BS4SGLWV.js.map} +0 -0
- /package/dist/{chunk-2V5QI6NQ.js.map → chunk-DCFV7A7H.js.map} +0 -0
- /package/dist/{chunk-I3GKTDM2.js.map → chunk-DMSDUGDM.js.map} +0 -0
- /package/dist/{chunk-D4TLWDYR.js.map → chunk-DPAENM7O.js.map} +0 -0
- /package/dist/{chunk-7MW3CVLD.js.map → chunk-DZKHSDOM.js.map} +0 -0
- /package/dist/{chunk-HG32URJJ.js.map → chunk-E6CBU7XP.js.map} +0 -0
- /package/dist/{chunk-675YU5IK.js.map → chunk-EHCONI6E.js.map} +0 -0
- /package/dist/{chunk-NVXQTRBL.js.map → chunk-FDCTQWLW.js.map} +0 -0
- /package/dist/{chunk-PA6DMYEK.js.map → chunk-FIJUY7GG.js.map} +0 -0
- /package/dist/{chunk-UTRJFDP2.js.map → chunk-FNZQGN76.js.map} +0 -0
- /package/dist/{chunk-V53GJUSL.js.map → chunk-G4CN3ZXL.js.map} +0 -0
- /package/dist/{chunk-IQULRIZM.js.map → chunk-G6XXLKC5.js.map} +0 -0
- /package/dist/{chunk-CLFY35ED.js.map → chunk-HDTQVNWD.js.map} +0 -0
- /package/dist/{chunk-TMGK6YE7.js.map → chunk-HF77M34J.js.map} +0 -0
- /package/dist/{chunk-ZC3HG22I.js.map → chunk-JREB6UFH.js.map} +0 -0
- /package/dist/{chunk-TWGGNUWJ.js.map → chunk-KDXVOFYY.js.map} +0 -0
- /package/dist/{chunk-RT7IP3D3.js.map → chunk-KSNVDPDF.js.map} +0 -0
- /package/dist/{chunk-ZIDSD6VC.js.map → chunk-LRNMRXJO.js.map} +0 -0
- /package/dist/{chunk-QPZCAVDC.js.map → chunk-LZOV7MX7.js.map} +0 -0
- /package/dist/{chunk-Z6WN2KSH.js.map → chunk-OAZVR2BV.js.map} +0 -0
- /package/dist/{chunk-KQMKF4G2.js.map → chunk-OVJ2HIPE.js.map} +0 -0
- /package/dist/{chunk-OCY3CRPG.js.map → chunk-PBNZVPFS.js.map} +0 -0
- /package/dist/{chunk-XVLEGMJI.js.map → chunk-PLQE6MJA.js.map} +0 -0
- /package/dist/{chunk-NKCPUHCI.js.map → chunk-PQVK2S3J.js.map} +0 -0
- /package/dist/{chunk-OIFZII6J.js.map → chunk-Q5WG43OP.js.map} +0 -0
- /package/dist/{chunk-3SIC3E65.js.map → chunk-RO4LQGT3.js.map} +0 -0
- /package/dist/{chunk-BQTSGK5Y.js.map → chunk-RVZRYUQH.js.map} +0 -0
- /package/dist/{chunk-T6U7HDIY.js.map → chunk-T7Y5KPLN.js.map} +0 -0
- /package/dist/{chunk-HLTAPHZZ.js.map → chunk-UDQUSU27.js.map} +0 -0
- /package/dist/{chunk-2ZPQUTMW.js.map → chunk-VDW4VU7B.js.map} +0 -0
- /package/dist/{chunk-ZRXSHGXT.js.map → chunk-VJVNLNDQ.js.map} +0 -0
- /package/dist/{chunk-UTZW3X2R.js.map → chunk-XDSXEKYK.js.map} +0 -0
- /package/dist/{chunk-FUUF7FMX.js.map → chunk-ZHIVCODT.js.map} +0 -0
- /package/dist/{graph-edge-decay-FO7AM4UR.js.map → graph-edge-decay-IOGBBAGC.js.map} +0 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { aD as AccessTrackingEntry, A as ActiveRecallChatType, f as ActiveRecallModelFallbackPolicy, d as ActiveRecallPromptStyle, c as ActiveRecallQueryMode, e as ActiveRecallThinking, a3 as AgentAccessAuthToken, bp as AgentAccessHttpConfig, bq as AgentDefaultsConfig, br as AgentPersona, r as AgentPersonaModelConfig, bs as BehaviorLoopAdjustment, g as BehaviorLoopPolicyState, bt as BehaviorSignalDirection, B as BehaviorSignalEvent, bu as BehaviorSignalType, aW as BootstrapOptions, aX as BootstrapResult, l as BriefingActiveThread, bv as BriefingCalendarSourceError, b2 as BriefingConfig, j as BriefingFocus, i as BriefingFollowup, b3 as BriefingOpenCommitment, n as BriefingRecentEntity, m as BriefingResult, h as BriefingSections, b4 as BriefingWindow, bw as BufferEntryState, ay as BufferState, Z as BufferSurpriseEvent, o as BufferTurn, k as CalendarEvent, C as CalendarSource, bx as CaptureMode, by as ChatConfig, q as Checkpoint, bz as CodexCliReasoningEffort, bA as CodexCompactionFlushMode, b7 as CodexCompatConfig, bB as CodexConnectorConfig, aG as CodingContext, bC as CodingGraphLspConfig, a_ as CodingKnowledgeConfig, aZ as CodingModeConfig, bD as CompressionGuidelineActivationState, a5 as CompressionGuidelineOptimizerActionSummary, a4 as CompressionGuidelineOptimizerEventCounts, a6 as CompressionGuidelineOptimizerRuleUpdate, bE as CompressionGuidelineOptimizerSourceWindow, a9 as CompressionGuidelineOptimizerState, bF as ConfidenceTier, bG as ConsolidationAction, bH as ConsolidationItem, aY as ConsolidationObservation, z as ConsolidationResult, ah as ContinuityImprovementLoop, af as ContinuityIncidentCloseInput, ag as ContinuityIncidentOpenInput, ae as ContinuityIncidentRecord, bI as ContinuityIncidentState, bJ as ContinuityLoopCadence, ai as ContinuityLoopReviewInput, bK as ContinuityLoopStatus, aj as ContinuityLoopUpsertInput, bL as ContradictionScanConfig, U as ConversationThread, bM as CronConversationRecallMode, bN as CronRecallMode, b8 as DEFAULT_RECALL_DISCLOSURE, J as DaySummaryResult, bO as DreamingConfig, bP as DreamingNarrativePromptStyle, bQ as DreamsDeepSleepConfig, bR as DreamsLightSleepConfig, D as DreamsPhase, bS as DreamsPhaseStatus, bT as DreamsPhasesConfig, bU as DreamsRemConfig, a as DreamsRunResult, aH as DreamsStatusResult, bV as EngramTraceEvent, aC as EntityActivityEntry, E as EntityFile, aa as EntityMention, aB as EntityRelationship, ab as EntitySchemaDefinition, ac as EntitySchemaSectionDefinition, ad as EntityStructuredSection, aF as EntityTimelineEntry, b9 as ExtractedFact, bW as ExtractedProcedureStep, bX as ExtractedQuestion, bY as ExtractedReasoningTrace, bZ as ExtractedReasoningTraceStep, b_ as ExtractedRelationship, K as ExtractionFailureClass, b$ as ExtractionPassSource, y as ExtractionResult, F as FaithfulnessFrontmatter, aA as FileHygieneConfig, G as GatewayConfig, c0 as GitHubLiveConnectorConfig, c1 as GmailLiveConnectorConfig, c2 as GoogleDriveLiveConnectorConfig, c3 as HeartbeatConfig, c4 as HeartbeatDetectionMode, H as HourlySummary, I as IdentityInjectionMode, Y as ImportanceLevel, ak as ImportanceScore, V as LifecycleState, L as LiveConnectorsConfig, c5 as LlmTraceCallback, c6 as LlmTraceEvent, am as MemoryActionEligibilityContext, bc as MemoryActionEligibilitySource, a8 as MemoryActionEvent, c7 as MemoryActionOutcome, c8 as MemoryActionPolicyDecision, an as MemoryActionPolicyResult, c9 as MemoryActionStatus, a7 as MemoryActionType, u as MemoryCategory, M as MemoryFile, p as MemoryFrontmatter, al as MemoryIntent, x as MemoryLifecycleEvent, ao as MemoryLifecycleEventType, ap as MemoryLifecycleStateSummary, ax as MemoryLink, ca as MemoryLinkType, bd as MemoryObservation, cb as MemoryOsPresetName, w as MemoryProjectionCurrentState, be as MemoryScope, v as MemoryStatus, aE as MemorySummary, az as MetaState, cc as ModelApi, cd as ModelDefinitionConfig, ce as ModelProviderAuthMode, aq as ModelProviderConfig, cf as NamespacePolicy, ar as NativeKnowledgeConfig, cg as NativeKnowledgeFolderRuleConfig, ch as NativeKnowledgeObsidianVaultConfig, ci as NativeKnowledgeOpenClawWorkspaceConfig, cj as NotionLiveConnectorConfig, P as PluginConfig, X as PolicyClass, ck as PrincipalFromSessionKeyMode, cl as PrincipalRule, cm as ProceduralConfig, as as ProvenanceConfig, N as ProvenanceSource, aw as QmdSearchExplain, Q as QmdSearchResult, cn as QuestionEntry, bf as RECALL_DISCLOSURE_LEVELS, co as ReasoningEffort, R as RecallDisclosure, cp as RecallPipelineConfig, b as RecallPlanMode, aV as RecallSectionConfig, s as RecallTierExplain, cq as RecallTraceEvent, cr as RelevanceFeedback, at as RetrievalTier, cs as SPECULATIVE_TTL_DAYS, ct as ScopeProfileAutoPromoteConfig, aI as ScopeProfileConfig, aJ as ScopeProfileLayerId, aK as ScopeProfilePromotionTarget, cu as ScopeProfileTeamProjectConfig, cv as ScopeTeamConfig, cw as ScoredEntity, a2 as SecretRef, cx as SemanticChunkingConfigShape, S as SessionObserverBandConfig, cy as SignalLevel, au as SignalScanResult, cz as SlotBehaviorConfig, cA as SlotMismatchMode, t as SourceConnectorProvenance, av as TopicScore, T as TranscriptEntry, cB as TriggerMode, O as TrustWeights, W as VerificationState, cC as confidenceTier, bm as isRecallDisclosure } from './types-
|
|
1
|
+
export { aD as AccessTrackingEntry, A as ActiveRecallChatType, f as ActiveRecallModelFallbackPolicy, d as ActiveRecallPromptStyle, c as ActiveRecallQueryMode, e as ActiveRecallThinking, a3 as AgentAccessAuthToken, bp as AgentAccessHttpConfig, bq as AgentDefaultsConfig, br as AgentPersona, r as AgentPersonaModelConfig, bs as BehaviorLoopAdjustment, g as BehaviorLoopPolicyState, bt as BehaviorSignalDirection, B as BehaviorSignalEvent, bu as BehaviorSignalType, aW as BootstrapOptions, aX as BootstrapResult, l as BriefingActiveThread, bv as BriefingCalendarSourceError, b2 as BriefingConfig, j as BriefingFocus, i as BriefingFollowup, b3 as BriefingOpenCommitment, n as BriefingRecentEntity, m as BriefingResult, h as BriefingSections, b4 as BriefingWindow, bw as BufferEntryState, ay as BufferState, Z as BufferSurpriseEvent, o as BufferTurn, k as CalendarEvent, C as CalendarSource, bx as CaptureMode, by as ChatConfig, q as Checkpoint, bz as CodexCliReasoningEffort, bA as CodexCompactionFlushMode, b7 as CodexCompatConfig, bB as CodexConnectorConfig, aG as CodingContext, bC as CodingGraphLspConfig, a_ as CodingKnowledgeConfig, aZ as CodingModeConfig, bD as CompressionGuidelineActivationState, a5 as CompressionGuidelineOptimizerActionSummary, a4 as CompressionGuidelineOptimizerEventCounts, a6 as CompressionGuidelineOptimizerRuleUpdate, bE as CompressionGuidelineOptimizerSourceWindow, a9 as CompressionGuidelineOptimizerState, bF as ConfidenceTier, bG as ConsolidationAction, bH as ConsolidationItem, aY as ConsolidationObservation, z as ConsolidationResult, ah as ContinuityImprovementLoop, af as ContinuityIncidentCloseInput, ag as ContinuityIncidentOpenInput, ae as ContinuityIncidentRecord, bI as ContinuityIncidentState, bJ as ContinuityLoopCadence, ai as ContinuityLoopReviewInput, bK as ContinuityLoopStatus, aj as ContinuityLoopUpsertInput, bL as ContradictionScanConfig, U as ConversationThread, bM as CronConversationRecallMode, bN as CronRecallMode, b8 as DEFAULT_RECALL_DISCLOSURE, J as DaySummaryResult, bO as DreamingConfig, bP as DreamingNarrativePromptStyle, bQ as DreamsDeepSleepConfig, bR as DreamsLightSleepConfig, D as DreamsPhase, bS as DreamsPhaseStatus, bT as DreamsPhasesConfig, bU as DreamsRemConfig, a as DreamsRunResult, aH as DreamsStatusResult, bV as EngramTraceEvent, aC as EntityActivityEntry, E as EntityFile, aa as EntityMention, aB as EntityRelationship, ab as EntitySchemaDefinition, ac as EntitySchemaSectionDefinition, ad as EntityStructuredSection, aF as EntityTimelineEntry, b9 as ExtractedFact, bW as ExtractedProcedureStep, bX as ExtractedQuestion, bY as ExtractedReasoningTrace, bZ as ExtractedReasoningTraceStep, b_ as ExtractedRelationship, K as ExtractionFailureClass, b$ as ExtractionPassSource, y as ExtractionResult, F as FaithfulnessFrontmatter, aA as FileHygieneConfig, G as GatewayConfig, c0 as GitHubLiveConnectorConfig, c1 as GmailLiveConnectorConfig, c2 as GoogleDriveLiveConnectorConfig, c3 as HeartbeatConfig, c4 as HeartbeatDetectionMode, H as HourlySummary, I as IdentityInjectionMode, Y as ImportanceLevel, ak as ImportanceScore, V as LifecycleState, L as LiveConnectorsConfig, c5 as LlmTraceCallback, c6 as LlmTraceEvent, am as MemoryActionEligibilityContext, bc as MemoryActionEligibilitySource, a8 as MemoryActionEvent, c7 as MemoryActionOutcome, c8 as MemoryActionPolicyDecision, an as MemoryActionPolicyResult, c9 as MemoryActionStatus, a7 as MemoryActionType, u as MemoryCategory, M as MemoryFile, p as MemoryFrontmatter, al as MemoryIntent, x as MemoryLifecycleEvent, ao as MemoryLifecycleEventType, ap as MemoryLifecycleStateSummary, ax as MemoryLink, ca as MemoryLinkType, bd as MemoryObservation, cb as MemoryOsPresetName, w as MemoryProjectionCurrentState, be as MemoryScope, v as MemoryStatus, aE as MemorySummary, az as MetaState, cc as ModelApi, cd as ModelDefinitionConfig, ce as ModelProviderAuthMode, aq as ModelProviderConfig, cf as NamespacePolicy, ar as NativeKnowledgeConfig, cg as NativeKnowledgeFolderRuleConfig, ch as NativeKnowledgeObsidianVaultConfig, ci as NativeKnowledgeOpenClawWorkspaceConfig, cj as NotionLiveConnectorConfig, P as PluginConfig, X as PolicyClass, ck as PrincipalFromSessionKeyMode, cl as PrincipalRule, cm as ProceduralConfig, as as ProvenanceConfig, N as ProvenanceSource, aw as QmdSearchExplain, Q as QmdSearchResult, cn as QuestionEntry, bf as RECALL_DISCLOSURE_LEVELS, co as ReasoningEffort, R as RecallDisclosure, cp as RecallPipelineConfig, b as RecallPlanMode, aV as RecallSectionConfig, s as RecallTierExplain, cq as RecallTraceEvent, cr as RelevanceFeedback, at as RetrievalTier, cs as SPECULATIVE_TTL_DAYS, ct as ScopeProfileAutoPromoteConfig, aI as ScopeProfileConfig, aJ as ScopeProfileLayerId, aK as ScopeProfilePromotionTarget, cu as ScopeProfileTeamProjectConfig, cv as ScopeTeamConfig, cw as ScoredEntity, a2 as SecretRef, cx as SemanticChunkingConfigShape, S as SessionObserverBandConfig, cy as SignalLevel, au as SignalScanResult, cz as SlotBehaviorConfig, cA as SlotMismatchMode, t as SourceConnectorProvenance, av as TopicScore, T as TranscriptEntry, cB as TriggerMode, O as TrustWeights, W as VerificationState, cC as confidenceTier, bm as isRecallDisclosure } from './types-Cg8q7W7_.js';
|
|
2
2
|
import './message-parts/index.js';
|
package/dist/types.js
CHANGED
package/dist/verified-recall.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compareVerifiedEpisodeResults,
|
|
3
3
|
searchVerifiedEpisodes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q5WG43OP.js";
|
|
5
5
|
import "./chunk-2A3OXAP2.js";
|
|
6
6
|
import "./chunk-ZBJMUXZH.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-K7LOWSLU.js";
|
|
8
8
|
import "./chunk-L2B3EE7B.js";
|
|
9
9
|
import "./chunk-B3ABVQ36.js";
|
|
10
10
|
import "./chunk-5UZXUTVO.js";
|
|
@@ -15,7 +15,7 @@ import "./chunk-6CIAGZ6X.js";
|
|
|
15
15
|
import "./chunk-J6A3CX5N.js";
|
|
16
16
|
import "./chunk-4KJLYTLS.js";
|
|
17
17
|
import "./chunk-SVOZFLIQ.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-PBSAPHHA.js";
|
|
19
19
|
import "./chunk-RULE4VG5.js";
|
|
20
20
|
import "./chunk-SCU65EZI.js";
|
|
21
21
|
import "./chunk-RHOZ5LLO.js";
|
|
@@ -25,9 +25,9 @@ import "./chunk-LDXUBPMO.js";
|
|
|
25
25
|
import "./chunk-VA4WSW54.js";
|
|
26
26
|
import "./chunk-AAD2ZS6P.js";
|
|
27
27
|
import "./chunk-G7D6GZ5J.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-5VQJBH2G.js";
|
|
29
|
+
import "./chunk-AITCS2RC.js";
|
|
30
|
+
import "./chunk-XMMESCPD.js";
|
|
31
31
|
import "./chunk-42JKGUFJ.js";
|
|
32
32
|
import "./chunk-PDJTHRAW.js";
|
|
33
33
|
import "./chunk-W5H6ZRPT.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.15",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3010,7 +3010,7 @@
|
|
|
3010
3010
|
"core"
|
|
3011
3011
|
],
|
|
3012
3012
|
"peerDependencies": {
|
|
3013
|
-
"@remnic/coding-graph": "^9.7.
|
|
3013
|
+
"@remnic/coding-graph": "^9.7.15"
|
|
3014
3014
|
},
|
|
3015
3015
|
"peerDependenciesMeta": {
|
|
3016
3016
|
"@remnic/coding-graph": {
|
package/src/config.ts
CHANGED
|
@@ -2130,6 +2130,10 @@ export function parseConfig(
|
|
|
2130
2130
|
// serves from the version-keyed in-process corpus cache. coerceBool
|
|
2131
2131
|
// handles "false"/"0" string forms; set false to force disk scans.
|
|
2132
2132
|
hotMemoriesCacheEnabled: coerceBool(cfg.hotMemoriesCacheEnabled) ?? true,
|
|
2133
|
+
// Scope-aware cache invalidation (issue #1904). Default on: a plain fact
|
|
2134
|
+
// create no longer nukes the QMD/entity caches it can't affect. coerceBool
|
|
2135
|
+
// handles "false"/"0" string forms; set false to restore full-clear-per-write.
|
|
2136
|
+
scopedCacheInvalidationEnabled: coerceBool(cfg.scopedCacheInvalidationEnabled) ?? true,
|
|
2133
2137
|
// External-edit safety net (issue #1902): the version sentinel gives
|
|
2134
2138
|
// immediate coherence for cooperating writers, but direct user/git/editor
|
|
2135
2139
|
// writes to memory files (which the project supports) don't bump it. Bound
|
|
@@ -2870,6 +2874,15 @@ export function parseConfig(
|
|
|
2870
2874
|
typeof cfg.localLlm400TripThreshold === "number" ? cfg.localLlm400TripThreshold : 5,
|
|
2871
2875
|
localLlm400CooldownMs:
|
|
2872
2876
|
typeof cfg.localLlm400CooldownMs === "number" ? cfg.localLlm400CooldownMs : 120_000,
|
|
2877
|
+
// Ollama thinking suppression dialect (issue #1996): reasoning_effort value
|
|
2878
|
+
// for THINKING_SUPPRESSED_OPERATIONS on the ollama backend. Default "none"
|
|
2879
|
+
// (think off). "" disables injection. Invalid values fall back to "none"
|
|
2880
|
+
// rather than reaching Ollama, which 400s on unknown efforts.
|
|
2881
|
+
localLlmReasoningEffort:
|
|
2882
|
+
typeof cfg.localLlmReasoningEffort === "string" &&
|
|
2883
|
+
["", "none", "low", "medium", "high", "max"].includes(cfg.localLlmReasoningEffort)
|
|
2884
|
+
? cfg.localLlmReasoningEffort
|
|
2885
|
+
: "none",
|
|
2873
2886
|
// Extraction retry/backoff + circuit breaker (extraction hot-loop hardening)
|
|
2874
2887
|
extractionRetryEnabled: coerceBooleanLike(cfg.extractionRetryEnabled) ?? true,
|
|
2875
2888
|
extractionRetryScheduleMs:
|
|
@@ -3522,6 +3535,11 @@ export function parseConfig(
|
|
|
3522
3535
|
memoryReconstructionMaxExpansions:
|
|
3523
3536
|
typeof cfg.memoryReconstructionMaxExpansions === "number" ? Math.max(0, Math.round(cfg.memoryReconstructionMaxExpansions)) : 3,
|
|
3524
3537
|
graphLateralInhibitionEnabled: cfg.graphLateralInhibitionEnabled !== false,
|
|
3538
|
+
// Incremental GraphIndex edge cache (issue #1904). Default on: single-writer
|
|
3539
|
+
// edge appends are pushed into the warm cache in place (size-revalidated for
|
|
3540
|
+
// cross-process coherence) instead of nulling + re-reading the 6 MB edge
|
|
3541
|
+
// file. coerceBool handles string forms; set false to null the cache per write.
|
|
3542
|
+
graphEdgeCacheIncrementalEnabled: coerceBool(cfg.graphEdgeCacheIncrementalEnabled) ?? true,
|
|
3525
3543
|
graphLateralInhibitionBeta:
|
|
3526
3544
|
typeof cfg.graphLateralInhibitionBeta === "number"
|
|
3527
3545
|
? Math.max(0, Math.min(1, cfg.graphLateralInhibitionBeta))
|
package/src/graph.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
2
|
+
import { appendFile, mkdir, mkdtemp, rename, rm, writeFile } from "node:fs/promises";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import test from "node:test";
|
|
@@ -20,6 +20,7 @@ function makeGraphConfig(): GraphConfig {
|
|
|
20
20
|
graphLateralInhibitionTopM: 0,
|
|
21
21
|
graphTraversalConfidenceFloor: 0.2,
|
|
22
22
|
graphTraversalPageRankIterations: 0,
|
|
23
|
+
graphEdgeCacheIncrementalEnabled: true,
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -132,3 +133,138 @@ async function writeGraphEdges(memoryDir: string, edges: GraphEdge[]): Promise<v
|
|
|
132
133
|
await mkdir(path.dirname(filePath), { recursive: true });
|
|
133
134
|
await writeFile(filePath, `${edges.map((edge) => JSON.stringify(edge)).join("\n")}\n`, "utf-8");
|
|
134
135
|
}
|
|
136
|
+
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
// Incremental edge cache (issue #1904). onMemoryWritten pushes single-writer
|
|
139
|
+
// appends into the warm cache in place and reloads only on a peer append.
|
|
140
|
+
// These use a delete-the-file-then-traverse probe instead of a readAllEdges
|
|
141
|
+
// spy: it proves the same invariant more robustly (a reload would read the
|
|
142
|
+
// now-missing file and return nothing, so surviving edges prove no reload).
|
|
143
|
+
// ---------------------------------------------------------------------------
|
|
144
|
+
|
|
145
|
+
const onWriteOpts = {
|
|
146
|
+
entityRef: "Acme",
|
|
147
|
+
content: "",
|
|
148
|
+
created: "2026-01-01T00:00:00.000Z",
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
test("#1904: onMemoryWritten pushes appended edges into the warm cache in place (no reload)", async () => {
|
|
152
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-graph-incr-"));
|
|
153
|
+
try {
|
|
154
|
+
await writeGraphEdges(memoryDir, [makeEdge("seed", "old-sibling")]);
|
|
155
|
+
const graph = new GraphIndex(memoryDir, makeGraphConfig());
|
|
156
|
+
// Warm the edge cache (records the file-size baseline).
|
|
157
|
+
await graph.spreadingActivation(["seed"]);
|
|
158
|
+
// Single-writer append through the write path.
|
|
159
|
+
await graph.onMemoryWritten({
|
|
160
|
+
...onWriteOpts,
|
|
161
|
+
memoryPath: "facts/new.md",
|
|
162
|
+
entitySiblings: ["facts/sibling.md"],
|
|
163
|
+
});
|
|
164
|
+
// Delete the on-disk file: a full reload would now find nothing. The warm
|
|
165
|
+
// cache must still serve the just-appended edge, proving it was pushed in
|
|
166
|
+
// place rather than reconstructed from disk.
|
|
167
|
+
await rm(graphFilePath(memoryDir, "entity"), { force: true });
|
|
168
|
+
const activated = await graph.spreadingActivation(["facts/new.md"]);
|
|
169
|
+
const paths = new Set(activated.map((candidate) => candidate.path));
|
|
170
|
+
assert.ok(
|
|
171
|
+
paths.has("facts/sibling.md"),
|
|
172
|
+
"the in-place-pushed edge must remain traversable after the file is removed (no reload)",
|
|
173
|
+
);
|
|
174
|
+
} finally {
|
|
175
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
test("#1904: onMemoryWritten reloads the edge cache when a peer appended (size mismatch)", async () => {
|
|
180
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-graph-peer-"));
|
|
181
|
+
try {
|
|
182
|
+
await writeGraphEdges(memoryDir, [makeEdge("seed", "old-sibling")]);
|
|
183
|
+
const graph = new GraphIndex(memoryDir, makeGraphConfig());
|
|
184
|
+
await graph.spreadingActivation(["seed"]); // warm + size baseline
|
|
185
|
+
// A peer process appends directly to the file, bypassing this GraphIndex so
|
|
186
|
+
// its size baseline does not account for the extra bytes.
|
|
187
|
+
const peerEdge = makeEdge("facts/new.md", "facts/peer.md");
|
|
188
|
+
await appendFile(graphFilePath(memoryDir, "entity"), `${JSON.stringify(peerEdge)}\n`, "utf8");
|
|
189
|
+
// Our own append: on-disk size now exceeds baseline + our bytes → mismatch.
|
|
190
|
+
await graph.onMemoryWritten({
|
|
191
|
+
...onWriteOpts,
|
|
192
|
+
memoryPath: "facts/new.md",
|
|
193
|
+
entitySiblings: ["facts/sibling.md"],
|
|
194
|
+
});
|
|
195
|
+
// The size mismatch must have nulled the cache; the next traversal reloads
|
|
196
|
+
// and sees BOTH the peer edge and our edge. A stale in-place push would have
|
|
197
|
+
// missed the peer edge entirely.
|
|
198
|
+
const activated = await graph.spreadingActivation(["facts/new.md"]);
|
|
199
|
+
const paths = new Set(activated.map((candidate) => candidate.path));
|
|
200
|
+
assert.ok(paths.has("facts/peer.md"), "peer-appended edge must appear after the coherence reload");
|
|
201
|
+
assert.ok(paths.has("facts/sibling.md"), "our appended edge must also appear after the reload");
|
|
202
|
+
} finally {
|
|
203
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
test("#1904: graphEdgeCacheIncrementalEnabled=false nulls the edge cache on every write (legacy)", async () => {
|
|
208
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-graph-legacy-"));
|
|
209
|
+
try {
|
|
210
|
+
await writeGraphEdges(memoryDir, [makeEdge("seed", "old-sibling")]);
|
|
211
|
+
const graph = new GraphIndex(memoryDir, { ...makeGraphConfig(), graphEdgeCacheIncrementalEnabled: false });
|
|
212
|
+
await graph.spreadingActivation(["seed"]); // warm
|
|
213
|
+
await graph.onMemoryWritten({
|
|
214
|
+
...onWriteOpts,
|
|
215
|
+
memoryPath: "facts/new.md",
|
|
216
|
+
entitySiblings: ["facts/sibling.md"],
|
|
217
|
+
});
|
|
218
|
+
// Legacy: the cache was nulled, so the next traversal reloads from disk.
|
|
219
|
+
// Remove the file first — a nulled cache reloads nothing, proving the write
|
|
220
|
+
// did not extend a warm cache in place.
|
|
221
|
+
await rm(graphFilePath(memoryDir, "entity"), { force: true });
|
|
222
|
+
const activated = await graph.spreadingActivation(["facts/new.md"]);
|
|
223
|
+
const paths = new Set(activated.map((candidate) => candidate.path));
|
|
224
|
+
assert.ok(
|
|
225
|
+
!paths.has("facts/sibling.md"),
|
|
226
|
+
"legacy mode must null the cache on every write (nothing served after the file is removed)",
|
|
227
|
+
);
|
|
228
|
+
} finally {
|
|
229
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
test("#1904: onMemoryWritten reloads when an equal-length atomic rewrite changed the inode (Codex)", async () => {
|
|
234
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-graph-rewrite-"));
|
|
235
|
+
try {
|
|
236
|
+
// Initial edge: seed -> old-sibling. An atomic rewrite later swaps the
|
|
237
|
+
// target to "new-sibling" (also 11 chars), so the JSONL line length is
|
|
238
|
+
// unchanged — a size-only check could not detect this. The temp+rename
|
|
239
|
+
// the decay writer uses changes the inode, which the identity check MUST
|
|
240
|
+
// treat as a divergence and force a reload.
|
|
241
|
+
await writeGraphEdges(memoryDir, [makeEdge("seed", "old-sibling")]);
|
|
242
|
+
const graph = new GraphIndex(memoryDir, makeGraphConfig());
|
|
243
|
+
await graph.spreadingActivation(["seed"]); // warm + identity baseline
|
|
244
|
+
// Peer (decay-style) equal-length atomic rewrite via temp + rename.
|
|
245
|
+
const file = graphFilePath(memoryDir, "entity");
|
|
246
|
+
const rewritten = `${JSON.stringify(makeEdge("seed", "new-sibling"))}\n`;
|
|
247
|
+
const tmp = `${file}.${process.pid}.${Date.now()}.tmp`;
|
|
248
|
+
await writeFile(tmp, rewritten, "utf8");
|
|
249
|
+
await rename(tmp, file);
|
|
250
|
+
// Our own append: the inode changed (temp+rename), so the cache must null
|
|
251
|
+
// and the next traversal must reload — making the rewritten target visible.
|
|
252
|
+
await graph.onMemoryWritten({
|
|
253
|
+
...onWriteOpts,
|
|
254
|
+
memoryPath: "facts/new.md",
|
|
255
|
+
entitySiblings: ["facts/sibling.md"],
|
|
256
|
+
});
|
|
257
|
+
const activated = await graph.spreadingActivation(["seed"]);
|
|
258
|
+
const paths = new Set(activated.map((candidate) => candidate.path));
|
|
259
|
+
assert.ok(
|
|
260
|
+
paths.has("new-sibling"),
|
|
261
|
+
"an equal-length atomic rewrite changed the inode and must force a reload so the new target appears",
|
|
262
|
+
);
|
|
263
|
+
assert.ok(
|
|
264
|
+
!paths.has("old-sibling"),
|
|
265
|
+
"the pre-rewrite target must not linger (a stale in-place push would have kept it)",
|
|
266
|
+
);
|
|
267
|
+
} finally {
|
|
268
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
269
|
+
}
|
|
270
|
+
});
|