@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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { OperationName } from './access-boundary.js';
|
|
2
2
|
import 'zod';
|
|
3
|
-
import './access-service-
|
|
4
|
-
import './catalog-
|
|
5
|
-
import './types-
|
|
3
|
+
import './access-service-DpcYZ9Nl.js';
|
|
4
|
+
import './catalog-C9444P10.js';
|
|
5
|
+
import './types-Cg8q7W7_.js';
|
|
6
6
|
import './message-parts/index.js';
|
|
7
|
-
import './orchestrator-
|
|
7
|
+
import './orchestrator-Bp_jeBHK.js';
|
|
8
8
|
import './briefing.js';
|
|
9
|
-
import './storage-
|
|
9
|
+
import './storage-hr_Y2z5R.js';
|
|
10
10
|
import './page-versioning.js';
|
|
11
11
|
import './consolidation-operator.js';
|
|
12
12
|
import './memory-projection-store.js';
|
|
@@ -34,7 +34,7 @@ import './utility-runtime.js';
|
|
|
34
34
|
import './tier-routing.js';
|
|
35
35
|
import './lifecycle.js';
|
|
36
36
|
import './orchestration/compression-guideline-coordinator.js';
|
|
37
|
-
import './semantic-consolidation-
|
|
37
|
+
import './semantic-consolidation-C2m5eHHE.js';
|
|
38
38
|
import './connectors/codex-materialize.js';
|
|
39
39
|
import './logger.js';
|
|
40
40
|
import './embedding-fallback.js';
|
package/dist/active-recall.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ActiveRecallChatType, c as ActiveRecallQueryMode, d as ActiveRecallPromptStyle, e as ActiveRecallThinking, f as ActiveRecallModelFallbackPolicy } from './types-
|
|
1
|
+
import { A as ActiveRecallChatType, c as ActiveRecallQueryMode, d as ActiveRecallPromptStyle, e as ActiveRecallThinking, f as ActiveRecallModelFallbackPolicy } from './types-Cg8q7W7_.js';
|
|
2
2
|
import './message-parts/index.js';
|
|
3
3
|
|
|
4
4
|
interface ActiveRecallTurn {
|
package/dist/active-recall.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BehaviorSignalEvent, P as PluginConfig, g as BehaviorLoopPolicyState } from './types-
|
|
1
|
+
import { B as BehaviorSignalEvent, P as PluginConfig, g as BehaviorLoopPolicyState } from './types-Cg8q7W7_.js';
|
|
2
2
|
import './message-parts/index.js';
|
|
3
3
|
|
|
4
4
|
declare const TUNABLE_BEHAVIOR_PARAMETERS: readonly ["recencyWeight", "lifecyclePromoteHeatThreshold", "lifecycleStaleDecayThreshold", "cronRecallInstructionHeavyTokenCap"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as MemoryCategory, B as BehaviorSignalEvent } from './types-
|
|
1
|
+
import { u as MemoryCategory, B as BehaviorSignalEvent } from './types-Cg8q7W7_.js';
|
|
2
2
|
import './message-parts/index.js';
|
|
3
3
|
|
|
4
4
|
declare function buildBehaviorSignalHash(category: MemoryCategory, content: string): string;
|
package/dist/bootstrap.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as PluginConfig } from './types-
|
|
2
|
-
import { O as Orchestrator } from './orchestrator-
|
|
1
|
+
import { P as PluginConfig } from './types-Cg8q7W7_.js';
|
|
2
|
+
import { O as Orchestrator } from './orchestrator-Bp_jeBHK.js';
|
|
3
3
|
import './message-parts/index.js';
|
|
4
4
|
import './briefing.js';
|
|
5
|
-
import './storage-
|
|
5
|
+
import './storage-hr_Y2z5R.js';
|
|
6
6
|
import './page-versioning.js';
|
|
7
7
|
import './consolidation-operator.js';
|
|
8
8
|
import './memory-projection-store.js';
|
|
@@ -22,7 +22,7 @@ import './session-integrity.js';
|
|
|
22
22
|
import './summarizer.js';
|
|
23
23
|
import './orchestration/maintenance.js';
|
|
24
24
|
import './namespaces/search.js';
|
|
25
|
-
import './catalog-
|
|
25
|
+
import './catalog-C9444P10.js';
|
|
26
26
|
import './recall-state.js';
|
|
27
27
|
import './compounding/engine.js';
|
|
28
28
|
import './shared-context/manager.js';
|
|
@@ -32,7 +32,7 @@ import './utility-runtime.js';
|
|
|
32
32
|
import './tier-routing.js';
|
|
33
33
|
import './lifecycle.js';
|
|
34
34
|
import './orchestration/compression-guideline-coordinator.js';
|
|
35
|
-
import './semantic-consolidation-
|
|
35
|
+
import './semantic-consolidation-C2m5eHHE.js';
|
|
36
36
|
import './connectors/codex-materialize.js';
|
|
37
37
|
import './logger.js';
|
|
38
38
|
import './embedding-fallback.js';
|
package/dist/briefing.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StorageManager } from './storage-
|
|
2
|
-
import { h as BriefingSections, i as BriefingFollowup, j as BriefingFocus, C as CalendarSource, k as CalendarEvent, M as MemoryFile, l as BriefingActiveThread, m as BriefingResult, E as EntityFile, n as BriefingRecentEntity } from './types-
|
|
1
|
+
import { S as StorageManager } from './storage-hr_Y2z5R.js';
|
|
2
|
+
import { h as BriefingSections, i as BriefingFollowup, j as BriefingFocus, C as CalendarSource, k as CalendarEvent, M as MemoryFile, l as BriefingActiveThread, m as BriefingResult, E as EntityFile, n as BriefingRecentEntity } from './types-Cg8q7W7_.js';
|
|
3
3
|
import './page-versioning.js';
|
|
4
4
|
import './consolidation-operator.js';
|
|
5
5
|
import './memory-projection-store.js';
|
package/dist/briefing.js
CHANGED
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
renderBriefingMarkdown,
|
|
18
18
|
resolveBriefingSaveDir,
|
|
19
19
|
validateBriefingFormat
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-KDXVOFYY.js";
|
|
21
|
+
import "./chunk-K7LOWSLU.js";
|
|
22
22
|
import "./chunk-L2B3EE7B.js";
|
|
23
23
|
import "./chunk-B3ABVQ36.js";
|
|
24
24
|
import "./chunk-5UZXUTVO.js";
|
|
@@ -29,7 +29,7 @@ import "./chunk-6CIAGZ6X.js";
|
|
|
29
29
|
import "./chunk-J6A3CX5N.js";
|
|
30
30
|
import "./chunk-4KJLYTLS.js";
|
|
31
31
|
import "./chunk-SVOZFLIQ.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-PBSAPHHA.js";
|
|
33
33
|
import "./chunk-RULE4VG5.js";
|
|
34
34
|
import "./chunk-SCU65EZI.js";
|
|
35
35
|
import "./chunk-RHOZ5LLO.js";
|
|
@@ -39,9 +39,9 @@ import "./chunk-LDXUBPMO.js";
|
|
|
39
39
|
import "./chunk-VA4WSW54.js";
|
|
40
40
|
import "./chunk-AAD2ZS6P.js";
|
|
41
41
|
import "./chunk-G7D6GZ5J.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-5VQJBH2G.js";
|
|
43
|
+
import "./chunk-AITCS2RC.js";
|
|
44
|
+
import "./chunk-XMMESCPD.js";
|
|
45
45
|
import "./chunk-42JKGUFJ.js";
|
|
46
46
|
import "./chunk-PDJTHRAW.js";
|
|
47
47
|
import "./chunk-W5H6ZRPT.js";
|
package/dist/buffer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StorageManager } from './storage-
|
|
2
|
-
import { P as PluginConfig, o as BufferTurn } from './types-
|
|
1
|
+
import { S as StorageManager } from './storage-hr_Y2z5R.js';
|
|
2
|
+
import { P as PluginConfig, o as BufferTurn } from './types-Cg8q7W7_.js';
|
|
3
3
|
import './page-versioning.js';
|
|
4
4
|
import './consolidation-operator.js';
|
|
5
5
|
import './memory-projection-store.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b6 as BulkImportSourceAdapter } from '../types-
|
|
2
|
-
export { b5 as BulkImportError, $ as BulkImportOptions, a1 as BulkImportResult, a0 as BulkImportSource, ba as ImportSourceRole, _ as ImportTurn, bb as ImportTurnValidationIssue, bl as isImportRole, bn as parseIsoTimestamp, bo as validateImportTurn } from '../types-
|
|
3
|
-
export { a as ProcessBatchContext, P as ProcessBatchFn, b as ProcessBatchResult, f as formatBatchTranscript, r as resolveBulkImportContext, c as runBulkImportPipeline, v as validateBatchSize } from '../pipeline-
|
|
1
|
+
import { b6 as BulkImportSourceAdapter } from '../types-Cg8q7W7_.js';
|
|
2
|
+
export { b5 as BulkImportError, $ as BulkImportOptions, a1 as BulkImportResult, a0 as BulkImportSource, ba as ImportSourceRole, _ as ImportTurn, bb as ImportTurnValidationIssue, bl as isImportRole, bn as parseIsoTimestamp, bo as validateImportTurn } from '../types-Cg8q7W7_.js';
|
|
3
|
+
export { a as ProcessBatchContext, P as ProcessBatchFn, b as ProcessBatchResult, f as formatBatchTranscript, r as resolveBulkImportContext, c as runBulkImportPipeline, v as validateBatchSize } from '../pipeline-BAj5bx7g.js';
|
|
4
4
|
import '../message-parts/index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/calibration.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FallbackLlmClient } from './fallback-llm.js';
|
|
2
|
-
import { G as GatewayConfig, r as AgentPersonaModelConfig } from './types-
|
|
2
|
+
import { G as GatewayConfig, r as AgentPersonaModelConfig } from './types-Cg8q7W7_.js';
|
|
3
3
|
import './resolve-provider-secret.js';
|
|
4
4
|
import './message-parts/index.js';
|
|
5
5
|
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVersion
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5VQJBH2G.js";
|
|
4
4
|
import {
|
|
5
5
|
bumpMemoryCorpusVersionForDir
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-AITCS2RC.js";
|
|
7
|
+
import "./chunk-XMMESCPD.js";
|
|
8
8
|
import "./chunk-42JKGUFJ.js";
|
|
9
9
|
import "./chunk-PDJTHRAW.js";
|
|
10
10
|
import {
|
|
@@ -195,4 +195,4 @@ async function readLocalFile(absPath) {
|
|
|
195
195
|
export {
|
|
196
196
|
mergeCapsule
|
|
197
197
|
};
|
|
198
|
-
//# sourceMappingURL=capsule-merge-
|
|
198
|
+
//# sourceMappingURL=capsule-merge-5KKJQBWQ.js.map
|
|
@@ -2,7 +2,7 @@ import { CausalChainIndex } from './causal-chain.js';
|
|
|
2
2
|
import { ConsolidatedPreference } from './compounding/preference-consolidator.js';
|
|
3
3
|
import './causal-trajectory.js';
|
|
4
4
|
import './objective-state.js';
|
|
5
|
-
import './types-
|
|
5
|
+
import './types-Cg8q7W7_.js';
|
|
6
6
|
import './message-parts/index.js';
|
|
7
7
|
import './lcm/engine.js';
|
|
8
8
|
import './lcm/archive.js';
|
package/dist/causal-behavior.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readChainIndex,
|
|
3
3
|
resolveChainsDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PQVK2S3J.js";
|
|
5
5
|
import "./chunk-2A3OXAP2.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveCausalTrajectoryStoreDir
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AJLLIIML.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeRecallTokens
|
|
11
11
|
} from "./chunk-ZBJMUXZH.js";
|
package/dist/causal-chain.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
stitchCausalChain,
|
|
7
7
|
validateCausalEdge,
|
|
8
8
|
writeChainIndex
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PQVK2S3J.js";
|
|
10
10
|
import "./chunk-2A3OXAP2.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-AJLLIIML.js";
|
|
12
12
|
import "./chunk-ZBJMUXZH.js";
|
|
13
13
|
import "./chunk-37CTGERM.js";
|
|
14
14
|
import "./chunk-A2IYSXDQ.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as GatewayConfig, r as AgentPersonaModelConfig, P as PluginConfig, M as MemoryFile } from './types-
|
|
1
|
+
import { G as GatewayConfig, r as AgentPersonaModelConfig, P as PluginConfig, M as MemoryFile } from './types-Cg8q7W7_.js';
|
|
2
2
|
import { RolloutSummaryInput, MaterializeResult } from './connectors/codex-materialize.js';
|
|
3
3
|
import './message-parts/index.js';
|
|
4
4
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readChainIndex,
|
|
3
3
|
resolveChainsDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PQVK2S3J.js";
|
|
5
5
|
import {
|
|
6
6
|
buildExtensionsBlockForConsolidation
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZHIVCODT.js";
|
|
8
8
|
import {
|
|
9
9
|
runPostConsolidationMaterialize
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RO4LQGT3.js";
|
|
11
11
|
import "./chunk-QLULYKWZ.js";
|
|
12
12
|
import "./chunk-JLNBQWZ2.js";
|
|
13
13
|
import "./chunk-3UXOZBHV.js";
|
|
14
14
|
import "./chunk-2A3OXAP2.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveCausalTrajectoryStoreDir
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AJLLIIML.js";
|
|
18
18
|
import "./chunk-ZBJMUXZH.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-K7LOWSLU.js";
|
|
20
20
|
import "./chunk-L2B3EE7B.js";
|
|
21
21
|
import "./chunk-B3ABVQ36.js";
|
|
22
22
|
import "./chunk-5UZXUTVO.js";
|
|
@@ -27,7 +27,7 @@ import "./chunk-6CIAGZ6X.js";
|
|
|
27
27
|
import "./chunk-J6A3CX5N.js";
|
|
28
28
|
import "./chunk-4KJLYTLS.js";
|
|
29
29
|
import "./chunk-SVOZFLIQ.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-PBSAPHHA.js";
|
|
31
31
|
import "./chunk-RULE4VG5.js";
|
|
32
32
|
import "./chunk-SCU65EZI.js";
|
|
33
33
|
import "./chunk-RHOZ5LLO.js";
|
|
@@ -37,9 +37,9 @@ import "./chunk-LDXUBPMO.js";
|
|
|
37
37
|
import "./chunk-VA4WSW54.js";
|
|
38
38
|
import "./chunk-AAD2ZS6P.js";
|
|
39
39
|
import "./chunk-G7D6GZ5J.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-5VQJBH2G.js";
|
|
41
|
+
import "./chunk-AITCS2RC.js";
|
|
42
|
+
import "./chunk-XMMESCPD.js";
|
|
43
43
|
import "./chunk-42JKGUFJ.js";
|
|
44
44
|
import "./chunk-PDJTHRAW.js";
|
|
45
45
|
import "./chunk-W5H6ZRPT.js";
|
package/dist/causal-retrieval.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readChainIndex,
|
|
3
3
|
resolveChainsDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PQVK2S3J.js";
|
|
5
5
|
import "./chunk-2A3OXAP2.js";
|
|
6
6
|
import {
|
|
7
7
|
readCausalTrajectoryRecords,
|
|
8
8
|
searchCausalTrajectories
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AJLLIIML.js";
|
|
10
10
|
import "./chunk-ZBJMUXZH.js";
|
|
11
11
|
import {
|
|
12
12
|
log
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GraphEdge } from './graph.js';
|
|
2
2
|
import { CausalTrajectoryRecord } from './causal-trajectory.js';
|
|
3
3
|
import './capabilities.js';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-Cg8q7W7_.js';
|
|
5
5
|
import './message-parts/index.js';
|
|
6
6
|
import './objective-state.js';
|
|
7
7
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
resolveCausalTrajectoryStoreDir,
|
|
7
7
|
searchCausalTrajectories,
|
|
8
8
|
validateCausalTrajectoryRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AJLLIIML.js";
|
|
10
10
|
import "./chunk-ZBJMUXZH.js";
|
|
11
11
|
import "./chunk-A2IYSXDQ.js";
|
|
12
12
|
import "./chunk-LPSF4OQH.js";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-TBBDFYXW.js";
|
|
4
4
|
import {
|
|
5
5
|
StorageManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K7LOWSLU.js";
|
|
7
7
|
import {
|
|
8
8
|
assertPathInsideRoot
|
|
9
9
|
} from "./chunk-VSMRDBFT.js";
|
|
10
10
|
import {
|
|
11
11
|
bumpMemoryCorpusVersionForDir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AITCS2RC.js";
|
|
13
13
|
import {
|
|
14
14
|
RECALL_FALLBACK_DIRS
|
|
15
15
|
} from "./chunk-VS2IYZRU.js";
|
|
@@ -755,4 +755,4 @@ export {
|
|
|
755
755
|
listMemoryGovernanceRuns,
|
|
756
756
|
readMemoryGovernanceRunArtifact
|
|
757
757
|
};
|
|
758
|
-
//# sourceMappingURL=chunk-
|
|
758
|
+
//# sourceMappingURL=chunk-2AZXIZEN.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-DEUNUKTD.js";
|
|
7
7
|
|
|
8
8
|
// src/graph.ts
|
|
9
|
-
import { appendFile, mkdir, readFile } from "fs/promises";
|
|
9
|
+
import { appendFile, mkdir, readFile, stat } from "fs/promises";
|
|
10
10
|
import * as path from "path";
|
|
11
11
|
var DEFAULT_GRAPH_TRAVERSAL_CONFIDENCE_FLOOR = 0.2;
|
|
12
12
|
var DEFAULT_GRAPH_TRAVERSAL_PAGERANK_ITERATIONS = 8;
|
|
@@ -217,14 +217,96 @@ var GraphIndex = class _GraphIndex {
|
|
|
217
217
|
if (this.edgeCache && Date.now() - this.edgeCache.loadedAt < _GraphIndex.EDGE_CACHE_TTL_MS) {
|
|
218
218
|
return this.edgeCache.allEdges;
|
|
219
219
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
220
|
+
let allEdges = [];
|
|
221
|
+
let meta = await this.readEnabledGraphFileMeta();
|
|
222
|
+
let stable = false;
|
|
223
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
224
|
+
const before = meta;
|
|
225
|
+
allEdges = await readAllEdges(this.memoryDir, {
|
|
226
|
+
entityGraph: this.cfg.entityGraphEnabled,
|
|
227
|
+
timeGraph: this.cfg.timeGraphEnabled,
|
|
228
|
+
causalGraph: this.cfg.causalGraphEnabled
|
|
229
|
+
});
|
|
230
|
+
meta = await this.readEnabledGraphFileMeta();
|
|
231
|
+
if (this.graphFileMetaEqual(before, meta)) {
|
|
232
|
+
stable = true;
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
if (stable) {
|
|
237
|
+
this.edgeCache = { allEdges, loadedAt: Date.now(), meta };
|
|
238
|
+
} else {
|
|
239
|
+
this.edgeCache = null;
|
|
240
|
+
}
|
|
226
241
|
return allEdges;
|
|
227
242
|
}
|
|
243
|
+
/**
|
|
244
|
+
* Identity ({ size, mtimeMs, ino }) of each ENABLED graph file (issue #1904).
|
|
245
|
+
* Missing files (ENOENT) and any stat error map to the all-zero sentinel so
|
|
246
|
+
* the baseline is fail-open: a later revalidation sees a mismatch (or a peer
|
|
247
|
+
* creation flipping ino from 0 to non-zero) and forces a full reload rather
|
|
248
|
+
* than trusting a stale incremental push.
|
|
249
|
+
*/
|
|
250
|
+
async readEnabledGraphFileMeta() {
|
|
251
|
+
const enabled = [];
|
|
252
|
+
if (this.cfg.entityGraphEnabled) enabled.push("entity");
|
|
253
|
+
if (this.cfg.timeGraphEnabled) enabled.push("time");
|
|
254
|
+
if (this.cfg.causalGraphEnabled) enabled.push("causal");
|
|
255
|
+
const meta = {};
|
|
256
|
+
for (const type of enabled) {
|
|
257
|
+
try {
|
|
258
|
+
const st = await stat(graphFilePath(this.memoryDir, type));
|
|
259
|
+
meta[type] = { size: st.size, mtimeMs: st.mtimeMs, ino: Number(st.ino) };
|
|
260
|
+
} catch {
|
|
261
|
+
meta[type] = { size: 0, mtimeMs: 0, ino: 0 };
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return meta;
|
|
265
|
+
}
|
|
266
|
+
/** True iff both metadata maps carry identical identity for every key. */
|
|
267
|
+
graphFileMetaEqual(a, b) {
|
|
268
|
+
const types = ["entity", "time", "causal"];
|
|
269
|
+
for (const type of types) {
|
|
270
|
+
const x = a[type];
|
|
271
|
+
const y = b[type];
|
|
272
|
+
if (!x && !y) continue;
|
|
273
|
+
if (!x || !y) return false;
|
|
274
|
+
if (x.size !== y.size || x.mtimeMs !== y.mtimeMs || x.ino !== y.ino) return false;
|
|
275
|
+
}
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Re-stat every graph file whose identity the cache just committed and return
|
|
280
|
+
* false if any has moved since (issue #1904, Codex). Closes the validation→
|
|
281
|
+
* in-place-push TOCTOU window: a peer process (concurrent CLI / daemon /
|
|
282
|
+
* decay job) can append between edgeFilesUnchangedExceptOurAppends()'s final
|
|
283
|
+
* stat and the allEdges.push(...). Without this re-check the cache would be
|
|
284
|
+
* accepted with identity predating the peer write and miss the peer edge for
|
|
285
|
+
* the TTL. A residual infinitesimal window (peer writes during this re-stat)
|
|
286
|
+
* remains and is TTL-bounded.
|
|
287
|
+
*/
|
|
288
|
+
async edgeCacheIdentityUnchangedSinceCommit() {
|
|
289
|
+
if (!this.edgeCache) return false;
|
|
290
|
+
for (const type of Object.keys(this.edgeCache.meta)) {
|
|
291
|
+
const committed = this.edgeCache.meta[type];
|
|
292
|
+
if (!committed) continue;
|
|
293
|
+
let cur;
|
|
294
|
+
try {
|
|
295
|
+
const st = await stat(graphFilePath(this.memoryDir, type));
|
|
296
|
+
cur = { size: st.size, mtimeMs: st.mtimeMs, ino: Number(st.ino) };
|
|
297
|
+
} catch (err) {
|
|
298
|
+
if (err?.code === "ENOENT") {
|
|
299
|
+
cur = { size: 0, mtimeMs: 0, ino: 0 };
|
|
300
|
+
} else {
|
|
301
|
+
return false;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
if (cur.size !== committed.size || cur.mtimeMs !== committed.mtimeMs || cur.ino !== committed.ino) {
|
|
305
|
+
return false;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return true;
|
|
309
|
+
}
|
|
228
310
|
/**
|
|
229
311
|
* Called after a memory is written to disk.
|
|
230
312
|
*
|
|
@@ -244,52 +326,141 @@ var GraphIndex = class _GraphIndex {
|
|
|
244
326
|
const timeOn = g ? g.timeGraph : this.cfg.timeGraphEnabled;
|
|
245
327
|
const causalOn = g ? g.causalGraph : this.cfg.causalGraphEnabled;
|
|
246
328
|
const ts = (/* @__PURE__ */ new Date()).toISOString();
|
|
329
|
+
const appended = [];
|
|
247
330
|
try {
|
|
248
331
|
if (entityOn && opts.entityRef && opts.entitySiblings?.length) {
|
|
249
332
|
const siblings = opts.entitySiblings.slice(0, this.cfg.maxEntityGraphEdgesPerMemory);
|
|
250
333
|
for (const sibling of siblings) {
|
|
251
|
-
|
|
334
|
+
const edge = {
|
|
252
335
|
from: opts.memoryPath,
|
|
253
336
|
to: sibling,
|
|
254
337
|
type: "entity",
|
|
255
338
|
weight: 1,
|
|
256
339
|
label: opts.entityRef,
|
|
257
340
|
ts
|
|
258
|
-
}
|
|
341
|
+
};
|
|
342
|
+
appended.push(edge);
|
|
343
|
+
await appendEdge(this.memoryDir, edge);
|
|
259
344
|
}
|
|
260
345
|
}
|
|
261
346
|
if (timeOn && opts.threadId && opts.recentInThread?.length) {
|
|
262
347
|
const predecessor = opts.recentInThread[opts.recentInThread.length - 1];
|
|
263
348
|
if (predecessor && predecessor !== opts.memoryPath) {
|
|
264
|
-
|
|
349
|
+
const edge = {
|
|
265
350
|
from: predecessor,
|
|
266
351
|
to: opts.memoryPath,
|
|
267
352
|
type: "time",
|
|
268
353
|
weight: 1,
|
|
269
354
|
label: opts.threadId,
|
|
270
355
|
ts
|
|
271
|
-
}
|
|
356
|
+
};
|
|
357
|
+
appended.push(edge);
|
|
358
|
+
await appendEdge(this.memoryDir, edge);
|
|
272
359
|
}
|
|
273
360
|
}
|
|
274
361
|
if (causalOn && opts.causalPredecessor) {
|
|
275
362
|
const phrase = detectCausalPhrase(opts.content);
|
|
276
363
|
if (phrase) {
|
|
277
|
-
|
|
364
|
+
const edge = {
|
|
278
365
|
from: opts.causalPredecessor,
|
|
279
366
|
to: opts.memoryPath,
|
|
280
367
|
type: "causal",
|
|
281
368
|
weight: 1,
|
|
282
369
|
label: phrase,
|
|
283
370
|
ts
|
|
284
|
-
}
|
|
371
|
+
};
|
|
372
|
+
appended.push(edge);
|
|
373
|
+
await appendEdge(this.memoryDir, edge);
|
|
285
374
|
}
|
|
286
375
|
}
|
|
287
376
|
} catch (err) {
|
|
288
377
|
const { log } = await import("./logger.js");
|
|
289
378
|
log.warn(`[graph] onMemoryWritten error: ${err}`);
|
|
290
379
|
} finally {
|
|
291
|
-
this.edgeCache
|
|
380
|
+
if (!this.edgeCache || Date.now() - this.edgeCache.loadedAt >= _GraphIndex.EDGE_CACHE_TTL_MS) {
|
|
381
|
+
this.edgeCache = null;
|
|
382
|
+
} else if (this.cfg.graphEdgeCacheIncrementalEnabled === false) {
|
|
383
|
+
this.edgeCache = null;
|
|
384
|
+
} else {
|
|
385
|
+
try {
|
|
386
|
+
if (await this.edgeFilesUnchangedExceptOurAppends(appended)) {
|
|
387
|
+
if (appended.length > 0) {
|
|
388
|
+
this.edgeCache.allEdges.push(...appended);
|
|
389
|
+
if (this.edgeCache && !await this.edgeCacheIdentityUnchangedSinceCommit()) {
|
|
390
|
+
this.edgeCache = null;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
} else {
|
|
394
|
+
this.edgeCache = null;
|
|
395
|
+
}
|
|
396
|
+
} catch {
|
|
397
|
+
this.edgeCache = null;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Cross-process coherence check for the incremental edge cache (issue #1904).
|
|
404
|
+
*
|
|
405
|
+
* Returns true iff every ENABLED graph file's current identity is explained
|
|
406
|
+
* ENTIRELY by THIS call's own append — no other process wrote to any graph
|
|
407
|
+
* file since load. Per file:
|
|
408
|
+
* - inode must be unchanged. A local append (`appendFile`) keeps the inode;
|
|
409
|
+
* an external atomic temp+rename rewrite (e.g. the edge-decay job) changes
|
|
410
|
+
* it, so an inode change — even one that preserves byte length, such as
|
|
411
|
+
* decaying confidence 0.9->0.8 — forces a reload (Codex).
|
|
412
|
+
* - a file WE appended to (delta > 0): size must equal baseline + our exact
|
|
413
|
+
* appended bytes. If it was absent at load (sentinel ino 0), our append
|
|
414
|
+
* created it, so we accept size === delta and adopt the new identity.
|
|
415
|
+
* - a file we did NOT touch (delta 0): size AND mtime must be unchanged, so
|
|
416
|
+
* an in-place equal-length rewrite (mtime bump) or a peer append (size
|
|
417
|
+
* bump) both force a reload.
|
|
418
|
+
* On success it commits the new identity baseline so the next append
|
|
419
|
+
* revalidates against post-this-write truth. Fail-open: an unreadable file
|
|
420
|
+
* (non-ENOENT) returns false, forcing a full reload.
|
|
421
|
+
*/
|
|
422
|
+
async edgeFilesUnchangedExceptOurAppends(appended) {
|
|
423
|
+
if (!this.edgeCache) return false;
|
|
424
|
+
const expectedDelta = {};
|
|
425
|
+
for (const edge of appended) {
|
|
426
|
+
const bytes = Buffer.byteLength(`${JSON.stringify(edge)}
|
|
427
|
+
`, "utf8");
|
|
428
|
+
expectedDelta[edge.type] = (expectedDelta[edge.type] ?? 0) + bytes;
|
|
429
|
+
}
|
|
430
|
+
const enabled = [];
|
|
431
|
+
if (this.cfg.entityGraphEnabled) enabled.push("entity");
|
|
432
|
+
if (this.cfg.timeGraphEnabled) enabled.push("time");
|
|
433
|
+
if (this.cfg.causalGraphEnabled) enabled.push("causal");
|
|
434
|
+
const observed = {};
|
|
435
|
+
for (const type of enabled) {
|
|
436
|
+
let cur;
|
|
437
|
+
try {
|
|
438
|
+
const st = await stat(graphFilePath(this.memoryDir, type));
|
|
439
|
+
cur = { size: st.size, mtimeMs: st.mtimeMs, ino: Number(st.ino) };
|
|
440
|
+
} catch (err) {
|
|
441
|
+
if (err?.code === "ENOENT") {
|
|
442
|
+
cur = { size: 0, mtimeMs: 0, ino: 0 };
|
|
443
|
+
} else {
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
const base = this.edgeCache.meta[type] ?? { size: 0, mtimeMs: 0, ino: 0 };
|
|
448
|
+
const delta = expectedDelta[type] ?? 0;
|
|
449
|
+
if (delta > 0) {
|
|
450
|
+
if (base.ino === 0) {
|
|
451
|
+
if (cur.ino === 0 || cur.size !== delta) return false;
|
|
452
|
+
} else {
|
|
453
|
+
if (cur.ino !== base.ino || cur.size !== base.size + delta) return false;
|
|
454
|
+
}
|
|
455
|
+
} else {
|
|
456
|
+
if (cur.ino !== base.ino || cur.size !== base.size || cur.mtimeMs !== base.mtimeMs) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
observed[type] = cur;
|
|
292
461
|
}
|
|
462
|
+
this.edgeCache.meta = observed;
|
|
463
|
+
return true;
|
|
293
464
|
}
|
|
294
465
|
/**
|
|
295
466
|
* Spreading activation BFS (SYNAPSE-inspired).
|
|
@@ -532,4 +703,4 @@ export {
|
|
|
532
703
|
applyPageRankRefinement,
|
|
533
704
|
applyLateralInhibition
|
|
534
705
|
};
|
|
535
|
-
//# sourceMappingURL=chunk-
|
|
706
|
+
//# sourceMappingURL=chunk-2S6QHZGJ.js.map
|