@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
@@ -2,7 +2,8 @@
2
2
  * Derived underlyings (SKYLIT-PARITY contract F): the `underlying` knob of `option_strikes` and `options_chain` reads
3
3
  * another root's option chain than the chart's own (an ES chart reading SPX's), so a package can draw that root's levels
4
4
  * on the chart. The rows keep their own `underlying` column (that root's spot or forward): the package derives each
5
- * level with the ratio of the chart's close to it (the recipe's math, never the host's).
5
+ * level with the ratio of the chart's close to it (the recipe's math, never the host's). On `options_flow` it reads that
6
+ * root's flow (an NQ chart reading QQQ's premium), under the scopes that read one underlying alone.
6
7
  *
7
8
  * - The knob (`wrunUnderlyingKnob`): "auto" (absent too) reads the chart's own chain, exactly as before; a root in
8
9
  * capitals ("SPX", "QQQ", "ES", "BTC") reads that root's chain; "derived" reads the first root the mapping table lists
@@ -21,10 +22,11 @@
21
22
  * (`wrunUnderlyingLaneContext`): the same chain resolver, venue and book words, walls and refusals. An OPRA root is a
22
23
  * governed OPRA read: the OPRA wall stands before any read (`opra-official-only:<class>`, official packages only),
23
24
  * the `opra` flag's stop after it, the plane stamp, the routed tier and the provenance as on a stock chart; a CME root
24
- * meets the CME display wall (`assertWrunLaneChainPlaneReadable`).
25
+ * meets the CME chain wall (`assertWrunLaneChainPlaneReadable`: the ES chain reads on NQ1!, never on QQQ).
25
26
  * - A root no family lists, and "derived" on a chart whose root the table maps to nothing, refuse by name
26
27
  * (`wrun_underlying_unresolved:<root>`), seeded as a chart with no option chain (`no-options` / `chain`), so an input
27
- * declaring `missing: "empty"` reads an empty block with a note, the planners' one rule.
28
+ * declaring its planner's fill reads it with a note, the planners' one rule: a row lane's cells `missing: "empty"`
29
+ * (an empty block), a poll lane's values (`options_flow`) `missing: "nan"` or `"zero"`; the refusal names that fill.
28
30
  * - A stock twin (a crypto or HIP-3 market whose search group is a US stock or ETF: BINANCE_FUTURES NVDAUSDT,
29
31
  * HYPERLIQUID_HIP3 xyz:NVDA) reads its stock's OPRA chain while the `opra` flag is lit, through the same swap: the
30
32
  * run decides its ONE options market at its head (`decideWrunRunOptionsMarket`, the options seam behind the gate
@@ -44,28 +46,27 @@ import { mayReadOpra } from '../chart/opra-read-access.leaf.js';
44
46
  import { optionVenueForExchange } from '../options/option-venue.util.js';
45
47
  import { gateSessionHeldElsewhere } from '../v2/gate-session-latch.util.js';
46
48
  import { decideWrunChartOptionsMarket, } from './run-schedule/wrun-chart-gate-reader.util.js';
47
- import { assertWrunLaneChainPlaneReadable } from './sources/wrun-poll-lanes.util.js';
48
- import { wrunParamChoices } from './wrun-color-settings.util.js';
49
+ import { assertWrunLaneChainPlaneReadable, wrunOpraPlaneStopDetail, } from './sources/wrun-poll-lanes.util.js';
50
+ import { wrunSelectPickWord } from './wrun-color-settings.util.js';
49
51
  import { WRUN_OPTIONS_CHAIN_CRYPTO_VENUE_IDS, } from './wrun-options-chain.util.js';
50
52
  import { refuseWrunOptionKnob } from './wrun-option-knobs.util.js';
53
+ import { assertWrunOpraLaneReadable } from './wrun-opra-lane.util.js';
54
+ import { wrunOptionsFlowUnderlyingScopeTakes } from './wrun-options-flow-underlying.leaf.js';
51
55
  import { attachWrunRefusal } from './wrun-refusal.util.js';
52
- import { WRUN_DERIVED_ROOTS, defaultDerivedRoot } from './derived-roots.leaf.js';
53
- // The table is the leaf's (derived-roots.leaf), so a reader of the rows alone never loads this module's graph.
54
- export { WRUN_DERIVED_ROOTS, defaultDerivedRoot, wrunDerivedRootsOf } from './derived-roots.leaf.js';
56
+ import { WRUN_DERIVED_ROOTS, WRUN_UNDERLYING_DERIVED, defaultDerivedRoot, wrunUnderlyingKnobOf, wrunUnderlyingSettingName, } from './derived-roots.leaf.js';
57
+ // The table and the knob's words are the leaf's (derived-roots.leaf), so a reader of the rows or the words alone (the
58
+ // painted sheet, the requirement table) never loads this module's graph.
59
+ export { WRUN_DERIVED_ROOTS, WRUN_UNDERLYING_AUTO, WRUN_UNDERLYING_DERIVED, defaultDerivedRoot, wrunDerivedRootsOf, wrunUnderlyingKnobOf, wrunUnderlyingSettingName, } from './derived-roots.leaf.js';
55
60
  /** The knob's name on a source. */
56
61
  export const WRUN_UNDERLYING_KNOB = 'underlying';
57
- /** The knob's default word: the chart's own chain. */
58
- export const WRUN_UNDERLYING_AUTO = 'auto';
59
- /** The knob's word for the table's default root of the chart's root. */
60
- export const WRUN_UNDERLYING_DERIVED = 'derived';
61
- /** The classes that take the knob (contract F). */
62
- export const WRUN_UNDERLYING_CLASSES = Object.freeze(['option_strikes', 'options_chain']);
62
+ /** The classes that take the knob (contract F; om `WRUN_OPTION_UNDERLYING_CLASSES`). */
63
+ export const WRUN_UNDERLYING_CLASSES = Object.freeze([
64
+ 'option_strikes',
65
+ 'options_chain',
66
+ 'options_flow',
67
+ ]);
63
68
  /** The stem of a root no venue family lists: `wrun_underlying_unresolved:<root>`. */
64
69
  export const WRUN_UNDERLYING_UNRESOLVED_CODE = 'wrun_underlying_unresolved';
65
- /** A root as the knob spells it: capitals and digits, one letter at least (SPX, QQQ, ES, 6E, BTC). */
66
- const WRUN_UNDERLYING_ROOT_RE = /^(?=[A-Z0-9]*[A-Z])[A-Z0-9]{1,10}$/;
67
- /** A setting's name as the sheet records it (om's WRUN_NAME_PATTERN), or as an author's handle names it. */
68
- const WRUN_SETTING_NAME_RE = /^[a-z0-9][a-z0-9._-]*$/;
69
70
  /** The words the knob takes, for a refusal. */
70
71
  const WRUN_UNDERLYING_WORDS = '"auto" (the chart\'s own chain), "derived" (the first root the derived table maps the chart\'s root to), an ' +
71
72
  'underlying root in capitals ("SPX", "QQQ", "ES", "BTC") or "@<param>" naming a select setting';
@@ -73,34 +74,22 @@ const WRUN_UNDERLYING_WORDS = '"auto" (the chart\'s own chain), "derived" (the f
73
74
  export function wrunTakesUnderlying(sourceClass) {
74
75
  return WRUN_UNDERLYING_CLASSES.includes(sourceClass);
75
76
  }
76
- /** The knob's literal reading (absent is "auto"); undefined for a value that is no literal (a setting's name, a word
77
- * outside the grammar). */
78
- export function wrunUnderlyingKnobOf(value) {
79
- if (value === undefined || value === WRUN_UNDERLYING_AUTO)
80
- return { kind: 'auto' };
81
- if (value === WRUN_UNDERLYING_DERIVED)
82
- return { kind: 'derived' };
83
- return typeof value === 'string' && WRUN_UNDERLYING_ROOT_RE.test(value) ? { kind: 'root', root: value } : undefined;
84
- }
85
- /** The setting a knob value names: an author's handle ("@root") or the name the sheet records ("root"); undefined for
86
- * a literal and for anything else. */
87
- export function wrunUnderlyingSettingName(value) {
88
- if (typeof value !== 'string' || wrunUnderlyingKnobOf(value) !== undefined)
89
- return undefined;
90
- const name = value.startsWith('@') ? value.slice(1) : value;
91
- return WRUN_SETTING_NAME_RE.test(name) ? name : undefined;
92
- }
93
77
  /** A source's knob, validated: its literal reading, or a refusal by name (`wrun_option_knob_invalid`, om's one name
94
- * for an options knob outside its words; a setting's name the planners did not read lands here too). */
78
+ * for an options knob outside its words; a setting's name the planners did not read lands here too, and so does
79
+ * another root beside an `options_flow` scope that spans underlyings, before any market is resolved). */
95
80
  export function wrunUnderlyingKnob(source, ctx) {
96
81
  const value = source[WRUN_UNDERLYING_KNOB];
97
- return wrunUnderlyingKnobOf(value) ?? refuseWrunOptionKnob(ctx, WRUN_UNDERLYING_KNOB, value, WRUN_UNDERLYING_WORDS);
82
+ const knob = wrunUnderlyingKnobOf(value) ?? refuseWrunOptionKnob(ctx, WRUN_UNDERLYING_KNOB, value, WRUN_UNDERLYING_WORDS);
83
+ const spans = ctx.sourceClass === 'options_flow' ? wrunOptionsFlowUnderlyingScopeTakes(value, source.scope) : undefined;
84
+ return spans === undefined ? knob : refuseWrunOptionKnob(ctx, WRUN_UNDERLYING_KNOB, value, spans);
98
85
  }
99
86
  /**
100
87
  * A source whose `underlying` names a setting, read as the word the setting's pick names (the planners' read, before a
101
88
  * lane judges the knob, as `resolveWrunOptionSettingKnobs` reads the kit's table): the setting must be a compute select
102
- * of the sheet with a value this run read, its pick's word (its `style_values` entry when the select declares them,
103
- * else its label) one of the knob's literals, else the input is refused by name (`wrun_option_knob_invalid`). A
89
+ * of the sheet with a value this run read, its pick's word (`wrunSelectPickWord`: its `style_values` entry when the
90
+ * select declares them, else its label; the painted sheet writes the same word, wrun-color-settings.util
91
+ * `wrunSheetWithSettings`) one of the knob's literals, else the input is refused by name (`wrun_option_knob_invalid`).
92
+ * A
104
93
  * literal, a class that takes no knob, and every source of a run that read no setting values are left as they are.
105
94
  */
106
95
  export function resolveWrunUnderlyingSettingKnob(ctx, source, params, values) {
@@ -115,10 +104,8 @@ export function resolveWrunUnderlyingSettingKnob(ctx, source, params, values) {
115
104
  if (param === undefined || param.style !== undefined || param.type !== 'select' || typeof value !== 'number') {
116
105
  return refuseWrunOptionKnob(ctx, WRUN_UNDERLYING_KNOB, declared, `${WRUN_UNDERLYING_WORDS}, and '${name}' is no select compute setting of the sheet`);
117
106
  }
118
- const choices = wrunParamChoices(param);
119
- const at = choices?.findIndex((choice) => choice.value === value) ?? -1;
120
- const word = at < 0 ? undefined : Array.isArray(param.style_values) ? param.style_values[at] : choices?.[at]?.label;
121
- if (typeof word !== 'string' || wrunUnderlyingKnobOf(word) === undefined) {
107
+ const word = wrunSelectPickWord(param, value);
108
+ if (word === undefined || wrunUnderlyingKnobOf(word) === undefined) {
122
109
  return refuseWrunOptionKnob(ctx, WRUN_UNDERLYING_KNOB, declared, `${WRUN_UNDERLYING_WORDS}, and '${name}' picks '${word ?? value}'`);
123
110
  }
124
111
  return { ...source, [WRUN_UNDERLYING_KNOB]: word };
@@ -136,16 +123,31 @@ export function wrunChartRootOf(chart) {
136
123
  const [contract] = chart.symbol.trim().split(/\s+/);
137
124
  return governedContractCoin(contract)?.toUpperCase() ?? coin;
138
125
  }
126
+ /** The fill a celled input reads where no chain answers (a row lane's, the options chain's: `missing: "empty"`): what a
127
+ * refusal names when its caller names no planner's fills, as before the planners named theirs. */
128
+ const WRUN_UNDERLYING_CELL_FILLS = Object.freeze(['empty']);
129
+ /** An input's reads and the fill it may declare instead, in its planner's words (`fills`: the planner's own, the ones
130
+ * wrun-poll-lanes.util `wrunUnservedLaneInput` reads there): a row lane's cells and `missing: "empty"`, a poll lane's
131
+ * values (`options_flow`) and `missing: "nan"` or `"zero"`. */
132
+ function wrunUnderlyingReadWords(fills) {
133
+ const named = `missing: ${fills.map((fill) => `"${fill}"`).join(' or ')}`;
134
+ return fills.includes('empty')
135
+ ? { reads: 'cells', instead: `${named} to read nothing here` }
136
+ : { reads: 'values', instead: `${named} to read that fill here` };
137
+ }
139
138
  /** The refusal of a root no venue family lists (`wrun_underlying_unresolved:<root>`), seeded as a chart with no option
140
- * chain (the record names the root), so a declared `missing: "empty"` reads an empty block, the planners' one rule. */
141
- export function wrunUnderlyingUnresolvedError(ctx, root, why) {
139
+ * chain (the record names the root), so a declared fill of the planner's (`fills`, a celled input's "empty" when the
140
+ * caller names none) reads, the planners' one rule. */
141
+ export function wrunUnderlyingUnresolvedError(ctx, root, why, fills = WRUN_UNDERLYING_CELL_FILLS) {
142
142
  const code = `${WRUN_UNDERLYING_UNRESOLVED_CODE}:${root}`;
143
- return attachWrunRefusal(new Error(`Input '${ctx.inputName}' reads ${ctx.sourceClass} cells with underlying '${root}' (${code}): ${why}`), { cls: 'no-options', variant: 'chain', params: { market: root, coin: root } });
143
+ const { reads } = wrunUnderlyingReadWords(fills);
144
+ return attachWrunRefusal(new Error(`Input '${ctx.inputName}' reads ${ctx.sourceClass} ${reads} with underlying '${root}' (${code}): ${why}`), { cls: 'no-options', variant: 'chain', params: { market: root, coin: root } });
144
145
  }
145
146
  /** The root a knob reads: undefined for "auto" and for the chart's own root (`wrunChartRootOf`: the chart's own chain,
146
147
  * read exactly as "auto" reads it, on its own venue); "derived" the table's default root of the chart's root, refused
147
- * by name when the table maps it to none. */
148
- export function wrunUnderlyingRootOf(knob, ctx) {
148
+ * by name when the table maps it to none, naming the fill the input's planner reads instead (`fills`, a celled
149
+ * input's "empty" when the caller names none). */
150
+ export function wrunUnderlyingRootOf(knob, ctx, fills = WRUN_UNDERLYING_CELL_FILLS) {
149
151
  if (knob.kind === 'auto')
150
152
  return undefined;
151
153
  if (knob.kind === 'root')
@@ -156,8 +158,8 @@ export function wrunUnderlyingRootOf(knob, ctx) {
156
158
  return root;
157
159
  const named = chartRoot === '' ? 'the chart market' : chartRoot;
158
160
  throw wrunUnderlyingUnresolvedError(ctx, chartRoot === '' ? WRUN_UNDERLYING_DERIVED : chartRoot, `underlying "derived" reads the first root the derived table maps the chart's root to, and it maps ${named} ` +
159
- `to none (the table: ${Object.keys(WRUN_DERIVED_ROOTS).join(', ')}); declare a root, or missing: "empty" to ` +
160
- 'read nothing here');
161
+ `to none (the table: ${Object.keys(WRUN_DERIVED_ROOTS).join(', ')}); declare a root, or ` +
162
+ wrunUnderlyingReadWords(fills).instead, fills);
161
163
  }
162
164
  /** The US roots the plane lists without a directory read: the index roots and every root the table maps to. */
163
165
  const WRUN_UNDERLYING_OPRA_KNOWN_ROOTS = new Set([
@@ -234,11 +236,12 @@ async function wrunUnderlyingCryptoMarket(root, chart, chartChain) {
234
236
  * its continuous alias on the exchange it lists on (`CME_ROOT_SPECS`), any other root a US root on the OPRA plane. For
235
237
  * an OPRA root and a run the plane is open to (`mayReadOpra`), the `opra` flag is read first (a bounded wait for its map)
236
238
  * and a plane it keeps the account off of names its stop; then a root neither the index roots nor the table name must be
237
- * listed by the plane's expiry directory, or it refuses by name (`wrun_underlying_unresolved:<root>`). A run the plane is
238
- * closed to reads nothing here: the caller's wall refuses it before any read. `chart` is the chart the input sits on,
239
- * `chartChain` its chain when the caller already resolved it.
239
+ * listed by the plane's expiry directory, or it refuses by name (`wrun_underlying_unresolved:<root>`, naming the fill
240
+ * of the input's planner, `fills`, a celled input's "empty" by default). A run the plane is closed to reads nothing
241
+ * here: the caller's wall refuses it before any read. `chart` is the chart the input sits on, `chartChain` its chain
242
+ * when the caller already resolved it.
240
243
  */
241
- export async function resolveWrunUnderlyingMarket(root, chart, run, chartChain) {
244
+ export async function resolveWrunUnderlyingMarket(root, chart, run, chartChain, fills = WRUN_UNDERLYING_CELL_FILLS) {
242
245
  const ctx = { inputName: chart.inputName, sourceClass: chart.sourceClass };
243
246
  const [crypto, { wrunCmeRootExchange }] = await Promise.all([
244
247
  wrunUnderlyingCryptoMarket(root, chart, chartChain),
@@ -264,7 +267,7 @@ export async function resolveWrunUnderlyingMarket(root, chart, run, chartChain)
264
267
  return market;
265
268
  if ((await wrunOpraRootListed(market.exchange, root)) === false) {
266
269
  throw wrunUnderlyingUnresolvedError(ctx, root, `no options venue lists ${root}: it is no coin Deribit lists, no CME futures root, and the US option chain ` +
267
- 'directory lists no expiry for it; check the root');
270
+ 'directory lists no expiry for it; check the root', fills);
268
271
  }
269
272
  return market;
270
273
  }
@@ -309,6 +312,10 @@ export function wrunUnderlyingLaneContext(ctx, market) {
309
312
  opraPlane: market.family === 'opra',
310
313
  };
311
314
  delete next.category;
315
+ if (market.venue !== undefined)
316
+ next.underlyingVenue = market.venue;
317
+ else
318
+ delete next.underlyingVenue;
312
319
  if (market.twinOf !== undefined) {
313
320
  next.stockTwinOf = { ...market.twinOf };
314
321
  }
@@ -318,6 +325,39 @@ export function wrunUnderlyingLaneContext(ctx, market) {
318
325
  }
319
326
  return next;
320
327
  }
328
+ /**
329
+ * Contract F's planner step, both planners' one rule (wrun-row-lanes.util `planWrunRowLanes`, wrun-poll-lanes.util
330
+ * `planWrunPollLanes`): an input naming another root ("SPX", "derived" for the derived table's default root of the
331
+ * chart's root, a setting picking one, read first: `resolveWrunUnderlyingSettingKnob`) is planned against that root's
332
+ * market, as if the chart were that market (`wrunUnderlyingLaneContext`): the lane's own plan reads the root's chain
333
+ * through the one chain resolver, so every venue and book word, wall and refusal of the lane holds. An OPRA root meets
334
+ * the OPRA wall before any read (`opra-official-only:<class>`), then, kept off the plane by a known stop (the `opra`
335
+ * flag dark), the stop's rule (`wrunUnservedLaneInput`, the chain lanes' own for a stopped chart); a CME root meets the
336
+ * CME chain wall before any read too. A root no venue family lists refuses by name (`wrun_underlying_unresolved:<root>`,
337
+ * the no-chain seed), naming the fill the planner reads instead (`fills`, the planner's own: a row lane's "empty", the
338
+ * default, a poll lane's "nan" and "zero"). Undefined: "auto" (absent too), the chart's own chain.
339
+ */
340
+ export async function planWrunLaneUnderlying(source, ctx, params, run, fills = WRUN_UNDERLYING_CELL_FILLS) {
341
+ const read = resolveWrunUnderlyingSettingKnob(ctx, source, params, run?.paramValues);
342
+ const root = wrunUnderlyingRootOf(wrunUnderlyingKnob(read, ctx), ctx, fills);
343
+ if (root === undefined)
344
+ return undefined;
345
+ const market = await resolveWrunUnderlyingMarket(root, ctx, run, undefined, fills);
346
+ // A CME root's chain is CME options data whatever the chart: the chain wall before any read (and after the facets).
347
+ if (market.family === 'cme')
348
+ assertWrunLaneChainPlaneReadable('cme', market.exchange, run, ctx);
349
+ if (market.family === 'opra') {
350
+ assertWrunOpraLaneReadable(run, ctx);
351
+ if (market.opraStop !== undefined) {
352
+ return { why: { words: wrunOpraPlaneStopDetail(market.opraStop), stop: market.opraStop } };
353
+ }
354
+ }
355
+ return {
356
+ ctx: wrunUnderlyingLaneContext(ctx, market),
357
+ key: `${market.exchange}|${market.symbol}|${market.coin}|${market.venue ?? ''}`,
358
+ market,
359
+ };
360
+ }
321
361
  /**
322
362
  * The lane market a run's chain lanes read a stock twin's options as (the shape `resolveWrunUnderlyingMarket` builds for
323
363
  * an OPRA root): the OPRA plane's one exchange, the stock's ticker as the symbol and the coin, and the chart market it
@@ -419,11 +459,12 @@ export async function wrunUnderlyingOptionsChainDecision(source, who, params, va
419
459
  const ctx = { inputName: who.inputName, sourceClass: 'options_chain' };
420
460
  const chart = { ...ctx, exchange: who.exchange, symbol: who.symbol, coin: who.coin };
421
461
  const knob = wrunUnderlyingKnob(resolveWrunUnderlyingSettingKnob(ctx, source, params, values), ctx);
462
+ // A celled input: its fill is "empty" (the options chain lane's own), the refusals' default.
422
463
  const root = wrunUnderlyingRootOf(knob, chart);
423
464
  if (root === undefined)
424
465
  return undefined;
425
466
  const market = await resolveWrunUnderlyingMarket(root, chart, who, chartChain);
426
- // A CME root's chain is CME options data whatever the chart: the CME display wall before any read.
467
+ // A CME root's chain is CME options data whatever the chart: the CME chain wall before any read.
427
468
  if (market.family === 'cme')
428
469
  assertWrunLaneChainPlaneReadable('cme', market.exchange, who, ctx);
429
470
  const [lanes, { hasDeribitOptions }] = await Promise.all([
@@ -19,9 +19,10 @@
19
19
  *
20
20
  * A read that never answers is bounded by the fetch's own deadline (wrun-deadline.util
21
21
  * `WRUN_SOURCE_FETCH_DEADLINE_MS`, 45 s from its send) and by the transport's watchdog: it then fails, leaves this
22
- * registry, and the next rung asks the wire. A read whose gate socket stops delivering is asked again by the
23
- * transport itself, on a fresh socket, before any budget here runs out (the worker's gate reader stall watch,
24
- * reader-stall-watch.worker.util), so a joined read is never one left on a dead socket. The degrade budget is a paint
22
+ * registry, and the next rung asks the wire. A read whose reader socket stops delivering is asked again by the
23
+ * transport itself, on a fresh socket, within the stall watch's widest verdict (reader-stall-watch.worker.util; at its
24
+ * base windows, before any budget here runs out), so a joined read is never left on a dead socket past that bound:
25
+ * the joined read is the original request, and the re-ask answers it. The degrade budget is a paint
25
26
  * deadline, never a stall verdict: those are the transport's. A read is taken once (a run that joined it notes it again if its own budget runs out first), a failed read and
26
27
  * an answered one past `WRUN_LATE_READ_ADOPT_MS` are dropped, and every read of an overlay goes with it (teardown,
27
28
  * suspend: `forgetWrunLateReads`). Pure module state: nothing here reads the host env.
@@ -19,9 +19,10 @@
19
19
  *
20
20
  * A read that never answers is bounded by the fetch's own deadline (wrun-deadline.util
21
21
  * `WRUN_SOURCE_FETCH_DEADLINE_MS`, 45 s from its send) and by the transport's watchdog: it then fails, leaves this
22
- * registry, and the next rung asks the wire. A read whose gate socket stops delivering is asked again by the
23
- * transport itself, on a fresh socket, before any budget here runs out (the worker's gate reader stall watch,
24
- * reader-stall-watch.worker.util), so a joined read is never one left on a dead socket. The degrade budget is a paint
22
+ * registry, and the next rung asks the wire. A read whose reader socket stops delivering is asked again by the
23
+ * transport itself, on a fresh socket, within the stall watch's widest verdict (reader-stall-watch.worker.util; at its
24
+ * base windows, before any budget here runs out), so a joined read is never left on a dead socket past that bound:
25
+ * the joined read is the original request, and the re-ask answers it. The degrade budget is a paint
25
26
  * deadline, never a stall verdict: those are the transport's. A read is taken once (a run that joined it notes it again if its own budget runs out first), a failed read and
26
27
  * an answered one past `WRUN_LATE_READ_ADOPT_MS` are dropped, and every read of an overlay goes with it (teardown,
27
28
  * suspend: `forgetWrunLateReads`). Pure module state: nothing here reads the host env.
@@ -24,7 +24,8 @@
24
24
  * Refused by name before any fetch: `opra-official-only:option_daily` for a package that may not read US options, a
25
25
  * chart that names no underlying, `protocol-pending:OPTION_UNDERLYING_STATS` until the protocol release, a chart whose
26
26
  * options a known stop keeps off the OPRA plane (`options-stopped`), a chart with no option chain (the options chain's
27
- * `no-chain`), the CME display wall for a package that is not OpenMarket's own and a venue or book outside its words.
27
+ * `no-chain`), the CME chain wall for a run that is neither OpenMarket's own nor a CME chart study and a venue or book
28
+ * outside its words.
28
29
  * The planner drops an input that declared `missing: "nan"` or `"zero"` instead of the stop's and the no-chain refusal
29
30
  * (a note names the feed). An underlying with no row in the window answers empty: the empty-answer rule speaks for it.
30
31
  */
@@ -24,7 +24,8 @@
24
24
  * Refused by name before any fetch: `opra-official-only:option_daily` for a package that may not read US options, a
25
25
  * chart that names no underlying, `protocol-pending:OPTION_UNDERLYING_STATS` until the protocol release, a chart whose
26
26
  * options a known stop keeps off the OPRA plane (`options-stopped`), a chart with no option chain (the options chain's
27
- * `no-chain`), the CME display wall for a package that is not OpenMarket's own and a venue or book outside its words.
27
+ * `no-chain`), the CME chain wall for a run that is neither OpenMarket's own nor a CME chart study and a venue or book
28
+ * outside its words.
28
29
  * The planner drops an input that declared `missing: "nan"` or `"zero"` instead of the stop's and the no-chain refusal
29
30
  * (a note names the feed). An underlying with no row in the window answers empty: the empty-answer rule speaks for it.
30
31
  */
@@ -48,6 +48,9 @@
48
48
  * `resolveWrunOptionSettingKnobs`), so a settings change re-plans and re-asks; a name no value reached is refused
49
49
  * by name. Its history is the print tables' reach (`horizon`: 3 days raw, the large table past 25,000 USD up to the
50
50
  * gateway's bar limit); older bars read the fill.
51
+ * - `underlying`: another root's flow (contract F), under scopes `ticker` and `prints` only: the planner plans the input
52
+ * against that root's market (derived-roots.util `planWrunLaneUnderlying`), so this lane reads it as the chart's own;
53
+ * beside a scope that spans underlyings it is refused by name (`wrun_option_knob_invalid`, om's words).
51
54
  * A scope the chart's plane does not serve (a US issue type off OPRA, `venue` on CME, a venue word of another plane) is
52
55
  * refused with `wrunLaneUnservedScopeSeed`'s seed, so the planner drops an input that declared a fill with the market's
53
56
  * note, as on a chart with no option chain (the options chain's `no-chain`, a LINK perp).
@@ -48,6 +48,9 @@
48
48
  * `resolveWrunOptionSettingKnobs`), so a settings change re-plans and re-asks; a name no value reached is refused
49
49
  * by name. Its history is the print tables' reach (`horizon`: 3 days raw, the large table past 25,000 USD up to the
50
50
  * gateway's bar limit); older bars read the fill.
51
+ * - `underlying`: another root's flow (contract F), under scopes `ticker` and `prints` only: the planner plans the input
52
+ * against that root's market (derived-roots.util `planWrunLaneUnderlying`), so this lane reads it as the chart's own;
53
+ * beside a scope that spans underlyings it is refused by name (`wrun_option_knob_invalid`, om's words).
51
54
  * A scope the chart's plane does not serve (a US issue type off OPRA, `venue` on CME, a venue word of another plane) is
52
55
  * refused with `wrunLaneUnservedScopeSeed`'s seed, so the planner drops an input that declared a fill with the market's
53
56
  * note, as on a chart with no option chain (the options chain's `no-chain`, a LINK perp).
@@ -64,6 +67,8 @@
64
67
  import { refuseWrunPollInput, WRUN_POLL_AUTHOR_GATE_SEED, } from '../wrun-poll-lane.types.js';
65
68
  import { decideWrunLaneChain, resolveWrunLaneChainChart, wrunLaneChainLeadMoved, wrunLaneChainRefusalError, wrunLaneOpraPlaneChain, } from '../opra-option-lanes.util.js';
66
69
  import { wrunOptionsChainFlagOffRefusal, wrunOptionsChainGatedVenueName } from '../../wrun-options-chain.util.js';
70
+ import { refuseWrunOptionKnob } from '../../wrun-option-knobs.util.js';
71
+ import { wrunOptionsFlowUnderlyingScopeTakes } from '../../wrun-options-flow-underlying.leaf.js';
67
72
  import { WRUN_OPTION_PRINT_AGG_SCOPE_KTYPE, WRUN_OPTION_SCOPE_READS_OFF_CODE, WRUN_OPTIONS_FLOW_BOOK_FIELD, WRUN_OPTIONS_FLOW_CONTINUOUS_FIELD, WRUN_OPTIONS_FLOW_DTE, WRUN_OPTIONS_FLOW_EXCHANGE_FIELD, WRUN_OPTIONS_FLOW_FIELDS, WRUN_OPTIONS_FLOW_MAX_DTE_DAYS, WRUN_OPTIONS_FLOW_MONEYNESS, WRUN_OPTIONS_FLOW_OPRA_SCOPES, WRUN_OPTIONS_FLOW_PRINTS_UNSERVED_CODE, WRUN_OPTIONS_FLOW_SCOPES, WRUN_OPTIONS_FLOW_TIER_MS, WRUN_OPTIONS_FLOW_TYPE, WRUN_OPTIONS_FLOW_VENUE_FIELDS, WRUN_OPTIONS_FLOW_VENUE_RE, WRUN_OPTIONS_FLOW_VENUES_FIELD, } from '../../wrun-opra-flow.leaf.js';
68
73
  import { assertWrunProtocolType, wrunProtocolPendingSeed } from '../../wrun-protocol-pending.util.js';
69
74
  /** The lane key (the refusal record's feed words, `wrun.refusal.feed.optionsFlow`). */
@@ -212,8 +217,9 @@ function printsKnobs(source, ctx, scope) {
212
217
  }
213
218
  return days > 0 ? { minPremium: floor, maxDte: days } : { minPremium: floor };
214
219
  }
215
- /** The chart each run's plan resolved for the flow lane, by the plan's scope (`WrunPollLaneContext.runScope`): every
216
- * input of one run reads one resolution (one chain, one `auto` book), and the next run resolves afresh. */
220
+ /** The chart each run's plan resolved for the flow lane, by the plan's scope (`WrunPollLaneContext.runScope`) and the
221
+ * market the input is planned against: every input of one run on one market reads one resolution (one chain, one
222
+ * `auto` book), a contract F root's input its root's own, and the next run resolves afresh. */
217
223
  const flowCharts = new WeakMap();
218
224
  /** The chart the lane decides its chain over: on the OPRA plane the plane's own chain by coin (no chain directory
219
225
  * read: `wrunLaneOpraPlaneChain`), off it the chart's chain as the one resolver resolves it. The lane decides through
@@ -225,10 +231,16 @@ function flowChartOf(ctx) {
225
231
  const scope = ctx.runScope;
226
232
  if (scope === undefined)
227
233
  return resolve();
228
- let chart = flowCharts.get(scope);
234
+ let charts = flowCharts.get(scope);
235
+ if (charts === undefined) {
236
+ charts = new Map();
237
+ flowCharts.set(scope, charts);
238
+ }
239
+ const market = `${ctx.exchange}|${ctx.symbol}|${ctx.coin}|${ctx.opraPlane === true ? 'opra' : ''}`;
240
+ let chart = charts.get(market);
229
241
  if (chart === undefined) {
230
242
  chart = resolve();
231
- flowCharts.set(scope, chart);
243
+ charts.set(market, chart);
232
244
  }
233
245
  return chart;
234
246
  }
@@ -333,6 +345,10 @@ async function flowReadOf(scope, venue, chain, gateOn, ctx) {
333
345
  */
334
346
  async function planWrunOptionsFlow(source, ctx) {
335
347
  const scope = knobWord(source, ctx, 'scope', WRUN_OPTIONS_FLOW_SCOPES);
348
+ // Another root's flow is one underlying's: a scope that spans underlyings refuses it by om's knob name and words.
349
+ const spans = wrunOptionsFlowUnderlyingScopeTakes(source.underlying, scope);
350
+ if (spans !== undefined)
351
+ return refuseWrunOptionKnob(ctx, 'underlying', source.underlying, spans);
336
352
  const dte = knobWord(source, ctx, 'dte', WRUN_OPTIONS_FLOW_DTE);
337
353
  const moneyness = knobWord(source, ctx, 'moneyness', WRUN_OPTIONS_FLOW_MONEYNESS);
338
354
  let venue;
@@ -357,7 +373,9 @@ async function planWrunOptionsFlow(source, ctx) {
357
373
  }
358
374
  await assertWrunProtocolType(ctx, WRUN_OPTIONS_FLOW_TYPE, WRUN_OPTIONS_FLOW_LANE_KEY);
359
375
  const chart = await flowChartOf(ctx);
360
- const chain = await decideWrunLaneChain(chart, { book: scope === 'ticker' ? source.book : undefined }, ctx);
376
+ // A root the chart's crypto venue lists is read on that venue (`underlyingVenue`), as the row lanes read it.
377
+ const book = scope === 'ticker' ? source.book : undefined;
378
+ const chain = await decideWrunLaneChain(chart, { venue: ctx.underlyingVenue, book }, ctx);
361
379
  return {
362
380
  scope,
363
381
  ...(await flowReadOf(scope, venue, chain, chart.cryptoVenues.enabled, ctx)),
@@ -1,4 +1,5 @@
1
1
  import type { GateProvider } from '../../../workers/constants/socket-slots.js';
2
+ import type { OpraReadFacts } from '../../chart/opra-read-access.leaf.js';
2
3
  import { type WrunPollLaneContext } from './wrun-poll-lane.types.js';
3
4
  import { wrunLaneChainPlaneOf, type WrunLaneChainPlane } from './wrun-row-lane.types.js';
4
5
  import { type WrunOptionsChainCryptoVenues, type WrunOptionsChainDecision, type WrunOptionsChainRefusal, type WrunOptionsChartSource } from '../wrun-options-chain.util.js';
@@ -188,14 +189,12 @@ export declare function wrunLaneOpraPlaneChain(coin: string, stockTwinOf?: {
188
189
  symbol: string;
189
190
  }): WrunLaneChartChain;
190
191
  /** Who a venue decision is for: the input, the chart market (and the label a refusal names it by, `EXCHANGE/SYMBOL`
191
- * by default) and the run's OPRA facts. */
192
- export interface WrunLaneChainDecider {
192
+ * by default) and the run's plane facts. */
193
+ export interface WrunLaneChainDecider extends OpraReadFacts {
193
194
  inputName: string;
194
195
  exchange: string;
195
196
  symbol: string;
196
197
  coin: string;
197
- official?: boolean;
198
- opraUserScripts?: boolean;
199
198
  marketLabel?: string;
200
199
  }
201
200
  /**
@@ -11,8 +11,9 @@
11
11
  * width, a positive retention or none and a positive served lag or none, `assertWrunHostGridLanding`; a
12
12
  * `tierChoice` of `coarsest` only on a flow with tiers and a fold; `coarserWhenEmpty` only on a snapshot with
13
13
  * tiers) or `latest` (no tiers, no tier choice, no fold);
14
- * - `governed` is `opra` or absent; `emptyAnswer` is `quiet`, `degrades` or absent; `acquisitions` is `one` or
15
- * absent; a `liveByCoin` lane names its script source and its stamp and fold functions, and is no `latest` one;
14
+ * - `governed` is `opra`, `stocks` (never fed by coin) or absent; `emptyAnswer` is `quiet`, `degrades` or absent;
15
+ * `acquisitions` is `one` or absent; a `liveByCoin` lane names its script source and its stamp and fold functions,
16
+ * and is no `latest` one;
16
17
  * a `rowBudget` names the whole cells of one answered row and a projection (its cap is the source answer budget,
17
18
  * never the lane's own), on a flow or snapshot that carries a present mask;
18
19
  * - a `chain` lane names its exchange field, resolves its chain in its identity or facets, and declares no
@@ -109,8 +110,12 @@ function assertWrunRowLanes(lanes) {
109
110
  if (lane.acquisitions !== undefined && lane.acquisitions !== 'one') {
110
111
  throw new Error(`${who}: acquisitions is 'one' or absent`);
111
112
  }
112
- if (lane.governed !== undefined && lane.governed !== 'opra')
113
- throw new Error(`${who}: governed is 'opra' or absent`);
113
+ if (lane.governed !== undefined && lane.governed !== 'opra' && lane.governed !== 'stocks') {
114
+ throw new Error(`${who}: governed is 'opra', 'stocks' or absent`);
115
+ }
116
+ if (lane.governed === 'stocks' && lane.liveByCoin !== undefined) {
117
+ throw new Error(`${who}: a stocks lane is polled by the live reconcile, never fed live by coin`);
118
+ }
114
119
  assertWrunRowChainLane(who, lane);
115
120
  if (lane.emptyAnswer !== undefined && lane.emptyAnswer !== 'quiet' && lane.emptyAnswer !== 'degrades') {
116
121
  throw new Error(`${who}: emptyAnswer is 'quiet', 'degrades' or absent`);
@@ -0,0 +1,19 @@
1
+ import type { WrunRowLaneDescriptor } from '../wrun-row-lane.types.js';
2
+ /** f64s per print: `[offset_ms, price, size, usd, side, present]`. */
3
+ export declare const WRUN_DARK_POOL_WIDTH = 6;
4
+ /** How far back the source holds prints (the raw trade table keeps about two days): the lane's one horizon. */
5
+ export declare const WRUN_DARK_POOL_HORIZON_MS: number;
6
+ /** The overflow words, the default first. */
7
+ export declare const WRUN_DARK_POOL_OVERFLOW: readonly string[];
8
+ /** A partial bar's marker tuple: bit 14 alone, every other value 0. */
9
+ export declare function isWrunDarkPoolMarker(tuple: ArrayLike<number>): boolean;
10
+ /** A host bar's prints: each row's tuples (a row is stamped at its print's time), offsets re-based on the bar's open,
11
+ * in time order; a marker or a partial print on any row makes the bar partial (bit 14 on every print, else a marker). */
12
+ export declare function landWrunDarkPoolPrints(group: {
13
+ barOpenMs: number;
14
+ rows: ReadonlyArray<ReadonlyArray<unknown>>;
15
+ }): number[][];
16
+ /** `overflow: "largest"` over a bar past its bound (om's packer rule): its `maxCells` prints of the most dollars (an
17
+ * equal amount keeps the earlier one), in the order they printed, bit 14 on the FIRST kept print's `present`. */
18
+ export declare function wrunLargestDarkPoolPrints(tuples: ReadonlyArray<ReadonlyArray<number>>, maxCells: number): ReadonlyArray<ReadonlyArray<number>>;
19
+ export declare const rowLane: WrunRowLaneDescriptor;
@@ -0,0 +1,104 @@
1
+ /**
2
+ * `dark_pool` (frozen contract `dark_pool.cells`): each off-exchange print of $1M and up on a US stock's tape, by the
3
+ * Tape's own rule, as `[offset_ms, price, size, usd, side, present]` on the bar it printed in, oldest first; bit 14 of
4
+ * `present` marks a bar served in part, which holds one marker tuple (zeros, bit 14) when it has no print.
5
+ * - `governed: 'stocks'`: the identity and the own fetch read the chart port (wrun-dark-pool.util, loaded inside them):
6
+ * refused by name off a US stock tape market, on a tape the venue policy closes to the run, and on Price only, before
7
+ * any fetch.
8
+ * - Horizon: `WRUN_DARK_POOL_HORIZON_MS` (the raw table's); older bars and a capped day's bars are served in part.
9
+ * - Knobs: `max_cells` and `overflow` ("refuse" | "largest": the most dollars). No floor knob. Live: the poll reconcile.
10
+ * docs/features/data/us-stocks-tape.md, "Dark pool prints on the chart". LIGHT at module load.
11
+ */
12
+ import { refuseWrunPollInput, WRUN_POLL_AUTHOR_GATE_SEED } from '../wrun-poll-lane.types.js';
13
+ import { wrunPartialMarkerTuple, wrunPresentIsPartial, wrunPresentWithPartial } from '../../wrun-present-bits.util.js';
14
+ /** f64s per print: `[offset_ms, price, size, usd, side, present]`. */
15
+ export const WRUN_DARK_POOL_WIDTH = 6;
16
+ const OFFSET = 0;
17
+ const USD = 3;
18
+ const PRESENT = 5;
19
+ /** How far back the source holds prints (the raw trade table keeps about two days): the lane's one horizon. */
20
+ export const WRUN_DARK_POOL_HORIZON_MS = 48 * 3_600_000;
21
+ /** The overflow words, the default first. */
22
+ export const WRUN_DARK_POOL_OVERFLOW = Object.freeze(['refuse', 'largest']);
23
+ const isTuple = (cell) => Array.isArray(cell) && cell.length === WRUN_DARK_POOL_WIDTH && cell.every((value) => Number.isFinite(value));
24
+ /** A partial bar's marker tuple: bit 14 alone, every other value 0. */
25
+ export function isWrunDarkPoolMarker(tuple) {
26
+ if (!wrunPresentIsPartial(tuple[PRESENT]))
27
+ return false;
28
+ for (let at = 0; at < PRESENT; at += 1)
29
+ if (tuple[at] !== 0)
30
+ return false;
31
+ return true;
32
+ }
33
+ /** A host bar's prints: each row's tuples (a row is stamped at its print's time), offsets re-based on the bar's open,
34
+ * in time order; a marker or a partial print on any row makes the bar partial (bit 14 on every print, else a marker). */
35
+ export function landWrunDarkPoolPrints(group) {
36
+ const prints = [];
37
+ let partial = false;
38
+ for (const row of group.rows) {
39
+ const base = Number(row[0]) - group.barOpenMs;
40
+ if (!Number.isFinite(base))
41
+ continue;
42
+ for (const cell of row.slice(1)) {
43
+ if (!isTuple(cell))
44
+ continue;
45
+ if (wrunPresentIsPartial(cell[PRESENT]))
46
+ partial = true;
47
+ if (isWrunDarkPoolMarker(cell))
48
+ continue;
49
+ const print = [...cell];
50
+ print[OFFSET] = base + cell[OFFSET];
51
+ prints.push(print);
52
+ }
53
+ }
54
+ prints.sort((a, b) => a[OFFSET] - b[OFFSET]);
55
+ if (!partial)
56
+ return prints;
57
+ if (prints.length === 0)
58
+ return [wrunPartialMarkerTuple(WRUN_DARK_POOL_WIDTH)];
59
+ for (const print of prints)
60
+ print[PRESENT] = wrunPresentWithPartial(print[PRESENT]);
61
+ return prints;
62
+ }
63
+ /** `overflow: "largest"` over a bar past its bound (om's packer rule): its `maxCells` prints of the most dollars (an
64
+ * equal amount keeps the earlier one), in the order they printed, bit 14 on the FIRST kept print's `present`. */
65
+ export function wrunLargestDarkPoolPrints(tuples, maxCells) {
66
+ const bound = Math.max(0, Math.floor(maxCells));
67
+ if (tuples.length <= bound)
68
+ return tuples;
69
+ const usd = (at) => isWrunDarkPoolMarker(tuples[at]) || !Number.isFinite(tuples[at][USD]) ? -Infinity : tuples[at][USD];
70
+ const kept = tuples
71
+ .map((_, at) => at)
72
+ .sort((a, b) => usd(b) - usd(a) || a - b)
73
+ .slice(0, bound)
74
+ .sort((a, b) => a - b)
75
+ .map((at) => [...tuples[at]]);
76
+ if (kept.length > 0)
77
+ kept[0][PRESENT] = wrunPresentWithPartial(kept[0][PRESENT]);
78
+ return kept;
79
+ }
80
+ const util = () => import('../../wrun-dark-pool.util.js');
81
+ export const rowLane = {
82
+ sourceClass: 'dark_pool',
83
+ laneKey: 'dark_pool',
84
+ kType: 'dark_pool',
85
+ label: 'Dark pool prints',
86
+ feedWords: 'wrun.refusal.feed.darkPool',
87
+ width: WRUN_DARK_POOL_WIDTH,
88
+ governed: 'stocks',
89
+ identity: async (ctx) => (await util()).wrunDarkPoolIdentity(ctx),
90
+ // The overflow word is projection, never acquisition: every input of a chart shares one read.
91
+ facets: (source, ctx) => {
92
+ const overflow = source.overflow ?? WRUN_DARK_POOL_OVERFLOW[0];
93
+ if (typeof overflow !== 'string' || !WRUN_DARK_POOL_OVERFLOW.includes(overflow)) {
94
+ refuseWrunPollInput(ctx, `declares overflow ${JSON.stringify(overflow)}: overflow is one of ${WRUN_DARK_POOL_OVERFLOW.join(', ')}`, WRUN_POLL_AUTHOR_GATE_SEED);
95
+ }
96
+ },
97
+ landing: { kind: 'flow', fold: landWrunDarkPoolPrints },
98
+ horizon: (_extras, nowMs) => ({ servedFromMs: nowMs - WRUN_DARK_POOL_HORIZON_MS }),
99
+ emptyAnswer: 'quiet',
100
+ cells: (tuples, input) => input.source.overflow === 'largest' && input.maxCells !== undefined
101
+ ? wrunLargestDarkPoolPrints(tuples, input.maxCells)
102
+ : tuples,
103
+ fetch: async (ask) => (await util()).fetchWrunDarkPoolRows(ask),
104
+ };
@@ -1,3 +1,4 @@
1
+ import * as lane_dark_pool from './dark_pool.js';
1
2
  import * as lane_option_contract_flow from './option_contract_flow.js';
2
3
  import * as lane_option_contract_state from './option_contract_state.js';
3
4
  import * as lane_option_prints from './option_prints.js';
@@ -5,6 +6,7 @@ import * as lane_option_strike_flow from './option_strike_flow.js';
5
6
  import * as lane_option_strikes from './option_strikes.js';
6
7
  import * as lane_option_surface from './option_surface.js';
7
8
  export const WRUN_ROW_LANE_MODULES = {
9
+ './row-lanes/dark_pool.ts': lane_dark_pool,
8
10
  './row-lanes/option_contract_flow.ts': lane_option_contract_flow,
9
11
  './row-lanes/option_contract_state.ts': lane_option_contract_state,
10
12
  './row-lanes/option_prints.ts': lane_option_prints,
@@ -0,0 +1,20 @@
1
+ /** The chart and the data generation a consumer planned its reads under. */
2
+ export interface WrunLaneFetchScope {
3
+ chartIndex: number;
4
+ generation: number;
5
+ /** Whether the consumer is still the overlay's (a run's head): false takes an aborted signal and leaves no entry. */
6
+ isCurrent?: () => boolean;
7
+ }
8
+ /**
9
+ * The overlay's own-fetch signal: live until the overlay leaves its chart or pauses, or the scope's chart dataset ends,
10
+ * then a fresh one. With a scope whose generation is not the chart's any more, an aborted signal and no entry.
11
+ */
12
+ export declare function wrunLaneFetchSignal(indicatorId: string, scope?: WrunLaneFetchScope): AbortSignal;
13
+ /** Abort every own fetch of an overlay still out (the teardown hook's): their reads stop, their answers land nowhere. */
14
+ export declare function abortWrunLaneFetches(indicatorId: string): void;
15
+ /** Abort the own fetches of every overlay on a chart whose dataset ended (the generation bump's). */
16
+ export declare function abortWrunLaneFetchesOfChart(chartIndex: number): void;
17
+ /** Test seam: whether an overlay holds a signal in the map. */
18
+ export declare function __wrunLaneFetchSignalHeldForTests(indicatorId: string): boolean;
19
+ /** Test seam: forget every signal and the hooks' registration. */
20
+ export declare function __resetWrunLaneFetchAbortsForTests(): void;