@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
@@ -337,11 +337,11 @@ export declare function wrunFrameRefusalMemory(text: string): 'window' | 'identi
337
337
  * (wrun-shared-host.ts) and the answer table above answers synchronously, in the socket worker too (this
338
338
  * leaf imports nothing; wrun-refusal.util re-exports it); tests/utility/wrun/wrun-refusal.cloud.spec.ts
339
339
  * holds it to the installed kit's table code by code, so a kit bump that adds or moves a code fails there
340
- * by name.
340
+ * by name; wrun-kit-refusal-stages.types.ts fails the typecheck on a kit code this lacks.
341
341
  */
342
342
  export declare const WRUN_KIT_REFUSAL_STAGES: {
343
- readonly validate: readonly ["wrun_abi_unsupported", "wrun_pin_venue_unknown", "wrun_sheet_over_cap", "wrun_abi_channel_missing", "wrun_intrabar_interval_required", "wrun_intrabar_primary", "wrun_candles_interval_required", "wrun_candles_primary", "wrun_options_chain_venue", "wrun_options_chain_expiries", "wrun_options_chain_market_pinned", "wrun_offset_needs_view", "wrun_offset_count_required", "wrun_bars_needs_leg", "wrun_chart_interval_below_needs_candles", "wrun_chart_interval_below_primary", "wrun_chart_interval_below_forming", "wrun_pin_venue_refused", "wrun_pin_symbol_literal", "wrun_tape_history_unavailable", "wrun_strategy_feed_not_ohlcv", "wrun_strategy_slippage_model_unsupported", "wrun_strategy_reserved_output", "wrun_tape_min_size_invalid", "wrun_tape_min_value_invalid", "wrun_tape_floor_invalid", "wrun_option_knob_invalid", "wrun_option_market_pinned", "wrun_option_prints_min_premium_required", "wrun_option_prints_tail_largest", "wrun_cell_capacity_invalid", "wrun_options_flow_venue_field", "wrun_options_flow_venue_required", "wrun_options_flow_venue_scope", "wrun_oi_candles_interval_required", "wrun_oi_candles_primary", "wrun_volume_profile_candles_interval_required", "wrun_volume_profile_candles_primary"];
344
- readonly plan: readonly ["wrun_options_coin_unknown", "wrun_source_unsupported", "wrun_not_in_10m_universe", "wrun_opra_lane_refused", "wrun_opra_official_only", "wrun_option_contract_flow_unsupported", "wrun_option_contract_state_unsupported", "wrun_option_daily_unsupported", "wrun_option_prints_one_acquisition", "wrun_option_prints_unsupported", "wrun_option_prints_v2_unsupported", "wrun_option_stats_10m_unsupported", "wrun_option_strike_flow_unsupported", "wrun_option_surface_unsupported", "wrun_option_views_unserved", "wrun_options_flow_unsupported", "wrun_field_unsupported", "wrun_tenor_unsupported", "wrun_view_unsupported", "wrun_family_unsupported", "wrun_displacement_needs_cap", "wrun_options_chain_venue_unavailable", "wrun_options_chain_unavailable", "wrun_options_chain_one_venue", "wrun_lane_input_refused", "wrun_permission_denied", "wrun_coin_leg_unsupported", "wrun_coin_leg_unresolved", "wrun_pin_unsupported", "wrun_custom_interval_unsupported", "wrun_intrabar_leg_off_grid", "wrun_intrabar_ratio_over_cap", "wrun_intrabar_unsupported", "wrun_candles_bars_over_cap", "wrun_candles_ratio_over_cap", "wrun_oi_candles_unsupported", "wrun_volume_profile_candles_unsupported", "wrun_trade_volume_by_size_unsupported", "wrun_view_leg_off_grid", "wrun_view_leg_equal", "wrun_time_facts_unsupported", "wrun_etf_flow_unsupported", "wrun_volatility_index_unsupported", "wrun_long_short_ratio_unsupported", "wrun_options_oi_unsupported", "wrun_options_volume_unsupported", "wrun_ethena_positions_unsupported", "wrun_etf_holdings_unsupported", "wrun_etf_premium_unsupported", "wrun_economic_unsupported", "wrun_treasury_balance_unsupported", "wrun_bitfinex_funding_unsupported", "wrun_strategy_costs_in_sheet", "wrun_window_bars_invalid", "wrun_cells_unavailable", "wrun_tape_unavailable", "wrun_tape_value_unproven", "wrun_tape_interval_unsupported", "wrun_metric_source_missing_policy", "wrun_series_source_primary", "wrun_series_source_densification", "wrun_metric_pin_coarser_than_primary", "wrun_forming_primary_not_own_candles", "wrun_package_lock_invalid", "wrun_package_lock_missing", "wrun_package_not_installed", "wrun_package_lock_mismatch", "wrun_composition_cycle", "wrun_composition_depth", "wrun_options_chain_unsupported", "wrun_volume_profile_ticks_unsupported", "wrun_celled_metric_unsupported", "wrun_series_source_missing", "wrun_series_source_invalid", "wrun_params_invalid", "wrun_source_bindings_invalid", "wrun_output_displaced", "wrun_pin_unresolvable"];
343
+ readonly validate: readonly ["wrun_abi_unsupported", "wrun_pin_venue_unknown", "wrun_sheet_over_cap", "wrun_abi_channel_missing", "wrun_intrabar_interval_required", "wrun_intrabar_primary", "wrun_candles_interval_required", "wrun_candles_primary", "wrun_options_chain_venue", "wrun_options_chain_expiries", "wrun_options_chain_market_pinned", "wrun_offset_needs_view", "wrun_offset_count_required", "wrun_bars_needs_leg", "wrun_chart_interval_below_needs_candles", "wrun_chart_interval_below_primary", "wrun_chart_interval_below_forming", "wrun_pin_symbol_literal", "wrun_tape_history_unavailable", "wrun_strategy_feed_not_ohlcv", "wrun_strategy_slippage_model_unsupported", "wrun_strategy_reserved_output", "wrun_tape_min_size_invalid", "wrun_tape_min_value_invalid", "wrun_tape_floor_invalid", "wrun_tape_min_coins_invalid", "wrun_lane_knob_invalid", "wrun_option_knob_invalid", "wrun_option_market_pinned", "wrun_option_prints_min_premium_required", "wrun_option_prints_tail_largest", "wrun_cell_capacity_invalid", "wrun_options_flow_venue_field", "wrun_options_flow_venue_required", "wrun_options_flow_venue_scope", "wrun_oi_candles_interval_required", "wrun_oi_candles_primary", "wrun_volume_profile_candles_interval_required", "wrun_volume_profile_candles_primary"];
344
+ readonly plan: readonly ["wrun_options_coin_unknown", "wrun_source_unsupported", "wrun_not_in_10m_universe", "wrun_opra_lane_refused", "wrun_opra_official_only", "wrun_option_contract_flow_unsupported", "wrun_option_contract_state_unsupported", "wrun_option_daily_unsupported", "wrun_option_prints_one_acquisition", "wrun_option_prints_unsupported", "wrun_option_prints_v2_unsupported", "wrun_option_stats_10m_unsupported", "wrun_option_strike_flow_unsupported", "wrun_option_surface_unsupported", "wrun_option_views_unserved", "wrun_options_flow_unsupported", "wrun_field_unsupported", "wrun_tenor_unsupported", "wrun_view_unsupported", "wrun_family_unsupported", "wrun_displacement_needs_cap", "wrun_options_chain_venue_unavailable", "wrun_options_chain_unavailable", "wrun_options_chain_one_venue", "wrun_lane_input_refused", "wrun_permission_denied", "wrun_coin_leg_unsupported", "wrun_coin_leg_unresolved", "wrun_pin_unsupported", "wrun_custom_interval_unsupported", "wrun_intrabar_leg_off_grid", "wrun_intrabar_ratio_over_cap", "wrun_intrabar_unsupported", "wrun_candles_bars_over_cap", "wrun_candles_ratio_over_cap", "wrun_oi_candles_unsupported", "wrun_volume_profile_candles_unsupported", "wrun_trade_volume_by_size_unsupported", "wrun_view_leg_off_grid", "wrun_view_leg_equal", "wrun_time_facts_unsupported", "wrun_etf_flow_unsupported", "wrun_volatility_index_unsupported", "wrun_long_short_ratio_unsupported", "wrun_options_oi_unsupported", "wrun_options_volume_unsupported", "wrun_ethena_positions_unsupported", "wrun_etf_holdings_unsupported", "wrun_etf_premium_unsupported", "wrun_economic_unsupported", "wrun_treasury_balance_unsupported", "wrun_bitfinex_funding_unsupported", "wrun_strategy_costs_in_sheet", "wrun_window_bars_invalid", "wrun_cells_unavailable", "wrun_tape_unavailable", "wrun_tape_value_unproven", "wrun_tape_interval_unsupported", "wrun_tape_coins_unpriced", "wrun_dark_pool_unsupported", "wrun_dark_pool_not_us_stock", "wrun_dark_pool_price_only", "wrun_metric_source_missing_policy", "wrun_series_source_primary", "wrun_series_source_densification", "wrun_metric_pin_coarser_than_primary", "wrun_forming_primary_not_own_candles", "wrun_package_lock_invalid", "wrun_package_lock_missing", "wrun_package_not_installed", "wrun_package_lock_mismatch", "wrun_composition_cycle", "wrun_composition_depth", "wrun_options_chain_unsupported", "wrun_volume_profile_ticks_unsupported", "wrun_celled_metric_unsupported", "wrun_series_source_missing", "wrun_series_source_invalid", "wrun_params_invalid", "wrun_source_bindings_invalid", "wrun_output_displaced", "wrun_pin_unresolvable", "wrun_pin_venue_refused"];
345
345
  readonly shape: readonly ["wrun_draw_kind_limit", "wrun_draw_total_limit", "wrun_draw_polyline_too_large", "wrun_draw_calls_per_row", "wrun_render_result_too_large", "wrun_draw_kind_mismatch", "wrun_draw_handle_missing", "wrun_draw_label_slot_absent", "wrun_draw_non_finite", "wrun_draw_phase", "wrun_draw_id_negative", "wrun_draw_kind_undeclared", "wrun_draw_prop_unknown", "wrun_draw_prop_unsupported", "wrun_draw_style_out_of_range", "wrun_draw_polyline_empty", "wrun_draw_polyline_out_of_bounds", "wrun_draw_label_slot_undeclared", "wrun_draw_polyline_budget", "wrun_strategy_id_limit", "wrun_strategy_id_too_long", "wrun_strategy_id_invalid_utf8", "wrun_strategy_calls_per_row", "wrun_strategy_trade_limit", "wrun_strategy_non_finite", "wrun_strategy_bad_direction", "wrun_strategy_not_declared", "wrun_strategy_phase", "wrun_strategy_id_out_of_bounds", "wrun_text_param_phase", "wrun_text_param_memory", "wrun_bar_count_phase", "wrun_frame_invalid", "wrun_frame_phase", "wrun_frame_undeclared", "wrun_frame_length", "wrun_frame_too_large", "wrun_frame_run_too_large", "wrun_frame_memory", "wrun_frame_utf8"];
346
346
  readonly pack: readonly ["wrun_cell_block_invalid", "wrun_run_cells_too_large", "wrun_cell_block_too_large"];
347
347
  readonly align: readonly ["wrun_densify_empty_fetch", "wrun_densify_mixed_phase", "wrun_liquidation_side_unmatched", "wrun_bound_series_empty", "wrun_cell_data_malformed"];
@@ -477,7 +477,7 @@ export function wrunFrameRefusalMemory(text) {
477
477
  * (wrun-shared-host.ts) and the answer table above answers synchronously, in the socket worker too (this
478
478
  * leaf imports nothing; wrun-refusal.util re-exports it); tests/utility/wrun/wrun-refusal.cloud.spec.ts
479
479
  * holds it to the installed kit's table code by code, so a kit bump that adds or moves a code fails there
480
- * by name.
480
+ * by name; wrun-kit-refusal-stages.types.ts fails the typecheck on a kit code this lacks.
481
481
  */
482
482
  export const WRUN_KIT_REFUSAL_STAGES = {
483
483
  validate: [
@@ -501,7 +501,6 @@ export const WRUN_KIT_REFUSAL_STAGES = {
501
501
  'wrun_chart_interval_below_needs_candles',
502
502
  'wrun_chart_interval_below_primary',
503
503
  'wrun_chart_interval_below_forming',
504
- 'wrun_pin_venue_refused',
505
504
  'wrun_pin_symbol_literal',
506
505
  'wrun_tape_history_unavailable',
507
506
  'wrun_strategy_feed_not_ohlcv',
@@ -510,6 +509,9 @@ export const WRUN_KIT_REFUSAL_STAGES = {
510
509
  'wrun_tape_min_size_invalid',
511
510
  'wrun_tape_min_value_invalid',
512
511
  'wrun_tape_floor_invalid',
512
+ // kit 0.116.0: the tape's coin floor, a lane knob outside its lane's words.
513
+ 'wrun_tape_min_coins_invalid',
514
+ 'wrun_lane_knob_invalid',
513
515
  // kit 0.81 to 0.85 (UW-PARITY): the US listed options classes' knobs, pins and venues.
514
516
  'wrun_option_knob_invalid',
515
517
  'wrun_option_market_pinned',
@@ -592,6 +594,11 @@ export const WRUN_KIT_REFUSAL_STAGES = {
592
594
  'wrun_tape_unavailable',
593
595
  'wrun_tape_value_unproven',
594
596
  'wrun_tape_interval_unsupported',
597
+ // kit 0.116.0: an unpriced coin floor, and the dark pool prints.
598
+ 'wrun_tape_coins_unpriced',
599
+ 'wrun_dark_pool_unsupported',
600
+ 'wrun_dark_pool_not_us_stock',
601
+ 'wrun_dark_pool_price_only',
595
602
  'wrun_metric_source_missing_policy',
596
603
  'wrun_series_source_primary',
597
604
  'wrun_series_source_densification',
@@ -613,6 +620,9 @@ export const WRUN_KIT_REFUSAL_STAGES = {
613
620
  'wrun_output_displaced',
614
621
  // kit 0.78.1: a pin that names no market the host serves, even respelled (resolveWrunPinMarket).
615
622
  'wrun_pin_unresolvable',
623
+ // kit 0.113.0 (scaffold 113): a server lane's pin on a governed venue (a CME Group market), refused at plan by
624
+ // the profile's `governedPins` row instead of at validate by the sheet check, so the browser lanes plan it.
625
+ 'wrun_pin_venue_refused',
616
626
  ],
617
627
  shape: [
618
628
  'wrun_draw_kind_limit',
@@ -39,12 +39,16 @@ import { type WrunColorTheme } from './wrun-style-words.util.js';
39
39
  * `colorTheme` (DW13, TH-theme-tokens): the owning chart's palette; with it
40
40
  * every colour word a block or an output declares resolves here (a theme
41
41
  * token becomes the chart's colour), without it the words pass as written.
42
+ * `builtIn` (TWIN-LEGEND): the built-in the package ports (builtinPortOf),
43
+ * whose words name every line it names on the card, like the legend
44
+ * (wrun-output-words.util); absent, the sheet's words.
42
45
  */
43
46
  export interface WrunValuePlacement {
44
47
  priceDigits: number;
45
48
  onPrice: (name: string | undefined) => boolean;
46
49
  builtinTwin?: WrunBuiltinTwin;
47
50
  colorTheme?: WrunColorTheme;
51
+ builtIn?: string;
48
52
  }
49
53
  /** The number-format companions an output declares beside `format` (OT32,
50
54
  * conventions 8): the formatter's 4th argument. */
@@ -123,8 +127,10 @@ export declare const WRUN_SPARK_DEFAULT_BARS = 32;
123
127
  * else undefined. The gate paintColor and every block view sink (WrunBlocks) share. */
124
128
  export declare function wrunPaintColor(value: unknown): string | undefined;
125
129
  /** An output's display label: the declared `label`, else its name read as
126
- * words (the legend's own rule, wrunLegendName). */
127
- export declare function wrunOutputDisplayLabel(output: Pick<WrunMetadataOutput, 'name' | 'label'>): string;
130
+ * words (the legend's own rule, wrunLegendName); for a package that ports
131
+ * built-in `builtIn`, a line the built-in names in its built-in's words
132
+ * (wrunOutputWords, the words its legend line carries). */
133
+ export declare function wrunOutputDisplayLabel(output: Pick<WrunMetadataOutput, 'name' | 'label'>, builtIn?: string): string;
128
134
  /** A sheet name as a legend surface prints it where the declaration carries
129
135
  * no words of its own (a `render.legend` entry without `text`, a HUD's
130
136
  * settings rows): the legend's own rule (wrunLegendName: `spot_entry` reads
@@ -23,6 +23,7 @@
23
23
  * unknown name stays as written too, so a typo shows instead of vanishing.
24
24
  */
25
25
  import { wrunLegendName } from '../chart/wrun-legend-name.util.js';
26
+ import { wrunDeclaredOutputWords, wrunOutputWords } from './wrun-output-words.util.js';
26
27
  import { WRUN_MAX_BLOCK_HEIGHT_PX, WRUN_MAX_HUD_FONT_SIZE_PX, WRUN_MAX_HUD_RINGS, WRUN_MIN_BLOCK_HEIGHT_PX, WRUN_MIN_HUD_FONT_SIZE_PX, isWrunRowLeader, wrunBlockDraw, } from './wrun-hud-looks.util.js';
27
28
  import { formatWrunLegendValue, formatWrunValue, isWrunValueFormat, } from './wrun-pane-format.util.js';
28
29
  import { isWrunColorWord, parseWrunThemeToken, resolveWrunColorWord, } from './wrun-style-words.util.js';
@@ -127,9 +128,11 @@ function paintColor(word, placement) {
127
128
  return isWrunColorWord(word) || wrunPaintColor(word) !== undefined ? word : undefined;
128
129
  }
129
130
  /** An output's display label: the declared `label`, else its name read as
130
- * words (the legend's own rule, wrunLegendName). */
131
- export function wrunOutputDisplayLabel(output) {
132
- return wrunLegendName(output.name, output.label);
131
+ * words (the legend's own rule, wrunLegendName); for a package that ports
132
+ * built-in `builtIn`, a line the built-in names in its built-in's words
133
+ * (wrunOutputWords, the words its legend line carries). */
134
+ export function wrunOutputDisplayLabel(output, builtIn) {
135
+ return wrunOutputWords(output, builtIn);
133
136
  }
134
137
  /** A sheet name as a legend surface prints it where the declaration carries
135
138
  * no words of its own (a `render.legend` entry without `text`, a HUD's
@@ -227,14 +230,17 @@ function referenceText(name, format, snapshot, metadata, placement) {
227
230
  const output = outputByName(metadata, name);
228
231
  return formatPlacedValue(latestValue(snapshot, name), name, formatWordFor(format, output), placement, formatOptionsFor(output));
229
232
  }
230
- /** The label a block shows: its own, else its reference's display label. */
231
- function blockLabel(block, metadata) {
232
- if (typeof block.label === 'string' && block.label.trim() !== '')
233
- return block.label;
233
+ /** The label a block shows: its own (words that restate its output's line
234
+ * read that line's words, wrunDeclaredOutputWords), else its reference's
235
+ * display label; `builtIn` names a built-in port's lines in its words. */
236
+ function blockLabel(block, metadata, builtIn) {
234
237
  const name = block.output ?? block.slot;
235
238
  const output = outputByName(metadata, name);
239
+ if (typeof block.label === 'string' && block.label.trim() !== '') {
240
+ return wrunDeclaredOutputWords(block.label, output, builtIn);
241
+ }
236
242
  if (output !== undefined)
237
- return wrunOutputDisplayLabel(output);
243
+ return wrunOutputDisplayLabel(output, builtIn);
238
244
  return name === undefined ? undefined : wrunLegendName(name);
239
245
  }
240
246
  /** The kinds that draw a mark in the series' own colour (a sparkline, an
@@ -297,9 +303,12 @@ function ringViews(block, snapshot, metadata, placement) {
297
303
  const output = outputByName(metadata, ring.output);
298
304
  const current = latestValue(snapshot, ring.output);
299
305
  const color = paintColor(typeof ring.color === 'string' && ring.color !== '' ? ring.color : undefined, placement);
306
+ const builtIn = placement?.builtIn;
300
307
  return [
301
308
  {
302
- label: typeof ring.label === 'string' && ring.label !== '' ? ring.label : wrunLegendName(ring.output, output?.label),
309
+ label: typeof ring.label === 'string' && ring.label !== ''
310
+ ? wrunDeclaredOutputWords(ring.label, output, builtIn)
311
+ : wrunOutputWords(output ?? { name: ring.output }, builtIn),
303
312
  value: formatPlacedValue(current, ring.output, formatWordFor(undefined, output), placement, formatOptionsFor(output)),
304
313
  fraction: shareOf(current, ring.min, ring.max) ?? 0,
305
314
  ...(color !== undefined ? { color } : {}),
@@ -331,7 +340,7 @@ function deltaTone(delta) {
331
340
  function buildBlockView(block, snapshot, metadata, placement) {
332
341
  if (!block || typeof block !== 'object')
333
342
  return undefined;
334
- const label = blockLabel(block, metadata);
343
+ const label = blockLabel(block, metadata, placement?.builtIn);
335
344
  const color = blockColor(block, snapshot, metadata, placement);
336
345
  const labelled = label !== undefined ? { label } : {};
337
346
  const words = blockLookWords(block);
@@ -408,11 +417,13 @@ function buildBlockView(block, snapshot, metadata, placement) {
408
417
  // A row is [label, reference] or [label, reference, format].
409
418
  const [rowLabel, reference, rowFormat] = row;
410
419
  const name = typeof reference === 'string' ? reference : undefined;
411
- const swatch = paintColor(outputByName(metadata, name)?.color, placement);
420
+ const output = outputByName(metadata, name);
421
+ const swatch = paintColor(output?.color, placement);
412
422
  const format = typeof rowFormat === 'string' ? rowFormat : undefined;
413
423
  return [
414
424
  {
415
- label: rowLabel,
425
+ // A row that names its line by the line's own words reads them as the legend does.
426
+ label: wrunDeclaredOutputWords(rowLabel, output, placement?.builtIn),
416
427
  value: referenceText(name, format, snapshot, metadata, placement),
417
428
  ...(swatch !== undefined ? { swatch } : {}),
418
429
  },
@@ -511,7 +522,7 @@ const WRUN_HEADER_SEPARATOR = ' \u00b7 ';
511
522
  */
512
523
  export function wrunOutputHoverView(output, snapshot, metadata, options = {}) {
513
524
  const { placement } = options;
514
- const label = wrunOutputDisplayLabel(output);
525
+ const label = wrunOutputDisplayLabel(output, placement?.builtIn);
515
526
  const value = options.value ?? latestValue(snapshot, output.name);
516
527
  const format = formatWordFor(undefined, output);
517
528
  const formatOptions = formatOptionsFor(output);
@@ -3,6 +3,19 @@ import { type IndicatorErrorMessageValue } from '../chart/indicator-error-messag
3
3
  import { type WrunRefusal } from './wrun-refusal.util.js';
4
4
  /** Ownership stamp inside the errorMessage payload. */
5
5
  export declare const WRUN_INERT_LEGEND_SOURCE = "wrun-inert";
6
+ /** The chart store's diagnostics summary stamp (runtime-diagnostics.util `RUNTIME_DIAGNOSTICS_SOURCE`, pinned equal by
7
+ * tests/store/chart.legend-slot.spec.ts). */
8
+ export declare const WRUN_LEGEND_DIAGNOSTICS_SOURCE = "runtime-diagnostics";
9
+ /**
10
+ * Whether another shown chip keeps the legend slot from a refusal, the slot's one precedence (this writer, the store's
11
+ * chokepoint, its card): the overlay's own Paused chip (Resume) always; a chip with a record by C2; one without (a slow
12
+ * verdict, a pacing note) from a note, never from a refusal that drew nothing (INT 2026-11-05).
13
+ */
14
+ export declare function legendChipOutranksRefusal(chip: {
15
+ show?: unknown;
16
+ refusal?: unknown;
17
+ costState?: unknown;
18
+ } | null | undefined, refusal: WrunRefusal): boolean;
6
19
  /** The states this writer can project; each maps to its own copy. */
7
20
  export type WrunInertLegendState = {
8
21
  kind: 'source-error';
@@ -18,7 +18,8 @@
18
18
  * every other standing writer uses (`tc.updateSettings(ovId, { errorMessage
19
19
  * })`, see pack-failure-chip.util.ts), with the same discipline:
20
20
  * - OWNERSHIP: every payload carries `source: 'wrun-inert'`; a shown
21
- * errorMessage another writer owns is never overwritten or cleared.
21
+ * errorMessage another writer owns is never overwritten or cleared, but for
22
+ * the store's diagnostics chip a refusal outranks (`legendChipOutranksRefusal`).
22
23
  * - SYMMETRY: the state is cleared by the registry loader the moment it
23
24
  * revives the overlay (rehydrateWrunRegistryOverlays), and by the run pass
24
25
  * on its next SUCCESS (never on a run merely starting, so repeated failing
@@ -29,10 +30,28 @@
29
30
  */
30
31
  import { wrunChartHostEnv } from '../../host-env.js';
31
32
  import { updateIndicatorErrorMessageIfChanged, } from '../chart/indicator-error-message.util.js';
32
- import { serializeWrunRefusal } from './wrun-refusal.util.js';
33
+ import { compareWrunRefusals, parseWrunRefusal, serializeWrunRefusal } from './wrun-refusal.util.js';
33
34
  import { wrunRefusalChipLabel, wrunRefusalSentence } from './wrun-refusal-text.util.js';
34
35
  /** Ownership stamp inside the errorMessage payload. */
35
36
  export const WRUN_INERT_LEGEND_SOURCE = 'wrun-inert';
37
+ /** The chart store's diagnostics summary stamp (runtime-diagnostics.util `RUNTIME_DIAGNOSTICS_SOURCE`, pinned equal by
38
+ * tests/store/chart.legend-slot.spec.ts). */
39
+ export const WRUN_LEGEND_DIAGNOSTICS_SOURCE = 'runtime-diagnostics';
40
+ /**
41
+ * Whether another shown chip keeps the legend slot from a refusal, the slot's one precedence (this writer, the store's
42
+ * chokepoint, its card): the overlay's own Paused chip (Resume) always; a chip with a record by C2; one without (a slow
43
+ * verdict, a pacing note) from a note, never from a refusal that drew nothing (INT 2026-11-05).
44
+ */
45
+ export function legendChipOutranksRefusal(chip, refusal) {
46
+ if (!chip || chip.show !== true)
47
+ return false;
48
+ if (chip.costState === 'paused')
49
+ return true;
50
+ const record = parseWrunRefusal(chip.refusal);
51
+ if (record !== null)
52
+ return compareWrunRefusals(record, refusal) < 0;
53
+ return refusal.severity !== 'paused';
54
+ }
36
55
  function currentErrorMessage(tc, indicatorId) {
37
56
  const meta = tc.metadata?.find((m) => m?.id === indicatorId);
38
57
  return meta?.settings?.errorMessage;
@@ -46,6 +65,13 @@ function foreignErrorMessageShown(tc, indicatorId) {
46
65
  function canWrite(tc) {
47
66
  return !!tc && typeof tc.updateSettings === 'function';
48
67
  }
68
+ /** A refusal over the store's shown diagnostics chip that does not keep the slot from it. */
69
+ function refusalTakesSlot(tc, indicatorId, state) {
70
+ if (state.kind !== 'refusal')
71
+ return false;
72
+ const current = currentErrorMessage(tc, indicatorId);
73
+ return current?.source === WRUN_LEGEND_DIAGNOSTICS_SOURCE && !legendChipOutranksRefusal(current, state.refusal);
74
+ }
49
75
  /** True while this writer's state is the shown legend chip. */
50
76
  export function isWrunInertLegendShown(tc, indicatorId) {
51
77
  const current = currentErrorMessage(tc, indicatorId);
@@ -86,7 +112,9 @@ export function buildWrunRefusalErrorMessage(r, opts) {
86
112
  /** Project the state onto the overlay's legend chip. Returns true when a
87
113
  * write happened (false: a foreign writer owns the slot, or unchanged). */
88
114
  export function applyWrunInertLegendState(tc, indicatorId, state) {
89
- if (!canWrite(tc) || foreignErrorMessageShown(tc, indicatorId))
115
+ if (!canWrite(tc))
116
+ return false;
117
+ if (foreignErrorMessageShown(tc, indicatorId) && !refusalTakesSlot(tc, indicatorId, state))
90
118
  return false;
91
119
  if (state.kind === 'refusal') {
92
120
  // Its projector reports it (wrun-refusal-surface writeTop: the attempt is the surface's).
@@ -41,13 +41,13 @@ export type WrunInputRequirement = ({
41
41
  inputs: string[];
42
42
  sourceClass: string;
43
43
  }
44
- /** A row lane reading a governed plane's rows for the chart's own underlying (`governed: 'opra'`): met where the
45
- * candidate's options ride that plane, for an overlay the plane is open to. */
44
+ /** A row lane reading a governed plane's rows for the chart's own underlying (`governed`): met where the candidate's
45
+ * options ride OPRA, or (`stocks`) where it reads a US stock tape the overlay may read. */
46
46
  | {
47
47
  kind: 'governed';
48
48
  inputs: string[];
49
49
  sourceClass: string;
50
- plane: 'opra';
50
+ plane: 'opra' | 'stocks';
51
51
  }) & {
52
52
  /** The size units (`market.size_unit()` codes) of the markets the inputs are read on: their
53
53
  * sources' `needed_by` (kit 0.72.0). Absent = every market. A candidate of another size unit
@@ -65,6 +65,8 @@ export type WrunInputRequirement = ({
65
65
  * the chart's coin whatever their kind (`wrunRequirementReadsChartCoin`). Absent: they read no coin's market. */
66
66
  followsCoin?: true;
67
67
  };
68
+ /** The classes served on a pinned market (wrun-pinned-lanes.util): every pin gate reads it. */
69
+ export declare const WRUN_BROWSER_PINNED_LANE_CLASSES: ReadonlySet<string>;
68
70
  /** The gateway type each chart-market class's lane fetches (its K control's data type). */
69
71
  export declare const CHART_MARKET_GATEWAY_TYPES: Readonly<Record<string, string>>;
70
72
  /** K_OHLCV's gateway type: the chart market's candles an intrabar input slices into its rows. */
@@ -148,7 +150,7 @@ export interface WrunUnservedLane {
148
150
  }>;
149
151
  /** The readers judged, by input index. */
150
152
  inputNames: string[];
151
- /** A trades leg's market, judged there (kit 0.77.0); absent: the chart's. */
153
+ /** A pinned input's market, judged there; absent: the chart's. */
152
154
  market?: {
153
155
  exchange: string;
154
156
  symbol: string;
@@ -175,7 +177,7 @@ export declare function unservedLaneOn(lane: string, market: {
175
177
  * input the sheet on the market left undemanded, its `needed_by`, asks none) that the chart's fetch
176
178
  * never serves there (`wrunLaneServiceOnMarket`: the dispatcher's index-mode admission, the
177
179
  * market-kind table and the coin table, never an empty window), in the run's declaration order,
178
- * with the reader it cannot draw without; a trades leg on its own market. The run pass refuses on
180
+ * with the reader it cannot draw without; a pinned lane on its own market. The run pass refuses on
179
181
  * the first lane holding one and leaves the others undispatched, their readers on their fill; the
180
182
  * picker greys a row on the same verdict (`wrunMarketRefusesBeforeFetch`). `nativeLanes` names the
181
183
  * lanes this run asks on the fetch's native-rows path (a governed options chain, CME or OPRA, the run
@@ -21,6 +21,16 @@ import { WRUN_LEG_STREAM_CLASSES, WRUN_LEG_STREAM_CLASS_NAMES, isWrunLaneStreamC
21
21
  // ---------------------------------------------------------------------------
22
22
  /** The leg stream classes over a lane of their own (`oi_candles`, `volume_profile_candles`), in the table's order. */
23
23
  const LANE_STREAM_CLASSES = WRUN_LEG_STREAM_CLASS_NAMES.filter(isWrunLaneStreamClass);
24
+ /** The classes served on a pinned market (wrun-pinned-lanes.util): every pin gate reads it. */
25
+ export const WRUN_BROWSER_PINNED_LANE_CLASSES = new Set([
26
+ 'ohlcv',
27
+ 'trades',
28
+ ...LANE_STREAM_CLASSES,
29
+ 'book',
30
+ 'oi',
31
+ 'funding',
32
+ 'liquidations',
33
+ ]);
24
34
  /** The gateway type each chart-market class's lane fetches (its K control's data type). */
25
35
  export const CHART_MARKET_GATEWAY_TYPES = Object.freeze({
26
36
  // A lane stream reads its class's gateway type on the chart's market (wrun-leg-stream-classes).
@@ -226,9 +236,9 @@ function wrunRowLaneRequirement(sourceClass, source) {
226
236
  return undefined;
227
237
  if (lane.chain !== undefined)
228
238
  return wrunChainLaneRequirement(sourceClass, source);
229
- if (lane.governed !== 'opra')
239
+ if (lane.governed === undefined)
230
240
  return { kind: 'chart-market', sourceClass, gatewayType: '' };
231
- return { kind: 'governed', sourceClass, plane: 'opra' };
241
+ return { kind: 'governed', sourceClass, plane: lane.governed };
232
242
  }
233
243
  /**
234
244
  * The requirements of an effective sheet (settings applied), one entry per distinct requirement
@@ -447,7 +457,7 @@ export function unservedLaneOn(lane, market, nativeRows = false) {
447
457
  * input the sheet on the market left undemanded, its `needed_by`, asks none) that the chart's fetch
448
458
  * never serves there (`wrunLaneServiceOnMarket`: the dispatcher's index-mode admission, the
449
459
  * market-kind table and the coin table, never an empty window), in the run's declaration order,
450
- * with the reader it cannot draw without; a trades leg on its own market. The run pass refuses on
460
+ * with the reader it cannot draw without; a pinned lane on its own market. The run pass refuses on
451
461
  * the first lane holding one and leaves the others undispatched, their readers on their fill; the
452
462
  * picker greys a row on the same verdict (`wrunMarketRefusesBeforeFetch`). `nativeLanes` names the
453
463
  * lanes this run asks on the fetch's native-rows path (a governed options chain, CME or OPRA, the run
@@ -482,12 +492,11 @@ export function wrunUnservedLanes(sheet, market, opts = {}) {
482
492
  });
483
493
  // A class on the chart's own market is judged on the run market (a Trades chart's tape), never the stored one.
484
494
  const own = wrunRunMarketOn(lane, market, opts.runMarket);
485
- if (lane !== 'trades' && !isWrunLaneStreamClass(lane)) {
495
+ if (!WRUN_BROWSER_PINNED_LANE_CLASSES.has(lane)) {
486
496
  judge(lane, readers, own);
487
497
  continue;
488
498
  }
489
- // A pinned trades input (and a lane stream pinned to another market) is judged on its leg's market; an
490
- // unresolved coin leg or a half pin nowhere (the row builder refuses it by name).
499
+ // A pinned input is judged on its own market; a half pin or an unresolved coin leg nowhere (refused by name).
491
500
  const ownReaders = [];
492
501
  const legs = new Map();
493
502
  for (const input of readers) {
@@ -550,6 +559,7 @@ export const WRUN_RUN_MARKET_READS = Object.freeze({
550
559
  option_contract_flow: 'none',
551
560
  option_contract_state: 'none',
552
561
  option_prints: 'none',
562
+ dark_pool: 'none',
553
563
  option_strike_flow: 'none',
554
564
  option_strikes: 'none',
555
565
  option_surface: 'none',
@@ -0,0 +1,26 @@
1
+ import type { WrunRunReason } from './wrun-lifecycle.contract.js';
2
+ /** The least time between two installs admitted on one chart. */
3
+ export declare const WRUN_INSTALL_MIN_GAP_MS = 50;
4
+ /** What an admission answers: how long the install waited for its turn, and how many installs stood ahead of it when it
5
+ * asked (the one admitted within the last gap and every one waiting before it; 0 when it went at once). */
6
+ export interface WrunInstallAdmission {
7
+ waitedMs: number;
8
+ queueDepth: number;
9
+ }
10
+ /**
11
+ * Wait for the install's turn on its chart: at once when no install of the chart was admitted within the last
12
+ * WRUN_INSTALL_MIN_GAP_MS and none waits, else at the previous admission plus the gap, behind every install that asked
13
+ * before it. Answers how long it waited and how many stood ahead of it; never rejects.
14
+ */
15
+ export declare function admitWrunInstall(chartIndex: number, indicatorId: string, reason: WrunRunReason): Promise<WrunInstallAdmission>;
16
+ /** The serial of the chart's latest admission (0 while its turn holds none). Read right after an install's own
17
+ * admission and again at its write: equal, no other install of the chart was admitted in between. */
18
+ export declare function wrunInstallLastAdmission(chartIndex: number): number;
19
+ /** An admitted install's titan write lands now, later than its admission (across an await): the chart's next turn
20
+ * counts its gap from this write, so no install paints within the gap of it. */
21
+ export declare function noteWrunInstallWrite(chartIndex: number): void;
22
+ /** Chart teardown: the chart's queue is cleared and each waiter goes at once with what it waited; the next install on
23
+ * that index starts a fresh turn. */
24
+ export declare function dropWrunInstallPacer(chartIndex: number): void;
25
+ /** Specs only: every chart's turn dropped (its waiters released), so a spec's first install goes at once. */
26
+ export declare function __resetWrunInstallPacerForTests(): void;
@@ -0,0 +1,145 @@
1
+ /**
2
+ * The install pacer (WRUN-PANBACK-2 S1): the wrun installs of one chart are admitted one per
3
+ * WRUN_INSTALL_MIN_GAP_MS, first come first served.
4
+ *
5
+ * The install hold (wrun-overlay-run `holdWrunInstallForGesture`) is per overlay, and every held overlay's hold ends
6
+ * within one poll of the same idle edge, so the rebuilds a pan released reached their titan writes back to back: the
7
+ * field dump of 2026-11-01 07:36Z shows five rebuild installs within 0.9 s after a pan settled and a 408 ms frame right
8
+ * after them. The gesture apply budget (utility/chart/gesture-apply-budget.util) paces the legacy indicator apply slots
9
+ * only, which no wrun path takes. Here an install that finds no install of its chart admitted within the last gap goes
10
+ * at once (a lone install waits 0 ms); every other one goes at the previous admission plus the gap, behind the installs
11
+ * that asked before it. Every reason is paced, a switch's first paints included (five first paints in one frame are the
12
+ * same stall), and charts never pace each other. The clock is the pacing clock (performance.now); the host has no frame
13
+ * or idle hook, so a turn is a timer.
14
+ *
15
+ * A turn spaces writes only when the write follows it in the same task: an install takes its turn at its write
16
+ * boundary, after every await of its preparation, and nothing awaits between the turn and its titan write. A write that
17
+ * must cross an await after its turn (a prefix page commits at its session lock's grant) checks at the write that no
18
+ * other install of its chart was admitted since its own (`wrunInstallLastAdmission`), else takes a fresh turn, and notes
19
+ * the write (`noteWrunInstallWrite`), so the chart's next turn counts its gap from the write.
20
+ *
21
+ * A wait rings `wrun-install-paced` ({ chartIndex, indicatorId, reason, waitedMs, queueDepth }) when it waited at all.
22
+ * Chart teardown drops the chart's queue (`dropWrunInstallPacer`): each waiter goes at once with what it waited, and its
23
+ * run meets its commit checks on a chart that left.
24
+ */
25
+ import { wrunChartHostEnv } from '../../host-env.js';
26
+ /** The least time between two installs admitted on one chart. */
27
+ export const WRUN_INSTALL_MIN_GAP_MS = 50;
28
+ const turns = new Map();
29
+ /** The serial of the latest admission on any chart: unique, so a turn dropped and started again never repeats one. */
30
+ let admissionSerial = 0;
31
+ function recordAdmission(turn, now) {
32
+ admissionSerial += 1;
33
+ turn.lastAdmission = admissionSerial;
34
+ turn.lastAdmittedAt = now;
35
+ }
36
+ const clock = () => (typeof performance !== 'undefined' ? performance.now() : Date.now());
37
+ /** Whether an admission at `at` still holds the gap at `now`. A clock that reads before it (a spec's fake clock started
38
+ * again) holds none. */
39
+ function holdsGap(at, now) {
40
+ return at !== undefined && now >= at && now - at < WRUN_INSTALL_MIN_GAP_MS;
41
+ }
42
+ /**
43
+ * Wait for the install's turn on its chart: at once when no install of the chart was admitted within the last
44
+ * WRUN_INSTALL_MIN_GAP_MS and none waits, else at the previous admission plus the gap, behind every install that asked
45
+ * before it. Answers how long it waited and how many stood ahead of it; never rejects.
46
+ */
47
+ export function admitWrunInstall(chartIndex, indicatorId, reason) {
48
+ const now = clock();
49
+ let turn = turns.get(chartIndex);
50
+ if (turn === undefined) {
51
+ turn = { lastAdmittedAt: undefined, lastAdmission: 0, queue: [], timer: undefined };
52
+ turns.set(chartIndex, turn);
53
+ }
54
+ if (turn.queue.length === 0 && !holdsGap(turn.lastAdmittedAt, now)) {
55
+ recordAdmission(turn, now);
56
+ return Promise.resolve({ waitedMs: 0, queueDepth: 0 });
57
+ }
58
+ const waiting = turn;
59
+ return new Promise((resolve) => {
60
+ waiting.queue.push({ indicatorId, reason, askedAt: now, queueDepth: waiting.queue.length + 1, resolve });
61
+ scheduleNextAdmission(chartIndex, waiting);
62
+ });
63
+ }
64
+ /** Arm the timer of the queue's head: due at the last admission plus the gap (never later than one gap from now). */
65
+ function scheduleNextAdmission(chartIndex, turn) {
66
+ if (turn.timer !== undefined || turn.queue.length === 0)
67
+ return;
68
+ const now = clock();
69
+ const last = turn.lastAdmittedAt;
70
+ const dueInMs = holdsGap(last, now) ? last + WRUN_INSTALL_MIN_GAP_MS - now : 0;
71
+ turn.timer = setTimeout(() => admitQueueHead(chartIndex, turn), Math.max(0, dueInMs));
72
+ }
73
+ function admitQueueHead(chartIndex, turn) {
74
+ turn.timer = undefined;
75
+ // A chart dropped meanwhile released its waiters already.
76
+ if (turns.get(chartIndex) !== turn)
77
+ return;
78
+ const waiter = turn.queue.shift();
79
+ if (waiter === undefined)
80
+ return;
81
+ const now = clock();
82
+ recordAdmission(turn, now);
83
+ release(chartIndex, waiter, now);
84
+ scheduleNextAdmission(chartIndex, turn);
85
+ }
86
+ /** The serial of the chart's latest admission (0 while its turn holds none). Read right after an install's own
87
+ * admission and again at its write: equal, no other install of the chart was admitted in between. */
88
+ export function wrunInstallLastAdmission(chartIndex) {
89
+ return turns.get(chartIndex)?.lastAdmission ?? 0;
90
+ }
91
+ /** An admitted install's titan write lands now, later than its admission (across an await): the chart's next turn
92
+ * counts its gap from this write, so no install paints within the gap of it. */
93
+ export function noteWrunInstallWrite(chartIndex) {
94
+ const turn = turns.get(chartIndex);
95
+ if (turn === undefined)
96
+ return;
97
+ const now = clock();
98
+ if (turn.lastAdmittedAt !== undefined && turn.lastAdmittedAt >= now)
99
+ return;
100
+ turn.lastAdmittedAt = now;
101
+ if (turn.timer === undefined)
102
+ return;
103
+ clearTimeout(turn.timer);
104
+ turn.timer = undefined;
105
+ scheduleNextAdmission(chartIndex, turn);
106
+ }
107
+ /** Let a waiter go with what it waited, then ring the wait. The waiter goes first: a ring that throws (a host that binds
108
+ * no diagnostics port) never strands an install. */
109
+ function release(chartIndex, waiter, now) {
110
+ const waitedMs = Math.max(0, now - waiter.askedAt);
111
+ waiter.resolve({ waitedMs, queueDepth: waiter.queueDepth });
112
+ if (waitedMs === 0)
113
+ return;
114
+ try {
115
+ wrunChartHostEnv().diagnostics.debug('wrun-install-paced', {
116
+ chartIndex,
117
+ indicatorId: waiter.indicatorId,
118
+ reason: waiter.reason,
119
+ waitedMs,
120
+ queueDepth: waiter.queueDepth,
121
+ });
122
+ }
123
+ catch {
124
+ // No diagnostics port: the install still goes.
125
+ }
126
+ }
127
+ /** Chart teardown: the chart's queue is cleared and each waiter goes at once with what it waited; the next install on
128
+ * that index starts a fresh turn. */
129
+ export function dropWrunInstallPacer(chartIndex) {
130
+ const turn = turns.get(chartIndex);
131
+ if (turn === undefined)
132
+ return;
133
+ turns.delete(chartIndex);
134
+ if (turn.timer !== undefined)
135
+ clearTimeout(turn.timer);
136
+ turn.timer = undefined;
137
+ const now = clock();
138
+ for (const waiter of turn.queue.splice(0))
139
+ release(chartIndex, waiter, now);
140
+ }
141
+ /** Specs only: every chart's turn dropped (its waiters released), so a spec's first install goes at once. */
142
+ export function __resetWrunInstallPacerForTests() {
143
+ for (const chartIndex of [...turns.keys()])
144
+ dropWrunInstallPacer(chartIndex);
145
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The chart's mirror of the kit's refusal stages (`WRUN_KIT_REFUSAL_STAGES`, the import-free leaf
3
+ * wrun-hosted-wire-caps.ts) held to the installed kit's own list of codes (`WrunHostRefusalCode`, the keys of
4
+ * `WRUN_HOST_REFUSALS` in `@orangecharts/indicator-kit/host`) at compile time. A kit bump changes package.json and
5
+ * the lockfile, so its landing runs the full typecheck (scripts/typecheck-files.mjs), and a code the kit names that
6
+ * the mirror lacks fails it here by name. Kit 0.116.0 landed with six such codes: a cloud run's dark pool refusal
7
+ * read as an internal error and was retried. The leaf keeps no import (wrun-shared-host.boundary.spec.ts), hence
8
+ * this file; the stage of each code stays pinned at runtime by tests/utility/wrun/wrun-refusal.cloud.spec.ts.
9
+ */
10
+ import type { WrunHostRefusalCode } from '@orangecharts/indicator-kit/host';
11
+ import type { WRUN_KIT_REFUSAL_STAGES } from './wrun-hosted-wire-caps.js';
12
+ /** Compiles only when T is never: the error names each code that breaks the check. */
13
+ type ExpectNone<T extends never> = T;
14
+ type WrunMirroredKitRefusalCode = (typeof WRUN_KIT_REFUSAL_STAGES)[keyof typeof WRUN_KIT_REFUSAL_STAGES][number];
15
+ /** The checks. A failing one reads "Type '"<code>"' does not satisfy the constraint 'never'" at its line. */
16
+ export type WrunKitRefusalStageChecks = [
17
+ ExpectNone<Exclude<WrunHostRefusalCode, WrunMirroredKitRefusalCode>>,
18
+ ExpectNone<string extends WrunHostRefusalCode ? 'the kit names its refusal codes as string' : never>,
19
+ ExpectNone<string extends WrunMirroredKitRefusalCode ? 'the mirror lost its literal codes (as const)' : never>,
20
+ ExpectNone<[WrunHostRefusalCode] extends [never] ? 'the kit names no refusal code' : never>
21
+ ];
22
+ export {};
@@ -0,0 +1 @@
1
+ export {};