@remnic/core 9.69.36 → 9.69.37
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.d.ts +12 -12
- package/dist/access-admin-ops-surface.js +35 -35
- package/dist/access-authorization-probe.d.ts +12 -12
- package/dist/access-authorization-probe.js +36 -36
- package/dist/access-boundary.d.ts +12 -12
- package/dist/access-boundary.js +35 -35
- package/dist/access-cli.js +116 -111
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +12 -12
- package/dist/access-extraction-force-flush.js +35 -35
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-briefing.d.ts +12 -12
- package/dist/access-http-briefing.js +36 -36
- package/dist/access-http-lcm-compaction.d.ts +12 -12
- package/dist/access-http-lifecycle-flush.d.ts +12 -12
- package/dist/access-http-offline-stream.d.ts +12 -12
- package/dist/access-http-query.d.ts +2 -2
- package/dist/access-http-query.js +37 -37
- package/dist/access-http.d.ts +13 -13
- package/dist/access-http.js +55 -55
- package/dist/access-identity-continuity-surface.d.ts +10 -10
- package/dist/access-identity-continuity-surface.js +35 -35
- package/dist/access-lcm-surface.d.ts +12 -12
- package/dist/access-lcm-surface.js +35 -35
- package/dist/access-mcp.d.ts +12 -12
- package/dist/access-mcp.js +44 -44
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight-D8qri11P.d.ts → access-namespace-preflight-CV5cHujx.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +35 -35
- package/dist/access-observe-transcript.d.ts +10 -10
- package/dist/access-observe-write-surface.d.ts +12 -12
- package/dist/access-observe-write-surface.js +35 -35
- package/dist/access-offline-manifest.d.ts +10 -10
- package/dist/access-offline-manifest.js +2 -2
- package/dist/access-operations-batch.js +38 -38
- package/dist/access-operations.d.ts +12 -12
- package/dist/access-operations.js +43 -43
- package/dist/access-recall-concurrency.d.ts +12 -12
- package/dist/access-recall-concurrency.js +35 -35
- package/dist/access-recall-response.d.ts +12 -12
- package/dist/access-recall-response.js +35 -35
- package/dist/access-recall-surface.d.ts +12 -12
- package/dist/access-recall-surface.js +35 -35
- package/dist/access-schema.d.ts +5 -5
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-Cl_x57xR.d.ts → access-service-DwHC7lcV.d.ts} +7 -7
- package/dist/access-service-helpers.d.ts +12 -12
- package/dist/access-service.d.ts +12 -12
- package/dist/access-service.js +35 -35
- package/dist/access-surface-catalog.d.ts +12 -12
- package/dist/access-surface-catalog.js +37 -37
- package/dist/access-wearables-meetings-surface.d.ts +3 -3
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +4 -3
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/{auto-sync-4YFATLFQ.js → auto-sync-FSRJDU63.js} +4 -4
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +10 -10
- package/dist/briefing-window.d.ts +2 -2
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +9 -9
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/calibration.js +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
- package/dist/{catalog-Bq1AxZwF.d.ts → catalog-Cl4H8N89.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +12 -12
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-RUXPVSML.js → chunk-2AR5JFD7.js} +2 -2
- package/dist/{chunk-YNN26CIZ.js → chunk-2JGGZICG.js} +2 -2
- package/dist/{chunk-A7GQBJP5.js → chunk-2L5FSNPC.js} +10 -10
- package/dist/{chunk-XPJNT6PI.js → chunk-2PUE5P7C.js} +7 -3
- package/dist/chunk-2PUE5P7C.js.map +1 -0
- package/dist/{chunk-27IOSH2W.js → chunk-375ARKRS.js} +32 -11
- package/dist/chunk-375ARKRS.js.map +1 -0
- package/dist/{chunk-ZTG4P7NZ.js → chunk-3IXB77DA.js} +67 -67
- package/dist/{chunk-WHHEPAO3.js → chunk-3K6UFW5B.js} +3 -3
- package/dist/{chunk-UBG4GAEP.js → chunk-3OHISDDW.js} +5 -1
- package/dist/chunk-3OHISDDW.js.map +1 -0
- package/dist/chunk-3SL52JKD.js +160 -0
- package/dist/chunk-3SL52JKD.js.map +1 -0
- package/dist/{chunk-EEBQFG5E.js → chunk-3YMDY3ZF.js} +10 -10
- package/dist/{chunk-5JG5EBVL.js → chunk-4DPDIOVA.js} +2 -2
- package/dist/{chunk-UDZYNIDJ.js → chunk-4WGAMREC.js} +2 -2
- package/dist/{chunk-HXSAWV3A.js → chunk-57GDHV2D.js} +3 -3
- package/dist/{chunk-Z7ACR6MJ.js → chunk-5LLQAUMI.js} +2 -2
- package/dist/{chunk-P3ONDDIJ.js → chunk-5SYI2F47.js} +2 -2
- package/dist/{chunk-DGS34QSY.js → chunk-6E5GYDIE.js} +2 -2
- package/dist/{chunk-J7PB5UQ4.js → chunk-6Z3WW2MW.js} +2 -2
- package/dist/{chunk-GLZH5VEN.js → chunk-76DRU7C4.js} +2 -2
- package/dist/{chunk-L2QLDZJC.js → chunk-7MJBKZPU.js} +2 -2
- package/dist/{chunk-Y63ZFP4X.js → chunk-7RKBPXY6.js} +2 -2
- package/dist/chunk-A6CXG5WI.js +51 -0
- package/dist/chunk-A6CXG5WI.js.map +1 -0
- package/dist/{chunk-JSRVXI6E.js → chunk-B2YKTE7P.js} +4 -4
- package/dist/{chunk-Z3O53WZR.js → chunk-BICNRVEC.js} +2 -2
- package/dist/{chunk-BNGHPYZU.js → chunk-BLHX5FQW.js} +2 -2
- package/dist/{chunk-7CBKAQIG.js → chunk-BOADKFN4.js} +28 -4
- package/dist/chunk-BOADKFN4.js.map +1 -0
- package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
- package/dist/{chunk-776GVKL7.js → chunk-CD3C4BJN.js} +2 -2
- package/dist/{chunk-LMCD5W5B.js → chunk-CIYUWSMZ.js} +2 -2
- package/dist/{chunk-YJ6VCDMZ.js → chunk-CQ7SSBO4.js} +2 -2
- package/dist/{chunk-CNV2A557.js → chunk-CYEMS2PG.js} +2 -2
- package/dist/{chunk-DVOBLPSQ.js → chunk-D2DIYEFW.js} +6 -6
- package/dist/chunk-D2DIYEFW.js.map +1 -0
- package/dist/{chunk-OQ7SSRXP.js → chunk-DOKKRZPH.js} +21 -17
- package/dist/chunk-DOKKRZPH.js.map +1 -0
- package/dist/{chunk-UYUCCQ46.js → chunk-DOQLHCSS.js} +2 -2
- package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
- package/dist/{chunk-RRZKTSFG.js → chunk-FCFAYMTU.js} +2 -2
- package/dist/{chunk-R4OCGPSH.js → chunk-FJMYMJLR.js} +2 -2
- package/dist/{chunk-TKFSXDOB.js → chunk-FLLORID2.js} +2 -2
- package/dist/{chunk-QATYVTP7.js → chunk-FPQDZCUX.js} +2 -2
- package/dist/{chunk-L2WQVSKP.js → chunk-G5MO3VQA.js} +2 -2
- package/dist/{chunk-LNDLXMH6.js → chunk-GDDSXVWR.js} +2 -2
- package/dist/{chunk-JZ2CHRLB.js → chunk-GHX5PNXW.js} +2 -2
- package/dist/{chunk-2BQ4ZIWC.js → chunk-GNR6YEWZ.js} +5 -5
- package/dist/{chunk-5FAGCOZD.js → chunk-GWK7FEUL.js} +4 -4
- package/dist/{chunk-SCXURCVT.js → chunk-GWQVMKUJ.js} +3 -3
- package/dist/{chunk-QBLDCI6E.js → chunk-HHDTBYDJ.js} +2 -2
- package/dist/{chunk-2YLMUME2.js → chunk-IQZ6ISFX.js} +2 -2
- package/dist/chunk-JE26AUX6.js +16 -0
- package/dist/chunk-JE26AUX6.js.map +1 -0
- package/dist/{chunk-AJTG3CP7.js → chunk-JHU4EYDV.js} +11 -1
- package/dist/chunk-JHU4EYDV.js.map +1 -0
- package/dist/{chunk-JHZCXUQI.js → chunk-JLXWRQNR.js} +33 -33
- package/dist/{chunk-FVJ4D6L7.js → chunk-JMPYZJQN.js} +1 -1
- package/dist/{chunk-HC4GFLMQ.js → chunk-JO5TQAKW.js} +3 -3
- package/dist/{chunk-ZBEGS7OB.js → chunk-JPKZTCWZ.js} +3 -3
- package/dist/{chunk-AZSKROVQ.js → chunk-JYR4LH76.js} +2 -2
- package/dist/{chunk-ECKG5WSI.js → chunk-JZYECQWN.js} +2 -2
- package/dist/{chunk-NPNSKE76.js → chunk-KTRXQQFN.js} +2 -2
- package/dist/{chunk-LEMD7WZJ.js → chunk-KUK56OPR.js} +62 -17
- package/dist/chunk-KUK56OPR.js.map +1 -0
- package/dist/{chunk-HUT2JR6I.js → chunk-L5OXE4PX.js} +2 -2
- package/dist/{chunk-B3O3IRZN.js → chunk-LMMQKZK3.js} +1 -1
- package/dist/{chunk-QURNMKME.js → chunk-LSDEIZ76.js} +2 -2
- package/dist/{chunk-XCOV45MO.js → chunk-MR6LQVZ5.js} +2 -2
- package/dist/chunk-OEBLZZKK.js +53 -0
- package/dist/chunk-OEBLZZKK.js.map +1 -0
- package/dist/{chunk-6J6K3STG.js → chunk-OTPXEE6W.js} +6 -6
- package/dist/{chunk-LYDJRF45.js → chunk-PNEDMJ53.js} +2 -2
- package/dist/{chunk-MPAJFFP3.js → chunk-PPTOAHTZ.js} +4 -4
- package/dist/{chunk-MPAJFFP3.js.map → chunk-PPTOAHTZ.js.map} +1 -1
- package/dist/{chunk-JRWW7GM6.js → chunk-Q6D7EUSQ.js} +7 -7
- package/dist/{chunk-VYXDUPYE.js → chunk-Q7JK6YEB.js} +2 -2
- package/dist/chunk-QJ2AX6DU.js +19 -0
- package/dist/chunk-QJ2AX6DU.js.map +1 -0
- package/dist/{chunk-4MDKNUV4.js → chunk-RN3MVLW3.js} +1 -1
- package/dist/chunk-RN3MVLW3.js.map +1 -0
- package/dist/{chunk-YXLUTALO.js → chunk-SAKA6PPL.js} +2 -2
- package/dist/{chunk-HWLIMQE2.js → chunk-SF6RFI5Z.js} +2 -2
- package/dist/{chunk-OS2AT2JU.js → chunk-SROIT6QY.js} +5 -5
- package/dist/{chunk-S5G2LAL7.js → chunk-SV4Z2S67.js} +4 -4
- package/dist/{chunk-DK4X5B6I.js → chunk-TFRDUD3M.js} +2 -2
- package/dist/{chunk-JR6H5CYS.js → chunk-TL7NLM2L.js} +2 -2
- package/dist/{chunk-NN4JEFON.js → chunk-TRU6JBOI.js} +2 -2
- package/dist/{chunk-PHP3MUGF.js → chunk-UYVXIY6C.js} +2 -2
- package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
- package/dist/{chunk-ZHXSOMYH.js → chunk-VVX5PZFS.js} +2 -2
- package/dist/{chunk-BJETIR53.js → chunk-WS3WNLST.js} +3 -3
- package/dist/{chunk-3FJKJ5UZ.js → chunk-X7BCM2NA.js} +2 -2
- package/dist/{chunk-Q4AUIFUA.js → chunk-XAITGGX5.js} +4 -4
- package/dist/{chunk-WPDKBUWX.js → chunk-XCF3SFHD.js} +2 -2
- package/dist/{chunk-LO4UKPKX.js → chunk-YHU5XUF4.js} +2 -2
- package/dist/{chunk-F6IVBYFS.js → chunk-YIZ2EUUL.js} +51 -51
- package/dist/{chunk-EZ25VE3G.js → chunk-YNDLCWXS.js} +4 -4
- package/dist/{chunk-5VAF4ID4.js → chunk-ZEPVWLCN.js} +9 -9
- package/dist/{cli-p813oxbm.d.ts → cli-1mzd5TM4.d.ts} +5 -5
- package/dist/cli.d.ts +14 -14
- package/dist/cli.js +79 -78
- package/dist/coding/export-okf-codegraph.d.ts +1 -1
- package/dist/coding/export-okf-codegraph.js +8 -8
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +9 -9
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +4 -3
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +9 -9
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +9 -9
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +3 -3
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +11 -11
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +11 -11
- package/dist/cross-lingual-recall.d.ts +1 -1
- package/dist/dashboard-runtime.js +2 -2
- package/dist/day-summary.d.ts +1 -1
- package/dist/deep-recall-http-glue.d.ts +12 -12
- package/dist/deep-recall-http-glue.js +4 -4
- package/dist/deep-recall-mcp-tools.d.ts +12 -12
- package/dist/deep-recall-policy-llm.d.ts +1 -1
- package/dist/deep-recall-seeds.d.ts +1 -1
- package/dist/deep-recall.js +2 -2
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +1 -1
- package/dist/{dependency-propagation-delivery-DLiAtj25.d.ts → dependency-propagation-delivery-Bua2ApHV.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-origin-fields.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +9 -9
- package/dist/entity-schema.d.ts +1 -1
- package/dist/episodic-context.d.ts +1 -1
- package/dist/eval-trajectory-contracts.d.ts +1 -1
- package/dist/eval-trajectory-store.d.ts +1 -1
- package/dist/eval-trajectory.d.ts +1 -1
- package/dist/explicit-capture.d.ts +10 -10
- package/dist/external-wiki-access.d.ts +12 -12
- package/dist/external-wiki-access.js +36 -36
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +12 -12
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction-judge.js +2 -2
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +1 -1
- package/dist/extraction-normalization.js +2 -2
- package/dist/extraction-prompt.d.ts +11 -2
- package/dist/extraction-prompt.js +7 -3
- package/dist/extraction-source-grounding-rules.d.ts +3 -2
- package/dist/extraction-source-grounding-rules.js +1 -1
- package/dist/extraction-source-grounding.d.ts +2 -2
- package/dist/extraction-source-grounding.js +2 -2
- package/dist/extraction-span-config.d.ts +15 -0
- package/dist/extraction-span-config.js +15 -0
- package/dist/extraction-span-materialize.d.ts +105 -0
- package/dist/extraction-span-materialize.js +30 -0
- package/dist/extraction-span-materialize.js.map +1 -0
- package/dist/extraction-span-slice.js +3 -12
- package/dist/extraction-span-slice.js.map +1 -1
- package/dist/extraction-span-source-hash.js +4 -46
- package/dist/extraction-span-source-hash.js.map +1 -1
- package/dist/extraction-span-validate.js +3 -15
- package/dist/extraction-span-validate.js.map +1 -1
- package/dist/extraction.d.ts +7 -1
- package/dist/extraction.js +20 -16
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{first-start-migration-L3UFX5CU.js → first-start-migration-GZ45G5FS.js} +4 -4
- package/dist/{generic-recall-paths-DbitKJI5.d.ts → generic-recall-paths-DJBADojG.d.ts} +1 -1
- package/dist/graph-append-error.d.ts +1 -1
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/{graph-edge-decay-MKIRZ762.js → graph-edge-decay-ROSUPDX3.js} +5 -5
- package/dist/graph-edge-decay-ROSUPDX3.js.map +1 -0
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-jsonl.d.ts +1 -1
- package/dist/graph-jsonl.js +3 -3
- package/dist/graph-path-reconstruction.d.ts +1 -1
- package/dist/graph-path-scoring.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph.d.ts +1 -1
- package/dist/graph.js +2 -2
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/importers/test-utils.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/{index-BINUgPFo.d.ts → index-Bsy8ygLL.d.ts} +2 -2
- package/dist/index.d.ts +24 -24
- package/dist/index.js +147 -142
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +4 -4
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +9 -9
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/location/index.d.ts +3 -3
- package/dist/location/index.js +11 -11
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +9 -9
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +9 -9
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +10 -10
- package/dist/{maintenance-ag1gYztC.d.ts → maintenance-DItyBwTC.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +12 -12
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-controller.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-snapshot.d.ts +1 -1
- package/dist/memory-subject-cli.d.ts +12 -12
- package/dist/memory-subject.d.ts +12 -12
- package/dist/memory-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +10 -10
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +5 -5
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +9 -9
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +12 -12
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +23 -22
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +17 -17
- package/dist/{orchestrator-Cf3G-3Ed.d.ts → orchestrator-DBUX-aAM.d.ts} +9 -9
- package/dist/orchestrator.d.ts +10 -10
- package/dist/orchestrator.js +117 -112
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-AwB03fw_.d.ts → pipeline-BqgcOk1Z.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{public-http-C3bLjE-L.d.ts → public-http-CqtZ5kv3.d.ts} +1 -1
- package/dist/{qmd-Bfaydrfm.d.ts → qmd-BD0ikV_Y.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/recall-concurrency-config.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-navigate-access.d.ts +1 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.d.ts +1 -1
- package/dist/recall-navigate-disclosure.js +1 -1
- package/dist/recall-navigate.d.ts +1 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state-view-admission.d.ts +2 -2
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/manifest.d.ts +11 -2
- package/dist/reconcile/manifest.js +5 -3
- package/dist/reconcile/plan.d.ts +1 -1
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +5 -4
- package/dist/retrieval-agents.d.ts +2 -2
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/salvage-envelope.d.ts +1 -1
- package/dist/schemas.d.ts +212 -2
- package/dist/schemas.js +1 -1
- package/dist/{scope-profiles-nxTKvjE-.d.ts → scope-profiles-BIJMsd0B.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +4 -4
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +10 -10
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-C83DVakV.d.ts → semantic-consolidation-D7sJocll.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +10 -10
- package/dist/semantic-rule-promotion.js +9 -9
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +9 -9
- package/dist/{service-q-xtOoAr.d.ts → service-fwgEngUj.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +12 -12
- package/dist/standup/build.js +9 -9
- package/dist/{storage-Ca0MbTfm.d.ts → storage-Cbll3-Tk.d.ts} +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +8 -8
- package/dist/subject-config.d.ts +1 -1
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +15 -15
- package/dist/support-passport/index.js +38 -38
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +2 -2
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/transfer/export-okf.js +9 -9
- package/dist/transfer/types.d.ts +20 -20
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-yDgWDkrJ.d.ts → types-48sPkWB0.d.ts} +49 -10
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +9 -9
- package/dist/who-knows-cli.d.ts +12 -12
- package/dist/who-knows-cli.js +10 -10
- package/dist/who-knows.d.ts +12 -12
- package/dist/who-knows.js +9 -9
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +42 -2
- package/src/access-http.test.ts +43 -5
- package/src/access-http.ts +2 -0
- package/src/config.ts +2 -2
- package/src/extraction-prompt.ts +37 -3
- package/src/extraction-source-grounding-rules.ts +46 -9
- package/src/extraction-source-grounding.ts +2 -1
- package/src/extraction-span-config.ts +81 -0
- package/src/extraction-span-materialize.test.ts +376 -0
- package/src/extraction-span-materialize.ts +241 -0
- package/src/extraction.ts +70 -25
- package/src/reconcile/manifest.test.ts +11 -1
- package/src/reconcile/manifest.ts +12 -0
- package/src/schemas.ts +14 -0
- package/src/source-agent-qualifier.ts +5 -1
- package/src/testing/subjects/extraction-lifecycle.test.ts +27 -10
- package/src/types.ts +9 -9
- package/dist/chunk-27IOSH2W.js.map +0 -1
- package/dist/chunk-4MDKNUV4.js.map +0 -1
- package/dist/chunk-7CBKAQIG.js.map +0 -1
- package/dist/chunk-AJTG3CP7.js.map +0 -1
- package/dist/chunk-DVOBLPSQ.js.map +0 -1
- package/dist/chunk-LEMD7WZJ.js.map +0 -1
- package/dist/chunk-OQ7SSRXP.js.map +0 -1
- package/dist/chunk-UBG4GAEP.js.map +0 -1
- package/dist/chunk-XPJNT6PI.js.map +0 -1
- /package/dist/{auto-sync-4YFATLFQ.js.map → auto-sync-FSRJDU63.js.map} +0 -0
- /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
- /package/dist/{chunk-RUXPVSML.js.map → chunk-2AR5JFD7.js.map} +0 -0
- /package/dist/{chunk-YNN26CIZ.js.map → chunk-2JGGZICG.js.map} +0 -0
- /package/dist/{chunk-A7GQBJP5.js.map → chunk-2L5FSNPC.js.map} +0 -0
- /package/dist/{chunk-ZTG4P7NZ.js.map → chunk-3IXB77DA.js.map} +0 -0
- /package/dist/{chunk-WHHEPAO3.js.map → chunk-3K6UFW5B.js.map} +0 -0
- /package/dist/{chunk-EEBQFG5E.js.map → chunk-3YMDY3ZF.js.map} +0 -0
- /package/dist/{chunk-5JG5EBVL.js.map → chunk-4DPDIOVA.js.map} +0 -0
- /package/dist/{chunk-UDZYNIDJ.js.map → chunk-4WGAMREC.js.map} +0 -0
- /package/dist/{chunk-HXSAWV3A.js.map → chunk-57GDHV2D.js.map} +0 -0
- /package/dist/{chunk-Z7ACR6MJ.js.map → chunk-5LLQAUMI.js.map} +0 -0
- /package/dist/{chunk-P3ONDDIJ.js.map → chunk-5SYI2F47.js.map} +0 -0
- /package/dist/{chunk-DGS34QSY.js.map → chunk-6E5GYDIE.js.map} +0 -0
- /package/dist/{chunk-J7PB5UQ4.js.map → chunk-6Z3WW2MW.js.map} +0 -0
- /package/dist/{chunk-GLZH5VEN.js.map → chunk-76DRU7C4.js.map} +0 -0
- /package/dist/{chunk-L2QLDZJC.js.map → chunk-7MJBKZPU.js.map} +0 -0
- /package/dist/{chunk-Y63ZFP4X.js.map → chunk-7RKBPXY6.js.map} +0 -0
- /package/dist/{chunk-JSRVXI6E.js.map → chunk-B2YKTE7P.js.map} +0 -0
- /package/dist/{chunk-Z3O53WZR.js.map → chunk-BICNRVEC.js.map} +0 -0
- /package/dist/{chunk-BNGHPYZU.js.map → chunk-BLHX5FQW.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
- /package/dist/{chunk-776GVKL7.js.map → chunk-CD3C4BJN.js.map} +0 -0
- /package/dist/{chunk-LMCD5W5B.js.map → chunk-CIYUWSMZ.js.map} +0 -0
- /package/dist/{chunk-YJ6VCDMZ.js.map → chunk-CQ7SSBO4.js.map} +0 -0
- /package/dist/{chunk-CNV2A557.js.map → chunk-CYEMS2PG.js.map} +0 -0
- /package/dist/{chunk-UYUCCQ46.js.map → chunk-DOQLHCSS.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
- /package/dist/{chunk-RRZKTSFG.js.map → chunk-FCFAYMTU.js.map} +0 -0
- /package/dist/{chunk-R4OCGPSH.js.map → chunk-FJMYMJLR.js.map} +0 -0
- /package/dist/{chunk-TKFSXDOB.js.map → chunk-FLLORID2.js.map} +0 -0
- /package/dist/{chunk-QATYVTP7.js.map → chunk-FPQDZCUX.js.map} +0 -0
- /package/dist/{chunk-L2WQVSKP.js.map → chunk-G5MO3VQA.js.map} +0 -0
- /package/dist/{chunk-LNDLXMH6.js.map → chunk-GDDSXVWR.js.map} +0 -0
- /package/dist/{chunk-JZ2CHRLB.js.map → chunk-GHX5PNXW.js.map} +0 -0
- /package/dist/{chunk-2BQ4ZIWC.js.map → chunk-GNR6YEWZ.js.map} +0 -0
- /package/dist/{chunk-5FAGCOZD.js.map → chunk-GWK7FEUL.js.map} +0 -0
- /package/dist/{chunk-SCXURCVT.js.map → chunk-GWQVMKUJ.js.map} +0 -0
- /package/dist/{chunk-QBLDCI6E.js.map → chunk-HHDTBYDJ.js.map} +0 -0
- /package/dist/{chunk-2YLMUME2.js.map → chunk-IQZ6ISFX.js.map} +0 -0
- /package/dist/{chunk-JHZCXUQI.js.map → chunk-JLXWRQNR.js.map} +0 -0
- /package/dist/{chunk-FVJ4D6L7.js.map → chunk-JMPYZJQN.js.map} +0 -0
- /package/dist/{chunk-HC4GFLMQ.js.map → chunk-JO5TQAKW.js.map} +0 -0
- /package/dist/{chunk-ZBEGS7OB.js.map → chunk-JPKZTCWZ.js.map} +0 -0
- /package/dist/{chunk-AZSKROVQ.js.map → chunk-JYR4LH76.js.map} +0 -0
- /package/dist/{chunk-ECKG5WSI.js.map → chunk-JZYECQWN.js.map} +0 -0
- /package/dist/{chunk-NPNSKE76.js.map → chunk-KTRXQQFN.js.map} +0 -0
- /package/dist/{chunk-HUT2JR6I.js.map → chunk-L5OXE4PX.js.map} +0 -0
- /package/dist/{chunk-B3O3IRZN.js.map → chunk-LMMQKZK3.js.map} +0 -0
- /package/dist/{chunk-QURNMKME.js.map → chunk-LSDEIZ76.js.map} +0 -0
- /package/dist/{chunk-XCOV45MO.js.map → chunk-MR6LQVZ5.js.map} +0 -0
- /package/dist/{chunk-6J6K3STG.js.map → chunk-OTPXEE6W.js.map} +0 -0
- /package/dist/{chunk-LYDJRF45.js.map → chunk-PNEDMJ53.js.map} +0 -0
- /package/dist/{chunk-JRWW7GM6.js.map → chunk-Q6D7EUSQ.js.map} +0 -0
- /package/dist/{chunk-VYXDUPYE.js.map → chunk-Q7JK6YEB.js.map} +0 -0
- /package/dist/{chunk-YXLUTALO.js.map → chunk-SAKA6PPL.js.map} +0 -0
- /package/dist/{chunk-HWLIMQE2.js.map → chunk-SF6RFI5Z.js.map} +0 -0
- /package/dist/{chunk-OS2AT2JU.js.map → chunk-SROIT6QY.js.map} +0 -0
- /package/dist/{chunk-S5G2LAL7.js.map → chunk-SV4Z2S67.js.map} +0 -0
- /package/dist/{chunk-DK4X5B6I.js.map → chunk-TFRDUD3M.js.map} +0 -0
- /package/dist/{chunk-JR6H5CYS.js.map → chunk-TL7NLM2L.js.map} +0 -0
- /package/dist/{chunk-NN4JEFON.js.map → chunk-TRU6JBOI.js.map} +0 -0
- /package/dist/{chunk-PHP3MUGF.js.map → chunk-UYVXIY6C.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
- /package/dist/{chunk-ZHXSOMYH.js.map → chunk-VVX5PZFS.js.map} +0 -0
- /package/dist/{chunk-BJETIR53.js.map → chunk-WS3WNLST.js.map} +0 -0
- /package/dist/{chunk-3FJKJ5UZ.js.map → chunk-X7BCM2NA.js.map} +0 -0
- /package/dist/{chunk-Q4AUIFUA.js.map → chunk-XAITGGX5.js.map} +0 -0
- /package/dist/{chunk-WPDKBUWX.js.map → chunk-XCF3SFHD.js.map} +0 -0
- /package/dist/{chunk-LO4UKPKX.js.map → chunk-YHU5XUF4.js.map} +0 -0
- /package/dist/{chunk-F6IVBYFS.js.map → chunk-YIZ2EUUL.js.map} +0 -0
- /package/dist/{chunk-EZ25VE3G.js.map → chunk-YNDLCWXS.js.map} +0 -0
- /package/dist/{chunk-5VAF4ID4.js.map → chunk-ZEPVWLCN.js.map} +0 -0
- /package/dist/{graph-edge-decay-MKIRZ762.js.map → extraction-span-config.js.map} +0 -0
- /package/dist/{first-start-migration-L3UFX5CU.js.map → first-start-migration-GZ45G5FS.js.map} +0 -0
|
@@ -6,23 +6,23 @@ import {
|
|
|
6
6
|
loadSyncState,
|
|
7
7
|
syncWearableSource,
|
|
8
8
|
wearableSourceLabel
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SAKA6PPL.js";
|
|
10
|
+
import {
|
|
11
|
+
runPeerProfileReasoner
|
|
12
|
+
} from "./chunk-I74SUMNI.js";
|
|
10
13
|
import {
|
|
11
14
|
CompressionGuidelineCoordinator
|
|
12
15
|
} from "./chunk-UXREWVW4.js";
|
|
13
16
|
import {
|
|
14
17
|
ActivityStore,
|
|
15
18
|
MaintenanceScheduler
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
runPeerProfileReasoner
|
|
19
|
-
} from "./chunk-I74SUMNI.js";
|
|
19
|
+
} from "./chunk-GNR6YEWZ.js";
|
|
20
20
|
import {
|
|
21
21
|
migrateFromEngram
|
|
22
22
|
} from "./chunk-VZAKYDMJ.js";
|
|
23
23
|
import {
|
|
24
24
|
LcmEngine
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-2L5FSNPC.js";
|
|
26
26
|
import {
|
|
27
27
|
chunkTranscriptEntries
|
|
28
28
|
} from "./chunk-TECVW3JP.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
CompoundingEngine,
|
|
34
34
|
defaultTierMigrationCycleBudget
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-GDDSXVWR.js";
|
|
36
36
|
import {
|
|
37
37
|
SharedContextManager
|
|
38
38
|
} from "./chunk-CARRTDKC.js";
|
|
@@ -44,6 +44,12 @@ import {
|
|
|
44
44
|
applyUtilityRankingRuntimeDelta,
|
|
45
45
|
loadUtilityRuntimeValues
|
|
46
46
|
} from "./chunk-SWIKABKI.js";
|
|
47
|
+
import {
|
|
48
|
+
decideTierTransition
|
|
49
|
+
} from "./chunk-GCBIXUPT.js";
|
|
50
|
+
import {
|
|
51
|
+
TmtBuilder
|
|
52
|
+
} from "./chunk-ECZU5BJH.js";
|
|
47
53
|
import {
|
|
48
54
|
extractTopics
|
|
49
55
|
} from "./chunk-KVDUKH5E.js";
|
|
@@ -56,12 +62,6 @@ import {
|
|
|
56
62
|
import {
|
|
57
63
|
TierMigrationExecutor
|
|
58
64
|
} from "./chunk-YRFAYOFQ.js";
|
|
59
|
-
import {
|
|
60
|
-
decideTierTransition
|
|
61
|
-
} from "./chunk-GCBIXUPT.js";
|
|
62
|
-
import {
|
|
63
|
-
TmtBuilder
|
|
64
|
-
} from "./chunk-ECZU5BJH.js";
|
|
65
65
|
import {
|
|
66
66
|
buildTargetedFactRecallSection,
|
|
67
67
|
shouldRecallTargetedFactEvidence
|
|
@@ -69,6 +69,14 @@ import {
|
|
|
69
69
|
import {
|
|
70
70
|
SessionObserverState
|
|
71
71
|
} from "./chunk-ODZKV2F7.js";
|
|
72
|
+
import {
|
|
73
|
+
applyRuntimeRetrievalPolicy
|
|
74
|
+
} from "./chunk-5IZL4DCV.js";
|
|
75
|
+
import {
|
|
76
|
+
RerankCache,
|
|
77
|
+
reorderByRankedKeys,
|
|
78
|
+
rerankLocalOrNoop
|
|
79
|
+
} from "./chunk-LUDXM7MD.js";
|
|
72
80
|
import {
|
|
73
81
|
buildResponseGuidanceRecallSection,
|
|
74
82
|
shouldRecallResponseGuidance
|
|
@@ -94,20 +102,12 @@ import {
|
|
|
94
102
|
recencyWindowFromPrompt,
|
|
95
103
|
resolvePromptTagPrefilterAsync
|
|
96
104
|
} from "./chunk-ZOKZIR5K.js";
|
|
97
|
-
import {
|
|
98
|
-
applyRuntimeRetrievalPolicy
|
|
99
|
-
} from "./chunk-5IZL4DCV.js";
|
|
100
105
|
import {
|
|
101
106
|
findUnresolvedEntityRefs
|
|
102
107
|
} from "./chunk-X7XN6YU4.js";
|
|
103
108
|
import {
|
|
104
109
|
RelevanceStore
|
|
105
110
|
} from "./chunk-KATEWTQJ.js";
|
|
106
|
-
import {
|
|
107
|
-
RerankCache,
|
|
108
|
-
reorderByRankedKeys,
|
|
109
|
-
rerankLocalOrNoop
|
|
110
|
-
} from "./chunk-LUDXM7MD.js";
|
|
111
111
|
import {
|
|
112
112
|
filterRecentScanMemoriesForStateView,
|
|
113
113
|
indexStateViewAnnotatedResults,
|
|
@@ -143,6 +143,12 @@ import {
|
|
|
143
143
|
import {
|
|
144
144
|
runLiveConnectorsOnce
|
|
145
145
|
} from "./chunk-YHLWPYHT.js";
|
|
146
|
+
import {
|
|
147
|
+
classifyMemoryKind
|
|
148
|
+
} from "./chunk-YAZNBMNF.js";
|
|
149
|
+
import {
|
|
150
|
+
scoreEvidencePathDetail
|
|
151
|
+
} from "./chunk-XXSOVESA.js";
|
|
146
152
|
import {
|
|
147
153
|
deriveHarmonicRecords,
|
|
148
154
|
harmonicEntityReferenceMatches,
|
|
@@ -150,18 +156,12 @@ import {
|
|
|
150
156
|
normalizedHarmonicEntityIdentity,
|
|
151
157
|
persistHarmonicRecords
|
|
152
158
|
} from "./chunk-LS2FHUML.js";
|
|
153
|
-
import {
|
|
154
|
-
classifyMemoryKind
|
|
155
|
-
} from "./chunk-YAZNBMNF.js";
|
|
156
|
-
import {
|
|
157
|
-
scoreEvidencePathDetail
|
|
158
|
-
} from "./chunk-XXSOVESA.js";
|
|
159
159
|
import {
|
|
160
160
|
ExtractionEngine
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-KUK56OPR.js";
|
|
162
162
|
import {
|
|
163
163
|
parseMemoryActionEligibilityContext
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-JHU4EYDV.js";
|
|
165
165
|
import {
|
|
166
166
|
buildFocusedListRecallSection,
|
|
167
167
|
shouldRecallFocusedListEvidence
|
|
@@ -175,7 +175,7 @@ import {
|
|
|
175
175
|
getVerdictKind,
|
|
176
176
|
judgeFactDurability,
|
|
177
177
|
validateProcedureExtraction
|
|
178
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-BLHX5FQW.js";
|
|
179
179
|
import {
|
|
180
180
|
pickFactEventTimeAnchor,
|
|
181
181
|
resolveFactEventTime
|
|
@@ -199,7 +199,7 @@ import {
|
|
|
199
199
|
buildEntityRecallSection,
|
|
200
200
|
entityRecentTranscriptLookbackHours,
|
|
201
201
|
readRecentEntityTranscriptEntries
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-FLLORID2.js";
|
|
203
203
|
import {
|
|
204
204
|
tryDirectAnswer
|
|
205
205
|
} from "./chunk-VY47VI2T.js";
|
|
@@ -208,7 +208,7 @@ import {
|
|
|
208
208
|
} from "./chunk-LVXBC6YB.js";
|
|
209
209
|
import {
|
|
210
210
|
refreshConvergedNamespaces
|
|
211
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-TFRDUD3M.js";
|
|
212
212
|
import {
|
|
213
213
|
builtInConnectorPackageSpecifier,
|
|
214
214
|
ensureBuiltInWearableConnectors,
|
|
@@ -217,7 +217,7 @@ import {
|
|
|
217
217
|
runTimelinePublishCli,
|
|
218
218
|
screenCandidateFact,
|
|
219
219
|
summarizeVaultPublish
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-YIZ2EUUL.js";
|
|
221
221
|
import {
|
|
222
222
|
normalizeReplaySessionKey
|
|
223
223
|
} from "./chunk-AJVLDJU6.js";
|
|
@@ -227,30 +227,30 @@ import {
|
|
|
227
227
|
import {
|
|
228
228
|
compareVerifiedEpisodeResults,
|
|
229
229
|
searchVerifiedEpisodes
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-UYVXIY6C.js";
|
|
231
231
|
import {
|
|
232
232
|
ThreadingManager
|
|
233
233
|
} from "./chunk-OJP3N7UK.js";
|
|
234
234
|
import {
|
|
235
235
|
compareVerifiedSemanticRuleResults,
|
|
236
236
|
searchVerifiedSemanticRules
|
|
237
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-76DRU7C4.js";
|
|
238
238
|
import {
|
|
239
239
|
searchWorkProductLedgerEntries
|
|
240
240
|
} from "./chunk-G7NYVKD6.js";
|
|
241
241
|
import {
|
|
242
242
|
TranscriptManager
|
|
243
243
|
} from "./chunk-AM4T6CHX.js";
|
|
244
|
-
import {
|
|
245
|
-
PolicyRuntimeManager
|
|
246
|
-
} from "./chunk-2LA3H54D.js";
|
|
247
244
|
import {
|
|
248
245
|
runNamespaceMaintenanceFanout,
|
|
249
246
|
summarizeNamespaceMaintenanceHealth
|
|
250
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-3YMDY3ZF.js";
|
|
251
248
|
import {
|
|
252
249
|
planNamespaceMaintenance
|
|
253
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-JPKZTCWZ.js";
|
|
251
|
+
import {
|
|
252
|
+
PolicyRuntimeManager
|
|
253
|
+
} from "./chunk-2LA3H54D.js";
|
|
254
254
|
import {
|
|
255
255
|
isAboveImportanceThreshold,
|
|
256
256
|
scoreImportance
|
|
@@ -279,7 +279,7 @@ import {
|
|
|
279
279
|
materializeAfterSemanticConsolidation,
|
|
280
280
|
parseConsolidationResponse,
|
|
281
281
|
parseOperatorAwareConsolidationResponse
|
|
282
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-HHDTBYDJ.js";
|
|
283
283
|
import {
|
|
284
284
|
BoxBuilder
|
|
285
285
|
} from "./chunk-B7RWBZXW.js";
|
|
@@ -300,7 +300,7 @@ import {
|
|
|
300
300
|
detectMeetings,
|
|
301
301
|
embeddingsFromCosineHits,
|
|
302
302
|
normalizeConnectorScope
|
|
303
|
-
} from "./chunk-
|
|
303
|
+
} from "./chunk-D2DIYEFW.js";
|
|
304
304
|
import {
|
|
305
305
|
compileCorrectionRule,
|
|
306
306
|
correctionsFilePath,
|
|
@@ -334,7 +334,7 @@ import {
|
|
|
334
334
|
} from "./chunk-MI2OTWV5.js";
|
|
335
335
|
import {
|
|
336
336
|
MeetingsInputError
|
|
337
|
-
} from "./chunk-
|
|
337
|
+
} from "./chunk-DOKKRZPH.js";
|
|
338
338
|
import {
|
|
339
339
|
WearablesInputError,
|
|
340
340
|
describeErrorForOperator
|
|
@@ -349,23 +349,27 @@ import {
|
|
|
349
349
|
import {
|
|
350
350
|
removeNodeEdgesForRewrite,
|
|
351
351
|
rollbackNodeEdgeRewrite
|
|
352
|
-
} from "./chunk-
|
|
352
|
+
} from "./chunk-6E5GYDIE.js";
|
|
353
353
|
import {
|
|
354
354
|
NamespaceCatalog
|
|
355
|
-
} from "./chunk-
|
|
355
|
+
} from "./chunk-Q7JK6YEB.js";
|
|
356
356
|
import {
|
|
357
357
|
RecallResultFormatter,
|
|
358
358
|
SessionContextCoordinator,
|
|
359
359
|
capturePassiveCorrections,
|
|
360
360
|
clusterByKey,
|
|
361
361
|
detectPassiveCorrections
|
|
362
|
-
} from "./chunk-
|
|
362
|
+
} from "./chunk-JLXWRQNR.js";
|
|
363
363
|
import {
|
|
364
364
|
importCapsule
|
|
365
|
-
} from "./chunk-
|
|
365
|
+
} from "./chunk-VVX5PZFS.js";
|
|
366
366
|
import {
|
|
367
367
|
isCodingGraphInstalled
|
|
368
368
|
} from "./chunk-VQ7B2Q6M.js";
|
|
369
|
+
import {
|
|
370
|
+
listTrustZoneRecords,
|
|
371
|
+
searchTrustZoneRecords
|
|
372
|
+
} from "./chunk-ROBHL3GL.js";
|
|
369
373
|
import {
|
|
370
374
|
applyTrustScoreStage,
|
|
371
375
|
buildTrustSignalsForRerank,
|
|
@@ -373,10 +377,6 @@ import {
|
|
|
373
377
|
trustResultFor,
|
|
374
378
|
trustResultKey
|
|
375
379
|
} from "./chunk-GNVZQ5JN.js";
|
|
376
|
-
import {
|
|
377
|
-
listTrustZoneRecords,
|
|
378
|
-
searchTrustZoneRecords
|
|
379
|
-
} from "./chunk-ROBHL3GL.js";
|
|
380
380
|
import {
|
|
381
381
|
HourlySummarizer
|
|
382
382
|
} from "./chunk-JR6PP7UM.js";
|
|
@@ -395,14 +395,14 @@ import {
|
|
|
395
395
|
} from "./chunk-A5UQ52YQ.js";
|
|
396
396
|
import {
|
|
397
397
|
buildXraySnapshot
|
|
398
|
-
} from "./chunk-
|
|
398
|
+
} from "./chunk-4DPDIOVA.js";
|
|
399
399
|
import {
|
|
400
400
|
objectiveStateStoreOverrideForNamespace,
|
|
401
401
|
searchObjectiveStateSnapshots
|
|
402
402
|
} from "./chunk-HM7RHKS4.js";
|
|
403
403
|
import {
|
|
404
404
|
searchHarmonicRetrieval
|
|
405
|
-
} from "./chunk-
|
|
405
|
+
} from "./chunk-JMPYZJQN.js";
|
|
406
406
|
import {
|
|
407
407
|
ProfilingCollector
|
|
408
408
|
} from "./chunk-NLE6TSLG.js";
|
|
@@ -432,16 +432,16 @@ import {
|
|
|
432
432
|
} from "./chunk-BMWN7B3Y.js";
|
|
433
433
|
import {
|
|
434
434
|
NamespaceStorageRouter
|
|
435
|
-
} from "./chunk-
|
|
435
|
+
} from "./chunk-2AR5JFD7.js";
|
|
436
436
|
import {
|
|
437
437
|
GraphIndex
|
|
438
|
-
} from "./chunk-
|
|
438
|
+
} from "./chunk-GWK7FEUL.js";
|
|
439
439
|
import {
|
|
440
440
|
GraphEdgeAppendError
|
|
441
441
|
} from "./chunk-GKCXTSFF.js";
|
|
442
442
|
import {
|
|
443
443
|
buildChainFollowupGenerator
|
|
444
|
-
} from "./chunk-
|
|
444
|
+
} from "./chunk-CYEMS2PG.js";
|
|
445
445
|
import {
|
|
446
446
|
QmdResultResolver,
|
|
447
447
|
StorageManager,
|
|
@@ -460,10 +460,7 @@ import {
|
|
|
460
460
|
reconstructFusionInputs,
|
|
461
461
|
selfDeps,
|
|
462
462
|
serializeFusionDay
|
|
463
|
-
} from "./chunk-
|
|
464
|
-
import {
|
|
465
|
-
buildRetiredFactTombstoneInputs
|
|
466
|
-
} from "./chunk-46WM6JX2.js";
|
|
463
|
+
} from "./chunk-ZEPVWLCN.js";
|
|
467
464
|
import {
|
|
468
465
|
bodyIsEscaped,
|
|
469
466
|
decodeTranscriptBody,
|
|
@@ -474,15 +471,18 @@ import {
|
|
|
474
471
|
saveSpeakerRegistry,
|
|
475
472
|
speakerRegistryKey
|
|
476
473
|
} from "./chunk-UHVXE24Y.js";
|
|
474
|
+
import {
|
|
475
|
+
buildRetiredFactTombstoneInputs
|
|
476
|
+
} from "./chunk-46WM6JX2.js";
|
|
477
477
|
import {
|
|
478
478
|
NamespaceSearchRouter,
|
|
479
479
|
namespaceCollectionName
|
|
480
|
-
} from "./chunk-
|
|
480
|
+
} from "./chunk-7RKBPXY6.js";
|
|
481
481
|
import {
|
|
482
482
|
createConversationIndexRuntime,
|
|
483
483
|
createSearchBackend,
|
|
484
484
|
isSearchBackendEnabled
|
|
485
|
-
} from "./chunk-
|
|
485
|
+
} from "./chunk-Q6D7EUSQ.js";
|
|
486
486
|
import {
|
|
487
487
|
NoopSearchBackend
|
|
488
488
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -496,7 +496,7 @@ import {
|
|
|
496
496
|
} from "./chunk-S2V7RUCL.js";
|
|
497
497
|
import {
|
|
498
498
|
confidenceTier
|
|
499
|
-
} from "./chunk-
|
|
499
|
+
} from "./chunk-RN3MVLW3.js";
|
|
500
500
|
import {
|
|
501
501
|
lintWorkspaceFiles,
|
|
502
502
|
rotateMarkdownFileToArchive
|
|
@@ -617,7 +617,7 @@ import {
|
|
|
617
617
|
} from "./chunk-QDW3E4RD.js";
|
|
618
618
|
import {
|
|
619
619
|
searchCausalTrajectories
|
|
620
|
-
} from "./chunk-
|
|
620
|
+
} from "./chunk-LMMQKZK3.js";
|
|
621
621
|
import {
|
|
622
622
|
activityDayWindow,
|
|
623
623
|
assertValidTimezone,
|
|
@@ -16947,7 +16947,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
16947
16947
|
if (signal.aborted) return;
|
|
16948
16948
|
if (lifecycleCaps.lifecyclePolicy && resolveQmdCapabilities(this.deps.config).qmdTierMigration) {
|
|
16949
16949
|
try {
|
|
16950
|
-
const { runFirstStartMigration } = await import("./first-start-migration-
|
|
16950
|
+
const { runFirstStartMigration } = await import("./first-start-migration-GZ45G5FS.js");
|
|
16951
16951
|
const result = await runFirstStartMigration({
|
|
16952
16952
|
storage: this.deps.storage,
|
|
16953
16953
|
config: this.deps.config,
|
|
@@ -16970,7 +16970,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
16970
16970
|
if (signal.aborted) return;
|
|
16971
16971
|
if (!this.deps.wearablesAutoSyncHandle && this.deps.config.wearables.enabled && this.deps.config.wearables.autoSyncEnabled && Object.values(this.deps.config.wearables.sources).some((source) => source.enabled)) {
|
|
16972
16972
|
try {
|
|
16973
|
-
const { startWearablesAutoSync } = await import("./auto-sync-
|
|
16973
|
+
const { startWearablesAutoSync } = await import("./auto-sync-FSRJDU63.js");
|
|
16974
16974
|
if (signal.aborted) return;
|
|
16975
16975
|
this.deps.wearablesAutoSyncHandle = startWearablesAutoSync(
|
|
16976
16976
|
{
|
|
@@ -30429,4 +30429,4 @@ export {
|
|
|
30429
30429
|
blendGraphExpandedRecallScore,
|
|
30430
30430
|
Orchestrator
|
|
30431
30431
|
};
|
|
30432
|
-
//# sourceMappingURL=chunk-
|
|
30432
|
+
//# sourceMappingURL=chunk-3IXB77DA.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
listMemoryGovernanceRuns,
|
|
9
9
|
readMemoryGovernanceRunArtifact
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L5OXE4PX.js";
|
|
11
11
|
import {
|
|
12
12
|
StorageManager
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZEPVWLCN.js";
|
|
14
14
|
import {
|
|
15
15
|
normalizeProjectionPreview,
|
|
16
16
|
normalizeProjectionTags
|
|
@@ -1005,4 +1005,4 @@ export {
|
|
|
1005
1005
|
verifyMemoryProjection,
|
|
1006
1006
|
repairMemoryProjection
|
|
1007
1007
|
};
|
|
1008
|
-
//# sourceMappingURL=chunk-
|
|
1008
|
+
//# sourceMappingURL=chunk-3K6UFW5B.js.map
|
|
@@ -30,6 +30,9 @@ var RECONCILE_MANIFEST_FORMAT = "remnic-reconcile-manifest";
|
|
|
30
30
|
var RECONCILE_MANIFEST_SCHEMA_VERSION = 1;
|
|
31
31
|
var CONTENT_HASH_NORMALIZER_VERSION = 4;
|
|
32
32
|
var IDENTITY_RESOLUTION_VERSION = 2;
|
|
33
|
+
function peerManifestRevision(citationTemplate) {
|
|
34
|
+
return `schema=${RECONCILE_MANIFEST_SCHEMA_VERSION};normalizer=${CONTENT_HASH_NORMALIZER_VERSION};identity=${IDENTITY_RESOLUTION_VERSION};citation=${citationTemplateFingerprint(citationTemplate)}`;
|
|
35
|
+
}
|
|
33
36
|
var SHA256_PATTERN = /^[a-f0-9]{64}$/i;
|
|
34
37
|
var MEMORY_DIRS = new Set(RECALL_FALLBACK_DIRS);
|
|
35
38
|
function isMemoryPath(filePath) {
|
|
@@ -336,6 +339,7 @@ export {
|
|
|
336
339
|
RECONCILE_MANIFEST_SCHEMA_VERSION,
|
|
337
340
|
CONTENT_HASH_NORMALIZER_VERSION,
|
|
338
341
|
IDENTITY_RESOLUTION_VERSION,
|
|
342
|
+
peerManifestRevision,
|
|
339
343
|
citationTemplateFingerprint,
|
|
340
344
|
isReconcileMemoryIdentity,
|
|
341
345
|
isCachedIdentityReusable,
|
|
@@ -343,4 +347,4 @@ export {
|
|
|
343
347
|
buildReconcileManifest,
|
|
344
348
|
collapseActiveFactDuplicates
|
|
345
349
|
};
|
|
346
|
-
//# sourceMappingURL=chunk-
|
|
350
|
+
//# sourceMappingURL=chunk-3OHISDDW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/reconcile/manifest.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { computeLegacyContentHash, normalizeLegacyContent } from \"../content-hash.js\";\nimport { inferMemoryStatus } from \"../memory-lifecycle-ledger-utils.js\";\nimport { DEFAULT_CITATION_FORMAT, stripCitationForTemplate } from \"../source-attribution.js\";\nimport { ContentHashIndex, type ContentHashPathEntry } from \"../storage/content-hash-index.js\";\nimport { storedContentIdentityCandidates } from \"../structured-attributes.js\";\nimport type { MemoryFrontmatter, MemoryStatus } from \"../types.js\";\nimport { RECALL_FALLBACK_DIRS } from \"../utils/category-dir.js\";\nimport {\n type ReconcileFileState,\n type ReconcilePlan,\n type ReconcilePlanEntry,\n type ReconcileSemanticAgreement,\n type ReconcileSemanticChange,\n compareReconcilePlanEntries,\n semanticAgreementKey,\n summarizeReconcilePlan,\n} from \"./plan.js\";\n\nexport const RECONCILE_MANIFEST_FORMAT = \"remnic-reconcile-manifest\";\nexport const RECONCILE_MANIFEST_SCHEMA_VERSION = 1;\nexport const CONTENT_HASH_NORMALIZER_VERSION = 4;\n/**\n * Version of the identity-resolution LOGIC (alias recovery, candidate\n * ordering), independent of the content normalizer: a cached manifest entry\n * written before an identity-resolution change carries an older value and is\n * reparsed even when its normalizerVersion still matches (issue #2367\n * review round 2). Bump when parsedMemoryIdentity's output shape or\n * semantics change.\n */\nexport const IDENTITY_RESOLUTION_VERSION = 2;\n\n/**\n * Identity of the manifest-affecting implementation this peer builds\n * STREAMED manifests with. Advertised via offline-sync capabilities so the\n * client can key peer-side plan caches on it: a peer that upgrades its\n * normalization logic or citation template without rewriting stored files\n * keeps the same file hashes, and only this revision invalidates the stale\n * cached identities (#2803 / #2956 review).\n */\nexport function peerManifestRevision(citationTemplate?: string): string {\n return `schema=${RECONCILE_MANIFEST_SCHEMA_VERSION};normalizer=${CONTENT_HASH_NORMALIZER_VERSION};identity=${IDENTITY_RESOLUTION_VERSION};citation=${citationTemplateFingerprint(citationTemplate)}`;\n}\n\nexport interface ReconcileMemoryIdentity {\n id: string;\n category: string;\n contentHash: string;\n /**\n * Recovered current-normalizer identities for a record whose persisted hash\n * is ambiguous under the legacy normalizer (issue #2367). The persisted\n * hash stays primary; these participate in duplicate bucketing so a\n * replica carrying the current form of the same fact still collapses.\n */\n contentHashAliases?: readonly string[];\n /** See IDENTITY_RESOLUTION_VERSION; absent on pre-versioning cache entries. */\n normalizerVersion?: number;\n identityResolutionVersion?: number;\n status: MemoryStatus;\n}\n\nexport interface ReconcileManifestFile extends ReconcileFileState {\n memory?: ReconcileMemoryIdentity;\n /** Present on sha-only (negative) entries so an upgrade re-parses them. */\n normalizerVersion?: number;\n identityResolutionVersion?: number;\n}\n\ntype ActiveFactManifestFile = ReconcileManifestFile & { memory: ReconcileMemoryIdentity };\n\nexport interface ReconcileManifest {\n format: typeof RECONCILE_MANIFEST_FORMAT;\n schemaVersion: typeof RECONCILE_MANIFEST_SCHEMA_VERSION;\n files: ReconcileManifestFile[];\n}\n\nexport type ReconcileMemoryParser = (raw: string) => { frontmatter: MemoryFrontmatter; content: string } | null;\n\nexport interface BuildReconcileManifestOptions {\n files: Iterable<ReconcileFileState>;\n readFile: (file: ReconcileFileState) => Promise<Buffer | string | null>;\n parseMemory: ReconcileMemoryParser;\n cachedFiles?: Iterable<ReconcileManifestFile>;\n citationTemplate?: string;\n}\n\nconst SHA256_PATTERN = /^[a-f0-9]{64}$/i;\nconst MEMORY_DIRS = new Set(RECALL_FALLBACK_DIRS);\n\nfunction isMemoryPath(filePath: string): boolean {\n if (!filePath.endsWith(\".md\")) return false;\n const segments = filePath.split(\"/\");\n let index = 0;\n if (segments[index] === \"cold\" || segments[index] === \"archive\") index += 1;\n return MEMORY_DIRS.has(segments[index] ?? \"\");\n}\n\nfunction parsedMemoryIdentity(\n filePath: string,\n raw: Buffer | string,\n parseMemory: ReconcileMemoryParser,\n citationTemplate: string\n): ReconcileMemoryIdentity | undefined {\n if (!isMemoryPath(filePath)) return undefined;\n const parsed = parseMemory(Buffer.isBuffer(raw) ? raw.toString(\"utf8\") : raw);\n if (!parsed?.frontmatter.id) return undefined;\n\n const storedHash =\n parsed.frontmatter.contentHash && SHA256_PATTERN.test(parsed.frontmatter.contentHash)\n ? parsed.frontmatter.contentHash.toLowerCase()\n : undefined;\n const candidates = storedContentIdentityCandidates(parsed.content, (content) =>\n stripCitationForTemplate(content, citationTemplate)\n );\n const bodyHash = ContentHashIndex.computeHash(candidates[0] ?? \"\");\n const currentMatch = candidates.find((content) => ContentHashIndex.computeHash(content) === storedHash);\n const legacyMatch = [...candidates].reverse().find((content) => computeLegacyContentHash(content) === storedHash);\n let contentHash: string;\n let contentHashAliases: string[] | undefined;\n if (currentMatch) {\n contentHash = ContentHashIndex.computeHash(currentMatch);\n } else if (legacyMatch && normalizeLegacyContent(legacyMatch).length > 0) {\n // A non-empty legacy equality is ambiguous (issue #2367): the persisted\n // hash may be an explicit contentHashSource identity that merely collides\n // with the body's ASCII skeleton under the lossy legacy normalizer, and\n // nothing in the record proves which it is. Keep the persisted hash as\n // the primary identity and expose the recovered current identity as an\n // alias so replicas carrying either form still collapse.\n contentHash = storedHash ?? bodyHash;\n const recovered = ContentHashIndex.computeHash(legacyMatch);\n if (recovered !== contentHash) contentHashAliases = [recovered];\n } else {\n // An EMPTY legacy skeleton identifies nothing (every non-ASCII body maps\n // to it), so preserving it would collapse unrelated records. Recovering\n // the current identity here is repair, not replacement.\n contentHash = legacyMatch ? ContentHashIndex.computeHash(legacyMatch) : (storedHash ?? bodyHash);\n }\n\n return {\n id: parsed.frontmatter.id,\n category: parsed.frontmatter.category,\n contentHash,\n ...(contentHashAliases ? { contentHashAliases } : {}),\n normalizerVersion: CONTENT_HASH_NORMALIZER_VERSION,\n identityResolutionVersion: IDENTITY_RESOLUTION_VERSION,\n status: inferMemoryStatus(parsed.frontmatter, filePath),\n };\n}\n\n/**\n * Stable fingerprint of the citation template that `parsedMemoryIdentity` uses\n * to strip inline attribution before hashing. A persisted identity cache is\n * only reusable while this matches: identical file content under a different\n * template yields a different `contentHash`, which would silently change\n * duplicate and conflict decisions on a warm plan.\n */\nexport function citationTemplateFingerprint(citationTemplate?: string): string {\n return createHash(\"sha256\")\n .update(citationTemplate ?? DEFAULT_CITATION_FORMAT)\n .digest(\"hex\")\n .slice(0, 16);\n}\n\n/**\n * Structural guard for identities read back from an on-disk cache. A cache file\n * is untrusted JSON: without this an entry carrying `memory: null` survives the\n * loader's cast and then throws when the hit path dereferences\n * `memory.normalizerVersion`, aborting a manifest build that should instead\n * fall back to a cold parse.\n */\nexport function isReconcileMemoryIdentity(value: unknown): value is ReconcileMemoryIdentity {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false;\n const memory = value as Record<string, unknown>;\n if (typeof memory.id !== \"string\") return false;\n if (typeof memory.category !== \"string\") return false;\n if (typeof memory.contentHash !== \"string\" || !SHA256_PATTERN.test(memory.contentHash)) return false;\n if (typeof memory.status !== \"string\") return false;\n if (memory.normalizerVersion !== undefined && typeof memory.normalizerVersion !== \"number\") return false;\n if (memory.identityResolutionVersion !== undefined && typeof memory.identityResolutionVersion !== \"number\") {\n return false;\n }\n if (\n memory.contentHashAliases !== undefined &&\n (!Array.isArray(memory.contentHashAliases) ||\n memory.contentHashAliases.some((alias) => typeof alias !== \"string\" || !SHA256_PATTERN.test(alias)))\n ) {\n return false;\n }\n return true;\n}\n\n/** A cache hit is valid only when the entry was built by the current parser.\n * Positive hits carry versions on `memory`; sha-only negatives stamp the same\n * versions on the entry itself. Unversioned negatives are pre-upgrade leftovers\n * and must miss so a newer parser can recognize an identity it previously skipped. */\nexport function isCachedIdentityReusable(cached: ReconcileManifestFile): boolean {\n if (cached.memory !== undefined) {\n return (\n cached.memory.normalizerVersion === CONTENT_HASH_NORMALIZER_VERSION &&\n cached.memory.identityResolutionVersion === IDENTITY_RESOLUTION_VERSION\n );\n }\n return (\n cached.normalizerVersion === CONTENT_HASH_NORMALIZER_VERSION &&\n cached.identityResolutionVersion === IDENTITY_RESOLUTION_VERSION\n );\n}\n\nexport async function buildReconcileManifestFile(\n file: ReconcileFileState,\n readFile: (file: ReconcileFileState) => Promise<Buffer | string | null>,\n parseMemory: ReconcileMemoryParser,\n citationTemplate = DEFAULT_CITATION_FORMAT\n): Promise<ReconcileManifestFile> {\n let raw: Buffer | string | null = null;\n let readFailed = false;\n if (isMemoryPath(file.path)) {\n try {\n raw = await readFile(file);\n } catch {\n readFailed = true;\n raw = null;\n }\n }\n if (raw !== null && createHash(\"sha256\").update(raw).digest(\"hex\") !== file.sha256.toLowerCase()) {\n raw = null;\n }\n const memory = raw === null ? undefined : parsedMemoryIdentity(file.path, raw, parseMemory, citationTemplate);\n // A thrown read is not a negative identity. Stamping versions here would\n // make the next warm cycle treat the failure as \"this file has no id\".\n if (readFailed) return { ...file };\n return {\n ...file,\n ...(memory\n ? { memory }\n : {\n normalizerVersion: CONTENT_HASH_NORMALIZER_VERSION,\n identityResolutionVersion: IDENTITY_RESOLUTION_VERSION,\n }),\n };\n}\n\n/** Read-batch size for manifest builds. Uncached files are independent (a\n * per-file read + sha256 + frontmatter parse); processing them in bounded\n * batches amortizes the per-file promise/async-hook overhead that dominates\n * boot-scale corpus builds (measured: ~66% of CPU in async_hooks._propagate +\n * GC at ~100k files) and overlaps IO waits, while the bound keeps memory flat.\n * Order is preserved: results land in input order regardless of completion\n * order, so the manifest output is byte-identical to the sequential form. */\nconst MANIFEST_BUILD_BATCH_SIZE = 50;\n\nexport async function buildReconcileManifest(options: BuildReconcileManifestOptions): Promise<ReconcileManifest> {\n const cachedByPath = new Map<string, ReconcileManifestFile>();\n for (const cached of options.cachedFiles ?? []) {\n cachedByPath.set(cached.path, cached);\n }\n\n const allFiles = [...options.files];\n // Every result — cache hit or rebuild — is stored at its own input index.\n // Pushing hits onto a dense array while rebuilds are assigned by index\n // silently drops entries whenever a miss precedes a hit: the rebuild lands\n // on the slot the hit already occupied.\n const files: ReconcileManifestFile[] = new Array(allFiles.length);\n // Cache hits stay on a synchronous fast path (no promise allocation, no\n // Promise.all — a fully-cached rebuild must not regress); only the uncached\n // entries ride the bounded batches.\n const uncached: Array<{ index: number; file: ReconcileFileState }> = [];\n for (let i = 0; i < allFiles.length; i += 1) {\n const file = allFiles[i]!;\n const cached = cachedByPath.get(file.path);\n if (\n cached !== undefined &&\n cached.sha256.toLowerCase() === file.sha256.toLowerCase() &&\n isCachedIdentityReusable(cached)\n ) {\n files[i] = {\n ...file,\n ...(cached.memory\n ? { memory: cached.memory }\n : {\n normalizerVersion: cached.normalizerVersion,\n identityResolutionVersion: cached.identityResolutionVersion,\n }),\n };\n } else {\n uncached.push({ index: i, file });\n }\n }\n for (let i = 0; i < uncached.length; i += MANIFEST_BUILD_BATCH_SIZE) {\n const batch = uncached.slice(i, i + MANIFEST_BUILD_BATCH_SIZE);\n const results = await Promise.all(\n batch.map(({ file }) =>\n buildReconcileManifestFile(file, options.readFile, options.parseMemory, options.citationTemplate)\n )\n );\n for (let j = 0; j < batch.length; j += 1) {\n files[batch[j]!.index] = results[j]!;\n }\n }\n files.sort((left, right) => (left.path < right.path ? -1 : left.path > right.path ? 1 : 0));\n return {\n format: RECONCILE_MANIFEST_FORMAT,\n schemaVersion: RECONCILE_MANIFEST_SCHEMA_VERSION,\n files,\n };\n}\n\nfunction activeFactByPath(manifest: ReconcileManifest | undefined): Map<string, ActiveFactManifestFile> {\n const result = new Map<string, ActiveFactManifestFile>();\n for (const file of manifest?.files ?? []) {\n if (file.memory?.category === \"fact\" && file.memory.status === \"active\") {\n result.set(file.path, file as ActiveFactManifestFile);\n }\n }\n return result;\n}\n\nfunction memoryIdentityHashes(memory: ReconcileMemoryIdentity): string[] {\n return [memory.contentHash, ...(memory.contentHashAliases ?? [])];\n}\n\nfunction contentHashRows(files: Iterable<ActiveFactManifestFile>, contentHash: string): ContentHashPathEntry[] {\n const rows: ContentHashPathEntry[] = [];\n for (const file of files) {\n rows.push({ path: file.path, contentHash });\n }\n return rows;\n}\n\nfunction classifySemanticChange(\n current: ReconcileSemanticAgreement,\n prior: ReconcileSemanticAgreement | undefined\n): ReconcileSemanticChange {\n if (!prior) return \"unchanged\";\n const localChanged = current.local.sha256 !== prior.local.sha256;\n const peerChanged = current.peer.sha256 !== prior.peer.sha256;\n if (localChanged && peerChanged) return \"both_modified\";\n if (localChanged) return \"local_changed\";\n if (peerChanged) return \"peer_changed\";\n return \"unchanged\";\n}\n\nexport function collapseActiveFactDuplicates(\n plan: ReconcilePlan,\n localManifests: ReadonlyMap<string, ReconcileManifest>,\n peerManifests: ReadonlyMap<string, ReconcileManifest>,\n priorSemanticAgreements?: ReadonlyMap<string, readonly ReconcileSemanticAgreement[]>\n): ReconcilePlan {\n const entriesByNamespace = new Map<string, ReconcilePlanEntry[]>();\n for (const entry of plan.entries) {\n const entries = entriesByNamespace.get(entry.namespace) ?? [];\n entries.push({ ...entry });\n entriesByNamespace.set(entry.namespace, entries);\n }\n\n let changed = false;\n for (const namespace of new Set([...localManifests.keys(), ...peerManifests.keys()])) {\n const entries = entriesByNamespace.get(namespace) ?? [];\n const localManifest = localManifests.get(namespace);\n const peerManifest = peerManifests.get(namespace);\n const localByPath = activeFactByPath(localManifest);\n const peerByPath = activeFactByPath(peerManifest);\n const localFilesByPath = new Map((localManifest?.files ?? []).map((file) => [file.path, file]));\n const peerFilesByPath = new Map((peerManifest?.files ?? []).map((file) => [file.path, file]));\n const priorSemanticByPathPair = new Map(\n (priorSemanticAgreements?.get(namespace) ?? []).map((agreement) => [semanticAgreementKey(agreement), agreement])\n );\n const localByHash = new Map<string, ActiveFactManifestFile[]>();\n const peerByHash = new Map<string, ActiveFactManifestFile[]>();\n\n for (const file of localByPath.values()) {\n for (const hash of memoryIdentityHashes(file.memory)) {\n const bucket = localByHash.get(hash) ?? [];\n bucket.push(file);\n localByHash.set(hash, bucket);\n }\n }\n for (const file of peerByPath.values()) {\n for (const hash of memoryIdentityHashes(file.memory)) {\n const bucket = peerByHash.get(hash) ?? [];\n bucket.push(file);\n peerByHash.set(hash, bucket);\n }\n }\n\n const removed = new Set<ReconcilePlanEntry>();\n const replacements: ReconcilePlanEntry[] = [];\n const processedPathPairs = new Set<string>();\n for (const hash of new Set([...localByHash.keys(), ...peerByHash.keys()])) {\n const localCandidates = (localByHash.get(hash) ?? []).filter((file) => {\n const opposite = peerFilesByPath.get(file.path);\n const activeOpposite = peerByPath.get(file.path);\n return (\n opposite === undefined ||\n (activeOpposite !== undefined && memoryIdentityHashes(activeOpposite.memory).includes(hash))\n );\n });\n const peerCandidates = (peerByHash.get(hash) ?? []).filter((file) => {\n const opposite = localFilesByPath.get(file.path);\n const activeOpposite = localByPath.get(file.path);\n return (\n opposite === undefined ||\n (activeOpposite !== undefined && memoryIdentityHashes(activeOpposite.memory).includes(hash))\n );\n });\n const localPath = ContentHashIndex.resolvePathByHash(hash, contentHashRows(localCandidates, hash));\n const peerPath = ContentHashIndex.resolvePathByHash(hash, contentHashRows(peerCandidates, hash));\n\n if (localPath && peerPath && localPath !== peerPath) {\n const pathPair = `${localPath}\\0${peerPath}`;\n if (processedPathPairs.has(pathPair)) continue;\n processedPathPairs.add(pathPair);\n const localFile = localByPath.get(localPath);\n const peerFile = peerByPath.get(peerPath);\n if (!localFile || !peerFile) continue;\n const duplicatePaths = new Set([\n ...localCandidates.map((file) => file.path),\n ...peerCandidates.map((file) => file.path),\n ]);\n const authoritativeSamePathEntries = new Set(\n entries.filter(\n (entry) =>\n duplicatePaths.has(entry.path) &&\n localFilesByPath.has(entry.path) &&\n peerFilesByPath.has(entry.path) &&\n entry.action !== \"identical\"\n )\n );\n if (authoritativeSamePathEntries.size > 0) {\n for (const entry of entries) {\n if (\n duplicatePaths.has(entry.path) &&\n !authoritativeSamePathEntries.has(entry) &&\n (entry.action === \"pull\" || entry.action === \"push\" || entry.action === \"identical\")\n ) {\n removed.add(entry);\n changed = true;\n }\n }\n continue;\n }\n const unsafeEntry = entries.some(\n (entry) => duplicatePaths.has(entry.path) && (entry.action === \"suppress\" || entry.action === \"conflict\")\n );\n if (unsafeEntry) continue;\n for (const entry of entries) {\n if (\n duplicatePaths.has(entry.path) &&\n (entry.action === \"pull\" || entry.action === \"push\" || entry.action === \"identical\")\n ) {\n removed.add(entry);\n }\n }\n const semanticAgreement: ReconcileSemanticAgreement = {\n local: { path: localPath, sha256: localFile.sha256 },\n peer: { path: peerPath, sha256: peerFile.sha256 },\n };\n replacements.push({\n path: localPath < peerPath ? localPath : peerPath,\n namespace,\n action: \"identical\",\n reason: \"semantic_duplicate\",\n semanticAgreement,\n semanticChange: classifySemanticChange(\n semanticAgreement,\n priorSemanticByPathPair.get(semanticAgreementKey(semanticAgreement))\n ),\n });\n changed = true;\n continue;\n }\n\n const sameSideEntries = entries.filter((entry) => {\n if (localPath && entry.reason === \"local_only\") {\n return localCandidates.some((file) => file.path === entry.path);\n }\n if (peerPath && entry.reason === \"peer_only\") {\n return peerCandidates.some((file) => file.path === entry.path);\n }\n return false;\n });\n const canonicalPath = localPath ?? peerPath;\n const hasSharedCanonical = localPath !== undefined && localPath === peerPath;\n if (!canonicalPath || sameSideEntries.length === 0 || (!hasSharedCanonical && sameSideEntries.length < 2)) {\n continue;\n }\n for (const entry of sameSideEntries) {\n if (entry.path !== canonicalPath) {\n removed.add(entry);\n changed = true;\n }\n }\n }\n\n if (removed.size > 0 || replacements.length > 0) {\n entriesByNamespace.set(\n namespace,\n [...entries.filter((entry) => !removed.has(entry)), ...replacements].sort(compareReconcilePlanEntries)\n );\n }\n }\n\n if (!changed) return plan;\n const entries = [...entriesByNamespace.values()].flat().sort(compareReconcilePlanEntries);\n return {\n entries,\n byNamespace: summarizeReconcilePlan(entries),\n converged: entries.every((entry) => entry.action === \"identical\"),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,kBAAkB;AAmBpB,IAAM,4BAA4B;AAClC,IAAM,oCAAoC;AAC1C,IAAM,kCAAkC;AASxC,IAAM,8BAA8B;AAUpC,SAAS,qBAAqB,kBAAmC;AACtE,SAAO,UAAU,iCAAiC,eAAe,+BAA+B,aAAa,2BAA2B,aAAa,4BAA4B,gBAAgB,CAAC;AACpM;AA4CA,IAAM,iBAAiB;AACvB,IAAM,cAAc,IAAI,IAAI,oBAAo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F;AAAA,EACF;AAEA,MAAI,CAAC,QAAS,QAAO;AACrB,QAAM,UAAU,CAAC,GAAG,mBAAmB,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,2BAA2B;AACxF,SAAO;AAAA,IACL;AAAA,IACA,aAAa,uBAAuB,OAAO;AAAA,IAC3C,WAAW,QAAQ,MAAM,CAAC,UAAU,MAAM,WAAW,WAAW;AAAA,EAClE;AACF;","names":["entries"]}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import {
|
|
2
|
+
validateSpanOffsets
|
|
3
|
+
} from "./chunk-QJ2AX6DU.js";
|
|
4
|
+
import {
|
|
5
|
+
sliceSpanText
|
|
6
|
+
} from "./chunk-JE26AUX6.js";
|
|
7
|
+
import {
|
|
8
|
+
stampSpanSource,
|
|
9
|
+
verifySpanSource
|
|
10
|
+
} from "./chunk-A6CXG5WI.js";
|
|
11
|
+
import {
|
|
12
|
+
log
|
|
13
|
+
} from "./chunk-3WCASNQZ.js";
|
|
14
|
+
|
|
15
|
+
// src/extraction-span-materialize.ts
|
|
16
|
+
var SPAN_MAX_SLICE_CHARS = 400;
|
|
17
|
+
var SPAN_MAX_FRAME_WORDS = 15;
|
|
18
|
+
function stripUntrustedFactSpans(facts) {
|
|
19
|
+
return facts.map((fact) => {
|
|
20
|
+
if (fact.span === void 0 || fact.span === null) return fact;
|
|
21
|
+
const { span: _span, ...rest } = fact;
|
|
22
|
+
return rest;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function buildSpanMaterializeTurns(texts) {
|
|
26
|
+
return texts.map((text) => ({ text, stamp: stampSpanSource(text) }));
|
|
27
|
+
}
|
|
28
|
+
function truncateLocalExtractionConversation(conversation, maxConversationChars) {
|
|
29
|
+
return conversation.length > maxConversationChars ? `${conversation.slice(0, maxConversationChars)}
|
|
30
|
+
|
|
31
|
+
[truncated]` : conversation;
|
|
32
|
+
}
|
|
33
|
+
function bindLocalExtractionPrompt(conversation, turns, maxConversationChars, renderedConversation = conversation) {
|
|
34
|
+
const promptConversation = truncateLocalExtractionConversation(conversation, maxConversationChars);
|
|
35
|
+
if (conversation.length <= maxConversationChars || !conversation.endsWith(renderedConversation)) {
|
|
36
|
+
return { promptConversation, spanTurns: buildSpanMaterializeTurns(turns.map((turn) => turn.content)) };
|
|
37
|
+
}
|
|
38
|
+
const renderedStart = conversation.length - renderedConversation.length;
|
|
39
|
+
const limit = maxConversationChars;
|
|
40
|
+
const texts = [];
|
|
41
|
+
let pos = 0;
|
|
42
|
+
for (let index = 0; index < turns.length; index += 1) {
|
|
43
|
+
const turn = turns[index];
|
|
44
|
+
if (turn === void 0) {
|
|
45
|
+
texts.push("");
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (index > 0) pos += 2;
|
|
49
|
+
const label = turn.extractionContextOnly === true ? `context ${turn.role}` : turn.role;
|
|
50
|
+
pos += `[${label}] `.length;
|
|
51
|
+
const absStart = renderedStart + pos;
|
|
52
|
+
const absEnd = absStart + turn.content.length;
|
|
53
|
+
texts.push(absEnd > absStart && limit > absStart ? conversation.slice(absStart, Math.min(absEnd, limit)) : "");
|
|
54
|
+
pos += turn.content.length;
|
|
55
|
+
}
|
|
56
|
+
return { promptConversation, spanTurns: buildSpanMaterializeTurns(texts) };
|
|
57
|
+
}
|
|
58
|
+
function factCarriesSpan(fact) {
|
|
59
|
+
return fact.span !== void 0 && fact.span !== null;
|
|
60
|
+
}
|
|
61
|
+
function materializeFactSpan(fact, turns, mode) {
|
|
62
|
+
const span = fact.span ?? null;
|
|
63
|
+
if (span === null) {
|
|
64
|
+
return { fact, outcome: "fallback" };
|
|
65
|
+
}
|
|
66
|
+
const { sourceMessageIndex, charStart, charEnd, frame, sourceHash, sourceLength } = span;
|
|
67
|
+
const turn = turns[sourceMessageIndex];
|
|
68
|
+
if (!Number.isInteger(sourceMessageIndex) || sourceMessageIndex < 0 || sourceMessageIndex >= turns.length || turn === void 0) {
|
|
69
|
+
return { fact: stripSpan(fact), outcome: "fallback" };
|
|
70
|
+
}
|
|
71
|
+
const stampCheck = verifySpanSource(turn.text, turn.stamp);
|
|
72
|
+
if (!stampCheck.ok) {
|
|
73
|
+
return { fact: stripSpan(fact), outcome: "fallback" };
|
|
74
|
+
}
|
|
75
|
+
if (sourceHash !== void 0 && sourceHash !== turn.stamp.hash || sourceLength !== void 0 && sourceLength !== turn.stamp.length) {
|
|
76
|
+
return { fact: stripSpan(fact), outcome: "fallback" };
|
|
77
|
+
}
|
|
78
|
+
const offsetCheck = validateSpanOffsets({ start: charStart, end: charEnd, textLength: turn.text.length });
|
|
79
|
+
if (!offsetCheck.ok) {
|
|
80
|
+
return { fact: stripSpan(fact), outcome: "fallback" };
|
|
81
|
+
}
|
|
82
|
+
const slice = sliceSpanText({ text: turn.text, start: charStart, end: charEnd });
|
|
83
|
+
if (slice.length > SPAN_MAX_SLICE_CHARS || slice.trim().length === 0) {
|
|
84
|
+
return { fact: stripSpan(fact), outcome: "fallback" };
|
|
85
|
+
}
|
|
86
|
+
const frameWords = frame.trim().split(/\s+/).filter(Boolean);
|
|
87
|
+
if (frameWords.length === 0 || frameWords.length > SPAN_MAX_FRAME_WORDS) {
|
|
88
|
+
return { fact: stripSpan(fact), outcome: "fallback" };
|
|
89
|
+
}
|
|
90
|
+
const trimmedFrame = frameWords.join(" ");
|
|
91
|
+
const materialized = /[:—-]$/.test(trimmedFrame) ? `${trimmedFrame} ${slice}` : `${trimmedFrame}: ${slice}`;
|
|
92
|
+
if (mode === "on") {
|
|
93
|
+
return {
|
|
94
|
+
fact: { ...stripSpan(fact), content: materialized, quote: slice },
|
|
95
|
+
outcome: "span",
|
|
96
|
+
materialized
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
return { fact: stripSpan(fact), outcome: "span", materialized };
|
|
100
|
+
}
|
|
101
|
+
function spanAgreesWithContent(materialized, content) {
|
|
102
|
+
const left = materialized.trim();
|
|
103
|
+
const right = content.trim();
|
|
104
|
+
return left === right || left.includes(right) || right.includes(left);
|
|
105
|
+
}
|
|
106
|
+
function applyExtractionSpanMaterialization(result, turns, mode) {
|
|
107
|
+
if (mode === "off") {
|
|
108
|
+
return { ...result, facts: stripUntrustedFactSpans(result.facts) };
|
|
109
|
+
}
|
|
110
|
+
let attempts = 0;
|
|
111
|
+
let fallbacks = 0;
|
|
112
|
+
let agreements = 0;
|
|
113
|
+
const facts = result.facts.flatMap((fact) => {
|
|
114
|
+
if (!factCarriesSpan(fact)) {
|
|
115
|
+
return mode === "on" ? [] : [fact];
|
|
116
|
+
}
|
|
117
|
+
attempts += 1;
|
|
118
|
+
const { fact: materialized, outcome, materialized: text } = materializeFactSpan(
|
|
119
|
+
fact,
|
|
120
|
+
turns,
|
|
121
|
+
mode
|
|
122
|
+
);
|
|
123
|
+
if (outcome === "fallback") {
|
|
124
|
+
fallbacks += 1;
|
|
125
|
+
} else if (mode === "shadow" && text !== void 0) {
|
|
126
|
+
if (spanAgreesWithContent(text, fact.content)) {
|
|
127
|
+
agreements += 1;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return [materialized];
|
|
131
|
+
});
|
|
132
|
+
if (mode === "shadow") {
|
|
133
|
+
log.info(
|
|
134
|
+
`extraction span-mode shadow: ${agreements}/${attempts} span facts agree with generated content (${fallbacks} span validation fallbacks)`
|
|
135
|
+
);
|
|
136
|
+
} else if (fallbacks > 0) {
|
|
137
|
+
log.info(
|
|
138
|
+
`extraction span-mode: ${fallbacks}/${attempts} span facts fell back to generated content`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
return { ...result, facts };
|
|
142
|
+
}
|
|
143
|
+
function stripSpan(fact) {
|
|
144
|
+
const { span: _span, ...rest } = fact;
|
|
145
|
+
return rest;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export {
|
|
149
|
+
SPAN_MAX_SLICE_CHARS,
|
|
150
|
+
SPAN_MAX_FRAME_WORDS,
|
|
151
|
+
stripUntrustedFactSpans,
|
|
152
|
+
buildSpanMaterializeTurns,
|
|
153
|
+
truncateLocalExtractionConversation,
|
|
154
|
+
bindLocalExtractionPrompt,
|
|
155
|
+
factCarriesSpan,
|
|
156
|
+
materializeFactSpan,
|
|
157
|
+
spanAgreesWithContent,
|
|
158
|
+
applyExtractionSpanMaterialization
|
|
159
|
+
};
|
|
160
|
+
//# sourceMappingURL=chunk-3SL52JKD.js.map
|