@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,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The WRUN ABI executor: instantiates a `wrun-indicator` wasm module with the
|
|
3
|
+
* version-specific import object (wrun-1 scalar channel; wrun-2 adds the cell
|
|
4
|
+
* and string channels; wrun-3 adds the handle-keyed draw channel and the
|
|
5
|
+
* last-bar signal; wrun-4 adds run-level frame snapshots) and drives it bar
|
|
6
|
+
* by bar over a packed request.
|
|
7
|
+
*
|
|
8
|
+
* This is a faithful browser port of the om daemon's worker host
|
|
9
|
+
* (openmarket packages/cli/src/runner/wrun/runtime-worker.js), kept
|
|
10
|
+
* environment-agnostic on purpose: it runs inside `wrun-engine.worker.ts` in
|
|
11
|
+
* the app and directly under Node in the ABI drive specs, so the same
|
|
12
|
+
* behavior is what both the tests and the chart exercise.
|
|
13
|
+
*
|
|
14
|
+
* Contract highlights (docs/WRUN2_ABI.md and docs/WRUN3_ABI.md in the
|
|
15
|
+
* openmarket repo):
|
|
16
|
+
* - Four exports: init/state/finalize/reset; positional argument blocks
|
|
17
|
+
* served through `wrun.wrun_arg_*`; outputs through `wrun_output_f64` +
|
|
18
|
+
* `wrun_result_write`.
|
|
19
|
+
* - Cell channel (`wrun_arg_len`/`wrun_arg_bytes`) is state-phase only,
|
|
20
|
+
* wrun-2 and later, and copies IEEE 754 f64 cells into exported memory.
|
|
21
|
+
* - String channel (`wrun_output_str`) is finalize-phase only, wrun-2 and
|
|
22
|
+
* later, declared slots only, fatal UTF-8 validation, caps checked before
|
|
23
|
+
* any copy, never truncated.
|
|
24
|
+
* - Frame channel (`wrun_output_frame`, wrun-4 and later): finalize-phase
|
|
25
|
+
* only, declared slots only, fatal UTF-8 validation. A later write replaces
|
|
26
|
+
* the slot for the run, sharing the string channel's render-result cap.
|
|
27
|
+
* - Text channel (`wrun_param_len` / `wrun_param_bytes`, wrun-5 and later,
|
|
28
|
+
* docs/WRUN5_ABI.md): init-phase only, the cell channel's shape on params.
|
|
29
|
+
* The host holds every typed text setting's plain UTF-8 bytes by init slot
|
|
30
|
+
* (`textParams`); a slot without one answers -1 on both imports (the
|
|
31
|
+
* generated reader reads the declared default), an empty value answers 0
|
|
32
|
+
* (the reader reads ""), and the copy into
|
|
33
|
+
* exported memory is bounds-checked. Refusals by name:
|
|
34
|
+
* `wrun_text_param_phase` outside init(), `wrun_text_param_memory` for a
|
|
35
|
+
* copy outside the module's memory. An older ABI refuses the two imports
|
|
36
|
+
* by name before anything links.
|
|
37
|
+
* - Row count (`wrun_bar_count`, wrun-6 and later, docs/WRUN6_ABI.md): the
|
|
38
|
+
* bars the run holds while the row is evaluated, the forming bar included,
|
|
39
|
+
* callable in state() and finalize() (`wrun_bar_count_phase` otherwise).
|
|
40
|
+
* Every row of a block reads the bars the session holds once the block is
|
|
41
|
+
* in: a full run's row count, a live seed's, and on a same-bar revision the
|
|
42
|
+
* count already held. A NEW bar would make every held bar's count stale, so
|
|
43
|
+
* the session never extends a module that reads it: the main thread reopens
|
|
44
|
+
* it over every bar (the engine's re-seed), and a block that would extend it
|
|
45
|
+
* refuses by name. An older ABI refuses the import by name before anything
|
|
46
|
+
* links.
|
|
47
|
+
* - Draw channel (`wrun_draw_*`, wrun-3 and later): finalize-phase only, every
|
|
48
|
+
* call one op against the session's handle ledger
|
|
49
|
+
* (`utility/wrun/wrun-handles.util.ts`); caps and refusals by name.
|
|
50
|
+
* `wrun_bar_last` (state and finalize) answers 1 on the newest bar the
|
|
51
|
+
* request holds.
|
|
52
|
+
* - Strategy channel (`wrun_strategy_*`, wrun-3 and later, contract
|
|
53
|
+
* OM-WRUN3-STRATEGIES-CONTRACT sections 2 and 5): a package whose sheet
|
|
54
|
+
* declares `strategy` runs the engine's own broker beside the guest
|
|
55
|
+
* (the shared host package's broker, read through the realm's chart-host env, `sharedHost()`, and
|
|
56
|
+
* driven by its `WrunStrategyHost`). Per row, `broker.beginBar` runs BEFORE the guest's
|
|
57
|
+
* state() (fills for orders queued on earlier rows, equity marked at the
|
|
58
|
+
* close), the getters read the post-fill position during state() and
|
|
59
|
+
* finalize(), and the intents queue during finalize() with createdBar =
|
|
60
|
+
* the row. A full run confirms every bar, the newest included (the
|
|
61
|
+
* engine's own full-run rule); on the live lane the newest bar the
|
|
62
|
+
* request holds (the forming bar) runs on a structured clone of the
|
|
63
|
+
* committed broker (no fills, intents rejected and counted), a same-bar
|
|
64
|
+
* replay re-clones, and a bar close folds the closed bar into the
|
|
65
|
+
* committed broker (the close-confirm) before the new forming bar, so a
|
|
66
|
+
* live session equals a full run over its closed bars plus the forming
|
|
67
|
+
* bar's mark. The OHLC feed rides the block (`strategyBars`, the
|
|
68
|
+
* primary lane's own candles); the wire is the engine's StrategyOutput.
|
|
69
|
+
* A module importing a strategy import with no `strategy` sheet refuses
|
|
70
|
+
* at instantiation by name (`wrun_strategy_not_declared`).
|
|
71
|
+
* - No memory growth after init(); the 4 MiB memory ceiling holds throughout.
|
|
72
|
+
* - Live mode replays a revised forming bar by snapshot/restore of linear
|
|
73
|
+
* memory plus the exported `__wrun_g*` globals AND the ledger journal; a
|
|
74
|
+
* live block that opens past the forming bar close-confirms it first
|
|
75
|
+
* (re-evaluates it as a closed bar), so a live session's ledger equals a
|
|
76
|
+
* full run's.
|
|
77
|
+
*
|
|
78
|
+
* Two entry points share one executor:
|
|
79
|
+
* - `runWrunPackedRequest` drives a whole request against a fresh instance
|
|
80
|
+
* (the historical mount/pan compute pass), exactly as before.
|
|
81
|
+
* - `createWrunAbiSession` keeps the instantiated guest ALIVE between calls
|
|
82
|
+
* so a live forming-bar tick feeds only the new/revised rows: the session
|
|
83
|
+
* carries the guest's memory, the forming-bar snapshot, the ledger, and
|
|
84
|
+
* the string accounting and frame slots across calls, and history is
|
|
85
|
+
* never re-executed per tick.
|
|
86
|
+
*/
|
|
87
|
+
import { WrunLiveOrderError, type WrunAbiVersion, type WrunDrawSkips, type WrunLiveBlockStats, type WrunPackedRowsBlock, type WrunPackedRunOutput, type WrunPackedRunRequest } from '../../interfaces/wrun-runtime.interface.js';
|
|
88
|
+
import { type WrunHandleDefaultsByKind, type WrunHandleRecord } from '../../utility/wrun/wrun-handles.util.js';
|
|
89
|
+
import type { StrategyDeclaredConfig, StrategyOutput, WrunStrategyEvents, WrunStrategyReservedOutputs } from '@orangecharts/indicator-kit/host';
|
|
90
|
+
/** The strategy half of a run (contract sections 2 and 5): the engine's
|
|
91
|
+
* declared config the sheet resolved to, the chart interval, and whether
|
|
92
|
+
* the event streams are tracked. Present exactly when the sheet declares
|
|
93
|
+
* `strategy`. */
|
|
94
|
+
export interface WrunStrategyRunConfig {
|
|
95
|
+
/** The engine config the sheet resolved to (`resolveWrunStrategySheet`). */
|
|
96
|
+
config: StrategyDeclaredConfig;
|
|
97
|
+
/** The chart interval, so `finalize()` populates the annualized stats. */
|
|
98
|
+
intervalMs?: number;
|
|
99
|
+
/** Track and answer the `strategy.order` / `strategy.fill` event streams
|
|
100
|
+
* and the reserved outputs (the corpus replay; the chart never needs
|
|
101
|
+
* them). Off by default. */
|
|
102
|
+
events?: boolean;
|
|
103
|
+
}
|
|
104
|
+
/** The broker feed on a rows block: the primary lane's own OHLC per row,
|
|
105
|
+
* row-major at stride 4 (open, high, low, close), read by the host from
|
|
106
|
+
* the chart's candles. A strategy package's every block carries it. */
|
|
107
|
+
export interface WrunStrategyRowsFields {
|
|
108
|
+
strategyBars?: Float64Array;
|
|
109
|
+
}
|
|
110
|
+
export type WrunStrategyRowsBlock = WrunPackedRowsBlock & WrunStrategyRowsFields;
|
|
111
|
+
/** The strategy fields a run request carries beside the packed rows. */
|
|
112
|
+
export interface WrunStrategyRunRequestFields extends WrunStrategyRowsFields {
|
|
113
|
+
strategy?: WrunStrategyRunConfig;
|
|
114
|
+
}
|
|
115
|
+
/** The strategy field a successful worker response carries: the engine's
|
|
116
|
+
* StrategyOutput after the block (replace semantics per response). */
|
|
117
|
+
export interface WrunStrategyResponseFields {
|
|
118
|
+
strategy?: StrategyOutput;
|
|
119
|
+
}
|
|
120
|
+
export interface WrunAbiSessionConfig {
|
|
121
|
+
module: WebAssembly.Module;
|
|
122
|
+
abi: WrunAbiVersion;
|
|
123
|
+
outputCount: number;
|
|
124
|
+
initArgs: readonly number[];
|
|
125
|
+
/** wrun-5: the typed text settings' plain UTF-8 bytes by init slot (the
|
|
126
|
+
* index `wrun_param_len` takes). Ignored under wrun-1 to wrun-4, whose
|
|
127
|
+
* import object never links the text channel. */
|
|
128
|
+
textParams?: Readonly<Record<number, Uint8Array>>;
|
|
129
|
+
stringMaxBytes?: Int32Array;
|
|
130
|
+
frameMaxBytes?: Int32Array;
|
|
131
|
+
memoryLimitBytes?: number;
|
|
132
|
+
/** wrun-3: the sheet's declared handle kinds (a draw call of an undeclared
|
|
133
|
+
* kind refuses by name); absent when the sheet declares no `handles`
|
|
134
|
+
* section, which every draw call refuses by name. Ignored under wrun-1 and
|
|
135
|
+
* wrun-2, whose import object never links the draw channel. */
|
|
136
|
+
handleDefaults?: WrunHandleDefaultsByKind;
|
|
137
|
+
/** wrun-3: the sheet's `strategy` section, resolved. Absent = no broker;
|
|
138
|
+
* a module importing a strategy import then refuses at instantiation.
|
|
139
|
+
* Ignored under wrun-1 and wrun-2, whose import object never links the
|
|
140
|
+
* strategy channel. */
|
|
141
|
+
strategy?: WrunStrategyRunConfig;
|
|
142
|
+
/** Test hook: observes every forming-bar memory snapshot the session
|
|
143
|
+
* takes, so specs can pin the lazy-snapshot policy (an N-bar historical
|
|
144
|
+
* live block must cost exactly one snapshot, not N). */
|
|
145
|
+
onSnapshot?: () => void;
|
|
146
|
+
/** Test hook: observes every forming-bar restore (a same-bar replay and
|
|
147
|
+
* the close-confirm re-evaluation alike). */
|
|
148
|
+
onRestore?: () => void;
|
|
149
|
+
}
|
|
150
|
+
/** A wrun-3 session answers the ledger's FULL live set beside every block's
|
|
151
|
+
* rows (wire records in creation order), and the run's skipped draw calls
|
|
152
|
+
* (`skipped`, `skippedCount`) exactly when one was skipped; wrun-1 and
|
|
153
|
+
* wrun-2 answer none. A strategy session answers the engine's StrategyOutput
|
|
154
|
+
* after every block (the committed fold plus the forming bar's mark), and
|
|
155
|
+
* with `events` on, the event streams and the reserved outputs over every
|
|
156
|
+
* row so far. */
|
|
157
|
+
export interface WrunAbiSessionOutput extends WrunPackedRunOutput, WrunDrawSkips {
|
|
158
|
+
frames?: (string | undefined)[];
|
|
159
|
+
handles?: WrunHandleRecord[];
|
|
160
|
+
strategy?: StrategyOutput;
|
|
161
|
+
strategyEvents?: WrunStrategyEvents;
|
|
162
|
+
strategyReserved?: WrunStrategyReservedOutputs;
|
|
163
|
+
/** Live-mode blocks only: the block's restore/snapshot accounting (the
|
|
164
|
+
* worker passes it through; the main-thread host hangs it on the rows). */
|
|
165
|
+
live?: WrunLiveBlockStats;
|
|
166
|
+
}
|
|
167
|
+
/** The typed pre-evaluation ordering refusal lives with the wire types (the
|
|
168
|
+
* main-thread host rejects the coded response with the same class); kept
|
|
169
|
+
* exported here for the worker and the ABI drive specs. */
|
|
170
|
+
export { WrunLiveOrderError };
|
|
171
|
+
/** A live executor session: one instantiated guest, driven incrementally.
|
|
172
|
+
* `runRows` evaluates one packed rows block and returns that block's
|
|
173
|
+
* outputs; in 'live' mode the forming-bar snapshot/restore state carries
|
|
174
|
+
* across calls, so a later block may open with a REVISED evaluation of the
|
|
175
|
+
* session's last timestamp (restore) or a newer one (snapshot). */
|
|
176
|
+
export interface WrunAbiSession {
|
|
177
|
+
runRows(block: WrunStrategyRowsBlock, mode: 'historical' | 'live'): WrunAbiSessionOutput;
|
|
178
|
+
}
|
|
179
|
+
export declare function createWrunAbiSession(config: WrunAbiSessionConfig): Promise<WrunAbiSession>;
|
|
180
|
+
export declare function runWrunPackedRequest(request: WrunPackedRunRequest & WrunStrategyRunRequestFields, options?: {
|
|
181
|
+
memoryLimitBytes?: number;
|
|
182
|
+
}): Promise<WrunAbiSessionOutput>;
|
|
183
|
+
/** An AssemblyScript `string` in the guest's memory: UTF-16LE code units at `ptr`, the byte
|
|
184
|
+
* length as the u32 at `ptr - 4` (the managed object header's rtSize). Null for a null
|
|
185
|
+
* pointer, no memory, or a header that does not fit the memory: a trap never traps twice. */
|
|
186
|
+
export declare function readAssemblyScriptString(memory: WebAssembly.Memory | null, ptr: number): string | null;
|
|
187
|
+
/** `AssemblyScript abort: <message> at <path>:<line>:<column>`; the message part only when
|
|
188
|
+
* the guest passed one, the position only when asc supplied one (a path, or a non-zero
|
|
189
|
+
* line/column without a path, the position-only shape this host used to throw). */
|
|
190
|
+
export declare function formatAssemblyScriptAbort(message: string | null, fileName: string | null, line: number, column: number): string;
|