@orangecharts/wrun-chart-host 0.11.1 → 0.15.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 +1 -0
- package/dist/constants/feature-flags.constants.d.ts +4 -4
- package/dist/constants/feature-flags.constants.js +38 -52
- package/dist/constants/feature-limits.constants.d.ts +1 -1
- package/dist/constants/feature-limits.constants.js +5 -4
- package/dist/constants/interval.constants.d.ts +7 -0
- package/dist/constants/interval.constants.js +7 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +20 -149
- package/dist/constants/scriptEditor/cme-official-scripts.constants.js +20 -309
- package/dist/constants/stocks-compliance.constants.d.ts +15 -0
- package/dist/constants/stocks-compliance.constants.js +15 -0
- package/dist/host-env.d.ts +69 -3
- package/dist/host-env.js +21 -0
- package/dist/host-ports.types.d.ts +36 -3
- package/dist/index.d.ts +18 -0
- package/dist/index.js +19 -0
- package/dist/indicators/controls/tpo-session.util.d.ts +52 -12
- package/dist/indicators/controls/tpo-session.util.js +113 -16
- package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +6 -0
- package/dist/instances/script-engine-worker-ohlcv-transfer.js +16 -0
- package/dist/interfaces/cme-realtime.interface.d.ts +8 -0
- package/dist/interfaces/cme-realtime.interface.js +2 -1
- package/dist/interfaces/feed.interface.d.ts +15 -1
- package/dist/interfaces/replay.interface.d.ts +5 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +4 -3
- package/dist/interfaces/stocks-realtime.interface.js +5 -4
- package/dist/interfaces/wrun-runtime.interface.d.ts +141 -20
- package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +17 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.js +22 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +46 -40
- package/dist/kscript-data/controls/live-trades-merge.util.js +80 -107
- package/dist/market-data/billing.interface.d.ts +9 -1
- package/dist/market-data/venue.d.ts +1 -1
- package/dist/market-data/venues/index.d.ts +5 -5
- package/dist/market-data/venues/opra.js +3 -3
- package/dist/market-data/venues/stocks.contract.copy.json +6 -5
- package/dist/market-data/venues/stocks.d.ts +5 -5
- package/dist/market-data/venues/stocks.js +21 -18
- package/dist/settings-templates/frvp-fields.d.ts +12 -1
- package/dist/settings-templates/frvp-fields.js +15 -4
- package/dist/settings-templates/index.js +12 -5
- package/dist/settings-templates/indicator-fields.js +43 -2
- package/dist/settings-templates/tool-rules.d.ts +17 -8
- package/dist/settings-templates/tool-rules.js +15 -8
- package/dist/settings-templates/tool-tables.generated.js +4 -2
- package/dist/utility/auth/server-clock.util.d.ts +3 -1
- package/dist/utility/auth/server-clock.util.js +3 -1
- package/dist/utility/chart/book-live-bucket.util.js +2 -2
- package/dist/utility/chart/cache-alignment.util.d.ts +38 -7
- package/dist/utility/chart/cache-alignment.util.js +50 -13
- package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
- package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
- package/dist/utility/chart/cme-session-bucket.util.js +25 -332
- package/dist/utility/chart/continuous-contracts.util.js +6 -5
- package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
- package/dist/utility/chart/display-offset.leaf.js +41 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
- package/dist/utility/chart/effective-chart-session.util.js +13 -5
- package/dist/utility/chart/feed-interval.util.d.ts +6 -20
- package/dist/utility/chart/feed-interval.util.js +13 -22
- package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
- package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
- package/dist/utility/chart/footprint-band.util.d.ts +21 -5
- package/dist/utility/chart/footprint-band.util.js +53 -14
- package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
- package/dist/utility/chart/host-bar-placement.util.js +8 -2
- package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
- package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
- package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
- package/dist/utility/chart/indicator-run-interval.util.js +21 -12
- package/dist/utility/chart/interval-registry.util.d.ts +1 -1
- package/dist/utility/chart/interval-registry.util.js +1 -1
- package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
- package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
- package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
- package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
- package/dist/utility/chart/live-bucket.util.d.ts +39 -17
- package/dist/utility/chart/live-bucket.util.js +103 -57
- package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
- package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
- package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
- package/dist/utility/chart/market-session-schedule.util.js +39 -1
- package/dist/utility/chart/market-session.util.d.ts +136 -0
- package/dist/utility/chart/market-session.util.js +341 -0
- package/dist/utility/chart/om-panel.util.d.ts +5 -3
- package/dist/utility/chart/om-panel.util.js +42 -7
- package/dist/utility/chart/om-target.util.d.ts +14 -1
- package/dist/utility/chart/om-target.util.js +22 -5
- package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
- package/dist/utility/chart/opra-read-access.leaf.js +22 -0
- package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
- package/dist/utility/chart/profile-row-height.util.js +74 -37
- package/dist/utility/chart/rth-session.util.d.ts +55 -20
- package/dist/utility/chart/rth-session.util.js +94 -46
- package/dist/utility/chart/session-lattice.util.d.ts +150 -0
- package/dist/utility/chart/session-lattice.util.js +488 -0
- package/dist/utility/chart/trading-day.util.d.ts +40 -2
- package/dist/utility/chart/trading-day.util.js +84 -7
- package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
- package/dist/utility/chart/us-equities-session.util.js +44 -15
- package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
- package/dist/utility/chart/window-geometry.leaf.js +57 -8
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
- package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
- package/dist/utility/chart/wrun-run-result.util.d.ts +38 -13
- package/dist/utility/chart/wrun-run-result.util.js +97 -27
- package/dist/utility/common/time.util.js +5 -4
- package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
- package/dist/utility/market-events/earnings-scope.util.js +17 -9
- package/dist/utility/market-events/market-events.util.d.ts +14 -7
- package/dist/utility/market-events/market-events.util.js +30 -17
- package/dist/utility/number-format.util.d.ts +14 -21
- package/dist/utility/number-format.util.js +38 -24
- package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
- package/dist/utility/options/option-venue-disclosure.util.js +71 -11
- package/dist/utility/options/option-venue.util.d.ts +1 -1
- package/dist/utility/options/option-venue.util.js +1 -1
- package/dist/utility/pool-symbol.leaf.d.ts +7 -0
- package/dist/utility/pool-symbol.leaf.js +50 -5
- package/dist/utility/stocks/stock-display.util.d.ts +15 -0
- package/dist/utility/stocks/stock-display.util.js +37 -0
- package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
- package/dist/utility/v2/gate-plane.util.d.ts +6 -0
- package/dist/utility/v2/gate-plane.util.js +11 -1
- package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
- package/dist/utility/v2/gate-session-latch.util.js +3 -3
- package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
- package/dist/utility/v2/governed-tier.leaf.js +17 -16
- package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
- package/dist/utility/v2/stocks-governed.util.js +14 -0
- package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
- package/dist/utility/v2/v2-enums.leaf.js +458 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
- package/dist/utility/wrun/derived-roots.leaf.js +27 -1
- package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
- package/dist/utility/wrun/derived-roots.util.js +97 -56
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
- package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
- package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
- package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
- package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
- package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
- package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
- package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
- package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
- package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
- package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
- package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
- package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
- package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +46 -23
- package/dist/utility/wrun/wrun-batched-marks.util.js +260 -62
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
- package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
- package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
- package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-canvases.util.d.ts +24 -7
- package/dist/utility/wrun/wrun-canvases.util.js +99 -30
- package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
- package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
- package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
- package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
- package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
- package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
- package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
- package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
- package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
- package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
- package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
- package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
- package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
- package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
- package/dist/utility/wrun/wrun-host.service.js +137 -27
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
- package/dist/utility/wrun/wrun-hover.util.d.ts +8 -2
- package/dist/utility/wrun/wrun-hover.util.js +24 -13
- package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
- package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
- package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
- package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
- package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
- package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
- package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
- package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
- package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
- package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
- package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
- package/dist/utility/wrun/wrun-live-tick.util.js +655 -97
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
- package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
- package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
- package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-option-views.util.js +5 -2
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
- package/dist/utility/wrun/wrun-output-words.util.d.ts +14 -0
- package/dist/utility/wrun/wrun-output-words.util.js +51 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +116 -11
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +208 -43
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
- package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
- package/dist/utility/wrun/wrun-overlay-result.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +247 -26
- package/dist/utility/wrun/wrun-overlay-run.util.js +2234 -408
- package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +11 -2
- package/dist/utility/wrun/wrun-panel-mount.util.js +122 -19
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
- package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
- package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
- package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
- package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
- package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
- package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
- package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
- package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
- package/dist/utility/wrun/wrun-refusal.util.js +103 -16
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
- package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
- package/dist/utility/wrun/wrun-run-health.util.d.ts +95 -5
- package/dist/utility/wrun/wrun-run-health.util.js +209 -3
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
- package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
- package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +38 -11
- package/dist/utility/wrun/wrun-script-inputs.util.js +194 -56
- package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
- package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
- package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
- package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
- package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
- package/dist/utility/wrun/wrun-style-names.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-style-names.util.js +74 -0
- package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
- package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
- package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
- package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
- package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
- package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
- package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
- package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
- package/dist/utility/wrun/wrun-visibility-table.js +9 -0
- package/dist/utility/wrun/wrun-volume-profile.util.js +7 -3
- package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
- package/dist/utils/replay/replay-buffer-math.js +60 -30
- package/dist/workers/constants/socket-slots.d.ts +11 -7
- package/dist/workers/constants/socket-slots.js +6 -5
- package/package.json +5 -5
|
@@ -6,17 +6,22 @@
|
|
|
6
6
|
* - The rule (`planWrunPrefixLanes`): admitted with a window ask (the page is asked again under its own fetch key
|
|
7
7
|
* with the session's recorded acquisition): buy/sell volume (`trades`, `trades_usd`), open interest, funding,
|
|
8
8
|
* liquidations, trade volume by size and the bar-joined registry poll lanes (a relay `series` through its own
|
|
9
|
-
* fetch), each read per bar
|
|
9
|
+
* fetch), each read per bar, and a trades leg on another market that rides the chart's own grid
|
|
10
|
+
* (`wrunPrefixSameGridLeg`, WRUN-PANBACK C: asked through the whole run's own leg planner, wrun-trades-lane.util
|
|
11
|
+
* `planWrunTradeLegAsk`). Admitted with NO ask (the fill or an empty block on every page row, exactly as a whole
|
|
10
12
|
* run's older bars read them): the options chain (its live snapshot lands on the build's last row only), a
|
|
11
13
|
* live-edge tape (`history` "0"), an undemanded input and a lane the capability rule never dispatched
|
|
12
14
|
* (`unservedLanes`). The book keeps its own packed ask (`book-transport`, `book-missing`). Every other feed refuses
|
|
13
15
|
* by a named clause: a feed primary under carry (`primary-carry`), the volume profile (`vp`), the option summaries
|
|
14
|
-
* (`iv`), the daily-joined lanes (`daily`),
|
|
15
|
-
* lane (`degraded`), a tape with history (`tape-history`), ETF holdings (`carry-cache`: its worker carries
|
|
16
|
-
* requests), the options OI and options volume lanes (`worker-empty`: their workers answer a failed upstream
|
|
17
|
-
* empty page), any fetched lane on an index-mode chart (`index-mode`: the chart's fetch replaces an explicit
|
|
18
|
-
* with the chart's whole span there), and an options chain whose snapshot would land inside the window
|
|
19
|
-
* (`live-row`, judged against the planned window, `wrunPrefixLiveRowRefused`).
|
|
16
|
+
* (`iv`), the daily-joined lanes (`daily`), every other leg and odds (`legs`), the forming pre-roll (`preroll`), a
|
|
17
|
+
* degraded lane (`degraded`), a tape with history (`tape-history`), ETF holdings (`carry-cache`: its worker carries
|
|
18
|
+
* across requests), the options OI and options volume lanes (`worker-empty`: their workers answer a failed upstream
|
|
19
|
+
* as an empty page), any fetched lane on an index-mode chart (`index-mode`: the chart's fetch replaces an explicit
|
|
20
|
+
* window with the chart's whole span there), and an options chain whose snapshot would land inside the window
|
|
21
|
+
* (`live-row`, judged against the planned window, `wrunPrefixLiveRowRefused`). A lane pinned to another market (U9e,
|
|
22
|
+
* wrun-pinned-lanes.util: a book, oi, funding or liquidations input's own lane there) is asked again with the
|
|
23
|
+
* session's recorded acquisition, its market among it (`plan.pinned`), the book through the packed worker its whole
|
|
24
|
+
* run rode (`book-transport` otherwise).
|
|
20
25
|
* - The window split (`wrunPrefixWindowLanes`): each asked lane's page is `[fromMs, firstRowTs)` (the answer cut
|
|
21
26
|
* strictly before the session's first row: the transport pads its inclusive end); the overlap
|
|
22
27
|
* `[firstRowTs, toMs]` takes the session's OWN rows, so the guest computes the overlap on the very row objects
|
|
@@ -24,7 +29,9 @@
|
|
|
24
29
|
* identity first. A live-edge tape takes the session's own rows over the overlap too (live prints exact-join).
|
|
25
30
|
* - The splice (`wrunPrefixLaneSplice`, `applyWrunPrefixLaneSplice`): every asked lane's buffer becomes the page
|
|
26
31
|
* then the session's rows from its first row on, decided at the commit before anything applies, all or none; the
|
|
27
|
-
* commit then starts the session's lanes (`lanesFromTs`) at the page's first bar, the certified start.
|
|
32
|
+
* commit then starts the session's lanes (`lanesFromTs`) at the page's first bar, the certified start. An asked
|
|
33
|
+
* trades leg's buffer is `tradeLegRows[lane]`; the interval its rows ride (`tradeLegIntervals`, read off the
|
|
34
|
+
* session's acquisition) is the chart's and stays as it is.
|
|
28
35
|
* - The revisions (`noteWrunLaneRevision`, `wrunPrefixOverlapUnproven`): a live reconcile that replaces a buffer row
|
|
29
36
|
* with another value (exactly: its tolerated float noise included) records the span, until a reseed computes the
|
|
30
37
|
* session's outputs whole again. An overlap such a span reaches rests on values the mounted outputs never read, so
|
|
@@ -35,11 +42,12 @@
|
|
|
35
42
|
*/
|
|
36
43
|
import { checkIsIndexMode } from '../chart/index-mode.util.js';
|
|
37
44
|
import { wrunInputReadsChartFeed } from './wrun-bar-count.util.js';
|
|
38
|
-
import { wrunSourceLane } from './wrun-source-rows.util.js';
|
|
45
|
+
import { wrunSourceLane, wrunTradeLegIntervals } from './wrun-source-rows.util.js';
|
|
39
46
|
import { wrunPollLaneByKey, wrunPollLanesOfClass } from './sources/registry.js';
|
|
40
47
|
import { isWrunPollLaneId } from './sources/wrun-poll-lane.types.js';
|
|
41
48
|
import { parseWrunTapeHistory, wrunTapeAcquisitionFloor, wrunTapeFloorSettings, wrunTapeHistoryOf, } from './wrun-tape-source.util.js';
|
|
42
|
-
import { isWrunTradesLegLane } from './wrun-trades-lane.util.js';
|
|
49
|
+
import { isWrunTradesLegLane, planWrunTradeLegAsk } from './wrun-trades-lane.util.js';
|
|
50
|
+
import { isWrunPinnedLaneId, wrunPinnedLaneOf } from './wrun-pinned-lanes.util.js';
|
|
43
51
|
import { isWrunLegStreamClass } from './wrun-leg-stream-classes.js';
|
|
44
52
|
/** Each asked lane: the fetch type the full run rode, the fetch-key suffix of the page's ask
|
|
45
53
|
* (`<fetchKey>-prefix-<suffix>`, the full run's own suffix) and the buffer the session holds it in. */
|
|
@@ -103,6 +111,29 @@ function wrunPrefixPrimaryCarries(input, entry) {
|
|
|
103
111
|
return false;
|
|
104
112
|
return entry.missing !== 'nan' && entry.missing !== 'zero';
|
|
105
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Whether a trades leg on another market rides the chart's own grid, so a page asks it again exactly as the whole run
|
|
116
|
+
* asked it (WRUN-PANBACK C): the session's chart is known and not index mode (there every leg rides the native-rows
|
|
117
|
+
* path, and the chart's fetch replaces an explicit window with the chart's whole span), the whole run's planner asks
|
|
118
|
+
* the leg plainly on that chart (`planWrunTradeLegAsk`: no tier, so a 24/7 market whose rows open on the chart's bars),
|
|
119
|
+
* and the session holds the leg's rows from a plain ask at the chart's interval (`tradeLegRows`; its acquisition names
|
|
120
|
+
* no native-rows path, and `tradeLegIntervals`, read off it as the row builder reads it, is the interval the chart's
|
|
121
|
+
* fetch stamped on the whole run's ask).
|
|
122
|
+
*/
|
|
123
|
+
function wrunPrefixSameGridLeg(context, lane) {
|
|
124
|
+
const exchange = context.market?.exchange;
|
|
125
|
+
if (typeof exchange !== 'string' || exchange === '' || checkIsIndexMode(exchange))
|
|
126
|
+
return false;
|
|
127
|
+
const ask = planWrunTradeLegAsk(lane, { intervalMs: context.intervalMs, venue: context.market }, { fromMs: context.firstRowTs, toMs: context.lastRowTs });
|
|
128
|
+
if (ask === undefined || ask.tier !== null)
|
|
129
|
+
return false;
|
|
130
|
+
const acquisition = context.acquisition[lane];
|
|
131
|
+
if (acquisition === undefined || acquisition.nativeRows === true)
|
|
132
|
+
return false;
|
|
133
|
+
if (context.tradeLegRows?.[lane] === undefined)
|
|
134
|
+
return false;
|
|
135
|
+
return wrunTradeLegIntervals(context.acquisition)[lane] === context.intervalMs;
|
|
136
|
+
}
|
|
106
137
|
/** A poll lane instance's clause, or null when its page is asked (a bar join no rule above refuses). */
|
|
107
138
|
function wrunPrefixPollClause(instance) {
|
|
108
139
|
const lane = wrunPollLaneByKey(instance.laneKey);
|
|
@@ -117,7 +148,8 @@ function wrunPrefixPollClause(instance) {
|
|
|
117
148
|
return WRUN_PREFIX_POLL_REFUSALS[lane.sourceClass] ?? null;
|
|
118
149
|
}
|
|
119
150
|
/**
|
|
120
|
-
* The lanes rule (C1 v3, widened for the per-bar stamp and the roster 2026-10-14
|
|
151
|
+
* The lanes rule (C1 v3, widened for the per-bar stamp and the roster 2026-10-14, for the trades legs on the chart's
|
|
152
|
+
* own grid by WRUN-PANBACK C): the clause that refuses
|
|
121
153
|
* (`WrunPrefixLaneClause`), or what a page asks again. Inputs first, in declaration order (the first refusal wins),
|
|
122
154
|
* then the session's legs, pre-roll and degraded lanes, then every lane the session fetched (its acquisition record)
|
|
123
155
|
* and every poll lane instance, the index-mode chart, last a book input with no book lane. An exact warm-up session
|
|
@@ -147,16 +179,41 @@ export function planWrunPrefixLanes(context) {
|
|
|
147
179
|
// The chart's candles; a leg on them (a market or an interval of its own) is judged with the legs below.
|
|
148
180
|
continue;
|
|
149
181
|
case 'book':
|
|
150
|
-
readsBook = true;
|
|
151
|
-
continue;
|
|
152
|
-
case 'trades':
|
|
153
182
|
case 'oi':
|
|
154
183
|
case 'funding':
|
|
155
184
|
case 'liquidations':
|
|
185
|
+
case 'trades':
|
|
156
186
|
case 'trade_volume_by_size': {
|
|
157
|
-
// A
|
|
158
|
-
|
|
159
|
-
|
|
187
|
+
// A book, oi, funding or liquidations input pinned to another market reads its own lane there (U9e): asked
|
|
188
|
+
// again when the session holds its acquisition (the acquisition loop below plans it), read empty when the
|
|
189
|
+
// capability rule never dispatched it.
|
|
190
|
+
const pinnedLane = wrunSourceLane(entry);
|
|
191
|
+
if (isWrunPinnedLaneId(pinnedLane)) {
|
|
192
|
+
if (context.acquisition[pinnedLane] === undefined) {
|
|
193
|
+
if (!wrunPrefixUnserved(context, pinnedLane)) {
|
|
194
|
+
return refused(entry.source === 'book' ? 'book-missing' : entry.source);
|
|
195
|
+
}
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
if (wrunPrefixPrimaryCarries(input, entry))
|
|
199
|
+
return refused('primary-carry');
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (entry.source === 'book') {
|
|
203
|
+
readsBook = true;
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
// A trades input on another market reads its leg lane there (kit 0.77.0): asked again when it rides the chart's
|
|
207
|
+
// own grid (`wrunPrefixSameGridLeg`, the acquisition loop below plans it), else a leg no page asks.
|
|
208
|
+
const legLane = wrunSourceLane(entry);
|
|
209
|
+
if (isWrunTradesLegLane(legLane)) {
|
|
210
|
+
if (!wrunPrefixSameGridLeg(context, legLane))
|
|
211
|
+
return refused('legs');
|
|
212
|
+
// A primary under carry, as below: same-grid admission never replaces it.
|
|
213
|
+
if (wrunPrefixPrimaryCarries(input, entry))
|
|
214
|
+
return refused('primary-carry');
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
160
217
|
const lane = wrunSourceLane(entry);
|
|
161
218
|
// Asked when the session fetched it (the acquisition loop below), read empty when the capability rule never
|
|
162
219
|
// dispatched it, and otherwise a lane the session should hold and does not.
|
|
@@ -222,12 +279,25 @@ export function planWrunPrefixLanes(context) {
|
|
|
222
279
|
return refused('preroll');
|
|
223
280
|
if ((context.degradedLanes?.size ?? 0) > 0)
|
|
224
281
|
return refused('degraded');
|
|
225
|
-
const plan = { builtin: [], poll: [] };
|
|
282
|
+
const plan = { builtin: [], legs: [], pinned: [], poll: [] };
|
|
226
283
|
for (const [lane, acquisition] of Object.entries(context.acquisition)) {
|
|
227
284
|
if (acquisition === undefined || isWrunPollLaneId(lane))
|
|
228
285
|
continue;
|
|
229
|
-
if (isWrunTradesLegLane(lane))
|
|
230
|
-
|
|
286
|
+
if (isWrunTradesLegLane(lane)) {
|
|
287
|
+
if (!wrunPrefixSameGridLeg(context, lane))
|
|
288
|
+
return refused('legs');
|
|
289
|
+
plan.legs.push(lane);
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
if (isWrunPinnedLaneId(lane)) {
|
|
293
|
+
// A pinned lane (U9e) is asked again on its market with its recorded acquisition; a book only on the packed
|
|
294
|
+
// worker its whole run rode, as the chart's own book.
|
|
295
|
+
const packed = acquisition.preferPackedOrderbookWorker === true;
|
|
296
|
+
if (wrunPinnedLaneOf(lane)?.cls === 'book' && !packed)
|
|
297
|
+
return refused('book-transport');
|
|
298
|
+
plan.pinned.push(lane);
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
231
301
|
switch (lane) {
|
|
232
302
|
case 'book':
|
|
233
303
|
if (acquisition.preferPackedOrderbookWorker !== true) {
|
|
@@ -272,7 +342,11 @@ export function planWrunPrefixLanes(context) {
|
|
|
272
342
|
if (isWrunPollLaneId(lane) && !pollLanes.some((instance) => instance.key === lane))
|
|
273
343
|
return refused('poll');
|
|
274
344
|
}
|
|
275
|
-
const fetchesLanes = plan.builtin.length > 0 ||
|
|
345
|
+
const fetchesLanes = plan.builtin.length > 0 ||
|
|
346
|
+
plan.legs.length > 0 ||
|
|
347
|
+
plan.pinned.length > 0 ||
|
|
348
|
+
plan.poll.length > 0 ||
|
|
349
|
+
context.acquisition.book !== undefined;
|
|
276
350
|
if (fetchesLanes && checkIsIndexMode(context.market?.exchange))
|
|
277
351
|
return refused('index-mode');
|
|
278
352
|
if (readsBook && context.acquisition.book === undefined && !wrunPrefixUnserved(context, 'book')) {
|
|
@@ -312,9 +386,11 @@ function wrunRowsInside(rows, fromTs, toTs) {
|
|
|
312
386
|
* build hands them. An asked lane: its page, then the session's own rows over the overlap `[firstRowTs, toMs]` (the
|
|
313
387
|
* very objects the session holds). The tape (a live edge): the session's own rows over the overlap, none before (a
|
|
314
388
|
* live-edge tape serves no history). Every other lane the session holds: empty (the options chain, a lane the
|
|
315
|
-
* capability rule never dispatched); a lane it never held stays absent.
|
|
389
|
+
* capability rule never dispatched); a lane it never held stays absent. An asked trades leg: its page, then the
|
|
390
|
+
* session's own rows over the overlap, with the interval each leg's rows ride (`tradeLegIntervals`, the session's
|
|
391
|
+
* acquisition, as the whole run's and the reseed's builds read it). The tape's floor settings and the poll lane
|
|
316
392
|
* instances ride along. Beside it the window's lane evidence (the proof's prefix side, `wrunPrefixHeldLanes` the
|
|
317
|
-
* mounted side): every asked lane and the tape.
|
|
393
|
+
* mounted side): every asked lane, every asked leg and the tape.
|
|
318
394
|
*/
|
|
319
395
|
export function wrunPrefixWindowLanes(context, plan, pages, firstRowTs, toMs) {
|
|
320
396
|
const sourceRows = {};
|
|
@@ -335,6 +411,27 @@ export function wrunPrefixWindowLanes(context, plan, pages, firstRowTs, toMs) {
|
|
|
335
411
|
sourceRows[field] = rows;
|
|
336
412
|
lanes.push({ lane, rows });
|
|
337
413
|
}
|
|
414
|
+
if (context.tradeLegRows !== undefined) {
|
|
415
|
+
const tradeLegRows = {};
|
|
416
|
+
for (const lane of plan.legs) {
|
|
417
|
+
const rows = windowOf(pages.get(lane), context.tradeLegRows[lane] ?? []);
|
|
418
|
+
tradeLegRows[lane] = rows;
|
|
419
|
+
lanes.push({ lane, rows });
|
|
420
|
+
}
|
|
421
|
+
sourceRows.tradeLegRows = tradeLegRows;
|
|
422
|
+
sourceRows.tradeLegIntervals = wrunTradeLegIntervals(context.acquisition);
|
|
423
|
+
}
|
|
424
|
+
if (context.pinnedLaneRows !== undefined) {
|
|
425
|
+
// An asked pinned lane (U9e): its page, then the session's own rows over the overlap; a lane the capability rule
|
|
426
|
+
// never dispatched holds none, as the session's does.
|
|
427
|
+
const pinnedLaneRows = {};
|
|
428
|
+
for (const lane of plan.pinned) {
|
|
429
|
+
const rows = windowOf(pages.get(lane), context.pinnedLaneRows[lane] ?? []);
|
|
430
|
+
pinnedLaneRows[lane] = rows;
|
|
431
|
+
lanes.push({ lane, rows });
|
|
432
|
+
}
|
|
433
|
+
sourceRows.pinnedLaneRows = pinnedLaneRows;
|
|
434
|
+
}
|
|
338
435
|
for (const field of WRUN_PREFIX_NO_ASK_ROWS) {
|
|
339
436
|
if (context[field] !== undefined)
|
|
340
437
|
sourceRows[field] = [];
|
|
@@ -367,6 +464,10 @@ export function wrunPrefixHeldLanes(context, plan) {
|
|
|
367
464
|
lane,
|
|
368
465
|
rows: (context[WRUN_PREFIX_ASK_LANES[lane].rows] ?? []),
|
|
369
466
|
}));
|
|
467
|
+
for (const lane of plan.legs)
|
|
468
|
+
lanes.push({ lane, rows: context.tradeLegRows?.[lane] ?? [] });
|
|
469
|
+
for (const lane of plan.pinned)
|
|
470
|
+
lanes.push({ lane, rows: context.pinnedLaneRows?.[lane] ?? [] });
|
|
370
471
|
if (context.tapeRows !== undefined)
|
|
371
472
|
lanes.push({ lane: 'tape', rows: context.tapeRows });
|
|
372
473
|
for (const instance of plan.poll)
|
|
@@ -385,7 +486,7 @@ export function wrunPrefixLaneSplice(context, plan, pages, firstRowTs) {
|
|
|
385
486
|
...(pages.get(lane) ?? []),
|
|
386
487
|
...held.filter((row) => Number(row[0]) >= firstRowTs),
|
|
387
488
|
];
|
|
388
|
-
const splice = { builtin: [], poll: {} };
|
|
489
|
+
const splice = { builtin: [], legs: {}, pinned: {}, poll: {} };
|
|
389
490
|
for (const lane of plan.builtin) {
|
|
390
491
|
const field = WRUN_PREFIX_ASK_LANES[lane].rows;
|
|
391
492
|
const held = context[field];
|
|
@@ -393,6 +494,18 @@ export function wrunPrefixLaneSplice(context, plan, pages, firstRowTs) {
|
|
|
393
494
|
return null;
|
|
394
495
|
splice.builtin.push([field, spliced(held, lane)]);
|
|
395
496
|
}
|
|
497
|
+
for (const lane of plan.legs) {
|
|
498
|
+
const held = context.tradeLegRows?.[lane];
|
|
499
|
+
if (held === undefined)
|
|
500
|
+
return null;
|
|
501
|
+
splice.legs[lane] = spliced(held, lane);
|
|
502
|
+
}
|
|
503
|
+
for (const lane of plan.pinned) {
|
|
504
|
+
const held = context.pinnedLaneRows?.[lane];
|
|
505
|
+
if (held === undefined)
|
|
506
|
+
return null;
|
|
507
|
+
splice.pinned[lane] = spliced(held, lane);
|
|
508
|
+
}
|
|
396
509
|
for (const instance of plan.poll) {
|
|
397
510
|
const held = context.pollLaneRows?.[instance.key];
|
|
398
511
|
if (held === undefined)
|
|
@@ -401,11 +514,17 @@ export function wrunPrefixLaneSplice(context, plan, pages, firstRowTs) {
|
|
|
401
514
|
}
|
|
402
515
|
return splice;
|
|
403
516
|
}
|
|
404
|
-
/** Write a splice onto its session (synchronous; a poll instance's buffers as a new record, the
|
|
405
|
-
* builder read the context's own). */
|
|
517
|
+
/** Write a splice onto its session (synchronous; a trades leg's and a poll instance's buffers as a new record, the
|
|
518
|
+
* reseed and the tail builder read the context's own; the legs' intervals ride the acquisition, untouched). */
|
|
406
519
|
export function applyWrunPrefixLaneSplice(context, splice) {
|
|
407
520
|
for (const [field, rows] of splice.builtin)
|
|
408
521
|
context[field] = rows;
|
|
522
|
+
if (Object.keys(splice.legs).length > 0) {
|
|
523
|
+
context.tradeLegRows = { ...context.tradeLegRows, ...splice.legs };
|
|
524
|
+
}
|
|
525
|
+
if (Object.keys(splice.pinned).length > 0) {
|
|
526
|
+
context.pinnedLaneRows = { ...context.pinnedLaneRows, ...splice.pinned };
|
|
527
|
+
}
|
|
409
528
|
if (Object.keys(splice.poll).length > 0) {
|
|
410
529
|
context.pollLaneRows = { ...context.pollLaneRows, ...splice.poll };
|
|
411
530
|
}
|
|
@@ -20,6 +20,14 @@
|
|
|
20
20
|
* rows in the span. An empty overlap proves nothing and is refused.
|
|
21
21
|
* - Values compare with `Object.is` (NaN equals NaN, -0 differs from 0), every column of every candle, book and
|
|
22
22
|
* child row (its timestamp included), every output of every row.
|
|
23
|
+
* - One exception, a converging warm-up session's (STAMPS round A, `outputTolerance`): its row `outputs` values
|
|
24
|
+
* compare within its tolerance (`wrunConvergedEqual`: `|a - b| <= tol * max(1, |a|, |b|)`, a non-finite value as a
|
|
25
|
+
* pattern), its selector columns exactly (an output any `*_by` or `*_where` field, a renderer's `where` gate, an
|
|
26
|
+
* output's `badges` or a hover block's `output` names, and a barcolor output: wrun-declared-warmup.util
|
|
27
|
+
* `wrunHistoryStampExactColumns`).
|
|
28
|
+
* Timestamps, strings, candles, the book, lanes, children, handles and the run-level snapshots below compare exactly
|
|
29
|
+
* whatever the tolerance: a converging session lands no drawing in round A (its admission refuses one), and every
|
|
30
|
+
* other field is an input or a discrete choice, never a level a recursion converges on.
|
|
23
31
|
* - Row states never equal one another: a missing row, `outputs: null`, an all-NaN outputs array, an absent strings
|
|
24
32
|
* array (`strings` undefined or null), a null string and an empty string. Inside a strings array, undefined reads
|
|
25
33
|
* as null (both spell an absent slot: the host's unpacked rows use undefined, this contract null).
|
|
@@ -193,6 +201,23 @@ type Failure = {
|
|
|
193
201
|
firstMismatchTs: number | null;
|
|
194
202
|
detail: string | null;
|
|
195
203
|
};
|
|
204
|
+
/**
|
|
205
|
+
* Whether two output values agree (STAMPS round A, the converging warm-up stamp's tolerance): with no tolerance (`tol`
|
|
206
|
+
* not a finite number above 0) exactly `Object.is` (NaN equals NaN, -0 differs from 0), the rule every value of every
|
|
207
|
+
* other session compares by; with one, a non-finite value on either side still compares as a pattern (`Object.is`:
|
|
208
|
+
* the same NaN or infinity on both sides, else a mismatch, an infinity against a finite value included), and two
|
|
209
|
+
* finite values agree when `|a - b| <= tol * max(1, |a|, |b|)` (relative, with an absolute floor at magnitudes below
|
|
210
|
+
* 1: the gate's own rule), so -0 and 0 agree there. Pure.
|
|
211
|
+
*/
|
|
212
|
+
export declare function wrunConvergedEqual(a: number, b: number, tol: number | undefined): boolean;
|
|
213
|
+
/** A converging warm-up session's tolerance for the row `outputs` values (STAMPS round A): every output column
|
|
214
|
+
* compares within `tolerance` (`wrunConvergedEqual`) but the `exactColumns` (the selector columns: an output any
|
|
215
|
+
* `*_by` or `*_where` field, a `where` gate, `badges` or a hover block's `output` names, and a barcolor output,
|
|
216
|
+
* wrun-declared-warmup.util `wrunHistoryStampExactColumns`), which compare exactly. */
|
|
217
|
+
export interface WrunPrefixOutputTolerance {
|
|
218
|
+
tolerance: number;
|
|
219
|
+
exactColumns: ReadonlySet<number>;
|
|
220
|
+
}
|
|
196
221
|
/**
|
|
197
222
|
* Whether the prefix run's evidence equals the mounted evidence over the overlap: ok, or the first mismatch with its
|
|
198
223
|
* kind, its earliest timestamp and a plain-words detail. Validation only; the roster admits (see the module note).
|
|
@@ -203,6 +228,10 @@ export declare function proveWrunPrefixOverlap(input: {
|
|
|
203
228
|
mounted: WrunPrefixEvidence;
|
|
204
229
|
/** The candle evidence (D2): checked first when given; absent keeps the overlap check alone. */
|
|
205
230
|
candleEvidence?: WrunCandleEvidenceInput;
|
|
231
|
+
/** A converging warm-up session's tolerance (STAMPS round A), read by the row `outputs` values alone; absent, every
|
|
232
|
+
* value compares exactly. Timestamps, strings, candles, the book, lanes, children and handles compare exactly
|
|
233
|
+
* whatever it says. */
|
|
234
|
+
outputTolerance?: WrunPrefixOutputTolerance;
|
|
206
235
|
}): {
|
|
207
236
|
ok: true;
|
|
208
237
|
} | {
|
|
@@ -258,7 +258,22 @@ function lanesByName(lanes) {
|
|
|
258
258
|
}
|
|
259
259
|
return byName;
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
/**
|
|
262
|
+
* Whether two output values agree (STAMPS round A, the converging warm-up stamp's tolerance): with no tolerance (`tol`
|
|
263
|
+
* not a finite number above 0) exactly `Object.is` (NaN equals NaN, -0 differs from 0), the rule every value of every
|
|
264
|
+
* other session compares by; with one, a non-finite value on either side still compares as a pattern (`Object.is`:
|
|
265
|
+
* the same NaN or infinity on both sides, else a mismatch, an infinity against a finite value included), and two
|
|
266
|
+
* finite values agree when `|a - b| <= tol * max(1, |a|, |b|)` (relative, with an absolute floor at magnitudes below
|
|
267
|
+
* 1: the gate's own rule), so -0 and 0 agree there. Pure.
|
|
268
|
+
*/
|
|
269
|
+
export function wrunConvergedEqual(a, b, tol) {
|
|
270
|
+
if (tol === undefined || !Number.isFinite(tol) || !(tol > 0))
|
|
271
|
+
return Object.is(a, b);
|
|
272
|
+
if (!Number.isFinite(a) || !Number.isFinite(b))
|
|
273
|
+
return Object.is(a, b);
|
|
274
|
+
return Math.abs(a - b) <= tol * Math.max(1, Math.abs(a), Math.abs(b));
|
|
275
|
+
}
|
|
276
|
+
function outputsDifference(a, b, tolerance) {
|
|
262
277
|
if (a === null || b === null) {
|
|
263
278
|
if (a === b)
|
|
264
279
|
return null;
|
|
@@ -267,8 +282,10 @@ function outputsDifference(a, b) {
|
|
|
267
282
|
if (a.length !== b.length)
|
|
268
283
|
return `${a.length} outputs on the prefix side, ${b.length} on the mounted side`;
|
|
269
284
|
for (let index = 0; index < a.length; index += 1) {
|
|
270
|
-
|
|
271
|
-
|
|
285
|
+
const tol = tolerance !== undefined && !tolerance.exactColumns.has(index) ? tolerance.tolerance : undefined;
|
|
286
|
+
if (!wrunConvergedEqual(a[index], b[index], tol)) {
|
|
287
|
+
const beyond = tol !== undefined ? ` (beyond the tolerance ${show(tol)})` : '';
|
|
288
|
+
return `output ${index}: ${show(a[index])} on the prefix side, ${show(b[index])} on the mounted side${beyond}`;
|
|
272
289
|
}
|
|
273
290
|
}
|
|
274
291
|
return null;
|
|
@@ -471,12 +488,13 @@ export function proveWrunPrefixOverlap(input) {
|
|
|
471
488
|
return fail('lane', lane.prefix[at].ts, `${lane.label}: ${difference}`);
|
|
472
489
|
}
|
|
473
490
|
}
|
|
474
|
-
// 3. Outputs, row by row: the outputs,
|
|
491
|
+
// 3. Outputs, row by row: the outputs (within a converging session's tolerance, its selector columns exactly), then
|
|
492
|
+
// the strings (exactly).
|
|
475
493
|
for (let at = 0; at < rows.prefix.length; at += 1) {
|
|
476
494
|
const ts = rows.prefix[at].ts;
|
|
477
495
|
const a = rows.prefix[at].item;
|
|
478
496
|
const b = rows.mounted[at].item;
|
|
479
|
-
const outputs = outputsDifference(a.outputs, b.outputs);
|
|
497
|
+
const outputs = outputsDifference(a.outputs, b.outputs, input.outputTolerance);
|
|
480
498
|
if (outputs !== null)
|
|
481
499
|
return fail('output', ts, outputs);
|
|
482
500
|
const strings = stringsDifference(a.strings, b.strings);
|
|
@@ -54,6 +54,12 @@ export declare function resolveWrunRefusalTarget(t: WrunRefusalOverlayTarget): W
|
|
|
54
54
|
export declare function wrunRefusalTargetSettings(t: WrunRefusalOverlayTarget): Record<string, unknown> | undefined;
|
|
55
55
|
export declare function emitWrunRefusalChange(chartIndex: number): void;
|
|
56
56
|
export declare function onWrunRefusalChange(fn: (chartIndex: number) => void): () => void;
|
|
57
|
+
/** The overlay's standing run record (a full run's verdict, shown or outranked by a tick's), or undefined: what the
|
|
58
|
+
* CME late re-judgment reads to rerun a run a closed gate refused a pin (cme-user-scripts-rejudge.util). */
|
|
59
|
+
export declare function wrunStandingRefusalOf(target: WrunRefusalOverlayTarget): WrunRefusal | undefined;
|
|
60
|
+
/** The record the overlay's verdicts show (the higher of run and tick), or undefined: the store derives the legend
|
|
61
|
+
* slot's chip from it beside its rows (`legendChipOutranksRefusal`). */
|
|
62
|
+
export declare function wrunShownRefusalOf(target: WrunRefusalOverlayTarget): WrunRefusal | undefined;
|
|
57
63
|
/**
|
|
58
64
|
* Project a record for its owner: the legend (the higher of the overlay's run and tick verdicts),
|
|
59
65
|
* the change event, and a toast when `notify` is true AND the record is paused. `isCurrent` and the
|
|
@@ -77,7 +83,9 @@ export declare function projectWrunRefusal(target: WrunRefusalOverlayTarget, r:
|
|
|
77
83
|
*/
|
|
78
84
|
export declare function wrunRefusedLatestSnapshotOf(r: WrunRefusal, tc?: WrunChartHandle | null): WrunLatestSnapshot;
|
|
79
85
|
export declare function wrunRefusalRetractionCount(target: WrunRefusalOverlayTarget): number;
|
|
80
|
-
export declare function retractWrunRefusal(target: WrunRefusalOverlayTarget, owner: 'run' | 'tick' | 'all'
|
|
86
|
+
export declare function retractWrunRefusal(target: WrunRefusalOverlayTarget, owner: 'run' | 'tick' | 'all', options?: {
|
|
87
|
+
isCurrent?: () => boolean;
|
|
88
|
+
}): Promise<void>;
|
|
81
89
|
/**
|
|
82
90
|
* The origin of an executor request's attempt: `user` for the requests a person made (retry, a
|
|
83
91
|
* settings save), `system` for everything the chart starts on its own (resume, the range and
|
|
@@ -81,6 +81,17 @@ const verdicts = new Map();
|
|
|
81
81
|
function overlayKey(t) {
|
|
82
82
|
return `${t.chartIndex}:${t.indicatorId}`;
|
|
83
83
|
}
|
|
84
|
+
/** The overlay's standing run record (a full run's verdict, shown or outranked by a tick's), or undefined: what the
|
|
85
|
+
* CME late re-judgment reads to rerun a run a closed gate refused a pin (cme-user-scripts-rejudge.util). */
|
|
86
|
+
export function wrunStandingRefusalOf(target) {
|
|
87
|
+
return verdicts.get(overlayKey(target))?.run;
|
|
88
|
+
}
|
|
89
|
+
/** The record the overlay's verdicts show (the higher of run and tick), or undefined: the store derives the legend
|
|
90
|
+
* slot's chip from it beside its rows (`legendChipOutranksRefusal`). */
|
|
91
|
+
export function wrunShownRefusalOf(target) {
|
|
92
|
+
const owned = verdicts.get(overlayKey(target));
|
|
93
|
+
return owned === undefined ? undefined : topVerdict(owned)?.refusal;
|
|
94
|
+
}
|
|
84
95
|
function topVerdict(owned) {
|
|
85
96
|
const { run, tick } = owned;
|
|
86
97
|
if (run && tick) {
|
|
@@ -308,13 +319,16 @@ const retractions = new Map();
|
|
|
308
319
|
export function wrunRefusalRetractionCount(target) {
|
|
309
320
|
return retractions.get(overlayKey(resolveWrunRefusalTarget(target) ?? target)) ?? 0;
|
|
310
321
|
}
|
|
311
|
-
export async function retractWrunRefusal(target, owner) {
|
|
322
|
+
export async function retractWrunRefusal(target, owner, options = {}) {
|
|
312
323
|
try {
|
|
313
324
|
await ensureWrunRefusalChartSide();
|
|
314
325
|
}
|
|
315
326
|
catch {
|
|
316
327
|
return;
|
|
317
328
|
}
|
|
329
|
+
// The owner, judged after the wait: a same-id remount meanwhile keeps its own verdicts.
|
|
330
|
+
if (options.isCurrent?.() === false)
|
|
331
|
+
return;
|
|
318
332
|
const resolved = resolveWrunRefusalTarget(target) ?? target;
|
|
319
333
|
const key = overlayKey(resolved);
|
|
320
334
|
retractions.set(key, (retractions.get(key) ?? 0) + 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type GateProvider } from '../../workers/constants/socket-slots.js';
|
|
2
2
|
import { type WrunFailureBaseCause, type WrunFailureCause } from './wrun-failure-cause.js';
|
|
3
3
|
import { WRUN_KIT_REFUSAL_STAGES, wrunKitRefusalStageOf, type WrunFrameRefusal, type WrunKitRefusalStage } from './wrun-hosted-wire-caps.js';
|
|
4
4
|
export type WrunRefusalClass = 'legs-empty' | 'feed-missing' | 'no-options' | 'coin-outside-feed' | 'interval-unserved' | 'service-no-answer' | 'waiting' | 'cme-wall' | 'pin-refused' | 'index-unserved' | 'too-big' | 'live-stopped' | 'not-reached' | 'nothing-ready' | 'slots' | 'not-added' | 'run-failed' | 'options-stopped';
|
|
@@ -70,6 +70,20 @@ export type WrunRefusalOut = {
|
|
|
70
70
|
| {
|
|
71
71
|
kind: 'take-session';
|
|
72
72
|
plane: WrunRefusalGatePlane;
|
|
73
|
+
}
|
|
74
|
+
/** A paid feed this viewer has not bought (`cme-wall` `feed-paid`): the in-app checkout of its listing (`package`). */
|
|
75
|
+
| {
|
|
76
|
+
kind: 'subscribe';
|
|
77
|
+
package: string;
|
|
78
|
+
}
|
|
79
|
+
/** A CME pin the viewer's CME data terms keep closed (`pin-refused` `terms`): the terms door, re-judgment armed. */
|
|
80
|
+
| {
|
|
81
|
+
kind: 'accept-cme-terms';
|
|
82
|
+
}
|
|
83
|
+
/** A tape lane on Price only (`feed-missing` `price-only`): the chart's switch to Trades, the Live price wall's ways
|
|
84
|
+
* out (Back to Trades, Get real-time on the card). */
|
|
85
|
+
| {
|
|
86
|
+
kind: 'switch-to-trades';
|
|
73
87
|
};
|
|
74
88
|
export interface WrunRefusalMarket {
|
|
75
89
|
exchange: string;
|
|
@@ -179,6 +193,8 @@ export interface WrunAddGateRefusal {
|
|
|
179
193
|
scope: 'chart' | 'layout';
|
|
180
194
|
chartIndex: number;
|
|
181
195
|
};
|
|
196
|
+
/** The market a `cme-venue` refusal walled (any gate plane): its plane picks the record's row. */
|
|
197
|
+
exchange?: string;
|
|
182
198
|
}
|
|
183
199
|
/** Every class, in the C2 precedence order (paused before note decides first). */
|
|
184
200
|
export declare const WRUN_REFUSAL_CLASSES: readonly WrunRefusalClass[];
|
|
@@ -215,6 +231,8 @@ export declare function wrunOptionsStopSeed(reason: WrunOptionsStopReason, opts?
|
|
|
215
231
|
severity?: 'note' | 'paused';
|
|
216
232
|
plane?: WrunRefusalGatePlane;
|
|
217
233
|
}): WrunRefusalSeed;
|
|
234
|
+
/** The ONE seed of a venue wall, by the plane of the market it refused (`cmeRow` read on CME alone); none off a plane. */
|
|
235
|
+
export declare function wrunVenueWallSeed(venue: unknown, cmeRow?: string): WrunRefusalSeed | undefined;
|
|
218
236
|
/** The variants of a class, in C2 order (the spec walks every one). */
|
|
219
237
|
export declare function wrunRefusalVariants(cls: WrunRefusalClass): string[];
|
|
220
238
|
/** Equal records give equal strings: a fixed key order, the params sorted by key, the telemetry last (the join
|