@remnic/core 9.3.683 → 9.3.685
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-boundary.d.ts +5 -4
- package/dist/access-boundary.js +27 -26
- package/dist/access-cli.js +75 -75
- package/dist/access-http.d.ts +5 -4
- package/dist/access-http.js +32 -31
- package/dist/access-mcp.d.ts +5 -4
- package/dist/access-mcp.js +29 -28
- package/dist/access-operations.d.ts +5 -4
- package/dist/access-operations.js +28 -27
- package/dist/{access-service-DvA6jyHL.d.ts → access-service-DeKrlYU_.d.ts} +2 -11
- package/dist/access-service.d.ts +5 -4
- package/dist/access-service.js +26 -25
- package/dist/access-surface-catalog.d.ts +5 -4
- 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 +3 -3
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/{auto-sync-5CJBJMPZ.js → auto-sync-NUQWSFQD.js} +7 -7
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +4 -3
- package/dist/bootstrap.js +2 -2
- package/dist/boxes.js +2 -2
- package/dist/briefing.d.ts +1 -1
- package/dist/briefing.js +5 -4
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +1 -1
- package/dist/buffer.js +2 -2
- package/dist/calibration.d.ts +1 -1
- package/dist/calibration.js +4 -4
- package/dist/capabilities.d.ts +1 -1
- package/dist/catalog-COqWZlZ6.d.ts +456 -0
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-behavior.js +4 -4
- package/dist/causal-chain.js +4 -4
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +13 -12
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +4 -4
- package/dist/causal-trajectory-graph.js +1 -1
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-UJDV2NLT.js → chunk-2KAYTPPT.js} +12 -12
- package/dist/{chunk-QUA2JPH2.js → chunk-2SJCWLQD.js} +3 -3
- package/dist/{chunk-YTWNKQ2G.js → chunk-3FC6LW6T.js} +2 -2
- package/dist/{chunk-I75DF4FZ.js → chunk-4FE2K57M.js} +3 -3
- package/dist/{chunk-L5MUA6Q7.js → chunk-4N3TFFPH.js} +2 -2
- package/dist/{chunk-BTVX7ZXZ.js → chunk-4NFVPDIL.js} +4 -4
- package/dist/{chunk-OUWAQVDJ.js → chunk-5CEJH5ZN.js} +2 -2
- package/dist/{chunk-IUZWBCJX.js → chunk-6GJS4BFH.js} +10 -7
- package/dist/chunk-6GJS4BFH.js.map +1 -0
- package/dist/{chunk-UAODC6GJ.js → chunk-6O6A6YUO.js} +4 -4
- package/dist/{chunk-HQ6NIBL6.js → chunk-7FL4CNPV.js} +2 -2
- package/dist/{chunk-5VDJMYTF.js → chunk-7WWURLG6.js} +3 -3
- package/dist/{chunk-QWRC7GIO.js → chunk-A4HH2EWA.js} +5 -5
- package/dist/{chunk-4SKKVWLQ.js → chunk-AGJH5ISO.js} +2 -2
- package/dist/{chunk-APJQ6UEA.js → chunk-AGNBY3VG.js} +4 -4
- package/dist/{chunk-I3HSKQT7.js → chunk-B43NZNMG.js} +68 -106
- package/dist/chunk-B43NZNMG.js.map +1 -0
- package/dist/{chunk-NQMBSSWW.js → chunk-B4XVLHJA.js} +3 -3
- package/dist/{chunk-GSTYVG5L.js → chunk-BFVPIKDY.js} +3 -3
- package/dist/{chunk-TY5NT3T3.js → chunk-BLIWOONZ.js} +51 -43
- package/dist/chunk-BLIWOONZ.js.map +1 -0
- package/dist/{chunk-AJU4PJGY.js → chunk-BVKCV2ZY.js} +2 -2
- package/dist/{chunk-QVWM4C24.js → chunk-BZISAF67.js} +9 -10
- package/dist/chunk-BZISAF67.js.map +1 -0
- package/dist/{chunk-EG4TCVMU.js → chunk-CTOQEZSN.js} +2 -2
- package/dist/{chunk-7OGJQP7T.js → chunk-DCWIQFNA.js} +4 -4
- package/dist/{chunk-MHQC2WU2.js → chunk-DKTSR7EK.js} +2 -2
- package/dist/{chunk-RN7MUWON.js → chunk-EHISUJFN.js} +2 -2
- package/dist/{chunk-WLEB7WCG.js → chunk-EO5QWINU.js} +2 -2
- package/dist/{chunk-XKXKSQU7.js → chunk-EXM3CQTZ.js} +2 -2
- package/dist/{chunk-TOQEZ63C.js → chunk-FE6DQUNJ.js} +9 -9
- package/dist/{chunk-LCC5EZTT.js → chunk-FIVDN2SM.js} +4 -4
- package/dist/{chunk-452WDNFO.js → chunk-GG6AJN7A.js} +2 -2
- package/dist/{chunk-O2WELT5C.js → chunk-GS55WYRL.js} +3 -3
- package/dist/{chunk-OHX52AOS.js → chunk-GTDH3IUH.js} +2 -2
- package/dist/{chunk-IBTZEBUD.js → chunk-HYNHLBKA.js} +2 -2
- package/dist/{chunk-V254FAT5.js → chunk-IIDSFFE5.js} +2 -2
- package/dist/{chunk-EVWIEEKZ.js → chunk-IQ7WCZRW.js} +2 -2
- package/dist/{chunk-B5XMS73R.js → chunk-IQVQJJL7.js} +2 -2
- package/dist/{chunk-M4I3TREG.js → chunk-JPCKLFWK.js} +29 -30
- package/dist/{chunk-M4I3TREG.js.map → chunk-JPCKLFWK.js.map} +1 -1
- package/dist/{chunk-6RHNCKHG.js → chunk-K43PI6DQ.js} +2 -2
- package/dist/{chunk-OIF36KGD.js → chunk-KCQA46NR.js} +2 -2
- package/dist/{chunk-2LDBXPLB.js → chunk-KF74X62T.js} +1 -1
- package/dist/{chunk-MAV46GWQ.js → chunk-KYYL4U6X.js} +2 -2
- package/dist/{chunk-6GC5SGFE.js → chunk-L24JROPR.js} +2 -2
- package/dist/{chunk-6VP3YUCS.js → chunk-LLONI6PY.js} +2 -2
- package/dist/{chunk-Q5ZU3RNY.js → chunk-LQ6JI4VH.js} +2 -2
- package/dist/{chunk-ODWI5XU2.js → chunk-MCQDSY4G.js} +3 -3
- package/dist/{chunk-HP5FMB6L.js → chunk-MDJURR27.js} +2 -2
- package/dist/{chunk-FMSDA2D3.js → chunk-NGFEWFNK.js} +1 -1
- package/dist/chunk-NGFEWFNK.js.map +1 -0
- package/dist/{chunk-2ODBA7MQ.js → chunk-NU3CSQ4H.js} +5 -5
- package/dist/chunk-NU3CSQ4H.js.map +1 -0
- package/dist/{chunk-T2PO5MUF.js → chunk-O7GOFAM3.js} +2 -2
- package/dist/{chunk-Z2OXSMZK.js → chunk-OBXTMFZQ.js} +3 -3
- package/dist/{chunk-FDSOMA6M.js → chunk-OFUULUSY.js} +8 -9
- package/dist/{chunk-FDSOMA6M.js.map → chunk-OFUULUSY.js.map} +1 -1
- package/dist/{chunk-KV6CX4ON.js → chunk-OV4D5T7V.js} +3 -3
- package/dist/{chunk-KACIOX42.js → chunk-PH3HOKYW.js} +2 -2
- package/dist/{chunk-NHFXF4ZO.js → chunk-PK6RGRSD.js} +2 -2
- package/dist/{chunk-C3IW2F5Z.js → chunk-PLBIPT6I.js} +2 -2
- package/dist/{chunk-QY7YA7OL.js → chunk-PNLCEFE4.js} +2 -2
- package/dist/{chunk-AGRPGAKR.js → chunk-PONNZ54D.js} +2 -2
- package/dist/{chunk-XZ4WBBB5.js → chunk-PWFWCGOO.js} +2 -2
- package/dist/{chunk-G7Z3C2X6.js → chunk-QANVLERJ.js} +4 -4
- package/dist/{chunk-W4RVMTHR.js → chunk-QRDOSYOR.js} +2 -2
- package/dist/{chunk-6IMKOIZ6.js → chunk-R6OVFAX6.js} +2 -2
- package/dist/{chunk-2QSZNTDO.js → chunk-RKNJBZ55.js} +4 -4
- package/dist/{chunk-JOASJWQR.js → chunk-SANZHXY2.js} +2 -2
- package/dist/{chunk-7DTASS5T.js → chunk-SJHM6I4J.js} +2 -2
- package/dist/{chunk-H4BDNIKQ.js → chunk-SQGPGC76.js} +14 -24
- package/dist/{chunk-H4BDNIKQ.js.map → chunk-SQGPGC76.js.map} +1 -1
- package/dist/{chunk-B2B2IHUH.js → chunk-STOEE37X.js} +4 -4
- package/dist/{chunk-GKKAXVAJ.js → chunk-U33LWTQQ.js} +1 -7
- package/dist/chunk-U33LWTQQ.js.map +1 -0
- package/dist/{chunk-GNAMDNGT.js → chunk-U7D7NP4J.js} +5 -5
- package/dist/{chunk-DRD2Q7HQ.js → chunk-UFS7OXGL.js} +2 -2
- package/dist/{chunk-H3HDXD3U.js → chunk-UPTZYUYJ.js} +2 -2
- package/dist/{chunk-3IND7N4X.js → chunk-UTYBJR7M.js} +2 -2
- package/dist/{chunk-LN4YGHTM.js → chunk-UUH4YQOF.js} +2 -2
- package/dist/{chunk-6VF75M3X.js → chunk-VGUOEDTU.js} +2 -2
- package/dist/{chunk-44VFF3BB.js → chunk-VILEUJXC.js} +2 -2
- package/dist/{chunk-7SI52C65.js → chunk-VL7DP3OW.js} +2 -2
- package/dist/{chunk-7DHTMOND.js → chunk-VQ34TERH.js} +2 -2
- package/dist/{chunk-H6PMGMNP.js → chunk-VX6OBUDW.js} +2 -2
- package/dist/{chunk-EW5KFXHL.js → chunk-WDXCNJSF.js} +7 -7
- package/dist/{chunk-ARLRTZZZ.js → chunk-WIHPNY65.js} +79 -3
- package/dist/chunk-WIHPNY65.js.map +1 -0
- package/dist/{chunk-X6IRLNOO.js → chunk-WIWPSQYU.js} +2 -2
- package/dist/{chunk-DOCTITOP.js → chunk-WRFKZEO6.js} +2 -2
- package/dist/{chunk-E6ZDCOHM.js → chunk-XBZQRZ6G.js} +2 -2
- package/dist/{chunk-7YX23JBA.js → chunk-XHYGJVXL.js} +2 -2
- package/dist/{chunk-JD4SCARD.js → chunk-YN4ZT4CW.js} +1 -1
- package/dist/{chunk-YXWAILM4.js → chunk-YOI3ELXF.js} +2 -2
- package/dist/{chunk-XCAZF7KQ.js → chunk-ZA2S2VLL.js} +2 -2
- package/dist/{chunk-BEUDU7Y4.js → chunk-ZCWIH4LH.js} +2 -2
- package/dist/chunk-ZPQVJEVQ.js +184 -0
- package/dist/chunk-ZPQVJEVQ.js.map +1 -0
- package/dist/{chunk-WEPMT6SC.js → chunk-ZPTISBQU.js} +8 -8
- package/dist/{cli-feUe-x3I.d.ts → cli-D3-Q5Uod.d.ts} +3 -3
- package/dist/cli.d.ts +6 -5
- package/dist/cli.js +54 -54
- package/dist/compounding/engine.d.ts +1 -1
- package/dist/compounding/engine.js +6 -5
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compounding/preference-consolidator.js +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +3 -3
- 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/codex-materialize.js +2 -2
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +9 -9
- package/dist/consolidation-provenance-check.d.ts +1 -1
- package/dist/consolidation-undo.d.ts +1 -1
- package/dist/contradiction/index.d.ts +1 -1
- package/dist/contradiction/index.js +3 -3
- package/dist/{contradiction-scan-AZTGFMPY.js → contradiction-scan-HWGEOUDS.js} +3 -3
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/backend.js +5 -5
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/cleanup.js +2 -2
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.js +2 -2
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/indexer.js +2 -2
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/conversation-index/search.js +2 -2
- package/dist/day-summary.d.ts +1 -1
- package/dist/day-summary.js +2 -2
- 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/embedding-fallback.js +2 -2
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +1 -1
- package/dist/entity-retrieval.js +7 -5
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +4 -3
- package/dist/explicit-capture.js +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-telemetry.js +2 -2
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge-training.js +2 -2
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction-judge.js +5 -5
- package/dist/extraction.d.ts +1 -1
- package/dist/extraction.js +9 -9
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/fallback-llm.js +4 -4
- package/dist/{first-start-migration-FF7YFGRP.js → first-start-migration-PG5HBC3K.js} +4 -4
- package/dist/{graph-edge-decay-KSVJGCZW.js → graph-edge-decay-D7OESCBR.js} +2 -2
- package/dist/graph-snapshot.js +2 -2
- package/dist/graph.js +1 -1
- package/dist/identity-continuity.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.js +112 -112
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/archive.js +2 -2
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +5 -5
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +8 -8
- package/dist/lcm/schema.js +2 -2
- package/dist/lcm/summarizer.js +3 -3
- 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 +2 -2
- package/dist/logger.js +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +6 -4
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +6 -4
- package/dist/maintenance/rebuild-memory-projection.js +8 -6
- package/dist/mcp-memory-inspector-app.d.ts +5 -4
- 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-worth-outcomes.d.ts +1 -1
- package/dist/model-registry.js +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/models-json.js +2 -2
- package/dist/namespaces/migrate.d.ts +2 -1
- package/dist/namespaces/migrate.js +18 -17
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +13 -13
- package/dist/namespaces/storage.d.ts +43 -2
- package/dist/namespaces/storage.js +6 -4
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/native-knowledge.js +2 -2
- package/dist/negative.js +2 -2
- package/dist/operator-toolkit.d.ts +1 -1
- package/dist/operator-toolkit.js +24 -24
- package/dist/{orchestrator-7zPqGupX.d.ts → orchestrator-CA6ouzBn.d.ts} +5 -466
- package/dist/orchestrator.d.ts +4 -3
- package/dist/orchestrator.js +68 -67
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/profiling.js +2 -2
- package/dist/provenance.d.ts +94 -0
- package/dist/provenance.js +17 -0
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +1 -1
- package/dist/qmd.js +2 -2
- 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-planner-llm.js +4 -4
- package/dist/recall-qos.js +2 -2
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-state.js +2 -2
- package/dist/recall-tag-filter.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/relevance.js +2 -2
- package/dist/{resolution-IDTEBJFS.js → resolution-MN36NW5P.js} +3 -3
- package/dist/resolution-MN36NW5P.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resolve-provider-secret.js +2 -2
- package/dist/resume-bundles.js +5 -5
- package/dist/retrieval-agents.d.ts +1 -1
- package/dist/retrieval-agents.js +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/routing/store.js +2 -2
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/embed-helper.js +2 -2
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +12 -12
- 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/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 +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/search/remote-backend.js +2 -2
- package/dist/{semantic-consolidation-BX9Z9_aK.d.ts → semantic-consolidation-CWch5uM7.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 -4
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +6 -4
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/session-observer-state.js +2 -2
- package/dist/session-transcript-migration.js +2 -2
- package/dist/shared-context/manager.d.ts +1 -1
- package/dist/shared-context/manager.js +2 -2
- package/dist/signal.d.ts +1 -1
- package/dist/storage.d.ts +5 -1
- package/dist/storage.js +5 -3
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +7 -7
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.d.ts +1 -1
- package/dist/temporal-supersession.js +2 -2
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/threading.js +2 -2
- package/dist/tier-migration.d.ts +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/transcript.js +2 -2
- package/dist/transfer/import-sqlite.js +2 -2
- package/dist/{types-D3pm4NhH.d.ts → types-Dm5xxVrr.d.ts} +61 -1
- 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 +7 -5
- package/package.json +2 -2
- package/src/access-http.ts +1 -1
- package/src/access-mcp.ts +1 -1
- package/src/access-service.ts +1 -11
- package/src/cli.ts +1 -1
- package/src/config.test.ts +112 -0
- package/src/config.ts +5 -5
- package/src/explicit-capture.ts +3 -12
- package/src/logger.ts +13 -4
- package/src/namespaces/catalog.test.ts +2 -2
- package/src/namespaces/storage.ts +81 -0
- package/src/orchestrator.ts +22 -64
- package/src/provenance-frontmatter.test.ts +596 -0
- package/src/provenance.ts +305 -0
- package/src/storage.ts +41 -41
- package/src/types.ts +76 -0
- package/dist/chunk-2ODBA7MQ.js.map +0 -1
- package/dist/chunk-ARLRTZZZ.js.map +0 -1
- package/dist/chunk-FMSDA2D3.js.map +0 -1
- package/dist/chunk-GKKAXVAJ.js.map +0 -1
- package/dist/chunk-I3HSKQT7.js.map +0 -1
- package/dist/chunk-IUZWBCJX.js.map +0 -1
- package/dist/chunk-PHK3HARR.js +0 -32
- package/dist/chunk-PHK3HARR.js.map +0 -1
- package/dist/chunk-QVWM4C24.js.map +0 -1
- package/dist/chunk-TY5NT3T3.js.map +0 -1
- /package/dist/{auto-sync-5CJBJMPZ.js.map → auto-sync-NUQWSFQD.js.map} +0 -0
- /package/dist/{chunk-UJDV2NLT.js.map → chunk-2KAYTPPT.js.map} +0 -0
- /package/dist/{chunk-QUA2JPH2.js.map → chunk-2SJCWLQD.js.map} +0 -0
- /package/dist/{chunk-YTWNKQ2G.js.map → chunk-3FC6LW6T.js.map} +0 -0
- /package/dist/{chunk-I75DF4FZ.js.map → chunk-4FE2K57M.js.map} +0 -0
- /package/dist/{chunk-L5MUA6Q7.js.map → chunk-4N3TFFPH.js.map} +0 -0
- /package/dist/{chunk-BTVX7ZXZ.js.map → chunk-4NFVPDIL.js.map} +0 -0
- /package/dist/{chunk-OUWAQVDJ.js.map → chunk-5CEJH5ZN.js.map} +0 -0
- /package/dist/{chunk-UAODC6GJ.js.map → chunk-6O6A6YUO.js.map} +0 -0
- /package/dist/{chunk-HQ6NIBL6.js.map → chunk-7FL4CNPV.js.map} +0 -0
- /package/dist/{chunk-5VDJMYTF.js.map → chunk-7WWURLG6.js.map} +0 -0
- /package/dist/{chunk-QWRC7GIO.js.map → chunk-A4HH2EWA.js.map} +0 -0
- /package/dist/{chunk-4SKKVWLQ.js.map → chunk-AGJH5ISO.js.map} +0 -0
- /package/dist/{chunk-APJQ6UEA.js.map → chunk-AGNBY3VG.js.map} +0 -0
- /package/dist/{chunk-NQMBSSWW.js.map → chunk-B4XVLHJA.js.map} +0 -0
- /package/dist/{chunk-GSTYVG5L.js.map → chunk-BFVPIKDY.js.map} +0 -0
- /package/dist/{chunk-AJU4PJGY.js.map → chunk-BVKCV2ZY.js.map} +0 -0
- /package/dist/{chunk-EG4TCVMU.js.map → chunk-CTOQEZSN.js.map} +0 -0
- /package/dist/{chunk-7OGJQP7T.js.map → chunk-DCWIQFNA.js.map} +0 -0
- /package/dist/{chunk-MHQC2WU2.js.map → chunk-DKTSR7EK.js.map} +0 -0
- /package/dist/{chunk-RN7MUWON.js.map → chunk-EHISUJFN.js.map} +0 -0
- /package/dist/{chunk-WLEB7WCG.js.map → chunk-EO5QWINU.js.map} +0 -0
- /package/dist/{chunk-XKXKSQU7.js.map → chunk-EXM3CQTZ.js.map} +0 -0
- /package/dist/{chunk-TOQEZ63C.js.map → chunk-FE6DQUNJ.js.map} +0 -0
- /package/dist/{chunk-LCC5EZTT.js.map → chunk-FIVDN2SM.js.map} +0 -0
- /package/dist/{chunk-452WDNFO.js.map → chunk-GG6AJN7A.js.map} +0 -0
- /package/dist/{chunk-O2WELT5C.js.map → chunk-GS55WYRL.js.map} +0 -0
- /package/dist/{chunk-OHX52AOS.js.map → chunk-GTDH3IUH.js.map} +0 -0
- /package/dist/{chunk-IBTZEBUD.js.map → chunk-HYNHLBKA.js.map} +0 -0
- /package/dist/{chunk-V254FAT5.js.map → chunk-IIDSFFE5.js.map} +0 -0
- /package/dist/{chunk-EVWIEEKZ.js.map → chunk-IQ7WCZRW.js.map} +0 -0
- /package/dist/{chunk-B5XMS73R.js.map → chunk-IQVQJJL7.js.map} +0 -0
- /package/dist/{chunk-6RHNCKHG.js.map → chunk-K43PI6DQ.js.map} +0 -0
- /package/dist/{chunk-OIF36KGD.js.map → chunk-KCQA46NR.js.map} +0 -0
- /package/dist/{chunk-2LDBXPLB.js.map → chunk-KF74X62T.js.map} +0 -0
- /package/dist/{chunk-MAV46GWQ.js.map → chunk-KYYL4U6X.js.map} +0 -0
- /package/dist/{chunk-6GC5SGFE.js.map → chunk-L24JROPR.js.map} +0 -0
- /package/dist/{chunk-6VP3YUCS.js.map → chunk-LLONI6PY.js.map} +0 -0
- /package/dist/{chunk-Q5ZU3RNY.js.map → chunk-LQ6JI4VH.js.map} +0 -0
- /package/dist/{chunk-ODWI5XU2.js.map → chunk-MCQDSY4G.js.map} +0 -0
- /package/dist/{chunk-HP5FMB6L.js.map → chunk-MDJURR27.js.map} +0 -0
- /package/dist/{chunk-T2PO5MUF.js.map → chunk-O7GOFAM3.js.map} +0 -0
- /package/dist/{chunk-Z2OXSMZK.js.map → chunk-OBXTMFZQ.js.map} +0 -0
- /package/dist/{chunk-KV6CX4ON.js.map → chunk-OV4D5T7V.js.map} +0 -0
- /package/dist/{chunk-KACIOX42.js.map → chunk-PH3HOKYW.js.map} +0 -0
- /package/dist/{chunk-NHFXF4ZO.js.map → chunk-PK6RGRSD.js.map} +0 -0
- /package/dist/{chunk-C3IW2F5Z.js.map → chunk-PLBIPT6I.js.map} +0 -0
- /package/dist/{chunk-QY7YA7OL.js.map → chunk-PNLCEFE4.js.map} +0 -0
- /package/dist/{chunk-AGRPGAKR.js.map → chunk-PONNZ54D.js.map} +0 -0
- /package/dist/{chunk-XZ4WBBB5.js.map → chunk-PWFWCGOO.js.map} +0 -0
- /package/dist/{chunk-G7Z3C2X6.js.map → chunk-QANVLERJ.js.map} +0 -0
- /package/dist/{chunk-W4RVMTHR.js.map → chunk-QRDOSYOR.js.map} +0 -0
- /package/dist/{chunk-6IMKOIZ6.js.map → chunk-R6OVFAX6.js.map} +0 -0
- /package/dist/{chunk-2QSZNTDO.js.map → chunk-RKNJBZ55.js.map} +0 -0
- /package/dist/{chunk-JOASJWQR.js.map → chunk-SANZHXY2.js.map} +0 -0
- /package/dist/{chunk-7DTASS5T.js.map → chunk-SJHM6I4J.js.map} +0 -0
- /package/dist/{chunk-B2B2IHUH.js.map → chunk-STOEE37X.js.map} +0 -0
- /package/dist/{chunk-GNAMDNGT.js.map → chunk-U7D7NP4J.js.map} +0 -0
- /package/dist/{chunk-DRD2Q7HQ.js.map → chunk-UFS7OXGL.js.map} +0 -0
- /package/dist/{chunk-H3HDXD3U.js.map → chunk-UPTZYUYJ.js.map} +0 -0
- /package/dist/{chunk-3IND7N4X.js.map → chunk-UTYBJR7M.js.map} +0 -0
- /package/dist/{chunk-LN4YGHTM.js.map → chunk-UUH4YQOF.js.map} +0 -0
- /package/dist/{chunk-6VF75M3X.js.map → chunk-VGUOEDTU.js.map} +0 -0
- /package/dist/{chunk-44VFF3BB.js.map → chunk-VILEUJXC.js.map} +0 -0
- /package/dist/{chunk-7SI52C65.js.map → chunk-VL7DP3OW.js.map} +0 -0
- /package/dist/{chunk-7DHTMOND.js.map → chunk-VQ34TERH.js.map} +0 -0
- /package/dist/{chunk-H6PMGMNP.js.map → chunk-VX6OBUDW.js.map} +0 -0
- /package/dist/{chunk-EW5KFXHL.js.map → chunk-WDXCNJSF.js.map} +0 -0
- /package/dist/{chunk-X6IRLNOO.js.map → chunk-WIWPSQYU.js.map} +0 -0
- /package/dist/{chunk-DOCTITOP.js.map → chunk-WRFKZEO6.js.map} +0 -0
- /package/dist/{chunk-E6ZDCOHM.js.map → chunk-XBZQRZ6G.js.map} +0 -0
- /package/dist/{chunk-7YX23JBA.js.map → chunk-XHYGJVXL.js.map} +0 -0
- /package/dist/{chunk-JD4SCARD.js.map → chunk-YN4ZT4CW.js.map} +0 -0
- /package/dist/{chunk-YXWAILM4.js.map → chunk-YOI3ELXF.js.map} +0 -0
- /package/dist/{chunk-XCAZF7KQ.js.map → chunk-ZA2S2VLL.js.map} +0 -0
- /package/dist/{chunk-BEUDU7Y4.js.map → chunk-ZCWIH4LH.js.map} +0 -0
- /package/dist/{chunk-WEPMT6SC.js.map → chunk-ZPTISBQU.js.map} +0 -0
- /package/dist/{contradiction-scan-AZTGFMPY.js.map → contradiction-scan-HWGEOUDS.js.map} +0 -0
- /package/dist/{first-start-migration-FF7YFGRP.js.map → first-start-migration-PG5HBC3K.js.map} +0 -0
- /package/dist/{graph-edge-decay-KSVJGCZW.js.map → graph-edge-decay-D7OESCBR.js.map} +0 -0
- /package/dist/{resolution-IDTEBJFS.js.map → provenance.js.map} +0 -0
|
@@ -5,6 +5,7 @@ import { StorageManager } from "../storage.js";
|
|
|
5
5
|
import type { PluginConfig } from "../types.js";
|
|
6
6
|
import { ALL_CATEGORY_DIRS } from "../utils/category-dir.js";
|
|
7
7
|
import { namespaceIdentityToken, normalizeNamespaceIdentity } from "./identity.js";
|
|
8
|
+
import type { NamespaceCatalog } from "./catalog.js";
|
|
8
9
|
|
|
9
10
|
async function exists(p: string): Promise<boolean> {
|
|
10
11
|
try {
|
|
@@ -228,6 +229,9 @@ export class NamespaceStorageRouter {
|
|
|
228
229
|
// `whenResolveHooksSettled`). Entries are removed as each hook settles, so the
|
|
229
230
|
// set holds at most one promise per concurrently-resolving namespace.
|
|
230
231
|
private readonly pendingResolveHooks = new Set<Promise<unknown>>();
|
|
232
|
+
// Pending post-write catalog touch promises (#1522). Like pendingResolveHooks,
|
|
233
|
+
// lets tests await fire-and-forget write touches deterministically.
|
|
234
|
+
private readonly pendingWriteTouches = new Set<Promise<unknown>>();
|
|
231
235
|
|
|
232
236
|
// Normalized (trimmed) default namespace identity (NH-FH). `storageFor`
|
|
233
237
|
// normalizes its input, so default-namespace branches must compare against the
|
|
@@ -238,6 +242,8 @@ export class NamespaceStorageRouter {
|
|
|
238
242
|
constructor(
|
|
239
243
|
private readonly config: PluginConfig,
|
|
240
244
|
private readonly hooks: NamespaceStorageRouterHooks = {},
|
|
245
|
+
/** Catalog reference for post-write/read touches (issue #1522 chokepoint). */
|
|
246
|
+
private readonly catalog?: NamespaceCatalog,
|
|
241
247
|
) {
|
|
242
248
|
this.defaultNamespaceIdentity = normalizeNamespaceIdentity(config.defaultNamespace);
|
|
243
249
|
}
|
|
@@ -288,6 +294,9 @@ export class NamespaceStorageRouter {
|
|
|
288
294
|
// (used by extraction and shared-promotion paths) strip citations consistently,
|
|
289
295
|
// matching the behaviour of the primary this.storage instance in the orchestrator.
|
|
290
296
|
sm.citationTemplate = this.config.inlineSourceAttributionFormat;
|
|
297
|
+
// #1522: install the post-write catalog touch at the chokepoint — every
|
|
298
|
+
// successful write on this StorageManager records the namespace touch.
|
|
299
|
+
this.bindCatalogWriteHook(sm, ns);
|
|
291
300
|
this.cache.set(ns, sm);
|
|
292
301
|
this.notifyResolved(ns, root);
|
|
293
302
|
return sm;
|
|
@@ -369,6 +378,78 @@ export class NamespaceStorageRouter {
|
|
|
369
378
|
}
|
|
370
379
|
}
|
|
371
380
|
|
|
381
|
+
/**
|
|
382
|
+
* Install the post-write catalog touch hook on an externally-constructed
|
|
383
|
+
* StorageManager (issue #1522). Used by the orchestrator for the legacy
|
|
384
|
+
* default-namespace storage (`this.storage`) that bypasses the router.
|
|
385
|
+
*/
|
|
386
|
+
bindCatalogWriteHook(sm: StorageManager, namespace: string): void {
|
|
387
|
+
sm.onCatalogWrite = () => this.touchCatalogWrite(namespace, sm.dir);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Post-write catalog touch (issue #1522 chokepoint). Called by every
|
|
392
|
+
* StorageManager's post-write hook AFTER a successful write. Best-effort
|
|
393
|
+
* and failure-tolerant — a catalog error MUST NOT affect the primary write
|
|
394
|
+
* (gotcha #13, rule #40). Fire-and-forget by design.
|
|
395
|
+
*/
|
|
396
|
+
private touchCatalogWrite(namespace: string, storageDir: string): void {
|
|
397
|
+
if (!this.catalog) return;
|
|
398
|
+
const touch = this.catalog
|
|
399
|
+
.markWrite(namespace, { discoveredBy: "write", storageDir })
|
|
400
|
+
.catch(() => undefined);
|
|
401
|
+
this.pendingWriteTouches.add(touch);
|
|
402
|
+
void touch.then(
|
|
403
|
+
() => { this.pendingWriteTouches.delete(touch); },
|
|
404
|
+
() => { this.pendingWriteTouches.delete(touch); },
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Record a namespace read in the catalog (issue #1522 chokepoint move).
|
|
410
|
+
* Best-effort and failure-tolerant. Used by recall paths so the read touch
|
|
411
|
+
* lives in the storage layer, not at the caller.
|
|
412
|
+
*/
|
|
413
|
+
recordRead(namespace: string, storageDir?: string): void {
|
|
414
|
+
if (!this.catalog) return;
|
|
415
|
+
const ns = normalizeNamespaceIdentity(namespace || this.config.defaultNamespace);
|
|
416
|
+
void this.catalog
|
|
417
|
+
.markRead(ns, { discoveredBy: "read", storageDir })
|
|
418
|
+
.catch(() => undefined);
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Record a namespace write touch in the catalog (issue #1522). Best-effort
|
|
422
|
+
* and failure-tolerant. Used by consolidation/cleanup passes that may mutate
|
|
423
|
+
* the store via delete-only paths (e.g. entity-file merges, TTL cleanup) so
|
|
424
|
+
* the namespace's lastWriteAt stays fresh even when no explicit write went
|
|
425
|
+
* through the storage chokepoint. This is NOT a substitute for the chokepoint
|
|
426
|
+
* — it's a belt-and-suspenders for paths the chokepoint doesn't cover.
|
|
427
|
+
*/
|
|
428
|
+
recordWrite(namespace: string, storageDir?: string): void {
|
|
429
|
+
if (!this.catalog) return;
|
|
430
|
+
const ns = normalizeNamespaceIdentity(namespace || this.config.defaultNamespace);
|
|
431
|
+
const touch = this.catalog
|
|
432
|
+
.markWrite(ns, { discoveredBy: "write", storageDir })
|
|
433
|
+
.catch(() => undefined);
|
|
434
|
+
this.pendingWriteTouches.add(touch);
|
|
435
|
+
void touch.then(
|
|
436
|
+
() => { this.pendingWriteTouches.delete(touch); },
|
|
437
|
+
() => { this.pendingWriteTouches.delete(touch); },
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Resolve once every in-flight post-write catalog touch has settled (#1522).
|
|
443
|
+
* Mirrors `whenResolveHooksSettled()`: the StorageManager's post-write hook
|
|
444
|
+
* fires the catalog touch fire-and-forget, so tests asserting lastWriteAt
|
|
445
|
+
* moved should await this instead of racing a timer.
|
|
446
|
+
*/
|
|
447
|
+
async whenWriteTouchesSettled(): Promise<void> {
|
|
448
|
+
while (this.pendingWriteTouches.size > 0) {
|
|
449
|
+
await Promise.allSettled([...this.pendingWriteTouches]);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
372
453
|
/**
|
|
373
454
|
* Resolve once every in-flight `onResolve` registration has settled.
|
|
374
455
|
*
|
package/src/orchestrator.ts
CHANGED
|
@@ -2682,7 +2682,7 @@ export class Orchestrator {
|
|
|
2682
2682
|
this.rememberNamespaceStorageDirHint(namespace, storageDir);
|
|
2683
2683
|
return this.namespaceCatalog.registerResolved(namespace, storageDir);
|
|
2684
2684
|
},
|
|
2685
|
-
});
|
|
2685
|
+
}, this.namespaceCatalog);
|
|
2686
2686
|
this.namespaceSearchRouter = new NamespaceSearchRouter(
|
|
2687
2687
|
config,
|
|
2688
2688
|
this.storageRouter,
|
|
@@ -2691,6 +2691,8 @@ export class Orchestrator {
|
|
|
2691
2691
|
// Propagate the inline-attribution template so the storage layer can strip
|
|
2692
2692
|
// citations from legacy facts during the hash-index rebuild path.
|
|
2693
2693
|
this.storage.citationTemplate = config.inlineSourceAttributionFormat;
|
|
2694
|
+
// #1522: bind the post-write catalog touch at the storage chokepoint.
|
|
2695
|
+
if (config.defaultNamespace) this.storageRouter.bindCatalogWriteHook(this.storage, config.defaultNamespace);
|
|
2694
2696
|
// Wire page-level versioning (issue #371)
|
|
2695
2697
|
this.storage.setVersioningConfig({
|
|
2696
2698
|
enabled: config.versioningEnabled,
|
|
@@ -4479,11 +4481,7 @@ export class Orchestrator {
|
|
|
4479
4481
|
// failures where the canonical memory was written but a later archive
|
|
4480
4482
|
// step throws and the cluster catch continues (codex NY-dK).
|
|
4481
4483
|
// Best-effort; namespace decoded from the storage dir since this path
|
|
4482
|
-
//
|
|
4483
|
-
this.markCatalogWrite(
|
|
4484
|
-
this.namespaceFromStorageDir(targetStorage.dir),
|
|
4485
|
-
targetStorage.dir,
|
|
4486
|
-
);
|
|
4484
|
+
// #1522: catalog touch handled at the storage chokepoint.
|
|
4487
4485
|
}
|
|
4488
4486
|
}
|
|
4489
4487
|
}
|
|
@@ -7992,7 +7990,7 @@ export class Orchestrator {
|
|
|
7992
7990
|
recallResultLimit > 0 &&
|
|
7993
7991
|
!options.abortSignal?.aborted
|
|
7994
7992
|
) {
|
|
7995
|
-
for (const ns of recallNamespaces) this.
|
|
7993
|
+
for (const ns of recallNamespaces) this.storageRouter.recordRead(ns);
|
|
7996
7994
|
}
|
|
7997
7995
|
|
|
7998
7996
|
// 0. Shared context (v4.0, optional)
|
|
@@ -14200,7 +14198,6 @@ export class Orchestrator {
|
|
|
14200
14198
|
);
|
|
14201
14199
|
}
|
|
14202
14200
|
}
|
|
14203
|
-
this.markCatalogWrite(target.namespace, targetStorage.dir);
|
|
14204
14201
|
trackPersistedId(targetStorage, promotedId, { includeReturnedIds: false });
|
|
14205
14202
|
await this.indexPersistedMemory(targetStorage, promotedId);
|
|
14206
14203
|
trackBehaviorSignals(
|
|
@@ -14391,17 +14388,16 @@ export class Orchestrator {
|
|
|
14391
14388
|
useCallerTimestamp: true,
|
|
14392
14389
|
});
|
|
14393
14390
|
// Catalog touch (issue #1499 — codex P2 NElSf): this dedup branch
|
|
14394
|
-
// returns WITHOUT
|
|
14391
|
+
// returns WITHOUT the post-write catalog touch (now at the storage chokepoint #1522),
|
|
14395
14392
|
// but `applyTemporalSupersession` mutated the shared namespace
|
|
14396
14393
|
// (it rewrote frontmatter to retire stale shared facts). When any
|
|
14397
14394
|
// ids were actually superseded, the shared namespace changed, so we
|
|
14398
14395
|
// must record the write — otherwise the shared record's
|
|
14399
14396
|
// `lastWriteAt` stays stale and `writtenSince` maintenance / QMD
|
|
14400
14397
|
// fanout skips the namespace after a supersession-only update.
|
|
14401
|
-
// Best-effort and failure-tolerant (
|
|
14398
|
+
// Best-effort and failure-tolerant (the storage chokepoint swallows
|
|
14402
14399
|
// errors); only touch when work happened to avoid spurious writes.
|
|
14403
14400
|
if (hashDedupSupersession.supersededIds.length > 0) {
|
|
14404
|
-
this.markCatalogWrite(this.config.sharedNamespace, sharedStorage.dir);
|
|
14405
14401
|
}
|
|
14406
14402
|
// Active matching fact exists — normal short-circuit is safe.
|
|
14407
14403
|
return;
|
|
@@ -14505,7 +14501,6 @@ export class Orchestrator {
|
|
|
14505
14501
|
// the same promotion pass. The hot-path source-namespace touch uses a
|
|
14506
14502
|
// different storage dir, so this does not double-count the source.
|
|
14507
14503
|
// Best-effort and failure-tolerant — it must never crash the promotion.
|
|
14508
|
-
this.markCatalogWrite(this.config.sharedNamespace, sharedStorage.dir);
|
|
14509
14504
|
trackPersistedId(sharedStorage, promotedId, {
|
|
14510
14505
|
includeReturnedIds: false,
|
|
14511
14506
|
});
|
|
@@ -15358,7 +15353,6 @@ export class Orchestrator {
|
|
|
15358
15353
|
// failure still surfaces the partially durable parent/chunk files to
|
|
15359
15354
|
// catalog-driven `writtenSince` maintenance. The final touch below
|
|
15360
15355
|
// still refreshes `lastWriteAt` after later durable writes on success.
|
|
15361
|
-
this.markCatalogWrite(targetNamespaceName, targetStorage.dir);
|
|
15362
15356
|
}
|
|
15363
15357
|
|
|
15364
15358
|
if (routedRuleId) {
|
|
@@ -15502,7 +15496,6 @@ export class Orchestrator {
|
|
|
15502
15496
|
// promotion, optional artifact writes, and graph-edge writes — so
|
|
15503
15497
|
// `lastWriteAt` cannot precede later file changes on successful
|
|
15504
15498
|
// completion. Use the KNOWN routed name, not a dir-decoded guess.
|
|
15505
|
-
this.markCatalogWrite(targetNamespaceName, targetStorage.dir);
|
|
15506
15499
|
}
|
|
15507
15500
|
trackBehaviorSignals(
|
|
15508
15501
|
targetStorage,
|
|
@@ -15732,13 +15725,12 @@ export class Orchestrator {
|
|
|
15732
15725
|
// The `finally` preserves the write touch when post-write indexing or
|
|
15733
15726
|
// promotion fails after the canonical memory is already durable. Use the
|
|
15734
15727
|
// KNOWN routed name, not a dir-decoded guess (NCQI0).
|
|
15735
|
-
this.markCatalogWrite(targetNamespaceName, targetStorage.dir);
|
|
15736
15728
|
}
|
|
15737
15729
|
}
|
|
15738
15730
|
|
|
15739
15731
|
// Tracks whether THIS extraction persisted any durable, non-fact output to the
|
|
15740
15732
|
// BASE namespace's storage (entity / relationship / profile / question). The
|
|
15741
|
-
// per-fact
|
|
15733
|
+
// per-fact catalog touch (storage chokepoint #1522) only fires inside the fact write loop, so a
|
|
15742
15734
|
// fact-less extraction that still persists durable data must record exactly one
|
|
15743
15735
|
// base-namespace catalog touch after all writes complete (NHZEZ, codex P2).
|
|
15744
15736
|
let durableNonFactWritten = false;
|
|
@@ -15748,7 +15740,6 @@ export class Orchestrator {
|
|
|
15748
15740
|
baseNamespace && baseNamespace.length > 0
|
|
15749
15741
|
? baseNamespace
|
|
15750
15742
|
: this.namespaceFromStorageDir(storage.dir);
|
|
15751
|
-
this.markCatalogWrite(baseTouchNamespace, storage.dir);
|
|
15752
15743
|
};
|
|
15753
15744
|
const recordDurableNonFactWrite = () => {
|
|
15754
15745
|
durableNonFactWritten = true;
|
|
@@ -15863,7 +15854,7 @@ export class Orchestrator {
|
|
|
15863
15854
|
}
|
|
15864
15855
|
|
|
15865
15856
|
// Catalog touch for durable NON-FACT outputs (NHZEZ / NIIly, codex P2). The
|
|
15866
|
-
// per-fact
|
|
15857
|
+
// per-fact catalog touch (storage chokepoint #1522) above only fires inside the fact write loop, so
|
|
15867
15858
|
// an extraction that persists ONLY entities, relationships, profile updates,
|
|
15868
15859
|
// questions, or an identity reflection (no facts) would record durable data to
|
|
15869
15860
|
// the BASE namespace's storage without ever touching the catalog — leaving that
|
|
@@ -15874,7 +15865,7 @@ export class Orchestrator {
|
|
|
15874
15865
|
// KNOWN base namespace name, not a dir-decoded guess (NCQI0). One touch per
|
|
15875
15866
|
// namespace per extraction — `markWrite` is idempotent, so if the fact path
|
|
15876
15867
|
// already touched the base namespace this only refreshes `lastWriteAt`.
|
|
15877
|
-
// Best-effort and failure-tolerant (
|
|
15868
|
+
// Best-effort and failure-tolerant (storage chokepoint #1522 swallows errors).
|
|
15878
15869
|
if (durableNonFactWritten) {
|
|
15879
15870
|
touchBaseNonFactNamespace();
|
|
15880
15871
|
}
|
|
@@ -16604,19 +16595,13 @@ export class Orchestrator {
|
|
|
16604
16595
|
}
|
|
16605
16596
|
}
|
|
16606
16597
|
|
|
16607
|
-
// Consolidated catalog write touch
|
|
16608
|
-
//
|
|
16609
|
-
//
|
|
16610
|
-
//
|
|
16611
|
-
//
|
|
16612
|
-
// rewrote the store still refreshes `lastWriteAt` (rule #25). The default
|
|
16613
|
-
// namespace is always configured/cataloged; `markWrite` is idempotent so this
|
|
16614
|
-
// only refreshes recency. Best-effort and failure-tolerant.
|
|
16598
|
+
// Consolidated catalog write touch — belt-and-suspenders for cleanup-only
|
|
16599
|
+
// passes that mutate the store via delete-only paths (entity merges, TTL
|
|
16600
|
+
// cleanup) without triggering the storage chokepoint's post-write hook.
|
|
16601
|
+
// Gated on memoryItemMutated (set by every durable mutation including cleanup-only passes)
|
|
16602
|
+
// Best-effort and failure-tolerant.
|
|
16615
16603
|
if (memoryItemMutated) {
|
|
16616
|
-
this.
|
|
16617
|
-
this.namespaceFromStorageDir(this.storage.dir),
|
|
16618
|
-
this.storage.dir,
|
|
16619
|
-
);
|
|
16604
|
+
this.storageRouter.recordWrite(this.config.defaultNamespace, this.storage.dir);
|
|
16620
16605
|
}
|
|
16621
16606
|
|
|
16622
16607
|
log.info("consolidation complete");
|
|
@@ -17070,7 +17055,6 @@ export class Orchestrator {
|
|
|
17070
17055
|
const lifecycleCorpus = await storage.readAllMemories();
|
|
17071
17056
|
// Record the catalog write when the pass rewrote any frontmatter (codex NR-tS).
|
|
17072
17057
|
if ((await this.runLifecyclePolicyPass(lifecycleCorpus, storage)) > 0) {
|
|
17073
|
-
this.markCatalogWrite(this.namespaceFromStorageDir(storage.dir), storage.dir);
|
|
17074
17058
|
}
|
|
17075
17059
|
return { memoriesAssessed: lifecycleCorpus.length };
|
|
17076
17060
|
}
|
|
@@ -17355,10 +17339,7 @@ export class Orchestrator {
|
|
|
17355
17339
|
// summary and then rewrites source-memory archive status, bypassing the
|
|
17356
17340
|
// extraction write path. Record the touch after both mutations complete so
|
|
17357
17341
|
// `lastWriteAt` covers the final archived-state write.
|
|
17358
|
-
|
|
17359
|
-
this.namespaceFromStorageDir(this.storage.dir),
|
|
17360
|
-
this.storage.dir,
|
|
17361
|
-
);
|
|
17342
|
+
// #1522: catalog touch handled at the storage chokepoint.
|
|
17362
17343
|
|
|
17363
17344
|
log.info(
|
|
17364
17345
|
`created summary ${summary.id} from ${batch.length} memories, archived ${archived}`,
|
|
@@ -17469,11 +17450,10 @@ export class Orchestrator {
|
|
|
17469
17450
|
// a namespace whose sole mutation in the pass is identity consolidation would
|
|
17470
17451
|
// otherwise keep a stale `lastWriteAt`, making `listNamespaces({ writtenSince })`
|
|
17471
17452
|
// and catalog-recency consumers miss the write. Best-effort and
|
|
17472
|
-
// failure-tolerant (
|
|
17453
|
+
// failure-tolerant (the storage chokepoint (#1522) swallows errors, never crashing the
|
|
17473
17454
|
// consolidation; gotcha #13, rule #40). No double-count with the consolidated
|
|
17474
17455
|
// touch above: that one is gated on `memoryItemMutated` (which identity
|
|
17475
17456
|
// consolidation does not set), and `markWrite` is idempotent regardless.
|
|
17476
|
-
this.markCatalogWrite(namespace, storage.dir);
|
|
17477
17457
|
log.info(
|
|
17478
17458
|
`IDENTITY(${namespace}) consolidated: ${identityContent.length} → ${newContent.length} chars, ${result.learnedPatterns.length} patterns`,
|
|
17479
17459
|
);
|
|
@@ -19917,24 +19897,13 @@ export class Orchestrator {
|
|
|
19917
19897
|
return dirName;
|
|
19918
19898
|
}
|
|
19919
19899
|
|
|
19920
|
-
|
|
19921
|
-
* Record a namespace write in the catalog (issue #1499). Best-effort and
|
|
19922
|
-
* failure-tolerant: a catalog write error MUST NOT crash the primary memory
|
|
19923
|
-
* write (CLAUDE.md gotcha #13, rule #40). Fire-and-forget by design.
|
|
19924
|
-
*/
|
|
19925
|
-
private markCatalogWrite(namespace: string, storageDir?: string): void {
|
|
19926
|
-
if (!this.namespaceCatalog.enabled) return;
|
|
19927
|
-
this.rememberNamespaceStorageDirHint(namespace, storageDir);
|
|
19928
|
-
void this.namespaceCatalog
|
|
19929
|
-
.markWrite(namespace, { discoveredBy: "write", storageDir })
|
|
19930
|
-
.catch(() => undefined);
|
|
19931
|
-
}
|
|
19900
|
+
// #1522: catalog touch methods removed — touches now happen at the storage chokepoint.
|
|
19932
19901
|
|
|
19933
19902
|
/**
|
|
19934
19903
|
* Public best-effort catalog write touch (issue #1499). User-facing explicit
|
|
19935
19904
|
* captures (`memory_store`) and review-queue approvals persist via
|
|
19936
19905
|
* `persistExplicitCapture()` → `storage.writeMemory()`, which bypasses the
|
|
19937
|
-
* extraction write path that
|
|
19906
|
+
* extraction write path that owns the catalog touch. Without this their
|
|
19938
19907
|
* namespaces never record `lastWriteAt`, so the catalog under-reports write
|
|
19939
19908
|
* recency (round 5, codex P2). Fire-and-forget and failure-tolerant — a
|
|
19940
19909
|
* catalog error must never affect the explicit write (gotcha #13, rule #40).
|
|
@@ -19944,20 +19913,9 @@ export class Orchestrator {
|
|
|
19944
19913
|
* default rather than skipping it (round 6, codex P2 — default `memory_store`
|
|
19945
19914
|
* and inline-note writes were missing from `writtenSince`/maintenance).
|
|
19946
19915
|
*/
|
|
19947
|
-
recordCatalogWrite(namespace?: string, storageDir?: string): void {
|
|
19948
|
-
const ns = namespace && namespace.trim().length > 0 ? namespace : this.config.defaultNamespace;
|
|
19949
|
-
if (!ns) return;
|
|
19950
|
-
this.markCatalogWrite(ns, storageDir);
|
|
19951
|
-
}
|
|
19952
19916
|
|
|
19953
|
-
|
|
19954
|
-
|
|
19955
|
-
if (!this.namespaceCatalog.enabled) return;
|
|
19956
|
-
this.rememberNamespaceStorageDirHint(namespace, storageDir);
|
|
19957
|
-
void this.namespaceCatalog
|
|
19958
|
-
.markRead(namespace, { discoveredBy: "read", storageDir })
|
|
19959
|
-
.catch(() => undefined);
|
|
19960
|
-
}
|
|
19917
|
+
|
|
19918
|
+
// markCatalogRead removed — use storageRouter.recordRead() instead (#1522).
|
|
19961
19919
|
|
|
19962
19920
|
private async readAllMemoriesForNamespaces(
|
|
19963
19921
|
namespaces: string[],
|