@remnic/core 9.6.39 → 9.7.0
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 +6 -6
- package/dist/access-admin-ops-surface.js +16 -16
- package/dist/access-boundary.d.ts +6 -6
- package/dist/access-boundary.js +17 -17
- package/dist/access-cli.js +56 -55
- package/dist/access-cli.js.map +1 -1
- package/dist/access-http.d.ts +6 -6
- package/dist/access-http.js +22 -22
- package/dist/access-identity-continuity-surface.d.ts +5 -5
- package/dist/access-identity-continuity-surface.js +16 -16
- package/dist/access-lcm-surface.d.ts +6 -6
- package/dist/access-lcm-surface.js +16 -16
- package/dist/access-mcp.d.ts +6 -6
- package/dist/access-mcp.js +21 -21
- package/dist/access-observe-write-surface.d.ts +6 -6
- package/dist/access-observe-write-surface.js +16 -16
- package/dist/access-operations-batch.js +19 -19
- package/dist/access-operations.d.ts +9 -9
- package/dist/access-operations.js +20 -20
- package/dist/access-recall-surface.d.ts +6 -6
- package/dist/access-recall-surface.js +16 -16
- package/dist/access-schema.d.ts +64 -64
- package/dist/{access-service-Fw9AYEqG.d.ts → access-service-CJ5hrLqR.d.ts} +4 -4
- package/dist/access-service.d.ts +6 -6
- package/dist/access-service.js +16 -16
- package/dist/access-surface-catalog.d.ts +6 -6
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-memory-bridge.js +3 -3
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +1 -1
- package/dist/{auto-sync-4A5YBWYO.js → auto-sync-676N6N6Y.js} +4 -4
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +5 -5
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +5 -5
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/buffer.js +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 +4 -2
- package/dist/capabilities.js +1 -1
- package/dist/{catalog-CnS_MP-8.d.ts → catalog-XCOyxXKw.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +7 -7
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-SFHI7JBE.js → chunk-2FSHROYK.js} +3 -3
- package/dist/{chunk-WHZ7MK72.js → chunk-4YUPLX7U.js} +3 -3
- package/dist/{chunk-ZIKJD6NL.js → chunk-53Y3TETS.js} +2 -2
- package/dist/{chunk-UI4FVU6T.js → chunk-5CJVLG3H.js} +2 -2
- package/dist/{chunk-BAVVI5GP.js → chunk-7PND4PUC.js} +3 -3
- package/dist/{chunk-NREKOGZ2.js → chunk-ARD5NE4M.js} +3 -3
- package/dist/{chunk-GCTJG5MP.js → chunk-AWHOZTF6.js} +4 -4
- package/dist/{chunk-VSF7AAGE.js → chunk-BFPETA3S.js} +3 -2
- package/dist/chunk-BFPETA3S.js.map +1 -0
- package/dist/{chunk-ZGPDSEKG.js → chunk-BFVEEB7W.js} +2 -2
- package/dist/{chunk-AZK3NEHL.js → chunk-BLXNPBJI.js} +2 -2
- package/dist/chunk-C7SRUWBW.js +54 -0
- package/dist/chunk-C7SRUWBW.js.map +1 -0
- package/dist/{chunk-VTRF5QBX.js → chunk-CBOHQNTJ.js} +2 -2
- package/dist/{chunk-ZSDRGPMV.js → chunk-D6KNJRGX.js} +2 -2
- package/dist/{chunk-2V6L3L56.js → chunk-DDHT5J5M.js} +33 -8
- package/dist/chunk-DDHT5J5M.js.map +1 -0
- package/dist/{chunk-3WULMX34.js → chunk-DSWYYEIK.js} +10 -1
- package/dist/chunk-DSWYYEIK.js.map +1 -0
- package/dist/{chunk-U5JP7FCM.js → chunk-E47TABDR.js} +2 -2
- package/dist/{chunk-7TEWOG3R.js → chunk-FMECZFUT.js} +2 -2
- package/dist/{chunk-QWGNDWKB.js → chunk-FNMFJWBY.js} +2 -2
- package/dist/{chunk-CZGIIADK.js → chunk-FXGC5UUH.js} +56 -11
- package/dist/chunk-FXGC5UUH.js.map +1 -0
- package/dist/{chunk-JIKJPDQJ.js → chunk-GKCCHHZK.js} +15 -5
- package/dist/chunk-GKCCHHZK.js.map +1 -0
- package/dist/{chunk-EDD2G35Z.js → chunk-GWMTFDHF.js} +4 -4
- package/dist/{chunk-VCW74PNH.js → chunk-H67QFYUK.js} +2 -2
- package/dist/{chunk-5ELELET5.js → chunk-HT2DQ27U.js} +3 -3
- package/dist/{chunk-VU3SVYMA.js → chunk-HTIIXNJQ.js} +2 -2
- package/dist/{chunk-I73G4UH7.js → chunk-IALLX7EE.js} +2 -2
- package/dist/{chunk-PE6XR4GG.js → chunk-IKQTFQMI.js} +2 -2
- package/dist/{chunk-XZ5I7OZR.js → chunk-KIPLG7S7.js} +4 -4
- package/dist/{chunk-QLVLW7UD.js → chunk-KSBEEMQF.js} +17 -5
- package/dist/chunk-KSBEEMQF.js.map +1 -0
- package/dist/{chunk-RU73ZROD.js → chunk-KWJP22WP.js} +12 -12
- package/dist/{chunk-MNUHL34L.js → chunk-LKT755LP.js} +2 -2
- package/dist/{chunk-PI23H7FV.js → chunk-M7VGG3ID.js} +3 -3
- package/dist/{chunk-PWSZNML3.js → chunk-NGJT7IW5.js} +284 -38
- package/dist/chunk-NGJT7IW5.js.map +1 -0
- package/dist/{chunk-HVE3UVAB.js → chunk-NS4GEMLR.js} +3 -3
- package/dist/{chunk-ZMXXHUEZ.js → chunk-O24E5CFS.js} +3 -3
- package/dist/{chunk-3BZDBG7U.js → chunk-PML3GU4Q.js} +3 -3
- package/dist/{chunk-DQ2CJYUM.js → chunk-PSQ32V5P.js} +3 -3
- package/dist/{chunk-7XY6TJLM.js → chunk-PUPQ2PMC.js} +3 -3
- package/dist/{chunk-EBVUFGJ4.js → chunk-QFOLNA2C.js} +2 -2
- package/dist/{chunk-METJNEIB.js → chunk-QMUERLZK.js} +1 -1
- package/dist/chunk-QMUERLZK.js.map +1 -0
- package/dist/{chunk-PQG2AOL4.js → chunk-QRYNEVHP.js} +28 -4
- package/dist/{chunk-PQG2AOL4.js.map → chunk-QRYNEVHP.js.map} +1 -1
- package/dist/{chunk-CVEEJKRD.js → chunk-RQTCDICG.js} +2 -2
- package/dist/{chunk-F7AE7L6G.js → chunk-RZEJDF3S.js} +2 -2
- package/dist/{chunk-YFBTVOMB.js → chunk-SYNYI4ZM.js} +2 -2
- package/dist/{chunk-BRDJ2HFP.js → chunk-TRWPCR6P.js} +2 -2
- package/dist/{chunk-YAN6NTJN.js → chunk-UKA7GNI2.js} +3 -3
- package/dist/{chunk-TQNRI55H.js → chunk-UR6PBX2J.js} +4 -51
- package/dist/chunk-UR6PBX2J.js.map +1 -0
- package/dist/{chunk-XH2Y6UIW.js → chunk-VD56CJRR.js} +4 -4
- package/dist/{chunk-J3XHPFEU.js → chunk-VXMWDXIJ.js} +2 -2
- package/dist/{chunk-QT2RZNRT.js → chunk-VY6LKKVN.js} +2 -2
- package/dist/{chunk-PRTA6444.js → chunk-W4PGTAS2.js} +2 -2
- package/dist/{chunk-WX4XTAOI.js → chunk-WGE3OYC3.js} +7 -7
- package/dist/{chunk-RVLE2SNP.js → chunk-X6FSCBJZ.js} +22 -22
- package/dist/{chunk-6MWGGPJJ.js → chunk-Y4EMHIQ5.js} +7 -7
- package/dist/{chunk-IGCQHJSQ.js → chunk-Z3HJ5L3Z.js} +2 -2
- package/dist/{chunk-O2EL7EGG.js → chunk-ZQ7UBUZ6.js} +2 -2
- package/dist/{chunk-5SORASJK.js → chunk-ZXUG3AFP.js} +2 -2
- package/dist/{cli-PGF41MN6.d.ts → cli-CtECZr1q.d.ts} +5 -5
- package/dist/cli.d.ts +8 -8
- package/dist/cli.js +37 -36
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +7 -7
- 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 +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +5 -5
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +7 -7
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/contradiction/index.js +2 -2
- package/dist/{contradiction-scan-SSKCAMLX.js → contradiction-scan-J57T5QV7.js} +3 -3
- 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/day-summary.d.ts +1 -1
- package/dist/day-summary.js +2 -2
- package/dist/delinearize.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/embedding-fallback.js +2 -2
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +6 -6
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +5 -5
- package/dist/explicit-capture.js +2 -2
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-faithfulness.js +2 -2
- 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.d.ts +17 -2
- package/dist/extraction.js +12 -7
- package/dist/fallback-llm.d.ts +5 -2
- package/dist/fallback-llm.js +1 -1
- package/dist/{first-start-migration-4I3VDSYS.js → first-start-migration-TI67YMLG.js} +2 -2
- 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-reinforcement.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/identity-continuity.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +56 -55
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- 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/live-connectors-runner.js +3 -2
- package/dist/local-llm.d.ts +1 -1
- package/dist/local-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +5 -5
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +5 -5
- package/dist/maintenance/rebuild-memory-projection.js +6 -6
- package/dist/mcp-memory-inspector-app.d.ts +6 -6
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.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-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/principal.js +2 -2
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +6 -6
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +2 -2
- package/dist/operator-toolkit.js +16 -16
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/compression-guideline-coordinator.js +2 -2
- package/dist/orchestration/maintenance.d.ts +2 -2
- package/dist/orchestration/maintenance.js +10 -10
- package/dist/{orchestrator-xePY-WPe.d.ts → orchestrator-CKctWsw9.d.ts} +51 -4
- package/dist/orchestrator.d.ts +5 -5
- package/dist/orchestrator.js +56 -55
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-Zgwz-Kne.d.ts → pipeline-BWwGIys5.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{qmd-B6Xwfn5_.d.ts → qmd-DFuUrBWW.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-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-planner-llm.d.ts +1 -1
- package/dist/recall-planner-llm.js +1 -1
- 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/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/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +2 -2
- 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/schemas.d.ts +52 -52
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/embed-helper.js +2 -2
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +3 -3
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +3 -3
- 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-ClfD_CWg.d.ts → semantic-consolidation-1Wlr7NWL.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +7 -7
- package/dist/semantic-rule-promotion.js +5 -5
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +5 -5
- 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 +9 -9
- package/dist/shared-context/manager.js +2 -2
- package/dist/signal.d.ts +1 -1
- package/dist/{storage-ZrHZ0dSM.d.ts → storage-BQwP90sb.d.ts} +1 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +4 -4
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +4 -4
- package/dist/summary-snapshot.d.ts +1 -1
- 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/{tier-stats-5XF4UBRQ.js → tier-stats-KV7IWCJR.js} +2 -2
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/types.d.ts +66 -66
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-BbtQZBq9.d.ts → types-DgIkyAsK.d.ts} +39 -1
- 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 +5 -5
- package/package.json +2 -2
- package/src/buffer-session.test.ts +40 -8
- package/src/buffer.ts +41 -17
- package/src/capabilities.test.ts +1 -0
- package/src/capabilities.ts +4 -0
- package/src/config.test.ts +19 -0
- package/src/config.ts +29 -0
- package/src/extraction.test.ts +39 -0
- package/src/extraction.ts +72 -2
- package/src/fallback-llm.ts +26 -5
- package/src/operator-toolkit.ts +53 -0
- package/src/orchestration/extraction-run.test.ts +639 -0
- package/src/orchestration/extraction-run.ts +366 -2
- package/src/orchestration/session-context.ts +2 -0
- package/src/orchestration/turn-ingestion.ts +5 -0
- package/src/orchestrator-flush.test.ts +36 -2
- package/src/orchestrator.ts +12 -1
- package/src/storage.ts +34 -0
- package/src/types.ts +40 -0
- package/dist/chunk-2V6L3L56.js.map +0 -1
- package/dist/chunk-3WULMX34.js.map +0 -1
- package/dist/chunk-CZGIIADK.js.map +0 -1
- package/dist/chunk-JIKJPDQJ.js.map +0 -1
- package/dist/chunk-METJNEIB.js.map +0 -1
- package/dist/chunk-PWSZNML3.js.map +0 -1
- package/dist/chunk-QLVLW7UD.js.map +0 -1
- package/dist/chunk-TQNRI55H.js.map +0 -1
- package/dist/chunk-VSF7AAGE.js.map +0 -1
- /package/dist/{auto-sync-4A5YBWYO.js.map → auto-sync-676N6N6Y.js.map} +0 -0
- /package/dist/{chunk-SFHI7JBE.js.map → chunk-2FSHROYK.js.map} +0 -0
- /package/dist/{chunk-WHZ7MK72.js.map → chunk-4YUPLX7U.js.map} +0 -0
- /package/dist/{chunk-ZIKJD6NL.js.map → chunk-53Y3TETS.js.map} +0 -0
- /package/dist/{chunk-UI4FVU6T.js.map → chunk-5CJVLG3H.js.map} +0 -0
- /package/dist/{chunk-BAVVI5GP.js.map → chunk-7PND4PUC.js.map} +0 -0
- /package/dist/{chunk-NREKOGZ2.js.map → chunk-ARD5NE4M.js.map} +0 -0
- /package/dist/{chunk-GCTJG5MP.js.map → chunk-AWHOZTF6.js.map} +0 -0
- /package/dist/{chunk-ZGPDSEKG.js.map → chunk-BFVEEB7W.js.map} +0 -0
- /package/dist/{chunk-AZK3NEHL.js.map → chunk-BLXNPBJI.js.map} +0 -0
- /package/dist/{chunk-VTRF5QBX.js.map → chunk-CBOHQNTJ.js.map} +0 -0
- /package/dist/{chunk-ZSDRGPMV.js.map → chunk-D6KNJRGX.js.map} +0 -0
- /package/dist/{chunk-U5JP7FCM.js.map → chunk-E47TABDR.js.map} +0 -0
- /package/dist/{chunk-7TEWOG3R.js.map → chunk-FMECZFUT.js.map} +0 -0
- /package/dist/{chunk-QWGNDWKB.js.map → chunk-FNMFJWBY.js.map} +0 -0
- /package/dist/{chunk-EDD2G35Z.js.map → chunk-GWMTFDHF.js.map} +0 -0
- /package/dist/{chunk-VCW74PNH.js.map → chunk-H67QFYUK.js.map} +0 -0
- /package/dist/{chunk-5ELELET5.js.map → chunk-HT2DQ27U.js.map} +0 -0
- /package/dist/{chunk-VU3SVYMA.js.map → chunk-HTIIXNJQ.js.map} +0 -0
- /package/dist/{chunk-I73G4UH7.js.map → chunk-IALLX7EE.js.map} +0 -0
- /package/dist/{chunk-PE6XR4GG.js.map → chunk-IKQTFQMI.js.map} +0 -0
- /package/dist/{chunk-XZ5I7OZR.js.map → chunk-KIPLG7S7.js.map} +0 -0
- /package/dist/{chunk-RU73ZROD.js.map → chunk-KWJP22WP.js.map} +0 -0
- /package/dist/{chunk-MNUHL34L.js.map → chunk-LKT755LP.js.map} +0 -0
- /package/dist/{chunk-PI23H7FV.js.map → chunk-M7VGG3ID.js.map} +0 -0
- /package/dist/{chunk-HVE3UVAB.js.map → chunk-NS4GEMLR.js.map} +0 -0
- /package/dist/{chunk-ZMXXHUEZ.js.map → chunk-O24E5CFS.js.map} +0 -0
- /package/dist/{chunk-3BZDBG7U.js.map → chunk-PML3GU4Q.js.map} +0 -0
- /package/dist/{chunk-DQ2CJYUM.js.map → chunk-PSQ32V5P.js.map} +0 -0
- /package/dist/{chunk-7XY6TJLM.js.map → chunk-PUPQ2PMC.js.map} +0 -0
- /package/dist/{chunk-EBVUFGJ4.js.map → chunk-QFOLNA2C.js.map} +0 -0
- /package/dist/{chunk-CVEEJKRD.js.map → chunk-RQTCDICG.js.map} +0 -0
- /package/dist/{chunk-F7AE7L6G.js.map → chunk-RZEJDF3S.js.map} +0 -0
- /package/dist/{chunk-YFBTVOMB.js.map → chunk-SYNYI4ZM.js.map} +0 -0
- /package/dist/{chunk-BRDJ2HFP.js.map → chunk-TRWPCR6P.js.map} +0 -0
- /package/dist/{chunk-YAN6NTJN.js.map → chunk-UKA7GNI2.js.map} +0 -0
- /package/dist/{chunk-XH2Y6UIW.js.map → chunk-VD56CJRR.js.map} +0 -0
- /package/dist/{chunk-J3XHPFEU.js.map → chunk-VXMWDXIJ.js.map} +0 -0
- /package/dist/{chunk-QT2RZNRT.js.map → chunk-VY6LKKVN.js.map} +0 -0
- /package/dist/{chunk-PRTA6444.js.map → chunk-W4PGTAS2.js.map} +0 -0
- /package/dist/{chunk-WX4XTAOI.js.map → chunk-WGE3OYC3.js.map} +0 -0
- /package/dist/{chunk-RVLE2SNP.js.map → chunk-X6FSCBJZ.js.map} +0 -0
- /package/dist/{chunk-6MWGGPJJ.js.map → chunk-Y4EMHIQ5.js.map} +0 -0
- /package/dist/{chunk-IGCQHJSQ.js.map → chunk-Z3HJ5L3Z.js.map} +0 -0
- /package/dist/{chunk-O2EL7EGG.js.map → chunk-ZQ7UBUZ6.js.map} +0 -0
- /package/dist/{chunk-5SORASJK.js.map → chunk-ZXUG3AFP.js.map} +0 -0
- /package/dist/{contradiction-scan-SSKCAMLX.js.map → contradiction-scan-J57T5QV7.js.map} +0 -0
- /package/dist/{first-start-migration-4I3VDSYS.js.map → first-start-migration-TI67YMLG.js.map} +0 -0
- /package/dist/{tier-stats-5XF4UBRQ.js.map → tier-stats-KV7IWCJR.js.map} +0 -0
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
loadSyncState,
|
|
5
5
|
syncWearableSource,
|
|
6
6
|
wearableSourceLabel
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VXMWDXIJ.js";
|
|
8
8
|
import {
|
|
9
9
|
CompressionGuidelineCoordinator
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TRWPCR6P.js";
|
|
11
11
|
import {
|
|
12
12
|
MaintenanceScheduler
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HT2DQ27U.js";
|
|
14
14
|
import {
|
|
15
15
|
runPeerProfileReasoner
|
|
16
16
|
} from "./chunk-I74SUMNI.js";
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
CompoundingEngine,
|
|
28
28
|
defaultTierMigrationCycleBudget
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-AWHOZTF6.js";
|
|
30
30
|
import {
|
|
31
31
|
SharedContextManager
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-5CJVLG3H.js";
|
|
33
33
|
import {
|
|
34
34
|
chunkTranscriptEntries
|
|
35
35
|
} from "./chunk-TECVW3JP.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
} from "./chunk-4EX5WZ4M.js";
|
|
71
71
|
import {
|
|
72
72
|
HourlySummarizer
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-KIPLG7S7.js";
|
|
74
74
|
import {
|
|
75
75
|
SessionObserverState
|
|
76
76
|
} from "./chunk-FDPZVY6D.js";
|
|
@@ -144,7 +144,7 @@ import {
|
|
|
144
144
|
} from "./chunk-PD6O7AXF.js";
|
|
145
145
|
import {
|
|
146
146
|
runLiveConnectorsOnce
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-HTIIXNJQ.js";
|
|
148
148
|
import {
|
|
149
149
|
classifyMemoryKind
|
|
150
150
|
} from "./chunk-YAZNBMNF.js";
|
|
@@ -157,14 +157,14 @@ import {
|
|
|
157
157
|
getVerdictKind,
|
|
158
158
|
judgeFactDurability,
|
|
159
159
|
validateProcedureExtraction
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-SYNYI4ZM.js";
|
|
161
161
|
import {
|
|
162
162
|
contentMatchesRedactionRules,
|
|
163
163
|
loadRedactionRules
|
|
164
164
|
} from "./chunk-LTHVM4XN.js";
|
|
165
165
|
import {
|
|
166
166
|
ExtractionEngine
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-FXGC5UUH.js";
|
|
168
168
|
import {
|
|
169
169
|
parseMemoryActionEligibilityContext
|
|
170
170
|
} from "./chunk-5GSUBCZM.js";
|
|
@@ -173,7 +173,7 @@ import {
|
|
|
173
173
|
} from "./chunk-KAWTOYAW.js";
|
|
174
174
|
import {
|
|
175
175
|
LocalLlmClient
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-VY6LKKVN.js";
|
|
177
177
|
import {
|
|
178
178
|
buildFocusedListRecallSection,
|
|
179
179
|
shouldRecallFocusedListEvidence
|
|
@@ -191,18 +191,18 @@ import {
|
|
|
191
191
|
} from "./chunk-TVIVY7KU.js";
|
|
192
192
|
import {
|
|
193
193
|
formatDaySummaryMemories
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-IALLX7EE.js";
|
|
195
195
|
import {
|
|
196
196
|
tryDirectAnswer
|
|
197
197
|
} from "./chunk-Q6IP2ARR.js";
|
|
198
198
|
import {
|
|
199
199
|
EmbeddingFallback
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-ZQ7UBUZ6.js";
|
|
201
201
|
import {
|
|
202
202
|
buildEntityRecallSection,
|
|
203
203
|
entityRecentTranscriptLookbackHours,
|
|
204
204
|
readRecentEntityTranscriptEntries
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-4YUPLX7U.js";
|
|
206
206
|
import {
|
|
207
207
|
normalizeReplaySessionKey
|
|
208
208
|
} from "./chunk-AJVLDJU6.js";
|
|
@@ -212,14 +212,14 @@ import {
|
|
|
212
212
|
import {
|
|
213
213
|
compareVerifiedEpisodeResults,
|
|
214
214
|
searchVerifiedEpisodes
|
|
215
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-FMECZFUT.js";
|
|
216
216
|
import {
|
|
217
217
|
ThreadingManager
|
|
218
218
|
} from "./chunk-DBRYEIGY.js";
|
|
219
219
|
import {
|
|
220
220
|
compareVerifiedSemanticRuleResults,
|
|
221
221
|
searchVerifiedSemanticRules
|
|
222
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-53Y3TETS.js";
|
|
223
223
|
import {
|
|
224
224
|
searchWorkProductLedgerEntries
|
|
225
225
|
} from "./chunk-ZRWB5D4H.js";
|
|
@@ -232,14 +232,14 @@ import {
|
|
|
232
232
|
import {
|
|
233
233
|
runNamespaceMaintenanceFanout,
|
|
234
234
|
summarizeNamespaceMaintenanceHealth
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-DDHT5J5M.js";
|
|
236
236
|
import {
|
|
237
237
|
NamespaceCatalog,
|
|
238
238
|
planNamespaceMaintenance
|
|
239
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-VD56CJRR.js";
|
|
240
240
|
import {
|
|
241
241
|
NamespaceStorageRouter
|
|
242
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-PUPQ2PMC.js";
|
|
243
243
|
import {
|
|
244
244
|
searchHarmonicRetrieval
|
|
245
245
|
} from "./chunk-AV5ZEH4M.js";
|
|
@@ -274,7 +274,7 @@ import {
|
|
|
274
274
|
materializeAfterSemanticConsolidation,
|
|
275
275
|
parseConsolidationResponse,
|
|
276
276
|
parseOperatorAwareConsolidationResponse
|
|
277
|
-
} from "./chunk-
|
|
277
|
+
} from "./chunk-PML3GU4Q.js";
|
|
278
278
|
import {
|
|
279
279
|
buildRecallQueryPolicy
|
|
280
280
|
} from "./chunk-LBJBNWS2.js";
|
|
@@ -296,7 +296,7 @@ import {
|
|
|
296
296
|
} from "./chunk-UQ7RN5HK.js";
|
|
297
297
|
import {
|
|
298
298
|
SmartBuffer
|
|
299
|
-
} from "./chunk-
|
|
299
|
+
} from "./chunk-KSBEEMQF.js";
|
|
300
300
|
import {
|
|
301
301
|
isDisagreementPrompt
|
|
302
302
|
} from "./chunk-H3FZVNRN.js";
|
|
@@ -323,7 +323,7 @@ import {
|
|
|
323
323
|
createCorrectionService,
|
|
324
324
|
detectPassiveCorrections,
|
|
325
325
|
qmdCollectionPathParts
|
|
326
|
-
} from "./chunk-
|
|
326
|
+
} from "./chunk-KWJP22WP.js";
|
|
327
327
|
import {
|
|
328
328
|
importCapsule
|
|
329
329
|
} from "./chunk-M5QKGHCR.js";
|
|
@@ -339,7 +339,7 @@ import {
|
|
|
339
339
|
} from "./chunk-FF4KLI5W.js";
|
|
340
340
|
import {
|
|
341
341
|
buildXraySnapshot
|
|
342
|
-
} from "./chunk-
|
|
342
|
+
} from "./chunk-BLXNPBJI.js";
|
|
343
343
|
import {
|
|
344
344
|
objectiveStateStoreOverrideForNamespace,
|
|
345
345
|
searchObjectiveStateSnapshots
|
|
@@ -351,14 +351,14 @@ import {
|
|
|
351
351
|
resolveNamespaceFromStorageDir,
|
|
352
352
|
resolveScopePlan,
|
|
353
353
|
resolveScopeProfilePlan
|
|
354
|
-
} from "./chunk-
|
|
354
|
+
} from "./chunk-7PND4PUC.js";
|
|
355
355
|
import {
|
|
356
356
|
NamespaceSearchRouter
|
|
357
|
-
} from "./chunk-
|
|
357
|
+
} from "./chunk-PSQ32V5P.js";
|
|
358
358
|
import {
|
|
359
359
|
createConversationIndexRuntime,
|
|
360
360
|
createSearchBackend
|
|
361
|
-
} from "./chunk-
|
|
361
|
+
} from "./chunk-2FSHROYK.js";
|
|
362
362
|
import {
|
|
363
363
|
NoopSearchBackend
|
|
364
364
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -381,7 +381,7 @@ import {
|
|
|
381
381
|
} from "./chunk-QDW3E4RD.js";
|
|
382
382
|
import {
|
|
383
383
|
shouldSkipImplicitExtraction
|
|
384
|
-
} from "./chunk-
|
|
384
|
+
} from "./chunk-BFVEEB7W.js";
|
|
385
385
|
import {
|
|
386
386
|
searchCausalTrajectories
|
|
387
387
|
} from "./chunk-7XGSIUP5.js";
|
|
@@ -394,7 +394,7 @@ import {
|
|
|
394
394
|
} from "./chunk-TBBDFYXW.js";
|
|
395
395
|
import {
|
|
396
396
|
buildChainFollowupGenerator
|
|
397
|
-
} from "./chunk-
|
|
397
|
+
} from "./chunk-RQTCDICG.js";
|
|
398
398
|
import {
|
|
399
399
|
ContentHashIndex,
|
|
400
400
|
StorageManager,
|
|
@@ -409,7 +409,7 @@ import {
|
|
|
409
409
|
reconstructFusionInputs,
|
|
410
410
|
selfDeps,
|
|
411
411
|
serializeFusionDay
|
|
412
|
-
} from "./chunk-
|
|
412
|
+
} from "./chunk-QRYNEVHP.js";
|
|
413
413
|
import {
|
|
414
414
|
bodyIsEscaped,
|
|
415
415
|
decodeTranscriptBody,
|
|
@@ -446,7 +446,7 @@ import {
|
|
|
446
446
|
} from "./chunk-SVOZFLIQ.js";
|
|
447
447
|
import {
|
|
448
448
|
confidenceTier
|
|
449
|
-
} from "./chunk-
|
|
449
|
+
} from "./chunk-QMUERLZK.js";
|
|
450
450
|
import {
|
|
451
451
|
buildQmdRecallCacheKey,
|
|
452
452
|
getCachedQmdRecall,
|
|
@@ -464,12 +464,12 @@ import {
|
|
|
464
464
|
applyFaithfulnessVerdict,
|
|
465
465
|
createFaithfulnessCounters,
|
|
466
466
|
runFaithfulnessGateBatch
|
|
467
|
-
} from "./chunk-
|
|
467
|
+
} from "./chunk-LKT755LP.js";
|
|
468
468
|
import {
|
|
469
469
|
FallbackLlmClient,
|
|
470
470
|
fallbackLlmRuntimeContextFromConfig,
|
|
471
471
|
gatewayTaskChainOptions
|
|
472
|
-
} from "./chunk-
|
|
472
|
+
} from "./chunk-GKCCHHZK.js";
|
|
473
473
|
import {
|
|
474
474
|
CAPSULE_ID_PATTERN
|
|
475
475
|
} from "./chunk-WEHSQBFR.js";
|
|
@@ -486,7 +486,7 @@ import {
|
|
|
486
486
|
defaultNamespaceForPrincipal,
|
|
487
487
|
recallNamespacesForPrincipal,
|
|
488
488
|
resolvePrincipal
|
|
489
|
-
} from "./chunk-
|
|
489
|
+
} from "./chunk-IKQTFQMI.js";
|
|
490
490
|
import {
|
|
491
491
|
isSafeRouteNamespace,
|
|
492
492
|
selectRouteRule
|
|
@@ -512,7 +512,7 @@ import {
|
|
|
512
512
|
resolveRecallEnhancementCapabilities,
|
|
513
513
|
resolveSecurityCapabilities,
|
|
514
514
|
resolveUtilityLearningCapabilities
|
|
515
|
-
} from "./chunk-
|
|
515
|
+
} from "./chunk-BFPETA3S.js";
|
|
516
516
|
import {
|
|
517
517
|
sanitizeMemoryContent
|
|
518
518
|
} from "./chunk-5GKPFL3S.js";
|
|
@@ -3324,12 +3324,39 @@ function deriveTopicsFromExtraction(result) {
|
|
|
3324
3324
|
}
|
|
3325
3325
|
return [...topics].slice(0, 16);
|
|
3326
3326
|
}
|
|
3327
|
+
var EXTRACTION_RETRY_STATE_MAX_ENTRIES = 500;
|
|
3328
|
+
function computeExtractionRetryNextEligibleMs(attempts, scheduleMs, maxBackoffMs, jitterRatio, now, rng = Math.random) {
|
|
3329
|
+
const cap = Number.isFinite(maxBackoffMs) && maxBackoffMs > 0 ? maxBackoffMs : 0;
|
|
3330
|
+
if (!Array.isArray(scheduleMs) || scheduleMs.length === 0) {
|
|
3331
|
+
return now + cap;
|
|
3332
|
+
}
|
|
3333
|
+
const idx = Math.min(Math.max(attempts - 1, 0), scheduleMs.length - 1);
|
|
3334
|
+
const step = scheduleMs[idx];
|
|
3335
|
+
const base = Math.min(typeof step === "number" && step > 0 ? step : cap, cap);
|
|
3336
|
+
const jitter = 1 + (rng() * 2 - 1) * jitterRatio;
|
|
3337
|
+
return now + Math.max(0, Math.round(base * jitter));
|
|
3338
|
+
}
|
|
3339
|
+
function capExtractionRetryStateEntries(entries, maxEntries) {
|
|
3340
|
+
if (maxEntries <= 0) return [];
|
|
3341
|
+
const sorted = [...entries].sort((a, b) => a.firstFailedAt.localeCompare(b.firstFailedAt));
|
|
3342
|
+
return sorted.slice(-maxEntries);
|
|
3343
|
+
}
|
|
3327
3344
|
var ExtractionRunCoordinator = class {
|
|
3328
3345
|
constructor(deps) {
|
|
3329
3346
|
this.deps = deps;
|
|
3330
3347
|
}
|
|
3331
3348
|
deps;
|
|
3332
3349
|
recentExtractionFingerprints = /* @__PURE__ */ new Map();
|
|
3350
|
+
// Per-fingerprint extraction retry/backoff state (extraction hot-loop
|
|
3351
|
+
// hardening). Outer key = namespace, inner key = fingerprint. Hydrated lazily
|
|
3352
|
+
// from namespace-scoped meta so the hot path is a Map lookup; persisted back
|
|
3353
|
+
// to meta on change (restart-safe, cross-process coherent via the shared
|
|
3354
|
+
// meta.json). The breaker below is intentionally per-process in-memory
|
|
3355
|
+
// (mirrors local-llm.cooldownUntilMs); a restart clears it but the persisted
|
|
3356
|
+
// backoff still throttles, so a restart can't resurrect the hot loop.
|
|
3357
|
+
extractionRetryState = /* @__PURE__ */ new Map();
|
|
3358
|
+
hydratedRetryNamespaces = /* @__PURE__ */ new Set();
|
|
3359
|
+
providerBreaker = { consecutiveFailures: 0, openUntilMs: 0, state: "closed", lastReason: "" };
|
|
3333
3360
|
get config() {
|
|
3334
3361
|
return this.deps.config;
|
|
3335
3362
|
}
|
|
@@ -3407,6 +3434,150 @@ ${normalized}`).digest("hex");
|
|
|
3407
3434
|
}
|
|
3408
3435
|
}
|
|
3409
3436
|
// -------------------------------------------------------------------------
|
|
3437
|
+
// Extraction retry/backoff + circuit breaker (extraction hot-loop hardening)
|
|
3438
|
+
// -------------------------------------------------------------------------
|
|
3439
|
+
/** Lazily hydrate the in-memory retry-state mirror for a namespace from meta.
|
|
3440
|
+
* One-time per namespace per coordinator; the hot path is then a Map lookup.
|
|
3441
|
+
* Cross-process coherence: a fresh coordinator hydrates from the shared
|
|
3442
|
+
* meta.json, so a failure persisted by another process is honored here. */
|
|
3443
|
+
hydrateRetryStateFromMeta(namespace, meta) {
|
|
3444
|
+
if (this.hydratedRetryNamespaces.has(namespace)) return;
|
|
3445
|
+
this.hydratedRetryNamespaces.add(namespace);
|
|
3446
|
+
const nsMap = this.extractionRetryState.get(namespace) ?? /* @__PURE__ */ new Map();
|
|
3447
|
+
for (const entry of meta.extractionRetryState ?? []) {
|
|
3448
|
+
const nextEligibleAtMs = Date.parse(entry.nextEligibleAt);
|
|
3449
|
+
const firstFailedAtMs = Date.parse(entry.firstFailedAt);
|
|
3450
|
+
nsMap.set(entry.fingerprint, {
|
|
3451
|
+
attempts: entry.attempts,
|
|
3452
|
+
nextEligibleAtMs: Number.isFinite(nextEligibleAtMs) ? nextEligibleAtMs : 0,
|
|
3453
|
+
firstFailedAtMs: Number.isFinite(firstFailedAtMs) ? firstFailedAtMs : Date.now(),
|
|
3454
|
+
lastFailureClass: entry.lastFailureClass
|
|
3455
|
+
});
|
|
3456
|
+
}
|
|
3457
|
+
this.extractionRetryState.set(namespace, nsMap);
|
|
3458
|
+
}
|
|
3459
|
+
logBreakerTransition(state) {
|
|
3460
|
+
log.warn("extraction: provider circuit breaker transition", {
|
|
3461
|
+
state,
|
|
3462
|
+
consecutiveFailures: this.providerBreaker.consecutiveFailures,
|
|
3463
|
+
lastReason: this.providerBreaker.lastReason,
|
|
3464
|
+
openUntilMs: this.providerBreaker.openUntilMs
|
|
3465
|
+
});
|
|
3466
|
+
}
|
|
3467
|
+
/** True while the breaker suppresses non-forced attempts. Flips an expired
|
|
3468
|
+
* `open` breaker to `half_open`, which allows exactly one probe (the next
|
|
3469
|
+
* non-forced attempt) because the extraction queue is a serial drain. */
|
|
3470
|
+
isProviderBreakerOpen(now) {
|
|
3471
|
+
if (now < this.providerBreaker.openUntilMs) return true;
|
|
3472
|
+
if (this.providerBreaker.state === "open") {
|
|
3473
|
+
this.providerBreaker.state = "half_open";
|
|
3474
|
+
this.logBreakerTransition("half_open");
|
|
3475
|
+
}
|
|
3476
|
+
return false;
|
|
3477
|
+
}
|
|
3478
|
+
onProviderFailure(cls, now) {
|
|
3479
|
+
this.providerBreaker.consecutiveFailures += 1;
|
|
3480
|
+
const trip = cls === "auth_config" || // A failed half-open probe re-opens immediately (standard breaker
|
|
3481
|
+
// semantics). Without this, an auth_config-opened breaker (which trips
|
|
3482
|
+
// below the threshold) would get stuck half_open after a transient
|
|
3483
|
+
// probe failure and stop suppressing (cursor review).
|
|
3484
|
+
this.providerBreaker.state === "half_open" || this.providerBreaker.consecutiveFailures >= this.config.extractionBreakerFailureThreshold;
|
|
3485
|
+
if (!trip) return;
|
|
3486
|
+
const cooldown = cls === "auth_config" ? this.config.extractionBreakerAuthCooldownMs : this.config.extractionBreakerCooldownMs;
|
|
3487
|
+
this.providerBreaker.openUntilMs = now + Math.max(0, cooldown);
|
|
3488
|
+
this.providerBreaker.lastReason = cls;
|
|
3489
|
+
if (this.providerBreaker.state !== "open") {
|
|
3490
|
+
this.providerBreaker.state = "open";
|
|
3491
|
+
this.logBreakerTransition("open");
|
|
3492
|
+
}
|
|
3493
|
+
}
|
|
3494
|
+
resetProviderBreakerOnSuccess() {
|
|
3495
|
+
const wasDisturbed = this.providerBreaker.state !== "closed" || this.providerBreaker.consecutiveFailures > 0 || this.providerBreaker.openUntilMs > 0;
|
|
3496
|
+
if (!wasDisturbed) return;
|
|
3497
|
+
const wasOpen = this.providerBreaker.state !== "closed";
|
|
3498
|
+
this.providerBreaker.consecutiveFailures = 0;
|
|
3499
|
+
this.providerBreaker.openUntilMs = 0;
|
|
3500
|
+
this.providerBreaker.lastReason = "";
|
|
3501
|
+
this.providerBreaker.state = "closed";
|
|
3502
|
+
if (wasOpen) this.logBreakerTransition("closed");
|
|
3503
|
+
}
|
|
3504
|
+
/** Rebuild `meta.extractionRetryState` from the in-memory namespace mirror,
|
|
3505
|
+
* bounded to the newest entries, and prune the mirror to match. */
|
|
3506
|
+
persistRetryStateToMeta(namespace, meta) {
|
|
3507
|
+
const nsMap = this.extractionRetryState.get(namespace);
|
|
3508
|
+
const entries = nsMap ? Array.from(nsMap.entries()).map(([fingerprint, st]) => ({
|
|
3509
|
+
fingerprint,
|
|
3510
|
+
attempts: st.attempts,
|
|
3511
|
+
nextEligibleAt: new Date(st.nextEligibleAtMs).toISOString(),
|
|
3512
|
+
firstFailedAt: new Date(st.firstFailedAtMs).toISOString(),
|
|
3513
|
+
lastFailureClass: st.lastFailureClass
|
|
3514
|
+
})) : [];
|
|
3515
|
+
const capped = capExtractionRetryStateEntries(entries, EXTRACTION_RETRY_STATE_MAX_ENTRIES);
|
|
3516
|
+
meta.extractionRetryState = capped;
|
|
3517
|
+
if (nsMap && capped.length < nsMap.size) {
|
|
3518
|
+
const kept = new Set(capped.map((e) => e.fingerprint));
|
|
3519
|
+
for (const key of Array.from(nsMap.keys())) {
|
|
3520
|
+
if (!kept.has(key)) nsMap.delete(key);
|
|
3521
|
+
}
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
/** Record an extraction failure into per-fingerprint backoff state + breaker,
|
|
3525
|
+
* persisting to namespace meta. Fail-open: never throws upward. */
|
|
3526
|
+
async recordExtractionFailure(storage, namespace, fingerprint, cls, meta, now) {
|
|
3527
|
+
try {
|
|
3528
|
+
this.hydrateRetryStateFromMeta(namespace, meta);
|
|
3529
|
+
const nsMap = this.extractionRetryState.get(namespace) ?? /* @__PURE__ */ new Map();
|
|
3530
|
+
const prev = nsMap.get(fingerprint);
|
|
3531
|
+
const attempts = (prev?.attempts ?? 0) + 1;
|
|
3532
|
+
const firstFailedAtMs = prev?.firstFailedAtMs ?? now;
|
|
3533
|
+
let nextEligibleAtMs;
|
|
3534
|
+
if (cls === "parse_empty" && attempts > this.config.extractionParseEmptyMaxAttempts) {
|
|
3535
|
+
nextEligibleAtMs = now + Math.max(0, this.config.extractionRetryMaxBackoffMs);
|
|
3536
|
+
} else {
|
|
3537
|
+
nextEligibleAtMs = computeExtractionRetryNextEligibleMs(
|
|
3538
|
+
attempts,
|
|
3539
|
+
this.config.extractionRetryScheduleMs,
|
|
3540
|
+
this.config.extractionRetryMaxBackoffMs,
|
|
3541
|
+
this.config.extractionRetryJitterRatio,
|
|
3542
|
+
now
|
|
3543
|
+
);
|
|
3544
|
+
}
|
|
3545
|
+
nsMap.set(fingerprint, { attempts, nextEligibleAtMs, firstFailedAtMs, lastFailureClass: cls });
|
|
3546
|
+
this.extractionRetryState.set(namespace, nsMap);
|
|
3547
|
+
this.onProviderFailure(cls, now);
|
|
3548
|
+
this.persistRetryStateToMeta(namespace, meta);
|
|
3549
|
+
await storage.saveMeta(meta);
|
|
3550
|
+
} catch (err) {
|
|
3551
|
+
log.warn("runExtraction: failed to record extraction retry state (non-fatal)", err);
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3554
|
+
/** Delete a fingerprint's retry entry from the mirror + meta. Returns whether
|
|
3555
|
+
* meta changed (so the caller can decide to persist). Does not touch the
|
|
3556
|
+
* breaker — callers pair this with `resetProviderBreakerOnSuccess`. */
|
|
3557
|
+
clearExtractionRetryEntry(namespace, fingerprint, meta) {
|
|
3558
|
+
const nsMap = this.extractionRetryState.get(namespace);
|
|
3559
|
+
if (!nsMap?.has(fingerprint)) return false;
|
|
3560
|
+
nsMap.delete(fingerprint);
|
|
3561
|
+
this.persistRetryStateToMeta(namespace, meta);
|
|
3562
|
+
return true;
|
|
3563
|
+
}
|
|
3564
|
+
/** Live in-process resilience snapshot (breaker + backoff population). */
|
|
3565
|
+
getExtractionResilienceStatus() {
|
|
3566
|
+
let backoffFingerprintCount = 0;
|
|
3567
|
+
for (const nsMap of this.extractionRetryState.values()) {
|
|
3568
|
+
backoffFingerprintCount += nsMap.size;
|
|
3569
|
+
}
|
|
3570
|
+
return {
|
|
3571
|
+
breaker: {
|
|
3572
|
+
state: this.providerBreaker.state,
|
|
3573
|
+
openUntilMs: this.providerBreaker.openUntilMs,
|
|
3574
|
+
consecutiveFailures: this.providerBreaker.consecutiveFailures,
|
|
3575
|
+
lastReason: this.providerBreaker.lastReason
|
|
3576
|
+
},
|
|
3577
|
+
backoffFingerprintCount
|
|
3578
|
+
};
|
|
3579
|
+
}
|
|
3580
|
+
// -------------------------------------------------------------------------
|
|
3410
3581
|
// Main extraction pipeline
|
|
3411
3582
|
// -------------------------------------------------------------------------
|
|
3412
3583
|
async runExtraction(turns, options = {}) {
|
|
@@ -3551,6 +3722,38 @@ ${normalized}`).digest("hex");
|
|
|
3551
3722
|
durableOutputCount: 0
|
|
3552
3723
|
};
|
|
3553
3724
|
}
|
|
3725
|
+
const forcedExtractionAttempt = options.failOnExtractionFailure === true || options.forceExtractionAttempt === true;
|
|
3726
|
+
const extractionRetryEnabled = resolveMemoryLifecycleCapabilities(this.config).extractionRetry;
|
|
3727
|
+
if (extractionFingerprint && !forcedExtractionAttempt && extractionRetryEnabled) {
|
|
3728
|
+
try {
|
|
3729
|
+
meta ??= await storage.loadMeta();
|
|
3730
|
+
this.hydrateRetryStateFromMeta(selfNamespace, meta);
|
|
3731
|
+
const nowMs = Date.now();
|
|
3732
|
+
let suppressReason = null;
|
|
3733
|
+
if (this.isProviderBreakerOpen(nowMs)) {
|
|
3734
|
+
suppressReason = "provider_circuit_open";
|
|
3735
|
+
} else {
|
|
3736
|
+
const st = this.extractionRetryState.get(selfNamespace)?.get(extractionFingerprint);
|
|
3737
|
+
if (st && nowMs < st.nextEligibleAtMs) suppressReason = "extraction_backoff";
|
|
3738
|
+
}
|
|
3739
|
+
if (suppressReason) {
|
|
3740
|
+
try {
|
|
3741
|
+
await this.deps.maybeCapturePassiveCorrections(normalizedTurns, {
|
|
3742
|
+
sessionKey,
|
|
3743
|
+
principal,
|
|
3744
|
+
namespace: selfNamespace,
|
|
3745
|
+
bufferKey,
|
|
3746
|
+
isLiveSession: clearBufferAfterExtraction
|
|
3747
|
+
});
|
|
3748
|
+
} catch (captureErr) {
|
|
3749
|
+
log.warn("runExtraction: passive correction capture failed on suppressed attempt (non-fatal)", captureErr);
|
|
3750
|
+
}
|
|
3751
|
+
return { status: "skipped", reason: suppressReason, persistedCount: 0, durableOutputCount: 0 };
|
|
3752
|
+
}
|
|
3753
|
+
} catch (err) {
|
|
3754
|
+
log.warn("runExtraction: extraction retry gate check failed; proceeding (fail-open)", err);
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
3554
3757
|
const existingEntities = await storage.listEntityNames();
|
|
3555
3758
|
const result = await raceRecallAbort(
|
|
3556
3759
|
this.deps.getExtraction().extract(normalizedTurns, existingEntities),
|
|
@@ -3595,6 +3798,36 @@ ${normalized}`).digest("hex");
|
|
|
3595
3798
|
};
|
|
3596
3799
|
}
|
|
3597
3800
|
const extractionFailure = typeof result.extractionFailure === "string" && result.extractionFailure.trim().length > 0 ? result.extractionFailure : void 0;
|
|
3801
|
+
let recordedRetryFailure = false;
|
|
3802
|
+
if (extractionFingerprint && extractionRetryEnabled) {
|
|
3803
|
+
if (extractionFailure) {
|
|
3804
|
+
try {
|
|
3805
|
+
meta ??= await storage.loadMeta();
|
|
3806
|
+
await this.recordExtractionFailure(
|
|
3807
|
+
storage,
|
|
3808
|
+
selfNamespace,
|
|
3809
|
+
extractionFingerprint,
|
|
3810
|
+
result.extractionFailureClass ?? "provider_retryable",
|
|
3811
|
+
meta,
|
|
3812
|
+
Date.now()
|
|
3813
|
+
);
|
|
3814
|
+
recordedRetryFailure = true;
|
|
3815
|
+
} catch (err) {
|
|
3816
|
+
log.warn("runExtraction: failed to load meta for retry bookkeeping (non-fatal)", err);
|
|
3817
|
+
}
|
|
3818
|
+
} else {
|
|
3819
|
+
this.resetProviderBreakerOnSuccess();
|
|
3820
|
+
try {
|
|
3821
|
+
meta ??= await storage.loadMeta();
|
|
3822
|
+
this.hydrateRetryStateFromMeta(selfNamespace, meta);
|
|
3823
|
+
if (this.clearExtractionRetryEntry(selfNamespace, extractionFingerprint, meta)) {
|
|
3824
|
+
await storage.saveMeta(meta);
|
|
3825
|
+
}
|
|
3826
|
+
} catch (err) {
|
|
3827
|
+
log.warn("runExtraction: failed to persist cleared retry state (non-fatal)", err);
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3830
|
+
}
|
|
3598
3831
|
if (options.failOnExtractionFailure && extractionFailure) {
|
|
3599
3832
|
throw new Error(`extraction failed: ${extractionFailure}`);
|
|
3600
3833
|
}
|
|
@@ -3620,7 +3853,11 @@ ${normalized}`).digest("hex");
|
|
|
3620
3853
|
bufferKey,
|
|
3621
3854
|
isLiveSession: clearBufferAfterExtraction
|
|
3622
3855
|
});
|
|
3623
|
-
|
|
3856
|
+
if (recordedRetryFailure) {
|
|
3857
|
+
log.debug("runExtraction: retaining buffer for backoff retry after failure");
|
|
3858
|
+
} else {
|
|
3859
|
+
await clearBuffer();
|
|
3860
|
+
}
|
|
3624
3861
|
return { status: "skipped", reason: "empty_extraction_result", persistedCount: 0, durableOutputCount: 0 };
|
|
3625
3862
|
}
|
|
3626
3863
|
let threadIdForExtraction = null;
|
|
@@ -11575,6 +11812,7 @@ var TurnIngestionCoordinator = class {
|
|
|
11575
11812
|
({ bufferKey, turns: sessionSlice }) => new Promise((resolve, reject) => {
|
|
11576
11813
|
void this.deps.queueBufferedExtraction(sessionSlice, "trigger_mode", {
|
|
11577
11814
|
skipDedupeCheck: true,
|
|
11815
|
+
forceExtractionAttempt: true,
|
|
11578
11816
|
clearBufferAfterExtraction: false,
|
|
11579
11817
|
skipCharThreshold: true,
|
|
11580
11818
|
skipUserTurnThreshold: true,
|
|
@@ -11715,6 +11953,7 @@ var TurnIngestionCoordinator = class {
|
|
|
11715
11953
|
(resolve, reject) => {
|
|
11716
11954
|
void this.deps.queueBufferedExtraction(sessionSlice, "trigger_mode", {
|
|
11717
11955
|
skipDedupeCheck: true,
|
|
11956
|
+
forceExtractionAttempt: true,
|
|
11718
11957
|
clearBufferAfterExtraction: false,
|
|
11719
11958
|
skipCharThreshold: true,
|
|
11720
11959
|
skipUserTurnThreshold: true,
|
|
@@ -11880,7 +12119,8 @@ var TurnIngestionCoordinator = class {
|
|
|
11880
12119
|
abortSignal: options.abortSignal,
|
|
11881
12120
|
failOnExtractionFailure: options.failOnExtractionFailure === true,
|
|
11882
12121
|
writeNamespaceOverride: options.writeNamespaceOverride,
|
|
11883
|
-
principalOverride: options.principalOverride
|
|
12122
|
+
principalOverride: options.principalOverride,
|
|
12123
|
+
forceExtractionAttempt: options.forceExtractionAttempt === true
|
|
11884
12124
|
});
|
|
11885
12125
|
settleTask(void 0, result);
|
|
11886
12126
|
} catch (err) {
|
|
@@ -12965,7 +13205,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
12965
13205
|
if (signal.aborted) return;
|
|
12966
13206
|
if (lifecycleCaps.lifecyclePolicy && resolveQmdCapabilities(this.deps.config).qmdTierMigration) {
|
|
12967
13207
|
try {
|
|
12968
|
-
const { runFirstStartMigration } = await import("./first-start-migration-
|
|
13208
|
+
const { runFirstStartMigration } = await import("./first-start-migration-TI67YMLG.js");
|
|
12969
13209
|
const result = await runFirstStartMigration({
|
|
12970
13210
|
storage: this.deps.storage,
|
|
12971
13211
|
config: this.deps.config,
|
|
@@ -12988,7 +13228,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
12988
13228
|
if (signal.aborted) return;
|
|
12989
13229
|
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)) {
|
|
12990
13230
|
try {
|
|
12991
|
-
const { startWearablesAutoSync } = await import("./auto-sync-
|
|
13231
|
+
const { startWearablesAutoSync } = await import("./auto-sync-676N6N6Y.js");
|
|
12992
13232
|
if (signal.aborted) return;
|
|
12993
13233
|
this.deps.wearablesAutoSyncHandle = startWearablesAutoSync(
|
|
12994
13234
|
{
|
|
@@ -15434,6 +15674,7 @@ var SessionContextCoordinator = class {
|
|
|
15434
15674
|
bufferKey,
|
|
15435
15675
|
clearBufferAfterExtraction: true,
|
|
15436
15676
|
skipDedupeCheck: true,
|
|
15677
|
+
forceExtractionAttempt: true,
|
|
15437
15678
|
abortSignal: options.abortSignal,
|
|
15438
15679
|
onTaskSettled: (error) => error ? reject(error) : resolve()
|
|
15439
15680
|
}).catch(reject);
|
|
@@ -17299,6 +17540,11 @@ ${doc.content}` : doc.content,
|
|
|
17299
17540
|
async runExtraction(...args) {
|
|
17300
17541
|
return this.extractionRunCoordinator.runExtraction(...args);
|
|
17301
17542
|
}
|
|
17543
|
+
/** Live extraction resilience snapshot (provider circuit breaker + per-
|
|
17544
|
+
* fingerprint backoff population) for status/doctor surfaces. */
|
|
17545
|
+
getExtractionResilienceStatus() {
|
|
17546
|
+
return this.extractionRunCoordinator.getExtractionResilienceStatus();
|
|
17547
|
+
}
|
|
17302
17548
|
async recordProcessedExtractionFingerprint(storage, fingerprint, preloadedMeta) {
|
|
17303
17549
|
return this.extractionRunCoordinator.recordProcessedExtractionFingerprint(
|
|
17304
17550
|
storage,
|
|
@@ -23092,4 +23338,4 @@ export {
|
|
|
23092
23338
|
blendGraphExpandedRecallScore,
|
|
23093
23339
|
Orchestrator
|
|
23094
23340
|
};
|
|
23095
|
-
//# sourceMappingURL=chunk-
|
|
23341
|
+
//# sourceMappingURL=chunk-NGJT7IW5.js.map
|