@remnic/core 9.47.0 → 9.48.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 -5
- package/dist/access-admin-ops-surface.js +27 -25
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +6 -5
- package/dist/access-authorization-probe.js +28 -26
- package/dist/access-boundary.d.ts +6 -5
- package/dist/access-boundary.js +27 -25
- package/dist/access-cli.js +87 -85
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush.d.ts +6 -5
- package/dist/access-extraction-force-flush.js +27 -25
- package/dist/access-http-lcm-compaction.d.ts +6 -5
- package/dist/access-http-lifecycle-flush.d.ts +6 -5
- package/dist/access-http-offline-stream.d.ts +6 -5
- package/dist/access-http-query.js +27 -25
- package/dist/access-http.d.ts +6 -5
- package/dist/access-http.js +36 -34
- package/dist/access-identity-continuity-surface.d.ts +5 -4
- package/dist/access-identity-continuity-surface.js +27 -25
- package/dist/access-lcm-surface.d.ts +6 -5
- package/dist/access-lcm-surface.js +27 -25
- package/dist/access-mcp.d.ts +6 -5
- package/dist/access-mcp.js +32 -30
- package/dist/access-namespace-preflight.js +27 -25
- package/dist/access-observe-write-surface.d.ts +6 -5
- package/dist/access-observe-write-surface.js +27 -25
- package/dist/access-offline-manifest.d.ts +5 -4
- package/dist/access-offline-manifest.js +4 -4
- package/dist/access-operations-batch.js +29 -27
- package/dist/access-operations.d.ts +9 -8
- package/dist/access-operations.js +31 -29
- package/dist/access-recall-concurrency.d.ts +6 -5
- package/dist/access-recall-concurrency.js +27 -25
- package/dist/access-recall-response.d.ts +6 -5
- package/dist/access-recall-response.js +27 -25
- package/dist/access-recall-surface.d.ts +11 -10
- package/dist/access-recall-surface.js +27 -25
- package/dist/access-schema.d.ts +86 -86
- package/dist/{access-service-DNBYHK33.d.ts → access-service-andNjwfD.d.ts} +3 -3
- package/dist/access-service-helpers.d.ts +6 -5
- package/dist/access-service.d.ts +10 -9
- package/dist/access-service.js +27 -25
- package/dist/access-surface-catalog.d.ts +6 -5
- package/dist/access-wearables-meetings-surface.d.ts +3 -2
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/artifact-search.d.ts +37 -0
- package/dist/artifact-search.js +13 -0
- package/dist/artifact-search.js.map +1 -0
- package/dist/bootstrap.d.ts +5 -4
- package/dist/briefing.d.ts +2 -1
- package/dist/briefing.js +10 -7
- package/dist/buffer.d.ts +2 -1
- package/dist/buffer.js +4 -4
- package/dist/causal-consolidation.js +11 -8
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/{chunk-T6JRMVOV.js → chunk-2EJNXE53.js} +2 -2
- package/dist/{chunk-SIP5DBDN.js → chunk-2P3GQVM2.js} +152 -130
- package/dist/chunk-2P3GQVM2.js.map +1 -0
- package/dist/{chunk-64BHFFKZ.js → chunk-2RPJ4NEE.js} +2 -2
- package/dist/{chunk-JFO5QZ7N.js → chunk-3JUYWPFJ.js} +2 -2
- package/dist/{chunk-L7G72WY4.js → chunk-3NDN5P55.js} +2 -2
- package/dist/{chunk-IXH2U2QT.js → chunk-45OTV7FZ.js} +19 -19
- package/dist/chunk-4O4TKIXQ.js +171 -0
- package/dist/chunk-4O4TKIXQ.js.map +1 -0
- package/dist/{chunk-BDNL34CT.js → chunk-4WBGZYZZ.js} +33 -8
- package/dist/chunk-4WBGZYZZ.js.map +1 -0
- package/dist/{chunk-U6JGQ37L.js → chunk-52I3YZZ6.js} +3 -3
- package/dist/{chunk-IZQ5TDFT.js → chunk-53AJILXF.js} +3 -3
- package/dist/chunk-5AUY5Z5E.js +34 -0
- package/dist/chunk-5AUY5Z5E.js.map +1 -0
- package/dist/{chunk-YWCOJOUI.js → chunk-5L7PTX2Q.js} +2 -2
- package/dist/{chunk-ELIL2A37.js → chunk-7FGL6CGA.js} +5 -5
- package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
- package/dist/{chunk-HXXTXLKA.js → chunk-A2TFK5PG.js} +2 -2
- package/dist/{chunk-LI7OE7G6.js → chunk-ANCC3JJH.js} +2 -2
- package/dist/{chunk-ILBLZ5Y5.js → chunk-D5NGH2EW.js} +2 -2
- package/dist/{chunk-ST5IEK3H.js → chunk-DUEEQCTT.js} +2 -2
- package/dist/{chunk-QISYTKG4.js → chunk-EZNXW27Q.js} +6 -6
- package/dist/{chunk-47J4EDGR.js → chunk-FJ2ND6CZ.js} +2 -2
- package/dist/{chunk-FQU3HTQM.js → chunk-FMCHFSZF.js} +6 -6
- package/dist/{chunk-FULKGK7P.js → chunk-G2RBWVFQ.js} +2 -2
- package/dist/{chunk-W2ZSNIBP.js → chunk-GD7UPIBG.js} +2 -2
- package/dist/{chunk-Z54EM5YZ.js → chunk-GF22HWS2.js} +4 -4
- package/dist/{chunk-ZDAYWJV6.js → chunk-GVX3NAUU.js} +2 -2
- package/dist/{chunk-M2INOSTA.js → chunk-GWHPQOUC.js} +2 -2
- package/dist/{chunk-N5XULCU3.js → chunk-HIDEBEAN.js} +9 -9
- package/dist/{chunk-74HN5QUH.js → chunk-HRMEYQRO.js} +2 -2
- package/dist/{chunk-VFZS2HAA.js → chunk-IP3DHDU2.js} +2 -2
- package/dist/{chunk-RKNJBZ55.js → chunk-JBPKEARU.js} +4 -4
- package/dist/{chunk-PFJXPOD4.js → chunk-JYPO7L3G.js} +2 -2
- package/dist/{chunk-G2L5IZV4.js → chunk-KSGEGHYA.js} +44 -44
- package/dist/{chunk-PKCLQ7KM.js → chunk-LZGCJSQR.js} +5 -5
- package/dist/{chunk-WOC6DXP5.js → chunk-M4DMO67I.js} +4 -4
- package/dist/{chunk-JCNJIXZN.js → chunk-NXUJRXSF.js} +2 -2
- package/dist/{chunk-5VQPZ4GV.js → chunk-PELT6ADC.js} +3 -3
- package/dist/{chunk-IDE5AR5W.js → chunk-PLCZD3LG.js} +28 -66
- package/dist/chunk-PLCZD3LG.js.map +1 -0
- package/dist/{chunk-KMWYZTIE.js → chunk-PRVJH7CY.js} +2 -2
- package/dist/{chunk-RVO6TCTU.js → chunk-QCECHYZL.js} +6 -6
- package/dist/{chunk-KA47C7BF.js → chunk-RSPSHRZA.js} +2 -2
- package/dist/{chunk-E4FOAENZ.js → chunk-S55OAS5P.js} +5 -5
- package/dist/{chunk-BIPBQQFI.js → chunk-UMOO7IY7.js} +2 -2
- package/dist/{chunk-5U7ID3EZ.js → chunk-UTVZKHJK.js} +2 -2
- package/dist/{chunk-V5FE3UAI.js → chunk-WOEVJKKQ.js} +2 -2
- package/dist/{chunk-N3LL5NEU.js → chunk-WQIHRA5F.js} +2 -2
- package/dist/chunk-Z7L72ZHL.js +75 -0
- package/dist/chunk-Z7L72ZHL.js.map +1 -0
- package/dist/{cli-BWXSPxB9.d.ts → cli-p_WmVo2h.d.ts} +3 -3
- package/dist/cli.d.ts +7 -6
- package/dist/cli.js +55 -53
- package/dist/compounding/engine.d.ts +2 -1
- package/dist/compounding/engine.js +10 -7
- package/dist/connectors/codex-materialize-runner.js +10 -7
- package/dist/connectors/index.js +10 -7
- package/dist/consolidation-provenance-check.d.ts +2 -1
- package/dist/consolidation-undo.d.ts +2 -1
- package/dist/contradiction/index.d.ts +7 -6
- package/dist/convergence-refresh.d.ts +2 -1
- package/dist/convergence-refresh.js +12 -9
- package/dist/corpus-watermark.js +15 -13
- package/dist/entity-recall-cancellation.d.ts +36 -0
- package/dist/entity-recall-cancellation.js +19 -0
- package/dist/entity-recall-cancellation.js.map +1 -0
- package/dist/entity-retrieval.d.ts +14 -6
- package/dist/entity-retrieval.js +11 -7
- package/dist/explicit-capture.d.ts +5 -4
- package/dist/external-wiki-access.d.ts +6 -5
- package/dist/external-wiki-access.js +28 -26
- package/dist/external-wiki-mcp-tools.d.ts +6 -5
- package/dist/extraction.js +15 -13
- package/dist/index.d.ts +687 -686
- package/dist/index.js +114 -112
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.js +7 -7
- package/dist/maintenance/memory-governance.js +10 -7
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +7 -6
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +10 -7
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -1
- package/dist/maintenance/rebuild-memory-projection.js +11 -8
- package/dist/{maintenance-DQrL93Uu.d.ts → maintenance-BfcuwfJS.d.ts} +1 -1
- package/dist/mcp-memory-inspector-app.d.ts +6 -5
- package/dist/memory-worth-outcomes.d.ts +2 -1
- package/dist/namespaces/migrate.d.ts +2 -1
- package/dist/namespaces/migrate.js +14 -12
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +7 -6
- package/dist/namespaces/storage.js +10 -7
- package/dist/offline-sync-impression-drain.js +3 -3
- package/dist/operator-doctor-corpus.js +16 -14
- package/dist/operator-toolkit.d.ts +2 -1
- package/dist/operator-toolkit.js +20 -18
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -1
- package/dist/orchestration/maintenance.d.ts +3 -2
- package/dist/orchestration/maintenance.js +14 -12
- package/dist/{orchestrator-CRR-6sVB.d.ts → orchestrator-B7nLo4z1.d.ts} +3 -3
- package/dist/orchestrator.d.ts +5 -4
- package/dist/orchestrator.js +89 -87
- package/dist/qmd.js +4 -4
- package/dist/recall-qos.d.ts +109 -2
- package/dist/recall-qos.js +12 -3
- package/dist/schemas.d.ts +76 -76
- package/dist/search/factory.js +3 -3
- package/dist/search/index.js +3 -3
- package/dist/semantic-consolidation.js +11 -8
- package/dist/semantic-rule-promotion.js +10 -7
- package/dist/semantic-rule-verifier.js +10 -7
- package/dist/{service-DJ0LDyuN.d.ts → service-B5W5IYCx.d.ts} +1 -1
- package/dist/shared-context/manager.d.ts +8 -8
- package/dist/source-agent-qualifier.js +13 -11
- package/dist/{storage-y340tYKb.d.ts → storage-COL907QF.d.ts} +2 -1
- package/dist/storage.d.ts +2 -1
- package/dist/storage.js +9 -6
- package/dist/temporal-supersession.d.ts +2 -1
- package/dist/tier-migration.d.ts +2 -1
- package/dist/transfer/types.d.ts +66 -66
- package/dist/verified-recall.js +10 -7
- package/package.json +2 -2
- package/src/artifact-search.test.ts +110 -0
- package/src/artifact-search.ts +115 -0
- package/src/entity-recall-cancellation.ts +58 -0
- package/src/entity-retrieval.ts +58 -4
- package/src/orchestration/namespace-read-fanout.ts +4 -1
- package/src/orchestration/recall-internal-deps.ts +2 -0
- package/src/orchestration/recall-internal.ts +76 -55
- package/src/orchestration/recall-search-pipeline.ts +9 -1
- package/src/orchestration/recall-search-prefilter.ts +18 -1
- package/src/orchestrator.ts +5 -6
- package/src/recall-qos.test.ts +289 -0
- package/src/recall-qos.ts +238 -1
- package/src/storage.ts +12 -56
- package/dist/chunk-BDNL34CT.js.map +0 -1
- package/dist/chunk-C3AKM55W.js +0 -59
- package/dist/chunk-C3AKM55W.js.map +0 -1
- package/dist/chunk-IDE5AR5W.js.map +0 -1
- package/dist/chunk-SIP5DBDN.js.map +0 -1
- /package/dist/{chunk-T6JRMVOV.js.map → chunk-2EJNXE53.js.map} +0 -0
- /package/dist/{chunk-64BHFFKZ.js.map → chunk-2RPJ4NEE.js.map} +0 -0
- /package/dist/{chunk-JFO5QZ7N.js.map → chunk-3JUYWPFJ.js.map} +0 -0
- /package/dist/{chunk-L7G72WY4.js.map → chunk-3NDN5P55.js.map} +0 -0
- /package/dist/{chunk-IXH2U2QT.js.map → chunk-45OTV7FZ.js.map} +0 -0
- /package/dist/{chunk-U6JGQ37L.js.map → chunk-52I3YZZ6.js.map} +0 -0
- /package/dist/{chunk-IZQ5TDFT.js.map → chunk-53AJILXF.js.map} +0 -0
- /package/dist/{chunk-YWCOJOUI.js.map → chunk-5L7PTX2Q.js.map} +0 -0
- /package/dist/{chunk-ELIL2A37.js.map → chunk-7FGL6CGA.js.map} +0 -0
- /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
- /package/dist/{chunk-HXXTXLKA.js.map → chunk-A2TFK5PG.js.map} +0 -0
- /package/dist/{chunk-LI7OE7G6.js.map → chunk-ANCC3JJH.js.map} +0 -0
- /package/dist/{chunk-ILBLZ5Y5.js.map → chunk-D5NGH2EW.js.map} +0 -0
- /package/dist/{chunk-ST5IEK3H.js.map → chunk-DUEEQCTT.js.map} +0 -0
- /package/dist/{chunk-QISYTKG4.js.map → chunk-EZNXW27Q.js.map} +0 -0
- /package/dist/{chunk-47J4EDGR.js.map → chunk-FJ2ND6CZ.js.map} +0 -0
- /package/dist/{chunk-FQU3HTQM.js.map → chunk-FMCHFSZF.js.map} +0 -0
- /package/dist/{chunk-FULKGK7P.js.map → chunk-G2RBWVFQ.js.map} +0 -0
- /package/dist/{chunk-W2ZSNIBP.js.map → chunk-GD7UPIBG.js.map} +0 -0
- /package/dist/{chunk-Z54EM5YZ.js.map → chunk-GF22HWS2.js.map} +0 -0
- /package/dist/{chunk-ZDAYWJV6.js.map → chunk-GVX3NAUU.js.map} +0 -0
- /package/dist/{chunk-M2INOSTA.js.map → chunk-GWHPQOUC.js.map} +0 -0
- /package/dist/{chunk-N5XULCU3.js.map → chunk-HIDEBEAN.js.map} +0 -0
- /package/dist/{chunk-74HN5QUH.js.map → chunk-HRMEYQRO.js.map} +0 -0
- /package/dist/{chunk-VFZS2HAA.js.map → chunk-IP3DHDU2.js.map} +0 -0
- /package/dist/{chunk-RKNJBZ55.js.map → chunk-JBPKEARU.js.map} +0 -0
- /package/dist/{chunk-PFJXPOD4.js.map → chunk-JYPO7L3G.js.map} +0 -0
- /package/dist/{chunk-G2L5IZV4.js.map → chunk-KSGEGHYA.js.map} +0 -0
- /package/dist/{chunk-PKCLQ7KM.js.map → chunk-LZGCJSQR.js.map} +0 -0
- /package/dist/{chunk-WOC6DXP5.js.map → chunk-M4DMO67I.js.map} +0 -0
- /package/dist/{chunk-JCNJIXZN.js.map → chunk-NXUJRXSF.js.map} +0 -0
- /package/dist/{chunk-5VQPZ4GV.js.map → chunk-PELT6ADC.js.map} +0 -0
- /package/dist/{chunk-KMWYZTIE.js.map → chunk-PRVJH7CY.js.map} +0 -0
- /package/dist/{chunk-RVO6TCTU.js.map → chunk-QCECHYZL.js.map} +0 -0
- /package/dist/{chunk-KA47C7BF.js.map → chunk-RSPSHRZA.js.map} +0 -0
- /package/dist/{chunk-E4FOAENZ.js.map → chunk-S55OAS5P.js.map} +0 -0
- /package/dist/{chunk-BIPBQQFI.js.map → chunk-UMOO7IY7.js.map} +0 -0
- /package/dist/{chunk-5U7ID3EZ.js.map → chunk-UTVZKHJK.js.map} +0 -0
- /package/dist/{chunk-V5FE3UAI.js.map → chunk-WOEVJKKQ.js.map} +0 -0
- /package/dist/{chunk-N3LL5NEU.js.map → chunk-WQIHRA5F.js.map} +0 -0
package/dist/recall-qos.d.ts
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { LoggerBackend } from './logger.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Hand the event loop one macrotask.
|
|
5
|
+
*
|
|
6
|
+
* A recall section deadline is a timer, and a timer cannot fire while a
|
|
7
|
+
* synchronous scan holds the loop — so a provider that iterates the whole corpus
|
|
8
|
+
* must call this periodically or its budget is unenforceable (issue #2291).
|
|
9
|
+
* `setImmediate` (check phase) is used rather than a `0ms` timer so the yield
|
|
10
|
+
* cannot be starved by the timer queue it exists to let run.
|
|
11
|
+
*/
|
|
12
|
+
declare function yieldToEventLoop(): Promise<void>;
|
|
3
13
|
type RecallSectionPriority = "core" | "enrichment";
|
|
4
|
-
|
|
14
|
+
/**
|
|
15
|
+
* `timeout` records a section that started, exceeded its deadline, and was
|
|
16
|
+
* degraded to its neutral value (issue #2291). It is distinct from `skip`
|
|
17
|
+
* (never ran: disabled or zero-limit) so operators can tell a configuration
|
|
18
|
+
* choice from a budget breach in the section metric log.
|
|
19
|
+
*/
|
|
20
|
+
type RecallSectionSource = "fresh" | "stale" | "skip" | "timeout";
|
|
5
21
|
interface RecallSectionMetric {
|
|
6
22
|
section: string;
|
|
7
23
|
priority: RecallSectionPriority;
|
|
@@ -29,5 +45,96 @@ declare function createRecallSectionMetricRecorder(options?: {
|
|
|
29
45
|
timings?: Record<string, string>;
|
|
30
46
|
logger?: Pick<LoggerBackend, "info" | "debug">;
|
|
31
47
|
}): (metric: RecallSectionMetric) => RecallSectionMetricLog;
|
|
48
|
+
/**
|
|
49
|
+
* Effective per-section deadline for optional core recall providers.
|
|
50
|
+
*
|
|
51
|
+
* Two things make the configured value unusable as-is (issue #2291):
|
|
52
|
+
*
|
|
53
|
+
* - `recallCoreDeadlineMs` and `recallOuterTimeoutMs` both default to 75s, so a
|
|
54
|
+
* section budget taken at face value can never fire before the request ceiling
|
|
55
|
+
* that cancels everything — the caller loses the whole recall rather than one
|
|
56
|
+
* section.
|
|
57
|
+
* - Sections start *after* planning, namespace resolution, and mode selection.
|
|
58
|
+
* Capping against the original ceiling would let a section that starts 20s in
|
|
59
|
+
* still be running when the request is aborted, which is the same failure.
|
|
60
|
+
*
|
|
61
|
+
* So the cap is taken against `remainingOuterMs` — the request budget left when
|
|
62
|
+
* the section actually starts. An operator who lowers `recallCoreDeadlineMs`
|
|
63
|
+
* below that still gets exactly what they asked for.
|
|
64
|
+
*
|
|
65
|
+
* `remainingOuterMs === null` means the request is unbounded and there is nothing
|
|
66
|
+
* to reserve headroom against. A non-positive remainder means the request is
|
|
67
|
+
* already over budget, so the section degrades immediately rather than starting
|
|
68
|
+
* work that cannot be delivered.
|
|
69
|
+
*/
|
|
70
|
+
declare function resolveRecallCoreSectionDeadlineMs(options: {
|
|
71
|
+
configuredCoreDeadlineMs: number;
|
|
72
|
+
remainingOuterMs: number | null;
|
|
73
|
+
}): number;
|
|
74
|
+
interface RecallSectionDeadlineOutcome<T> {
|
|
75
|
+
/** The section's value, or `fallback` when the deadline was exceeded. */
|
|
76
|
+
value: T;
|
|
77
|
+
timedOut: boolean;
|
|
78
|
+
durationMs: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Run one recall section under a deadline, degrading to `fallback` instead of
|
|
82
|
+
* blocking the phase it belongs to (issue #2291).
|
|
83
|
+
*
|
|
84
|
+
* Before this existed, `deadlineMs` was recorded in the section metric but
|
|
85
|
+
* never enforced for core sections: a provider doing a multi-minute scan on a
|
|
86
|
+
* slow filesystem blocked the whole phase-one `Promise.all`, and kept scanning
|
|
87
|
+
* after the caller aborted. Two guarantees fix that:
|
|
88
|
+
*
|
|
89
|
+
* 1. The returned promise settles within `deadlineMs`, with `timedOut: true`
|
|
90
|
+
* and the caller's neutral value, so one slow optional provider degrades
|
|
91
|
+
* independently rather than holding the response.
|
|
92
|
+
* 2. `run` receives a signal that fires on the deadline AND on the caller's
|
|
93
|
+
* abort, so the section can stop its own work at its next checkpoint.
|
|
94
|
+
*
|
|
95
|
+
* `deadlineMs <= 0` (or non-finite) means unbounded, matching the config
|
|
96
|
+
* contract that a zero budget disables the limit. The section signal is still
|
|
97
|
+
* created and still tracks the parent, so cancellation propagates either way.
|
|
98
|
+
*/
|
|
99
|
+
declare function runRecallSectionWithinDeadline<T>(options: {
|
|
100
|
+
deadlineMs: number;
|
|
101
|
+
fallback: T;
|
|
102
|
+
parentSignal?: AbortSignal;
|
|
103
|
+
run: (sectionSignal: AbortSignal) => Promise<T>;
|
|
104
|
+
now?: () => number;
|
|
105
|
+
}): Promise<RecallSectionDeadlineOutcome<T>>;
|
|
106
|
+
/**
|
|
107
|
+
* Runs one *optional* core recall section, bounded and accounted for.
|
|
108
|
+
*
|
|
109
|
+
* Binds a section's deadline, the caller's abort signal, and the QoS recorder
|
|
110
|
+
* once so each provider is one call (issue #2291). A breach degrades the
|
|
111
|
+
* section to `fallback`, warns with the section name and budget, and records the
|
|
112
|
+
* section as `timeout` — so a slow provider costs its own section, not the
|
|
113
|
+
* response.
|
|
114
|
+
*
|
|
115
|
+
* The budget is resolved when each section STARTS, against the request budget
|
|
116
|
+
* still left at that moment (`outerDeadlineAtMs`), not against the original
|
|
117
|
+
* configured ceiling: sections begin after planning and namespace resolution, and
|
|
118
|
+
* a section sized to the full request would otherwise still be running when the
|
|
119
|
+
* request itself is aborted.
|
|
120
|
+
*
|
|
121
|
+
* Cancellation degrades too, and must: the section signal fires on the caller's
|
|
122
|
+
* abort, and the phase this section belongs to is awaited through a race that the
|
|
123
|
+
* caller's abort also wins. A rejection here would therefore land on a promise
|
|
124
|
+
* nobody is awaiting any more — an unhandled rejection rather than a signal. The
|
|
125
|
+
* caller learns of its own abort from that race, not from a section result.
|
|
126
|
+
*
|
|
127
|
+
* Only sections whose absence leaves recall coherent belong here: the fallback
|
|
128
|
+
* IS the degraded contract.
|
|
129
|
+
*/
|
|
130
|
+
declare function createBoundedCoreSectionRunner(options: {
|
|
131
|
+
configuredDeadlineMs: number;
|
|
132
|
+
/** Absolute time the whole request is aborted, or null when unbounded. */
|
|
133
|
+
outerDeadlineAtMs: number | null;
|
|
134
|
+
parentSignal?: AbortSignal;
|
|
135
|
+
record: (metric: RecallSectionMetric) => unknown;
|
|
136
|
+
logger?: Pick<LoggerBackend, "warn">;
|
|
137
|
+
now?: () => number;
|
|
138
|
+
}): <T>(section: string, fallback: T, run: (sectionSignal: AbortSignal) => Promise<T>) => Promise<T>;
|
|
32
139
|
|
|
33
|
-
export { type RecallSectionMetric, type RecallSectionMetricLog, type RecallSectionPriority, type RecallSectionSource, createRecallSectionMetricRecorder, formatRecallSectionMetric };
|
|
140
|
+
export { type RecallSectionDeadlineOutcome, type RecallSectionMetric, type RecallSectionMetricLog, type RecallSectionPriority, type RecallSectionSource, createBoundedCoreSectionRunner, createRecallSectionMetricRecorder, formatRecallSectionMetric, resolveRecallCoreSectionDeadlineMs, runRecallSectionWithinDeadline, yieldToEventLoop };
|
package/dist/recall-qos.js
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
|
+
createBoundedCoreSectionRunner,
|
|
2
3
|
createRecallSectionMetricRecorder,
|
|
3
|
-
formatRecallSectionMetric
|
|
4
|
-
|
|
4
|
+
formatRecallSectionMetric,
|
|
5
|
+
resolveRecallCoreSectionDeadlineMs,
|
|
6
|
+
runRecallSectionWithinDeadline,
|
|
7
|
+
yieldToEventLoop
|
|
8
|
+
} from "./chunk-4O4TKIXQ.js";
|
|
9
|
+
import "./chunk-BTTPKDIL.js";
|
|
5
10
|
import "./chunk-3WCASNQZ.js";
|
|
6
11
|
import "./chunk-PZ5AY32C.js";
|
|
7
12
|
export {
|
|
13
|
+
createBoundedCoreSectionRunner,
|
|
8
14
|
createRecallSectionMetricRecorder,
|
|
9
|
-
formatRecallSectionMetric
|
|
15
|
+
formatRecallSectionMetric,
|
|
16
|
+
resolveRecallCoreSectionDeadlineMs,
|
|
17
|
+
runRecallSectionWithinDeadline,
|
|
18
|
+
yieldToEventLoop
|
|
10
19
|
};
|
|
11
20
|
//# sourceMappingURL=recall-qos.js.map
|