@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
@@ -124,10 +124,12 @@ function indicatorSpecs(type) {
124
124
  }
125
125
  /**
126
126
  * A drawing type's fields, from the generated tables: its style (registry defaultStyle and held extras) and "Show on"
127
- * in the template lane, its style minus the geometry and financial inputs in the default lane, a label type's label
128
- * in the template lane only, and the per-drawing instance keys, the type's own included (a GhostFeed's seeded average
129
- * high-low and variance: in its style, in no lane). The FRVP's are its own table (box and profile). A type the
130
- * registry does not know declares only the instance keys: nothing of it is taken from a template.
127
+ * in the template lane, its style minus a placed drawing's geometry and its "Show on" in the default lane, a label
128
+ * type's label in the template lane only, and the per-drawing instance keys, the type's own included (a GhostFeed's
129
+ * seeded average high-low and variance: in its style, in no lane). An interval-bound type's "Show on" is instance
130
+ * state, and a type whose defaults keep nothing (Image) has it in the template lane only. The FRVP's are its own
131
+ * table (box and profile). A type the registry does not know declares only the instance keys: nothing of it is taken
132
+ * from a template.
131
133
  */
132
134
  function toolSpecs(type) {
133
135
  if (type === FRVP_TOOL_TYPE)
@@ -156,7 +158,12 @@ function toolSpecs(type) {
156
158
  if (isIntervalBoundTool(type))
157
159
  specs.push(specOf(VISIBLE_INTERVALS_KEY, { lanes: [], instance: true }));
158
160
  else if (templateKeys.has(VISIBLE_INTERVALS_KEY)) {
159
- specs.push(specOf(VISIBLE_INTERVALS_KEY, { lanes: ['template'], unset: Object.freeze([]) }));
161
+ // "Show on" is the user's pick for the type, as TradingView keeps it: a drawing hidden on minute charts makes the
162
+ // next drawing of its type hidden there too (checked 2026-11-02 on its demo chart, a Long Position and a
163
+ // horizontal line). So Save as default and the style memory keep it with the look; until then it rode the
164
+ // template lane only, and every new drawing forgot it.
165
+ const lanes = keepsDefaults ? ['template', 'default'] : ['template'];
166
+ specs.push(specOf(VISIBLE_INTERVALS_KEY, { lanes, unset: Object.freeze([]) }));
160
167
  }
161
168
  for (const key of instanceKeys)
162
169
  specs.push(specOf(key, { lanes: [], instance: true }));
@@ -324,6 +324,8 @@ export const INDICATOR_COMMON_FIELDS = [
324
324
  ['showVAHNaked', PREFERENCE],
325
325
  ['showVAL', PREFERENCE],
326
326
  ['showLevelsOnScale', PREFERENCE],
327
+ // The Options GEX surfaces' OI fallback % switch before 2026-11-01: no control reads it now (showOiFallback, at the
328
+ // end of this list, took its place), and the row stays because saved rows still carry the key.
327
329
  ['showBasisStamp', PREFERENCE],
328
330
  // Options indicators: the picked option exchanges (crypto-options lane). Unset reads the chart's
329
331
  // default venue, so overlays saved before the pick existed are unchanged.
@@ -667,13 +669,17 @@ export const INDICATOR_COMMON_FIELDS = [
667
669
  ['plotType', META_PREFERENCE],
668
670
  ['multipleStyles', META_PREFERENCE],
669
671
  ['aggregated', META_PREFERENCE],
670
- // The look of the book, liquidation and TP/SL heatmaps.
672
+ // The look of the book, liquidation and TP/SL heatmaps. `crossSection` is the panel's Cross section switch (the
673
+ // companion pane with price on x): undeclared until 2026-11-01, so a template and a saved default dropped it.
671
674
  ['colors', META_PREFERENCE],
672
675
  ['showValues', META_PREFERENCE],
673
676
  ['display', META_PREFERENCE],
674
677
  ['showMagnifier', META_PREFERENCE],
675
678
  ['cellShape', META_PREFERENCE],
676
679
  ['sizeScale', META_PREFERENCE],
680
+ ['crossSection', META_PREFERENCE],
681
+ // The Hyperliquid liquidation heatmap's Running total (its profile's cumulative arms); no other heatmap writes it.
682
+ ['runningTotal', META_PREFERENCE],
677
683
  // Order book depth bands (percent of price) and the depth and funding display modes.
678
684
  ['smallerThanPct', META_PREFERENCE],
679
685
  ['greaterThanPct', META_PREFERENCE],
@@ -696,6 +702,8 @@ export const INDICATOR_COMMON_FIELDS = [
696
702
  // The volumetric size window is a volume in those same units.
697
703
  ['sizeCeil', META_MARKET_BOUND],
698
704
  ['venueChoice', META_VENUE_CHOICE],
705
+ // Both footprints' Row size mode ('auto' | 'manual'): kept so a default saved in Auto resizes on the next chart.
706
+ ['rowSizeMode', META_PREFERENCE],
699
707
  // Sierra parity (2026-10-21): every key absent = today's look. Appended as one block so the row-keys golden names
700
708
  // them as one later addition (LATER_SHARED_ROW_KEYS in its spec).
701
709
  // TPO look, structure and period keys the settings dialog and the period menu write.
@@ -761,6 +769,9 @@ export const INDICATOR_COMMON_FIELDS = [
761
769
  ['fullNumbers', PREFERENCE],
762
770
  ['showValueAreaBand', PREFERENCE],
763
771
  ['candleMarker', PREFERENCE],
772
+ // Footprint Candle Position (FOOTPRINT-CENTER, 2026-11-02), declared after the fixture in its own change: Left or
773
+ // Center, written either way once picked (a pick of Left must replace a saved Center); absent reads Left.
774
+ ['candlePosition', PREFERENCE],
764
775
  ['footprintColumns', PREFERENCE],
765
776
  // The Aggregated Volume Footprint's Trim empty tail rows (settings no-op audit, 2026-10-25): its template stamps
766
777
  // the key on, and a row the user switched off must keep it off through a reload.
@@ -780,6 +791,18 @@ export const INDICATOR_COMMON_FIELDS = [
780
791
  ['openBlockColor', PREFERENCE],
781
792
  ['highlightClose', PREFERENCE],
782
793
  ['closeBlockColor', PREFERENCE],
794
+ // The Options GEX profile's and curve's Show OI fallback % switch (2026-11-01), declared after the fixture in its own
795
+ // change: it replaced showBasisStamp, whose default every mount had stamped into the row. Absent reads off, so only a
796
+ // user's pick is ever kept.
797
+ ['showOiFallback', PREFERENCE],
798
+ // Liquidations `colors` hold [longs, shorts], not bar order (2026-11-01); without it a reload migrates a row again.
799
+ ['colorsBySide', PREFERENCE],
800
+ // TPO's trading-hour stamp (2026-11-05, TPO_TRADING_HOUR_VERSION): without it a reload reads a picked All Hours as
801
+ // the old default and turns it into Chart.
802
+ ['tradingHourVersion', PREFERENCE],
803
+ // The footprint anchor's read stamp (2026-11-07, footprint-anchor-tick.util): a stamped anchor only moves finer, an
804
+ // older read's may heal coarser. Appended here, after the rows the golden fixture knows (row-keys.golden.spec).
805
+ ['anchorTickInference', PREFERENCE],
783
806
  ];
784
807
  /**
785
808
  * FEED (live series, docs/features/indicators/feeds.md): the rest of the C4 record beside `address`, `scope` and
@@ -795,6 +818,7 @@ const FEED_FIELDS = [
795
818
  ['plot', PREFERENCE],
796
819
  ['color', PREFERENCE],
797
820
  ['pane', PREFERENCE],
821
+ ['column', PREFERENCE],
798
822
  ];
799
823
  /**
800
824
  * The metric profiles (metric-profile.util): the render keys the save door derives from `scope` and the row's display
@@ -812,6 +836,8 @@ const METRIC_PROFILE_FIELDS = [
812
836
  ['deltaLayout', PREFERENCE],
813
837
  ['levelBasis', PREFERENCE],
814
838
  ['rowDisplay', PREFERENCE],
839
+ // The Cluster labels row of a member with a cluster look; its suffix, floor and row sizes are engine-only defaults.
840
+ ['clusterLabelCount', PREFERENCE],
815
841
  ];
816
842
  /**
817
843
  * The Symbol Comparison overlays (new price scale, same % scale, new pane): the name the user gave the series (`label`,
@@ -842,9 +868,12 @@ const OPTIONS_HEATMAP_FIELDS = [
842
868
  ['cellShape', PREFERENCE],
843
869
  ['lowNodes', PREFERENCE],
844
870
  ['dataSource', PREFERENCE],
845
- // The node look knobs (NODE-KNOBS 2026-10-28): the smallest, the biggest and the faintest node, percent sliders.
871
+ // The node look knobs (NODE-KNOBS 2026-10-28): the smallest node and the faintest, percent sliders, and the biggest
872
+ // in px (`nodeMaxPx`, NODE-PX 2026-11-02). `nodeMaxSize` is the biggest node's legacy percent: kept so a save carries
873
+ // a saved value through for the production build, which still reads it from the settings store INT shares.
846
874
  ['nodeMinSize', PREFERENCE],
847
875
  ['nodeMaxSize', PREFERENCE],
876
+ ['nodeMaxPx', PREFERENCE],
848
877
  ['nodeMinOpacity', PREFERENCE],
849
878
  // 'user' once the user picked the basis in the settings dialog: a governed host's market switch and restore reset
850
879
  // only a naive basis the old switch forced (the control's `governedBasisReset`), so the mark travels with `basis`.
@@ -860,6 +889,17 @@ const OPTIONS_GEX_FIELDS = [
860
889
  ['topNodeColor', PREFERENCE],
861
890
  ['axisTagLook', PREFERENCE],
862
891
  ];
892
+ /**
893
+ * The Order Book Profile's Grouping mode ('fixed' holds the picked grouping at every zoom, else it follows the zoom).
894
+ * Titan's row merge (`autoScaleBars`, `minRowPx`) is derived from it by the mount and the save door, so only the mode
895
+ * is a preference. A row that never picked holds no mode and draws Dynamic: the mount writes the mode only when one is
896
+ * stored, so untouched workspace rows are never rewritten (the row lane writes no unset). A template or a saved
897
+ * default captured from such a row carries 'dynamic' (`unset`, the default in web's orderbook-profile-grouping.util),
898
+ * so applied over a Fixed profile it restores Dynamic instead of leaving Fixed. Scoped to the type: the name is generic.
899
+ */
900
+ const ORDERBOOK_PROFILE_FIELDS = [
901
+ ['groupingMode', { lanes: ['row', 'template', 'default'], unset: 'dynamic' }],
902
+ ];
863
903
  /** The VRVP own-window scope rows (see INDICATOR_TYPE_FIELDS below). */
864
904
  const VISIBLE_RANGE_PROFILE_FIELDS = [
865
905
  ['profileWindow', PREFERENCE],
@@ -886,6 +926,7 @@ export const INDICATOR_TYPE_FIELDS = {
886
926
  */
887
927
  VISIBLE_RANGE_VOLUME_PROFILE: VISIBLE_RANGE_PROFILE_FIELDS,
888
928
  AGGREGATED_VISIBLE_RANGE_VOLUME_PROFILE: VISIBLE_RANGE_PROFILE_FIELDS,
929
+ ORDERBOOK_PROFILE: ORDERBOOK_PROFILE_FIELDS,
889
930
  OPEN_INTEREST_PROFILE: METRIC_PROFILE_FIELDS,
890
931
  LIQUIDATION_PROFILE: METRIC_PROFILE_FIELDS,
891
932
  OPTIONS_HEATMAP: OPTIONS_HEATMAP_FIELDS,
@@ -30,8 +30,8 @@ export declare const TOOL_TEMPLATE_RULES: {
30
30
  * `instanceKeys`: no template carries or writes them, Save as default and the style memory keep neither (web
31
31
  * src/store/tool-style-memory.ts keeps the default lane), and a template applied to a drawing leaves its own. Until
32
32
  * 2026-10-25 they rode both lanes, so a GhostFeed drawn after one on BTC drew BTC's volatility on any symbol.
33
- * tests/packages/wrun-chart-host/settings-templates/tool-tables.engine-reads.spec.ts fails on a key the engine writes
34
- * that a lane carries unless this list names it or the spec waives it as a pick the user made.
33
+ * tests/structure/settings-kept.spec.ts names each key here a panel shows in its ledger: a key added to or removed
34
+ * from this list changes what the default lane keeps, and that spec fails until its ledger says why.
35
35
  */
36
36
  readonly instanceKeysByType: {
37
37
  readonly GhostFeed: readonly ["averageHL", "variance"];
@@ -68,10 +68,11 @@ export declare const TOOL_TEMPLATE_RULES: {
68
68
  readonly intervalBoundTypes: readonly ["GhostFeed", "BarPattern", "GannSquareFixed"];
69
69
  /**
70
70
  * Keys the engine reads but the registry defaultStyle does not list (web src/components/objects/tool-prop-sections.ts
71
- * HELD_EXTRA_FIELDS: the price label flag of a horizontal line or ray, the fib pair's log-scale levels), each with
71
+ * HELD_EXTRA_FIELDS: the axis label flag of a horizontal line or ray (price label), a vertical line (time label) and
72
+ * a cross line (both), the fib pair's log-scale levels), each with
72
73
  * the default the engine seeds (titan's tool classes), so a template, a seed and Save as default see every key. A
73
74
  * key belongs in the registry: an extra stays here only while the registry cannot carry it as the editors show it
74
- * (the price label flag is the `highlight` field under a per-type label), or until the registry lists it (the fib
75
+ * (the axis label flag is the `highlight` field under a per-type label), or until the registry lists it (the fib
75
76
  * pair's). A position's line width and style moved into the registry with chart-schema 0.5.1, and the generator
76
77
  * refuses an extra the registry lists.
77
78
  */
@@ -82,6 +83,12 @@ export declare const TOOL_TEMPLATE_RULES: {
82
83
  readonly HorizontalRay: {
83
84
  readonly highlight: true;
84
85
  };
86
+ readonly VerticalLine: {
87
+ readonly highlight: true;
88
+ };
89
+ readonly CrossLine: {
90
+ readonly highlight: true;
91
+ };
85
92
  readonly FibonacciRetracement: {
86
93
  readonly levelsOnLogScale: false;
87
94
  };
@@ -91,11 +98,13 @@ export declare const TOOL_TEMPLATE_RULES: {
91
98
  };
92
99
  /**
93
100
  * Style keys Save as default never keeps, and so neither does web's style memory (src/store/tool-style-memory.ts
94
- * keeps the default lane): `rotation` is one placed drawing's geometry, and the position tools' financial inputs
95
- * would carry one account's numbers into the next drawing. A template still carries them: it is applied on purpose,
96
- * onto one drawing.
101
+ * keeps the default lane): only a placed drawing's geometry (`rotation`). A key the user picks belongs in the lane:
102
+ * the position tools' account size, risk, risk mode and lot size are the user's sizing, and TradingView's Long and
103
+ * Short Position start the next drawing from the last ones set (checked 2026-11-01 on its Charting Library; until
104
+ * then this list held them, and every new position reset to a 1000 account at 25% risk).
105
+ * tests/packages/wrun-chart-host/settings-templates/default-lane.spec.ts fails on any other key here.
97
106
  */
98
- readonly defaultExcludedKeys: readonly ["rotation", "accountSize", "risk", "riskDisplayMode", "lotSize"];
107
+ readonly defaultExcludedKeys: readonly ["rotation"];
99
108
  /**
100
109
  * Types whose Save as default keeps nothing, and so neither does web's style memory: an Image is placed by a dialog
101
110
  * that owns its source and opacity at confirm time.
@@ -30,8 +30,8 @@ export const TOOL_TEMPLATE_RULES = {
30
30
  * `instanceKeys`: no template carries or writes them, Save as default and the style memory keep neither (web
31
31
  * src/store/tool-style-memory.ts keeps the default lane), and a template applied to a drawing leaves its own. Until
32
32
  * 2026-10-25 they rode both lanes, so a GhostFeed drawn after one on BTC drew BTC's volatility on any symbol.
33
- * tests/packages/wrun-chart-host/settings-templates/tool-tables.engine-reads.spec.ts fails on a key the engine writes
34
- * that a lane carries unless this list names it or the spec waives it as a pick the user made.
33
+ * tests/structure/settings-kept.spec.ts names each key here a panel shows in its ledger: a key added to or removed
34
+ * from this list changes what the default lane keeps, and that spec fails until its ledger says why.
35
35
  */
36
36
  instanceKeysByType: {
37
37
  GhostFeed: ['averageHL', 'variance'],
@@ -68,16 +68,21 @@ export const TOOL_TEMPLATE_RULES = {
68
68
  intervalBoundTypes: ['GhostFeed', 'BarPattern', 'GannSquareFixed'],
69
69
  /**
70
70
  * Keys the engine reads but the registry defaultStyle does not list (web src/components/objects/tool-prop-sections.ts
71
- * HELD_EXTRA_FIELDS: the price label flag of a horizontal line or ray, the fib pair's log-scale levels), each with
71
+ * HELD_EXTRA_FIELDS: the axis label flag of a horizontal line or ray (price label), a vertical line (time label) and
72
+ * a cross line (both), the fib pair's log-scale levels), each with
72
73
  * the default the engine seeds (titan's tool classes), so a template, a seed and Save as default see every key. A
73
74
  * key belongs in the registry: an extra stays here only while the registry cannot carry it as the editors show it
74
- * (the price label flag is the `highlight` field under a per-type label), or until the registry lists it (the fib
75
+ * (the axis label flag is the `highlight` field under a per-type label), or until the registry lists it (the fib
75
76
  * pair's). A position's line width and style moved into the registry with chart-schema 0.5.1, and the generator
76
77
  * refuses an extra the registry lists.
77
78
  */
78
79
  heldExtras: {
79
80
  HorizontalLine: { highlight: true },
80
81
  HorizontalRay: { highlight: true },
82
+ // The time label (TradingView's Vertical Line "Time Label") and the cross line's price and time labels: titan from
83
+ // the release after 0.0.4-alpha.1213 keeps them at rest, on by default (VerticalLine, CrossLine classes).
84
+ VerticalLine: { highlight: true },
85
+ CrossLine: { highlight: true },
81
86
  // "Fib levels based on log scale" (feedback 1815): titan from 3dcd6689 (the release after 0.0.4-alpha.1211) spaces
82
87
  // the levels in log10 of the price while it is on; chart-schema 0.8.0's FIB_STYLE does not list it yet, and the
83
88
  // generator refuses these two once it does.
@@ -86,11 +91,13 @@ export const TOOL_TEMPLATE_RULES = {
86
91
  },
87
92
  /**
88
93
  * Style keys Save as default never keeps, and so neither does web's style memory (src/store/tool-style-memory.ts
89
- * keeps the default lane): `rotation` is one placed drawing's geometry, and the position tools' financial inputs
90
- * would carry one account's numbers into the next drawing. A template still carries them: it is applied on purpose,
91
- * onto one drawing.
94
+ * keeps the default lane): only a placed drawing's geometry (`rotation`). A key the user picks belongs in the lane:
95
+ * the position tools' account size, risk, risk mode and lot size are the user's sizing, and TradingView's Long and
96
+ * Short Position start the next drawing from the last ones set (checked 2026-11-01 on its Charting Library; until
97
+ * then this list held them, and every new position reset to a 1000 account at 25% risk).
98
+ * tests/packages/wrun-chart-host/settings-templates/default-lane.spec.ts fails on any other key here.
92
99
  */
93
- defaultExcludedKeys: ['rotation', 'accountSize', 'risk', 'riskDisplayMode', 'lotSize'],
100
+ defaultExcludedKeys: ['rotation'],
94
101
  /**
95
102
  * Types whose Save as default keeps nothing, and so neither does web's style memory: an Image is placed by a dialog
96
103
  * that owns its source and opacity at confirm time.
@@ -103,7 +103,7 @@ export const TOOL_DEFAULT_STYLE = {
103
103
  backgroundOpacity: 15,
104
104
  },
105
105
  Comment: { color: '#4DA3FF', fontColor: '#FFFFFF', fontSize: 12 },
106
- CrossLine: { color: '#4DA3FF', lineWidth: 2, lineStyle: 'solid' },
106
+ CrossLine: { color: '#4DA3FF', lineWidth: 2, lineStyle: 'solid', highlight: true },
107
107
  Curve: {
108
108
  color: '#4DA3FF',
109
109
  borderColor: '#4DA3FF',
@@ -975,6 +975,7 @@ export const TOOL_DEFAULT_STYLE = {
975
975
  textVerticalPosition: 'top',
976
976
  fontWeight: 400,
977
977
  fontStyle: 'normal',
978
+ highlight: true,
978
979
  },
979
980
  Whisper: { color: '#656565', highlight: false, lineWidth: 2 },
980
981
  XABCDPattern: {
@@ -1070,7 +1071,7 @@ export const TOOL_TEMPLATE_KEYS = {
1070
1071
  'visibleIntervalsMs',
1071
1072
  ],
1072
1073
  Comment: ['color', 'fontColor', 'fontSize', 'visibleIntervalsMs'],
1073
- CrossLine: ['color', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
1074
+ CrossLine: ['color', 'lineWidth', 'lineStyle', 'highlight', 'visibleIntervalsMs'],
1074
1075
  Curve: [
1075
1076
  'color',
1076
1077
  'borderColor',
@@ -1735,6 +1736,7 @@ export const TOOL_TEMPLATE_KEYS = {
1735
1736
  'textVerticalPosition',
1736
1737
  'fontWeight',
1737
1738
  'fontStyle',
1739
+ 'highlight',
1738
1740
  'text',
1739
1741
  'visibleIntervalsMs',
1740
1742
  ],
@@ -36,7 +36,9 @@
36
36
  * `APPLY_STEP_MS` or more and on every deadband crossing. The data worker
37
37
  * receives exactly that correction through the WorkerManager mirror
38
38
  * (`setServerClockOffsetMs`) on every move and in each worker's bootstrap,
39
- * so `serverNowMs()` reads the same clock in both.
39
+ * so `serverNowMs()` reads the same clock in both. The Hyperliquid signer
40
+ * worker gets it through its own `hl-signer:server-clock` message; every
41
+ * other dedicated worker gets none, so `serverNowMs()` there is the device clock.
40
42
  *
41
43
  * Boot: nothing awaits an API response before the first chart request, so the
42
44
  * last measured offset is kept in localStorage (a device's skew is stable for
@@ -36,7 +36,9 @@
36
36
  * `APPLY_STEP_MS` or more and on every deadband crossing. The data worker
37
37
  * receives exactly that correction through the WorkerManager mirror
38
38
  * (`setServerClockOffsetMs`) on every move and in each worker's bootstrap,
39
- * so `serverNowMs()` reads the same clock in both.
39
+ * so `serverNowMs()` reads the same clock in both. The Hyperliquid signer
40
+ * worker gets it through its own `hl-signer:server-clock` message; every
41
+ * other dedicated worker gets none, so `serverNowMs()` there is the device clock.
40
42
  *
41
43
  * Boot: nothing awaits an API response before the first chart request, so the
42
44
  * last measured offset is kept in localStorage (a device's skew is stable for
@@ -17,7 +17,7 @@
17
17
  */
18
18
  import { Intervals } from '../../constants/interval.constants.js';
19
19
  import { roundObTimestamp } from '../common/data-processing.util.js';
20
- import { cmeSessionLatticeBucketMs } from './live-bucket.util.js';
20
+ import { venueSessionLatticeBucketMs } from './live-bucket.util.js';
21
21
  /**
22
22
  * The lattice bar an END-stamped book frame closes, or null off the lattice (another venue, a
23
23
  * coin-aggregated book that passes no venue, an interval the gateway does not roll): the stamp is
@@ -27,7 +27,7 @@ import { cmeSessionLatticeBucketMs } from './live-bucket.util.js';
27
27
  */
28
28
  export function cmeLatticeBookBucketMs(stampMs, intervalMs, venue) {
29
29
  const closingMs = intervalMs === Intervals.WEEK ? stampMs : stampMs - 1;
30
- return cmeSessionLatticeBucketMs(closingMs, intervalMs, venue);
30
+ return venueSessionLatticeBucketMs(closingMs, intervalMs, venue);
31
31
  }
32
32
  /** The bar a live book row is keyed on: the CME session lattice bar on a CME Group market, else
33
33
  * `roundObTimestamp`'s END reading of the plain grid. */
@@ -108,7 +108,7 @@ export interface MainPlanAsk {
108
108
  verbatim?: boolean;
109
109
  /**
110
110
  * Partial-bucket asks only: the end (ms bar open) of the receipt that
111
- * holds the bucket's first bar and ends inside it, the instant through
111
+ * holds the bucket's first slot and ends inside it, the instant through
112
112
  * which the re-delivered overlap is wire-validated. The dispatcher hands it
113
113
  * to the poison detector as the compare bound (`receiptFrontierTs`), so an
114
114
  * island's overlap is compared even when the chain from the entry's first
@@ -117,7 +117,7 @@ export interface MainPlanAsk {
117
117
  */
118
118
  coverEndMs?: number;
119
119
  }
120
- /** A bucket the planner judged on a receipt holding its first bar (ring diagnostic). */
120
+ /** A bucket the planner judged on a receipt holding its first slot (ring diagnostic). */
121
121
  export interface MainPlanBucketCover {
122
122
  /** The bucket start (unix seconds). */
123
123
  bucket: number;
@@ -140,11 +140,14 @@ interface MainPlanPaint {
140
140
  wireFrontierTs?: number;
141
141
  /**
142
142
  * The entry's coalesced wire receipts over the rows the read returned (ms
143
- * bar opens; the read clamps them to the mounted rows and coalesces them on
144
- * the interval grid: `normalizeWireReceipts` and `clampWireReceiptsToBars`
145
- * in ohlcv-cache.service). The period lane judges every closed bucket on
146
- * the ONE receipt holding its first bar (the 2026-10-02 08:59Z dump), so an
147
- * island past a hole counts for the buckets it covers whole.
143
+ * bar opens; the read stops each tail at the last returned row, cuts a head
144
+ * at the first returned row only where it left an older held bar out, and
145
+ * coalesces them on the interval grid: `WireReceiptHead`,
146
+ * `clampWireReceiptsToBars` in ohlcv-cache.service), so a head may precede
147
+ * the first row where the wire answered a closure. The period lane judges
148
+ * every closed bucket on the ONE receipt holding its first slot
149
+ * (`receiptHoldingBucketStart`; the 2026-10-02 08:59Z dump), so an island
150
+ * past a hole counts for the buckets it covers whole.
148
151
  */
149
152
  wireReceipts?: ReadonlyArray<readonly [fromTs: number, toTs: number]>;
150
153
  /** The read belt (barsConsistentWithInterval, foreign-grid classifier) passed; false refuses every skip. */
@@ -244,6 +247,12 @@ export interface MainPlanInput {
244
247
  todayLimit: number;
245
248
  numberOfCandles: number;
246
249
  demandBars: number;
250
+ /**
251
+ * The clock the venue serves through (ms): a delayed tape's cut (the main candles' stream clock), server now
252
+ * elsewhere. The bars a count ask can bring stop there, so the tail ask counts to it (`countLaneBarsSince`).
253
+ * Absent: `nowMs`.
254
+ */
255
+ servedNowMs?: number;
247
256
  };
248
257
  }
249
258
  type MainPlanLane = 'period' | 'count' | 'tail-boot' | 'dry-frontier' | 'whole';
@@ -260,6 +269,11 @@ export interface MainPlanResult {
260
269
  unprovenMountBuckets?: number[];
261
270
  reason: string;
262
271
  }
272
+ /**
273
+ * The ONE receipt holding a canonical bucket's first slot, or undefined: the bucket is held from its start under it,
274
+ * a closure the wire answered before the entry's first row included (WireReceiptHead); a bar alone never holds it.
275
+ */
276
+ export declare function receiptHoldingBucketStart(receipts: ReadonlyArray<readonly [fromTs: number, toTs: number]>, bucketStartMs: number): readonly [fromTs: number, toTs: number] | undefined;
263
277
  /**
264
278
  * The instant (ms) through which validated windows answer for a series past
265
279
  * its tail bar (fix-forward U1): the end of the span that holds the tail bar
@@ -406,6 +420,23 @@ export interface LandedMainTailVerdict {
406
420
  * Pure.
407
421
  */
408
422
  export declare function mergeLandedMainTailVerdict(held: LandedMainTailVerdict | null | undefined, landed: LandedMainTailVerdict): LandedMainTailVerdict;
423
+ /**
424
+ * The bars a count-fetched series (tradfi, forex, commodity, dex: "the newest N bars at or before an anchor") can
425
+ * have opened since its tail, the ONE count every count-lane tail ask is sized by (the main plan's count lane and the
426
+ * wake resync's): from the later of the tail bar and the instant the wire already answered through past it
427
+ * (`provenThroughMs`, the entry's tail verdict: a count reply anchored at now answers for every bar from its first row
428
+ * to its anchor, count-ask-receipt.util, so on a venue that printed nothing since its newest row the reply proves the
429
+ * closure), to the clock the venue serves through (`servedNowMs`: a delayed tape's cut, never server now, which
430
+ * counted the 15-minute delay as missing bars). Clock time between those two, never a calendar: the wire's word is
431
+ * what shrinks the count, so nothing here can hide a bar (an unmodelled holiday, an extended or overnight session).
432
+ * Pure.
433
+ */
434
+ export declare function countLaneBarsSince(input: {
435
+ tailMs: number;
436
+ provenThroughMs?: number | null;
437
+ servedNowMs: number;
438
+ intervalMs: number;
439
+ }): number;
409
440
  export declare function planMainRefetchAsks(input: MainPlanInput): MainPlanResult;
410
441
  /**
411
442
  * The span a staged family mounts (fix-forward lane S1, the 2026-09-27 ETH
@@ -259,6 +259,13 @@ function paintReceipts(paint) {
259
259
  ? [[firstTs, wireFrontierTs]]
260
260
  : [];
261
261
  }
262
+ /**
263
+ * The ONE receipt holding a canonical bucket's first slot, or undefined: the bucket is held from its start under it,
264
+ * a closure the wire answered before the entry's first row included (WireReceiptHead); a bar alone never holds it.
265
+ */
266
+ export function receiptHoldingBucketStart(receipts, bucketStartMs) {
267
+ return receipts.find(([fromTs, toTs]) => fromTs <= bucketStartMs && toTs >= bucketStartMs);
268
+ }
262
269
  /**
263
270
  * Whether a receipt covers the paint's last row: one of `wireReceipts` holds
264
271
  * it, else (a frontier-only caller) the chain from the first row reaches it.
@@ -321,11 +328,9 @@ function unprovenMountHealAsks(input, receipts, reachFromSec, intervalSec) {
321
328
  const end = Math.min(b + bucketSec, reachPieceEndSec);
322
329
  if (pending.some((p) => p.from <= b && end <= p.from + p.period))
323
330
  continue;
324
- // The ONE receipt holding the bucket's first bar (the period lane's rule):
331
+ // The ONE receipt holding the bucket's first slot (the period lane's rule):
325
332
  // the rows it holds are proven, the ask starts at its last piece.
326
- const cover = typeof firstTs === 'number' && b * 1000 >= firstTs
327
- ? receipts.find(([from, to]) => from <= b * 1000 && to >= b * 1000)
328
- : undefined;
333
+ const cover = typeof firstTs === 'number' ? receiptHoldingBucketStart(receipts, b * 1000) : undefined;
329
334
  if (cover !== undefined) {
330
335
  const start = Math.max(b, pieceFloorSec(Math.floor(cover[1] / 1000), pieceSec));
331
336
  asks.push(...tailAsks(start, end, pieceSec, intervalSec, 'not-wire-validated').map((ask) => withCommitWindow({ ...ask, coverEndMs: cover[1] })));
@@ -548,6 +553,26 @@ export function mergeLandedMainTailVerdict(held, landed) {
548
553
  : Math.max(held.closedAtMs, landed.closedAtMs);
549
554
  return { tailTs: landed.tailTs, throughMs: Math.max(held.throughMs, landed.throughMs), closedAtMs };
550
555
  }
556
+ /**
557
+ * The bars a count-fetched series (tradfi, forex, commodity, dex: "the newest N bars at or before an anchor") can
558
+ * have opened since its tail, the ONE count every count-lane tail ask is sized by (the main plan's count lane and the
559
+ * wake resync's): from the later of the tail bar and the instant the wire already answered through past it
560
+ * (`provenThroughMs`, the entry's tail verdict: a count reply anchored at now answers for every bar from its first row
561
+ * to its anchor, count-ask-receipt.util, so on a venue that printed nothing since its newest row the reply proves the
562
+ * closure), to the clock the venue serves through (`servedNowMs`: a delayed tape's cut, never server now, which
563
+ * counted the 15-minute delay as missing bars). Clock time between those two, never a calendar: the wire's word is
564
+ * what shrinks the count, so nothing here can hide a bar (an unmodelled holiday, an extended or overnight session).
565
+ * Pure.
566
+ */
567
+ export function countLaneBarsSince(input) {
568
+ const { tailMs, provenThroughMs, servedNowMs, intervalMs } = input;
569
+ if (!(intervalMs > 0) || !Number.isFinite(tailMs) || !Number.isFinite(servedNowMs))
570
+ return 0;
571
+ const fromMs = typeof provenThroughMs === 'number' && Number.isFinite(provenThroughMs) && provenThroughMs > tailMs
572
+ ? provenThroughMs
573
+ : tailMs;
574
+ return Math.max(0, Math.floor((servedNowMs - fromMs) / intervalMs));
575
+ }
551
576
  export function planMainRefetchAsks(input) {
552
577
  const { window } = input;
553
578
  const none = {
@@ -570,8 +595,21 @@ export function planMainRefetchAsks(input) {
570
595
  if (input.indexMode) {
571
596
  const lane = input.countLane;
572
597
  const cachedLastTs = paint ? (lane?.cachedLastTs ?? paint.lastTs) : undefined;
598
+ const todayLimit = lane?.todayLimit ?? 0;
599
+ const cap = Math.max(lane?.numberOfCandles ?? 0, lane?.demandBars ?? 0);
600
+ const windowLimit = cap > 0 ? Math.min(Math.max(todayLimit, 1), cap) : Math.max(todayLimit, 1);
573
601
  if (paint && typeof cachedLastTs === 'number' && Number.isFinite(cachedLastTs)) {
574
- const barsSince = Math.max(0, Math.floor((input.nowMs - cachedLastTs) / intervalMs));
602
+ // The cached last bar and every bar the venue can have opened since (countLaneBarsSince): never a clock span
603
+ // the wire already answered for, so a closed or quiet market asks two bars once a reply has answered past its
604
+ // tail, where it asked the whole closure (1,973 bars on a Sunday, the 2026-11-08 INT AAPL dump). The ask still
605
+ // bridges every bar nothing proves (a merge over the painted rows needs no hole): a rebuild that would ask more
606
+ // than the window keeps its window send instead (boot-fetch-hoist `count-entry-rebuild`, titan-charts' count boot).
607
+ const limit = countLaneBarsSince({
608
+ tailMs: cachedLastTs,
609
+ provenThroughMs: paint.tailValidatedThroughMs,
610
+ servedNowMs: lane?.servedNowMs ?? input.nowMs,
611
+ intervalMs,
612
+ }) + 2;
575
613
  const fromSec = Math.floor(cachedLastTs / 1000);
576
614
  return {
577
615
  lane: 'count',
@@ -580,7 +618,7 @@ export function planMainRefetchAsks(input) {
580
618
  kind: 'count',
581
619
  from: nowSec,
582
620
  period: 0,
583
- limit: barsSince + 2,
621
+ limit,
584
622
  why: 'forming-tail',
585
623
  commitWindow: { fromSec, toSec: nowSec },
586
624
  },
@@ -589,12 +627,9 @@ export function planMainRefetchAsks(input) {
589
627
  reason: 'count-hit',
590
628
  };
591
629
  }
592
- const todayLimit = lane?.todayLimit ?? 0;
593
- const cap = Math.max(lane?.numberOfCandles ?? 0, lane?.demandBars ?? 0);
594
- const limit = cap > 0 ? Math.min(Math.max(todayLimit, 1), cap) : Math.max(todayLimit, 1);
595
630
  return {
596
631
  lane: 'count',
597
- asks: [{ kind: 'count', from: nowSec, period: 0, limit, why: 'uncovered-closed-bucket' }],
632
+ asks: [{ kind: 'count', from: nowSec, period: 0, limit: windowLimit, why: 'uncovered-closed-bucket' }],
598
633
  ...none,
599
634
  reason: 'count-miss',
600
635
  };
@@ -694,11 +729,13 @@ export function planMainRefetchAsks(input) {
694
729
  const bEnd = b + bucketSec;
695
730
  const lastBarMs = (bEnd - intervalSec) * 1000;
696
731
  const bucketHeldFromFirstRow = firstTs !== undefined && b * 1000 >= firstTs;
697
- // The ONE receipt holding the bucket's first bar: reaching the last bar
732
+ // The ONE receipt holding the bucket's first slot: reaching the last bar
698
733
  // it proves the bucket whole; ending inside it, it proves the bucket
699
734
  // through its end only (a live-built tail, a hole split it). A receipt
700
- // that starts after the first bar proves nothing about the bucket.
701
- const cover = canSkip && bucketHeldFromFirstRow ? receipts.find(([from, to]) => from <= b * 1000 && to >= b * 1000) : undefined;
735
+ // that starts after the first slot proves nothing about the bucket. A
736
+ // bucket opening before the entry's first row is held from its start only
737
+ // when that receipt answered the closure there (receiptHoldingBucketStart).
738
+ const cover = canSkip ? receiptHoldingBucketStart(receipts, b * 1000) : undefined;
702
739
  if (cover !== undefined && cover[1] >= lastBarMs) {
703
740
  skippedBuckets.push(b);
704
741
  covers.push({ bucket: b, coverEndMs: cover[1], skipped: true });
@@ -6,6 +6,8 @@
6
6
  */
7
7
  /** Bumped by every cancelFetchDataOfChart (symbol/interval switch, refetch, teardown). */
8
8
  export declare function bumpChartDataFetchGeneration(chartIndex: number): number;
9
+ /** Told the chart index whenever its dataset ends (every bump): work a reader owns for that dataset lets go of it. */
10
+ export declare function onChartDataFetchGenerationBump(listener: (chartIndex: number) => void): () => void;
9
11
  /**
10
12
  * Current data-fetch generation for a chart. Exported for callers that
11
13
  * dispatch generation-scoped child fetches (an `IndicatorDataOptions.
@@ -5,12 +5,28 @@
5
5
  * dragged that module's whole graph into each consumer. No imports here.
6
6
  */
7
7
  const chartDataFetchGenerations = new Map();
8
+ const bumpListeners = new Set();
8
9
  /** Bumped by every cancelFetchDataOfChart (symbol/interval switch, refetch, teardown). */
9
10
  export function bumpChartDataFetchGeneration(chartIndex) {
10
11
  const nextGeneration = (chartDataFetchGenerations.get(chartIndex) ?? 0) + 1;
11
12
  chartDataFetchGenerations.set(chartIndex, nextGeneration);
13
+ for (const listener of bumpListeners) {
14
+ try {
15
+ listener(chartIndex);
16
+ }
17
+ catch {
18
+ // A listener's fault never stops the dataset's end.
19
+ }
20
+ }
12
21
  return nextGeneration;
13
22
  }
23
+ /** Told the chart index whenever its dataset ends (every bump): work a reader owns for that dataset lets go of it. */
24
+ export function onChartDataFetchGenerationBump(listener) {
25
+ bumpListeners.add(listener);
26
+ return () => {
27
+ bumpListeners.delete(listener);
28
+ };
29
+ }
14
30
  /**
15
31
  * Current data-fetch generation for a chart. Exported for callers that
16
32
  * dispatch generation-scoped child fetches (an `IndicatorDataOptions.