@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
@@ -16,9 +16,9 @@
16
16
  * first-party one (`isOpraUserScriptRun`, the same three doors). The US stocks
17
17
  * tape is open to user-authored indicators too, in the browser and on the
18
18
  * cloud lane (Kyle 2026-10-29), on the tapes STOCKS_TAPE_SCRIPTING_VENUES
19
- * lists, the one compliance switch (`isStocksTapeReadableKScriptRun`); a tape
20
- * it leaves out (NASDAQ_TAPE until the UTP derived-data answer) stays
21
- * first-party only. Each plane reads its own gate alone: no plane's decision
19
+ * lists, the one compliance switch (`isStocksTapeReadableKScriptRun`): every
20
+ * tape since Kyle 2026-11-06; a tape it leaves out would stay first-party
21
+ * only. Each plane reads its own gate alone: no plane's decision
22
22
  * opens another. The data tier belongs to the viewer, never to the script: the
23
23
  * browser lane reads through the viewer's own gate sockets. This module is the
24
24
  * single decider for every plane.
@@ -34,16 +34,17 @@ import { CME_GOVERNED_EXCHANGES } from '../../interfaces/cme-realtime.interface.
34
34
  import { OPRA_GOVERNED_EXCHANGES } from '../../interfaces/opra-realtime.interface.js';
35
35
  import { STOCKS_GOVERNED_EXCHANGES, STOCKS_TAPE_SCRIPTING_VENUES } from '../../interfaces/stocks-realtime.interface.js';
36
36
  import { isCmeFuturesPolicyActive } from './marketKind.util.js';
37
- import { isOpraGoverned, isStocksTapeGoverned } from '../v2/gate-plane.util.js';
37
+ import { isOpraGoverned, isStocksTapeGoverned, walledVenueOf } from '../v2/gate-plane.util.js';
38
+ import { stocksTapeVenueLabel } from '../v2/stocks-governed.util.js';
38
39
  import { isConvertedScriptId } from '../../constants/scriptEditor/converted-script-id.leaf.js';
39
40
  import { isTempScriptId } from '../scriptEditor/temp-script-id.util.js';
40
41
  import { TECHNICAL_INDICATOR_SCRIPT_KEY_SET } from '../../constants/scriptEditor/technicalIndicatorScriptKeys.constants.js';
41
- import { classifyOfficialScriptForCme, isCmeFirstPartyOfficialDocId, isCmeProvenTwinBuiltIn, } from '../../constants/scriptEditor/cme-official-scripts.constants.js';
42
+ import { isCmeFirstPartyOfficialDocId } from '../../constants/scriptEditor/cme-official-scripts.constants.js';
42
43
  // Leaf modules (no imports of their own), so this file stays worker-safe.
43
44
  import { isWrunDraftScriptId } from '../wrun/wrun-draft-overlay.util.js';
44
45
  import { isWrunOfficialPackage } from '../wrun/wrun-official-scope.leaf.js';
46
+ import { wrunAppLayerOf } from '../wrun/wrun-app-layer.leaf.js';
45
47
  // Worker-safe too: it reads the twin stamp, the registry ref and the built-in keys alone.
46
- import { builtinIdentityOf } from './builtin-identity.util.js';
47
48
  // Dependency-free: the flag store hands the flag's live readers to it (no store import here).
48
49
  import { isOpraUserScriptsFlagOn } from './opra-user-scripts-gate.util.js';
49
50
  // Dependency-free too: the flag store and the web's CME entitlement hand their live readers to it.
@@ -54,8 +55,8 @@ import { wrunRowSourceKindOf } from '../wrun/wrun-overlay-identity.util.js';
54
55
  // leaf, never wrun-cloud-record.util: this module rides the boot path (titan-charts' dataFetch guard) and the util
55
56
  // does not (tests/utility/wrun/wrun-door.closure.spec.ts).
56
57
  import { wrunCloudRecordOf } from '../wrun/wrun-cloud-record.leaf.js';
57
- // Import-free: the one OPRA read decision every door reads (the wrun lane planners too).
58
- import { mayReadOpra, payloadReadsOpraPlane } from './opra-read-access.leaf.js';
58
+ // Import-free: the one OPRA read decision every door reads (the wrun lane planners too), and the CME pin's.
59
+ import { mayReadCmePin, mayReadOpra, payloadReadsOpraPlane } from './opra-read-access.leaf.js';
59
60
  // The provenance keys are the pure leaf's (kscript-provenance-keys.util); their importers keep this path.
60
61
  export { isReservedKScriptProvenanceKey, KSCRIPT_RESERVED_PROVENANCE_KEYS } from './kscript-provenance-keys.util.js';
61
62
  /** The registry coordinate (`@scope/name`) a wrun identity ref names, or undefined. */
@@ -91,6 +92,13 @@ function carriesWrunIdentity(settings) {
91
92
  * and stays walled on governed venues until its scope joins
92
93
  * WRUN_OFFICIAL_SCOPES (fail closed).
93
94
  *
95
+ * An app layer (wrun-app-layer.leaf: `wrunDraftRef.appLayer`) is the one
96
+ * draft-lane run that qualifies: the app mounts it for one of its own panels
97
+ * from the kit template its pinned kit ships under the official package the
98
+ * table names, so the code that runs is the app's own; no user run can name
99
+ * one (the draft mount builds its ref from fixed fields, and no persisted
100
+ * record ever carries a draft in).
101
+ *
94
102
  * Fail closed on every other shape: an editor draft (`wrunDraftRef`, or a
95
103
  * `wrun-draft-*` id) and a temp editor run are never packages, whatever rides
96
104
  * beside them; EVERY package identity the record carries (the browser lane's
@@ -99,12 +107,18 @@ function carriesWrunIdentity(settings) {
99
107
  * coordinate names no code and never qualifies.
100
108
  */
101
109
  export function isOfficialWrunOverlay(settings) {
102
- if (!settings || settings.wrunDraftRef)
110
+ if (!settings)
111
+ return false;
112
+ const refs = [settings.wrunRegistryRef, settings.wrunRef].filter(Boolean);
113
+ // An app layer names its code by its table, so any package identity beside it names other code: not official.
114
+ const appLayer = wrunAppLayerOf(settings);
115
+ if (appLayer)
116
+ return refs.length === 0 && isWrunOfficialPackage(appLayer.package, null);
117
+ if (settings.wrunDraftRef)
103
118
  return false;
104
119
  const customScriptId = typeof settings.customScriptId === 'string' ? settings.customScriptId : undefined;
105
120
  if (isWrunDraftScriptId(customScriptId) || isTempScriptId(customScriptId))
106
121
  return false;
107
- const refs = [settings.wrunRegistryRef, settings.wrunRef].filter(Boolean);
108
122
  if (refs.length === 0)
109
123
  return false;
110
124
  return refs.every((ref) => {
@@ -274,9 +288,13 @@ export function isCmeUserScriptRun(settings) {
274
288
  return isCmeUserScriptsGateOpen() && isCmeUserScriptCandidate(settings);
275
289
  }
276
290
  /** Whether a run may consume the CME plane's data: every first-party run, and a user run the `cme-user-scripts` gate
277
- * opened it to (`isCmeUserScriptRun`). */
291
+ * opened it to (`isCmeUserScriptRun`; `mayReadCmePin`, the one decision a wrun run's CME pins read too). */
278
292
  export function isCmeReadableKScriptRun(settings) {
279
- return isFirstPartyKScriptRun(settings) || isCmeUserScriptRun(settings);
293
+ return mayReadCmePin({ official: isFirstPartyKScriptRun(settings), cmeUserScripts: isCmeUserScriptRun(settings) });
294
+ }
295
+ /** A CME chart study: a user run the gate opened the CME plane to, on a CME chart (the run head's `cmeStudyChain`). */
296
+ export function isCmeChartStudyRun(settings, chartExchange) {
297
+ return payloadTouchesCmeVenue(chartExchange) && isCmeUserScriptRun(settings);
280
298
  }
281
299
  /** The words a door shows a user run the CME wall refuses (web locale keys, `cmeUserScriptWallKey`), and the
282
300
  * lifecycle's words for a study a closing gate stopped in place, its source kept (`CME_STUDY_STOPPED_KEY`: the
@@ -292,8 +310,8 @@ export const CME_STUDIES_OFF_KEY = 'indicators.cme.studiesOff';
292
310
  * (`CME_USER_SCRIPT_WALL_KEY`): the feature does not exist for that viewer, so no door names a browser lane it cannot
293
311
  * offer. Under a lit flag a hosted (Cloud) record or a protected script has no CME path (`CME_CLOUD_WALL_KEY`: CME chart
294
312
  * studies run in the browser), and a run the browser executes is refused only for the viewer's
295
- * entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never this wall's (the doors
296
- * word the curation themselves) and reads today's words. Words only: whether the door opens is the walls' decision
313
+ * entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never refused on CME and reads
314
+ * today's words. Words only: whether the door opens is the walls' decision
297
315
  * (`isKScriptDisplayBlockedOnExchange`, `isCmeReadableKScriptRun`).
298
316
  */
299
317
  export function cmeUserScriptWallKey(settings) {
@@ -304,13 +322,34 @@ export function cmeUserScriptWallKey(settings) {
304
322
  return CME_ENTITLEMENT_REQUIRED_KEY;
305
323
  return lane === 'cloud' || !isFirstPartyKScriptRun(settings) ? CME_CLOUD_WALL_KEY : CME_USER_SCRIPT_WALL_KEY;
306
324
  }
325
+ /** `cmeUserScriptWallKey`'s lane rule in the pin row's words: derived from it, so the two never drift. */
326
+ export function cmePinRefusalVariant(settings) {
327
+ const key = cmeUserScriptWallKey(settings);
328
+ if (key === CME_ENTITLEMENT_REQUIRED_KEY)
329
+ return 'terms';
330
+ return key === CME_CLOUD_WALL_KEY ? 'cloud' : 'default';
331
+ }
332
+ /** The words a door shows a user run a US stocks tape refuses (web locale key; `{venue}` names the tape's venue). */
333
+ export const STOCKS_USER_SCRIPT_WALL_KEY = 'indicators.stocks.userScriptNotSupported';
334
+ /** The wall's words per plane (a `Record`: a plane without its own words is a type error); CME's lane rule stays CME's. */
335
+ const VENUE_WALL_WORDS = {
336
+ cme: (_exchange, settings) => ({ key: cmeUserScriptWallKey(settings), params: {} }),
337
+ opra: (_exchange, settings) => ({ key: opraContractChartWallKey(settings), params: {} }),
338
+ stocks: (exchange) => ({ key: STOCKS_USER_SCRIPT_WALL_KEY, params: { venue: stocksTapeVenueLabel(exchange) } }),
339
+ };
340
+ /** The ONE choice of a door's words for a user run a wall refused, by the walled market's plane (words only, never
341
+ * whether): a venue no plane governs, which no wall refuses, keeps the CME words every door showed before. */
342
+ export function venueWallWords(exchange, settings) {
343
+ const walled = walledVenueOf(exchange);
344
+ return VENUE_WALL_WORDS[walled?.plane ?? 'cme'](walled?.exchange ?? '', settings);
345
+ }
307
346
  /** BLOCKING semantics over a source exchange (string, or the array form with .some()). */
308
347
  function payloadTouches(exchange, governed) {
309
348
  if (Array.isArray(exchange))
310
349
  return exchange.some((entry) => typeof entry === 'string' && governed(entry));
311
350
  return typeof exchange === 'string' && governed(exchange);
312
351
  }
313
- /** Whether a source exchange touches a CME-governed venue (the CME-only curation and copy). */
352
+ /** Whether a source exchange touches a CME-governed venue (the CME plane's gate and its words). */
314
353
  export function payloadTouchesCmeVenue(exchange) {
315
354
  return payloadTouches(exchange, isCmeFuturesPolicyActive);
316
355
  }
@@ -330,9 +369,9 @@ function isClosedStocksTape(code) {
330
369
  return isStocksTapeGoverned(code) && !STOCKS_TAPE_SCRIPTING_SET.has(code.toUpperCase());
331
370
  }
332
371
  /**
333
- * Whether a payload names a US stocks tape still closed to user scripting: NASDAQ_TAPE (Tape C) until the UTP
334
- * derived-data answer adds it to STOCKS_TAPE_SCRIPTING_VENUES. Every user run is refused there, as on CME; the provenance-blind
335
- * doors (the editor's paused Run) read it beside the CME predicate.
372
+ * Whether a payload names a US stocks tape closed to user scripting: a governed tape STOCKS_TAPE_SCRIPTING_VENUES
373
+ * leaves out (none since Kyle 2026-11-06 opened every tape). Every user run is refused there, as on CME; the
374
+ * provenance-blind doors (the editor's paused Run) read it beside the CME predicate.
336
375
  */
337
376
  export function payloadTouchesClosedStocksTapeVenue(exchange) {
338
377
  return payloadTouches(exchange, isClosedStocksTape);
@@ -363,15 +402,15 @@ export function payloadTouchesGovernedVenue(exchange) {
363
402
  * `opra-user-scripts` flag opened the plane to it (`isOpraReadableKScriptRun`);
364
403
  * a US stocks tape leg blocks a protected user script on a tape open to user
365
404
  * scripting (`isStocksTapeReadableKScriptRun`) and every user run on a tape
366
- * still closed to it (NASDAQ_TAPE). A mixed payload is served only when every
405
+ * left out of STOCKS_TAPE_SCRIPTING_VENUES (none today). A mixed payload is served only when every
367
406
  * plane it touches is open to the run.
368
407
  */
369
408
  export function isUserKScriptBlockedOnExchange(exchange, settings) {
370
409
  if (payloadTouchesCmeVenue(exchange) && !isCmeReadableKScriptRun(settings))
371
410
  return true;
372
411
  // The US stocks tape (Kyle 2026-10-29): user-authored indicators read the tapes STOCKS_TAPE_SCRIPTING_VENUES lists,
373
- // in the browser and on the cloud lane; a tape it leaves out (NASDAQ_TAPE, the UTP derived-data answer pending)
374
- // stays first-party only. A mixed payload is judged per leg (.some): one closed tape refuses it.
412
+ // in the browser and on the cloud lane (every tape since Kyle 2026-11-06); a tape it leaves out would stay
413
+ // first-party only. A mixed payload is judged per leg (.some): one closed tape refuses it.
375
414
  if (payloadTouchesClosedStocksTapeVenue(exchange) && !isFirstPartyKScriptRun(settings))
376
415
  return true;
377
416
  if (payloadTouchesStocksTapeVenue(exchange) && !isStocksTapeReadableKScriptRun(settings))
@@ -379,83 +418,27 @@ export function isUserKScriptBlockedOnExchange(exchange, settings) {
379
418
  return payloadTouchesOpraVenue(exchange) && !isOpraReadableKScriptRun(settings);
380
419
  }
381
420
  /**
382
- * DISPLAY wall: whether a kScript run may mount and render on a governed
383
- * venue at all. Distinct from the DATA wall (isFirstPartyKScriptRun /
384
- * shouldBlockKScriptSourcePayload / buildKScriptDataAccessPolicy): the data
385
- * wall answers "may this code consume governed market data" (a licensing
386
- * boundary keyed on run provenance), while this predicate answers "is this
387
- * indicator approved to appear on a governed chart" (product curation keyed
388
- * on exact identity). A first-party official doc that is missing from the
389
- * CME allow-list legitimately HOLDS governed data access yet must still be
390
- * disabled on governed venues, exactly like a user script: hidden plot,
391
- * standing venue message, no engine, no fetch, no live feed. This predicate
392
- * therefore must never be used to grant or revoke governed DATA access; the
393
- * data-plane guards keep consulting the data wall unchanged.
394
- *
395
- * Verdict: on a governed venue a run is venue-approved only when it is
396
- * first-party AND classifyOfficialScriptForCme recognizes its exact identity
397
- * (registry subType or catalog script id) as 'allowed'. Official Indicator
398
- * packages (isOfficialWrunOverlay) are venue-approved as a CLASS, with no
399
- * per-package list: the 2026-09-30 exemption covers every package of the
400
- * official library, and a package that reads a source the venue does not
401
- * serve answers through the wrun lane's own missing-data states. A PROVEN
402
- * twin of a built-in (builtin-identity.util) draws there only when its
403
- * built-in is proven on CME (CME_PROVEN_TWIN_BUILTIN_KEYS), the only twins
404
- * the add route mounts on a governed venue; a twin of any other built-in
405
- * carried there (an in-place symbol switch, a restore, a paste or copy) is
406
- * blocked. User-provenance
407
- * runs are never venue-approved by the curation, so this is a strict superset
408
- * of isUserKScriptBlockedOnExchange. Fail-closed both ways: an unrecognized
409
- * official blocks, and provenance spoofing via script-input names is already
410
- * neutralized upstream by KSCRIPT_RESERVED_PROVENANCE_KEYS (a spoofed run
411
- * classifies 'user' and is never approved regardless of claimed keys).
421
+ * DISPLAY wall: whether a run may mount and render on a governed venue at all. Every plane judges it by the run's
422
+ * data access alone (the data wall, isUserKScriptBlockedOnExchange): a run that may read a venue's data draws there.
423
+ * Every first-party run is venue-approved on every plane, the built-ins (their wrun twins), the official packages
424
+ * and every other OpenMarket Indicator alike, and a user run draws where its plane's own gate opened that plane to it
425
+ * (CME: `isCmeUserScriptRun`; OPRA: `isOpraUserScriptRun`; the US stocks tape: `isStocksTapeReadableKScriptRun`). A
426
+ * hosted (Cloud) record and a protected script stay blocked on CME and OPRA whatever the gates say.
412
427
  *
413
- * CME user studies: a user run the `cme-user-scripts` gate opened the CME
414
- * plane to (`isCmeUserScriptRun`, the data wall's own per-plane verdict, so
415
- * the two walls read one decision) draws on a CME chart, and the curation
416
- * never applies to it: the official allow-list is CME evidence for
417
- * first-party docs alone, never a list a user run must join. A hosted (Cloud)
418
- * record and a protected script stay blocked on CME whatever the gate says.
428
+ * CME had a per-indicator list of its own until 2026-11-07 (classifyOfficialScriptForCme and the CME twin lists):
429
+ * our own indicators were curated one by one, from the kScript days when the engine broke across CME's session gaps.
430
+ * Since community wrun Indicators draw on CME with no list (the `cme-user-scripts` gate), the list only held back
431
+ * OpenMarket's own (Zig Zag, a proven twin that was never curated), so Kyle retired it (2026-11-07, "fix both"): an
432
+ * indicator that reads a source CME does not serve answers through the wrun lane's own missing-data states, as an
433
+ * official package always has there. The crypto-only NATIVE families stay off CME by their own rule
434
+ * (CME_FUTURES_BLOCKED_INDICATORS, cme-indicator-availability.util): their data does not exist there.
419
435
  *
420
- * OPRA (no CME leg): every first-party run is explicitly venue-approved, the
421
- * built-ins, the converted corpus, the official docs and the official
422
- * packages alike, and every user run is blocked unless the
423
- * `opra-user-scripts` flag opened the plane to it (the data wall's own
424
- * per-plane verdict, so the two walls read one decision,
425
- * `isOpraUserScriptRun`): a hosted (Cloud) record and a protected script stay
426
- * blocked on an OPRA contract chart either way. The CME per-script curation
427
- * is CME evidence and does not apply there; a book-reading official is
428
- * refused by the options mode (OPRA has no book), not by this wall.
429
- *
430
- * The US stocks tape (no CME leg) follows the data wall the same way: every
431
- * first-party run is venue-approved, a user run in the browser or on the cloud
432
- * lane draws on a tape open to user scripting (STOCKS_TAPE_SCRIPTING_VENUES),
433
- * and a protected user script, or any user run on a tape still closed to user
434
- * scripting (NASDAQ_TAPE), is blocked. The CME curation does not apply there either.
436
+ * Kept as its own name for the operational doors (add, mount, teardown, resubscribe, self-heal, suite, layout and
437
+ * copy apply, the boot skips): they ask "may this run draw here", the data-plane guards ask "may this run read here",
438
+ * and today both answer the same. Never grant data access from it.
435
439
  */
436
440
  export function isKScriptDisplayBlockedOnExchange(exchange, settings) {
437
- if (!payloadTouchesGovernedVenue(exchange))
438
- return false;
439
- if (isUserKScriptBlockedOnExchange(exchange, settings))
440
- return true;
441
- if (!payloadTouchesCmeVenue(exchange))
442
- return false;
443
- // Past the data wall a CME leg means a first-party run or a user run the `cme-user-scripts` gate opened the plane
444
- // to. A user run is never curated (the allow-list below is first-party evidence alone): it draws.
445
- if (isCmeUserScriptRun(settings))
446
- return false;
447
- // A first-party run: its curation decides.
448
- const builtin = builtinIdentityOf(settings);
449
- if (builtin?.kind === 'twin')
450
- return !isCmeProvenTwinBuiltIn(builtin.key);
451
- if (isOfficialWrunOverlay(settings))
452
- return false;
453
- return (classifyOfficialScriptForCme({
454
- keys: [
455
- typeof settings?.subType === 'string' ? settings.subType : undefined,
456
- typeof settings?.customScriptId === 'string' ? settings.customScriptId : undefined,
457
- ],
458
- }) !== 'allowed');
441
+ return isUserKScriptBlockedOnExchange(exchange, settings);
459
442
  }
460
443
  /**
461
444
  * Per-payload decision for the titan-charts dataFetch door, evaluated AFTER
@@ -516,6 +499,14 @@ export const KSCRIPT_VENUE_BLOCKED_MARKER = 'kscript_venue_blocked';
516
499
  export function createKScriptVenueBlockedError(exchange) {
517
500
  return new Error(`[kScript] ${KSCRIPT_VENUE_BLOCKED_MARKER}: user scripts cannot access ${exchange} market data`);
518
501
  }
502
+ /** The market a denial's text names: the maker's own sentence above (keep the two in step), or the backend's form. */
503
+ const KSCRIPT_VENUE_BLOCKED_EXCHANGE_RE = /kscript_venue_blocked(?:: user scripts cannot access (\S+) market data| \(exchange=([^,)\s]+))/i;
504
+ /** The market a venue-policy denial walled, read off its text (the error envelope has nothing else), else undefined. */
505
+ export function kscriptVenueBlockedExchangeOf(error) {
506
+ const message = error instanceof Error ? error.message : typeof error === 'string' ? error : '';
507
+ const match = KSCRIPT_VENUE_BLOCKED_EXCHANGE_RE.exec(message);
508
+ return match?.[1] ?? match?.[2];
509
+ }
519
510
  export function isKScriptVenueBlockedError(error) {
520
511
  const message = error instanceof Error ? error.message : typeof error === 'string' ? error : '';
521
512
  return message.toLowerCase().includes(KSCRIPT_VENUE_BLOCKED_MARKER);
@@ -7,27 +7,31 @@
7
7
  *
8
8
  * `venue` is the SERIES being merged (a comparison leg passes its own
9
9
  * exchange and symbol, never the chart's). Precedence:
10
- * 1. calendar (1M 3M 6M 1Y): the CME trade-date months on a CME venue
11
- * (cme-session-bucket.util), else the UTC calendar boundary (the month's
12
- * 1st, quarters and halves from January, January 1; calendar-interval.util),
10
+ * 1. calendar (1M 3M 6M 1Y): the trade-date months on a session-lattice venue
11
+ * (session-lattice.util: the CME family on the Chicago trade calendar, forex
12
+ * on the New York day), else the UTC calendar boundary (the month's 1st,
13
+ * quarters and halves from January, January 1; calendar-interval.util),
13
14
  * never the average-length floor;
14
- * 2. weekly: the CME trade-date week on a CME venue, else `findMonday`;
15
+ * 2. weekly: the trade-date week on a session-lattice venue, else `findMonday`;
15
16
  * 3. chart RTH: above the 30m grid the bucket anchored at the venue's RTH
16
17
  * open (09:30 New York, 09:00 on NYMEX; rth-session.util), at 30m and
17
18
  * finer the UTC floor whose start the RTH window holds (the gateway keeps
18
19
  * a whole bucket by its start, so the 16:00 New York 30m bucket stays);
19
20
  * either only while the product trades by its schedule (no Saturday bars);
20
- * 4. regular-session US equities: the 09:30 anchored bucket from 45m to 12h,
21
- * the three-trade-date group at 3d, at 30m and finer the UTC floor of a
22
- * cash-session bar (`isUsEquityRegularSessionBarMs`);
23
- * 5. a CME venue on the Chicago session lattice (45m to 12h, 1d, 3d:
24
- * cme-session-bucket.util);
21
+ * 4. regular-session US equities (an extended-hours chart too from a day up:
22
+ * `isEquityRegularSessionGated` at the interval): the 09:30 anchored bucket
23
+ * from 45m to 12h, the three-trade-date group at 3d, at 30m and finer the
24
+ * UTC floor of a cash-session bar (`isUsEquityRegularSessionBarMs`);
25
+ * 5. a session-lattice venue on its own lattice (session-lattice.util: the CME
26
+ * family from 2m to 12h, 1d, 3d; forex from 4h up), the profile the
27
+ * gateway rolls that venue up on;
25
28
  * 6. everything else: the UTC floor.
26
29
  * Null means the frame has no bucket (off-session under 3 or 4): the chart
27
30
  * holds no bar there, so drop it. At 30m and finer the session grids share
28
31
  * the UTC floor's lattice, never its bars: a regular-session chart holds none
29
32
  * between its close and its next open.
30
33
  */
34
+ import { type SessionLatticeProfile } from './session-lattice.util.js';
31
35
  export interface LiveBucketVenue {
32
36
  exchange?: unknown;
33
37
  symbol?: unknown;
@@ -45,7 +49,13 @@ export declare function liveBucketVenueOf(metadata: {
45
49
  sessionType?: unknown;
46
50
  transformations?: unknown;
47
51
  } | null | undefined): LiveBucketVenue;
48
- /** Whether the series' history rides the CME session lattice: its formula's timeline legs, else its exchange. */
52
+ /**
53
+ * The session lattice the series' history rides (session-lattice.util, the
54
+ * profile the gateway rolls its venue up on): its formula's timeline legs,
55
+ * else its exchange; null for a venue on the UTC aggregates.
56
+ */
57
+ export declare function sessionLatticeOfVenue(venue: LiveBucketVenue | null | undefined): SessionLatticeProfile | null;
58
+ /** Whether the series' history rides the CME session lattice in particular (`sessionLatticeOfVenue` for the rule). */
49
59
  export declare function isCmeSessionLatticeVenue(venue: LiveBucketVenue | null | undefined): boolean;
50
60
  /**
51
61
  * The plain bar grid: calendar bars start on their UTC calendar boundary,
@@ -53,7 +63,7 @@ export declare function isCmeSessionLatticeVenue(venue: LiveBucketVenue | null |
53
63
  */
54
64
  export declare function plainBucketStartMs(tsMs: number, intervalMs: number): number;
55
65
  /**
56
- * The CME session-lattice bar for a series whose history never anchors to a
66
+ * The session-lattice bar for a series whose history never anchors to a
57
67
  * trading-hours grid of its own (overlays and script sources fetching the
58
68
  * full session), or null off the lattice, where the caller keeps
59
69
  * `plainBucketStartMs`. `venue` is the SERIES' own market (a comparison leg
@@ -61,16 +71,28 @@ export declare function plainBucketStartMs(tsMs: number, intervalMs: number): nu
61
71
  * so these writers never start anchoring to chart RTH or the regular
62
72
  * equities session.
63
73
  */
64
- export declare function cmeSessionLatticeBucketMs(tsMs: number, intervalMs: number, venue: LiveBucketVenue | null | undefined): number | null;
74
+ export declare function venueSessionLatticeBucketMs(tsMs: number, intervalMs: number, venue: LiveBucketVenue | null | undefined): number | null;
75
+ /** `venueSessionLatticeBucketMs` by its earlier name (the kit's host entry and older readers keep it). */
76
+ export declare const cmeSessionLatticeBucketMs: typeof venueSessionLatticeBucketMs;
77
+ /** When the lattice bar stamped `barMs` on the series' own market stops taking rows (`sessionLatticeBarEndMs`); null off its lattice. */
78
+ export declare function venueSessionLatticeBarEndMs(barMs: number, intervalMs: number, venue: LiveBucketVenue | null | undefined): number | null;
79
+ /** When the lattice bar holding `tsMs` on the series' own market opens (`sessionLatticeBarOpenMs`); null off its lattice. */
80
+ export declare function venueSessionLatticeBarOpenMs(tsMs: number, intervalMs: number, venue: LiveBucketVenue | null | undefined): number | null;
65
81
  export declare function liveBucketStartMs(tsMs: number, intervalMs: number, venue?: LiveBucketVenue | null): number | null;
66
82
  /**
67
- * Whether the venue's bars at `intervalMs` are stamped with a LABEL rather than their open: the CME trade-date lattice
68
- * from a day up (a bar labelled 00:00Z of its trade date opens at the 17:00 Chicago open the evening before) and a
69
- * regular-session stock's three-trade-date 3d group (one label over three sessions and the nights between them). A
70
- * bar there does not span [its stamp, the next bar's stamp), so only the bucket function says which bar holds an
71
- * instant (host-bar-placement.util's sweep reads it so).
83
+ * Whether the venue's bars at `intervalMs` are stamped with a LABEL rather than their open: a session-lattice venue's
84
+ * trade-date bars from a day up (a bar labelled 00:00Z of its trade date opens at the session open the evening before:
85
+ * 17:00 Chicago on the CME family, 17:00 New York on forex) and a regular-session stock's three-trade-date 3d group
86
+ * (one label over three sessions and the nights between them). A bar there does not span [its stamp, the next bar's
87
+ * stamp), so only the bucket function says which bar holds an instant (host-bar-placement.util's sweep reads it so).
72
88
  */
73
89
  export declare function liveBucketBarsAreLabels(intervalMs: number, venue?: LiveBucketVenue | null): boolean;
90
+ /**
91
+ * Whether the venue's bars at `intervalMs` open on the UTC interval lattice (the UTC floor, `findMonday`, a session's 30m
92
+ * and finer floor). False on a session lattice, where bars follow the trading calendar: anchored at the session's open
93
+ * (a stock or a chart-RTH product from 45m to 12h, a session-lattice venue) or labels (`liveBucketBarsAreLabels`).
94
+ */
95
+ export declare function liveBucketBarsOnUtcLattice(intervalMs: number, venue?: LiveBucketVenue | null): boolean;
74
96
  /**
75
97
  * The starts of the venue's bars that open inside `[fromMs, toMs]`, ascending, each keyed by
76
98
  * `liveBucketStartMs`: a regular-session stock chart's hourly columns sit on its 13:30Z (EDT) candles,