@remnic/core 9.45.3 → 9.45.5
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/abort-error.d.ts +2 -1
- package/dist/abort-error.js +3 -1
- package/dist/access-admin-ops-surface.d.ts +14 -10
- package/dist/access-admin-ops-surface.js +84 -75
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +14 -10
- package/dist/access-authorization-probe.js +85 -76
- package/dist/access-boundary.d.ts +15 -11
- package/dist/access-boundary.js +84 -75
- package/dist/access-citation-namespace.js +2 -2
- package/dist/access-cli.js +191 -177
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +16 -0
- package/dist/access-coding-context-resolution.js +13 -0
- package/dist/access-coding-context-resolution.js.map +1 -0
- package/dist/access-extraction-force-flush.d.ts +14 -10
- package/dist/access-extraction-force-flush.js +84 -75
- package/dist/access-health-types.d.ts +2 -1
- package/dist/access-http-lcm-compaction.d.ts +16 -12
- package/dist/access-http-lcm-compaction.js +3 -3
- package/dist/access-http-lifecycle-flush.d.ts +14 -10
- package/dist/access-http-lifecycle-flush.js +2 -2
- package/dist/access-http-offline-stream.d.ts +123 -0
- package/dist/access-http-offline-stream.js +10 -0
- package/dist/access-http-offline-stream.js.map +1 -0
- package/dist/access-http-query.js +84 -75
- package/dist/access-http.d.ts +15 -11
- package/dist/access-http.js +104 -90
- package/dist/access-identity-continuity-surface.d.ts +9 -8
- package/dist/access-identity-continuity-surface.js +84 -75
- package/dist/access-lcm-surface.d.ts +14 -10
- package/dist/access-lcm-surface.js +84 -75
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.d.ts +14 -10
- package/dist/access-mcp.js +95 -82
- package/dist/access-memory-search-fanout.d.ts +3 -2
- package/dist/{access-namespace-preflight-5yZ4g6F8.d.ts → access-namespace-preflight-CWUDwB4M.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +4 -3
- package/dist/access-namespace-preflight.js +84 -75
- package/dist/access-observe-helpers.d.ts +1 -0
- package/dist/access-observe-helpers.js +1 -1
- package/dist/access-observe-write-surface.d.ts +16 -10
- package/dist/access-observe-write-surface.js +84 -75
- package/dist/access-offline-manifest.d.ts +104 -0
- package/dist/access-offline-manifest.js +45 -0
- package/dist/access-offline-manifest.js.map +1 -0
- package/dist/access-operations-batch.js +86 -77
- package/dist/access-operations.d.ts +18 -14
- package/dist/access-operations.js +91 -79
- package/dist/access-recall-concurrency.d.ts +16 -26
- package/dist/access-recall-concurrency.js +86 -76
- package/dist/access-recall-response.d.ts +18 -14
- package/dist/access-recall-response.js +84 -75
- package/dist/access-recall-surface.d.ts +29 -24
- package/dist/access-recall-surface.js +84 -75
- package/dist/access-schema.d.ts +84 -84
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-CiJRsgAB.d.ts → access-service-CNN89xyn.d.ts} +25 -16
- package/dist/access-service-helpers.d.ts +14 -10
- package/dist/access-service.d.ts +14 -10
- package/dist/access-service.js +84 -75
- package/dist/access-surface-catalog.d.ts +14 -10
- package/dist/access-surface-catalog.js +4 -0
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +4 -3
- package/dist/action-confidence.d.ts +2 -1
- package/dist/active-memory-bridge.d.ts +2 -1
- package/dist/active-recall.d.ts +2 -1
- package/dist/active-recall.js +10 -8
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/{auto-sync-5OE5QOZB.js → auto-sync-UPTUVE4X.js} +6 -6
- package/dist/behavior-learner.d.ts +2 -1
- package/dist/behavior-learner.js +1 -1
- package/dist/behavior-signals.d.ts +2 -1
- package/dist/bootstrap.d.ts +9 -8
- package/dist/briefing.d.ts +3 -2
- package/dist/briefing.js +24 -22
- package/dist/buffer-surprise-report.d.ts +2 -1
- package/dist/buffer-turn-helpers.d.ts +2 -1
- package/dist/buffer.d.ts +3 -2
- package/dist/buffer.js +12 -11
- package/dist/bulk-import/index.d.ts +4 -3
- package/dist/calibration.d.ts +2 -1
- package/dist/capabilities.d.ts +2 -1
- package/dist/{capsule-merge-IDWJPCWK.js → capsule-merge-Q6AR3XL7.js} +67 -54
- package/dist/capsule-merge-Q6AR3XL7.js.map +1 -0
- package/dist/{catalog-scBmy0sO.d.ts → catalog-bctMURhN.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +2 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +2 -1
- package/dist/causal-consolidation.js +28 -26
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +2 -1
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-E5UK4VPE.js → chunk-2FSTB6BJ.js} +5 -5
- package/dist/{chunk-5ZE7QHTK.js → chunk-2X2T2UVE.js} +5 -5
- package/dist/{chunk-P4DRWEYC.js → chunk-3COYXTGM.js} +2 -2
- package/dist/{chunk-5IVLTFOV.js → chunk-44N6ESJ4.js} +2 -2
- package/dist/{chunk-DL7ZD3JH.js → chunk-4FBVAGV3.js} +14 -9
- package/dist/chunk-4FBVAGV3.js.map +1 -0
- package/dist/{chunk-WOCNN776.js → chunk-4POAMKV6.js} +100 -41
- package/dist/chunk-4POAMKV6.js.map +1 -0
- package/dist/{chunk-HO3QBJEY.js → chunk-5546W5SI.js} +2 -2
- package/dist/{chunk-AAIUERNB.js → chunk-5QJQHBLE.js} +6 -6
- package/dist/{chunk-6CZPDBJS.js → chunk-5U7ID3EZ.js} +3 -3
- package/dist/{chunk-RN7DY3FC.js → chunk-6ISC4AVB.js} +31 -12
- package/dist/chunk-6ISC4AVB.js.map +1 -0
- package/dist/chunk-773TRRGT.js +36 -0
- package/dist/chunk-773TRRGT.js.map +1 -0
- package/dist/chunk-7T4TOGMS.js +242 -0
- package/dist/chunk-7T4TOGMS.js.map +1 -0
- package/dist/{chunk-DLVPUX7U.js → chunk-7YKVM5H3.js} +8 -6
- package/dist/chunk-7YKVM5H3.js.map +1 -0
- package/dist/chunk-7YQ6ESEA.js +322 -0
- package/dist/chunk-7YQ6ESEA.js.map +1 -0
- package/dist/{chunk-DNWXFTLD.js → chunk-A4IJCD2Z.js} +2 -2
- package/dist/{chunk-3CE77VAP.js → chunk-A4JMGKCD.js} +87 -74
- package/dist/chunk-A4JMGKCD.js.map +1 -0
- package/dist/chunk-A5KNZSNA.js +26 -0
- package/dist/chunk-A5KNZSNA.js.map +1 -0
- package/dist/{chunk-PKNLM44P.js → chunk-AC5OWJLV.js} +9 -9
- package/dist/{chunk-LZ4LDKHZ.js → chunk-AMAUBUKY.js} +6 -6
- package/dist/{chunk-CUM2BBPN.js → chunk-AUMWZSE7.js} +19 -10
- package/dist/chunk-AUMWZSE7.js.map +1 -0
- package/dist/{chunk-BUE5E2HL.js → chunk-BGLY7EEM.js} +5 -314
- package/dist/chunk-BGLY7EEM.js.map +1 -0
- package/dist/chunk-BIPBQQFI.js +44 -0
- package/dist/chunk-BIPBQQFI.js.map +1 -0
- package/dist/{chunk-S5SLVSVY.js → chunk-BQIFZ2MP.js} +5 -5
- package/dist/chunk-BTTPKDIL.js +34 -0
- package/dist/{chunk-PVGDJXVK.js.map → chunk-BTTPKDIL.js.map} +1 -1
- package/dist/chunk-CK5KOVHW.js +69 -0
- package/dist/chunk-CK5KOVHW.js.map +1 -0
- package/dist/{chunk-Q6IP2ARR.js → chunk-CSOYVTRX.js} +2 -2
- package/dist/{chunk-XOQSEF7X.js → chunk-CVILPI77.js} +6 -6
- package/dist/{chunk-VWAXN2BN.js → chunk-CX4ZUMC6.js} +91 -83
- package/dist/chunk-CX4ZUMC6.js.map +1 -0
- package/dist/{chunk-NVRYW264.js → chunk-DAJPRXBR.js} +16 -13
- package/dist/chunk-DAJPRXBR.js.map +1 -0
- package/dist/{chunk-J7VGGECD.js → chunk-DZPFMQZ7.js} +1 -1
- package/dist/chunk-DZPFMQZ7.js.map +1 -0
- package/dist/{chunk-4LMA77JH.js → chunk-E5XQIWAL.js} +3 -3
- package/dist/{chunk-WUNIWKY4.js → chunk-ELIL2A37.js} +6 -6
- package/dist/{chunk-OQ5PRDDS.js → chunk-ERZ2R42X.js} +6 -6
- package/dist/{chunk-U7GW7NE7.js → chunk-FIK3CQNA.js} +10 -10
- package/dist/{chunk-D3J5SLQK.js → chunk-FR27HBBA.js} +81 -20
- package/dist/chunk-FR27HBBA.js.map +1 -0
- package/dist/{chunk-E6PNLPGJ.js → chunk-FUCYDRE5.js} +838 -480
- package/dist/chunk-FUCYDRE5.js.map +1 -0
- package/dist/{chunk-HZFHQ4AQ.js → chunk-G7A5HLUS.js} +23 -17
- package/dist/chunk-G7A5HLUS.js.map +1 -0
- package/dist/{chunk-33PLLLL7.js → chunk-GFCVUY6G.js} +6 -6
- package/dist/{chunk-HREE4JHI.js → chunk-GODSPTOT.js} +477 -278
- package/dist/chunk-GODSPTOT.js.map +1 -0
- package/dist/{chunk-S2NCTZGJ.js → chunk-GRUYA45P.js} +15 -15
- package/dist/chunk-GRUYA45P.js.map +1 -0
- package/dist/{chunk-VUPTKTDV.js → chunk-GUAL4PQH.js} +3 -3
- package/dist/{chunk-CINZGPSJ.js → chunk-GUMZC2BO.js} +2 -2
- package/dist/{chunk-H24WNPA2.js → chunk-GWFSVJ4P.js} +3 -3
- package/dist/{chunk-7XC2HX75.js → chunk-GYPQL6XN.js} +157 -16
- package/dist/chunk-GYPQL6XN.js.map +1 -0
- package/dist/{chunk-TSH56VPU.js → chunk-HAYSYUAB.js} +2 -2
- package/dist/{chunk-PDLBLTOK.js → chunk-HC3PBX23.js} +9 -9
- package/dist/{chunk-TDHTVMPG.js → chunk-HFPASSFV.js} +7 -2
- package/dist/chunk-HFPASSFV.js.map +1 -0
- package/dist/chunk-J2WC5LF4.js +395 -0
- package/dist/chunk-J2WC5LF4.js.map +1 -0
- package/dist/{chunk-KXB4VXHY.js → chunk-JIYDRBVZ.js} +2 -2
- package/dist/chunk-JV3C2MNQ.js +74 -0
- package/dist/chunk-JV3C2MNQ.js.map +1 -0
- package/dist/{chunk-HLPD7B7P.js → chunk-JZH4LWHB.js} +2 -2
- package/dist/{chunk-AV5ZEH4M.js → chunk-KVJRXN2E.js} +2 -2
- package/dist/{chunk-WFTIGIIS.js → chunk-L6CQ7WIW.js} +5 -5
- package/dist/{chunk-227UFSEQ.js → chunk-LEPOP46W.js} +4 -4
- package/dist/{chunk-EJUEXZHX.js → chunk-LLJMAULE.js} +2 -2
- package/dist/{chunk-N5Z4EVOR.js → chunk-LNEWDF2A.js} +36 -11
- package/dist/chunk-LNEWDF2A.js.map +1 -0
- package/dist/{chunk-QN25OCUF.js → chunk-LPYDOLSM.js} +5 -5
- package/dist/{chunk-AS7YMSL6.js → chunk-M23RF3LJ.js} +4 -4
- package/dist/{chunk-OAEQLRCY.js → chunk-MO4HSXHZ.js} +5 -5
- package/dist/{chunk-ECK75GDJ.js → chunk-N3LL5NEU.js} +43 -24
- package/dist/chunk-N3LL5NEU.js.map +1 -0
- package/dist/chunk-NEF7LR5J.js +29 -0
- package/dist/chunk-NEF7LR5J.js.map +1 -0
- package/dist/{chunk-3F2LKUMU.js → chunk-NIS256NW.js} +2 -2
- package/dist/{chunk-YIAA2X3D.js → chunk-NK5RGJ65.js} +3 -3
- package/dist/chunk-NLDVVWCL.js +84 -0
- package/dist/chunk-NLDVVWCL.js.map +1 -0
- package/dist/{chunk-4J7G5SY4.js → chunk-NZBZ7IS2.js} +72 -24
- package/dist/chunk-NZBZ7IS2.js.map +1 -0
- package/dist/{chunk-3TBLDMJA.js → chunk-O4KMGRXE.js} +5 -2
- package/dist/chunk-O4KMGRXE.js.map +1 -0
- package/dist/{chunk-7TWUCYER.js → chunk-PNRA7FAD.js} +7 -7
- package/dist/{chunk-5I4M26Q7.js → chunk-QBSFOKY6.js} +4 -4
- package/dist/{chunk-E53DSZEN.js → chunk-QR6G5KF4.js} +3 -3
- package/dist/{chunk-CJ2ZR7UA.js → chunk-QUENPGWZ.js} +261 -211
- package/dist/chunk-QUENPGWZ.js.map +1 -0
- package/dist/{chunk-4UH4BTGK.js → chunk-QVJPH7SH.js} +84 -84
- package/dist/{chunk-UYLMNVY6.js → chunk-R3KHKU7M.js} +16 -9
- package/dist/chunk-R3KHKU7M.js.map +1 -0
- package/dist/{chunk-JBPKEARU.js → chunk-RKNJBZ55.js} +4 -4
- package/dist/{chunk-WDISJRMG.js → chunk-RMMVQQA6.js} +2 -2
- package/dist/{chunk-JVLCVFQ4.js → chunk-RNHVVMFN.js} +3 -3
- package/dist/{chunk-QJAQNXWI.js → chunk-RVO6TCTU.js} +81 -84
- package/dist/chunk-RVO6TCTU.js.map +1 -0
- package/dist/chunk-S2HLHAZ4.js +16 -0
- package/dist/chunk-S2HLHAZ4.js.map +1 -0
- package/dist/{chunk-KWMXR7XS.js → chunk-S2V7RUCL.js} +8 -1
- package/dist/{chunk-KWMXR7XS.js.map → chunk-S2V7RUCL.js.map} +1 -1
- package/dist/{chunk-5SM35XZR.js → chunk-S5NZBKKQ.js} +2 -2
- package/dist/{chunk-VNA7W7QF.js → chunk-SVH57F5Z.js} +12 -4
- package/dist/chunk-SVH57F5Z.js.map +1 -0
- package/dist/{chunk-WIPEXG6R.js → chunk-SXIMQLGV.js} +2 -2
- package/dist/{chunk-RVLJEII5.js → chunk-SYUBB3WM.js} +256 -187
- package/dist/chunk-SYUBB3WM.js.map +1 -0
- package/dist/{chunk-VCD4PSK2.js → chunk-TQZ4DVBC.js} +7 -4
- package/dist/chunk-TQZ4DVBC.js.map +1 -0
- package/dist/{chunk-7K5Q6COX.js → chunk-TVVEYCNW.js} +4 -4
- package/dist/{chunk-YV32N67O.js → chunk-URS5GSM7.js} +1 -1
- package/dist/chunk-URS5GSM7.js.map +1 -0
- package/dist/{chunk-4B77XSG5.js → chunk-UV72DEZD.js} +5 -5
- package/dist/{chunk-BJKPPZ6Z.js → chunk-UW66OZTD.js} +2 -2
- package/dist/{chunk-XYTOI63Z.js → chunk-V2TNYF6Q.js} +19 -11
- package/dist/chunk-V2TNYF6Q.js.map +1 -0
- package/dist/{chunk-S2BBISHU.js → chunk-VANZKHTN.js} +3 -3
- package/dist/chunk-VHFXP27N.js +250 -0
- package/dist/chunk-VHFXP27N.js.map +1 -0
- package/dist/chunk-VL35ZFSZ.js +102 -0
- package/dist/chunk-VL35ZFSZ.js.map +1 -0
- package/dist/{chunk-3Y224NYC.js → chunk-VYISFWVX.js} +2 -2
- package/dist/{chunk-JE7EK33X.js → chunk-W2V7UESE.js} +2 -2
- package/dist/{chunk-TIHMZFIV.js → chunk-W3IC7QOY.js} +3 -3
- package/dist/{chunk-NRV4Y3PM.js → chunk-W4FBGYGK.js} +1 -1
- package/dist/{chunk-P2BM76KT.js → chunk-WAS4HV46.js} +174 -43
- package/dist/chunk-WAS4HV46.js.map +1 -0
- package/dist/{chunk-57QKLRBV.js → chunk-WB7JSQCP.js} +2 -1
- package/dist/chunk-WB7JSQCP.js.map +1 -0
- package/dist/{chunk-A5OJCXZL.js → chunk-WZ3TOIDW.js} +15 -4
- package/dist/chunk-WZ3TOIDW.js.map +1 -0
- package/dist/{chunk-MU7ZHSZE.js → chunk-WZFAPHIK.js} +2 -2
- package/dist/{chunk-T2TTP3KU.js → chunk-X4IDNPOS.js} +2 -2
- package/dist/{chunk-UVIKWC7M.js → chunk-XAGYS7X6.js} +17 -17
- package/dist/{chunk-BLAKS3CP.js → chunk-XL3TATMJ.js} +3 -3
- package/dist/{chunk-W4XJFLAL.js → chunk-XPRJSHNI.js} +2 -2
- package/dist/{chunk-5TFP4CUL.js → chunk-XQ3HXAQH.js} +14 -11
- package/dist/chunk-XQ3HXAQH.js.map +1 -0
- package/dist/{chunk-E6EE5B67.js → chunk-YK6BDDHP.js} +4 -4
- package/dist/{chunk-ES36HTSC.js → chunk-YLHM5BQQ.js} +3 -3
- package/dist/{chunk-ULARSG5Z.js → chunk-YN6ASZUG.js} +10 -8
- package/dist/{chunk-ULARSG5Z.js.map → chunk-YN6ASZUG.js.map} +1 -1
- package/dist/{chunk-VOUOLGIP.js → chunk-YRFAYOFQ.js} +11 -13
- package/dist/chunk-YRFAYOFQ.js.map +1 -0
- package/dist/{chunk-IKKWIPYN.js → chunk-YYQAKIDJ.js} +37 -1
- package/dist/chunk-YYQAKIDJ.js.map +1 -0
- package/dist/{chunk-GF22HWS2.js → chunk-Z54EM5YZ.js} +4 -4
- package/dist/{chunk-64UDOIMI.js → chunk-ZLQ37WJX.js} +2 -2
- package/dist/{cli-BUGN3d6_.d.ts → cli-BHBswmUa.d.ts} +5 -5
- package/dist/cli.d.ts +16 -12
- package/dist/cli.js +138 -123
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +25 -23
- package/dist/compounding/preference-consolidator.d.ts +2 -1
- package/dist/compression-optimizer.d.ts +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/config.js +10 -8
- package/dist/connectors/codex-materialize-runner.d.ts +2 -1
- package/dist/connectors/codex-materialize-runner.js +24 -22
- package/dist/connectors/codex-materialize.d.ts +2 -1
- package/dist/connectors/index.d.ts +2 -1
- package/dist/connectors/index.js +27 -25
- package/dist/consolidation-provenance-check.d.ts +3 -2
- package/dist/consolidation-provenance-check.js +4 -4
- package/dist/consolidation-undo.d.ts +3 -2
- package/dist/consolidation-undo.js +10 -7
- package/dist/consolidation-undo.js.map +1 -1
- package/dist/contradiction/index.d.ts +3 -2
- package/dist/converge-config.d.ts +2 -1
- package/dist/convergence-refresh.d.ts +4 -3
- package/dist/convergence-refresh.js +28 -26
- package/dist/conversation-index/backend.d.ts +2 -1
- package/dist/conversation-index/backend.js +2 -2
- package/dist/conversation-index/chunker.d.ts +2 -1
- package/dist/conversation-index/faiss-adapter.d.ts +2 -1
- package/dist/conversation-index/indexer.d.ts +2 -1
- package/dist/conversation-index/search.d.ts +2 -1
- package/dist/corpus-watermark.d.ts +2 -1
- package/dist/corpus-watermark.js +43 -41
- package/dist/day-summary.d.ts +2 -1
- package/dist/delinearize.d.ts +2 -1
- package/dist/direct-answer-wiring.d.ts +2 -1
- package/dist/direct-answer-wiring.js +2 -2
- package/dist/direct-answer.d.ts +2 -1
- package/dist/embedding-fallback.d.ts +2 -1
- package/dist/embedding-fallback.js +2 -2
- package/dist/enrichment/index.d.ts +2 -1
- package/dist/entity-retrieval-boundaries.js +1 -1
- package/dist/entity-retrieval.d.ts +3 -2
- package/dist/entity-retrieval.js +25 -23
- package/dist/entity-schema.d.ts +2 -1
- package/dist/explicit-capture.d.ts +9 -8
- package/dist/explicit-capture.js +11 -9
- package/dist/external-wiki-access.d.ts +127 -0
- package/dist/external-wiki-access.js +187 -0
- package/dist/external-wiki-access.js.map +1 -0
- package/dist/external-wiki-cli.d.ts +13 -0
- package/dist/external-wiki-cli.js +10 -0
- package/dist/external-wiki-cli.js.map +1 -0
- package/dist/external-wiki-collection-registration.d.ts +39 -0
- package/dist/external-wiki-collection-registration.js +79 -0
- package/dist/external-wiki-collection-registration.js.map +1 -0
- package/dist/external-wiki-collection.d.ts +50 -0
- package/dist/external-wiki-collection.js +387 -0
- package/dist/external-wiki-collection.js.map +1 -0
- package/dist/external-wiki-config.d.ts +13 -0
- package/dist/external-wiki-config.js +13 -0
- package/dist/external-wiki-config.js.map +1 -0
- package/dist/external-wiki-guard.d.ts +11 -0
- package/dist/external-wiki-guard.js +18 -0
- package/dist/external-wiki-guard.js.map +1 -0
- package/dist/external-wiki-mcp-tools.d.ts +123 -0
- package/dist/external-wiki-mcp-tools.js +8 -0
- package/dist/external-wiki-mcp-tools.js.map +1 -0
- package/dist/external-wiki-search.d.ts +42 -0
- package/dist/external-wiki-search.js +11 -0
- package/dist/external-wiki-search.js.map +1 -0
- package/dist/external-wiki.d.ts +39 -0
- package/dist/external-wiki.js +14 -0
- package/dist/external-wiki.js.map +1 -0
- package/dist/extraction-error-classification.d.ts +2 -1
- package/dist/extraction-faithfulness.d.ts +2 -1
- package/dist/extraction-judge-telemetry.d.ts +2 -1
- package/dist/extraction-judge-training.d.ts +2 -1
- package/dist/extraction-judge.d.ts +2 -1
- package/dist/extraction-liveness.d.ts +2 -1
- package/dist/extraction-source-grounding-helpers.d.ts +5 -3
- package/dist/extraction-source-grounding-helpers.js +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +2 -1
- package/dist/extraction-source-grounding-rules.js +2 -2
- package/dist/extraction-source-grounding.d.ts +2 -1
- package/dist/extraction-source-grounding.js +5 -5
- package/dist/extraction.d.ts +2 -1
- package/dist/extraction.js +46 -43
- package/dist/fallback-llm.d.ts +2 -1
- package/dist/{first-start-migration-F2QJD66E.js → first-start-migration-ZSHEFEI3.js} +10 -12
- package/dist/{first-start-migration-F2QJD66E.js.map → first-start-migration-ZSHEFEI3.js.map} +1 -1
- package/dist/graph-dashboard-diff.d.ts +2 -1
- package/dist/graph-dashboard-key.d.ts +2 -1
- package/dist/graph-dashboard-parser.d.ts +2 -1
- package/dist/graph-edge-reinforcement.d.ts +2 -1
- package/dist/graph-snapshot.d.ts +2 -1
- package/dist/graph.d.ts +2 -1
- package/dist/harmonic-retrieval.js +2 -2
- package/dist/importance.d.ts +2 -1
- package/dist/importers/index.d.ts +2 -1
- package/dist/in-flight-reads.d.ts +2 -1
- package/dist/index.d.ts +443 -430
- package/dist/index.js +304 -269
- package/dist/intent.d.ts +2 -1
- package/dist/lcm/engine.d.ts +2 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +2 -1
- package/dist/lcm/index.js +7 -7
- package/dist/lcm/tools.d.ts +2 -1
- package/dist/lifecycle.d.ts +2 -1
- package/dist/live-connectors-runner.d.ts +2 -1
- package/dist/local-llm.d.ts +2 -1
- package/dist/local-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +2 -1
- package/dist/maintenance/memory-governance.d.ts +2 -1
- package/dist/maintenance/memory-governance.js +25 -23
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +25 -23
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +27 -25
- package/dist/{maintenance-LbuS2rUA.d.ts → maintenance-CoRikzIt.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +14 -10
- package/dist/mcp-read-only-tools.js +1 -1
- package/dist/memory-action-policy.d.ts +2 -1
- package/dist/memory-cache.d.ts +2 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
- package/dist/memory-projection-store.d.ts +2 -1
- package/dist/memory-provenance.d.ts +2 -1
- package/dist/memory-snapshot.d.ts +10 -0
- package/dist/memory-snapshot.js +8 -0
- package/dist/memory-snapshot.js.map +1 -0
- package/dist/memory-worth-outcomes.d.ts +3 -2
- package/dist/models-json.d.ts +2 -1
- package/dist/namespaces/migrate.d.ts +4 -3
- package/dist/namespaces/migrate.js +41 -39
- package/dist/namespaces/principal.d.ts +2 -1
- package/dist/namespaces/search.d.ts +2 -1
- package/dist/namespaces/search.js +18 -18
- package/dist/namespaces/storage.d.ts +4 -3
- package/dist/namespaces/storage.js +24 -22
- package/dist/native-knowledge.d.ts +2 -1
- package/dist/offline-sync-impression-drain.d.ts +2 -1
- package/dist/offline-sync-impression-drain.js +11 -9
- package/dist/offline-sync.d.ts +29 -3
- package/dist/offline-sync.js +6 -2
- package/dist/operator-doctor-corpus.d.ts +2 -1
- package/dist/operator-doctor-corpus.js +46 -44
- package/dist/operator-doctor-replica.d.ts +2 -1
- package/dist/operator-doctor-replica.js +3 -3
- package/dist/operator-toolkit.d.ts +4 -3
- package/dist/operator-toolkit.js +60 -55
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +37 -33
- package/dist/{orchestrator-rHiWt32X.d.ts → orchestrator-BJeq7Pw1.d.ts} +14 -7
- package/dist/orchestrator.d.ts +9 -8
- package/dist/orchestrator.js +200 -186
- package/dist/page-versioning.js +3 -3
- package/dist/patterns-cli.d.ts +2 -1
- package/dist/{pipeline-W_97O8BV.d.ts → pipeline-CNjY4wk3.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +2 -1
- package/dist/policy-runtime.js +1 -1
- package/dist/proactive-contention.d.ts +2 -1
- package/dist/provenance.d.ts +2 -1
- package/dist/provenance.js +2 -2
- package/dist/{qmd-LWtMofAf.d.ts → qmd-C0UDZidt.d.ts} +9 -7
- package/dist/qmd-preflight.d.ts +5 -4
- package/dist/qmd-preflight.js +2 -2
- package/dist/qmd-recall-cache.d.ts +2 -1
- package/dist/qmd.d.ts +4 -3
- package/dist/qmd.js +8 -8
- package/dist/recall-concurrency-config.d.ts +2 -1
- package/dist/recall-disclosure-escalation.d.ts +2 -1
- package/dist/recall-explain-renderer.d.ts +2 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +2 -1
- package/dist/recall-planner-llm.d.ts +2 -1
- package/dist/recall-state.d.ts +2 -1
- package/dist/recall-tag-filter.d.ts +2 -1
- package/dist/recall-timings.d.ts +2 -1
- package/dist/recall-xray-cli.d.ts +2 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +2 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +8 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +12 -2
- package/dist/reconcile/cursor.js +46 -7
- package/dist/reconcile/cursor.js.map +1 -1
- package/dist/reconcile/manifest.d.ts +9 -2
- package/dist/reconcile/manifest.js +15 -268
- package/dist/reconcile/manifest.js.map +1 -1
- package/dist/reconcile/plan.d.ts +4 -1
- package/dist/reconcile/plan.js +4 -4
- package/dist/replay/normalizers/chatgpt.d.ts +2 -1
- package/dist/replay/normalizers/claude.d.ts +2 -1
- package/dist/replay/normalizers/openclaw.d.ts +2 -1
- package/dist/replay/normalizers/shared.d.ts +2 -1
- package/dist/replay/runner.d.ts +2 -1
- package/dist/replay/types.d.ts +2 -1
- package/dist/replica-divergence.d.ts +2 -1
- package/dist/replica-divergence.js +2 -2
- package/dist/replica-peers-config.d.ts +2 -1
- package/dist/resolve-auth-token.d.ts +2 -1
- package/dist/resume-bundles.js +12 -10
- package/dist/retrieval-agents.d.ts +4 -3
- package/dist/retrieval-agents.js +2 -2
- package/dist/retrieval-tiers.d.ts +2 -1
- package/dist/routing/engine.d.ts +2 -1
- package/dist/routing/store.d.ts +2 -1
- package/dist/salvage-envelope.d.ts +2 -1
- package/dist/schemas.d.ts +54 -54
- package/dist/{scope-profiles-BiQKOE-p.d.ts → scope-profiles-BJzp2F5A.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +2 -1
- package/dist/search/embed-helper.js +3 -3
- package/dist/search/factory.d.ts +4 -2
- package/dist/search/factory.js +20 -18
- package/dist/search/index.d.ts +2 -1
- package/dist/search/index.js +20 -20
- package/dist/search/lancedb-backend.d.ts +2 -1
- package/dist/search/lancedb-backend.js +4 -4
- package/dist/search/meilisearch-backend.d.ts +2 -1
- package/dist/search/meilisearch-backend.js +4 -4
- package/dist/search/noop-backend.d.ts +2 -1
- package/dist/search/orama-backend.d.ts +2 -1
- package/dist/search/orama-backend.js +4 -4
- package/dist/search/port.d.ts +18 -1
- package/dist/search/port.js +1 -1
- package/dist/search/remote-backend.d.ts +2 -1
- package/dist/search/remote-backend.js +2 -2
- package/dist/secure-store/index.js +2 -2
- package/dist/{semantic-consolidation-dHYCyqgh.d.ts → semantic-consolidation-D4KAZO2G.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +3 -2
- package/dist/semantic-consolidation.js +26 -24
- package/dist/semantic-rule-promotion.js +24 -22
- package/dist/semantic-rule-verifier.d.ts +2 -1
- package/dist/semantic-rule-verifier.js +25 -23
- package/dist/{service-DJG3KCQ4.d.ts → service-DWC4tq7p.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +2 -1
- package/dist/session-observer-state.d.ts +2 -1
- package/dist/shared-context/manager.d.ts +10 -9
- package/dist/shared-context/manager.js +2 -2
- package/dist/signal.d.ts +2 -1
- package/dist/source-agent-qualifier.d.ts +2 -1
- package/dist/source-agent-qualifier.js +43 -40
- package/dist/{storage-F9FVh-w9.d.ts → storage-DPGjB-8e.d.ts} +28 -13
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +26 -24
- package/dist/summarizer.d.ts +2 -1
- package/dist/summarizer.js +5 -5
- package/dist/summary-snapshot.d.ts +2 -1
- package/dist/temporal-supersession.d.ts +3 -2
- package/dist/temporal-timeline-recall.d.ts +2 -1
- package/dist/temporal-validity.d.ts +2 -1
- package/dist/threading.d.ts +2 -1
- package/dist/tier-migration.d.ts +3 -2
- package/dist/tier-migration.js +1 -1
- package/dist/tier-routing.d.ts +2 -1
- package/dist/tool-scoped-memory.d.ts +5 -1
- package/dist/tool-scoped-memory.js +3 -1
- package/dist/topics.d.ts +2 -1
- package/dist/transcript.d.ts +2 -1
- package/dist/transfer/capsule-import.js +4 -4
- package/dist/transfer/types.d.ts +66 -66
- package/dist/trust-score-stage.d.ts +2 -1
- package/dist/trust-score.d.ts +2 -1
- package/dist/{types-rEwubvim.d.ts → types-yX_FwERf.d.ts} +8 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +2 -1
- package/dist/verified-recall.js +25 -23
- package/dist/write-envelope.d.ts +2 -1
- package/package.json +2 -2
- package/src/abort-error.ts +17 -0
- package/src/access-admin-ops-surface.ts +1 -0
- package/src/access-boundary.ts +1 -0
- package/src/access-coding-context-resolution.ts +42 -0
- package/src/access-extraction-force-flush.ts +38 -2
- package/src/access-http-lcm-compaction.ts +5 -2
- package/src/access-http-offline-stream.ts +80 -0
- package/src/access-http.test.ts +310 -3
- package/src/access-http.ts +84 -77
- package/src/access-mcp-output-schemas.ts +36 -0
- package/src/access-mcp.test.ts +95 -1
- package/src/access-mcp.ts +7 -9
- package/src/access-observe-helpers.ts +64 -22
- package/src/access-observe-write-surface.ts +8 -0
- package/src/access-offline-manifest.ts +54 -0
- package/src/access-operations-batch.ts +3 -3
- package/src/access-operations.ts +13 -7
- package/src/access-recall-concurrency.ts +3 -27
- package/src/access-recall-surface.ts +3 -0
- package/src/access-service-health.test.ts +32 -7
- package/src/access-service-namespace.test.ts +55 -0
- package/src/access-service-observe-idempotency.test.ts +34 -2
- package/src/access-service-observe-lcm-parity.test.ts +183 -23
- package/src/access-service-observe-scope.test.ts +160 -1
- package/src/access-service-offline-file-content.test.ts +345 -1
- package/src/access-service.ts +88 -62
- package/src/access-surface-catalog.ts +4 -0
- package/src/admin/admin-surfaces.ts +2 -0
- package/src/binary-lifecycle/pipeline.test.ts +106 -1
- package/src/binary-lifecycle/pipeline.ts +3 -0
- package/src/coding/git-context.test.ts +47 -0
- package/src/coding/git-context.ts +129 -27
- package/src/config.test.ts +24 -0
- package/src/config.ts +9 -12
- package/src/connector-provenance.test.ts +101 -0
- package/src/consolidation-undo.ts +3 -0
- package/src/convergence-refresh.ts +14 -2
- package/src/correction/correction-access-wiring.ts +9 -7
- package/src/correction/correction-executor.test.ts +206 -2
- package/src/correction/correction-executor.ts +29 -20
- package/src/correction/correction-planner.test.ts +36 -0
- package/src/correction/correction-planner.ts +9 -15
- package/src/correction/correction-service.ts +3 -1
- package/src/correction/correction-storage-integration.test.ts +77 -0
- package/src/correction/correction-surfaces.test.ts +41 -28
- package/src/correction/passive-capture.test.ts +59 -0
- package/src/correction/passive-capture.ts +4 -1
- package/src/entity-retrieval-boundaries.ts +17 -4
- package/src/entity-retrieval.ts +27 -6
- package/src/external-wiki-access.test.ts +65 -0
- package/src/external-wiki-access.ts +31 -0
- package/src/external-wiki-cli.ts +100 -0
- package/src/external-wiki-collection-registration.test.ts +163 -0
- package/src/external-wiki-collection-registration.ts +101 -0
- package/src/external-wiki-collection.test.ts +502 -0
- package/src/external-wiki-collection.ts +503 -0
- package/src/external-wiki-config.test.ts +135 -0
- package/src/external-wiki-config.ts +100 -0
- package/src/external-wiki-guard.ts +83 -0
- package/src/external-wiki-mcp-tools.ts +23 -0
- package/src/external-wiki-search.test.ts +367 -0
- package/src/external-wiki-search.ts +362 -0
- package/src/external-wiki.test.ts +240 -0
- package/src/external-wiki.ts +427 -0
- package/src/extraction-scope-source-agent.test.ts +21 -0
- package/src/extraction-source-grounding-helpers.ts +243 -53
- package/src/extraction-source-grounding-rules.ts +133 -39
- package/src/extraction-source-grounding.test.ts +363 -33
- package/src/extraction-timeout.test.ts +1 -0
- package/src/extraction-watermark.test.ts +150 -7
- package/src/extraction.ts +8 -1
- package/src/index.ts +9 -5
- package/src/maintenance/first-start-migration.ts +11 -11
- package/src/mcp-read-only-tools.ts +1 -0
- package/src/memory-snapshot.ts +15 -0
- package/src/offline-sync.test.ts +194 -0
- package/src/offline-sync.ts +217 -13
- package/src/orchestration/external-wiki-recall-guard.test.ts +94 -0
- package/src/orchestration/extraction-persist.ts +19 -2
- package/src/orchestration/extraction-run-helpers.ts +37 -19
- package/src/orchestration/extraction-run.test.ts +171 -2
- package/src/orchestration/extraction-run.ts +11 -13
- package/src/orchestration/extraction-watermark.ts +106 -17
- package/src/orchestration/generic-recall-paths.ts +14 -0
- package/src/orchestration/orchestrator-helpers.ts +2 -0
- package/src/orchestration/orchestrator-init.ts +9 -0
- package/src/orchestration/recall-internal-deps.ts +6 -0
- package/src/orchestration/recall-internal.ts +154 -33
- package/src/orchestration/recall-rerank-coordinator.ts +60 -25
- package/src/orchestration/recall-search-pipeline.test.ts +75 -1
- package/src/orchestration/recall-search-pipeline.ts +50 -10
- package/src/orchestrator-convergence-refresh.test.ts +36 -2
- package/src/orchestrator.ts +13 -3
- package/src/page-versioning.ts +5 -19
- package/src/procedural/procedure-recall.ts +5 -1
- package/src/provenance-surfaces.test.ts +3 -0
- package/src/qmd-client.test.ts +78 -17
- package/src/qmd.test.ts +24 -0
- package/src/qmd.ts +224 -315
- package/src/recall-explain-renderer.ts +3 -0
- package/src/recall-rerank-coordinator.test.ts +61 -0
- package/src/recall-xray-renderer.test.ts +6 -0
- package/src/recall-xray.test.ts +88 -1
- package/src/recall-xray.ts +15 -0
- package/src/reconcile/cursor.test.ts +48 -0
- package/src/reconcile/cursor.ts +58 -11
- package/src/reconcile/manifest.test.ts +4 -0
- package/src/reconcile/manifest.ts +41 -51
- package/src/reconcile/plan.test.ts +4 -0
- package/src/reconcile/plan.ts +28 -16
- package/src/search/factory.ts +6 -6
- package/src/search/port.ts +25 -9
- package/src/secure-store/secure-fs.ts +20 -12
- package/src/secure-store/secure-store.test.ts +41 -2
- package/src/spaces/index.test.ts +61 -2
- package/src/spaces/index.ts +44 -18
- package/src/storage/entity-alias-config.ts +97 -0
- package/src/storage/entity-canonical-id-lock.ts +53 -23
- package/src/storage/entity-canonical-id-migration.ts +53 -22
- package/src/storage/entity-canonical-id-references.ts +3 -0
- package/src/storage/entity-id-safety.ts +7 -0
- package/src/storage/entity-store.ts +6 -2
- package/src/storage/memory-frontmatter-metadata.ts +4 -9
- package/src/storage/memory-migration-serialization.ts +10 -15
- package/src/storage/tombstone-blocked-capture-mutation.ts +52 -64
- package/src/storage/tombstone-blocked-capture-sync.ts +244 -199
- package/src/storage-contract/cache-coherence.test.ts +99 -0
- package/src/storage-deletion-revisions.test.ts +91 -0
- package/src/storage-fact-hash-index-defer.test.ts +460 -170
- package/src/storage.ts +572 -284
- package/src/testing/subjects/first-start-tier-migration.test.ts +75 -0
- package/src/tier-migration.ts +10 -12
- package/src/tool-scoped-memory.ts +10 -0
- package/src/transfer/capsule-import.ts +13 -0
- package/src/transfer/capsule-merge.ts +13 -0
- package/src/trust-score-recall-paths.test.ts +75 -1
- package/src/types.ts +7 -3
- package/dist/capsule-merge-IDWJPCWK.js.map +0 -1
- package/dist/chunk-3CE77VAP.js.map +0 -1
- package/dist/chunk-3TBLDMJA.js.map +0 -1
- package/dist/chunk-4J7G5SY4.js.map +0 -1
- package/dist/chunk-57QKLRBV.js.map +0 -1
- package/dist/chunk-5TFP4CUL.js.map +0 -1
- package/dist/chunk-7XC2HX75.js.map +0 -1
- package/dist/chunk-A5OJCXZL.js.map +0 -1
- package/dist/chunk-BUE5E2HL.js.map +0 -1
- package/dist/chunk-CJ2ZR7UA.js.map +0 -1
- package/dist/chunk-CUM2BBPN.js.map +0 -1
- package/dist/chunk-D3J5SLQK.js.map +0 -1
- package/dist/chunk-DL7ZD3JH.js.map +0 -1
- package/dist/chunk-DLVPUX7U.js.map +0 -1
- package/dist/chunk-E6PNLPGJ.js.map +0 -1
- package/dist/chunk-ECK75GDJ.js.map +0 -1
- package/dist/chunk-HREE4JHI.js.map +0 -1
- package/dist/chunk-HZFHQ4AQ.js.map +0 -1
- package/dist/chunk-IKKWIPYN.js.map +0 -1
- package/dist/chunk-J7VGGECD.js.map +0 -1
- package/dist/chunk-N5Z4EVOR.js.map +0 -1
- package/dist/chunk-NVRYW264.js.map +0 -1
- package/dist/chunk-P2BM76KT.js.map +0 -1
- package/dist/chunk-PVGDJXVK.js +0 -21
- package/dist/chunk-QJAQNXWI.js.map +0 -1
- package/dist/chunk-RN7DY3FC.js.map +0 -1
- package/dist/chunk-RVLJEII5.js.map +0 -1
- package/dist/chunk-S2NCTZGJ.js.map +0 -1
- package/dist/chunk-TDHTVMPG.js.map +0 -1
- package/dist/chunk-UYLMNVY6.js.map +0 -1
- package/dist/chunk-VCD4PSK2.js.map +0 -1
- package/dist/chunk-VNA7W7QF.js.map +0 -1
- package/dist/chunk-VOUOLGIP.js.map +0 -1
- package/dist/chunk-VWAXN2BN.js.map +0 -1
- package/dist/chunk-WOCNN776.js.map +0 -1
- package/dist/chunk-XYTOI63Z.js.map +0 -1
- package/dist/chunk-YV32N67O.js.map +0 -1
- /package/dist/{auto-sync-5OE5QOZB.js.map → auto-sync-UPTUVE4X.js.map} +0 -0
- /package/dist/{chunk-E5UK4VPE.js.map → chunk-2FSTB6BJ.js.map} +0 -0
- /package/dist/{chunk-5ZE7QHTK.js.map → chunk-2X2T2UVE.js.map} +0 -0
- /package/dist/{chunk-P4DRWEYC.js.map → chunk-3COYXTGM.js.map} +0 -0
- /package/dist/{chunk-5IVLTFOV.js.map → chunk-44N6ESJ4.js.map} +0 -0
- /package/dist/{chunk-HO3QBJEY.js.map → chunk-5546W5SI.js.map} +0 -0
- /package/dist/{chunk-AAIUERNB.js.map → chunk-5QJQHBLE.js.map} +0 -0
- /package/dist/{chunk-6CZPDBJS.js.map → chunk-5U7ID3EZ.js.map} +0 -0
- /package/dist/{chunk-DNWXFTLD.js.map → chunk-A4IJCD2Z.js.map} +0 -0
- /package/dist/{chunk-PKNLM44P.js.map → chunk-AC5OWJLV.js.map} +0 -0
- /package/dist/{chunk-LZ4LDKHZ.js.map → chunk-AMAUBUKY.js.map} +0 -0
- /package/dist/{chunk-S5SLVSVY.js.map → chunk-BQIFZ2MP.js.map} +0 -0
- /package/dist/{chunk-Q6IP2ARR.js.map → chunk-CSOYVTRX.js.map} +0 -0
- /package/dist/{chunk-XOQSEF7X.js.map → chunk-CVILPI77.js.map} +0 -0
- /package/dist/{chunk-4LMA77JH.js.map → chunk-E5XQIWAL.js.map} +0 -0
- /package/dist/{chunk-WUNIWKY4.js.map → chunk-ELIL2A37.js.map} +0 -0
- /package/dist/{chunk-OQ5PRDDS.js.map → chunk-ERZ2R42X.js.map} +0 -0
- /package/dist/{chunk-U7GW7NE7.js.map → chunk-FIK3CQNA.js.map} +0 -0
- /package/dist/{chunk-33PLLLL7.js.map → chunk-GFCVUY6G.js.map} +0 -0
- /package/dist/{chunk-VUPTKTDV.js.map → chunk-GUAL4PQH.js.map} +0 -0
- /package/dist/{chunk-CINZGPSJ.js.map → chunk-GUMZC2BO.js.map} +0 -0
- /package/dist/{chunk-H24WNPA2.js.map → chunk-GWFSVJ4P.js.map} +0 -0
- /package/dist/{chunk-TSH56VPU.js.map → chunk-HAYSYUAB.js.map} +0 -0
- /package/dist/{chunk-PDLBLTOK.js.map → chunk-HC3PBX23.js.map} +0 -0
- /package/dist/{chunk-KXB4VXHY.js.map → chunk-JIYDRBVZ.js.map} +0 -0
- /package/dist/{chunk-HLPD7B7P.js.map → chunk-JZH4LWHB.js.map} +0 -0
- /package/dist/{chunk-AV5ZEH4M.js.map → chunk-KVJRXN2E.js.map} +0 -0
- /package/dist/{chunk-WFTIGIIS.js.map → chunk-L6CQ7WIW.js.map} +0 -0
- /package/dist/{chunk-227UFSEQ.js.map → chunk-LEPOP46W.js.map} +0 -0
- /package/dist/{chunk-EJUEXZHX.js.map → chunk-LLJMAULE.js.map} +0 -0
- /package/dist/{chunk-QN25OCUF.js.map → chunk-LPYDOLSM.js.map} +0 -0
- /package/dist/{chunk-AS7YMSL6.js.map → chunk-M23RF3LJ.js.map} +0 -0
- /package/dist/{chunk-OAEQLRCY.js.map → chunk-MO4HSXHZ.js.map} +0 -0
- /package/dist/{chunk-3F2LKUMU.js.map → chunk-NIS256NW.js.map} +0 -0
- /package/dist/{chunk-YIAA2X3D.js.map → chunk-NK5RGJ65.js.map} +0 -0
- /package/dist/{chunk-7TWUCYER.js.map → chunk-PNRA7FAD.js.map} +0 -0
- /package/dist/{chunk-5I4M26Q7.js.map → chunk-QBSFOKY6.js.map} +0 -0
- /package/dist/{chunk-E53DSZEN.js.map → chunk-QR6G5KF4.js.map} +0 -0
- /package/dist/{chunk-4UH4BTGK.js.map → chunk-QVJPH7SH.js.map} +0 -0
- /package/dist/{chunk-JBPKEARU.js.map → chunk-RKNJBZ55.js.map} +0 -0
- /package/dist/{chunk-WDISJRMG.js.map → chunk-RMMVQQA6.js.map} +0 -0
- /package/dist/{chunk-JVLCVFQ4.js.map → chunk-RNHVVMFN.js.map} +0 -0
- /package/dist/{chunk-5SM35XZR.js.map → chunk-S5NZBKKQ.js.map} +0 -0
- /package/dist/{chunk-WIPEXG6R.js.map → chunk-SXIMQLGV.js.map} +0 -0
- /package/dist/{chunk-7K5Q6COX.js.map → chunk-TVVEYCNW.js.map} +0 -0
- /package/dist/{chunk-4B77XSG5.js.map → chunk-UV72DEZD.js.map} +0 -0
- /package/dist/{chunk-BJKPPZ6Z.js.map → chunk-UW66OZTD.js.map} +0 -0
- /package/dist/{chunk-S2BBISHU.js.map → chunk-VANZKHTN.js.map} +0 -0
- /package/dist/{chunk-3Y224NYC.js.map → chunk-VYISFWVX.js.map} +0 -0
- /package/dist/{chunk-JE7EK33X.js.map → chunk-W2V7UESE.js.map} +0 -0
- /package/dist/{chunk-TIHMZFIV.js.map → chunk-W3IC7QOY.js.map} +0 -0
- /package/dist/{chunk-NRV4Y3PM.js.map → chunk-W4FBGYGK.js.map} +0 -0
- /package/dist/{chunk-MU7ZHSZE.js.map → chunk-WZFAPHIK.js.map} +0 -0
- /package/dist/{chunk-T2TTP3KU.js.map → chunk-X4IDNPOS.js.map} +0 -0
- /package/dist/{chunk-UVIKWC7M.js.map → chunk-XAGYS7X6.js.map} +0 -0
- /package/dist/{chunk-BLAKS3CP.js.map → chunk-XL3TATMJ.js.map} +0 -0
- /package/dist/{chunk-W4XJFLAL.js.map → chunk-XPRJSHNI.js.map} +0 -0
- /package/dist/{chunk-E6EE5B67.js.map → chunk-YK6BDDHP.js.map} +0 -0
- /package/dist/{chunk-ES36HTSC.js.map → chunk-YLHM5BQQ.js.map} +0 -0
- /package/dist/{chunk-GF22HWS2.js.map → chunk-Z54EM5YZ.js.map} +0 -0
- /package/dist/{chunk-64UDOIMI.js.map → chunk-ZLQ37WJX.js.map} +0 -0
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pathMayCarryEntityRefs,
|
|
3
|
+
requestEntityCanonicalIdReconcile,
|
|
4
|
+
withRawEntityPageMutation
|
|
5
|
+
} from "./chunk-NZBZ7IS2.js";
|
|
1
6
|
import {
|
|
2
7
|
CONTENT_HASH_INDEX_RETRY_MAX_DELAY_MS,
|
|
3
8
|
ContentHashIndex
|
|
4
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BQIFZ2MP.js";
|
|
5
10
|
import {
|
|
6
11
|
markProjectedMemoryPathInvalid
|
|
7
12
|
} from "./chunk-3CSX3ETE.js";
|
|
8
|
-
import {
|
|
9
|
-
pathMayCarryEntityRefs,
|
|
10
|
-
requestEntityCanonicalIdReconcile
|
|
11
|
-
} from "./chunk-4J7G5SY4.js";
|
|
12
13
|
import {
|
|
13
14
|
withHeldFileLock
|
|
14
15
|
} from "./chunk-FFAZ2XFU.js";
|
|
15
16
|
import {
|
|
16
17
|
readMaybeEncryptedFileFromChunks,
|
|
17
18
|
writeMaybeEncryptedFileFromChunks
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XQ3HXAQH.js";
|
|
19
20
|
import {
|
|
20
21
|
isErrnoCode
|
|
21
22
|
} from "./chunk-5UZXUTVO.js";
|
|
@@ -49,8 +50,13 @@ function buildExplicitCaptureDedupKey(content, category, sourceConnector) {
|
|
|
49
50
|
encode("content", normalizeExplicitCaptureContent(content))
|
|
50
51
|
].join(" ");
|
|
51
52
|
}
|
|
53
|
+
function buildCapturePathLockIdentity(pathname) {
|
|
54
|
+
return `path ${pathname.length} ${pathname}`;
|
|
55
|
+
}
|
|
52
56
|
function captureIdentityHash(memory) {
|
|
53
|
-
return createHash("sha256").update(
|
|
57
|
+
return createHash("sha256").update(
|
|
58
|
+
buildExplicitCaptureDedupKey(memory.content, memory.frontmatter.category, memory.frontmatter.sourceConnector)
|
|
59
|
+
).digest("hex");
|
|
54
60
|
}
|
|
55
61
|
var TombstoneBlockedCaptureWriteLock = class {
|
|
56
62
|
constructor(options) {
|
|
@@ -92,7 +98,7 @@ var TombstoneBlockedCaptureWriteLock = class {
|
|
|
92
98
|
throw new Error(CAPTURE_WRITE_LOCK_BUSY_MESSAGE);
|
|
93
99
|
}
|
|
94
100
|
async withPhysicalCaptureWriteLocks(task, identityHashes) {
|
|
95
|
-
const lockPaths = [...new Set(identityHashes.map((hash) => this.captureWriteLockPathForHash(hash)))]
|
|
101
|
+
const lockPaths = [...new Set(identityHashes.map((hash) => this.captureWriteLockPathForHash(hash)))];
|
|
96
102
|
const acquire = async (index) => {
|
|
97
103
|
if (index === lockPaths.length) return await task();
|
|
98
104
|
return await this.withSingleCaptureWriteLock(lockPaths[index], () => acquire(index + 1));
|
|
@@ -116,13 +122,26 @@ var TombstoneBlockedCaptureWriteLock = class {
|
|
|
116
122
|
const identityHash = (key) => key.length === 0 ? "" : createHash("sha256").update(key).digest("hex");
|
|
117
123
|
const identityKeys = [...new Set(identities)];
|
|
118
124
|
const hashes = [...new Set(identityHashes)];
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
const requested = [
|
|
126
|
+
...identityKeys.filter((key) => !current || !current.has(key) && !current.has(hashToken(key))).map((key) => ({ hash: identityHash(key), pathLock: key.startsWith("path ") })),
|
|
127
|
+
...hashes.filter((hash) => !current || !current.has(`\0${hash}`)).map((hash) => ({ hash, pathLock: false }))
|
|
128
|
+
].filter((entry, index, entries) => entries.findIndex((candidate) => candidate.hash === entry.hash) === index).sort(
|
|
129
|
+
(left, right) => Number(left.pathLock) - Number(right.pathLock) || this.captureWriteLockPathForHash(left.hash).localeCompare(this.captureWriteLockPathForHash(right.hash))
|
|
130
|
+
);
|
|
131
|
+
const physicalMissing = requested.map((entry) => entry.hash);
|
|
132
|
+
if (current && requested.length > 0) {
|
|
133
|
+
const held = [...current].filter((token) => token.startsWith("\0")).map((token) => {
|
|
134
|
+
const hash = token.slice(1);
|
|
135
|
+
const pathLock = [...current].some(
|
|
136
|
+
(key) => !key.startsWith("\0") && key.startsWith("path ") && hashToken(key) === token
|
|
137
|
+
);
|
|
138
|
+
return { hash, pathLock };
|
|
139
|
+
});
|
|
140
|
+
const requestedFirst = requested[0];
|
|
141
|
+
const heldLast = held.sort(
|
|
142
|
+
(left, right) => Number(left.pathLock) - Number(right.pathLock) || this.captureWriteLockPathForHash(left.hash).localeCompare(this.captureWriteLockPathForHash(right.hash))
|
|
143
|
+
).at(-1);
|
|
144
|
+
if (heldLast && requestedFirst && (Number(requestedFirst.pathLock) < Number(heldLast.pathLock) || requestedFirst.pathLock === heldLast.pathLock && this.captureWriteLockPathForHash(requestedFirst.hash) < this.captureWriteLockPathForHash(heldLast.hash))) {
|
|
126
145
|
throw new Error(CAPTURE_WRITE_LOCK_BUSY_MESSAGE);
|
|
127
146
|
}
|
|
128
147
|
}
|
|
@@ -139,14 +158,13 @@ var TombstoneBlockedCaptureWriteLock = class {
|
|
|
139
158
|
};
|
|
140
159
|
async function runTombstoneBlockedMutation(host, mutation) {
|
|
141
160
|
let lockIdentity = mutation.identity;
|
|
142
|
-
let mustLock = mutation.blocked || mutation.coordinate === true;
|
|
143
161
|
for (; ; ) {
|
|
144
162
|
let retryIdentity;
|
|
145
163
|
const mutate = async () => {
|
|
146
164
|
const current = await host.readCurrent();
|
|
147
165
|
const currentBlocked = host.isBlocked(current);
|
|
148
166
|
const currentQueuedReview = host.isQueuedReview(current);
|
|
149
|
-
if (current !== null && (currentBlocked || currentQueuedReview)) {
|
|
167
|
+
if (current !== null && (mutation.coordinate === true || currentBlocked || currentQueuedReview)) {
|
|
150
168
|
const currentIdentity = host.memoryIdentity(current);
|
|
151
169
|
const heldIdentities = Array.isArray(lockIdentity) ? lockIdentity : [lockIdentity];
|
|
152
170
|
if (!heldIdentities.includes(currentIdentity)) {
|
|
@@ -179,15 +197,10 @@ async function runTombstoneBlockedMutation(host, mutation) {
|
|
|
179
197
|
if (rebuildMarker) await mutation.beforeIndexUpdate?.();
|
|
180
198
|
await mutation.updateIndex(rebuildMarker, currentBlocked && current !== null ? current : void 0);
|
|
181
199
|
};
|
|
182
|
-
|
|
183
|
-
await host.withCaptureWriteLock(mutate, lockIdentity);
|
|
184
|
-
} else {
|
|
185
|
-
await mutate();
|
|
186
|
-
}
|
|
200
|
+
await host.withCaptureWriteLock(mutate, lockIdentity);
|
|
187
201
|
if (retryIdentity === void 0) return;
|
|
188
202
|
const identities = Array.isArray(lockIdentity) ? [...lockIdentity, retryIdentity] : [lockIdentity, retryIdentity];
|
|
189
203
|
lockIdentity = [...new Set(identities)];
|
|
190
|
-
mustLock = true;
|
|
191
204
|
}
|
|
192
205
|
}
|
|
193
206
|
function tombstoneBlocked(frontmatter) {
|
|
@@ -199,18 +212,6 @@ function isQueuedReviewFrontmatter(frontmatter) {
|
|
|
199
212
|
function isQueuedReviewMemory(memory) {
|
|
200
213
|
return memory !== null && isQueuedReviewFrontmatter(memory.frontmatter);
|
|
201
214
|
}
|
|
202
|
-
async function runTombstoneBlockedChunkMutation(mutation) {
|
|
203
|
-
const persist = async () => {
|
|
204
|
-
if (mutation.blocked) {
|
|
205
|
-
const duplicate = await mutation.findDuplicate();
|
|
206
|
-
if (duplicate) return duplicate.frontmatter.id;
|
|
207
|
-
}
|
|
208
|
-
await mutation.persistMemory();
|
|
209
|
-
await mutation.afterWrite();
|
|
210
|
-
return mutation.id;
|
|
211
|
-
};
|
|
212
|
-
return mutation.blocked ? await mutation.withCaptureWriteLock(persist, mutation.identity) : await persist();
|
|
213
|
-
}
|
|
214
215
|
|
|
215
216
|
// src/storage/tombstone-blocked-capture-sync.ts
|
|
216
217
|
import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
|
|
@@ -653,33 +654,68 @@ var TombstoneBlockedCaptureIndex = class {
|
|
|
653
654
|
var OFFLINE_SYNC_BUFFER_LIMIT_BYTES = 1048576;
|
|
654
655
|
var OFFLINE_SYNC_STAGE_READ_BYTES = 64 * 1024;
|
|
655
656
|
var OFFLINE_SYNC_FRONTMATTER_DELIMITER = Buffer.from("\n---\n", "utf8");
|
|
656
|
-
|
|
657
|
+
var CASED_CHARACTER = /\p{Cased}/u;
|
|
658
|
+
var CASE_IGNORABLE_CHARACTER = /\p{Case_Ignorable}/u;
|
|
659
|
+
function createExplicitContentNormalizer(sink) {
|
|
657
660
|
let started = false;
|
|
658
661
|
let pendingSpace = false;
|
|
659
662
|
let output = "";
|
|
663
|
+
let precededByCased = false;
|
|
664
|
+
let pendingSigma = false;
|
|
660
665
|
const flush = () => {
|
|
661
666
|
if (output.length > 0) {
|
|
662
|
-
|
|
667
|
+
sink.write(output);
|
|
663
668
|
output = "";
|
|
664
669
|
}
|
|
665
670
|
};
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
if (
|
|
670
|
-
|
|
671
|
+
const emit = (text) => {
|
|
672
|
+
for (const character of text) {
|
|
673
|
+
if (/\s/u.test(character)) {
|
|
674
|
+
if (started) pendingSpace = true;
|
|
675
|
+
continue;
|
|
676
|
+
}
|
|
677
|
+
if (pendingSpace) {
|
|
678
|
+
output += " ";
|
|
679
|
+
pendingSpace = false;
|
|
680
|
+
}
|
|
681
|
+
output += character;
|
|
682
|
+
started = true;
|
|
683
|
+
if (output.length >= OFFLINE_SYNC_STAGE_READ_BYTES) flush();
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
const resolveSigma = (followedByCased) => {
|
|
687
|
+
flush();
|
|
688
|
+
sink.resolveConditionalSigma(!followedByCased);
|
|
689
|
+
pendingSigma = false;
|
|
690
|
+
};
|
|
691
|
+
const push = (text) => {
|
|
692
|
+
for (const character of text) {
|
|
693
|
+
const caseIgnorable = CASE_IGNORABLE_CHARACTER.test(character);
|
|
694
|
+
const cased = CASED_CHARACTER.test(character);
|
|
695
|
+
if (pendingSigma) {
|
|
696
|
+
if (caseIgnorable) {
|
|
697
|
+
emit(character.toLowerCase());
|
|
671
698
|
continue;
|
|
672
699
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
700
|
+
resolveSigma(cased);
|
|
701
|
+
}
|
|
702
|
+
if (character === "\u03A3" && precededByCased) {
|
|
703
|
+
flush();
|
|
704
|
+
sink.beginConditionalSigma();
|
|
705
|
+
pendingSigma = true;
|
|
706
|
+
precededByCased = true;
|
|
707
|
+
continue;
|
|
680
708
|
}
|
|
681
|
-
|
|
682
|
-
|
|
709
|
+
emit(character.toLowerCase());
|
|
710
|
+
if (!caseIgnorable) precededByCased = cased;
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
return {
|
|
714
|
+
push,
|
|
715
|
+
finish() {
|
|
716
|
+
if (pendingSigma) resolveSigma(false);
|
|
717
|
+
flush();
|
|
718
|
+
}
|
|
683
719
|
};
|
|
684
720
|
}
|
|
685
721
|
async function forEachStagedTextChunk(stagePath, offset, onText, key, memoryDir) {
|
|
@@ -789,21 +825,65 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
789
825
|
tombstoneBlocked(frontmatter),
|
|
790
826
|
pathname,
|
|
791
827
|
fileContent,
|
|
792
|
-
|
|
828
|
+
[
|
|
829
|
+
buildCapturePathLockIdentity(pathname),
|
|
830
|
+
buildExplicitCaptureDedupKey(content, frontmatter.category, frontmatter.sourceConnector)
|
|
831
|
+
],
|
|
793
832
|
(rebuildMarker) => this.getTombstoneBlockedCaptureIndex().addWrittenMemory(pathname, frontmatter, content, rebuildMarker),
|
|
794
833
|
beforeIndexUpdate
|
|
795
834
|
);
|
|
796
835
|
}
|
|
836
|
+
async withTombstoneBlockedMemoryPathLock(pathname, task, additionalPathnames = []) {
|
|
837
|
+
let lockIdentities = [pathname, ...additionalPathnames].map(buildCapturePathLockIdentity);
|
|
838
|
+
for (; ; ) {
|
|
839
|
+
let retryIdentity;
|
|
840
|
+
let result;
|
|
841
|
+
await this.withTombstoneBlockedCaptureWriteLock(async () => {
|
|
842
|
+
const current = await this.readMemoryByPath(pathname);
|
|
843
|
+
if (current !== null) {
|
|
844
|
+
const currentIdentity = this.offlineSyncMemoryIdentity(current);
|
|
845
|
+
if (!lockIdentities.includes(currentIdentity)) {
|
|
846
|
+
retryIdentity = currentIdentity;
|
|
847
|
+
return;
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
result = await task(current);
|
|
851
|
+
}, lockIdentities);
|
|
852
|
+
if (retryIdentity !== void 0) {
|
|
853
|
+
lockIdentities = [.../* @__PURE__ */ new Set([...lockIdentities, retryIdentity])];
|
|
854
|
+
continue;
|
|
855
|
+
}
|
|
856
|
+
return result;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
797
859
|
async writeTombstoneBlockedChunk(pathname, fileContent, frontmatter, content, findDuplicate, afterWrite) {
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
860
|
+
const incomingIdentity = buildExplicitCaptureDedupKey(content, frontmatter.category, frontmatter.sourceConnector);
|
|
861
|
+
let lockIdentities = [buildCapturePathLockIdentity(pathname), incomingIdentity];
|
|
862
|
+
for (; ; ) {
|
|
863
|
+
let retryIdentity;
|
|
864
|
+
let result = frontmatter.id;
|
|
865
|
+
await this.withTombstoneBlockedCaptureWriteLock(async () => {
|
|
866
|
+
const current = await this.readMemoryByPath(pathname);
|
|
867
|
+
if (current !== null) {
|
|
868
|
+
const currentIdentity = this.offlineSyncMemoryIdentity(current);
|
|
869
|
+
if (!lockIdentities.includes(currentIdentity)) {
|
|
870
|
+
retryIdentity = currentIdentity;
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
if (tombstoneBlocked(frontmatter)) {
|
|
875
|
+
const duplicate = await findDuplicate();
|
|
876
|
+
if (duplicate) {
|
|
877
|
+
result = duplicate.frontmatter.id;
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
await this.writeTombstoneBlockedMemory(pathname, fileContent, frontmatter, content);
|
|
882
|
+
await afterWrite(current);
|
|
883
|
+
}, lockIdentities);
|
|
884
|
+
if (retryIdentity === void 0) return result;
|
|
885
|
+
lockIdentities = [.../* @__PURE__ */ new Set([...lockIdentities, retryIdentity])];
|
|
886
|
+
}
|
|
807
887
|
}
|
|
808
888
|
async writeTombstoneBlockedUpdate(before, fileContent, frontmatter, content, beforeIndexUpdate) {
|
|
809
889
|
await this.writeTombstoneBlockedMutation(
|
|
@@ -811,22 +891,9 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
811
891
|
before.path,
|
|
812
892
|
fileContent,
|
|
813
893
|
[
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
before.frontmatter.category,
|
|
818
|
-
before.frontmatter.sourceConnector
|
|
819
|
-
)
|
|
820
|
-
] : [],
|
|
821
|
-
...tombstoneBlocked(frontmatter) ? [buildExplicitCaptureDedupKey(content, frontmatter.category, frontmatter.sourceConnector)] : [],
|
|
822
|
-
...isQueuedReviewMemory(before) ? [
|
|
823
|
-
buildExplicitCaptureDedupKey(
|
|
824
|
-
before.content,
|
|
825
|
-
before.frontmatter.category,
|
|
826
|
-
before.frontmatter.sourceConnector
|
|
827
|
-
)
|
|
828
|
-
] : [],
|
|
829
|
-
...isQueuedReviewFrontmatter(frontmatter) ? [buildExplicitCaptureDedupKey(content, frontmatter.category, frontmatter.sourceConnector)] : []
|
|
894
|
+
buildCapturePathLockIdentity(before.path),
|
|
895
|
+
this.offlineSyncMemoryIdentity(before),
|
|
896
|
+
buildExplicitCaptureDedupKey(content, frontmatter.category, frontmatter.sourceConnector)
|
|
830
897
|
],
|
|
831
898
|
(rebuildMarker, current) => this.getTombstoneBlockedCaptureIndex().syncUpdatedMemory(
|
|
832
899
|
current ?? before,
|
|
@@ -835,7 +902,7 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
835
902
|
rebuildMarker
|
|
836
903
|
),
|
|
837
904
|
beforeIndexUpdate,
|
|
838
|
-
|
|
905
|
+
true
|
|
839
906
|
);
|
|
840
907
|
}
|
|
841
908
|
async writeTombstoneBlockedFrontmatter(before, fileContent, frontmatter, beforeIndexUpdate) {
|
|
@@ -844,30 +911,13 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
844
911
|
before.path,
|
|
845
912
|
fileContent,
|
|
846
913
|
[
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
before.frontmatter.category,
|
|
851
|
-
before.frontmatter.sourceConnector
|
|
852
|
-
)
|
|
853
|
-
] : [],
|
|
854
|
-
...tombstoneBlocked(frontmatter) ? [buildExplicitCaptureDedupKey(before.content, frontmatter.category, frontmatter.sourceConnector)] : [],
|
|
855
|
-
...isQueuedReviewMemory(before) ? [
|
|
856
|
-
buildExplicitCaptureDedupKey(
|
|
857
|
-
before.content,
|
|
858
|
-
before.frontmatter.category,
|
|
859
|
-
before.frontmatter.sourceConnector
|
|
860
|
-
)
|
|
861
|
-
] : [],
|
|
862
|
-
...isQueuedReviewFrontmatter(frontmatter) ? [buildExplicitCaptureDedupKey(before.content, frontmatter.category, frontmatter.sourceConnector)] : []
|
|
914
|
+
buildCapturePathLockIdentity(before.path),
|
|
915
|
+
this.offlineSyncMemoryIdentity(before),
|
|
916
|
+
buildExplicitCaptureDedupKey(before.content, frontmatter.category, frontmatter.sourceConnector)
|
|
863
917
|
],
|
|
864
|
-
(rebuildMarker, current) => this.getTombstoneBlockedCaptureIndex().syncUpdatedFrontmatter(
|
|
865
|
-
current ?? before,
|
|
866
|
-
frontmatter,
|
|
867
|
-
rebuildMarker
|
|
868
|
-
),
|
|
918
|
+
(rebuildMarker, current) => this.getTombstoneBlockedCaptureIndex().syncUpdatedFrontmatter(current ?? before, frontmatter, rebuildMarker),
|
|
869
919
|
beforeIndexUpdate,
|
|
870
|
-
|
|
920
|
+
true
|
|
871
921
|
);
|
|
872
922
|
}
|
|
873
923
|
isTombstoneBlockedMemory(memory) {
|
|
@@ -915,37 +965,33 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
915
965
|
this.bumpMemoryStatusVersion();
|
|
916
966
|
}
|
|
917
967
|
async runTombstoneBlockedArchive(memory, task) {
|
|
918
|
-
if (!this.isTombstoneBlockedMemory(memory) && !isQueuedReviewMemory(memory)) {
|
|
919
|
-
return await task(memory, () => {
|
|
920
|
-
});
|
|
921
|
-
}
|
|
922
968
|
let archivedPath = null;
|
|
923
|
-
const archived = await this.runTombstoneBlockedInvalidation(
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
} catch {
|
|
939
|
-
index.markUntrusted();
|
|
940
|
-
}
|
|
969
|
+
const archived = await this.runTombstoneBlockedInvalidation(memory, async (current, rebuildMarker, markDurable) => {
|
|
970
|
+
let archiveDurable = false;
|
|
971
|
+
const markArchiveDurable = () => {
|
|
972
|
+
archiveDurable = true;
|
|
973
|
+
markDurable();
|
|
974
|
+
};
|
|
975
|
+
archivedPath = await task(current, markArchiveDurable);
|
|
976
|
+
if (rebuildMarker !== void 0 && (archivedPath !== null || archiveDurable)) {
|
|
977
|
+
await this.rebuildTombstoneBlockedCaptureAfterInvalidation(rebuildMarker);
|
|
978
|
+
} else if (rebuildMarker !== void 0) {
|
|
979
|
+
const index = this.getTombstoneBlockedCaptureIndex();
|
|
980
|
+
try {
|
|
981
|
+
await index.discardWrite(rebuildMarker);
|
|
982
|
+
} catch {
|
|
983
|
+
index.markUntrusted();
|
|
941
984
|
}
|
|
942
|
-
return archivedPath !== null;
|
|
943
985
|
}
|
|
944
|
-
|
|
986
|
+
return archivedPath !== null;
|
|
987
|
+
});
|
|
945
988
|
return archived ? archivedPath : null;
|
|
946
989
|
}
|
|
947
990
|
async runTombstoneBlockedInvalidation(memory, task, propagateErrors = false, coordinate = false) {
|
|
948
|
-
let
|
|
991
|
+
let lockIdentities = [
|
|
992
|
+
buildCapturePathLockIdentity(memory.path),
|
|
993
|
+
...coordinate || this.isTombstoneBlockedMemory(memory) || isQueuedReviewMemory(memory) ? [this.offlineSyncMemoryIdentity(memory)] : []
|
|
994
|
+
];
|
|
949
995
|
for (; ; ) {
|
|
950
996
|
const attempt = async () => {
|
|
951
997
|
const options = this.tombstoneBlockedCaptureIndexOptions();
|
|
@@ -955,7 +1001,7 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
955
1001
|
const queuedReview = isQueuedReviewMemory(current);
|
|
956
1002
|
if (blocked || queuedReview) {
|
|
957
1003
|
const currentIdentity = this.offlineSyncMemoryIdentity(current);
|
|
958
|
-
if (
|
|
1004
|
+
if (!lockIdentities.includes(currentIdentity)) return { retryIdentity: currentIdentity };
|
|
959
1005
|
}
|
|
960
1006
|
const blockedIndex = blocked ? this.getTombstoneBlockedCaptureIndex() : null;
|
|
961
1007
|
let rebuildMarker;
|
|
@@ -985,9 +1031,9 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
985
1031
|
return { result: false };
|
|
986
1032
|
}
|
|
987
1033
|
};
|
|
988
|
-
const result =
|
|
1034
|
+
const result = await this.withTombstoneBlockedCaptureWriteLock(attempt, lockIdentities);
|
|
989
1035
|
if (result.retryIdentity !== void 0) {
|
|
990
|
-
|
|
1036
|
+
lockIdentities = [.../* @__PURE__ */ new Set([...lockIdentities, result.retryIdentity])];
|
|
991
1037
|
continue;
|
|
992
1038
|
}
|
|
993
1039
|
return result.result;
|
|
@@ -999,7 +1045,7 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
999
1045
|
memory,
|
|
1000
1046
|
async (current, rebuildMarker, markDurable) => {
|
|
1001
1047
|
if (!shouldDelete(current)) return false;
|
|
1002
|
-
await
|
|
1048
|
+
if (!await this.deleteManagedStorageFile(current.path)) return false;
|
|
1003
1049
|
markDurable();
|
|
1004
1050
|
deleted = current;
|
|
1005
1051
|
const memoryDir = this.tombstoneBlockedCaptureIndexOptions().memoryDir;
|
|
@@ -1021,18 +1067,18 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
1021
1067
|
async runTombstoneBlockedOfflineSyncMutation(target, after, write, coordinate = false, streamedIdentity) {
|
|
1022
1068
|
for (; ; ) {
|
|
1023
1069
|
const before = await this.readMemoryByPath(target);
|
|
1024
|
-
const targetIdentity =
|
|
1025
|
-
const
|
|
1070
|
+
const targetIdentity = before === null ? void 0 : this.offlineSyncMemoryIdentity(before);
|
|
1071
|
+
const afterIdentity = after === null || streamedIdentity ? void 0 : this.offlineSyncMemoryIdentity(after);
|
|
1072
|
+
const mustCoordinate = coordinate || targetIdentity !== void 0 || afterIdentity !== void 0 || streamedIdentity !== void 0;
|
|
1026
1073
|
const identities = [
|
|
1074
|
+
...mustCoordinate ? [buildCapturePathLockIdentity(target)] : [],
|
|
1027
1075
|
...targetIdentity === void 0 ? [] : [targetIdentity],
|
|
1028
|
-
|
|
1029
|
-
...coordinate ? [target] : [],
|
|
1030
|
-
...coordinate && after === null && streamedIdentity === void 0 ? [""] : []
|
|
1076
|
+
...afterIdentity === void 0 ? [] : [afterIdentity]
|
|
1031
1077
|
];
|
|
1032
1078
|
let retryIdentity;
|
|
1033
1079
|
const mutate = async () => {
|
|
1034
1080
|
const current = await this.readMemoryByPath(target);
|
|
1035
|
-
if (
|
|
1081
|
+
if (current !== null) {
|
|
1036
1082
|
const currentIdentity = this.offlineSyncMemoryIdentity(current);
|
|
1037
1083
|
if (currentIdentity !== targetIdentity) {
|
|
1038
1084
|
retryIdentity = currentIdentity;
|
|
@@ -1042,7 +1088,8 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
1042
1088
|
if (this.isTombstoneBlockedMemory(after) && await this.isDuplicateTombstoneBlockedOfflineSync(target, after, streamedIdentity)) {
|
|
1043
1089
|
return;
|
|
1044
1090
|
}
|
|
1045
|
-
const
|
|
1091
|
+
const affectsBlockedIndex = coordinate || this.isTombstoneBlockedMemory(current) || this.isTombstoneBlockedMemory(after);
|
|
1092
|
+
const marker = affectsBlockedIndex ? await this.getTombstoneBlockedCaptureIndex().prepareWrite() : void 0;
|
|
1046
1093
|
let durable = false;
|
|
1047
1094
|
try {
|
|
1048
1095
|
await write();
|
|
@@ -1068,29 +1115,27 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
1068
1115
|
throw err;
|
|
1069
1116
|
}
|
|
1070
1117
|
};
|
|
1071
|
-
if (!
|
|
1118
|
+
if (!mustCoordinate) {
|
|
1072
1119
|
await mutate();
|
|
1120
|
+
} else if (streamedIdentity) {
|
|
1121
|
+
await this.withTombstoneBlockedCaptureWriteLockAndHashes(mutate, identities, [streamedIdentity.identityHash]);
|
|
1073
1122
|
} else {
|
|
1074
|
-
|
|
1075
|
-
await this.withTombstoneBlockedCaptureWriteLockAndHashes(
|
|
1076
|
-
mutate,
|
|
1077
|
-
identities,
|
|
1078
|
-
[streamedIdentity.identityHash]
|
|
1079
|
-
);
|
|
1080
|
-
} else {
|
|
1081
|
-
await this.withTombstoneBlockedCaptureWriteLock(mutate, identities);
|
|
1082
|
-
}
|
|
1123
|
+
await this.withTombstoneBlockedCaptureWriteLock(mutate, identities);
|
|
1083
1124
|
}
|
|
1084
1125
|
if (retryIdentity !== void 0) continue;
|
|
1085
1126
|
return;
|
|
1086
1127
|
}
|
|
1087
1128
|
}
|
|
1088
1129
|
async writeTombstoneBlockedOfflineSyncFile(target, content) {
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1130
|
+
const options = this.tombstoneBlockedCaptureIndexOptions();
|
|
1131
|
+
const after = options.parseMemory?.(target, content) ?? null;
|
|
1132
|
+
await withRawEntityPageMutation(path3.dirname(options.stateDir), target, async () => {
|
|
1133
|
+
await this.runTombstoneBlockedOfflineSyncMutation(
|
|
1134
|
+
target,
|
|
1135
|
+
after,
|
|
1136
|
+
() => this.writeManagedStorageFile(target, () => this.writeStorageSecureFile(target, content))
|
|
1137
|
+
);
|
|
1138
|
+
});
|
|
1094
1139
|
}
|
|
1095
1140
|
async prepareTombstoneBlockedOfflineSyncChunks(target, chunks) {
|
|
1096
1141
|
const parseMemory = this.tombstoneBlockedCaptureIndexOptions().parseMemory;
|
|
@@ -1180,26 +1225,48 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
1180
1225
|
}
|
|
1181
1226
|
async computeStagedOfflineSyncIdentity(stagePath, bodyOffset, after) {
|
|
1182
1227
|
let normalizedLength = 0;
|
|
1183
|
-
const countNormalizer = createExplicitContentNormalizer(
|
|
1184
|
-
|
|
1228
|
+
const countNormalizer = createExplicitContentNormalizer({
|
|
1229
|
+
write: (chunk) => {
|
|
1230
|
+
normalizedLength += chunk.length;
|
|
1231
|
+
},
|
|
1232
|
+
beginConditionalSigma: () => {
|
|
1233
|
+
normalizedLength += 1;
|
|
1234
|
+
},
|
|
1235
|
+
resolveConditionalSigma: () => {
|
|
1236
|
+
}
|
|
1185
1237
|
});
|
|
1186
1238
|
const options = this.tombstoneBlockedCaptureIndexOptions();
|
|
1187
1239
|
const key = options.secureStoreKeyProvider();
|
|
1188
|
-
await forEachStagedTextChunk(
|
|
1189
|
-
stagePath,
|
|
1190
|
-
bodyOffset,
|
|
1191
|
-
(text) => countNormalizer.push(text),
|
|
1192
|
-
key,
|
|
1193
|
-
options.memoryDir
|
|
1194
|
-
);
|
|
1240
|
+
await forEachStagedTextChunk(stagePath, bodyOffset, (text) => countNormalizer.push(text), key, options.memoryDir);
|
|
1195
1241
|
countNormalizer.finish();
|
|
1196
1242
|
const category = after.frontmatter.category;
|
|
1197
1243
|
const connector = after.frontmatter.sourceConnector?.trim() ?? "";
|
|
1198
1244
|
const encode = (label, value) => `${label} ${value.length} ${value}`;
|
|
1199
|
-
const identityPrefix = [
|
|
1200
|
-
|
|
1245
|
+
const identityPrefix = [
|
|
1246
|
+
encode("category", category),
|
|
1247
|
+
encode("connector", connector),
|
|
1248
|
+
`content ${normalizedLength} `
|
|
1249
|
+
].join(" ");
|
|
1250
|
+
let identityHash = createHash2("sha256");
|
|
1251
|
+
let normalSigmaIdentityHash;
|
|
1201
1252
|
identityHash.update(identityPrefix);
|
|
1202
|
-
const identityNormalizer = createExplicitContentNormalizer(
|
|
1253
|
+
const identityNormalizer = createExplicitContentNormalizer({
|
|
1254
|
+
write: (chunk) => {
|
|
1255
|
+
identityHash.update(chunk);
|
|
1256
|
+
normalSigmaIdentityHash?.update(chunk);
|
|
1257
|
+
},
|
|
1258
|
+
beginConditionalSigma: () => {
|
|
1259
|
+
normalSigmaIdentityHash = identityHash.copy().update("\u03C3");
|
|
1260
|
+
identityHash.update("\u03C2");
|
|
1261
|
+
},
|
|
1262
|
+
resolveConditionalSigma: (useFinalSigma) => {
|
|
1263
|
+
if (!useFinalSigma) {
|
|
1264
|
+
if (normalSigmaIdentityHash === void 0) throw new Error("conditional sigma hash state is missing");
|
|
1265
|
+
identityHash = normalSigmaIdentityHash;
|
|
1266
|
+
}
|
|
1267
|
+
normalSigmaIdentityHash = void 0;
|
|
1268
|
+
}
|
|
1269
|
+
});
|
|
1203
1270
|
await forEachStagedTextChunk(
|
|
1204
1271
|
stagePath,
|
|
1205
1272
|
bodyOffset,
|
|
@@ -1226,52 +1293,51 @@ var TombstoneBlockedCaptureIndexHost = class {
|
|
|
1226
1293
|
const coordinate = this.getTombstoneBlockedCaptureIndex().shouldRebuildAfterInvalidationForPath(target);
|
|
1227
1294
|
const prepared = coordinate ? await this.prepareTombstoneBlockedOfflineSyncChunks(target, chunks) : { after: null, chunks };
|
|
1228
1295
|
const streamedIdentity = prepared.streamedIdentity;
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1296
|
+
const baseDir = path3.dirname(this.tombstoneBlockedCaptureIndexOptions().stateDir);
|
|
1297
|
+
try {
|
|
1298
|
+
await withRawEntityPageMutation(baseDir, target, async () => {
|
|
1231
1299
|
await this.runTombstoneBlockedOfflineSyncMutation(
|
|
1232
1300
|
target,
|
|
1233
1301
|
prepared.after,
|
|
1234
|
-
() => this.writeStorageSecureFileChunks(target, prepared.chunks),
|
|
1302
|
+
() => this.writeManagedStorageFile(target, () => this.writeStorageSecureFileChunks(target, prepared.chunks)),
|
|
1235
1303
|
coordinate,
|
|
1236
1304
|
streamedIdentity
|
|
1237
1305
|
);
|
|
1238
|
-
}
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
await mutate();
|
|
1306
|
+
});
|
|
1307
|
+
} finally {
|
|
1308
|
+
if (prepared.stagePath !== void 0) await unlink2(prepared.stagePath).catch(() => {
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1244
1311
|
}
|
|
1245
1312
|
async writeOfflineSyncFile(filePath, content) {
|
|
1246
1313
|
const target = this.assertManagedStoragePath(filePath, "storage.writeOfflineSyncFile");
|
|
1247
1314
|
await this.writeTombstoneBlockedOfflineSyncFile(target, content);
|
|
1248
|
-
await this.
|
|
1315
|
+
await this.requestSyncReconcileIfMigrationPath(target);
|
|
1249
1316
|
}
|
|
1250
1317
|
async writeOfflineSyncFileChunks(filePath, chunks) {
|
|
1251
1318
|
const target = this.assertManagedStoragePath(filePath, "storage.writeOfflineSyncFileChunks");
|
|
1252
1319
|
await this.writeTombstoneBlockedOfflineSyncFileChunks(target, chunks);
|
|
1253
|
-
await this.
|
|
1320
|
+
await this.requestSyncReconcileIfMigrationPath(target);
|
|
1254
1321
|
}
|
|
1255
1322
|
/**
|
|
1256
|
-
*
|
|
1257
|
-
*
|
|
1258
|
-
* but only memory-tier markdown can, so transcript/state/other sync traffic
|
|
1259
|
-
* must not trigger the full-corpus reconcile pass.
|
|
1323
|
+
* Opaque replicated bytes can restore legacy memory references or entity
|
|
1324
|
+
* relationship targets. Other sync traffic must not request reconciliation.
|
|
1260
1325
|
*/
|
|
1261
|
-
async
|
|
1326
|
+
async requestSyncReconcileIfMigrationPath(target) {
|
|
1262
1327
|
const stateDir = this.tombstoneBlockedCaptureIndexOptions().stateDir;
|
|
1263
1328
|
if (!pathMayCarryEntityRefs(path3.dirname(stateDir), target)) return;
|
|
1264
1329
|
await requestEntityCanonicalIdReconcile(stateDir);
|
|
1265
1330
|
}
|
|
1266
|
-
async deleteOfflineSyncFile(filePath) {
|
|
1331
|
+
async deleteOfflineSyncFile(filePath, deletionMtimeMs) {
|
|
1267
1332
|
const target = this.assertManagedStoragePath(filePath, "storage.deleteOfflineSyncFile");
|
|
1268
|
-
await this.deleteTombstoneBlockedOfflineSyncFile(target);
|
|
1333
|
+
await this.deleteTombstoneBlockedOfflineSyncFile(target, deletionMtimeMs);
|
|
1334
|
+
await this.requestSyncReconcileIfMigrationPath(target);
|
|
1269
1335
|
}
|
|
1270
|
-
async deleteTombstoneBlockedOfflineSyncFile(target) {
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1336
|
+
async deleteTombstoneBlockedOfflineSyncFile(target, deletionMtimeMs) {
|
|
1337
|
+
const stateDir = this.tombstoneBlockedCaptureIndexOptions().stateDir;
|
|
1338
|
+
await withRawEntityPageMutation(path3.dirname(stateDir), target, async () => {
|
|
1339
|
+
await this.runTombstoneBlockedOfflineSyncMutation(target, null, async () => {
|
|
1340
|
+
await this.deleteManagedStorageFile(target, deletionMtimeMs);
|
|
1275
1341
|
});
|
|
1276
1342
|
});
|
|
1277
1343
|
}
|
|
@@ -1299,7 +1365,10 @@ export {
|
|
|
1299
1365
|
isTombstoneBlockedCaptureWriteLockBusy,
|
|
1300
1366
|
normalizeExplicitCaptureContent,
|
|
1301
1367
|
buildExplicitCaptureDedupKey,
|
|
1368
|
+
buildCapturePathLockIdentity,
|
|
1369
|
+
tombstoneBlocked,
|
|
1370
|
+
isQueuedReviewMemory,
|
|
1302
1371
|
parseTombstoneBlockedOfflineSyncMemory,
|
|
1303
1372
|
TombstoneBlockedCaptureIndexHost
|
|
1304
1373
|
};
|
|
1305
|
-
//# sourceMappingURL=chunk-
|
|
1374
|
+
//# sourceMappingURL=chunk-SYUBB3WM.js.map
|