@remnic/core 10.0.194 → 10.0.196
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 +65 -66
- package/dist/access-cli.js +65 -66
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.js +2 -2
- package/dist/access-extraction-force-flush-preempt.js +65 -66
- package/dist/access-extraction-force-flush.js +65 -66
- package/dist/access-http-briefing.js +65 -66
- package/dist/access-http-query.js +65 -66
- package/dist/access-http.js +65 -66
- package/dist/access-identity-continuity-surface.js +65 -66
- package/dist/access-lcm-surface.js +65 -66
- package/dist/access-mcp.d.ts.map +1 -1
- package/dist/access-mcp.js +65 -66
- package/dist/access-observe-write-category.js +2 -2
- package/dist/access-observe-write-surface.js +65 -66
- package/dist/access-operations-batch.js +65 -66
- package/dist/access-operations.js +65 -66
- package/dist/access-recall-concurrency.d.ts +4 -0
- package/dist/access-recall-concurrency.d.ts.map +1 -1
- package/dist/access-recall-concurrency.js +65 -66
- package/dist/access-recall-diagnostics.js +2 -2
- package/dist/access-recall-response.d.ts.map +1 -1
- package/dist/access-recall-response.js +65 -66
- package/dist/access-recall-surface.d.ts.map +1 -1
- package/dist/access-recall-surface.js +65 -66
- package/dist/access-schema.d.ts +1 -0
- package/dist/access-schema.d.ts.map +1 -1
- package/dist/access-schema.js +1 -1
- package/dist/access-service.d.ts.map +1 -1
- package/dist/access-service.js +65 -66
- package/dist/active-recall.js +7 -6
- package/dist/active-recall.js.map +1 -1
- package/dist/{auto-sync-BJUAGKI5.js → auto-sync-BEW65FDT.js} +6 -5
- package/dist/{auto-sync-BJUAGKI5.js.map → auto-sync-BEW65FDT.js.map} +1 -1
- package/dist/briefing.js +7 -6
- package/dist/buffer.d.ts +1 -0
- package/dist/buffer.d.ts.map +1 -1
- package/dist/buffer.js +3 -3
- package/dist/calibration.js +5 -4
- package/dist/calibration.js.map +1 -1
- package/dist/causal-consolidation.js +8 -7
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/{chunk-FZU62GIV.js → chunk-2X5I5C3M.js} +27 -10
- package/dist/chunk-2X5I5C3M.js.map +1 -0
- package/dist/{chunk-F2MVWUNF.js → chunk-374E2HYZ.js} +10 -2
- package/dist/chunk-374E2HYZ.js.map +1 -0
- package/dist/{chunk-3ZS3NUEI.js → chunk-3DSLTUK6.js} +2 -2
- package/dist/{chunk-DYUPSTCV.js → chunk-3EXG2KPK.js} +3 -3
- package/dist/{chunk-FGFU6J26.js → chunk-4FTYKZ77.js} +3 -3
- package/dist/{chunk-QIPRDRGM.js → chunk-4HEJDVPU.js} +1 -1
- package/dist/chunk-4HEJDVPU.js.map +1 -0
- package/dist/{chunk-EEA2RM4B.js → chunk-4I6A3SDL.js} +2 -2
- package/dist/{chunk-SKJM4PKE.js → chunk-4JI5PPFW.js} +2 -2
- package/dist/{chunk-TDG5NZAZ.js → chunk-65JA7LWV.js} +2 -2
- package/dist/{chunk-3YID7KZ6.js → chunk-6QMKUWXH.js} +2 -2
- package/dist/{chunk-7SOKOEAZ.js → chunk-6RRHTHKQ.js} +2 -2
- package/dist/{chunk-VHQNJW4Q.js → chunk-6W62D4MC.js} +2 -2
- package/dist/{chunk-CRS2NY44.js → chunk-7O6H7BPW.js} +2 -2
- package/dist/{chunk-VSLV3EEP.js → chunk-7TK5Q6LQ.js} +112 -81
- package/dist/chunk-7TK5Q6LQ.js.map +1 -0
- package/dist/{chunk-NN3LMWKA.js → chunk-7TQ3EDQ3.js} +1 -1
- package/dist/chunk-7TQ3EDQ3.js.map +1 -0
- package/dist/{chunk-KJ65WZHB.js → chunk-A7DIZOTF.js} +2 -2
- package/dist/{chunk-TZ7ZA2LM.js → chunk-AD3JOG2Q.js} +2 -2
- package/dist/{chunk-2QW5HPKU.js → chunk-AUDLHIHI.js} +35 -28
- package/dist/chunk-AUDLHIHI.js.map +1 -0
- package/dist/{chunk-BDFSVUUZ.js → chunk-C3H2QZOZ.js} +2 -1
- package/dist/chunk-C3H2QZOZ.js.map +1 -0
- package/dist/{chunk-7EP4FURO.js → chunk-C72YQM7E.js} +2 -2
- package/dist/{chunk-4EAVEDLG.js → chunk-CRKT2JXN.js} +9 -9
- package/dist/{chunk-CJSTQNE5.js → chunk-CTOMDCCA.js} +2 -2
- package/dist/{chunk-PSQ347YP.js → chunk-DSKII2W4.js} +3 -3
- package/dist/{chunk-KOVQZJ27.js → chunk-E7LDTUWK.js} +2 -2
- package/dist/{chunk-SPAKBUJY.js → chunk-EWLMEYLF.js} +2 -2
- package/dist/{chunk-JJ42IDJU.js → chunk-FEGQI5KR.js} +2 -2
- package/dist/{chunk-3BICT225.js → chunk-FGNBUUPX.js} +2 -2
- package/dist/{chunk-QZMGZBTF.js → chunk-HBG6CQEX.js} +2 -2
- package/dist/{chunk-7V6GNQC2.js → chunk-HINQENZG.js} +2 -2
- package/dist/{chunk-WRVKI6ZO.js → chunk-HLQXSX4F.js} +2 -2
- package/dist/{chunk-KQIOW3TG.js → chunk-HUDE2SQA.js} +2 -2
- package/dist/{chunk-T765HQ5U.js → chunk-IIDAN7XJ.js} +2 -2
- package/dist/{chunk-M7Q7Z6V5.js → chunk-JDZ5JPYG.js} +38 -8
- package/dist/chunk-JDZ5JPYG.js.map +1 -0
- package/dist/{chunk-VMNX2UV7.js → chunk-JRUOIEFL.js} +5 -5
- package/dist/{chunk-JKMIGCK6.js → chunk-KDGEEZOI.js} +3 -2
- package/dist/chunk-KDGEEZOI.js.map +1 -0
- package/dist/{chunk-MMRTPH3J.js → chunk-KQYGUFMQ.js} +5 -3
- package/dist/chunk-KQYGUFMQ.js.map +1 -0
- package/dist/{chunk-TWYYUMYO.js → chunk-KXAGZRJV.js} +2 -2
- package/dist/{chunk-JITK24KX.js → chunk-LJNCJK7B.js} +10 -10
- package/dist/{chunk-Z6EFSXU3.js → chunk-LMM2LRVQ.js} +2 -2
- package/dist/{chunk-V65H7MI6.js → chunk-M42UFQZY.js} +51 -4
- package/dist/chunk-M42UFQZY.js.map +1 -0
- package/dist/{chunk-KZ4BJRGQ.js → chunk-ODGVLSCQ.js} +2 -2
- package/dist/{chunk-AALJHIKH.js → chunk-OHJ5PNYB.js} +3 -3
- package/dist/{chunk-XZMQLON4.js → chunk-OK726OF4.js} +7 -5
- package/dist/chunk-OK726OF4.js.map +1 -0
- package/dist/{chunk-Q6S67LHR.js → chunk-OOMFFMX3.js} +2 -2
- package/dist/{chunk-YCJJODER.js → chunk-PNDTRIOI.js} +10 -3
- package/dist/chunk-PNDTRIOI.js.map +1 -0
- package/dist/{chunk-3RZ4GDOH.js → chunk-PX4AMRAN.js} +93 -23
- package/dist/chunk-PX4AMRAN.js.map +1 -0
- package/dist/{chunk-JNDMIAJ4.js → chunk-QEVZKJM6.js} +2 -2
- package/dist/{chunk-ZNCCX7P6.js → chunk-QO5QZR2U.js} +2 -2
- package/dist/{chunk-NFQKIZK3.js → chunk-QXEF66SC.js} +2 -2
- package/dist/{chunk-NKHRIDYP.js → chunk-RTXW6E6X.js} +3 -3
- package/dist/{chunk-5WDUY2ZZ.js → chunk-S4QWAWR6.js} +4 -4
- package/dist/{chunk-HEJFE3BC.js → chunk-SJCN7ESG.js} +2 -2
- package/dist/{chunk-AJ7JHHRY.js → chunk-SPPWVMP4.js} +2 -2
- package/dist/{chunk-QSF5SJAM.js → chunk-STQNKDKZ.js} +9 -3
- package/dist/chunk-STQNKDKZ.js.map +1 -0
- package/dist/{chunk-QFKNIKUF.js → chunk-SXR7L57Z.js} +2 -2
- package/dist/{chunk-GYCUX3N4.js → chunk-TGMIJABS.js} +2 -2
- package/dist/{chunk-GH7IKABD.js → chunk-UFJJMQDV.js} +2 -2
- package/dist/{chunk-FKHXXL42.js → chunk-VAE6QCZQ.js} +2 -2
- package/dist/{chunk-UH2VY2QQ.js → chunk-WCW7I7ZM.js} +2 -2
- package/dist/{chunk-5GIYIYJI.js → chunk-WLP3XJCO.js} +2 -2
- package/dist/{chunk-STSORBX5.js → chunk-XII23FXP.js} +1 -1
- package/dist/chunk-XII23FXP.js.map +1 -0
- package/dist/{chunk-LR6LWX33.js → chunk-XXDIPAUE.js} +2 -2
- package/dist/{chunk-G2MS56KM.js → chunk-YQUGYQRY.js} +2 -2
- package/dist/{chunk-WEI6HEUX.js → chunk-YXAH5TSN.js} +2 -2
- package/dist/{chunk-75K6DRPN.js → chunk-ZAVFAGBE.js} +2 -2
- package/dist/{chunk-7KTORRIK.js → chunk-ZNJU3NBJ.js} +2 -2
- package/dist/cli.js +65 -66
- package/dist/coding/export-okf-codegraph.js +9 -8
- package/dist/coding/export-okf-codegraph.js.map +1 -1
- package/dist/compounding/engine.js +8 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -6
- package/dist/connectors/codex-materialize-runner.js +7 -6
- package/dist/connectors/index.js +7 -6
- package/dist/convergence-refresh.js +9 -8
- package/dist/corpus-watermark.js +9 -8
- package/dist/deep-recall-http-glue.js +2 -2
- package/dist/deep-recall-policy-llm.js +4 -3
- package/dist/entity-retrieval.js +7 -6
- package/dist/eval-trajectory-store.js +2 -2
- package/dist/eval-trajectory.js +2 -2
- package/dist/evals.d.ts.map +1 -1
- package/dist/evals.js +1 -1
- package/dist/explicit-capture.js +65 -66
- package/dist/extraction-error-classification.d.ts +40 -5
- package/dist/extraction-error-classification.d.ts.map +1 -1
- package/dist/extraction-error-classification.js +5 -2
- package/dist/extraction-faithfulness.js +4 -3
- package/dist/extraction-judge.js +4 -3
- package/dist/extraction.d.ts.map +1 -1
- package/dist/extraction.js +17 -18
- package/dist/fallback-llm-codex-subscription.d.ts +3 -1
- package/dist/fallback-llm-codex-subscription.d.ts.map +1 -1
- package/dist/fallback-llm-codex-subscription.js +2 -1
- package/dist/fallback-llm.d.ts.map +1 -1
- package/dist/fallback-llm.js +3 -2
- package/dist/harmonic-retrieval.js +7 -6
- package/dist/index.js +65 -66
- package/dist/live-connectors-runner.js +1 -2
- 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.d.ts.map +1 -1
- package/dist/local-llm.js +4 -3
- package/dist/location/index.js +8 -7
- package/dist/maintenance/memory-governance.js +7 -6
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -6
- package/dist/maintenance/rebuild-memory-projection-runner.js +9 -8
- package/dist/maintenance/rebuild-memory-projection.js +8 -7
- package/dist/memory-browse.js +3 -3
- package/dist/namespaces/migrate.js +8 -7
- package/dist/namespaces/storage.js +7 -6
- package/dist/operator-doctor-corpus.js +10 -9
- package/dist/operator-toolkit.js +15 -14
- package/dist/orchestration/backlog-scheduler.js +66 -67
- package/dist/orchestration/backlog-scheduler.js.map +1 -1
- package/dist/orchestration/buffer-drain-runner.js +66 -67
- package/dist/orchestration/extraction-drain.d.ts +1 -0
- package/dist/orchestration/extraction-drain.d.ts.map +1 -1
- package/dist/orchestration/extraction-run-helpers.d.ts +41 -4
- package/dist/orchestration/extraction-run-helpers.d.ts.map +1 -1
- package/dist/orchestration/extraction-run.d.ts +4 -0
- package/dist/orchestration/extraction-run.d.ts.map +1 -1
- package/dist/orchestration/maintenance.js +17 -16
- package/dist/orchestration/orchestrator-helpers.d.ts +2 -0
- package/dist/orchestration/orchestrator-helpers.d.ts.map +1 -1
- package/dist/orchestration/recall-entry.d.ts +2 -2
- package/dist/orchestration/recall-entry.d.ts.map +1 -1
- package/dist/orchestration/recall-internal.d.ts.map +1 -1
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +65 -66
- 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 +65 -66
- package/dist/recall-planner-llm.js +3 -2
- package/dist/recall-planner-llm.js.map +1 -1
- package/dist/recall-state-view-admission.js +3 -3
- package/dist/recall-why-service.js +3 -3
- 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 +8 -7
- package/dist/semantic-consolidation.js +8 -7
- package/dist/semantic-rule-promotion.js +7 -6
- package/dist/semantic-rule-verifier.js +7 -6
- package/dist/source-agent-qualifier.js +10 -9
- package/dist/standup/build.js +7 -6
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +6 -5
- package/dist/summarizer.js +6 -5
- package/dist/support-passport/index.js +6 -5
- package/dist/transfer/export-okf.js +7 -6
- package/dist/types-extraction-failure.d.ts +7 -1
- package/dist/types-extraction-failure.d.ts.map +1 -1
- package/dist/types.d.ts +6 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +7 -6
- package/dist/who-knows-cli.js +8 -7
- package/dist/who-knows.js +7 -6
- package/package.json +2 -2
- package/src/access-mcp.ts +8 -0
- package/src/access-recall-concurrency.ts +35 -2
- package/src/access-recall-response.ts +3 -1
- package/src/access-recall-surface.ts +1 -0
- package/src/access-schema.ts +8 -0
- package/src/access-service-recall-concurrency.test.ts +65 -0
- package/src/access-service.ts +4 -3
- package/src/buffer-incremental-persistence.test.ts +23 -0
- package/src/buffer.ts +30 -28
- package/src/config.ts +2 -0
- package/src/evals.ts +6 -6
- package/src/extraction-error-classification.ts +88 -8
- package/src/extraction-local-failure-class.test.ts +117 -3
- package/src/extraction-reply-diagnostic-wiring.test.ts +3 -1
- package/src/extraction.test.ts +73 -3
- package/src/extraction.ts +26 -25
- package/src/fallback-llm-codex-subscription.ts +17 -3
- package/src/fallback-llm.test.ts +70 -0
- package/src/fallback-llm.ts +17 -18
- package/src/local-llm-headers-timeout.test.ts +151 -0
- package/src/local-llm-helpers.ts +1 -1
- package/src/local-llm.ts +44 -43
- package/src/orchestration/extraction-drain.ts +11 -5
- package/src/orchestration/extraction-run-helpers.ts +110 -4
- package/src/orchestration/extraction-run.test.ts +408 -3
- package/src/orchestration/extraction-run.ts +75 -75
- package/src/orchestration/orchestrator-helpers.ts +2 -0
- package/src/orchestration/recall-entry.ts +7 -7
- package/src/orchestration/recall-internal.ts +14 -4
- package/src/orchestrator.ts +3 -2
- package/src/recall-client-deadline-trace.test.ts +209 -0
- package/src/storage.ts +5 -4
- package/src/types-extraction-failure.ts +12 -1
- package/src/types.ts +6 -6
- package/dist/chunk-2QW5HPKU.js.map +0 -1
- package/dist/chunk-3RZ4GDOH.js.map +0 -1
- package/dist/chunk-BDFSVUUZ.js.map +0 -1
- package/dist/chunk-C7SRUWBW.js +0 -54
- package/dist/chunk-C7SRUWBW.js.map +0 -1
- package/dist/chunk-F2MVWUNF.js.map +0 -1
- package/dist/chunk-FZU62GIV.js.map +0 -1
- package/dist/chunk-JKMIGCK6.js.map +0 -1
- package/dist/chunk-M7Q7Z6V5.js.map +0 -1
- package/dist/chunk-MMRTPH3J.js.map +0 -1
- package/dist/chunk-NN3LMWKA.js.map +0 -1
- package/dist/chunk-QIPRDRGM.js.map +0 -1
- package/dist/chunk-QSF5SJAM.js.map +0 -1
- package/dist/chunk-STSORBX5.js.map +0 -1
- package/dist/chunk-V65H7MI6.js.map +0 -1
- package/dist/chunk-VSLV3EEP.js.map +0 -1
- package/dist/chunk-XZMQLON4.js.map +0 -1
- package/dist/chunk-YCJJODER.js.map +0 -1
- /package/dist/{chunk-3ZS3NUEI.js.map → chunk-3DSLTUK6.js.map} +0 -0
- /package/dist/{chunk-DYUPSTCV.js.map → chunk-3EXG2KPK.js.map} +0 -0
- /package/dist/{chunk-FGFU6J26.js.map → chunk-4FTYKZ77.js.map} +0 -0
- /package/dist/{chunk-EEA2RM4B.js.map → chunk-4I6A3SDL.js.map} +0 -0
- /package/dist/{chunk-SKJM4PKE.js.map → chunk-4JI5PPFW.js.map} +0 -0
- /package/dist/{chunk-TDG5NZAZ.js.map → chunk-65JA7LWV.js.map} +0 -0
- /package/dist/{chunk-3YID7KZ6.js.map → chunk-6QMKUWXH.js.map} +0 -0
- /package/dist/{chunk-7SOKOEAZ.js.map → chunk-6RRHTHKQ.js.map} +0 -0
- /package/dist/{chunk-VHQNJW4Q.js.map → chunk-6W62D4MC.js.map} +0 -0
- /package/dist/{chunk-CRS2NY44.js.map → chunk-7O6H7BPW.js.map} +0 -0
- /package/dist/{chunk-KJ65WZHB.js.map → chunk-A7DIZOTF.js.map} +0 -0
- /package/dist/{chunk-TZ7ZA2LM.js.map → chunk-AD3JOG2Q.js.map} +0 -0
- /package/dist/{chunk-7EP4FURO.js.map → chunk-C72YQM7E.js.map} +0 -0
- /package/dist/{chunk-4EAVEDLG.js.map → chunk-CRKT2JXN.js.map} +0 -0
- /package/dist/{chunk-CJSTQNE5.js.map → chunk-CTOMDCCA.js.map} +0 -0
- /package/dist/{chunk-PSQ347YP.js.map → chunk-DSKII2W4.js.map} +0 -0
- /package/dist/{chunk-KOVQZJ27.js.map → chunk-E7LDTUWK.js.map} +0 -0
- /package/dist/{chunk-SPAKBUJY.js.map → chunk-EWLMEYLF.js.map} +0 -0
- /package/dist/{chunk-JJ42IDJU.js.map → chunk-FEGQI5KR.js.map} +0 -0
- /package/dist/{chunk-3BICT225.js.map → chunk-FGNBUUPX.js.map} +0 -0
- /package/dist/{chunk-QZMGZBTF.js.map → chunk-HBG6CQEX.js.map} +0 -0
- /package/dist/{chunk-7V6GNQC2.js.map → chunk-HINQENZG.js.map} +0 -0
- /package/dist/{chunk-WRVKI6ZO.js.map → chunk-HLQXSX4F.js.map} +0 -0
- /package/dist/{chunk-KQIOW3TG.js.map → chunk-HUDE2SQA.js.map} +0 -0
- /package/dist/{chunk-T765HQ5U.js.map → chunk-IIDAN7XJ.js.map} +0 -0
- /package/dist/{chunk-VMNX2UV7.js.map → chunk-JRUOIEFL.js.map} +0 -0
- /package/dist/{chunk-TWYYUMYO.js.map → chunk-KXAGZRJV.js.map} +0 -0
- /package/dist/{chunk-JITK24KX.js.map → chunk-LJNCJK7B.js.map} +0 -0
- /package/dist/{chunk-Z6EFSXU3.js.map → chunk-LMM2LRVQ.js.map} +0 -0
- /package/dist/{chunk-KZ4BJRGQ.js.map → chunk-ODGVLSCQ.js.map} +0 -0
- /package/dist/{chunk-AALJHIKH.js.map → chunk-OHJ5PNYB.js.map} +0 -0
- /package/dist/{chunk-Q6S67LHR.js.map → chunk-OOMFFMX3.js.map} +0 -0
- /package/dist/{chunk-JNDMIAJ4.js.map → chunk-QEVZKJM6.js.map} +0 -0
- /package/dist/{chunk-ZNCCX7P6.js.map → chunk-QO5QZR2U.js.map} +0 -0
- /package/dist/{chunk-NFQKIZK3.js.map → chunk-QXEF66SC.js.map} +0 -0
- /package/dist/{chunk-NKHRIDYP.js.map → chunk-RTXW6E6X.js.map} +0 -0
- /package/dist/{chunk-5WDUY2ZZ.js.map → chunk-S4QWAWR6.js.map} +0 -0
- /package/dist/{chunk-HEJFE3BC.js.map → chunk-SJCN7ESG.js.map} +0 -0
- /package/dist/{chunk-AJ7JHHRY.js.map → chunk-SPPWVMP4.js.map} +0 -0
- /package/dist/{chunk-QFKNIKUF.js.map → chunk-SXR7L57Z.js.map} +0 -0
- /package/dist/{chunk-GYCUX3N4.js.map → chunk-TGMIJABS.js.map} +0 -0
- /package/dist/{chunk-GH7IKABD.js.map → chunk-UFJJMQDV.js.map} +0 -0
- /package/dist/{chunk-FKHXXL42.js.map → chunk-VAE6QCZQ.js.map} +0 -0
- /package/dist/{chunk-UH2VY2QQ.js.map → chunk-WCW7I7ZM.js.map} +0 -0
- /package/dist/{chunk-5GIYIYJI.js.map → chunk-WLP3XJCO.js.map} +0 -0
- /package/dist/{chunk-LR6LWX33.js.map → chunk-XXDIPAUE.js.map} +0 -0
- /package/dist/{chunk-G2MS56KM.js.map → chunk-YQUGYQRY.js.map} +0 -0
- /package/dist/{chunk-WEI6HEUX.js.map → chunk-YXAH5TSN.js.map} +0 -0
- /package/dist/{chunk-75K6DRPN.js.map → chunk-ZAVFAGBE.js.map} +0 -0
- /package/dist/{chunk-7KTORRIK.js.map → chunk-ZNJU3NBJ.js.map} +0 -0
package/src/local-llm.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { log } from "./logger.js";
|
|
2
|
+
import { isParameterConfigRejection } from "./extraction-error-classification.js";
|
|
2
3
|
import { isUnsupportedJsonSchemaError } from "./fallback-llm-codex-subscription.js";
|
|
3
4
|
import { estimateTokenCount } from "./token-estimate.js";
|
|
4
5
|
import type { PluginConfig } from "./types.js";
|
|
@@ -525,8 +526,7 @@ export class LocalLlmClient {
|
|
|
525
526
|
*/
|
|
526
527
|
private getContextFromLmsCli(modelId: string): number | null {
|
|
527
528
|
try {
|
|
528
|
-
//
|
|
529
|
-
// HOME may be absent in launchd environments, so prefer the resolved helper.
|
|
529
|
+
// Prefer the resolved helper: HOME may be absent in launchd environments.
|
|
530
530
|
const homeDir = this.resolveHomeDir();
|
|
531
531
|
const lmsPaths = [
|
|
532
532
|
this.config.localLmsCliPath || "",
|
|
@@ -541,8 +541,7 @@ export class LocalLlmClient {
|
|
|
541
541
|
return null;
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
// Run lms ps --json
|
|
545
|
-
// Use spawnSync with shell and explicit PATH to ensure lms can find its dependencies
|
|
544
|
+
// Run `lms ps --json` for loaded models; explicit PATH so lms finds its deps
|
|
546
545
|
log.debug(`LMS CLI: running: ${lmsPath} ps --json`);
|
|
547
546
|
const existingPath = readEnvVar("PATH") || "";
|
|
548
547
|
const result = launchProcessSync(lmsPath, ["ps", "--json"], {
|
|
@@ -902,23 +901,12 @@ export class LocalLlmClient {
|
|
|
902
901
|
};
|
|
903
902
|
this.nativeSchemaGate.attach(requestBody, options, requestModel);
|
|
904
903
|
|
|
905
|
-
// Suppress thinking
|
|
906
|
-
//
|
|
907
|
-
//
|
|
908
|
-
//
|
|
909
|
-
//
|
|
910
|
-
//
|
|
911
|
-
// deduplication can use the model's reasoning path. Fast-tier callers can
|
|
912
|
-
// still force suppression per request to preserve their low-latency
|
|
913
|
-
// contract.
|
|
914
|
-
//
|
|
915
|
-
// Gate the injection on detected backend support (issue #548,
|
|
916
|
-
// Codex P1 on PR #550): `chat_template_kwargs` is an LM Studio /
|
|
917
|
-
// vLLM / llama.cpp extension, not part of standard OpenAI chat
|
|
918
|
-
// completions. Strict OpenAI-compatible backends reject
|
|
919
|
-
// unknown fields with 400, which trips the 400-cooldown path and
|
|
920
|
-
// can effectively disable local extraction. Fail open when the
|
|
921
|
-
// backend hasn't been positively identified as thinking-capable.
|
|
904
|
+
// Suppress thinking for operations that benefit from terse output:
|
|
905
|
+
// thinking-capable models default to thinking-on; `chat_template_kwargs:
|
|
906
|
+
// { enable_thinking: false }` skips it. Consolidation keeps thinking on;
|
|
907
|
+
// fast-tier callers can force suppression. Gate on detected backend
|
|
908
|
+
// support (issue #548): strict OpenAI backends reject the extension with
|
|
909
|
+
// 400 — fail open when unidentified.
|
|
922
910
|
const shouldSuppressThinking =
|
|
923
911
|
options.forceDisableThinking === true ||
|
|
924
912
|
((options.disableThinking ?? this._disableThinking) &&
|
|
@@ -930,15 +918,11 @@ export class LocalLlmClient {
|
|
|
930
918
|
) {
|
|
931
919
|
requestBody.chat_template_kwargs = { enable_thinking: false };
|
|
932
920
|
} else if (shouldSuppressThinking && this.detectedType === "ollama") {
|
|
933
|
-
// Ollama's /v1 endpoint silently drops `chat_template_kwargs`
|
|
934
|
-
// `enable_thinking` —
|
|
935
|
-
//
|
|
936
|
-
//
|
|
937
|
-
//
|
|
938
|
-
// Qwen 3.5+) burn 1,700-2,000 reasoning tokens per extraction on
|
|
939
|
-
// Ollama, exceed the client timeout, and retry forever. The effort
|
|
940
|
-
// is configurable via `localLlmReasoningEffort` (default "none");
|
|
941
|
-
// an empty value disables injection (pre-#1996 behavior).
|
|
921
|
+
// Ollama's /v1 endpoint silently drops `chat_template_kwargs` and
|
|
922
|
+
// `enable_thinking` — only `reasoning_effort` maps to think-off (issue
|
|
923
|
+
// #1996). Without it thinking models burn reasoning tokens per
|
|
924
|
+
// extraction and retry forever. Empty `localLlmReasoningEffort`
|
|
925
|
+
// disables injection (pre-#1996).
|
|
942
926
|
const effort = this.config.localLlmReasoningEffort;
|
|
943
927
|
if (effort) {
|
|
944
928
|
requestBody.reasoning_effort = effort;
|
|
@@ -956,11 +940,10 @@ export class LocalLlmClient {
|
|
|
956
940
|
// (issue #2148 root cause); the sizing lives with the transport budgets.
|
|
957
941
|
const { effectiveTimeoutMs, transportBudgetMs } = routeBudgets(operation, this.config.localLlmTimeoutMs, options.timeoutMs);
|
|
958
942
|
const maxAttempts = 1 + Math.max(0, this.config.localLlmRetry5xxCount);
|
|
959
|
-
// COS-447: rate-limit responses (429/503/408, LiteLLM cooldown) get
|
|
960
|
-
//
|
|
961
|
-
//
|
|
962
|
-
//
|
|
963
|
-
// (e.g. rerankTimeoutMs) is never stretched by a long cooldown.
|
|
943
|
+
// COS-447: rate-limit responses (429/503/408, LiteLLM cooldown) get their
|
|
944
|
+
// own retry budget with exponential full-jitter backoff, and a process-wide
|
|
945
|
+
// semaphore caps concurrent HTTP attempts. Waits stay bounded by the
|
|
946
|
+
// request timeout so a short caller budget is never stretched.
|
|
964
947
|
const rateLimit = new LocalLlmRateLimitSession(
|
|
965
948
|
formatLocalLlmPoolKey(chatUrl, operation),
|
|
966
949
|
resolveRateLimitSettings(this.config),
|
|
@@ -979,8 +962,10 @@ export class LocalLlmClient {
|
|
|
979
962
|
log.warn(gate.reason === "queue"
|
|
980
963
|
? `local LLM concurrency queue exceeded the ${effectiveTimeoutMs}ms request budget; skipping request (op=${operation})`
|
|
981
964
|
: `local LLM rate-limit backoff active (${gate.remainingMs}ms remaining); skipping request (op=${operation})`);
|
|
982
|
-
if (options.failureDiag)
|
|
965
|
+
if (options.failureDiag) {
|
|
983
966
|
options.failureDiag.lastError = Object.assign(new Error("local LLM rate limited"), { status: 429 });
|
|
967
|
+
options.failureDiag.sawTransientAttempt = true;
|
|
968
|
+
}
|
|
984
969
|
return null;
|
|
985
970
|
}
|
|
986
971
|
if (gate.kind === "aborted") return null;
|
|
@@ -1032,8 +1017,12 @@ export class LocalLlmClient {
|
|
|
1032
1017
|
log.debug(`local LLM failed to read ${response.status} response body: ${options.redactProviderErrors ? "details redacted" : error.message}`);
|
|
1033
1018
|
} else {
|
|
1034
1019
|
response = null;
|
|
1035
|
-
if (!isAbortError(err))
|
|
1020
|
+
if (!isAbortError(err)) {
|
|
1021
|
+
if (options.failureDiag) options.failureDiag.sawTransientAttempt = true;
|
|
1022
|
+
throw err;
|
|
1023
|
+
}
|
|
1036
1024
|
lastAbortError = error;
|
|
1025
|
+
if (options.failureDiag) options.failureDiag.sawTransientAttempt = true;
|
|
1037
1026
|
if (attempt >= maxAttempts) break;
|
|
1038
1027
|
const backoffMs = this.config.localLlmRetryBackoffMs * attempt;
|
|
1039
1028
|
log.warn(
|
|
@@ -1052,6 +1041,9 @@ export class LocalLlmClient {
|
|
|
1052
1041
|
rateLimit.onSuccess();
|
|
1053
1042
|
break;
|
|
1054
1043
|
}
|
|
1044
|
+
// A transient attempt stays evidence even when a later attempt fails terminally (#3757).
|
|
1045
|
+
if (options.failureDiag && (response.status === 408 || response.status === 429 || response.status >= 500))
|
|
1046
|
+
options.failureDiag.sawTransientAttempt = true;
|
|
1055
1047
|
if (response.status >= 500 && attempt < maxAttempts) {
|
|
1056
1048
|
const nonRecoverableReason = extractNonRecoverableBackendReasonFromErrorText(responseBody);
|
|
1057
1049
|
if (nonRecoverableReason) {
|
|
@@ -1103,9 +1095,14 @@ export class LocalLlmClient {
|
|
|
1103
1095
|
if (lastRateLimitDelayMs !== null)
|
|
1104
1096
|
log.warn(`local LLM rate-limit retries exhausted: op=${operation} retries=${rateLimit.retryCount} nextBackoffMs=${lastRateLimitDelayMs}`);
|
|
1105
1097
|
let reason = "";
|
|
1098
|
+
let providerMessage: string | undefined;
|
|
1099
|
+
let providerCode: string | undefined;
|
|
1106
1100
|
try {
|
|
1107
|
-
|
|
1108
|
-
|
|
1101
|
+
// SAFETY: OpenAI-compatible error envelope; optional fields read defensively.
|
|
1102
|
+
const parsed = JSON.parse(responseBody) as { error?: { message?: string; code?: unknown } };
|
|
1103
|
+
providerMessage = parsed?.error?.message;
|
|
1104
|
+
providerCode = parsed?.error?.code === undefined ? undefined : String(parsed.error.code);
|
|
1105
|
+
reason = providerMessage ? ` — ${providerMessage}` : "";
|
|
1109
1106
|
} catch {
|
|
1110
1107
|
if (!options.redactProviderErrors) log.debug(`local LLM error body: ${responseBody.slice(0, 500)}`);
|
|
1111
1108
|
}
|
|
@@ -1139,10 +1136,14 @@ export class LocalLlmClient {
|
|
|
1139
1136
|
} else {
|
|
1140
1137
|
this.consecutive400s = 0;
|
|
1141
1138
|
}
|
|
1142
|
-
if (options.failureDiag)
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1139
|
+
if (options.failureDiag) {
|
|
1140
|
+
const lastError = Object.assign(new Error("local LLM http failure"), { status: response.status });
|
|
1141
|
+
// Tag a parameter-refusing rejection so classification parks the
|
|
1142
|
+
// window as a config failure; sanitized — no provider text (#3757).
|
|
1143
|
+
if (isParameterConfigRejection({ code: providerCode, message: providerMessage }))
|
|
1144
|
+
Object.assign(lastError, { code: "unsupported_parameter" });
|
|
1145
|
+
options.failureDiag.lastError = lastError;
|
|
1146
|
+
}
|
|
1146
1147
|
return null;
|
|
1147
1148
|
}
|
|
1148
1149
|
this.consecutive400s = 0;
|
|
@@ -110,8 +110,14 @@ export class ExtractionDrain {
|
|
|
110
110
|
constructor(deps: ExtractionDrainDeps, options?: { dropFailedChunks?: boolean }) {
|
|
111
111
|
this.deps = deps;
|
|
112
112
|
this.dropFailedChunks = options?.dropFailedChunks !== false;
|
|
113
|
+
// Forward the drain's drop policy so the run layer dead-letters a
|
|
114
|
+
// permanently-failing window only where dropping failures is permitted.
|
|
115
|
+
this.runExtraction = (turns, runOptions) =>
|
|
116
|
+
deps.runExtraction(turns, { ...runOptions, dropFailedChunks: this.dropFailedChunks && runOptions?.dropFailedChunks !== false });
|
|
113
117
|
}
|
|
114
118
|
|
|
119
|
+
private readonly runExtraction: ExtractionDrainDeps["runExtraction"];
|
|
120
|
+
|
|
115
121
|
/** Characters the coordinator would count for this window: user/assistant text, trimmed and capped per turn, context-only turns left out. */
|
|
116
122
|
private windowChars(turns: readonly BufferTurn[]): number {
|
|
117
123
|
let total = 0;
|
|
@@ -204,14 +210,14 @@ export class ExtractionDrain {
|
|
|
204
210
|
if (plan.singleRun) {
|
|
205
211
|
// Without duplicates this is today's single-run path: the run judges its own
|
|
206
212
|
// thresholds on the raw window.
|
|
207
|
-
if (collapsed.duplicateCount === 0) return await this.
|
|
213
|
+
if (collapsed.duplicateCount === 0) return await this.runExtraction(turns, runOptions);
|
|
208
214
|
// With duplicates, eligibility belongs to the RAW window — duplicate inflation
|
|
209
215
|
// must not change whether a window qualifies (#3443). Below the threshold,
|
|
210
216
|
// today's skip path runs on the raw window (unmarked, so skip/capture/clear
|
|
211
217
|
// judge every identity exactly as before); above it, the representative subset
|
|
212
218
|
// is never re-judged — the same rule the chunk loop applies to chunks.
|
|
213
|
-
if (this.windowBelowThreshold(turns, runOptions)) return await this.
|
|
214
|
-
return await this.
|
|
219
|
+
if (this.windowBelowThreshold(turns, runOptions)) return await this.runExtraction(turns, runOptions);
|
|
220
|
+
return await this.runExtraction(window, {
|
|
215
221
|
...runOptions,
|
|
216
222
|
skipCharThreshold: true,
|
|
217
223
|
skipUserTurnThreshold: true,
|
|
@@ -221,7 +227,7 @@ export class ExtractionDrain {
|
|
|
221
227
|
// window: a window that never qualified keeps the single-run path, which
|
|
222
228
|
// judges it exactly as before.
|
|
223
229
|
if (!plan.resumed && this.windowBelowThreshold(turns, runOptions)) {
|
|
224
|
-
return await this.
|
|
230
|
+
return await this.runExtraction(turns, runOptions);
|
|
225
231
|
}
|
|
226
232
|
// A deduped window is never re-judged on its representative subset inside the
|
|
227
233
|
// run: eligibility above (or the caller's skip flags) already decided it.
|
|
@@ -360,7 +366,7 @@ export class ExtractionDrain {
|
|
|
360
366
|
const failures = this.failureCount(bufferKey, chunk);
|
|
361
367
|
let result: ExtractionRunResult;
|
|
362
368
|
try {
|
|
363
|
-
result = await this.
|
|
369
|
+
result = await this.runExtraction(chunk, { ...chunkOptions, partParents });
|
|
364
370
|
} catch (err) {
|
|
365
371
|
this.rethrowChunkAbort(err, preempt, runOptions.abortSignal?.aborted === true);
|
|
366
372
|
// A successfully dropped thrown chunk does not end the drain: later
|
|
@@ -81,6 +81,9 @@ export interface ExtractionRetryStateEntry {
|
|
|
81
81
|
nextEligibleAtMs: number;
|
|
82
82
|
firstFailedAtMs: number;
|
|
83
83
|
lastFailureClass: ExtractionFailureClass;
|
|
84
|
+
/** Only `provider_permanent` failures count here — transient/setup failures
|
|
85
|
+
* must not consume the terminal-refusal allowance (issue #3757). */
|
|
86
|
+
permanentAttempts?: number;
|
|
84
87
|
}
|
|
85
88
|
|
|
86
89
|
export interface ExtractionResilienceStatus {
|
|
@@ -135,16 +138,23 @@ export function computeExtractionRetryNextEligibleMs(
|
|
|
135
138
|
|
|
136
139
|
/**
|
|
137
140
|
* Whether a recorded failure long-parks the fingerprint: `output_truncated`
|
|
138
|
-
* can never succeed at the same output ceiling,
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
+
* can never succeed at the same output ceiling, `parse_empty` past its attempt
|
|
142
|
+
* cap has shown this window unparseable, and `provider_permanent` past its cap
|
|
143
|
+
* normally dead-letters — the park is the fallback when the dead-letter's
|
|
144
|
+
* recovery copy could not be written. The retained window still drains under a
|
|
145
|
+
* raised ceiling (#3521).
|
|
141
146
|
*/
|
|
142
147
|
export function extractionFailureLongParks(
|
|
143
148
|
cls: ExtractionFailureClass,
|
|
144
149
|
attempts: number,
|
|
145
150
|
parseEmptyMaxAttempts: number,
|
|
151
|
+
providerPermanentMaxAttempts: number = parseEmptyMaxAttempts,
|
|
146
152
|
): boolean {
|
|
147
|
-
return
|
|
153
|
+
return (
|
|
154
|
+
cls === "output_truncated" ||
|
|
155
|
+
(cls === "parse_empty" && attempts > parseEmptyMaxAttempts) ||
|
|
156
|
+
(cls === "provider_permanent" && attempts >= providerPermanentMaxAttempts)
|
|
157
|
+
);
|
|
148
158
|
}
|
|
149
159
|
|
|
150
160
|
/**
|
|
@@ -487,3 +497,99 @@ export async function extractChunkedExtraction(
|
|
|
487
497
|
);
|
|
488
498
|
return merged;
|
|
489
499
|
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Dead-letter bound for `provider_permanent` failures (the unbounded
|
|
503
|
+
* remnic-buffer-drain loop): once a fingerprint fails `permanentMaxAttempts`
|
|
504
|
+
* times with a terminal input refusal that a resend can never fix, the retry
|
|
505
|
+
* loop must END — the fingerprint is marked processed so later attempts
|
|
506
|
+
* short-circuit. Same rule as the drain's drop path: a dropped-chunk recovery
|
|
507
|
+
* copy under `state/dropped/` is written first, and if the copy cannot be
|
|
508
|
+
* written the window stays buffered and parked instead of being silently lost.
|
|
509
|
+
* Never throws on a storage failure — the run already holds its failure result.
|
|
510
|
+
*/
|
|
511
|
+
export async function maybeDeadLetterPermanentExtractionFailure(args: {
|
|
512
|
+
readonly recorded: boolean;
|
|
513
|
+
readonly dropAllowed: boolean;
|
|
514
|
+
readonly failureClass: ExtractionFailureClass;
|
|
515
|
+
/** Permanent-refusal count only — transient/setup failures never consume the allowance. */
|
|
516
|
+
readonly permanentAttempts: number;
|
|
517
|
+
readonly permanentMaxAttempts: number;
|
|
518
|
+
readonly storage: StorageManager;
|
|
519
|
+
readonly bufferKey: string;
|
|
520
|
+
readonly turns: readonly BufferTurn[];
|
|
521
|
+
/** In-flight part copy → its buffered source turn (`extractionPartOf` splits). */
|
|
522
|
+
readonly partParents?: ReadonlyMap<BufferTurn, BufferTurn>;
|
|
523
|
+
readonly fingerprint: string;
|
|
524
|
+
readonly clearBufferedTurns: (dropTurns: readonly BufferTurn[]) => Promise<void>;
|
|
525
|
+
readonly recordProcessed: (
|
|
526
|
+
storage: StorageManager,
|
|
527
|
+
fingerprint: string,
|
|
528
|
+
meta: MetaState,
|
|
529
|
+
) => Promise<void>;
|
|
530
|
+
/** Drop the fingerprint from persisted retry state only (inside the meta mutator). */
|
|
531
|
+
readonly clearPersistedRetryEntry: (meta: MetaState) => boolean;
|
|
532
|
+
/** Drop the fingerprint from the in-memory mirror — called only after the save lands. */
|
|
533
|
+
readonly clearRetryMirror: () => void;
|
|
534
|
+
readonly isDeadlineError: (err: Error) => boolean;
|
|
535
|
+
readonly runDeadlineAware: <T>(
|
|
536
|
+
operation: () => Promise<T>,
|
|
537
|
+
phase: string,
|
|
538
|
+
clearTimerOnError?: boolean,
|
|
539
|
+
) => Promise<T>;
|
|
540
|
+
}): Promise<boolean> {
|
|
541
|
+
// No-drop callers (fail-closed flushes, claim drains) retain the window: the
|
|
542
|
+
// permanent failure stays parked for replay rather than silently processed.
|
|
543
|
+
if (!args.recorded || !args.dropAllowed || args.failureClass !== "provider_permanent") return false;
|
|
544
|
+
if (args.permanentAttempts < Math.max(1, args.permanentMaxAttempts)) return false;
|
|
545
|
+
// Split turns: slice copies match nothing buffered, so the drop set is the
|
|
546
|
+
// parents — same rule as the drain's drop path. Dropping only the copies
|
|
547
|
+
// would strand the parent and re-enter the retry cycle forever.
|
|
548
|
+
const dropTurns =
|
|
549
|
+
args.partParents === undefined
|
|
550
|
+
? args.turns
|
|
551
|
+
: [...new Set(args.turns.map((t) => args.partParents?.get(t) ?? t))];
|
|
552
|
+
const reason =
|
|
553
|
+
`dead-lettered after ${args.permanentAttempts} provider_permanent extraction failures ` +
|
|
554
|
+
"(a resend of the identical request cannot succeed)";
|
|
555
|
+
let copyPath: string | null = null;
|
|
556
|
+
try {
|
|
557
|
+
copyPath = await args.runDeadlineAware(
|
|
558
|
+
() => args.storage.saveDroppedExtractionChunk(args.bufferKey, reason, dropTurns),
|
|
559
|
+
"during_dead_letter_copy",
|
|
560
|
+
false,
|
|
561
|
+
);
|
|
562
|
+
} catch (err) {
|
|
563
|
+
if (err instanceof Error && args.isDeadlineError(err)) throw err;
|
|
564
|
+
log.warn(
|
|
565
|
+
"runExtraction: could not save the dead-letter recovery copy; keeping the window buffered and parked",
|
|
566
|
+
err,
|
|
567
|
+
);
|
|
568
|
+
return false;
|
|
569
|
+
}
|
|
570
|
+
try {
|
|
571
|
+
await args.runDeadlineAware(
|
|
572
|
+
() =>
|
|
573
|
+
args.storage.updateMeta(async (freshMeta) => {
|
|
574
|
+
await args.recordProcessed(args.storage, args.fingerprint, freshMeta);
|
|
575
|
+
args.clearPersistedRetryEntry(freshMeta);
|
|
576
|
+
}),
|
|
577
|
+
"during_dead_letter_mark",
|
|
578
|
+
false,
|
|
579
|
+
);
|
|
580
|
+
// The mirror entry clears only after the save lands: a failed save would
|
|
581
|
+
// otherwise restart the permanent-attempt count at zero in this process
|
|
582
|
+
// while the persisted entry stayed at the cap.
|
|
583
|
+
args.clearRetryMirror();
|
|
584
|
+
} catch (err) {
|
|
585
|
+
if (err instanceof Error && args.isDeadlineError(err)) throw err;
|
|
586
|
+
// Without a durable processed mark the window must stay buffered: clearing
|
|
587
|
+
// it here would let recaptured content reach the provider again after a
|
|
588
|
+
// restart instead of being skipped as processed_fingerprint.
|
|
589
|
+
log.warn("runExtraction: failed to mark dead-lettered fingerprint processed; keeping the window parked", err);
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
log.warn(`runExtraction: ${reason}; recovery copy saved to ${copyPath}`);
|
|
593
|
+
await args.runDeadlineAware(() => args.clearBufferedTurns(dropTurns), "during_dead_letter_clear");
|
|
594
|
+
return true;
|
|
595
|
+
}
|