@orangecharts/wrun-chart-host 0.11.1 → 0.14.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 (307) hide show
  1. package/README.md +1 -0
  2. package/dist/constants/feature-flags.constants.d.ts +3 -4
  3. package/dist/constants/feature-flags.constants.js +34 -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 +55 -3
  13. package/dist/host-env.js +6 -0
  14. package/dist/host-ports.types.d.ts +36 -3
  15. package/dist/index.d.ts +17 -0
  16. package/dist/index.js +18 -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 +97 -19
  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 +4 -4
  35. package/dist/market-data/venues/stocks.contract.copy.json +4 -4
  36. package/dist/market-data/venues/stocks.d.ts +4 -4
  37. package/dist/market-data/venues/stocks.js +15 -13
  38. package/dist/settings-templates/frvp-fields.d.ts +12 -1
  39. package/dist/settings-templates/frvp-fields.js +15 -4
  40. package/dist/settings-templates/index.js +12 -5
  41. package/dist/settings-templates/indicator-fields.js +28 -2
  42. package/dist/settings-templates/tool-rules.d.ts +17 -8
  43. package/dist/settings-templates/tool-rules.js +15 -8
  44. package/dist/settings-templates/tool-tables.generated.js +4 -2
  45. package/dist/utility/auth/server-clock.util.d.ts +3 -1
  46. package/dist/utility/auth/server-clock.util.js +3 -1
  47. package/dist/utility/chart/book-live-bucket.util.js +2 -2
  48. package/dist/utility/chart/cache-alignment.util.d.ts +15 -7
  49. package/dist/utility/chart/cache-alignment.util.js +14 -7
  50. package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
  51. package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
  52. package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
  53. package/dist/utility/chart/cme-session-bucket.util.js +25 -332
  54. package/dist/utility/chart/continuous-contracts.util.js +6 -5
  55. package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
  56. package/dist/utility/chart/display-offset.leaf.js +41 -0
  57. package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
  58. package/dist/utility/chart/effective-chart-session.util.js +13 -5
  59. package/dist/utility/chart/feed-interval.util.d.ts +6 -20
  60. package/dist/utility/chart/feed-interval.util.js +13 -22
  61. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
  62. package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
  63. package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
  64. package/dist/utility/chart/host-bar-placement.util.js +8 -2
  65. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
  66. package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
  67. package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
  68. package/dist/utility/chart/indicator-run-interval.util.js +21 -12
  69. package/dist/utility/chart/interval-registry.util.d.ts +1 -1
  70. package/dist/utility/chart/interval-registry.util.js +1 -1
  71. package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
  72. package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
  73. package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
  74. package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
  75. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
  76. package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
  77. package/dist/utility/chart/live-bucket.util.d.ts +39 -17
  78. package/dist/utility/chart/live-bucket.util.js +103 -57
  79. package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
  80. package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
  81. package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
  82. package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
  83. package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
  84. package/dist/utility/chart/market-session-schedule.util.js +39 -1
  85. package/dist/utility/chart/market-session.util.d.ts +136 -0
  86. package/dist/utility/chart/market-session.util.js +341 -0
  87. package/dist/utility/chart/om-panel.util.d.ts +5 -3
  88. package/dist/utility/chart/om-panel.util.js +42 -7
  89. package/dist/utility/chart/om-target.util.d.ts +14 -1
  90. package/dist/utility/chart/om-target.util.js +22 -5
  91. package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
  92. package/dist/utility/chart/opra-read-access.leaf.js +22 -0
  93. package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
  94. package/dist/utility/chart/profile-row-height.util.js +74 -37
  95. package/dist/utility/chart/rth-session.util.d.ts +55 -20
  96. package/dist/utility/chart/rth-session.util.js +94 -46
  97. package/dist/utility/chart/session-lattice.util.d.ts +150 -0
  98. package/dist/utility/chart/session-lattice.util.js +488 -0
  99. package/dist/utility/chart/trading-day.util.d.ts +40 -2
  100. package/dist/utility/chart/trading-day.util.js +84 -7
  101. package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
  102. package/dist/utility/chart/us-equities-session.util.js +44 -15
  103. package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
  104. package/dist/utility/chart/window-geometry.leaf.js +57 -8
  105. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
  106. package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
  107. package/dist/utility/chart/wrun-run-result.util.d.ts +29 -12
  108. package/dist/utility/chart/wrun-run-result.util.js +89 -25
  109. package/dist/utility/common/time.util.js +5 -4
  110. package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
  111. package/dist/utility/market-events/earnings-scope.util.js +17 -9
  112. package/dist/utility/market-events/market-events.util.d.ts +14 -7
  113. package/dist/utility/market-events/market-events.util.js +30 -17
  114. package/dist/utility/number-format.util.d.ts +14 -21
  115. package/dist/utility/number-format.util.js +38 -24
  116. package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
  117. package/dist/utility/options/option-venue-disclosure.util.js +71 -11
  118. package/dist/utility/options/option-venue.util.d.ts +1 -1
  119. package/dist/utility/options/option-venue.util.js +1 -1
  120. package/dist/utility/pool-symbol.leaf.d.ts +7 -0
  121. package/dist/utility/pool-symbol.leaf.js +50 -5
  122. package/dist/utility/stocks/stock-display.util.d.ts +15 -0
  123. package/dist/utility/stocks/stock-display.util.js +37 -0
  124. package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
  125. package/dist/utility/v2/gate-plane.util.d.ts +6 -0
  126. package/dist/utility/v2/gate-plane.util.js +11 -1
  127. package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
  128. package/dist/utility/v2/gate-session-latch.util.js +3 -3
  129. package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
  130. package/dist/utility/v2/governed-tier.leaf.js +17 -16
  131. package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
  132. package/dist/utility/v2/stocks-governed.util.js +14 -0
  133. package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
  134. package/dist/utility/v2/v2-enums.leaf.js +458 -0
  135. package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
  136. package/dist/utility/wrun/derived-roots.leaf.js +27 -1
  137. package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
  138. package/dist/utility/wrun/derived-roots.util.js +97 -56
  139. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
  140. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
  141. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
  142. package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
  143. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
  144. package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
  145. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
  146. package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
  147. package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
  148. package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
  149. package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
  150. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
  151. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
  152. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
  153. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
  154. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
  155. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
  156. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
  157. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
  158. package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
  159. package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
  160. package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
  161. package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
  162. package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
  163. package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
  164. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +41 -22
  165. package/dist/utility/wrun/wrun-batched-marks.util.js +255 -59
  166. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
  167. package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
  168. package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
  169. package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
  170. package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
  171. package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
  172. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
  173. package/dist/utility/wrun/wrun-canvases.util.js +7 -3
  174. package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
  175. package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
  176. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
  177. package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
  178. package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
  179. package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
  180. package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
  181. package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
  182. package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
  183. package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
  184. package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
  185. package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
  186. package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
  187. package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
  188. package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
  189. package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
  190. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
  191. package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
  192. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
  193. package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
  194. package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
  195. package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
  196. package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
  197. package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
  198. package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
  199. package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
  200. package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
  201. package/dist/utility/wrun/wrun-host.service.js +137 -27
  202. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
  203. package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
  204. package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
  205. package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
  206. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
  207. package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
  208. package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
  209. package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
  210. package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
  211. package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
  212. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
  213. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
  214. package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
  215. package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
  216. package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
  217. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
  218. package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
  219. package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
  220. package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
  221. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
  222. package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
  223. package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
  224. package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
  225. package/dist/utility/wrun/wrun-live-tick.util.js +648 -97
  226. package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
  227. package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
  228. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
  229. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
  230. package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
  231. package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
  232. package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
  233. package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
  234. package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
  235. package/dist/utility/wrun/wrun-option-views.util.js +5 -2
  236. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
  237. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
  238. package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
  239. package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
  240. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +75 -11
  241. package/dist/utility/wrun/wrun-overlay-drivers.util.js +176 -43
  242. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
  243. package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
  244. package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
  245. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
  246. package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
  247. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +239 -24
  248. package/dist/utility/wrun/wrun-overlay-run.util.js +2204 -405
  249. package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
  250. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +2 -1
  251. package/dist/utility/wrun/wrun-panel-mount.util.js +20 -14
  252. package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
  253. package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
  254. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
  255. package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
  256. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
  257. package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
  258. package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
  259. package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
  260. package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
  261. package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
  262. package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
  263. package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
  264. package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
  265. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
  266. package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
  267. package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
  268. package/dist/utility/wrun/wrun-refusal.util.js +103 -16
  269. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
  270. package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
  271. package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
  272. package/dist/utility/wrun/wrun-run-health.util.d.ts +89 -2
  273. package/dist/utility/wrun/wrun-run-health.util.js +204 -1
  274. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
  275. package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
  276. package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
  277. package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
  278. package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
  279. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +13 -3
  280. package/dist/utility/wrun/wrun-script-inputs.util.js +51 -13
  281. package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
  282. package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
  283. package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
  284. package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
  285. package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
  286. package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
  287. package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
  288. package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
  289. package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
  290. package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
  291. package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
  292. package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
  293. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
  294. package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
  295. package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
  296. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
  297. package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
  298. package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
  299. package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
  300. package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
  301. package/dist/utility/wrun/wrun-visibility-table.js +9 -0
  302. package/dist/utility/wrun/wrun-volume-profile.util.js +7 -3
  303. package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
  304. package/dist/utils/replay/replay-buffer-math.js +60 -30
  305. package/dist/workers/constants/socket-slots.d.ts +11 -7
  306. package/dist/workers/constants/socket-slots.js +6 -5
  307. 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',
@@ -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 {};
@@ -11,7 +11,8 @@
11
11
  * it), in the record its lane declares for the code (`WrunPollLane.refusedAnswers`, a row-builder lane's in the run's
12
12
  * own table: the tape over the trades worker's cap) when it declares one;
13
13
  * - a run that holds on such a lane settles `held` with `WRUN_LANE_REFUSED_SETTLE_REASON`, so the chart store's
14
- * settings reconcile shows the edit as not applied at once instead of running the same settings again;
14
+ * settings reconcile shows the edit as not applied at once instead of running the same settings again, and the
15
+ * self-heal ladder reads the hold as deterministic (`markWrunLaneRefusedHold`) and never reruns it;
15
16
  * - a live reconcile reads it by what its code declares (`WRUN_LANE_REFUSALS`): a read the plane serves nothing for
16
17
  * is an answer with no new rows (its window covered, the held rows kept, no warning, so the session never widens
17
18
  * its window or warns on every poll); a window over the read's cap holds data the chart lacks, so it stays owed and
@@ -28,6 +29,12 @@ export declare const WRUN_LANE_REFUSED_MARK = "wrun-lane-refused:";
28
29
  export declare function wrunLaneRefusedText(code: string, detail: string): string;
29
30
  /** The code of a named refusal an error (or its text) carries, or undefined for any other failure. */
30
31
  export declare function wrunLaneRefusedCodeOf(error: unknown): string | undefined;
32
+ /** Marks a run's hold on a lane refused by name with that lane's code: its settle and the heal both read it. */
33
+ export declare function markWrunLaneRefusedHold<T extends object>(hold: T, code: string): T;
34
+ /** The lane code a hold on a lane refused by name carries (`markWrunLaneRefusedHold`), else undefined. */
35
+ export declare function wrunLaneRefusedHoldCodeOf(error: unknown): string | undefined;
36
+ /** A book read on a market with no order book (refused NOT_FOUND, k-orderbook.worker): nothing served, any window. */
37
+ export declare const WRUN_NO_ORDER_BOOK_CODE = "no-order-book";
31
38
  /** What a refusal by name says of the window it was asked for. */
32
39
  export type WrunLaneRefusalMeaning =
33
40
  /** The plane serves nothing for this read, on any ask (a switch keeps it off, a series it samples elsewhere only, a
@@ -38,10 +45,10 @@ export type WrunLaneRefusalMeaning =
38
45
  | 'over-cap';
39
46
  /**
40
47
  * Every code a worker twin refuses by name, with what it says of the window (the codes' own modules name them:
41
- * wrun-option-views.util, wrun-protocol-pending.util, wrun-opra-stats.leaf, wrun-opra-flow.leaf, wrun-tape-source.util
42
- * and the twins' literal ask refusals). tests/utility/wrun/wrun-lane-refusal.leaf.spec.ts walks every
43
- * `wrunLaneRefusedText` call in the workers and the package and fails on a code missing here, so a new refusal says
44
- * whether a live reconcile may read its window as covered before it ships.
48
+ * wrun-option-views.util, wrun-protocol-pending.util, wrun-opra-stats.leaf, wrun-opra-flow.leaf, wrun-tape-source.util,
49
+ * this leaf's book code and the twins' literal ask refusals). tests/utility/wrun/wrun-lane-refusal.leaf.spec.ts walks
50
+ * every `wrunLaneRefusedText` call in the workers and the package and fails on a code missing here, so a new refusal
51
+ * says whether a live reconcile may read its window as covered before it ships.
45
52
  */
46
53
  export declare const WRUN_LANE_REFUSALS: Readonly<Record<string, WrunLaneRefusalMeaning>>;
47
54
  /** Whether a refusal by name leaves its window owed (`over-cap`): a live reconcile never reads it as covered. */
@@ -11,7 +11,8 @@
11
11
  * it), in the record its lane declares for the code (`WrunPollLane.refusedAnswers`, a row-builder lane's in the run's
12
12
  * own table: the tape over the trades worker's cap) when it declares one;
13
13
  * - a run that holds on such a lane settles `held` with `WRUN_LANE_REFUSED_SETTLE_REASON`, so the chart store's
14
- * settings reconcile shows the edit as not applied at once instead of running the same settings again;
14
+ * settings reconcile shows the edit as not applied at once instead of running the same settings again, and the
15
+ * self-heal ladder reads the hold as deterministic (`markWrunLaneRefusedHold`) and never reruns it;
15
16
  * - a live reconcile reads it by what its code declares (`WRUN_LANE_REFUSALS`): a read the plane serves nothing for
16
17
  * is an answer with no new rows (its window covered, the held rows kept, no warning, so the session never widens
17
18
  * its window or warns on every poll); a window over the read's cap holds data the chart lacks, so it stays owed and
@@ -38,12 +39,28 @@ export function wrunLaneRefusedCodeOf(error) {
38
39
  return undefined;
39
40
  return WRUN_LANE_REFUSED_RE.exec(text)?.[1];
40
41
  }
42
+ /** Hidden, so a hold's mark never reaches its words, its record or a console line. */
43
+ const WRUN_LANE_REFUSED_HOLD_KEY = 'wrunLaneRefusedHold';
44
+ /** Marks a run's hold on a lane refused by name with that lane's code: its settle and the heal both read it. */
45
+ export function markWrunLaneRefusedHold(hold, code) {
46
+ Object.defineProperty(hold, WRUN_LANE_REFUSED_HOLD_KEY, { value: code, enumerable: false, configurable: true });
47
+ return hold;
48
+ }
49
+ /** The lane code a hold on a lane refused by name carries (`markWrunLaneRefusedHold`), else undefined. */
50
+ export function wrunLaneRefusedHoldCodeOf(error) {
51
+ if (error === null || typeof error !== 'object')
52
+ return undefined;
53
+ const code = error[WRUN_LANE_REFUSED_HOLD_KEY];
54
+ return typeof code === 'string' ? code : undefined;
55
+ }
56
+ /** A book read on a market with no order book (refused NOT_FOUND, k-orderbook.worker): nothing served, any window. */
57
+ export const WRUN_NO_ORDER_BOOK_CODE = 'no-order-book';
41
58
  /**
42
59
  * Every code a worker twin refuses by name, with what it says of the window (the codes' own modules name them:
43
- * wrun-option-views.util, wrun-protocol-pending.util, wrun-opra-stats.leaf, wrun-opra-flow.leaf, wrun-tape-source.util
44
- * and the twins' literal ask refusals). tests/utility/wrun/wrun-lane-refusal.leaf.spec.ts walks every
45
- * `wrunLaneRefusedText` call in the workers and the package and fails on a code missing here, so a new refusal says
46
- * whether a live reconcile may read its window as covered before it ships.
60
+ * wrun-option-views.util, wrun-protocol-pending.util, wrun-opra-stats.leaf, wrun-opra-flow.leaf, wrun-tape-source.util,
61
+ * this leaf's book code and the twins' literal ask refusals). tests/utility/wrun/wrun-lane-refusal.leaf.spec.ts walks
62
+ * every `wrunLaneRefusedText` call in the workers and the package and fails on a code missing here, so a new refusal
63
+ * says whether a live reconcile may read its window as covered before it ships.
47
64
  */
48
65
  export const WRUN_LANE_REFUSALS = Object.freeze({
49
66
  'option-views-ask': 'nothing-served',
@@ -54,6 +71,7 @@ export const WRUN_LANE_REFUSALS = Object.freeze({
54
71
  'options-flow-prints-unserved': 'nothing-served',
55
72
  'option-scope-reads-off': 'nothing-served',
56
73
  'protocol-pending': 'nothing-served',
74
+ [WRUN_NO_ORDER_BOOK_CODE]: 'nothing-served',
57
75
  'tape-too-many-trades': 'over-cap',
58
76
  });
59
77
  /** Whether a refusal by name leaves its window owed (`over-cap`): a live reconcile never reads it as covered. */
@@ -4,9 +4,10 @@
4
4
  *
5
5
  * The cloud plans every chart create through the kit's planner under the `chart-cloud` profile (kscript-backend
6
6
  * `wrunSharedWarmupBars`: `planWrunRun(...).warmup.bars`; its docs/wrun-lane.md, "Warm-up"): the sheet's
7
- * `warmup_bars` (2 when absent), every window-like param's current value (finite, at most 500) and the largest box or
8
- * segment offset, plus one; never below the sheet's scaled `warmup` window; clamped to the profile's
9
- * `caps.warmupBars`. Every ask of that run (the chart's candles, each leg, each lane) starts that many chart bars
7
+ * `warmup_bars` (2 when absent), every window-like param's value (finite, at most 500; its current value, or its
8
+ * declared default when the param is `hidden`) and the largest box or segment offset, plus one; never below the
9
+ * sheet's scaled `warmup` window; clamped to the profile's `caps.warmupBars`. Every ask of that run (the chart's
10
+ * candles, each leg, each lane) starts that many chart bars
10
11
  * before the window (`warmup.evaluateFromMs`), and the rows before the window warm the module without shipping. The
11
12
  * browser lane evaluated from the chart's first loaded bar instead, so its left edge was cold where the cloud's was
12
13
  * warm: RSI's first 14 rows, a 1h-pinned RSI on a 5m chart ready six hours later (its `overbought` 70 is window-like
@@ -19,6 +20,16 @@
19
20
  * the profile refuses, so the rule is mirrored here over the run's own param values (`wrunParamValuesFromSettings`
20
21
  * in wrun-param-values.util: the numbers the cloud's createScript packs) and pinned against the kit's planner by
21
22
  * tests/utility/wrun/wrun-lane-warmup.util.spec.ts: a kit that changes its rule turns that spec red.
23
+ *
24
+ * Why a hidden param reads its default: the rule cannot tell a window from any other plain number, so a value edit
25
+ * moves the run's start, and a start-dependent package (Supertrend's bands) redraws its oldest bars for a setting that
26
+ * has nothing to do with them. A hidden param has no control, so the only way it holds another value is a save from a
27
+ * version that showed it: Supertrend 0.1.2's unused `fill_opacity` of 20 carries onto 0.1.3, hidden there, and held the
28
+ * start 10 bars back with no row left to undo it. Reading the default takes the save out of W without shortening a real
29
+ * window: every sheet at its defaults keeps the W it had, and a hidden lookback is still counted at the value the sheet
30
+ * declares for it, so this is never the same as leaving hidden params out. Visible numbers keep the rule, RSI's
31
+ * `overbought` included: dropping one would cut W for everyone (71 to 15 on RSI) and a sheet has no way to say which is
32
+ * which yet.
22
33
  */
23
34
  import { calendarMonthsOfMs } from '../chart/calendar-interval.util.js';
24
35
  /** The planner's warm-up when the sheet declares no `warmup_bars` (the kit's default). */
@@ -47,6 +58,13 @@ function isWindowLikeParam(param) {
47
58
  return false;
48
59
  return typeof param.type !== 'string' || !NON_WINDOW_PARAM_TYPES.has(param.type);
49
60
  }
61
+ /** The number a window-like param adds to the warm-up: its declared default when hidden, as a saved value there is a
62
+ * leftover no control can reach (see the file comment), else the run's value. */
63
+ function windowParamValue(param, paramValues) {
64
+ if (param.hidden === true)
65
+ return finiteOf(param.default);
66
+ return typeof param.name === 'string' ? paramValues[param.name] : undefined;
67
+ }
50
68
  /**
51
69
  * The cloud's warm-up for a sheet under the run's param values, in chart bars: the kit planner's rule (see the file
52
70
  * comment), clamped to `cap`, the `chart-cloud` profile's `caps.warmupBars` (Infinity is no cap). Never below 0.
@@ -57,7 +75,7 @@ export function wrunLaneWarmupBars(sheet, paramValues, cap) {
57
75
  for (const param of params) {
58
76
  if (!isWindowLikeParam(param))
59
77
  continue;
60
- const value = typeof param.name === 'string' ? paramValues[param.name] : undefined;
78
+ const value = windowParamValue(param, paramValues);
61
79
  if (value === undefined || !Number.isFinite(value) || value > WRUN_LANE_WARMUP_LOOKBACK_CAP)
62
80
  continue;
63
81
  bars = Math.max(bars, Math.ceil(value));