@orangecharts/wrun-chart-host 0.4.0 → 0.6.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 +17 -5
- package/dist/constants/exchange-names.leaf.d.ts +8 -0
- package/dist/constants/exchange-names.leaf.js +101 -0
- package/dist/constants/feature-flags.constants.js +7 -2
- 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 +301 -22
- package/dist/host-env.js +15 -0
- package/dist/host-ports.types.d.ts +853 -29
- package/dist/index.d.ts +140 -2
- package/dist/index.js +140 -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/interfaces/wrun-runtime.interface.d.ts +88 -13
- package/dist/interfaces/wrun-runtime.interface.js +17 -3
- 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 +17 -0
- package/dist/utility/chart/chart-mount-epoch.util.js +61 -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 +94 -0
- package/dist/utility/wrun/wrun-bar-count.util.js +274 -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 +330 -0
- package/dist/utility/wrun/wrun-host.service.js +855 -0
- package/dist/utility/wrun/wrun-hover.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-hover.util.js +25 -4
- 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-pack.util.d.ts +2 -1
- 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-registry-errors.util.d.ts +5 -3
- 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-sha256.leaf.d.ts +13 -0
- package/dist/utility/wrun/wrun-sha256.leaf.js +84 -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 +203 -0
- package/dist/workers/wrun/wrun-abi-host.js +1220 -0
- package/dist/workers/wrun/wrun-engine-handler.d.ts +20 -0
- package/dist/workers/wrun/wrun-engine-handler.js +380 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The payload types and loader views the
|
|
2
|
+
* The payload types and loader views the host ports name (host-env.ts; docs/features/kscript/wrun/wrun-chart-host.md
|
|
3
3
|
* in the web repo, "Ports"). Each type is a structural copy of the web definition it names, because package code may not
|
|
4
4
|
* import the web module that declares it. The web repo pins every copy to its source at type level
|
|
5
5
|
* (src/utility/wrun/wrun-chart-host-type-pins.ts, compiled by the typecheck gate): both ways (`Same`) for a data type,
|
|
@@ -10,42 +10,356 @@
|
|
|
10
10
|
* A loader view is a structural view of exactly the names package code takes from the module it replaces: web's loader
|
|
11
11
|
* answers the module itself, the app answers an object with those names.
|
|
12
12
|
*/
|
|
13
|
+
import type { GetMarketsRequest, MarketSymbol } from '@orangecharts/orange-v2-pb-common';
|
|
14
|
+
import type { OptionVenue } from './constants/option-venues.constants.js';
|
|
13
15
|
import type { WrunKitMainModule } from './host-env.js';
|
|
14
16
|
import type { RuntimeDiagnostic } from './interfaces/kscript-diagnostics.interface.js';
|
|
17
|
+
import type { PolymarketMetadata } from './interfaces/prediction-market.interface.js';
|
|
18
|
+
import type { WrunIndicatorMetadata, WrunOutputRow } from './interfaces/wrun-runtime.interface.js';
|
|
15
19
|
import type { FeedCombineRule as WrunFeedCombineRule, FeedHead as WrunFeedHead, FeedValueKey as WrunFeedValueKey, FeedWireBar as WrunFeedWireBar } from './interfaces/feed.interface.js';
|
|
20
|
+
import type { ResolvedContinuousLead } from './utility/chart/continuous-contracts.util.js';
|
|
21
|
+
import type { HistoryWallKind } from './utility/chart/history-wall.util.js';
|
|
16
22
|
import type { OverlayRunInterval as WrunOverlayRunInterval } from './utility/chart/indicator-run-interval.util.js';
|
|
23
|
+
import type { WrunVisibilityChart } from './utility/chart/wrun-visibility-chart.util.js';
|
|
17
24
|
import type { OptionSource as WrunOptionSource } from './utility/options/option-venue.util.js';
|
|
18
|
-
import type { WrunPollLaneLiveAsk, WrunPollLaneLiveSink, WrunPollLaneLiveSubscription } from './utility/wrun/sources/wrun-poll-lane.types.js';
|
|
19
25
|
import type { WrunOptionsChainCryptoVenues as WrunOptionsChainVenues, WrunOptionsChainCryptoVenueWord } from './utility/wrun/wrun-options-chain.util.js';
|
|
20
|
-
import type {
|
|
26
|
+
import type { WrunRunReason } from './utility/wrun/wrun-lifecycle.contract.js';
|
|
27
|
+
import type { WrunPaneFormatChart } from './utility/wrun/wrun-pane-format.util.js';
|
|
28
|
+
import type { WrunRefusal, WrunRefusalClass, WrunRefusalOverlayTarget } from './utility/wrun/wrun-refusal.util.js';
|
|
21
29
|
import type { WrunRowSourceIdentity } from './utility/wrun/wrun-row-source.js';
|
|
30
|
+
import type { WrunSocketTransport } from './utility/wrun/wrun-socket-row-source.js';
|
|
31
|
+
import type { WrunColorTheme } from './utility/wrun/wrun-style-words.util.js';
|
|
22
32
|
import type { GateProvider as WrunGateProvider } from './workers/constants/socket-slots.js';
|
|
23
33
|
export type { WrunRowSourceIdentity, WrunRowSourcePatch, WrunRowSourceRecord, WrunRowWindow, } from './utility/wrun/wrun-row-source.js';
|
|
24
34
|
export type { WrunSocketAsk, WrunSocketAskKind, WrunSocketChartRows, WrunSocketLoadSignals, WrunSocketTransport, } from './utility/wrun/wrun-socket-row-source.js';
|
|
25
35
|
/** The overlay a hosted port acts for. */
|
|
26
36
|
export type WrunHostOverlayRef = Pick<WrunRowSourceIdentity, 'chartIndex' | 'indicatorId'>;
|
|
27
|
-
/** One
|
|
28
|
-
*
|
|
29
|
-
export interface
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
/** One overlay record a mounted chart holds, as package code reads it (web: titan's `IMetaData`,
|
|
38
|
+
* @orangecharts/titan-charts-next dist/index.d.ts:16037): the fields the Phase 2 modules read. */
|
|
39
|
+
export interface WrunChartOverlayRecord {
|
|
40
|
+
/** titan `id: string` (:16038). */
|
|
41
|
+
id: string;
|
|
42
|
+
/** titan `name: string` (:16039). */
|
|
43
|
+
name: string;
|
|
44
|
+
/** titan `rawData: number[][] | number[]` (:16088). */
|
|
45
|
+
rawData: number[][] | number[];
|
|
46
|
+
/** titan `plot?: PlotType` (:16242, `KnownPlotType | (string & {})`). */
|
|
47
|
+
plot?: string;
|
|
48
|
+
/** titan `settings?: any` (:16350). */
|
|
49
|
+
settings?: unknown;
|
|
50
|
+
/** titan `isPaneHidden?: boolean` (:16395). */
|
|
51
|
+
isPaneHidden?: boolean;
|
|
52
|
+
/** titan `nestedMeta?: IMetaData[]` (:16396). */
|
|
53
|
+
nestedMeta?: WrunChartOverlayRecord[];
|
|
54
|
+
}
|
|
55
|
+
/** A mounted chart engine as package code reads it (web: titan's `TitanCharts`, dist/index.d.ts:27562; D-3): the
|
|
56
|
+
* members the Phase 2 modules read. Methods use method syntax, so a TitanCharts instance satisfies them where titan
|
|
57
|
+
* names its own row and drawing types (pinned one way, `Assignable<TitanCharts, WrunChartHandle>`). Titan's private
|
|
58
|
+
* `updateLegendsOnLiveTick` and its undeclared `renderQueue` stay out: their two reads keep their local casts. */
|
|
59
|
+
export interface WrunChartHandle {
|
|
60
|
+
/** titan `metadata: IMetaData[]` (:27682). */
|
|
61
|
+
metadata: WrunChartOverlayRecord[];
|
|
62
|
+
/** titan `interval: number` (:27607). */
|
|
63
|
+
interval: number;
|
|
64
|
+
/** titan `renderService: Renderer` (:27680); `Renderer.renderOnce(opts?: { immediate?: boolean }): void` (:24946). */
|
|
65
|
+
renderService: {
|
|
66
|
+
renderOnce(opts?: {
|
|
67
|
+
immediate?: boolean;
|
|
68
|
+
}): void;
|
|
32
69
|
};
|
|
70
|
+
/** titan `priceScaleControllers: PriceScale[]` (:27626); `PriceScale.priceStep: number` (:21272). */
|
|
71
|
+
priceScaleControllers: Array<{
|
|
72
|
+
priceStep: number;
|
|
73
|
+
}>;
|
|
74
|
+
/** titan `updateLoadState(overlayId: string, newState: boolean): void` (:29087). */
|
|
75
|
+
updateLoadState(overlayId: string, newState: boolean): void;
|
|
76
|
+
/** titan `updateSettings(overlayId: string, payload: any): Promise<{ placement: PlacementOutcome } | undefined>`
|
|
77
|
+
* (:28785; `PlacementOutcome`, :20973). */
|
|
78
|
+
updateSettings(overlayId: string, payload: unknown): Promise<{
|
|
79
|
+
placement: 'accepted' | 'refused' | 'deferred';
|
|
80
|
+
} | undefined>;
|
|
81
|
+
/** titan `updateDrawings(overlayId: string, drawings: DrawingRecord[]): void` (:29337). */
|
|
82
|
+
updateDrawings(overlayId: string, drawings: unknown[]): void;
|
|
83
|
+
/** titan `notifyLiveDataMutated(id: string): void` (:28640). */
|
|
84
|
+
notifyLiveDataMutated(id: string): void;
|
|
85
|
+
/** titan `noteLiveDamage(kind: LiveDamage): void` (:28373; `LiveDamage`, :19295). */
|
|
86
|
+
noteLiveDamage(kind: 'none' | 'live-edge' | 'full'): void;
|
|
87
|
+
/** titan `updateCollapseButtons(): void` (:29436). */
|
|
88
|
+
updateCollapseButtons(): void;
|
|
89
|
+
/** titan `getPriceTick(): number | null` (:29629). */
|
|
90
|
+
getPriceTick(): number | null;
|
|
91
|
+
}
|
|
92
|
+
/** One chart's metadata as package code reads it (web: `IChartMetaData`, interfaces/chart.interface.ts): the market,
|
|
93
|
+
* interval and transformations package receivers take as strings, and the optional facts a run reads. The whole object
|
|
94
|
+
* rides; `category` (the protocol package's enum) and `fredMetadata` (an app type) stay unknown here. */
|
|
95
|
+
export interface WrunChartMetadataView {
|
|
96
|
+
readonly exchange: string;
|
|
97
|
+
readonly symbol: string;
|
|
98
|
+
readonly interval: string;
|
|
99
|
+
readonly transformations: string;
|
|
100
|
+
readonly coin?: string;
|
|
101
|
+
readonly normalizedSymbol?: string;
|
|
102
|
+
readonly sessionType?: 'regular' | 'extended';
|
|
103
|
+
readonly displayTransformations?: string;
|
|
104
|
+
readonly category?: unknown;
|
|
105
|
+
readonly resolvedContract?: string;
|
|
106
|
+
readonly chain?: string;
|
|
107
|
+
readonly poolAddress?: string;
|
|
108
|
+
readonly baseTokenAddress?: string;
|
|
109
|
+
readonly quoteTokenAddress?: string;
|
|
110
|
+
readonly adjusted?: boolean;
|
|
111
|
+
readonly fredMetadata?: unknown;
|
|
112
|
+
readonly polymarketMetadata?: PolymarketMetadata;
|
|
113
|
+
}
|
|
114
|
+
/** CHANGED 0.5.0: one chart of the open workspace as package code reads it (web: `IChartTemplate`): its metadata and its
|
|
115
|
+
* two panes' rows (`IOverlay`, an app type, unknown here). */
|
|
116
|
+
export interface WrunChartTemplateView {
|
|
117
|
+
readonly metadata: WrunChartMetadataView;
|
|
118
|
+
readonly onchart: ReadonlyArray<unknown>;
|
|
119
|
+
readonly offchart: ReadonlyArray<unknown>;
|
|
120
|
+
}
|
|
121
|
+
/** How a settings apply settled (web: store/chart.ts `IndicatorSettingsSettleOutcome`). */
|
|
122
|
+
export type WrunSettingsSettleOutcome = 'applied' | 'dropped' | 'held' | 'failed';
|
|
123
|
+
/** The run result slice a run output summary reads (web: utility/scriptEditor/console-routing.util.ts
|
|
124
|
+
* `KscriptRunResultLike`). */
|
|
125
|
+
export interface WrunKScriptRunResultLike {
|
|
126
|
+
diagnostics?: unknown;
|
|
127
|
+
outputs?: Record<string, unknown>;
|
|
128
|
+
drawings?: unknown;
|
|
129
|
+
printOutputs?: unknown;
|
|
130
|
+
combinedTimes?: unknown;
|
|
131
|
+
barCount?: unknown;
|
|
132
|
+
bars?: unknown;
|
|
133
|
+
timingMs?: unknown;
|
|
134
|
+
durationMs?: unknown;
|
|
135
|
+
elapsedMs?: unknown;
|
|
136
|
+
strategy?: unknown;
|
|
33
137
|
}
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
138
|
+
/** CHANGED 0.5.0: the chart store as package code reads and writes it (web: `useChartStore()`, store/chart.ts), one view
|
|
139
|
+
* for `chart.loadChartStore` and `chart.chartStore`: the workspace's charts (a chart index with no chart reads null),
|
|
140
|
+
* the replay and loading state, and the actions a run calls. `isKScriptOverlayPaused` is required from 0.5.0 (the
|
|
141
|
+
* lifecycle, the recovery and the executor call it unguarded). */
|
|
36
142
|
export interface WrunChartStoreView {
|
|
37
143
|
readonly mergedAllCharts: ReadonlyArray<WrunChartTemplateView | null>;
|
|
38
|
-
|
|
144
|
+
readonly replayDisplayIntervalByChart?: Readonly<Record<number, string | null>>;
|
|
145
|
+
readonly kscriptLoadingIndicators?: Readonly<Record<number, Readonly<Record<string, boolean>>>>;
|
|
146
|
+
isKScriptOverlayPaused(chartIndex: number, indicatorId: string): boolean;
|
|
147
|
+
pauseOverlay(chartIndex: number, indicatorId: string, reason: string): void;
|
|
148
|
+
getIndicatorDiagnostics(indicatorId: string, chartIndex?: number): RuntimeDiagnostic[];
|
|
149
|
+
setIndicatorDiagnostics(chartIndex: number, indicatorId: string, diagnosticsInput: unknown, options?: {
|
|
150
|
+
notify?: boolean;
|
|
151
|
+
hasVisibleDrawings?: boolean;
|
|
152
|
+
}): void;
|
|
153
|
+
setIndicatorPrintOutputs(chartIndex: number, indicatorId: string, printOutputsInput: unknown): void;
|
|
154
|
+
setIndicatorRunOutputSummary(chartIndex: number, indicatorId: string, runResult: WrunKScriptRunResultLike | null): void;
|
|
155
|
+
setKScriptLoadingIndicator(chartIndex: number, indicatorId: string, loading: boolean): void;
|
|
156
|
+
indicatorSettingsSync(chartIndex: number, indicatorId: string): {
|
|
157
|
+
readonly requestedGen: number;
|
|
158
|
+
};
|
|
159
|
+
noteIndicatorSettingsSettled(chartIndex: number, indicatorId: string, gen: number, outcome: WrunSettingsSettleOutcome, reason?: string): void;
|
|
160
|
+
markStrategyTesterRunFailed(chartIndex: number, indicatorId: string): void;
|
|
39
161
|
}
|
|
40
162
|
/** Loader view of the chart store module. */
|
|
41
163
|
export interface WrunChartStoreModule {
|
|
42
164
|
useChartStore(): WrunChartStoreView;
|
|
43
165
|
}
|
|
44
|
-
/**
|
|
166
|
+
/** CHANGED 0.5.0: loader view of the chart group: the engine instance of a chart index as the chart handle (D-3,
|
|
167
|
+
* rule 1.1), and the whole group (web: instances/titan-charts.ts `getTC`, `getTCGroup`). */
|
|
45
168
|
export interface WrunTitanChartsModule {
|
|
46
|
-
getTC(chartIndex: number):
|
|
169
|
+
getTC(chartIndex: number): WrunChartHandle | null;
|
|
170
|
+
getTCGroup(): ReadonlyArray<WrunChartHandle | null>;
|
|
171
|
+
}
|
|
172
|
+
/** Loader view of the common store: each chart's historical-mode flag (web: store/common.ts `useCommonStore`). */
|
|
173
|
+
export interface WrunCommonStoreModule {
|
|
174
|
+
useCommonStore(): {
|
|
175
|
+
readonly isHistoricalMode: ReadonlyArray<boolean>;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/** Loader view of the chart mode rules (web: utility/chart/chart-mode.util.ts). */
|
|
179
|
+
export interface WrunChartModeModule {
|
|
180
|
+
isIndicatorGatedForFetch(chartIndex: number, indicatorId: string): boolean;
|
|
181
|
+
}
|
|
182
|
+
/** Who a chart save is for (web: utility/chart/chart-routing.util.ts `ChartPersistOrigin`). */
|
|
183
|
+
export type WrunChartPersistOrigin = 'user' | 'reconcile' | 'remote';
|
|
184
|
+
/** Loader view of the chart routing: a chart's save and its workspace document (web: chart-routing.util.ts). */
|
|
185
|
+
export interface WrunChartRoutingModule {
|
|
186
|
+
persistChart(chartIndex: number, origin?: WrunChartPersistOrigin): void;
|
|
187
|
+
resolveChart(chartIndex: number): WrunChartTemplateView | null;
|
|
188
|
+
}
|
|
189
|
+
/** Loader view of the off-chart grid heights (web: utility/chart/offchart-grid-heights.util.ts; the engine stays
|
|
190
|
+
* unknown). */
|
|
191
|
+
export interface WrunOffchartGridHeightsModule {
|
|
192
|
+
reconcileScriptPaneSideAfterRunResultApply(chartIndex: number, tc: unknown, indicatorId: string): void;
|
|
193
|
+
}
|
|
194
|
+
/** Loader view of the options overlay provenance (web: utility/indicators/options-overlay-provenance.util.ts). */
|
|
195
|
+
export interface WrunOptionsOverlayProvenanceModule {
|
|
196
|
+
admittedOpraSources(chartIndex: number, overlayId: string): number;
|
|
197
|
+
setOptionsOverlayOpraProvenance(chartIndex: number, overlayId: string, opra: boolean): void;
|
|
198
|
+
}
|
|
199
|
+
/** Loader view of the indicator registry: a control by its type, for its live subscription (web:
|
|
200
|
+
* indicators/indicator-registry.ts, a Map of `IIndicatorControl`). */
|
|
201
|
+
export interface WrunIndicatorRegistryModule {
|
|
202
|
+
readonly indicatorRegistry: {
|
|
203
|
+
get(type: string): {
|
|
204
|
+
subscribeToLiveFeed?(overlayId: string, payload: unknown, chartIndex?: number): unknown;
|
|
205
|
+
} | undefined;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/** Loader view of the chart schema's indicator types: the technical script's type key (web:
|
|
209
|
+
* `@orangecharts/chart-schema/indicator-types`, no package peer). */
|
|
210
|
+
export interface WrunIndicatorTypesModule {
|
|
211
|
+
readonly INDICATOR_TYPES: {
|
|
212
|
+
readonly TECHNICAL_SCRIPT: {
|
|
213
|
+
readonly type: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
/** An original's declared lookback a twin reads (web: utility/wrun/wrun-twins.util.ts `WrunTwinOriginalLookback`). */
|
|
218
|
+
export interface WrunTwinOriginalLookback {
|
|
219
|
+
minimumBars: number;
|
|
220
|
+
anchorMinSpanMs: number;
|
|
221
|
+
/** The first twin version whose run holds the original's depth, null when every version does. */
|
|
222
|
+
fromTwinVersion: string | null;
|
|
223
|
+
}
|
|
224
|
+
/** Loader view of the twins roster (web: wrun-twins.util.ts). */
|
|
225
|
+
export interface WrunTwinsRosterModule {
|
|
226
|
+
wrunTwinOriginalLookbackInfo(packageName: string, version: string): WrunTwinOriginalLookback | null;
|
|
227
|
+
}
|
|
228
|
+
/** Loader view of the pane budget ranking (web: utility/chart/pane-budget-ranking.util.ts). */
|
|
229
|
+
export interface WrunPaneBudgetRankingModule {
|
|
230
|
+
isOverlayBudgetHidden(chartIndex: number, overlayId: string | undefined): boolean;
|
|
231
|
+
}
|
|
232
|
+
/** The chart's main candle request identity (web: data-fetching.util.ts `MainCandleRequestIdentity`). */
|
|
233
|
+
export interface WrunMainCandleRequestIdentity {
|
|
234
|
+
transformations: string;
|
|
235
|
+
interval: string;
|
|
236
|
+
ovId: string;
|
|
237
|
+
chain?: string;
|
|
238
|
+
poolAddress?: string;
|
|
239
|
+
baseTokenAddress?: string;
|
|
240
|
+
quoteTokenAddress?: string;
|
|
241
|
+
sessionType?: string;
|
|
242
|
+
adjusted?: boolean;
|
|
243
|
+
/** The sided candle lane's decision (resolveMainCandleSidedRequest). */
|
|
244
|
+
sided: boolean;
|
|
245
|
+
/** The FRED series' default aggregation method (`metadata.fredMetadata`). */
|
|
246
|
+
defaultAggregationMethod?: number | string;
|
|
247
|
+
/** The exchange the request goes out under (HIP3 asks the gapfill). */
|
|
248
|
+
exchange: string;
|
|
249
|
+
/** The chart's instrument category (an option contract's is OPTION). */
|
|
250
|
+
category?: number;
|
|
251
|
+
}
|
|
252
|
+
/** A lazy-load check's target range (web: utility/chart/viewport-pan-tracking.util.ts `LazyLoadTargetRange`). */
|
|
253
|
+
export interface WrunLazyLoadTargetRange {
|
|
254
|
+
startTs: number;
|
|
255
|
+
endTs: number;
|
|
256
|
+
}
|
|
257
|
+
/** Loader view of the data fetching module: the lazy-load check and the main candle lane's request identity and reply
|
|
258
|
+
* normalization (web: data-fetching.util.ts). The engine is the chart handle (rule 1.1); the mixed-mode context, the
|
|
259
|
+
* prediction metadata and the lazy-load trigger are app types, unknown or a string here, and the base payload is an
|
|
260
|
+
* `object` (the run spreads it, then hands it to the transport as `never`). */
|
|
261
|
+
export interface WrunDataFetchingModule {
|
|
262
|
+
runChartLazyLoadCheck(chartIndex: number, expectedTc?: WrunChartHandle, reason?: string, targetRange?: WrunLazyLoadTargetRange, trigger?: string): void;
|
|
263
|
+
isMainCandleFetchInFlight(chartIndex: number): boolean;
|
|
264
|
+
buildMainCandleBasePayload(identity: WrunMainCandleRequestIdentity): object;
|
|
265
|
+
resolveMainCandleSidedRequest(input: {
|
|
266
|
+
transformations: string;
|
|
267
|
+
exchange: string;
|
|
268
|
+
symbol: string | null | undefined;
|
|
269
|
+
chain?: unknown;
|
|
270
|
+
poolAddress?: unknown;
|
|
271
|
+
adjusted: boolean;
|
|
272
|
+
intervalMs: number;
|
|
273
|
+
}): {
|
|
274
|
+
readonly sided: boolean;
|
|
275
|
+
};
|
|
276
|
+
mainCandleFirstTokenExchange(context: unknown): string | undefined;
|
|
277
|
+
mainCandleTokenSessionTypes(context: unknown): Record<string, string> | undefined;
|
|
278
|
+
mainCandleRowsProjection(metadata: unknown): 'identity' | 'complement';
|
|
279
|
+
projectMainCandleRows(rows: number[][], projection: 'identity' | 'complement'): number[][];
|
|
280
|
+
stripMainCandleRows(data: number[][], replayWindowStart: number): Map<number, {
|
|
281
|
+
lastSec: number;
|
|
282
|
+
lastNs: number;
|
|
283
|
+
}>;
|
|
284
|
+
acceptMainCommitResponse(chartIndex: number, rows: number[][], lane: string): {
|
|
285
|
+
rows: number[][];
|
|
286
|
+
rejectedWholesale: boolean;
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
/** The window a worker fetch put on the wire and was answered for, unix seconds, end exclusive (web:
|
|
290
|
+
* interfaces/sentry.interface.ts `V2ServedWindow`). */
|
|
291
|
+
export interface WrunServedWindow {
|
|
292
|
+
fromSec: number;
|
|
293
|
+
toSec: number;
|
|
294
|
+
}
|
|
295
|
+
/** Which fixed range volume profile rung served a fetch (web: workers/indicators/frvp-approximate.worker.util.ts
|
|
296
|
+
* `FrvpFetchMeta`). */
|
|
297
|
+
export interface WrunFrvpFetchMeta {
|
|
298
|
+
/** Rung the box asked for (span-derived). */
|
|
299
|
+
entryRungTf: string;
|
|
300
|
+
/** Coarsest rung that actually served a chunk. */
|
|
301
|
+
servedRungTf: string;
|
|
302
|
+
/** Chunks the plan's reach could not serve at any allowed rung. */
|
|
303
|
+
depthSkippedChunks: number;
|
|
304
|
+
/** Rows were clipped from buckets coarser than the box. */
|
|
305
|
+
approximate: boolean;
|
|
306
|
+
}
|
|
307
|
+
/** Completion facts of a V2 fetch terminal (web: sentry.interface.ts `V2StreamCompletionInfo`). */
|
|
308
|
+
export interface WrunStreamCompletionInfo {
|
|
309
|
+
completedOnWire?: boolean;
|
|
310
|
+
servedEmpty?: boolean;
|
|
311
|
+
embargoed?: boolean;
|
|
312
|
+
servedWindow?: WrunServedWindow;
|
|
313
|
+
servedFromLocalCoverage?: boolean;
|
|
314
|
+
residentSplitRows?: number;
|
|
315
|
+
wireChunks?: number;
|
|
316
|
+
nativeProfileBlockSize?: number;
|
|
317
|
+
frvpFetchMeta?: WrunFrvpFetchMeta;
|
|
318
|
+
serverTookMs?: number;
|
|
319
|
+
}
|
|
320
|
+
/** The options a main candle fetch passes (web: sentry.interface.ts `V2StreamHandlers` and `V2FetchOptions`,
|
|
321
|
+
* v2.service.ts `V2SharedFetchOptions`): the handlers in method syntax, so a handler that names web's completion type
|
|
322
|
+
* still assigns. */
|
|
323
|
+
export interface WrunMainCandleFetchOptions {
|
|
324
|
+
onData(data: unknown): void;
|
|
325
|
+
onError(error: unknown): void;
|
|
326
|
+
onComplete(info?: WrunStreamCompletionInfo): void;
|
|
327
|
+
signal?: AbortSignal;
|
|
328
|
+
shareable?: boolean;
|
|
329
|
+
diagnostics?: {
|
|
330
|
+
operationName?: string;
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
/** Loader view of the V2 transport the main candles ride (web: services/v2.service.ts default `fetchData`, generic on
|
|
334
|
+
* web; the payload is the transport's own type, `never` here). */
|
|
335
|
+
export interface WrunV2ServiceModule {
|
|
336
|
+
readonly default: {
|
|
337
|
+
fetchData(indicator: string, payload: never, chartIndex: number, options: WrunMainCandleFetchOptions): Promise<void>;
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
/** A markets request as the app hands it to the worker (web: workers/messages/indicator-v2.messages.ts
|
|
341
|
+
* `MarketsRequestInit`; `GetMarketsRequest` is the protocol package's, a peer). */
|
|
342
|
+
export type WrunMarketsRequestInit = Omit<Partial<GetMarketsRequest>, 'expiresBefore'> & {
|
|
343
|
+
expiresBefore?: number | bigint;
|
|
344
|
+
};
|
|
345
|
+
/** A block sizes read (web: services/metadata.service.ts `BlockSizesParams`, unexported: `getBlockSizes`' argument). */
|
|
346
|
+
export interface WrunBlockSizesParams {
|
|
347
|
+
type: string;
|
|
348
|
+
exchange?: string | string[];
|
|
349
|
+
symbol?: string;
|
|
350
|
+
coin?: string;
|
|
351
|
+
}
|
|
352
|
+
/** One raw catalog page as package code reads it (web: metadata.service.ts `MarketsRawPage`; its `failedSources` are
|
|
353
|
+
* app records, unknown here). The executor hands it to the pin spelling's `WrunPinCatalogPage` reader. */
|
|
354
|
+
export interface WrunMarketsRawPage {
|
|
355
|
+
marketSymbols: MarketSymbol[];
|
|
356
|
+
pageCount?: number;
|
|
357
|
+
incomplete?: boolean;
|
|
358
|
+
failedSources?: readonly unknown[];
|
|
359
|
+
vetoed?: true;
|
|
47
360
|
}
|
|
48
|
-
/**
|
|
361
|
+
/** CHANGED 0.5.0: loader view of the metadata service: the one market query lanes ask, and the raw catalog page and the
|
|
362
|
+
* block sizes a run reads. */
|
|
49
363
|
export interface WrunMetadataServiceModule {
|
|
50
364
|
readonly default: {
|
|
51
365
|
getMarkets(query: {
|
|
@@ -53,6 +367,12 @@ export interface WrunMetadataServiceModule {
|
|
|
53
367
|
coin: string[];
|
|
54
368
|
excludePrices: boolean;
|
|
55
369
|
}): Promise<unknown>;
|
|
370
|
+
getMarketsRaw(request: WrunMarketsRequestInit, options?: {
|
|
371
|
+
timeoutMs?: number;
|
|
372
|
+
}): Promise<WrunMarketsRawPage>;
|
|
373
|
+
getBlockSizes(params: WrunBlockSizesParams, options?: {
|
|
374
|
+
readCache?: boolean;
|
|
375
|
+
}): Promise<number[]>;
|
|
56
376
|
};
|
|
57
377
|
}
|
|
58
378
|
/** The gate planes an option chain lists on (workers/constants/socket-slots.ts `GateProvider`) and a crypto option
|
|
@@ -85,7 +405,7 @@ export interface WrunOptionsChartSourceModule {
|
|
|
85
405
|
/** Why a chart whose options list on OPRA reads none: the reason the gate folds into `governedOptionPlane`'s null
|
|
86
406
|
* (web: utility/options/opra-options-gate.util.ts `OpraOptionPlaneStop`). */
|
|
87
407
|
export type OpraOptionPlaneStop = 'flag-off' | 'chart-kind';
|
|
88
|
-
/**
|
|
408
|
+
/** CHANGED 0.5.0: loader view of the OPRA options gate (sync after the load), and its flag reads and hydration waits. */
|
|
89
409
|
export interface WrunOptionsGateModule {
|
|
90
410
|
governedOptionPlane(metadata: {
|
|
91
411
|
exchange?: string | null;
|
|
@@ -93,6 +413,11 @@ export interface WrunOptionsGateModule {
|
|
|
93
413
|
opraOptionPlaneStop(metadata: {
|
|
94
414
|
exchange?: string | null;
|
|
95
415
|
} | null | undefined): OpraOptionPlaneStop | undefined;
|
|
416
|
+
opraFlagDecidesChartOptions(metadata: {
|
|
417
|
+
exchange?: string | null;
|
|
418
|
+
} | null | undefined): boolean;
|
|
419
|
+
awaitOpraFlagHydration(timeoutMs?: number): Promise<void>;
|
|
420
|
+
awaitOpraUserScriptsFlagHydration(timeoutMs?: number): Promise<void>;
|
|
96
421
|
}
|
|
97
422
|
/** The crypto venue words of the `options_chain` venue knob and the words as the chart reads them
|
|
98
423
|
* (utility/wrun/wrun-options-chain.util.ts, moved in phase 1a). */
|
|
@@ -138,14 +463,97 @@ export interface WrunOptionChainDirectory {
|
|
|
138
463
|
expiryUnix: number;
|
|
139
464
|
}): Promise<WrunOptionExpiryStrikes | undefined>;
|
|
140
465
|
}
|
|
141
|
-
/**
|
|
142
|
-
* contract resolver (a CME root's lead contract). */
|
|
466
|
+
/** CHANGED 0.5.0: loader view of the option chain service: the directory a persisted exchange picks, the default
|
|
467
|
+
* service's contract resolver (a CME root's lead contract), and its directory for one governed venue. */
|
|
143
468
|
export interface WrunOptionChainServiceModule {
|
|
144
469
|
optionChainServiceForExchange(exchange: string): WrunOptionChainDirectory;
|
|
145
470
|
readonly default: {
|
|
146
471
|
resolveChainContract(exchangeName: string, underlying: string): Promise<string | null>;
|
|
472
|
+
forVenue(venueId: OptionVenue['id']): WrunOptionChainDirectory;
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
/** Loader view of the continuous contracts service: a continuous symbol's lead contract (web:
|
|
476
|
+
* services/continuous-contracts.service.ts; the lead is the package's own type). */
|
|
477
|
+
export interface WrunContinuousContractsModule {
|
|
478
|
+
readonly default: {
|
|
479
|
+
getResolvedLead(exchange: string, continuousSymbol: string): Promise<ResolvedContinuousLead | null>;
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
/** Loader view of the TPO block size catalog (web: indicators/controls/tpo-block-size.util.ts). */
|
|
483
|
+
export interface WrunTpoBlockCatalogModule {
|
|
484
|
+
peekTpoBlockSize(exchange: string, symbol: string): number | undefined;
|
|
485
|
+
loadTpoBlockSize(exchange: string, symbol: string): Promise<number | undefined>;
|
|
486
|
+
}
|
|
487
|
+
/** Loader view of the search payload normalizer (web: utility/symbol-selection/searchPayloadToMarketsRequest.ts, which
|
|
488
|
+
* answers `any[]`). */
|
|
489
|
+
export interface WrunSearchPayloadToMarketsRequestModule {
|
|
490
|
+
normalizeMarketSymbols(markets: MarketSymbol[]): unknown[];
|
|
491
|
+
}
|
|
492
|
+
/** Loader view of the market events store (web: store/market-events.ts; the earnings facts read the store through their
|
|
493
|
+
* own structural type). */
|
|
494
|
+
export interface WrunMarketEventsStoreModule {
|
|
495
|
+
useMarketEventsStore(): unknown;
|
|
496
|
+
}
|
|
497
|
+
/** A chart's symbol as the chart header shows it (web: interfaces/chart.interface.ts `ISymbolDisplayData`). */
|
|
498
|
+
export interface WrunSymbolDisplayData {
|
|
499
|
+
poolAddress?: string;
|
|
500
|
+
secondaryName?: string;
|
|
501
|
+
exchangeRaw: string;
|
|
502
|
+
exchangeDisplay: string;
|
|
503
|
+
exchangeIcon: string;
|
|
504
|
+
/** The dim text before the base, where a venue writes the quote first (Upbit `KRW-BTC`); absent elsewhere. */
|
|
505
|
+
prefix?: string;
|
|
506
|
+
coin: string;
|
|
507
|
+
quote: string;
|
|
508
|
+
isFred: boolean;
|
|
509
|
+
fullSymbol: string;
|
|
510
|
+
isTransformation: boolean;
|
|
511
|
+
transformationParts?: WrunSymbolDisplayData[];
|
|
512
|
+
operators?: string[];
|
|
513
|
+
tooltipText: string;
|
|
514
|
+
/** A formula's expression with each part by its display label ("SPY / GLD", "BTCUSDT / Global M2"). */
|
|
515
|
+
displayExpression?: string;
|
|
516
|
+
/** A formula's one venue label ("BINANCE.F"), empty when its legs name their own venues or it has none to show. */
|
|
517
|
+
formulaVenueLabel?: string;
|
|
518
|
+
}
|
|
519
|
+
/** Loader view of the symbol display (web: utility/symbol-display.util.ts; its optional second argument is unused). */
|
|
520
|
+
export interface WrunSymbolDisplayModule {
|
|
521
|
+
resolveChartSymbolData(chartIndex: number): Promise<WrunSymbolDisplayData | null>;
|
|
522
|
+
}
|
|
523
|
+
/** One venue leg a native multi-exchange choice resolves to (web: utility/indicators/venue-legs.util.ts `VenueLeg`). */
|
|
524
|
+
export interface WrunVenueLeg {
|
|
525
|
+
exchange: string;
|
|
526
|
+
symbol: string;
|
|
527
|
+
category: 'SPOT' | 'PERP';
|
|
528
|
+
}
|
|
529
|
+
/** How a venue legs resolution ended (web: venue-legs.util.ts `VenueLegsStatus`). */
|
|
530
|
+
export type WrunVenueLegsStatus = 'ok' | 'none-listed' | 'no-coin' | 'host-refused' | 'lookup-failed';
|
|
531
|
+
/** A venue legs resolution (web: venue-legs.util.ts `VenueLegsResult`). */
|
|
532
|
+
export interface WrunVenueLegsResult {
|
|
533
|
+
/** One leg per listed venue, in the choice's order (a preset: catalog order). */
|
|
534
|
+
legs: WrunVenueLeg[];
|
|
535
|
+
/** The venues of the choice that do not list the coin, in the choice's order. */
|
|
536
|
+
unlisted: string[];
|
|
537
|
+
status: WrunVenueLegsStatus;
|
|
538
|
+
}
|
|
539
|
+
/** What a venue legs resolution asks (web: venue-legs.util.ts `resolveVenueLegs`' argument; the choice is
|
|
540
|
+
* utility/indicators/venue-choice.util.ts `CarriedVenueChoice`). */
|
|
541
|
+
export interface WrunVenueLegsArgs {
|
|
542
|
+
dataType: 'TRADE_AGG' | 'FUNDING_RATE_AGG';
|
|
543
|
+
coin: string | undefined;
|
|
544
|
+
hostExchange: string | undefined;
|
|
545
|
+
choice: {
|
|
546
|
+
kind: 'preset';
|
|
547
|
+
preset: 'SPOT' | 'PERP';
|
|
548
|
+
} | {
|
|
549
|
+
kind: 'names';
|
|
550
|
+
exchanges: string[];
|
|
147
551
|
};
|
|
148
552
|
}
|
|
553
|
+
/** One input requirement of a sheet, the switch target's reading: U5a's leaf, moved into the package at X2 (web's
|
|
554
|
+
* utility/wrun/wrun-input-requirements.util.ts re-exports it). */
|
|
555
|
+
import type { WrunInputRequirement } from './utility/wrun/wrun-input-requirements.leaf.js';
|
|
556
|
+
export type { WrunInputRequirement };
|
|
149
557
|
/** How a value column combines, a value key, a feed's head and one wire bar (interfaces/feed.interface.ts, moved in
|
|
150
558
|
* phase 1a). */
|
|
151
559
|
export type { WrunFeedCombineRule, WrunFeedHead, WrunFeedValueKey, WrunFeedWireBar };
|
|
@@ -223,20 +631,8 @@ export interface WrunKScriptErrorEnvelopeModule {
|
|
|
223
631
|
editorRun: boolean;
|
|
224
632
|
}): RuntimeDiagnostic[];
|
|
225
633
|
}
|
|
226
|
-
/** Loader view of the overlay lifecycle door. */
|
|
227
|
-
export interface WrunOverlayLifecycleDoorModule {
|
|
228
|
-
requestWrunOverlayRerun(chartIndex: number, indicatorId: string, reason: 'source-recovery'): Promise<void> | false;
|
|
229
|
-
}
|
|
230
|
-
/** Loader view of the refusal surface. */
|
|
231
|
-
export interface WrunRefusalSurfaceModule {
|
|
232
|
-
liveWrunRefusalAttempt(chartIndex: number, indicatorId: string): WrunRefusalAttemptToken | null;
|
|
233
|
-
}
|
|
234
634
|
/** A lane's live channel ask, sink and handle (utility/wrun/sources/wrun-poll-lane.types.ts, moved in phase 1a). */
|
|
235
635
|
export type { WrunPollLaneLiveAsk, WrunPollLaneLiveSink, WrunPollLaneLiveSubscription, } from './utility/wrun/sources/wrun-poll-lane.types.js';
|
|
236
|
-
/** Loader view of the series stream. */
|
|
237
|
-
export interface WrunSeriesStreamModule {
|
|
238
|
-
openWrunSeriesStream(ask: WrunPollLaneLiveAsk, sink: WrunPollLaneLiveSink): Promise<WrunPollLaneLiveSubscription>;
|
|
239
|
-
}
|
|
240
636
|
/** The engine surface a paint request reaches (web: `KScriptChartPaintTarget`). */
|
|
241
637
|
export interface WrunChartPaintTarget {
|
|
242
638
|
requestLiveRecompute?(opts?: {
|
|
@@ -254,6 +650,8 @@ export interface WrunChartPaintTarget {
|
|
|
254
650
|
export interface WrunChartPaintOptions {
|
|
255
651
|
overlayIds?: readonly string[];
|
|
256
652
|
}
|
|
653
|
+
/** How a live paint request was scheduled (web: utility/chart/kscript-chart-paint.util.ts `KScriptChartPaintMode`). */
|
|
654
|
+
export type WrunChartPaintMode = 'immediate' | 'debounced' | 'pan-idle' | 'historical-batched';
|
|
257
655
|
/** The engine record a drawings update reaches (web: kscript-drawings.util.ts `KScriptDrawingsChart`). */
|
|
258
656
|
export type WrunDrawingsChart = {
|
|
259
657
|
metadata?: unknown[];
|
|
@@ -429,3 +827,429 @@ export interface WrunPackEnsureResult {
|
|
|
429
827
|
/** The chart a plot gate notice belongs to, why a plot kind cannot draw, and one plot kind the gate refused
|
|
430
828
|
* (utility/wrun/wrun-plot-gate.types.ts, moved in phase 1b). */
|
|
431
829
|
export type { WrunPlotGateChart, WrunPlotGateCause, WrunPlotGateRefusal } from './utility/wrun/wrun-plot-gate.types.js';
|
|
830
|
+
/** A source fetch's wire verdict (web: instances/titan-charts.ts `KScriptSourceFetchVerdict`). */
|
|
831
|
+
export interface WrunSourceFetchVerdict {
|
|
832
|
+
complete: boolean;
|
|
833
|
+
servedEmpty: boolean;
|
|
834
|
+
source: 'wire' | 'row-cache' | 'replay-cache' | 'composed' | 'main-rows' | 'resident-split';
|
|
835
|
+
}
|
|
836
|
+
/** A source fetch's options (web: the options of instances/titan-charts.ts `dataFetch`). */
|
|
837
|
+
export interface WrunSourceFetchOptions {
|
|
838
|
+
preferPackedOrderbookWorker?: boolean;
|
|
839
|
+
latestAnchorBars?: number;
|
|
840
|
+
retryAttempt?: number;
|
|
841
|
+
/** SRCDEGRADE dispatch anchor: called when the request actually goes to the wire (or joins one that has). */
|
|
842
|
+
onDispatched?: () => void;
|
|
843
|
+
/** Slow-link watchdog hint from the engine proxy: a longer transport silence bound for this source's wire pieces. */
|
|
844
|
+
responseWatchdogMs?: number;
|
|
845
|
+
/** Never touch the overlay's legend errorMessage on this fetch. */
|
|
846
|
+
silentLegend?: boolean;
|
|
847
|
+
/** The source's own interval (an `Intervals.map_unit` key), for a caller whose `sourceName` is a plain fetch key. */
|
|
848
|
+
interval?: string;
|
|
849
|
+
/** The caller joins the rows onto the chart itself: the asked window stands and the control's own rows return. */
|
|
850
|
+
nativeRows?: boolean;
|
|
851
|
+
/** Called once with the acquisition's wire verdict when the rows this call answers were acquired. */
|
|
852
|
+
onSourceVerdict?: (verdict: WrunSourceFetchVerdict) => void;
|
|
853
|
+
}
|
|
854
|
+
/** A live refresh gate's decision (web: utility/chart/kscript-live-refresh-pace.util.ts
|
|
855
|
+
* `LocalKScriptLiveRefreshGateDecision`). */
|
|
856
|
+
export type WrunLiveRefreshGateDecision = {
|
|
857
|
+
admit: true;
|
|
858
|
+
reason: 'disabled' | 'gate-open';
|
|
859
|
+
} | {
|
|
860
|
+
admit: false;
|
|
861
|
+
retryInMs: number;
|
|
862
|
+
msSinceLastRefresh: number;
|
|
863
|
+
};
|
|
864
|
+
/** A live tick's coalesce decision (web: same file `LocalKScriptLiveCoalesceTickDecision`). */
|
|
865
|
+
export type WrunLiveCoalesceTickDecision = {
|
|
866
|
+
action: 'exempt';
|
|
867
|
+
reason: 'disabled' | 'orderbook-source';
|
|
868
|
+
} | {
|
|
869
|
+
action: 'opened';
|
|
870
|
+
holdMs: number;
|
|
871
|
+
} | {
|
|
872
|
+
action: 'joined';
|
|
873
|
+
/** Remaining window hold, 0 once the window's own length has elapsed. */
|
|
874
|
+
holdMs: number;
|
|
875
|
+
ticks: number;
|
|
876
|
+
sourceTypes: string[];
|
|
877
|
+
msSinceOpened: number;
|
|
878
|
+
/** First tick of this source type in the window. */
|
|
879
|
+
firstOfSource: boolean;
|
|
880
|
+
};
|
|
881
|
+
/** What a coalesce window gathered, read at its dispatch (web: same file `LocalKScriptLiveCoalesceFlush`). */
|
|
882
|
+
export type WrunLiveCoalesceFlush = {
|
|
883
|
+
ticks: number;
|
|
884
|
+
sourceTypes: string[];
|
|
885
|
+
ticksBySourceType: Record<string, number>;
|
|
886
|
+
/** Actual time from the window's first tick to its dispatch. */
|
|
887
|
+
heldMs: number;
|
|
888
|
+
};
|
|
889
|
+
/** One overlay execution measure (web: utility/chart/overlay-execution-guard.ts `OverlayExecutionMeasureResult`). */
|
|
890
|
+
export interface WrunOverlayMeasureResult {
|
|
891
|
+
ms: number;
|
|
892
|
+
tripped: boolean;
|
|
893
|
+
}
|
|
894
|
+
/** One source's degrade entry (web: utility/chart/kscript-source-degrade.util.ts `KScriptSourceDegradeEntry`). */
|
|
895
|
+
export interface WrunSourceDegradeEntry {
|
|
896
|
+
sourceName: string;
|
|
897
|
+
sourceType: string;
|
|
898
|
+
phase: 'pending' | 'degraded' | 'recovered';
|
|
899
|
+
/** Wall clock the current request for this source started (pending) or degraded. */
|
|
900
|
+
sinceMs: number;
|
|
901
|
+
/** `budget` for a budget expiry, otherwise the envelope code of the rejection. */
|
|
902
|
+
cause?: string;
|
|
903
|
+
/** Whether the ladder is armed for this source (false for non-retryable rejections). */
|
|
904
|
+
retryable: boolean;
|
|
905
|
+
attempt: number;
|
|
906
|
+
/** The source delivered at least once in the current source set. */
|
|
907
|
+
landedBefore: boolean;
|
|
908
|
+
/** Nothing more will be tried on its own: non-retryable rejection, or the recovery ladder is exhausted. */
|
|
909
|
+
terminal: boolean;
|
|
910
|
+
/** The browser-run Indicator's own word for a terminal entry: the canonical refusal record (`serializeWrunRefusal`). */
|
|
911
|
+
refusal?: string;
|
|
912
|
+
}
|
|
913
|
+
/** A run result's contrast guard context (web: utility/chart/kscript-contrast-guard.util.ts
|
|
914
|
+
* `KScriptContrastGuardContext`). */
|
|
915
|
+
export interface WrunContrastGuardContext {
|
|
916
|
+
/** Opaque hex of the chart background the colors are judged against. */
|
|
917
|
+
background: string;
|
|
918
|
+
/** Exemption keys of the user-picked colors: a painted value whose key is here passes through untouched. */
|
|
919
|
+
exempt: ReadonlySet<string>;
|
|
920
|
+
/** The chart palette a `theme.<t>` word resolves against (a flagged WRUN overlay). */
|
|
921
|
+
palette?: WrunColorTheme;
|
|
922
|
+
/** false = a token-only context: tokens resolve, no colour is ever contrast-guarded. Absent = guarded. */
|
|
923
|
+
contrast?: boolean;
|
|
924
|
+
}
|
|
925
|
+
/** One workspace row as the stand-in judges it, with the pane side it is saved under: U5a's leaf, moved into the
|
|
926
|
+
* package at X2 (web's utility/chart/kscript-standin.util.ts re-exports it). */
|
|
927
|
+
import type { KScriptStandInRow as WrunStandInRow } from './utility/chart/kscript-standin-identity.leaf.js';
|
|
928
|
+
export type { WrunStandInRow };
|
|
929
|
+
/** How a stand-in write ended: U5a's leaf, moved into the package at X2 (web's kscript-standin.util.ts re-exports it). */
|
|
930
|
+
import type { KScriptStandInWriteOutcome as WrunStandInWriteOutcome } from './utility/chart/kscript-standin-identity.leaf.js';
|
|
931
|
+
export type { WrunStandInWriteOutcome };
|
|
932
|
+
/** The chart a stand-in is written for or painted on (web: kscript-standin.util.ts `KScriptStandInChart`). */
|
|
933
|
+
export interface WrunStandInChart {
|
|
934
|
+
chartIndex: number;
|
|
935
|
+
exchange?: unknown;
|
|
936
|
+
symbol?: unknown;
|
|
937
|
+
interval?: unknown;
|
|
938
|
+
transformations?: unknown;
|
|
939
|
+
/** The signed-in account the chart is viewed by (none reads as the guest). */
|
|
940
|
+
account?: string | null;
|
|
941
|
+
}
|
|
942
|
+
/** The engine surface a stand-in uses: the adapter's chart view plus mount, removal, batch and the load state (web:
|
|
943
|
+
* kscript-standin.util.ts `KScriptStandInTarget`). */
|
|
944
|
+
export type WrunStandInTarget = WrunIntegrationTarget & {
|
|
945
|
+
metadata: unknown[];
|
|
946
|
+
addOverlay(config: Record<string, unknown>): void;
|
|
947
|
+
removeOverlay(id: string): void;
|
|
948
|
+
batch?: (fn: () => void) => void;
|
|
949
|
+
updateLoadState?: (id: string, loading: boolean) => void;
|
|
950
|
+
};
|
|
951
|
+
/** A stand-in write's ask (web: kscript-standin.util.ts `writeKScriptStandIn`'s argument). */
|
|
952
|
+
export interface WrunStandInWriteArgs {
|
|
953
|
+
chartIndex: number;
|
|
954
|
+
overlayId: string;
|
|
955
|
+
row: WrunStandInRow | null | undefined;
|
|
956
|
+
chart: WrunStandInChart;
|
|
957
|
+
engineScript: unknown;
|
|
958
|
+
runResult: unknown;
|
|
959
|
+
live: boolean;
|
|
960
|
+
/** The chart's candles when the result was accepted: its last bar stamps the picture. */
|
|
961
|
+
mainRows: readonly unknown[];
|
|
962
|
+
chartIntervalMs: number;
|
|
963
|
+
runInterval: WrunOverlayRunInterval | null | undefined;
|
|
964
|
+
nowMs?: number;
|
|
965
|
+
}
|
|
966
|
+
/** Why the chart's end-of-data marker shows (web: utility/chart/end-of-data-marker.util.ts `EndOfDataMarkerReason`). */
|
|
967
|
+
export type WrunEndOfDataMarkerReason = HistoryWallKind | 'layout-cap';
|
|
968
|
+
/** A declared-depth ask made before a run: the lane's declared lookback, known without a result (web:
|
|
969
|
+
* `LocalKScriptDeclaredDepthAsk`; the engine is the chart handle, rule 1.1). */
|
|
970
|
+
export interface WrunDeclaredDepthAsk {
|
|
971
|
+
chartIndex: number;
|
|
972
|
+
indicatorId: string;
|
|
973
|
+
tc: WrunChartHandle;
|
|
974
|
+
chartMeta: {
|
|
975
|
+
exchange?: string;
|
|
976
|
+
symbol?: string;
|
|
977
|
+
interval?: string;
|
|
978
|
+
} | undefined;
|
|
979
|
+
/** The declared lookback in bars of the chart interval. */
|
|
980
|
+
lookbackBars: number;
|
|
981
|
+
requestOlderHistory: (range: {
|
|
982
|
+
startTs: number;
|
|
983
|
+
endTs: number;
|
|
984
|
+
}) => void;
|
|
985
|
+
ringDetails?: Record<string, unknown>;
|
|
986
|
+
}
|
|
987
|
+
/** What one integrated result shows about its warm-up, in the decider's terms (web: `LocalKScriptWarmupEvidence`; an
|
|
988
|
+
* output is local-kscript-warmup-depth.util.ts `WarmupOutputLike`). */
|
|
989
|
+
export interface WrunWarmupEvidence {
|
|
990
|
+
/** The result's plotted outputs; the dense line-like ones carry the evidence. */
|
|
991
|
+
outputs: {
|
|
992
|
+
plotType?: unknown;
|
|
993
|
+
rows?: ReadonlyArray<ReadonlyArray<unknown>> | null;
|
|
994
|
+
}[];
|
|
995
|
+
/** The executed script's declared lookback in bars, null when unknown. */
|
|
996
|
+
lookbackBars: number | null;
|
|
997
|
+
/** Every source the run read settled: an all-NaN run (and a no-progress verdict) is evidence only then. */
|
|
998
|
+
sourcesSettled: boolean;
|
|
999
|
+
/** First bar of the timeline the result ran on, null when unknown. */
|
|
1000
|
+
runWindowStartTs: number | null;
|
|
1001
|
+
/** The lane's replay cap in clock-time bars; absent when a run replays the whole loaded window. */
|
|
1002
|
+
replayCapBars?: number;
|
|
1003
|
+
/** The bar the result's declared warm-up ends at, null or absent when it declares none. */
|
|
1004
|
+
declaredWarmupEndTs?: number | null;
|
|
1005
|
+
}
|
|
1006
|
+
/** A warm-up backfill ask after a run (web: `LocalKScriptWarmupBackfillAsk`; the engine is the chart handle). */
|
|
1007
|
+
export interface WrunWarmupBackfillAsk {
|
|
1008
|
+
chartIndex: number;
|
|
1009
|
+
indicatorId: string;
|
|
1010
|
+
/** The engine the result was integrated on. */
|
|
1011
|
+
tc: WrunChartHandle;
|
|
1012
|
+
/** The chart's market and interval: the ledger identity and the history-cap context. */
|
|
1013
|
+
chartMeta: {
|
|
1014
|
+
exchange?: string;
|
|
1015
|
+
symbol?: string;
|
|
1016
|
+
interval?: string;
|
|
1017
|
+
} | undefined;
|
|
1018
|
+
/** The result's evidence, read again on every attempt; null when the result carries no outputs. */
|
|
1019
|
+
readEvidence: () => WrunWarmupEvidence | null;
|
|
1020
|
+
/** Ask for one page of older candles over this range: the lazy-load path a user pan-back takes. */
|
|
1021
|
+
requestOlderHistory: (range: {
|
|
1022
|
+
startTs: number;
|
|
1023
|
+
endTs: number;
|
|
1024
|
+
}) => void;
|
|
1025
|
+
/** Merged into every ring line of this ask. */
|
|
1026
|
+
ringDetails?: Record<string, unknown>;
|
|
1027
|
+
/** The chart still holds the state the result was computed for; false skips the ask. */
|
|
1028
|
+
isCurrent?: () => boolean;
|
|
1029
|
+
}
|
|
1030
|
+
/** What a warm-up backfill decision did (web: local-kscript-warmup-backfill.util.ts
|
|
1031
|
+
* `LocalKScriptWarmupBackfillOutcome`; the reasons of local-kscript-warmup-depth.util.ts and the decider's own). */
|
|
1032
|
+
export interface WrunWarmupBackfillOutcome {
|
|
1033
|
+
requested: boolean;
|
|
1034
|
+
reason: 'warmup-visible' | 'no-values-yet' | 'declared-depth' | 'no-rows' | 'no-viewport' | 'warmup-offscreen' | 'gap-too-small' | 'rounds-exhausted' | 'left-exhausted' | 'gesture-active' | 'sources-pending' | 'zero-lookback-empty' | 'no-dense-output' | 'no-progress' | 'page-pending';
|
|
1035
|
+
roundsUsed: number;
|
|
1036
|
+
range?: {
|
|
1037
|
+
startTs: number;
|
|
1038
|
+
endTs: number;
|
|
1039
|
+
};
|
|
1040
|
+
/** Requested outcomes only: the page in loader terms, the bars the script can use, the whole gap or shortfall. */
|
|
1041
|
+
bars?: number;
|
|
1042
|
+
needBars?: number;
|
|
1043
|
+
missingBars?: number;
|
|
1044
|
+
/** Requested outcomes only: the declaration and the loaded window the decision measured. */
|
|
1045
|
+
lookbackBars?: number | null;
|
|
1046
|
+
loadedBars?: number | null;
|
|
1047
|
+
}
|
|
1048
|
+
/** The sheet slice the slot charge reads: utility/wrun/wrun-draft-overlay.util.ts, moved into the package with the
|
|
1049
|
+
* venue policy at X2. */
|
|
1050
|
+
import type { WrunSourceCountMetadataLike } from './utility/wrun/wrun-draft-overlay.util.js';
|
|
1051
|
+
export type { WrunSourceCountMetadataLike };
|
|
1052
|
+
/** One attempt's identity (web: wrun-attempt-envelope.util.ts `WrunAttemptToken`). */
|
|
1053
|
+
export type WrunAttemptToken = {
|
|
1054
|
+
key: string;
|
|
1055
|
+
generation: number;
|
|
1056
|
+
};
|
|
1057
|
+
/** An attempt's stage timings (web: wrun-attempt-envelope.util.ts `WrunAttemptStageMs`). */
|
|
1058
|
+
export type WrunAttemptStageMs = Partial<Record<'queueMs' | 'resolveMs' | 'downloadMs' | 'compileMs' | 'integrateMs' | 'warmupWaitMs', number>>;
|
|
1059
|
+
/** The closed failure vocabulary analytics receives (web: wrun-attempt-envelope.util.ts `WrunAttemptFailureReason`). */
|
|
1060
|
+
export type WrunAttemptFailureReason = 'refused' | 'source-unavailable' | 'no-bars' | 'chart-gone' | 'compute-error' | 'integration-error' | 'timeout' | 'cancelled' | 'other';
|
|
1061
|
+
/** A failed attempt's outcome: its reason and, when the rejection carries a refusal record, the record's class (web:
|
|
1062
|
+
* wrun-attempt-envelope.util.ts `WrunAttemptFailure`). */
|
|
1063
|
+
export type WrunAttemptFailure = {
|
|
1064
|
+
reason: WrunAttemptFailureReason;
|
|
1065
|
+
refusal?: WrunRefusalClass;
|
|
1066
|
+
};
|
|
1067
|
+
/** How an attempt settled (web: `settleWrunAttempt`'s outcome). */
|
|
1068
|
+
export type WrunAttemptOutcome = {
|
|
1069
|
+
ok: true;
|
|
1070
|
+
} | ({
|
|
1071
|
+
ok: false;
|
|
1072
|
+
} & (WrunAttemptFailure | {
|
|
1073
|
+
error: unknown;
|
|
1074
|
+
}));
|
|
1075
|
+
/** Where a wrun failure showed: the overlay's legend chip, or its toast (web: utils/analyticsEvents.ts
|
|
1076
|
+
* `WrunFailureSurface`). */
|
|
1077
|
+
export type WrunFailureSurface = 'legend' | 'toast';
|
|
1078
|
+
/** The facts of the attempt a show belongs to, read when it showed (web: wrun-failure-shown.util.ts
|
|
1079
|
+
* `WrunFailureAttempt`). */
|
|
1080
|
+
export interface WrunFailureAttempt {
|
|
1081
|
+
/** The attempt's identity (`<chart>:<overlay>#<generation>`): the dedupe scope. */
|
|
1082
|
+
id: string;
|
|
1083
|
+
origin: 'user' | 'system';
|
|
1084
|
+
/** Its reason and its open (`performance.now()`); absent once the token no longer names the live attempt. */
|
|
1085
|
+
reason?: WrunRunReason | 'mount';
|
|
1086
|
+
openedAt?: number;
|
|
1087
|
+
}
|
|
1088
|
+
/** What a writer hands the failure door: where the failure showed, on which overlay, and what showed (web:
|
|
1089
|
+
* wrun-failure-shown.util.ts `WrunFailureShow`; `state` is the inert legend's `WrunInertLegendState`). */
|
|
1090
|
+
export interface WrunFailureShow {
|
|
1091
|
+
surface: WrunFailureSurface;
|
|
1092
|
+
/** The chart engine that showed it: the overlay's settings (its package and lane) are read off its meta. */
|
|
1093
|
+
tc: unknown;
|
|
1094
|
+
indicatorId: string;
|
|
1095
|
+
/** The attempt it belongs to: null when none is open (a cloud restore), absent when the writer knows none. */
|
|
1096
|
+
attempt?: WrunFailureAttempt | null;
|
|
1097
|
+
/** An inert-legend state (a run's or a live tick's refusal record, the source error), or the
|
|
1098
|
+
* runtime-diagnostics rows a legend write or a toast showed. */
|
|
1099
|
+
state?: {
|
|
1100
|
+
kind: 'source-error';
|
|
1101
|
+
message: string;
|
|
1102
|
+
} | {
|
|
1103
|
+
kind: 'refusal';
|
|
1104
|
+
refusal: WrunRefusal;
|
|
1105
|
+
owner: 'run' | 'tick';
|
|
1106
|
+
};
|
|
1107
|
+
diagnostics?: readonly RuntimeDiagnostic[];
|
|
1108
|
+
/** A coded failure shown without a record or a row: its code and the i18n key of the words it showed. */
|
|
1109
|
+
failure?: {
|
|
1110
|
+
code: string;
|
|
1111
|
+
chip: string;
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
/** Loader view of the editor shell store: its open tabs (web: store/editor-shell.ts `useEditorShellStore`). */
|
|
1115
|
+
export interface WrunEditorShellModule {
|
|
1116
|
+
useEditorShellStore(): {
|
|
1117
|
+
readonly openTabs: ReadonlyArray<{
|
|
1118
|
+
readonly id: string;
|
|
1119
|
+
readonly scriptId?: string;
|
|
1120
|
+
}>;
|
|
1121
|
+
};
|
|
1122
|
+
}
|
|
1123
|
+
/** Loader view of the refusal actions: the refusal toast (web: utility/wrun/wrun-refusal-actions.util.ts). */
|
|
1124
|
+
export interface WrunRefusalActionsModule {
|
|
1125
|
+
toastWrunRefusal(r: WrunRefusal, target: WrunRefusalOverlayTarget): void;
|
|
1126
|
+
}
|
|
1127
|
+
/** The slice of a chart engine the hover surfaces read (web: utility/wrun/wrun-legend-hover.ts `WrunHoverChart`). */
|
|
1128
|
+
export interface WrunHoverChart extends WrunVisibilityChart, WrunPaneFormatChart {
|
|
1129
|
+
metadata?: ReadonlyArray<{
|
|
1130
|
+
id?: unknown;
|
|
1131
|
+
type?: unknown;
|
|
1132
|
+
hostPaneId?: unknown;
|
|
1133
|
+
nestedMeta?: unknown;
|
|
1134
|
+
isHidden?: unknown;
|
|
1135
|
+
settings?: unknown;
|
|
1136
|
+
}>;
|
|
1137
|
+
canvasChartController?: {
|
|
1138
|
+
ts?: ReadonlyArray<{
|
|
1139
|
+
gridId?: unknown;
|
|
1140
|
+
priceToPx?: (price: number, raw?: boolean) => number;
|
|
1141
|
+
}>;
|
|
1142
|
+
canvasElement?: {
|
|
1143
|
+
getBoundingClientRect?: () => {
|
|
1144
|
+
left: number;
|
|
1145
|
+
top: number;
|
|
1146
|
+
};
|
|
1147
|
+
} | null;
|
|
1148
|
+
} | null;
|
|
1149
|
+
/** The chart's bar interval (ms): the card's bar time follows the axis's offset rule for it. */
|
|
1150
|
+
interval?: number;
|
|
1151
|
+
}
|
|
1152
|
+
/** A chart's attached hover surfaces (web: wrun-legend-hover.ts `WrunHoverSurfaces`; the engine's hover event is
|
|
1153
|
+
* unknown here). */
|
|
1154
|
+
export interface WrunHoverSurfaces {
|
|
1155
|
+
/** The engine's hover event, after the profile-cell branch flushed. */
|
|
1156
|
+
onHover(event: unknown): void;
|
|
1157
|
+
detach(): void;
|
|
1158
|
+
}
|
|
1159
|
+
/** Loader view of the legend hover (web: wrun-legend-hover.ts). */
|
|
1160
|
+
export interface WrunLegendHoverModule {
|
|
1161
|
+
attachWrunHoverSurfaces(chartIndex: number, chart: WrunHoverChart): WrunHoverSurfaces;
|
|
1162
|
+
}
|
|
1163
|
+
/** The run chart's market a console refusal names (web: utility/scriptEditor/console-routing.util.ts
|
|
1164
|
+
* `WrunConsoleRefusalChart`). */
|
|
1165
|
+
export interface WrunConsoleRefusalChart {
|
|
1166
|
+
exchange?: unknown;
|
|
1167
|
+
symbol?: unknown;
|
|
1168
|
+
coin?: unknown;
|
|
1169
|
+
interval?: unknown;
|
|
1170
|
+
}
|
|
1171
|
+
/** The run a console refusal record is built for (web: console-routing.util.ts `WrunConsoleRefusalRun`). */
|
|
1172
|
+
export interface WrunConsoleRefusalRun {
|
|
1173
|
+
/** The declared name (wrunRunDisplayName): the record names the Indicator by it. */
|
|
1174
|
+
indicatorName: string;
|
|
1175
|
+
/** The run chart's market; absent once that chart is gone. */
|
|
1176
|
+
chart?: WrunConsoleRefusalChart | null;
|
|
1177
|
+
/** The tab's compiled sheet, whose inputs pick the switch target; null before a build and for kScript. */
|
|
1178
|
+
sheet?: WrunIndicatorMetadata | null;
|
|
1179
|
+
/** The way out runs on the mounted overlay (its settings can open); a draft target has no settings. */
|
|
1180
|
+
overlay: boolean;
|
|
1181
|
+
}
|
|
1182
|
+
/** The sheet slice the signal sounds read (web: utility/wrun/wrun-signal-sounds-live.util.ts, its unexported
|
|
1183
|
+
* `SheetLike`). */
|
|
1184
|
+
export interface WrunSignalSheetView {
|
|
1185
|
+
outputs?: ReadonlyArray<{
|
|
1186
|
+
index: number;
|
|
1187
|
+
name: string;
|
|
1188
|
+
}>;
|
|
1189
|
+
alerts?: unknown;
|
|
1190
|
+
}
|
|
1191
|
+
/** A live drain's signal sound check (web: wrun-signal-sounds-live.util.ts `WrunSignalSoundCheck`; a sound id is a
|
|
1192
|
+
* string). */
|
|
1193
|
+
export interface WrunSignalSoundCheck {
|
|
1194
|
+
/** Compares the merged rows with the drain's start and plays the update's one sound; returns it, or null. */
|
|
1195
|
+
finish(after: ReadonlyArray<WrunOutputRow>): string | null;
|
|
1196
|
+
}
|
|
1197
|
+
/** How a hidden live drain landed (web: hidden-live-drain.util.ts `HiddenLiveDrainOutcome`). */
|
|
1198
|
+
export type WrunHiddenLiveDrainOutcome = 'acked' | 'timeout' | 'none';
|
|
1199
|
+
/** How a worker proves itself up (web: worker-factory.util.ts `WorkerReadiness`). */
|
|
1200
|
+
export interface WrunWorkerReadiness {
|
|
1201
|
+
/** `handshake`: the worker posts `{ type: 'ready' }` once its module evaluated (any other message first counts too).
|
|
1202
|
+
* `first-message`: any message proves the worker up. */
|
|
1203
|
+
mode: 'handshake' | 'first-message';
|
|
1204
|
+
/** Visible time the worker gets to prove itself up; absent: no deadline. */
|
|
1205
|
+
deadlineMs?: number;
|
|
1206
|
+
}
|
|
1207
|
+
/** How an engine worker incarnation died (web: worker-factory.util.ts `ManagedWorkerDeath`). */
|
|
1208
|
+
export interface WrunEngineWorkerDeath {
|
|
1209
|
+
reason: 'script-load' | 'crash' | 'ready-timeout';
|
|
1210
|
+
/** The error event's own words: '' when the browser gave none and for a missed deadline. */
|
|
1211
|
+
message: string;
|
|
1212
|
+
/** The error event, null for a missed deadline. */
|
|
1213
|
+
event: Event | null;
|
|
1214
|
+
/** The worker script, origin + path. */
|
|
1215
|
+
url: string | null;
|
|
1216
|
+
/** The HTTP status the browser recorded for the script, null when it recorded none. */
|
|
1217
|
+
status: number | null;
|
|
1218
|
+
/** Whether the worker had proven itself up before it died. */
|
|
1219
|
+
ready: boolean;
|
|
1220
|
+
}
|
|
1221
|
+
/** What the run host asks of its engine worker (web: worker-factory.util.ts `ManagedWorkerOptions`, the `readiness`,
|
|
1222
|
+
* `onMessage` and `onDead` it sets; the chunk failure `source` is an app union the web binder supplies). */
|
|
1223
|
+
export interface WrunEngineWorkerOptions {
|
|
1224
|
+
readiness: WrunWorkerReadiness;
|
|
1225
|
+
/** Every message but the handshake's own, from the live incarnation only. */
|
|
1226
|
+
onMessage(event: MessageEvent): void;
|
|
1227
|
+
/** The incarnation died (already terminated); it delivers nothing more. */
|
|
1228
|
+
onDead(death: WrunEngineWorkerDeath): void;
|
|
1229
|
+
}
|
|
1230
|
+
/** One engine worker incarnation (web: worker-factory.util.ts `ManagedWorker`). */
|
|
1231
|
+
export interface WrunEngineWorker {
|
|
1232
|
+
/** This incarnation's Worker (a perf tap's replay worker when the tap substituted one). */
|
|
1233
|
+
readonly worker: Worker;
|
|
1234
|
+
postMessage(message: unknown, transfer?: Transferable[]): void;
|
|
1235
|
+
/** Ends the incarnation: terminates the Worker, drops its deadline; its later events reach nobody. Idempotent. */
|
|
1236
|
+
terminate(): void;
|
|
1237
|
+
readonly ready: boolean;
|
|
1238
|
+
/** Dead or terminated. */
|
|
1239
|
+
readonly retired: boolean;
|
|
1240
|
+
/** The worker script, origin + path; null when it was not recorded (a substituted worker). */
|
|
1241
|
+
readonly scriptUrl: string | null;
|
|
1242
|
+
/** The HTTP status the browser recorded for the script, null when it recorded none. */
|
|
1243
|
+
scriptStatus(): number | null;
|
|
1244
|
+
}
|
|
1245
|
+
/** Loader view of the socket transport's web half: its evaluation binds the socket members (web:
|
|
1246
|
+
* utility/wrun/wrun-socket-transport.ts). */
|
|
1247
|
+
export interface WrunSocketTransportModule {
|
|
1248
|
+
createWrunSocketTransport(identity: WrunHostOverlayRef): WrunSocketTransport;
|
|
1249
|
+
releaseWrunSocketCapability(chartIndex: number, indicatorId: string): void;
|
|
1250
|
+
routeWrunSocketLiveFrame(chartIndex: number, indicatorId: string, output: unknown): boolean;
|
|
1251
|
+
}
|
|
1252
|
+
/** Loader view of the live feed service: the row sources' live route binder (web: services/live-feed.service.ts). */
|
|
1253
|
+
export interface WrunLiveFeedServiceModule {
|
|
1254
|
+
bindWrunRowSourceLiveRoute(route: (chartIndex: number, indicatorId: string, output: unknown) => boolean): void;
|
|
1255
|
+
}
|