@orangecharts/wrun-chart-host 0.1.0 → 0.3.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 (337) hide show
  1. package/README.md +39 -6
  2. package/dist/constants/common.constants.d.ts +15 -0
  3. package/dist/constants/common.constants.js +23 -0
  4. package/dist/constants/data-source.constants.d.ts +1 -0
  5. package/dist/constants/data-source.constants.js +1 -0
  6. package/dist/constants/economic.constants.d.ts +39 -0
  7. package/dist/constants/economic.constants.js +77 -0
  8. package/dist/constants/etf-covered-coins.constants.d.ts +1 -0
  9. package/dist/constants/etf-covered-coins.constants.js +9 -0
  10. package/dist/constants/feature-flags.constants.d.ts +60 -0
  11. package/dist/constants/feature-flags.constants.js +308 -0
  12. package/dist/constants/feature-limits.constants.d.ts +134 -0
  13. package/dist/constants/feature-limits.constants.js +155 -0
  14. package/dist/constants/marketCapabilities.constants.d.ts +87 -0
  15. package/dist/constants/marketCapabilities.constants.js +213 -0
  16. package/dist/constants/option-venues.constants.d.ts +100 -0
  17. package/dist/constants/option-venues.constants.js +167 -0
  18. package/dist/constants/overlay-data.constants.d.ts +53 -0
  19. package/dist/constants/overlay-data.constants.js +80 -0
  20. package/dist/constants/pane-grid.constants.d.ts +15 -0
  21. package/dist/constants/pane-grid.constants.js +17 -0
  22. package/dist/constants/venue-presets.constants.d.ts +10 -0
  23. package/dist/constants/venue-presets.constants.js +22 -0
  24. package/dist/enums/chart.enum.d.ts +68 -0
  25. package/dist/enums/chart.enum.js +70 -0
  26. package/dist/helpers/data.helpers.d.ts +2 -0
  27. package/dist/helpers/data.helpers.js +14 -0
  28. package/dist/host-env.d.ts +161 -5
  29. package/dist/host-ports.types.d.ts +446 -0
  30. package/dist/host-ports.types.js +1 -0
  31. package/dist/index.d.ts +131 -0
  32. package/dist/index.js +131 -0
  33. package/dist/indicators/controls/technical-script/technical-script-input-rendering.d.ts +86 -0
  34. package/dist/indicators/controls/technical-script/technical-script-input-rendering.js +179 -0
  35. package/dist/interfaces/asset-venue.interface.d.ts +91 -0
  36. package/dist/interfaces/asset-venue.interface.js +1 -0
  37. package/dist/interfaces/cancel-reason.interface.d.ts +24 -0
  38. package/dist/interfaces/cancel-reason.interface.js +2 -0
  39. package/dist/interfaces/catalog-display.interface.d.ts +3 -0
  40. package/dist/interfaces/catalog-display.interface.js +1 -0
  41. package/dist/interfaces/cme-realtime.interface.d.ts +251 -0
  42. package/dist/interfaces/cme-realtime.interface.js +46 -0
  43. package/dist/interfaces/feed.interface.d.ts +80 -0
  44. package/dist/interfaces/feed.interface.js +7 -0
  45. package/dist/interfaces/market-kind.interface.d.ts +8 -0
  46. package/dist/interfaces/market-kind.interface.js +1 -0
  47. package/dist/interfaces/opra-realtime.interface.d.ts +224 -0
  48. package/dist/interfaces/opra-realtime.interface.js +105 -0
  49. package/dist/interfaces/option-instrument.interface.d.ts +32 -0
  50. package/dist/interfaces/option-instrument.interface.js +1 -0
  51. package/dist/interfaces/options-chain-scope.interface.d.ts +29 -0
  52. package/dist/interfaces/options-chain-scope.interface.js +7 -0
  53. package/dist/interfaces/prediction-market.interface.d.ts +88 -0
  54. package/dist/interfaces/prediction-market.interface.js +8 -0
  55. package/dist/interfaces/wrun-runtime.interface.d.ts +5 -0
  56. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +185 -0
  57. package/dist/kscript-data/controls/live-trades-merge.util.js +357 -0
  58. package/dist/settings-templates/frvp-fields.d.ts +27 -0
  59. package/dist/settings-templates/frvp-fields.js +108 -0
  60. package/dist/settings-templates/index.d.ts +119 -0
  61. package/dist/settings-templates/index.js +442 -0
  62. package/dist/settings-templates/indicator-fields.d.ts +56 -0
  63. package/dist/settings-templates/indicator-fields.js +793 -0
  64. package/dist/settings-templates/tool-rules.d.ts +59 -0
  65. package/dist/settings-templates/tool-rules.js +49 -0
  66. package/dist/settings-templates/tool-tables.generated.d.ts +2 -0
  67. package/dist/settings-templates/tool-tables.generated.js +1668 -0
  68. package/dist/utility/blk-market.util.d.ts +5 -0
  69. package/dist/utility/blk-market.util.js +12 -0
  70. package/dist/utility/chart/chart-load-phase.util.d.ts +32 -0
  71. package/dist/utility/chart/chart-load-phase.util.js +78 -0
  72. package/dist/utility/chart/cme-cache-context.util.d.ts +108 -0
  73. package/dist/utility/chart/cme-cache-context.util.js +166 -0
  74. package/dist/utility/chart/cme-session-bucket.util.d.ts +82 -0
  75. package/dist/utility/chart/cme-session-bucket.util.js +343 -0
  76. package/dist/utility/chart/cme-trade-calendar.util.d.ts +26 -0
  77. package/dist/utility/chart/cme-trade-calendar.util.js +147 -0
  78. package/dist/utility/chart/continuous-contracts.util.d.ts +138 -0
  79. package/dist/utility/chart/continuous-contracts.util.js +374 -0
  80. package/dist/utility/chart/feed-interval.util.d.ts +119 -0
  81. package/dist/utility/chart/feed-interval.util.js +321 -0
  82. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +110 -0
  83. package/dist/utility/chart/fetch-dedupe-policy.util.js +407 -0
  84. package/dist/utility/chart/footprint-band.util.d.ts +76 -0
  85. package/dist/utility/chart/footprint-band.util.js +205 -0
  86. package/dist/utility/chart/footprint-cell-identity.util.d.ts +82 -0
  87. package/dist/utility/chart/footprint-cell-identity.util.js +346 -0
  88. package/dist/utility/chart/formula-calendar.util.d.ts +27 -0
  89. package/dist/utility/chart/formula-calendar.util.js +59 -0
  90. package/dist/utility/chart/history-wall.util.d.ts +67 -0
  91. package/dist/utility/chart/history-wall.util.js +87 -0
  92. package/dist/utility/chart/index-mode.util.d.ts +66 -0
  93. package/dist/utility/chart/index-mode.util.js +360 -0
  94. package/dist/utility/chart/indicator-coverage-planner.util.d.ts +217 -0
  95. package/dist/utility/chart/indicator-coverage-planner.util.js +443 -0
  96. package/dist/utility/chart/indicator-coverage-state.util.d.ts +33 -0
  97. package/dist/utility/chart/indicator-coverage-state.util.js +110 -0
  98. package/dist/utility/chart/indicator-gap-detector.util.d.ts +127 -0
  99. package/dist/utility/chart/indicator-gap-detector.util.js +260 -0
  100. package/dist/utility/chart/indicator-gap-repair.util.d.ts +88 -0
  101. package/dist/utility/chart/indicator-gap-repair.util.js +177 -0
  102. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +26 -0
  103. package/dist/utility/chart/indicator-inflight-registry.util.js +254 -0
  104. package/dist/utility/chart/interval-registry.util.d.ts +23 -0
  105. package/dist/utility/chart/interval-registry.util.js +83 -0
  106. package/dist/utility/chart/kscript-main-grid-stages.util.d.ts +21 -0
  107. package/dist/utility/chart/kscript-main-grid-stages.util.js +332 -0
  108. package/dist/utility/chart/legacy-exchange.leaf.d.ts +11 -0
  109. package/dist/utility/chart/legacy-exchange.leaf.js +43 -0
  110. package/dist/utility/chart/live-bucket.util.d.ts +66 -0
  111. package/dist/utility/chart/live-bucket.util.js +165 -0
  112. package/dist/utility/chart/market-session-schedule.util.d.ts +91 -0
  113. package/dist/utility/chart/market-session-schedule.util.js +337 -0
  114. package/dist/utility/chart/marketKind.util.d.ts +181 -0
  115. package/dist/utility/chart/marketKind.util.js +371 -0
  116. package/dist/utility/chart/om-panel.util.js +6 -0
  117. package/dist/utility/chart/om-widget.util.d.ts +4 -0
  118. package/dist/utility/chart/opra-read-access.leaf.d.ts +26 -0
  119. package/dist/utility/chart/opra-read-access.leaf.js +25 -0
  120. package/dist/utility/chart/prediction-identity.util.d.ts +159 -0
  121. package/dist/utility/chart/prediction-identity.util.js +236 -0
  122. package/dist/utility/chart/rth-session.util.d.ts +352 -0
  123. package/dist/utility/chart/rth-session.util.js +926 -0
  124. package/dist/utility/chart/titan-constants.pin.d.ts +43 -0
  125. package/dist/utility/chart/titan-constants.pin.js +50 -0
  126. package/dist/utility/chart/us-equities-session.util.d.ts +127 -0
  127. package/dist/utility/chart/us-equities-session.util.js +251 -0
  128. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +100 -0
  129. package/dist/utility/chart/wrun-bar-session-facts.util.js +354 -0
  130. package/dist/utility/chart/wrun-run-result.util.js +10 -0
  131. package/dist/utility/chart/wrun-wire-ref.util.d.ts +23 -0
  132. package/dist/utility/chart/wrun-wire-ref.util.js +16 -0
  133. package/dist/utility/common/safe-math-eval.d.ts +18 -0
  134. package/dist/utility/common/safe-math-eval.js +160 -0
  135. package/dist/utility/common/time.util.d.ts +134 -0
  136. package/dist/utility/common/time.util.js +428 -0
  137. package/dist/utility/common/transformations.util.d.ts +126 -0
  138. package/dist/utility/common/transformations.util.js +711 -0
  139. package/dist/utility/common/visible-timeout.util.d.ts +17 -0
  140. package/dist/utility/common/visible-timeout.util.js +75 -0
  141. package/dist/utility/exchange-normalization.util.d.ts +8 -0
  142. package/dist/utility/exchange-normalization.util.js +32 -0
  143. package/dist/utility/intl-locale.util.d.ts +2 -0
  144. package/dist/utility/intl-locale.util.js +28 -0
  145. package/dist/utility/number-format.util.d.ts +14 -1
  146. package/dist/utility/number-format.util.js +50 -19
  147. package/dist/utility/options/option-symbol.util.d.ts +28 -0
  148. package/dist/utility/options/option-symbol.util.js +176 -0
  149. package/dist/utility/options/option-trade-units.util.d.ts +190 -0
  150. package/dist/utility/options/option-trade-units.util.js +283 -0
  151. package/dist/utility/options/option-venue.util.d.ts +75 -0
  152. package/dist/utility/options/option-venue.util.js +85 -0
  153. package/dist/utility/pool-symbol.leaf.d.ts +34 -0
  154. package/dist/utility/pool-symbol.leaf.js +95 -0
  155. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +109 -0
  156. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +302 -0
  157. package/dist/utility/symbol-selection/contract-expiry.util.d.ts +39 -0
  158. package/dist/utility/symbol-selection/contract-expiry.util.js +111 -0
  159. package/dist/utility/v2/gate-plane.util.d.ts +58 -0
  160. package/dist/utility/v2/gate-plane.util.js +99 -0
  161. package/dist/utility/v2/gate-session-latch.util.d.ts +22 -0
  162. package/dist/utility/v2/gate-session-latch.util.js +34 -0
  163. package/dist/utility/watchlist/import/tradingview-symbols.leaf.d.ts +76 -0
  164. package/dist/utility/watchlist/import/tradingview-symbols.leaf.js +221 -0
  165. package/dist/utility/wrun/sources/host-grid-landing.d.ts +15 -0
  166. package/dist/utility/wrun/sources/host-grid-landing.js +26 -0
  167. package/dist/utility/wrun/sources/lanes/bitfinex_funding.d.ts +27 -0
  168. package/dist/utility/wrun/sources/lanes/bitfinex_funding.js +85 -0
  169. package/dist/utility/wrun/sources/lanes/economic.d.ts +27 -0
  170. package/dist/utility/wrun/sources/lanes/economic.js +79 -0
  171. package/dist/utility/wrun/sources/lanes/etf_holdings.d.ts +35 -0
  172. package/dist/utility/wrun/sources/lanes/etf_holdings.js +165 -0
  173. package/dist/utility/wrun/sources/lanes/etf_premium.d.ts +19 -0
  174. package/dist/utility/wrun/sources/lanes/etf_premium.js +114 -0
  175. package/dist/utility/wrun/sources/lanes/ethena_positions.d.ts +30 -0
  176. package/dist/utility/wrun/sources/lanes/ethena_positions.js +51 -0
  177. package/dist/utility/wrun/sources/lanes/index.d.ts +2 -0
  178. package/dist/utility/wrun/sources/lanes/index.js +32 -0
  179. package/dist/utility/wrun/sources/lanes/long_short_ratio.d.ts +17 -0
  180. package/dist/utility/wrun/sources/lanes/long_short_ratio.js +47 -0
  181. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +30 -0
  182. package/dist/utility/wrun/sources/lanes/option_daily.js +53 -0
  183. package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +23 -0
  184. package/dist/utility/wrun/sources/lanes/option_stats_10m.js +20 -0
  185. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +50 -0
  186. package/dist/utility/wrun/sources/lanes/options_flow.js +155 -0
  187. package/dist/utility/wrun/sources/lanes/options_oi.d.ts +29 -0
  188. package/dist/utility/wrun/sources/lanes/options_oi.js +59 -0
  189. package/dist/utility/wrun/sources/lanes/options_volume.d.ts +38 -0
  190. package/dist/utility/wrun/sources/lanes/options_volume.js +63 -0
  191. package/dist/utility/wrun/sources/lanes/series.d.ts +67 -0
  192. package/dist/utility/wrun/sources/lanes/series.js +321 -0
  193. package/dist/utility/wrun/sources/lanes/token_supply.d.ts +30 -0
  194. package/dist/utility/wrun/sources/lanes/token_supply.js +145 -0
  195. package/dist/utility/wrun/sources/lanes/treasury_balance.d.ts +25 -0
  196. package/dist/utility/wrun/sources/lanes/treasury_balance.js +47 -0
  197. package/dist/utility/wrun/sources/lanes/volatility_index.d.ts +21 -0
  198. package/dist/utility/wrun/sources/lanes/volatility_index.js +11 -0
  199. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +196 -0
  200. package/dist/utility/wrun/sources/opra-option-lanes.util.js +446 -0
  201. package/dist/utility/wrun/sources/registry.d.ts +21 -0
  202. package/dist/utility/wrun/sources/registry.js +207 -0
  203. package/dist/utility/wrun/sources/row-lane-registry.d.ts +28 -0
  204. package/dist/utility/wrun/sources/row-lane-registry.js +230 -0
  205. package/dist/utility/wrun/sources/row-lanes/index.d.ts +2 -0
  206. package/dist/utility/wrun/sources/row-lanes/index.js +12 -0
  207. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +2 -0
  208. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +38 -0
  209. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +6 -0
  210. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +70 -0
  211. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +4 -0
  212. package/dist/utility/wrun/sources/row-lanes/option_prints.js +191 -0
  213. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +13 -0
  214. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +137 -0
  215. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +38 -0
  216. package/dist/utility/wrun/sources/row-lanes/option_surface.js +150 -0
  217. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +275 -0
  218. package/dist/utility/wrun/sources/wrun-poll-lane.types.js +26 -0
  219. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +224 -0
  220. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +394 -0
  221. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +283 -0
  222. package/dist/utility/wrun/sources/wrun-row-lane.types.js +16 -0
  223. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +205 -0
  224. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +469 -0
  225. package/dist/utility/wrun/wrun-browser-sources.leaf.d.ts +28 -0
  226. package/dist/utility/wrun/wrun-browser-sources.leaf.js +66 -0
  227. package/dist/utility/wrun/wrun-cloud-record.util.d.ts +65 -0
  228. package/dist/utility/wrun/wrun-cloud-record.util.js +121 -0
  229. package/dist/utility/wrun/wrun-color-settings.util.js +1 -1
  230. package/dist/utility/wrun/wrun-daily-lane.util.d.ts +95 -0
  231. package/dist/utility/wrun/wrun-daily-lane.util.js +297 -0
  232. package/dist/utility/wrun/wrun-deadline.util.d.ts +52 -0
  233. package/dist/utility/wrun/wrun-deadline.util.js +82 -0
  234. package/dist/utility/wrun/wrun-etf-flow-lane.util.d.ts +94 -0
  235. package/dist/utility/wrun/wrun-etf-flow-lane.util.js +224 -0
  236. package/dist/utility/wrun/wrun-etf-funds.util.d.ts +82 -0
  237. package/dist/utility/wrun/wrun-etf-funds.util.js +242 -0
  238. package/dist/utility/wrun/wrun-failure-cause.d.ts +39 -0
  239. package/dist/utility/wrun/wrun-failure-cause.js +94 -0
  240. package/dist/utility/wrun/wrun-frames.d.ts +28 -3
  241. package/dist/utility/wrun/wrun-frames.js +132 -52
  242. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +167 -4
  243. package/dist/utility/wrun/wrun-hosted-wire-caps.js +47 -2
  244. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +5 -2
  245. package/dist/utility/wrun/wrun-hosted-wire.util.js +4 -2
  246. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +22 -0
  247. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +32 -0
  248. package/dist/utility/wrun/wrun-lane-warmup.util.d.ts +18 -0
  249. package/dist/utility/wrun/wrun-lane-warmup.util.js +112 -0
  250. package/dist/utility/wrun/wrun-leg-close.util.d.ts +57 -0
  251. package/dist/utility/wrun/wrun-leg-close.util.js +187 -0
  252. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +144 -0
  253. package/dist/utility/wrun/wrun-leg-fetch.util.js +212 -0
  254. package/dist/utility/wrun/wrun-leg-stream-classes.d.ts +73 -0
  255. package/dist/utility/wrun/wrun-leg-stream-classes.js +86 -0
  256. package/dist/utility/wrun/wrun-levels-child.util.d.ts +101 -6
  257. package/dist/utility/wrun/wrun-levels-child.util.js +335 -157
  258. package/dist/utility/wrun/wrun-memory-clamp.util.d.ts +33 -0
  259. package/dist/utility/wrun/wrun-memory-clamp.util.js +146 -0
  260. package/dist/utility/wrun/wrun-odds-template-market.util.d.ts +51 -0
  261. package/dist/utility/wrun/wrun-odds-template-market.util.js +251 -0
  262. package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +65 -0
  263. package/dist/utility/wrun/wrun-opra-flow.leaf.js +94 -0
  264. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +47 -0
  265. package/dist/utility/wrun/wrun-opra-lane.util.js +58 -0
  266. package/dist/utility/wrun/wrun-opra-stats.leaf.d.ts +30 -0
  267. package/dist/utility/wrun/wrun-opra-stats.leaf.js +96 -0
  268. package/dist/utility/wrun/wrun-opra-underlying.util.d.ts +12 -0
  269. package/dist/utility/wrun/wrun-opra-underlying.util.js +1 -0
  270. package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +142 -0
  271. package/dist/utility/wrun/wrun-option-contract-flow.util.js +451 -0
  272. package/dist/utility/wrun/wrun-option-knobs.util.d.ts +43 -0
  273. package/dist/utility/wrun/wrun-option-knobs.util.js +81 -0
  274. package/dist/utility/wrun/wrun-option-prints.util.d.ts +144 -0
  275. package/dist/utility/wrun/wrun-option-prints.util.js +356 -0
  276. package/dist/utility/wrun/wrun-option-summary-lane.util.d.ts +102 -0
  277. package/dist/utility/wrun/wrun-option-summary-lane.util.js +143 -0
  278. package/dist/utility/wrun/wrun-options-chain.util.d.ts +308 -0
  279. package/dist/utility/wrun/wrun-options-chain.util.js +502 -0
  280. package/dist/utility/wrun/wrun-overlay-identity.util.d.ts +9 -4
  281. package/dist/utility/wrun/wrun-overlay-identity.util.js +16 -6
  282. package/dist/utility/wrun/wrun-pack.util.d.ts +6 -2
  283. package/dist/utility/wrun/wrun-pack.util.js +13 -3
  284. package/dist/utility/wrun/wrun-param-map.util.d.ts +298 -0
  285. package/dist/utility/wrun/wrun-param-map.util.js +581 -0
  286. package/dist/utility/wrun/wrun-param-values.util.d.ts +8 -0
  287. package/dist/utility/wrun/wrun-param-values.util.js +8 -0
  288. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +149 -0
  289. package/dist/utility/wrun/wrun-pin-spelling.util.js +523 -0
  290. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +116 -0
  291. package/dist/utility/wrun/wrun-pin-venues.util.js +320 -0
  292. package/dist/utility/wrun/wrun-pinned-interval.util.d.ts +20 -0
  293. package/dist/utility/wrun/wrun-pinned-interval.util.js +47 -0
  294. package/dist/utility/wrun/wrun-present-bits.util.d.ts +37 -0
  295. package/dist/utility/wrun/wrun-present-bits.util.js +73 -0
  296. package/dist/utility/wrun/wrun-protocol-pending.util.d.ts +33 -0
  297. package/dist/utility/wrun/wrun-protocol-pending.util.js +57 -0
  298. package/dist/utility/wrun/wrun-refusal.util.d.ts +95 -7
  299. package/dist/utility/wrun/wrun-refusal.util.js +314 -18
  300. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +1 -14
  301. package/dist/utility/wrun/wrun-registry-errors.util.js +0 -16
  302. package/dist/utility/wrun/wrun-render-select.util.js +1 -0
  303. package/dist/utility/wrun/wrun-row-market.util.d.ts +29 -0
  304. package/dist/utility/wrun/wrun-row-market.util.js +92 -0
  305. package/dist/utility/wrun/wrun-row-source.d.ts +158 -0
  306. package/dist/utility/wrun/wrun-row-source.js +75 -0
  307. package/dist/utility/wrun/wrun-run-health.util.d.ts +155 -0
  308. package/dist/utility/wrun/wrun-run-health.util.js +273 -0
  309. package/dist/utility/wrun/wrun-socket-row-source.d.ts +439 -0
  310. package/dist/utility/wrun/wrun-socket-row-source.js +1689 -0
  311. package/dist/utility/wrun/wrun-socket-session-losses.util.d.ts +18 -0
  312. package/dist/utility/wrun/wrun-socket-session-losses.util.js +25 -0
  313. package/dist/utility/wrun/wrun-source-rows.util.d.ts +911 -0
  314. package/dist/utility/wrun/wrun-source-rows.util.js +2597 -0
  315. package/dist/utility/wrun/wrun-symbol-code.util.d.ts +32 -0
  316. package/dist/utility/wrun/wrun-symbol-code.util.js +56 -0
  317. package/dist/utility/wrun/wrun-tape-source.util.d.ts +82 -0
  318. package/dist/utility/wrun/wrun-tape-source.util.js +151 -0
  319. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +137 -0
  320. package/dist/utility/wrun/wrun-tier-grid.util.js +279 -0
  321. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +52 -0
  322. package/dist/utility/wrun/wrun-trades-lane.util.js +58 -0
  323. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +41 -0
  324. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +66 -0
  325. package/dist/utility/wrun-display-name.util.d.ts +33 -0
  326. package/dist/utility/wrun-display-name.util.js +64 -0
  327. package/dist/workers/constants/kscript-transport-codes.d.ts +15 -0
  328. package/dist/workers/constants/kscript-transport-codes.js +15 -0
  329. package/dist/workers/constants/socket-slots.d.ts +574 -0
  330. package/dist/workers/constants/socket-slots.js +539 -0
  331. package/dist/workers/utils/number.worker.util.d.ts +5 -0
  332. package/dist/workers/utils/number.worker.util.js +10 -0
  333. package/dist/workers/utils/time.worker.util.d.ts +12 -0
  334. package/dist/workers/utils/time.worker.util.js +24 -0
  335. package/dist/workers/utils/volume-profile.worker.util.d.ts +200 -0
  336. package/dist/workers/utils/volume-profile.worker.util.js +631 -0
  337. package/package.json +10 -4
@@ -2,6 +2,7 @@ import { isPanelClearFrame, parseSetPanelData } from '../chart/om-panel.util.js'
2
2
  import { wrunChartHostEnv } from '../../host-env.js';
3
3
  import { isWrunColorWord, WRUN_FONT_WEIGHTS } from './wrun-style-words.util.js';
4
4
  import { wrunPlainText } from './wrun-text-params.util.js';
5
+ import { parseWrunRowMarkets, wrunRowMarketsLengthMessage } from './wrun-row-market.util.js';
5
6
  export const WRUN_FRAME_DEFAULT_MAX_BYTES = 98_304;
6
7
  export const WRUN_FRAME_MAX_SLOTS = 8;
7
8
  // ---------------------------------------------------------------------------
@@ -146,7 +147,8 @@ function frameObject(raw, slot, keys) {
146
147
  // ---------------------------------------------------------------------------
147
148
  // Levels frames (g2, g6 DL-time-anchored)
148
149
  // ---------------------------------------------------------------------------
149
- const LEVELS_PANE_KEYS = [
150
+ /** The pane frame's keys (the kit's `WrunLevelsPaneFrameSchema`, pinned by the kit mirror spec). */
151
+ export const WRUN_LEVELS_PANE_KEYS = [
150
152
  'prices',
151
153
  'values',
152
154
  'colors',
@@ -161,7 +163,22 @@ const LEVELS_PANE_KEYS = [
161
163
  'scale_max',
162
164
  ];
163
165
  const LEVELS_SPANS_KEYS = ['spans'];
164
- const LEVELS_SPAN_KEYS = ['start', 'end', 'prices', 'values', 'colors'];
166
+ /** A span's keys: its bounds and rows, then the pane frame's per-row and
167
+ * per-profile fields a span carries for itself (kit 0.86.0). The pane-only
168
+ * fields stay off a span: `lows` / `highs` (cells 4 and 5 hold the span's
169
+ * bounds), `tooltips` and `scale_max`. Exported for the kit mirror spec. */
170
+ export const WRUN_LEVELS_SPAN_KEYS = [
171
+ 'start',
172
+ 'end',
173
+ 'prices',
174
+ 'values',
175
+ 'colors',
176
+ 'labels_text',
177
+ 'series',
178
+ 'value_area',
179
+ 'poc_price',
180
+ 'poc_label_text',
181
+ ];
165
182
  /** `prices`: 1..512 finite numbers. */
166
183
  function levelPrices(value, at, path) {
167
184
  const message = `prices must list 1 to ${WRUN_MAX_LEVEL_ROWS} prices`;
@@ -182,18 +199,64 @@ function levelBand(value, key, at) {
182
199
  return at([key], `${key} must list a price or null per price`);
183
200
  return value.map((entry, i) => finiteOrNull(entry) ? entry : at([key, i], `${key} must list finite numbers or null`));
184
201
  }
202
+ // The fields a pane frame and a span share parse through one reader each,
203
+ // at the pane frame's root (`base` empty) or at the span's path, so a span
204
+ // refuses exactly as the pane frame does (`spans.1.labels_text.0: ...`).
185
205
  /** A per-row list of bounded texts or nulls (`labels_text`, `tooltips`). */
186
- function levelTexts(value, key, max, at) {
206
+ function levelTexts(value, key, max, at, base = []) {
187
207
  if (!Array.isArray(value))
188
- return at([key], `${key} must list a text or null per price`);
189
- return value.map((entry, i) => entry === null || text(entry, max, 0) ? entry : at([key, i], `a ${key} entry takes at most ${max} characters`));
208
+ return at([...base, key], `${key} must list a text or null per price`);
209
+ return value.map((entry, i) => entry === null || text(entry, max, 0)
210
+ ? entry
211
+ : at([...base, key, i], `a ${key} entry takes at most ${max} characters`));
190
212
  }
191
- function lengthMatchesPrices(key, list, rows, at) {
213
+ /** `series` (DL-stacked): 1..8 arrays of finite numbers or nulls. */
214
+ function levelSeries(value, at, base = []) {
215
+ if (!Array.isArray(value) || value.length < 1 || value.length > WRUN_MAX_LEVEL_SERIES) {
216
+ at([...base, 'series'], `series must list 1 to ${WRUN_MAX_LEVEL_SERIES} arrays`);
217
+ }
218
+ return value.map((entry, k) => {
219
+ if (!Array.isArray(entry))
220
+ return at([...base, 'series', k], 'series must list arrays of finite numbers or null');
221
+ return entry.map((cell, i) => finiteOrNull(cell) ? cell : at([...base, 'series', k, i], 'series must list finite numbers or null'));
222
+ });
223
+ }
224
+ /** `value_area` (DL-value-area): `[low, high]`, two finite prices. */
225
+ function levelValueArea(value, at, base = []) {
226
+ if (!Array.isArray(value) || value.length !== 2 || !value.every(finite)) {
227
+ at([...base, 'value_area'], 'value_area must be [low, high], two prices');
228
+ }
229
+ return [value[0], value[1]];
230
+ }
231
+ /** `poc_price` (DL-poc): a finite number. */
232
+ function levelPocPrice(value, at, base = []) {
233
+ return finite(value) ? value : at([...base, 'poc_price'], 'poc_price must be a finite number');
234
+ }
235
+ /** `poc_label_text` (DL-poc): 1..24 characters. */
236
+ function levelPocLabelText(value, at, base = []) {
237
+ return text(value, WRUN_MAX_LEVEL_LABEL_CHARS)
238
+ ? value
239
+ : at([...base, 'poc_label_text'], `poc_label_text takes 1 to ${WRUN_MAX_LEVEL_LABEL_CHARS} characters`);
240
+ }
241
+ function lengthMatchesPrices(key, list, rows, at, base = []) {
192
242
  if (list !== undefined && list.length !== rows)
193
- at([key], `${key} length must match prices`);
243
+ at([...base, key], `${key} length must match prices`);
244
+ }
245
+ /** `series[k]` lengths against the rows, in the kit's order. */
246
+ function seriesLengthsMatchPrices(series, rows, at, base = []) {
247
+ series?.forEach((entry, k) => {
248
+ if (entry.length !== rows)
249
+ at([...base, 'series', k], `series[${k}] length must match prices`);
250
+ });
251
+ }
252
+ /** A value area's order: low below high. */
253
+ function valueAreaOrdered(area, at, base = []) {
254
+ if (area !== undefined && area[0] >= area[1]) {
255
+ at([...base, 'value_area'], 'value_area must be [low, high] with low below high');
256
+ }
194
257
  }
195
258
  function parseLevelsPaneFrame(frame, at) {
196
- const unknown = unknownKey(frame, LEVELS_PANE_KEYS);
259
+ const unknown = unknownKey(frame, WRUN_LEVELS_PANE_KEYS);
197
260
  if (unknown !== undefined)
198
261
  at([], `unknown frame key '${unknown}'`);
199
262
  const prices = levelPrices(frame.prices, at, ['prices']);
@@ -209,17 +272,8 @@ function parseLevelsPaneFrame(frame, at) {
209
272
  if (frame.labels_text !== undefined) {
210
273
  parsed.labels_text = levelTexts(frame.labels_text, 'labels_text', WRUN_MAX_LEVEL_LABEL_CHARS, at);
211
274
  }
212
- if (frame.series !== undefined) {
213
- const series = frame.series;
214
- if (!Array.isArray(series) || series.length < 1 || series.length > WRUN_MAX_LEVEL_SERIES) {
215
- at(['series'], `series must list 1 to ${WRUN_MAX_LEVEL_SERIES} arrays`);
216
- }
217
- parsed.series = series.map((entry, k) => {
218
- if (!Array.isArray(entry))
219
- return at(['series', k], 'series must list arrays of finite numbers or null');
220
- return entry.map((cell, i) => finiteOrNull(cell) ? cell : at(['series', k, i], 'series must list finite numbers or null'));
221
- });
222
- }
275
+ if (frame.series !== undefined)
276
+ parsed.series = levelSeries(frame.series, at);
223
277
  if (frame.lows !== undefined)
224
278
  parsed.lows = levelBand(frame.lows, 'lows', at);
225
279
  if (frame.highs !== undefined)
@@ -227,24 +281,12 @@ function parseLevelsPaneFrame(frame, at) {
227
281
  if (frame.tooltips !== undefined) {
228
282
  parsed.tooltips = levelTexts(frame.tooltips, 'tooltips', WRUN_MAX_LEVEL_TOOLTIP_CHARS, at);
229
283
  }
230
- if (frame.value_area !== undefined) {
231
- const area = frame.value_area;
232
- if (!Array.isArray(area) || area.length !== 2 || !area.every(finite)) {
233
- at(['value_area'], 'value_area must be [low, high], two prices');
234
- }
235
- parsed.value_area = [area[0], area[1]];
236
- }
237
- if (frame.poc_price !== undefined) {
238
- if (!finite(frame.poc_price))
239
- at(['poc_price'], 'poc_price must be a finite number');
240
- parsed.poc_price = frame.poc_price;
241
- }
242
- if (frame.poc_label_text !== undefined) {
243
- if (!text(frame.poc_label_text, WRUN_MAX_LEVEL_LABEL_CHARS)) {
244
- at(['poc_label_text'], `poc_label_text takes 1 to ${WRUN_MAX_LEVEL_LABEL_CHARS} characters`);
245
- }
246
- parsed.poc_label_text = frame.poc_label_text;
247
- }
284
+ if (frame.value_area !== undefined)
285
+ parsed.value_area = levelValueArea(frame.value_area, at);
286
+ if (frame.poc_price !== undefined)
287
+ parsed.poc_price = levelPocPrice(frame.poc_price, at);
288
+ if (frame.poc_label_text !== undefined)
289
+ parsed.poc_label_text = levelPocLabelText(frame.poc_label_text, at);
248
290
  if (frame.scale_max !== undefined) {
249
291
  if (!finite(frame.scale_max) || frame.scale_max <= 0) {
250
292
  at(['scale_max'], 'scale_max must be a number greater than 0');
@@ -259,10 +301,7 @@ function parseLevelsPaneFrame(frame, at) {
259
301
  lengthMatchesPrices('tooltips', parsed.tooltips, rows, at);
260
302
  lengthMatchesPrices('lows', parsed.lows, rows, at);
261
303
  lengthMatchesPrices('highs', parsed.highs, rows, at);
262
- parsed.series?.forEach((entry, k) => {
263
- if (entry.length !== rows)
264
- at(['series', k], `series[${k}] length must match prices`);
265
- });
304
+ seriesLengthsMatchPrices(parsed.series, rows, at);
266
305
  const broken = monotonicBreak(prices);
267
306
  if (broken >= 0)
268
307
  at(['prices', broken], 'prices must be strictly monotonic');
@@ -282,9 +321,7 @@ function parseLevelsPaneFrame(frame, at) {
282
321
  }
283
322
  }
284
323
  }
285
- if (parsed.value_area !== undefined && parsed.value_area[0] >= parsed.value_area[1]) {
286
- at(['value_area'], 'value_area must be [low, high] with low below high');
287
- }
324
+ valueAreaOrdered(parsed.value_area, at);
288
325
  return parsed;
289
326
  }
290
327
  function parseLevelsSpansFrame(frame, at) {
@@ -299,7 +336,7 @@ function parseLevelsSpansFrame(frame, at) {
299
336
  const path = ['spans', k];
300
337
  if (!record(span))
301
338
  return at(path, 'a span is an object of start, end, prices and values');
302
- const foreign = unknownKey(span, LEVELS_SPAN_KEYS);
339
+ const foreign = unknownKey(span, WRUN_LEVELS_SPAN_KEYS);
303
340
  if (foreign !== undefined)
304
341
  at(path, `unknown span key '${foreign}'`);
305
342
  const { start, end } = span;
@@ -317,16 +354,34 @@ function parseLevelsSpansFrame(frame, at) {
317
354
  }
318
355
  entry.colors = colors.map((color, i) => isWrunColorWord(color) ? color : at([...path, 'colors', i], WRUN_COLOR_WORD_MESSAGE));
319
356
  }
357
+ // The per-span fields, read by the pane frame's own readers at the span's path.
358
+ if (span.labels_text !== undefined) {
359
+ entry.labels_text = levelTexts(span.labels_text, 'labels_text', WRUN_MAX_LEVEL_LABEL_CHARS, at, path);
360
+ }
361
+ if (span.series !== undefined)
362
+ entry.series = levelSeries(span.series, at, path);
363
+ if (span.value_area !== undefined)
364
+ entry.value_area = levelValueArea(span.value_area, at, path);
365
+ if (span.poc_price !== undefined)
366
+ entry.poc_price = levelPocPrice(span.poc_price, at, path);
367
+ if (span.poc_label_text !== undefined)
368
+ entry.poc_label_text = levelPocLabelText(span.poc_label_text, at, path);
369
+ // The cross-field rules, in the kit's order.
370
+ const rows = prices.length;
320
371
  if (end <= start)
321
372
  at([...path, 'end'], 'end must be after start');
322
- if (values.length !== prices.length)
323
- at([...path, 'values'], 'values length must match prices');
324
- if (entry.colors !== undefined && entry.colors.length !== prices.length) {
325
- at([...path, 'colors'], 'colors length must match prices');
373
+ lengthMatchesPrices('values', values, rows, at, path);
374
+ lengthMatchesPrices('colors', entry.colors, rows, at, path);
375
+ lengthMatchesPrices('labels_text', entry.labels_text, rows, at, path);
376
+ seriesLengthsMatchPrices(entry.series, rows, at, path);
377
+ // A segmented span takes its series colours (the pane frame's DL-stacked rule, a grammar rule on a span).
378
+ if (entry.colors !== undefined && entry.series !== undefined) {
379
+ at([...path, 'colors'], 'colors and series do not mix: a segmented row takes its series colours');
326
380
  }
327
381
  const broken = monotonicBreak(prices);
328
382
  if (broken >= 0)
329
383
  at([...path, 'prices', broken], 'prices must be strictly monotonic');
384
+ valueAreaOrdered(entry.value_area, at, path);
330
385
  return entry;
331
386
  });
332
387
  const rows = parsed.reduce((sum, span) => sum + span.prices.length, 0);
@@ -387,6 +442,7 @@ export const WRUN_PANEL_FRAME_WORD_KINDS = {
387
442
  summary: ['heatmap'],
388
443
  hole_text: ['pie'],
389
444
  hole_caption: ['pie'],
445
+ markets: ['table'],
390
446
  };
391
447
  const PANEL_FRAME_WORDS = Object.keys(WRUN_PANEL_FRAME_WORD_KINDS);
392
448
  /** The frame keys this panel's kind accepts beside `rows`. */
@@ -709,6 +765,15 @@ export function parseWrunPanelChrome(frame, declaration, slot) {
709
765
  case 'hole_caption':
710
766
  chrome[word] = panelText(value, word, WRUN_PANEL_MAX_LABEL_CHARS, at, [word]);
711
767
  break;
768
+ case 'markets': {
769
+ // The entries here; their count against the rows once the rows parsed (parseWrunPanelFrame).
770
+ const parsed = parseWrunRowMarkets(value, 'row', Array.isArray(value) ? value.length : 0);
771
+ if ('message' in parsed)
772
+ at(parsed.path, parsed.message);
773
+ else
774
+ chrome.markets = parsed.markets;
775
+ break;
776
+ }
712
777
  }
713
778
  }
714
779
  refinePanelChrome(declaration, chrome, at);
@@ -736,13 +801,16 @@ export function parseWrunPanelFrame(raw, slot, declaration) {
736
801
  return invalidWrunFrame(slot, result.rejectReason);
737
802
  if (isPanelClearFrame(result.data))
738
803
  return invalidWrunFrame(slot, 'unexpected clear frame');
804
+ if (chrome.markets !== undefined && chrome.markets.length !== result.data.rows.length) {
805
+ refuser(slot)(['markets'], wrunRowMarketsLengthMessage('row', result.data.rows.length));
806
+ }
739
807
  return Object.keys(chrome).length > 0 ? { ...result.data, chrome } : result.data;
740
808
  }
741
809
  // ---------------------------------------------------------------------------
742
810
  // Ladder and feed frames (g3 DW15, DW38)
743
811
  // ---------------------------------------------------------------------------
744
812
  const LADDER_KEYS = ['rows', 'divider', 'title'];
745
- const FEED_KEYS = ['lines', 'title'];
813
+ const FEED_KEYS = ['lines', 'title', 'markets'];
746
814
  const DIVIDER_KEYS = ['label', 'price'];
747
815
  const WIDGET_TITLE_MESSAGE = `title takes 1 to ${WRUN_MAX_WIDGET_TITLE_CHARS} characters`;
748
816
  function widgetTitle(value, at) {
@@ -793,7 +861,7 @@ export function parseWrunFeedFrame(raw, slot) {
793
861
  const unknown = unknownKey(frame, FEED_KEYS);
794
862
  if (unknown !== undefined)
795
863
  at([], `unknown frame key '${unknown}'`);
796
- const { lines, title } = frame;
864
+ const { lines, title, markets } = frame;
797
865
  if (!Array.isArray(lines) || lines.length < 1 || lines.length > WRUN_MAX_FEED_LINES) {
798
866
  return invalidWrunFrame(slot, `lines must contain 1..${WRUN_MAX_FEED_LINES} feed entries`);
799
867
  }
@@ -811,7 +879,19 @@ export function parseWrunFeedFrame(raw, slot) {
811
879
  at(['lines', k, 2], WRUN_COLOR_WORD_MESSAGE);
812
880
  return [...line];
813
881
  });
814
- return { lines: parsedLines, ...(title !== undefined ? { title: widgetTitle(title, at) } : {}) };
882
+ let parsedMarkets;
883
+ if (markets !== undefined) {
884
+ const parsed = parseWrunRowMarkets(markets, 'line', parsedLines.length);
885
+ if ('message' in parsed)
886
+ at(parsed.path, parsed.message);
887
+ else
888
+ parsedMarkets = parsed.markets;
889
+ }
890
+ return {
891
+ lines: parsedLines,
892
+ ...(title !== undefined ? { title: widgetTitle(title, at) } : {}),
893
+ ...(parsedMarkets !== undefined ? { markets: parsedMarkets } : {}),
894
+ };
815
895
  }
816
896
  // ---------------------------------------------------------------------------
817
897
  // Matrix frames (g6 MX-price-matrix)
@@ -131,8 +131,9 @@ export interface WrunServerAnswerFrame {
131
131
  /** One frame's verdict and what decided it. */
132
132
  export interface WrunServerAnswer {
133
133
  verdict: WrunServerAnswerVerdict;
134
- /** The table row that decided (the catalog spec and the debug ring name it). */
135
- row: string;
134
+ /** The table row that decided (the catalog spec and the debug ring name it; a failure's cause names it as
135
+ * `server:<row>`, wrun-failure-cause). */
136
+ row: WrunServerAnswerRowId;
136
137
  /** The frame's own code, when it carried one. */
137
138
  frameCode?: string;
138
139
  /** The refusal the frame names: its relayed details, an older server's leading code, the no-candles answer. */
@@ -146,6 +147,167 @@ export interface WrunServerAnswer {
146
147
  /** No row knows the frame's code (or the refusal's): shown as a refusal that names it. */
147
148
  unknownCode?: true;
148
149
  }
150
+ /**
151
+ * The table, first match wins, one row per answer of kscript-backend's catalog. The order keeps the precedence
152
+ * the readers kept before it existed: a superseded create first; the answers off the request path by their
153
+ * reason; the retried refusals on any frame; `INTERNAL` and `FORBIDDEN` over any refusal they carry; the
154
+ * remembered refusals; an eligibility frame over the kit's stage of a refusal it carries; the kit's stages; then
155
+ * the uncoded frames by code and sentence, and the fallback. Its row ids are the closed set a failure's cause
156
+ * names a cloud answer by (`server:<row>`, WRUN_SERVER_ANSWER_ROW_IDS below): typed from the rows themselves, so a
157
+ * row added here is a cause word with no second list to keep.
158
+ */
159
+ declare const WRUN_SERVER_ANSWER_ROWS: readonly [{
160
+ readonly id: "superseded";
161
+ readonly verdict: "stale";
162
+ readonly reason: "superseded";
163
+ }, {
164
+ readonly id: "superseded-run";
165
+ readonly verdict: "stale";
166
+ readonly codes: ReadonlySet<string>;
167
+ readonly message: RegExp;
168
+ }, {
169
+ readonly id: "superseded-preflight";
170
+ readonly verdict: "stale";
171
+ readonly codes: ReadonlySet<string>;
172
+ readonly message: RegExp;
173
+ }, {
174
+ readonly id: "source-withdrawn";
175
+ readonly verdict: "show";
176
+ readonly reason: "source-access-withdrawn";
177
+ }, {
178
+ readonly id: "test-run-busy";
179
+ readonly verdict: "retry";
180
+ readonly reason: "wrun-test-run-busy";
181
+ }, {
182
+ readonly id: "test-run";
183
+ readonly verdict: "show";
184
+ readonly reason: ReadonlySet<string>;
185
+ }, {
186
+ readonly id: "no-candles";
187
+ readonly verdict: "retry";
188
+ readonly refusal: ReadonlySet<string>;
189
+ }, {
190
+ readonly id: "tab-full";
191
+ readonly verdict: "retry";
192
+ readonly refusal: ReadonlySet<string>;
193
+ }, {
194
+ readonly id: "rebind-busy";
195
+ readonly verdict: "retry";
196
+ readonly refusal: ReadonlySet<string>;
197
+ }, {
198
+ readonly id: "internal";
199
+ readonly verdict: "retry";
200
+ readonly codes: ReadonlySet<string>;
201
+ }, {
202
+ readonly id: "capability-denied";
203
+ readonly verdict: "retry";
204
+ readonly codes: ReadonlySet<string>;
205
+ readonly reason: "capability-invalid";
206
+ }, {
207
+ readonly id: "capability-denied-words";
208
+ readonly verdict: "retry";
209
+ readonly codes: ReadonlySet<string>;
210
+ readonly message: RegExp;
211
+ }, {
212
+ readonly id: "enterprise-principal";
213
+ readonly verdict: "fatal";
214
+ readonly codes: ReadonlySet<string>;
215
+ readonly message: RegExp;
216
+ }, {
217
+ readonly id: "forbidden";
218
+ readonly verdict: "show";
219
+ readonly codes: ReadonlySet<string>;
220
+ }, {
221
+ readonly id: "window-sized";
222
+ readonly verdict: "show";
223
+ readonly refusal: ReadonlySet<string>;
224
+ readonly memory: "window";
225
+ }, {
226
+ readonly id: "identity";
227
+ readonly verdict: "show";
228
+ readonly refusal: ReadonlySet<string>;
229
+ readonly memory: "identity";
230
+ }, {
231
+ readonly id: "source-unsupported";
232
+ readonly verdict: "show";
233
+ readonly codes: ReadonlySet<string>;
234
+ readonly memory: "identity";
235
+ }, {
236
+ readonly id: "eligibility";
237
+ readonly verdict: "show";
238
+ readonly codes: ReadonlySet<string>;
239
+ }, {
240
+ readonly id: "support-protocol";
241
+ readonly verdict: "fatal";
242
+ readonly codes: ReadonlySet<string>;
243
+ }, {
244
+ readonly id: "coded";
245
+ readonly verdict: "show";
246
+ readonly refusal: "known";
247
+ }, {
248
+ readonly id: "coded-unknown";
249
+ readonly verdict: "show";
250
+ readonly refusal: "any";
251
+ readonly unknownCode: true;
252
+ }, {
253
+ readonly id: "malformed-request";
254
+ readonly verdict: "fatal";
255
+ readonly codes: ReadonlySet<string>;
256
+ readonly message: RegExp;
257
+ }, {
258
+ readonly id: "latest-too-large";
259
+ readonly verdict: "fatal";
260
+ readonly codes: ReadonlySet<string>;
261
+ readonly message: RegExp;
262
+ }, {
263
+ readonly id: "bad-request-transient";
264
+ readonly verdict: "retry";
265
+ readonly codes: ReadonlySet<string>;
266
+ readonly message: RegExp;
267
+ }, {
268
+ readonly id: "latest-busy";
269
+ readonly verdict: "retry";
270
+ readonly codes: ReadonlySet<string>;
271
+ readonly message: RegExp;
272
+ }, {
273
+ readonly id: "bad-request";
274
+ readonly verdict: "show";
275
+ readonly codes: ReadonlySet<string>;
276
+ }, {
277
+ readonly id: "token-expired";
278
+ readonly verdict: "retry";
279
+ readonly codes: ReadonlySet<string>;
280
+ readonly message: RegExp;
281
+ }, {
282
+ readonly id: "unauthorized";
283
+ readonly verdict: "show";
284
+ readonly codes: ReadonlySet<string>;
285
+ }, {
286
+ readonly id: "script-timeout";
287
+ readonly verdict: "show";
288
+ readonly codes: ReadonlySet<string>;
289
+ }, {
290
+ readonly id: "protocol";
291
+ readonly verdict: "fatal";
292
+ readonly codes: ReadonlySet<string>;
293
+ }];
294
+ /** The answer for a frame code no row knows: a refusal shown with its code. */
295
+ declare const UNKNOWN_CODE_ROW: {
296
+ readonly id: "unknown-code";
297
+ readonly verdict: "show";
298
+ readonly unknownCode: true;
299
+ };
300
+ /** The id of an answer-table row: one of the table's rows, or the fallback for a code no row knows. */
301
+ export type WrunServerAnswerRowId = (typeof WRUN_SERVER_ANSWER_ROWS)[number]['id'] | (typeof UNKNOWN_CODE_ROW)['id'];
302
+ /**
303
+ * Every answer-table row id, in the table's order with the fallback last: the closed set a cloud answer's failure
304
+ * cause names (`server:<row>`, wrun-failure-cause). docs/features/diagnostics/analytics-taxonomy/events.md lists
305
+ * them on its `WRUN_FAILURE_SERVER_ROWS:` line, pinned two-way by tests/utility/wrun/wrun-failure-cause.util.spec.ts.
306
+ */
307
+ export declare const WRUN_SERVER_ANSWER_ROW_IDS: readonly WrunServerAnswerRowId[];
308
+ /** The verdict an answer-table row gives (`retry`: the same ask may pass), or undefined for a word that names no
309
+ * row. */
310
+ export declare function wrunServerAnswerRowVerdict(row: string): WrunServerAnswerVerdict | undefined;
149
311
  /**
150
312
  * The verdict of one error frame (see the table above): undefined for a value that names neither a frame code
151
313
  * nor a coded refusal (no server answer at all). A frame code no row knows answers `show` with `unknownCode`.
@@ -178,8 +340,8 @@ export declare function wrunFrameRefusalMemory(text: string): 'window' | 'identi
178
340
  * by name.
179
341
  */
180
342
  export declare const WRUN_KIT_REFUSAL_STAGES: {
181
- 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"];
182
- readonly plan: readonly ["wrun_options_coin_unknown", "wrun_source_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_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_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_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_option_knob_invalid", "wrun_option_market_pinned", "wrun_option_prints_min_premium_required", "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_stats_10m_unsupported", "wrun_option_surface_unsupported", "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_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"];
183
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"];
184
346
  readonly pack: readonly ["wrun_cell_block_invalid", "wrun_run_cells_too_large", "wrun_cell_block_too_large"];
185
347
  readonly align: readonly ["wrun_densify_empty_fetch", "wrun_densify_mixed_phase", "wrun_liquidation_side_unmatched", "wrun_bound_series_empty", "wrun_cell_data_malformed"];
@@ -216,3 +378,4 @@ export declare function wrunForeignSupersedeOf(output: unknown): WrunStaleAnswer
216
378
  export declare function onWrunAnswerStale(note: WrunStaleAnswerNote): void;
217
379
  /** Subscribe to the stale-settle hook (onWrunAnswerStale); returns the unsubscribe. */
218
380
  export declare function subscribeWrunAnswerStale(listener: (note: WrunStaleAnswerNote) => void): () => void;
381
+ export {};
@@ -258,7 +258,9 @@ const codes = (...names) => new Set(names);
258
258
  * the readers kept before it existed: a superseded create first; the answers off the request path by their
259
259
  * reason; the retried refusals on any frame; `INTERNAL` and `FORBIDDEN` over any refusal they carry; the
260
260
  * remembered refusals; an eligibility frame over the kit's stage of a refusal it carries; the kit's stages; then
261
- * the uncoded frames by code and sentence, and the fallback.
261
+ * the uncoded frames by code and sentence, and the fallback. Its row ids are the closed set a failure's cause
262
+ * names a cloud answer by (`server:<row>`, WRUN_SERVER_ANSWER_ROW_IDS below): typed from the rows themselves, so a
263
+ * row added here is a cause word with no second list to keep.
262
264
  */
263
265
  const WRUN_SERVER_ANSWER_ROWS = [
264
266
  // A create the server superseded: the reason a newer server names, else the sentence it answers with.
@@ -335,7 +337,23 @@ const WRUN_SERVER_ANSWER_ROWS = [
335
337
  { id: 'protocol', verdict: 'fatal', codes: codes('NOT_FOUND', 'TIME_RANGE_INVALID', 'UNKNOWN_MESSAGE') },
336
338
  ];
337
339
  /** The answer for a frame code no row knows: a refusal shown with its code. */
338
- const UNKNOWN_CODE_ROW = { id: 'unknown-code', verdict: 'show', unknownCode: true };
340
+ const UNKNOWN_CODE_ROW = {
341
+ id: 'unknown-code',
342
+ verdict: 'show',
343
+ unknownCode: true,
344
+ };
345
+ /**
346
+ * Every answer-table row id, in the table's order with the fallback last: the closed set a cloud answer's failure
347
+ * cause names (`server:<row>`, wrun-failure-cause). docs/features/diagnostics/analytics-taxonomy/events.md lists
348
+ * them on its `WRUN_FAILURE_SERVER_ROWS:` line, pinned two-way by tests/utility/wrun/wrun-failure-cause.util.spec.ts.
349
+ */
350
+ export const WRUN_SERVER_ANSWER_ROW_IDS = Object.freeze([...WRUN_SERVER_ANSWER_ROWS, UNKNOWN_CODE_ROW].map((row) => row.id));
351
+ const ROW_VERDICTS = new Map([...WRUN_SERVER_ANSWER_ROWS, UNKNOWN_CODE_ROW].map((row) => [row.id, row.verdict]));
352
+ /** The verdict an answer-table row gives (`retry`: the same ask may pass), or undefined for a word that names no
353
+ * row. */
354
+ export function wrunServerAnswerRowVerdict(row) {
355
+ return ROW_VERDICTS.get(row);
356
+ }
339
357
  function textOf(value) {
340
358
  return typeof value === 'string' && value !== '' ? value : undefined;
341
359
  }
@@ -490,10 +508,34 @@ export const WRUN_KIT_REFUSAL_STAGES = {
490
508
  'wrun_strategy_slippage_model_unsupported',
491
509
  'wrun_strategy_reserved_output',
492
510
  'wrun_tape_min_size_invalid',
511
+ // kit 0.81 to 0.85 (UW-PARITY): the US listed options classes' knobs, pins and venues.
512
+ 'wrun_option_knob_invalid',
513
+ 'wrun_option_market_pinned',
514
+ 'wrun_option_prints_min_premium_required',
515
+ 'wrun_options_flow_venue_field',
516
+ 'wrun_options_flow_venue_required',
517
+ 'wrun_options_flow_venue_scope',
518
+ // kit 0.86.0 (WRUN-OI-PROFILE): a leg stream needs its interval and is never the primary.
519
+ 'wrun_oi_candles_interval_required',
520
+ 'wrun_oi_candles_primary',
521
+ 'wrun_volume_profile_candles_interval_required',
522
+ 'wrun_volume_profile_candles_primary',
493
523
  ],
494
524
  plan: [
495
525
  'wrun_options_coin_unknown',
496
526
  'wrun_source_unsupported',
527
+ // kit 0.81 to 0.85 (UW-PARITY): the OPRA lanes, the official-only gate and each options class a host refuses.
528
+ 'wrun_not_in_10m_universe',
529
+ 'wrun_opra_lane_refused',
530
+ 'wrun_opra_official_only',
531
+ 'wrun_option_contract_flow_unsupported',
532
+ 'wrun_option_contract_state_unsupported',
533
+ 'wrun_option_daily_unsupported',
534
+ 'wrun_option_prints_one_acquisition',
535
+ 'wrun_option_prints_unsupported',
536
+ 'wrun_option_stats_10m_unsupported',
537
+ 'wrun_option_surface_unsupported',
538
+ 'wrun_options_flow_unsupported',
497
539
  'wrun_field_unsupported',
498
540
  'wrun_tenor_unsupported',
499
541
  'wrun_view_unsupported',
@@ -514,6 +556,9 @@ export const WRUN_KIT_REFUSAL_STAGES = {
514
556
  'wrun_intrabar_unsupported',
515
557
  'wrun_candles_bars_over_cap',
516
558
  'wrun_candles_ratio_over_cap',
559
+ // kit 0.86.0 (WRUN-OI-PROFILE): a host that does not serve a leg stream class.
560
+ 'wrun_oi_candles_unsupported',
561
+ 'wrun_volume_profile_candles_unsupported',
517
562
  'wrun_trade_volume_by_size_unsupported',
518
563
  'wrun_view_leg_off_grid',
519
564
  'wrun_view_leg_equal',
@@ -34,7 +34,10 @@ export interface WrunHostedRunLevel {
34
34
  * served from the history wall, `{ fetchKey, askedStartMs, servedStartMs, note }`, on a create or range reply
35
35
  * only), unread; absent when it has none. */
36
36
  wrunServedLegs?: unknown;
37
+ /** The reply's OPRA mark (UW-PARITY contract opra-server-lanes 10b): true when the run's plan reads OPRA, on every
38
+ * frame of such a run. Only the JSON boolean `true` counts; anything else reads as absent. */
39
+ wrunOpra?: true;
37
40
  }
38
- /** Read a reply's run-level keys beside the wire: each own key exactly as the reply carries it, never a key
39
- * inside `wrunHost`. A reply that is not a record carries none. */
41
+ /** Read a reply's run-level keys beside the wire: each own key exactly as the reply carries it (the OPRA mark only as
42
+ * the boolean `true`), never a key inside `wrunHost`. A reply that is not a record carries none. */
40
43
  export declare function readWrunHostedRunLevel(output: unknown): WrunHostedRunLevel;
@@ -6,8 +6,8 @@ export async function readWrunHostedWire(output) {
6
6
  const { decodeWrunHostedWire } = await wrunChartHostEnv().loadSharedHost();
7
7
  return decodeWrunHostedWire(output);
8
8
  }
9
- /** Read a reply's run-level keys beside the wire: each own key exactly as the reply carries it, never a key
10
- * inside `wrunHost`. A reply that is not a record carries none. */
9
+ /** Read a reply's run-level keys beside the wire: each own key exactly as the reply carries it (the OPRA mark only as
10
+ * the boolean `true`), never a key inside `wrunHost`. A reply that is not a record carries none. */
11
11
  export function readWrunHostedRunLevel(output) {
12
12
  if (!isRecord(output))
13
13
  return {};
@@ -20,6 +20,8 @@ export function readWrunHostedRunLevel(output) {
20
20
  if (Object.hasOwn(output, 'wrunServedLegs') && output.wrunServedLegs !== undefined) {
21
21
  level.wrunServedLegs = output.wrunServedLegs;
22
22
  }
23
+ if (Object.hasOwn(output, 'wrunOpra') && output.wrunOpra === true)
24
+ level.wrunOpra = true;
23
25
  return level;
24
26
  }
25
27
  function isRecord(value) {
@@ -0,0 +1,22 @@
1
+ /**
2
+ * A source lane's answer the data plane REFUSED BY NAME: a backend switch that keeps a read off (the OPTION_PRINT_AGG
3
+ * flow scope reads while `read.option_print_scopes` is off), or a series the data plane holds for a configured list
4
+ * only (OPTION_UNDERLYING_STATS's ten-minute rows). The same ask is refused again until the plane changes, so it is
5
+ * no transport failure to retry:
6
+ *
7
+ * - the worker twin that met the refusal ends its stream with an error whose text carries the mark and a stable code
8
+ * (`wrunLaneRefusedText`), and the main thread reads the code back off whatever error wraps that text on its way
9
+ * (`wrunLaneRefusedCodeOf`: the transport keeps the worker's words);
10
+ * - the run degrades the lane under its name, terminally (the chip says the source is missing and no ladder re-asks
11
+ * it), in the record its lane declares for the code (`WrunPollLane.refusedAnswers`) when it declares one;
12
+ * - a live reconcile reads it as an answer with no new rows: its window covered, the held rows kept, no warning, so
13
+ * the session never widens its window or warns on every poll.
14
+ *
15
+ * Import-free: the worker twins and the main thread read the same mark.
16
+ */
17
+ /** The mark a named refusal's text carries before its code. */
18
+ export declare const WRUN_LANE_REFUSED_MARK = "wrun-lane-refused:";
19
+ /** The text a worker twin ends a refused read with: the mark, the code (lower case, digits and dashes), the detail. */
20
+ export declare function wrunLaneRefusedText(code: string, detail: string): string;
21
+ /** The code of a named refusal an error (or its text) carries, or undefined for any other failure. */
22
+ export declare function wrunLaneRefusedCodeOf(error: unknown): string | undefined;