@remnic/core 9.69.87 → 9.69.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.js +56 -49
- package/dist/access-authorization-probe.js +57 -50
- package/dist/access-boundary.js +56 -49
- package/dist/access-citation-namespace.js +2 -2
- package/dist/access-cli.js +129 -122
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.js +56 -49
- package/dist/access-http-briefing.js +57 -50
- package/dist/access-http-offline-stream.d.ts.map +1 -1
- package/dist/access-http-offline-stream.js +1 -1
- package/dist/access-http-query.js +58 -51
- package/dist/access-http.js +78 -71
- package/dist/access-identity-continuity-surface.js +56 -49
- package/dist/access-lcm-surface.js +56 -49
- package/dist/access-mcp-output-schemas.d.ts.map +1 -1
- package/dist/access-mcp-output-schemas.js +1 -1
- package/dist/access-mcp.js +69 -62
- package/dist/access-namespace-preflight.js +56 -49
- package/dist/access-observe-write-category.js +20 -13
- package/dist/access-observe-write-surface.js +56 -49
- package/dist/access-offline-manifest.js +16 -10
- package/dist/access-operations-batch.js +60 -53
- package/dist/access-operations.js +67 -60
- package/dist/access-recall-concurrency.js +56 -49
- package/dist/access-recall-response.js +56 -49
- package/dist/access-recall-surface.js +56 -49
- package/dist/access-schema.js +16 -7
- package/dist/access-service.d.ts.map +1 -1
- package/dist/access-service.js +56 -49
- package/dist/access-surface-catalog.js +58 -51
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/active-recall.js +24 -18
- package/dist/active-recall.js.map +1 -1
- package/dist/{auto-sync-6IPX2BAC.js → auto-sync-U5N3CB5Y.js} +7 -7
- package/dist/briefing.js +11 -11
- package/dist/buffer.js +7 -7
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-GWVG7LGC.js} +2 -2
- package/dist/{capsule-merge-3MNURAQ3.js → capsule-merge-ZCXUPLNJ.js} +2 -2
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.js +14 -14
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-JE334SIA.js → chunk-22DYJLFN.js} +2 -2
- package/dist/{chunk-YTQGGO3K.js → chunk-22LMCQ5B.js} +85 -82
- package/dist/{chunk-YTQGGO3K.js.map → chunk-22LMCQ5B.js.map} +1 -1
- package/dist/{chunk-JGSQ6P4D.js → chunk-2FX374UI.js} +2 -2
- package/dist/{chunk-SY5KDWGU.js → chunk-2WLMWP2T.js} +2 -2
- package/dist/{chunk-6TT6HRE4.js → chunk-3AGHSQPM.js} +2 -2
- package/dist/{chunk-P6WFK4ZJ.js → chunk-3O5BB45T.js} +4 -4
- package/dist/{chunk-3C3J243X.js → chunk-3QKO4QN7.js} +3 -3
- package/dist/{chunk-KFCMMDHH.js → chunk-3YD44CH2.js} +2 -2
- package/dist/{chunk-FRCESVV6.js → chunk-4HUCP4R4.js} +18 -18
- package/dist/chunk-4HUCP4R4.js.map +1 -0
- package/dist/chunk-4NSLQ7EU.js +137 -0
- package/dist/chunk-4NSLQ7EU.js.map +1 -0
- package/dist/{chunk-7DE2NOON.js → chunk-4O4XCBOS.js} +3 -3
- package/dist/{chunk-GDYU6VF4.js → chunk-5AYUHSAU.js} +2 -2
- package/dist/{chunk-ICZQG4XE.js → chunk-5FAGCOZD.js} +4 -4
- package/dist/{chunk-VKQI47DJ.js → chunk-5FNZ3G6X.js} +4 -4
- package/dist/{chunk-CK5KOVHW.js → chunk-5R627MYY.js} +3 -2
- package/dist/{chunk-CK5KOVHW.js.map → chunk-5R627MYY.js.map} +1 -1
- package/dist/{chunk-VQNONC4E.js → chunk-5STPRPE7.js} +2 -2
- package/dist/{chunk-52II7PB6.js → chunk-645WOU5I.js} +4 -4
- package/dist/{chunk-SRZW7FNU.js → chunk-64ZUALXK.js} +2 -2
- package/dist/{chunk-4BZP2B4U.js → chunk-6MNKDTDI.js} +2 -2
- package/dist/{chunk-DUJYRVUD.js → chunk-6O2VUWV6.js} +3 -3
- package/dist/chunk-75PT4N7Q.js +75 -0
- package/dist/chunk-75PT4N7Q.js.map +1 -0
- package/dist/{chunk-HESDNYRB.js → chunk-76M5OK7V.js} +2 -2
- package/dist/{chunk-FAN73COB.js → chunk-7D7OUO5W.js} +2 -2
- package/dist/{chunk-DZ525SNQ.js → chunk-7QE46QXI.js} +1 -1
- package/dist/{chunk-VX6GCKBS.js → chunk-7WBSMXGC.js} +4 -4
- package/dist/{chunk-VVDWZRZG.js → chunk-A6RVIHHK.js} +3 -3
- package/dist/{chunk-M536WNTQ.js → chunk-AEJ3TE5H.js} +2 -2
- package/dist/{chunk-72JNNJJJ.js → chunk-AXC4WSF3.js} +3 -3
- package/dist/chunk-AXGJMDBS.js +684 -0
- package/dist/chunk-AXGJMDBS.js.map +1 -0
- package/dist/{chunk-UA5DX5C3.js → chunk-AZIOEOK4.js} +2 -2
- package/dist/{chunk-N4S4NUX5.js → chunk-B3O3IRZN.js} +1 -1
- package/dist/{chunk-XTYX6V52.js → chunk-BJVO4H5C.js} +2 -2
- package/dist/{chunk-7LCGFUMB.js → chunk-BUKK5SWA.js} +4 -4
- package/dist/{chunk-TM3RXL4G.js → chunk-BUQKSQXL.js} +2 -2
- package/dist/chunk-C6HPNPNK.js +64 -0
- package/dist/chunk-C6HPNPNK.js.map +1 -0
- package/dist/{chunk-RB776UH3.js → chunk-C7V3KPKJ.js} +235 -93
- package/dist/chunk-C7V3KPKJ.js.map +1 -0
- package/dist/{chunk-FOH7AMMI.js → chunk-CALBQ2NG.js} +71 -72
- package/dist/chunk-CALBQ2NG.js.map +1 -0
- package/dist/{chunk-37S3IMYB.js → chunk-DGS34QSY.js} +2 -2
- package/dist/{chunk-4IEOGIPB.js → chunk-DO4C4AXD.js} +2 -2
- package/dist/{chunk-SPSRGEDQ.js → chunk-EAQQ2FD3.js} +9 -9
- package/dist/{chunk-3BTFBQLO.js → chunk-EFHNFTWB.js} +49 -3
- package/dist/chunk-EFHNFTWB.js.map +1 -0
- package/dist/{chunk-C3QXITIP.js → chunk-EQUD7FP4.js} +2 -2
- package/dist/chunk-ETUZFFPU.js +218 -0
- package/dist/chunk-ETUZFFPU.js.map +1 -0
- package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
- package/dist/{chunk-YITN5WXI.js → chunk-FC52YWAO.js} +2 -2
- package/dist/{chunk-ZI7QA4MK.js → chunk-FEIXG5FA.js} +2 -2
- package/dist/{chunk-CLXTDOKV.js → chunk-FUNBJQYR.js} +2 -2
- package/dist/{chunk-CLSYE5OZ.js → chunk-G2STTRYB.js} +2 -2
- package/dist/{chunk-TDYAIXHK.js → chunk-H36X4NRH.js} +5 -5
- package/dist/{chunk-3GQC3NMB.js → chunk-H56VY4BY.js} +5 -5
- package/dist/{chunk-PUKTBULQ.js → chunk-HWLIMQE2.js} +2 -2
- package/dist/{chunk-V2ES4WCZ.js → chunk-IIARQTZ2.js} +2 -2
- package/dist/{chunk-QEV26L2F.js → chunk-IKDRGVVJ.js} +2 -2
- package/dist/{chunk-WQZZDN5M.js → chunk-IVEHY2VT.js} +254 -377
- package/dist/chunk-IVEHY2VT.js.map +1 -0
- package/dist/{chunk-LS3XH3UE.js → chunk-IYIBGSHJ.js} +2 -2
- package/dist/{chunk-YSJTCOHR.js → chunk-J27JML5O.js} +2 -2
- package/dist/{chunk-AQK54Q7O.js → chunk-JB56XYHP.js} +2 -2
- package/dist/{chunk-NE6PHPLG.js → chunk-JBH26P62.js} +10 -10
- package/dist/{chunk-CWHV574S.js → chunk-JUT3OR2L.js} +6 -6
- package/dist/{chunk-6ET2VII7.js → chunk-JYG2334B.js} +2 -2
- package/dist/{chunk-LF5IGOOD.js → chunk-JYM4Y6SO.js} +16 -16
- package/dist/{chunk-FB64XE3R.js → chunk-JZ4TJHR2.js} +2 -2
- package/dist/{chunk-EHS5MJEF.js → chunk-KTKHO3UI.js} +3 -3
- package/dist/{chunk-WIKO4SCR.js → chunk-LHRQBMJN.js} +2 -2
- package/dist/{chunk-K4J4E7WV.js → chunk-LO4UKPKX.js} +2 -2
- package/dist/{chunk-JN72EPOE.js → chunk-MAAL6OZV.js} +7 -7
- package/dist/chunk-MAAL6OZV.js.map +1 -0
- package/dist/{chunk-MY2PLXSM.js → chunk-MCTM4YPL.js} +2 -1
- package/dist/{chunk-MY2PLXSM.js.map → chunk-MCTM4YPL.js.map} +1 -1
- package/dist/{chunk-6NQ4LSMS.js → chunk-MGZMC6WN.js} +47 -47
- package/dist/chunk-MSAI3Q7D.js +372 -0
- package/dist/chunk-MSAI3Q7D.js.map +1 -0
- package/dist/{chunk-BMYZTZ5D.js → chunk-MY7B3HYC.js} +2 -2
- package/dist/{chunk-NB3LRY4T.js → chunk-N4PYB235.js} +2 -2
- package/dist/{chunk-S3YM4SZQ.js → chunk-N7QV3CMX.js} +2 -2
- package/dist/{chunk-L6UZEAID.js → chunk-NJVR724O.js} +4 -4
- package/dist/{chunk-VLLD4TOB.js → chunk-NMZVDRVP.js} +2 -2
- package/dist/{chunk-P2WZHLUF.js → chunk-NOL7SEWN.js} +2 -2
- package/dist/{chunk-2NLLXCJG.js → chunk-OWHERGF2.js} +2 -2
- package/dist/{chunk-6L3PBSAR.js → chunk-PMNLL2TL.js} +2 -2
- package/dist/{chunk-VYCOJKSX.js → chunk-PO7NXNGC.js} +2 -2
- package/dist/{chunk-4IIMMZZK.js → chunk-PULDSMCJ.js} +10 -10
- package/dist/{chunk-G6SVZWPB.js → chunk-PZX3AQLF.js} +44 -1
- package/dist/chunk-PZX3AQLF.js.map +1 -0
- package/dist/{chunk-HBBHL4YF.js → chunk-QOXNTKXB.js} +2 -2
- package/dist/{chunk-CUCWX3MO.js → chunk-QZLCVO2V.js} +2 -2
- package/dist/{chunk-NE7I2RCT.js → chunk-R3X2T2LP.js} +2 -2
- package/dist/{chunk-S7GCT7NU.js → chunk-RBITPCMK.js} +8 -8
- package/dist/{chunk-EVBI7S4J.js → chunk-RMDGAAZF.js} +4 -4
- package/dist/{chunk-BJRAELDH.js → chunk-SCXURCVT.js} +3 -3
- package/dist/{chunk-EQ6YOIKO.js → chunk-ST2RQUXC.js} +3 -3
- package/dist/{chunk-CS52MFDV.js → chunk-SZG4WFAG.js} +2 -2
- package/dist/{chunk-BFO3IR56.js → chunk-TPEZ2SHV.js} +2 -2
- package/dist/chunk-TYT4TEQV.js +45 -0
- package/dist/chunk-TYT4TEQV.js.map +1 -0
- package/dist/{chunk-YRLHEEQT.js → chunk-U6VC6RP3.js} +2 -2
- package/dist/chunk-UCPGOUDZ.js +726 -0
- package/dist/chunk-UCPGOUDZ.js.map +1 -0
- package/dist/{chunk-MOQPEFLN.js → chunk-UP75KL3L.js} +2 -2
- package/dist/{chunk-W4AOR52H.js → chunk-UQDC3W77.js} +2 -2
- package/dist/{chunk-X7Y7WX73.js → chunk-UVYI6VIX.js} +1 -1
- package/dist/{chunk-D5F7TKMH.js → chunk-V4JZCTMK.js} +2 -2
- package/dist/{chunk-MQJL6CDZ.js → chunk-VA4O3U7U.js} +4 -4
- package/dist/{chunk-4CDYONWO.js → chunk-VDO32NLK.js} +3 -3
- package/dist/{chunk-SOZUJCME.js → chunk-VHDKPGMG.js} +6 -6
- package/dist/{chunk-QWW2JDDX.js → chunk-WNRTXEWW.js} +6 -6
- package/dist/{chunk-NR2ASHBL.js → chunk-XOV7NRY5.js} +2 -2
- package/dist/{chunk-KP7SANCF.js → chunk-YPI4RQWV.js} +2 -2
- package/dist/{chunk-JKMHZF3Q.js → chunk-YSWJXOOL.js} +2 -2
- package/dist/{chunk-LQG5O5EP.js → chunk-Z3O53WZR.js} +2 -2
- package/dist/{chunk-QVS22WTO.js → chunk-ZG5DWWKK.js} +2 -2
- package/dist/cli.js +99 -92
- package/dist/coding/export-okf-codegraph.js +12 -12
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compounding/engine.js +12 -12
- package/dist/config.js +24 -18
- package/dist/connectors/codex-materialize-runner.js +11 -11
- package/dist/connectors/index.js +11 -11
- package/dist/console/state.d.ts +30 -0
- package/dist/console/state.d.ts.map +1 -1
- package/dist/contradiction/index.js +5 -5
- package/dist/convergence-refresh.js +13 -13
- package/dist/corpus-watermark.js +13 -13
- package/dist/dashboard-runtime.js +2 -2
- package/dist/deep-recall-http-glue.js +16 -8
- package/dist/embedding-fallback.d.ts +41 -31
- package/dist/embedding-fallback.d.ts.map +1 -1
- package/dist/embedding-fallback.js +9 -1
- package/dist/embedding-generation-lock.d.ts +49 -0
- package/dist/embedding-generation-lock.d.ts.map +1 -0
- package/dist/embedding-generation-lock.js +19 -0
- package/dist/embedding-index-storage.d.ts +276 -0
- package/dist/embedding-index-storage.d.ts.map +1 -0
- package/dist/embedding-index-storage.js +28 -0
- package/dist/entity-retrieval.js +12 -12
- package/dist/event-order-recall.js +3 -3
- package/dist/explicit-capture.js +6 -6
- package/dist/external-wiki-access.js +57 -50
- package/dist/extraction.js +17 -17
- package/dist/{first-start-migration-7OATHJKB.js → first-start-migration-GAT7G733.js} +4 -4
- package/dist/{graph-edge-decay-KQGS3L3B.js → graph-edge-decay-MKIRZ762.js} +5 -5
- package/dist/graph-jsonl.js +3 -3
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph.js +2 -2
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +195 -164
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.js +5 -5
- package/dist/local-llm.js +2 -2
- package/dist/location/index.js +14 -14
- package/dist/maintenance/memory-governance.js +11 -11
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -11
- package/dist/maintenance/rebuild-memory-projection.js +12 -12
- package/dist/memory-browse-operations.js +57 -50
- package/dist/memory-subject.js +3 -3
- package/dist/namespaces/migrate.js +12 -12
- package/dist/namespaces/storage.js +11 -11
- package/dist/offline-sync-changeset-generations.d.ts +82 -0
- package/dist/offline-sync-changeset-generations.d.ts.map +1 -0
- package/dist/offline-sync-changeset-generations.js +21 -0
- package/dist/offline-sync-embedding-generation.d.ts +257 -0
- package/dist/offline-sync-embedding-generation.d.ts.map +1 -0
- package/dist/offline-sync-embedding-generation.js +44 -0
- package/dist/offline-sync-embedding-generation.js.map +1 -0
- package/dist/offline-sync-exclude-globs.d.ts +15 -0
- package/dist/offline-sync-exclude-globs.d.ts.map +1 -1
- package/dist/offline-sync-exclude-globs.js +11 -3
- package/dist/offline-sync-file-io.d.ts +7 -0
- package/dist/offline-sync-file-io.d.ts.map +1 -1
- package/dist/offline-sync-file-io.js +14 -2
- package/dist/offline-sync-impression-drain.js +3 -3
- package/dist/offline-sync-runtime-state.d.ts +5 -0
- package/dist/offline-sync-runtime-state.d.ts.map +1 -0
- package/dist/offline-sync-runtime-state.js +14 -0
- package/dist/offline-sync-runtime-state.js.map +1 -0
- package/dist/offline-sync-snapshot-stream.d.ts +26 -0
- package/dist/offline-sync-snapshot-stream.d.ts.map +1 -0
- package/dist/offline-sync-snapshot-stream.js +29 -0
- package/dist/offline-sync-snapshot-stream.js.map +1 -0
- package/dist/offline-sync-upload-staging.d.ts +34 -0
- package/dist/offline-sync-upload-staging.d.ts.map +1 -0
- package/dist/offline-sync-upload-staging.js +26 -0
- package/dist/offline-sync-upload-staging.js.map +1 -0
- package/dist/offline-sync.d.ts +58 -28
- package/dist/offline-sync.d.ts.map +1 -1
- package/dist/offline-sync.js +22 -8
- package/dist/operator-doctor-corpus.js +14 -14
- package/dist/operator-toolkit.js +35 -29
- package/dist/orchestration/maintenance.js +22 -22
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +129 -122
- package/dist/recall-navigation-operations.js +57 -50
- package/dist/recall-navigation.js +56 -49
- package/dist/reconcile/manifest.js +4 -4
- package/dist/{resolution-DNX7FO7A.js → resolution-K4A3VPKZ.js} +6 -6
- package/dist/resolution-K4A3VPKZ.js.map +1 -0
- package/dist/resume-bundles.js +25 -19
- package/dist/salvage-envelope.js +5 -5
- package/dist/secure-store/index.js +2 -2
- package/dist/secure-store/secure-fs.d.ts +14 -1
- package/dist/secure-store/secure-fs.d.ts.map +1 -1
- package/dist/semantic-consolidation.js +12 -12
- package/dist/semantic-rule-promotion.js +11 -11
- package/dist/semantic-rule-verifier.js +11 -11
- package/dist/source-agent-qualifier.js +14 -14
- package/dist/standup/build.js +11 -11
- package/dist/{state-ITXJKXRE.js → state-JB47KHYV.js} +2 -2
- package/dist/state-JB47KHYV.js.map +1 -0
- package/dist/storage.d.ts +9 -3
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +10 -10
- package/dist/subject-config.js +4 -4
- package/dist/summarizer.js +3 -3
- package/dist/support-passport/index.js +59 -52
- package/dist/support-passport/offline-sync-guard.d.ts +6 -2
- package/dist/support-passport/offline-sync-guard.d.ts.map +1 -1
- package/dist/{trace-ZFVRH4GO.js → trace-LXXCMZJA.js} +3 -3
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +3 -3
- package/dist/transfer/export-okf.js +12 -12
- package/dist/{tui-55UJMJX7.js → tui-2Z5WOV7L.js} +3 -3
- package/dist/tui-2Z5WOV7L.js.map +1 -0
- package/dist/verified-recall.js +11 -11
- package/dist/who-knows-cli.js +12 -12
- package/dist/who-knows.js +11 -11
- package/dist/write-envelope.js +4 -4
- package/package.json +2 -2
- package/src/access-http-offline-stream.ts +3 -0
- package/src/access-mcp-output-schemas.ts +1 -0
- package/src/access-service.ts +7 -18
- package/src/console/state.test.ts +56 -0
- package/src/console/state.ts +83 -0
- package/src/embedding-fallback.ts +325 -141
- package/src/embedding-generation-lock.ts +141 -0
- package/src/embedding-index-storage.test.ts +245 -0
- package/src/embedding-index-storage.ts +1068 -0
- package/src/index.ts +3 -3
- package/src/offline-sync-changeset-generations.test.ts +962 -0
- package/src/offline-sync-changeset-generations.ts +549 -0
- package/src/offline-sync-embedding-generation.test.ts +2173 -0
- package/src/offline-sync-embedding-generation.ts +1153 -0
- package/src/offline-sync-exclude-globs.ts +112 -0
- package/src/offline-sync-file-io.ts +48 -0
- package/src/offline-sync-runtime-state.ts +48 -0
- package/src/offline-sync-snapshot-stream.ts +99 -0
- package/src/offline-sync-upload-staging.ts +291 -0
- package/src/offline-sync.test.ts +164 -1
- package/src/offline-sync.ts +372 -454
- package/src/orchestrator.ts +2 -1
- package/src/secure-store/secure-fs.ts +26 -6
- package/src/storage.ts +11 -6
- package/src/support-passport/offline-sync-guard.ts +16 -2
- package/dist/chunk-3BTFBQLO.js.map +0 -1
- package/dist/chunk-AREGMX2J.js +0 -50
- package/dist/chunk-AREGMX2J.js.map +0 -1
- package/dist/chunk-FOH7AMMI.js.map +0 -1
- package/dist/chunk-FRCESVV6.js.map +0 -1
- package/dist/chunk-G6SVZWPB.js.map +0 -1
- package/dist/chunk-JN72EPOE.js.map +0 -1
- package/dist/chunk-RB776UH3.js.map +0 -1
- package/dist/chunk-WQZZDN5M.js.map +0 -1
- /package/dist/{auto-sync-6IPX2BAC.js.map → auto-sync-U5N3CB5Y.js.map} +0 -0
- /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-GWVG7LGC.js.map} +0 -0
- /package/dist/{capsule-merge-3MNURAQ3.js.map → capsule-merge-ZCXUPLNJ.js.map} +0 -0
- /package/dist/{chunk-JE334SIA.js.map → chunk-22DYJLFN.js.map} +0 -0
- /package/dist/{chunk-JGSQ6P4D.js.map → chunk-2FX374UI.js.map} +0 -0
- /package/dist/{chunk-SY5KDWGU.js.map → chunk-2WLMWP2T.js.map} +0 -0
- /package/dist/{chunk-6TT6HRE4.js.map → chunk-3AGHSQPM.js.map} +0 -0
- /package/dist/{chunk-P6WFK4ZJ.js.map → chunk-3O5BB45T.js.map} +0 -0
- /package/dist/{chunk-3C3J243X.js.map → chunk-3QKO4QN7.js.map} +0 -0
- /package/dist/{chunk-KFCMMDHH.js.map → chunk-3YD44CH2.js.map} +0 -0
- /package/dist/{chunk-7DE2NOON.js.map → chunk-4O4XCBOS.js.map} +0 -0
- /package/dist/{chunk-GDYU6VF4.js.map → chunk-5AYUHSAU.js.map} +0 -0
- /package/dist/{chunk-ICZQG4XE.js.map → chunk-5FAGCOZD.js.map} +0 -0
- /package/dist/{chunk-VKQI47DJ.js.map → chunk-5FNZ3G6X.js.map} +0 -0
- /package/dist/{chunk-VQNONC4E.js.map → chunk-5STPRPE7.js.map} +0 -0
- /package/dist/{chunk-52II7PB6.js.map → chunk-645WOU5I.js.map} +0 -0
- /package/dist/{chunk-SRZW7FNU.js.map → chunk-64ZUALXK.js.map} +0 -0
- /package/dist/{chunk-4BZP2B4U.js.map → chunk-6MNKDTDI.js.map} +0 -0
- /package/dist/{chunk-DUJYRVUD.js.map → chunk-6O2VUWV6.js.map} +0 -0
- /package/dist/{chunk-HESDNYRB.js.map → chunk-76M5OK7V.js.map} +0 -0
- /package/dist/{chunk-FAN73COB.js.map → chunk-7D7OUO5W.js.map} +0 -0
- /package/dist/{chunk-DZ525SNQ.js.map → chunk-7QE46QXI.js.map} +0 -0
- /package/dist/{chunk-VX6GCKBS.js.map → chunk-7WBSMXGC.js.map} +0 -0
- /package/dist/{chunk-VVDWZRZG.js.map → chunk-A6RVIHHK.js.map} +0 -0
- /package/dist/{chunk-M536WNTQ.js.map → chunk-AEJ3TE5H.js.map} +0 -0
- /package/dist/{chunk-72JNNJJJ.js.map → chunk-AXC4WSF3.js.map} +0 -0
- /package/dist/{chunk-UA5DX5C3.js.map → chunk-AZIOEOK4.js.map} +0 -0
- /package/dist/{chunk-N4S4NUX5.js.map → chunk-B3O3IRZN.js.map} +0 -0
- /package/dist/{chunk-XTYX6V52.js.map → chunk-BJVO4H5C.js.map} +0 -0
- /package/dist/{chunk-7LCGFUMB.js.map → chunk-BUKK5SWA.js.map} +0 -0
- /package/dist/{chunk-TM3RXL4G.js.map → chunk-BUQKSQXL.js.map} +0 -0
- /package/dist/{chunk-37S3IMYB.js.map → chunk-DGS34QSY.js.map} +0 -0
- /package/dist/{chunk-4IEOGIPB.js.map → chunk-DO4C4AXD.js.map} +0 -0
- /package/dist/{chunk-SPSRGEDQ.js.map → chunk-EAQQ2FD3.js.map} +0 -0
- /package/dist/{chunk-C3QXITIP.js.map → chunk-EQUD7FP4.js.map} +0 -0
- /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
- /package/dist/{chunk-YITN5WXI.js.map → chunk-FC52YWAO.js.map} +0 -0
- /package/dist/{chunk-ZI7QA4MK.js.map → chunk-FEIXG5FA.js.map} +0 -0
- /package/dist/{chunk-CLXTDOKV.js.map → chunk-FUNBJQYR.js.map} +0 -0
- /package/dist/{chunk-CLSYE5OZ.js.map → chunk-G2STTRYB.js.map} +0 -0
- /package/dist/{chunk-TDYAIXHK.js.map → chunk-H36X4NRH.js.map} +0 -0
- /package/dist/{chunk-3GQC3NMB.js.map → chunk-H56VY4BY.js.map} +0 -0
- /package/dist/{chunk-PUKTBULQ.js.map → chunk-HWLIMQE2.js.map} +0 -0
- /package/dist/{chunk-V2ES4WCZ.js.map → chunk-IIARQTZ2.js.map} +0 -0
- /package/dist/{chunk-QEV26L2F.js.map → chunk-IKDRGVVJ.js.map} +0 -0
- /package/dist/{chunk-LS3XH3UE.js.map → chunk-IYIBGSHJ.js.map} +0 -0
- /package/dist/{chunk-YSJTCOHR.js.map → chunk-J27JML5O.js.map} +0 -0
- /package/dist/{chunk-AQK54Q7O.js.map → chunk-JB56XYHP.js.map} +0 -0
- /package/dist/{chunk-NE6PHPLG.js.map → chunk-JBH26P62.js.map} +0 -0
- /package/dist/{chunk-CWHV574S.js.map → chunk-JUT3OR2L.js.map} +0 -0
- /package/dist/{chunk-6ET2VII7.js.map → chunk-JYG2334B.js.map} +0 -0
- /package/dist/{chunk-LF5IGOOD.js.map → chunk-JYM4Y6SO.js.map} +0 -0
- /package/dist/{chunk-FB64XE3R.js.map → chunk-JZ4TJHR2.js.map} +0 -0
- /package/dist/{chunk-EHS5MJEF.js.map → chunk-KTKHO3UI.js.map} +0 -0
- /package/dist/{chunk-WIKO4SCR.js.map → chunk-LHRQBMJN.js.map} +0 -0
- /package/dist/{chunk-K4J4E7WV.js.map → chunk-LO4UKPKX.js.map} +0 -0
- /package/dist/{chunk-6NQ4LSMS.js.map → chunk-MGZMC6WN.js.map} +0 -0
- /package/dist/{chunk-BMYZTZ5D.js.map → chunk-MY7B3HYC.js.map} +0 -0
- /package/dist/{chunk-NB3LRY4T.js.map → chunk-N4PYB235.js.map} +0 -0
- /package/dist/{chunk-S3YM4SZQ.js.map → chunk-N7QV3CMX.js.map} +0 -0
- /package/dist/{chunk-L6UZEAID.js.map → chunk-NJVR724O.js.map} +0 -0
- /package/dist/{chunk-VLLD4TOB.js.map → chunk-NMZVDRVP.js.map} +0 -0
- /package/dist/{chunk-P2WZHLUF.js.map → chunk-NOL7SEWN.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-OWHERGF2.js.map} +0 -0
- /package/dist/{chunk-6L3PBSAR.js.map → chunk-PMNLL2TL.js.map} +0 -0
- /package/dist/{chunk-VYCOJKSX.js.map → chunk-PO7NXNGC.js.map} +0 -0
- /package/dist/{chunk-4IIMMZZK.js.map → chunk-PULDSMCJ.js.map} +0 -0
- /package/dist/{chunk-HBBHL4YF.js.map → chunk-QOXNTKXB.js.map} +0 -0
- /package/dist/{chunk-CUCWX3MO.js.map → chunk-QZLCVO2V.js.map} +0 -0
- /package/dist/{chunk-NE7I2RCT.js.map → chunk-R3X2T2LP.js.map} +0 -0
- /package/dist/{chunk-S7GCT7NU.js.map → chunk-RBITPCMK.js.map} +0 -0
- /package/dist/{chunk-EVBI7S4J.js.map → chunk-RMDGAAZF.js.map} +0 -0
- /package/dist/{chunk-BJRAELDH.js.map → chunk-SCXURCVT.js.map} +0 -0
- /package/dist/{chunk-EQ6YOIKO.js.map → chunk-ST2RQUXC.js.map} +0 -0
- /package/dist/{chunk-CS52MFDV.js.map → chunk-SZG4WFAG.js.map} +0 -0
- /package/dist/{chunk-BFO3IR56.js.map → chunk-TPEZ2SHV.js.map} +0 -0
- /package/dist/{chunk-YRLHEEQT.js.map → chunk-U6VC6RP3.js.map} +0 -0
- /package/dist/{chunk-MOQPEFLN.js.map → chunk-UP75KL3L.js.map} +0 -0
- /package/dist/{chunk-W4AOR52H.js.map → chunk-UQDC3W77.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-UVYI6VIX.js.map} +0 -0
- /package/dist/{chunk-D5F7TKMH.js.map → chunk-V4JZCTMK.js.map} +0 -0
- /package/dist/{chunk-MQJL6CDZ.js.map → chunk-VA4O3U7U.js.map} +0 -0
- /package/dist/{chunk-4CDYONWO.js.map → chunk-VDO32NLK.js.map} +0 -0
- /package/dist/{chunk-SOZUJCME.js.map → chunk-VHDKPGMG.js.map} +0 -0
- /package/dist/{chunk-QWW2JDDX.js.map → chunk-WNRTXEWW.js.map} +0 -0
- /package/dist/{chunk-NR2ASHBL.js.map → chunk-XOV7NRY5.js.map} +0 -0
- /package/dist/{chunk-KP7SANCF.js.map → chunk-YPI4RQWV.js.map} +0 -0
- /package/dist/{chunk-JKMHZF3Q.js.map → chunk-YSWJXOOL.js.map} +0 -0
- /package/dist/{chunk-LQG5O5EP.js.map → chunk-Z3O53WZR.js.map} +0 -0
- /package/dist/{chunk-QVS22WTO.js.map → chunk-ZG5DWWKK.js.map} +0 -0
- /package/dist/{graph-edge-decay-KQGS3L3B.js.map → embedding-generation-lock.js.map} +0 -0
- /package/dist/{resolution-DNX7FO7A.js.map → embedding-index-storage.js.map} +0 -0
- /package/dist/{first-start-migration-7OATHJKB.js.map → first-start-migration-GAT7G733.js.map} +0 -0
- /package/dist/{state-ITXJKXRE.js.map → graph-edge-decay-MKIRZ762.js.map} +0 -0
- /package/dist/{tui-55UJMJX7.js.map → offline-sync-changeset-generations.js.map} +0 -0
- /package/dist/{trace-ZFVRH4GO.js.map → trace-LXXCMZJA.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/embedding-index-storage.ts"],"sourcesContent":["/**\n * File-level storage for the embedding fallback index (issue #3146).\n *\n * Two single-generation layouts, exactly one authoritative at a time:\n * - `legacy`: the single `state/embeddings.json` file, used while the\n * whole index serializes within `resolveIndexFileCharLimit()` chars;\n * - `sharded`: the published `state/embeddings/` directory of hash-assigned\n * shard files, migrated to ONE-WAY and ATOMICALLY (stage a complete shard\n * set, publish with a single directory rename, demote the legacy file to\n * a non-authoritative recovery artifact). Generations never merge, so a\n * crash cannot resurrect deleted entries or drop published ones.\n *\n * This module owns files, budgets, and durable diagnostics only — no index\n * caching or provider logic (that lives in `embedding-fallback.ts`).\n */\nimport path from \"node:path\";\nimport { constants as bufferConstants } from \"node:buffer\";\nimport { lstat, mkdir, mkdtemp, realpath, readFile, readdir, rename, rm, stat, writeFile } from \"node:fs/promises\";\nimport { log } from \"./logger.js\";\nimport { readEnvVar } from \"./runtime/env.js\";\nimport type { EmbeddingGenerationFence } from \"./embedding-generation-lock.js\";\n\nexport type EmbeddingProviderType = \"openai\" | \"local\" | \"host\";\n\nexport type EmbeddingIndexEntry = {\n vector: number[];\n path: string;\n};\n\nexport type EmbeddingIndexFile = {\n version: 1;\n provider: EmbeddingProviderType;\n model: string;\n entries: Record<string, EmbeddingIndexEntry>;\n};\n\nexport type EmbeddingIndexIdentity = Pick<EmbeddingIndexFile, \"provider\" | \"model\">;\n\n/** Outcome of reading one managed index file (legacy or shard). */\nexport type ManagedIndexRead =\n | { outcome: \"ok\"; file: EmbeddingIndexFile }\n | { outcome: \"absent\" }\n | { outcome: \"foreign\" }\n | { outcome: \"unreadable\"; reason: string };\n\n/** Which generation owns the index right now. */\nexport type IndexLayout = \"empty\" | \"legacy\" | \"sharded\";\n\n/**\n * Thrown when an embedding index (or one of its shards) cannot be persisted\n * within the per-file serialization budget. Issue #3146: index files are\n * materialized as single V8 strings, so a JSON document at or past\n * `bufferConstants.MAX_STRING_LENGTH` chars makes every read and write throw\n * `RangeError: Invalid string length`. The index is sharded before that\n * ceiling; this tagged error is reserved for the residual case where even\n * one shard cannot hold the payload (e.g. a single entry with an enormous\n * vector), so callers can classify it as recoverable-with-record instead of\n * an opaque background failure.\n */\nexport class EmbeddingIndexCapacityError extends Error {\n override readonly name = \"EmbeddingIndexCapacityError\" as const;\n constructor(\n message: string,\n readonly memoryId?: string,\n ) {\n super(message);\n }\n}\n\n/**\n * Thrown when an index file that should be authoritative cannot be read\n * (I/O error, over-budget size, unparseable JSON). Mutation paths fail\n * CLOSED on this: they must not continue with a fresh empty index and\n * pretend the previous vectors were loaded — the file is left untouched in\n * place for recovery. Read-only paths (recall) fail open to empty results\n * and record the reason durably.\n */\nexport class EmbeddingIndexStorageError extends Error {\n override readonly name = \"EmbeddingIndexStorageError\" as const;\n}\n\n/** Durable diagnostic row describing the last failed embedding-index write. */\nexport interface EmbeddingIndexWriteFailure {\n ts: string;\n kind: \"capacity\" | \"io\";\n message: string;\n memoryId?: string;\n}\n\n/**\n * Durable embedding-index diagnostics (issue #3146), persisted at\n * `<memoryDir>/state/embedding-fallback-status.json` and surfaced through\n * console_state, so background ingestion failures are visible to operators\n * instead of only ever appearing as log lines.\n */\nexport interface EmbeddingIndexStatusFile {\n version: 1;\n /** Cumulative count of failed index writes since the file was created. */\n failureCount: number;\n /** Active write failure; cleared by the next successful save. */\n lastWriteFailure?: EmbeddingIndexWriteFailure;\n /** Set when an unreadable index file was detected instead of overwritten. */\n lastReadRecovery?: { ts: string; message: string };\n lastSuccessAt?: string;\n}\n\n/**\n * Per-file serialization budget (JSON-string chars) for WRITES of the legacy\n * `state/embeddings.json` file and of every shard under `state/embeddings/`.\n * The 16MiB margin keeps the write round-trip clear of the V8 single-string\n * ceiling even with UTF-8 byte/count skew and small header growth. Override\n * per environment (tests, headroom tuning) via\n * `REMNIC_EMBEDDING_INDEX_FILE_CHAR_LIMIT`.\n *\n * READS are gated by the HARD ceiling (`resolveIndexHardReadCharLimit`),\n * never by this budget: a legacy index written by an older version may\n * legitimately sit between the soft budget and the hard ceiling (the\n * reported production file does), and it must still load and migrate.\n */\nconst DEFAULT_INDEX_FILE_CHAR_LIMIT =\n bufferConstants.MAX_STRING_LENGTH - 16 * 1024 * 1024;\n\n/**\n * Hard single-string ceiling for READS: files at or above this size are not\n * attempted (a readFile would throw `RangeError: Invalid string length`);\n * their bytes are preserved in place and mutations fail closed with an\n * actionable error. Defaults to the V8 maximum; tests inject a small value\n * via `REMNIC_EMBEDDING_INDEX_HARD_READ_LIMIT_CHARS`.\n */\nfunction resolveIndexHardReadCharLimit(): number {\n const soft = resolveIndexFileCharLimit();\n const raw = readEnvVar(\"REMNIC_EMBEDDING_INDEX_HARD_READ_LIMIT_CHARS\");\n if (raw) {\n const parsed = Number(raw);\n if (Number.isInteger(parsed) && parsed >= soft) return parsed;\n }\n return bufferConstants.MAX_STRING_LENGTH;\n}\n\n/** Hash shards under `state/embeddings/` used once the budget is exceeded. */\nconst SHARD_COUNT = 64;\n\nconst SHARD_FILE_PATTERN = /^shard-\\d{4}\\.json$/;\n\nexport function resolveIndexFileCharLimit(): number {\n const raw = readEnvVar(\"REMNIC_EMBEDDING_INDEX_FILE_CHAR_LIMIT\");\n if (raw) {\n const parsed = Number(raw);\n if (Number.isInteger(parsed) && parsed >= 1024) return parsed;\n }\n return DEFAULT_INDEX_FILE_CHAR_LIMIT;\n}\n\nfunction shardFileName(shardIndex: number): string {\n return `shard-${String(shardIndex).padStart(4, \"0\")}.json`;\n}\n\n/**\n * Fixed transaction backup path for identity replacements. A fixed (not\n * per-process) name is what makes the rename gap recoverable: whatever\n * process restarts after a crash finds the demoted former generation here\n * and rolls it back into place.\n */\nfunction replacementBackupPath(shardDir: string): string {\n return path.join(path.dirname(shardDir), \"embeddings.pre-replace.tmp\");\n}\n\n/**\n * Stable FNV-1a shard assignment: an entry always hashes to the same shard,\n * so an update or removal never needs a manifest to find its file.\n */\nexport function shardIndexOf(memoryId: string, shardCount: number): number {\n let hash = 0x811c9dc5;\n for (let i = 0; i < memoryId.length; i++) {\n hash ^= memoryId.charCodeAt(i);\n hash = Math.imul(hash, 0x01000193) >>> 0;\n }\n return hash % shardCount;\n}\n\n/**\n * A shard file named `shard-NNNN.json` must only contain ids that hash to\n * that shard: a misplaced copy would be loaded today and silently resurrect\n * stale vectors after the computed shard is rewritten (issue #3148, round 6).\n * Throws the tagged storage error so mutations fail closed and recall fails\n * open at its boundary.\n */\nexport function validateShardMembership(shardName: string, file: EmbeddingIndexFile): void {\n const match = /^shard-(\\d{4})\\.json$/.exec(shardName);\n if (!match) return; // not a shard file (legacy documents have no constraint)\n const shardIndex = Number(match[1]);\n for (const id of Object.keys(file.entries)) {\n if (shardIndexOf(id, SHARD_COUNT) !== shardIndex) {\n throw new EmbeddingIndexStorageError(\n `refusing embedding index shard ${shardName}: id ${id} hashes to shard ${shardIndexOf(id, SHARD_COUNT)}, not ${shardIndex}; file preserved in place`,\n );\n }\n }\n}\n\nexport function isInvalidStringLengthError(err: unknown): boolean {\n return err instanceof RangeError && /invalid string length/i.test(err.message);\n}\n\n/**\n * Parse and FULLY validate one serialized index document (legacy or shard).\n * The single read boundary shared by disk reads and offline-sync pulls: a\n * document with a valid header but a malformed body (`entries` not a plain\n * record, or an entry whose `path` is not a string / whose `vector` is not a\n * finite-number array) is `unreadable`, not `ok` — recall fails open on the\n * tagged reason, mutations fail closed, and the bytes are never overwritten\n * (issue #3148 review, round 4).\n */\nexport function parseEmbeddingIndexDocument(raw: string): ManagedIndexRead {\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (err) {\n return {\n outcome: \"unreadable\",\n reason: `JSON parse failed: ${err instanceof Error ? err.message : String(err)}`,\n };\n }\n if (\n !parsed ||\n typeof parsed !== \"object\" ||\n Array.isArray(parsed) ||\n (parsed as Partial<EmbeddingIndexFile>).version !== 1 ||\n typeof (parsed as Partial<EmbeddingIndexFile>).provider !== \"string\" ||\n typeof (parsed as Partial<EmbeddingIndexFile>).model !== \"string\" ||\n ((parsed as Partial<EmbeddingIndexFile>).model as string).length === 0\n ) {\n return { outcome: \"foreign\" };\n }\n // An unsupported identity must fail closed like any other malformed\n // document: recall cannot serve it and mutations must not adopt it as\n // authoritative (issue #3148, round 6).\n if (\n (parsed as Partial<EmbeddingIndexFile>).provider !== \"openai\" &&\n (parsed as Partial<EmbeddingIndexFile>).provider !== \"local\" &&\n (parsed as Partial<EmbeddingIndexFile>).provider !== \"host\"\n ) {\n return { outcome: \"foreign\" };\n }\n const entries = (parsed as Partial<EmbeddingIndexFile>).entries;\n if (!entries || typeof entries !== \"object\" || Array.isArray(entries)) {\n return {\n outcome: \"unreadable\",\n reason: \"entries must be a plain record of memory id -> entry\",\n };\n }\n for (const [id, entry] of Object.entries(entries as Record<string, unknown>)) {\n if (!entry || typeof entry !== \"object\" || Array.isArray(entry)) {\n return { outcome: \"unreadable\", reason: `entry ${id} must be an object` };\n }\n const candidate = entry as Partial<EmbeddingIndexEntry>;\n if (typeof candidate.path !== \"string\") {\n return { outcome: \"unreadable\", reason: `entry ${id}.path must be a string` };\n }\n if (!Array.isArray(candidate.vector)) {\n return { outcome: \"unreadable\", reason: `entry ${id}.vector must be an array` };\n }\n for (const component of candidate.vector) {\n if (!Number.isFinite(component)) {\n return {\n outcome: \"unreadable\",\n reason: `entry ${id}.vector must contain only finite numbers`,\n };\n }\n }\n }\n return { outcome: \"ok\", file: parsed as EmbeddingIndexFile };\n}\n\n/**\n * Group a complete index into per-shard entry records using the stable FNV\n * assignment. Shared by `persist()` and the offline-sync generation\n * transaction so a converted generation shards identically everywhere.\n */\nexport function shardEntriesForIndex(\n index: EmbeddingIndexFile,\n): Map<number, Record<string, EmbeddingIndexEntry>> {\n const groups = new Map<number, Record<string, EmbeddingIndexEntry>>();\n for (const id of Object.keys(index.entries)) {\n const shardIndex = shardIndexOf(id, SHARD_COUNT);\n const group = groups.get(shardIndex);\n if (group) group[id] = index.entries[id];\n else groups.set(shardIndex, { [id]: index.entries[id] });\n }\n return groups;\n}\n\n/**\n * Serialize one shard, translating a ceiling overflow into a tagged,\n * recoverable capacity error. Exported for the offline-sync generation\n * transaction, which stages incoming generations through the same budget.\n */\nexport function serializeEmbeddingShard(\n index: EmbeddingIndexFile,\n shardIndex: number,\n entries: Record<string, EmbeddingIndexEntry>,\n limit: number = resolveIndexFileCharLimit(),\n): string {\n let body: string;\n try {\n body = JSON.stringify({\n version: 1 as const,\n provider: index.provider,\n model: index.model,\n entries,\n });\n } catch (err) {\n throw new EmbeddingIndexCapacityError(\n `embedding index shard ${shardFileName(shardIndex)} exceeded the single-string ceiling while serializing: ${err instanceof Error ? err.message : String(err)}`,\n largestEntryId(entries) || undefined,\n );\n }\n if (body.length > limit) {\n const worstId = largestEntryId(entries);\n const worstLength = worstId && entries[worstId] ? JSON.stringify(entries[worstId]).length : 0;\n throw new EmbeddingIndexCapacityError(\n `embedding index shard ${shardFileName(shardIndex)} needs ${body.length} chars, over the ${limit}-char single-file limit; largest entry ${worstId || \"(unknown)\"} serializes to ${worstLength} chars`,\n worstId || undefined,\n );\n }\n return body;\n}\n\nfunction largestEntryId(entries: Record<string, EmbeddingIndexEntry>): string {\n let worstId = \"\";\n let worstLength = 0;\n for (const [id, entry] of Object.entries(entries)) {\n let length: number;\n try {\n length = JSON.stringify(entry).length;\n } catch {\n return id;\n }\n if (length > worstLength) {\n worstLength = length;\n worstId = id;\n }\n }\n return worstId;\n}\n\n/**\n * Optional canonical secure-store IO for the daemon. When provided (both\n * halves), file content is read/written through the SAME\n * StorageManager-backed contract offline sync uses: canonical-path AAD,\n * secure-key-aware, atomic. Shard STAGING writes carry the FINAL published\n * path so the post-publish rename keeps the ciphertext decryptable; dirty\n * shard, status, and legacy writes are their own canonical final path.\n * When omitted, the store behaves exactly as before (raw plaintext fs).\n * The diagnostics status file is intentionally ALWAYS plain: it holds no\n * memory content (failure strings/counts only) and console_state reads it\n * without unlocking the store.\n */\nexport interface EmbeddingIndexStoreIo {\n readUtf8(filePath: string): Promise<string>;\n writeUtf8(filePath: string, contents: string, opts?: { finalAadFilePath?: string }): Promise<void>;\n}\n\nexport class EmbeddingIndexFileStore {\n constructor(\n private readonly indexPath: string,\n private readonly shardDir: string,\n private readonly statusPath: string,\n private readonly io?: EmbeddingIndexStoreIo,\n ) {\n if (io && (Boolean(io.readUtf8) !== Boolean(io.writeUtf8))) {\n throw new EmbeddingIndexStorageError(\n \"embedding index store io requires both readUtf8 and writeUtf8; a half-wired io would mix encrypted and plaintext files\",\n );\n }\n }\n\n /** Legacy single-file layout path (public for error messages). */\n get legacyPath(): string {\n return this.indexPath;\n }\n\n /** Record an unreadable-authoritative-file reason (both read and mutation paths). */\n async recordIndexStatusForLoad(reason: string): Promise<void> {\n await this.recordIndexStatus({\n lastReadRecovery: { ts: new Date().toISOString(), message: reason },\n });\n }\n\n /**\n * Which generation owns the index right now. The published\n * `state/embeddings/` directory IS the layout marker: until it exists the\n * legacy file is authoritative; from the atomic rename onward it never\n * merges again.\n */\n async detectLayout(): Promise<IndexLayout> {\n // An interrupted identity replacement leaves the published directory\n // absent with the fixed transaction backup still on disk (the publish\n // rename never completed). Report SHARDED for that gap: the backup holds\n // the authoritative generation, so neither the legacy file nor a fresh\n // index may win, and reads fail open to empty until the mutation queue\n // performs the rollback. The rollback itself only ever runs inside\n // persist() — a write — so read paths never race an in-flight\n // replacement with a recovery rename (issue #3148 review).\n try {\n // lstat, NOT stat: a symlinked generation directory must be rejected\n // outright — following it would read or write OUTSIDE the state\n // directory through the link (codex PRRT_kwDORJXyws6mZ72r).\n const info = await lstat(this.shardDir);\n if (info.isSymbolicLink()) {\n throw new EmbeddingIndexStorageError(\n `embedding index shard directory is a symlink; refusing to read or write through it: ${this.shardDir}`,\n );\n }\n return \"sharded\";\n } catch (err) {\n if (err instanceof EmbeddingIndexStorageError) throw err;\n if ((err as NodeJS.ErrnoException).code !== \"ENOENT\") {\n // The pointer exists but cannot be stat'ed — fail towards the\n // published generation so its readers surface the I/O error.\n log.warn(`embedding index: shard dir stat failed (${err instanceof Error ? err.message : String(err)}); assuming sharded layout`);\n return \"sharded\";\n }\n if (await this.replacementBackupExists()) return \"sharded\";\n return this.legacyOrEmptyLayout();\n }\n }\n\n /**\n * Roll the fixed transaction backup back into the published position.\n * Returns true when a rollback happened.\n */\n private async replacementBackupExists(): Promise<boolean> {\n const backupPath = replacementBackupPath(this.shardDir);\n try {\n await stat(backupPath);\n return true;\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"ENOENT\") return false;\n // An unreadable backup must not be silently treated as absent —\n // that would permit the legacy fallback over a generation we cannot\n // inspect (issue #3148 review, round 1).\n throw new EmbeddingIndexStorageError(\n `cannot stat embedding index replacement backup ${backupPath}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n /**\n * The fixed transaction backup is a path with well-known semantics; a\n * planted symlink must never be restored into the published position (it\n * would point the generation outside the memory dir) nor removed through\n * as if it were the former generation. Symlinks are rejected outright.\n */\n private async assertBackupNotSymlink(backupPath: string): Promise<void> {\n const info = await lstat(backupPath).catch((err) => {\n if ((err as NodeJS.ErrnoException).code === \"ENOENT\") return null;\n throw err;\n });\n if (info?.isSymbolicLink()) {\n throw new EmbeddingIndexStorageError(\n `embedding index replacement backup is a symlink; refusing to touch it: ${backupPath}`,\n );\n }\n }\n\n /**\n * Mutation-queue entry point: roll the fixed transaction backup back into\n * the published position after an interrupted replacement. Returns true\n * when a rollback happened. Only fires in the actual rename gap\n * (published directory absent); callers must invalidate any cached index\n * view when this returns true.\n */\n async recoverIfInterrupted(fence?: EmbeddingGenerationFence): Promise<boolean> {\n // Only the rename gap (published directory absent) is recoverable. When\n // the directory is present - including after a crash that followed a\n // successful publish - the generation on disk is already authoritative\n // and renaming the backup onto it would fail with EEXIST (issue #3148\n // review, round 2).\n try {\n await stat(this.shardDir);\n return false;\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code !== \"ENOENT\") {\n log.warn(`embedding index: recovery skipped because shard dir stat failed: ${err instanceof Error ? err.message : String(err)}`);\n return false;\n }\n }\n const backupPath = replacementBackupPath(this.shardDir);\n if (!(await this.replacementBackupExists())) return false;\n await this.assertBackupNotSymlink(backupPath);\n // The rollback rename is destructive: reassert lock ownership first.\n await fence?.();\n await rename(backupPath, this.shardDir);\n log.warn(\n `embedding index: recovered interrupted replacement; former generation restored from ${backupPath}`,\n );\n await this.recordIndexStatus({\n lastReadRecovery: {\n ts: new Date().toISOString(),\n message: \"interrupted identity replacement rolled back to the former generation\",\n },\n });\n return true;\n }\n\n private async legacyOrEmptyLayout(): Promise<IndexLayout> {\n try {\n await stat(this.indexPath);\n return \"legacy\";\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"ENOENT\") return \"empty\";\n throw err;\n }\n }\n\n /** Header identity of the authoritative generation, read leniently. */\n async identityFromDisk(): Promise<EmbeddingIndexIdentity | null> {\n const layout = await this.detectLayout();\n if (layout === \"sharded\") {\n // Shard files are bounded by the per-file budget, so the identity\n // probe never reads a ceiling-sized string.\n for (const name of await this.readShardNames()) {\n const read = await this.readFileAt(path.join(this.shardDir, name));\n if (read.outcome === \"ok\") {\n return { provider: read.file.provider, model: read.file.model };\n }\n }\n return null;\n }\n if (layout === \"legacy\") {\n const read = await this.readFileAt(this.indexPath);\n if (read.outcome === \"ok\") {\n return { provider: read.file.provider, model: read.file.model };\n }\n }\n return null;\n }\n\n /**\n * Load every readable shard into `merged`. Returns the generation identity.\n * Unreadable shards record durable diagnostics; `strict` additionally\n * fails the mutation closed.\n */\n async readShardGenerationInto(\n merged: Record<string, EmbeddingIndexEntry>,\n ): Promise<EmbeddingIndexIdentity | null> {\n let identity: EmbeddingIndexIdentity | null = null;\n for (const name of await this.readShardNames()) {\n const read = await this.readFileAt(path.join(this.shardDir, name));\n if (read.outcome !== \"ok\") {\n if (read.outcome === \"unreadable\") {\n await this.recordIndexStatus({\n lastReadRecovery: { ts: new Date().toISOString(), message: `${name}: ${read.reason}` },\n });\n throw new EmbeddingIndexStorageError(\n `refusing to continue from unreadable embedding index shard ${name}: ${read.reason}`,\n );\n }\n await this.recordIndexStatus({\n lastReadRecovery: { ts: new Date().toISOString(), message: `${name}: unrecognized index format` },\n });\n throw new EmbeddingIndexStorageError(\n `refusing to continue from malformed embedding index shard ${name} (unrecognized format); file preserved in place`,\n );\n }\n try {\n validateShardMembership(name, read.file);\n } catch (error) {\n await this.recordIndexStatus({\n lastReadRecovery: { ts: new Date().toISOString(), message: String(error) },\n });\n throw error;\n }\n const shardIdentity = { provider: read.file.provider, model: read.file.model };\n if (!identity) identity = shardIdentity;\n if (!sameIndexIdentity(shardIdentity, identity)) {\n // A partial rewrite from this map would silently drop the foreign\n // shard's entries, so even recall must not serve this generation.\n throw new EmbeddingIndexStorageError(\n `refusing to continue from mixed-identity embedding index generation: ${name} is ${shardIdentity.provider}/${shardIdentity.model} but the generation identity is ${identity.provider}/${identity.model}; files preserved in place`,\n );\n }\n Object.assign(merged, read.file.entries);\n }\n return identity;\n }\n\n async readLegacy(): Promise<ManagedIndexRead> {\n return this.readFileAt(this.indexPath);\n }\n\n /**\n * Read one managed index file (legacy or shard). The file is never\n * modified or moved here: an unreadable file stays in place for recovery\n * and is reported through the returned outcome (mutation paths fail\n * closed on it; read-only paths fail open and record the reason).\n */\n /**\n * Read/mutation boundary for any generation member or the legacy marker\n * (codex PRRT_kwDORJXyws6mZ72r): a symlinked member is rejected outright\n * and its real target must stay inside the canonical state directory —\n * following a planted link would read or write outside the memory root.\n * Runs BEFORE the secure IO so storage-backed reads are covered too.\n */\n private async assertGenerationFileNotSymlinked(filePath: string): Promise<void> {\n const info = await lstat(filePath).catch((err) => {\n if ((err as NodeJS.ErrnoException).code === \"ENOENT\") return null;\n throw new EmbeddingIndexStorageError(\n `cannot lstat embedding index file ${filePath}: ${err instanceof Error ? err.message : String(err)}`,\n );\n });\n const stateDir = path.dirname(this.shardDir);\n // Containment must be checked even when the member itself is a regular\n // file: a SYMLINKED GENERATION DIRECTORY lets reads through to whatever\n // path the link resolves to — a regular file in a linked dir is still\n // outside the memory root and must be rejected.\n const real = await realpath(filePath).catch(() => null);\n if (real) {\n const scope = await realpath(stateDir).catch(() => stateDir);\n const rel = path.relative(scope, real);\n if (rel.startsWith(\"..\") || path.isAbsolute(rel)) {\n throw new EmbeddingIndexStorageError(\n `embedding index file escapes the state directory via symlink; refusing: ${filePath} -> ${real}`,\n );\n }\n }\n if (!info || !info.isSymbolicLink()) return;\n throw new EmbeddingIndexStorageError(\n `embedding index file is a symlink; refusing to read or write through it: ${filePath}`,\n );\n }\n\n async readFileAt(filePath: string): Promise<ManagedIndexRead> {\n await this.assertGenerationFileNotSymlinked(filePath);\n const hardLimit = resolveIndexHardReadCharLimit();\n let size = 0;\n try {\n size = (await stat(filePath)).size;\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"ENOENT\") return { outcome: \"absent\" };\n return { outcome: \"unreadable\", reason: `stat failed: ${err instanceof Error ? err.message : String(err)}` };\n }\n // Reads are gated by the HARD single-string ceiling only — NOT by the\n // soft write budget — so a legacy index from an older version sitting\n // between the two still loads and migrates (issue #3146). Byte size is\n // only a conservative bound for UTF-8 (bytes ≥ chars): at or below it a\n // readFile is guaranteed materializable; past it the file MAY still be\n // readable as a string, but refusing is the safe side. An over-ceiling\n // file is preserved in place; the caller decides fail-open (recall) or\n // fail-closed (mutation).\n if (size > hardLimit) {\n return {\n outcome: \"unreadable\",\n reason: `file is ${size} bytes, over the ${hardLimit}-char hard single-string read ceiling (V8 RangeError territory); bytes preserved in place — move or prune the file to recover`,\n };\n }\n let raw: string;\n try {\n raw = this.io\n ? await this.io.readUtf8(filePath)\n : await readFile(filePath, \"utf-8\");\n } catch (err) {\n return { outcome: \"unreadable\", reason: `read failed: ${err instanceof Error ? err.message : String(err)}` };\n }\n return parseEmbeddingIndexDocument(raw);\n }\n\n private async readShardNames(): Promise<string[]> {\n try {\n return (await readdir(this.shardDir))\n .filter((name) => SHARD_FILE_PATTERN.test(name))\n .sort();\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"ENOENT\") return [];\n // The published generation exists but cannot be enumerated. Treating\n // it as empty would let a mutation overwrite shards it never saw, so\n // this must propagate — strict mutation fails closed, recall fails\n // open at its boundary (issue #3146 review).\n throw new EmbeddingIndexStorageError(\n `cannot enumerate embedding index shard directory ${this.shardDir}: ${err instanceof Error ? `${err.message} (${(err as NodeJS.ErrnoException).code ?? \"unknown\"})` : String(err)}`,\n );\n }\n }\n\n /**\n * Persist the index. Layout decisions, in order:\n * - published generation: rewrite only the shards this mutation touched;\n * - legacy/empty generation and the whole index fits one bounded JSON\n * string: stay the single `state/embeddings.json` file;\n * - over budget: ONE-WAY migration — stage a complete shard set, publish\n * it with a single directory rename, then rename the legacy file aside\n * as a non-authoritative recovery artifact (issue #3146).\n */\n async persist(\n index: EmbeddingIndexFile,\n opts: {\n touchedIds?: readonly string[];\n memoryId?: string;\n /** Reasserts mutation-lock ownership immediately before each destructive write (after serialization). */\n fence?: EmbeddingGenerationFence;\n } = {},\n ): Promise<void> {\n const stateDir = path.dirname(this.indexPath);\n await mkdir(stateDir, { recursive: true });\n await this.cleanForeignStagingDirs();\n // NOTE: interrupted-replacement recovery runs in the mutation wrapper\n // (EmbeddingFallback.enqueueIndexMutation) BEFORE this method, so the\n // caller's index already reflects the restored generation.\n\n const groups = shardEntriesForIndex(index);\n\n const layout = await this.detectLayout();\n\n if (layout === \"sharded\") {\n const limit = resolveIndexFileCharLimit();\n // An identity change on a published generation (a sharded host index\n // replaced by a fallback provider, or a host-model change) must\n // publish a COMPLETE replacement: the dirty-shard fast path would\n // rewrite only the touched shard under the new identity and leave the\n // former identity's shards in place — a mixed generation that every\n // later load rejects (codex P1, PR #3148).\n const diskIdentity = await this.identityFromDisk();\n if (groups.size === 0) {\n // An empty directory has no transport-visible deletion evidence.\n // Publish a valid empty shard so a peer without a shared base also\n // replaces its stale generation rather than preserving old vectors.\n groups.set(0, {});\n await this.publishReplacementGeneration(index, groups, limit, opts.fence);\n return;\n }\n const identityChanged =\n diskIdentity !== null &&\n (diskIdentity.provider !== index.provider || diskIdentity.model !== index.model);\n if (identityChanged) {\n await this.publishReplacementGeneration(index, groups, limit, opts.fence);\n return;\n }\n const dirtyShards = opts.touchedIds?.length\n ? new Set(opts.touchedIds.map((id) => shardIndexOf(id, SHARD_COUNT)))\n : null;\n // Serialize every touched shard BEFORE writing anything so a capacity\n // failure cannot leave a partial rewrite.\n const targets = dirtyShards ? [...dirtyShards] : [...groups.keys()];\n const payloads = targets\n .filter((shardIndex) => groups.has(shardIndex))\n .map((shardIndex) => ({\n shardIndex,\n body: serializeEmbeddingShard(index, shardIndex, groups.get(shardIndex)!, limit),\n }));\n // Serialization is done: reassert lock ownership immediately before\n // the destructive live-generation writes.\n await opts.fence?.();\n for (const payload of payloads) {\n await this.writeAtomicFile(\n path.join(this.shardDir, shardFileName(payload.shardIndex)),\n payload.body,\n );\n }\n // A dirty shard with no remaining entries (its last entry was just\n // removed) must be removed from disk, not silently skipped.\n for (const shardIndex of targets) {\n if (!groups.has(shardIndex)) {\n await rm(path.join(this.shardDir, shardFileName(shardIndex)), { force: true });\n }\n }\n return;\n }\n\n let whole: string | null;\n try {\n whole = JSON.stringify(index);\n } catch (err) {\n if (!isInvalidStringLengthError(err)) throw err;\n whole = null;\n }\n const limit = resolveIndexFileCharLimit();\n if (whole !== null && whole.length <= limit) {\n // Serialized above: reassert lock ownership immediately before the\n // destructive atomic write.\n await opts.fence?.();\n await this.writeAtomicFile(this.indexPath, whole);\n return;\n }\n\n // One-way migration. Until the publish rename, the legacy file stays\n // authoritative; afterwards the published directory is the only\n // generation and the legacy file is demoted to a recovery artifact.\n const stagingDir = path.join(\n stateDir,\n `embeddings.staging.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`,\n );\n await mkdir(stagingDir, { recursive: true });\n try {\n await this.stageShardSet(stagingDir, index, groups, limit);\n // Atomic publish: the directory appearing IS the layout marker.\n await this.publishSwappedGeneration(stagingDir, opts.fence);\n } catch (err) {\n await rm(stagingDir, { recursive: true, force: true }).catch(() => undefined);\n throw err;\n }\n await rename(\n this.indexPath,\n `${this.indexPath}.pre-migration.tmp-${Date.now()}-${Math.random().toString(16).slice(2)}`,\n ).catch(() => undefined);\n }\n\n /**\n * Replace a published generation wholesale after a provider/model identity\n * change (replacement semantics — the former entries are obsolete by\n * definition). Crash-safe by the same construction as the migration: the\n * COMPLETE new-identity set is staged and validated first (old bytes are\n * not touched until staging succeeds), then published atomically through\n * `publishSwappedGeneration`.\n */\n private async publishReplacementGeneration(\n index: EmbeddingIndexFile,\n groups: Map<number, Record<string, EmbeddingIndexEntry>>,\n limit: number,\n fence?: EmbeddingGenerationFence,\n ): Promise<void> {\n const stateDir = path.dirname(this.indexPath);\n const stagingDir = path.join(\n stateDir,\n `embeddings.staging.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`,\n );\n await mkdir(stagingDir, { recursive: true });\n try {\n await this.stageShardSet(stagingDir, index, groups, limit);\n await this.publishSwappedGeneration(stagingDir, fence);\n } catch (err) {\n await rm(stagingDir, { recursive: true, force: true }).catch(() => undefined);\n throw err;\n }\n }\n\n /**\n * Write a complete shard set into a staging directory. Every shard is\n * serialized before the first write, so a capacity failure cannot leave a\n * partial stage behind.\n */\n private async stageShardSet(\n stagingDir: string,\n index: EmbeddingIndexFile,\n groups: Map<number, Record<string, EmbeddingIndexEntry>>,\n limit: number,\n ): Promise<void> {\n const payloads = [...groups]\n .map(([shardIndex, entries]) => ({\n shardIndex,\n body: serializeEmbeddingShard(index, shardIndex, entries, limit),\n }));\n for (const payload of payloads) {\n const finalAadFilePath = path.join(this.shardDir, shardFileName(payload.shardIndex));\n await this.writeAtomicFile(\n path.join(stagingDir, shardFileName(payload.shardIndex)),\n payload.body,\n { finalAadFilePath },\n );\n }\n }\n\n /**\n * Atomically remove the published generation (offline-sync: the remote\n * deleted the whole index) by publishing an EMPTY staged directory\n * through the shared swap: the rename is atomic, so the former generation\n * moves whole into the fixed backup and back — a failure before the\n * commit rolls the former generation back intact, and a post-commit\n * backup-cleanup failure is non-fatal (the empty published directory\n * stays the authoritative one-way layout marker). The fixed backup is\n * symlink-checked first (round 5).\n */\n async removePublishedGeneration(fence?: EmbeddingGenerationFence): Promise<void> {\n const backupPath = replacementBackupPath(this.shardDir);\n await this.assertBackupNotSymlink(backupPath);\n await rm(backupPath, { recursive: true, force: true });\n // Remove by publishing an EMPTY staged directory through the SAME swap\n // state machine as every other publication: rename is atomic, so the\n // former generation moves whole into the fixed backup and back — a\n // partially-deleted generation can never be exposed. The empty\n // published directory stays the one-way layout marker, so a stray\n // legacy file can never become authoritative after removal. The\n // demoted backup's post-commit cleanup is non-fatal (existing\n // publishSwappedGeneration semantics).\n await mkdir(path.dirname(this.shardDir), { recursive: true });\n const emptyStaging = await mkdtemp(\n path.join(path.dirname(this.shardDir), \"embeddings.staging.tmp-empty-\"),\n );\n try {\n await this.publishSwappedGeneration(emptyStaging, fence);\n } catch (err) {\n await rm(emptyStaging, { recursive: true, force: true }).catch(() => undefined);\n throw err;\n }\n }\n\n /**\n * Atomically publish a fully staged generation directory as THE published\n * generation. The former published directory is demoted to the FIXED\n * transaction backup and the staging dir is renamed in with a single\n * rename; if the publish rename fails the former generation is rolled\n * back, and if the process dies in the rename gap `detectLayout()` /\n * `recoverIfInterrupted()` perform the same rollback on next use.\n * Shared by the mutation-side migration/replacement and the offline-sync\n * generation transaction (issue #3148, round 4) so there is exactly one\n * swap state machine. Staging-dir cleanup stays with the caller.\n */\n async publishSwappedGeneration(stagingDir: string, fence?: EmbeddingGenerationFence): Promise<void> {\n // The replacement is published: the backup is obsolete disk. A cleanup\n // failure is non-fatal (the next replacement removes it) but must stay\n // visible.\n const backupPath = replacementBackupPath(this.shardDir);\n await this.assertBackupNotSymlink(backupPath);\n // Cheap ownership check before the destructive backup cleanup: a peer\n // stale-break would otherwise see the backup vanish under it before we\n // even reach the live renames (Kilo PRRT_kwDORJXyws6mZ8i5).\n await fence?.();\n await rm(backupPath, { recursive: true, force: true });\n // Second ownership check immediately before the live renames: any\n // delay between the cleanup and the rename still allows a stale-break,\n // and publishing now would clobber the peer's write.\n await fence?.();\n let demoted = false;\n try {\n await stat(this.shardDir);\n await rename(this.shardDir, backupPath);\n demoted = true;\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code !== \"ENOENT\") throw err;\n }\n try {\n await rename(stagingDir, this.shardDir);\n } catch (err) {\n if (demoted) await rename(backupPath, this.shardDir).catch(() => undefined);\n throw err;\n }\n await rm(backupPath, { recursive: true, force: true }).catch((err) => {\n log.warn(`embedding index: could not remove replacement backup ${backupPath}: ${err}`);\n });\n }\n\n /** Remove staging dirs orphaned by crashed migrations. A foreign dir younger than the grace window may belong to a live writer mid-migration, so only older dirs are removed (issue #3148 review, round 3). */\n private static readonly STAGING_CLEANUP_GRACE_MS = 10 * 60 * 1000;\n\n private async cleanForeignStagingDirs(): Promise<void> {\n const stateDir = path.dirname(this.indexPath);\n let names: string[] = [];\n try {\n names = await readdir(stateDir);\n } catch {\n return;\n }\n const ownPrefix = `embeddings.staging.tmp-${process.pid}-`;\n const cutoff = Date.now() - EmbeddingIndexFileStore.STAGING_CLEANUP_GRACE_MS;\n for (const name of names) {\n if (!name.startsWith(\"embeddings.staging.tmp-\") || name.startsWith(ownPrefix)) continue;\n try {\n const stats = await stat(path.join(stateDir, name));\n if (stats.mtimeMs > cutoff) continue;\n } catch {\n continue;\n }\n await rm(path.join(stateDir, name), { recursive: true, force: true }).catch(() => undefined);\n }\n }\n\n /**\n * Temp-file + rename write. The temp name carries `.tmp-` so offline sync\n * ignores in-flight files under `state/`. With a wired io, the write goes\n * through the canonical secure-store contract instead, optionally binding\n * the ciphertext to the FINAL published path (staged shards).\n */\n private async writeAtomicFile(\n filePath: string,\n contents: string,\n opts?: { finalAadFilePath?: string; bypassSecureIo?: boolean },\n ): Promise<void> {\n if (this.io && opts?.bypassSecureIo !== true) {\n await this.io.writeUtf8(filePath, contents, opts?.finalAadFilePath === undefined ? undefined : { finalAadFilePath: opts.finalAadFilePath });\n return;\n }\n const tempPath = `${filePath}.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`;\n try {\n await writeFile(tempPath, contents, \"utf-8\");\n await rename(tempPath, filePath);\n } catch (err) {\n await rm(tempPath, { force: true }).catch(() => undefined);\n throw err;\n }\n }\n\n /**\n * Record the outcome of one index mutation durably. This is diagnostics,\n * NOT recovery: write failures are recorded and then re-thrown by the\n * caller so the extraction/consolidation task fails explicitly instead of\n * declaring success over an index that could not be persisted (issue\n * #3146).\n */\n async recordIndexWriteOutcome(err: unknown, memoryId?: string): Promise<void> {\n if (!err) {\n await this.recordIndexStatus({\n lastWriteFailure: null,\n lastSuccessAt: new Date().toISOString(),\n });\n return;\n }\n const kind: EmbeddingIndexWriteFailure[\"kind\"] =\n err instanceof EmbeddingIndexCapacityError || isInvalidStringLengthError(err)\n ? \"capacity\"\n : \"io\";\n await this.recordIndexStatus({\n failureCountIncrement: 1,\n lastWriteFailure: {\n ts: new Date().toISOString(),\n kind,\n message: err instanceof Error ? err.message : String(err),\n ...(memoryId ? { memoryId } : {}),\n },\n });\n }\n\n /**\n * Merge diagnostic state into `state/embedding-fallback-status.json`.\n * Best-effort: a diagnostics failure never masks the real outcome.\n */\n private async recordIndexStatus(\n patch: {\n failureCountIncrement?: number;\n lastWriteFailure?: EmbeddingIndexWriteFailure | null;\n lastReadRecovery?: { ts: string; message: string };\n lastSuccessAt?: string;\n },\n ): Promise<void> {\n try {\n let current: EmbeddingIndexStatusFile = { version: 1, failureCount: 0 };\n try {\n const parsed = JSON.parse(await readFile(this.statusPath, \"utf-8\")) as Partial<EmbeddingIndexStatusFile>;\n if (parsed && typeof parsed === \"object\" && typeof parsed.failureCount === \"number\") {\n current = { ...parsed, version: 1, failureCount: parsed.failureCount };\n }\n } catch {\n // Absent or unreadable status starts fresh; the index files own the truth.\n }\n const next: EmbeddingIndexStatusFile = { ...current };\n if (patch.failureCountIncrement) next.failureCount += patch.failureCountIncrement;\n if (patch.lastWriteFailure !== undefined) {\n if (patch.lastWriteFailure === null) delete next.lastWriteFailure;\n else next.lastWriteFailure = patch.lastWriteFailure;\n }\n if (patch.lastReadRecovery !== undefined) next.lastReadRecovery = patch.lastReadRecovery;\n if (patch.lastSuccessAt !== undefined) next.lastSuccessAt = patch.lastSuccessAt;\n // The status file is ALWAYS plain (non-secret diagnostics: failure\n // strings and counts only). It bypasses the secure io so console_state\n // keeps reading it on locked stores and failure counts never reset.\n await mkdir(path.dirname(this.statusPath), { recursive: true });\n await this.writeAtomicFile(this.statusPath, JSON.stringify(next), { bypassSecureIo: true });\n } catch (err) {\n log.debug(`embedding fallback status write failed: ${err}`);\n }\n }\n}\n\nfunction sameIndexIdentity(\n left: EmbeddingIndexIdentity,\n right: EmbeddingIndexIdentity,\n): boolean {\n return left.provider === right.provider && left.model === right.model;\n}\n"],"mappings":";;;;;;;;AAeA,OAAO,UAAU;AACjB,SAAS,aAAa,uBAAuB;AAC7C,SAAS,OAAO,OAAO,SAAS,UAAU,UAAU,SAAS,QAAQ,IAAI,MAAM,iBAAiB;AA0CzF,IAAM,8BAAN,cAA0C,MAAM;AAAA,EAErD,YACE,SACS,UACT;AACA,UAAM,OAAO;AAFJ;AAAA,EAGX;AAAA,EAHW;AAAA,EAHO,OAAO;AAO3B;AAUO,IAAM,6BAAN,cAAyC,MAAM;AAAA,EAClC,OAAO;AAC3B;AAwCA,IAAM,gCACJ,gBAAgB,oBAAoB,KAAK,OAAO;AASlD,SAAS,gCAAwC;AAC/C,QAAM,OAAO,0BAA0B;AACvC,QAAM,MAAM,WAAW,8CAA8C;AACrE,MAAI,KAAK;AACP,UAAM,SAAS,OAAO,GAAG;AACzB,QAAI,OAAO,UAAU,MAAM,KAAK,UAAU,KAAM,QAAO;AAAA,EACzD;AACA,SAAO,gBAAgB;AACzB;AAGA,IAAM,cAAc;AAEpB,IAAM,qBAAqB;AAEpB,SAAS,4BAAoC;AAClD,QAAM,MAAM,WAAW,wCAAwC;AAC/D,MAAI,KAAK;AACP,UAAM,SAAS,OAAO,GAAG;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KAAK;AAAA,YAC5C,MAAK,mBAAmB,MAAM;AAAA,MACrC;AACA,UAAI,MAAM,qBAAqB,OAAW,MAAK,mBAAmB,MAAM;AACxE,UAAI,MAAM,kBAAkB,OAAW,MAAK,gBAAgB,MAAM;AAIlE,YAAM,MAAM,KAAK,QAAQ,KAAK,UAAU,GAAG,EAAE,WAAW,KAAK,CAAC;AAC9D,YAAM,KAAK,gBAAgB,KAAK,YAAY,KAAK,UAAU,IAAI,GAAG,EAAE,gBAAgB,KAAK,CAAC;AAAA,IAC5F,SAAS,KAAK;AACZ,UAAI,MAAM,2CAA2C,GAAG,EAAE;AAAA,IAC5D;AAAA,EACF;AACF;AAEA,SAAS,kBACP,MACA,OACS;AACT,SAAO,KAAK,aAAa,MAAM,YAAY,KAAK,UAAU,MAAM;AAClE;","names":["limit"]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
drainPendingLifecycleForSyncOrThrow,
|
|
6
6
|
drainPendingLifecycleLedgerForSync
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-22DYJLFN.js";
|
|
8
8
|
import {
|
|
9
9
|
displayErrorDetail
|
|
10
10
|
} from "./chunk-RL6NEVXT.js";
|
|
@@ -181,4 +181,4 @@ export {
|
|
|
181
181
|
offlineSyncStorageForSnapshot,
|
|
182
182
|
drainPendingLifecycleForOfflineSync
|
|
183
183
|
};
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-UP75KL3L.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
WHO_KNOWS_DEFAULT_LIMIT,
|
|
3
3
|
WHO_KNOWS_MAX_LIMIT,
|
|
4
4
|
validateWhoKnowsInput
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SZG4WFAG.js";
|
|
6
6
|
|
|
7
7
|
// src/who-knows-cli.ts
|
|
8
8
|
function extractWhoKnowsRawArgs(rest) {
|
|
@@ -74,4 +74,4 @@ export {
|
|
|
74
74
|
renderWhoKnowsText,
|
|
75
75
|
renderWhoKnows
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
77
|
+
//# sourceMappingURL=chunk-UQDC3W77.js.map
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
decryptMemoryDirToPlaintext,
|
|
21
21
|
migrateMemoryDirToEncrypted
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MAAL6OZV.js";
|
|
23
23
|
import {
|
|
24
24
|
generateSalt
|
|
25
25
|
} from "./chunk-A6XUJE5D.js";
|
|
@@ -499,4 +499,4 @@ export {
|
|
|
499
499
|
renderStatusReport,
|
|
500
500
|
createPassphraseReader
|
|
501
501
|
};
|
|
502
|
-
//# sourceMappingURL=chunk-
|
|
502
|
+
//# sourceMappingURL=chunk-V4JZCTMK.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDefaultNamespaceRoot
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TPEZ2SHV.js";
|
|
4
4
|
import {
|
|
5
5
|
StorageManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4HUCP4R4.js";
|
|
7
7
|
import {
|
|
8
8
|
composeLocationDayBody,
|
|
9
9
|
composeLocationDayMeta,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
serializeLocationDay,
|
|
24
24
|
updateLocationSourceDay,
|
|
25
25
|
writeLocationDay
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MY7B3HYC.js";
|
|
27
27
|
import {
|
|
28
28
|
resolveNamespaceCapabilities
|
|
29
29
|
} from "./chunk-BMXEBWBT.js";
|
|
@@ -728,4 +728,4 @@ export {
|
|
|
728
728
|
runLocationBackfill,
|
|
729
729
|
runLocationCliCommand
|
|
730
730
|
};
|
|
731
|
-
//# sourceMappingURL=chunk-
|
|
731
|
+
//# sourceMappingURL=chunk-VA4O3U7U.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hasMemoryData
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3AGHSQPM.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveNamespaceStorageRoot
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TPEZ2SHV.js";
|
|
7
7
|
import {
|
|
8
8
|
getConfiguredNamespaces
|
|
9
9
|
} from "./chunk-OWYHHW67.js";
|
|
@@ -724,4 +724,4 @@ export {
|
|
|
724
724
|
runNamespaceMaintenancePlan,
|
|
725
725
|
runNamespaceMaintenanceBatchPlan
|
|
726
726
|
};
|
|
727
|
-
//# sourceMappingURL=chunk-
|
|
727
|
+
//# sourceMappingURL=chunk-VDO32NLK.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildStandup,
|
|
3
3
|
parseStandupDate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QZLCVO2V.js";
|
|
5
5
|
import {
|
|
6
6
|
backfillMemoryStorage,
|
|
7
7
|
runLocationBackfill,
|
|
@@ -9,23 +9,23 @@ import {
|
|
|
9
9
|
runLocationDay,
|
|
10
10
|
runLocationStatus,
|
|
11
11
|
runLocationSync
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VA4O3U7U.js";
|
|
13
13
|
import {
|
|
14
14
|
externalWikiSearchOperation
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7D7OUO5W.js";
|
|
16
16
|
import {
|
|
17
17
|
DECISION_SUBCOMMANDS,
|
|
18
18
|
DELTA_SUBCOMMANDS,
|
|
19
19
|
defineOperation,
|
|
20
20
|
isCodegraphToolName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CALBQ2NG.js";
|
|
22
22
|
import {
|
|
23
23
|
CorrectionContractError
|
|
24
24
|
} from "./chunk-QLK3SL7Q.js";
|
|
25
25
|
import {
|
|
26
26
|
memoryStoreRequestSchema,
|
|
27
27
|
retainedCategoryAlias
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-3QKO4QN7.js";
|
|
29
29
|
import {
|
|
30
30
|
serializeMutations,
|
|
31
31
|
withHeldFileLock
|
|
@@ -1914,4 +1914,4 @@ export {
|
|
|
1914
1914
|
codegraphIngestTracesOperation,
|
|
1915
1915
|
REGISTERED_OPERATIONS
|
|
1916
1916
|
};
|
|
1917
|
-
//# sourceMappingURL=chunk-
|
|
1917
|
+
//# sourceMappingURL=chunk-VHDKPGMG.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runGraphEdgeDecayMaintenanceAcrossNamespaces
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SCXURCVT.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeDreamsStatusWindowHours
|
|
6
6
|
} from "./chunk-EQWEIIKQ.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
executeResolution,
|
|
9
9
|
isValidResolutionVerb,
|
|
10
10
|
runPreferenceDriftScan
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-R3X2T2LP.js";
|
|
12
12
|
import {
|
|
13
13
|
getRecallTimingStatus,
|
|
14
14
|
isRecallTimingsOperator
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
defineOperation,
|
|
22
22
|
parseNamespacePreflightWriteOp,
|
|
23
23
|
resolveAuthorizedNamespaceWritablePreflight
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-CALBQ2NG.js";
|
|
25
25
|
import {
|
|
26
26
|
parseSharedWriteOutputControls
|
|
27
27
|
} from "./chunk-IFBSZGW3.js";
|
|
28
28
|
import {
|
|
29
29
|
validateBriefingFormat
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NOL7SEWN.js";
|
|
31
31
|
import {
|
|
32
32
|
parseDeepRecallMaxSteps
|
|
33
33
|
} from "./chunk-A7AISUJI.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
recallRequestSchema,
|
|
37
37
|
retainedCategoryAlias,
|
|
38
38
|
suggestionSubmitRequestSchema
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-3QKO4QN7.js";
|
|
40
40
|
import {
|
|
41
41
|
enforceNamespaceAllowList,
|
|
42
42
|
tokenCapabilityStore
|
|
@@ -603,4 +603,4 @@ defineOperation({ name: "graph_events", description: "SSE graph events.", schema
|
|
|
603
603
|
defineOperation({ name: "chat_message", description: "Chat message.", schema: strictSchema({ message: S.str, chatSessionId: S.str }), handler: async (_i, _ctx) => ({ result: { ok: true } }) });
|
|
604
604
|
defineOperation({ name: "chat_events", description: "SSE chat events.", schema: strictSchema({}), handler: async (_i, _ctx) => ({ result: { stream: "sse" } }) });
|
|
605
605
|
defineOperation({ name: "adapters_status", description: "Adapter registry metadata (issue #1850 round 5). Marker op: the HTTP transport builds the response from its own adapterRegistry, but the op still must be registered so it appears in listRegisteredOperations and enforceTokenOp can gate it for scoped tokens.", schema: strictSchema({}), handler: async (_i, _ctx) => ({ result: { ok: true } }) });
|
|
606
|
-
//# sourceMappingURL=chunk-
|
|
606
|
+
//# sourceMappingURL=chunk-WNRTXEWW.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-5MA7ZLPD.js";
|
|
12
12
|
import {
|
|
13
13
|
LocalLlmClient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RBITPCMK.js";
|
|
15
15
|
import {
|
|
16
16
|
completeBackgroundGeneration,
|
|
17
17
|
parseBackgroundGenerationJson
|
|
@@ -798,4 +798,4 @@ export {
|
|
|
798
798
|
summarizeHourlyStatus,
|
|
799
799
|
HourlySummarizer
|
|
800
800
|
};
|
|
801
|
-
//# sourceMappingURL=chunk-
|
|
801
|
+
//# sourceMappingURL=chunk-XOV7NRY5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isNamespaceKind
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3AGHSQPM.js";
|
|
4
4
|
import {
|
|
5
5
|
EngramAccessInputError
|
|
6
6
|
} from "./chunk-3MUKQQ7A.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
positiveIntQueryParam,
|
|
41
41
|
optionalNamespaceKindQueryParam
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-YPI4RQWV.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-B7RWBZXW.js";
|
|
4
4
|
import {
|
|
5
5
|
StorageManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4HUCP4R4.js";
|
|
7
7
|
import {
|
|
8
8
|
getCachedEpisodeMap,
|
|
9
9
|
setCachedEpisodeMap
|
|
@@ -109,4 +109,4 @@ export {
|
|
|
109
109
|
compareVerifiedEpisodeResults,
|
|
110
110
|
searchVerifiedEpisodes
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
//# sourceMappingURL=chunk-YSWJXOOL.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
readCausalTrajectoryRecordsStrict,
|
|
3
3
|
readCausalTrajectoryRevisionToken,
|
|
4
4
|
resolveCausalTrajectoryStoreDir
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-B3O3IRZN.js";
|
|
6
6
|
|
|
7
7
|
// src/coding/pre-action-gate.ts
|
|
8
8
|
import { createHash } from "crypto";
|
|
@@ -221,4 +221,4 @@ export {
|
|
|
221
221
|
normalizeActionIntent,
|
|
222
222
|
PreActionFailureGate
|
|
223
223
|
};
|
|
224
|
-
//# sourceMappingURL=chunk-
|
|
224
|
+
//# sourceMappingURL=chunk-Z3O53WZR.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-ZCUTSMR2.js";
|
|
14
14
|
import {
|
|
15
15
|
StorageManager
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4HUCP4R4.js";
|
|
17
17
|
import {
|
|
18
18
|
excludeSupportPassportPrivateMemories
|
|
19
19
|
} from "./chunk-PWPIERBM.js";
|
|
@@ -134,4 +134,4 @@ export {
|
|
|
134
134
|
runCodexMaterialize,
|
|
135
135
|
runPostConsolidationMaterialize
|
|
136
136
|
};
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-ZG5DWWKK.js.map
|