@remnic/core 10.0.193 → 10.0.195
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-admin-ops-surface.js +58 -59
- package/dist/access-cli.js +58 -59
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush-preempt.js +58 -59
- package/dist/access-extraction-force-flush.js +58 -59
- package/dist/access-http-briefing.js +58 -59
- package/dist/access-http-query.js +58 -59
- package/dist/access-http.js +58 -59
- package/dist/access-identity-continuity-surface.js +58 -59
- package/dist/access-lcm-surface.js +58 -59
- package/dist/access-mcp.js +58 -59
- package/dist/access-observe-write-surface.js +58 -59
- package/dist/access-operations-batch.js +58 -59
- package/dist/access-operations.js +58 -59
- package/dist/access-recall-concurrency.js +58 -59
- package/dist/access-recall-diagnostics.js +2 -2
- package/dist/access-recall-response.js +58 -59
- package/dist/access-recall-surface.js +58 -59
- package/dist/access-service.js +58 -59
- package/dist/active-recall.js +7 -6
- package/dist/active-recall.js.map +1 -1
- package/dist/{auto-sync-BJUAGKI5.js → auto-sync-BEW65FDT.js} +6 -5
- package/dist/{auto-sync-BJUAGKI5.js.map → auto-sync-BEW65FDT.js.map} +1 -1
- package/dist/briefing.js +7 -6
- package/dist/buffer.d.ts +1 -0
- package/dist/buffer.d.ts.map +1 -1
- package/dist/buffer.js +3 -3
- package/dist/calibration.js +5 -4
- package/dist/calibration.js.map +1 -1
- package/dist/causal-consolidation.js +8 -7
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/{chunk-FZU62GIV.js → chunk-2X5I5C3M.js} +27 -10
- package/dist/chunk-2X5I5C3M.js.map +1 -0
- package/dist/{chunk-DYUPSTCV.js → chunk-3EXG2KPK.js} +3 -3
- package/dist/{chunk-FGFU6J26.js → chunk-4FTYKZ77.js} +3 -3
- package/dist/{chunk-4EAVEDLG.js → chunk-4GVSMPBP.js} +8 -8
- package/dist/{chunk-QIPRDRGM.js → chunk-4HEJDVPU.js} +1 -1
- package/dist/chunk-4HEJDVPU.js.map +1 -0
- package/dist/{chunk-EEA2RM4B.js → chunk-4I6A3SDL.js} +2 -2
- package/dist/{chunk-SKJM4PKE.js → chunk-4JI5PPFW.js} +2 -2
- package/dist/{chunk-TDG5NZAZ.js → chunk-65JA7LWV.js} +2 -2
- package/dist/{chunk-3YID7KZ6.js → chunk-6QMKUWXH.js} +2 -2
- package/dist/{chunk-7SOKOEAZ.js → chunk-6RRHTHKQ.js} +2 -2
- package/dist/{chunk-VHQNJW4Q.js → chunk-6W62D4MC.js} +2 -2
- package/dist/{chunk-2QW5HPKU.js → chunk-76LBLH62.js} +35 -28
- package/dist/chunk-76LBLH62.js.map +1 -0
- package/dist/{chunk-NN3LMWKA.js → chunk-7TQ3EDQ3.js} +1 -1
- package/dist/chunk-7TQ3EDQ3.js.map +1 -0
- package/dist/{chunk-KJ65WZHB.js → chunk-A7DIZOTF.js} +2 -2
- package/dist/{chunk-TZ7ZA2LM.js → chunk-AD3JOG2Q.js} +2 -2
- package/dist/{chunk-KZ4BJRGQ.js → chunk-BD26CK6T.js} +2 -2
- package/dist/{chunk-BDFSVUUZ.js → chunk-C3H2QZOZ.js} +2 -1
- package/dist/chunk-C3H2QZOZ.js.map +1 -0
- package/dist/{chunk-7EP4FURO.js → chunk-C72YQM7E.js} +2 -2
- package/dist/{chunk-CJSTQNE5.js → chunk-CTOMDCCA.js} +2 -2
- package/dist/{chunk-PSQ347YP.js → chunk-DSKII2W4.js} +3 -3
- package/dist/{chunk-KOVQZJ27.js → chunk-E7LDTUWK.js} +2 -2
- package/dist/{chunk-SPAKBUJY.js → chunk-EWLMEYLF.js} +2 -2
- package/dist/{chunk-3BICT225.js → chunk-FGNBUUPX.js} +2 -2
- package/dist/{chunk-QZMGZBTF.js → chunk-HBG6CQEX.js} +2 -2
- package/dist/{chunk-FKHXXL42.js → chunk-HD7M55OI.js} +2 -2
- package/dist/{chunk-7V6GNQC2.js → chunk-HINQENZG.js} +2 -2
- package/dist/{chunk-WRVKI6ZO.js → chunk-HLQXSX4F.js} +2 -2
- package/dist/{chunk-T765HQ5U.js → chunk-IIDAN7XJ.js} +2 -2
- package/dist/{chunk-G2MS56KM.js → chunk-IT4G6HTG.js} +2 -2
- package/dist/{chunk-M7Q7Z6V5.js → chunk-JDZ5JPYG.js} +38 -8
- package/dist/chunk-JDZ5JPYG.js.map +1 -0
- package/dist/{chunk-MMRTPH3J.js → chunk-KQYGUFMQ.js} +5 -3
- package/dist/chunk-KQYGUFMQ.js.map +1 -0
- package/dist/{chunk-TWYYUMYO.js → chunk-KXAGZRJV.js} +2 -2
- package/dist/{chunk-JITK24KX.js → chunk-LJNCJK7B.js} +10 -10
- package/dist/{chunk-Z6EFSXU3.js → chunk-LMM2LRVQ.js} +2 -2
- package/dist/{chunk-V65H7MI6.js → chunk-M42UFQZY.js} +51 -4
- package/dist/chunk-M42UFQZY.js.map +1 -0
- package/dist/{chunk-UAEJKURK.js → chunk-ME63JKWJ.js} +61 -59
- package/dist/{chunk-UAEJKURK.js.map → chunk-ME63JKWJ.js.map} +1 -1
- package/dist/{chunk-AALJHIKH.js → chunk-OHJ5PNYB.js} +3 -3
- package/dist/{chunk-XZMQLON4.js → chunk-OK726OF4.js} +7 -5
- package/dist/chunk-OK726OF4.js.map +1 -0
- package/dist/{chunk-Q6S67LHR.js → chunk-OOMFFMX3.js} +2 -2
- package/dist/{chunk-ODI4K32P.js → chunk-Q2GDUJSK.js} +5 -5
- package/dist/{chunk-JNDMIAJ4.js → chunk-QEVZKJM6.js} +2 -2
- package/dist/{chunk-ZNCCX7P6.js → chunk-QW5LZTKA.js} +2 -2
- package/dist/{chunk-5GIYIYJI.js → chunk-QZPAOOU7.js} +2 -2
- package/dist/{chunk-NKHRIDYP.js → chunk-RTXW6E6X.js} +3 -3
- package/dist/{chunk-5WDUY2ZZ.js → chunk-S4QWAWR6.js} +4 -4
- package/dist/{chunk-STSORBX5.js → chunk-SFUS2V2V.js} +1 -1
- package/dist/{chunk-HEJFE3BC.js → chunk-SJCN7ESG.js} +2 -2
- package/dist/{chunk-AJ7JHHRY.js → chunk-SPPWVMP4.js} +2 -2
- package/dist/{chunk-QSF5SJAM.js → chunk-STQNKDKZ.js} +9 -3
- package/dist/chunk-STQNKDKZ.js.map +1 -0
- package/dist/{chunk-QFKNIKUF.js → chunk-SXR7L57Z.js} +2 -2
- package/dist/{chunk-GYCUX3N4.js → chunk-TGMIJABS.js} +2 -2
- package/dist/{chunk-GH7IKABD.js → chunk-UFJJMQDV.js} +2 -2
- package/dist/{chunk-UH2VY2QQ.js → chunk-WCW7I7ZM.js} +2 -2
- package/dist/{chunk-3RZ4GDOH.js → chunk-XDNVWY7I.js} +93 -23
- package/dist/chunk-XDNVWY7I.js.map +1 -0
- package/dist/{chunk-LR6LWX33.js → chunk-XXDIPAUE.js} +2 -2
- package/dist/{chunk-YCJJODER.js → chunk-YCTD3XET.js} +10 -3
- package/dist/chunk-YCTD3XET.js.map +1 -0
- package/dist/{chunk-WEI6HEUX.js → chunk-YXAH5TSN.js} +2 -2
- package/dist/{chunk-75K6DRPN.js → chunk-ZAVFAGBE.js} +2 -2
- package/dist/{chunk-7KTORRIK.js → chunk-ZNJU3NBJ.js} +2 -2
- package/dist/cli.js +58 -59
- package/dist/coding/export-okf-codegraph.js +6 -5
- package/dist/coding/export-okf-codegraph.js.map +1 -1
- package/dist/compounding/engine.js +8 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -6
- package/dist/connectors/codex-materialize-runner.js +7 -6
- package/dist/connectors/index.js +7 -6
- package/dist/convergence-refresh.js +9 -8
- package/dist/corpus-watermark.js +9 -8
- package/dist/deep-recall-policy-llm.js +4 -3
- package/dist/entity-retrieval.js +7 -6
- package/dist/explicit-capture.js +58 -59
- package/dist/extraction-error-classification.d.ts +40 -5
- package/dist/extraction-error-classification.d.ts.map +1 -1
- package/dist/extraction-error-classification.js +5 -2
- package/dist/extraction-faithfulness.js +4 -3
- package/dist/extraction-judge.js +4 -3
- package/dist/extraction.d.ts.map +1 -1
- package/dist/extraction.js +17 -18
- package/dist/fallback-llm-codex-subscription.d.ts +3 -1
- package/dist/fallback-llm-codex-subscription.d.ts.map +1 -1
- package/dist/fallback-llm-codex-subscription.js +2 -1
- package/dist/fallback-llm.d.ts.map +1 -1
- package/dist/fallback-llm.js +3 -2
- package/dist/harmonic-retrieval.js +7 -6
- package/dist/index.js +58 -59
- package/dist/live-connectors-runner.js +1 -2
- package/dist/local-llm-helpers.d.ts +1 -0
- package/dist/local-llm-helpers.d.ts.map +1 -1
- package/dist/local-llm-helpers.js +1 -1
- package/dist/local-llm.d.ts.map +1 -1
- package/dist/local-llm.js +4 -3
- package/dist/location/index.js +8 -7
- package/dist/maintenance/memory-governance.js +7 -6
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -6
- package/dist/maintenance/rebuild-memory-projection-runner.js +9 -8
- package/dist/maintenance/rebuild-memory-projection.js +8 -7
- package/dist/memory-browse.js +3 -3
- package/dist/namespaces/migrate.js +8 -7
- package/dist/namespaces/storage.js +7 -6
- package/dist/operator-doctor-corpus.js +10 -9
- package/dist/operator-toolkit.js +14 -13
- package/dist/orchestration/backlog-scheduler.js +59 -60
- package/dist/orchestration/backlog-scheduler.js.map +1 -1
- package/dist/orchestration/buffer-drain-runner.js +59 -60
- package/dist/orchestration/extraction-drain.d.ts +1 -0
- package/dist/orchestration/extraction-drain.d.ts.map +1 -1
- package/dist/orchestration/extraction-persist-failure.d.ts +0 -2
- package/dist/orchestration/extraction-persist-failure.d.ts.map +1 -1
- package/dist/orchestration/extraction-persist.d.ts +6 -2
- package/dist/orchestration/extraction-persist.d.ts.map +1 -1
- package/dist/orchestration/extraction-run-helpers.d.ts +41 -4
- package/dist/orchestration/extraction-run-helpers.d.ts.map +1 -1
- package/dist/orchestration/extraction-run.d.ts +4 -0
- package/dist/orchestration/extraction-run.d.ts.map +1 -1
- package/dist/orchestration/maintenance.js +17 -16
- package/dist/orchestrator.js +58 -59
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.js +2 -2
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-navigation.js +58 -59
- package/dist/recall-planner-llm.js +3 -2
- package/dist/recall-planner-llm.js.map +1 -1
- package/dist/recall-state-view-admission.js +3 -3
- package/dist/recall-why-service.js +3 -3
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.js +2 -2
- package/dist/resume-bundles.js +8 -7
- package/dist/semantic-consolidation.js +8 -7
- package/dist/semantic-rule-promotion.js +7 -6
- package/dist/semantic-rule-verifier.js +7 -6
- package/dist/source-agent-qualifier.js +10 -9
- package/dist/standup/build.js +7 -6
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +6 -5
- package/dist/summarizer.js +6 -5
- package/dist/support-passport/index.js +6 -5
- package/dist/transfer/export-okf.js +7 -6
- package/dist/types-extraction-failure.d.ts +7 -1
- package/dist/types-extraction-failure.d.ts.map +1 -1
- package/dist/types.d.ts +6 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +7 -6
- package/dist/who-knows-cli.js +8 -7
- package/dist/who-knows.js +7 -6
- package/package.json +2 -2
- package/src/buffer-incremental-persistence.test.ts +23 -0
- package/src/buffer.ts +30 -28
- package/src/config.ts +2 -0
- package/src/extraction-error-classification.ts +88 -8
- package/src/extraction-local-failure-class.test.ts +117 -3
- package/src/extraction-reply-diagnostic-wiring.test.ts +3 -1
- package/src/extraction.test.ts +73 -3
- package/src/extraction.ts +26 -25
- package/src/fallback-llm-codex-subscription.ts +17 -3
- package/src/fallback-llm.test.ts +70 -0
- package/src/fallback-llm.ts +17 -18
- package/src/local-llm-headers-timeout.test.ts +151 -0
- package/src/local-llm-helpers.ts +1 -1
- package/src/local-llm.ts +44 -43
- package/src/orchestration/extraction-drain.ts +11 -5
- package/src/orchestration/extraction-persist-declaration.test.ts +35 -0
- package/src/orchestration/extraction-persist-failure.ts +0 -3
- package/src/orchestration/extraction-persist.ts +3 -3
- package/src/orchestration/extraction-run-helpers.ts +110 -4
- package/src/orchestration/extraction-run.test.ts +408 -3
- package/src/orchestration/extraction-run.ts +75 -75
- package/src/storage.ts +5 -4
- package/src/types-extraction-failure.ts +12 -1
- package/src/types.ts +6 -6
- package/dist/chunk-2QW5HPKU.js.map +0 -1
- package/dist/chunk-3RZ4GDOH.js.map +0 -1
- package/dist/chunk-BDFSVUUZ.js.map +0 -1
- package/dist/chunk-C7SRUWBW.js +0 -54
- package/dist/chunk-C7SRUWBW.js.map +0 -1
- package/dist/chunk-FZU62GIV.js.map +0 -1
- package/dist/chunk-M7Q7Z6V5.js.map +0 -1
- package/dist/chunk-MMRTPH3J.js.map +0 -1
- package/dist/chunk-NN3LMWKA.js.map +0 -1
- package/dist/chunk-QIPRDRGM.js.map +0 -1
- package/dist/chunk-QSF5SJAM.js.map +0 -1
- package/dist/chunk-V65H7MI6.js.map +0 -1
- package/dist/chunk-XZMQLON4.js.map +0 -1
- package/dist/chunk-YCJJODER.js.map +0 -1
- /package/dist/{chunk-DYUPSTCV.js.map → chunk-3EXG2KPK.js.map} +0 -0
- /package/dist/{chunk-FGFU6J26.js.map → chunk-4FTYKZ77.js.map} +0 -0
- /package/dist/{chunk-4EAVEDLG.js.map → chunk-4GVSMPBP.js.map} +0 -0
- /package/dist/{chunk-EEA2RM4B.js.map → chunk-4I6A3SDL.js.map} +0 -0
- /package/dist/{chunk-SKJM4PKE.js.map → chunk-4JI5PPFW.js.map} +0 -0
- /package/dist/{chunk-TDG5NZAZ.js.map → chunk-65JA7LWV.js.map} +0 -0
- /package/dist/{chunk-3YID7KZ6.js.map → chunk-6QMKUWXH.js.map} +0 -0
- /package/dist/{chunk-7SOKOEAZ.js.map → chunk-6RRHTHKQ.js.map} +0 -0
- /package/dist/{chunk-VHQNJW4Q.js.map → chunk-6W62D4MC.js.map} +0 -0
- /package/dist/{chunk-KJ65WZHB.js.map → chunk-A7DIZOTF.js.map} +0 -0
- /package/dist/{chunk-TZ7ZA2LM.js.map → chunk-AD3JOG2Q.js.map} +0 -0
- /package/dist/{chunk-KZ4BJRGQ.js.map → chunk-BD26CK6T.js.map} +0 -0
- /package/dist/{chunk-7EP4FURO.js.map → chunk-C72YQM7E.js.map} +0 -0
- /package/dist/{chunk-CJSTQNE5.js.map → chunk-CTOMDCCA.js.map} +0 -0
- /package/dist/{chunk-PSQ347YP.js.map → chunk-DSKII2W4.js.map} +0 -0
- /package/dist/{chunk-KOVQZJ27.js.map → chunk-E7LDTUWK.js.map} +0 -0
- /package/dist/{chunk-SPAKBUJY.js.map → chunk-EWLMEYLF.js.map} +0 -0
- /package/dist/{chunk-3BICT225.js.map → chunk-FGNBUUPX.js.map} +0 -0
- /package/dist/{chunk-QZMGZBTF.js.map → chunk-HBG6CQEX.js.map} +0 -0
- /package/dist/{chunk-FKHXXL42.js.map → chunk-HD7M55OI.js.map} +0 -0
- /package/dist/{chunk-7V6GNQC2.js.map → chunk-HINQENZG.js.map} +0 -0
- /package/dist/{chunk-WRVKI6ZO.js.map → chunk-HLQXSX4F.js.map} +0 -0
- /package/dist/{chunk-T765HQ5U.js.map → chunk-IIDAN7XJ.js.map} +0 -0
- /package/dist/{chunk-G2MS56KM.js.map → chunk-IT4G6HTG.js.map} +0 -0
- /package/dist/{chunk-TWYYUMYO.js.map → chunk-KXAGZRJV.js.map} +0 -0
- /package/dist/{chunk-JITK24KX.js.map → chunk-LJNCJK7B.js.map} +0 -0
- /package/dist/{chunk-Z6EFSXU3.js.map → chunk-LMM2LRVQ.js.map} +0 -0
- /package/dist/{chunk-AALJHIKH.js.map → chunk-OHJ5PNYB.js.map} +0 -0
- /package/dist/{chunk-Q6S67LHR.js.map → chunk-OOMFFMX3.js.map} +0 -0
- /package/dist/{chunk-ODI4K32P.js.map → chunk-Q2GDUJSK.js.map} +0 -0
- /package/dist/{chunk-JNDMIAJ4.js.map → chunk-QEVZKJM6.js.map} +0 -0
- /package/dist/{chunk-ZNCCX7P6.js.map → chunk-QW5LZTKA.js.map} +0 -0
- /package/dist/{chunk-5GIYIYJI.js.map → chunk-QZPAOOU7.js.map} +0 -0
- /package/dist/{chunk-NKHRIDYP.js.map → chunk-RTXW6E6X.js.map} +0 -0
- /package/dist/{chunk-5WDUY2ZZ.js.map → chunk-S4QWAWR6.js.map} +0 -0
- /package/dist/{chunk-STSORBX5.js.map → chunk-SFUS2V2V.js.map} +0 -0
- /package/dist/{chunk-HEJFE3BC.js.map → chunk-SJCN7ESG.js.map} +0 -0
- /package/dist/{chunk-AJ7JHHRY.js.map → chunk-SPPWVMP4.js.map} +0 -0
- /package/dist/{chunk-QFKNIKUF.js.map → chunk-SXR7L57Z.js.map} +0 -0
- /package/dist/{chunk-GYCUX3N4.js.map → chunk-TGMIJABS.js.map} +0 -0
- /package/dist/{chunk-GH7IKABD.js.map → chunk-UFJJMQDV.js.map} +0 -0
- /package/dist/{chunk-UH2VY2QQ.js.map → chunk-WCW7I7ZM.js.map} +0 -0
- /package/dist/{chunk-LR6LWX33.js.map → chunk-XXDIPAUE.js.map} +0 -0
- /package/dist/{chunk-WEI6HEUX.js.map → chunk-YXAH5TSN.js.map} +0 -0
- /package/dist/{chunk-75K6DRPN.js.map → chunk-ZAVFAGBE.js.map} +0 -0
- /package/dist/{chunk-7KTORRIK.js.map → chunk-ZNJU3NBJ.js.map} +0 -0
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
countRequestedDurableOutputs,
|
|
135
135
|
deriveSourceConnector,
|
|
136
136
|
deriveTopicsFromExtraction, emptyExtractionResult, extractChunkedExtraction,
|
|
137
|
-
extractionFailureLongParks,
|
|
137
|
+
extractionFailureLongParks, maybeDeadLetterPermanentExtractionFailure,
|
|
138
138
|
runExtractionPostPersist,
|
|
139
139
|
runExtractionPostPersistBestEffort,
|
|
140
140
|
EXTRACTION_RETRY_STATE_MAX_ENTRIES,
|
|
@@ -159,13 +159,10 @@ export type { ExtractionResilienceStatus };
|
|
|
159
159
|
*/
|
|
160
160
|
export class ExtractionRunCoordinator {
|
|
161
161
|
private readonly recentExtractionFingerprints = new Map<string, number>();
|
|
162
|
-
// Per-fingerprint extraction retry/backoff state
|
|
163
|
-
//
|
|
164
|
-
//
|
|
165
|
-
//
|
|
166
|
-
// meta.json). The breaker below is intentionally per-process in-memory
|
|
167
|
-
// (mirrors local-llm.cooldownUntilMs); a restart clears it but the persisted
|
|
168
|
-
// backoff still throttles, so a restart can't resurrect the hot loop.
|
|
162
|
+
// Per-fingerprint extraction retry/backoff state. Outer key = namespace,
|
|
163
|
+
// inner key = fingerprint; hydrated lazily from namespace-scoped meta so the
|
|
164
|
+
// hot path is a Map lookup. The breaker below is per-process in-memory by
|
|
165
|
+
// design — a restart clears it but persisted backoff still throttles.
|
|
169
166
|
private readonly extractionRetryState = new Map<string, Map<string, ExtractionRetryStateEntry>>();
|
|
170
167
|
private readonly hydratedRetryNamespaces = new Set<string>();
|
|
171
168
|
private readonly providerBreaker: ProviderCircuitBreaker;
|
|
@@ -248,9 +245,7 @@ export class ExtractionRunCoordinator {
|
|
|
248
245
|
return true;
|
|
249
246
|
}
|
|
250
247
|
|
|
251
|
-
//
|
|
252
|
-
// Processed-fingerprint recording
|
|
253
|
-
// -------------------------------------------------------------------------
|
|
248
|
+
// ---- Processed-fingerprint recording ----
|
|
254
249
|
|
|
255
250
|
async recordProcessedExtractionFingerprint(
|
|
256
251
|
storage: StorageManager,
|
|
@@ -292,6 +287,7 @@ export class ExtractionRunCoordinator {
|
|
|
292
287
|
nextEligibleAtMs: Number.isFinite(nextEligibleAtMs) ? nextEligibleAtMs : 0,
|
|
293
288
|
firstFailedAtMs: Number.isFinite(firstFailedAtMs) ? firstFailedAtMs : Date.now(),
|
|
294
289
|
lastFailureClass: entry.lastFailureClass,
|
|
290
|
+
permanentAttempts: entry.permanentAttempts,
|
|
295
291
|
});
|
|
296
292
|
}
|
|
297
293
|
this.extractionRetryState.set(namespace, nsMap);
|
|
@@ -308,6 +304,7 @@ export class ExtractionRunCoordinator {
|
|
|
308
304
|
nextEligibleAt: new Date(st.nextEligibleAtMs).toISOString(),
|
|
309
305
|
firstFailedAt: new Date(st.firstFailedAtMs).toISOString(),
|
|
310
306
|
lastFailureClass: st.lastFailureClass,
|
|
307
|
+
permanentAttempts: st.permanentAttempts,
|
|
311
308
|
}))
|
|
312
309
|
: [];
|
|
313
310
|
const capped = capExtractionRetryStateEntries(entries, EXTRACTION_RETRY_STATE_MAX_ENTRIES);
|
|
@@ -351,9 +348,13 @@ export class ExtractionRunCoordinator {
|
|
|
351
348
|
const nsMap = this.extractionRetryState.get(namespace) ?? new Map<string, ExtractionRetryStateEntry>();
|
|
352
349
|
const prev = nsMap.get(fingerprint);
|
|
353
350
|
const attempts = (prev?.attempts ?? 0) + 1;
|
|
351
|
+
// Terminal refusals count separately — transient/setup failures must not consume the allowance (#3757).
|
|
352
|
+
const permanentAttempts = (prev?.permanentAttempts ?? 0) + (cls === "provider_permanent" ? 1 : 0);
|
|
354
353
|
const firstFailedAtMs = prev?.firstFailedAtMs ?? now;
|
|
355
|
-
//
|
|
356
|
-
const nextEligibleAtMs = extractionFailureLongParks(cls,
|
|
354
|
+
// Past its cap → long-park; the window survives a raised ceiling (#3521).
|
|
355
|
+
const nextEligibleAtMs = extractionFailureLongParks(cls,
|
|
356
|
+
cls === "provider_permanent" ? permanentAttempts : attempts,
|
|
357
|
+
this.config.extractionParseEmptyMaxAttempts, this.config.extractionProviderPermanentMaxAttempts)
|
|
357
358
|
? now + Math.max(0, this.config.extractionRetryMaxBackoffMs)
|
|
358
359
|
: computeExtractionRetryNextEligibleMs(
|
|
359
360
|
attempts,
|
|
@@ -362,7 +363,7 @@ export class ExtractionRunCoordinator {
|
|
|
362
363
|
this.config.extractionRetryJitterRatio,
|
|
363
364
|
now,
|
|
364
365
|
);
|
|
365
|
-
nsMap.set(fingerprint, { attempts, nextEligibleAtMs, firstFailedAtMs, lastFailureClass: cls });
|
|
366
|
+
nsMap.set(fingerprint, { attempts, nextEligibleAtMs, firstFailedAtMs, lastFailureClass: cls, permanentAttempts });
|
|
366
367
|
this.extractionRetryState.set(namespace, nsMap);
|
|
367
368
|
this.providerBreaker.failure(cls, now, {
|
|
368
369
|
failureThreshold: this.config.extractionBreakerFailureThreshold,
|
|
@@ -439,6 +440,10 @@ export class ExtractionRunCoordinator {
|
|
|
439
440
|
* gate (extraction hot-loop hardening). Set by explicit flush paths.
|
|
440
441
|
*/
|
|
441
442
|
forceExtractionAttempt?: boolean;
|
|
443
|
+
/** Caller drop policy: false → retain a permanently-failing window, never dead-letter (claim drains). Default true. */
|
|
444
|
+
dropFailedChunks?: boolean;
|
|
445
|
+
/** In-flight part copy → its buffered source turn (drain `extractionPartOf` splits). */
|
|
446
|
+
partParents?: ReadonlyMap<BufferTurn, BufferTurn>;
|
|
442
447
|
} = {}
|
|
443
448
|
): Promise<ExtractionRunResult> {
|
|
444
449
|
log.debug(`running extraction on ${turns.length} turns`);
|
|
@@ -511,16 +516,18 @@ export class ExtractionRunCoordinator {
|
|
|
511
516
|
if (deadlineTimer) clearTimeout(deadlineTimer);
|
|
512
517
|
}
|
|
513
518
|
};
|
|
514
|
-
const clearBuffer = async (clearOptions?: { ignoreAbort?: boolean }) => {
|
|
519
|
+
const clearBuffer = async (clearOptions?: { ignoreAbort?: boolean; dropTurns?: readonly BufferTurn[] }) => {
|
|
515
520
|
options.onBeforePersist?.();
|
|
516
521
|
if (clearOptions?.ignoreAbort !== true) {
|
|
517
522
|
throwIfDeadlineExceeded("before_clear_buffer");
|
|
518
523
|
throwIfAborted("before_clear_buffer");
|
|
519
524
|
}
|
|
520
525
|
if (clearBufferAfterExtraction) {
|
|
526
|
+
const dropTurns = clearOptions?.dropTurns;
|
|
521
527
|
await this.deps
|
|
522
528
|
.getBuffer()
|
|
523
|
-
.clearAfterExtraction(bufferKey, turns,
|
|
529
|
+
.clearAfterExtraction(bufferKey, dropTurns ?? turns,
|
|
530
|
+
clearMatchingTurns || dropTurns !== undefined ? { allowNonPrefix: true, dropRetainedTurns: dropTurns !== undefined } : undefined);
|
|
524
531
|
}
|
|
525
532
|
};
|
|
526
533
|
|
|
@@ -584,14 +591,10 @@ export class ExtractionRunCoordinator {
|
|
|
584
591
|
if ((!skipCharThreshold && belowCharThreshold) || belowUserTurnThreshold) {
|
|
585
592
|
log.debug(`skipping extraction: below threshold (totalChars=${totalChars}, userTurns=${userTurns.length})`);
|
|
586
593
|
// Passive correction capture runs even when extraction is skipped for
|
|
587
|
-
// being below
|
|
588
|
-
//
|
|
589
|
-
//
|
|
590
|
-
//
|
|
591
|
-
// plan as the full extraction path so corrections target the active
|
|
592
|
-
// profile's write layer, not just resolveSelfNamespace (review:
|
|
593
|
-
// "below-threshold wrong namespace"). The ACL in passiveCorrectionService
|
|
594
|
-
// authorizes the actual plan/apply.
|
|
594
|
+
// being below threshold — a short correction like "stop using Vim" is
|
|
595
|
+
// exactly the high-value case this feature exists for. The write
|
|
596
|
+
// namespace resolves through the SAME scope-profile plan as the full
|
|
597
|
+
// path; the ACL in passiveCorrectionService authorizes the apply.
|
|
595
598
|
{
|
|
596
599
|
const capturePrincipal =
|
|
597
600
|
typeof options.principalOverride === "string" && options.principalOverride.length > 0
|
|
@@ -632,13 +635,11 @@ export class ExtractionRunCoordinator {
|
|
|
632
635
|
};
|
|
633
636
|
}
|
|
634
637
|
|
|
635
|
-
// Provenance principal honours the access-surface override (#1495 thread 1
|
|
636
|
-
//
|
|
637
|
-
//
|
|
638
|
-
//
|
|
639
|
-
//
|
|
640
|
-
// namespace-prefixed key would collapse to `default`. The ORIGINAL,
|
|
641
|
-
// un-prefixed session key still drives threading.
|
|
638
|
+
// Provenance principal honours the access-surface override (#1495 thread 1):
|
|
639
|
+
// surfaces that authenticated the caller pass their resolved principal so
|
|
640
|
+
// provenance uses the SAME identity the surface authorized, instead of
|
|
641
|
+
// `resolvePrincipal(sessionKey)` — which on a namespace-prefixed key would
|
|
642
|
+
// collapse to `default`. The un-prefixed session key still drives threading.
|
|
642
643
|
const principal =
|
|
643
644
|
typeof options.principalOverride === "string" && options.principalOverride.length > 0
|
|
644
645
|
? options.principalOverride
|
|
@@ -787,17 +788,12 @@ export class ExtractionRunCoordinator {
|
|
|
787
788
|
};
|
|
788
789
|
}
|
|
789
790
|
|
|
790
|
-
//
|
|
791
|
-
//
|
|
792
|
-
//
|
|
793
|
-
// failing LLM endpoint is not hammered once per observe. Forced flushes and
|
|
794
|
-
// fail-closed callers bypass the gate (rule 18) but still record failures.
|
|
795
|
-
// On a suppressed attempt the buffer is deliberately NOT cleared, so no
|
|
796
|
-
// extractable turn is dropped — it is retried after cooldown/nextEligibleAt.
|
|
791
|
+
// Retry/backoff + circuit-breaker gate: suppresses re-attempts of a
|
|
792
|
+
// recently-failed fingerprint and all while the breaker is open. On
|
|
793
|
+
// suppression the buffer is NOT cleared — turns retry, never dropped.
|
|
797
794
|
const forcedExtractionAttempt =
|
|
798
795
|
options.failOnExtractionFailure === true || options.forceExtractionAttempt === true;
|
|
799
|
-
// Resolve the gate
|
|
800
|
-
// #1523) rather than reading the raw config flag at each call site.
|
|
796
|
+
// Resolve the gate via the shared lifecycle capability plan (issue #1523).
|
|
801
797
|
const extractionRetryEnabled = resolveMemoryLifecycleCapabilities(this.config).extractionRetry;
|
|
802
798
|
let extractionProbeOwned = false;
|
|
803
799
|
let extractionProbeToken: ProbeOwnerToken | undefined;
|
|
@@ -817,8 +813,7 @@ export class ExtractionRunCoordinator {
|
|
|
817
813
|
if (st && nowMs < st.nextEligibleAtMs) suppressReason = "extraction_backoff";
|
|
818
814
|
}
|
|
819
815
|
if (suppressReason) {
|
|
820
|
-
// Passive correction capture is local
|
|
821
|
-
// provider cooldown. It remains fail-open.
|
|
816
|
+
// Passive correction capture is local — never delayed by a cooldown; fail-open.
|
|
822
817
|
try {
|
|
823
818
|
await runDeadlineAware(
|
|
824
819
|
() => runPassiveCapture(normalizedTurns as BufferTurn[], {
|
|
@@ -848,18 +843,16 @@ export class ExtractionRunCoordinator {
|
|
|
848
843
|
}
|
|
849
844
|
}
|
|
850
845
|
// Lazy entity list. A half-open probe lists first so a slow store cannot
|
|
851
|
-
// reopen the breaker
|
|
852
|
-
//
|
|
853
|
-
// the big try below only covers from the extract call onward.
|
|
846
|
+
// reopen the breaker; the probe owner must release on ANY pre-persistence
|
|
847
|
+
// exit too — the big try below only covers from the extract call onward.
|
|
854
848
|
try {
|
|
855
849
|
let entityNamesPromise: Promise<string[]> | undefined;
|
|
856
850
|
const existingEntities = (): Promise<string[]> =>
|
|
857
851
|
(entityNamesPromise ??= runDeadlineAware(() => storage.listEntityNames(), "during_list_entity_names", false));
|
|
858
852
|
if (extractionProbeOwned) await existingEntities();
|
|
859
853
|
let result: ExtractionResult;
|
|
860
|
-
// The half-open probe is bounded: one that gets no answer in time counts
|
|
861
|
-
// a provider failure
|
|
862
|
-
// attempt until the provider answers or times out.
|
|
854
|
+
// The half-open probe is bounded: one that gets no answer in time counts
|
|
855
|
+
// as a provider failure instead of holding every other attempt.
|
|
863
856
|
const probe = startProbeDeadline(extractionProbeOwned, extractionAbortSignal, this.deps.halfOpenProbeTimeoutMs);
|
|
864
857
|
const engine = this.deps.getExtraction();
|
|
865
858
|
try {
|
|
@@ -891,8 +884,7 @@ export class ExtractionRunCoordinator {
|
|
|
891
884
|
if (options.failOnExtractionFailure) {
|
|
892
885
|
throw new Error("extraction failed: invalid_extraction_result");
|
|
893
886
|
}
|
|
894
|
-
//
|
|
895
|
-
// no-drop contract as a recorded provider failure), never destroyed.
|
|
887
|
+
// Failure: the window is retained for retry (the no-drop contract), never destroyed.
|
|
896
888
|
return {
|
|
897
889
|
status: "skipped",
|
|
898
890
|
reason: "invalid_extraction_result",
|
|
@@ -918,8 +910,7 @@ export class ExtractionRunCoordinator {
|
|
|
918
910
|
if (options.failOnExtractionFailure) {
|
|
919
911
|
throw new Error("extraction failed: invalid_extraction_result");
|
|
920
912
|
}
|
|
921
|
-
//
|
|
922
|
-
// no-drop contract as a recorded provider failure), never destroyed.
|
|
913
|
+
// Failure: the window is retained for retry (the no-drop contract), never destroyed.
|
|
923
914
|
return {
|
|
924
915
|
status: "skipped",
|
|
925
916
|
reason: "invalid_extraction_result",
|
|
@@ -934,8 +925,7 @@ export class ExtractionRunCoordinator {
|
|
|
934
925
|
? result.extractionFailure
|
|
935
926
|
: undefined;
|
|
936
927
|
// Issue #3140: surface extraction-LLM outages on /health and as an
|
|
937
|
-
// ERROR-level deduplicated event
|
|
938
|
-
// every completed attempt so a later success clears the failure.
|
|
928
|
+
// ERROR-level deduplicated event; a later success clears the failure.
|
|
939
929
|
if (extractionFailure) {
|
|
940
930
|
recordExtractionLlmFailure(extractionFailure);
|
|
941
931
|
emitExtractionLlmFailureError(extractionFailure, result.extractionFailureClass);
|
|
@@ -946,37 +936,49 @@ export class ExtractionRunCoordinator {
|
|
|
946
936
|
recordExtractionLlmSuccess();
|
|
947
937
|
}
|
|
948
938
|
let recordedRetryFailure = false;
|
|
949
|
-
|
|
950
|
-
//
|
|
951
|
-
// forced flush still records its failure (rule 18). Gated by
|
|
952
|
-
// extractionRetryEnabled so a disabled feature restores prior behavior.
|
|
939
|
+
let deadLetteredWindow = false;
|
|
940
|
+
// Record failure into backoff/breaker, or heal on success, before the fail-closed throw (rule 18).
|
|
953
941
|
if (extractionFingerprint && extractionRetryEnabled) {
|
|
954
942
|
if (extractionFailure) {
|
|
955
943
|
const failureClass = result.extractionFailureClass ?? "provider_retryable";
|
|
956
944
|
try {
|
|
957
945
|
await runDeadlineAware(
|
|
958
|
-
() =>
|
|
959
|
-
|
|
960
|
-
this.recordExtractionFailure(selfNamespace, extractionFingerprint, failureClass, freshMeta, Date.now(), extractionProbeToken),
|
|
961
|
-
),
|
|
946
|
+
() => storage.updateMeta((freshMeta) =>
|
|
947
|
+
this.recordExtractionFailure(selfNamespace, extractionFingerprint, failureClass, freshMeta, Date.now(), extractionProbeToken)),
|
|
962
948
|
"during_retry_bookkeeping_save",
|
|
963
949
|
false,
|
|
964
950
|
);
|
|
965
951
|
recordedRetryFailure = true;
|
|
966
952
|
} catch (err) {
|
|
967
953
|
if (err instanceof ExtractionDeadlineError) throw err;
|
|
968
|
-
// Fail-open, but retain the turns (a cleared buffer with no retry state drops them). Only a
|
|
969
|
-
// LOCK skip reaches here without the mutator having run — a later save must not double-count.
|
|
954
|
+
// Fail-open, but retain the turns (a cleared buffer with no retry state drops them). Only a LOCK skip reaches here without the mutator — a later save must not double-count.
|
|
970
955
|
if (err instanceof Error && err.message.includes("meta.json.lock not acquired"))
|
|
971
956
|
this.applyExtractionFailureToMemory(selfNamespace, extractionFingerprint, failureClass, Date.now(), extractionProbeToken);
|
|
972
957
|
recordedRetryFailure = true;
|
|
973
958
|
log.warn("runExtraction: retry state kept in memory; meta persist will catch up", err);
|
|
974
959
|
}
|
|
960
|
+
// A provider_permanent failure at its cap dead-letters — a resend can never succeed (drain safety).
|
|
961
|
+
deadLetteredWindow = await maybeDeadLetterPermanentExtractionFailure({
|
|
962
|
+
recorded: recordedRetryFailure, failureClass, storage, bufferKey, runDeadlineAware,
|
|
963
|
+
turns, fingerprint: extractionFingerprint, partParents: options.partParents,
|
|
964
|
+
dropAllowed: options.dropFailedChunks !== false && options.failOnExtractionFailure !== true,
|
|
965
|
+
permanentAttempts: this.extractionRetryState.get(selfNamespace)?.get(extractionFingerprint)?.permanentAttempts ?? 0,
|
|
966
|
+
permanentMaxAttempts: this.config.extractionProviderPermanentMaxAttempts,
|
|
967
|
+
recordProcessed: (st, fp, meta) => this.deps.recordProcessedExtractionFingerprint(st, fp, meta),
|
|
968
|
+
clearBufferedTurns: (ts) => clearBuffer({ dropTurns: ts }),
|
|
969
|
+
clearPersistedRetryEntry: (m) => {
|
|
970
|
+
const n = m.extractionRetryState?.length ?? 0;
|
|
971
|
+
m.extractionRetryState = m.extractionRetryState?.filter((e) => e.fingerprint !== extractionFingerprint);
|
|
972
|
+
return (m.extractionRetryState?.length ?? 0) !== n;
|
|
973
|
+
},
|
|
974
|
+
clearRetryMirror: () => {
|
|
975
|
+
this.extractionRetryState.get(selfNamespace)?.delete(extractionFingerprint);
|
|
976
|
+
},
|
|
977
|
+
isDeadlineError: (err) => err instanceof ExtractionDeadlineError,
|
|
978
|
+
});
|
|
975
979
|
} else if (result.extractionSkippedReason === undefined) {
|
|
976
|
-
// Provider responded without failure → breaker heals; clear any
|
|
977
|
-
//
|
|
978
|
-
// PRRT_kwDORJXyws6zxG6u: pass the run's probe token so the settlement
|
|
979
|
-
// only applies to a probe this run owns.
|
|
980
|
+
// Provider responded without failure → breaker heals; clear any parked backoff.
|
|
981
|
+
// PRRT_kwDORJXyws6zxG6u: pass the run's probe token — only settle a probe this run owns.
|
|
980
982
|
this.providerBreaker.success(extractionProbeToken);
|
|
981
983
|
try {
|
|
982
984
|
await runDeadlineAware(
|
|
@@ -1000,8 +1002,7 @@ export class ExtractionRunCoordinator {
|
|
|
1000
1002
|
if (options.failOnExtractionFailure && extractionFailure) {
|
|
1001
1003
|
throw new Error(`extraction failed: ${extractionFailure}`);
|
|
1002
1004
|
}
|
|
1003
|
-
// #3227: one count covers every enabled durable output kind, so a
|
|
1004
|
-
// reflection-only or relationship-only result reaches persistence.
|
|
1005
|
+
// #3227: one count covers every enabled durable output kind, so a reflection-only or relationship-only result reaches persistence.
|
|
1005
1006
|
const durableOutputCount = countRequestedDurableOutputs(result, this.config);
|
|
1006
1007
|
if (durableOutputCount === 0) {
|
|
1007
1008
|
log.debug("runExtraction: extraction produced no durable outputs; skipping persistence");
|
|
@@ -1031,10 +1032,9 @@ export class ExtractionRunCoordinator {
|
|
|
1031
1032
|
bufferKey,
|
|
1032
1033
|
isLiveSession: clearBufferAfterExtraction,
|
|
1033
1034
|
});
|
|
1034
|
-
// Issue #3415: retention follows the actual extraction failure, not
|
|
1035
|
-
//
|
|
1036
|
-
//
|
|
1037
|
-
// them is silent loss. A successful empty result still clears below.
|
|
1035
|
+
// Issue #3415: retention follows the actual extraction failure, not retry
|
|
1036
|
+
// bookkeeping. With retry disabled no backoff is recorded but the failed
|
|
1037
|
+
// turns are kept — clearing them is silent loss. Success still clears below.
|
|
1038
1038
|
if (extractionFailure) {
|
|
1039
1039
|
log.debug("runExtraction: retaining buffer after failed extraction", { extractionFailure });
|
|
1040
1040
|
} else {
|
|
@@ -1043,7 +1043,7 @@ export class ExtractionRunCoordinator {
|
|
|
1043
1043
|
if (!shouldPersistProcessedFingerprint) {
|
|
1044
1044
|
await commitEmptySuccessExtraction(emptySuccessCommit);
|
|
1045
1045
|
}
|
|
1046
|
-
return emptyExtractionResult(Boolean(extractionFailure), result.extractionFailureClass);
|
|
1046
|
+
return emptyExtractionResult(Boolean(extractionFailure) && !deadLetteredWindow, result.extractionFailureClass);
|
|
1047
1047
|
}
|
|
1048
1048
|
|
|
1049
1049
|
let threadIdForExtraction: string | null = null;
|
package/src/storage.ts
CHANGED
|
@@ -1623,9 +1623,8 @@ export interface MemoryWriteResult {
|
|
|
1623
1623
|
|
|
1624
1624
|
/**
|
|
1625
1625
|
* Defensively parse the persisted per-fingerprint extraction retry state from
|
|
1626
|
-
* meta.json
|
|
1627
|
-
*
|
|
1628
|
-
* narrowing (no inline casts) so a malformed entry can't slip through typed.
|
|
1626
|
+
* meta.json — unknown/legacy shapes are dropped, never thrown on. Uses
|
|
1627
|
+
* `in`/typeof narrowing (no inline casts) so a malformed entry can't slip through.
|
|
1629
1628
|
*/
|
|
1630
1629
|
function parseExtractionRetryStateEntries(raw: unknown): NonNullable<MetaState["extractionRetryState"]> {
|
|
1631
1630
|
if (!Array.isArray(raw)) return [];
|
|
@@ -1638,14 +1637,16 @@ function parseExtractionRetryStateEntries(raw: unknown): NonNullable<MetaState["
|
|
|
1638
1637
|
if (!("firstFailedAt" in entry) || typeof entry.firstFailedAt !== "string") continue;
|
|
1639
1638
|
if (!("lastFailureClass" in entry)) continue;
|
|
1640
1639
|
const cls = entry.lastFailureClass;
|
|
1641
|
-
if (cls !== "provider_retryable" && cls !== "parse_empty" && cls !== "output_truncated" && cls !== "auth_config") continue;
|
|
1640
|
+
if (cls !== "provider_retryable" && cls !== "parse_empty" && cls !== "output_truncated" && cls !== "auth_config" && cls !== "provider_permanent") continue;
|
|
1642
1641
|
const lastFailureClass: ExtractionFailureClass = cls;
|
|
1642
|
+
const pa = "permanentAttempts" in entry ? entry.permanentAttempts : undefined;
|
|
1643
1643
|
valid.push({
|
|
1644
1644
|
fingerprint: entry.fingerprint,
|
|
1645
1645
|
attempts: entry.attempts,
|
|
1646
1646
|
nextEligibleAt: entry.nextEligibleAt,
|
|
1647
1647
|
firstFailedAt: entry.firstFailedAt,
|
|
1648
1648
|
lastFailureClass,
|
|
1649
|
+
permanentAttempts: Number.isFinite(pa) ? pa : undefined,
|
|
1649
1650
|
});
|
|
1650
1651
|
}
|
|
1651
1652
|
return valid;
|
|
@@ -7,5 +7,16 @@
|
|
|
7
7
|
* at the same `maxOutputTokens` can never complete, so the fingerprint long-parks immediately;
|
|
8
8
|
* the window survives for a run under a raised ceiling (#3521).
|
|
9
9
|
* - `auth_config`: auth/config failure (401/403/"no models configured") — open the breaker immediately.
|
|
10
|
+
* - `provider_permanent`: a thrown, status-bearing 400/413/422 input refusal — a resend of the
|
|
11
|
+
* identical request can never succeed, so the fingerprint is dead-lettered after
|
|
12
|
+
* `extractionProviderPermanentMaxAttempts` instead of retrying unboundedly
|
|
13
|
+
* (remnic-buffer-drain.timer loop). The same class covers status-bearing local-LLM
|
|
14
|
+
* rejections and gateway `http_error` refusals; statusless errors stay retryable,
|
|
15
|
+
* and a statusless unusable local reply stays `parse_empty`.
|
|
10
16
|
*/
|
|
11
|
-
export type ExtractionFailureClass =
|
|
17
|
+
export type ExtractionFailureClass =
|
|
18
|
+
| "provider_retryable"
|
|
19
|
+
| "parse_empty"
|
|
20
|
+
| "output_truncated"
|
|
21
|
+
| "auth_config"
|
|
22
|
+
| "provider_permanent";
|
package/src/types.ts
CHANGED
|
@@ -1703,17 +1703,17 @@ export interface PluginConfig
|
|
|
1703
1703
|
extractionRetryJitterRatio: number;
|
|
1704
1704
|
/** Max attempts for a `parse_empty` fingerprint before it is long-parked. */
|
|
1705
1705
|
extractionParseEmptyMaxAttempts: number;
|
|
1706
|
+
/** Max attempts for a `provider_permanent` fingerprint before it dead-letters — recovery copy saved, marked processed. */
|
|
1707
|
+
extractionProviderPermanentMaxAttempts: number;
|
|
1706
1708
|
/** Consecutive provider failures before the circuit breaker opens. */
|
|
1707
1709
|
extractionBreakerFailureThreshold: number;
|
|
1708
1710
|
/** Breaker open cooldown (ms) for transient provider failures. */
|
|
1709
1711
|
extractionBreakerCooldownMs: number;
|
|
1710
1712
|
/** Breaker open cooldown (ms) for auth/config failures (longer — provider is misconfigured). */
|
|
1711
1713
|
extractionBreakerAuthCooldownMs: number;
|
|
1712
|
-
/** Consecutive failed
|
|
1713
|
-
* trigger-drain chunk is dropped (side-file copy under `state/dropped/`). Default: `5`. */
|
|
1714
|
+
/** Consecutive failed trigger-drain attempts after which the chunk is dropped (side-file copy under `state/dropped/`). Default: `5`. */
|
|
1714
1715
|
extractionChunkDropAfterFailures: number;
|
|
1715
|
-
/** Maximum rendered characters per extraction call; oversized turns split
|
|
1716
|
-
* into verbatim `extractionPartOf` parts so every part is extracted. Default: `12000`. */
|
|
1716
|
+
/** Maximum rendered characters per extraction call; oversized turns split into verbatim `extractionPartOf` parts. Default: `12000`. */
|
|
1717
1717
|
extractionCallMaxChars: number;
|
|
1718
1718
|
// Local LLM fast tier (v9.1) — smaller model for quick ops
|
|
1719
1719
|
localLlmFastEnabled: boolean;
|
|
@@ -3523,8 +3523,7 @@ export interface MetaState {
|
|
|
3523
3523
|
}>;
|
|
3524
3524
|
/**
|
|
3525
3525
|
* Per-fingerprint extraction retry/backoff state (extraction hot-loop
|
|
3526
|
-
* hardening). Optional and default-safe
|
|
3527
|
-
* unchanged. Bounded to the newest entries at write time.
|
|
3526
|
+
* hardening). Optional and default-safe; bounded to the newest entries at write time.
|
|
3528
3527
|
*/
|
|
3529
3528
|
extractionRetryState?: Array<{
|
|
3530
3529
|
fingerprint: string;
|
|
@@ -3532,6 +3531,7 @@ export interface MetaState {
|
|
|
3532
3531
|
nextEligibleAt: string; // ISO
|
|
3533
3532
|
firstFailedAt: string; // ISO
|
|
3534
3533
|
lastFailureClass: ExtractionFailureClass;
|
|
3534
|
+
permanentAttempts?: number;
|
|
3535
3535
|
}>;
|
|
3536
3536
|
}
|
|
3537
3537
|
|