@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.
Files changed (362) hide show
  1. package/README.md +23 -6
  2. package/dist/constants/exchange-names.leaf.d.ts +8 -0
  3. package/dist/constants/exchange-names.leaf.js +101 -0
  4. package/dist/constants/kscript-data-interval-restrictions.constants.d.ts +15 -0
  5. package/dist/constants/kscript-data-interval-restrictions.constants.js +40 -0
  6. package/dist/constants/opra-compliance.constants.d.ts +19 -0
  7. package/dist/constants/opra-compliance.constants.js +19 -0
  8. package/dist/constants/replay-ladder.leaf.d.ts +30 -0
  9. package/dist/constants/replay-ladder.leaf.js +99 -0
  10. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +133 -0
  11. package/dist/constants/scriptEditor/builtin-script-snippets.js +451 -0
  12. package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +168 -0
  13. package/dist/constants/scriptEditor/cme-official-scripts.constants.js +398 -0
  14. package/dist/constants/scriptEditor/converted-script-id.leaf.d.ts +8 -0
  15. package/dist/constants/scriptEditor/converted-script-id.leaf.js +10 -0
  16. package/dist/constants/scriptEditor/execution.constants.d.ts +4 -0
  17. package/dist/constants/scriptEditor/execution.constants.js +14 -0
  18. package/dist/constants/wrun-prefix-safe.constants.d.ts +23 -0
  19. package/dist/constants/wrun-prefix-safe.constants.js +26 -0
  20. package/dist/host-env.d.ts +321 -24
  21. package/dist/host-env.js +15 -0
  22. package/dist/host-ports.types.d.ts +857 -35
  23. package/dist/index.d.ts +149 -2
  24. package/dist/index.js +149 -2
  25. package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +31 -0
  26. package/dist/instances/script-engine-worker-ohlcv-transfer.js +164 -0
  27. package/dist/interfaces/market-event.interface.d.ts +231 -0
  28. package/dist/interfaces/market-event.interface.js +15 -0
  29. package/dist/interfaces/opra-realtime.interface.d.ts +70 -134
  30. package/dist/interfaces/opra-realtime.interface.js +34 -59
  31. package/dist/interfaces/replay.interface.d.ts +285 -0
  32. package/dist/interfaces/replay.interface.js +1 -0
  33. package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +1 -0
  34. package/dist/kscript-data/controls/live-ohlcv-merge.util.js +93 -0
  35. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +5 -1
  36. package/dist/kscript-data/controls/live-trades-merge.util.js +2 -2
  37. package/dist/market-data/billing.interface.d.ts +219 -0
  38. package/dist/market-data/billing.interface.js +58 -0
  39. package/dist/market-data/venue-governed.util.d.ts +2 -0
  40. package/dist/market-data/venue-governed.util.js +10 -0
  41. package/dist/market-data/venue.d.ts +122 -0
  42. package/dist/market-data/venue.js +1 -0
  43. package/dist/market-data/venues/index.d.ts +97 -0
  44. package/dist/market-data/venues/index.js +33 -0
  45. package/dist/market-data/venues/opra.contract.copy.json +35 -0
  46. package/dist/market-data/venues/opra.d.ts +70 -0
  47. package/dist/market-data/venues/opra.js +74 -0
  48. package/dist/replay/replayIndicatorRows.d.ts +31 -0
  49. package/dist/replay/replayIndicatorRows.js +117 -0
  50. package/dist/replay/replayLadder.d.ts +85 -0
  51. package/dist/replay/replayLadder.js +388 -0
  52. package/dist/utility/auth/server-clock.util.d.ts +81 -0
  53. package/dist/utility/auth/server-clock.util.js +238 -0
  54. package/dist/utility/chart/builtin-identity.util.d.ts +18 -0
  55. package/dist/utility/chart/builtin-identity.util.js +51 -0
  56. package/dist/utility/chart/cache-alignment.util.d.ts +454 -0
  57. package/dist/utility/chart/cache-alignment.util.js +926 -0
  58. package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +15 -0
  59. package/dist/utility/chart/chart-data-fetch-generation.util.js +22 -0
  60. package/dist/utility/chart/chart-mount-epoch.util.d.ts +5 -0
  61. package/dist/utility/chart/chart-mount-epoch.util.js +29 -0
  62. package/dist/utility/chart/chart-time-domain.util.d.ts +12 -0
  63. package/dist/utility/chart/chart-time-domain.util.js +23 -0
  64. package/dist/utility/chart/color-customization.leaf.d.ts +10 -0
  65. package/dist/utility/chart/color-customization.leaf.js +16 -0
  66. package/dist/utility/chart/date-labelled-interval.leaf.d.ts +15 -0
  67. package/dist/utility/chart/date-labelled-interval.leaf.js +19 -0
  68. package/dist/utility/chart/footprint-tick-grid.util.d.ts +106 -0
  69. package/dist/utility/chart/footprint-tick-grid.util.js +167 -0
  70. package/dist/utility/chart/gesture-timing.leaf.d.ts +29 -0
  71. package/dist/utility/chart/gesture-timing.leaf.js +29 -0
  72. package/dist/utility/chart/governed-contract-coin.util.d.ts +22 -0
  73. package/dist/utility/chart/governed-contract-coin.util.js +39 -0
  74. package/dist/utility/chart/host-bar-placement.util.d.ts +107 -0
  75. package/dist/utility/chart/host-bar-placement.util.js +447 -0
  76. package/dist/utility/chart/index-host-tier.util.d.ts +31 -0
  77. package/dist/utility/chart/index-host-tier.util.js +118 -0
  78. package/dist/utility/chart/index-mode-admission.util.d.ts +34 -0
  79. package/dist/utility/chart/index-mode-admission.util.js +67 -0
  80. package/dist/utility/chart/indicator-error-message.util.d.ts +35 -0
  81. package/dist/utility/chart/indicator-error-message.util.js +44 -0
  82. package/dist/utility/chart/indicator-run-interval.util.d.ts +130 -0
  83. package/dist/utility/chart/indicator-run-interval.util.js +268 -0
  84. package/dist/utility/chart/kscript-apply-fingerprint.util.d.ts +65 -0
  85. package/dist/utility/chart/kscript-apply-fingerprint.util.js +357 -0
  86. package/dist/utility/chart/kscript-chart-flush.leaf.d.ts +22 -0
  87. package/dist/utility/chart/kscript-chart-flush.leaf.js +13 -0
  88. package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +6 -0
  89. package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +27 -0
  90. package/dist/utility/chart/kscript-integration-decision.leaf.d.ts +89 -0
  91. package/dist/utility/chart/kscript-integration-decision.leaf.js +80 -0
  92. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +76 -0
  93. package/dist/utility/chart/kscript-live-coalesce.util.js +156 -0
  94. package/dist/utility/chart/kscript-live-rest-pace.util.d.ts +34 -0
  95. package/dist/utility/chart/kscript-live-rest-pace.util.js +134 -0
  96. package/dist/utility/chart/kscript-live-source-identity.util.d.ts +98 -0
  97. package/dist/utility/chart/kscript-live-source-identity.util.js +121 -0
  98. package/dist/utility/chart/kscript-mounted-plot-set.leaf.d.ts +48 -0
  99. package/dist/utility/chart/kscript-mounted-plot-set.leaf.js +145 -0
  100. package/dist/utility/chart/kscript-perf-tracker.util.d.ts +243 -0
  101. package/dist/utility/chart/kscript-perf-tracker.util.js +522 -0
  102. package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +43 -0
  103. package/dist/utility/chart/kscript-run-interval-projection.util.js +471 -0
  104. package/dist/utility/chart/kscript-run-result-equality.util.d.ts +38 -0
  105. package/dist/utility/chart/kscript-run-result-equality.util.js +89 -0
  106. package/dist/utility/chart/kscript-settings-revision.leaf.d.ts +2 -0
  107. package/dist/utility/chart/kscript-settings-revision.leaf.js +12 -0
  108. package/dist/utility/chart/kscript-source-degrade.leaf.d.ts +63 -0
  109. package/dist/utility/chart/kscript-source-degrade.leaf.js +68 -0
  110. package/dist/utility/chart/kscript-source-retention.util.d.ts +134 -0
  111. package/dist/utility/chart/kscript-source-retention.util.js +218 -0
  112. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +57 -0
  113. package/dist/utility/chart/kscript-standin-identity.leaf.js +61 -0
  114. package/dist/utility/chart/kscript-titancharts-preparation.util.d.ts +15 -0
  115. package/dist/utility/chart/kscript-titancharts-preparation.util.js +376 -0
  116. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +9 -0
  117. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +130 -0
  118. package/dist/utility/chart/kscript-venue-policy.util.d.ts +217 -0
  119. package/dist/utility/chart/kscript-venue-policy.util.js +324 -0
  120. package/dist/utility/chart/live-cadence.util.d.ts +38 -0
  121. package/dist/utility/chart/live-cadence.util.js +37 -0
  122. package/dist/utility/chart/live-feed-series-match.leaf.d.ts +13 -0
  123. package/dist/utility/chart/live-feed-series-match.leaf.js +21 -0
  124. package/dist/utility/chart/local-engine-self-heal-backoff.util.d.ts +46 -0
  125. package/dist/utility/chart/local-engine-self-heal-backoff.util.js +46 -0
  126. package/dist/utility/chart/local-engine-uninit.leaf.d.ts +21 -0
  127. package/dist/utility/chart/local-engine-uninit.leaf.js +22 -0
  128. package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +62 -0
  129. package/dist/utility/chart/local-kscript-source-revalidation.util.js +123 -0
  130. package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +214 -0
  131. package/dist/utility/chart/local-kscript-warmup-depth.util.js +376 -0
  132. package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.d.ts +85 -0
  133. package/dist/utility/chart/local-technical-script-live-apply-coalescer.util.js +197 -0
  134. package/dist/utility/chart/local-technical-script-range.leaf.d.ts +72 -0
  135. package/dist/utility/chart/local-technical-script-range.leaf.js +126 -0
  136. package/dist/utility/chart/mixed-mode.util.d.ts +167 -0
  137. package/dist/utility/chart/mixed-mode.util.js +139 -0
  138. package/dist/utility/chart/ohlcv-row-readiness.util.d.ts +36 -0
  139. package/dist/utility/chart/ohlcv-row-readiness.util.js +90 -0
  140. package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +19 -0
  141. package/dist/utility/chart/opra-user-scripts-gate.util.js +32 -0
  142. package/dist/utility/chart/overlay-execution-guard-key.leaf.d.ts +8 -0
  143. package/dist/utility/chart/overlay-execution-guard-key.leaf.js +10 -0
  144. package/dist/utility/chart/price-precision.util.d.ts +40 -0
  145. package/dist/utility/chart/price-precision.util.js +70 -0
  146. package/dist/utility/chart/profile-block-size.util.d.ts +64 -0
  147. package/dist/utility/chart/profile-block-size.util.js +141 -0
  148. package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.d.ts +11 -0
  149. package/dist/utility/chart/protected-kscript-degenerate-rows.leaf.js +29 -0
  150. package/dist/utility/chart/protected-kscript-empty-output.util.d.ts +28 -0
  151. package/dist/utility/chart/protected-kscript-empty-output.util.js +84 -0
  152. package/dist/utility/chart/run-interval-unservable.leaf.d.ts +9 -0
  153. package/dist/utility/chart/run-interval-unservable.leaf.js +20 -0
  154. package/dist/utility/chart/run-interval-warmup.leaf.d.ts +19 -0
  155. package/dist/utility/chart/run-interval-warmup.leaf.js +35 -0
  156. package/dist/utility/chart/titan-constants.pin.d.ts +9 -5
  157. package/dist/utility/chart/titan-constants.pin.js +18 -5
  158. package/dist/utility/chart/warmup-backfill-retry.leaf.d.ts +9 -0
  159. package/dist/utility/chart/warmup-backfill-retry.leaf.js +9 -0
  160. package/dist/utility/chart/window-geometry.leaf.d.ts +119 -0
  161. package/dist/utility/chart/window-geometry.leaf.js +391 -0
  162. package/dist/utility/chart/window-owner.leaf.d.ts +19 -0
  163. package/dist/utility/chart/window-owner.leaf.js +24 -0
  164. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +11 -2
  165. package/dist/utility/chart/wrun-bar-session-facts.util.js +10 -3
  166. package/dist/utility/chart/wrun-run-result.util.d.ts +5 -1
  167. package/dist/utility/chart/wrun-run-result.util.js +20 -14
  168. package/dist/utility/common/data-processing.util.d.ts +138 -0
  169. package/dist/utility/common/data-processing.util.js +346 -0
  170. package/dist/utility/common/visible-timeout.util.d.ts +13 -4
  171. package/dist/utility/common/visible-timeout.util.js +23 -8
  172. package/dist/utility/exchange-format.leaf.d.ts +1 -0
  173. package/dist/utility/exchange-format.leaf.js +47 -0
  174. package/dist/utility/html-escape.leaf.d.ts +11 -0
  175. package/dist/utility/html-escape.leaf.js +20 -0
  176. package/dist/utility/market-events/earnings-scope.util.d.ts +60 -0
  177. package/dist/utility/market-events/earnings-scope.util.js +92 -0
  178. package/dist/utility/market-events/market-events.util.d.ts +147 -0
  179. package/dist/utility/market-events/market-events.util.js +392 -0
  180. package/dist/utility/market-events/zoned-clock.util.d.ts +1 -0
  181. package/dist/utility/market-events/zoned-clock.util.js +11 -0
  182. package/dist/utility/options/option-venue-disclosure.util.d.ts +43 -0
  183. package/dist/utility/options/option-venue-disclosure.util.js +56 -0
  184. package/dist/utility/scriptEditor/package-semver.util.d.ts +51 -0
  185. package/dist/utility/scriptEditor/package-semver.util.js +120 -0
  186. package/dist/utility/scriptEditor/temp-script-id.util.d.ts +18 -0
  187. package/dist/utility/scriptEditor/temp-script-id.util.js +25 -0
  188. package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.d.ts +20 -0
  189. package/dist/utility/symbol-selection/markets-request-from-symbols.leaf.js +81 -0
  190. package/dist/utility/v2/governed-tier.leaf.d.ts +103 -0
  191. package/dist/utility/v2/governed-tier.leaf.js +113 -0
  192. package/dist/utility/watchlist/import/import-request.leaf.d.ts +10 -0
  193. package/dist/utility/watchlist/import/import-request.leaf.js +10 -0
  194. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +43 -15
  195. package/dist/utility/wrun/sources/lanes/option_daily.js +78 -20
  196. package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +14 -10
  197. package/dist/utility/wrun/sources/lanes/option_stats_10m.js +5 -4
  198. package/dist/utility/wrun/sources/lanes/series.js +2 -2
  199. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +22 -3
  200. package/dist/utility/wrun/sources/opra-option-lanes.util.js +38 -7
  201. package/dist/utility/wrun/sources/registry.js +31 -1
  202. package/dist/utility/wrun/sources/row-lane-registry.js +5 -5
  203. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +49 -0
  204. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +75 -20
  205. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +49 -0
  206. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +57 -47
  207. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +36 -4
  208. package/dist/utility/wrun/sources/row-lanes/option_surface.js +6 -12
  209. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +37 -3
  210. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +128 -2
  211. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +233 -51
  212. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +0 -8
  213. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +26 -24
  214. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +85 -104
  215. package/dist/utility/wrun/wrun-alert-outputs.registry.d.ts +166 -0
  216. package/dist/utility/wrun/wrun-alert-outputs.registry.js +219 -0
  217. package/dist/utility/wrun/wrun-bar-count.util.d.ts +83 -0
  218. package/dist/utility/wrun/wrun-bar-count.util.js +259 -0
  219. package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +84 -0
  220. package/dist/utility/wrun/wrun-chart-context-names.util.js +186 -0
  221. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +253 -0
  222. package/dist/utility/wrun/wrun-chart-market-facts.util.js +731 -0
  223. package/dist/utility/wrun/wrun-cloud-opra-stamp.util.d.ts +28 -0
  224. package/dist/utility/wrun/wrun-cloud-opra-stamp.util.js +45 -0
  225. package/dist/utility/wrun/wrun-coin-lane-live.util.d.ts +18 -0
  226. package/dist/utility/wrun/wrun-coin-lane-live.util.js +47 -0
  227. package/dist/utility/wrun/wrun-deadline.util.js +2 -1
  228. package/dist/utility/wrun/wrun-debug-output.util.d.ts +39 -0
  229. package/dist/utility/wrun/wrun-debug-output.util.js +63 -0
  230. package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +113 -0
  231. package/dist/utility/wrun/wrun-declared-warmup.util.js +181 -0
  232. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +43 -0
  233. package/dist/utility/wrun/wrun-draft-legend-note.util.js +158 -0
  234. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +181 -0
  235. package/dist/utility/wrun/wrun-draft-overlay.util.js +357 -0
  236. package/dist/utility/wrun/wrun-draw-skipped.leaf.d.ts +16 -0
  237. package/dist/utility/wrun/wrun-draw-skipped.leaf.js +16 -0
  238. package/dist/utility/wrun/wrun-earnings-facts.util.d.ts +42 -0
  239. package/dist/utility/wrun/wrun-earnings-facts.util.js +131 -0
  240. package/dist/utility/wrun/wrun-first-run-depth.util.d.ts +32 -0
  241. package/dist/utility/wrun/wrun-first-run-depth.util.js +118 -0
  242. package/dist/utility/wrun/wrun-gate-plane-readers.util.d.ts +24 -0
  243. package/dist/utility/wrun/wrun-gate-plane-readers.util.js +31 -0
  244. package/dist/utility/wrun/wrun-held-lanes.util.d.ts +32 -0
  245. package/dist/utility/wrun/wrun-held-lanes.util.js +94 -0
  246. package/dist/utility/wrun/wrun-host-visible-clock.util.d.ts +2 -0
  247. package/dist/utility/wrun/wrun-host-visible-clock.util.js +17 -0
  248. package/dist/utility/wrun/wrun-host.service.d.ts +266 -0
  249. package/dist/utility/wrun/wrun-host.service.js +655 -0
  250. package/dist/utility/wrun/wrun-inert-legend.util.d.ts +33 -0
  251. package/dist/utility/wrun/wrun-inert-legend.util.js +125 -0
  252. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +155 -0
  253. package/dist/utility/wrun/wrun-input-requirements.leaf.js +450 -0
  254. package/dist/utility/wrun/wrun-integration-route.util.d.ts +51 -0
  255. package/dist/utility/wrun/wrun-integration-route.util.js +59 -0
  256. package/dist/utility/wrun/wrun-latest-history.leaf.d.ts +8 -0
  257. package/dist/utility/wrun/wrun-latest-history.leaf.js +8 -0
  258. package/dist/utility/wrun/wrun-legend-hover.lazy.d.ts +12 -0
  259. package/dist/utility/wrun/wrun-legend-hover.lazy.js +96 -0
  260. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +21 -0
  261. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +21 -0
  262. package/dist/utility/wrun/wrun-live-hidden-hold.util.d.ts +23 -0
  263. package/dist/utility/wrun/wrun-live-hidden-hold.util.js +13 -0
  264. package/dist/utility/wrun/wrun-live-intake.util.d.ts +374 -0
  265. package/dist/utility/wrun/wrun-live-intake.util.js +2027 -0
  266. package/dist/utility/wrun/wrun-live-patch.util.d.ts +116 -0
  267. package/dist/utility/wrun/wrun-live-patch.util.js +523 -0
  268. package/dist/utility/wrun/wrun-live-tick.util.d.ts +619 -0
  269. package/dist/utility/wrun/wrun-live-tick.util.js +4974 -0
  270. package/dist/utility/wrun/wrun-loading-owner.util.d.ts +58 -0
  271. package/dist/utility/wrun/wrun-loading-owner.util.js +89 -0
  272. package/dist/utility/wrun/wrun-official-scope.leaf.d.ts +29 -0
  273. package/dist/utility/wrun/wrun-official-scope.leaf.js +36 -0
  274. package/dist/utility/wrun/wrun-oi-lane.util.d.ts +27 -0
  275. package/dist/utility/wrun/wrun-oi-lane.util.js +42 -0
  276. package/dist/utility/wrun/wrun-opra-stats.leaf.d.ts +29 -10
  277. package/dist/utility/wrun/wrun-opra-stats.leaf.js +29 -10
  278. package/dist/utility/wrun/wrun-options-stop.util.d.ts +52 -0
  279. package/dist/utility/wrun/wrun-options-stop.util.js +123 -0
  280. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +719 -0
  281. package/dist/utility/wrun/wrun-overlay-drivers.util.js +1180 -0
  282. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +50 -0
  283. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +131 -0
  284. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +118 -0
  285. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +466 -0
  286. package/dist/utility/wrun/wrun-overlay-metadata.util.d.ts +45 -0
  287. package/dist/utility/wrun/wrun-overlay-metadata.util.js +112 -0
  288. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +114 -0
  289. package/dist/utility/wrun/wrun-overlay-recovery.util.js +971 -0
  290. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +858 -0
  291. package/dist/utility/wrun/wrun-overlay-run.util.js +11013 -0
  292. package/dist/utility/wrun/wrun-panel-mount.lazy.d.ts +10 -0
  293. package/dist/utility/wrun/wrun-panel-mount.lazy.js +68 -0
  294. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +392 -0
  295. package/dist/utility/wrun/wrun-panel-mount.util.js +2346 -0
  296. package/dist/utility/wrun/wrun-param-map.util.d.ts +19 -4
  297. package/dist/utility/wrun/wrun-param-map.util.js +40 -47
  298. package/dist/utility/wrun/wrun-param-values.util.d.ts +9 -3
  299. package/dist/utility/wrun/wrun-param-values.util.js +5 -5
  300. package/dist/utility/wrun/wrun-pause-dim.util.d.ts +52 -0
  301. package/dist/utility/wrun/wrun-pause-dim.util.js +153 -0
  302. package/dist/utility/wrun/wrun-plot-gate.types.d.ts +23 -0
  303. package/dist/utility/wrun/wrun-plot-gate.types.js +7 -0
  304. package/dist/utility/wrun/wrun-prefix-cohort.util.d.ts +93 -0
  305. package/dist/utility/wrun/wrun-prefix-cohort.util.js +484 -0
  306. package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +114 -0
  307. package/dist/utility/wrun/wrun-prefix-lanes.util.js +486 -0
  308. package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +317 -0
  309. package/dist/utility/wrun/wrun-prefix-proof.util.js +630 -0
  310. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +73 -0
  311. package/dist/utility/wrun/wrun-refusal-surface.util.js +380 -0
  312. package/dist/utility/wrun/wrun-refusal-text.util.d.ts +15 -0
  313. package/dist/utility/wrun/wrun-refusal-text.util.js +40 -0
  314. package/dist/utility/wrun/wrun-replay-lane.util.d.ts +139 -0
  315. package/dist/utility/wrun/wrun-replay-lane.util.js +520 -0
  316. package/dist/utility/wrun/wrun-replay-rows.util.d.ts +21 -0
  317. package/dist/utility/wrun/wrun-replay-rows.util.js +172 -0
  318. package/dist/utility/wrun/wrun-row-source-factory.d.ts +53 -0
  319. package/dist/utility/wrun/wrun-row-source-factory.js +435 -0
  320. package/dist/utility/wrun/wrun-run-cells.util.d.ts +36 -0
  321. package/dist/utility/wrun/wrun-run-cells.util.js +46 -0
  322. package/dist/utility/wrun/wrun-run-interval-projection.types.d.ts +14 -0
  323. package/dist/utility/wrun/wrun-run-interval-projection.types.js +1 -0
  324. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +133 -0
  325. package/dist/utility/wrun/wrun-run-interval-session.util.js +121 -0
  326. package/dist/utility/wrun/wrun-run-interval.util.d.ts +98 -0
  327. package/dist/utility/wrun/wrun-run-interval.util.js +207 -0
  328. package/dist/utility/wrun/wrun-run-retained.util.d.ts +122 -0
  329. package/dist/utility/wrun/wrun-run-retained.util.js +255 -0
  330. package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +184 -0
  331. package/dist/utility/wrun/wrun-sandbox-row-source.js +444 -0
  332. package/dist/utility/wrun/wrun-script-inputs.util.js +4 -4
  333. package/dist/utility/wrun/wrun-series-stream.util.d.ts +86 -0
  334. package/dist/utility/wrun/wrun-series-stream.util.js +537 -0
  335. package/dist/utility/wrun/wrun-sheet-remembered.util.d.ts +21 -0
  336. package/dist/utility/wrun/wrun-sheet-remembered.util.js +36 -0
  337. package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.d.ts +7 -0
  338. package/dist/utility/wrun/wrun-signal-sound-reasons.leaf.js +12 -0
  339. package/dist/utility/wrun/wrun-socket-row-source.js +4 -2
  340. package/dist/utility/wrun/wrun-source-rows.util.d.ts +175 -3
  341. package/dist/utility/wrun/wrun-source-rows.util.js +294 -8
  342. package/dist/utility/wrun/wrun-stats-strip.util.d.ts +46 -0
  343. package/dist/utility/wrun/wrun-stats-strip.util.js +87 -0
  344. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +163 -0
  345. package/dist/utility/wrun/wrun-table-chrome.util.js +557 -0
  346. package/dist/utility/wrun/wrun-text-params.util.d.ts +11 -6
  347. package/dist/utility/wrun/wrun-text-params.util.js +19 -30
  348. package/dist/utility/wrun/wrun-transient-rerun.util.d.ts +64 -0
  349. package/dist/utility/wrun/wrun-transient-rerun.util.js +317 -0
  350. package/dist/utility/wrun/wrun-twin-lookback.util.d.ts +10 -0
  351. package/dist/utility/wrun/wrun-twin-lookback.util.js +43 -0
  352. package/dist/utility/wrun/wrun-warmup-head-store.util.d.ts +41 -0
  353. package/dist/utility/wrun/wrun-warmup-head-store.util.js +120 -0
  354. package/dist/utility/wrun-alert-params.leaf.d.ts +24 -0
  355. package/dist/utility/wrun-alert-params.leaf.js +24 -0
  356. package/dist/utils/replay/replay-buffer-math.d.ts +148 -0
  357. package/dist/utils/replay/replay-buffer-math.js +684 -0
  358. package/dist/workers/wrun/wrun-abi-host.d.ts +190 -0
  359. package/dist/workers/wrun/wrun-abi-host.js +1201 -0
  360. package/dist/workers/wrun/wrun-engine-handler.d.ts +37 -0
  361. package/dist/workers/wrun/wrun-engine-handler.js +211 -0
  362. package/package.json +3 -3
@@ -0,0 +1,186 @@
1
+ /**
2
+ * The chart names a WRUN run's `{{symbol}}`, `{{exchange}}` and
3
+ * `{{timeframe}}` placeholders read (KITS-ROUND-2-PLAN, "Chart-name
4
+ * placeholders"), resolved on the main thread per chart index exactly the
5
+ * way the chart header shows them:
6
+ *
7
+ * - symbol: the TickerBar's display symbol (useSymbolData's `displaySymbol`,
8
+ * built on `resolveChartSymbolData`: the "prefix+coin+quote" of a market, a
9
+ * formula's expression by labels, an economic series' label, a prediction
10
+ * market's title; the raw metadata symbol before the resolve lands).
11
+ * - exchange: the header's display exchange name (TBSymbolButton: a
12
+ * prediction market's `formatEnhancedExchangeName` upper-cased, a formula's
13
+ * one venue label, an economic series' publisher label, else
14
+ * `formatExchangeDisplay` over the venue and `displayTransformations`).
15
+ * - timeframe: the short label the interval button shows (the replay
16
+ * display interval when replaying, else the chart interval word).
17
+ *
18
+ * The resolve is async (the symbol lookup). A run resolves its names beside
19
+ * its fetches and integrates with the names IT resolved; the names a live
20
+ * session was integrated with ride beside the session's live context
21
+ * (`rememberWrunSessionChartNames`, set by the full run and the reseed) and
22
+ * the live tick and the latest-values snapshot read them from there, so a
23
+ * superseded run's late lookup can never retitle a later session. The
24
+ * per-chart "latest" record (`wrunChartNamesFor`) is written only by the
25
+ * newest resolve started for that chart: every write is fenced by a token
26
+ * captured at the resolve's start and a stale resolve is dropped. Main
27
+ * thread only: the header formatters reach i18n, which the worker graph must
28
+ * not.
29
+ */
30
+ import { wrunChartHostEnv } from '../../host-env.js';
31
+ import { formatEnhancedExchangeName } from '../../constants/exchange-names.leaf.js';
32
+ import { checkIsPredictionMarket } from '../chart/index-mode.util.js';
33
+ import { formatExchangeDisplay } from '../exchange-format.leaf.js';
34
+ import { formatPoolAddress } from '../pool-symbol.leaf.js';
35
+ function nonEmptyString(value) {
36
+ return typeof value === 'string' && value !== '' ? value : undefined;
37
+ }
38
+ /** The header's display symbol (useSymbolData's `displaySymbol`): a
39
+ * prediction market's title, a formula's labelled expression, an economic
40
+ * series' label, else "prefix+coin+quote" (a pool address appended), and
41
+ * the raw metadata symbol while nothing is resolved. On a plain market the
42
+ * three parts are slices of the venue's own symbol, so the name is that
43
+ * symbol, the string a kScript's `currentSymbol` reads on the same chart
44
+ * (1000PEPEUSDT keeps its 1000, KRW-RLUSD its KRW-). */
45
+ export function wrunChartDisplaySymbol(meta, data) {
46
+ const raw = nonEmptyString(meta?.symbol) ?? '';
47
+ const pm = meta?.polymarketMetadata;
48
+ if (pm)
49
+ return nonEmptyString(pm.fullName) ?? nonEmptyString(pm.title) ?? raw;
50
+ if (!data)
51
+ return raw;
52
+ if (data.isTransformation)
53
+ return data.displayExpression ?? data.fullSymbol;
54
+ if (data.isFred)
55
+ return data.coin;
56
+ return `${data.prefix ?? ''}${data.coin}${data.quote}${data.poolAddress ? ` · ${formatPoolAddress(data.poolAddress)}` : ''}`;
57
+ }
58
+ /** The header's display exchange name (TBSymbolButton): a prediction
59
+ * market's short venue label upper-cased (HYPERLIQUID_HIP4 reads "HL
60
+ * HIP4"), a formula's one venue label, an economic series' resolved
61
+ * publisher label, else `formatExchangeDisplay` over the venue and
62
+ * `displayTransformations`. */
63
+ export function wrunChartDisplayExchange(meta, data) {
64
+ const exchange = nonEmptyString(meta?.exchange);
65
+ if (exchange !== undefined && checkIsPredictionMarket(exchange)) {
66
+ return formatEnhancedExchangeName(exchange).toUpperCase();
67
+ }
68
+ if (data?.isTransformation)
69
+ return data.formulaVenueLabel ?? '';
70
+ if (data?.isFred && nonEmptyString(data.exchangeDisplay) !== undefined)
71
+ return data.exchangeDisplay;
72
+ if (exchange === undefined)
73
+ return '';
74
+ return formatExchangeDisplay(exchange.toUpperCase(), nonEmptyString(meta?.displayTransformations));
75
+ }
76
+ /** The short label the interval button shows: the replay display interval
77
+ * while replaying, else the chart interval word ('15m', '1h'). */
78
+ export function wrunChartTimeframe(meta, displayInterval) {
79
+ return nonEmptyString(displayInterval) ?? nonEmptyString(meta?.interval) ?? '';
80
+ }
81
+ // ---------------------------------------------------------------------------
82
+ // Per-session names (the live context) and the fenced per-chart latest.
83
+ // ---------------------------------------------------------------------------
84
+ const namesBySession = new WeakMap();
85
+ /** Keep the names a live session was integrated with beside its live
86
+ * context (the full run's install, the reseed's commit); undefined forgets. */
87
+ export function rememberWrunSessionChartNames(session, names) {
88
+ if (names === undefined)
89
+ namesBySession.delete(session);
90
+ else
91
+ namesBySession.set(session, names);
92
+ }
93
+ /** The names a live session was integrated with (the live tick's and the
94
+ * snapshot's synchronous read); undefined for a session that resolved none. */
95
+ export function wrunSessionChartNamesOf(session) {
96
+ return session === undefined ? undefined : namesBySession.get(session);
97
+ }
98
+ const latestByChart = new Map();
99
+ const generationByChart = new Map();
100
+ /**
101
+ * Whether a chart header exists to mirror: the header's symbol resolver
102
+ * (`resolveChartSymbolData`) lives in the DOM app's graph (the icon
103
+ * composable, the user store, the metadata service), already loaded by the
104
+ * TickerBar before any run, so its lazy import resolves within microtasks.
105
+ * A host without a document (the node specs, a headless run) has no header,
106
+ * and loading that graph there is a cold, seconds-long import that would hold
107
+ * the run open across timer ticks; the raw metadata names are what such a
108
+ * host shows.
109
+ */
110
+ function wrunChartHeaderPresent() {
111
+ return typeof document !== 'undefined';
112
+ }
113
+ /** The newest resolve's names for a chart (fenced: a late, superseded
114
+ * resolve never writes it); undefined before any resolve. Diagnostic and
115
+ * fallback reader; the run path reads its session's names instead. */
116
+ export function wrunChartNamesFor(chartIndex) {
117
+ return latestByChart.get(chartIndex);
118
+ }
119
+ export function __resetWrunChartNamesForTests() {
120
+ latestByChart.clear();
121
+ generationByChart.clear();
122
+ }
123
+ /**
124
+ * Resolve a chart's names off the store and the header's symbol resolver.
125
+ * The chart metadata is read at the start (the names describe the chart the
126
+ * run computes on), the symbol lookup follows; the per-chart latest record
127
+ * is written only when no newer resolve for the chart started meanwhile
128
+ * (the token captured here), so a superseded run's late answer is dropped
129
+ * there while the run itself still receives its own names. Never throws: a
130
+ * chart that is gone answers undefined; a symbol resolve that fails (or a
131
+ * store the spec did not stand up) falls back to the raw metadata names, the
132
+ * way the header shows the raw symbol before its resolve lands. The store
133
+ * and the resolver are loaded lazily: their graphs are heavy and only a run
134
+ * needs them here.
135
+ */
136
+ export async function resolveWrunChartNames(chartIndex) {
137
+ const token = (generationByChart.get(chartIndex) ?? 0) + 1;
138
+ generationByChart.set(chartIndex, token);
139
+ const current = () => generationByChart.get(chartIndex) === token;
140
+ let meta;
141
+ let displayInterval;
142
+ try {
143
+ const { useChartStore } = await wrunChartHostEnv().chart.loadChartStore();
144
+ const store = useChartStore();
145
+ meta = store.mergedAllCharts[chartIndex]?.metadata;
146
+ displayInterval = store
147
+ .replayDisplayIntervalByChart?.[chartIndex];
148
+ }
149
+ catch {
150
+ meta = undefined;
151
+ }
152
+ if (meta === undefined) {
153
+ if (current())
154
+ latestByChart.delete(chartIndex);
155
+ return undefined;
156
+ }
157
+ let data = null;
158
+ if (wrunChartHeaderPresent()) {
159
+ try {
160
+ const { resolveChartSymbolData } = await wrunChartHostEnv().market.loadSymbolDisplay();
161
+ data = await resolveChartSymbolData(chartIndex);
162
+ }
163
+ catch {
164
+ // The raw metadata names below, the way the header shows the raw symbol before its resolve lands.
165
+ }
166
+ }
167
+ let names;
168
+ try {
169
+ names = {
170
+ symbol: wrunChartDisplaySymbol(meta, data),
171
+ exchange: wrunChartDisplayExchange(meta, data),
172
+ timeframe: wrunChartTimeframe(meta, displayInterval),
173
+ };
174
+ }
175
+ catch {
176
+ // A header formatter a spec did not stand up: the raw metadata names.
177
+ names = {
178
+ symbol: nonEmptyString(meta.symbol) ?? '',
179
+ exchange: nonEmptyString(meta.exchange) ?? '',
180
+ timeframe: wrunChartTimeframe(meta, displayInterval),
181
+ };
182
+ }
183
+ if (current())
184
+ latestByChart.set(chartIndex, names);
185
+ return names;
186
+ }
@@ -0,0 +1,253 @@
1
+ /**
2
+ * What the chart fills for a wrun package's market facts (WRUN-GAPS-1005
3
+ * CONTRACT.md "What each host fills", the chart row): `market.kind()`,
4
+ * `market.point_value()`, `market.zone()`, `market.quote_is_usd()` and
5
+ * `market.session_open()` (WRUN-SESSION) of the chart's own market, as the
6
+ * codes of wrun-market-facts.util.
7
+ *
8
+ * One answer per market on every host. om fills the same five from its market
9
+ * directory row (the asset class and the quote) and its venue tables (om
10
+ * `packages/cli/src/runner/wrun/market-facts.ts`, `wrunMarketFactsOf`), so the
11
+ * chart reads the SAME directory row (the markets service: one bounded
12
+ * exact-match search per market, only for a package that declares a fact the
13
+ * row answers, `kind` or `quote_is_usd`, never on a venue whose listings om
14
+ * never reads) through the same rules, and adds only what om does not know:
15
+ *
16
+ * kind the row's asset class: a coin 1, a stock or an ETF 2 (a
17
+ * stock perpetual on a crypto venue included), forex 3, a
18
+ * commodity whose base is a metal 4 (another commodity 0), an
19
+ * index 5, an economic series 6, a prediction market 0. A
20
+ * market without a row takes its venue's kind (US listings 2,
21
+ * POLYGON_INDICES 5, forex 3 or 4 for a metal base, LBMA and
22
+ * LME 4), then the chart's own: a CME root by what it trades
23
+ * (CME_ROOT_SPECS), an economic venue 6. A crypto venue settles
24
+ * no kind on its own (it lists stock, ETF and metal perpetuals
25
+ * too), so a coin there reads 1 once the row answers, 0 before.
26
+ * point_value the CME contract's point value (CME_ROOT_SPECS, in the
27
+ * quote currency; 0 for a root off the table and for an
28
+ * option contract); 0 on ICE and
29
+ * PLATTS, whose multipliers the chart does not hold; 1 on every
30
+ * other market the chart serves, all priced per unit (spot,
31
+ * perpetuals, stocks, ETFs, forex, indices, metals, prediction
32
+ * markets, economic series).
33
+ * zone om's venue rule: US listings and POLYGON_INDICES New York,
34
+ * the CME family Chicago, LBMA and LME London, every other
35
+ * venue 0 (UTC, the clock every 24/7 market keeps).
36
+ * quote_is_usd the row's quote (`quoteAssetId`, else `quoteCoinName`): USD
37
+ * 1, anything else 2, a dollar stablecoin included; without
38
+ * one, US listings and POLYGON_INDICES 1, then the market's
39
+ * own quote as the chart spells it (a CME root's quotation
40
+ * currency, the pair's quote in `EUR/USD` or `C:EURUSD`, the
41
+ * tail of the directory's normalized symbol `BTC-USDT`), else 0.
42
+ * session_open om's venue rule: the minute on the venue's clock its trade day
43
+ * opens, 1020 (17:00 Chicago, WRUN_MARKET_SESSION_OPEN_CME) for
44
+ * the CME family, the zone's Chicago branch, else 0 (midnight).
45
+ *
46
+ * Beside the five the host fill carries `market.option_multiplier()` (kit 0.87.0,
47
+ * om WRUN_OPTION_FACT_FILLS, which only the chart's browser lane fills): the US
48
+ * dollars one price unit times one size unit of an option on the chart's options
49
+ * chain is worth, 100 on OPRA, the CME root's point value, 1 on a crypto chart,
50
+ * else 0 (wrunChartOptionMultiplier).
51
+ *
52
+ * The 0 rule: a fact the chart does not know is 0, never a guess. Main thread
53
+ * only (the directory read goes through the markets service); the hosted lanes
54
+ * carry the numbers to the worker inside `wrunHostFill`.
55
+ */
56
+ import type { WrunMarketKind, WrunMarketQuoteIsUsd } from '@orangecharts/indicator-kit';
57
+ import type { WrunVenueLegsResult } from '../../host-ports.types.js';
58
+ import type { WrunIndicatorMetadata } from '../../interfaces/wrun-runtime.interface.js';
59
+ /** The five facts one run reads, as the codes the module sees. */
60
+ export interface WrunMarketFacts {
61
+ /** A WRUN_MARKET_KINDS code. */
62
+ kind: number;
63
+ /** The money one whole point of price is worth on one contract or unit. */
64
+ pointValue: number;
65
+ /** A WRUN_MARKET_ZONES index. */
66
+ zone: number;
67
+ /** A WRUN_MARKET_QUOTE_IS_USD code. */
68
+ quoteIsUsd: number;
69
+ /** The minute on the market's clock its trade day opens (0 midnight). */
70
+ sessionOpen: number;
71
+ }
72
+ /** The option fact the host fill carries beside the five (om WRUN_OPTION_FACT_FILLS, kit 0.87.0). */
73
+ export interface WrunOptionFacts {
74
+ /** The US dollars one price unit times one size unit of an option on the chart's options chain is worth (0 none). */
75
+ optionMultiplier: number;
76
+ }
77
+ /** The chart market the facts are of: the chart metadata's own fields. */
78
+ export interface WrunFactsMarket {
79
+ exchange?: unknown;
80
+ symbol?: unknown;
81
+ normalizedSymbol?: unknown;
82
+ category?: unknown;
83
+ }
84
+ /** The directory row fields the facts read, duck-typed like om's (the wire
85
+ * carries `assetClass` and `quoteAssetId` beside the declared type). */
86
+ export interface WrunMarketDirectoryRow {
87
+ assetClass?: unknown;
88
+ quoteAssetId?: unknown;
89
+ quoteCoinName?: unknown;
90
+ coin?: unknown;
91
+ underlyingSymbol?: unknown;
92
+ }
93
+ export interface CmeRootSpec {
94
+ /** What the contract trades (a futures contract reports its underlying's kind). */
95
+ kind: WrunMarketKind;
96
+ pointValue: number;
97
+ /** The quotation currency of the price the chart draws. */
98
+ quote: WrunMarketQuoteIsUsd;
99
+ }
100
+ /** Read-only outside this module: the paper venue reads each contract's point value from it. */
101
+ export declare const CME_ROOT_SPECS: Readonly<Record<string, Readonly<CmeRootSpec>>>;
102
+ /**
103
+ * The five facts the chart fills for `market` (the module doc): om's rules
104
+ * over the directory `row` (undefined when the chart has none: not read, not
105
+ * listed, or not answered yet) and the venue tables, then the chart's own
106
+ * knowledge where om's answer is unknown. Pure.
107
+ */
108
+ export declare function wrunChartMarketFacts(market: WrunFactsMarket | undefined, row?: WrunMarketDirectoryRow): WrunMarketFacts;
109
+ /**
110
+ * `market.option_multiplier()` of the chart market `market` (kit 0.87.0): the US dollars one price unit times one
111
+ * size unit of an option on the chart's options chain is worth, so a package's premium is size x price x the fact.
112
+ * The chain is the one the options chain decision's `auto` reads for the chart (optionsChartSource
113
+ * `resolveOptionsChartSource`, then opra-option-lanes.util `decideWrunLaneChainIdentity`), and its family follows the
114
+ * chart's own exchange and the venue table:
115
+ *
116
+ * CME a CME-governed chart reads the chain of its own root: the root's point value (CME_ROOT_SPECS, ES 50,
117
+ * NQ 20) when the root is quoted in US dollars; a root off the table, or quoted in another unit (a CBOT
118
+ * grain quotes US cents), is 0.
119
+ * OPRA a chart whose options list on OPRA (the venue table: an OPRA contract chart, a US stock or ETF chart):
120
+ * 100.
121
+ * crypto a chart on a crypto exchange, whichever venue and category (isCryptoChartVenue): its chain, when it has
122
+ * one, is a crypto chain (its own option venue's, the coin's Deribit chain, or another crypto venue's that
123
+ * lists the coin), priced in dollars per coin on every venue: 1. A crypto chart with no chain serves no
124
+ * option rows, so the 1 multiplies nothing.
125
+ * else 0: the chart has no options family (a forex pair, a metal, an index chart, an equity OPRA lists no chain
126
+ * for on its venue, an economic series, a prediction market, an unknown venue, no market).
127
+ *
128
+ * Synchronous, like every fact the host fill reads, where the run's chain decision is asynchronous and per input (it
129
+ * reads the chain directory, the crypto venues' listing and the flags): the family alone decides, so a chain that a
130
+ * flag, the plane router or an empty directory stops still reads its family's multiplier (its lane serves no rows to
131
+ * multiply). Pure.
132
+ */
133
+ export declare function wrunChartOptionMultiplier(market: WrunFactsMarket | undefined): number;
134
+ /** True when the sheet declares one of the market's facts (a host-filled
135
+ * param on `kind`, `point_value`, `zone`, `quote_is_usd`, `session_open` or
136
+ * `option_multiplier`): the runs whose host fill carries the market's facts.
137
+ * Only a sheet that declares a directory fact waits for the read
138
+ * (wrunMarketFactsNeedDirectory). */
139
+ export declare function wrunReadsMarketFacts(metadata: Pick<WrunIndicatorMetadata, 'params'> | undefined): boolean;
140
+ /** True when the sheet declares a fact the directory row answers (`kind`,
141
+ * `quote_is_usd`), or a `visible_by` list on a setting or an output, or a
142
+ * `needed_by` list on an input source (wrunLaneDemandNeedsDirectory), that
143
+ * only the kind decides (wrunVisibleByNeedsKind): the only runs that ask the
144
+ * directory and wait for its answer before the host fill and the mount. A
145
+ * sheet whose facts are all the venue tables' (`point_value`, `zone`,
146
+ * `session_open`) fills them at once and asks nothing, so its first paint
147
+ * never waits on a read it does not need. */
148
+ export declare function wrunMarketFactsNeedDirectory(metadata: (Pick<WrunIndicatorMetadata, 'params'> & Partial<Pick<WrunIndicatorMetadata, 'outputs' | 'inputSources'>>) | undefined): boolean;
149
+ /** True when an input source's `needed_by` list (kit 0.72.0) needs the market's kind to decide
150
+ * (wrunVisibleByNeedsKind: it names some but not all of 0, 1 and 2): the sheet's lane demand on a
151
+ * market (wrunSheetWithLaneDemand) then waits on the directory row, so a crypto venue's coin is
152
+ * never read as unit 0 before the row answers. A list deciding on contracts alone (`[0, 1, 2]`,
153
+ * `[3]`) needs only the point value and the zone and waits on nothing. */
154
+ export declare function wrunLaneDemandNeedsDirectory(sheet: Partial<Pick<WrunIndicatorMetadata, 'inputSources'>> | undefined): boolean;
155
+ /** wrunMarketFactsNeedDirectory over an overlay's declared inputs
156
+ * (`settings.scriptInputs`), for a lane that holds no sheet (the cloud
157
+ * payload): a row under a directory fact's generated name. */
158
+ export declare function wrunDeclaredMarketFactsNeedDirectory(declarations: unknown): boolean;
159
+ /** The size unit (`market.size_unit()`, wrunMarketSizeUnit) of the chart market `market`, over the
160
+ * facts the chart fills for it now (wrunMarketFactsFor: the directory row once it answered, the 0
161
+ * rule before). The point value and the zone decide contracts, so the unit a lane's "Auto"
162
+ * resolves on never waits on a read. */
163
+ export declare function wrunChartSizeUnit(market: WrunFactsMarket | undefined): number;
164
+ /**
165
+ * The sheet a run plans its lanes from on a market of size unit `sizeUnit`: every input source whose
166
+ * `currency` is "Auto" (a `trades` or `volume_profile` lane; the sheet refuses it beside a pin, so it
167
+ * always follows the chart's own market) reads the unit wrunLaneCurrency resolves it to there,
168
+ * "Coin" on contracts and "USD" elsewhere. Every reader past this seam (the profile lane's extras,
169
+ * the trades lane of each quote, the shared host's plan, the live intake and the reconcile) reads
170
+ * the word as written and never sees "Auto". The sheet itself when no source says "Auto"; else a
171
+ * copy with its own `inputSources`, every other key shared.
172
+ */
173
+ export declare function wrunSheetWithLaneCurrencies<Sheet extends Pick<WrunIndicatorMetadata, 'inputSources'>>(sheet: Sheet, sizeUnit: number): Sheet;
174
+ /**
175
+ * The sheet a run plans its lanes from on a market of size unit `sizeUnit`: every input source whose
176
+ * `needed_by` (kit 0.72.0) leaves that size unit out, read by the predicate a row's `visible_by` is
177
+ * (wrunRowVisibleHere), is marked `undemanded`, so no reader past this seam asks, subscribes, folds
178
+ * or re-asks its lane (wrunSourceLane answers none for it), and the row builder reads the input's
179
+ * fill on every bar (NaN, 0 under `missing: "zero"`) without ever holding the run. An input without
180
+ * the word is needed on every market. The sheet itself when every input is needed here; else a copy
181
+ * with its own `inputSources`.
182
+ */
183
+ export declare function wrunSheetWithLaneDemand<Sheet extends Pick<WrunIndicatorMetadata, 'inputSources'>>(sheet: Sheet, sizeUnit: number): Sheet;
184
+ /**
185
+ * The sheet a run plans its lanes from on a chart of span `chartIntervalMs`, with every leg stream lane (`candles`,
186
+ * `oi_candles`, `volume_profile_candles`: wrun-leg-stream-classes) its `chart_interval_below` gates off there (the kit's own `wrunLaneGatedOff`, read off the shared
187
+ * host: the chart's span known and not finer than the word's) left undemanded: such an input is marked
188
+ * `undemanded`, so no reader past this seam plans, fetches, subscribes, wall-checks or diagnoses its
189
+ * leg (no warning row, no refusal), and the row builder hands it a present EMPTY block on every row,
190
+ * the `missing: "empty"` picture. An unknown chart interval gates nothing. Evaluated before any
191
+ * celled-leg check, so a lane gated off on a coarse chart is never refused for its cells there. The
192
+ * sheet itself when no lane is gated off; else a copy with its own `inputSources`. A `candles` input
193
+ * reads the rule off the loaded host, so the run loads it first (the env's loadSharedHost). A hosted run's
194
+ * cloud plans its lanes from its own copy of the sheet.
195
+ */
196
+ export declare function wrunSheetWithLaneGate<Sheet extends Pick<WrunIndicatorMetadata, 'inputSources'>>(sheet: Sheet, chartIntervalMs: number | undefined): Sheet;
197
+ /** The venues the sheet's coin legs name (`follow: "coin"` beside `exchange`), first occurrence
198
+ * order, each once: the choice the run hands the native venue resolver (resolveVenueLegs). */
199
+ export declare function wrunCoinLegVenues(sheet: Pick<WrunIndicatorMetadata, 'inputSources'>): string[];
200
+ /**
201
+ * The run's answer for every coin-leg venue, from the native venue resolver's verdict on the chart's
202
+ * coin (resolveVenueLegs, TRADE_AGG, the chart's venue as the host): a venue among the legs reads
203
+ * its primary market's raw symbol; a venue the coin is unlisted on, and every venue when no venue
204
+ * lists it (`none-listed`), the chart names no coin (`no-coin`) or its venue keeps its own pins
205
+ * (`host-refused`: CME-governed, prediction-market and DEX charts), reads null (the input reads its
206
+ * fill). Undefined when the listing lookup failed (`lookup-failed`): the run refuses by name
207
+ * (wrun_coin_leg_unresolved), never guessing a market.
208
+ */
209
+ export declare function wrunCoinLegsOf(venues: readonly string[], verdict: Pick<WrunVenueLegsResult, 'legs' | 'status'>): Record<string, string | null> | undefined;
210
+ /**
211
+ * The sheet a run plans its lanes from with every coin leg resolved on the chart's coin
212
+ * (`coinLegs`, wrunCoinLegsOf): a leg whose venue lists a market for the coin becomes a literal pin
213
+ * (`follow` dropped, `symbol` written: the kit's wrunCoinLegSource), which every reader past this
214
+ * seam reads like any trades pin (its leg lane, the venue verdict of wrun-pin-venues.util, its live
215
+ * channel); a leg whose venue lists none keeps `follow` and is marked `undemanded`, so nothing asks
216
+ * its lane and the row builder reads its fill on every bar (the plan reads the same answer,
217
+ * wrunRowsCoinLegs). A venue the map holds no answer for is left as declared (the row builder
218
+ * refuses it by name). The sheet itself when it declares no coin leg; else a copy with its own
219
+ * `inputSources`. Resolved again by every run: a coin switch re-runs the overlay, so the legs
220
+ * follow the new coin.
221
+ */
222
+ export declare function wrunSheetWithCoinLegs<Sheet extends Pick<WrunIndicatorMetadata, 'inputSources'>>(sheet: Sheet, coinLegs: Readonly<Record<string, string | null>> | undefined): Sheet;
223
+ /** The facts a hosted run's cloud reads the market's size unit from, under the shared host's own
224
+ * `hostFills` words (createScript's and wrunTestRun's `wrunFacts.hostFills`): the chart market's
225
+ * kind, point value and zone (wrunMarketFactsFor). The point value and the zone are venue-table
226
+ * facts and decide contracts, all a lane's `currency: "Auto"` needs; the kind tells coins, shares
227
+ * and units apart for an input's `needed_by` list that names some of them. It is the directory
228
+ * row's once the row answered (the 0 rule before), so a hosted payload whose `needed_by` needs it
229
+ * waits on the row first (getReqPayload, wrunLaneDemandNeedsDirectory). The chart resolves nothing
230
+ * for the cloud: the cloud plans the lanes from its own copy of the sheet and runs the rules itself. */
231
+ export declare function wrunHostedLaneFills(market: WrunFactsMarket | undefined): {
232
+ kind: number;
233
+ point_value: number;
234
+ zone: number;
235
+ };
236
+ /**
237
+ * Ask the directory for `market`'s row (om's read): once per market for the
238
+ * session, a definite answer (the row, or not listed) kept; concurrent callers
239
+ * share one search; a failure is asked again a minute later and meanwhile the
240
+ * facts read as the chart knows them without the row. Never rejects. A venue
241
+ * whose listings om never reads asks nothing.
242
+ */
243
+ export declare function warmWrunMarketFacts(market: WrunFactsMarket | undefined): Promise<void>;
244
+ /** True when a read of `market`'s facts now would wait on nothing: the
245
+ * directory answered, failed recently, or is never asked for its venue. */
246
+ export declare function wrunMarketFactsSettled(market: WrunFactsMarket | undefined): boolean;
247
+ /** The facts the chart fills for `market` now (synchronous): the five over the
248
+ * directory row once warmWrunMarketFacts settled it, else without one, and
249
+ * the option multiplier of its options chain (wrunChartOptionMultiplier: the
250
+ * venue tables alone, no read). */
251
+ export declare function wrunMarketFactsFor(market: WrunFactsMarket | undefined): WrunMarketFacts & WrunOptionFacts;
252
+ /** Forget every kept answer (spec isolation). */
253
+ export declare function clearWrunMarketFactsMemo(): void;