@orangecharts/wrun-chart-host 0.11.1 → 0.15.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 (319) hide show
  1. package/README.md +1 -0
  2. package/dist/constants/feature-flags.constants.d.ts +4 -4
  3. package/dist/constants/feature-flags.constants.js +38 -52
  4. package/dist/constants/feature-limits.constants.d.ts +1 -1
  5. package/dist/constants/feature-limits.constants.js +5 -4
  6. package/dist/constants/interval.constants.d.ts +7 -0
  7. package/dist/constants/interval.constants.js +7 -0
  8. package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +20 -149
  9. package/dist/constants/scriptEditor/cme-official-scripts.constants.js +20 -309
  10. package/dist/constants/stocks-compliance.constants.d.ts +15 -0
  11. package/dist/constants/stocks-compliance.constants.js +15 -0
  12. package/dist/host-env.d.ts +69 -3
  13. package/dist/host-env.js +21 -0
  14. package/dist/host-ports.types.d.ts +36 -3
  15. package/dist/index.d.ts +18 -0
  16. package/dist/index.js +19 -0
  17. package/dist/indicators/controls/tpo-session.util.d.ts +52 -12
  18. package/dist/indicators/controls/tpo-session.util.js +113 -16
  19. package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +6 -0
  20. package/dist/instances/script-engine-worker-ohlcv-transfer.js +16 -0
  21. package/dist/interfaces/cme-realtime.interface.d.ts +8 -0
  22. package/dist/interfaces/cme-realtime.interface.js +2 -1
  23. package/dist/interfaces/feed.interface.d.ts +15 -1
  24. package/dist/interfaces/replay.interface.d.ts +5 -0
  25. package/dist/interfaces/stocks-realtime.interface.d.ts +4 -3
  26. package/dist/interfaces/stocks-realtime.interface.js +5 -4
  27. package/dist/interfaces/wrun-runtime.interface.d.ts +141 -20
  28. package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +17 -0
  29. package/dist/kscript-data/controls/live-ohlcv-merge.util.js +22 -0
  30. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +46 -40
  31. package/dist/kscript-data/controls/live-trades-merge.util.js +80 -107
  32. package/dist/market-data/billing.interface.d.ts +9 -1
  33. package/dist/market-data/venue.d.ts +1 -1
  34. package/dist/market-data/venues/index.d.ts +5 -5
  35. package/dist/market-data/venues/opra.js +3 -3
  36. package/dist/market-data/venues/stocks.contract.copy.json +6 -5
  37. package/dist/market-data/venues/stocks.d.ts +5 -5
  38. package/dist/market-data/venues/stocks.js +21 -18
  39. package/dist/settings-templates/frvp-fields.d.ts +12 -1
  40. package/dist/settings-templates/frvp-fields.js +15 -4
  41. package/dist/settings-templates/index.js +12 -5
  42. package/dist/settings-templates/indicator-fields.js +43 -2
  43. package/dist/settings-templates/tool-rules.d.ts +17 -8
  44. package/dist/settings-templates/tool-rules.js +15 -8
  45. package/dist/settings-templates/tool-tables.generated.js +4 -2
  46. package/dist/utility/auth/server-clock.util.d.ts +3 -1
  47. package/dist/utility/auth/server-clock.util.js +3 -1
  48. package/dist/utility/chart/book-live-bucket.util.js +2 -2
  49. package/dist/utility/chart/cache-alignment.util.d.ts +38 -7
  50. package/dist/utility/chart/cache-alignment.util.js +50 -13
  51. package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
  52. package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
  53. package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
  54. package/dist/utility/chart/cme-session-bucket.util.js +25 -332
  55. package/dist/utility/chart/continuous-contracts.util.js +6 -5
  56. package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
  57. package/dist/utility/chart/display-offset.leaf.js +41 -0
  58. package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
  59. package/dist/utility/chart/effective-chart-session.util.js +13 -5
  60. package/dist/utility/chart/feed-interval.util.d.ts +6 -20
  61. package/dist/utility/chart/feed-interval.util.js +13 -22
  62. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
  63. package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
  64. package/dist/utility/chart/footprint-band.util.d.ts +21 -5
  65. package/dist/utility/chart/footprint-band.util.js +53 -14
  66. package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
  67. package/dist/utility/chart/host-bar-placement.util.js +8 -2
  68. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
  69. package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
  70. package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
  71. package/dist/utility/chart/indicator-run-interval.util.js +21 -12
  72. package/dist/utility/chart/interval-registry.util.d.ts +1 -1
  73. package/dist/utility/chart/interval-registry.util.js +1 -1
  74. package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
  75. package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
  76. package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
  77. package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
  78. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
  79. package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
  80. package/dist/utility/chart/live-bucket.util.d.ts +39 -17
  81. package/dist/utility/chart/live-bucket.util.js +103 -57
  82. package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
  83. package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
  84. package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
  85. package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
  86. package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
  87. package/dist/utility/chart/market-session-schedule.util.js +39 -1
  88. package/dist/utility/chart/market-session.util.d.ts +136 -0
  89. package/dist/utility/chart/market-session.util.js +341 -0
  90. package/dist/utility/chart/om-panel.util.d.ts +5 -3
  91. package/dist/utility/chart/om-panel.util.js +42 -7
  92. package/dist/utility/chart/om-target.util.d.ts +14 -1
  93. package/dist/utility/chart/om-target.util.js +22 -5
  94. package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
  95. package/dist/utility/chart/opra-read-access.leaf.js +22 -0
  96. package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
  97. package/dist/utility/chart/profile-row-height.util.js +74 -37
  98. package/dist/utility/chart/rth-session.util.d.ts +55 -20
  99. package/dist/utility/chart/rth-session.util.js +94 -46
  100. package/dist/utility/chart/session-lattice.util.d.ts +150 -0
  101. package/dist/utility/chart/session-lattice.util.js +488 -0
  102. package/dist/utility/chart/trading-day.util.d.ts +40 -2
  103. package/dist/utility/chart/trading-day.util.js +84 -7
  104. package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
  105. package/dist/utility/chart/us-equities-session.util.js +44 -15
  106. package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
  107. package/dist/utility/chart/window-geometry.leaf.js +57 -8
  108. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
  109. package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
  110. package/dist/utility/chart/wrun-run-result.util.d.ts +38 -13
  111. package/dist/utility/chart/wrun-run-result.util.js +97 -27
  112. package/dist/utility/common/time.util.js +5 -4
  113. package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
  114. package/dist/utility/market-events/earnings-scope.util.js +17 -9
  115. package/dist/utility/market-events/market-events.util.d.ts +14 -7
  116. package/dist/utility/market-events/market-events.util.js +30 -17
  117. package/dist/utility/number-format.util.d.ts +14 -21
  118. package/dist/utility/number-format.util.js +38 -24
  119. package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
  120. package/dist/utility/options/option-venue-disclosure.util.js +71 -11
  121. package/dist/utility/options/option-venue.util.d.ts +1 -1
  122. package/dist/utility/options/option-venue.util.js +1 -1
  123. package/dist/utility/pool-symbol.leaf.d.ts +7 -0
  124. package/dist/utility/pool-symbol.leaf.js +50 -5
  125. package/dist/utility/stocks/stock-display.util.d.ts +15 -0
  126. package/dist/utility/stocks/stock-display.util.js +37 -0
  127. package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
  128. package/dist/utility/v2/gate-plane.util.d.ts +6 -0
  129. package/dist/utility/v2/gate-plane.util.js +11 -1
  130. package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
  131. package/dist/utility/v2/gate-session-latch.util.js +3 -3
  132. package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
  133. package/dist/utility/v2/governed-tier.leaf.js +17 -16
  134. package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
  135. package/dist/utility/v2/stocks-governed.util.js +14 -0
  136. package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
  137. package/dist/utility/v2/v2-enums.leaf.js +458 -0
  138. package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
  139. package/dist/utility/wrun/derived-roots.leaf.js +27 -1
  140. package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
  141. package/dist/utility/wrun/derived-roots.util.js +97 -56
  142. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
  143. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
  144. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
  145. package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
  146. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
  147. package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
  148. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
  149. package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
  150. package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
  151. package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
  152. package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
  153. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
  154. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
  155. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
  156. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
  157. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
  158. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
  159. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
  160. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
  161. package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
  162. package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
  163. package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
  164. package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
  165. package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
  166. package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
  167. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +46 -23
  168. package/dist/utility/wrun/wrun-batched-marks.util.js +260 -62
  169. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
  170. package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
  171. package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
  172. package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
  173. package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
  174. package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
  175. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
  176. package/dist/utility/wrun/wrun-canvases.util.d.ts +24 -7
  177. package/dist/utility/wrun/wrun-canvases.util.js +99 -30
  178. package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
  179. package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
  180. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
  181. package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
  182. package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
  183. package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
  184. package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
  185. package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
  186. package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
  187. package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
  188. package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
  189. package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
  190. package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
  191. package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
  192. package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
  193. package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
  194. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
  195. package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
  196. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
  197. package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
  198. package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
  199. package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
  200. package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
  201. package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
  202. package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
  203. package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
  204. package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
  205. package/dist/utility/wrun/wrun-host.service.js +137 -27
  206. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
  207. package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
  208. package/dist/utility/wrun/wrun-hover.util.d.ts +8 -2
  209. package/dist/utility/wrun/wrun-hover.util.js +24 -13
  210. package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
  211. package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
  212. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
  213. package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
  214. package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
  215. package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
  216. package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
  217. package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
  218. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
  219. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
  220. package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
  221. package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
  222. package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
  223. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
  224. package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
  225. package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
  226. package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
  227. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
  228. package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
  229. package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
  230. package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
  231. package/dist/utility/wrun/wrun-live-tick.util.js +655 -97
  232. package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
  233. package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
  234. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
  235. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
  236. package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
  237. package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
  238. package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
  239. package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
  240. package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
  241. package/dist/utility/wrun/wrun-option-views.util.js +5 -2
  242. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
  243. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
  244. package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
  245. package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
  246. package/dist/utility/wrun/wrun-output-words.util.d.ts +14 -0
  247. package/dist/utility/wrun/wrun-output-words.util.js +51 -0
  248. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +116 -11
  249. package/dist/utility/wrun/wrun-overlay-drivers.util.js +208 -43
  250. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
  251. package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
  252. package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
  253. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
  254. package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
  255. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +6 -1
  256. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  257. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +247 -26
  258. package/dist/utility/wrun/wrun-overlay-run.util.js +2234 -408
  259. package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
  260. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +11 -2
  261. package/dist/utility/wrun/wrun-panel-mount.util.js +122 -19
  262. package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
  263. package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
  264. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
  265. package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
  266. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
  267. package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
  268. package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
  269. package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
  270. package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
  271. package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
  272. package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
  273. package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
  274. package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
  275. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
  276. package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
  277. package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
  278. package/dist/utility/wrun/wrun-refusal.util.js +103 -16
  279. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
  280. package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
  281. package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
  282. package/dist/utility/wrun/wrun-run-health.util.d.ts +95 -5
  283. package/dist/utility/wrun/wrun-run-health.util.js +209 -3
  284. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
  285. package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
  286. package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
  287. package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
  288. package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
  289. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +38 -11
  290. package/dist/utility/wrun/wrun-script-inputs.util.js +194 -56
  291. package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
  292. package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
  293. package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
  294. package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
  295. package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
  296. package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
  297. package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
  298. package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
  299. package/dist/utility/wrun/wrun-style-names.util.d.ts +23 -0
  300. package/dist/utility/wrun/wrun-style-names.util.js +74 -0
  301. package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
  302. package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
  303. package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
  304. package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
  305. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
  306. package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
  307. package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
  308. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
  309. package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
  310. package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
  311. package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
  312. package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
  313. package/dist/utility/wrun/wrun-visibility-table.js +9 -0
  314. package/dist/utility/wrun/wrun-volume-profile.util.js +7 -3
  315. package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
  316. package/dist/utils/replay/replay-buffer-math.js +60 -30
  317. package/dist/workers/constants/socket-slots.d.ts +11 -7
  318. package/dist/workers/constants/socket-slots.js +6 -5
  319. package/package.json +5 -5
@@ -1,10 +1,13 @@
1
1
  import { KSCRIPT_SOURCE_CELL_BYTES, kScriptSourceAnswerRows } from '../../chart/kscript-source-answer-budget.leaf.js';
2
+ import { planeReadFactsOf, WRUN_PLANE_PAYLOAD_KEY } from '../../chart/opra-read-access.leaf.js';
3
+ import { isStocksTapeGoverned } from '../../v2/stocks-governed.util.js';
2
4
  import { wrunChartHostEnv } from '../../../host-env.js';
3
5
  import { wrunRowLaneByKey, wrunRowLaneOfClass, wrunRowLanes } from './row-lane-registry.js';
4
- import { assertWrunLaneChainPlaneReadable, stableJson, wrunChainLaneContext, wrunChainLaneStop, wrunChartOpraPlane, wrunHostGridAsksWithinHorizon, wrunLaneNoChainRefusal, wrunOpraPlaneStopDetail, wrunPollLaneChainAsk, wrunPollLaneChainExchange, wrunPollLaneChainGovernedExchange, wrunPollLaneChainPlane, resolveWrunOptionSettingKnobs, wrunUnservedLaneInput, } from './wrun-poll-lanes.util.js';
5
- import { WRUN_ROW_LANE_ID_PREFIX, } from './wrun-row-lane.types.js';
6
+ import { assertWrunLaneChainPlaneReadable, stableJson, wrunChainLaneContext, wrunChainLaneStop, wrunChartOpraPlane, wrunHostGridAsksWithinHorizon, wrunLaneNoChainRefusal, wrunOpraPlaneStopDetail, wrunPollLaneChainAsk, wrunPollLaneChainExchange, wrunPollLaneChainGovernedExchange, wrunPollLaneChainPlane, resolveWrunOptionSettingKnobs, wrunUnservedLaneInput, wrunLaneUnservedScopeRefusal, } from './wrun-poll-lanes.util.js';
7
+ import { wrunPollLaneByKey } from './registry.js';
8
+ import { isWrunRowLaneId, WRUN_ROW_LANE_ID_PREFIX, } from './wrun-row-lane.types.js';
6
9
  import { assertWrunOpraLaneReadable } from '../wrun-opra-lane.util.js';
7
- import { resolveWrunUnderlyingMarket, resolveWrunUnderlyingSettingKnob, wrunTakesUnderlying, wrunUnderlyingKnob, wrunUnderlyingLaneContext, wrunUnderlyingRootOf, wrunUnderlyingVenueWord, } from '../derived-roots.util.js';
10
+ import { planWrunLaneUnderlying, wrunTakesUnderlying, wrunUnderlyingVenueWord, } from '../derived-roots.util.js';
8
11
  import { wrunSheetCellBlockTuples } from '../wrun-cell-capacity.leaf.js';
9
12
  import { optionTradeDateClockOf, optionTradeDayByClock, optionTradeDayStartMsByClock, } from '../../options/option-trade-date.util.js';
10
13
  import { WRUN_OPTION_FLOW_TODAY_FIELD, wrunOptionFlowTodayFromOf } from '../wrun-option-contract-flow.util.js';
@@ -83,9 +86,12 @@ function wrunRowLaneUnadmittedReason(lane) {
83
86
  /**
84
87
  * Why a row lane that is no chain lane is not served on the chart, or undefined: a governed OPRA lane (after the OPRA
85
88
  * wall, on any chart) off the plane (the stop's words when a known stop keeps the chart's options off it), any other
86
- * lane on an index-mode chart.
89
+ * lane on an index-mode chart. A `stocks` lane is admitted on every chart: its identity reads the tape market resolver,
90
+ * which refuses by name off a US stock tape market and on a Price only chart.
87
91
  */
88
92
  function wrunRowLaneUnserved(lane, plane, indexMode, run, ctx) {
93
+ if (lane.governed === 'stocks')
94
+ return undefined;
89
95
  if (lane.governed === 'opra') {
90
96
  assertWrunOpraLaneReadable(run, ctx);
91
97
  if (plane.onPlane)
@@ -106,8 +112,10 @@ function wrunRowLaneUnserved(lane, plane, indexMode, run, ctx) {
106
112
  * on a chart whose options list on OPRA (riding the plane or stopped off it), before its chain is resolved;
107
113
  * 2. the admission: a governed OPRA lane is served where the chart's options ride the OPRA plane
108
114
  * (`isOpraPlaneExchange`) and nowhere else; a chain lane on every chart no known stop keeps its options off the
109
- * plane on (`wrunChainLaneStop`, the chain poll lanes' one rule: no chain is resolved past the stop); any other lane
110
- * wherever the chart is not index-mode. An input the chart does not serve meets the one rule both planners keep
115
+ * plane on (`wrunChainLaneStop`, the chain poll lanes' one rule: no chain is resolved past the stop); a `stocks` lane
116
+ * on every chart (its identity asks the chart's tape market, `chartMetadata`, and refuses off a US stock tape market
117
+ * with the unserved-scope seed, so a declared fill reads the market's note, and on Price only by name); any other
118
+ * lane wherever the chart is not index-mode. An input the chart does not serve meets the one rule both planners keep
111
119
  * (wrun-poll-lanes.util `wrunUnservedLaneInput`): declaring `missing: "empty"` it is dropped (its blocks read EMPTY,
112
120
  * a note names the feed), any other refuses by name, seeded feed-missing (paused); a lane off the plane for a known
113
121
  * reason (`opraPlaneStop`: the `opra` flag dark, an index chart) says that reason instead (`options-stopped`, the
@@ -116,14 +124,14 @@ function wrunRowLaneUnserved(lane, plane, indexMode, run, ctx) {
116
124
  * facets (awaited, in declaration order), each knob naming a setting first read as the setting's current value
117
125
  * (`resolveWrunOptionSettingKnobs` over `run.paramValues`), the context carrying the plan's facts beside the chart
118
126
  * (`WrunRowLanePlanFacts`); the instance is the identity and the facets together. An input naming another root
119
- * (contract F's `underlying`, `planWrunRowLaneUnderlying`) is planned against that root's market instead, its
127
+ * (contract F's `underlying`, derived-roots.util `planWrunLaneUnderlying`) is planned against that root's market, its
120
128
  * identity once per lane and market. A lane with
121
129
  * `acquisitions: 'one'` refuses a second input whose acquisition differs (one fetch, one live fold per package). A
122
130
  * chart with no option chain (an identity or facets refusal seeded `no-options` / `chain`, `wrunLaneNoChainRefusal`:
123
131
  * a LINK perp, a forex pair) does not serve the feed either: the same one rule, its note naming the feed with the
124
132
  * chain decision's words, its refusal the decision's own. A chain lane's instance then meets its own plane's wall
125
- * (`assertWrunLaneChainPlaneReadable`, the one rule a chain poll lane meets too): OPRA's, or the CME display wall
126
- * (OpenMarket's own packages only); a plain chain (a crypto venue) none.
133
+ * (`assertWrunLaneChainPlaneReadable`, the one rule a chain poll lane meets too): OPRA's, or the CME chain wall
134
+ * (`mayReadCmeChain`: an official run, or a CME chart study); a plain chain (a crypto venue) none.
127
135
  */
128
136
  export async function planWrunRowLanes(metadata, chart, run) {
129
137
  const instances = new Map();
@@ -146,13 +154,13 @@ export async function planWrunRowLanes(metadata, chart, run) {
146
154
  exchange: chart.exchange,
147
155
  symbol: chart.symbol,
148
156
  ...(chart.category !== undefined ? { category: chart.category } : {}),
157
+ ...(chart.chartMetadata !== undefined ? { chartMetadata: chart.chartMetadata } : {}),
149
158
  intervalMs: chart.intervalMs,
150
159
  inputName: planned.inputName,
151
160
  sourceClass: lane.sourceClass,
152
161
  indexMode,
153
162
  cryptoVenue,
154
- official: run?.official === true,
155
- opraUserScripts: run?.opraUserScripts === true,
163
+ ...planeReadFactsOf(run),
156
164
  maxCells: planned.maxCells,
157
165
  laneMaxCells: laneMaxCells.get(lane.sourceClass),
158
166
  params,
@@ -183,9 +191,9 @@ export async function planWrunRowLanes(metadata, chart, run) {
183
191
  let extras;
184
192
  try {
185
193
  // Contract F: an input naming another root (`underlying`) is planned against that root's market
186
- // (`planWrunRowLaneUnderlying`); "auto" (absent too) against the chart's, as every other lane's input.
194
+ // (`planWrunLaneUnderlying`, both planners' one rule); "auto" (absent too) against the chart's.
187
195
  const underlying = wrunTakesUnderlying(lane.sourceClass)
188
- ? await planWrunRowLaneUnderlying(planned.source, chainCtx, run)
196
+ ? await planWrunLaneUnderlying(planned.source, chainCtx, params, run, WRUN_ROW_LANE_UNSERVED_FILLS)
189
197
  : undefined;
190
198
  if (underlying !== undefined && 'why' in underlying) {
191
199
  wrunUnservedLaneInput(missing, unserved, WRUN_ROW_LANE_UNSERVED_FILLS, underlying.why, cryptoVenue);
@@ -205,8 +213,9 @@ export async function planWrunRowLanes(metadata, chart, run) {
205
213
  extras = { ...identity, ...definedFields(await lane.facets?.(source, laneCtx)) };
206
214
  }
207
215
  catch (error) {
208
- // A chart with no option chain does not serve the feed (`wrunLaneNoChainRefusal`): the same one rule.
209
- if (!wrunLaneNoChainRefusal(error))
216
+ // A chart with no option chain does not serve the feed (`wrunLaneNoChainRefusal`), nor one whose plane serves no
217
+ // such market (`wrunLaneUnservedScopeRefusal`: a `stocks` lane off a US stock tape market): the same one rule.
218
+ if (!wrunLaneNoChainRefusal(error) && !wrunLaneUnservedScopeRefusal(error))
210
219
  throw error;
211
220
  wrunUnservedLaneInput(missing, unserved, WRUN_ROW_LANE_UNSERVED_FILLS, { noChain: error }, cryptoVenue);
212
221
  continue;
@@ -232,41 +241,6 @@ export async function planWrunRowLanes(metadata, chart, run) {
232
241
  }
233
242
  return { lanes: [...instances.values()], missingFeeds: [...missing.values()] };
234
243
  }
235
- /**
236
- * Contract F (SKYLIT-PARITY, derived-roots.util): one input of a lane that takes the `underlying` knob
237
- * (`option_strikes`) naming another root ("SPX", "derived" for the derived table's default root of the chart's root, a
238
- * setting picking one, read first: `resolveWrunUnderlyingSettingKnob`) is planned against that root's market, as if the
239
- * chart were that market (`wrunUnderlyingLaneContext`): the lane's own identity and facets read the root's chain through
240
- * the one chain resolver, so every venue and book word, wall and refusal of the lane holds, and the instance's
241
- * acquisition names the root's chain. An OPRA root meets the OPRA wall before any read (`opra-official-only:<class>`),
242
- * then, kept off the plane by a known stop (the `opra` flag dark), the stop's rule (`wrunUnservedLaneInput`, the chain
243
- * lanes' own for a stopped chart); a CME root meets the CME display wall before any read too.
244
- * A root no venue family lists refuses by name (`wrun_underlying_unresolved:<root>`, the no-chain seed). Undefined:
245
- * "auto" (absent too), the chart's own chain.
246
- */
247
- async function planWrunRowLaneUnderlying(source, ctx, run) {
248
- const read = resolveWrunUnderlyingSettingKnob(ctx, source, ctx.params ?? [], run?.paramValues);
249
- const root = wrunUnderlyingRootOf(wrunUnderlyingKnob(read, ctx), ctx);
250
- if (root === undefined)
251
- return undefined;
252
- const market = await resolveWrunUnderlyingMarket(root, ctx, run);
253
- // A CME root's chain is CME options data whatever the chart: the display wall before any read (and after the facets,
254
- // as for every chain instance). OpenMarket's own packages only, whatever the `cme-user-scripts` gate says (no implied
255
- // expansion to CME options).
256
- if (market.family === 'cme')
257
- assertWrunLaneChainPlaneReadable('cme', market.exchange, run, ctx);
258
- if (market.family === 'opra') {
259
- assertWrunOpraLaneReadable(run, ctx);
260
- if (market.opraStop !== undefined) {
261
- return { why: { words: wrunOpraPlaneStopDetail(market.opraStop), stop: market.opraStop } };
262
- }
263
- }
264
- return {
265
- ctx: wrunUnderlyingLaneContext(ctx, market),
266
- key: `${market.exchange}|${market.symbol}|${market.coin}|${market.venue ?? ''}`,
267
- market,
268
- };
269
- }
270
244
  /** The most `max_cells` among a sheet's planned inputs of each row-lane class (`WrunRowLanePlanFacts.laneMaxCells`). */
271
245
  function wrunRowLaneMaxCellsByClass(planned) {
272
246
  const most = new Map();
@@ -319,13 +293,27 @@ export function wrunRowLaneMovedInstance(instances, acquisition) {
319
293
  * plane names beside it, by the chain poll lanes' one rule (`wrunPollLaneChainAsk`): an OPRA chain names the plane and
320
294
  * its routed tier (Door C judges it an OPRA ask, the legend names a delayed tier); a CME chain its routed tier alone
321
295
  * (`servedTier`, so no source cache serves one tier's rows to the other; the chart's own badge names the delay); a
322
- * plain chain (a crypto venue) nothing. Any other lane's payload as it is. `tierOf` is the routing's rule
323
- * (governed-route.util `governedMarketDataTier`), handed in so this module stays off the routing graph, and asked only
324
- * for a governed exchange: it answers delayed for any exchange no gate governs.
296
+ * plain chain (a crypto venue) nothing. A `stocks` lane's payload names its plane and the tier its tape is routed to
297
+ * (`wrunPlane: 'stocks'`, `servedTier`: the legend's delay statement and the add memo's fingerprint read them). Any
298
+ * other lane's payload as it is. `tierOf` is the routing's rule (governed-route.util `governedMarketDataTier`), handed
299
+ * in so this module stays off the routing graph, and asked only for a governed exchange: it answers delayed for any
300
+ * exchange no gate governs.
325
301
  */
326
302
  export function wrunRowLaneChainAsk(lane, extras, tierOf) {
303
+ if (lane.governed === 'stocks') {
304
+ const tape = wrunRowLaneStocksTapeOf(lane, extras);
305
+ return { ...extras, [WRUN_PLANE_PAYLOAD_KEY]: 'stocks', servedTier: tape === null ? 'delayed' : tierOf(tape) };
306
+ }
327
307
  return wrunPollLaneChainAsk(lane, extras, tierOf);
328
308
  }
309
+ /** The tape a `stocks` lane's instance reads (its identity's `exchange`, a stocks-governed code), or null for any other
310
+ * lane and a payload naming no tape: the provenance stamp, the live reconcile's poll window and the tier follow it. */
311
+ export function wrunRowLaneStocksTapeOf(lane, extras) {
312
+ if (lane.governed !== 'stocks')
313
+ return null;
314
+ const exchange = extras.exchange;
315
+ return typeof exchange === 'string' && isStocksTapeGoverned(exchange) ? exchange : null;
316
+ }
329
317
  /** How an empty answer reads for a lane: quiet (present EMPTY blocks) or degrading (a state lane's). */
330
318
  export function wrunRowLaneEmptyAnswer(lane) {
331
319
  return lane.emptyAnswer ?? (lane.landing.kind === 'flow' ? 'quiet' : 'degrades');
@@ -627,11 +615,7 @@ export async function fetchWrunRowLaneRows(lane, extras, askedWindow, fallback,
627
615
  download,
628
616
  firstPaint,
629
617
  land: landGroup,
630
- landedData: (stampMs) => (byBar.get(stampMs) ?? [])
631
- .slice(1)
632
- .some((tuple) => Array.isArray(tuple) &&
633
- tuple.length > 0 &&
634
- (sized.presentMask === false || !wrunPresentIsPartial(Number(tuple[tuple.length - 1])))),
618
+ landedData: (stampMs) => wrunRowLaneRowHasData(byBar.get(stampMs) ?? [], sized.presentMask !== false),
635
619
  });
636
620
  sentAsks = within.sent;
637
621
  readPartial = within.partialBars;
@@ -1332,17 +1316,11 @@ function reportWrunRowLaneBudgetCut(cut, intervalMs, onBudgetCut) {
1332
1316
  function finiteOrUndefined(value) {
1333
1317
  return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
1334
1318
  }
1335
- /**
1336
- * How far back one row lane's source holds rows for an acquisition at the clock: the later of its horizon's served
1337
- * start and the oldest bar its longest-kept tier still holds; null when it names neither, or a tier keeps its rows for
1338
- * good (it may answer any window). A `latest` lane reads one snapshot on the live row, no history: undefined.
1339
- */
1340
- export function wrunRowLaneReachFromMs(lane, extras, nowMs) {
1341
- if (lane.landing.kind === 'latest')
1342
- return undefined;
1343
- const horizonFrom = finiteOrUndefined(lane.horizon?.(extras, nowMs)?.servedFromMs);
1344
- const tiers = lane.landing.tiers ?? [];
1345
- const kept = tiers.map((tier) => tier.retentionMs);
1319
+ /** The later of a horizon's served start and the oldest bar the longest-kept tier still holds; null when neither is
1320
+ * named, or a tier keeps its rows for good (the source may answer any window). */
1321
+ function wrunDeclaredReachFromMs(tiers, horizon, nowMs) {
1322
+ const horizonFrom = finiteOrUndefined(horizon?.servedFromMs);
1323
+ const kept = (tiers ?? []).map((tier) => tier.retentionMs);
1346
1324
  const tierFrom = kept.length > 0 && kept.every((ms) => ms !== undefined)
1347
1325
  ? finiteOrUndefined(nowMs - Math.max(...kept))
1348
1326
  : undefined;
@@ -1351,22 +1329,101 @@ export function wrunRowLaneReachFromMs(lane, extras, nowMs) {
1351
1329
  return Math.max(horizonFrom ?? Number.NEGATIVE_INFINITY, tierFrom ?? Number.NEGATIVE_INFINITY);
1352
1330
  }
1353
1331
  /**
1354
- * Where the rows of a run's history sources begin at the clock: the warm-up decider's `sourceReachFromTs`
1355
- * (local-kscript-warmup-depth.util), the earliest reach among the row lane instances that read a history
1356
- * (`wrunRowLaneReachFromMs`). A visible first value at or after it, with it at or after the loaded start, is a
1357
- * source's history beginning, never a warm-up a page of older candles could fill. Null when no instance reads a
1358
- * history, when one names no reach, or when the run reads any other source beside the chart's candles (a poll lane, a
1359
- * pinned leg, a trades lane: none names its reach yet), since older candles may then still bring that source rows.
1332
+ * How far back one row lane's source holds rows for an acquisition at the clock, as the lane declares it: the later of
1333
+ * its horizon's served start and the oldest bar its longest-kept tier still holds; null when it names neither, or a
1334
+ * tier keeps its rows for good (it may answer any window). A `latest` lane reads one snapshot on the live row, no
1335
+ * history: undefined.
1360
1336
  */
1361
- export function wrunRunSourceReachFromMs(args) {
1362
- if (args.readsOtherSources)
1337
+ export function wrunRowLaneReachFromMs(lane, extras, nowMs) {
1338
+ if (lane.landing.kind === 'latest')
1339
+ return undefined;
1340
+ return wrunDeclaredReachFromMs(lane.landing.tiers, lane.horizon?.(extras, nowMs), nowMs);
1341
+ }
1342
+ /** A poll lane's declared reach, the row lanes' rule over its host grid's tiers and its `horizon`; null when it names
1343
+ * neither (a daily join, a lane with no tiers). */
1344
+ export function wrunPollLaneReachFromMs(lane, extras, nowMs) {
1345
+ return wrunDeclaredReachFromMs(lane.barGrid?.tiers, lane.horizon?.(extras, nowMs), nowMs);
1346
+ }
1347
+ /** Whether a row lane's host-bar row holds data: a tuple that is no partial marker (bit 14, read where the block has a
1348
+ * `present` mask); a packed block is read tuple by tuple at the named width, and reads as no data without one. */
1349
+ export function wrunRowLaneRowHasData(row, presentMask, width) {
1350
+ for (let at = 1; at < row.length; at += 1) {
1351
+ const cell = row[at];
1352
+ if (Array.isArray(cell)) {
1353
+ if (cell.length > 0 && (!presentMask || !wrunPresentIsPartial(Number(cell[cell.length - 1]))))
1354
+ return true;
1355
+ }
1356
+ else if (cell instanceof Float64Array && width !== undefined && width >= 1 && cell.length % width === 0) {
1357
+ for (let end = width - 1; end < cell.length; end += width) {
1358
+ if (!presentMask || !wrunPresentIsPartial(cell[end]))
1359
+ return true;
1360
+ }
1361
+ }
1362
+ }
1363
+ return false;
1364
+ }
1365
+ /**
1366
+ * Where an answer that holds a row for every bar it covers begins (a quiet bar too, so a missing older row is no
1367
+ * history): its first row, when the run asked from before it. Null when that row is a partial marker (a bar the host
1368
+ * left unasked or unretained: the declared reach names it), sits at or before the asked start, or there is none.
1369
+ */
1370
+ export function wrunEveryBarAnswerReachMs(rows, askedFromMs, covered = () => true) {
1371
+ const first = rows?.find((row) => row !== null && row !== undefined && Number.isFinite(Number(row[0])));
1372
+ if (first === undefined || !covered(first))
1363
1373
  return null;
1364
- let earliest = null;
1365
- for (const instance of args.rowLanes) {
1366
- const lane = wrunRowLaneByKey(instance.laneKey);
1367
- if (lane === undefined)
1374
+ const ts = Number(first[0]);
1375
+ return ts > askedFromMs ? ts : null;
1376
+ }
1377
+ /** Every lane and leg a run read, each with its instance: the one list both warm-up asks build, none left out. */
1378
+ export function wrunRunHistoryLanesOf(args) {
1379
+ const rowLaneByKey = new Map(args.rowLanes.map((instance) => [instance.key, instance]));
1380
+ const pollLaneByKey = new Map(args.pollLanes.map((instance) => [instance.key, instance]));
1381
+ return [
1382
+ ...args.lanes.map(({ lane, rows }) => ({
1383
+ lane,
1384
+ rows,
1385
+ rowLane: rowLaneByKey.get(lane),
1386
+ pollLane: pollLaneByKey.get(lane),
1387
+ })),
1388
+ ...args.legs.map((leg) => ({ lane: leg.fetchKey, rows: args.legRows(leg.fetchKey) })),
1389
+ ];
1390
+ }
1391
+ /** One lane's start as only authority names it: its declared reach, the later of it and an every-bar answer's start;
1392
+ * null (unknown) for any other lane, undefined for one that reads no history. */
1393
+ function wrunRunHistoryLaneReachMs(entry, askedFromMs, nowMs) {
1394
+ let declared = null;
1395
+ let covered;
1396
+ if (entry.rowLane !== undefined || isWrunRowLaneId(entry.lane)) {
1397
+ const lane = entry.rowLane === undefined ? undefined : wrunRowLaneByKey(entry.rowLane.laneKey);
1398
+ if (lane === undefined || entry.rowLane === undefined)
1368
1399
  return null;
1369
- const reach = wrunRowLaneReachFromMs(lane, instance.extras, args.nowMs);
1400
+ const reach = wrunRowLaneReachFromMs(lane, entry.rowLane.extras, nowMs);
1401
+ if (reach === undefined)
1402
+ return undefined;
1403
+ declared = reach;
1404
+ // A partial bar's marker tuple covers nothing: tuple width and mask are the instance's (facets may widen it).
1405
+ const sized = wrunRowLaneAtWidth(lane, wrunOptionLaneTupleWidth(lane.sourceClass, entry.rowLane.extras, lane.width));
1406
+ covered = (row) => wrunRowLaneRowHasData(row, sized.presentMask !== false, sized.width);
1407
+ }
1408
+ else if (entry.pollLane !== undefined) {
1409
+ const lane = wrunPollLaneByKey(entry.pollLane.laneKey);
1410
+ declared = lane === undefined ? null : wrunPollLaneReachFromMs(lane, entry.pollLane.extras, nowMs);
1411
+ }
1412
+ const answered = entry.answersEveryBar === true ? wrunEveryBarAnswerReachMs(entry.rows, askedFromMs, covered) : null;
1413
+ if (declared !== null && answered !== null)
1414
+ return Math.max(declared, answered);
1415
+ return declared ?? answered;
1416
+ }
1417
+ /**
1418
+ * Where a run's history sources begin (the warm-up decider's `sourceReachFromTs`): the earliest start among every lane
1419
+ * and leg it read, each from a declared reach or an every-bar answer asked from before its first row. Null when any
1420
+ * lane's start is unknown (a sparse lane's first row, an illiquid leg, a weekend start), since older candles may then
1421
+ * still bring that lane rows. A lane that reads no history bounds nothing.
1422
+ */
1423
+ export function wrunRunSourceReachFromMs(args) {
1424
+ let earliest = null;
1425
+ for (const entry of args.lanes) {
1426
+ const reach = wrunRunHistoryLaneReachMs(entry, args.askedFromMs, args.nowMs);
1370
1427
  if (reach === undefined)
1371
1428
  continue;
1372
1429
  if (reach === null)
@@ -0,0 +1,78 @@
1
+ /**
2
+ * App layers: first-party Indicator layers the APP mounts on a chart for one of its own panels, from a kit template
3
+ * the app ships (Kyle 2026-11-06, "auto": the Tape's Dark pool section puts Dark pool prints on the chart it follows,
4
+ * nothing to add). The user never adds, saves or removes one: its panel owns it (the Tape's `darkPoolOnChart`).
5
+ *
6
+ * The run is the draft lane's (services/wrun-registry-loader `mountWrunAppLayer`): the kit's template compiled in this
7
+ * browser, mounted from bytes under `settings.wrunDraftRef`, so every persistence seam skips it exactly like an editor
8
+ * draft (wrun-draft-overlay.util: session-only by decision) and the engine alone carries it. What differs is who owns
9
+ * it, named by `wrunDraftRef.appLayer` (a key of WRUN_APP_LAYERS):
10
+ * - official (kscript-venue-policy `isOfficialWrunOverlay`): the code is the app's own, built from the template the
11
+ * app's pinned kit ships under the official package it names, never a field a user run can set (the draft mount
12
+ * builds its ref from fixed fields, the hydration sanitizer never lets a draft in);
13
+ * - no slot (indicator-source-charge `liveOverlaySlotDelta`) and no limit gate at its add: it is the panel's, not one
14
+ * of the user's indicators;
15
+ * - none of the editor's furniture: no draft word or hover title on its legend row, no publish nudge, no window door,
16
+ * no run-health rows meant for the author, no reinit hand-off to an editor tab (its owner mounts it again).
17
+ *
18
+ * Its legend eye is the owner's switch: overlay-visibility `setOverlayVisibility` tells the bus below what the eye
19
+ * chose, and the owner keeps it (the Tape writes `darkPoolOnChart`). Its legend gear opens the settings box every
20
+ * Indicator has (Kyle 2026-11-07), without the doors that act on a workspace row it never has; the box's saves reach
21
+ * the owner through the settings bus below (the store's session-only save seam), and the owner keeps them and hands
22
+ * them to every mount (the Tape writes `darkPoolChartSettings`).
23
+ *
24
+ * Leaf on purpose (no imports): the venue wall, the slot charge and the legend passes read it without a graph.
25
+ */
26
+ /** The app layers, by id: the official package each one runs as, and the kit template it compiles. */
27
+ export declare const WRUN_APP_LAYERS: Readonly<{
28
+ readonly 'dark-pool-prints': Readonly<{
29
+ id: "dark-pool-prints";
30
+ package: "@om-core/dark-pool-prints";
31
+ templateId: "dark-pool-prints";
32
+ }>;
33
+ }>;
34
+ export type WrunAppLayerId = keyof typeof WRUN_APP_LAYERS;
35
+ export type WrunAppLayerSpec = (typeof WRUN_APP_LAYERS)[WrunAppLayerId];
36
+ /** Whether a word names an app layer of the table. */
37
+ export declare function isWrunAppLayerId(value: unknown): value is WrunAppLayerId;
38
+ /** The app layer an overlay's settings name (`wrunDraftRef.appLayer`), or undefined for every other overlay. */
39
+ export declare function wrunAppLayerOf(settings: unknown): WrunAppLayerSpec | undefined;
40
+ /** Whether an overlay is an app layer (the app's own, owned by a panel), not an editor draft. */
41
+ export declare function isWrunAppLayerOverlaySettings(settings: unknown): boolean;
42
+ /** What the legend eye (or the Objects panel) chose for an app layer's overlay. */
43
+ export interface WrunAppLayerVisibility {
44
+ chartIndex: number;
45
+ overlayId: string;
46
+ layer: WrunAppLayerId;
47
+ visible: boolean;
48
+ }
49
+ type VisibilityListener = (event: WrunAppLayerVisibility) => void;
50
+ /** The visibility setter's edge: every listener hears it in turn, and one that throws never stops the next. */
51
+ export declare function noteWrunAppLayerVisibility(event: WrunAppLayerVisibility): void;
52
+ /** Hear every eye an app layer's overlay takes; returns the unsubscribe. */
53
+ export declare function onWrunAppLayerVisibility(listener: VisibilityListener): () => void;
54
+ /** A kept value as its row stores it (wrun-draft-ledger.util `WrunDraftLedgerValue`, written out: a leaf imports
55
+ * nothing). */
56
+ export type WrunAppLayerSettingValue = string | number | boolean | WrunAppLayerSettingValue[] | {
57
+ [key: string]: WrunAppLayerSettingValue;
58
+ };
59
+ /** An app layer's settings box as its owner keeps it, by row name: the value and the row's kind (the draft carry's
60
+ * shape, wrun-draft-settings.util), so a mount takes a value only into a row of the same kind. */
61
+ export type WrunAppLayerSettingsKept = Readonly<Record<string, {
62
+ value: WrunAppLayerSettingValue;
63
+ kind: string;
64
+ }>>;
65
+ /** A person's save in an app layer's settings box: the rows it leaves off their declared defaults (none after a
66
+ * Reset), never a row at its default, so a later default of the template still reaches whoever never set it. */
67
+ export interface WrunAppLayerSettings {
68
+ chartIndex: number;
69
+ overlayId: string;
70
+ layer: WrunAppLayerId;
71
+ kept: WrunAppLayerSettingsKept;
72
+ }
73
+ type SettingsListener = (event: WrunAppLayerSettings) => void;
74
+ /** The settings save's edge: every listener hears it in turn, and one that throws never stops the next. */
75
+ export declare function noteWrunAppLayerSettings(event: WrunAppLayerSettings): void;
76
+ /** Hear every settings save an app layer's overlay takes; returns the unsubscribe. */
77
+ export declare function onWrunAppLayerSettings(listener: SettingsListener): () => void;
78
+ export {};
@@ -0,0 +1,89 @@
1
+ /**
2
+ * App layers: first-party Indicator layers the APP mounts on a chart for one of its own panels, from a kit template
3
+ * the app ships (Kyle 2026-11-06, "auto": the Tape's Dark pool section puts Dark pool prints on the chart it follows,
4
+ * nothing to add). The user never adds, saves or removes one: its panel owns it (the Tape's `darkPoolOnChart`).
5
+ *
6
+ * The run is the draft lane's (services/wrun-registry-loader `mountWrunAppLayer`): the kit's template compiled in this
7
+ * browser, mounted from bytes under `settings.wrunDraftRef`, so every persistence seam skips it exactly like an editor
8
+ * draft (wrun-draft-overlay.util: session-only by decision) and the engine alone carries it. What differs is who owns
9
+ * it, named by `wrunDraftRef.appLayer` (a key of WRUN_APP_LAYERS):
10
+ * - official (kscript-venue-policy `isOfficialWrunOverlay`): the code is the app's own, built from the template the
11
+ * app's pinned kit ships under the official package it names, never a field a user run can set (the draft mount
12
+ * builds its ref from fixed fields, the hydration sanitizer never lets a draft in);
13
+ * - no slot (indicator-source-charge `liveOverlaySlotDelta`) and no limit gate at its add: it is the panel's, not one
14
+ * of the user's indicators;
15
+ * - none of the editor's furniture: no draft word or hover title on its legend row, no publish nudge, no window door,
16
+ * no run-health rows meant for the author, no reinit hand-off to an editor tab (its owner mounts it again).
17
+ *
18
+ * Its legend eye is the owner's switch: overlay-visibility `setOverlayVisibility` tells the bus below what the eye
19
+ * chose, and the owner keeps it (the Tape writes `darkPoolOnChart`). Its legend gear opens the settings box every
20
+ * Indicator has (Kyle 2026-11-07), without the doors that act on a workspace row it never has; the box's saves reach
21
+ * the owner through the settings bus below (the store's session-only save seam), and the owner keeps them and hands
22
+ * them to every mount (the Tape writes `darkPoolChartSettings`).
23
+ *
24
+ * Leaf on purpose (no imports): the venue wall, the slot charge and the legend passes read it without a graph.
25
+ */
26
+ /** The app layers, by id: the official package each one runs as, and the kit template it compiles. */
27
+ export const WRUN_APP_LAYERS = Object.freeze({
28
+ 'dark-pool-prints': Object.freeze({
29
+ id: 'dark-pool-prints',
30
+ package: '@om-core/dark-pool-prints',
31
+ templateId: 'dark-pool-prints',
32
+ }),
33
+ });
34
+ /** Whether a word names an app layer of the table. */
35
+ export function isWrunAppLayerId(value) {
36
+ return typeof value === 'string' && Object.prototype.hasOwnProperty.call(WRUN_APP_LAYERS, value);
37
+ }
38
+ /** The app layer an overlay's settings name (`wrunDraftRef.appLayer`), or undefined for every other overlay. */
39
+ export function wrunAppLayerOf(settings) {
40
+ if (!settings || typeof settings !== 'object')
41
+ return undefined;
42
+ const ref = settings.wrunDraftRef;
43
+ if (!ref || typeof ref !== 'object')
44
+ return undefined;
45
+ const id = ref.appLayer;
46
+ return isWrunAppLayerId(id) ? WRUN_APP_LAYERS[id] : undefined;
47
+ }
48
+ /** Whether an overlay is an app layer (the app's own, owned by a panel), not an editor draft. */
49
+ export function isWrunAppLayerOverlaySettings(settings) {
50
+ return wrunAppLayerOf(settings) !== undefined;
51
+ }
52
+ const visibilityListeners = new Set();
53
+ /** The visibility setter's edge: every listener hears it in turn, and one that throws never stops the next. */
54
+ export function noteWrunAppLayerVisibility(event) {
55
+ for (const listener of [...visibilityListeners]) {
56
+ try {
57
+ listener(event);
58
+ }
59
+ catch (error) {
60
+ console.warn('[wrun-app-layer] visibility listener failed:', error);
61
+ }
62
+ }
63
+ }
64
+ /** Hear every eye an app layer's overlay takes; returns the unsubscribe. */
65
+ export function onWrunAppLayerVisibility(listener) {
66
+ visibilityListeners.add(listener);
67
+ return () => {
68
+ visibilityListeners.delete(listener);
69
+ };
70
+ }
71
+ const settingsListeners = new Set();
72
+ /** The settings save's edge: every listener hears it in turn, and one that throws never stops the next. */
73
+ export function noteWrunAppLayerSettings(event) {
74
+ for (const listener of [...settingsListeners]) {
75
+ try {
76
+ listener(event);
77
+ }
78
+ catch (error) {
79
+ console.warn('[wrun-app-layer] settings listener failed:', error);
80
+ }
81
+ }
82
+ }
83
+ /** Hear every settings save an app layer's overlay takes; returns the unsubscribe. */
84
+ export function onWrunAppLayerSettings(listener) {
85
+ settingsListeners.add(listener);
86
+ return () => {
87
+ settingsListeners.delete(listener);
88
+ };
89
+ }
@@ -73,14 +73,18 @@ export declare function wrunStampCorroborated(module: WrunModuleHandle): boolean
73
73
  /** The first sheet fact that reads or draws beyond the bar at hand, in the kit's own words
74
74
  * (`sheet:<fact>[:<name>]`); undefined when the sheet passes. */
75
75
  export declare function wrunStampSheetRefusal(sheet: unknown): string | undefined;
76
- /** The sheet's raw exact warm-up stamp: its `history_warmup` in the frozen shape (wrun-declared-warmup.util
77
- * `wrunHistoryWarmupOf`), undefined for no key, another kind or a malformed value. The chart admits a
78
- * session on it only once the module and the sheet corroborate it (wrun-overlay-run.util). */
76
+ /** The sheet's raw warm-up stamp: its `history_warmup` in a frozen shape (wrun-declared-warmup.util
77
+ * `wrunHistoryWarmupOf`: the exact stamp, or the converging one in its round A shape), undefined for no key,
78
+ * another kind or a malformed value. The chart admits a session on it only once the module and the sheet
79
+ * corroborate it, and on a converging one only while its flag is on (wrun-overlay-run.util); this read is the
80
+ * same either way. */
79
81
  export declare function wrunWarmupStampOf(sheet: unknown): WrunHistoryWarmup | undefined;
80
- /** The first sheet fact that refuses an exact warm-up stamp: `sheet:history-both` for a sheet that also carries
81
- * `history_independent` (the kit writes one stamp or the other, never both: a sheet holding both was assembled
82
- * by hand), then the per-bar stamp's own sheet facts (`wrunStampSheetRefusal`, the same rules: a warm-up module
83
- * carries kit instances, never a handle, a string slot, a leg or a carried input); undefined when it passes. */
82
+ /** The first sheet fact that refuses a warm-up stamp of either kind: `sheet:history-both` for a sheet that also
83
+ * carries `history_independent` (the kit writes one stamp or the other, never both: a sheet holding both was
84
+ * assembled by hand), then the per-bar stamp's own sheet facts (`wrunStampSheetRefusal`, the same rules: a warm-up
85
+ * module carries kit instances, never a handle, a string slot, a leg or a carried input); undefined when it passes.
86
+ * A converging session's own output rule (no batched drawing or record, canvas child or handle) is its admission's,
87
+ * not a sheet fact: such a sheet still warms its runs, and only its pages run whole. */
84
88
  export declare function wrunWarmupSheetRefusal(sheet: unknown): string | undefined;
85
89
  /** Whether one input reads the chart's own feed, the chart-feed shape (the plan's D3, the kit's `sheet:lanes`
86
90
  * rule): `ohlcv` or `time`, with no key besides source, field and missing (no market, interval, view or depth of
@@ -227,18 +227,22 @@ function carries(source, input) {
227
227
  return !chartFeed;
228
228
  }
229
229
  // ---------------------------------------------------------------------------------------------------
230
- // The exact warm-up stamp (`history_warmup`): read, its sheet fact, the candles-only rule.
230
+ // The warm-up stamp (`history_warmup`, exact or converging): read, its sheet fact, the candles-only rule.
231
231
  // ---------------------------------------------------------------------------------------------------
232
- /** The sheet's raw exact warm-up stamp: its `history_warmup` in the frozen shape (wrun-declared-warmup.util
233
- * `wrunHistoryWarmupOf`), undefined for no key, another kind or a malformed value. The chart admits a
234
- * session on it only once the module and the sheet corroborate it (wrun-overlay-run.util). */
232
+ /** The sheet's raw warm-up stamp: its `history_warmup` in a frozen shape (wrun-declared-warmup.util
233
+ * `wrunHistoryWarmupOf`: the exact stamp, or the converging one in its round A shape), undefined for no key,
234
+ * another kind or a malformed value. The chart admits a session on it only once the module and the sheet
235
+ * corroborate it, and on a converging one only while its flag is on (wrun-overlay-run.util); this read is the
236
+ * same either way. */
235
237
  export function wrunWarmupStampOf(sheet) {
236
238
  return isRecord(sheet) ? wrunHistoryWarmupOf(sheet.history_warmup) : undefined;
237
239
  }
238
- /** The first sheet fact that refuses an exact warm-up stamp: `sheet:history-both` for a sheet that also carries
239
- * `history_independent` (the kit writes one stamp or the other, never both: a sheet holding both was assembled
240
- * by hand), then the per-bar stamp's own sheet facts (`wrunStampSheetRefusal`, the same rules: a warm-up module
241
- * carries kit instances, never a handle, a string slot, a leg or a carried input); undefined when it passes. */
240
+ /** The first sheet fact that refuses a warm-up stamp of either kind: `sheet:history-both` for a sheet that also
241
+ * carries `history_independent` (the kit writes one stamp or the other, never both: a sheet holding both was
242
+ * assembled by hand), then the per-bar stamp's own sheet facts (`wrunStampSheetRefusal`, the same rules: a warm-up
243
+ * module carries kit instances, never a handle, a string slot, a leg or a carried input); undefined when it passes.
244
+ * A converging session's own output rule (no batched drawing or record, canvas child or handle) is its admission's,
245
+ * not a sheet fact: such a sheet still warms its runs, and only its pages run whole. */
242
246
  export function wrunWarmupSheetRefusal(sheet) {
243
247
  if (isRecord(sheet) && sheet.history_independent !== undefined)
244
248
  return 'sheet:history-both';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The batched kinds (WRUN-BATCHED-MARKS), the one list: each a sheet key, a child id kind (`<parent>::<kind>:<name>`)
3
+ * and the engine plot type, in mount order (flags last, so a flag's chip mounts after the marks it points at).
4
+ * wrun-batched-marks.util builds the children and re-exports this list; the readers that must not load it (the replay
5
+ * cut and the replay blank, the Style seam, the pan-back prefix landing, the hover inspector) read it here, so a kind
6
+ * added to the union reaches every one of them. Imports a type only.
7
+ */
8
+ import type { WrunBatchedMarksKind } from '../../interfaces/wrun-runtime.interface.js';
9
+ /** The four kinds, in mount order. */
10
+ export declare const WRUN_BATCHED_MARKS_KINDS: ReadonlyArray<WrunBatchedMarksKind>;
11
+ export declare function isWrunBatchedMarksKind(kind: unknown): kind is WrunBatchedMarksKind;
12
+ /** True for a batched child of `ownerId` (`<ownerId>::<kind>:<name>`, wrun-batched-marks.util `wrunBatchedChildId`). */
13
+ export declare function isWrunBatchedChildIdOf(id: unknown, ownerId: string): boolean;
@@ -0,0 +1,18 @@
1
+ /** Each kind once, in mount order, checked against the union: a kind the union gains fails typecheck here until it
2
+ * joins the list. */
3
+ const KIND_WORDS = {
4
+ marks: true,
5
+ spans: true,
6
+ rays: true,
7
+ flags: true,
8
+ };
9
+ /** The four kinds, in mount order. */
10
+ export const WRUN_BATCHED_MARKS_KINDS = Object.freeze(Object.keys(KIND_WORDS));
11
+ const KINDS = new Set(WRUN_BATCHED_MARKS_KINDS);
12
+ export function isWrunBatchedMarksKind(kind) {
13
+ return typeof kind === 'string' && KINDS.has(kind);
14
+ }
15
+ /** True for a batched child of `ownerId` (`<ownerId>::<kind>:<name>`, wrun-batched-marks.util `wrunBatchedChildId`). */
16
+ export function isWrunBatchedChildIdOf(id, ownerId) {
17
+ return typeof id === 'string' && WRUN_BATCHED_MARKS_KINDS.some((kind) => id.startsWith(`${ownerId}::${kind}:`));
18
+ }