@orangecharts/wrun-chart-host 0.8.0 → 0.10.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/README.md +3 -1
- package/dist/constants/feature-flags.constants.d.ts +9 -0
- package/dist/constants/feature-flags.constants.js +86 -16
- package/dist/constants/marketCapabilities.constants.d.ts +14 -9
- package/dist/constants/marketCapabilities.constants.js +36 -13
- package/dist/constants/opra-compliance.constants.d.ts +15 -0
- package/dist/constants/opra-compliance.constants.js +15 -0
- package/dist/constants/option-venues.constants.d.ts +11 -6
- package/dist/constants/option-venues.constants.js +5 -2
- package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
- package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
- package/dist/constants/venue-presets.constants.d.ts +20 -20
- package/dist/constants/venue-presets.constants.js +24 -26
- package/dist/host-env.d.ts +39 -9
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +108 -18
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
- package/dist/interfaces/opra-realtime.interface.js +10 -10
- package/dist/interfaces/replay.interface.d.ts +8 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +52 -15
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +94 -14
- package/dist/kscript-data/controls/live-trades-merge.util.js +132 -22
- package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +56 -0
- package/dist/kscript-data/controls/live-trades-order-gate.util.js +107 -0
- package/dist/market-data/billing.interface.d.ts +227 -42
- package/dist/market-data/billing.interface.js +60 -12
- package/dist/market-data/venue.d.ts +88 -6
- package/dist/market-data/venues/cme.contract.copy.json +66 -0
- package/dist/market-data/venues/cme.d.ts +126 -0
- package/dist/market-data/venues/cme.js +133 -0
- package/dist/market-data/venues/index.d.ts +165 -8
- package/dist/market-data/venues/index.js +48 -6
- package/dist/market-data/venues/opra.contract.copy.json +5 -3
- package/dist/market-data/venues/opra.d.ts +3 -3
- package/dist/market-data/venues/opra.js +5 -4
- package/dist/replay/replayLadder.js +3 -1
- package/dist/settings-templates/index.js +7 -3
- package/dist/settings-templates/indicator-fields.d.ts +5 -4
- package/dist/settings-templates/indicator-fields.js +45 -6
- package/dist/settings-templates/tool-rules.d.ts +27 -17
- package/dist/settings-templates/tool-rules.js +27 -11
- package/dist/settings-templates/tool-tables.generated.js +91 -31
- package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
- package/dist/utility/chart/book-live-bucket.util.js +47 -0
- package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
- package/dist/utility/chart/crypto-index.leaf.js +2 -2
- package/dist/utility/chart/index-mode-admission.util.js +24 -3
- package/dist/utility/chart/index-mode.util.d.ts +5 -2
- package/dist/utility/chart/index-mode.util.js +23 -13
- package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
- package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +7 -2
- package/dist/utility/chart/kscript-live-coalesce.util.js +9 -3
- package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -27
- package/dist/utility/chart/kscript-venue-policy.util.js +74 -32
- package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
- package/dist/utility/chart/market-session-schedule.util.js +16 -0
- package/dist/utility/chart/marketKind.util.d.ts +12 -10
- package/dist/utility/chart/marketKind.util.js +17 -7
- package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
- package/dist/utility/chart/om-panel-push-style.util.js +17 -15
- package/dist/utility/chart/om-panel.util.js +6 -6
- package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
- package/dist/utility/chart/opra-read-access.leaf.js +5 -3
- package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
- package/dist/utility/chart/profile-block-size.util.js +7 -0
- package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
- package/dist/utility/chart/quote-perp.leaf.js +20 -0
- package/dist/utility/chart/rth-session.util.d.ts +3 -2
- package/dist/utility/chart/rth-session.util.js +2 -1
- package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
- package/dist/utility/chart/window-geometry.leaf.js +22 -6
- package/dist/utility/chart/wrun-run-result.util.d.ts +17 -0
- package/dist/utility/chart/wrun-run-result.util.js +145 -7
- package/dist/utility/common/transformations.util.d.ts +7 -0
- package/dist/utility/common/transformations.util.js +11 -0
- package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
- package/dist/utility/options/option-bar-anchor.util.js +340 -0
- package/dist/utility/options/option-venue.util.d.ts +21 -3
- package/dist/utility/options/option-venue.util.js +30 -3
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
- package/dist/utility/wrun/derived-roots.util.d.ts +213 -0
- package/dist/utility/wrun/derived-roots.util.js +471 -0
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +41 -6
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +5 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +6 -4
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
- package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
- package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
- package/dist/utility/wrun/sources/row-lane-registry.js +3 -2
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +15 -6
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +14 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +82 -13
- package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -8
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +95 -14
- package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +5 -2
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +7 -3
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +35 -14
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +70 -20
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +64 -0
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +89 -0
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +45 -1
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +114 -6
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +56 -5
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +224 -26
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +822 -58
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
- package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
- package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
- package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
- package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +192 -13
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +437 -55
- package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
- package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +15 -4
- package/dist/utility/wrun/wrun-color-settings.util.js +31 -12
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
- package/dist/utility/wrun/wrun-download-meter.util.d.ts +107 -0
- package/dist/utility/wrun/wrun-download-meter.util.js +134 -0
- package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
- package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-draft-overlay.util.js +23 -3
- package/dist/utility/wrun/wrun-frames.d.ts +27 -6
- package/dist/utility/wrun/wrun-frames.js +78 -15
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +7 -0
- package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
- package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +51 -21
- package/dist/utility/wrun/wrun-hud-looks.util.js +74 -28
- package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +19 -9
- package/dist/utility/wrun/wrun-live-intake.util.js +213 -45
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-live-tick.util.js +246 -49
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +205 -48
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +277 -34
- package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +51 -7
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +340 -56
- package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
- package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
- package/dist/utility/wrun/wrun-option-prints.util.d.ts +41 -2
- package/dist/utility/wrun/wrun-option-prints.util.js +80 -13
- package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
- package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +26 -6
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +50 -11
- package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +109 -19
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +222 -61
- package/dist/utility/wrun/wrun-option-views.util.d.ts +96 -18
- package/dist/utility/wrun/wrun-option-views.util.js +246 -51
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
- package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
- package/dist/utility/wrun/wrun-output-style.util.js +20 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +20 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +7 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +25 -1
- package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
- package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +134 -37
- package/dist/utility/wrun/wrun-overlay-run.util.js +1118 -254
- package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +4 -4
- package/dist/utility/wrun/wrun-pack-widths.leaf.js +4 -4
- package/dist/utility/wrun/wrun-pack.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-pack.util.js +20 -9
- package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-panel-mount.util.js +63 -13
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +37 -24
- package/dist/utility/wrun/wrun-panel-style.util.js +100 -29
- package/dist/utility/wrun/wrun-param-map.util.d.ts +15 -11
- package/dist/utility/wrun/wrun-param-map.util.js +13 -5
- package/dist/utility/wrun/wrun-param-values.util.d.ts +21 -3
- package/dist/utility/wrun/wrun-param-values.util.js +6 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
- package/dist/utility/wrun/wrun-refusal.util.js +10 -1
- package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
- package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-run-interval.util.js +9 -6
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +52 -1
- package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
- package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
- package/dist/utility/wrun/wrun-socket-row-source.js +113 -8
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +9 -1
- package/dist/utility/wrun/wrun-source-rows.util.js +108 -43
- package/dist/utility/wrun/wrun-style-words.util.js +6 -4
- package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
- package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-tape-per-order.util.js +26 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +126 -50
- package/dist/utility/wrun/wrun-tape-source.util.js +193 -68
- package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
- package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
- package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
- package/dist/utils/replay/replay-buffer-math.js +227 -20
- package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
- package/dist/workers/utils/volume-profile.worker.util.js +5 -2
- package/dist/workers/wrun/wrun-abi-host.js +3 -2
- package/package.json +5 -5
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
* out of the queue (the kScript fan-out's rule). The floor includes the large-print table's own
|
|
33
33
|
* (`tradesBelowLargeFloor`: a dollar-quoted print under 10,000 notional, a CME Group print under
|
|
34
34
|
* its root's contracts floor), so no print appears live that the next reconcile cannot answer. A
|
|
35
|
+
* tape judged per aggressor order (`wrunTapePerOrder`: a CME Group venue under the per-order
|
|
36
|
+
* switch) judges no single fill at the enqueue or the fold: its order gate
|
|
37
|
+
* (live-trades-order-gate.util) holds the forming order of its raw prints and queues every fill of an
|
|
38
|
+
* order at or above the acquisition's floor, the order the per-order reconcile answers, and turns an
|
|
39
|
+
* order below it away whole, so the package adds a big order's fills back into one trade (a floor per
|
|
40
|
+
* fill drew a 147-contract NQZ6 buy of 45 fills as its two 17-lot fills). A
|
|
35
41
|
* print the queue cap drops leaves its bar short: the
|
|
36
42
|
* drain marks the bucket for the reconcile (`tape-lost`) when the table can restore it, else the
|
|
37
43
|
* tick refuses the bucket by name (`tapeLostBuckets`);
|
|
@@ -44,9 +50,11 @@
|
|
|
44
50
|
* - funding: K_FUNDING_RATE (last-wins, normalized to 1h, percent);
|
|
45
51
|
* - volume_profile: K_VOLUME_PROFILE_AGG (delta fold on the lattice, needs a
|
|
46
52
|
* fetched base row, quote guard);
|
|
47
|
-
* - book: K_ORDERBOOK.buildLiveDataRows for raw frames
|
|
48
|
-
*
|
|
49
|
-
*
|
|
53
|
+
* - book: K_ORDERBOOK.buildLiveDataRows for raw frames, keyed on the chart
|
|
54
|
+
* market's bar (`bookLiveBucketMs`: an exact bar boundary belongs to the
|
|
55
|
+
* PREVIOUS bar, on the CME session lattice on a CME Group market); rows
|
|
56
|
+
* marked `bucketed: true` (the heatmap rider's projection, keyed by the same
|
|
57
|
+
* rule) are taken as-is;
|
|
50
58
|
* - a foreign GRID leg (a pinned market's rows at the chart interval, the
|
|
51
59
|
* G4 round-3 contract): K_OHLCV.mergeLiveDataPoint over that market's
|
|
52
60
|
* candle frames (`mergeLiveOhlcvDataPoint`: high/low widen, close
|
|
@@ -73,11 +81,15 @@ import { findMonday, getDecimalPlaces } from '../chart/titan-constants.pin.js';
|
|
|
73
81
|
import { Intervals } from '../../constants/interval.constants.js';
|
|
74
82
|
import { FUNDING_INTERVAL_MAP } from '../../constants/overlay-data.constants.js';
|
|
75
83
|
import { mergeLiveOhlcvDataPoint } from '../../kscript-data/controls/live-ohlcv-merge.util.js';
|
|
76
|
-
import { mergeLiveTradesDataPoint, readLiveTradePrint, tradesBarStartMs, tradesBelowLargeFloor, tradesLargeHistoryAnswers, } from '../../kscript-data/controls/live-trades-merge.util.js';
|
|
84
|
+
import { mergeLiveTradesDataPoint, readLiveTradePrint, tradesBarStartMs, tradesBelowLargeFloor, tradesLargeHistoryAnswers, tradesTapeCellSize, tradesTapeFloorValuesPrints, } from '../../kscript-data/controls/live-trades-merge.util.js';
|
|
77
85
|
import { liveAmountUsd, peekOptionTradeUnits } from '../options/option-trade-units.util.js';
|
|
78
86
|
import { parseWrunTapeHistory, wrunTapeHistoryOf } from './wrun-tape-source.util.js';
|
|
87
|
+
import { wrunTapePerOrder } from './wrun-tape-per-order.util.js';
|
|
88
|
+
import { TradesOrderGate } from '../../kscript-data/controls/live-trades-order-gate.util.js';
|
|
89
|
+
import { wrunDollarUnitReader } from './wrun-dollar-unit-port.leaf.js';
|
|
90
|
+
import { wrunChartHostEnv } from '../../host-env.js';
|
|
79
91
|
import { v2LiveTradePrintBelowFloor } from '../chart/kscript-live-coalesce.util.js';
|
|
80
|
-
import {
|
|
92
|
+
import { bookLiveBucketMs, bookLiveBucketRows } from '../chart/book-live-bucket.util.js';
|
|
81
93
|
import { liveFeedSeriesMatchesChartStream } from '../chart/live-feed-series-match.leaf.js';
|
|
82
94
|
import { liveBucketStartMs, liveBucketVenueOf } from '../chart/live-bucket.util.js';
|
|
83
95
|
import { hostBucketResolverFor } from '../chart/host-bar-placement.util.js';
|
|
@@ -199,8 +211,10 @@ function intakeFor(indicatorId, chartIndex, intervalMs, generation) {
|
|
|
199
211
|
function discardQueuesForGeneration(intake, generation) {
|
|
200
212
|
const pending = pendingCount(intake);
|
|
201
213
|
intake.additive = {};
|
|
202
|
-
// The fresh full run's fetch holds the prints the cap dropped: nothing is owed for them.
|
|
214
|
+
// The fresh full run's fetch holds the prints the cap dropped: nothing is owed for them, nor for an order still held.
|
|
203
215
|
intake.tapeLost = new Set();
|
|
216
|
+
intake.tapeGate?.dispose();
|
|
217
|
+
intake.tapeGate = undefined;
|
|
204
218
|
intake.bookLive = new Map();
|
|
205
219
|
intake.bookReplay = new Map();
|
|
206
220
|
intake.funding = new Map();
|
|
@@ -301,7 +315,8 @@ const WRUN_SESSION_LATTICE_LANES = new Set([
|
|
|
301
315
|
* open (a week bucket is its Monday, the main path's `findMonday`; a month,
|
|
302
316
|
* quarter, half or year bucket its UTC calendar boundary), except
|
|
303
317
|
* the book, whose snapshots are stamped at the observation and an exact
|
|
304
|
-
* boundary belongs to the PREVIOUS bar
|
|
318
|
+
* boundary belongs to the PREVIOUS bar, on the CME session lattice its
|
|
319
|
+
* history rides on a CME Group `market` (`bookLiveBucketMs`, the rule the
|
|
305
320
|
* K_ORDERBOOK lane and the rider projection apply), and a session-lattice
|
|
306
321
|
* lane on a `market`, which keys the bar its fetched rows have through the
|
|
307
322
|
* chart's one live boundary rule (`liveBucketStartMs`: the Chicago session
|
|
@@ -313,7 +328,7 @@ const WRUN_SESSION_LATTICE_LANES = new Set([
|
|
|
313
328
|
* market passes no venue, so nothing else starts anchoring. */
|
|
314
329
|
export function wrunLiveBucketTs(lane, tsMs, intervalMs, market) {
|
|
315
330
|
if (lane === 'book')
|
|
316
|
-
return
|
|
331
|
+
return bookLiveBucketMs(tsMs, intervalMs, bookVenueOf(market));
|
|
317
332
|
if (market && WRUN_SESSION_LATTICE_LANES.has(lane)) {
|
|
318
333
|
return liveBucketStartMs(tsMs, intervalMs, {
|
|
319
334
|
exchange: market.exchange,
|
|
@@ -623,34 +638,36 @@ export function foldWrunLegCandleRows(base, points, intervalMs, market) {
|
|
|
623
638
|
return null;
|
|
624
639
|
return foldResult(mergeLaneRows(base, replaced, added), touched);
|
|
625
640
|
}
|
|
626
|
-
/**
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
641
|
+
/** The venue a book row is keyed for: the lane's market (the chart's own), or none. */
|
|
642
|
+
function bookVenueOf(market) {
|
|
643
|
+
return market ? { exchange: market.exchange, symbol: market.symbol } : null;
|
|
644
|
+
}
|
|
645
|
+
/** K_ORDERBOOK.buildLiveDataRows over a raw frame: replay bursts key
|
|
646
|
+
* every row (copied), a live snapshot keys its one row (copied), each on
|
|
647
|
+
* `market`'s bar (`bookLiveBucketMs`: the session lattice on a CME Group
|
|
648
|
+
* market); a bucketed row (`ArrayLike<number>`) is taken as-is. Frames
|
|
649
|
+
* without a book payload yield nothing. */
|
|
650
|
+
export function wrunLiveBookRows(point, intervalMs, market) {
|
|
631
651
|
if (typeof point.length === 'number' && !isRecord(point.series)) {
|
|
632
652
|
const row = point;
|
|
633
653
|
return Number.isFinite(Number(row[0])) ? [row] : [];
|
|
634
654
|
}
|
|
635
655
|
const frame = point;
|
|
656
|
+
const venue = bookVenueOf(market);
|
|
636
657
|
if (frame.series?.isReplay) {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
copy[0] = roundObTimestamp(copy[0], intervalMs);
|
|
641
|
-
return copy;
|
|
642
|
-
});
|
|
643
|
-
return rows.filter((row) => row.length > 0).sort((a, b) => a[0] - b[0]);
|
|
658
|
+
return bookLiveBucketRows((frame.float64Arrays ?? []), intervalMs, venue)
|
|
659
|
+
.filter((row) => row.length > 0)
|
|
660
|
+
.sort((a, b) => a[0] - b[0]);
|
|
644
661
|
}
|
|
645
662
|
if (!frame.blockBookSnapshot)
|
|
646
663
|
return [];
|
|
647
664
|
const copy = Float64Array.from(frame.blockBookSnapshot);
|
|
648
665
|
if (copy.length === 0)
|
|
649
666
|
return [];
|
|
650
|
-
copy[0] =
|
|
667
|
+
copy[0] = bookLiveBucketMs(copy[0], intervalMs, venue);
|
|
651
668
|
return [copy];
|
|
652
669
|
}
|
|
653
|
-
function foldBook(base, points, intervalMs) {
|
|
670
|
+
function foldBook(base, points, intervalMs, market) {
|
|
654
671
|
const indexByTs = new Map();
|
|
655
672
|
for (let at = 0; at < base.length; at += 1)
|
|
656
673
|
indexByTs.set(Number(base[at][0]), at);
|
|
@@ -658,7 +675,7 @@ function foldBook(base, points, intervalMs) {
|
|
|
658
675
|
const added = new Map();
|
|
659
676
|
const touched = new Set();
|
|
660
677
|
for (const point of points) {
|
|
661
|
-
for (const row of wrunLiveBookRows(point, intervalMs)) {
|
|
678
|
+
for (const row of wrunLiveBookRows(point, intervalMs, market)) {
|
|
662
679
|
const bucket = Number(row[0]);
|
|
663
680
|
if (indexByTs.has(bucket))
|
|
664
681
|
replaced.set(bucket, row);
|
|
@@ -810,22 +827,24 @@ function foldVolumeProfile(base, points, intervalMs, acquisition, market) {
|
|
|
810
827
|
return foldResult(mergeLaneRows(base, replaced, added), touched);
|
|
811
828
|
}
|
|
812
829
|
/** The tape fold: K_TRADES's live fold per raw print (`mergeLiveTradesDataPoint`), each point onto
|
|
813
|
-
* the rows as folded so far, under the acquisition's `
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
*
|
|
819
|
-
*
|
|
830
|
+
* the rows as folded so far, under the acquisition's floor (`wrunTapeLiveFloorOf`: its `minSize`,
|
|
831
|
+
* or its dollar `minValue`, where each cell's size is the print's dollar value). The leaf answers a
|
|
832
|
+
* NEW container with the touched row new and every other row shared, or null for a rejected print
|
|
833
|
+
* (the rows stand); the touched bucket is the newest row (a fold never writes behind it). A bucket
|
|
834
|
+
* the fold capped (its newest 20k prints kept, the oldest dropped) is reported: its row is
|
|
835
|
+
* truncated, and a block is never truncated, so the tick refuses it by name where the kScript lane
|
|
836
|
+
* only warns. On the large lane the large-print table's floor applies too (`largeFloor`, the
|
|
837
|
+
* chart's market for a frame that names none). */
|
|
820
838
|
function foldTape(base, points, intervalMs, acquisition, market) {
|
|
821
839
|
let rows = base;
|
|
822
840
|
const touched = new Set();
|
|
823
841
|
const capped = new Set();
|
|
824
842
|
const largeFloor = acquisition.large === true ? largeFloorMarketOf(market ?? {}) : undefined;
|
|
843
|
+
const floor = wrunTapeLiveFloorOf(acquisition, market);
|
|
825
844
|
for (const point of points) {
|
|
826
845
|
let cappedNow = false;
|
|
827
846
|
const next = mergeLiveTradesDataPoint(rows, point, intervalMs, {
|
|
828
|
-
|
|
847
|
+
...floor,
|
|
829
848
|
largeFloor,
|
|
830
849
|
onCapped: () => {
|
|
831
850
|
cappedNow = true;
|
|
@@ -868,7 +887,7 @@ export function foldWrunLaneRows(lane, rows, points, intervalMs, acquisition, ma
|
|
|
868
887
|
case 'funding':
|
|
869
888
|
return foldFunding(base, points, intervalMs);
|
|
870
889
|
case 'book':
|
|
871
|
-
return foldBook(base, points, intervalMs);
|
|
890
|
+
return foldBook(base, points, intervalMs, market);
|
|
872
891
|
case 'volume_profile':
|
|
873
892
|
return foldVolumeProfile(base, points, intervalMs, acquisition, market);
|
|
874
893
|
case 'tape':
|
|
@@ -923,6 +942,125 @@ function largeFloorMarketOf(market) {
|
|
|
923
942
|
const optionUnits = peekOptionTradeUnits({ exchange, symbol });
|
|
924
943
|
return optionUnits ? { ...market, optionUnits } : market;
|
|
925
944
|
}
|
|
945
|
+
/** The market facts' dollar unit reader through its port (wrun-dollar-unit-port.leaf): live-feed loads this module
|
|
946
|
+
* before the first candle, and the facts module stays out of that closure. A dollar tape's full run loads the facts
|
|
947
|
+
* module before its live session starts, so the reader is bound by then; unbound, the module is loaded and the unit
|
|
948
|
+
* reads as not known yet. */
|
|
949
|
+
function wrunLiveDollarUnitReader() {
|
|
950
|
+
const reader = wrunDollarUnitReader();
|
|
951
|
+
if (reader === undefined)
|
|
952
|
+
void import('./wrun-chart-market-facts.util.js').catch(() => undefined);
|
|
953
|
+
return reader;
|
|
954
|
+
}
|
|
955
|
+
/** The dollar unit a dollar tape's live prints are priced with (C-DOLLAR) when its full run froze none: the market's
|
|
956
|
+
* dollar unit as the market facts prove it now (wrun-chart-market-facts.util `wrunMarketDollarUnit`, synchronous over
|
|
957
|
+
* the reads the run warmed), so a read that failed at the run (a directory row, the registry record) or a continuous
|
|
958
|
+
* chart's lead not known yet is resolved again on the session's own prints. A unit still unknown asks the reads
|
|
959
|
+
* again, never more often than their own retry windows allow; undefined until one answers. */
|
|
960
|
+
function wrunTapeLiveValuePerUnit(market) {
|
|
961
|
+
if (typeof market?.exchange !== 'string' || typeof market.symbol !== 'string')
|
|
962
|
+
return undefined;
|
|
963
|
+
const reader = wrunLiveDollarUnitReader();
|
|
964
|
+
if (reader === undefined)
|
|
965
|
+
return undefined;
|
|
966
|
+
const unit = reader.unit(market);
|
|
967
|
+
if (unit.kind === 'dollars')
|
|
968
|
+
return unit.unit;
|
|
969
|
+
if (unit.transient)
|
|
970
|
+
void reader.warm(market);
|
|
971
|
+
return undefined;
|
|
972
|
+
}
|
|
973
|
+
/** The floor the tape's live rules read (live-trades-merge `tradesTapeCellSize`, shared by the enqueue and the fold)
|
|
974
|
+
* off its acquisition, the K_TRADES payload the history fetch used: its `minSize`, or its dollar `minValue` with the
|
|
975
|
+
* market's `valuePerUnit` the full run priced (C-DOLLAR), else the one the market facts prove now
|
|
976
|
+
* (`wrunTapeLiveValuePerUnit`: never a transient unknown frozen for the session) and, on an option contract of a
|
|
977
|
+
* plain option venue, the registry trade units as answered (a dollar floor values an option print by its USD
|
|
978
|
+
* premium). On a tape whose live prints arrive judged per aggressor order (`wrunTapePerOrder`, the chart market's
|
|
979
|
+
* venue: the tape's frames are its market's) the floor is marked `perOrder`: the shared rules then judge no fill by
|
|
980
|
+
* it, nor by the large-print table's floor. */
|
|
981
|
+
function wrunTapeLiveFloorOf(acquisition, market) {
|
|
982
|
+
const perOrder = wrunTapePerOrder(market?.exchange) ? { perOrder: true } : {};
|
|
983
|
+
const floor = { minSize: acquisition?.minSize, ...perOrder };
|
|
984
|
+
if (acquisition?.minValue === undefined)
|
|
985
|
+
return floor;
|
|
986
|
+
const { exchange, symbol } = market ?? {};
|
|
987
|
+
const optionUnits = typeof exchange === 'string' && typeof symbol === 'string' ? peekOptionTradeUnits({ exchange, symbol }) : null;
|
|
988
|
+
const frozen = Number(acquisition.valuePerUnit);
|
|
989
|
+
const valuePerUnit = Number.isFinite(frozen) && frozen > 0 ? frozen : optionUnits ? undefined : wrunTapeLiveValuePerUnit(market);
|
|
990
|
+
const priced = { minValue: acquisition.minValue, valuePerUnit, ...perOrder };
|
|
991
|
+
return optionUnits ? { ...priced, optionUnits } : priced;
|
|
992
|
+
}
|
|
993
|
+
/** The dollar tapes the intake recorded as unable to value a live print (no `valuePerUnit` yet), by overlay, so the
|
|
994
|
+
* ring names each once (C-DOLLAR: such prints never fold). */
|
|
995
|
+
const wrunTapeUnvaluedNoted = new Set();
|
|
996
|
+
/** Note, once per overlay, a dollar tape whose live prints cannot be valued yet: they never fold (no guessed
|
|
997
|
+
* multiplier), their bars are owed a repair (`wrunTapePrintUnvalued`), and the history rows still carry the gateway's
|
|
998
|
+
* own dollar value. */
|
|
999
|
+
function noteWrunTapeUnvalued(indicatorId, context) {
|
|
1000
|
+
if (wrunTapeUnvaluedNoted.has(indicatorId))
|
|
1001
|
+
return;
|
|
1002
|
+
wrunTapeUnvaluedNoted.add(indicatorId);
|
|
1003
|
+
// Advisory: a host that binds no diagnostics port (a spec, a lean host) never fails the intake over a note.
|
|
1004
|
+
try {
|
|
1005
|
+
const diagnostics = wrunChartHostEnv().diagnostics;
|
|
1006
|
+
if (!diagnostics.debugEnabled())
|
|
1007
|
+
return;
|
|
1008
|
+
diagnostics.debug('wrun-tape-live-value-unproven', {
|
|
1009
|
+
indicatorId,
|
|
1010
|
+
market: context.marketIdentity ?? null,
|
|
1011
|
+
minValue: context.acquisition.tape?.minValue ?? null,
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
catch {
|
|
1015
|
+
// The verdict (`ignored:value-unproven`) still counts in the intake's stats.
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
/** A live print a dollar tape could not value (its unit not proven yet): it never folds, and its bar is owed the
|
|
1019
|
+
* print, exactly like a print the queue cap dropped (`pushAdditive`): the drain has the reconcile restore the bar
|
|
1020
|
+
* from the large-print table where it holds the market (`tape-lost`), else the tick refuses the bar by name
|
|
1021
|
+
* (`tapeLostBuckets`). A unit that no read can ever prove by now (a later answer: no point value, a quote that is no
|
|
1022
|
+
* dollar) values no print of the session again, so its bar is refused by name at once, never re-asked on every drain
|
|
1023
|
+
* (the Resume's full run then refuses the tape by name, `wrun_tape_value_unproven`). A block is never served short
|
|
1024
|
+
* of a print it should hold. */
|
|
1025
|
+
function wrunTapePrintUnvalued(intake, context, intervalMs, data) {
|
|
1026
|
+
if (!(intervalMs > 0))
|
|
1027
|
+
return;
|
|
1028
|
+
const print = readLiveTradePrint(data);
|
|
1029
|
+
if (print === null)
|
|
1030
|
+
return;
|
|
1031
|
+
const bucket = tradesBarStartMs(print.tsMs, intervalMs, print.exchange);
|
|
1032
|
+
const market = context.market;
|
|
1033
|
+
const unit = typeof market?.exchange === 'string' && typeof market.symbol === 'string'
|
|
1034
|
+
? wrunLiveDollarUnitReader()?.unit(market)
|
|
1035
|
+
: undefined;
|
|
1036
|
+
if (unit?.kind === 'unproven' && !unit.transient)
|
|
1037
|
+
(context.tapeLostBuckets ??= new Set()).add(bucket);
|
|
1038
|
+
else
|
|
1039
|
+
intake.tapeLost.add(bucket);
|
|
1040
|
+
}
|
|
1041
|
+
/** A per-order tape's order gate (live-trades-order-gate.util), made on the tape's first held print: an order at or
|
|
1042
|
+
* above the acquisition's floor queues every fill and wakes the drain (the hold timer judges an order with no frame
|
|
1043
|
+
* to arm one); an order below it is turned away whole, each fill counted `ignored:below-floor`. A gate whose intake
|
|
1044
|
+
* is gone (a teardown, a reset) queues nothing. */
|
|
1045
|
+
function wrunTapeOrderGateOf(intake, indicatorId) {
|
|
1046
|
+
if (intake.tapeGate !== undefined)
|
|
1047
|
+
return intake.tapeGate;
|
|
1048
|
+
const gate = new TradesOrderGate({
|
|
1049
|
+
admit: (points) => {
|
|
1050
|
+
if (intakes.get(indicatorId) !== intake || intake.tapeGate !== gate)
|
|
1051
|
+
return;
|
|
1052
|
+
for (const point of points)
|
|
1053
|
+
pushAdditive(intake, 'tape', point);
|
|
1054
|
+
drainRequester?.(indicatorId);
|
|
1055
|
+
},
|
|
1056
|
+
drop: (points) => {
|
|
1057
|
+
const ignored = intake.stats.ignored;
|
|
1058
|
+
ignored['ignored:below-floor'] = (ignored['ignored:below-floor'] ?? 0) + points.length;
|
|
1059
|
+
},
|
|
1060
|
+
});
|
|
1061
|
+
intake.tapeGate = gate;
|
|
1062
|
+
return gate;
|
|
1063
|
+
}
|
|
926
1064
|
/** The large-print table's floor at the tape enqueue (the fold applies it again): on the large
|
|
927
1065
|
* lane, a print under the table's floor (`tradesBelowLargeFloor`: a dollar-quoted market's notional,
|
|
928
1066
|
* a CME Group root's contracts, an option book's premium; the frame's envelope names the market,
|
|
@@ -934,9 +1072,11 @@ function wrunTapePrintBelowLargeFloor(context, data) {
|
|
|
934
1072
|
return (print !== null && tradesBelowLargeFloor(print, context.market ? largeFloorMarketOf(context.market) : undefined));
|
|
935
1073
|
}
|
|
936
1074
|
/** Whether a reconcile can restore the tape prints the queue cap dropped: the large lane with a
|
|
937
|
-
* history to re-ask (not the live edge, history "0") on a market the re-ask answers
|
|
938
|
-
* (`tradesLargeHistoryAnswers
|
|
939
|
-
* table
|
|
1075
|
+
* history to re-ask (not the live edge, history "0") on a market the re-ask answers under the
|
|
1076
|
+
* acquisition's floor (`tradesLargeHistoryAnswers`, the lane rule `tradesLaneLimits` the request
|
|
1077
|
+
* builder reads: the table on a dollar quote, the raw tape on a CME Group root the table skips under
|
|
1078
|
+
* a size floor and never under a dollar floor, which that lane serves no history to; a context that
|
|
1079
|
+
* names no normalized symbol is assumed held). */
|
|
940
1080
|
function wrunTapeLostRestorable(context) {
|
|
941
1081
|
const acquisition = context.acquisition.tape;
|
|
942
1082
|
if (acquisition?.large !== true)
|
|
@@ -949,7 +1089,7 @@ function wrunTapeLostRestorable(context) {
|
|
|
949
1089
|
catch {
|
|
950
1090
|
// The full run validated the history; a malformed record reads as the live edge.
|
|
951
1091
|
}
|
|
952
|
-
return historySec > 0 && tradesLargeHistoryAnswers(context.market ?? {});
|
|
1092
|
+
return historySec > 0 && tradesLargeHistoryAnswers(context.market ?? {}, { minValue: acquisition.minValue });
|
|
953
1093
|
}
|
|
954
1094
|
function pushAdditive(intake, lane, point) {
|
|
955
1095
|
let queue = intake.additive[lane];
|
|
@@ -1236,8 +1376,10 @@ export function enqueueWrunLiveFrame(a) {
|
|
|
1236
1376
|
else {
|
|
1237
1377
|
const replay = isRecord(data) && isRecord(data.series) && data.series.isReplay === true;
|
|
1238
1378
|
const slot = replay ? intake.bookReplay : intake.bookLive;
|
|
1239
|
-
|
|
1379
|
+
// Keyed on the chart market's bar, as the drain folds every lane (`chartMarketOf`).
|
|
1380
|
+
for (const row of wrunLiveBookRows(data, intervalMs, chartMarketOf(context))) {
|
|
1240
1381
|
slot.set(Number(row[0]), row);
|
|
1382
|
+
}
|
|
1241
1383
|
}
|
|
1242
1384
|
}
|
|
1243
1385
|
else if (lane === 'funding') {
|
|
@@ -1252,14 +1394,35 @@ export function enqueueWrunLiveFrame(a) {
|
|
|
1252
1394
|
// BTC floor on a perp) must never read as a dead feed. `ignored:below-floor` counts the turned
|
|
1253
1395
|
// away ones, `queued` what remains.
|
|
1254
1396
|
intake.stats.frames.tape = (intake.stats.frames.tape ?? 0) + 1;
|
|
1255
|
-
// The
|
|
1256
|
-
//
|
|
1257
|
-
//
|
|
1258
|
-
//
|
|
1259
|
-
//
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1397
|
+
// The tape's own floor (`tradesTapeCellSize`, the rule the fold applies again): a print below the
|
|
1398
|
+
// acquisition's minSize, or one whose dollar value is below its minValue, can never fold, so it
|
|
1399
|
+
// never takes a slot a qualifying print needs in the capped queue. A dollar tape that cannot value
|
|
1400
|
+
// a print at all (C-DOLLAR: no proven dollar unit) folds none, recorded once by name. The
|
|
1401
|
+
// large-print table's own floor too: a print under it (a dollar-quoted market's notional, a CME
|
|
1402
|
+
// Group root's contracts) would fold live and vanish when the next reconcile answers the bucket
|
|
1403
|
+
// from the table. A per-order tape (`floor.perOrder`) judges neither on one fill: its order gate does
|
|
1404
|
+
// (below), and the per-order reconcile answers every fill of an order the gate admits.
|
|
1405
|
+
const floor = wrunTapeLiveFloorOf(context.acquisition.tape, context.market);
|
|
1406
|
+
if (!tradesTapeFloorValuesPrints(floor)) {
|
|
1407
|
+
noteWrunTapeUnvalued(a.indicatorId, context);
|
|
1408
|
+
wrunTapePrintUnvalued(intake, context, intervalMs, a.frame.data);
|
|
1409
|
+
return noteVerdict(a.indicatorId, 'ignored:value-unproven', context);
|
|
1410
|
+
}
|
|
1411
|
+
// A frame the fold cannot read as a print (no side, a bad stamp) is judged by its raw amount under a
|
|
1412
|
+
// size floor, as it always was, and never folds under a dollar floor.
|
|
1413
|
+
const print = readLiveTradePrint(a.frame.data);
|
|
1414
|
+
// A per-order tape's print joins the forming order (the order gate, live-trades-order-gate.util): it takes a queue
|
|
1415
|
+
// slot only with every fill of an order at or above the floor, judged when the order ends or its hold runs out.
|
|
1416
|
+
if (floor.perOrder === true && print !== null) {
|
|
1417
|
+
wrunTapeOrderGateOf(intake, a.indicatorId).push(a.frame.data, print, floor);
|
|
1418
|
+
return 'held';
|
|
1419
|
+
}
|
|
1420
|
+
const minSize = Number(floor.minSize);
|
|
1421
|
+
const belowTapeFloor = print === null
|
|
1422
|
+
? floor.minValue !== undefined ||
|
|
1423
|
+
v2LiveTradePrintBelowFloor(a.frame.data, Number.isFinite(minSize) ? minSize : 0)
|
|
1424
|
+
: tradesTapeCellSize(print, floor) === null;
|
|
1425
|
+
if (belowTapeFloor || (floor.perOrder !== true && wrunTapePrintBelowLargeFloor(context, a.frame.data))) {
|
|
1263
1426
|
return noteVerdict(a.indicatorId, 'ignored:below-floor', context);
|
|
1264
1427
|
}
|
|
1265
1428
|
pushAdditive(intake, 'tape', a.frame.data);
|
|
@@ -1771,7 +1934,9 @@ export function takeWrunLiveGaps(indicatorId) {
|
|
|
1771
1934
|
/** Queues, gaps and stats of one overlay: registered on the drivers'
|
|
1772
1935
|
* teardown hook at import time. */
|
|
1773
1936
|
export function disposeWrunLiveIntake(indicatorId) {
|
|
1937
|
+
intakes.get(indicatorId)?.tapeGate?.dispose();
|
|
1774
1938
|
intakes.delete(indicatorId);
|
|
1939
|
+
wrunTapeUnvaluedNoted.delete(indicatorId);
|
|
1775
1940
|
}
|
|
1776
1941
|
/**
|
|
1777
1942
|
* The tick lane's accounting into the overlay's stats: computes carry the
|
|
@@ -2011,7 +2176,10 @@ export function wrunLiveContextSnapshot(indicatorId) {
|
|
|
2011
2176
|
};
|
|
2012
2177
|
}
|
|
2013
2178
|
export function __resetWrunLiveIntakeForTests() {
|
|
2179
|
+
for (const intake of intakes.values())
|
|
2180
|
+
intake.tapeGate?.dispose();
|
|
2014
2181
|
intakes.clear();
|
|
2182
|
+
wrunTapeUnvaluedNoted.clear();
|
|
2015
2183
|
drainRequester = null;
|
|
2016
2184
|
}
|
|
2017
2185
|
// Registered at import: a torn-down overlay's queues, gaps and stats go
|
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
* frame folded since the last one as one tail.
|
|
164
164
|
*/
|
|
165
165
|
import { type WrunPollLaneId } from './sources/wrun-poll-lane.types.js';
|
|
166
|
+
import { type WrunOpraServedReceipt } from './wrun-opra-lane.util.js';
|
|
166
167
|
import { type WrunOverlayLiveContext } from './wrun-overlay-drivers.util.js';
|
|
167
168
|
import { type WrunCellRows } from './wrun-canvases.util.js';
|
|
168
169
|
import { type WrunRunIntervalSession } from './wrun-run-interval-session.util.js';
|
|
@@ -286,6 +287,9 @@ export interface WrunSourceFedSession {
|
|
|
286
287
|
/** The run pass installed `context` for a session its row source feeds (above), with the verdict its batch carried
|
|
287
288
|
* and the pass's seams for the verdicts its frames carry (`session`; without one a frame publishes none). */
|
|
288
289
|
export declare function markWrunSourceFedLiveContext(context: WrunOverlayLiveContext, session?: WrunSourceFedSession): void;
|
|
290
|
+
/** A Cloud session's receipt from here on (`WrunOverlayLiveContext.cloudOpraServed`): the receipt an answer with the
|
|
291
|
+
* OPRA mark named for its rows, or none when it named no tier. */
|
|
292
|
+
export declare function noteWrunCloudOpraServed(context: WrunOverlayLiveContext, served: WrunOpraServedReceipt | undefined): void;
|
|
289
293
|
/** Whether a row source feeds `context` from elsewhere (its drain integrates the source's frames only). */
|
|
290
294
|
export declare function isWrunSourceFedLiveContext(context: WrunOverlayLiveContext | undefined): boolean;
|
|
291
295
|
/**
|