@orangecharts/wrun-chart-host 0.4.0 → 0.5.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 +15 -4
- package/dist/constants/exchange-names.leaf.d.ts +8 -0
- package/dist/constants/exchange-names.leaf.js +101 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.d.ts +15 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.js +40 -0
- package/dist/constants/opra-compliance.constants.d.ts +19 -0
- package/dist/constants/opra-compliance.constants.js +19 -0
- package/dist/constants/replay-ladder.leaf.d.ts +30 -0
- package/dist/constants/replay-ladder.leaf.js +99 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +168 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.js +398 -0
- package/dist/constants/scriptEditor/converted-script-id.leaf.d.ts +8 -0
- package/dist/constants/scriptEditor/converted-script-id.leaf.js +10 -0
- package/dist/constants/scriptEditor/execution.constants.d.ts +4 -0
- package/dist/constants/scriptEditor/execution.constants.js +14 -0
- package/dist/constants/wrun-prefix-safe.constants.d.ts +23 -0
- package/dist/constants/wrun-prefix-safe.constants.js +26 -0
- package/dist/host-env.d.ts +313 -18
- package/dist/host-env.js +15 -0
- package/dist/host-ports.types.d.ts +853 -16
- package/dist/index.d.ts +139 -2
- package/dist/index.js +139 -2
- package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +31 -0
- package/dist/instances/script-engine-worker-ohlcv-transfer.js +164 -0
- package/dist/interfaces/market-event.interface.d.ts +231 -0
- package/dist/interfaces/market-event.interface.js +15 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +70 -134
- package/dist/interfaces/opra-realtime.interface.js +34 -59
- package/dist/interfaces/replay.interface.d.ts +285 -0
- package/dist/interfaces/replay.interface.js +1 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +1 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.js +93 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +5 -1
- package/dist/kscript-data/controls/live-trades-merge.util.js +2 -2
- package/dist/market-data/billing.interface.d.ts +219 -0
- package/dist/market-data/billing.interface.js +58 -0
- package/dist/market-data/venue-governed.util.d.ts +2 -0
- package/dist/market-data/venue-governed.util.js +10 -0
- package/dist/market-data/venue.d.ts +122 -0
- package/dist/market-data/venue.js +1 -0
- package/dist/market-data/venues/index.d.ts +97 -0
- package/dist/market-data/venues/index.js +33 -0
- package/dist/market-data/venues/opra.contract.copy.json +35 -0
- package/dist/market-data/venues/opra.d.ts +70 -0
- package/dist/market-data/venues/opra.js +74 -0
- package/dist/replay/replayIndicatorRows.d.ts +31 -0
- package/dist/replay/replayIndicatorRows.js +117 -0
- package/dist/replay/replayLadder.d.ts +85 -0
- package/dist/replay/replayLadder.js +388 -0
- package/dist/utility/auth/server-clock.util.d.ts +81 -0
- package/dist/utility/auth/server-clock.util.js +238 -0
- package/dist/utility/chart/builtin-identity.util.d.ts +18 -0
- package/dist/utility/chart/builtin-identity.util.js +51 -0
- package/dist/utility/chart/cache-alignment.util.d.ts +454 -0
- package/dist/utility/chart/cache-alignment.util.js +926 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +15 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.js +22 -0
- package/dist/utility/chart/chart-mount-epoch.util.d.ts +5 -0
- package/dist/utility/chart/chart-mount-epoch.util.js +29 -0
- package/dist/utility/chart/chart-time-domain.util.d.ts +12 -0
- package/dist/utility/chart/chart-time-domain.util.js +23 -0
- package/dist/utility/chart/color-customization.leaf.d.ts +10 -0
- package/dist/utility/chart/color-customization.leaf.js +16 -0
- package/dist/utility/chart/footprint-tick-grid.util.d.ts +106 -0
- package/dist/utility/chart/footprint-tick-grid.util.js +167 -0
- package/dist/utility/chart/gesture-timing.leaf.d.ts +29 -0
- package/dist/utility/chart/gesture-timing.leaf.js +29 -0
- package/dist/utility/chart/governed-contract-coin.util.d.ts +22 -0
- package/dist/utility/chart/governed-contract-coin.util.js +39 -0
- package/dist/utility/chart/host-bar-placement.util.d.ts +107 -0
- package/dist/utility/chart/host-bar-placement.util.js +447 -0
- package/dist/utility/chart/index-host-tier.util.d.ts +31 -0
- package/dist/utility/chart/index-host-tier.util.js +118 -0
- package/dist/utility/chart/index-mode-admission.util.d.ts +34 -0
- package/dist/utility/chart/index-mode-admission.util.js +67 -0
- package/dist/utility/chart/indicator-error-message.util.d.ts +35 -0
- package/dist/utility/chart/indicator-error-message.util.js +44 -0
- package/dist/utility/chart/kscript-apply-fingerprint.util.d.ts +65 -0
- package/dist/utility/chart/kscript-apply-fingerprint.util.js +357 -0
- package/dist/utility/chart/kscript-chart-flush.leaf.d.ts +22 -0
- package/dist/utility/chart/kscript-chart-flush.leaf.js +13 -0
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +6 -0
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +27 -0
- package/dist/utility/chart/kscript-integration-decision.leaf.d.ts +89 -0
- package/dist/utility/chart/kscript-integration-decision.leaf.js +80 -0
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +76 -0
- package/dist/utility/chart/kscript-live-coalesce.util.js +156 -0
- package/dist/utility/chart/kscript-live-rest-pace.util.d.ts +34 -0
- package/dist/utility/chart/kscript-live-rest-pace.util.js +134 -0
- package/dist/utility/chart/kscript-live-source-identity.util.d.ts +98 -0
- package/dist/utility/chart/kscript-live-source-identity.util.js +121 -0
- package/dist/utility/chart/kscript-mounted-plot-set.leaf.d.ts +48 -0
- package/dist/utility/chart/kscript-mounted-plot-set.leaf.js +145 -0
- package/dist/utility/chart/kscript-perf-tracker.util.d.ts +243 -0
- package/dist/utility/chart/kscript-perf-tracker.util.js +522 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +43 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.js +471 -0
- package/dist/utility/chart/kscript-run-result-equality.util.d.ts +38 -0
- package/dist/utility/chart/kscript-run-result-equality.util.js +89 -0
- package/dist/utility/chart/kscript-settings-revision.leaf.d.ts +2 -0
- package/dist/utility/chart/kscript-settings-revision.leaf.js +12 -0
- package/dist/utility/chart/kscript-source-degrade.leaf.d.ts +63 -0
- package/dist/utility/chart/kscript-source-degrade.leaf.js +68 -0
- package/dist/utility/chart/kscript-source-retention.util.d.ts +134 -0
- package/dist/utility/chart/kscript-source-retention.util.js +218 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +57 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.js +61 -0
- package/dist/utility/chart/kscript-titancharts-preparation.util.d.ts +15 -0
- package/dist/utility/chart/kscript-titancharts-preparation.util.js +376 -0
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +9 -0
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +130 -0
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +217 -0
- package/dist/utility/chart/kscript-venue-policy.util.js +324 -0
- package/dist/utility/chart/live-cadence.util.d.ts +38 -0
- package/dist/utility/chart/live-cadence.util.js +37 -0
- package/dist/utility/chart/live-feed-series-match.leaf.d.ts +13 -0
- package/dist/utility/chart/live-feed-series-match.leaf.js +21 -0
- package/dist/utility/chart/local-engine-self-heal-backoff.util.d.ts +46 -0
- package/dist/utility/chart/local-engine-self-heal-backoff.util.js +46 -0
- package/dist/utility/chart/local-engine-uninit.leaf.d.ts +21 -0
- package/dist/utility/chart/local-engine-uninit.leaf.js +22 -0
- package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +62 -0
- package/dist/utility/chart/local-kscript-source-revalidation.util.js +123 -0
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +214 -0
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +376 -0
- package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.d.ts +85 -0
- package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.js +197 -0
- package/dist/utility/chart/local-technical-script-range.leaf.d.ts +72 -0
- package/dist/utility/chart/local-technical-script-range.leaf.js +126 -0
- package/dist/utility/chart/mixed-mode.util.d.ts +167 -0
- package/dist/utility/chart/mixed-mode.util.js +139 -0
- package/dist/utility/chart/ohlcv-row-readiness.util.d.ts +36 -0
- package/dist/utility/chart/ohlcv-row-readiness.util.js +90 -0
- package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +19 -0
- package/dist/utility/chart/opra-user-scripts-gate.util.js +32 -0
- package/dist/utility/chart/overlay-execution-guard-key.leaf.d.ts +8 -0
- package/dist/utility/chart/overlay-execution-guard-key.leaf.js +10 -0
- package/dist/utility/chart/price-precision.util.d.ts +40 -0
- package/dist/utility/chart/price-precision.util.js +70 -0
- package/dist/utility/chart/profile-block-size.util.d.ts +64 -0
- package/dist/utility/chart/profile-block-size.util.js +141 -0
- package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.d.ts +11 -0
- package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.js +29 -0
- package/dist/utility/chart/protected-kscript-empty-output.util.d.ts +28 -0
- package/dist/utility/chart/protected-kscript-empty-output.util.js +84 -0
- package/dist/utility/chart/run-interval-unservable.leaf.d.ts +9 -0
- package/dist/utility/chart/run-interval-unservable.leaf.js +20 -0
- package/dist/utility/chart/run-interval-warmup.leaf.d.ts +19 -0
- package/dist/utility/chart/run-interval-warmup.leaf.js +35 -0
- package/dist/utility/chart/titan-constants.pin.d.ts +9 -5
- package/dist/utility/chart/titan-constants.pin.js +18 -5
- package/dist/utility/chart/warmup-backfill-retry.leaf.d.ts +9 -0
- package/dist/utility/chart/warmup-backfill-retry.leaf.js +9 -0
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +11 -2
- package/dist/utility/chart/wrun-bar-session-facts.util.js +10 -3
- package/dist/utility/chart/wrun-run-result.util.d.ts +5 -1
- package/dist/utility/chart/wrun-run-result.util.js +20 -14
- package/dist/utility/common/data-processing.util.d.ts +138 -0
- package/dist/utility/common/data-processing.util.js +346 -0
- package/dist/utility/common/visible-timeout.util.d.ts +13 -4
- package/dist/utility/common/visible-timeout.util.js +23 -8
- package/dist/utility/exchange-format.leaf.d.ts +1 -0
- package/dist/utility/exchange-format.leaf.js +47 -0
- package/dist/utility/market-events/earnings-scope.util.d.ts +60 -0
- package/dist/utility/market-events/earnings-scope.util.js +92 -0
- package/dist/utility/market-events/market-events.util.d.ts +147 -0
- package/dist/utility/market-events/market-events.util.js +392 -0
- package/dist/utility/market-events/zoned-clock.util.d.ts +1 -0
- package/dist/utility/market-events/zoned-clock.util.js +11 -0
- package/dist/utility/options/option-venue-disclosure.util.d.ts +43 -0
- package/dist/utility/options/option-venue-disclosure.util.js +56 -0
- package/dist/utility/scriptEditor/package-semver.util.d.ts +51 -0
- package/dist/utility/scriptEditor/package-semver.util.js +120 -0
- package/dist/utility/scriptEditor/temp-script-id.util.d.ts +18 -0
- package/dist/utility/scriptEditor/temp-script-id.util.js +25 -0
- package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.d.ts +20 -0
- package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.js +81 -0
- package/dist/utility/v2/governed-tier.leaf.d.ts +103 -0
- package/dist/utility/v2/governed-tier.leaf.js +113 -0
- package/dist/utility/watchlist/import/import-request.leaf.d.ts +10 -0
- package/dist/utility/watchlist/import/import-request.leaf.js +10 -0
- package/dist/utility/wrun/sources/lanes/series.js +2 -2
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +4 -4
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +5 -6
- package/dist/utility/wrun/wrun-alert-outputs.registry.d.ts +166 -0
- package/dist/utility/wrun/wrun-alert-outputs.registry.js +219 -0
- package/dist/utility/wrun/wrun-bar-count.util.d.ts +83 -0
- package/dist/utility/wrun/wrun-bar-count.util.js +259 -0
- package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-chart-context-names.util.js +186 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +253 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +731 -0
- package/dist/utility/wrun/wrun-cloud-opra-stamp.util.d.ts +28 -0
- package/dist/utility/wrun/wrun-cloud-opra-stamp.util.js +45 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.d.ts +18 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +47 -0
- package/dist/utility/wrun/wrun-deadline.util.js +2 -1
- package/dist/utility/wrun/wrun-debug-output.util.d.ts +39 -0
- package/dist/utility/wrun/wrun-debug-output.util.js +63 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +113 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.js +181 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +43 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +158 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +181 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.js +357 -0
- package/dist/utility/wrun/wrun-draw-skipped.leaf.d.ts +16 -0
- package/dist/utility/wrun/wrun-draw-skipped.leaf.js +16 -0
- package/dist/utility/wrun/wrun-earnings-facts.util.d.ts +42 -0
- package/dist/utility/wrun/wrun-earnings-facts.util.js +131 -0
- package/dist/utility/wrun/wrun-first-run-depth.util.d.ts +32 -0
- package/dist/utility/wrun/wrun-first-run-depth.util.js +118 -0
- package/dist/utility/wrun/wrun-gate-plane-readers.util.d.ts +24 -0
- package/dist/utility/wrun/wrun-gate-plane-readers.util.js +31 -0
- package/dist/utility/wrun/wrun-held-lanes.util.d.ts +32 -0
- package/dist/utility/wrun/wrun-held-lanes.util.js +94 -0
- package/dist/utility/wrun/wrun-host-visible-clock.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-host-visible-clock.util.js +17 -0
- package/dist/utility/wrun/wrun-host.service.d.ts +266 -0
- package/dist/utility/wrun/wrun-host.service.js +655 -0
- package/dist/utility/wrun/wrun-inert-legend.util.d.ts +33 -0
- package/dist/utility/wrun/wrun-inert-legend.util.js +125 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +155 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +450 -0
- package/dist/utility/wrun/wrun-integration-route.util.d.ts +51 -0
- package/dist/utility/wrun/wrun-integration-route.util.js +59 -0
- package/dist/utility/wrun/wrun-latest-history.leaf.d.ts +8 -0
- package/dist/utility/wrun/wrun-latest-history.leaf.js +8 -0
- package/dist/utility/wrun/wrun-legend-hover.lazy.d.ts +12 -0
- package/dist/utility/wrun/wrun-legend-hover.lazy.js +96 -0
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +21 -0
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +21 -0
- package/dist/utility/wrun/wrun-live-hidden-hold.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-live-hidden-hold.util.js +13 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +374 -0
- package/dist/utility/wrun/wrun-live-intake.util.js +2027 -0
- package/dist/utility/wrun/wrun-live-patch.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-live-patch.util.js +523 -0
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +619 -0
- package/dist/utility/wrun/wrun-live-tick.util.js +4974 -0
- package/dist/utility/wrun/wrun-loading-owner.util.d.ts +58 -0
- package/dist/utility/wrun/wrun-loading-owner.util.js +89 -0
- package/dist/utility/wrun/wrun-official-scope.leaf.d.ts +29 -0
- package/dist/utility/wrun/wrun-official-scope.leaf.js +36 -0
- package/dist/utility/wrun/wrun-oi-lane.util.d.ts +27 -0
- package/dist/utility/wrun/wrun-oi-lane.util.js +42 -0
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-options-stop.util.js +123 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +719 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +1180 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +50 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +131 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +118 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +466 -0
- package/dist/utility/wrun/wrun-overlay-metadata.util.d.ts +45 -0
- package/dist/utility/wrun/wrun-overlay-metadata.util.js +112 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +114 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +971 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +858 -0
- package/dist/utility/wrun/wrun-overlay-run.util.js +11013 -0
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +24 -9
- package/dist/utility/wrun/wrun-panel-mount.util.js +138 -43
- package/dist/utility/wrun/wrun-param-map.util.d.ts +19 -4
- package/dist/utility/wrun/wrun-param-map.util.js +40 -47
- package/dist/utility/wrun/wrun-param-values.util.d.ts +9 -3
- package/dist/utility/wrun/wrun-param-values.util.js +5 -5
- package/dist/utility/wrun/wrun-prefix-cohort.util.d.ts +93 -0
- package/dist/utility/wrun/wrun-prefix-cohort.util.js +484 -0
- package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +114 -0
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +486 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +317 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.js +630 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +73 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.js +380 -0
- package/dist/utility/wrun/wrun-refusal-text.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-refusal-text.util.js +40 -0
- package/dist/utility/wrun/wrun-replay-lane.util.d.ts +139 -0
- package/dist/utility/wrun/wrun-replay-lane.util.js +520 -0
- package/dist/utility/wrun/wrun-replay-rows.util.d.ts +21 -0
- package/dist/utility/wrun/wrun-replay-rows.util.js +172 -0
- package/dist/utility/wrun/wrun-row-source-factory.d.ts +53 -0
- package/dist/utility/wrun/wrun-row-source-factory.js +435 -0
- package/dist/utility/wrun/wrun-run-cells.util.d.ts +36 -0
- package/dist/utility/wrun/wrun-run-cells.util.js +46 -0
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +133 -0
- package/dist/utility/wrun/wrun-run-interval-session.util.js +121 -0
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +98 -0
- package/dist/utility/wrun/wrun-run-interval.util.js +207 -0
- package/dist/utility/wrun/wrun-run-retained.util.d.ts +122 -0
- package/dist/utility/wrun/wrun-run-retained.util.js +255 -0
- package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +184 -0
- package/dist/utility/wrun/wrun-sandbox-row-source.js +444 -0
- package/dist/utility/wrun/wrun-script-inputs.util.js +4 -4
- package/dist/utility/wrun/wrun-series-stream.util.d.ts +86 -0
- package/dist/utility/wrun/wrun-series-stream.util.js +537 -0
- package/dist/utility/wrun/wrun-sheet-remembered.util.d.ts +21 -0
- package/dist/utility/wrun/wrun-sheet-remembered.util.js +36 -0
- package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.d.ts +7 -0
- package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.js +12 -0
- package/dist/utility/wrun/wrun-socket-row-source.js +4 -2
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +175 -3
- package/dist/utility/wrun/wrun-source-rows.util.js +294 -8
- package/dist/utility/wrun/wrun-stats-strip.util.d.ts +46 -0
- package/dist/utility/wrun/wrun-stats-strip.util.js +87 -0
- package/dist/utility/wrun/wrun-table-chrome.util.d.ts +163 -0
- package/dist/utility/wrun/wrun-table-chrome.util.js +557 -0
- package/dist/utility/wrun/wrun-text-params.util.d.ts +11 -6
- package/dist/utility/wrun/wrun-text-params.util.js +19 -30
- package/dist/utility/wrun/wrun-transient-rerun.util.d.ts +64 -0
- package/dist/utility/wrun/wrun-transient-rerun.util.js +317 -0
- package/dist/utility/wrun/wrun-twin-lookback.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-twin-lookback.util.js +43 -0
- package/dist/utility/wrun/wrun-warmup-head-store.util.d.ts +41 -0
- package/dist/utility/wrun/wrun-warmup-head-store.util.js +120 -0
- package/dist/utility/wrun-alert-params.leaf.d.ts +24 -0
- package/dist/utility/wrun-alert-params.leaf.js +24 -0
- package/dist/utils/replay/replay-buffer-math.d.ts +148 -0
- package/dist/utils/replay/replay-buffer-math.js +684 -0
- package/dist/workers/wrun/wrun-abi-host.d.ts +190 -0
- package/dist/workers/wrun/wrun-abi-host.js +1201 -0
- package/dist/workers/wrun/wrun-engine-handler.d.ts +37 -0
- package/dist/workers/wrun/wrun-engine-handler.js +211 -0
- package/package.json +3 -3
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The boot graph's side of the wrun overlay lifecycle door and the live tick lane
|
|
3
|
+
* (`wrun-lifecycle-runtime.util`, behind a dynamic import). Every trigger that lives in the
|
|
4
|
+
* pre-candle graph calls them through here: the chart store's pause and resume, the pan wave in
|
|
5
|
+
* titan-charts, the history-range, switch and wake triggers in data-fetching, the pane budget
|
|
6
|
+
* lift, the legend Retry, the workspace poll and the live feed. The door, its recovery ladders,
|
|
7
|
+
* the replay lane, the live tick and the run pass then evaluate with the first wrun loader, not
|
|
8
|
+
* with the chart (docs/features/kscript/wrun/wrun-browser-runtime.md, "Lifecycle door").
|
|
9
|
+
*
|
|
10
|
+
* Each entry keeps the door's contract:
|
|
11
|
+
* - The runtime in hand: the call goes straight to it in the same turn, so the answer and every
|
|
12
|
+
* synchronous effect are the door's own. The loaders bind it (`bindWrunLifecycleRuntime`, from
|
|
13
|
+
* their static import) before they register a driver, so this is the path for every driver id.
|
|
14
|
+
* - No runtime yet: "not mine" from the same Map reads the door makes (`hasWrunOverlayDriver`,
|
|
15
|
+
* `hasWrunOverlayLiveContext`), with the door's own answer (false, 'no-driver', 'not-wrun',
|
|
16
|
+
* undefined, a resolved promise) and no import. A flag-off session and every kScript overlay
|
|
17
|
+
* stay on this path, and nothing wrun loads.
|
|
18
|
+
* - A driver before the runtime (a registrant that skipped the bind): the runtime loads and the
|
|
19
|
+
* call runs once, when it lands. The synchronous answer is the one the door gives for the same
|
|
20
|
+
* Map state ('queued' for the heal, whose tail decides; 'gap-marked' or 'healing' for the wake;
|
|
21
|
+
* true for the pause; a promise for the reruns and the resume), and a load that fails resolves
|
|
22
|
+
* like the door, which never rejects. Ring `wrun-lifecycle-runtime-late` names the entry.
|
|
23
|
+
*/
|
|
24
|
+
import type { WrunHealVerdict } from './wrun-lifecycle.contract.js';
|
|
25
|
+
export type WrunLifecycleRuntime = typeof import('./wrun-lifecycle-runtime.util.js');
|
|
26
|
+
/** An entry's parameters, exactly the runtime's: each entry forwards the arguments it received,
|
|
27
|
+
* so the call the door sees is the trigger's own. */
|
|
28
|
+
type EntryArgs<K extends keyof WrunLifecycleRuntime> = Parameters<WrunLifecycleRuntime[K]>;
|
|
29
|
+
/** Hand the runtime over in the same turn: a loader calls this with its static import of
|
|
30
|
+
* `wrun-lifecycle-runtime.util` before it registers a driver. */
|
|
31
|
+
export declare function bindWrunLifecycleRuntime(loaded: WrunLifecycleRuntime): void;
|
|
32
|
+
/** `requestWrunOverlayRerun` (the door): false without a driver, else a promise that never rejects. */
|
|
33
|
+
export declare function requestWrunOverlayRerun(...args: EntryArgs<'requestWrunOverlayRerun'>): Promise<void> | false;
|
|
34
|
+
/** `requestWrunOverlayRerunsForChart` (the door): resolves at once, with no import, when no id
|
|
35
|
+
* of the chart has a driver. */
|
|
36
|
+
export declare function requestWrunOverlayRerunsForChart(...args: EntryArgs<'requestWrunOverlayRerunsForChart'>): Promise<void>;
|
|
37
|
+
/** `resyncWrunOverlayAfterWake` (the door): 'not-wrun' without a live session or a driver. */
|
|
38
|
+
export declare function resyncWrunOverlayAfterWake(...args: EntryArgs<'resyncWrunOverlayAfterWake'>): 'gap-marked' | 'healing' | 'not-wrun';
|
|
39
|
+
/** `healWrunOverlayIfIdle` (the recovery ladder, through the door): 'no-driver' keeps the
|
|
40
|
+
* caller on its own line. */
|
|
41
|
+
export declare function healWrunOverlayIfIdle(...args: EntryArgs<'healWrunOverlayIfIdle'>): WrunHealVerdict;
|
|
42
|
+
/** `pauseWrunOverlay` (the door): true when a driver exists. */
|
|
43
|
+
export declare function pauseWrunOverlay(...args: EntryArgs<'pauseWrunOverlay'>): boolean;
|
|
44
|
+
/** `resumeWrunOverlay` (the door): undefined without a driver, so the caller keeps its lane. */
|
|
45
|
+
export declare function resumeWrunOverlay(...args: EntryArgs<'resumeWrunOverlay'>): Promise<void> | undefined;
|
|
46
|
+
/** `scheduleWrunOverlayLiveTick` (the live tick lane): nothing without the overlay's live session. */
|
|
47
|
+
export declare function scheduleWrunOverlayLiveTick(...args: EntryArgs<'scheduleWrunOverlayLiveTick'>): void;
|
|
48
|
+
/** `feedWrunRideBookRows` (the live tick lane): false when nothing was queued. */
|
|
49
|
+
export declare function feedWrunRideBookRows(...args: EntryArgs<'feedWrunRideBookRows'>): boolean;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { hasWrunOverlayDriver, hasWrunOverlayLiveContext } from './wrun-overlay-drivers.util.js';
|
|
2
|
+
import { wrunChartHostEnv } from '../../host-env.js';
|
|
3
|
+
let runtime;
|
|
4
|
+
let loading;
|
|
5
|
+
/** Hand the runtime over in the same turn: a loader calls this with its static import of
|
|
6
|
+
* `wrun-lifecycle-runtime.util` before it registers a driver. */
|
|
7
|
+
export function bindWrunLifecycleRuntime(loaded) {
|
|
8
|
+
runtime = loaded;
|
|
9
|
+
}
|
|
10
|
+
/** Load the runtime once; concurrent callers share the import, and a failed chunk load resets
|
|
11
|
+
* the latch so a later call retries. The runtime reads the executor's ports, which load beside it
|
|
12
|
+
* (`chart.loadExecutorPorts`). */
|
|
13
|
+
function loadWrunLifecycleRuntime() {
|
|
14
|
+
if (runtime)
|
|
15
|
+
return Promise.resolve(runtime);
|
|
16
|
+
loading ??= Promise.all([import('./wrun-lifecycle-runtime.util.js'), wrunChartHostEnv().chart.loadExecutorPorts()]).then(([loaded]) => {
|
|
17
|
+
runtime = loaded;
|
|
18
|
+
return loaded;
|
|
19
|
+
}, (error) => {
|
|
20
|
+
loading = undefined;
|
|
21
|
+
throw error;
|
|
22
|
+
});
|
|
23
|
+
return loading;
|
|
24
|
+
}
|
|
25
|
+
/** A driver met before the runtime: run `use` once it lands. Never rejects. */
|
|
26
|
+
function whenLoaded(entry, indicatorId, use) {
|
|
27
|
+
if (wrunChartHostEnv().diagnostics.debugEnabled()) {
|
|
28
|
+
wrunChartHostEnv().diagnostics.debug('wrun-lifecycle-runtime-late', { entry, indicatorId });
|
|
29
|
+
}
|
|
30
|
+
return loadWrunLifecycleRuntime()
|
|
31
|
+
.then(use)
|
|
32
|
+
.catch((error) => {
|
|
33
|
+
console.warn(`[wrun] lifecycle runtime unavailable for '${entry}':`, error);
|
|
34
|
+
return undefined;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/** The door's chart-wide "not mine": no id of the chart (narrowed by `ids`) has a driver. */
|
|
38
|
+
function chartHoldsWrunDriver(tc, ids) {
|
|
39
|
+
const metadata = tc?.metadata;
|
|
40
|
+
if (!Array.isArray(metadata))
|
|
41
|
+
return false;
|
|
42
|
+
for (const meta of metadata) {
|
|
43
|
+
const id = meta?.id;
|
|
44
|
+
if (typeof id !== 'string' || (ids && !ids.has(id)))
|
|
45
|
+
continue;
|
|
46
|
+
if (hasWrunOverlayDriver(id))
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
/** `requestWrunOverlayRerun` (the door): false without a driver, else a promise that never rejects. */
|
|
52
|
+
export function requestWrunOverlayRerun(...args) {
|
|
53
|
+
if (runtime)
|
|
54
|
+
return runtime.requestWrunOverlayRerun(...args);
|
|
55
|
+
const [, indicatorId] = args;
|
|
56
|
+
if (!hasWrunOverlayDriver(indicatorId))
|
|
57
|
+
return false;
|
|
58
|
+
return whenLoaded('rerun', indicatorId, (loaded) => loaded.requestWrunOverlayRerun(...args) || undefined).then(() => undefined);
|
|
59
|
+
}
|
|
60
|
+
/** `requestWrunOverlayRerunsForChart` (the door): resolves at once, with no import, when no id
|
|
61
|
+
* of the chart has a driver. */
|
|
62
|
+
export function requestWrunOverlayRerunsForChart(...args) {
|
|
63
|
+
if (runtime)
|
|
64
|
+
return runtime.requestWrunOverlayRerunsForChart(...args);
|
|
65
|
+
const [, tc, , options] = args;
|
|
66
|
+
if (!chartHoldsWrunDriver(tc, options?.ids))
|
|
67
|
+
return Promise.resolve();
|
|
68
|
+
return whenLoaded('reruns-for-chart', undefined, (loaded) => loaded.requestWrunOverlayRerunsForChart(...args)).then(() => undefined);
|
|
69
|
+
}
|
|
70
|
+
/** `resyncWrunOverlayAfterWake` (the door): 'not-wrun' without a live session or a driver. */
|
|
71
|
+
export function resyncWrunOverlayAfterWake(...args) {
|
|
72
|
+
if (runtime)
|
|
73
|
+
return runtime.resyncWrunOverlayAfterWake(...args);
|
|
74
|
+
const [, indicatorId] = args;
|
|
75
|
+
const live = hasWrunOverlayLiveContext(indicatorId);
|
|
76
|
+
if (!live && !hasWrunOverlayDriver(indicatorId))
|
|
77
|
+
return 'not-wrun';
|
|
78
|
+
void whenLoaded('wake', indicatorId, (loaded) => loaded.resyncWrunOverlayAfterWake(...args));
|
|
79
|
+
return live ? 'gap-marked' : 'healing';
|
|
80
|
+
}
|
|
81
|
+
/** `healWrunOverlayIfIdle` (the recovery ladder, through the door): 'no-driver' keeps the
|
|
82
|
+
* caller on its own line. */
|
|
83
|
+
export function healWrunOverlayIfIdle(...args) {
|
|
84
|
+
if (runtime)
|
|
85
|
+
return runtime.healWrunOverlayIfIdle(...args);
|
|
86
|
+
const [, indicatorId] = args;
|
|
87
|
+
if (!hasWrunOverlayDriver(indicatorId))
|
|
88
|
+
return 'no-driver';
|
|
89
|
+
void whenLoaded('heal', indicatorId, (loaded) => loaded.healWrunOverlayIfIdle(...args));
|
|
90
|
+
return 'queued';
|
|
91
|
+
}
|
|
92
|
+
/** `pauseWrunOverlay` (the door): true when a driver exists. */
|
|
93
|
+
export function pauseWrunOverlay(...args) {
|
|
94
|
+
if (runtime)
|
|
95
|
+
return runtime.pauseWrunOverlay(...args);
|
|
96
|
+
const [, indicatorId] = args;
|
|
97
|
+
if (!hasWrunOverlayDriver(indicatorId))
|
|
98
|
+
return false;
|
|
99
|
+
void whenLoaded('pause', indicatorId, (loaded) => loaded.pauseWrunOverlay(...args));
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
/** `resumeWrunOverlay` (the door): undefined without a driver, so the caller keeps its lane. */
|
|
103
|
+
export function resumeWrunOverlay(...args) {
|
|
104
|
+
if (runtime)
|
|
105
|
+
return runtime.resumeWrunOverlay(...args);
|
|
106
|
+
const [, indicatorId] = args;
|
|
107
|
+
if (!hasWrunOverlayDriver(indicatorId))
|
|
108
|
+
return undefined;
|
|
109
|
+
return whenLoaded('resume', indicatorId, (loaded) => loaded.resumeWrunOverlay(...args)).then(() => undefined);
|
|
110
|
+
}
|
|
111
|
+
/** `scheduleWrunOverlayLiveTick` (the live tick lane): nothing without the overlay's live session. */
|
|
112
|
+
export function scheduleWrunOverlayLiveTick(...args) {
|
|
113
|
+
if (runtime) {
|
|
114
|
+
runtime.scheduleWrunOverlayLiveTick(...args);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const [, indicatorId] = args;
|
|
118
|
+
if (!hasWrunOverlayLiveContext(indicatorId))
|
|
119
|
+
return;
|
|
120
|
+
void whenLoaded('live-tick', indicatorId, (loaded) => loaded.scheduleWrunOverlayLiveTick(...args));
|
|
121
|
+
}
|
|
122
|
+
/** `feedWrunRideBookRows` (the live tick lane): false when nothing was queued. */
|
|
123
|
+
export function feedWrunRideBookRows(...args) {
|
|
124
|
+
if (runtime)
|
|
125
|
+
return runtime.feedWrunRideBookRows(...args);
|
|
126
|
+
const [rows] = args;
|
|
127
|
+
if (!hasWrunOverlayLiveContext(rows.indicatorId))
|
|
128
|
+
return false;
|
|
129
|
+
void whenLoaded('ride-book', rows.indicatorId, (loaded) => loaded.feedWrunRideBookRows(...args));
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The wrun overlay lifecycle door: the ONE module a chart trigger calls for a
|
|
3
|
+
* browser-run wrun overlay (settings save, pan wave, switch, history range,
|
|
4
|
+
* budget lift, theme, Retry, pause, resume, wake, the poll and live-frame
|
|
5
|
+
* heals, and the market replay lane). Each trigger makes one call here and
|
|
6
|
+
* keeps its kScript line byte-identical: every entry answers "not mine"
|
|
7
|
+
* (false, 'no-driver', 'not-wrun', undefined) for an id with no registered
|
|
8
|
+
* driver, from a Map read and before any import, so a flag-off session sees
|
|
9
|
+
* no change.
|
|
10
|
+
*
|
|
11
|
+
* For a driver the door follows kScript's order with kScript's shared helpers
|
|
12
|
+
* (no private deciders):
|
|
13
|
+
* - the run hold (`wrunOverlayHold`, recovery module): a paused or tripped
|
|
14
|
+
* overlay re-stamps its pause through the store exactly as the guarded local
|
|
15
|
+
* refresh does (data-fetching.util runGuardedLocalTechnicalScriptRefresh) and
|
|
16
|
+
* nothing runs;
|
|
17
|
+
* - a pan wave's window comes from the kScript wave's own range decider
|
|
18
|
+
* (`resolveLocalTechnicalScriptLazyRefreshRange`: 5,000-bar clamp, demand
|
|
19
|
+
* anchor); a window narrower than the loaded range is `partial`;
|
|
20
|
+
* - a pan wave over a live session that only gained older bars is planned as
|
|
21
|
+
* a prefix run (C1 v3, `planWrunOverlayPrefixRequest`): the session's owner
|
|
22
|
+
* goes pending here, before anything awaits on the executor, so the live
|
|
23
|
+
* tick leaves the backward extension to the wave; the executor replans it
|
|
24
|
+
* when it starts, and every other wave runs whole as it always did;
|
|
25
|
+
* - the run itself is the executor's single flight
|
|
26
|
+
* (`rerunWrunOverlayForChartWave`), which keeps the last good result on a
|
|
27
|
+
* failure, so the door's promise never rejects;
|
|
28
|
+
* - a cache-served run owes one SWR revalidation (perf/caching.md "stale
|
|
29
|
+
* paints, fresh replaces"): the kScript runner's arm, take, bypass-token and
|
|
30
|
+
* restore rules under the wrun id.
|
|
31
|
+
*
|
|
32
|
+
* The recovery ladders (heal, source rungs, casualty window) live in
|
|
33
|
+
* wrun-overlay-recovery.util; the door re-exports the hold and the heal.
|
|
34
|
+
* Import graph as in the drivers registry: the chart store and titan-charts are
|
|
35
|
+
* reached through the host's loaders (`chart.loadChartStore`,
|
|
36
|
+
* `chart.loadTitanCharts`) and the child mount util by `await import()` beside
|
|
37
|
+
* its ports (`chart.loadPanelMountPorts`), inside async paths.
|
|
38
|
+
*/
|
|
39
|
+
import type { WrunRunReason } from './wrun-lifecycle.contract.js';
|
|
40
|
+
import { type LocalTechnicalScriptSpan } from '../chart/local-technical-script-range.leaf.js';
|
|
41
|
+
export { healWrunOverlayIfIdle, wrunOverlayHold } from './wrun-overlay-recovery.util.js';
|
|
42
|
+
export { closeWrunOverlayReplayLane, extendWrunOverlayReplayLane, hasWrunOverlayReplayLane, openWrunOverlayReplayLane, revealWrunOverlayReplayLane, type WrunReplayWindow, } from './wrun-replay-lane.util.js';
|
|
43
|
+
export interface WrunRerunRequestOptions {
|
|
44
|
+
/** The wave's demand span ('lazy-range-refresh'): anchors the clamped window
|
|
45
|
+
* the way the kScript wave anchors its engine refresh. */
|
|
46
|
+
demandSpan?: LocalTechnicalScriptSpan;
|
|
47
|
+
/** The chart's interval in ms when the caller resolved it (else read off the chart). */
|
|
48
|
+
intervalMs?: number;
|
|
49
|
+
/** Who asked (`WrunRerunOptions.origin`): a settings save passes its sync origin, so a
|
|
50
|
+
* collaborator's apply never reads as this person's attempt. */
|
|
51
|
+
origin?: 'user' | 'system';
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* THE rerun door. Synchronous `false` when the id has no wrun driver (the
|
|
55
|
+
* caller keeps its kScript line). Otherwise a promise that never rejects: a
|
|
56
|
+
* held run re-stamps the pause for 'paused' or 'tripped' (the kScript guarded
|
|
57
|
+
* refresh's rule), logs `wrun-rerun-held` and resolves; a 'lazy-range-refresh'
|
|
58
|
+
* with a demand span gets the clamped window; then the executor runs it.
|
|
59
|
+
*/
|
|
60
|
+
export declare function requestWrunOverlayRerun(chartIndex: number, indicatorId: string, reason: WrunRunReason, options?: WrunRerunRequestOptions): Promise<void> | false;
|
|
61
|
+
/**
|
|
62
|
+
* Chart-wide form for the sites that loop a chart's overlays: the driver ids
|
|
63
|
+
* among `tc.metadata` (narrowed by `options.ids`), each through the door,
|
|
64
|
+
* settled together. Resolves at once, with no await, when no id has a driver.
|
|
65
|
+
*/
|
|
66
|
+
export declare function requestWrunOverlayRerunsForChart(chartIndex: number, tc: {
|
|
67
|
+
metadata: ReadonlyArray<{
|
|
68
|
+
id: string;
|
|
69
|
+
}>;
|
|
70
|
+
} | null | undefined, reason: WrunRunReason, options?: WrunRerunRequestOptions & {
|
|
71
|
+
ids?: ReadonlySet<string>;
|
|
72
|
+
}): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* The run head's check (unit R): 'paused' or 'tripped' when the run must not
|
|
75
|
+
* start, else null. A tripped overlay that is not paused yet is paused here,
|
|
76
|
+
* as the kScript wave does at its own hold. Null without a driver, without
|
|
77
|
+
* loading the store.
|
|
78
|
+
*/
|
|
79
|
+
export declare function isWrunOverlayHeldForRun(chartIndex: number, indicatorId: string): Promise<'paused' | 'tripped' | null>;
|
|
80
|
+
/**
|
|
81
|
+
* Pause the browser-run side of an overlay (the store's `pauseOverlay` calls
|
|
82
|
+
* this for a driver id after its own flag, record, row and banner): the live
|
|
83
|
+
* session is suspended (nothing queues or computes while paused) and the
|
|
84
|
+
* HUD's latest values go. The picture stays (pause = frozen computation and
|
|
85
|
+
* frozen content): the children the run mounted for this parent keep their
|
|
86
|
+
* rows and the heatmaps among them dim (wrun-pause-dim.util, the store dims
|
|
87
|
+
* what is mounted now), and a child mount the run started before the pause
|
|
88
|
+
* landed dims once it settles (and takes a paint-cost pause's suspension).
|
|
89
|
+
* Resume undims, reruns and remounts. True when a driver exists.
|
|
90
|
+
*/
|
|
91
|
+
export declare function pauseWrunOverlay(chartIndex: number, indicatorId: string): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Resume a paused overlay (the store's one recovery path, after it reset the
|
|
94
|
+
* guard and cleared the flag): the heal ladder and the source rung start
|
|
95
|
+
* over, and the door reruns it with 'resume' (the run reinstalls the live
|
|
96
|
+
* session and remounts the children); while the chart replays, its replay
|
|
97
|
+
* lane reopens instead. Undefined without a driver.
|
|
98
|
+
*/
|
|
99
|
+
export declare function resumeWrunOverlay(chartIndex: number, indicatorId: string): Promise<void> | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* The wake half of the recovery: a live session gets a 'wake' gap mark (its
|
|
102
|
+
* tick reconciles or rebuilds); a driver without one (a first run that failed
|
|
103
|
+
* or never finished) goes to the heal ladder; anything else is not wrun and
|
|
104
|
+
* the caller's kScript line runs.
|
|
105
|
+
*/
|
|
106
|
+
export declare function resyncWrunOverlayAfterWake(chartIndex: number, indicatorId: string): 'gap-marked' | 'healing' | 'not-wrun';
|
|
107
|
+
/**
|
|
108
|
+
* The kScript guarded-call shape for a wrun main-thread apply (the full run's
|
|
109
|
+
* integrate, the tick's apply): the execution guard measures the synchronous
|
|
110
|
+
* slice for its breaker, and a tripped measurement pauses the overlay through
|
|
111
|
+
* the store (which suspends the wrun side itself). The measure records no perf
|
|
112
|
+
* tracker sample (`sample: false`): the host build that wraps this apply
|
|
113
|
+
* records the one sample per update (recordWrunHostBuildMs). A plain call
|
|
114
|
+
* without a driver.
|
|
115
|
+
*/
|
|
116
|
+
export declare function withWrunOverlayExecutionMeasure<T>(chartIndex: number, indicatorId: string, reason: string, run: () => T): T;
|
|
117
|
+
/** Clears the door's state and the recovery ladders' state. */
|
|
118
|
+
export declare function __resetWrunOverlayLifecycleForTests(): void;
|