@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
@@ -17,10 +17,42 @@ export interface IndicatorInflightScheduleOptions {
17
17
  profile?: IndicatorInflightProfile;
18
18
  settleMs?: number;
19
19
  maxDeferMs?: number;
20
+ /**
21
+ * What this ask is for (a wave, a heal, a repair): it follows the runner, so
22
+ * the flight that runner starts reports it as its cover purpose. Defaults to
23
+ * the profile name.
24
+ */
25
+ purpose?: string;
20
26
  }
21
27
  export declare function __setIndicatorInflightClockForTests(fn: (() => number) | null): void;
22
28
  export declare function scheduleIndicatorInflightFetch(chartIndex: number, overlayId: string, range: IndicatorInflightRange, runner: IndicatorInflightRunner, options?: IndicatorInflightScheduleOptions): IndicatorInflightScheduleResult;
23
29
  export declare function hasPendingIndicatorInflight(chartIndex?: number, profile?: IndicatorInflightProfile): boolean;
30
+ /** A flight that covers a window: its own window (ms, half-open like every registry range), purpose and registry key. */
31
+ export interface IndicatorInflightCover {
32
+ fromMs: number;
33
+ toMs: number;
34
+ purpose: string;
35
+ key: string;
36
+ }
37
+ /**
38
+ * The in-flight run of this chart and identity (the overlay id its asks were
39
+ * scheduled under) whose window covers [fromMs, toMs) whole, or null when none
40
+ * does: nothing in flight (only queued, settled or cleared), a partial overlap,
41
+ * another chart or identity, or an empty window. The registry runs one flight
42
+ * per chart and identity and a later ask it covers coalesces onto it, so when
43
+ * several asks cover the window the answer is the earliest scheduled one's
44
+ * flight, named by the purpose of the runner on the wire, never a joiner's.
45
+ * Reads the registry only: no entry, runner or timer changes.
46
+ */
47
+ export declare function findIndicatorInflightCover(chartIndex: number, identityKey: string, fromMs: number, toMs: number): IndicatorInflightCover | null;
48
+ /**
49
+ * Settles when the flight a cover named finishes or its entry is cleared,
50
+ * exactly when an ask that coalesced onto it would; at once when that flight
51
+ * is gone already. Waiting joins nothing: the flight's runner, purpose, profile
52
+ * and queued union stay as they are, so a queued re-arm still runs the runner
53
+ * of the ask that queued it.
54
+ */
55
+ export declare function indicatorInflightCoverSettled(cover: IndicatorInflightCover): Promise<void>;
24
56
  export declare function clearIndicatorInflight(chartIndex: number, overlayId?: string, profile?: IndicatorInflightProfile): void;
25
57
  export declare function clearAllIndicatorInflight(profile?: IndicatorInflightProfile): void;
26
58
  export declare function __getPendingIndicatorInflightCountForTests(profile?: IndicatorInflightProfile): number;
@@ -27,6 +27,13 @@
27
27
  * missing range), and replacing would let the later narrow request shrink a
28
28
  * pending full-span recompute. A covering span is always a valid protected
29
29
  * request — the server computes supersets safely, never subsets.
30
+ *
31
+ * Covers: every flight records what its runner is for (`purpose`, the
32
+ * scheduler's name for it, else the profile name). findIndicatorInflightCover
33
+ * answers whether a flight of a chart and identity already covers a window, so
34
+ * a caller that would otherwise schedule onto it (gap recovery) can wait for it
35
+ * with indicatorInflightCoverSettled instead, without handing the flight its
36
+ * own runner.
30
37
  */
31
38
  import { notifyChartLoadPhaseInputChanged } from './chart-load-phase.util.js';
32
39
  const PROFILE_DEFAULTS = {
@@ -87,6 +94,7 @@ function startEntry(entry) {
87
94
  return;
88
95
  entry.desiredRange = undefined;
89
96
  entry.inFlightRange = cloneRange(range);
97
+ entry.inFlightPurpose = entry.purpose;
90
98
  entry.inFlightDeferred = entry.desiredDeferred;
91
99
  entry.desiredDeferred = undefined;
92
100
  notifyEntryChanged(entry);
@@ -109,6 +117,7 @@ function startEntry(entry) {
109
117
  const completedRange = entry.inFlightRange;
110
118
  entry.inFlightRange = undefined;
111
119
  entry.inFlightDeferred = undefined;
120
+ entry.inFlightPurpose = undefined;
112
121
  const desiredRange = entry.desiredRange;
113
122
  if (completedRange && desiredRange && !containsRange(completedRange, desiredRange)) {
114
123
  completedDeferred?.resolve();
@@ -136,6 +145,7 @@ export function scheduleIndicatorInflightFetch(chartIndex, overlayId, range, run
136
145
  return { key, status: 'ignored-invalid', range: normalizedRange, completion: Promise.resolve() };
137
146
  }
138
147
  const profile = options.profile ?? 'protected';
148
+ const purpose = options.purpose ?? profile;
139
149
  const defaults = PROFILE_DEFAULTS[profile];
140
150
  const settleMs = Math.max(0, options.settleMs ?? defaults.settleMs);
141
151
  const maxDeferMs = Math.max(settleMs, options.maxDeferMs ?? defaults.maxDeferMs);
@@ -147,6 +157,7 @@ export function scheduleIndicatorInflightFetch(chartIndex, overlayId, range, run
147
157
  chartIndex,
148
158
  overlayId,
149
159
  profile,
160
+ purpose,
150
161
  desiredRange: normalizedRange,
151
162
  runner,
152
163
  timer: null,
@@ -159,6 +170,7 @@ export function scheduleIndicatorInflightFetch(chartIndex, overlayId, range, run
159
170
  else {
160
171
  entry.runner = runner;
161
172
  entry.profile = profile;
173
+ entry.purpose = purpose;
162
174
  entry.settleMs = settleMs;
163
175
  entry.maxDeferMs = maxDeferMs;
164
176
  }
@@ -208,6 +220,46 @@ export function hasPendingIndicatorInflight(chartIndex, profile) {
208
220
  }
209
221
  return false;
210
222
  }
223
+ /**
224
+ * The in-flight run of this chart and identity (the overlay id its asks were
225
+ * scheduled under) whose window covers [fromMs, toMs) whole, or null when none
226
+ * does: nothing in flight (only queued, settled or cleared), a partial overlap,
227
+ * another chart or identity, or an empty window. The registry runs one flight
228
+ * per chart and identity and a later ask it covers coalesces onto it, so when
229
+ * several asks cover the window the answer is the earliest scheduled one's
230
+ * flight, named by the purpose of the runner on the wire, never a joiner's.
231
+ * Reads the registry only: no entry, runner or timer changes.
232
+ */
233
+ export function findIndicatorInflightCover(chartIndex, identityKey, fromMs, toMs) {
234
+ const wanted = { startMs: fromMs, endMs: toMs };
235
+ if (!isValidRange(wanted))
236
+ return null;
237
+ const entry = entriesByKey.get(indicatorInflightKey(chartIndex, identityKey));
238
+ const inFlight = entry?.inFlightRange;
239
+ if (!entry || !inFlight || !containsRange(inFlight, wanted))
240
+ return null;
241
+ return {
242
+ fromMs: inFlight.startMs,
243
+ toMs: inFlight.endMs,
244
+ purpose: entry.inFlightPurpose ?? entry.profile,
245
+ key: entry.key,
246
+ };
247
+ }
248
+ /**
249
+ * Settles when the flight a cover named finishes or its entry is cleared,
250
+ * exactly when an ask that coalesced onto it would; at once when that flight
251
+ * is gone already. Waiting joins nothing: the flight's runner, purpose, profile
252
+ * and queued union stay as they are, so a queued re-arm still runs the runner
253
+ * of the ask that queued it.
254
+ */
255
+ export function indicatorInflightCoverSettled(cover) {
256
+ const entry = entriesByKey.get(cover.key);
257
+ const inFlight = entry?.inFlightRange;
258
+ if (!entry || !inFlight || inFlight.startMs !== cover.fromMs || inFlight.endMs !== cover.toMs) {
259
+ return Promise.resolve();
260
+ }
261
+ return (entry.inFlightDeferred ??= createDeferred()).promise;
262
+ }
211
263
  export function clearIndicatorInflight(chartIndex, overlayId, profile) {
212
264
  const notifyChartIndexes = new Set();
213
265
  for (const [key, entry] of entriesByKey) {
@@ -1,4 +1,5 @@
1
1
  import type { BuiltinInputReader } from '../../constants/scriptEditor/builtin-script-snippets.js';
2
+ import { type SessionLatticeId } from './session-lattice.util.js';
2
3
  /**
3
4
  * Built-ins whose `timeframe` input runs the engine at that interval: every built-in template with
4
5
  * the input, the 14 classics (P2, 2026-10-03) and the 14 TradingView staples (2026-10-04), each
@@ -49,9 +50,14 @@ export interface OverlayRunInterval {
49
50
  * results. Absent everywhere else.
50
51
  */
51
52
  sessionLattice?: boolean;
53
+ /**
54
+ * Which session lattice (session-lattice.util `SessionLatticeId`: 'cme', 'forex') beside
55
+ * `sessionLattice`; a stamped run without one is a CME run from before the forex lattice.
56
+ */
57
+ sessionLatticeId?: SessionLatticeId;
52
58
  }
53
- /** What a run bar's span reads: the run interval and whether its bars ride the CME session lattice. */
54
- export type RunBarCalendar = Pick<OverlayRunInterval, 'intervalMs' | 'sessionLattice'>;
59
+ /** What a run bar's span reads: the run interval and whether (and which) session lattice its bars ride. */
60
+ export type RunBarCalendar = Pick<OverlayRunInterval, 'intervalMs' | 'sessionLattice' | 'sessionLatticeId'>;
55
61
  /** A run bar's span: it takes trades from `open` until `close`. */
56
62
  export interface RunBarSpan {
57
63
  open: number;
@@ -121,10 +127,10 @@ export declare function engineSettingsForRunInterval<T extends object>(settings:
121
127
  * live; on the lattice from its session open, before a 1D or 1W stamp). Chart bars before the first
122
128
  * shown row get NaN cells. Run rows before the first chart bar (the warm-up) are dropped.
123
129
  */
124
- export declare function projectRunRowsOntoChart(rows: readonly (readonly unknown[] | null | undefined)[], chartTimes: readonly number[], runMs: number, waitForClose: boolean, sessionLattice?: boolean): unknown[][];
130
+ export declare function projectRunRowsOntoChart(rows: readonly (readonly unknown[] | null | undefined)[], chartTimes: readonly number[], runMs: number, waitForClose: boolean, sessionLattice?: boolean, sessionLatticeId?: SessionLatticeId): unknown[][];
125
131
  /**
126
132
  * The chart time a run-bar time anchor (a drawing point at a run bar's stamp) lands on: where that
127
133
  * bar's value first shows (its close with wait for close on, its open with it off, read by
128
134
  * runBarSpan), clamped to the chart's loaded bars.
129
135
  */
130
- export declare function projectRunTimeOntoChart(runTime: number, chartTimes: readonly number[], runMs: number, waitForClose: boolean, sessionLattice?: boolean): number;
136
+ export declare function projectRunTimeOntoChart(runTime: number, chartTimes: readonly number[], runMs: number, waitForClose: boolean, sessionLattice?: boolean, sessionLatticeId?: SessionLatticeId): number;
@@ -12,7 +12,7 @@
12
12
  * template path until replay can serve run-interval candles clipped at the replay cursor.
13
13
  */
14
14
  import { Intervals } from '../../constants/interval.constants.js';
15
- import { cmeSessionBarEndMs, cmeSessionBarOpenMs, cmeSessionBucketMs } from './cme-session-bucket.util.js';
15
+ import { CME_SESSION_LATTICE, sessionLatticeBarEndMs, sessionLatticeBarOpenMs, sessionLatticeBucketMs, sessionLatticeById, } from './session-lattice.util.js';
16
16
  /**
17
17
  * Built-ins whose `timeframe` input runs the engine at that interval: every built-in template with
18
18
  * the input, the 14 classics (P2, 2026-10-03) and the 14 TradingView staples (2026-10-04), each
@@ -107,6 +107,12 @@ const TIMEFRAME_INTERVALS = {
107
107
  '1D': '1d',
108
108
  '1W': '1w',
109
109
  };
110
+ /** The lattice a run's bars ride, null off every lattice; a stamped run without an id is a CME run. */
111
+ function runLattice(run) {
112
+ if (!run.sessionLattice)
113
+ return null;
114
+ return sessionLatticeById(run.sessionLatticeId) ?? CME_SESSION_LATTICE;
115
+ }
110
116
  /**
111
117
  * The [open, close) of the run bar stamped `stamp`: `[stamp, stamp + intervalMs)`, or on the CME
112
118
  * session lattice its session bar's (cmeSessionBarOpenMs, cmeSessionBarEndMs: a 1D bar stamped at
@@ -115,14 +121,16 @@ const TIMEFRAME_INTERVALS = {
115
121
  * that is no run bar's) reads the plain span.
116
122
  */
117
123
  export function runBarSpan(stamp, run) {
118
- const close = run.sessionLattice ? cmeSessionBarEndMs(stamp, run.intervalMs) : null;
119
- if (close === null)
124
+ const lattice = runLattice(run);
125
+ const close = lattice ? sessionLatticeBarEndMs(lattice, stamp, run.intervalMs) : null;
126
+ if (close === null || lattice === null)
120
127
  return { open: stamp, close: stamp + run.intervalMs };
121
- return { open: cmeSessionBarOpenMs(stamp, run.intervalMs) ?? stamp, close };
128
+ return { open: sessionLatticeBarOpenMs(lattice, stamp, run.intervalMs) ?? stamp, close };
122
129
  }
123
130
  /** runBarSpan's close alone, for a loop over many bars that never reads the session open (uncached). */
124
131
  function runBarCloseMs(stamp, run) {
125
- return (run.sessionLattice ? cmeSessionBarEndMs(stamp, run.intervalMs) : null) ?? stamp + run.intervalMs;
132
+ const lattice = runLattice(run);
133
+ return (lattice ? sessionLatticeBarEndMs(lattice, stamp, run.intervalMs) : null) ?? stamp + run.intervalMs;
126
134
  }
127
135
  /** The first index whose time is at or after `time` (times ascending); times.length when none. */
128
136
  function firstIndexAtOrAfter(times, time) {
@@ -146,14 +154,15 @@ function firstIndexAtOrAfter(times, time) {
146
154
  * bar's open, a regular-hours one included). Infinity when no chart bar reaches that close.
147
155
  */
148
156
  export function nextRunBarCloseMs(stamp, chartTimes, run) {
149
- if (!run.sessionLattice)
157
+ const lattice = runLattice(run);
158
+ if (lattice === null)
150
159
  return stamp + 2 * run.intervalMs;
151
- const sessionClose = cmeSessionBarEndMs(stamp, run.intervalMs);
160
+ const sessionClose = sessionLatticeBarEndMs(lattice, stamp, run.intervalMs);
152
161
  const at = firstIndexAtOrAfter(chartTimes, sessionClose ?? stamp + run.intervalMs);
153
162
  if (at === chartTimes.length)
154
163
  return Number.POSITIVE_INFINITY;
155
164
  const first = chartTimes[at];
156
- const next = sessionClose === null ? first : (cmeSessionBucketMs(first, run.intervalMs) ?? first);
165
+ const next = sessionClose === null ? first : (sessionLatticeBucketMs(lattice, first, run.intervalMs) ?? first);
157
166
  return runBarCloseMs(next, run);
158
167
  }
159
168
  function intervalMsOf(interval) {
@@ -218,8 +227,8 @@ export function engineSettingsForRunInterval(settings) {
218
227
  * live; on the lattice from its session open, before a 1D or 1W stamp). Chart bars before the first
219
228
  * shown row get NaN cells. Run rows before the first chart bar (the warm-up) are dropped.
220
229
  */
221
- export function projectRunRowsOntoChart(rows, chartTimes, runMs, waitForClose, sessionLattice = false) {
222
- const run = { intervalMs: runMs, sessionLattice };
230
+ export function projectRunRowsOntoChart(rows, chartTimes, runMs, waitForClose, sessionLattice = false, sessionLatticeId) {
231
+ const run = { intervalMs: runMs, sessionLattice, sessionLatticeId };
223
232
  const usable = rows.filter((row) => Array.isArray(row) && Number.isFinite(Number(row[0])));
224
233
  const width = usable.reduce((max, row) => Math.max(max, row.length), 1);
225
234
  const emptyCells = new Array(width - 1).fill(NaN);
@@ -244,10 +253,10 @@ export function projectRunRowsOntoChart(rows, chartTimes, runMs, waitForClose, s
244
253
  * bar's value first shows (its close with wait for close on, its open with it off, read by
245
254
  * runBarSpan), clamped to the chart's loaded bars.
246
255
  */
247
- export function projectRunTimeOntoChart(runTime, chartTimes, runMs, waitForClose, sessionLattice = false) {
256
+ export function projectRunTimeOntoChart(runTime, chartTimes, runMs, waitForClose, sessionLattice = false, sessionLatticeId) {
248
257
  if (chartTimes.length === 0)
249
258
  return runTime;
250
- const span = runBarSpan(runTime, { intervalMs: runMs, sessionLattice });
259
+ const span = runBarSpan(runTime, { intervalMs: runMs, sessionLattice, sessionLatticeId });
251
260
  const target = waitForClose ? span.close : span.open;
252
261
  const first = chartTimes[0];
253
262
  const last = chartTimes[chartTimes.length - 1];
@@ -9,7 +9,7 @@
9
9
  * label, with no sentinel. An unmapped label falls back to MINUTE
10
10
  * (`grpcIntervalOf`), so a label missing here would paint 1m candles.
11
11
  */
12
- import { AggregationInterval } from '@orangecharts/orange-v2-pb-common';
12
+ import { AggregationInterval } from '../v2/v2-enums.leaf.js';
13
13
  export { CUSTOM_INTERVALS, EXTENDED_INTERVALS, intervalLabelForMs, intervalMs, isCustomInterval, isExtendedInterval, standardIntervalAtOrBelow, standardIntervalMsAtOrBelow, type CustomInterval, type ExtendedInterval, } from './interval-ladder.util.js';
14
14
  /** The wire interval for a standard or custom label, `undefined` for anything else. */
15
15
  export declare function lookupGrpcInterval(label: unknown): AggregationInterval | undefined;
@@ -9,7 +9,7 @@
9
9
  * label, with no sentinel. An unmapped label falls back to MINUTE
10
10
  * (`grpcIntervalOf`), so a label missing here would paint 1m candles.
11
11
  */
12
- import { AggregationInterval } from '@orangecharts/orange-v2-pb-common';
12
+ import { AggregationInterval } from '../v2/v2-enums.leaf.js';
13
13
  import { intervalMs } from './interval-ladder.util.js';
14
14
  // The label half (the labels, their lengths and the tuning ladder) is the pure leaf's (interval-ladder.util); its
15
15
  // importers keep this path.
@@ -67,6 +67,18 @@ export declare function kScriptLegendSlotIds(): string[];
67
67
  export declare function kScriptLegendSlotCells(): Array<KScriptLegendEntry & {
68
68
  isStatic: false;
69
69
  }>;
70
+ /**
71
+ * A plot that answers no hover card (`hover_card: false` on its run output: a
72
+ * wrun output its sheet keeps off the card, or a mount the adapter knows paints
73
+ * no ink, such as a transparent fill side or an opacity-0 output). It is still
74
+ * drawn, listed and read: only the hover surfaces skip it (the series hover
75
+ * walks past it to the next nearest line, the legend value answers no card),
76
+ * never kScriptLegendLines, whose `includeUnlisted` set also feeds the readers
77
+ * of other outputs' values. The engine never emits the field. Titan does not
78
+ * copy it onto the nested meta, so the run output the meta was mounted from is
79
+ * read too, like optsOutOfLegend.
80
+ */
81
+ export declare function optsOutOfHover(meta: unknown, nested: Record<string, unknown>): boolean;
70
82
  /**
71
83
  * The nested outputs that earn a legend slot, in declaration order, capped at
72
84
  * the pool size. `includeUnlisted` also returns the drawn value plots a run
@@ -131,6 +131,22 @@ function isLegendValuePlot(nested) {
131
131
  function optsOutOfLegend(meta, nested) {
132
132
  return nested.legend === false || kScriptRunOutputFor(meta, nested)?.legend === false;
133
133
  }
134
+ /**
135
+ * A plot that answers no hover card (`hover_card: false` on its run output: a
136
+ * wrun output its sheet keeps off the card, or a mount the adapter knows paints
137
+ * no ink, such as a transparent fill side or an opacity-0 output). It is still
138
+ * drawn, listed and read: only the hover surfaces skip it (the series hover
139
+ * walks past it to the next nearest line, the legend value answers no card),
140
+ * never kScriptLegendLines, whose `includeUnlisted` set also feeds the readers
141
+ * of other outputs' values. The engine never emits the field. Titan does not
142
+ * copy it onto the nested meta, so the run output the meta was mounted from is
143
+ * read too, like optsOutOfLegend.
144
+ */
145
+ export function optsOutOfHover(meta, nested) {
146
+ if (nested.hover_card === false)
147
+ return true;
148
+ return isRecord(meta) && kScriptRunOutputFor(meta, nested)?.hover_card === false;
149
+ }
134
150
  /**
135
151
  * The nested outputs that earn a legend slot, in declaration order, capped at
136
152
  * the pool size. `includeUnlisted` also returns the drawn value plots a run
@@ -33,7 +33,7 @@
33
33
  */
34
34
  import { type OverlayRunInterval } from './indicator-run-interval.util.js';
35
35
  /** What the projection reads of a run's stamp. */
36
- type ProjectionRunInterval = Pick<OverlayRunInterval, 'intervalMs' | 'waitForClose' | 'sessionLattice'>;
36
+ type ProjectionRunInterval = Pick<OverlayRunInterval, 'intervalMs' | 'waitForClose' | 'sessionLattice' | 'sessionLatticeId'>;
37
37
  /**
38
38
  * The run result of an overlay whose engine ran at `runInterval`, projected onto the chart bars at
39
39
  * `chartTimes` (ascending open times). Returns `runResult` itself when it carries nothing on a time
@@ -183,7 +183,7 @@ function buildProjection(timeline, chartTimes, run, aheadFrom) {
183
183
  // last bar. Behind the chart (a windowed replay, a run that has not seen the new bucket yet) it is
184
184
  // a closed bar like every other.
185
185
  const showsForming = !waitForClose && lastChartTime >= newestSpan.open && lastChartTime < newestSpan.close;
186
- const shownRows = projectRunRowsOntoChart(timeline.map((time, index) => [time, index]), chartTimes, runMs, !showsForming, lattice);
186
+ const shownRows = projectRunRowsOntoChart(timeline.map((time, index) => [time, index]), chartTimes, runMs, !showsForming, lattice, run.sessionLatticeId);
187
187
  // From here on a chart bar shows the run bar after the newest one, which this result does not carry
188
188
  // (on the session lattice the first one past a gap: a weekend or a holiday holds none).
189
189
  const coverageEnd = nextRunBarCloseMs(newest, chartTimes, run);
@@ -208,7 +208,9 @@ function buildProjection(timeline, chartTimes, run, aheadFrom) {
208
208
  // leaves those times as they are.
209
209
  const shiftsAhead = waitForClose && lastChartTime >= newestSpan.close;
210
210
  const aheadAt = (time) => (shiftsAhead ? runBarSpan(time, run).close : time);
211
- const anchor = (time) => time > newest ? aheadAt(time) : projectRunTimeOntoChart(time, chartTimes, runMs, waitsForClose(time), lattice);
211
+ const anchor = (time) => time > newest
212
+ ? aheadAt(time)
213
+ : projectRunTimeOntoChart(time, chartTimes, runMs, waitsForClose(time), lattice, run.sessionLatticeId);
212
214
  // projectRunTimeOntoChart's target: the run bar's close (its open while it forms, wait for close off).
213
215
  const shownAt = (time) => {
214
216
  if (time > newest)
@@ -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.
@@ -91,6 +91,13 @@ export interface KScriptProvenanceSettingsLike {
91
91
  * and stays walled on governed venues until its scope joins
92
92
  * WRUN_OFFICIAL_SCOPES (fail closed).
93
93
  *
94
+ * An app layer (wrun-app-layer.leaf: `wrunDraftRef.appLayer`) is the one
95
+ * draft-lane run that qualifies: the app mounts it for one of its own panels
96
+ * from the kit template its pinned kit ships under the official package the
97
+ * table names, so the code that runs is the app's own; no user run can name
98
+ * one (the draft mount builds its ref from fixed fields, and no persisted
99
+ * record ever carries a draft in).
100
+ *
94
101
  * Fail closed on every other shape: an editor draft (`wrunDraftRef`, or a
95
102
  * `wrun-draft-*` id) and a temp editor run are never packages, whatever rides
96
103
  * beside them; EVERY package identity the record carries (the browser lane's
@@ -175,8 +182,10 @@ export declare function isCmeUserScriptCandidate(settings: KScriptProvenanceSett
175
182
  */
176
183
  export declare function isCmeUserScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
177
184
  /** Whether a run may consume the CME plane's data: every first-party run, and a user run the `cme-user-scripts` gate
178
- * opened it to (`isCmeUserScriptRun`). */
185
+ * opened it to (`isCmeUserScriptRun`; `mayReadCmePin`, the one decision a wrun run's CME pins read too). */
179
186
  export declare function isCmeReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
187
+ /** A CME chart study: a user run the gate opened the CME plane to, on a CME chart (the run head's `cmeStudyChain`). */
188
+ export declare function isCmeChartStudyRun(settings: KScriptProvenanceSettingsLike | null | undefined, chartExchange: unknown): boolean;
180
189
  /** The words a door shows a user run the CME wall refuses (web locale keys, `cmeUserScriptWallKey`), and the
181
190
  * lifecycle's words for a study a closing gate stopped in place, its source kept (`CME_STUDY_STOPPED_KEY`: the
182
191
  * viewer's access moved; `CME_STUDIES_OFF_KEY`: the flag went dark). */
@@ -192,12 +201,27 @@ export type CmeUserScriptWallKey = typeof CME_USER_SCRIPT_WALL_KEY | typeof CME_
192
201
  * (`CME_USER_SCRIPT_WALL_KEY`): the feature does not exist for that viewer, so no door names a browser lane it cannot
193
202
  * offer. Under a lit flag a hosted (Cloud) record or a protected script has no CME path (`CME_CLOUD_WALL_KEY`: CME chart
194
203
  * studies run in the browser), and a run the browser executes is refused only for the viewer's
195
- * entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never this wall's (the doors
196
- * word the curation themselves) and reads today's words. Words only: whether the door opens is the walls' decision
204
+ * entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never refused on CME and reads
205
+ * today's words. Words only: whether the door opens is the walls' decision
197
206
  * (`isKScriptDisplayBlockedOnExchange`, `isCmeReadableKScriptRun`).
198
207
  */
199
208
  export declare function cmeUserScriptWallKey(settings: KScriptProvenanceSettingsLike | null | undefined): CmeUserScriptWallKey;
200
- /** Whether a source exchange touches a CME-governed venue (the CME-only curation and copy). */
209
+ /** The words of a CME pin a closed gate refuses (wrun-refusal.util `pin-refused`): the flag dark (`default`), the
210
+ * viewer's CME data terms (`terms`), a server lane (`cloud`). */
211
+ export type CmePinRefusalVariant = 'default' | 'terms' | 'cloud';
212
+ /** `cmeUserScriptWallKey`'s lane rule in the pin row's words: derived from it, so the two never drift. */
213
+ export declare function cmePinRefusalVariant(settings: KScriptProvenanceSettingsLike | null | undefined): CmePinRefusalVariant;
214
+ /** The words a door shows a user run a US stocks tape refuses (web locale key; `{venue}` names the tape's venue). */
215
+ export declare const STOCKS_USER_SCRIPT_WALL_KEY = "indicators.stocks.userScriptNotSupported";
216
+ /** A door's words for a venue wall: a web locale key and the params it reads. */
217
+ export interface VenueWallWords {
218
+ key: string;
219
+ params: Readonly<Record<string, string>>;
220
+ }
221
+ /** The ONE choice of a door's words for a user run a wall refused, by the walled market's plane (words only, never
222
+ * whether): a venue no plane governs, which no wall refuses, keeps the CME words every door showed before. */
223
+ export declare function venueWallWords(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): VenueWallWords;
224
+ /** Whether a source exchange touches a CME-governed venue (the CME plane's gate and its words). */
201
225
  export declare function payloadTouchesCmeVenue(exchange: unknown): boolean;
202
226
  /** Whether a source exchange touches the OPRA options plane (an explicit OPRA leg on any chart included). */
203
227
  export declare function payloadTouchesOpraVenue(exchange: unknown): boolean;
@@ -205,9 +229,9 @@ export declare function payloadTouchesOpraVenue(exchange: unknown): boolean;
205
229
  * a listing venue's plain code, NASDAQ, is the free lane and never one). */
206
230
  export declare function payloadTouchesStocksTapeVenue(exchange: unknown): boolean;
207
231
  /**
208
- * Whether a payload names a US stocks tape still closed to user scripting: NASDAQ_TAPE (Tape C) until the UTP
209
- * derived-data answer adds it to STOCKS_TAPE_SCRIPTING_VENUES. Every user run is refused there, as on CME; the provenance-blind
210
- * doors (the editor's paused Run) read it beside the CME predicate.
232
+ * Whether a payload names a US stocks tape closed to user scripting: a governed tape STOCKS_TAPE_SCRIPTING_VENUES
233
+ * leaves out (none since Kyle 2026-11-06 opened every tape). Every user run is refused there, as on CME; the
234
+ * provenance-blind doors (the editor's paused Run) read it beside the CME predicate.
211
235
  */
212
236
  export declare function payloadTouchesClosedStocksTapeVenue(exchange: unknown): boolean;
213
237
  /**
@@ -234,64 +258,29 @@ export declare function payloadTouchesGovernedVenue(exchange: unknown): boolean;
234
258
  * `opra-user-scripts` flag opened the plane to it (`isOpraReadableKScriptRun`);
235
259
  * a US stocks tape leg blocks a protected user script on a tape open to user
236
260
  * scripting (`isStocksTapeReadableKScriptRun`) and every user run on a tape
237
- * still closed to it (NASDAQ_TAPE). A mixed payload is served only when every
261
+ * left out of STOCKS_TAPE_SCRIPTING_VENUES (none today). A mixed payload is served only when every
238
262
  * plane it touches is open to the run.
239
263
  */
240
264
  export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
241
265
  /**
242
- * DISPLAY wall: whether a kScript run may mount and render on a governed
243
- * venue at all. Distinct from the DATA wall (isFirstPartyKScriptRun /
244
- * shouldBlockKScriptSourcePayload / buildKScriptDataAccessPolicy): the data
245
- * wall answers "may this code consume governed market data" (a licensing
246
- * boundary keyed on run provenance), while this predicate answers "is this
247
- * indicator approved to appear on a governed chart" (product curation keyed
248
- * on exact identity). A first-party official doc that is missing from the
249
- * CME allow-list legitimately HOLDS governed data access yet must still be
250
- * disabled on governed venues, exactly like a user script: hidden plot,
251
- * standing venue message, no engine, no fetch, no live feed. This predicate
252
- * therefore must never be used to grant or revoke governed DATA access; the
253
- * data-plane guards keep consulting the data wall unchanged.
254
- *
255
- * Verdict: on a governed venue a run is venue-approved only when it is
256
- * first-party AND classifyOfficialScriptForCme recognizes its exact identity
257
- * (registry subType or catalog script id) as 'allowed'. Official Indicator
258
- * packages (isOfficialWrunOverlay) are venue-approved as a CLASS, with no
259
- * per-package list: the 2026-09-30 exemption covers every package of the
260
- * official library, and a package that reads a source the venue does not
261
- * serve answers through the wrun lane's own missing-data states. A PROVEN
262
- * twin of a built-in (builtin-identity.util) draws there only when its
263
- * built-in is proven on CME (CME_PROVEN_TWIN_BUILTIN_KEYS), the only twins
264
- * the add route mounts on a governed venue; a twin of any other built-in
265
- * carried there (an in-place symbol switch, a restore, a paste or copy) is
266
- * blocked. User-provenance
267
- * runs are never venue-approved by the curation, so this is a strict superset
268
- * of isUserKScriptBlockedOnExchange. Fail-closed both ways: an unrecognized
269
- * official blocks, and provenance spoofing via script-input names is already
270
- * neutralized upstream by KSCRIPT_RESERVED_PROVENANCE_KEYS (a spoofed run
271
- * classifies 'user' and is never approved regardless of claimed keys).
272
- *
273
- * CME user studies: a user run the `cme-user-scripts` gate opened the CME
274
- * plane to (`isCmeUserScriptRun`, the data wall's own per-plane verdict, so
275
- * the two walls read one decision) draws on a CME chart, and the curation
276
- * never applies to it: the official allow-list is CME evidence for
277
- * first-party docs alone, never a list a user run must join. A hosted (Cloud)
278
- * record and a protected script stay blocked on CME whatever the gate says.
266
+ * DISPLAY wall: whether a run may mount and render on a governed venue at all. Every plane judges it by the run's
267
+ * data access alone (the data wall, isUserKScriptBlockedOnExchange): a run that may read a venue's data draws there.
268
+ * Every first-party run is venue-approved on every plane, the built-ins (their wrun twins), the official packages
269
+ * and every other OpenMarket Indicator alike, and a user run draws where its plane's own gate opened that plane to it
270
+ * (CME: `isCmeUserScriptRun`; OPRA: `isOpraUserScriptRun`; the US stocks tape: `isStocksTapeReadableKScriptRun`). A
271
+ * hosted (Cloud) record and a protected script stay blocked on CME and OPRA whatever the gates say.
279
272
  *
280
- * OPRA (no CME leg): every first-party run is explicitly venue-approved, the
281
- * built-ins, the converted corpus, the official docs and the official
282
- * packages alike, and every user run is blocked unless the
283
- * `opra-user-scripts` flag opened the plane to it (the data wall's own
284
- * per-plane verdict, so the two walls read one decision,
285
- * `isOpraUserScriptRun`): a hosted (Cloud) record and a protected script stay
286
- * blocked on an OPRA contract chart either way. The CME per-script curation
287
- * is CME evidence and does not apply there; a book-reading official is
288
- * refused by the options mode (OPRA has no book), not by this wall.
273
+ * CME had a per-indicator list of its own until 2026-11-07 (classifyOfficialScriptForCme and the CME twin lists):
274
+ * our own indicators were curated one by one, from the kScript days when the engine broke across CME's session gaps.
275
+ * Since community wrun Indicators draw on CME with no list (the `cme-user-scripts` gate), the list only held back
276
+ * OpenMarket's own (Zig Zag, a proven twin that was never curated), so Kyle retired it (2026-11-07, "fix both"): an
277
+ * indicator that reads a source CME does not serve answers through the wrun lane's own missing-data states, as an
278
+ * official package always has there. The crypto-only NATIVE families stay off CME by their own rule
279
+ * (CME_FUTURES_BLOCKED_INDICATORS, cme-indicator-availability.util): their data does not exist there.
289
280
  *
290
- * The US stocks tape (no CME leg) follows the data wall the same way: every
291
- * first-party run is venue-approved, a user run in the browser or on the cloud
292
- * lane draws on a tape open to user scripting (STOCKS_TAPE_SCRIPTING_VENUES),
293
- * and a protected user script, or any user run on a tape still closed to user
294
- * scripting (NASDAQ_TAPE), is blocked. The CME curation does not apply there either.
281
+ * Kept as its own name for the operational doors (add, mount, teardown, resubscribe, self-heal, suite, layout and
282
+ * copy apply, the boot skips): they ask "may this run draw here", the data-plane guards ask "may this run read here",
283
+ * and today both answer the same. Never grant data access from it.
295
284
  */
296
285
  export declare function isKScriptDisplayBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
297
286
  /**
@@ -334,4 +323,6 @@ export declare function buildKScriptDataAccessPolicy(settings: KScriptProvenance
334
323
  */
335
324
  export declare const KSCRIPT_VENUE_BLOCKED_MARKER = "kscript_venue_blocked";
336
325
  export declare function createKScriptVenueBlockedError(exchange: string): Error;
326
+ /** The market a venue-policy denial walled, read off its text (the error envelope has nothing else), else undefined. */
327
+ export declare function kscriptVenueBlockedExchangeOf(error: unknown): string | undefined;
337
328
  export declare function isKScriptVenueBlockedError(error: unknown): boolean;