@orangecharts/wrun-chart-host 0.11.1 → 0.14.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 (307) hide show
  1. package/README.md +1 -0
  2. package/dist/constants/feature-flags.constants.d.ts +3 -4
  3. package/dist/constants/feature-flags.constants.js +34 -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 +55 -3
  13. package/dist/host-env.js +6 -0
  14. package/dist/host-ports.types.d.ts +36 -3
  15. package/dist/index.d.ts +17 -0
  16. package/dist/index.js +18 -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 +97 -19
  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 +4 -4
  35. package/dist/market-data/venues/stocks.contract.copy.json +4 -4
  36. package/dist/market-data/venues/stocks.d.ts +4 -4
  37. package/dist/market-data/venues/stocks.js +15 -13
  38. package/dist/settings-templates/frvp-fields.d.ts +12 -1
  39. package/dist/settings-templates/frvp-fields.js +15 -4
  40. package/dist/settings-templates/index.js +12 -5
  41. package/dist/settings-templates/indicator-fields.js +28 -2
  42. package/dist/settings-templates/tool-rules.d.ts +17 -8
  43. package/dist/settings-templates/tool-rules.js +15 -8
  44. package/dist/settings-templates/tool-tables.generated.js +4 -2
  45. package/dist/utility/auth/server-clock.util.d.ts +3 -1
  46. package/dist/utility/auth/server-clock.util.js +3 -1
  47. package/dist/utility/chart/book-live-bucket.util.js +2 -2
  48. package/dist/utility/chart/cache-alignment.util.d.ts +15 -7
  49. package/dist/utility/chart/cache-alignment.util.js +14 -7
  50. package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
  51. package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
  52. package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
  53. package/dist/utility/chart/cme-session-bucket.util.js +25 -332
  54. package/dist/utility/chart/continuous-contracts.util.js +6 -5
  55. package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
  56. package/dist/utility/chart/display-offset.leaf.js +41 -0
  57. package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
  58. package/dist/utility/chart/effective-chart-session.util.js +13 -5
  59. package/dist/utility/chart/feed-interval.util.d.ts +6 -20
  60. package/dist/utility/chart/feed-interval.util.js +13 -22
  61. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
  62. package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
  63. package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
  64. package/dist/utility/chart/host-bar-placement.util.js +8 -2
  65. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
  66. package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
  67. package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
  68. package/dist/utility/chart/indicator-run-interval.util.js +21 -12
  69. package/dist/utility/chart/interval-registry.util.d.ts +1 -1
  70. package/dist/utility/chart/interval-registry.util.js +1 -1
  71. package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
  72. package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
  73. package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
  74. package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
  75. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
  76. package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
  77. package/dist/utility/chart/live-bucket.util.d.ts +39 -17
  78. package/dist/utility/chart/live-bucket.util.js +103 -57
  79. package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
  80. package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
  81. package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
  82. package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
  83. package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
  84. package/dist/utility/chart/market-session-schedule.util.js +39 -1
  85. package/dist/utility/chart/market-session.util.d.ts +136 -0
  86. package/dist/utility/chart/market-session.util.js +341 -0
  87. package/dist/utility/chart/om-panel.util.d.ts +5 -3
  88. package/dist/utility/chart/om-panel.util.js +42 -7
  89. package/dist/utility/chart/om-target.util.d.ts +14 -1
  90. package/dist/utility/chart/om-target.util.js +22 -5
  91. package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
  92. package/dist/utility/chart/opra-read-access.leaf.js +22 -0
  93. package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
  94. package/dist/utility/chart/profile-row-height.util.js +74 -37
  95. package/dist/utility/chart/rth-session.util.d.ts +55 -20
  96. package/dist/utility/chart/rth-session.util.js +94 -46
  97. package/dist/utility/chart/session-lattice.util.d.ts +150 -0
  98. package/dist/utility/chart/session-lattice.util.js +488 -0
  99. package/dist/utility/chart/trading-day.util.d.ts +40 -2
  100. package/dist/utility/chart/trading-day.util.js +84 -7
  101. package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
  102. package/dist/utility/chart/us-equities-session.util.js +44 -15
  103. package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
  104. package/dist/utility/chart/window-geometry.leaf.js +57 -8
  105. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
  106. package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
  107. package/dist/utility/chart/wrun-run-result.util.d.ts +29 -12
  108. package/dist/utility/chart/wrun-run-result.util.js +89 -25
  109. package/dist/utility/common/time.util.js +5 -4
  110. package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
  111. package/dist/utility/market-events/earnings-scope.util.js +17 -9
  112. package/dist/utility/market-events/market-events.util.d.ts +14 -7
  113. package/dist/utility/market-events/market-events.util.js +30 -17
  114. package/dist/utility/number-format.util.d.ts +14 -21
  115. package/dist/utility/number-format.util.js +38 -24
  116. package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
  117. package/dist/utility/options/option-venue-disclosure.util.js +71 -11
  118. package/dist/utility/options/option-venue.util.d.ts +1 -1
  119. package/dist/utility/options/option-venue.util.js +1 -1
  120. package/dist/utility/pool-symbol.leaf.d.ts +7 -0
  121. package/dist/utility/pool-symbol.leaf.js +50 -5
  122. package/dist/utility/stocks/stock-display.util.d.ts +15 -0
  123. package/dist/utility/stocks/stock-display.util.js +37 -0
  124. package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
  125. package/dist/utility/v2/gate-plane.util.d.ts +6 -0
  126. package/dist/utility/v2/gate-plane.util.js +11 -1
  127. package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
  128. package/dist/utility/v2/gate-session-latch.util.js +3 -3
  129. package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
  130. package/dist/utility/v2/governed-tier.leaf.js +17 -16
  131. package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
  132. package/dist/utility/v2/stocks-governed.util.js +14 -0
  133. package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
  134. package/dist/utility/v2/v2-enums.leaf.js +458 -0
  135. package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
  136. package/dist/utility/wrun/derived-roots.leaf.js +27 -1
  137. package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
  138. package/dist/utility/wrun/derived-roots.util.js +97 -56
  139. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
  140. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
  141. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
  142. package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
  143. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
  144. package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
  145. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
  146. package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
  147. package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
  148. package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
  149. package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
  150. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
  151. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
  152. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
  153. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
  154. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
  155. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
  156. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
  157. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
  158. package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
  159. package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
  160. package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
  161. package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
  162. package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
  163. package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
  164. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +41 -22
  165. package/dist/utility/wrun/wrun-batched-marks.util.js +255 -59
  166. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
  167. package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
  168. package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
  169. package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
  170. package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
  171. package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
  172. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
  173. package/dist/utility/wrun/wrun-canvases.util.js +7 -3
  174. package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
  175. package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
  176. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
  177. package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
  178. package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
  179. package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
  180. package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
  181. package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
  182. package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
  183. package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
  184. package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
  185. package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
  186. package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
  187. package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
  188. package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
  189. package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
  190. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
  191. package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
  192. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
  193. package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
  194. package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
  195. package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
  196. package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
  197. package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
  198. package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
  199. package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
  200. package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
  201. package/dist/utility/wrun/wrun-host.service.js +137 -27
  202. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
  203. package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
  204. package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
  205. package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
  206. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
  207. package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
  208. package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
  209. package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
  210. package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
  211. package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
  212. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
  213. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
  214. package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
  215. package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
  216. package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
  217. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
  218. package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
  219. package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
  220. package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
  221. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
  222. package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
  223. package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
  224. package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
  225. package/dist/utility/wrun/wrun-live-tick.util.js +648 -97
  226. package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
  227. package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
  228. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
  229. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
  230. package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
  231. package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
  232. package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
  233. package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
  234. package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
  235. package/dist/utility/wrun/wrun-option-views.util.js +5 -2
  236. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
  237. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
  238. package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
  239. package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
  240. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +75 -11
  241. package/dist/utility/wrun/wrun-overlay-drivers.util.js +176 -43
  242. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
  243. package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
  244. package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
  245. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
  246. package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
  247. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +239 -24
  248. package/dist/utility/wrun/wrun-overlay-run.util.js +2204 -405
  249. package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
  250. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +2 -1
  251. package/dist/utility/wrun/wrun-panel-mount.util.js +20 -14
  252. package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
  253. package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
  254. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
  255. package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
  256. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
  257. package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
  258. package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
  259. package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
  260. package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
  261. package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
  262. package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
  263. package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
  264. package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
  265. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
  266. package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
  267. package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
  268. package/dist/utility/wrun/wrun-refusal.util.js +103 -16
  269. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
  270. package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
  271. package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
  272. package/dist/utility/wrun/wrun-run-health.util.d.ts +89 -2
  273. package/dist/utility/wrun/wrun-run-health.util.js +204 -1
  274. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
  275. package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
  276. package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
  277. package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
  278. package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
  279. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +13 -3
  280. package/dist/utility/wrun/wrun-script-inputs.util.js +51 -13
  281. package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
  282. package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
  283. package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
  284. package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
  285. package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
  286. package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
  287. package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
  288. package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
  289. package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
  290. package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
  291. package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
  292. package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
  293. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
  294. package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
  295. package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
  296. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
  297. package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
  298. package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
  299. package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
  300. package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
  301. package/dist/utility/wrun/wrun-visibility-table.js +9 -0
  302. package/dist/utility/wrun/wrun-volume-profile.util.js +7 -3
  303. package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
  304. package/dist/utils/replay/replay-buffer-math.js +60 -30
  305. package/dist/workers/constants/socket-slots.d.ts +11 -7
  306. package/dist/workers/constants/socket-slots.js +6 -5
  307. package/package.json +5 -5
@@ -33,15 +33,17 @@
33
33
  * projection, after its window-level pass over every held bar where it declares one, with a partial bar kept partial
34
34
  * unless the class carries no `present` mask; a view block, the block of an input whose words name a fold, as it
35
35
  * is, `wrunRowLaneAtWidth`; a `latest` lane on the live row).
36
- * - `wrunRowLaneReachFromMs` / `wrunRunSourceReachFromMs`: how far back a lane's source holds rows (its horizon, its
37
- * longest-kept tier), and where a run's history sources begin, which the warm-up decider reads so a first value a
38
- * source's history explains never buys a page of older candles.
36
+ * - `wrunRowLaneReachFromMs` / `wrunPollLaneReachFromMs` / `wrunEveryBarAnswerReachMs` / `wrunRunSourceReachFromMs`:
37
+ * how far back a lane's source holds rows (its horizon, its longest-kept tier, or the first row of an answer that
38
+ * holds every bar it covers), and where a run's history sources begin across every lane it read, which the warm-up
39
+ * decider reads so a first value a source's history explains never buys a page of older candles. Any other lane's
40
+ * start is unknown: a quiet lead is no history start.
39
41
  */
40
42
  import type { WrunIndicatorMetadata, WrunInputSource, WrunMetadataParam } from '../../../interfaces/wrun-runtime.interface.js';
41
43
  import type { LiveBucketVenue } from '../../chart/live-bucket.util.js';
42
- import type { OpraReadFacts } from '../../chart/opra-read-access.leaf.js';
44
+ import { type OpraReadFacts } from '../../chart/opra-read-access.leaf.js';
43
45
  import type { OpraOptionPlaneStop } from '../../../host-ports.types.js';
44
- import type { WrunPollLaneFetchAsk } from './wrun-poll-lane.types.js';
46
+ import type { WrunPollLane, WrunPollLaneFetchAsk, WrunPollLaneInstance } from './wrun-poll-lane.types.js';
45
47
  import { type WrunLaneChainPlane, type WrunRowLaneCellInput, type WrunRowLaneDescriptor, type WrunRowLaneHorizon, type WrunRowLaneId, type WrunRowLaneInstance, type WrunRowLaneRowBudget } from './wrun-row-lane.types.js';
46
48
  import { type WrunRunOptionsMarket } from '../derived-roots.util.js';
47
49
  import type { WrunRowLaneRowDependency } from './wrun-row-lane-add-memo.util.js';
@@ -96,6 +98,9 @@ export interface WrunRowLaneChart {
96
98
  * `opraOptionPlaneStop`: the flag check's `flag-off`, the plane router's `chart-kind`); absent, the market's own
97
99
  * words. */
98
100
  opraPlaneStop?: (exchange: string, symbol: string) => OpraOptionPlaneStop | undefined;
101
+ /** The chart market's metadata whole (its feed fields, its display token), handed on to every lane's context
102
+ * (`WrunRowLaneContext.chartMetadata`): a `stocks` lane resolves the chart's tape market and feed from it. */
103
+ chartMetadata?: Readonly<Record<string, unknown>>;
99
104
  }
100
105
  /** The run's plan of its row lanes: the instances to fetch, and the feeds the chart never serves to inputs that
101
106
  * declared `missing: "empty"` (one entry per lane key). */
@@ -113,8 +118,10 @@ export interface WrunRowLanePlan {
113
118
  * on a chart whose options list on OPRA (riding the plane or stopped off it), before its chain is resolved;
114
119
  * 2. the admission: a governed OPRA lane is served where the chart's options ride the OPRA plane
115
120
  * (`isOpraPlaneExchange`) and nowhere else; a chain lane on every chart no known stop keeps its options off the
116
- * plane on (`wrunChainLaneStop`, the chain poll lanes' one rule: no chain is resolved past the stop); any other lane
117
- * wherever the chart is not index-mode. An input the chart does not serve meets the one rule both planners keep
121
+ * plane on (`wrunChainLaneStop`, the chain poll lanes' one rule: no chain is resolved past the stop); a `stocks` lane
122
+ * on every chart (its identity asks the chart's tape market, `chartMetadata`, and refuses off a US stock tape market
123
+ * with the unserved-scope seed, so a declared fill reads the market's note, and on Price only by name); any other
124
+ * lane wherever the chart is not index-mode. An input the chart does not serve meets the one rule both planners keep
118
125
  * (wrun-poll-lanes.util `wrunUnservedLaneInput`): declaring `missing: "empty"` it is dropped (its blocks read EMPTY,
119
126
  * a note names the feed), any other refuses by name, seeded feed-missing (paused); a lane off the plane for a known
120
127
  * reason (`opraPlaneStop`: the `opra` flag dark, an index chart) says that reason instead (`options-stopped`, the
@@ -123,18 +130,19 @@ export interface WrunRowLanePlan {
123
130
  * facets (awaited, in declaration order), each knob naming a setting first read as the setting's current value
124
131
  * (`resolveWrunOptionSettingKnobs` over `run.paramValues`), the context carrying the plan's facts beside the chart
125
132
  * (`WrunRowLanePlanFacts`); the instance is the identity and the facets together. An input naming another root
126
- * (contract F's `underlying`, `planWrunRowLaneUnderlying`) is planned against that root's market instead, its
133
+ * (contract F's `underlying`, derived-roots.util `planWrunLaneUnderlying`) is planned against that root's market, its
127
134
  * identity once per lane and market. A lane with
128
135
  * `acquisitions: 'one'` refuses a second input whose acquisition differs (one fetch, one live fold per package). A
129
136
  * chart with no option chain (an identity or facets refusal seeded `no-options` / `chain`, `wrunLaneNoChainRefusal`:
130
137
  * a LINK perp, a forex pair) does not serve the feed either: the same one rule, its note naming the feed with the
131
138
  * chain decision's words, its refusal the decision's own. A chain lane's instance then meets its own plane's wall
132
- * (`assertWrunLaneChainPlaneReadable`, the one rule a chain poll lane meets too): OPRA's, or the CME display wall
133
- * (OpenMarket's own packages only); a plain chain (a crypto venue) none.
139
+ * (`assertWrunLaneChainPlaneReadable`, the one rule a chain poll lane meets too): OPRA's, or the CME chain wall
140
+ * (`mayReadCmeChain`: an official run, or a CME chart study); a plain chain (a crypto venue) none.
134
141
  */
135
142
  export declare function planWrunRowLanes(metadata: WrunIndicatorMetadata, chart: WrunRowLaneChart, run?: WrunRowLaneRunFacts): Promise<WrunRowLanePlan>;
136
- /** The run facts the row-lane planner reads: the OPRA facts and the run's setting values by name (wrun-param-values.util
137
- * `wrunParamValuesFromSettings` over the overlay's settings; absent: a knob naming a setting is refused by name). */
143
+ /** The run facts the row-lane planner reads: the plane facts (OPRA's and the CME chain's) and the run's setting values
144
+ * by name (wrun-param-values.util `wrunParamValuesFromSettings` over the overlay's settings; absent: a knob naming a
145
+ * setting is refused by name). */
138
146
  export interface WrunRowLaneRunFacts extends OpraReadFacts {
139
147
  paramValues?: Readonly<Record<string, number>>;
140
148
  /** The run's one options decision (derived-roots.util `decideWrunRunOptionsMarket`, taken at its head): every chain
@@ -182,11 +190,16 @@ export declare function wrunRowLaneMovedInstance(instances: ReadonlyArray<Pick<W
182
190
  * plane names beside it, by the chain poll lanes' one rule (`wrunPollLaneChainAsk`): an OPRA chain names the plane and
183
191
  * its routed tier (Door C judges it an OPRA ask, the legend names a delayed tier); a CME chain its routed tier alone
184
192
  * (`servedTier`, so no source cache serves one tier's rows to the other; the chart's own badge names the delay); a
185
- * plain chain (a crypto venue) nothing. Any other lane's payload as it is. `tierOf` is the routing's rule
186
- * (governed-route.util `governedMarketDataTier`), handed in so this module stays off the routing graph, and asked only
187
- * for a governed exchange: it answers delayed for any exchange no gate governs.
193
+ * plain chain (a crypto venue) nothing. A `stocks` lane's payload names its plane and the tier its tape is routed to
194
+ * (`wrunPlane: 'stocks'`, `servedTier`: the legend's delay statement and the add memo's fingerprint read them). Any
195
+ * other lane's payload as it is. `tierOf` is the routing's rule (governed-route.util `governedMarketDataTier`), handed
196
+ * in so this module stays off the routing graph, and asked only for a governed exchange: it answers delayed for any
197
+ * exchange no gate governs.
188
198
  */
189
- export declare function wrunRowLaneChainAsk(lane: Pick<WrunRowLaneDescriptor, 'chain'>, extras: Readonly<Record<string, unknown>>, tierOf: (exchange: string) => 'realtime' | 'delayed'): Readonly<Record<string, unknown>>;
199
+ export declare function wrunRowLaneChainAsk(lane: Pick<WrunRowLaneDescriptor, 'chain' | 'governed'>, extras: Readonly<Record<string, unknown>>, tierOf: (exchange: string) => 'realtime' | 'delayed'): Readonly<Record<string, unknown>>;
200
+ /** The tape a `stocks` lane's instance reads (its identity's `exchange`, a stocks-governed code), or null for any other
201
+ * lane and a payload naming no tape: the provenance stamp, the live reconcile's poll window and the tier follow it. */
202
+ export declare function wrunRowLaneStocksTapeOf(lane: Pick<WrunRowLaneDescriptor, 'governed'>, extras: Readonly<Record<string, unknown>>): string | null;
190
203
  /** How an empty answer reads for a lane: quiet (present EMPTY blocks) or degrading (a state lane's). */
191
204
  export declare function wrunRowLaneEmptyAnswer(lane: Pick<WrunRowLaneDescriptor, 'emptyAnswer' | 'landing'>): 'quiet' | 'degrades';
192
205
  /** Whether an instance must answer rows: its lane degrades on an empty answer and some input reading it does not
@@ -482,22 +495,57 @@ export declare function wrunRowLaneProjectedBarRows(lane: Pick<WrunRowLaneDescri
482
495
  tier?: WrunBackendTier;
483
496
  }, nowMs: number, acquisition?: Readonly<Record<string, unknown>>): number;
484
497
  /**
485
- * How far back one row lane's source holds rows for an acquisition at the clock: the later of its horizon's served
486
- * start and the oldest bar its longest-kept tier still holds; null when it names neither, or a tier keeps its rows for
487
- * good (it may answer any window). A `latest` lane reads one snapshot on the live row, no history: undefined.
498
+ * How far back one row lane's source holds rows for an acquisition at the clock, as the lane declares it: the later of
499
+ * its horizon's served start and the oldest bar its longest-kept tier still holds; null when it names neither, or a
500
+ * tier keeps its rows for good (it may answer any window). A `latest` lane reads one snapshot on the live row, no
501
+ * history: undefined.
488
502
  */
489
503
  export declare function wrunRowLaneReachFromMs(lane: Pick<WrunRowLaneDescriptor, 'landing' | 'horizon'>, extras: Readonly<Record<string, unknown>>, nowMs: number): number | null | undefined;
504
+ /** A poll lane's declared reach, the row lanes' rule over its host grid's tiers and its `horizon`; null when it names
505
+ * neither (a daily join, a lane with no tiers). */
506
+ export declare function wrunPollLaneReachFromMs(lane: Pick<WrunPollLane, 'barGrid' | 'horizon'>, extras: Readonly<Record<string, unknown>>, nowMs: number): number | null;
507
+ /** 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
508
+ * `present` mask); a packed block is read tuple by tuple at the named width, and reads as no data without one. */
509
+ export declare function wrunRowLaneRowHasData(row: ArrayLike<unknown>, presentMask: boolean, width?: number): boolean;
490
510
  /**
491
- * Where the rows of a run's history sources begin at the clock: the warm-up decider's `sourceReachFromTs`
492
- * (local-kscript-warmup-depth.util), the earliest reach among the row lane instances that read a history
493
- * (`wrunRowLaneReachFromMs`). A visible first value at or after it, with it at or after the loaded start, is a
494
- * source's history beginning, never a warm-up a page of older candles could fill. Null when no instance reads a
495
- * history, when one names no reach, or when the run reads any other source beside the chart's candles (a poll lane, a
496
- * pinned leg, a trades lane: none names its reach yet), since older candles may then still bring that source rows.
511
+ * Where an answer that holds a row for every bar it covers begins (a quiet bar too, so a missing older row is no
512
+ * history): its first row, when the run asked from before it. Null when that row is a partial marker (a bar the host
513
+ * left unasked or unretained: the declared reach names it), sits at or before the asked start, or there is none.
514
+ */
515
+ export declare function wrunEveryBarAnswerReachMs(rows: ReadonlyArray<ArrayLike<unknown>> | undefined, askedFromMs: number, covered?: (row: ArrayLike<unknown>) => boolean): number | null;
516
+ /** One history source a run read: its id, its rows over the window, its row or poll lane instance where it has one. */
517
+ export interface WrunRunHistoryLane {
518
+ lane: string;
519
+ rows: ReadonlyArray<ArrayLike<unknown>> | undefined;
520
+ /** Its declared reach and the `present` mask its tuples carry. */
521
+ rowLane?: Pick<WrunRowLaneInstance, 'laneKey' | 'extras'>;
522
+ /** Its declared reach. */
523
+ pollLane?: Pick<WrunPollLaneInstance, 'laneKey' | 'extras'>;
524
+ /** Its answer holds a row for every bar it covers (`wrunEveryBarAnswerReachMs`); absent, its rows prove no start. */
525
+ answersEveryBar?: boolean;
526
+ }
527
+ /** Every lane and leg a run read, each with its instance: the one list both warm-up asks build, none left out. */
528
+ export declare function wrunRunHistoryLanesOf(args: {
529
+ lanes: ReadonlyArray<{
530
+ lane: string;
531
+ rows: ReadonlyArray<ArrayLike<unknown>> | undefined;
532
+ }>;
533
+ rowLanes: ReadonlyArray<Pick<WrunRowLaneInstance, 'key' | 'laneKey' | 'extras'>>;
534
+ pollLanes: ReadonlyArray<Pick<WrunPollLaneInstance, 'key' | 'laneKey' | 'extras'>>;
535
+ legs: ReadonlyArray<{
536
+ fetchKey: string;
537
+ }>;
538
+ legRows: (fetchKey: string) => ReadonlyArray<ArrayLike<unknown>> | undefined;
539
+ }): WrunRunHistoryLane[];
540
+ /**
541
+ * Where a run's history sources begin (the warm-up decider's `sourceReachFromTs`): the earliest start among every lane
542
+ * and leg it read, each from a declared reach or an every-bar answer asked from before its first row. Null when any
543
+ * lane's start is unknown (a sparse lane's first row, an illiquid leg, a weekend start), since older candles may then
544
+ * still bring that lane rows. A lane that reads no history bounds nothing.
497
545
  */
498
546
  export declare function wrunRunSourceReachFromMs(args: {
499
- rowLanes: ReadonlyArray<Pick<WrunRowLaneInstance, 'laneKey' | 'extras'>>;
500
- readsOtherSources: boolean;
547
+ lanes: ReadonlyArray<WrunRunHistoryLane>;
548
+ askedFromMs: number;
501
549
  nowMs: number;
502
550
  }): number | null;
503
551
  /** The ask shape a lane's own `fetch` takes, over a window. */
@@ -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 {};