@remnic/core 10.0.122 → 10.0.124
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 +146 -144
- package/dist/access-cli.js +146 -144
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.js +146 -144
- package/dist/access-http-admission.js +1 -1
- package/dist/access-http-briefing.js +146 -144
- package/dist/access-http-query.js +146 -144
- package/dist/access-http.js +146 -144
- package/dist/access-identity-continuity-surface.js +146 -144
- package/dist/access-lcm-surface.js +146 -144
- package/dist/access-mcp.js +146 -144
- package/dist/access-observe-write-category.js +9 -9
- package/dist/access-observe-write-surface.js +146 -144
- package/dist/access-offline-manifest.js +6 -6
- package/dist/access-operations-batch.js +146 -144
- package/dist/access-operations.js +146 -144
- package/dist/access-recall-concurrency.js +146 -144
- package/dist/access-recall-diagnostics.js +2 -2
- package/dist/access-recall-response.js +146 -144
- package/dist/access-recall-surface.js +146 -144
- package/dist/access-schema.js +8 -8
- package/dist/access-service.js +146 -144
- package/dist/active-recall.js +23 -23
- package/dist/adapters/index.js +7 -7
- package/dist/adapters/registry.js +3 -3
- package/dist/briefing.js +16 -16
- package/dist/buffer-admission.d.ts +9 -0
- package/dist/buffer-admission.d.ts.map +1 -1
- package/dist/buffer-admission.js +3 -1
- package/dist/buffer-session-cap.d.ts +15 -0
- package/dist/buffer-session-cap.d.ts.map +1 -0
- package/dist/buffer-session-cap.js +19 -0
- package/dist/buffer.d.ts +1 -1
- package/dist/buffer.d.ts.map +1 -1
- package/dist/buffer.js +7 -4
- package/dist/calibration.js +4 -4
- package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.js +19 -19
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.js +3 -3
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-A6KNCOHQ.js → chunk-2AVPRUML.js} +2 -2
- package/dist/{chunk-CLF4TBUS.js → chunk-2GSPNTOU.js} +2 -2
- package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-43AA5FVD.js → chunk-3IZQFNIV.js} +1 -1
- package/dist/chunk-3IZQFNIV.js.map +1 -0
- package/dist/{chunk-IARHAE4J.js → chunk-42JE2CF4.js} +2 -2
- package/dist/{chunk-7POUQFKI.js → chunk-47W3ALIS.js} +3 -3
- package/dist/{chunk-FGI6GJA5.js → chunk-4VCASS3Q.js} +3 -3
- package/dist/{chunk-NLYLOLQW.js → chunk-4VWZ4HPL.js} +5 -5
- package/dist/{chunk-K4P2MUVI.js → chunk-5DCCVEKT.js} +2 -2
- package/dist/{chunk-C5PEYREE.js → chunk-5DP4GVKR.js} +2 -2
- package/dist/{chunk-FAAWURSH.js → chunk-6IRJWKR5.js} +2 -2
- package/dist/{chunk-QOWLC5P6.js → chunk-6VAN7VZR.js} +14 -14
- package/dist/{chunk-ZZ5S2SFB.js → chunk-7QDB7P3V.js} +3 -3
- package/dist/{chunk-4VAUQBFJ.js → chunk-7TJMXZPO.js} +3 -3
- package/dist/{chunk-SEOJHETP.js → chunk-ASINXIKX.js} +10 -9
- package/dist/{chunk-SEOJHETP.js.map → chunk-ASINXIKX.js.map} +1 -1
- package/dist/{chunk-ZMIRHXJE.js → chunk-AYWW6JEH.js} +211 -211
- package/dist/{chunk-ZMIRHXJE.js.map → chunk-AYWW6JEH.js.map} +1 -1
- package/dist/{chunk-73TPOGS4.js → chunk-BFBS7OFQ.js} +9 -9
- package/dist/{chunk-Z6EMZNKI.js → chunk-BFDXJHYG.js} +2 -2
- package/dist/{chunk-IFYWNSSU.js → chunk-BNRKSJMO.js} +2 -2
- package/dist/{chunk-TNPUVR6U.js → chunk-C7BTGSCY.js} +13 -13
- package/dist/{chunk-ZDE54VUB.js → chunk-CQMH65IP.js} +2 -2
- package/dist/{chunk-R4BBGPI2.js → chunk-CS66BCED.js} +2 -2
- package/dist/{chunk-ZQLJNZZ7.js → chunk-CUKYV5O3.js} +7 -7
- package/dist/{chunk-W2B25HUU.js → chunk-DB4THCGN.js} +6 -6
- package/dist/{chunk-DWUKVXMU.js → chunk-DH2CDGAE.js} +2 -2
- package/dist/{chunk-ZDZJNXL6.js → chunk-DK2VBJ6Q.js} +4 -4
- package/dist/{chunk-744WDDFX.js → chunk-DL7K5PMQ.js} +2 -2
- package/dist/{chunk-5RONA5FF.js → chunk-DTTDMK7Q.js} +4 -4
- package/dist/{chunk-P7FC7N5Z.js → chunk-EFHM4VDG.js} +2 -2
- package/dist/{chunk-CPWYYRJ2.js → chunk-ELBZT6RU.js} +2 -2
- package/dist/{chunk-HOYYVQN2.js → chunk-ERR7ZFPJ.js} +2 -2
- package/dist/{chunk-CNCN5UN4.js → chunk-FBXU7X27.js} +2 -2
- package/dist/{chunk-3SL52JKD.js → chunk-FZVROZKC.js} +5 -5
- package/dist/{chunk-5PCUUGLT.js → chunk-G53I363P.js} +2 -2
- package/dist/{chunk-V2KGDESV.js → chunk-GS2TT2YE.js} +2 -2
- package/dist/{chunk-EMMJQASU.js → chunk-GSCIRMPR.js} +2 -2
- package/dist/{chunk-OM5ESBES.js → chunk-HQPFACXO.js} +2 -2
- package/dist/{chunk-HBNMJ26J.js → chunk-HRMOKGQM.js} +2 -2
- package/dist/{chunk-EHJI3L7T.js → chunk-HURBXNNB.js} +2 -2
- package/dist/{chunk-4RASUAN3.js → chunk-HXFIILGF.js} +4 -4
- package/dist/{chunk-XYZXO6VO.js → chunk-IB4TDPCC.js} +20 -20
- package/dist/{chunk-IMULTENA.js → chunk-ID65XTF3.js} +2 -2
- package/dist/{chunk-3COGVB3C.js → chunk-IDCZEKK6.js} +14 -3
- package/dist/chunk-IDCZEKK6.js.map +1 -0
- package/dist/{chunk-L5PM7B3I.js → chunk-IFFCHE3O.js} +1 -1
- package/dist/{chunk-L5PM7B3I.js.map → chunk-IFFCHE3O.js.map} +1 -1
- package/dist/{chunk-VPARMYWA.js → chunk-J6U6KUMK.js} +8 -8
- package/dist/{chunk-6GQFMR6A.js → chunk-JTY3NA3I.js} +2 -2
- package/dist/{chunk-TH6OYP6I.js → chunk-K36RMINQ.js} +3 -3
- package/dist/{chunk-BUKK5SWA.js → chunk-KQAFEZQX.js} +2 -2
- package/dist/{chunk-X6QQNDIW.js → chunk-KWVGRNKL.js} +9 -5
- package/dist/chunk-KWVGRNKL.js.map +1 -0
- package/dist/{chunk-B2RECSSR.js → chunk-LKGTTX74.js} +2 -2
- package/dist/chunk-LWZNSQN3.js +44 -0
- package/dist/chunk-LWZNSQN3.js.map +1 -0
- package/dist/{chunk-WRTLTOHA.js → chunk-O62MMJWV.js} +2 -2
- package/dist/{chunk-K3FH3LAQ.js → chunk-OJXK5C6Z.js} +4 -4
- package/dist/{chunk-SH4R3FVM.js → chunk-PAGVXEWG.js} +2 -2
- package/dist/{chunk-WEDE4DXL.js → chunk-PUKLCFCU.js} +4 -4
- package/dist/{chunk-WEDE4DXL.js.map → chunk-PUKLCFCU.js.map} +1 -1
- package/dist/{chunk-GMO3BGOF.js → chunk-QC2MHZDD.js} +1 -1
- package/dist/{chunk-KNAF3A7Y.js → chunk-QF64W4YM.js} +2 -2
- package/dist/{chunk-PH5ZQM35.js → chunk-R6BNDA67.js} +2 -2
- package/dist/{chunk-P5KJOXWH.js → chunk-RRHLI6VU.js} +2 -2
- package/dist/{chunk-NHVAX7MH.js → chunk-RSKZWXQO.js} +3 -3
- package/dist/{chunk-UCD7NQKZ.js → chunk-RTIHO7AJ.js} +2 -2
- package/dist/{chunk-I3V3JJS7.js → chunk-SRDWJPET.js} +2 -2
- package/dist/{chunk-I3V3JJS7.js.map → chunk-SRDWJPET.js.map} +1 -1
- package/dist/{chunk-RDCKC5MI.js → chunk-SU42FIJ7.js} +3 -3
- package/dist/{chunk-WQUGCOKF.js → chunk-TFA6HPOA.js} +4 -4
- package/dist/{chunk-OYHEVL4A.js → chunk-UGCLNASV.js} +3 -3
- package/dist/{chunk-XNRLRNQF.js → chunk-UPYEFL7J.js} +2 -2
- package/dist/chunk-V24YLFJW.js +72 -0
- package/dist/chunk-V24YLFJW.js.map +1 -0
- package/dist/{chunk-U2PSE7MB.js → chunk-VPEIWMUT.js} +2 -2
- package/dist/{chunk-RB7NXZ2E.js → chunk-W4Q65VJL.js} +2 -2
- package/dist/{chunk-SVP57SAR.js → chunk-WRGW76LI.js} +9 -9
- package/dist/{chunk-FA7SLQ5X.js → chunk-WUQH7BDU.js} +1 -1
- package/dist/chunk-WUQH7BDU.js.map +1 -0
- package/dist/{chunk-SED6JMID.js → chunk-WYABF2WA.js} +7 -7
- package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-ENQCH3SW.js → chunk-XAIRTELU.js} +10 -1
- package/dist/chunk-XAIRTELU.js.map +1 -0
- package/dist/{chunk-5JDLDYST.js → chunk-XLHLZALR.js} +3 -3
- package/dist/{chunk-OJPCASE5.js → chunk-XN43HAIV.js} +2 -2
- package/dist/{chunk-YGFHQT3E.js → chunk-YJEOQ72B.js} +2 -2
- package/dist/{chunk-N72KBIZ2.js → chunk-YKUW2EZF.js} +18 -12
- package/dist/chunk-YKUW2EZF.js.map +1 -0
- package/dist/{chunk-65HWAQ4F.js → chunk-ZDCSFRIU.js} +2 -2
- package/dist/cli.js +146 -144
- package/dist/coding/export-okf-codegraph.js +15 -15
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compounding/engine.js +17 -17
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +23 -23
- package/dist/connectors/codex-materialize-runner.js +16 -16
- package/dist/connectors/index.js +16 -16
- package/dist/convergence-refresh.js +18 -18
- package/dist/conversation-index/backend.js +2 -2
- package/dist/corpus-watermark.js +18 -18
- package/dist/deep-recall-http-glue.js +9 -9
- package/dist/deep-recall.js +2 -2
- package/dist/embedding-fallback.js +1 -1
- package/dist/entity-retrieval.js +17 -17
- package/dist/event-order-recall.js +3 -3
- package/dist/explicit-capture.js +146 -144
- package/dist/extraction-error-classification.d.ts +2 -0
- package/dist/extraction-error-classification.d.ts.map +1 -1
- package/dist/extraction-error-classification.js +1 -1
- package/dist/extraction-reply-diagnostic.d.ts +31 -0
- package/dist/extraction-reply-diagnostic.d.ts.map +1 -0
- package/dist/extraction-reply-diagnostic.js +13 -0
- package/dist/extraction-reply-diagnostic.js.map +1 -0
- package/dist/extraction-span-materialize.js +2 -2
- package/dist/extraction.d.ts +0 -1
- package/dist/extraction.d.ts.map +1 -1
- package/dist/extraction.js +28 -27
- package/dist/{graph-edge-decay-BC3IO2J4.js → graph-edge-decay-CXTNJ7IQ.js} +6 -6
- package/dist/graph-edge-decay-CXTNJ7IQ.js.map +1 -0
- package/dist/graph-jsonl.js +4 -4
- package/dist/graph-snapshot.js +4 -4
- package/dist/graph.js +5 -5
- package/dist/harmonic-retrieval.js +16 -16
- package/dist/index.js +236 -234
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.js +7 -7
- package/dist/local-llm-helpers.d.ts +1 -0
- package/dist/local-llm-helpers.d.ts.map +1 -1
- package/dist/local-llm-helpers.js +1 -1
- package/dist/local-llm.js +4 -4
- package/dist/location/index.js +17 -17
- package/dist/maintenance/memory-governance.js +16 -16
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +16 -16
- package/dist/maintenance/rebuild-memory-projection-runner.js +18 -18
- package/dist/maintenance/rebuild-memory-projection.js +17 -17
- package/dist/namespaces/migrate.js +17 -17
- package/dist/namespaces/search.js +7 -7
- package/dist/namespaces/storage.js +16 -16
- package/dist/offline-sync-changeset-generations.js +4 -4
- package/dist/offline-sync-embedding-generation.js +3 -3
- package/dist/offline-sync-snapshot-stream.js +6 -6
- package/dist/offline-sync.js +8 -8
- package/dist/operator-doctor-corpus.js +19 -19
- package/dist/operator-toolkit.js +34 -34
- package/dist/orchestration/backlog-scheduler.js +147 -145
- package/dist/orchestration/backlog-scheduler.js.map +1 -1
- package/dist/orchestration/buffer-drain-runner.js +147 -145
- package/dist/orchestration/extraction-run.d.ts.map +1 -1
- package/dist/orchestration/maintenance.js +28 -28
- package/dist/orchestrator.js +146 -144
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.js +2 -2
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-navigation.js +146 -144
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.js +2 -2
- package/dist/resume-bundles.js +26 -26
- package/dist/search/factory.js +6 -6
- package/dist/search/index.js +12 -12
- package/dist/semantic-consolidation.js +17 -17
- package/dist/semantic-rule-promotion.js +16 -16
- package/dist/semantic-rule-verifier.js +16 -16
- package/dist/source-agent-qualifier.js +18 -18
- package/dist/standup/build.js +16 -16
- package/dist/storage.js +15 -15
- package/dist/summarizer.js +5 -5
- package/dist/support-passport/index.js +5 -5
- package/dist/transcript.js +2 -2
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/export-okf.js +16 -16
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +16 -16
- package/dist/who-knows-cli.js +17 -17
- package/dist/who-knows.js +16 -16
- package/package.json +2 -2
- package/src/access-http-admission.ts +1 -1
- package/src/access-mcp.ts +1 -1
- package/src/buffer-admission.ts +16 -0
- package/src/buffer-session-cap.ts +49 -0
- package/src/buffer-session.test.ts +75 -1
- package/src/buffer.ts +7 -2
- package/src/config.ts +4 -0
- package/src/extraction-error-classification.ts +2 -0
- package/src/extraction-reply-diagnostic-wiring.test.ts +87 -0
- package/src/extraction-reply-diagnostic.test.ts +130 -0
- package/src/extraction-reply-diagnostic.ts +105 -0
- package/src/extraction.ts +7 -16
- package/src/local-llm-headers-timeout.test.ts +24 -1
- package/src/local-llm-helpers.ts +1 -1
- package/src/local-llm.ts +3 -3
- package/src/orchestration/extraction-run.ts +7 -3
- package/src/orchestrator-flush.test.ts +72 -4
- package/src/types.ts +2 -0
- package/dist/chunk-3COGVB3C.js.map +0 -1
- package/dist/chunk-43AA5FVD.js.map +0 -1
- package/dist/chunk-ENQCH3SW.js.map +0 -1
- package/dist/chunk-FA7SLQ5X.js.map +0 -1
- package/dist/chunk-N72KBIZ2.js.map +0 -1
- package/dist/chunk-X6QQNDIW.js.map +0 -1
- /package/dist/{capsule-crypto-GWVG7LGC.js.map → buffer-session-cap.js.map} +0 -0
- /package/dist/{graph-edge-decay-BC3IO2J4.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-A6KNCOHQ.js.map → chunk-2AVPRUML.js.map} +0 -0
- /package/dist/{chunk-CLF4TBUS.js.map → chunk-2GSPNTOU.js.map} +0 -0
- /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-IARHAE4J.js.map → chunk-42JE2CF4.js.map} +0 -0
- /package/dist/{chunk-7POUQFKI.js.map → chunk-47W3ALIS.js.map} +0 -0
- /package/dist/{chunk-FGI6GJA5.js.map → chunk-4VCASS3Q.js.map} +0 -0
- /package/dist/{chunk-NLYLOLQW.js.map → chunk-4VWZ4HPL.js.map} +0 -0
- /package/dist/{chunk-K4P2MUVI.js.map → chunk-5DCCVEKT.js.map} +0 -0
- /package/dist/{chunk-C5PEYREE.js.map → chunk-5DP4GVKR.js.map} +0 -0
- /package/dist/{chunk-FAAWURSH.js.map → chunk-6IRJWKR5.js.map} +0 -0
- /package/dist/{chunk-QOWLC5P6.js.map → chunk-6VAN7VZR.js.map} +0 -0
- /package/dist/{chunk-ZZ5S2SFB.js.map → chunk-7QDB7P3V.js.map} +0 -0
- /package/dist/{chunk-4VAUQBFJ.js.map → chunk-7TJMXZPO.js.map} +0 -0
- /package/dist/{chunk-73TPOGS4.js.map → chunk-BFBS7OFQ.js.map} +0 -0
- /package/dist/{chunk-Z6EMZNKI.js.map → chunk-BFDXJHYG.js.map} +0 -0
- /package/dist/{chunk-IFYWNSSU.js.map → chunk-BNRKSJMO.js.map} +0 -0
- /package/dist/{chunk-TNPUVR6U.js.map → chunk-C7BTGSCY.js.map} +0 -0
- /package/dist/{chunk-ZDE54VUB.js.map → chunk-CQMH65IP.js.map} +0 -0
- /package/dist/{chunk-R4BBGPI2.js.map → chunk-CS66BCED.js.map} +0 -0
- /package/dist/{chunk-ZQLJNZZ7.js.map → chunk-CUKYV5O3.js.map} +0 -0
- /package/dist/{chunk-W2B25HUU.js.map → chunk-DB4THCGN.js.map} +0 -0
- /package/dist/{chunk-DWUKVXMU.js.map → chunk-DH2CDGAE.js.map} +0 -0
- /package/dist/{chunk-ZDZJNXL6.js.map → chunk-DK2VBJ6Q.js.map} +0 -0
- /package/dist/{chunk-744WDDFX.js.map → chunk-DL7K5PMQ.js.map} +0 -0
- /package/dist/{chunk-5RONA5FF.js.map → chunk-DTTDMK7Q.js.map} +0 -0
- /package/dist/{chunk-P7FC7N5Z.js.map → chunk-EFHM4VDG.js.map} +0 -0
- /package/dist/{chunk-CPWYYRJ2.js.map → chunk-ELBZT6RU.js.map} +0 -0
- /package/dist/{chunk-HOYYVQN2.js.map → chunk-ERR7ZFPJ.js.map} +0 -0
- /package/dist/{chunk-CNCN5UN4.js.map → chunk-FBXU7X27.js.map} +0 -0
- /package/dist/{chunk-3SL52JKD.js.map → chunk-FZVROZKC.js.map} +0 -0
- /package/dist/{chunk-5PCUUGLT.js.map → chunk-G53I363P.js.map} +0 -0
- /package/dist/{chunk-V2KGDESV.js.map → chunk-GS2TT2YE.js.map} +0 -0
- /package/dist/{chunk-EMMJQASU.js.map → chunk-GSCIRMPR.js.map} +0 -0
- /package/dist/{chunk-OM5ESBES.js.map → chunk-HQPFACXO.js.map} +0 -0
- /package/dist/{chunk-HBNMJ26J.js.map → chunk-HRMOKGQM.js.map} +0 -0
- /package/dist/{chunk-EHJI3L7T.js.map → chunk-HURBXNNB.js.map} +0 -0
- /package/dist/{chunk-4RASUAN3.js.map → chunk-HXFIILGF.js.map} +0 -0
- /package/dist/{chunk-XYZXO6VO.js.map → chunk-IB4TDPCC.js.map} +0 -0
- /package/dist/{chunk-IMULTENA.js.map → chunk-ID65XTF3.js.map} +0 -0
- /package/dist/{chunk-VPARMYWA.js.map → chunk-J6U6KUMK.js.map} +0 -0
- /package/dist/{chunk-6GQFMR6A.js.map → chunk-JTY3NA3I.js.map} +0 -0
- /package/dist/{chunk-TH6OYP6I.js.map → chunk-K36RMINQ.js.map} +0 -0
- /package/dist/{chunk-BUKK5SWA.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-B2RECSSR.js.map → chunk-LKGTTX74.js.map} +0 -0
- /package/dist/{chunk-WRTLTOHA.js.map → chunk-O62MMJWV.js.map} +0 -0
- /package/dist/{chunk-K3FH3LAQ.js.map → chunk-OJXK5C6Z.js.map} +0 -0
- /package/dist/{chunk-SH4R3FVM.js.map → chunk-PAGVXEWG.js.map} +0 -0
- /package/dist/{chunk-GMO3BGOF.js.map → chunk-QC2MHZDD.js.map} +0 -0
- /package/dist/{chunk-KNAF3A7Y.js.map → chunk-QF64W4YM.js.map} +0 -0
- /package/dist/{chunk-PH5ZQM35.js.map → chunk-R6BNDA67.js.map} +0 -0
- /package/dist/{chunk-P5KJOXWH.js.map → chunk-RRHLI6VU.js.map} +0 -0
- /package/dist/{chunk-NHVAX7MH.js.map → chunk-RSKZWXQO.js.map} +0 -0
- /package/dist/{chunk-UCD7NQKZ.js.map → chunk-RTIHO7AJ.js.map} +0 -0
- /package/dist/{chunk-RDCKC5MI.js.map → chunk-SU42FIJ7.js.map} +0 -0
- /package/dist/{chunk-WQUGCOKF.js.map → chunk-TFA6HPOA.js.map} +0 -0
- /package/dist/{chunk-OYHEVL4A.js.map → chunk-UGCLNASV.js.map} +0 -0
- /package/dist/{chunk-XNRLRNQF.js.map → chunk-UPYEFL7J.js.map} +0 -0
- /package/dist/{chunk-U2PSE7MB.js.map → chunk-VPEIWMUT.js.map} +0 -0
- /package/dist/{chunk-RB7NXZ2E.js.map → chunk-W4Q65VJL.js.map} +0 -0
- /package/dist/{chunk-SVP57SAR.js.map → chunk-WRGW76LI.js.map} +0 -0
- /package/dist/{chunk-SED6JMID.js.map → chunk-WYABF2WA.js.map} +0 -0
- /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-5JDLDYST.js.map → chunk-XLHLZALR.js.map} +0 -0
- /package/dist/{chunk-OJPCASE5.js.map → chunk-XN43HAIV.js.map} +0 -0
- /package/dist/{chunk-YGFHQT3E.js.map → chunk-YJEOQ72B.js.map} +0 -0
- /package/dist/{chunk-65HWAQ4F.js.map → chunk-ZDCSFRIU.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFrontmatter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IB4TDPCC.js";
|
|
4
4
|
import {
|
|
5
5
|
activityDigestPath,
|
|
6
6
|
isValidActivityDate
|
|
@@ -199,4 +199,4 @@ export {
|
|
|
199
199
|
buildStandup,
|
|
200
200
|
standupHelp
|
|
201
201
|
};
|
|
202
|
-
//# sourceMappingURL=chunk-
|
|
202
|
+
//# sourceMappingURL=chunk-RRHLI6VU.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseXrayFormat
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CS66BCED.js";
|
|
4
4
|
import {
|
|
5
5
|
RECALL_DISCLOSURE_LEVELS,
|
|
6
6
|
isRecallDisclosure
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3IZQFNIV.js";
|
|
8
8
|
|
|
9
9
|
// src/recall-xray-cli.ts
|
|
10
10
|
function parseXrayDisclosureFlag(value) {
|
|
@@ -50,4 +50,4 @@ export {
|
|
|
50
50
|
parseXrayBudgetFlag,
|
|
51
51
|
parseXrayCliOptions
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-RSKZWXQO.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-KJTKLXTH.js";
|
|
4
4
|
import {
|
|
5
5
|
StorageManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IB4TDPCC.js";
|
|
7
7
|
import {
|
|
8
8
|
assertInjectedStorageRooted
|
|
9
9
|
} from "./chunk-BNZAR6PO.js";
|
|
@@ -260,4 +260,4 @@ export {
|
|
|
260
260
|
backupExistingLedger,
|
|
261
261
|
rebuildMemoryLifecycleLedger
|
|
262
262
|
};
|
|
263
|
-
//# sourceMappingURL=chunk-
|
|
263
|
+
//# sourceMappingURL=chunk-RTIHO7AJ.js.map
|
|
@@ -9,7 +9,7 @@ function respondBufferAdmissionError(err, res, correlationId, respond) {
|
|
|
9
9
|
respond(400, { error: err.message, code: "storage_target_required" });
|
|
10
10
|
return true;
|
|
11
11
|
}
|
|
12
|
-
if (err.name === "ReplayAdmissionRefusedError") {
|
|
12
|
+
if (err.name === "ReplayAdmissionRefusedError" || err.name === "BufferSessionTurnRefusedError") {
|
|
13
13
|
log.warn(`engram access HTTP buffer admission refused [${correlationId}]: ${err.message}`);
|
|
14
14
|
res.setHeader("retry-after", String(BUFFER_ADMISSION_RETRY_AFTER_SECONDS));
|
|
15
15
|
respond(503, { error: err.message, code: "buffer_admission_refused" });
|
|
@@ -21,4 +21,4 @@ function respondBufferAdmissionError(err, res, correlationId, respond) {
|
|
|
21
21
|
export {
|
|
22
22
|
respondBufferAdmissionError
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-SRDWJPET.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/access-http-admission.ts"],"sourcesContent":["import type { ServerResponse } from \"node:http\";\n\nimport { log } from \"./logger.js\";\n\n/** Advisory backpressure hint for 503 buffer_admission_refused (optional; removable without a contract change). */\nconst BUFFER_ADMISSION_RETRY_AFTER_SECONDS = 5;\n\ntype AdmissionErrorBody = { error: string; code: \"storage_target_required\" | \"buffer_admission_refused\" };\n\n/**\n * Map durable-capture admission failures to HTTP answers. Returns true when the\n * error was answered. A missing storage target is a permanent client fault (400,\n * never retryable); a full buffer is retryable backpressure (503) that is logged\n * with the request correlation id, not as a server fault.\n */\nexport function respondBufferAdmissionError(\n err: Error,\n res: ServerResponse,\n correlationId: string,\n respond: (status: number, body: AdmissionErrorBody) => void,\n): boolean {\n if (err.name === \"StorageTargetRequiredError\") {\n respond(400, { error: err.message, code: \"storage_target_required\" });\n return true;\n }\n if (err.name === \"ReplayAdmissionRefusedError\") {\n log.warn(`engram access HTTP buffer admission refused [${correlationId}]: ${err.message}`);\n res.setHeader(\"retry-after\", String(BUFFER_ADMISSION_RETRY_AFTER_SECONDS));\n respond(503, { error: err.message, code: \"buffer_admission_refused\" });\n return true;\n }\n return false;\n}\n"],"mappings":";;;;;AAKA,IAAM,uCAAuC;AAUtC,SAAS,4BACd,KACA,KACA,eACA,SACS;AACT,MAAI,IAAI,SAAS,8BAA8B;AAC7C,YAAQ,KAAK,EAAE,OAAO,IAAI,SAAS,MAAM,0BAA0B,CAAC;AACpE,WAAO;AAAA,EACT;AACA,MAAI,IAAI,SAAS
|
|
1
|
+
{"version":3,"sources":["../src/access-http-admission.ts"],"sourcesContent":["import type { ServerResponse } from \"node:http\";\n\nimport { log } from \"./logger.js\";\n\n/** Advisory backpressure hint for 503 buffer_admission_refused (optional; removable without a contract change). */\nconst BUFFER_ADMISSION_RETRY_AFTER_SECONDS = 5;\n\ntype AdmissionErrorBody = { error: string; code: \"storage_target_required\" | \"buffer_admission_refused\" };\n\n/**\n * Map durable-capture admission failures to HTTP answers. Returns true when the\n * error was answered. A missing storage target is a permanent client fault (400,\n * never retryable); a full buffer is retryable backpressure (503) that is logged\n * with the request correlation id, not as a server fault.\n */\nexport function respondBufferAdmissionError(\n err: Error,\n res: ServerResponse,\n correlationId: string,\n respond: (status: number, body: AdmissionErrorBody) => void,\n): boolean {\n if (err.name === \"StorageTargetRequiredError\") {\n respond(400, { error: err.message, code: \"storage_target_required\" });\n return true;\n }\n if (err.name === \"ReplayAdmissionRefusedError\" || err.name === \"BufferSessionTurnRefusedError\") {\n log.warn(`engram access HTTP buffer admission refused [${correlationId}]: ${err.message}`);\n res.setHeader(\"retry-after\", String(BUFFER_ADMISSION_RETRY_AFTER_SECONDS));\n respond(503, { error: err.message, code: \"buffer_admission_refused\" });\n return true;\n }\n return false;\n}\n"],"mappings":";;;;;AAKA,IAAM,uCAAuC;AAUtC,SAAS,4BACd,KACA,KACA,eACA,SACS;AACT,MAAI,IAAI,SAAS,8BAA8B;AAC7C,YAAQ,KAAK,EAAE,OAAO,IAAI,SAAS,MAAM,0BAA0B,CAAC;AACpE,WAAO;AAAA,EACT;AACA,MAAI,IAAI,SAAS,iCAAiC,IAAI,SAAS,iCAAiC;AAC9F,QAAI,KAAK,gDAAgD,aAAa,MAAM,IAAI,OAAO,EAAE;AACzF,QAAI,UAAU,eAAe,OAAO,oCAAoC,CAAC;AACzE,YAAQ,KAAK,EAAE,OAAO,IAAI,SAAS,MAAM,2BAA2B,CAAC;AACrE,WAAO;AAAA,EACT;AACA,SAAO;AACT;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isValidCapsuleSince
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KQAFEZQX.js";
|
|
4
4
|
import {
|
|
5
5
|
CAPSULE_ID_PATTERN
|
|
6
6
|
} from "./chunk-WEHSQBFR.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
OFFLINE_SYNC_FILE_CONTENT_MAX_CHUNK_BYTES,
|
|
14
14
|
OFFLINE_SYNC_MAX_MTIME_MS
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WYABF2WA.js";
|
|
16
16
|
import {
|
|
17
17
|
validateArchiveRelativePath
|
|
18
18
|
} from "./chunk-GCGJW34D.js";
|
|
@@ -580,4 +580,4 @@ export {
|
|
|
580
580
|
actionConfidenceRequestSchema,
|
|
581
581
|
validateRequest
|
|
582
582
|
};
|
|
583
|
-
//# sourceMappingURL=chunk-
|
|
583
|
+
//# sourceMappingURL=chunk-SU42FIJ7.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
failOpenFaissHealth
|
|
3
|
+
} from "./chunk-F4TWWUMP.js";
|
|
1
4
|
import {
|
|
2
5
|
rebuildConversationChunksFailOpen,
|
|
3
6
|
upsertConversationChunksFailOpen
|
|
@@ -6,9 +9,6 @@ import {
|
|
|
6
9
|
searchConversationIndex,
|
|
7
10
|
searchConversationIndexFaissFailOpen
|
|
8
11
|
} from "./chunk-A7Q43EUZ.js";
|
|
9
|
-
import {
|
|
10
|
-
failOpenFaissHealth
|
|
11
|
-
} from "./chunk-F4TWWUMP.js";
|
|
12
12
|
|
|
13
13
|
// src/conversation-index/backend.ts
|
|
14
14
|
function createConversationIndexBackend(options) {
|
|
@@ -235,4 +235,4 @@ function createFaissBackend(getFaiss) {
|
|
|
235
235
|
export {
|
|
236
236
|
createConversationIndexBackend
|
|
237
237
|
};
|
|
238
|
-
//# sourceMappingURL=chunk-
|
|
238
|
+
//# sourceMappingURL=chunk-TFA6HPOA.js.map
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
} from "./chunk-5CO5G4MN.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveDefaultNamespaceRoot
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-42JE2CF4.js";
|
|
12
12
|
import {
|
|
13
13
|
StorageManager,
|
|
14
14
|
readRawMemoryDocument
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IB4TDPCC.js";
|
|
16
16
|
import {
|
|
17
17
|
parseContinuityImprovementLoops
|
|
18
18
|
} from "./chunk-LDXUBPMO.js";
|
|
@@ -1869,4 +1869,4 @@ export {
|
|
|
1869
1869
|
defaultTierMigrationCycleBudget,
|
|
1870
1870
|
CompoundingEngine
|
|
1871
1871
|
};
|
|
1872
|
-
//# sourceMappingURL=chunk-
|
|
1872
|
+
//# sourceMappingURL=chunk-UGCLNASV.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-TOTT6S2V.js";
|
|
4
4
|
import {
|
|
5
5
|
isRecallDisclosure
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3IZQFNIV.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeRetrievedMemoryProvenance
|
|
9
9
|
} from "./chunk-I4WBNM3M.js";
|
|
@@ -312,4 +312,4 @@ export {
|
|
|
312
312
|
RecallXrayBuilder,
|
|
313
313
|
summarizeDisclosureTokens
|
|
314
314
|
};
|
|
315
|
-
//# sourceMappingURL=chunk-
|
|
315
|
+
//# sourceMappingURL=chunk-UPYEFL7J.js.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
extractJsonCandidates
|
|
3
|
+
} from "./chunk-YBA52OKG.js";
|
|
4
|
+
|
|
5
|
+
// src/extraction-reply-diagnostic.ts
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
var PAYLOAD_KEYS = ["facts", "entities", "profileUpdates", "questions", "relationships", "identityReflection"];
|
|
8
|
+
var SAFE_NAME = z.string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,31}$/);
|
|
9
|
+
var JsonObject = z.record(z.string(), z.unknown());
|
|
10
|
+
var MAX_TOP_LEVEL_KEYS = 8;
|
|
11
|
+
function looksLikeExtractionResultPayload(parsed) {
|
|
12
|
+
const object = JsonObject.safeParse(parsed);
|
|
13
|
+
return object.success && PAYLOAD_KEYS.some((key) => key in object.data);
|
|
14
|
+
}
|
|
15
|
+
function safeTopLevelKeys(parsed) {
|
|
16
|
+
const object = JsonObject.safeParse(parsed);
|
|
17
|
+
const keys = [];
|
|
18
|
+
if (!object.success) return keys;
|
|
19
|
+
for (const key of Object.keys(object.data)) {
|
|
20
|
+
if (keys.length === MAX_TOP_LEVEL_KEYS) break;
|
|
21
|
+
if (SAFE_NAME.safeParse(key).success) keys.push(key);
|
|
22
|
+
}
|
|
23
|
+
return keys;
|
|
24
|
+
}
|
|
25
|
+
function buildUnusableReplyDiagnostic(content, finishReason, partialFacts) {
|
|
26
|
+
const candidates = extractJsonCandidates(content);
|
|
27
|
+
let parsedAnyJson = false;
|
|
28
|
+
let unrecognizedPayloads = 0;
|
|
29
|
+
let topLevelKeys = [];
|
|
30
|
+
for (const candidate of candidates) {
|
|
31
|
+
let parsed;
|
|
32
|
+
try {
|
|
33
|
+
parsed = JSON.parse(candidate);
|
|
34
|
+
} catch {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (!parsedAnyJson) topLevelKeys = safeTopLevelKeys(parsed);
|
|
38
|
+
parsedAnyJson = true;
|
|
39
|
+
if (!looksLikeExtractionResultPayload(parsed)) unrecognizedPayloads++;
|
|
40
|
+
}
|
|
41
|
+
const reason = SAFE_NAME.safeParse(finishReason);
|
|
42
|
+
return {
|
|
43
|
+
replyChars: content.length,
|
|
44
|
+
finishReason: reason.success ? reason.data : void 0,
|
|
45
|
+
startsWithBrace: content.startsWith("{"),
|
|
46
|
+
jsonCandidates: candidates.length,
|
|
47
|
+
parsedAnyJson,
|
|
48
|
+
unrecognizedPayloads,
|
|
49
|
+
topLevelKeys,
|
|
50
|
+
partialFacts
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function formatUnusableReplyDiagnostic(d) {
|
|
54
|
+
return [
|
|
55
|
+
"extractWithLocalLlm: unusable local reply",
|
|
56
|
+
`replyChars=${d.replyChars}`,
|
|
57
|
+
`finishReason=${d.finishReason ?? "none"}`,
|
|
58
|
+
`startsWithBrace=${d.startsWithBrace}`,
|
|
59
|
+
`jsonCandidates=${d.jsonCandidates}`,
|
|
60
|
+
`parsedAnyJson=${d.parsedAnyJson}`,
|
|
61
|
+
`unrecognizedPayloads=${d.unrecognizedPayloads}`,
|
|
62
|
+
`topLevelKeys=${d.topLevelKeys.join(",")}`,
|
|
63
|
+
`partialFacts=${d.partialFacts}`
|
|
64
|
+
].join(" ");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export {
|
|
68
|
+
looksLikeExtractionResultPayload,
|
|
69
|
+
buildUnusableReplyDiagnostic,
|
|
70
|
+
formatUnusableReplyDiagnostic
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=chunk-V24YLFJW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/extraction-reply-diagnostic.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { extractJsonCandidates } from \"./json-extract.js\";\n\nconst PAYLOAD_KEYS = [\"facts\", \"entities\", \"profileUpdates\", \"questions\", \"relationships\", \"identityReflection\"];\nconst SAFE_NAME = z.string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,31}$/);\nconst JsonObject = z.record(z.string(), z.unknown());\nconst MAX_TOP_LEVEL_KEYS = 8;\n\nexport type JsonValue = z.infer<ReturnType<typeof z.json>>;\n\n/** True when a parsed JSON value is an object carrying at least one extraction-result key. */\nexport function looksLikeExtractionResultPayload(parsed: JsonValue): boolean {\n const object = JsonObject.safeParse(parsed);\n return object.success && PAYLOAD_KEYS.some((key) => key in object.data);\n}\n\n/**\n * Identifier-shaped top-level key names of a parsed object, in insertion order,\n * capped at MAX_TOP_LEVEL_KEYS. Keys failing the identifier shape (emails,\n * long strings, anything that could carry or point at content) are dropped, so\n * the array is safe to log by construction.\n */\nfunction safeTopLevelKeys(parsed: JsonValue): string[] {\n const object = JsonObject.safeParse(parsed);\n const keys: string[] = [];\n if (!object.success) return keys;\n for (const key of Object.keys(object.data)) {\n if (keys.length === MAX_TOP_LEVEL_KEYS) break;\n if (SAFE_NAME.safeParse(key).success) keys.push(key);\n }\n return keys;\n}\n\n/**\n * What an unusable local-LLM extraction reply looked like, without any of its\n * content (the reply may hold user data). Every field is a count, a boolean, or\n * an identifier-shaped name (`finishReason`, JSON key names); anything else is omitted.\n */\nexport interface UnusableReplyDiagnostic {\n replyChars: number;\n finishReason: string | undefined;\n startsWithBrace: boolean;\n /** Candidates the extractor tried; the whole reply counts as one when non-empty. */\n jsonCandidates: number;\n parsedAnyJson: boolean;\n /** Candidates that parsed as JSON but carry no extraction-result key. */\n unrecognizedPayloads: number;\n /** From the first candidate that parsed. */\n topLevelKeys: string[];\n partialFacts: number;\n}\n\n/** `content` is the trimmed reply; `finishReason` is whatever the client recorded (validated here). */\nexport function buildUnusableReplyDiagnostic(\n content: string,\n finishReason: string | undefined,\n partialFacts: number,\n): UnusableReplyDiagnostic {\n const candidates = extractJsonCandidates(content);\n let parsedAnyJson = false;\n let unrecognizedPayloads = 0;\n let topLevelKeys: string[] = [];\n for (const candidate of candidates) {\n let parsed: JsonValue;\n try {\n parsed = JSON.parse(candidate);\n } catch {\n continue;\n }\n if (!parsedAnyJson) topLevelKeys = safeTopLevelKeys(parsed);\n parsedAnyJson = true;\n if (!looksLikeExtractionResultPayload(parsed)) unrecognizedPayloads++;\n }\n const reason = SAFE_NAME.safeParse(finishReason);\n return {\n replyChars: content.length,\n finishReason: reason.success ? reason.data : undefined,\n startsWithBrace: content.startsWith(\"{\"),\n jsonCandidates: candidates.length,\n parsedAnyJson,\n unrecognizedPayloads,\n topLevelKeys,\n partialFacts,\n };\n}\n\n/**\n * Render one greppable warn line from a diagnostic. Only reads fields already\n * reduced to counts, booleans, and validated names, so reply content cannot\n * reach the log through formatting.\n */\nexport function formatUnusableReplyDiagnostic(d: UnusableReplyDiagnostic): string {\n return [\n \"extractWithLocalLlm: unusable local reply\",\n `replyChars=${d.replyChars}`,\n `finishReason=${d.finishReason ?? \"none\"}`,\n `startsWithBrace=${d.startsWithBrace}`,\n `jsonCandidates=${d.jsonCandidates}`,\n `parsedAnyJson=${d.parsedAnyJson}`,\n `unrecognizedPayloads=${d.unrecognizedPayloads}`,\n `topLevelKeys=${d.topLevelKeys.join(\",\")}`,\n `partialFacts=${d.partialFacts}`,\n ].join(\" \");\n}\n"],"mappings":";;;;;AAAA,SAAS,SAAS;AAIlB,IAAM,eAAe,CAAC,SAAS,YAAY,kBAAkB,aAAa,iBAAiB,oBAAoB;AAC/G,IAAM,YAAY,EAAE,OAAO,EAAE,MAAM,+BAA+B;AAClE,IAAM,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;AACnD,IAAM,qBAAqB;AAKpB,SAAS,iCAAiC,QAA4B;AAC3E,QAAM,SAAS,WAAW,UAAU,MAAM;AAC1C,SAAO,OAAO,WAAW,aAAa,KAAK,CAAC,QAAQ,OAAO,OAAO,IAAI;AACxE;AAQA,SAAS,iBAAiB,QAA6B;AACrD,QAAM,SAAS,WAAW,UAAU,MAAM;AAC1C,QAAM,OAAiB,CAAC;AACxB,MAAI,CAAC,OAAO,QAAS,QAAO;AAC5B,aAAW,OAAO,OAAO,KAAK,OAAO,IAAI,GAAG;AAC1C,QAAI,KAAK,WAAW,mBAAoB;AACxC,QAAI,UAAU,UAAU,GAAG,EAAE,QAAS,MAAK,KAAK,GAAG;AAAA,EACrD;AACA,SAAO;AACT;AAsBO,SAAS,6BACd,SACA,cACA,cACyB;AACzB,QAAM,aAAa,sBAAsB,OAAO;AAChD,MAAI,gBAAgB;AACpB,MAAI,uBAAuB;AAC3B,MAAI,eAAyB,CAAC;AAC9B,aAAW,aAAa,YAAY;AAClC,QAAI;AACJ,QAAI;AACF,eAAS,KAAK,MAAM,SAAS;AAAA,IAC/B,QAAQ;AACN;AAAA,IACF;AACA,QAAI,CAAC,cAAe,gBAAe,iBAAiB,MAAM;AAC1D,oBAAgB;AAChB,QAAI,CAAC,iCAAiC,MAAM,EAAG;AAAA,EACjD;AACA,QAAM,SAAS,UAAU,UAAU,YAAY;AAC/C,SAAO;AAAA,IACL,YAAY,QAAQ;AAAA,IACpB,cAAc,OAAO,UAAU,OAAO,OAAO;AAAA,IAC7C,iBAAiB,QAAQ,WAAW,GAAG;AAAA,IACvC,gBAAgB,WAAW;AAAA,IAC3B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAOO,SAAS,8BAA8B,GAAoC;AAChF,SAAO;AAAA,IACL;AAAA,IACA,cAAc,EAAE,UAAU;AAAA,IAC1B,gBAAgB,EAAE,gBAAgB,MAAM;AAAA,IACxC,mBAAmB,EAAE,eAAe;AAAA,IACpC,kBAAkB,EAAE,cAAc;AAAA,IAClC,iBAAiB,EAAE,aAAa;AAAA,IAChC,wBAAwB,EAAE,oBAAoB;AAAA,IAC9C,gBAAgB,EAAE,aAAa,KAAK,GAAG,CAAC;AAAA,IACxC,gBAAgB,EAAE,YAAY;AAAA,EAChC,EAAE,KAAK,GAAG;AACZ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readAllEdges
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BFBS7OFQ.js";
|
|
4
4
|
import {
|
|
5
5
|
readEdgeConfidence
|
|
6
6
|
} from "./chunk-2LSZVONP.js";
|
|
@@ -162,4 +162,4 @@ export {
|
|
|
162
162
|
parseGraphSnapshotSince,
|
|
163
163
|
buildGraphSnapshot
|
|
164
164
|
};
|
|
165
|
-
//# sourceMappingURL=chunk-
|
|
165
|
+
//# sourceMappingURL=chunk-VPEIWMUT.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-B7RWBZXW.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveCausalTrajectoryStoreDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QC2MHZDD.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeRecallTokens
|
|
9
9
|
} from "./chunk-YCVB7X56.js";
|
|
@@ -339,4 +339,4 @@ export {
|
|
|
339
339
|
scoreStitchCandidate,
|
|
340
340
|
stitchCausalChain
|
|
341
341
|
};
|
|
342
|
-
//# sourceMappingURL=chunk-
|
|
342
|
+
//# sourceMappingURL=chunk-W4Q65VJL.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
matchesOfflineSyncDefaultExclude
|
|
3
|
+
} from "./chunk-63LFM77Z.js";
|
|
1
4
|
import {
|
|
2
5
|
EMBEDDING_SHARD_FILE_PATTERN
|
|
3
6
|
} from "./chunk-LDWE7OZS.js";
|
|
@@ -5,9 +8,6 @@ import {
|
|
|
5
8
|
prepareSafeArchiveRoot,
|
|
6
9
|
resolveSafeArchiveTarget
|
|
7
10
|
} from "./chunk-GCGJW34D.js";
|
|
8
|
-
import {
|
|
9
|
-
matchesOfflineSyncDefaultExclude
|
|
10
|
-
} from "./chunk-63LFM77Z.js";
|
|
11
11
|
import {
|
|
12
12
|
EmbeddingIndexFileStore,
|
|
13
13
|
EmbeddingIndexStorageError,
|
|
@@ -16,16 +16,16 @@ import {
|
|
|
16
16
|
shardEntriesForIndex,
|
|
17
17
|
validateShardMembership
|
|
18
18
|
} from "./chunk-SWRRZNHM.js";
|
|
19
|
-
import {
|
|
20
|
-
assertEmbeddingGenerationLockHeld,
|
|
21
|
-
embeddingGenerationLockPath,
|
|
22
|
-
withEmbeddingGenerationLock
|
|
23
|
-
} from "./chunk-XZ66U5M3.js";
|
|
24
19
|
import {
|
|
25
20
|
GENERATION_MARKER_BASENAME,
|
|
26
21
|
beginGenerationMarker,
|
|
27
22
|
completeGenerationMarker
|
|
28
23
|
} from "./chunk-JNA7LFMQ.js";
|
|
24
|
+
import {
|
|
25
|
+
assertEmbeddingGenerationLockHeld,
|
|
26
|
+
embeddingGenerationLockPath,
|
|
27
|
+
withEmbeddingGenerationLock
|
|
28
|
+
} from "./chunk-XZ66U5M3.js";
|
|
29
29
|
import {
|
|
30
30
|
log
|
|
31
31
|
} from "./chunk-3WCASNQZ.js";
|
|
@@ -709,4 +709,4 @@ export {
|
|
|
709
709
|
divergedEmbeddingGenerationDeferrals,
|
|
710
710
|
applyIncomingEmbeddingGenerations
|
|
711
711
|
};
|
|
712
|
-
//# sourceMappingURL=chunk-
|
|
712
|
+
//# sourceMappingURL=chunk-WRGW76LI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/local-llm-helpers.ts"],"sourcesContent":["import type { ResponseFormatJSONSchema } from \"openai/resources/shared\";\nimport type { Agent } from \"undici\";\nimport { log } from \"./logger.js\";\nimport { directProbeDispatcher } from \"./local-llm-transport.js\";\nimport type { LocalLlmRequestPriority } from \"./local-llm.js\";\n\nexport interface LocalLlmChatCompletionOptions {\n temperature?: number;\n maxTokens?: number;\n responseFormat?: { type: string } | ResponseFormatJSONSchema;\n timeoutMs?: number;\n operation?: string;\n forceDisableThinking?: boolean;\n disableThinking?: boolean;\n priority?: LocalLlmRequestPriority;\n signal?: AbortSignal;\n redactProviderErrors?: boolean;\n /** Per-request model; defaults to config.localLlmModel. */\n model?: string;\n /**\n * Optional out-box for the terminal failure cause (issue #2891): on a\n * failed request the client records the last provider error here so\n * callers can classify it (e.g. HTTP 429 → rate-limited) in memory\n * instead of seeing only null. Never logged.\n */\n failureDiag?: { lastError?: unknown; finishReason?: string };\n}\n\nexport interface LocalLlmChatCompletionResult {\n content: string;\n usage?: { promptTokens: number; completionTokens: number; totalTokens: number };\n}\nexport function isAbortError(err: unknown): boolean {\n if (!err || typeof err !== \"object\") return false;\n const maybe = err as { name?: string; message?: string };\n return (\n maybe.name === \"AbortError\" ||\n maybe.message === \"This operation was aborted\" ||\n maybe.message === \"The operation was aborted\"\n );\n}\n\n/** Caller signal combined with a client-wide shutdown signal, so a daemon\n * stop aborts in-flight requests and retry loops at once — even for\n * callers that pass no signal of their own. */\nexport function combineClientAbortSignals(\n caller: AbortSignal | undefined,\n shutdown: AbortSignal | undefined,\n): AbortSignal | undefined {\n if (shutdown === undefined) return caller;\n if (caller === undefined) return shutdown;\n return AbortSignal.any([caller, shutdown]);\n}\n\nexport function waitForRetryBackoff(backoffMs: number, signal?: AbortSignal): Promise<boolean> {\n return new Promise((resolve) => {\n let settled = false;\n let timer: NodeJS.Timeout | undefined;\n const onAbort = (): void => {\n if (settled) return;\n settled = true;\n if (timer) clearTimeout(timer);\n signal?.removeEventListener(\"abort\", onAbort);\n resolve(false);\n };\n const onTimer = (): void => {\n if (settled) return;\n settled = true;\n signal?.removeEventListener(\"abort\", onAbort);\n resolve(true);\n };\n timer = setTimeout(onTimer, backoffMs);\n if (signal) {\n if (signal.aborted) onAbort();\n else signal.addEventListener(\"abort\", onAbort, { once: true });\n }\n });\n}\n\nexport function normalizeBackendTripReason(reason: string): string {\n const cleaned = reason.replace(/\\s+/g, \" \").replace(/^[-:–—\\s]+/, \"\").trim();\n if (!cleaned) return \"unknown local backend failure\";\n return cleaned.length > 160 ? `${cleaned.slice(0, 157)}...` : cleaned;\n}\n\nexport function extractNonRecoverableBackendReason(reason: string): string | null {\n const match = reason.match(\n /Failed to load model|Library not loaded|different Team IDs|code signature|llm_engine_mlx_amphibian/i,\n );\n return match?.[0] ?? null;\n}\n\nexport function extractNonRecoverableBackendReasonFromErrorText(errorText: string): string | null {\n const directReason = extractNonRecoverableBackendReason(errorText);\n if (directReason) return directReason;\n try {\n const parsed = JSON.parse(errorText) as { error?: { message?: string } };\n return extractNonRecoverableBackendReason(parsed?.error?.message ?? \"\");\n } catch {\n return null;\n }\n}\n\n/**\n * Flatten a fetch rejection into one line, including the `cause` undici hides\n * the real reason behind (`fetch failed` alone says nothing).\n */\nexport function describeFetchFailure(err: unknown): string {\n const name = err instanceof Error ? err.name : \"\";\n const message = err instanceof Error ? err.message : String(err);\n const cause: unknown = err instanceof Error ? (err as Error & { cause?: unknown }).cause : undefined;\n const causeText = cause instanceof Error\n ? ` (cause: ${cause.name}: ${cause.message}${\n typeof (cause as Error & { code?: unknown }).code === \"string\"\n ? ` [${String((cause as Error & { code?: unknown }).code)}]`\n : \"\"\n })`\n : cause === undefined\n ? \"\"\n : ` (cause: ${String(cause)})`;\n return `${name ? `${name}: ` : \"\"}${message}${causeText}`;\n}\n\n/**\n * What to record when every availability probe failed.\n *\n * A probe that TIMED OUT is not evidence the backend is down: the budget is a\n * fixed 2s and a busy event loop can burn it before the socket is scheduled,\n * so the backend looks dead while it answers other callers in single-digit ms.\n * Caching that verdict took extraction offline for a whole health-check\n * interval at a time (issue #2210), so a timeout leaves availability UNKNOWN —\n * this call fails, the next one re-probes instead of reading a stale false.\n *\n * A backend that ANSWERED and said no is a real verdict and stays cached, or\n * the daemon re-probes a known-bad endpoint on every request.\n */\nexport function resolveUnavailableVerdict(args: {\n baseUrl: string;\n sawAbortedProbe: boolean;\n wasAvailable: boolean | null;\n}): { cacheVerdict: boolean; warning: string | null } {\n if (args.sawAbortedProbe) {\n return {\n cacheVerdict: false,\n warning:\n `local LLM availability probe timed out at ${args.baseUrl} (event loop busy?); treating availability as ` +\n \"unknown and re-probing on the next request rather than marking the backend down\",\n };\n }\n return {\n cacheVerdict: true,\n // Surfaced at warn, not debug: extraction stops silently when this flips,\n // and the daemon emits no debug at all unless configured for it.\n warning: args.wasAvailable !== false ? `local LLM became unavailable at ${args.baseUrl}` : null,\n };\n}\n\nexport interface ProbeFetchResult {\n ok: boolean;\n data: unknown;\n status: number | null;\n /** The probe hit its own budget rather than getting an answer. */\n aborted?: boolean;\n}\n\n/**\n * One health-probe request.\n *\n * Every failure is logged with its cause: a transport error and a 404 both\n * returned `ok: false` with nothing recorded, so an unreachable backend was\n * indistinguishable from a wrong path and an availability failure had no\n * diagnosable reason at all (§22, issue #2210).\n */\nexport async function probeFetch(\n url: string,\n options: { timeoutMs: number; headers: Record<string, string>; signal?: AbortSignal },\n): Promise<ProbeFetchResult> {\n const controller = new AbortController();\n const requestSignal = options.signal\n ? AbortSignal.any([options.signal, controller.signal])\n : controller.signal;\n const timeout = setTimeout(() => controller.abort(), options.timeoutMs);\n try {\n const init: RequestInit & { dispatcher?: Agent } = { signal: requestSignal, headers: options.headers };\n const dispatcher = directProbeDispatcher();\n if (dispatcher) init.dispatcher = dispatcher;\n const response = await fetch(url, init);\n clearTimeout(timeout);\n if (!response.ok) {\n log.debug(`local LLM probe: ${url} returned HTTP ${response.status}`);\n return { ok: false, data: null, status: response.status };\n }\n const contentType = response.headers.get(\"content-type\");\n const data = contentType?.includes(\"application/json\") ? await response.json() : await response.text();\n return { ok: true, data, status: response.status };\n } catch (err) {\n clearTimeout(timeout);\n const aborted = isAbortError(err);\n log.debug(\n `local LLM probe: ${url} ${aborted ? `timed out after ${options.timeoutMs}ms` : \"failed\"}: ${describeFetchFailure(err)}`,\n );\n return { ok: false, data: null, status: null, aborted };\n }\n}\n\ninterface PendingProbe {\n promise: Promise<boolean>;\n controller: AbortController;\n /** Callers still awaiting this sequence; at zero the sequence is aborted. */\n waiters: number;\n}\n\n/**\n * Collapses concurrent probe sequences onto one in-flight run.\n *\n * A timed-out availability probe deliberately caches nothing (issue #2210),\n * which removed the false verdict that used to absorb concurrent callers:\n * every queued request would then run its own full probe sequence, on a host\n * already slow enough to blow the probe budget.\n *\n * Cancellation is refcounted rather than shared: one caller walking away must\n * not abort a sequence the others are still waiting on, so the underlying task\n * is aborted only once every waiter has gone.\n */\nexport class SingleFlightProbe {\n private pending: PendingProbe | null = null;\n\n run(task: (signal: AbortSignal) => Promise<boolean>, signal?: AbortSignal): Promise<boolean> {\n let active = this.pending;\n if (!active) {\n const controller = new AbortController();\n const created: PendingProbe = { promise: Promise.resolve(false), controller, waiters: 0 };\n created.promise = task(controller.signal).finally(() => {\n if (this.pending === created) this.pending = null;\n });\n this.pending = created;\n active = created;\n }\n const entry = active;\n entry.waiters += 1;\n let released = false;\n const release = () => {\n if (released) return;\n released = true;\n entry.waiters -= 1;\n if (entry.waiters > 0) return;\n // Detach BEFORE aborting. `pending` would otherwise still point at this\n // doomed entry until the task's own `finally` runs a microtask later, and\n // a caller arriving in that window would join an aborted sequence and\n // read its `false` as a verdict.\n if (this.pending === entry) this.pending = null;\n entry.controller.abort();\n };\n if (!signal) return entry.promise.finally(release);\n return new Promise<boolean>((resolve, reject) => {\n const onAbort = () => {\n release();\n resolve(false);\n };\n signal.addEventListener(\"abort\", onAbort, { once: true });\n entry.promise.then(\n (value) => {\n signal.removeEventListener(\"abort\", onAbort);\n release();\n resolve(value);\n },\n (err: unknown) => {\n signal.removeEventListener(\"abort\", onAbort);\n release();\n reject(err instanceof Error ? err : new Error(String(err)));\n },\n );\n });\n }\n}\n"],"mappings":";;;;;;;;AAgCO,SAAS,aAAa,KAAuB;AAClD,MAAI,CAAC,OAAO,OAAO,QAAQ,SAAU,QAAO;AAC5C,QAAM,QAAQ;AACd,SACE,MAAM,SAAS,gBACf,MAAM,YAAY,gCAClB,MAAM,YAAY;AAEtB;AAKO,SAAS,0BACd,QACA,UACyB;AACzB,MAAI,aAAa,OAAW,QAAO;AACnC,MAAI,WAAW,OAAW,QAAO;AACjC,SAAO,YAAY,IAAI,CAAC,QAAQ,QAAQ,CAAC;AAC3C;AAEO,SAAS,oBAAoB,WAAmB,QAAwC;AAC7F,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,QAAI,UAAU;AACd,QAAI;AACJ,UAAM,UAAU,MAAY;AAC1B,UAAI,QAAS;AACb,gBAAU;AACV,UAAI,MAAO,cAAa,KAAK;AAC7B,cAAQ,oBAAoB,SAAS,OAAO;AAC5C,cAAQ,KAAK;AAAA,IACf;AACA,UAAM,UAAU,MAAY;AAC1B,UAAI,QAAS;AACb,gBAAU;AACV,cAAQ,oBAAoB,SAAS,OAAO;AAC5C,cAAQ,IAAI;AAAA,IACd;AACA,YAAQ,WAAW,SAAS,SAAS;AACrC,QAAI,QAAQ;AACV,UAAI,OAAO,QAAS,SAAQ;AAAA,UACvB,QAAO,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK,CAAC;AAAA,IAC/D;AAAA,EACF,CAAC;AACH;AAEO,SAAS,2BAA2B,QAAwB;AACjE,QAAM,UAAU,OAAO,QAAQ,QAAQ,GAAG,EAAE,QAAQ,cAAc,EAAE,EAAE,KAAK;AAC3E,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,QAAQ,SAAS,MAAM,GAAG,QAAQ,MAAM,GAAG,GAAG,CAAC,QAAQ;AAChE;AAEO,SAAS,mCAAmC,QAA+B;AAChF,QAAM,QAAQ,OAAO;AAAA,IACnB;AAAA,EACF;AACA,SAAO,QAAQ,CAAC,KAAK;AACvB;AAEO,SAAS,gDAAgD,WAAkC;AAChG,QAAM,eAAe,mCAAmC,SAAS;AACjE,MAAI,aAAc,QAAO;AACzB,MAAI;AACF,UAAM,SAAS,KAAK,MAAM,SAAS;AACnC,WAAO,mCAAmC,QAAQ,OAAO,WAAW,EAAE;AAAA,EACxE,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAMO,SAAS,qBAAqB,KAAsB;AACzD,QAAM,OAAO,eAAe,QAAQ,IAAI,OAAO;AAC/C,QAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC/D,QAAM,QAAiB,eAAe,QAAS,IAAoC,QAAQ;AAC3F,QAAM,YAAY,iBAAiB,QAC/B,YAAY,MAAM,IAAI,KAAK,MAAM,OAAO,GACxC,OAAQ,MAAqC,SAAS,WAClD,KAAK,OAAQ,MAAqC,IAAI,CAAC,MACvD,EACN,MACE,UAAU,SACR,KACA,YAAY,OAAO,KAAK,CAAC;AAC/B,SAAO,GAAG,OAAO,GAAG,IAAI,OAAO,EAAE,GAAG,OAAO,GAAG,SAAS;AACzD;AAeO,SAAS,0BAA0B,MAIY;AACpD,MAAI,KAAK,iBAAiB;AACxB,WAAO;AAAA,MACL,cAAc;AAAA,MACd,SACE,6CAA6C,KAAK,OAAO;AAAA,IAE7D;AAAA,EACF;AACA,SAAO;AAAA,IACL,cAAc;AAAA;AAAA;AAAA,IAGd,SAAS,KAAK,iBAAiB,QAAQ,mCAAmC,KAAK,OAAO,KAAK;AAAA,EAC7F;AACF;AAkBA,eAAsB,WACpB,KACA,SAC2B;AAC3B,QAAM,aAAa,IAAI,gBAAgB;AACvC,QAAM,gBAAgB,QAAQ,SAC1B,YAAY,IAAI,CAAC,QAAQ,QAAQ,WAAW,MAAM,CAAC,IACnD,WAAW;AACf,QAAM,UAAU,WAAW,MAAM,WAAW,MAAM,GAAG,QAAQ,SAAS;AACtE,MAAI;AACF,UAAM,OAA6C,EAAE,QAAQ,eAAe,SAAS,QAAQ,QAAQ;AACrG,UAAM,aAAa,sBAAsB;AACzC,QAAI,WAAY,MAAK,aAAa;AAClC,UAAM,WAAW,MAAM,MAAM,KAAK,IAAI;AACtC,iBAAa,OAAO;AACpB,QAAI,CAAC,SAAS,IAAI;AAChB,UAAI,MAAM,oBAAoB,GAAG,kBAAkB,SAAS,MAAM,EAAE;AACpE,aAAO,EAAE,IAAI,OAAO,MAAM,MAAM,QAAQ,SAAS,OAAO;AAAA,IAC1D;AACA,UAAM,cAAc,SAAS,QAAQ,IAAI,cAAc;AACvD,UAAM,OAAO,aAAa,SAAS,kBAAkB,IAAI,MAAM,SAAS,KAAK,IAAI,MAAM,SAAS,KAAK;AACrG,WAAO,EAAE,IAAI,MAAM,MAAM,QAAQ,SAAS,OAAO;AAAA,EACnD,SAAS,KAAK;AACZ,iBAAa,OAAO;AACpB,UAAM,UAAU,aAAa,GAAG;AAChC,QAAI;AAAA,MACF,oBAAoB,GAAG,IAAI,UAAU,mBAAmB,QAAQ,SAAS,OAAO,QAAQ,KAAK,qBAAqB,GAAG,CAAC;AAAA,IACxH;AACA,WAAO,EAAE,IAAI,OAAO,MAAM,MAAM,QAAQ,MAAM,QAAQ;AAAA,EACxD;AACF;AAqBO,IAAM,oBAAN,MAAwB;AAAA,EACrB,UAA+B;AAAA,EAEvC,IAAI,MAAiD,QAAwC;AAC3F,QAAI,SAAS,KAAK;AAClB,QAAI,CAAC,QAAQ;AACX,YAAM,aAAa,IAAI,gBAAgB;AACvC,YAAM,UAAwB,EAAE,SAAS,QAAQ,QAAQ,KAAK,GAAG,YAAY,SAAS,EAAE;AACxF,cAAQ,UAAU,KAAK,WAAW,MAAM,EAAE,QAAQ,MAAM;AACtD,YAAI,KAAK,YAAY,QAAS,MAAK,UAAU;AAAA,MAC/C,CAAC;AACD,WAAK,UAAU;AACf,eAAS;AAAA,IACX;AACA,UAAM,QAAQ;AACd,UAAM,WAAW;AACjB,QAAI,WAAW;AACf,UAAM,UAAU,MAAM;AACpB,UAAI,SAAU;AACd,iBAAW;AACX,YAAM,WAAW;AACjB,UAAI,MAAM,UAAU,EAAG;AAKvB,UAAI,KAAK,YAAY,MAAO,MAAK,UAAU;AAC3C,YAAM,WAAW,MAAM;AAAA,IACzB;AACA,QAAI,CAAC,OAAQ,QAAO,MAAM,QAAQ,QAAQ,OAAO;AACjD,WAAO,IAAI,QAAiB,CAAC,SAAS,WAAW;AAC/C,YAAM,UAAU,MAAM;AACpB,gBAAQ;AACR,gBAAQ,KAAK;AAAA,MACf;AACA,aAAO,iBAAiB,SAAS,SAAS,EAAE,MAAM,KAAK,CAAC;AACxD,YAAM,QAAQ;AAAA,QACZ,CAAC,UAAU;AACT,iBAAO,oBAAoB,SAAS,OAAO;AAC3C,kBAAQ;AACR,kBAAQ,KAAK;AAAA,QACf;AAAA,QACA,CAAC,QAAiB;AAChB,iBAAO,oBAAoB,SAAS,OAAO;AAC3C,kBAAQ;AACR,iBAAO,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;AAAA,QAC5D;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
applyChangesetEmbeddingGenerations,
|
|
29
29
|
normalizeChangesetGenerations
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-EFHM4VDG.js";
|
|
31
31
|
import {
|
|
32
32
|
advanceEmbeddingGenerationMarker,
|
|
33
33
|
applyIncomingEmbeddingGenerations,
|
|
@@ -37,7 +37,11 @@ import {
|
|
|
37
37
|
embeddingGenerationMembership,
|
|
38
38
|
isEmbeddingGenerationDirPath,
|
|
39
39
|
isPathInOmittedEmbeddingGeneration
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-WRGW76LI.js";
|
|
41
|
+
import {
|
|
42
|
+
isEmbeddingGenerationMarkerPath,
|
|
43
|
+
matchesOfflineSyncDefaultExclude
|
|
44
|
+
} from "./chunk-63LFM77Z.js";
|
|
41
45
|
import {
|
|
42
46
|
isCanonicalRuntimeStatePath,
|
|
43
47
|
shouldDeleteAbsentIncomingOfflineRuntimeFile,
|
|
@@ -49,10 +53,6 @@ import {
|
|
|
49
53
|
sha256Bytes,
|
|
50
54
|
validateArchiveRelativePath
|
|
51
55
|
} from "./chunk-GCGJW34D.js";
|
|
52
|
-
import {
|
|
53
|
-
isEmbeddingGenerationMarkerPath,
|
|
54
|
-
matchesOfflineSyncDefaultExclude
|
|
55
|
-
} from "./chunk-63LFM77Z.js";
|
|
56
56
|
import {
|
|
57
57
|
withEmbeddingGenerationLock,
|
|
58
58
|
withEmbeddingGenerationLockIter
|
|
@@ -1847,4 +1847,4 @@ export {
|
|
|
1847
1847
|
normalizeOfflineSyncState,
|
|
1848
1848
|
fileStatesFromSnapshot
|
|
1849
1849
|
};
|
|
1850
|
-
//# sourceMappingURL=chunk-
|
|
1850
|
+
//# sourceMappingURL=chunk-WYABF2WA.js.map
|
|
@@ -11,6 +11,14 @@ var BufferAdmissionRefusedError = class extends Error {
|
|
|
11
11
|
this.name = "BufferAdmissionRefusedError";
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
+
var BufferSessionTurnRefusedError = class extends Error {
|
|
15
|
+
constructor(bufferKey, maxTurnsPerSession) {
|
|
16
|
+
super(
|
|
17
|
+
`buffer[${bufferKey}]: live capture refused at the per-session turn cap (${maxTurnsPerSession}); retained backlog is not evicted to admit new turns. Retry after extraction drains the session`
|
|
18
|
+
);
|
|
19
|
+
this.name = "BufferSessionTurnRefusedError";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
14
22
|
var ReplayAdmissionRefusedError = class extends Error {
|
|
15
23
|
constructor(message) {
|
|
16
24
|
super(message);
|
|
@@ -31,8 +39,9 @@ function canAdmitNewEntryUnlocked(entries, bufferKey, maxSessionEntries, hooks)
|
|
|
31
39
|
|
|
32
40
|
export {
|
|
33
41
|
BufferAdmissionRefusedError,
|
|
42
|
+
BufferSessionTurnRefusedError,
|
|
34
43
|
ReplayAdmissionRefusedError,
|
|
35
44
|
StorageTargetRequiredError,
|
|
36
45
|
canAdmitNewEntryUnlocked
|
|
37
46
|
};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
47
|
+
//# sourceMappingURL=chunk-XAIRTELU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/buffer-admission.ts"],"sourcesContent":["/** Buffer session-entry admission: refusal errors and the live-admission probe. */\n\nimport { selectEvictedBufferKeys, type BufferEvictionHooks } from \"./buffer-eviction.js\";\nimport type { BufferEntryState } from \"./types.js\";\n\n/**\n * Raised when a NEW live-capture session cannot be admitted because the\n * session-entry cap is full of non-evictable backlog. The turn was never\n * accepted; the request is retryable once extraction drains an entry.\n */\nexport class BufferAdmissionRefusedError extends Error {\n constructor(bufferKey: string, maxSessionEntries: number) {\n super(\n `buffer[${bufferKey}]: live capture refused at the session-entry cap (${maxSessionEntries}); ` +\n \"buffered backlog is no longer evicted to admit new sessions. Retry after extraction frees an entry\",\n );\n this.name = \"BufferAdmissionRefusedError\";\n }\n}\n\n/**\n * Raised when live capture targets an EXISTING session whose retained turns\n * already reach the per-session cap. The turn was never accepted and no\n * buffered turn is dropped; the request is retryable once extraction drains\n * the session. Companion to the session-entry cap above (#3415 bound).\n */\nexport class BufferSessionTurnRefusedError extends Error {\n constructor(bufferKey: string, maxTurnsPerSession: number) {\n super(\n `buffer[${bufferKey}]: live capture refused at the per-session turn cap (${maxTurnsPerSession}); ` +\n \"retained backlog is not evicted to admit new turns. Retry after extraction drains the session\",\n );\n this.name = \"BufferSessionTurnRefusedError\";\n }\n}\n\n/** Durable observe capture refused at the entry cap; the request is retryable. */\nexport class ReplayAdmissionRefusedError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ReplayAdmissionRefusedError\";\n }\n}\n\n/**\n * Durable observe capture rejected because the request resolves to no storage\n * target (namespaces ON with neither writeNamespaceOverride nor a plan's\n * writeNamespace). A property of the request — retrying cannot fix it — so it\n * must never be classified as retryable backpressure.\n */\nexport class StorageTargetRequiredError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"StorageTargetRequiredError\";\n }\n}\n\n/**\n * Live-admission bound (#1908 policy, backlog-safe): a NEW session enters\n * only while under the cap or when an EMPTY entry can be reclaimed. Buffered\n * backlog is never dropped for a live capture; the caller refuses instead.\n */\nexport function canAdmitNewEntryUnlocked(\n entries: Readonly<Record<string, BufferEntryState>>,\n bufferKey: string,\n maxSessionEntries: number,\n hooks: BufferEvictionHooks,\n): boolean {\n const count = Object.keys(entries).length;\n if (count < maxSessionEntries) return true;\n // Probe post-admission (as if this key had landed): admission is safe\n // exactly when an EMPTY entry could then be reclaimed.\n return selectEvictedBufferKeys(entries, [bufferKey], Math.max(0, count - 1), hooks).length > 0;\n}\n"],"mappings":";;;;;AAUO,IAAM,8BAAN,cAA0C,MAAM;AAAA,EACrD,YAAY,WAAmB,mBAA2B;AACxD;AAAA,MACE,UAAU,SAAS,qDAAqD,iBAAiB;AAAA,IAE3F;AACA,SAAK,OAAO;AAAA,EACd;AACF;AAQO,IAAM,gCAAN,cAA4C,MAAM;AAAA,EACvD,YAAY,WAAmB,oBAA4B;AACzD;AAAA,MACE,UAAU,SAAS,wDAAwD,kBAAkB;AAAA,IAE/F;AACA,SAAK,OAAO;AAAA,EACd;AACF;AAGO,IAAM,8BAAN,cAA0C,MAAM;AAAA,EACrD,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;AAQO,IAAM,6BAAN,cAAyC,MAAM;AAAA,EACpD,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;AAOO,SAAS,yBACd,SACA,WACA,mBACA,OACS;AACT,QAAM,QAAQ,OAAO,KAAK,OAAO,EAAE;AACnC,MAAI,QAAQ,kBAAmB,QAAO;AAGtC,SAAO,wBAAwB,SAAS,CAAC,SAAS,GAAG,KAAK,IAAI,GAAG,QAAQ,CAAC,GAAG,KAAK,EAAE,SAAS;AAC/F;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDefaultNamespaceRoot
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-42JE2CF4.js";
|
|
4
4
|
import {
|
|
5
5
|
StorageManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IB4TDPCC.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveNamespaceCapabilities
|
|
9
9
|
} from "./chunk-C5LWPYS3.js";
|
|
@@ -779,4 +779,4 @@ export {
|
|
|
779
779
|
LOCATION_SYNC_DEFAULT_INTERVAL_MS,
|
|
780
780
|
startLocationAutoSync
|
|
781
781
|
};
|
|
782
|
-
//# sourceMappingURL=chunk-
|
|
782
|
+
//# sourceMappingURL=chunk-XLHLZALR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listNamespaces
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4VCASS3Q.js";
|
|
4
4
|
import {
|
|
5
5
|
corpusScanWorker
|
|
6
6
|
} from "./chunk-4LZ7SVKM.js";
|
|
@@ -292,4 +292,4 @@ export {
|
|
|
292
292
|
computeServiceCorpusWatermarks,
|
|
293
293
|
computeServiceCorpusCensus
|
|
294
294
|
};
|
|
295
|
-
//# sourceMappingURL=chunk-
|
|
295
|
+
//# sourceMappingURL=chunk-XN43HAIV.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-GZFKCLRC.js";
|
|
11
11
|
import {
|
|
12
12
|
StorageManager
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IB4TDPCC.js";
|
|
14
14
|
import {
|
|
15
15
|
normalizeEntityName
|
|
16
16
|
} from "./chunk-YXZG5TVN.js";
|
|
@@ -974,4 +974,4 @@ export {
|
|
|
974
974
|
resolveBriefingSaveDir,
|
|
975
975
|
briefingFilename
|
|
976
976
|
};
|
|
977
|
-
//# sourceMappingURL=chunk-
|
|
977
|
+
//# sourceMappingURL=chunk-YJEOQ72B.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
headerConnector,
|
|
7
7
|
renderExtractionConversation,
|
|
8
8
|
resolveSourceConnector
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QF64W4YM.js";
|
|
10
10
|
import {
|
|
11
11
|
normalizeReasoningTrace
|
|
12
12
|
} from "./chunk-54V4BZWP.js";
|
|
@@ -38,7 +38,10 @@ import {
|
|
|
38
38
|
buildSpanMaterializeTurns,
|
|
39
39
|
stripUntrustedFactSpans,
|
|
40
40
|
truncateLocalExtractionConversation
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-FZVROZKC.js";
|
|
42
|
+
import {
|
|
43
|
+
attachExtractionProvenance
|
|
44
|
+
} from "./chunk-D3ZKHLN2.js";
|
|
42
45
|
import {
|
|
43
46
|
containsExtractionPlaceholder,
|
|
44
47
|
extractionAttributes,
|
|
@@ -47,15 +50,17 @@ import {
|
|
|
47
50
|
isPlainRecord
|
|
48
51
|
} from "./chunk-BVRZSI7Q.js";
|
|
49
52
|
import {
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
buildUnusableReplyDiagnostic,
|
|
54
|
+
formatUnusableReplyDiagnostic,
|
|
55
|
+
looksLikeExtractionResultPayload
|
|
56
|
+
} from "./chunk-V24YLFJW.js";
|
|
52
57
|
import {
|
|
53
58
|
LocalLlmRejectedError,
|
|
54
59
|
classifyExtractionThrownError,
|
|
55
60
|
classifyFallbackParseFailure,
|
|
56
61
|
formatExtractionParseFailureLog,
|
|
57
62
|
localRejectionStatus
|
|
58
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-IFFCHE3O.js";
|
|
59
64
|
import {
|
|
60
65
|
delinearize
|
|
61
66
|
} from "./chunk-VEWZZM3H.js";
|
|
@@ -66,7 +71,7 @@ import {
|
|
|
66
71
|
} from "./chunk-7G5NTS7F.js";
|
|
67
72
|
import {
|
|
68
73
|
LocalLlmClient
|
|
69
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-ASINXIKX.js";
|
|
70
75
|
import {
|
|
71
76
|
CONSOLIDATION_RESPONSE_SCHEMA,
|
|
72
77
|
CUE_ANCHOR_PROMPT_INSTRUCTION,
|
|
@@ -344,9 +349,6 @@ var ExtractionEngine = class {
|
|
|
344
349
|
hasExtractionOutputs(result) {
|
|
345
350
|
return result.facts.length > 0 || result.entities.length > 0 || result.questions.length > 0 || result.profileUpdates.length > 0 || (result.relationships?.length ?? 0) > 0;
|
|
346
351
|
}
|
|
347
|
-
looksLikeExtractionResultPayload(parsed) {
|
|
348
|
-
return !!parsed && typeof parsed === "object" && !Array.isArray(parsed) && ("facts" in parsed || "entities" in parsed || "profileUpdates" in parsed || "questions" in parsed || "relationships" in parsed || "identityReflection" in parsed);
|
|
349
|
-
}
|
|
350
352
|
normalizeExtractionResultPayload(parsed) {
|
|
351
353
|
const entities = Array.isArray(parsed?.entities) ? parsed.entities.map((candidate) => this.normalizeEntityUpdate(candidate)).filter((entity) => entity !== void 0 && entity.name.length > 0) : [];
|
|
352
354
|
const facts = Array.isArray(parsed?.facts) ? parsed.facts.map((candidate) => {
|
|
@@ -1292,7 +1294,10 @@ ${truncatedConversation}`;
|
|
|
1292
1294
|
);
|
|
1293
1295
|
if (!response?.content) {
|
|
1294
1296
|
const rejected = localRejectionStatus(failureDiag);
|
|
1295
|
-
if (rejected !== void 0)
|
|
1297
|
+
if (rejected !== void 0) {
|
|
1298
|
+
log.warn(formatUnusableReplyDiagnostic(buildUnusableReplyDiagnostic("", failureDiag.finishReason, 0)));
|
|
1299
|
+
throw new LocalLlmRejectedError(rejected);
|
|
1300
|
+
}
|
|
1296
1301
|
log.debug("extractWithLocalLlm: chatCompletion returned null or empty content");
|
|
1297
1302
|
return null;
|
|
1298
1303
|
}
|
|
@@ -1302,7 +1307,7 @@ ${truncatedConversation}`;
|
|
|
1302
1307
|
try {
|
|
1303
1308
|
log.debug(`extractWithLocalLlm: attempting JSON parse, candidate length=${candidate.length}`);
|
|
1304
1309
|
const parsed = JSON.parse(candidate);
|
|
1305
|
-
if (!
|
|
1310
|
+
if (!looksLikeExtractionResultPayload(parsed)) {
|
|
1306
1311
|
continue;
|
|
1307
1312
|
}
|
|
1308
1313
|
const result = this.normalizeExtractionResultPayload(parsed);
|
|
@@ -1319,6 +1324,7 @@ ${truncatedConversation}`;
|
|
|
1319
1324
|
log.debug(`extractWithLocalLlm: extracted ${partial.facts.length} partial facts from truncated JSON`);
|
|
1320
1325
|
return partial;
|
|
1321
1326
|
}
|
|
1327
|
+
log.warn(formatUnusableReplyDiagnostic(buildUnusableReplyDiagnostic(content, failureDiag.finishReason, partial.facts.length)));
|
|
1322
1328
|
throw new LocalLlmRejectedError();
|
|
1323
1329
|
}
|
|
1324
1330
|
/**
|
|
@@ -2443,4 +2449,4 @@ export {
|
|
|
2443
2449
|
shouldEnableLocalExtractionThinking,
|
|
2444
2450
|
ExtractionEngine
|
|
2445
2451
|
};
|
|
2446
|
-
//# sourceMappingURL=chunk-
|
|
2452
|
+
//# sourceMappingURL=chunk-YKUW2EZF.js.map
|