@orangecharts/wrun-chart-host 0.3.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 +23 -6
- 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/builtin-script-snippets.d.ts +133 -0
- package/dist/constants/scriptEditor/builtin-script-snippets.js +451 -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 +321 -24
- package/dist/host-env.js +15 -0
- package/dist/host-ports.types.d.ts +857 -35
- package/dist/index.d.ts +149 -2
- package/dist/index.js +149 -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/date-labelled-interval.leaf.d.ts +15 -0
- package/dist/utility/chart/date-labelled-interval.leaf.js +19 -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/indicator-run-interval.util.d.ts +130 -0
- package/dist/utility/chart/indicator-run-interval.util.js +268 -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/window-geometry.leaf.d.ts +119 -0
- package/dist/utility/chart/window-geometry.leaf.js +391 -0
- package/dist/utility/chart/window-owner.leaf.d.ts +19 -0
- package/dist/utility/chart/window-owner.leaf.js +24 -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/html-escape.leaf.d.ts +11 -0
- package/dist/utility/html-escape.leaf.js +20 -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/option_daily.d.ts +43 -15
- package/dist/utility/wrun/sources/lanes/option_daily.js +78 -20
- package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +14 -10
- package/dist/utility/wrun/sources/lanes/option_stats_10m.js +5 -4
- package/dist/utility/wrun/sources/lanes/series.js +2 -2
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +22 -3
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +38 -7
- package/dist/utility/wrun/sources/registry.js +31 -1
- package/dist/utility/wrun/sources/row-lane-registry.js +5 -5
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +49 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +75 -20
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +49 -0
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +57 -47
- package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +36 -4
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +6 -12
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +37 -3
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +128 -2
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +233 -51
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +0 -8
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +26 -24
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +85 -104
- 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-opra-stats.leaf.d.ts +29 -10
- package/dist/utility/wrun/wrun-opra-stats.leaf.js +29 -10
- 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.lazy.d.ts +10 -0
- package/dist/utility/wrun/wrun-panel-mount.lazy.js +68 -0
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +392 -0
- package/dist/utility/wrun/wrun-panel-mount.util.js +2346 -0
- 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-pause-dim.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-pause-dim.util.js +153 -0
- package/dist/utility/wrun/wrun-plot-gate.types.d.ts +23 -0
- package/dist/utility/wrun/wrun-plot-gate.types.js +7 -0
- 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-projection.types.d.ts +14 -0
- package/dist/utility/wrun/wrun-run-interval-projection.types.js +1 -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,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run interval: TradingView's indicator Timeframe model for built-ins (HTF-NATIVE-PLAN.md).
|
|
3
|
+
*
|
|
4
|
+
* A built-in whose `timeframe` input selects an interval coarser than its chart runs its engine AT
|
|
5
|
+
* that interval: the template's plain chart path on real candles of that interval, exactly what a
|
|
6
|
+
* chart on that interval computes. Its rows are then projected onto the chart's bars
|
|
7
|
+
* (projectRunRowsOntoChart). This replaces the template-side selected-timeframe branches, which
|
|
8
|
+
* rebuilt the coarse candles from the chart's loaded bars and never warmed up (2026-10-01: a 5m RSI
|
|
9
|
+
* at 1h read 51.12 against the 1h chart's 50.19).
|
|
10
|
+
*
|
|
11
|
+
* NATIVE_RUN_INTERVAL_SUBTYPES lists the built-ins converted so far. Market replay keeps the
|
|
12
|
+
* template path until replay can serve run-interval candles clipped at the replay cursor.
|
|
13
|
+
*/
|
|
14
|
+
import { Intervals } from '../../constants/interval.constants.js';
|
|
15
|
+
import { cmeSessionBarEndMs, cmeSessionBarOpenMs, cmeSessionBucketMs } from './cme-session-bucket.util.js';
|
|
16
|
+
/**
|
|
17
|
+
* Built-ins whose `timeframe` input runs the engine at that interval: every built-in template with
|
|
18
|
+
* the input, the 14 classics (P2, 2026-10-03) and the 14 TradingView staples (2026-10-04), each
|
|
19
|
+
* pinned by tests/utility/chart/indicator-run-interval.parity.spec.ts against its own chart at that
|
|
20
|
+
* interval. A built-in without the input (Zig Zag, Pivot Points, Volume Bubbles) and every
|
|
21
|
+
* community script run at the chart's interval.
|
|
22
|
+
*/
|
|
23
|
+
export const NATIVE_RUN_INTERVAL_SUBTYPES = new Set([
|
|
24
|
+
'ADL',
|
|
25
|
+
'ADX',
|
|
26
|
+
'AO',
|
|
27
|
+
'AROON',
|
|
28
|
+
'ATR',
|
|
29
|
+
'BOLLINGER_BANDS',
|
|
30
|
+
'CCI',
|
|
31
|
+
'CMF',
|
|
32
|
+
'DONCHIAN',
|
|
33
|
+
'EMA',
|
|
34
|
+
'HMA',
|
|
35
|
+
'ICHI_CLOUD',
|
|
36
|
+
'KELTNER',
|
|
37
|
+
'MACD',
|
|
38
|
+
'MFI',
|
|
39
|
+
'MOMENTUM',
|
|
40
|
+
'OBV',
|
|
41
|
+
'PSAR',
|
|
42
|
+
'ROC',
|
|
43
|
+
'RSI',
|
|
44
|
+
'SMA',
|
|
45
|
+
'STOCH',
|
|
46
|
+
'STOCH_RSI',
|
|
47
|
+
'SUPERTREND',
|
|
48
|
+
'VOLUME_BAR',
|
|
49
|
+
'VWMA',
|
|
50
|
+
'WILLIAMS_R',
|
|
51
|
+
'WMA',
|
|
52
|
+
]);
|
|
53
|
+
/**
|
|
54
|
+
* The lookback, in run bars, a converted built-in's chart path computes over where the engine's
|
|
55
|
+
* declared lookback misses a term. The declaration pass reports the deepest single input of each
|
|
56
|
+
* function it sees (MACD's slow period, the Ichimoku lagging span, the stochastic %K window, one
|
|
57
|
+
* Wilder period for ADX), not the chain the template runs: MACD's signal EMA runs over the slow
|
|
58
|
+
* EMA, Ichimoku displaces its spans past the lagging window, the stochastic smooths %K and then
|
|
59
|
+
* %D (and an oscillator smoothing after that), ADX averages period DX values that each need
|
|
60
|
+
* period true ranges. The warm-up (run-interval-engine.util) takes the deeper of this and the
|
|
61
|
+
* declared lookback, so every other converted built-in, whose declaration is right (a period, a
|
|
62
|
+
* volume MA length, none for the path-dependent ADL, OBV and PSAR, which read the warm-up floor),
|
|
63
|
+
* needs no entry. Mirrors WRUN_RUN_INTERVAL_TWINS (wrun-run-interval.util) with the templates' input
|
|
64
|
+
* names. `inputs` reads each input as set on the overlay, else as the template declares it, else 0.
|
|
65
|
+
*
|
|
66
|
+
* The staples (measured against the declaration pass, 2026-10-04): the pass does not trace an input
|
|
67
|
+
* into atr(), wpr() or highestbars(), so Supertrend, Keltner's ATR bands, Williams %R and Aroon
|
|
68
|
+
* declare nothing for it; an offset reads the line that many bars back (Donchian, WMA, VWMA); Hull
|
|
69
|
+
* runs its outer average over round(sqrt(period)) hull inputs; the Stochastic RSI chains the RSI,
|
|
70
|
+
* its stochastic window and the K and D averages. ATR, CMF, Momentum, ROC and the Awesome
|
|
71
|
+
* Oscillator declare their own lookback right. Supertrend is path-dependent beyond its ATR (its
|
|
72
|
+
* bands and trend carry from the first loaded bar), like PSAR.
|
|
73
|
+
*/
|
|
74
|
+
export const NATIVE_RUN_INTERVAL_LOOKBACK_BARS = {
|
|
75
|
+
ADX: (inputs) => 2 * inputs.num('period'),
|
|
76
|
+
AROON: (inputs) => inputs.num('length') + 1,
|
|
77
|
+
DONCHIAN: (inputs) => inputs.num('period') + inputs.num('offset'),
|
|
78
|
+
HMA: (inputs) => inputs.num('period') + Math.round(Math.sqrt(inputs.num('period'))),
|
|
79
|
+
ICHI_CLOUD: (inputs) => Math.max(inputs.num('conversionPeriod'), inputs.num('basePeriod'), inputs.num('laggingSpanPeriod')) +
|
|
80
|
+
inputs.num('displacement'),
|
|
81
|
+
KELTNER: (inputs) => Math.max(inputs.num('period'), keltnerBandBars(inputs)),
|
|
82
|
+
MACD: (inputs) => Math.max(inputs.num('fastPeriod'), inputs.num('slowPeriod')) + inputs.num('signalPeriod'),
|
|
83
|
+
STOCH: (inputs) => inputs.num('kPeriod') + inputs.num('kSmoothing') + inputs.num('dPeriod') + oscillatorSmoothingBars(inputs),
|
|
84
|
+
STOCH_RSI: (inputs) => inputs.num('rsiLength') + inputs.num('stochLength') + inputs.num('kSmoothing') + inputs.num('dSmoothing'),
|
|
85
|
+
SUPERTREND: (inputs) => inputs.num('atrPeriod'),
|
|
86
|
+
VWMA: (inputs) => inputs.num('period') + inputs.num('offset'),
|
|
87
|
+
WILLIAMS_R: (inputs) => inputs.num('length'),
|
|
88
|
+
WMA: (inputs) => inputs.num('period') + inputs.num('offset'),
|
|
89
|
+
};
|
|
90
|
+
/** Keltner's band smoothing: its own ATR period on ATR bands (the default style), nothing more otherwise. */
|
|
91
|
+
function keltnerBandBars(inputs) {
|
|
92
|
+
const style = inputs.str('bandStyle');
|
|
93
|
+
return style === '' || style === 'Average True Range' ? inputs.num('atrPeriod') : 0;
|
|
94
|
+
}
|
|
95
|
+
/** The oscillator smoothing MA (OSCILLATOR_SMOOTHING_INPUTS) chained after the value: 0 while it is off. */
|
|
96
|
+
function oscillatorSmoothingBars(inputs) {
|
|
97
|
+
const type = inputs.str('smoothingType');
|
|
98
|
+
return type === '' || type === 'None' ? 0 : inputs.num('smoothingLength');
|
|
99
|
+
}
|
|
100
|
+
/** The templates' `timeframe` options (CLASSIC_TIMEFRAME_INPUTS) as chart interval keys. */
|
|
101
|
+
const TIMEFRAME_INTERVALS = {
|
|
102
|
+
'5m': '5m',
|
|
103
|
+
'15m': '15m',
|
|
104
|
+
'30m': '30m',
|
|
105
|
+
'1h': '1h',
|
|
106
|
+
'4h': '4h',
|
|
107
|
+
'1D': '1d',
|
|
108
|
+
'1W': '1w',
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* The [open, close) of the run bar stamped `stamp`: `[stamp, stamp + intervalMs)`, or on the CME
|
|
112
|
+
* session lattice its session bar's (cmeSessionBarOpenMs, cmeSessionBarEndMs: a 1D bar stamped at
|
|
113
|
+
* 00:00Z of its trade date opens at the 17:00 Chicago open before it and closes at the next one).
|
|
114
|
+
* A stamp the lattice books no bar to (a width that divides an hour, a regular-hours bar, a time
|
|
115
|
+
* that is no run bar's) reads the plain span.
|
|
116
|
+
*/
|
|
117
|
+
export function runBarSpan(stamp, run) {
|
|
118
|
+
const close = run.sessionLattice ? cmeSessionBarEndMs(stamp, run.intervalMs) : null;
|
|
119
|
+
if (close === null)
|
|
120
|
+
return { open: stamp, close: stamp + run.intervalMs };
|
|
121
|
+
return { open: cmeSessionBarOpenMs(stamp, run.intervalMs) ?? stamp, close };
|
|
122
|
+
}
|
|
123
|
+
/** runBarSpan's close alone, for a loop over many bars that never reads the session open (uncached). */
|
|
124
|
+
function runBarCloseMs(stamp, run) {
|
|
125
|
+
return (run.sessionLattice ? cmeSessionBarEndMs(stamp, run.intervalMs) : null) ?? stamp + run.intervalMs;
|
|
126
|
+
}
|
|
127
|
+
/** The first index whose time is at or after `time` (times ascending); times.length when none. */
|
|
128
|
+
function firstIndexAtOrAfter(times, time) {
|
|
129
|
+
let lo = 0;
|
|
130
|
+
let hi = times.length;
|
|
131
|
+
while (lo < hi) {
|
|
132
|
+
const mid = (lo + hi) >> 1;
|
|
133
|
+
if (times[mid] < time)
|
|
134
|
+
lo = mid + 1;
|
|
135
|
+
else
|
|
136
|
+
hi = mid;
|
|
137
|
+
}
|
|
138
|
+
return lo;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The close of the run bar after the one stamped `stamp`: from there on a chart bar shows a run bar
|
|
142
|
+
* later than it. Plain, the next run bar opens at its close (`stamp + 2 * intervalMs`). On the
|
|
143
|
+
* session lattice a gap (the daily halt, a weekend, a holiday) holds no run bar, so the next one is
|
|
144
|
+
* the run bar of the first chart bar (`chartTimes`, ascending) at or after its close: that chart
|
|
145
|
+
* bar's session bar when `stamp` is one, else the run bar it opens (a session reopens on a run
|
|
146
|
+
* bar's open, a regular-hours one included). Infinity when no chart bar reaches that close.
|
|
147
|
+
*/
|
|
148
|
+
export function nextRunBarCloseMs(stamp, chartTimes, run) {
|
|
149
|
+
if (!run.sessionLattice)
|
|
150
|
+
return stamp + 2 * run.intervalMs;
|
|
151
|
+
const sessionClose = cmeSessionBarEndMs(stamp, run.intervalMs);
|
|
152
|
+
const at = firstIndexAtOrAfter(chartTimes, sessionClose ?? stamp + run.intervalMs);
|
|
153
|
+
if (at === chartTimes.length)
|
|
154
|
+
return Number.POSITIVE_INFINITY;
|
|
155
|
+
const first = chartTimes[at];
|
|
156
|
+
const next = sessionClose === null ? first : (cmeSessionBucketMs(first, run.intervalMs) ?? first);
|
|
157
|
+
return runBarCloseMs(next, run);
|
|
158
|
+
}
|
|
159
|
+
function intervalMsOf(interval) {
|
|
160
|
+
const ms = typeof interval === 'number' ? interval : Intervals.map_unit[String(interval)];
|
|
161
|
+
return typeof ms === 'number' && Number.isFinite(ms) && ms > 0 ? ms : undefined;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The run interval a Timeframe option label ("1h", "1D") selects on a chart of `chartInterval`:
|
|
165
|
+
* coarser than the chart, else null (the chart's own interval, an unknown label, "chart"). Shared
|
|
166
|
+
* by the kScript built-ins (resolveRunInterval) and their wrun Indicators (wrun-run-interval.util).
|
|
167
|
+
*/
|
|
168
|
+
export function runIntervalOfTimeframeLabel(label, chartInterval) {
|
|
169
|
+
const interval = typeof label === 'string' ? TIMEFRAME_INTERVALS[label] : undefined;
|
|
170
|
+
const intervalMs = intervalMsOf(interval);
|
|
171
|
+
const chartMs = intervalMsOf(chartInterval);
|
|
172
|
+
if (interval === undefined || intervalMs === undefined || chartMs === undefined || intervalMs <= chartMs) {
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
return { interval, intervalMs };
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Whether a Timeframe option label selects the chart's own interval or a finer one. Such a
|
|
179
|
+
* selection means "chart" (HTF-NATIVE-PLAN.md D3a): the resolver below answers null for it, and the
|
|
180
|
+
* engine must see `timeframe: "chart"` too (chartIntervalEngineMetadata), or the template's
|
|
181
|
+
* selected-timeframe branch calls htf() with an interval below its base and the engine throws on
|
|
182
|
+
* every update ("htf() timeframe 900000ms must be >= base interval 3600000ms": a 15m selection
|
|
183
|
+
* on a 1h chart froze the line at its last good run, Kyle's 2026-10-03 INT dump). Their wrun twins
|
|
184
|
+
* read it too (wrunTimeframeIsChartOrFiner, wrun-run-interval.util).
|
|
185
|
+
*/
|
|
186
|
+
export function timeframeIsChartOrFiner(label, chartInterval) {
|
|
187
|
+
const interval = typeof label === 'string' ? TIMEFRAME_INTERVALS[label] : undefined;
|
|
188
|
+
const intervalMs = intervalMsOf(interval);
|
|
189
|
+
const chartMs = intervalMsOf(chartInterval);
|
|
190
|
+
return intervalMs !== undefined && chartMs !== undefined && intervalMs <= chartMs;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* The interval an overlay's engine runs at when it is coarser than the chart's, else null (the
|
|
194
|
+
* overlay runs at the chart's interval, as before). A selection at or below the chart's interval
|
|
195
|
+
* is the chart's own, so it takes the plain chart path too.
|
|
196
|
+
*/
|
|
197
|
+
export function resolveRunInterval(input) {
|
|
198
|
+
if (input.replay)
|
|
199
|
+
return null;
|
|
200
|
+
if (typeof input.subType !== 'string' || !NATIVE_RUN_INTERVAL_SUBTYPES.has(input.subType))
|
|
201
|
+
return null;
|
|
202
|
+
const settings = (input.settings ?? {});
|
|
203
|
+
const run = runIntervalOfTimeframeLabel(settings.timeframe, input.chartInterval);
|
|
204
|
+
return run ? { ...run, waitForClose: settings.waitForClose !== false } : null;
|
|
205
|
+
}
|
|
206
|
+
/** The settings the engine sees for a run-interval overlay: the template takes its plain chart path. */
|
|
207
|
+
export function engineSettingsForRunInterval(settings) {
|
|
208
|
+
return { ...settings, timeframe: 'chart' };
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Projects run-interval rows (oldest first, `row[0]` = the run bar's stamp, its open off the
|
|
212
|
+
* session lattice) onto the chart's bars: one row per chart time, with the cells of the run row that
|
|
213
|
+
* bar shows. Each run bar's span is read by runBarSpan (`sessionLattice`: the CME session calendar).
|
|
214
|
+
*
|
|
215
|
+
* Wait for close on: a chart bar shows the last run bar that closed at or before it
|
|
216
|
+
* (`close <= chartTime`, plain `stamp + runMs`), so a 5m bar in hour b shows hour b - 1. Off: the
|
|
217
|
+
* same, except the chart bars inside the newest run row's span show that row (the forming bar,
|
|
218
|
+
* live; on the lattice from its session open, before a 1D or 1W stamp). Chart bars before the first
|
|
219
|
+
* shown row get NaN cells. Run rows before the first chart bar (the warm-up) are dropped.
|
|
220
|
+
*/
|
|
221
|
+
export function projectRunRowsOntoChart(rows, chartTimes, runMs, waitForClose, sessionLattice = false) {
|
|
222
|
+
const run = { intervalMs: runMs, sessionLattice };
|
|
223
|
+
const usable = rows.filter((row) => Array.isArray(row) && Number.isFinite(Number(row[0])));
|
|
224
|
+
const width = usable.reduce((max, row) => Math.max(max, row.length), 1);
|
|
225
|
+
const emptyCells = new Array(width - 1).fill(NaN);
|
|
226
|
+
const newest = usable[usable.length - 1];
|
|
227
|
+
const forming = newest ? runBarSpan(Number(newest[0]), run) : { open: NaN, close: NaN };
|
|
228
|
+
const closes = usable.map((row) => runBarCloseMs(Number(row[0]), run));
|
|
229
|
+
const projected = [];
|
|
230
|
+
let shown = -1;
|
|
231
|
+
for (const chartTime of chartTimes) {
|
|
232
|
+
if (!waitForClose && newest && chartTime >= forming.open && chartTime < forming.close) {
|
|
233
|
+
projected.push([chartTime, ...newest.slice(1)]);
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
while (shown + 1 < usable.length && closes[shown + 1] <= chartTime)
|
|
237
|
+
shown++;
|
|
238
|
+
projected.push(shown < 0 ? [chartTime, ...emptyCells] : [chartTime, ...usable[shown].slice(1)]);
|
|
239
|
+
}
|
|
240
|
+
return projected;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* The chart time a run-bar time anchor (a drawing point at a run bar's stamp) lands on: where that
|
|
244
|
+
* bar's value first shows (its close with wait for close on, its open with it off, read by
|
|
245
|
+
* runBarSpan), clamped to the chart's loaded bars.
|
|
246
|
+
*/
|
|
247
|
+
export function projectRunTimeOntoChart(runTime, chartTimes, runMs, waitForClose, sessionLattice = false) {
|
|
248
|
+
if (chartTimes.length === 0)
|
|
249
|
+
return runTime;
|
|
250
|
+
const span = runBarSpan(runTime, { intervalMs: runMs, sessionLattice });
|
|
251
|
+
const target = waitForClose ? span.close : span.open;
|
|
252
|
+
const first = chartTimes[0];
|
|
253
|
+
const last = chartTimes[chartTimes.length - 1];
|
|
254
|
+
if (target <= first)
|
|
255
|
+
return first;
|
|
256
|
+
if (target >= last)
|
|
257
|
+
return last;
|
|
258
|
+
let lo = 0;
|
|
259
|
+
let hi = chartTimes.length - 1;
|
|
260
|
+
while (lo < hi) {
|
|
261
|
+
const mid = (lo + hi) >> 1;
|
|
262
|
+
if (chartTimes[mid] < target)
|
|
263
|
+
lo = mid + 1;
|
|
264
|
+
else
|
|
265
|
+
hi = mid;
|
|
266
|
+
}
|
|
267
|
+
return chartTimes[lo];
|
|
268
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply-skip fingerprint for local kScript live refreshes.
|
|
3
|
+
*
|
|
4
|
+
* Fast intervals re-run every mounted script at the live coalescer floor
|
|
5
|
+
* (~1s each on 1m); most re-runs produce byte-identical output, yet each one
|
|
6
|
+
* paid a wholesale row apply plus a full repaint. The engine re-run itself is
|
|
7
|
+
* untouched (long-window scripts must recompute from history); this
|
|
8
|
+
* fingerprint only lets the APPLY step recognize "nothing changed" and skip
|
|
9
|
+
* the redundant integration + paint.
|
|
10
|
+
*
|
|
11
|
+
* Safety contract:
|
|
12
|
+
* - `null` means "cannot fingerprint" and the caller MUST apply (fail open).
|
|
13
|
+
* Returned for shapes this hash does not fully cover, so a skip can never
|
|
14
|
+
* hide a visual change it did not hash.
|
|
15
|
+
* - The hash covers every pixel-affecting surface of a run result: main rows,
|
|
16
|
+
* every plot output's rows, engine-side colors, drawings, and tables.
|
|
17
|
+
* Diagnostics/prints are NOT covered on purpose — the caller keeps
|
|
18
|
+
* updating those channels even when it skips the apply.
|
|
19
|
+
* - A browser-run (wrun) result's live tick compares the whole result with the
|
|
20
|
+
* one it last applied instead (wrun-live-patch.util `diffWrunLiveResults`),
|
|
21
|
+
* which also names the bar its rows first changed on.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* The chart-side inputs a run-interval overlay's rows are projected with (run-interval-engine.util
|
|
25
|
+
* runIntervalApplyDomain): identical run rows still paint differently on a chart that gained a bar
|
|
26
|
+
* (live, or a prepended page) or under the other wait-for-close mode, so they join the hash.
|
|
27
|
+
*/
|
|
28
|
+
export interface KScriptApplyProjectionDomain {
|
|
29
|
+
firstTs: number;
|
|
30
|
+
lastTs: number;
|
|
31
|
+
rows: number;
|
|
32
|
+
runMs: number;
|
|
33
|
+
waitForClose: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function fingerprintKScriptRunResultForApplySkip(runResult: unknown, projection?: KScriptApplyProjectionDomain): string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Run-level keys outside the paint: fresh on every post, so a compact post
|
|
38
|
+
* carries them and the re-delivered result shows the run's own values
|
|
39
|
+
* (diagnostics that cleared, a print that changed, the settled-empty flag).
|
|
40
|
+
*/
|
|
41
|
+
export declare const KSCRIPT_RUN_RESULT_SIDE_CHANNEL_KEYS: ReadonlySet<string>;
|
|
42
|
+
/**
|
|
43
|
+
* The render identity of a run result (see the section comment): equal strings
|
|
44
|
+
* mean equal paint. `null` when any part fails open (oversized drawings, tables
|
|
45
|
+
* or JSON, an unsupported cell shape): a null identity is never equal.
|
|
46
|
+
*/
|
|
47
|
+
export declare function fingerprintKScriptRunResultRenderIdentity(result: unknown): string | null;
|
|
48
|
+
/**
|
|
49
|
+
* The part of a run result a compact post carries: ONLY the side-channel keys
|
|
50
|
+
* (diagnostics, print outputs, timings, the settled-empty flag, the declared
|
|
51
|
+
* depth): fresh values the host consumes outside the paint. Every other key
|
|
52
|
+
* is inside the render identity, so the cached full result's copy is equal by
|
|
53
|
+
* construction and the compose below reuses it (settings, define, script
|
|
54
|
+
* inputs and the like never cross twice; a compact post stays a few hundred
|
|
55
|
+
* bytes next to a 35 KB full one).
|
|
56
|
+
*/
|
|
57
|
+
export declare function splitKScriptRunResultForCompactPost(result: unknown): Record<string, unknown>;
|
|
58
|
+
/**
|
|
59
|
+
* The full result a compact post stands for: the cached result (every key by
|
|
60
|
+
* reference, so the apply-skip memo below still hits) with the compact post's
|
|
61
|
+
* side-channel fields over it. A side-channel key the new run dropped is
|
|
62
|
+
* dropped here too (its absence is the fresh value).
|
|
63
|
+
*/
|
|
64
|
+
export declare function composeKScriptRunResultFromCompact(cached: unknown, light: Record<string, unknown>): unknown;
|
|
65
|
+
export declare function fingerprintKScriptRunResultForApplySkipMemo(runResult: unknown, projection?: KScriptApplyProjectionDomain): string | null;
|