@remnic/core 10.0.37 → 10.0.39
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 +76 -76
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.js +77 -77
- package/dist/access-boundary.js +76 -76
- package/dist/access-citation-namespace.js +2 -2
- package/dist/access-cli.js +165 -164
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.js +76 -76
- package/dist/access-http-briefing.js +77 -77
- package/dist/access-http-query.js +78 -78
- package/dist/access-http.js +101 -101
- package/dist/access-identity-continuity-surface.js +76 -76
- package/dist/access-lcm-surface.js +76 -76
- package/dist/access-mcp.js +90 -90
- package/dist/access-namespace-preflight.js +76 -76
- package/dist/access-observe-write-category.js +15 -15
- package/dist/access-observe-write-surface.js +76 -76
- package/dist/access-offline-manifest.js +12 -12
- package/dist/access-operations-batch.js +80 -80
- package/dist/access-operations.js +87 -87
- package/dist/access-recall-concurrency.js +76 -76
- package/dist/access-recall-diagnostics.js +2 -2
- package/dist/access-recall-response.js +76 -76
- package/dist/access-recall-surface.js +76 -76
- package/dist/access-schema.js +10 -10
- package/dist/access-service.js +76 -76
- package/dist/access-surface-catalog.js +78 -78
- package/dist/active-recall.js +31 -31
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/{auto-sync-R3XGJL5I.js → auto-sync-BNCBMU6H.js} +9 -9
- package/dist/briefing.js +21 -21
- package/dist/buffer-types.d.ts +59 -0
- package/dist/buffer-types.d.ts.map +1 -0
- package/dist/buffer-types.js +1 -0
- package/dist/buffer.d.ts +14 -22
- package/dist/buffer.d.ts.map +1 -1
- package/dist/buffer.js +11 -11
- package/dist/calibration.js +3 -3
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-GWVG7LGC.js} +2 -2
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.js +24 -24
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-MH3LC7KB.js → chunk-22YJQTPN.js} +2 -2
- package/dist/{chunk-MKE5DP3S.js → chunk-23ZMQONL.js} +2 -2
- package/dist/{chunk-MGXFJOUR.js → chunk-2AV2U2SZ.js} +4 -4
- package/dist/{chunk-HJ3UTGIW.js → chunk-2JNBPOZ2.js} +3 -3
- package/dist/{chunk-EEOYF3IB.js → chunk-3RJDYZJE.js} +2 -2
- package/dist/{chunk-FBAHBFT5.js → chunk-4HJ2QK32.js} +2 -2
- package/dist/{chunk-UXXVOA4D.js → chunk-4LLV2N3R.js} +3 -3
- package/dist/{chunk-P5CUEB2Q.js → chunk-4QLKVZH6.js} +8 -8
- package/dist/{chunk-2RJO7VS4.js → chunk-4UT2NUAC.js} +2 -2
- package/dist/{chunk-R6TCM47S.js → chunk-5KZNWERU.js} +156 -143
- package/dist/chunk-5KZNWERU.js.map +1 -0
- package/dist/{chunk-MNDHKZZQ.js → chunk-5Q6CR65T.js} +2 -2
- package/dist/{chunk-XTBEXZFN.js → chunk-5SF7JOJB.js} +4 -4
- package/dist/{chunk-BQ6DGL6A.js → chunk-64WHWIPL.js} +2 -2
- package/dist/{chunk-TVIGN3XZ.js → chunk-6FRFVIKC.js} +10 -10
- package/dist/{chunk-A23DPFFI.js → chunk-6ITNEPJO.js} +2 -2
- package/dist/{chunk-UFBIOF7C.js → chunk-6X3J4NLZ.js} +10 -5
- package/dist/chunk-6X3J4NLZ.js.map +1 -0
- package/dist/{chunk-G6PPA4TH.js → chunk-6Z2ZWBOV.js} +6 -6
- package/dist/{chunk-QEGE5QCL.js → chunk-7IANFJ24.js} +58 -58
- package/dist/{chunk-PSQ2P2T3.js → chunk-7XZ7TOLQ.js} +3 -3
- package/dist/{chunk-Z5AQZRHF.js → chunk-AER3HD3B.js} +2 -2
- package/dist/{chunk-BPBUUGAO.js → chunk-ANV373S5.js} +2 -2
- package/dist/{chunk-GMMZ45C4.js → chunk-AVVCPA7U.js} +6 -8
- package/dist/chunk-AVVCPA7U.js.map +1 -0
- package/dist/{chunk-LSSCMZQ2.js → chunk-B3I2QQU7.js} +3 -3
- package/dist/{chunk-NSQSOLCE.js → chunk-B7VKRCAG.js} +2 -2
- package/dist/{chunk-HXFIILGF.js → chunk-BFPF5N3H.js} +4 -4
- package/dist/{chunk-KQAFEZQX.js → chunk-BUKK5SWA.js} +2 -2
- package/dist/{chunk-RBC4GIZU.js → chunk-BUKZ7MTN.js} +2 -2
- package/dist/{chunk-FO5AFCRI.js → chunk-CR72WZ3M.js} +9 -9
- package/dist/{chunk-YC2C67F7.js → chunk-CRXGQRNA.js} +3 -3
- package/dist/{chunk-WRDFYSUC.js → chunk-CZVNOTLR.js} +2 -2
- package/dist/{chunk-VPO53QMG.js → chunk-D6DOLQYK.js} +2 -2
- package/dist/{chunk-HRT2SJPC.js → chunk-E3NBMTTX.js} +2 -2
- package/dist/{chunk-HIMXDRSQ.js → chunk-E5IEI2MR.js} +2 -2
- package/dist/{chunk-Z2T5BPOZ.js → chunk-EIYJK7OD.js} +2 -2
- package/dist/{chunk-FRAL3EU4.js → chunk-EKPRLTAE.js} +2 -2
- package/dist/{chunk-EVVCE7S2.js → chunk-EKR6OO4P.js} +2 -2
- package/dist/{chunk-TYGLV6ZG.js → chunk-EYGOM6AI.js} +2 -2
- package/dist/{chunk-TYGLV6ZG.js.map → chunk-EYGOM6AI.js.map} +1 -1
- package/dist/{chunk-6R6CU3MR.js → chunk-F2IU6A2L.js} +57 -57
- package/dist/{chunk-FL6SLVAJ.js → chunk-FAKRTS3Y.js} +3 -3
- package/dist/{chunk-64IO6ZEE.js → chunk-FC3ZFEXF.js} +2 -2
- package/dist/{chunk-YGYT7S3G.js → chunk-FJ264QBP.js} +31 -9
- package/dist/chunk-FJ264QBP.js.map +1 -0
- package/dist/{chunk-DGBWPSM6.js → chunk-FLDXEJFX.js} +2 -2
- package/dist/{chunk-JH4FCVWJ.js → chunk-G6OFEGUR.js} +2 -2
- package/dist/{chunk-Z5QWUR3Y.js → chunk-GCW7UT5I.js} +2 -2
- package/dist/{chunk-ULUX6Q7R.js → chunk-GE5ZNDLE.js} +4 -4
- package/dist/{chunk-U4JXQCJ3.js → chunk-GLB6VV3J.js} +2 -2
- package/dist/{chunk-RWWYBE7E.js → chunk-GPVGAHXL.js} +3 -3
- package/dist/{chunk-3BPMYMPX.js → chunk-GSBSGT43.js} +2 -2
- package/dist/{chunk-645WOU5I.js → chunk-H7BZBSP6.js} +4 -4
- package/dist/{chunk-GFYFKXWZ.js → chunk-HUDPXTXW.js} +2 -2
- package/dist/{chunk-L2JQSG5M.js → chunk-I7TR2OCU.js} +2 -2
- package/dist/{chunk-HKEK27M4.js → chunk-IAOW2L6K.js} +2 -2
- package/dist/{chunk-STM4T335.js → chunk-IJH6METJ.js} +2 -2
- package/dist/{chunk-WADPRAZE.js → chunk-IZRNMXZC.js} +2 -2
- package/dist/{chunk-JWTUJVIF.js → chunk-JGS55BAS.js} +53 -2
- package/dist/chunk-JGS55BAS.js.map +1 -0
- package/dist/{chunk-LAQS5HYU.js → chunk-JM6U3SAE.js} +2 -2
- package/dist/{chunk-74AY3S7U.js → chunk-JNLYHJG7.js} +4 -4
- package/dist/{chunk-7ZBANI3M.js → chunk-JOOGPZJE.js} +2 -2
- package/dist/{chunk-V5RJCXLG.js → chunk-JORSMFL6.js} +6 -6
- package/dist/{chunk-VKTP3TZB.js → chunk-JQCP5QW3.js} +4 -4
- package/dist/{chunk-LRJKHXU4.js → chunk-JRTKYFFY.js} +2 -2
- package/dist/{chunk-UMFBHYPW.js → chunk-JT3IXJIL.js} +13 -13
- package/dist/{chunk-S53WZWGL.js → chunk-JZFJZLJY.js} +2 -2
- package/dist/{chunk-6QOL4G76.js → chunk-KQXRVELF.js} +2 -2
- package/dist/{chunk-USOXPN5H.js → chunk-L74NWAD4.js} +2 -2
- package/dist/{chunk-Y6Y3TRBN.js → chunk-LJXBFVI2.js} +4 -4
- package/dist/{chunk-3L5WH6CV.js → chunk-LPD6I2U6.js} +2 -2
- package/dist/{chunk-LDXS746V.js → chunk-LR7RW4T6.js} +3 -3
- package/dist/{chunk-FZVZYU5C.js → chunk-LXN737FX.js} +2 -2
- package/dist/{chunk-5U3NUHMA.js → chunk-MD3W2H3G.js} +301 -98
- package/dist/chunk-MD3W2H3G.js.map +1 -0
- package/dist/{chunk-ARFT6ZBE.js → chunk-MGYZENUY.js} +2 -2
- package/dist/{chunk-YQ6SLFNZ.js → chunk-MPJDQC4G.js} +3 -3
- package/dist/{chunk-5UWP5X3T.js → chunk-NJ2DZYEK.js} +2 -2
- package/dist/{chunk-MBMT5FUQ.js → chunk-O2O4FDAH.js} +2 -2
- package/dist/{chunk-GCVUBVEN.js → chunk-ODJ2HRFW.js} +10 -10
- package/dist/{chunk-2NLLXCJG.js → chunk-OWHERGF2.js} +2 -2
- package/dist/{chunk-I73ZSORJ.js → chunk-OXSTKCYK.js} +4 -4
- package/dist/{chunk-CNQQNYJ2.js → chunk-P3YUEPSQ.js} +2 -2
- package/dist/{chunk-A6PKEU7T.js → chunk-PARM6OYL.js} +1 -1
- package/dist/chunk-PARM6OYL.js.map +1 -0
- package/dist/{chunk-TPKB7T6Z.js → chunk-Q6UZREJK.js} +2 -2
- package/dist/{chunk-UJDTXWMT.js → chunk-QIMGULGN.js} +2 -2
- package/dist/{chunk-E24RUQEN.js → chunk-QNIYL5SK.js} +2 -2
- package/dist/{chunk-KOY25HUB.js → chunk-QYAXMXOB.js} +2 -2
- package/dist/{chunk-CU7WDDPV.js → chunk-RIAKNXZB.js} +4 -4
- package/dist/{chunk-UQWA5QDT.js → chunk-RO2NNWR5.js} +3 -3
- package/dist/{chunk-AYXRK264.js → chunk-RROFIAYI.js} +9 -9
- package/dist/{chunk-L46Y5FPE.js → chunk-RUAIO5UA.js} +2 -2
- package/dist/{chunk-QIC7YZ3D.js → chunk-RWW5KPIY.js} +18 -18
- package/dist/{chunk-E5PVMB3I.js → chunk-SDXBR5QO.js} +2 -2
- package/dist/{chunk-WSLNC5AL.js → chunk-SJHFU52W.js} +8 -8
- package/dist/{chunk-7PG7QBWD.js → chunk-SRPGA6WN.js} +2 -2
- package/dist/{chunk-CUWOSRCS.js → chunk-SUKPM6DV.js} +2 -2
- package/dist/{chunk-BBDASWNT.js → chunk-TJ5YGCPV.js} +81 -76
- package/dist/chunk-TJ5YGCPV.js.map +1 -0
- package/dist/{chunk-G2SRB62M.js → chunk-TTQYX7VU.js} +2 -2
- package/dist/{chunk-TDCR6PQL.js → chunk-TWRPWJJT.js} +2 -2
- package/dist/{chunk-KC5SVCUJ.js → chunk-U66CTIF5.js} +2 -2
- package/dist/{chunk-D2AKUKAQ.js → chunk-UIK3U36O.js} +2 -2
- package/dist/{chunk-XLEP7SS3.js → chunk-UMSH4I3E.js} +2 -2
- package/dist/{chunk-X7Y7WX73.js → chunk-UVYI6VIX.js} +1 -1
- package/dist/{chunk-LHBOFROT.js → chunk-V2XMG7GM.js} +2 -2
- package/dist/chunk-VA3GNAWQ.js +58 -0
- package/dist/chunk-VA3GNAWQ.js.map +1 -0
- package/dist/{chunk-NQOM6PHO.js → chunk-VCOCOBUS.js} +6 -6
- package/dist/{chunk-4P4VLPGB.js → chunk-VECRSYQG.js} +1 -1
- package/dist/{chunk-ID2PLENW.js → chunk-VHBGJAYC.js} +2 -2
- package/dist/{chunk-RVYXSS3Q.js → chunk-VIS23B6O.js} +8 -8
- package/dist/{chunk-NMKETOAX.js → chunk-VSHWPOUB.js} +2 -2
- package/dist/{chunk-UBN5AOLT.js → chunk-W5EO4USJ.js} +2 -2
- package/dist/{chunk-Y7427SL7.js → chunk-WCGJK4NQ.js} +4 -4
- package/dist/{chunk-CCYXCT4B.js → chunk-WQYS47G4.js} +2 -2
- package/dist/{chunk-JH2ALMPR.js → chunk-WR5POHQ3.js} +2 -2
- package/dist/{chunk-DK5VMJL3.js → chunk-WT2VVYBM.js} +2 -2
- package/dist/{chunk-EHIKY2IA.js → chunk-WU5WTCH5.js} +2 -2
- package/dist/{chunk-QKXPOLQD.js → chunk-WUBGMV3G.js} +6 -6
- package/dist/{chunk-O6YJI5VX.js → chunk-WUL6LDJ4.js} +2 -2
- package/dist/{chunk-5EILJ6W2.js → chunk-WXPBDEMW.js} +2 -2
- package/dist/{chunk-U7HJBODU.js → chunk-XKTHJHSQ.js} +5 -5
- package/dist/{chunk-JFI3ATK4.js → chunk-XMYWYJM2.js} +2 -2
- package/dist/{chunk-64S6X4IU.js → chunk-XTN54NML.js} +4 -4
- package/dist/{chunk-VGFNTY3Y.js → chunk-YFXRLRKP.js} +2 -2
- package/dist/{chunk-DAOMWGO2.js → chunk-ZX5N5D6M.js} +4 -4
- package/dist/{chunk-PTRPOJ7U.js → chunk-ZXFKG7VZ.js} +2 -2
- package/dist/cli.js +124 -124
- package/dist/coding/export-okf-codegraph.js +22 -22
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compounding/engine.js +23 -23
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +31 -31
- package/dist/connectors/codex-materialize-runner.js +21 -21
- package/dist/connectors/index.js +21 -21
- package/dist/contradiction/index.js +5 -5
- package/dist/convergence-refresh.js +23 -23
- package/dist/corpus-watermark.js +23 -23
- package/dist/deep-recall-http-glue.js +11 -11
- package/dist/deep-recall-policy-llm.js +2 -2
- package/dist/deep-recall.js +2 -2
- package/dist/entity-retrieval.js +22 -22
- package/dist/event-order-recall.js +2 -2
- package/dist/explicit-capture.js +6 -6
- package/dist/external-wiki-access.js +77 -77
- package/dist/extraction-faithfulness.js +2 -2
- package/dist/extraction-judge.d.ts +42 -2
- package/dist/extraction-judge.d.ts.map +1 -1
- package/dist/extraction-judge.js +12 -2
- package/dist/extraction-window-drain.d.ts +48 -0
- package/dist/extraction-window-drain.d.ts.map +1 -0
- package/dist/extraction-window-drain.js +14 -0
- package/dist/extraction.js +29 -29
- package/dist/fallback-llm.d.ts +1 -0
- package/dist/fallback-llm.d.ts.map +1 -1
- package/dist/fallback-llm.js +1 -1
- package/dist/{graph-edge-decay-2BZTY2IM.js → graph-edge-decay-3HVLMT6U.js} +5 -5
- package/dist/graph-edge-decay-3HVLMT6U.js.map +1 -0
- package/dist/graph-jsonl.js +3 -3
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph.js +4 -4
- package/dist/harmonic-retrieval.js +22 -22
- package/dist/harmonic-source-lookup.js +2 -2
- package/dist/index.js +212 -211
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.js +7 -7
- package/dist/local-llm.js +2 -2
- package/dist/location/index.js +24 -24
- package/dist/maintenance/memory-governance.js +21 -21
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +21 -21
- package/dist/maintenance/rebuild-memory-projection-runner.js +23 -23
- package/dist/maintenance/rebuild-memory-projection.js +22 -22
- package/dist/memory-browse-operations.js +77 -77
- package/dist/memory-browse.js +6 -6
- package/dist/memory-subject.js +3 -3
- package/dist/namespaces/migrate.js +22 -22
- package/dist/namespaces/search.js +7 -7
- package/dist/namespaces/storage.js +21 -21
- package/dist/offline-sync-changeset-generations.js +3 -3
- package/dist/offline-sync-embedding-generation.js +2 -2
- package/dist/offline-sync-file-io.js +2 -2
- package/dist/offline-sync-impression-drain.js +3 -3
- package/dist/offline-sync-snapshot-stream.js +8 -8
- package/dist/offline-sync-upload-staging.js +3 -3
- package/dist/offline-sync.js +9 -9
- package/dist/operator-doctor-corpus.js +24 -24
- package/dist/operator-toolkit.js +42 -42
- package/dist/orchestration/extraction-drain.d.ts +90 -0
- package/dist/orchestration/extraction-drain.d.ts.map +1 -0
- package/dist/orchestration/extraction-run-helpers.d.ts +3 -0
- package/dist/orchestration/extraction-run-helpers.d.ts.map +1 -1
- package/dist/orchestration/extraction-run.d.ts +4 -1
- package/dist/orchestration/extraction-run.d.ts.map +1 -1
- package/dist/orchestration/maintenance.js +35 -35
- package/dist/orchestration/turn-ingestion.d.ts +3 -0
- package/dist/orchestration/turn-ingestion.d.ts.map +1 -1
- package/dist/orchestrator.d.ts +8 -0
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +165 -164
- package/dist/qmd.js +5 -5
- 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-operations.js +77 -77
- package/dist/recall-navigation.js +76 -76
- package/dist/recall-planner-llm.js +1 -1
- package/dist/recall-state-view-admission.js +6 -6
- package/dist/recall-why-service.js +6 -6
- 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/reconcile/manifest.js +3 -3
- package/dist/{resolution-4ZEQPXUZ.js → resolution-NNYG37YB.js} +6 -6
- package/dist/resolution-NNYG37YB.js.map +1 -0
- package/dist/resume-bundles.js +32 -32
- package/dist/retrieval-agents.js +2 -2
- package/dist/salvage-envelope.js +5 -5
- package/dist/search/factory.js +6 -6
- package/dist/search/index.js +10 -10
- package/dist/secure-store/index.js +2 -2
- package/dist/semantic-consolidation.js +22 -22
- package/dist/semantic-rule-promotion.js +21 -21
- package/dist/semantic-rule-verifier.js +21 -21
- package/dist/source-agent-qualifier.js +25 -25
- package/dist/standup/build.js +21 -21
- package/dist/storage/dropped-extraction-chunk.d.ts +8 -0
- package/dist/storage/dropped-extraction-chunk.d.ts.map +1 -0
- package/dist/storage.d.ts +1 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +20 -20
- package/dist/subject-config.js +4 -4
- package/dist/summarizer.js +4 -4
- package/dist/support-passport/index.js +79 -79
- 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 +22 -22
- package/dist/types.d.ts +19 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +21 -21
- package/dist/who-knows-cli.js +22 -22
- package/dist/who-knows.js +21 -21
- package/dist/write-envelope.js +4 -4
- package/package.json +2 -2
- package/src/buffer-drop-extraction-chunk.test.ts +196 -0
- package/src/buffer-types.ts +65 -0
- package/src/buffer.ts +60 -62
- package/src/config.test.ts +16 -0
- package/src/config.ts +22 -0
- package/src/extraction-judge-chain.test.ts +298 -2
- package/src/extraction-judge.ts +147 -82
- package/src/extraction-window-drain.test.ts +123 -0
- package/src/extraction-window-drain.ts +110 -0
- package/src/fallback-llm.test.ts +94 -0
- package/src/fallback-llm.ts +7 -7
- package/src/orchestration/extraction-drain.ts +261 -0
- package/src/orchestration/extraction-run-helpers.ts +8 -0
- package/src/orchestration/extraction-run.ts +5 -4
- package/src/orchestration/turn-ingestion.ts +9 -5
- package/src/orchestrator.ts +21 -0
- package/src/secure-store/secure-fs.ts +3 -1
- package/src/storage/dropped-extraction-chunk.ts +27 -0
- package/src/storage-dropped-chunk-filenames.test.ts +30 -0
- package/src/storage.ts +6 -7
- package/src/types.ts +19 -0
- package/dist/chunk-5U3NUHMA.js.map +0 -1
- package/dist/chunk-A6PKEU7T.js.map +0 -1
- package/dist/chunk-BBDASWNT.js.map +0 -1
- package/dist/chunk-GMMZ45C4.js.map +0 -1
- package/dist/chunk-JWTUJVIF.js.map +0 -1
- package/dist/chunk-R6TCM47S.js.map +0 -1
- package/dist/chunk-UFBIOF7C.js.map +0 -1
- package/dist/chunk-YGYT7S3G.js.map +0 -1
- /package/dist/{auto-sync-R3XGJL5I.js.map → auto-sync-BNCBMU6H.js.map} +0 -0
- /package/dist/{capsule-crypto-7FJQINUR.js.map → buffer-types.js.map} +0 -0
- /package/dist/{graph-edge-decay-2BZTY2IM.js.map → capsule-crypto-GWVG7LGC.js.map} +0 -0
- /package/dist/{chunk-MH3LC7KB.js.map → chunk-22YJQTPN.js.map} +0 -0
- /package/dist/{chunk-MKE5DP3S.js.map → chunk-23ZMQONL.js.map} +0 -0
- /package/dist/{chunk-MGXFJOUR.js.map → chunk-2AV2U2SZ.js.map} +0 -0
- /package/dist/{chunk-HJ3UTGIW.js.map → chunk-2JNBPOZ2.js.map} +0 -0
- /package/dist/{chunk-EEOYF3IB.js.map → chunk-3RJDYZJE.js.map} +0 -0
- /package/dist/{chunk-FBAHBFT5.js.map → chunk-4HJ2QK32.js.map} +0 -0
- /package/dist/{chunk-UXXVOA4D.js.map → chunk-4LLV2N3R.js.map} +0 -0
- /package/dist/{chunk-P5CUEB2Q.js.map → chunk-4QLKVZH6.js.map} +0 -0
- /package/dist/{chunk-2RJO7VS4.js.map → chunk-4UT2NUAC.js.map} +0 -0
- /package/dist/{chunk-MNDHKZZQ.js.map → chunk-5Q6CR65T.js.map} +0 -0
- /package/dist/{chunk-XTBEXZFN.js.map → chunk-5SF7JOJB.js.map} +0 -0
- /package/dist/{chunk-BQ6DGL6A.js.map → chunk-64WHWIPL.js.map} +0 -0
- /package/dist/{chunk-TVIGN3XZ.js.map → chunk-6FRFVIKC.js.map} +0 -0
- /package/dist/{chunk-A23DPFFI.js.map → chunk-6ITNEPJO.js.map} +0 -0
- /package/dist/{chunk-G6PPA4TH.js.map → chunk-6Z2ZWBOV.js.map} +0 -0
- /package/dist/{chunk-QEGE5QCL.js.map → chunk-7IANFJ24.js.map} +0 -0
- /package/dist/{chunk-PSQ2P2T3.js.map → chunk-7XZ7TOLQ.js.map} +0 -0
- /package/dist/{chunk-Z5AQZRHF.js.map → chunk-AER3HD3B.js.map} +0 -0
- /package/dist/{chunk-BPBUUGAO.js.map → chunk-ANV373S5.js.map} +0 -0
- /package/dist/{chunk-LSSCMZQ2.js.map → chunk-B3I2QQU7.js.map} +0 -0
- /package/dist/{chunk-NSQSOLCE.js.map → chunk-B7VKRCAG.js.map} +0 -0
- /package/dist/{chunk-HXFIILGF.js.map → chunk-BFPF5N3H.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-BUKK5SWA.js.map} +0 -0
- /package/dist/{chunk-RBC4GIZU.js.map → chunk-BUKZ7MTN.js.map} +0 -0
- /package/dist/{chunk-FO5AFCRI.js.map → chunk-CR72WZ3M.js.map} +0 -0
- /package/dist/{chunk-YC2C67F7.js.map → chunk-CRXGQRNA.js.map} +0 -0
- /package/dist/{chunk-WRDFYSUC.js.map → chunk-CZVNOTLR.js.map} +0 -0
- /package/dist/{chunk-VPO53QMG.js.map → chunk-D6DOLQYK.js.map} +0 -0
- /package/dist/{chunk-HRT2SJPC.js.map → chunk-E3NBMTTX.js.map} +0 -0
- /package/dist/{chunk-HIMXDRSQ.js.map → chunk-E5IEI2MR.js.map} +0 -0
- /package/dist/{chunk-Z2T5BPOZ.js.map → chunk-EIYJK7OD.js.map} +0 -0
- /package/dist/{chunk-FRAL3EU4.js.map → chunk-EKPRLTAE.js.map} +0 -0
- /package/dist/{chunk-EVVCE7S2.js.map → chunk-EKR6OO4P.js.map} +0 -0
- /package/dist/{chunk-6R6CU3MR.js.map → chunk-F2IU6A2L.js.map} +0 -0
- /package/dist/{chunk-FL6SLVAJ.js.map → chunk-FAKRTS3Y.js.map} +0 -0
- /package/dist/{chunk-64IO6ZEE.js.map → chunk-FC3ZFEXF.js.map} +0 -0
- /package/dist/{chunk-DGBWPSM6.js.map → chunk-FLDXEJFX.js.map} +0 -0
- /package/dist/{chunk-JH4FCVWJ.js.map → chunk-G6OFEGUR.js.map} +0 -0
- /package/dist/{chunk-Z5QWUR3Y.js.map → chunk-GCW7UT5I.js.map} +0 -0
- /package/dist/{chunk-ULUX6Q7R.js.map → chunk-GE5ZNDLE.js.map} +0 -0
- /package/dist/{chunk-U4JXQCJ3.js.map → chunk-GLB6VV3J.js.map} +0 -0
- /package/dist/{chunk-RWWYBE7E.js.map → chunk-GPVGAHXL.js.map} +0 -0
- /package/dist/{chunk-3BPMYMPX.js.map → chunk-GSBSGT43.js.map} +0 -0
- /package/dist/{chunk-645WOU5I.js.map → chunk-H7BZBSP6.js.map} +0 -0
- /package/dist/{chunk-GFYFKXWZ.js.map → chunk-HUDPXTXW.js.map} +0 -0
- /package/dist/{chunk-L2JQSG5M.js.map → chunk-I7TR2OCU.js.map} +0 -0
- /package/dist/{chunk-HKEK27M4.js.map → chunk-IAOW2L6K.js.map} +0 -0
- /package/dist/{chunk-STM4T335.js.map → chunk-IJH6METJ.js.map} +0 -0
- /package/dist/{chunk-WADPRAZE.js.map → chunk-IZRNMXZC.js.map} +0 -0
- /package/dist/{chunk-LAQS5HYU.js.map → chunk-JM6U3SAE.js.map} +0 -0
- /package/dist/{chunk-74AY3S7U.js.map → chunk-JNLYHJG7.js.map} +0 -0
- /package/dist/{chunk-7ZBANI3M.js.map → chunk-JOOGPZJE.js.map} +0 -0
- /package/dist/{chunk-V5RJCXLG.js.map → chunk-JORSMFL6.js.map} +0 -0
- /package/dist/{chunk-VKTP3TZB.js.map → chunk-JQCP5QW3.js.map} +0 -0
- /package/dist/{chunk-LRJKHXU4.js.map → chunk-JRTKYFFY.js.map} +0 -0
- /package/dist/{chunk-UMFBHYPW.js.map → chunk-JT3IXJIL.js.map} +0 -0
- /package/dist/{chunk-S53WZWGL.js.map → chunk-JZFJZLJY.js.map} +0 -0
- /package/dist/{chunk-6QOL4G76.js.map → chunk-KQXRVELF.js.map} +0 -0
- /package/dist/{chunk-USOXPN5H.js.map → chunk-L74NWAD4.js.map} +0 -0
- /package/dist/{chunk-Y6Y3TRBN.js.map → chunk-LJXBFVI2.js.map} +0 -0
- /package/dist/{chunk-3L5WH6CV.js.map → chunk-LPD6I2U6.js.map} +0 -0
- /package/dist/{chunk-LDXS746V.js.map → chunk-LR7RW4T6.js.map} +0 -0
- /package/dist/{chunk-FZVZYU5C.js.map → chunk-LXN737FX.js.map} +0 -0
- /package/dist/{chunk-ARFT6ZBE.js.map → chunk-MGYZENUY.js.map} +0 -0
- /package/dist/{chunk-YQ6SLFNZ.js.map → chunk-MPJDQC4G.js.map} +0 -0
- /package/dist/{chunk-5UWP5X3T.js.map → chunk-NJ2DZYEK.js.map} +0 -0
- /package/dist/{chunk-MBMT5FUQ.js.map → chunk-O2O4FDAH.js.map} +0 -0
- /package/dist/{chunk-GCVUBVEN.js.map → chunk-ODJ2HRFW.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-OWHERGF2.js.map} +0 -0
- /package/dist/{chunk-I73ZSORJ.js.map → chunk-OXSTKCYK.js.map} +0 -0
- /package/dist/{chunk-CNQQNYJ2.js.map → chunk-P3YUEPSQ.js.map} +0 -0
- /package/dist/{chunk-TPKB7T6Z.js.map → chunk-Q6UZREJK.js.map} +0 -0
- /package/dist/{chunk-UJDTXWMT.js.map → chunk-QIMGULGN.js.map} +0 -0
- /package/dist/{chunk-E24RUQEN.js.map → chunk-QNIYL5SK.js.map} +0 -0
- /package/dist/{chunk-KOY25HUB.js.map → chunk-QYAXMXOB.js.map} +0 -0
- /package/dist/{chunk-CU7WDDPV.js.map → chunk-RIAKNXZB.js.map} +0 -0
- /package/dist/{chunk-UQWA5QDT.js.map → chunk-RO2NNWR5.js.map} +0 -0
- /package/dist/{chunk-AYXRK264.js.map → chunk-RROFIAYI.js.map} +0 -0
- /package/dist/{chunk-L46Y5FPE.js.map → chunk-RUAIO5UA.js.map} +0 -0
- /package/dist/{chunk-QIC7YZ3D.js.map → chunk-RWW5KPIY.js.map} +0 -0
- /package/dist/{chunk-E5PVMB3I.js.map → chunk-SDXBR5QO.js.map} +0 -0
- /package/dist/{chunk-WSLNC5AL.js.map → chunk-SJHFU52W.js.map} +0 -0
- /package/dist/{chunk-7PG7QBWD.js.map → chunk-SRPGA6WN.js.map} +0 -0
- /package/dist/{chunk-CUWOSRCS.js.map → chunk-SUKPM6DV.js.map} +0 -0
- /package/dist/{chunk-G2SRB62M.js.map → chunk-TTQYX7VU.js.map} +0 -0
- /package/dist/{chunk-TDCR6PQL.js.map → chunk-TWRPWJJT.js.map} +0 -0
- /package/dist/{chunk-KC5SVCUJ.js.map → chunk-U66CTIF5.js.map} +0 -0
- /package/dist/{chunk-D2AKUKAQ.js.map → chunk-UIK3U36O.js.map} +0 -0
- /package/dist/{chunk-XLEP7SS3.js.map → chunk-UMSH4I3E.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-UVYI6VIX.js.map} +0 -0
- /package/dist/{chunk-LHBOFROT.js.map → chunk-V2XMG7GM.js.map} +0 -0
- /package/dist/{chunk-NQOM6PHO.js.map → chunk-VCOCOBUS.js.map} +0 -0
- /package/dist/{chunk-4P4VLPGB.js.map → chunk-VECRSYQG.js.map} +0 -0
- /package/dist/{chunk-ID2PLENW.js.map → chunk-VHBGJAYC.js.map} +0 -0
- /package/dist/{chunk-RVYXSS3Q.js.map → chunk-VIS23B6O.js.map} +0 -0
- /package/dist/{chunk-NMKETOAX.js.map → chunk-VSHWPOUB.js.map} +0 -0
- /package/dist/{chunk-UBN5AOLT.js.map → chunk-W5EO4USJ.js.map} +0 -0
- /package/dist/{chunk-Y7427SL7.js.map → chunk-WCGJK4NQ.js.map} +0 -0
- /package/dist/{chunk-CCYXCT4B.js.map → chunk-WQYS47G4.js.map} +0 -0
- /package/dist/{chunk-JH2ALMPR.js.map → chunk-WR5POHQ3.js.map} +0 -0
- /package/dist/{chunk-DK5VMJL3.js.map → chunk-WT2VVYBM.js.map} +0 -0
- /package/dist/{chunk-EHIKY2IA.js.map → chunk-WU5WTCH5.js.map} +0 -0
- /package/dist/{chunk-QKXPOLQD.js.map → chunk-WUBGMV3G.js.map} +0 -0
- /package/dist/{chunk-O6YJI5VX.js.map → chunk-WUL6LDJ4.js.map} +0 -0
- /package/dist/{chunk-5EILJ6W2.js.map → chunk-WXPBDEMW.js.map} +0 -0
- /package/dist/{chunk-U7HJBODU.js.map → chunk-XKTHJHSQ.js.map} +0 -0
- /package/dist/{chunk-JFI3ATK4.js.map → chunk-XMYWYJM2.js.map} +0 -0
- /package/dist/{chunk-64S6X4IU.js.map → chunk-XTN54NML.js.map} +0 -0
- /package/dist/{chunk-VGFNTY3Y.js.map → chunk-YFXRLRKP.js.map} +0 -0
- /package/dist/{chunk-DAOMWGO2.js.map → chunk-ZX5N5D6M.js.map} +0 -0
- /package/dist/{chunk-PTRPOJ7U.js.map → chunk-ZXFKG7VZ.js.map} +0 -0
- /package/dist/{resolution-4ZEQPXUZ.js.map → extraction-window-drain.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/extraction-judge.ts"],"sourcesContent":["/**\n * Extraction Judge — LLM-as-judge fact-worthiness gate (issue #376).\n *\n * Evaluates extracted facts against a durability rubric before they are\n * persisted. Facts that are unlikely to be useful 30+ days from now or\n * across sessions are rejected (or shadow-logged depending on config).\n *\n * Design constraints:\n * - Corrections and principles are auto-approved (safety bypass).\n * - Critical-importance facts are auto-approved.\n * - Batches respect extractionJudgeBatchSize.\n * - Content-hash caching avoids redundant LLM calls.\n * - LLM calls use extractionJudgeTimeoutMs (default 20s: measured 2.1-2.5 s\n * per compact verdict request with a batch-scaled completion budget on a\n * small fast judge model; 13-22 s per compact call, 41 s verbose, on the\n * big shared core model — raise it there; the old 150s default only\n * papered over 59-305s verbose replies).\n */\n\nimport { createHash } from \"node:crypto\";\nimport { log } from \"./logger.js\";\nimport type { PluginConfig, ImportanceLevel } from \"./types.js\";\nimport type { LocalLlmClient } from \"./local-llm.js\";\nimport { type FallbackLlmClient, gatewayTaskChainOptions } from \"./fallback-llm.js\";\nimport { extractJsonCandidates } from \"./json-extract.js\";\nimport { normalizeProcedureSteps } from \"./procedural/procedure-types.js\";\nimport { OUTPUT_LANGUAGE_POLICY } from \"./extraction-prompt.js\";\n\n// ---------------------------------------------------------------------------\n// Public interfaces\n// ---------------------------------------------------------------------------\n\nexport interface JudgeCandidate {\n text: string;\n category: string;\n confidence: number;\n tags?: string[];\n /** Local importance level, set by caller before judging. */\n importanceLevel?: ImportanceLevel;\n}\n\n/**\n * Verdict kinds (issue #562, PR 1).\n *\n * - `\"accept\"`: fact is durable, persist it.\n * - `\"reject\"`: fact is not durable, drop it.\n * - `\"defer\"`: fact is ambiguous; push it back into the buffer for another\n * pass with fresh context. Inspired by MemReader (arxiv 2604.07877).\n *\n * PR 1 only introduces the type. No emit path produces `\"defer\"` yet — the\n * defer-capable prompt, buffer re-routing, telemetry, and GRPO data\n * collection are landing in PRs 2, 3, and 4 respectively.\n */\nexport type JudgeVerdictKind = \"accept\" | \"reject\" | \"defer\";\n\n/**\n * Judge verdict shape.\n *\n * Back-compat note: `kind` is optional. Verdicts serialized before PR 1\n * (both in-memory cache entries and any persisted caches) only carry\n * `{ durable, reason }`. Downstream consumers must either read `durable`\n * directly, or use {@link getVerdictKind} / {@link isDurableVerdict} which\n * gracefully fall back to the boolean when `kind` is missing, and ignore\n * unknown future `kind` values rather than crashing.\n */\nexport interface JudgeVerdict {\n /**\n * True iff the fact should be persisted. For `\"defer\"` verdicts this is\n * `false` — a deferred fact is not (yet) persisted, so callers that only\n * look at `durable` will treat defer as \"skip this turn\", which matches\n * the pre-PR-1 fail-closed behavior for non-accepted verdicts.\n */\n durable: boolean;\n reason: string;\n /**\n * Optional explicit verdict kind. Added in PR 1 of issue #562. Legacy\n * verdicts (including cache entries produced before this field existed)\n * do not set `kind`; use {@link getVerdictKind} to read this safely.\n */\n kind?: JudgeVerdictKind;\n}\n\n/**\n * Resolve a verdict's effective kind.\n *\n * - If `kind` is explicitly set to one of the known values, return it.\n * - If `kind` is absent, infer from `durable` (back-compat with pre-PR-1\n * cache entries and emit paths that have not been updated yet).\n * - If `kind` is set to an unrecognised value (forward-compat, e.g. a\n * future cache entry loaded by an older build), fall back to `durable`\n * so we never crash on unknown strings.\n */\nexport function getVerdictKind(verdict: JudgeVerdict): JudgeVerdictKind {\n const raw = verdict.kind;\n if (raw === \"accept\" || raw === \"reject\" || raw === \"defer\") {\n return raw;\n }\n return verdict.durable ? \"accept\" : \"reject\";\n}\n\n/**\n * Type guard: returns `true` only for verdicts that should be persisted.\n * Treats both `\"reject\"` and `\"defer\"` as \"not durable\" — defer means the\n * caller should re-evaluate later, not write now.\n */\nexport function isDurableVerdict(verdict: JudgeVerdict): boolean {\n return getVerdictKind(verdict) === \"accept\";\n}\n\n/**\n * Validate a cache entry loaded from persistence / another process.\n *\n * Strict: accepts legacy `{ durable, reason }` entries and new entries\n * whose `kind` is one of the three known `JudgeVerdictKind` values.\n * Rejects structurally wrong types and unknown `kind` strings so the\n * type-guard narrowing is sound — callers that receive\n * `value is JudgeVerdict` can safely treat `kind` as the declared\n * union.\n *\n * Forward-compat is handled by {@link normalizeCachedVerdict}, which\n * drops unknown `kind` strings before validation so a newer build's\n * cache entry still loads instead of being rejected.\n */\nexport function isValidCachedVerdict(value: unknown): value is JudgeVerdict {\n if (typeof value !== \"object\" || value === null) return false;\n const v = value as Record<string, unknown>;\n if (typeof v.durable !== \"boolean\") return false;\n if (typeof v.reason !== \"string\") return false;\n if (v.kind !== undefined) {\n if (v.kind !== \"accept\" && v.kind !== \"reject\" && v.kind !== \"defer\") {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Forward-compatible cache-entry loader.\n *\n * Drops unknown `kind` strings to `undefined` (so `getVerdictKind` can\n * fall back to `durable`), then validates structurally. Non-string\n * `kind` values are still treated as structural violations and rejected.\n * Returns the sanitised verdict, or `null` when the entry is structurally\n * unusable.\n */\nexport function normalizeCachedVerdict(value: unknown): JudgeVerdict | null {\n if (typeof value !== \"object\" || value === null) return null;\n const v = value as Record<string, unknown>;\n if (typeof v.durable !== \"boolean\") return null;\n if (typeof v.reason !== \"string\") return null;\n let kind: JudgeVerdictKind | undefined;\n if (v.kind !== undefined) {\n if (typeof v.kind !== \"string\") return null;\n if (v.kind === \"accept\" || v.kind === \"reject\" || v.kind === \"defer\") {\n kind = v.kind;\n }\n // Unknown string `kind`: dropped to undefined for forward-compat.\n }\n const out: JudgeVerdict = { durable: v.durable, reason: v.reason };\n if (kind !== undefined) out.kind = kind;\n return out;\n}\n\nexport interface JudgeBatchResult {\n verdicts: Map<number, JudgeVerdict>;\n /** Number of verdicts served from cache. */\n cached: number;\n /** Number of verdicts produced by an LLM call. */\n judged: number;\n /** Total wall-clock time in milliseconds. */\n elapsed: number;\n /**\n * Number of verdicts in this batch that resolved to `\"defer\"` (issue #562,\n * PR 2). Callers can use this to decide whether to retain buffer turns for\n * the next extraction pass.\n */\n deferred: number;\n /**\n * Number of defers that were forcibly converted to `\"reject\"` because the\n * same candidate text had already been deferred at least\n * `extractionJudgeMaxDeferrals` times. Rolled out of `deferred` — a\n * candidate counted here is *not* also in `deferred`.\n */\n deferredCappedToReject: number;\n}\n\n/**\n * Per-verdict observation emitted by `judgeFactDurability` when an\n * `onVerdict` callback is supplied (issue #562, PR 3). Used to wire the\n * observation ledger / telemetry stream without coupling the judge module\n * directly to filesystem I/O. One event is emitted for every resolved\n * verdict, including auto-approved and cache-hit paths.\n */\nexport interface JudgeVerdictObservation {\n verdict: JudgeVerdict;\n /** The original `JudgeCandidate` passed in (same reference). */\n candidate: JudgeCandidate;\n /** SHA-256 of `text\\0category`, same key the cache/deferCounter use. */\n contentHash: string;\n /** Verdict resolution path. Useful for debugging + dashboards. */\n source: \"auto-approve\" | \"cache\" | \"llm\" | \"llm-cap-rejected\" | \"fail-open\";\n /**\n * How many times this candidate had already been deferred before this\n * verdict resolved. 0 when the candidate had never been deferred.\n */\n priorDeferrals: number;\n /**\n * Milliseconds from batch start to now. Shared across verdicts emitted in\n * the same batch.\n */\n elapsedMs: number;\n}\n\n// ---------------------------------------------------------------------------\n// Prompt (embedded; mirrors prompts/extraction_judge.prompt.md)\n// ---------------------------------------------------------------------------\n\nexport const JUDGE_SYSTEM_PROMPT = `You are a memory curator evaluating whether extracted facts are **durable** — worth storing for long-term recall across sessions.\n\nA fact is **durable** if it will still be useful 30+ days from now and is relevant across multiple sessions, not just the current task.\n\nThe user message is a JSON array of candidates: [{\"index\": 0, \"text\": \"...\", \"category\": \"...\", \"confidence\": 0.5}, ...].\n\nVerdicts:\n- \"accept\" — durable. Personal preferences, identities, relationships; decisions with rationale that affect future work; corrections to previously held beliefs; principles, rules, or constraints the user wants respected; stable facts about projects, tools, or workflows; commitments, deadlines, or obligations.\n- \"reject\" — not durable. Transient task details (\"currently debugging line 42\"); ephemeral state (\"the build is running now\"); routine operations (\"ran npm install\"); conversational filler; anything stale within hours; step-by-step instructions for a one-time task.\n- \"defer\" — MIGHT be durable but the candidate alone cannot say: ambiguous referents (\"he said they'd follow up\"), in-progress statements that may become durable once completed, future commitments with unclear subject or timeline. Defer is NOT a soft reject: use it only when another turn of context would genuinely change the verdict; when torn between accept and reject, lean accept — losing a useful fact is worse than keeping a marginal one.\n\nReply with a JSON object with a single \"verdicts\" key, exactly one object per input candidate:\n{\"verdicts\": [{\"index\": <candidate index>, \"kind\": \"accept\" | \"reject\" | \"defer\"}]}\n\nRules:\n1. The top level must be one object {\"verdicts\": [...]} — JSON mode rejects a bare top-level array.\n2. Copy each object's \"index\" from the input candidate. One object per candidate, exactly.\n3. No other fields — no \"reason\", no \"durable\", no commentary.\n4. Output valid JSON only. No markdown fences.\n5. ${OUTPUT_LANGUAGE_POLICY}\n\nExample output:\n{\"verdicts\": [{\"index\": 0, \"kind\": \"accept\"}, {\"index\": 1, \"kind\": \"reject\"}, {\"index\": 2, \"kind\": \"defer\"}]}`;\n\n// ---------------------------------------------------------------------------\n// Judge request assembly (PR 3264 follow-up)\n// ---------------------------------------------------------------------------\n\n/** Completion tokens reserved per candidate verdict (measured 13 on a small judge model). */\nconst JUDGE_TOKENS_PER_CANDIDATE = 24;\n/** Ceiling on one judge reply: the old flat budget. */\nexport const MAX_JUDGE_TOKENS = 2048;\n/**\n * Extra completion tokens for a judge call routed through the Responses API. Reasoning tokens count against\n * `max_output_tokens`, so the compact verdict budget alone can be spent before a reasoning-enabled model answers; the\n * unparsed batch would then fail open as durable. A cap, not a target: a non-reasoning model still writes a short reply.\n */\nexport const JUDGE_REASONING_HEADROOM_TOKENS = 1024;\n/** Largest batch whose verdict array fits MAX_JUDGE_TOKENS; a larger configured batch is split. */\nexport const MAX_JUDGE_BATCH = Math.floor(MAX_JUDGE_TOKENS / JUDGE_TOKENS_PER_CANDIDATE);\n\n/**\n * Compact completion budget for one judge call. A verdict is\n * `{\"index\":12,\"kind\":\"reject\"}` (~14 tokens), so the old flat 2048 only gave\n * a slow model room to produce 59-305s replies that hid inside the timeout.\n * Scales with the batch size (about 24 tokens per candidate verdict, measured\n * 13 per verdict on a small judge model) so a large batch is never truncated;\n * capped at 2048, the old flat budget.\n */\nexport function judgeMaxTokens(batchSize: number): number {\n return Math.min(MAX_JUDGE_TOKENS, Math.max(64, batchSize * JUDGE_TOKENS_PER_CANDIDATE));\n}\n\n/** One indexed candidate entry in a judge request payload. */\nexport interface JudgeRequestEntry {\n index: number;\n text: string;\n category: string;\n confidence: number;\n}\n\n/** Full judge LLM request: messages plus the completion budget. */\nexport interface JudgeRequest {\n messages: Array<{ role: \"system\" | \"user\"; content: string }>;\n maxTokens: number;\n}\n\n/** Build a full judge request body: messages plus the completion budget. */\nexport function buildJudgeRequest(entries: readonly JudgeRequestEntry[]): JudgeRequest {\n return {\n messages: [\n { role: \"system\", content: JUDGE_SYSTEM_PROMPT },\n { role: \"user\", content: JSON.stringify(entries) },\n ],\n maxTokens: judgeMaxTokens(entries.length),\n };\n}\n\n// ---------------------------------------------------------------------------\n// Content-hash cache (in-memory, per-process fallback)\n// ---------------------------------------------------------------------------\n\n/** Maximum entries before evicting the oldest half. */\nconst VERDICT_CACHE_MAX_SIZE = 10_000;\n\n/** Module-level fallback cache, used when callers do not pass their own. */\nconst defaultVerdictCache = new Map<string, JudgeVerdict>();\n\n/**\n * Per-content-hash deferral counter (issue #562, PR 2).\n *\n * When the judge emits a `\"defer\"` verdict for a candidate whose content\n * has already been deferred `extractionJudgeMaxDeferrals` times, the verdict\n * is forcibly converted to `\"reject\"` so a pathological LLM response cannot\n * produce an infinite defer loop.\n *\n * Module-level with a size cap so stale test state cannot leak between runs\n * in the unlikely case a caller does not clear it between processes.\n */\nconst defaultDeferCounts = new Map<string, number>();\nconst DEFER_COUNT_MAX_SIZE = 20_000;\n\nfunction cacheKey(text: string, category: string): string {\n return createHash(\"sha256\").update(`${text}\\0${category}`).digest(\"hex\");\n}\n\n/**\n * Resolve the effective defer cap from config, defaulting to 2 when the\n * config value is missing or non-positive. Matches the PR 2 spec.\n */\nfunction resolveDeferCap(config: PluginConfig): number {\n const raw = (config as { extractionJudgeMaxDeferrals?: number })\n .extractionJudgeMaxDeferrals;\n if (typeof raw === \"number\" && Number.isFinite(raw) && raw >= 1) {\n return Math.floor(raw);\n }\n return 2;\n}\n\n/**\n * Enforce the max-size invariant on a verdict cache. When the cache exceeds\n * VERDICT_CACHE_MAX_SIZE, the oldest half of entries are deleted (Map\n * iteration order is insertion order).\n */\nfunction enforceMaxCacheSize(cache: Map<string, JudgeVerdict>): void {\n if (cache.size <= VERDICT_CACHE_MAX_SIZE) return;\n const deleteCount = Math.floor(cache.size / 2);\n let deleted = 0;\n for (const key of cache.keys()) {\n if (deleted >= deleteCount) break;\n cache.delete(key);\n deleted++;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Categories that bypass the judge (safety / correctness)\n// ---------------------------------------------------------------------------\n\nconst AUTO_APPROVE_CATEGORIES = new Set([\"correction\", \"principle\"]);\n\n/** Explicit trigger phrasing — procedures must match to persist (issue #519). */\nconst PROCEDURE_TRIGGER_RE =\n /(when you|whenever|before you|before running|always\\s|first\\b.*\\bthen|to deploy|to ship|run these steps|follow these steps|how (i|we)\\s|recipe for|workflow|each time you)/i;\n\n/**\n * Deterministic gate for extracted `procedure` memories: ≥2 steps with non-empty\n * intents and explicit trigger wording in title and/or steps.\n */\nexport function validateProcedureExtraction(input: {\n content: string;\n procedureSteps?: unknown;\n}): JudgeVerdict {\n const steps = normalizeProcedureSteps(input.procedureSteps);\n if (steps.length < 2) {\n return { durable: false, reason: \"Procedure requires at least two steps with intents\" };\n }\n const combined = [input.content, ...steps.map((s) => s.intent)].join(\" \").toLowerCase();\n if (!PROCEDURE_TRIGGER_RE.test(combined)) {\n return { durable: false, reason: \"Procedure missing explicit trigger phrasing\" };\n }\n return { durable: true, reason: \"Procedure structure validated\" };\n}\n\n// ---------------------------------------------------------------------------\n// Core judge function\n// ---------------------------------------------------------------------------\n\n/**\n * Evaluate a batch of candidate facts for durability.\n *\n * Auto-approves corrections, principles, and critical-importance facts.\n * Remaining candidates are batched (up to extractionJudgeBatchSize),\n * checked against an in-memory content-hash cache, and sent to the LLM\n * for verdict.\n */\nexport async function judgeFactDurability(\n candidates: JudgeCandidate[],\n config: PluginConfig,\n localLlm: LocalLlmClient | null,\n fallbackLlm: FallbackLlmClient | null,\n cache?: Map<string, JudgeVerdict>,\n deferCounts?: Map<string, number>,\n onVerdict?: (observation: JudgeVerdictObservation) => void,\n): Promise<JudgeBatchResult> {\n const startMs = Date.now();\n const verdicts = new Map<number, JudgeVerdict>();\n let cached = 0;\n let judged = 0;\n let deferred = 0;\n let deferredCappedToReject = 0;\n\n // Use caller-provided cache for per-orchestrator scoping, or fall back\n // to the module-level default cache.\n const verdictCache = cache ?? defaultVerdictCache;\n const deferCountMap = deferCounts ?? defaultDeferCounts;\n const deferCap = resolveDeferCap(config);\n\n // Lazy emit (Codex P2): when `onVerdict` is undefined (default path —\n // telemetry off), payload construction is skipped entirely. Callers\n // pass a factory instead of a pre-built observation so the `sha256`\n // `contentHash` and surrounding object allocation only run when a\n // subscriber is present. For large batches with telemetry off this\n // removes per-verdict overhead that would otherwise fire on every\n // auto-approved / cache / fail-open path.\n const emit = (build: () => JudgeVerdictObservation): void => {\n if (!onVerdict) return;\n let observation: JudgeVerdictObservation;\n try {\n observation = build();\n } catch (err) {\n log.debug(\n `extraction-judge: onVerdict builder threw (non-fatal): ${err instanceof Error ? err.message : String(err)}`,\n );\n return;\n }\n try {\n onVerdict(observation);\n } catch (err) {\n // Fail-open: telemetry errors must never block extraction.\n log.debug(\n `extraction-judge: onVerdict callback threw (non-fatal): ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n };\n\n if (candidates.length === 0) {\n return {\n verdicts,\n cached,\n judged,\n elapsed: 0,\n deferred,\n deferredCappedToReject,\n };\n }\n\n // Indices that need LLM judgment\n const pendingIndices: number[] = [];\n\n for (let i = 0; i < candidates.length; i++) {\n const c = candidates[i];\n\n // Auto-approve safety categories\n if (AUTO_APPROVE_CATEGORIES.has(c.category)) {\n const v: JudgeVerdict = {\n durable: true,\n reason: `Auto-approved: ${c.category} category bypasses judge`,\n };\n verdicts.set(i, v);\n emit(() => ({\n verdict: v,\n candidate: c,\n contentHash: cacheKey(c.text, c.category),\n source: \"auto-approve\",\n priorDeferrals: 0,\n elapsedMs: Date.now() - startMs,\n }));\n continue;\n }\n\n // Auto-approve critical importance\n if (c.importanceLevel === \"critical\") {\n const v: JudgeVerdict = {\n durable: true,\n reason: \"Auto-approved: critical importance\",\n };\n verdicts.set(i, v);\n emit(() => ({\n verdict: v,\n candidate: c,\n contentHash: cacheKey(c.text, c.category),\n source: \"auto-approve\",\n priorDeferrals: 0,\n elapsedMs: Date.now() - startMs,\n }));\n continue;\n }\n\n // Check cache\n const key = cacheKey(c.text, c.category);\n const cachedVerdict = verdictCache.get(key);\n if (cachedVerdict) {\n verdicts.set(i, cachedVerdict);\n cached++;\n emit(() => ({\n verdict: cachedVerdict,\n candidate: c,\n contentHash: key,\n source: \"cache\",\n priorDeferrals: deferCountMap.get(key) ?? 0,\n elapsedMs: Date.now() - startMs,\n }));\n continue;\n }\n\n pendingIndices.push(i);\n }\n\n // If all resolved without LLM, return early\n if (pendingIndices.length === 0) {\n return {\n verdicts,\n cached,\n judged,\n elapsed: Date.now() - startMs,\n deferred,\n deferredCappedToReject,\n };\n }\n\n // Batch the pending candidates up to batchSize\n const batchSize = Math.min(config.extractionJudgeBatchSize, MAX_JUDGE_BATCH);\n // Defer bookkeeping spans the WHOLE call, not one batch: identical candidates can land in different batches, and each key\n // must advance the defer cap once and decide against the same prior count (the snapshot taken at its first sighting).\n const deferredThisCall = new Set<string>();\n const priorDefersSeen = new Map<string, number>();\n for (let batchStart = 0; batchStart < pendingIndices.length; batchStart += batchSize) {\n const batchIndices = pendingIndices.slice(batchStart, batchStart + batchSize);\n const request = buildJudgeRequest(\n batchIndices.map((idx) => ({\n index: idx,\n text: candidates[idx].text,\n category: candidates[idx].category,\n confidence: candidates[idx].confidence,\n })),\n );\n\n try {\n const llmResponse = await callJudgeLlm(request, config, localLlm, fallbackLlm);\n\n if (llmResponse) {\n const parsed = parseJudgeResponse(llmResponse, batchIndices);\n // Per-call defer-increment dedupe (codex P2): a single extraction\n // pass must not advance the cap more than once for identical\n // candidate content, even if the same text appears several times in\n // one LLM response or in different batches of one call. Duplicate\n // hits share the first sighting's `priorDeferrals` snapshot.\n for (const [idx, rawVerdict] of parsed.entries()) {\n const c = candidates[idx];\n const key = cacheKey(c.text, c.category);\n let verdict = rawVerdict;\n let source: JudgeVerdictObservation[\"source\"] = \"llm\";\n if (!priorDefersSeen.has(key)) priorDefersSeen.set(key, deferCountMap.get(key) ?? 0);\n const priorDefers = priorDefersSeen.get(key) ?? 0;\n\n // Defer cap (issue #562, PR 2). A candidate that has already been\n // deferred `deferCap` times is forcibly rejected so a pathological\n // LLM response cannot produce an infinite defer loop.\n if (getVerdictKind(verdict) === \"defer\") {\n if (priorDefers >= deferCap) {\n verdict = {\n durable: false,\n reason: `Defer cap reached (${deferCap} prior defers); rejecting`,\n kind: \"reject\",\n };\n source = \"llm-cap-rejected\";\n // Only clear + count the cap conversion once per batch for\n // this key — duplicates in the same response all resolve to\n // reject but should not inflate the cap-rejection counter.\n if (!deferredThisCall.has(key)) {\n deferCountMap.delete(key);\n deferredCappedToReject++;\n deferredThisCall.add(key);\n }\n } else if (!deferredThisCall.has(key)) {\n deferCountMap.set(key, priorDefers + 1);\n deferred++;\n deferredThisCall.add(key);\n // Bound the per-process defer-counter map.\n if (deferCountMap.size > DEFER_COUNT_MAX_SIZE) {\n const drop = Math.floor(deferCountMap.size / 2);\n let dropped = 0;\n for (const k of deferCountMap.keys()) {\n if (dropped >= drop) break;\n deferCountMap.delete(k);\n dropped++;\n }\n }\n }\n // else: duplicate defer for a key already counted this call —\n // no additional counter increment, verdict still marked defer.\n } else {\n // On accept/reject, clear any outstanding defer counter so a\n // future reappearance of the same text starts fresh.\n deferCountMap.delete(key);\n priorDefersSeen.set(key, 0);\n deferredThisCall.delete(key);\n }\n\n verdicts.set(idx, verdict);\n judged++;\n // Cache non-defer verdicts. Defer is intentionally NOT cached:\n // caching it would short-circuit the re-evaluation pass that is\n // the entire point of the defer verdict.\n if (getVerdictKind(verdict) !== \"defer\") {\n verdictCache.set(key, verdict);\n }\n emit(() => ({\n verdict,\n candidate: c,\n contentHash: key,\n source,\n priorDeferrals: priorDefers,\n elapsedMs: Date.now() - startMs,\n }));\n }\n // Evict oldest entries if cache exceeds max size\n enforceMaxCacheSize(verdictCache);\n }\n } catch (err) {\n // Fail-open: if the LLM call fails, approve all candidates in this batch\n log.warn(\n `extraction-judge: LLM call failed, approving batch (fail-open): ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n\n // Fill in any missing verdicts from this batch (fail-open: approve).\n // Clear defer counts so a transient outage doesn't leave stale state\n // that causes later defers to hit the cap early.\n for (const idx of batchIndices) {\n if (!verdicts.has(idx)) {\n const c = candidates[idx];\n const hash = cacheKey(c.text, c.category);\n // Capture the prior deferral count BEFORE clearing so the\n // telemetry event reflects the true state rather than always 0.\n const priorDefers = deferCountMap.get(hash) ?? 0;\n deferCountMap.delete(hash);\n priorDefersSeen.set(hash, 0);\n deferredThisCall.delete(hash);\n const v: JudgeVerdict = {\n durable: true,\n reason: \"Approved by default (judge unavailable or parse error)\",\n };\n verdicts.set(idx, v);\n emit(() => {\n return {\n verdict: v,\n candidate: c,\n contentHash: hash,\n source: \"fail-open\",\n priorDeferrals: priorDefers,\n elapsedMs: Date.now() - startMs,\n };\n });\n }\n }\n }\n\n return {\n verdicts,\n cached,\n judged,\n elapsed: Date.now() - startMs,\n deferred,\n deferredCappedToReject,\n };\n}\n\n// ---------------------------------------------------------------------------\n// LLM call helpers\n// ---------------------------------------------------------------------------\n\nasync function callJudgeLlm(\n request: JudgeRequest,\n config: PluginConfig,\n localLlm: LocalLlmClient | null,\n fallbackLlm: FallbackLlmClient | null,\n): Promise<string | null> {\n const { messages, maxTokens } = request;\n\n const modelOverride = config.extractionJudgeModel || undefined;\n\n // When modelSource is \"gateway\", skip localLlm and go directly to fallback\n // (the gateway-routed backend). This respects the operator's explicit\n // routing preference.\n const skipLocal = config.modelSource === \"gateway\";\n\n // Route judge-gated extractions through the SAME shared resolution as every\n // other background task (taskModelChain > gatewayAgentId in gateway mode), so\n // the judge never silently falls back to the persona/default chain when a\n // task chain is configured (gotcha #22, #39). Issue #1365 / PR #1425.\n const gatewayChain = gatewayTaskChainOptions(config);\n\n // Try local LLM first (unless modelSource says gateway)\n if (localLlm && !skipLocal) {\n try {\n const result = await (localLlm as any).chatCompletion(messages, {\n temperature: 0.1,\n maxTokens,\n // A verdict needs no reasoning: keep a thinking-capable model from spending the compact budget on it.\n disableThinking: true,\n responseFormat: { type: \"json_object\" },\n timeoutMs: config.extractionJudgeTimeoutMs,\n // The client applies timeoutMs per attempt and retries an abort once:\n // one deadline signal bounds the whole call to the configured time.\n signal: AbortSignal.timeout(config.extractionJudgeTimeoutMs),\n operation: \"extraction-judge\",\n ...(modelOverride ? { model: modelOverride } : {}),\n });\n if (result?.content) {\n return result.content;\n }\n } catch (err) {\n log.debug(\n `extraction-judge: local LLM failed, trying fallback: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n // Try fallback LLM\n if (fallbackLlm) {\n try {\n const result = await fallbackLlm.chatCompletion(\n messages as Array<{ role: \"system\" | \"user\" | \"assistant\"; content: string }>,\n {\n temperature: 0.1,\n maxTokens,\n reasoningHeadroomTokens: JUDGE_REASONING_HEADROOM_TOKENS,\n timeoutMs: config.extractionJudgeTimeoutMs,\n ...(modelOverride ? { model: modelOverride } : {}),\n ...gatewayChain,\n },\n );\n if (result?.content) {\n return result.content;\n }\n } catch (err) {\n log.debug(\n `extraction-judge: fallback LLM failed: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n return null;\n}\n\ninterface JudgeVerdictItem {\n index?: number;\n kind?: string;\n action?: string;\n durable?: boolean;\n reason?: string;\n}\n\n/** What a judge model may return: a bare array, or one object wrapping verdicts. */\ninterface JudgeEnvelope {\n verdicts?: JudgeVerdictItem[];\n index?: number;\n}\n\ntype ParsedJudgeJson = JudgeVerdictItem[] | JudgeEnvelope | null | undefined;\n\n/**\n * Normalise the object shapes a judge model returns to a verdict array.\n * Requested shape {\"verdicts\": [...]} (response_format json_object forces a\n * top-level object); a single verdict object counts as one verdict at its\n * index, never the whole batch; legacy: any array-valued key.\n */\nfunction unwrapJudgeEnvelope(parsed: ParsedJudgeJson): JudgeVerdictItem[] | null {\n if (!parsed || Array.isArray(parsed)) return null;\n if (Array.isArray(parsed.verdicts)) return parsed.verdicts;\n if (Number.isInteger(parsed.index)) return [parsed];\n for (const v of Object.values(parsed)) {\n if (Array.isArray(v)) return v;\n }\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Response parsing\n// ---------------------------------------------------------------------------\n\nfunction parseJudgeResponse(\n raw: string,\n expectedIndices: number[],\n): Map<number, JudgeVerdict> {\n const result = new Map<number, JudgeVerdict>();\n const expectedSet = new Set(expectedIndices);\n\n try {\n // Try direct parse first, then fall back to JSON extraction\n let parsed: ParsedJudgeJson;\n try {\n parsed = JSON.parse(raw);\n } catch {\n const candidates = extractJsonCandidates(raw);\n if (candidates.length > 0) {\n parsed = JSON.parse(candidates[0]);\n }\n }\n\n if (!Array.isArray(parsed)) {\n const unwrapped = unwrapJudgeEnvelope(parsed);\n if (unwrapped === null) {\n log.debug(\"extraction-judge: response is not an array, cannot parse\");\n return result;\n }\n parsed = unwrapped;\n }\n\n for (const item of parsed) {\n if (\n typeof item !== \"object\" ||\n item === null ||\n typeof (item as any).index !== \"number\"\n ) {\n continue;\n }\n const idx = (item as any).index as number;\n if (!expectedSet.has(idx)) continue;\n\n // Parse kind first — it's the primary signal in PR 2 and above.\n // Fall back to durable for pre-PR-2 model responses that only return\n // the boolean.\n let kind: JudgeVerdictKind | undefined;\n const rawKind = (item as any).kind;\n const rawAction = (item as any).action;\n if (rawKind === \"accept\" || rawKind === \"reject\" || rawKind === \"defer\") {\n kind = rawKind;\n } else if (\n rawAction === \"accept\" ||\n rawAction === \"reject\" ||\n rawAction === \"defer\"\n ) {\n // Tolerate `action` as an alias — MemReader uses that word in the\n // paper and models may echo it.\n kind = rawAction;\n }\n\n const hasDurable = typeof (item as any).durable === \"boolean\";\n const durableFromModel = hasDurable\n ? ((item as any).durable as boolean)\n : undefined;\n\n // Resolve the durable flag from kind when present; otherwise trust\n // the model's boolean; otherwise fail-open to durable=true.\n let durable: boolean;\n if (kind === \"accept\") {\n durable = true;\n } else if (kind === \"reject\" || kind === \"defer\") {\n durable = false;\n } else if (durableFromModel !== undefined) {\n durable = durableFromModel;\n } else {\n durable = true; // fail-open\n }\n\n const reason =\n typeof (item as any).reason === \"string\"\n ? ((item as any).reason as string).slice(0, 120)\n : \"No reason provided\";\n\n const verdict: JudgeVerdict = { durable, reason };\n if (kind !== undefined) verdict.kind = kind;\n result.set(idx, verdict);\n }\n } catch (err) {\n log.debug(\n `extraction-judge: failed to parse response: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n\n return result;\n}\n\n// ---------------------------------------------------------------------------\n// Cache management (exposed for testing)\n// ---------------------------------------------------------------------------\n\n/** Clear the in-memory default verdict cache. Primarily for tests. */\nexport function clearVerdictCache(): void {\n defaultVerdictCache.clear();\n defaultDeferCounts.clear();\n}\n\n/** Return the current default verdict cache size. Primarily for tests. */\nexport function verdictCacheSize(): number {\n return defaultVerdictCache.size;\n}\n\n/** Create a new per-instance verdict cache. Orchestrators should hold one. */\nexport function createVerdictCache(): Map<string, JudgeVerdict> {\n return new Map();\n}\n\n/**\n * Create a new per-instance defer-counter map. Orchestrators should hold one\n * alongside their verdict cache so defer counts survive across extraction\n * passes within a single orchestrator but do not leak across orchestrators.\n */\nexport function createD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chunk-
|
|
3
|
+
} from "./chunk-7IANFJ24.js";
|
|
4
4
|
import {
|
|
5
5
|
EngramAccessInputError
|
|
6
6
|
} from "./chunk-3MUKQQ7A.js";
|
|
@@ -71,4 +71,4 @@ defineOperation({
|
|
|
71
71
|
})
|
|
72
72
|
})
|
|
73
73
|
});
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-TTQYX7VU.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-BT7NVCML.js";
|
|
4
4
|
import {
|
|
5
5
|
isMemorySubject
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SDXBR5QO.js";
|
|
7
7
|
import {
|
|
8
8
|
assemblePersistedBody
|
|
9
9
|
} from "./chunk-JDSVLVCG.js";
|
|
@@ -443,4 +443,4 @@ export {
|
|
|
443
443
|
buildAccessWriteRequestFingerprint,
|
|
444
444
|
buildObserveRequestFingerprint
|
|
445
445
|
};
|
|
446
|
-
//# sourceMappingURL=chunk-
|
|
446
|
+
//# sourceMappingURL=chunk-TWRPWJJT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StorageManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5KZNWERU.js";
|
|
4
4
|
import {
|
|
5
5
|
getCachedRuleMemories,
|
|
6
6
|
setCachedRuleMemories
|
|
@@ -119,4 +119,4 @@ export {
|
|
|
119
119
|
compareVerifiedSemanticRuleResults,
|
|
120
120
|
searchVerifiedSemanticRules
|
|
121
121
|
};
|
|
122
|
-
//# sourceMappingURL=chunk-
|
|
122
|
+
//# sourceMappingURL=chunk-U66CTIF5.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-TBBDFYXW.js";
|
|
11
11
|
import {
|
|
12
12
|
parseQmdExplain
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-RROFIAYI.js";
|
|
14
14
|
import {
|
|
15
15
|
parseFlexibleIsoTimestamp
|
|
16
16
|
} from "./chunk-P7FMDTKL.js";
|
|
@@ -645,4 +645,4 @@ export {
|
|
|
645
645
|
appendMemoryToGraphContext,
|
|
646
646
|
resolvePersistedMemoryRelativePath
|
|
647
647
|
};
|
|
648
|
-
//# sourceMappingURL=chunk-
|
|
648
|
+
//# sourceMappingURL=chunk-UIK3U36O.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
canonicalCategoryForAlias,
|
|
3
3
|
categoryAliasCoercion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CRXGQRNA.js";
|
|
5
5
|
|
|
6
6
|
// src/access-observe-write-category.ts
|
|
7
7
|
function splitCanonicalWriteRequest(request) {
|
|
@@ -22,4 +22,4 @@ function splitCanonicalWriteRequest(request) {
|
|
|
22
22
|
export {
|
|
23
23
|
splitCanonicalWriteRequest
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-UMSH4I3E.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSearchBackend
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4QLKVZH6.js";
|
|
4
4
|
import {
|
|
5
5
|
namespaceIdentityToken,
|
|
6
6
|
normalizeNamespaceIdentity
|
|
@@ -508,4 +508,4 @@ export {
|
|
|
508
508
|
NamespaceSearchRouter,
|
|
509
509
|
normalizeQmdResultPath
|
|
510
510
|
};
|
|
511
|
-
//# sourceMappingURL=chunk-
|
|
511
|
+
//# sourceMappingURL=chunk-V2XMG7GM.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/extraction-window-drain.ts
|
|
2
|
+
function chunkExtractionWindow(turns, maxChars) {
|
|
3
|
+
if (turns.length === 0) return [];
|
|
4
|
+
const budget = Number.isFinite(maxChars) && maxChars > 0 ? Math.floor(maxChars) : Number.POSITIVE_INFINITY;
|
|
5
|
+
const chunks = [];
|
|
6
|
+
let current = [];
|
|
7
|
+
let currentChars = 0;
|
|
8
|
+
for (const turn of turns) {
|
|
9
|
+
const turnChars = turn.content.length;
|
|
10
|
+
if (current.length > 0 && currentChars + turnChars > budget) {
|
|
11
|
+
chunks.push(current);
|
|
12
|
+
current = [];
|
|
13
|
+
currentChars = 0;
|
|
14
|
+
}
|
|
15
|
+
current.push(turn);
|
|
16
|
+
currentChars += turnChars;
|
|
17
|
+
}
|
|
18
|
+
if (current.length > 0) chunks.push(current);
|
|
19
|
+
return chunks;
|
|
20
|
+
}
|
|
21
|
+
var DRAIN_DEFERRAL_REASONS = {
|
|
22
|
+
provider_circuit_open: true,
|
|
23
|
+
extraction_backoff: true
|
|
24
|
+
};
|
|
25
|
+
function classifyDrainResult(result) {
|
|
26
|
+
if (result.status !== "skipped") return "drained";
|
|
27
|
+
if (result.reason === "empty_extraction_result") {
|
|
28
|
+
return result.retainedBuffer === true ? "failed" : "drained";
|
|
29
|
+
}
|
|
30
|
+
if (result.reason !== void 0 && result.reason in DRAIN_DEFERRAL_REASONS) return "deferred";
|
|
31
|
+
return "drained";
|
|
32
|
+
}
|
|
33
|
+
function mergeDrainResults(previous, next) {
|
|
34
|
+
if (previous === null) return next;
|
|
35
|
+
const completed = previous.status === "completed" || next.status === "completed";
|
|
36
|
+
const merged = {
|
|
37
|
+
status: completed ? "completed" : "skipped",
|
|
38
|
+
persistedCount: previous.persistedCount + next.persistedCount,
|
|
39
|
+
durableOutputCount: previous.durableOutputCount + next.durableOutputCount
|
|
40
|
+
};
|
|
41
|
+
if (!completed) merged.reason = next.reason ?? previous.reason;
|
|
42
|
+
if (previous.postPersistMetadataFailed === true || next.postPersistMetadataFailed === true) {
|
|
43
|
+
merged.postPersistMetadataFailed = true;
|
|
44
|
+
}
|
|
45
|
+
return merged;
|
|
46
|
+
}
|
|
47
|
+
function extractionWindowBudgetChars(input) {
|
|
48
|
+
if (!input.registry || !input.localExtractionActive) return Number.POSITIVE_INFINITY;
|
|
49
|
+
return input.registry.calculateContextSizes(input.model, input.maxContext).maxInputChars;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
chunkExtractionWindow,
|
|
54
|
+
classifyDrainResult,
|
|
55
|
+
mergeDrainResults,
|
|
56
|
+
extractionWindowBudgetChars
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=chunk-VA3GNAWQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/extraction-window-drain.ts"],"sourcesContent":["/**\n * Trigger-drain helpers (extraction trigger stall fix).\n *\n * A session whose buffered window outgrows the extraction model's context\n * never drains: the trigger fires `extract_batch` on every observe, the\n * oversized request fails, nothing is cleared, and the window only grows.\n * These helpers split such a window into budget-fitting chunks and classify\n * each extraction run so the caller can drain successes, defer on breaker/\n * backoff retention, and drop repeatedly failing chunks.\n */\n\nimport type { ExtractionRunResult } from \"./orchestration/extraction-run.js\";\n\n/**\n * Split `turns` into chunks whose summed content length stays within\n * `maxChars`. Chunks keep turn order and never split a turn; a single turn\n * longer than the budget becomes its own chunk (the extraction prompt still\n * clamps per-turn content). A non-positive or non-finite budget, or an empty\n * window, yields at most one chunk (no chunking).\n */\nexport function chunkExtractionWindow<T extends { content: string }>(\n turns: readonly T[],\n maxChars: number,\n): T[][] {\n if (turns.length === 0) return [];\n const budget =\n Number.isFinite(maxChars) && maxChars > 0 ? Math.floor(maxChars) : Number.POSITIVE_INFINITY;\n const chunks: T[][] = [];\n let current: T[] = [];\n let currentChars = 0;\n for (const turn of turns) {\n const turnChars = turn.content.length;\n if (current.length > 0 && currentChars + turnChars > budget) {\n chunks.push(current);\n current = [];\n currentChars = 0;\n }\n current.push(turn);\n currentChars += turnChars;\n }\n if (current.length > 0) chunks.push(current);\n return chunks;\n}\n\nexport type DrainVerdict = \"drained\" | \"deferred\" | \"failed\";\n\n/**\n * Run results that deliberately RETAIN the buffer (provider breaker open,\n * per-fingerprint backoff) are deferrals, not chunk failures — counting them\n * would drop good content during a provider outage.\n */\nconst DRAIN_DEFERRAL_REASONS = {\n provider_circuit_open: true,\n extraction_backoff: true,\n};\n\nexport function classifyDrainResult(result: ExtractionRunResult): DrainVerdict {\n if (result.status !== \"skipped\") return \"drained\";\n // An empty result is a failure only when the run kept the window for retry;\n // otherwise it extracted fine, found nothing durable, and cleared its turns.\n if (result.reason === \"empty_extraction_result\") {\n return result.retainedBuffer === true ? \"failed\" : \"drained\";\n }\n if (result.reason !== undefined && result.reason in DRAIN_DEFERRAL_REASONS) return \"deferred\";\n return \"drained\";\n}\n\n/**\n * Combine chunk results into the single `ExtractionRunResult` the queue\n * contract settles with: counts sum, any completed chunk completes the drain,\n * and the last non-completed reason wins.\n */\nexport function mergeDrainResults(\n previous: ExtractionRunResult | null,\n next: ExtractionRunResult,\n): ExtractionRunResult {\n if (previous === null) return next;\n const completed = previous.status === \"completed\" || next.status === \"completed\";\n const merged: ExtractionRunResult = {\n status: completed ? \"completed\" : \"skipped\",\n persistedCount: previous.persistedCount + next.persistedCount,\n durableOutputCount: previous.durableOutputCount + next.durableOutputCount,\n };\n if (!completed) merged.reason = next.reason ?? previous.reason;\n if (previous.postPersistMetadataFailed === true || next.postPersistMetadataFailed === true) {\n merged.postPersistMetadataFailed = true;\n }\n return merged;\n}\n\n/** The slice of ModelRegistry the drain budget needs. */\nexport interface WindowBudgetRegistry {\n calculateContextSizes(modelId: string, maxContextOverride?: number): { maxInputChars: number };\n}\n\n/**\n * Character budget for one extraction request. The learned local-model window\n * only describes the extractor when the local LLM does the extracting; with a\n * gateway extractor, a disabled local LLM, or no registry (legacy hosts, test\n * doubles) there is no budget and the window runs in one request as before.\n */\nexport function extractionWindowBudgetChars(input: {\n registry: WindowBudgetRegistry | undefined;\n localExtractionActive: boolean;\n model: string;\n maxContext: number | undefined;\n}): number {\n if (!input.registry || !input.localExtractionActive) return Number.POSITIVE_INFINITY;\n return input.registry.calculateContextSizes(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A,EACrC;AACA,SAAO;AACT;AAaO,SAAS,4BAA4B,OAKjC;AACT,MAAI,CAAC,MAAM,YAAY,CAAC,MAAM,sBAAuB,QAAO,OAAO;AACnE,SAAO,MAAM,SAAS,sBAAsB,MAAM,OAAO,MAAM,UAAU,EAAE;AAC7E;","names":[]}
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
} from "./chunk-5KBIOI4G.js";
|
|
6
6
|
import {
|
|
7
7
|
composeSalvagedEnvelope
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WR5POHQ3.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveDefaultNamespaceRoot
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4HJ2QK32.js";
|
|
12
12
|
import {
|
|
13
13
|
StorageManager,
|
|
14
14
|
readRawMemoryDocument
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5KZNWERU.js";
|
|
16
16
|
import {
|
|
17
17
|
parseContinuityImprovementLoops
|
|
18
18
|
} from "./chunk-LDXUBPMO.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-BJMBJZ2Y.js";
|
|
23
23
|
import {
|
|
24
24
|
readMaybeEncryptedLines
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-QIMGULGN.js";
|
|
26
26
|
import {
|
|
27
27
|
writeFileAtomically
|
|
28
28
|
} from "./chunk-BTNNL7ZW.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
} from "./chunk-C5LWPYS3.js";
|
|
43
43
|
import {
|
|
44
44
|
readMaybeEncryptedFile
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-EYGOM6AI.js";
|
|
46
46
|
import {
|
|
47
47
|
assertPathInsideRoot
|
|
48
48
|
} from "./chunk-C7HJ3NEI.js";
|
|
@@ -1869,4 +1869,4 @@ export {
|
|
|
1869
1869
|
defaultTierMigrationCycleBudget,
|
|
1870
1870
|
CompoundingEngine
|
|
1871
1871
|
};
|
|
1872
|
-
//# sourceMappingURL=chunk-
|
|
1872
|
+
//# sourceMappingURL=chunk-VCOCOBUS.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-PARM6OYL.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-VHBGJAYC.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
headerConnector,
|
|
4
4
|
renderExtractionConversation,
|
|
5
5
|
resolveSourceConnector
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GLB6VV3J.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeReasoningTrace
|
|
9
9
|
} from "./chunk-54V4BZWP.js";
|
|
@@ -30,6 +30,9 @@ import {
|
|
|
30
30
|
stripUntrustedFactSpans,
|
|
31
31
|
truncateLocalExtractionConversation
|
|
32
32
|
} from "./chunk-3SL52JKD.js";
|
|
33
|
+
import {
|
|
34
|
+
attachExtractionProvenance
|
|
35
|
+
} from "./chunk-CIIHIAJ2.js";
|
|
33
36
|
import {
|
|
34
37
|
containsExtractionPlaceholder,
|
|
35
38
|
extractionAttributes,
|
|
@@ -37,9 +40,6 @@ import {
|
|
|
37
40
|
extractionText,
|
|
38
41
|
isPlainRecord
|
|
39
42
|
} from "./chunk-BVRZSI7Q.js";
|
|
40
|
-
import {
|
|
41
|
-
attachExtractionProvenance
|
|
42
|
-
} from "./chunk-CIIHIAJ2.js";
|
|
43
43
|
import {
|
|
44
44
|
classifyExtractionThrownError,
|
|
45
45
|
classifyFallbackParseFailure,
|
|
@@ -83,14 +83,14 @@ import {
|
|
|
83
83
|
} from "./chunk-5MA7ZLPD.js";
|
|
84
84
|
import {
|
|
85
85
|
LocalLlmClient
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-JNLYHJG7.js";
|
|
87
87
|
import {
|
|
88
88
|
normalizeProcedureSteps
|
|
89
89
|
} from "./chunk-QDW3E4RD.js";
|
|
90
90
|
import {
|
|
91
91
|
FallbackLlmClient,
|
|
92
92
|
gatewayTaskChainOptions
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-AVVCPA7U.js";
|
|
94
94
|
import {
|
|
95
95
|
buildChatCompletionTokenLimit,
|
|
96
96
|
shouldAssumeOpenAiChatCompletions
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
} from "./chunk-YBA52OKG.js";
|
|
104
104
|
import {
|
|
105
105
|
isMemoryCategory
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-TWRPWJJT.js";
|
|
107
107
|
import {
|
|
108
108
|
sanitizeMemoryContent
|
|
109
109
|
} from "./chunk-5GKPFL3S.js";
|
|
@@ -2439,4 +2439,4 @@ export {
|
|
|
2439
2439
|
shouldEnableLocalExtractionThinking,
|
|
2440
2440
|
ExtractionEngine
|
|
2441
2441
|
};
|
|
2442
|
-
//# sourceMappingURL=chunk-
|
|
2442
|
+
//# sourceMappingURL=chunk-VIS23B6O.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-FEHIOYML.js";
|
|
8
8
|
import {
|
|
9
9
|
composeMemoryEnvelope
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TWRPWJJT.js";
|
|
11
11
|
import {
|
|
12
12
|
displayErrorDetail
|
|
13
13
|
} from "./chunk-RL6NEVXT.js";
|
|
@@ -1463,4 +1463,4 @@ export {
|
|
|
1463
1463
|
serializeDecisionRecord,
|
|
1464
1464
|
parseDecisionRecord
|
|
1465
1465
|
};
|
|
1466
|
-
//# sourceMappingURL=chunk-
|
|
1466
|
+
//# sourceMappingURL=chunk-VSHWPOUB.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
SecureStoreLockedError,
|
|
10
10
|
readMaybeEncryptedFile,
|
|
11
11
|
writeMaybeEncryptedFile
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EYGOM6AI.js";
|
|
13
13
|
import {
|
|
14
14
|
isErrnoCode
|
|
15
15
|
} from "./chunk-KNA3BXXL.js";
|
|
@@ -577,4 +577,4 @@ export {
|
|
|
577
577
|
FactHashIndexNotAuthoritativeError,
|
|
578
578
|
ContentHashIndex
|
|
579
579
|
};
|
|
580
|
-
//# sourceMappingURL=chunk-
|
|
580
|
+
//# sourceMappingURL=chunk-W5EO4USJ.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LcmDag
|
|
3
|
+
} from "./chunk-7N4KAIGN.js";
|
|
1
4
|
import {
|
|
2
5
|
LcmWorkQueue
|
|
3
6
|
} from "./chunk-MMCO4SRG.js";
|
|
@@ -14,9 +17,6 @@ import {
|
|
|
14
17
|
import {
|
|
15
18
|
LcmArchive
|
|
16
19
|
} from "./chunk-WVP2I6C5.js";
|
|
17
|
-
import {
|
|
18
|
-
LcmDag
|
|
19
|
-
} from "./chunk-7N4KAIGN.js";
|
|
20
20
|
import {
|
|
21
21
|
nativeBindingRecoveryHint
|
|
22
22
|
} from "./chunk-LD72P4YS.js";
|
|
@@ -602,4 +602,4 @@ export {
|
|
|
602
602
|
extractLcmConfig,
|
|
603
603
|
LcmEngine
|
|
604
604
|
};
|
|
605
|
-
//# sourceMappingURL=chunk-
|
|
605
|
+
//# sourceMappingURL=chunk-WCGJK4NQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isNamespaceKind
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SRPGA6WN.js";
|
|
4
4
|
import {
|
|
5
5
|
EngramAccessInputError
|
|
6
6
|
} from "./chunk-3MUKQQ7A.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
positiveIntQueryParam,
|
|
41
41
|
optionalNamespaceKindQueryParam
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-WQYS47G4.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
composeMemoryEnvelope
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TWRPWJJT.js";
|
|
4
4
|
import {
|
|
5
5
|
log
|
|
6
6
|
} from "./chunk-3WCASNQZ.js";
|
|
@@ -17,4 +17,4 @@ function composeSalvagedEnvelope(label, input, ctx) {
|
|
|
17
17
|
export {
|
|
18
18
|
composeSalvagedEnvelope
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-WR5POHQ3.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseEntityFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5KZNWERU.js";
|
|
4
4
|
import {
|
|
5
5
|
inferMemoryStatus
|
|
6
6
|
} from "./chunk-7RJUVTVF.js";
|
|
@@ -253,4 +253,4 @@ export {
|
|
|
253
253
|
WHO_KNOWS_MCP_TOOLS,
|
|
254
254
|
handleWhoKnowsHttpQuery
|
|
255
255
|
};
|
|
256
|
-
//# sourceMappingURL=chunk-
|
|
256
|
+
//# sourceMappingURL=chunk-WT2VVYBM.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
TAG_LIMITS,
|
|
7
7
|
composeMemoryEnvelope
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TWRPWJJT.js";
|
|
9
9
|
import {
|
|
10
10
|
isTombstoneBlockedCaptureWriteLockBusy
|
|
11
11
|
} from "./chunk-YET735EZ.js";
|
|
@@ -789,4 +789,4 @@ export {
|
|
|
789
789
|
shouldProcessInlineExplicitCapture,
|
|
790
790
|
InlineExplicitCaptureProcessor
|
|
791
791
|
};
|
|
792
|
-
//# sourceMappingURL=chunk-
|
|
792
|
+
//# sourceMappingURL=chunk-WU5WTCH5.js.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ActivationPathTracker,
|
|
3
|
+
compareActivationPathCandidates,
|
|
4
|
+
reconstructActivationPath
|
|
5
|
+
} from "./chunk-LXY5VVGM.js";
|
|
1
6
|
import {
|
|
2
7
|
assertGraphLockHeld,
|
|
3
8
|
withGraphWriteLock,
|
|
@@ -12,11 +17,6 @@ import {
|
|
|
12
17
|
import {
|
|
13
18
|
emitGraphEvent
|
|
14
19
|
} from "./chunk-DEUNUKTD.js";
|
|
15
|
-
import {
|
|
16
|
-
ActivationPathTracker,
|
|
17
|
-
compareActivationPathCandidates,
|
|
18
|
-
reconstructActivationPath
|
|
19
|
-
} from "./chunk-LXY5VVGM.js";
|
|
20
20
|
import {
|
|
21
21
|
isErrnoCode
|
|
22
22
|
} from "./chunk-KNA3BXXL.js";
|
|
@@ -758,4 +758,4 @@ export {
|
|
|
758
758
|
applyPageRankRefinement,
|
|
759
759
|
applyLateralInhibition
|
|
760
760
|
};
|
|
761
|
-
//# sourceMappingURL=chunk-
|
|
761
|
+
//# sourceMappingURL=chunk-WUBGMV3G.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-SOBJ6NEY.js";
|
|
4
4
|
import {
|
|
5
5
|
summarizeDisclosureTokens
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VHBGJAYC.js";
|
|
7
7
|
import {
|
|
8
8
|
summarizeRetrievedMemoryProvenance
|
|
9
9
|
} from "./chunk-I4WBNM3M.js";
|
|
@@ -620,4 +620,4 @@ export {
|
|
|
620
620
|
renderRecallExplain,
|
|
621
621
|
parseRecallExplainFormat
|
|
622
622
|
};
|
|
623
|
-
//# sourceMappingURL=chunk-
|
|
623
|
+
//# sourceMappingURL=chunk-WUL6LDJ4.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-AAD2ZS6P.js";
|
|
5
5
|
import {
|
|
6
6
|
gatewayTaskChainOptions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AVVCPA7U.js";
|
|
8
8
|
import {
|
|
9
9
|
extractJsonCandidates
|
|
10
10
|
} from "./chunk-YBA52OKG.js";
|
|
@@ -685,4 +685,4 @@ export {
|
|
|
685
685
|
serializeFaithfulnessFields,
|
|
686
686
|
parseFaithfulnessField
|
|
687
687
|
};
|
|
688
|
-
//# sourceMappingURL=chunk-
|
|
688
|
+
//# sourceMappingURL=chunk-WXPBDEMW.js.map
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
embeddingGenerationMembership,
|
|
6
6
|
embeddingShardDirOf,
|
|
7
7
|
isEmbeddingGenerationDirPath
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
resolveSafeArchiveTarget
|
|
11
|
-
} from "./chunk-GCGJW34D.js";
|
|
8
|
+
} from "./chunk-OXSTKCYK.js";
|
|
12
9
|
import {
|
|
13
10
|
EMBEDDING_SHARD_FILE_PATTERN
|
|
14
11
|
} from "./chunk-LDWE7OZS.js";
|
|
12
|
+
import {
|
|
13
|
+
resolveSafeArchiveTarget
|
|
14
|
+
} from "./chunk-GCGJW34D.js";
|
|
15
15
|
import {
|
|
16
16
|
EmbeddingIndexStorageError
|
|
17
17
|
} from "./chunk-Y57GJDG5.js";
|
|
@@ -369,4 +369,4 @@ export {
|
|
|
369
369
|
applyChangesetEmbeddingGenerations,
|
|
370
370
|
buildChangesetGenerationManifest
|
|
371
371
|
};
|
|
372
|
-
//# sourceMappingURL=chunk-
|
|
372
|
+
//# sourceMappingURL=chunk-XKTHJHSQ.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-QUIRIG2P.js";
|
|
17
17
|
import {
|
|
18
18
|
isEncryptedFile
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EYGOM6AI.js";
|
|
20
20
|
import {
|
|
21
21
|
log
|
|
22
22
|
} from "./chunk-3WCASNQZ.js";
|
|
@@ -452,4 +452,4 @@ export {
|
|
|
452
452
|
augmentWithDirectAndTemporal,
|
|
453
453
|
parallelRetrieval
|
|
454
454
|
};
|
|
455
|
-
//# sourceMappingURL=chunk-
|
|
455
|
+
//# sourceMappingURL=chunk-XMYWYJM2.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ClaudeCodeAdapter
|
|
3
|
+
} from "./chunk-3JKYQBLC.js";
|
|
1
4
|
import {
|
|
2
5
|
CodexAdapter
|
|
3
6
|
} from "./chunk-7RKSJVOQ.js";
|
|
@@ -7,9 +10,6 @@ import {
|
|
|
7
10
|
import {
|
|
8
11
|
ReplitAdapter
|
|
9
12
|
} from "./chunk-SI36RWC3.js";
|
|
10
|
-
import {
|
|
11
|
-
ClaudeCodeAdapter
|
|
12
|
-
} from "./chunk-3JKYQBLC.js";
|
|
13
13
|
import {
|
|
14
14
|
headerValue
|
|
15
15
|
} from "./chunk-NJAIR57U.js";
|
|
@@ -110,4 +110,4 @@ export {
|
|
|
110
110
|
OpenCodeAdapter,
|
|
111
111
|
AdapterRegistry
|
|
112
112
|
};
|
|
113
|
-
//# sourceMappingURL=chunk-
|
|
113
|
+
//# sourceMappingURL=chunk-XTN54NML.js.map
|