@remnic/core 9.69.87 → 9.69.88
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 +61 -55
- package/dist/access-authorization-probe.js +62 -56
- package/dist/access-boundary.js +61 -55
- package/dist/access-citation-namespace.js +2 -2
- package/dist/access-cli.js +140 -134
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.js +61 -55
- package/dist/access-http-briefing.js +62 -56
- 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 +63 -57
- package/dist/access-http.js +85 -79
- package/dist/access-identity-continuity-surface.js +61 -55
- package/dist/access-lcm-surface.js +61 -55
- 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 +74 -68
- package/dist/access-namespace-preflight.js +61 -55
- package/dist/access-observe-write-category.js +19 -13
- package/dist/access-observe-write-surface.js +61 -55
- package/dist/access-offline-manifest.js +15 -10
- package/dist/access-operations-batch.js +65 -59
- package/dist/access-operations.js +72 -66
- package/dist/access-recall-concurrency.js +61 -55
- package/dist/access-recall-response.js +61 -55
- package/dist/access-recall-surface.js +61 -55
- package/dist/access-schema.js +15 -7
- package/dist/access-service.d.ts.map +1 -1
- package/dist/access-service.js +61 -55
- package/dist/access-surface-catalog.js +63 -57
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/active-recall.js +27 -22
- 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-6IPX2BAC.js → auto-sync-U5N3CB5Y.js} +7 -7
- package/dist/briefing.js +15 -15
- package/dist/buffer.js +7 -7
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.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 +18 -18
- 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-JGSQ6P4D.js → chunk-2DLWLNO4.js} +3 -3
- package/dist/{chunk-LS3XH3UE.js → chunk-2NAD4YCI.js} +2 -2
- package/dist/{chunk-SY5KDWGU.js → chunk-2WLMWP2T.js} +2 -2
- package/dist/{chunk-P6WFK4ZJ.js → chunk-3O5BB45T.js} +4 -4
- package/dist/{chunk-SOZUJCME.js → chunk-3SGTV7RD.js} +6 -6
- package/dist/{chunk-YITN5WXI.js → chunk-4KN2JLQV.js} +2 -2
- package/dist/{chunk-JKMHZF3Q.js → chunk-4MP7XR5J.js} +2 -2
- 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-SLEAJ67D.js → chunk-4OQET73E.js} +4 -4
- package/dist/{chunk-GDYU6VF4.js → chunk-5AYUHSAU.js} +2 -2
- package/dist/{chunk-QWW2JDDX.js → chunk-5E6RYRYW.js} +6 -6
- package/dist/{chunk-ICZQG4XE.js → chunk-5FAGCOZD.js} +4 -4
- package/dist/{chunk-4IEOGIPB.js → chunk-5MNUBT7T.js} +2 -2
- 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-5X4MXNEU.js +64 -0
- package/dist/chunk-5X4MXNEU.js.map +1 -0
- package/dist/{chunk-52II7PB6.js → chunk-645WOU5I.js} +4 -4
- package/dist/{chunk-DUJYRVUD.js → chunk-6O2VUWV6.js} +3 -3
- package/dist/{chunk-CS52MFDV.js → chunk-6UQFJULG.js} +2 -2
- 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-4CDYONWO.js → chunk-A4VSOUCB.js} +3 -3
- package/dist/{chunk-HBBHL4YF.js → chunk-AE5U5NMS.js} +2 -2
- package/dist/{chunk-CUCWX3MO.js → chunk-AEHVZY3X.js} +2 -2
- package/dist/{chunk-DZ525SNQ.js → chunk-AEU4EQGV.js} +1 -1
- package/dist/{chunk-VLLD4TOB.js → chunk-AWG3TIAY.js} +2 -2
- package/dist/{chunk-72JNNJJJ.js → chunk-AXC4WSF3.js} +3 -3
- package/dist/{chunk-N4S4NUX5.js → chunk-B3O3IRZN.js} +1 -1
- package/dist/{chunk-FAN73COB.js → chunk-BGI4NUAO.js} +2 -2
- package/dist/{chunk-XTYX6V52.js → chunk-BJVO4H5C.js} +2 -2
- package/dist/{chunk-EHS5MJEF.js → chunk-BLVR4WYU.js} +3 -3
- package/dist/{chunk-KFCMMDHH.js → chunk-BOZJD5PK.js} +2 -2
- package/dist/{chunk-TM3RXL4G.js → chunk-BUQKSQXL.js} +2 -2
- package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
- package/dist/{chunk-EVBI7S4J.js → chunk-C6U57KG4.js} +4 -4
- package/dist/{chunk-RB776UH3.js → chunk-C7V3KPKJ.js} +235 -93
- package/dist/chunk-C7V3KPKJ.js.map +1 -0
- package/dist/{chunk-VX6GCKBS.js → chunk-C7ZDKWPS.js} +4 -4
- package/dist/{chunk-ZI7QA4MK.js → chunk-CRXRZA3G.js} +2 -2
- package/dist/{chunk-VQNONC4E.js → chunk-CZJA2EQE.js} +2 -2
- package/dist/{chunk-M536WNTQ.js → chunk-D5BSQR63.js} +2 -2
- package/dist/{chunk-37S3IMYB.js → chunk-DGS34QSY.js} +2 -2
- package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
- 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-EQ6YOIKO.js → chunk-FJLQXMTU.js} +3 -3
- package/dist/{chunk-SRZW7FNU.js → chunk-FKD656D2.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-KP7SANCF.js → chunk-GWM6T5EQ.js} +2 -2
- package/dist/{chunk-UA5DX5C3.js → chunk-GZDTVYK2.js} +2 -2
- package/dist/{chunk-3GQC3NMB.js → chunk-H56VY4BY.js} +5 -5
- package/dist/{chunk-L6UZEAID.js → chunk-H5BJWPUI.js} +4 -4
- package/dist/{chunk-YSJTCOHR.js → chunk-HLB7GKGG.js} +2 -2
- package/dist/{chunk-PUKTBULQ.js → chunk-HWLIMQE2.js} +2 -2
- package/dist/{chunk-CWHV574S.js → chunk-IOSZHHJC.js} +6 -6
- package/dist/{chunk-P2WZHLUF.js → chunk-JVPWRNHA.js} +2 -2
- package/dist/{chunk-6ET2VII7.js → chunk-JYG2334B.js} +2 -2
- package/dist/chunk-K6T33R4Q.js +535 -0
- package/dist/chunk-K6T33R4Q.js.map +1 -0
- package/dist/{chunk-WIKO4SCR.js → chunk-LHRQBMJN.js} +2 -2
- package/dist/{chunk-K4J4E7WV.js → chunk-LO4UKPKX.js} +2 -2
- package/dist/{chunk-LF5IGOOD.js → chunk-LU7E2MXE.js} +17 -17
- package/dist/{chunk-RJLV4BKR.js → chunk-LV5H6FTN.js} +2 -2
- package/dist/{chunk-3C3J243X.js → chunk-LW3HKRL7.js} +3 -3
- package/dist/{chunk-4BZP2B4U.js → chunk-M6C7SOR6.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-SPSRGEDQ.js → chunk-MXCAJKMA.js} +9 -9
- 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-AQK54Q7O.js → chunk-NYKIUQL6.js} +2 -2
- package/dist/{chunk-WQZZDN5M.js → chunk-OCFXVDBZ.js} +322 -376
- package/dist/chunk-OCFXVDBZ.js.map +1 -0
- package/dist/{chunk-NE6PHPLG.js → chunk-OK52IY3W.js} +10 -10
- package/dist/{chunk-6TT6HRE4.js → chunk-P2ODTYOF.js} +2 -2
- package/dist/{chunk-W4AOR52H.js → chunk-PEBHPCX2.js} +2 -2
- package/dist/{chunk-VYCOJKSX.js → chunk-PO7NXNGC.js} +2 -2
- package/dist/{chunk-G6SVZWPB.js → chunk-PZX3AQLF.js} +44 -1
- package/dist/chunk-PZX3AQLF.js.map +1 -0
- package/dist/{chunk-XAITGGX5.js → chunk-Q4AUIFUA.js} +4 -4
- package/dist/{chunk-MQJL6CDZ.js → chunk-QAW55ZHJ.js} +4 -4
- package/dist/{chunk-FOH7AMMI.js → chunk-QB57WIS6.js} +73 -82
- package/dist/chunk-QB57WIS6.js.map +1 -0
- package/dist/{chunk-QVS22WTO.js → chunk-QI7K7BZ5.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-YTQGGO3K.js → chunk-S2GE2K36.js} +81 -78
- package/dist/{chunk-YTQGGO3K.js.map → chunk-S2GE2K36.js.map} +1 -1
- package/dist/{chunk-BJRAELDH.js → chunk-SCXURCVT.js} +3 -3
- package/dist/{chunk-FRCESVV6.js → chunk-STEOT4DI.js} +19 -19
- package/dist/chunk-STEOT4DI.js.map +1 -0
- package/dist/{chunk-BFO3IR56.js → chunk-SWBC3UER.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-D5F7TKMH.js → chunk-V4JZCTMK.js} +2 -2
- package/dist/{chunk-QEV26L2F.js → chunk-VALKBYBN.js} +2 -2
- package/dist/{chunk-7LCGFUMB.js → chunk-VDX2J7OX.js} +4 -4
- package/dist/{chunk-TDYAIXHK.js → chunk-VVX5PZFS.js} +5 -5
- package/dist/{chunk-6NQ4LSMS.js → chunk-W3XXFPRI.js} +52 -52
- package/dist/{chunk-4IIMMZZK.js → chunk-WKY7N3L7.js} +10 -10
- package/dist/{chunk-VVDWZRZG.js → chunk-X5SHE2O3.js} +3 -3
- package/dist/{chunk-NR2ASHBL.js → chunk-XOV7NRY5.js} +2 -2
- package/dist/{chunk-6L3PBSAR.js → chunk-YJ7MW627.js} +2 -2
- package/dist/{chunk-LQG5O5EP.js → chunk-Z3O53WZR.js} +2 -2
- package/dist/{chunk-FB64XE3R.js → chunk-Z5LP6ILP.js} +2 -2
- package/dist/{chunk-VKQI47DJ.js → chunk-Z6EZCN6Z.js} +8 -8
- package/dist/{chunk-V2ES4WCZ.js → chunk-ZZZ4I455.js} +2 -2
- package/dist/cli.js +106 -100
- package/dist/coding/export-okf-codegraph.js +16 -16
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compounding/engine.js +16 -16
- package/dist/config.js +27 -22
- package/dist/connectors/codex-materialize-runner.js +15 -15
- package/dist/connectors/index.js +15 -15
- 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 +17 -17
- package/dist/corpus-watermark.js +17 -17
- package/dist/dashboard-runtime.js +2 -2
- package/dist/deep-recall-http-glue.js +15 -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 +16 -16
- package/dist/event-order-recall.js +3 -3
- package/dist/explicit-capture.js +6 -6
- package/dist/external-wiki-access.js +62 -56
- package/dist/extraction.js +21 -21
- 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 +207 -177
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.js +9 -9
- package/dist/local-llm.js +2 -2
- package/dist/location/index.js +18 -18
- package/dist/maintenance/memory-governance.js +15 -15
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +15 -15
- package/dist/maintenance/rebuild-memory-projection.js +16 -16
- package/dist/memory-browse-operations.js +62 -56
- package/dist/memory-subject.js +3 -3
- package/dist/namespaces/migrate.js +16 -16
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.js +15 -15
- package/dist/offline-sync-embedding-generation.d.ts +207 -0
- package/dist/offline-sync-embedding-generation.d.ts.map +1 -0
- package/dist/offline-sync-embedding-generation.js +42 -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 +28 -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 +46 -27
- package/dist/offline-sync.d.ts.map +1 -1
- package/dist/offline-sync.js +21 -8
- package/dist/operator-doctor-corpus.js +18 -18
- package/dist/operator-toolkit.js +38 -33
- package/dist/orchestration/maintenance.js +26 -26
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +142 -136
- package/dist/recall-navigation-operations.js +62 -56
- package/dist/recall-navigation.js +61 -55
- 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 +28 -23
- package/dist/salvage-envelope.js +5 -5
- package/dist/search/factory.js +3 -3
- package/dist/search/index.js +7 -7
- 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 +16 -16
- package/dist/semantic-rule-promotion.js +15 -15
- package/dist/semantic-rule-verifier.js +15 -15
- package/dist/source-agent-qualifier.js +18 -18
- package/dist/standup/build.js +15 -15
- 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 +14 -14
- package/dist/subject-config.js +4 -4
- package/dist/summarizer.js +3 -3
- package/dist/support-passport/index.js +64 -58
- 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 +16 -16
- package/dist/{tui-55UJMJX7.js → tui-2Z5WOV7L.js} +3 -3
- package/dist/tui-2Z5WOV7L.js.map +1 -0
- package/dist/verified-recall.js +15 -15
- package/dist/who-knows-cli.js +16 -16
- package/dist/who-knows.js +15 -15
- 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-embedding-generation.test.ts +2173 -0
- package/src/offline-sync-embedding-generation.ts +885 -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 +458 -453
- package/src/orchestrator.ts +2 -1
- package/src/secure-store/secure-fs.ts +26 -6
- package/src/storage.ts +11 -6
- 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-YO5QJ6L3.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-2DLWLNO4.js.map} +0 -0
- /package/dist/{chunk-LS3XH3UE.js.map → chunk-2NAD4YCI.js.map} +0 -0
- /package/dist/{chunk-SY5KDWGU.js.map → chunk-2WLMWP2T.js.map} +0 -0
- /package/dist/{chunk-P6WFK4ZJ.js.map → chunk-3O5BB45T.js.map} +0 -0
- /package/dist/{chunk-SOZUJCME.js.map → chunk-3SGTV7RD.js.map} +0 -0
- /package/dist/{chunk-YITN5WXI.js.map → chunk-4KN2JLQV.js.map} +0 -0
- /package/dist/{chunk-JKMHZF3Q.js.map → chunk-4MP7XR5J.js.map} +0 -0
- /package/dist/{chunk-7DE2NOON.js.map → chunk-4O4XCBOS.js.map} +0 -0
- /package/dist/{chunk-SLEAJ67D.js.map → chunk-4OQET73E.js.map} +0 -0
- /package/dist/{chunk-GDYU6VF4.js.map → chunk-5AYUHSAU.js.map} +0 -0
- /package/dist/{chunk-QWW2JDDX.js.map → chunk-5E6RYRYW.js.map} +0 -0
- /package/dist/{chunk-ICZQG4XE.js.map → chunk-5FAGCOZD.js.map} +0 -0
- /package/dist/{chunk-4IEOGIPB.js.map → chunk-5MNUBT7T.js.map} +0 -0
- /package/dist/{chunk-52II7PB6.js.map → chunk-645WOU5I.js.map} +0 -0
- /package/dist/{chunk-DUJYRVUD.js.map → chunk-6O2VUWV6.js.map} +0 -0
- /package/dist/{chunk-CS52MFDV.js.map → chunk-6UQFJULG.js.map} +0 -0
- /package/dist/{chunk-HESDNYRB.js.map → chunk-76M5OK7V.js.map} +0 -0
- /package/dist/{chunk-4CDYONWO.js.map → chunk-A4VSOUCB.js.map} +0 -0
- /package/dist/{chunk-HBBHL4YF.js.map → chunk-AE5U5NMS.js.map} +0 -0
- /package/dist/{chunk-CUCWX3MO.js.map → chunk-AEHVZY3X.js.map} +0 -0
- /package/dist/{chunk-DZ525SNQ.js.map → chunk-AEU4EQGV.js.map} +0 -0
- /package/dist/{chunk-VLLD4TOB.js.map → chunk-AWG3TIAY.js.map} +0 -0
- /package/dist/{chunk-72JNNJJJ.js.map → chunk-AXC4WSF3.js.map} +0 -0
- /package/dist/{chunk-N4S4NUX5.js.map → chunk-B3O3IRZN.js.map} +0 -0
- /package/dist/{chunk-FAN73COB.js.map → chunk-BGI4NUAO.js.map} +0 -0
- /package/dist/{chunk-XTYX6V52.js.map → chunk-BJVO4H5C.js.map} +0 -0
- /package/dist/{chunk-EHS5MJEF.js.map → chunk-BLVR4WYU.js.map} +0 -0
- /package/dist/{chunk-KFCMMDHH.js.map → chunk-BOZJD5PK.js.map} +0 -0
- /package/dist/{chunk-TM3RXL4G.js.map → chunk-BUQKSQXL.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
- /package/dist/{chunk-EVBI7S4J.js.map → chunk-C6U57KG4.js.map} +0 -0
- /package/dist/{chunk-VX6GCKBS.js.map → chunk-C7ZDKWPS.js.map} +0 -0
- /package/dist/{chunk-ZI7QA4MK.js.map → chunk-CRXRZA3G.js.map} +0 -0
- /package/dist/{chunk-VQNONC4E.js.map → chunk-CZJA2EQE.js.map} +0 -0
- /package/dist/{chunk-M536WNTQ.js.map → chunk-D5BSQR63.js.map} +0 -0
- /package/dist/{chunk-37S3IMYB.js.map → chunk-DGS34QSY.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.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-EQ6YOIKO.js.map → chunk-FJLQXMTU.js.map} +0 -0
- /package/dist/{chunk-SRZW7FNU.js.map → chunk-FKD656D2.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-KP7SANCF.js.map → chunk-GWM6T5EQ.js.map} +0 -0
- /package/dist/{chunk-UA5DX5C3.js.map → chunk-GZDTVYK2.js.map} +0 -0
- /package/dist/{chunk-3GQC3NMB.js.map → chunk-H56VY4BY.js.map} +0 -0
- /package/dist/{chunk-L6UZEAID.js.map → chunk-H5BJWPUI.js.map} +0 -0
- /package/dist/{chunk-YSJTCOHR.js.map → chunk-HLB7GKGG.js.map} +0 -0
- /package/dist/{chunk-PUKTBULQ.js.map → chunk-HWLIMQE2.js.map} +0 -0
- /package/dist/{chunk-CWHV574S.js.map → chunk-IOSZHHJC.js.map} +0 -0
- /package/dist/{chunk-P2WZHLUF.js.map → chunk-JVPWRNHA.js.map} +0 -0
- /package/dist/{chunk-6ET2VII7.js.map → chunk-JYG2334B.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-LF5IGOOD.js.map → chunk-LU7E2MXE.js.map} +0 -0
- /package/dist/{chunk-RJLV4BKR.js.map → chunk-LV5H6FTN.js.map} +0 -0
- /package/dist/{chunk-3C3J243X.js.map → chunk-LW3HKRL7.js.map} +0 -0
- /package/dist/{chunk-4BZP2B4U.js.map → chunk-M6C7SOR6.js.map} +0 -0
- /package/dist/{chunk-SPSRGEDQ.js.map → chunk-MXCAJKMA.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-AQK54Q7O.js.map → chunk-NYKIUQL6.js.map} +0 -0
- /package/dist/{chunk-NE6PHPLG.js.map → chunk-OK52IY3W.js.map} +0 -0
- /package/dist/{chunk-6TT6HRE4.js.map → chunk-P2ODTYOF.js.map} +0 -0
- /package/dist/{chunk-W4AOR52H.js.map → chunk-PEBHPCX2.js.map} +0 -0
- /package/dist/{chunk-VYCOJKSX.js.map → chunk-PO7NXNGC.js.map} +0 -0
- /package/dist/{chunk-XAITGGX5.js.map → chunk-Q4AUIFUA.js.map} +0 -0
- /package/dist/{chunk-MQJL6CDZ.js.map → chunk-QAW55ZHJ.js.map} +0 -0
- /package/dist/{chunk-QVS22WTO.js.map → chunk-QI7K7BZ5.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-BJRAELDH.js.map → chunk-SCXURCVT.js.map} +0 -0
- /package/dist/{chunk-BFO3IR56.js.map → chunk-SWBC3UER.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-D5F7TKMH.js.map → chunk-V4JZCTMK.js.map} +0 -0
- /package/dist/{chunk-QEV26L2F.js.map → chunk-VALKBYBN.js.map} +0 -0
- /package/dist/{chunk-7LCGFUMB.js.map → chunk-VDX2J7OX.js.map} +0 -0
- /package/dist/{chunk-TDYAIXHK.js.map → chunk-VVX5PZFS.js.map} +0 -0
- /package/dist/{chunk-6NQ4LSMS.js.map → chunk-W3XXFPRI.js.map} +0 -0
- /package/dist/{chunk-4IIMMZZK.js.map → chunk-WKY7N3L7.js.map} +0 -0
- /package/dist/{chunk-VVDWZRZG.js.map → chunk-X5SHE2O3.js.map} +0 -0
- /package/dist/{chunk-NR2ASHBL.js.map → chunk-XOV7NRY5.js.map} +0 -0
- /package/dist/{chunk-6L3PBSAR.js.map → chunk-YJ7MW627.js.map} +0 -0
- /package/dist/{chunk-LQG5O5EP.js.map → chunk-Z3O53WZR.js.map} +0 -0
- /package/dist/{chunk-FB64XE3R.js.map → chunk-Z5LP6ILP.js.map} +0 -0
- /package/dist/{chunk-VKQI47DJ.js.map → chunk-Z6EZCN6Z.js.map} +0 -0
- /package/dist/{chunk-V2ES4WCZ.js.map → chunk-ZZZ4I455.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/{state-ITXJKXRE.js.map → graph-edge-decay-MKIRZ762.js.map} +0 -0
- /package/dist/{tui-55UJMJX7.js.map → offline-sync-embedding-generation.js.map} +0 -0
- /package/dist/{trace-ZFVRH4GO.js.map → trace-LXXCMZJA.js.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
respondDeepRecall
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YJ7MW627.js";
|
|
4
4
|
import "./chunk-A7AISUJI.js";
|
|
5
5
|
import "./chunk-PQVCH2AE.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-X7Y7WX73.js";
|
|
6
|
+
import "./chunk-LW3HKRL7.js";
|
|
7
|
+
import "./chunk-VDX2J7OX.js";
|
|
9
8
|
import "./chunk-WEHSQBFR.js";
|
|
9
|
+
import "./chunk-DQEMWVMT.js";
|
|
10
10
|
import "./chunk-J4EB7DNW.js";
|
|
11
11
|
import "./chunk-BJMBJZ2Y.js";
|
|
12
12
|
import "./chunk-UKJAGEXH.js";
|
|
@@ -14,16 +14,23 @@ import "./chunk-FP2373TW.js";
|
|
|
14
14
|
import "./chunk-Z2YFLXHU.js";
|
|
15
15
|
import "./chunk-I4WBNM3M.js";
|
|
16
16
|
import "./chunk-SOAU2OE2.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-OCFXVDBZ.js";
|
|
18
18
|
import "./chunk-UI3NYK34.js";
|
|
19
|
+
import "./chunk-ETUZFFPU.js";
|
|
20
|
+
import "./chunk-K6T33R4Q.js";
|
|
21
|
+
import "./chunk-4NSLQ7EU.js";
|
|
22
|
+
import "./chunk-EFHNFTWB.js";
|
|
19
23
|
import "./chunk-GCGJW34D.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-TYT4TEQV.js";
|
|
25
|
+
import "./chunk-75PT4N7Q.js";
|
|
26
|
+
import "./chunk-UCPGOUDZ.js";
|
|
22
27
|
import "./chunk-LQWOFU6L.js";
|
|
28
|
+
import "./chunk-FFAZ2XFU.js";
|
|
23
29
|
import "./chunk-P7FMDTKL.js";
|
|
30
|
+
import "./chunk-P2QRMMVQ.js";
|
|
24
31
|
import "./chunk-3MUKQQ7A.js";
|
|
25
32
|
import "./chunk-BTTPKDIL.js";
|
|
26
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-MAAL6OZV.js";
|
|
27
34
|
import "./chunk-A6XUJE5D.js";
|
|
28
35
|
import "./chunk-VS2IYZRU.js";
|
|
29
36
|
import "./chunk-KNA3BXXL.js";
|
|
@@ -1,33 +1,7 @@
|
|
|
1
1
|
import type { PluginConfig } from "./types.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* HTTP fetch exceeded its deadline OR because the endpoint returned a non-2xx
|
|
6
|
-
* status code. Callers that need to distinguish a backend outage from "no
|
|
7
|
-
* candidates" can `instanceof`-check against this class.
|
|
8
|
-
*
|
|
9
|
-
* Round 9 fix (Finding UZqB): previously a timeout returned null from embed(),
|
|
10
|
-
* which caused search() to return [] silently. decideSemanticDedup then
|
|
11
|
-
* classified the result as no_candidates instead of backend_unavailable, so
|
|
12
|
-
* the per-batch batchBackendUnavailable short-circuit never activated and
|
|
13
|
-
* batches of N facts each paid a full timeout roundtrip.
|
|
14
|
-
*
|
|
15
|
-
* Round 10 fix (Findings Ui1J + Ui1L): search() now only re-throws this error
|
|
16
|
-
* when the caller explicitly passes `{ throwOnTimeout: true }`. Without that
|
|
17
|
-
* flag search() catches it and returns [] instead, preserving fail-open
|
|
18
|
-
* semantics for recall-path callers (searchEmbeddingFallback) that have no
|
|
19
|
-
* try/catch. Only the semantic-dedup path (semanticDedupLookup) passes the
|
|
20
|
-
* flag so it can still reach decideSemanticDedup's backend_unavailable branch.
|
|
21
|
-
*
|
|
22
|
-
* Round 11 fix (Finding Ur_J): `embed()` now also throws this error from the
|
|
23
|
-
* lookup path when the HTTP response is non-2xx (e.g. 429, 500, 503). Without
|
|
24
|
-
* this, repeated 5xx outages would each return null → [] → no_candidates and
|
|
25
|
-
* subsequent facts in the same batch would all pay full roundtrips instead of
|
|
26
|
-
* tripping the per-batch backend_unavailable short-circuit.
|
|
27
|
-
*
|
|
28
|
-
* The class name is kept for backward compatibility — `EmbeddingTimeoutError`
|
|
29
|
-
* now signals "lookup backend unavailable" rather than strictly "timed out".
|
|
30
|
-
*/
|
|
2
|
+
import { EmbeddingIndexStoreIo } from "./embedding-index-storage.js";
|
|
3
|
+
export { EmbeddingIndexCapacityError, EmbeddingIndexStorageError, } from "./embedding-index-storage.js";
|
|
4
|
+
export type { EmbeddingIndexStatusFile, EmbeddingIndexWriteFailure, } from "./embedding-index-storage.js";
|
|
31
5
|
export declare class EmbeddingTimeoutError extends Error {
|
|
32
6
|
readonly name: "EmbeddingTimeoutError";
|
|
33
7
|
constructor(message: string);
|
|
@@ -47,10 +21,16 @@ export declare class EmbeddingProviderUnavailableError extends Error {
|
|
|
47
21
|
export type EmbedMode = "lookup" | "index";
|
|
48
22
|
export declare class EmbeddingFallback {
|
|
49
23
|
private readonly config;
|
|
50
|
-
private readonly
|
|
24
|
+
private readonly store;
|
|
51
25
|
private loaded;
|
|
26
|
+
/** True when `loaded` was read from disk rather than started fresh, so identity probes can trust it. */
|
|
27
|
+
private loadedFromDisk;
|
|
52
28
|
private mutationQueue;
|
|
53
|
-
|
|
29
|
+
/** The canonical state dir scoping this fallback's generation mutation lock. */
|
|
30
|
+
private readonly generationStateDir;
|
|
31
|
+
private readonly generationLockPath;
|
|
32
|
+
private lockSection;
|
|
33
|
+
constructor(config: PluginConfig, storeIo?: EmbeddingIndexStoreIo);
|
|
54
34
|
isAvailable(): Promise<boolean>;
|
|
55
35
|
/**
|
|
56
36
|
* Embed an array of texts and return their embedding vectors.
|
|
@@ -120,8 +100,38 @@ export declare class EmbeddingFallback {
|
|
|
120
100
|
private embed;
|
|
121
101
|
private embedWithEffectiveProvider;
|
|
122
102
|
private embedWithHostProvider;
|
|
103
|
+
/**
|
|
104
|
+
* Load the authoritative generation for `provider`. STRICT: an unreadable,
|
|
105
|
+
* malformed, foreign-shaped, or mixed-identity index throws
|
|
106
|
+
* EmbeddingIndexStorageError instead of ever returning a partial view —
|
|
107
|
+
* recall catches it at its boundary and fails open uncached; mutations
|
|
108
|
+
* propagate it and fail closed. This.loaded is only ever assigned a fully
|
|
109
|
+
* validated generation.
|
|
110
|
+
*/
|
|
111
|
+
/**
|
|
112
|
+
* A fence the store calls immediately before destructive writes: reasserts
|
|
113
|
+
* THIS section's lock ownership after potentially long serialization.
|
|
114
|
+
* Fail closed when no section is held — persisting unsynchronized would
|
|
115
|
+
* reintroduce the lost-update race.
|
|
116
|
+
*/
|
|
117
|
+
private generationFence;
|
|
118
|
+
/**
|
|
119
|
+
* Cache-warm path: a normal search serves the in-memory index WITHOUT the
|
|
120
|
+
* lock (pre-existing staleness semantics: a peer swap between searches is
|
|
121
|
+
* refreshed by the next cold load). On a cache miss the COMPLETE load runs
|
|
122
|
+
* under the generation mutation lock so the enumeration + shard reads see
|
|
123
|
+
* exactly one generation. The identity is re-checked under the lock on the
|
|
124
|
+
* cold path; the caller has already performed any provider-swap embed
|
|
125
|
+
* outside the lock.
|
|
126
|
+
*/
|
|
127
|
+
private loadIndexUnderGenerationLock;
|
|
123
128
|
private loadIndex;
|
|
124
129
|
private readIndexIdentityFromDisk;
|
|
130
|
+
/**
|
|
131
|
+
* Persist the index through the file store. On any failure the in-memory
|
|
132
|
+
* cache is invalidated: entries mutated in the cached map must never be
|
|
133
|
+
* mistaken for durable state by a retry or a later search.
|
|
134
|
+
*/
|
|
125
135
|
private saveIndex;
|
|
126
136
|
}
|
|
127
137
|
//# sourceMappingURL=embedding-fallback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding-fallback.d.ts","sourceRoot":"","sources":["../src/embedding-fallback.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embedding-fallback.d.ts","sourceRoot":"","sources":["../src/embedding-fallback.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAO/C,OAAO,EAOL,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AACt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E,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAmGxD,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA0C7E,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA4CtD,OAAO,CAAC,oBAAoB;YAmDd,eAAe;YAqCf,uCAAuC;IAcrD,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,mBAAmB;YAsBb,cAAc;YAuBd,KAAK;YASL,0BAA0B;YAgI1B,qBAAqB;IAoBnC;;;;;;;OAOG;IACH;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAYvB;;;;;;;;OAQG;YACW,4BAA4B;YAmB5B,SAAS;YA4DT,yBAAyB;IAUvC;;;;OAIG;YACW,SAAS;CAcxB"}
|
|
@@ -2,14 +2,22 @@ import {
|
|
|
2
2
|
EmbeddingFallback,
|
|
3
3
|
EmbeddingProviderUnavailableError,
|
|
4
4
|
EmbeddingTimeoutError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-C7V3KPKJ.js";
|
|
6
6
|
import "./chunk-3ONXXHQO.js";
|
|
7
|
+
import "./chunk-75PT4N7Q.js";
|
|
8
|
+
import {
|
|
9
|
+
EmbeddingIndexCapacityError,
|
|
10
|
+
EmbeddingIndexStorageError
|
|
11
|
+
} from "./chunk-UCPGOUDZ.js";
|
|
12
|
+
import "./chunk-FFAZ2XFU.js";
|
|
7
13
|
import "./chunk-BMXEBWBT.js";
|
|
8
14
|
import "./chunk-P2QRMMVQ.js";
|
|
9
15
|
import "./chunk-3WCASNQZ.js";
|
|
10
16
|
import "./chunk-PZ5AY32C.js";
|
|
11
17
|
export {
|
|
12
18
|
EmbeddingFallback,
|
|
19
|
+
EmbeddingIndexCapacityError,
|
|
20
|
+
EmbeddingIndexStorageError,
|
|
13
21
|
EmbeddingProviderUnavailableError,
|
|
14
22
|
EmbeddingTimeoutError
|
|
15
23
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type HeldFileLockController } from "./utils/serialize-mutations.js";
|
|
2
|
+
/** Control surface handed to a held embedding-generation lock section. */
|
|
3
|
+
export type EmbeddingGenerationLockSection = HeldFileLockController;
|
|
4
|
+
/**
|
|
5
|
+
* A fence the store calls immediately before a destructive write: reasserts
|
|
6
|
+
* lock ownership so a peer that stale-broke and replaced the lock aborts
|
|
7
|
+
* this write instead of clobbering the peer's.
|
|
8
|
+
*/
|
|
9
|
+
export type EmbeddingGenerationFence = () => Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* A held embedding-generation lock section was lost mid-critical-section —
|
|
12
|
+
* a peer stale-broke and replaced it. Abort; never publish.
|
|
13
|
+
*/
|
|
14
|
+
export declare class EmbeddingGenerationLockLostError extends Error {
|
|
15
|
+
constructor(lockPath: string);
|
|
16
|
+
}
|
|
17
|
+
/** The generation lock could not be acquired; callers fail closed and report it. */
|
|
18
|
+
export declare class EmbeddingGenerationLockUnavailableError extends Error {
|
|
19
|
+
constructor(lockPath: string, reason: "timeout" | "error");
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The lock file path for the generation whose canonical state dir is
|
|
23
|
+
* `absoluteStateDir` (physical path; e.g. `<memoryRoot>/state` or
|
|
24
|
+
* `<memoryRoot>/namespaces/<ns>/state`). Keyed by the physical directory so
|
|
25
|
+
* every root convention contends on one lock file per generation.
|
|
26
|
+
*/
|
|
27
|
+
export declare function embeddingGenerationLockPath(absoluteStateDir: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Revalidate lock ownership immediately before a destructive publish.
|
|
30
|
+
* Throws {@link EmbeddingGenerationLockLostError} when the lock was
|
|
31
|
+
* broken/replaced, so the caller aborts and leaves the peer's write intact.
|
|
32
|
+
*/
|
|
33
|
+
export declare function assertEmbeddingGenerationLockHeld(lockPath: string, section: EmbeddingGenerationLockSection): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Run `fn` while holding the embedding-generation mutation lock for the
|
|
36
|
+
* generation whose state dir is `absoluteStateDir`, handing it the section
|
|
37
|
+
* controller. `serializeMutations` provides the in-process keyed chain
|
|
38
|
+
* INSIDE the cross-process advisory lock, so peers serialize against every
|
|
39
|
+
* section this process runs, one at a time. Times out fail-closed.
|
|
40
|
+
*/
|
|
41
|
+
export declare function withEmbeddingGenerationLock<T>(absoluteStateDir: string, fn: (lock: EmbeddingGenerationLockSection) => Promise<T>): Promise<T>;
|
|
42
|
+
/** Capture a complete bounded digest census under lock, then stream outside
|
|
43
|
+
* the lock. If any member changes, throw rather than emit a complete subset. */
|
|
44
|
+
export declare function withEmbeddingGenerationLockIter<T extends {
|
|
45
|
+
path: string;
|
|
46
|
+
sha256: string;
|
|
47
|
+
bytes: number;
|
|
48
|
+
}>(absoluteStateDir: string, make: (includeContent: boolean) => AsyncIterable<T>, includeContent: boolean, verify?: () => Promise<void>): AsyncIterable<T>;
|
|
49
|
+
//# sourceMappingURL=embedding-generation-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedding-generation-lock.d.ts","sourceRoot":"","sources":["../src/embedding-generation-lock.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,KAAK,sBAAsB,EAAwC,MAAM,gCAAgC,CAAC;AAOnH,0EAA0E;AAC1E,MAAM,MAAM,8BAA8B,GAAG,sBAAsB,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3D;;;GAGG;AACH,qBAAa,gCAAiC,SAAQ,KAAK;gBAC7C,QAAQ,EAAE,MAAM;CAM7B;AAED,oFAAoF;AACpF,qBAAa,uCAAwC,SAAQ,KAAK;gBACpD,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO;CAI1D;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED;;;;GAIG;AACH,wBAAsB,iCAAiC,CACrD,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,8BAA8B,GACtC,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,EAC3C,gBAAgB,EAAE,MAAM,EACxB,EAAE,EAAE,CAAC,IAAI,EAAE,8BAA8B,KAAK,OAAO,CAAC,CAAC,CAAC,GACvD,OAAO,CAAC,CAAC,CAAC,CAUZ;AAED;gFACgF;AAChF,wBAAuB,+BAA+B,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAC9G,gBAAgB,EAAE,MAAM,EACxB,IAAI,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,aAAa,CAAC,CAAC,CAAC,EACnD,cAAc,EAAE,OAAO,EACvB,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC3B,aAAa,CAAC,CAAC,CAAC,CAyBlB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EmbeddingGenerationLockLostError,
|
|
3
|
+
EmbeddingGenerationLockUnavailableError,
|
|
4
|
+
assertEmbeddingGenerationLockHeld,
|
|
5
|
+
embeddingGenerationLockPath,
|
|
6
|
+
withEmbeddingGenerationLock,
|
|
7
|
+
withEmbeddingGenerationLockIter
|
|
8
|
+
} from "./chunk-75PT4N7Q.js";
|
|
9
|
+
import "./chunk-FFAZ2XFU.js";
|
|
10
|
+
import "./chunk-PZ5AY32C.js";
|
|
11
|
+
export {
|
|
12
|
+
EmbeddingGenerationLockLostError,
|
|
13
|
+
EmbeddingGenerationLockUnavailableError,
|
|
14
|
+
assertEmbeddingGenerationLockHeld,
|
|
15
|
+
embeddingGenerationLockPath,
|
|
16
|
+
withEmbeddingGenerationLock,
|
|
17
|
+
withEmbeddingGenerationLockIter
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=embedding-generation-lock.js.map
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import type { EmbeddingGenerationFence } from "./embedding-generation-lock.js";
|
|
2
|
+
export type EmbeddingProviderType = "openai" | "local" | "host";
|
|
3
|
+
export type EmbeddingIndexEntry = {
|
|
4
|
+
vector: number[];
|
|
5
|
+
path: string;
|
|
6
|
+
};
|
|
7
|
+
export type EmbeddingIndexFile = {
|
|
8
|
+
version: 1;
|
|
9
|
+
provider: EmbeddingProviderType;
|
|
10
|
+
model: string;
|
|
11
|
+
entries: Record<string, EmbeddingIndexEntry>;
|
|
12
|
+
};
|
|
13
|
+
export type EmbeddingIndexIdentity = Pick<EmbeddingIndexFile, "provider" | "model">;
|
|
14
|
+
/** Outcome of reading one managed index file (legacy or shard). */
|
|
15
|
+
export type ManagedIndexRead = {
|
|
16
|
+
outcome: "ok";
|
|
17
|
+
file: EmbeddingIndexFile;
|
|
18
|
+
} | {
|
|
19
|
+
outcome: "absent";
|
|
20
|
+
} | {
|
|
21
|
+
outcome: "foreign";
|
|
22
|
+
} | {
|
|
23
|
+
outcome: "unreadable";
|
|
24
|
+
reason: string;
|
|
25
|
+
};
|
|
26
|
+
/** Which generation owns the index right now. */
|
|
27
|
+
export type IndexLayout = "empty" | "legacy" | "sharded";
|
|
28
|
+
/**
|
|
29
|
+
* Thrown when an embedding index (or one of its shards) cannot be persisted
|
|
30
|
+
* within the per-file serialization budget. Issue #3146: index files are
|
|
31
|
+
* materialized as single V8 strings, so a JSON document at or past
|
|
32
|
+
* `bufferConstants.MAX_STRING_LENGTH` chars makes every read and write throw
|
|
33
|
+
* `RangeError: Invalid string length`. The index is sharded before that
|
|
34
|
+
* ceiling; this tagged error is reserved for the residual case where even
|
|
35
|
+
* one shard cannot hold the payload (e.g. a single entry with an enormous
|
|
36
|
+
* vector), so callers can classify it as recoverable-with-record instead of
|
|
37
|
+
* an opaque background failure.
|
|
38
|
+
*/
|
|
39
|
+
export declare class EmbeddingIndexCapacityError extends Error {
|
|
40
|
+
readonly memoryId?: string | undefined;
|
|
41
|
+
readonly name: "EmbeddingIndexCapacityError";
|
|
42
|
+
constructor(message: string, memoryId?: string | undefined);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Thrown when an index file that should be authoritative cannot be read
|
|
46
|
+
* (I/O error, over-budget size, unparseable JSON). Mutation paths fail
|
|
47
|
+
* CLOSED on this: they must not continue with a fresh empty index and
|
|
48
|
+
* pretend the previous vectors were loaded — the file is left untouched in
|
|
49
|
+
* place for recovery. Read-only paths (recall) fail open to empty results
|
|
50
|
+
* and record the reason durably.
|
|
51
|
+
*/
|
|
52
|
+
export declare class EmbeddingIndexStorageError extends Error {
|
|
53
|
+
readonly name: "EmbeddingIndexStorageError";
|
|
54
|
+
}
|
|
55
|
+
/** Durable diagnostic row describing the last failed embedding-index write. */
|
|
56
|
+
export interface EmbeddingIndexWriteFailure {
|
|
57
|
+
ts: string;
|
|
58
|
+
kind: "capacity" | "io";
|
|
59
|
+
message: string;
|
|
60
|
+
memoryId?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Durable embedding-index diagnostics (issue #3146), persisted at
|
|
64
|
+
* `<memoryDir>/state/embedding-fallback-status.json` and surfaced through
|
|
65
|
+
* console_state, so background ingestion failures are visible to operators
|
|
66
|
+
* instead of only ever appearing as log lines.
|
|
67
|
+
*/
|
|
68
|
+
export interface EmbeddingIndexStatusFile {
|
|
69
|
+
version: 1;
|
|
70
|
+
/** Cumulative count of failed index writes since the file was created. */
|
|
71
|
+
failureCount: number;
|
|
72
|
+
/** Active write failure; cleared by the next successful save. */
|
|
73
|
+
lastWriteFailure?: EmbeddingIndexWriteFailure;
|
|
74
|
+
/** Set when an unreadable index file was detected instead of overwritten. */
|
|
75
|
+
lastReadRecovery?: {
|
|
76
|
+
ts: string;
|
|
77
|
+
message: string;
|
|
78
|
+
};
|
|
79
|
+
lastSuccessAt?: string;
|
|
80
|
+
}
|
|
81
|
+
export declare function resolveIndexFileCharLimit(): number;
|
|
82
|
+
/**
|
|
83
|
+
* Stable FNV-1a shard assignment: an entry always hashes to the same shard,
|
|
84
|
+
* so an update or removal never needs a manifest to find its file.
|
|
85
|
+
*/
|
|
86
|
+
export declare function shardIndexOf(memoryId: string, shardCount: number): number;
|
|
87
|
+
/**
|
|
88
|
+
* A shard file named `shard-NNNN.json` must only contain ids that hash to
|
|
89
|
+
* that shard: a misplaced copy would be loaded today and silently resurrect
|
|
90
|
+
* stale vectors after the computed shard is rewritten (issue #3148, round 6).
|
|
91
|
+
* Throws the tagged storage error so mutations fail closed and recall fails
|
|
92
|
+
* open at its boundary.
|
|
93
|
+
*/
|
|
94
|
+
export declare function validateShardMembership(shardName: string, file: EmbeddingIndexFile): void;
|
|
95
|
+
export declare function isInvalidStringLengthError(err: unknown): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Parse and FULLY validate one serialized index document (legacy or shard).
|
|
98
|
+
* The single read boundary shared by disk reads and offline-sync pulls: a
|
|
99
|
+
* document with a valid header but a malformed body (`entries` not a plain
|
|
100
|
+
* record, or an entry whose `path` is not a string / whose `vector` is not a
|
|
101
|
+
* finite-number array) is `unreadable`, not `ok` — recall fails open on the
|
|
102
|
+
* tagged reason, mutations fail closed, and the bytes are never overwritten
|
|
103
|
+
* (issue #3148 review, round 4).
|
|
104
|
+
*/
|
|
105
|
+
export declare function parseEmbeddingIndexDocument(raw: string): ManagedIndexRead;
|
|
106
|
+
/**
|
|
107
|
+
* Group a complete index into per-shard entry records using the stable FNV
|
|
108
|
+
* assignment. Shared by `persist()` and the offline-sync generation
|
|
109
|
+
* transaction so a converted generation shards identically everywhere.
|
|
110
|
+
*/
|
|
111
|
+
export declare function shardEntriesForIndex(index: EmbeddingIndexFile): Map<number, Record<string, EmbeddingIndexEntry>>;
|
|
112
|
+
/**
|
|
113
|
+
* Serialize one shard, translating a ceiling overflow into a tagged,
|
|
114
|
+
* recoverable capacity error. Exported for the offline-sync generation
|
|
115
|
+
* transaction, which stages incoming generations through the same budget.
|
|
116
|
+
*/
|
|
117
|
+
export declare function serializeEmbeddingShard(index: EmbeddingIndexFile, shardIndex: number, entries: Record<string, EmbeddingIndexEntry>, limit?: number): string;
|
|
118
|
+
/**
|
|
119
|
+
* Optional canonical secure-store IO for the daemon. When provided (both
|
|
120
|
+
* halves), file content is read/written through the SAME
|
|
121
|
+
* StorageManager-backed contract offline sync uses: canonical-path AAD,
|
|
122
|
+
* secure-key-aware, atomic. Shard STAGING writes carry the FINAL published
|
|
123
|
+
* path so the post-publish rename keeps the ciphertext decryptable; dirty
|
|
124
|
+
* shard, status, and legacy writes are their own canonical final path.
|
|
125
|
+
* When omitted, the store behaves exactly as before (raw plaintext fs).
|
|
126
|
+
* The diagnostics status file is intentionally ALWAYS plain: it holds no
|
|
127
|
+
* memory content (failure strings/counts only) and console_state reads it
|
|
128
|
+
* without unlocking the store.
|
|
129
|
+
*/
|
|
130
|
+
export interface EmbeddingIndexStoreIo {
|
|
131
|
+
readUtf8(filePath: string): Promise<string>;
|
|
132
|
+
writeUtf8(filePath: string, contents: string, opts?: {
|
|
133
|
+
finalAadFilePath?: string;
|
|
134
|
+
}): Promise<void>;
|
|
135
|
+
}
|
|
136
|
+
export declare class EmbeddingIndexFileStore {
|
|
137
|
+
private readonly indexPath;
|
|
138
|
+
private readonly shardDir;
|
|
139
|
+
private readonly statusPath;
|
|
140
|
+
private readonly io?;
|
|
141
|
+
constructor(indexPath: string, shardDir: string, statusPath: string, io?: EmbeddingIndexStoreIo | undefined);
|
|
142
|
+
/** Legacy single-file layout path (public for error messages). */
|
|
143
|
+
get legacyPath(): string;
|
|
144
|
+
/** Record an unreadable-authoritative-file reason (both read and mutation paths). */
|
|
145
|
+
recordIndexStatusForLoad(reason: string): Promise<void>;
|
|
146
|
+
/**
|
|
147
|
+
* Which generation owns the index right now. The published
|
|
148
|
+
* `state/embeddings/` directory IS the layout marker: until it exists the
|
|
149
|
+
* legacy file is authoritative; from the atomic rename onward it never
|
|
150
|
+
* merges again.
|
|
151
|
+
*/
|
|
152
|
+
detectLayout(): Promise<IndexLayout>;
|
|
153
|
+
/**
|
|
154
|
+
* Roll the fixed transaction backup back into the published position.
|
|
155
|
+
* Returns true when a rollback happened.
|
|
156
|
+
*/
|
|
157
|
+
private replacementBackupExists;
|
|
158
|
+
/**
|
|
159
|
+
* The fixed transaction backup is a path with well-known semantics; a
|
|
160
|
+
* planted symlink must never be restored into the published position (it
|
|
161
|
+
* would point the generation outside the memory dir) nor removed through
|
|
162
|
+
* as if it were the former generation. Symlinks are rejected outright.
|
|
163
|
+
*/
|
|
164
|
+
private assertBackupNotSymlink;
|
|
165
|
+
/**
|
|
166
|
+
* Mutation-queue entry point: roll the fixed transaction backup back into
|
|
167
|
+
* the published position after an interrupted replacement. Returns true
|
|
168
|
+
* when a rollback happened. Only fires in the actual rename gap
|
|
169
|
+
* (published directory absent); callers must invalidate any cached index
|
|
170
|
+
* view when this returns true.
|
|
171
|
+
*/
|
|
172
|
+
recoverIfInterrupted(fence?: EmbeddingGenerationFence): Promise<boolean>;
|
|
173
|
+
private legacyOrEmptyLayout;
|
|
174
|
+
/** Header identity of the authoritative generation, read leniently. */
|
|
175
|
+
identityFromDisk(): Promise<EmbeddingIndexIdentity | null>;
|
|
176
|
+
/**
|
|
177
|
+
* Load every readable shard into `merged`. Returns the generation identity.
|
|
178
|
+
* Unreadable shards record durable diagnostics; `strict` additionally
|
|
179
|
+
* fails the mutation closed.
|
|
180
|
+
*/
|
|
181
|
+
readShardGenerationInto(merged: Record<string, EmbeddingIndexEntry>): Promise<EmbeddingIndexIdentity | null>;
|
|
182
|
+
readLegacy(): Promise<ManagedIndexRead>;
|
|
183
|
+
/**
|
|
184
|
+
* Read one managed index file (legacy or shard). The file is never
|
|
185
|
+
* modified or moved here: an unreadable file stays in place for recovery
|
|
186
|
+
* and is reported through the returned outcome (mutation paths fail
|
|
187
|
+
* closed on it; read-only paths fail open and record the reason).
|
|
188
|
+
*/
|
|
189
|
+
/**
|
|
190
|
+
* Read/mutation boundary for any generation member or the legacy marker
|
|
191
|
+
* (codex PRRT_kwDORJXyws6mZ72r): a symlinked member is rejected outright
|
|
192
|
+
* and its real target must stay inside the canonical state directory —
|
|
193
|
+
* following a planted link would read or write outside the memory root.
|
|
194
|
+
* Runs BEFORE the secure IO so storage-backed reads are covered too.
|
|
195
|
+
*/
|
|
196
|
+
private assertGenerationFileNotSymlinked;
|
|
197
|
+
readFileAt(filePath: string): Promise<ManagedIndexRead>;
|
|
198
|
+
private readShardNames;
|
|
199
|
+
/**
|
|
200
|
+
* Persist the index. Layout decisions, in order:
|
|
201
|
+
* - published generation: rewrite only the shards this mutation touched;
|
|
202
|
+
* - legacy/empty generation and the whole index fits one bounded JSON
|
|
203
|
+
* string: stay the single `state/embeddings.json` file;
|
|
204
|
+
* - over budget: ONE-WAY migration — stage a complete shard set, publish
|
|
205
|
+
* it with a single directory rename, then rename the legacy file aside
|
|
206
|
+
* as a non-authoritative recovery artifact (issue #3146).
|
|
207
|
+
*/
|
|
208
|
+
persist(index: EmbeddingIndexFile, opts?: {
|
|
209
|
+
touchedIds?: readonly string[];
|
|
210
|
+
memoryId?: string;
|
|
211
|
+
/** Reasserts mutation-lock ownership immediately before each destructive write (after serialization). */
|
|
212
|
+
fence?: EmbeddingGenerationFence;
|
|
213
|
+
}): Promise<void>;
|
|
214
|
+
/**
|
|
215
|
+
* Replace a published generation wholesale after a provider/model identity
|
|
216
|
+
* change (replacement semantics — the former entries are obsolete by
|
|
217
|
+
* definition). Crash-safe by the same construction as the migration: the
|
|
218
|
+
* COMPLETE new-identity set is staged and validated first (old bytes are
|
|
219
|
+
* not touched until staging succeeds), then published atomically through
|
|
220
|
+
* `publishSwappedGeneration`.
|
|
221
|
+
*/
|
|
222
|
+
private publishReplacementGeneration;
|
|
223
|
+
/**
|
|
224
|
+
* Write a complete shard set into a staging directory. Every shard is
|
|
225
|
+
* serialized before the first write, so a capacity failure cannot leave a
|
|
226
|
+
* partial stage behind.
|
|
227
|
+
*/
|
|
228
|
+
private stageShardSet;
|
|
229
|
+
/**
|
|
230
|
+
* Atomically remove the published generation (offline-sync: the remote
|
|
231
|
+
* deleted the whole index) by publishing an EMPTY staged directory
|
|
232
|
+
* through the shared swap: the rename is atomic, so the former generation
|
|
233
|
+
* moves whole into the fixed backup and back — a failure before the
|
|
234
|
+
* commit rolls the former generation back intact, and a post-commit
|
|
235
|
+
* backup-cleanup failure is non-fatal (the empty published directory
|
|
236
|
+
* stays the authoritative one-way layout marker). The fixed backup is
|
|
237
|
+
* symlink-checked first (round 5).
|
|
238
|
+
*/
|
|
239
|
+
removePublishedGeneration(fence?: EmbeddingGenerationFence): Promise<void>;
|
|
240
|
+
/**
|
|
241
|
+
* Atomically publish a fully staged generation directory as THE published
|
|
242
|
+
* generation. The former published directory is demoted to the FIXED
|
|
243
|
+
* transaction backup and the staging dir is renamed in with a single
|
|
244
|
+
* rename; if the publish rename fails the former generation is rolled
|
|
245
|
+
* back, and if the process dies in the rename gap `detectLayout()` /
|
|
246
|
+
* `recoverIfInterrupted()` perform the same rollback on next use.
|
|
247
|
+
* Shared by the mutation-side migration/replacement and the offline-sync
|
|
248
|
+
* generation transaction (issue #3148, round 4) so there is exactly one
|
|
249
|
+
* swap state machine. Staging-dir cleanup stays with the caller.
|
|
250
|
+
*/
|
|
251
|
+
publishSwappedGeneration(stagingDir: string, fence?: EmbeddingGenerationFence): Promise<void>;
|
|
252
|
+
/** 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). */
|
|
253
|
+
private static readonly STAGING_CLEANUP_GRACE_MS;
|
|
254
|
+
private cleanForeignStagingDirs;
|
|
255
|
+
/**
|
|
256
|
+
* Temp-file + rename write. The temp name carries `.tmp-` so offline sync
|
|
257
|
+
* ignores in-flight files under `state/`. With a wired io, the write goes
|
|
258
|
+
* through the canonical secure-store contract instead, optionally binding
|
|
259
|
+
* the ciphertext to the FINAL published path (staged shards).
|
|
260
|
+
*/
|
|
261
|
+
private writeAtomicFile;
|
|
262
|
+
/**
|
|
263
|
+
* Record the outcome of one index mutation durably. This is diagnostics,
|
|
264
|
+
* NOT recovery: write failures are recorded and then re-thrown by the
|
|
265
|
+
* caller so the extraction/consolidation task fails explicitly instead of
|
|
266
|
+
* declaring success over an index that could not be persisted (issue
|
|
267
|
+
* #3146).
|
|
268
|
+
*/
|
|
269
|
+
recordIndexWriteOutcome(err: unknown, memoryId?: string): Promise<void>;
|
|
270
|
+
/**
|
|
271
|
+
* Merge diagnostic state into `state/embedding-fallback-status.json`.
|
|
272
|
+
* Best-effort: a diagnostics failure never masks the real outcome.
|
|
273
|
+
*/
|
|
274
|
+
private recordIndexStatus;
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=embedding-index-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedding-index-storage.d.ts","sourceRoot":"","sources":["../src/embedding-index-storage.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,CAAC,CAAC;IACX,QAAQ,EAAE,qBAAqB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,IA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KAAK,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBhF;;;;;;;;;;OAUG;IACG,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAkCnG,+MAA+M;IAC/M,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAkB;YAEpD,uBAAuB;IAsBrC;;;;;OAKG;YACW,eAAe;IAmB7B;;;;;;OAMG;IACG,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB7E;;;OAGG;YACW,iBAAiB;CAmChC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EmbeddingIndexCapacityError,
|
|
3
|
+
EmbeddingIndexFileStore,
|
|
4
|
+
EmbeddingIndexStorageError,
|
|
5
|
+
isInvalidStringLengthError,
|
|
6
|
+
parseEmbeddingIndexDocument,
|
|
7
|
+
resolveIndexFileCharLimit,
|
|
8
|
+
serializeEmbeddingShard,
|
|
9
|
+
shardEntriesForIndex,
|
|
10
|
+
shardIndexOf,
|
|
11
|
+
validateShardMembership
|
|
12
|
+
} from "./chunk-UCPGOUDZ.js";
|
|
13
|
+
import "./chunk-P2QRMMVQ.js";
|
|
14
|
+
import "./chunk-3WCASNQZ.js";
|
|
15
|
+
import "./chunk-PZ5AY32C.js";
|
|
16
|
+
export {
|
|
17
|
+
EmbeddingIndexCapacityError,
|
|
18
|
+
EmbeddingIndexFileStore,
|
|
19
|
+
EmbeddingIndexStorageError,
|
|
20
|
+
isInvalidStringLengthError,
|
|
21
|
+
parseEmbeddingIndexDocument,
|
|
22
|
+
resolveIndexFileCharLimit,
|
|
23
|
+
serializeEmbeddingShard,
|
|
24
|
+
shardEntriesForIndex,
|
|
25
|
+
shardIndexOf,
|
|
26
|
+
validateShardMembership
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=embedding-index-storage.js.map
|
package/dist/entity-retrieval.js
CHANGED
|
@@ -3,26 +3,26 @@ import {
|
|
|
3
3
|
entityIndexVersion,
|
|
4
4
|
entityRecentTranscriptLookbackHours,
|
|
5
5
|
readRecentEntityTranscriptEntries
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MXCAJKMA.js";
|
|
7
|
+
import "./chunk-MKYRCCSN.js";
|
|
7
8
|
import "./chunk-GKUA4MGB.js";
|
|
8
9
|
import "./chunk-5AUY5Z5E.js";
|
|
9
10
|
import "./chunk-SVH57F5Z.js";
|
|
10
|
-
import "./chunk-MKYRCCSN.js";
|
|
11
11
|
import "./chunk-2DQ2XREU.js";
|
|
12
12
|
import "./chunk-NVKO5YKP.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-STEOT4DI.js";
|
|
14
14
|
import "./chunk-UHVXE24Y.js";
|
|
15
15
|
import "./chunk-46WM6JX2.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-S7LWX2PQ.js";
|
|
16
|
+
import "./chunk-V4JZCTMK.js";
|
|
17
|
+
import "./chunk-LV5H6FTN.js";
|
|
18
|
+
import "./chunk-4OQET73E.js";
|
|
20
19
|
import "./chunk-T2YX56QI.js";
|
|
21
20
|
import "./chunk-CYEPCZN5.js";
|
|
22
21
|
import "./chunk-T3FMRLWQ.js";
|
|
23
22
|
import "./chunk-7VO6E5UD.js";
|
|
24
|
-
import "./chunk-4O6WRBGE.js";
|
|
25
23
|
import "./chunk-Z4TXB4K7.js";
|
|
24
|
+
import "./chunk-S7LWX2PQ.js";
|
|
25
|
+
import "./chunk-4O6WRBGE.js";
|
|
26
26
|
import "./chunk-GUMZC2BO.js";
|
|
27
27
|
import "./chunk-TFA6HPOA.js";
|
|
28
28
|
import "./chunk-F4TWWUMP.js";
|
|
@@ -31,15 +31,15 @@ import "./chunk-A7Q43EUZ.js";
|
|
|
31
31
|
import "./chunk-S2V7RUCL.js";
|
|
32
32
|
import "./chunk-MRPOZBJC.js";
|
|
33
33
|
import "./chunk-S2HLHAZ4.js";
|
|
34
|
-
import "./chunk-LDXUBPMO.js";
|
|
35
34
|
import "./chunk-DM2T26WE.js";
|
|
35
|
+
import "./chunk-LDXUBPMO.js";
|
|
36
36
|
import "./chunk-FF6N7BXC.js";
|
|
37
37
|
import "./chunk-2DT7PIDZ.js";
|
|
38
38
|
import "./chunk-AAD2ZS6P.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-6O2VUWV6.js";
|
|
40
|
+
import "./chunk-ZIKENA2C.js";
|
|
40
41
|
import "./chunk-3ONXXHQO.js";
|
|
41
42
|
import "./chunk-YXZG5TVN.js";
|
|
42
|
-
import "./chunk-ZIKENA2C.js";
|
|
43
43
|
import "./chunk-345MEMRU.js";
|
|
44
44
|
import "./chunk-SCU65EZI.js";
|
|
45
45
|
import "./chunk-5GINB5LC.js";
|
|
@@ -70,20 +70,20 @@ import "./chunk-PJKTFXE2.js";
|
|
|
70
70
|
import "./chunk-W5BIQOAJ.js";
|
|
71
71
|
import "./chunk-Z7L72ZHL.js";
|
|
72
72
|
import "./chunk-4O4TKIXQ.js";
|
|
73
|
-
import "./chunk-
|
|
73
|
+
import "./chunk-5AYUHSAU.js";
|
|
74
74
|
import "./chunk-BT7NVCML.js";
|
|
75
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-PO7NXNGC.js";
|
|
76
76
|
import "./chunk-BJMBJZ2Y.js";
|
|
77
77
|
import "./chunk-UKJAGEXH.js";
|
|
78
78
|
import "./chunk-FP2373TW.js";
|
|
79
79
|
import "./chunk-L272A5QW.js";
|
|
80
|
-
import "./chunk-
|
|
80
|
+
import "./chunk-22DYJLFN.js";
|
|
81
81
|
import "./chunk-ZA53AZND.js";
|
|
82
82
|
import "./chunk-7RJUVTVF.js";
|
|
83
83
|
import "./chunk-AL3UYZ5N.js";
|
|
84
84
|
import "./chunk-RL6NEVXT.js";
|
|
85
85
|
import "./chunk-C7HJ3NEI.js";
|
|
86
|
-
import "./chunk-
|
|
86
|
+
import "./chunk-N4PYB235.js";
|
|
87
87
|
import "./chunk-AW4QUFQF.js";
|
|
88
88
|
import "./chunk-5FVVY2EB.js";
|
|
89
89
|
import "./chunk-FFAZ2XFU.js";
|
|
@@ -101,7 +101,7 @@ import "./chunk-6KH5NLQS.js";
|
|
|
101
101
|
import "./chunk-P2QRMMVQ.js";
|
|
102
102
|
import "./chunk-BTTPKDIL.js";
|
|
103
103
|
import "./chunk-FF4KLI5W.js";
|
|
104
|
-
import "./chunk-
|
|
104
|
+
import "./chunk-MAAL6OZV.js";
|
|
105
105
|
import "./chunk-A6XUJE5D.js";
|
|
106
106
|
import "./chunk-VS2IYZRU.js";
|
|
107
107
|
import "./chunk-KNA3BXXL.js";
|