@orangecharts/wrun-chart-host 0.2.0 → 0.4.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 (342) hide show
  1. package/README.md +22 -8
  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/scriptEditor/builtin-script-snippets.d.ts +133 -0
  23. package/dist/constants/scriptEditor/builtin-script-snippets.js +451 -0
  24. package/dist/constants/venue-presets.constants.d.ts +10 -0
  25. package/dist/constants/venue-presets.constants.js +22 -0
  26. package/dist/enums/chart.enum.d.ts +68 -0
  27. package/dist/enums/chart.enum.js +70 -0
  28. package/dist/helpers/data.helpers.d.ts +2 -0
  29. package/dist/helpers/data.helpers.js +14 -0
  30. package/dist/host-env.d.ts +163 -5
  31. package/dist/host-ports.types.d.ts +431 -0
  32. package/dist/host-ports.types.js +1 -0
  33. package/dist/index.d.ts +138 -0
  34. package/dist/index.js +138 -0
  35. package/dist/indicators/controls/technical-script/technical-script-input-rendering.d.ts +86 -0
  36. package/dist/indicators/controls/technical-script/technical-script-input-rendering.js +179 -0
  37. package/dist/interfaces/asset-venue.interface.d.ts +91 -0
  38. package/dist/interfaces/asset-venue.interface.js +1 -0
  39. package/dist/interfaces/cancel-reason.interface.d.ts +24 -0
  40. package/dist/interfaces/cancel-reason.interface.js +2 -0
  41. package/dist/interfaces/catalog-display.interface.d.ts +3 -0
  42. package/dist/interfaces/catalog-display.interface.js +1 -0
  43. package/dist/interfaces/cme-realtime.interface.d.ts +251 -0
  44. package/dist/interfaces/cme-realtime.interface.js +46 -0
  45. package/dist/interfaces/feed.interface.d.ts +80 -0
  46. package/dist/interfaces/feed.interface.js +7 -0
  47. package/dist/interfaces/market-kind.interface.d.ts +8 -0
  48. package/dist/interfaces/market-kind.interface.js +1 -0
  49. package/dist/interfaces/opra-realtime.interface.d.ts +224 -0
  50. package/dist/interfaces/opra-realtime.interface.js +105 -0
  51. package/dist/interfaces/option-instrument.interface.d.ts +32 -0
  52. package/dist/interfaces/option-instrument.interface.js +1 -0
  53. package/dist/interfaces/options-chain-scope.interface.d.ts +29 -0
  54. package/dist/interfaces/options-chain-scope.interface.js +7 -0
  55. package/dist/interfaces/prediction-market.interface.d.ts +88 -0
  56. package/dist/interfaces/prediction-market.interface.js +8 -0
  57. package/dist/interfaces/wrun-runtime.interface.d.ts +5 -0
  58. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +185 -0
  59. package/dist/kscript-data/controls/live-trades-merge.util.js +357 -0
  60. package/dist/settings-templates/frvp-fields.d.ts +27 -0
  61. package/dist/settings-templates/frvp-fields.js +108 -0
  62. package/dist/settings-templates/index.d.ts +119 -0
  63. package/dist/settings-templates/index.js +442 -0
  64. package/dist/settings-templates/indicator-fields.d.ts +56 -0
  65. package/dist/settings-templates/indicator-fields.js +793 -0
  66. package/dist/settings-templates/tool-rules.d.ts +59 -0
  67. package/dist/settings-templates/tool-rules.js +49 -0
  68. package/dist/settings-templates/tool-tables.generated.d.ts +2 -0
  69. package/dist/settings-templates/tool-tables.generated.js +1668 -0
  70. package/dist/utility/blk-market.util.d.ts +5 -0
  71. package/dist/utility/blk-market.util.js +12 -0
  72. package/dist/utility/chart/chart-load-phase.util.d.ts +32 -0
  73. package/dist/utility/chart/chart-load-phase.util.js +78 -0
  74. package/dist/utility/chart/cme-cache-context.util.d.ts +108 -0
  75. package/dist/utility/chart/cme-cache-context.util.js +166 -0
  76. package/dist/utility/chart/cme-session-bucket.util.d.ts +82 -0
  77. package/dist/utility/chart/cme-session-bucket.util.js +343 -0
  78. package/dist/utility/chart/cme-trade-calendar.util.d.ts +26 -0
  79. package/dist/utility/chart/cme-trade-calendar.util.js +147 -0
  80. package/dist/utility/chart/continuous-contracts.util.d.ts +138 -0
  81. package/dist/utility/chart/continuous-contracts.util.js +374 -0
  82. package/dist/utility/chart/date-labelled-interval.leaf.d.ts +15 -0
  83. package/dist/utility/chart/date-labelled-interval.leaf.js +19 -0
  84. package/dist/utility/chart/feed-interval.util.d.ts +119 -0
  85. package/dist/utility/chart/feed-interval.util.js +321 -0
  86. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +110 -0
  87. package/dist/utility/chart/fetch-dedupe-policy.util.js +407 -0
  88. package/dist/utility/chart/footprint-band.util.d.ts +76 -0
  89. package/dist/utility/chart/footprint-band.util.js +205 -0
  90. package/dist/utility/chart/footprint-cell-identity.util.d.ts +82 -0
  91. package/dist/utility/chart/footprint-cell-identity.util.js +346 -0
  92. package/dist/utility/chart/formula-calendar.util.d.ts +27 -0
  93. package/dist/utility/chart/formula-calendar.util.js +59 -0
  94. package/dist/utility/chart/history-wall.util.d.ts +67 -0
  95. package/dist/utility/chart/history-wall.util.js +87 -0
  96. package/dist/utility/chart/index-mode.util.d.ts +66 -0
  97. package/dist/utility/chart/index-mode.util.js +360 -0
  98. package/dist/utility/chart/indicator-coverage-planner.util.d.ts +217 -0
  99. package/dist/utility/chart/indicator-coverage-planner.util.js +443 -0
  100. package/dist/utility/chart/indicator-coverage-state.util.d.ts +33 -0
  101. package/dist/utility/chart/indicator-coverage-state.util.js +110 -0
  102. package/dist/utility/chart/indicator-gap-detector.util.d.ts +127 -0
  103. package/dist/utility/chart/indicator-gap-detector.util.js +260 -0
  104. package/dist/utility/chart/indicator-gap-repair.util.d.ts +88 -0
  105. package/dist/utility/chart/indicator-gap-repair.util.js +177 -0
  106. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +26 -0
  107. package/dist/utility/chart/indicator-inflight-registry.util.js +254 -0
  108. package/dist/utility/chart/indicator-run-interval.util.d.ts +130 -0
  109. package/dist/utility/chart/indicator-run-interval.util.js +268 -0
  110. package/dist/utility/chart/interval-registry.util.d.ts +23 -0
  111. package/dist/utility/chart/interval-registry.util.js +83 -0
  112. package/dist/utility/chart/kscript-main-grid-stages.util.d.ts +21 -0
  113. package/dist/utility/chart/kscript-main-grid-stages.util.js +332 -0
  114. package/dist/utility/chart/legacy-exchange.leaf.d.ts +11 -0
  115. package/dist/utility/chart/legacy-exchange.leaf.js +43 -0
  116. package/dist/utility/chart/live-bucket.util.d.ts +66 -0
  117. package/dist/utility/chart/live-bucket.util.js +165 -0
  118. package/dist/utility/chart/market-session-schedule.util.d.ts +91 -0
  119. package/dist/utility/chart/market-session-schedule.util.js +337 -0
  120. package/dist/utility/chart/marketKind.util.d.ts +181 -0
  121. package/dist/utility/chart/marketKind.util.js +371 -0
  122. package/dist/utility/chart/opra-read-access.leaf.d.ts +26 -0
  123. package/dist/utility/chart/opra-read-access.leaf.js +25 -0
  124. package/dist/utility/chart/prediction-identity.util.d.ts +159 -0
  125. package/dist/utility/chart/prediction-identity.util.js +236 -0
  126. package/dist/utility/chart/rth-session.util.d.ts +352 -0
  127. package/dist/utility/chart/rth-session.util.js +926 -0
  128. package/dist/utility/chart/titan-constants.pin.d.ts +43 -0
  129. package/dist/utility/chart/titan-constants.pin.js +50 -0
  130. package/dist/utility/chart/us-equities-session.util.d.ts +127 -0
  131. package/dist/utility/chart/us-equities-session.util.js +251 -0
  132. package/dist/utility/chart/window-geometry.leaf.d.ts +119 -0
  133. package/dist/utility/chart/window-geometry.leaf.js +391 -0
  134. package/dist/utility/chart/window-owner.leaf.d.ts +19 -0
  135. package/dist/utility/chart/window-owner.leaf.js +24 -0
  136. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +100 -0
  137. package/dist/utility/chart/wrun-bar-session-facts.util.js +354 -0
  138. package/dist/utility/chart/wrun-wire-ref.util.d.ts +23 -0
  139. package/dist/utility/chart/wrun-wire-ref.util.js +16 -0
  140. package/dist/utility/common/safe-math-eval.d.ts +18 -0
  141. package/dist/utility/common/safe-math-eval.js +160 -0
  142. package/dist/utility/common/time.util.d.ts +134 -0
  143. package/dist/utility/common/time.util.js +428 -0
  144. package/dist/utility/common/transformations.util.d.ts +126 -0
  145. package/dist/utility/common/transformations.util.js +711 -0
  146. package/dist/utility/common/visible-timeout.util.d.ts +17 -0
  147. package/dist/utility/common/visible-timeout.util.js +75 -0
  148. package/dist/utility/exchange-normalization.util.d.ts +8 -0
  149. package/dist/utility/exchange-normalization.util.js +32 -0
  150. package/dist/utility/html-escape.leaf.d.ts +11 -0
  151. package/dist/utility/html-escape.leaf.js +20 -0
  152. package/dist/utility/intl-locale.util.d.ts +2 -0
  153. package/dist/utility/intl-locale.util.js +28 -0
  154. package/dist/utility/number-format.util.d.ts +14 -1
  155. package/dist/utility/number-format.util.js +50 -19
  156. package/dist/utility/options/option-symbol.util.d.ts +28 -0
  157. package/dist/utility/options/option-symbol.util.js +176 -0
  158. package/dist/utility/options/option-trade-units.util.d.ts +190 -0
  159. package/dist/utility/options/option-trade-units.util.js +283 -0
  160. package/dist/utility/options/option-venue.util.d.ts +75 -0
  161. package/dist/utility/options/option-venue.util.js +85 -0
  162. package/dist/utility/pool-symbol.leaf.d.ts +34 -0
  163. package/dist/utility/pool-symbol.leaf.js +95 -0
  164. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +109 -0
  165. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +302 -0
  166. package/dist/utility/symbol-selection/contract-expiry.util.d.ts +39 -0
  167. package/dist/utility/symbol-selection/contract-expiry.util.js +111 -0
  168. package/dist/utility/v2/gate-plane.util.d.ts +58 -0
  169. package/dist/utility/v2/gate-plane.util.js +99 -0
  170. package/dist/utility/v2/gate-session-latch.util.d.ts +22 -0
  171. package/dist/utility/v2/gate-session-latch.util.js +34 -0
  172. package/dist/utility/watchlist/import/tradingview-symbols.leaf.d.ts +76 -0
  173. package/dist/utility/watchlist/import/tradingview-symbols.leaf.js +221 -0
  174. package/dist/utility/wrun/sources/host-grid-landing.d.ts +15 -0
  175. package/dist/utility/wrun/sources/host-grid-landing.js +26 -0
  176. package/dist/utility/wrun/sources/lanes/bitfinex_funding.d.ts +27 -0
  177. package/dist/utility/wrun/sources/lanes/bitfinex_funding.js +85 -0
  178. package/dist/utility/wrun/sources/lanes/economic.d.ts +27 -0
  179. package/dist/utility/wrun/sources/lanes/economic.js +79 -0
  180. package/dist/utility/wrun/sources/lanes/etf_holdings.d.ts +35 -0
  181. package/dist/utility/wrun/sources/lanes/etf_holdings.js +165 -0
  182. package/dist/utility/wrun/sources/lanes/etf_premium.d.ts +19 -0
  183. package/dist/utility/wrun/sources/lanes/etf_premium.js +114 -0
  184. package/dist/utility/wrun/sources/lanes/ethena_positions.d.ts +30 -0
  185. package/dist/utility/wrun/sources/lanes/ethena_positions.js +51 -0
  186. package/dist/utility/wrun/sources/lanes/index.d.ts +2 -0
  187. package/dist/utility/wrun/sources/lanes/index.js +32 -0
  188. package/dist/utility/wrun/sources/lanes/long_short_ratio.d.ts +17 -0
  189. package/dist/utility/wrun/sources/lanes/long_short_ratio.js +47 -0
  190. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +58 -0
  191. package/dist/utility/wrun/sources/lanes/option_daily.js +111 -0
  192. package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +27 -0
  193. package/dist/utility/wrun/sources/lanes/option_stats_10m.js +21 -0
  194. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +50 -0
  195. package/dist/utility/wrun/sources/lanes/options_flow.js +155 -0
  196. package/dist/utility/wrun/sources/lanes/options_oi.d.ts +29 -0
  197. package/dist/utility/wrun/sources/lanes/options_oi.js +59 -0
  198. package/dist/utility/wrun/sources/lanes/options_volume.d.ts +38 -0
  199. package/dist/utility/wrun/sources/lanes/options_volume.js +63 -0
  200. package/dist/utility/wrun/sources/lanes/series.d.ts +67 -0
  201. package/dist/utility/wrun/sources/lanes/series.js +321 -0
  202. package/dist/utility/wrun/sources/lanes/token_supply.d.ts +30 -0
  203. package/dist/utility/wrun/sources/lanes/token_supply.js +145 -0
  204. package/dist/utility/wrun/sources/lanes/treasury_balance.d.ts +25 -0
  205. package/dist/utility/wrun/sources/lanes/treasury_balance.js +47 -0
  206. package/dist/utility/wrun/sources/lanes/volatility_index.d.ts +21 -0
  207. package/dist/utility/wrun/sources/lanes/volatility_index.js +11 -0
  208. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +215 -0
  209. package/dist/utility/wrun/sources/opra-option-lanes.util.js +477 -0
  210. package/dist/utility/wrun/sources/registry.d.ts +21 -0
  211. package/dist/utility/wrun/sources/registry.js +237 -0
  212. package/dist/utility/wrun/sources/row-lane-registry.d.ts +28 -0
  213. package/dist/utility/wrun/sources/row-lane-registry.js +230 -0
  214. package/dist/utility/wrun/sources/row-lanes/index.d.ts +2 -0
  215. package/dist/utility/wrun/sources/row-lanes/index.js +12 -0
  216. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +2 -0
  217. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +38 -0
  218. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +55 -0
  219. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +126 -0
  220. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +4 -0
  221. package/dist/utility/wrun/sources/row-lanes/option_prints.js +191 -0
  222. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +62 -0
  223. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +147 -0
  224. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +70 -0
  225. package/dist/utility/wrun/sources/row-lanes/option_surface.js +144 -0
  226. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +309 -0
  227. package/dist/utility/wrun/sources/wrun-poll-lane.types.js +26 -0
  228. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +350 -0
  229. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +576 -0
  230. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +275 -0
  231. package/dist/utility/wrun/sources/wrun-row-lane.types.js +16 -0
  232. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +207 -0
  233. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +450 -0
  234. package/dist/utility/wrun/wrun-browser-sources.leaf.d.ts +28 -0
  235. package/dist/utility/wrun/wrun-browser-sources.leaf.js +66 -0
  236. package/dist/utility/wrun/wrun-cloud-record.util.d.ts +65 -0
  237. package/dist/utility/wrun/wrun-cloud-record.util.js +121 -0
  238. package/dist/utility/wrun/wrun-daily-lane.util.d.ts +95 -0
  239. package/dist/utility/wrun/wrun-daily-lane.util.js +297 -0
  240. package/dist/utility/wrun/wrun-deadline.util.d.ts +52 -0
  241. package/dist/utility/wrun/wrun-deadline.util.js +82 -0
  242. package/dist/utility/wrun/wrun-etf-flow-lane.util.d.ts +94 -0
  243. package/dist/utility/wrun/wrun-etf-flow-lane.util.js +224 -0
  244. package/dist/utility/wrun/wrun-etf-funds.util.d.ts +82 -0
  245. package/dist/utility/wrun/wrun-etf-funds.util.js +242 -0
  246. package/dist/utility/wrun/wrun-frames.d.ts +20 -1
  247. package/dist/utility/wrun/wrun-frames.js +103 -49
  248. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  249. package/dist/utility/wrun/wrun-hosted-wire-caps.js +27 -0
  250. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +22 -0
  251. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +32 -0
  252. package/dist/utility/wrun/wrun-lane-warmup.util.d.ts +18 -0
  253. package/dist/utility/wrun/wrun-lane-warmup.util.js +112 -0
  254. package/dist/utility/wrun/wrun-leg-close.util.d.ts +57 -0
  255. package/dist/utility/wrun/wrun-leg-close.util.js +187 -0
  256. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +144 -0
  257. package/dist/utility/wrun/wrun-leg-fetch.util.js +212 -0
  258. package/dist/utility/wrun/wrun-leg-stream-classes.d.ts +73 -0
  259. package/dist/utility/wrun/wrun-leg-stream-classes.js +86 -0
  260. package/dist/utility/wrun/wrun-levels-child.util.d.ts +101 -6
  261. package/dist/utility/wrun/wrun-levels-child.util.js +335 -157
  262. package/dist/utility/wrun/wrun-memory-clamp.util.d.ts +33 -0
  263. package/dist/utility/wrun/wrun-memory-clamp.util.js +146 -0
  264. package/dist/utility/wrun/wrun-odds-template-market.util.d.ts +51 -0
  265. package/dist/utility/wrun/wrun-odds-template-market.util.js +251 -0
  266. package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +65 -0
  267. package/dist/utility/wrun/wrun-opra-flow.leaf.js +94 -0
  268. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +47 -0
  269. package/dist/utility/wrun/wrun-opra-lane.util.js +58 -0
  270. package/dist/utility/wrun/wrun-opra-stats.leaf.d.ts +49 -0
  271. package/dist/utility/wrun/wrun-opra-stats.leaf.js +115 -0
  272. package/dist/utility/wrun/wrun-opra-underlying.util.d.ts +12 -0
  273. package/dist/utility/wrun/wrun-opra-underlying.util.js +1 -0
  274. package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +142 -0
  275. package/dist/utility/wrun/wrun-option-contract-flow.util.js +451 -0
  276. package/dist/utility/wrun/wrun-option-knobs.util.d.ts +43 -0
  277. package/dist/utility/wrun/wrun-option-knobs.util.js +81 -0
  278. package/dist/utility/wrun/wrun-option-prints.util.d.ts +144 -0
  279. package/dist/utility/wrun/wrun-option-prints.util.js +356 -0
  280. package/dist/utility/wrun/wrun-option-summary-lane.util.d.ts +102 -0
  281. package/dist/utility/wrun/wrun-option-summary-lane.util.js +143 -0
  282. package/dist/utility/wrun/wrun-options-chain.util.d.ts +308 -0
  283. package/dist/utility/wrun/wrun-options-chain.util.js +502 -0
  284. package/dist/utility/wrun/wrun-overlay-identity.util.d.ts +9 -4
  285. package/dist/utility/wrun/wrun-overlay-identity.util.js +16 -6
  286. package/dist/utility/wrun/wrun-panel-mount.lazy.d.ts +10 -0
  287. package/dist/utility/wrun/wrun-panel-mount.lazy.js +68 -0
  288. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +377 -0
  289. package/dist/utility/wrun/wrun-panel-mount.util.js +2251 -0
  290. package/dist/utility/wrun/wrun-param-map.util.d.ts +298 -0
  291. package/dist/utility/wrun/wrun-param-map.util.js +581 -0
  292. package/dist/utility/wrun/wrun-pause-dim.util.d.ts +52 -0
  293. package/dist/utility/wrun/wrun-pause-dim.util.js +153 -0
  294. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +149 -0
  295. package/dist/utility/wrun/wrun-pin-spelling.util.js +523 -0
  296. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +116 -0
  297. package/dist/utility/wrun/wrun-pin-venues.util.js +320 -0
  298. package/dist/utility/wrun/wrun-pinned-interval.util.d.ts +20 -0
  299. package/dist/utility/wrun/wrun-pinned-interval.util.js +47 -0
  300. package/dist/utility/wrun/wrun-plot-gate.types.d.ts +23 -0
  301. package/dist/utility/wrun/wrun-plot-gate.types.js +7 -0
  302. package/dist/utility/wrun/wrun-present-bits.util.d.ts +37 -0
  303. package/dist/utility/wrun/wrun-present-bits.util.js +73 -0
  304. package/dist/utility/wrun/wrun-protocol-pending.util.d.ts +33 -0
  305. package/dist/utility/wrun/wrun-protocol-pending.util.js +57 -0
  306. package/dist/utility/wrun/wrun-refusal.util.d.ts +41 -1
  307. package/dist/utility/wrun/wrun-refusal.util.js +69 -2
  308. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +1 -14
  309. package/dist/utility/wrun/wrun-registry-errors.util.js +0 -16
  310. package/dist/utility/wrun/wrun-row-source.d.ts +158 -0
  311. package/dist/utility/wrun/wrun-row-source.js +75 -0
  312. package/dist/utility/wrun/wrun-run-health.util.d.ts +155 -0
  313. package/dist/utility/wrun/wrun-run-health.util.js +273 -0
  314. package/dist/utility/wrun/wrun-run-interval-projection.types.d.ts +14 -0
  315. package/dist/utility/wrun/wrun-run-interval-projection.types.js +1 -0
  316. package/dist/utility/wrun/wrun-socket-row-source.d.ts +439 -0
  317. package/dist/utility/wrun/wrun-socket-row-source.js +1689 -0
  318. package/dist/utility/wrun/wrun-socket-session-losses.util.d.ts +18 -0
  319. package/dist/utility/wrun/wrun-socket-session-losses.util.js +25 -0
  320. package/dist/utility/wrun/wrun-source-rows.util.d.ts +911 -0
  321. package/dist/utility/wrun/wrun-source-rows.util.js +2597 -0
  322. package/dist/utility/wrun/wrun-tape-source.util.d.ts +82 -0
  323. package/dist/utility/wrun/wrun-tape-source.util.js +151 -0
  324. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +137 -0
  325. package/dist/utility/wrun/wrun-tier-grid.util.js +279 -0
  326. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +52 -0
  327. package/dist/utility/wrun/wrun-trades-lane.util.js +58 -0
  328. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +41 -0
  329. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +66 -0
  330. package/dist/utility/wrun-display-name.util.d.ts +33 -0
  331. package/dist/utility/wrun-display-name.util.js +64 -0
  332. package/dist/workers/constants/kscript-transport-codes.d.ts +15 -0
  333. package/dist/workers/constants/kscript-transport-codes.js +15 -0
  334. package/dist/workers/constants/socket-slots.d.ts +574 -0
  335. package/dist/workers/constants/socket-slots.js +539 -0
  336. package/dist/workers/utils/number.worker.util.d.ts +5 -0
  337. package/dist/workers/utils/number.worker.util.js +10 -0
  338. package/dist/workers/utils/time.worker.util.d.ts +12 -0
  339. package/dist/workers/utils/time.worker.util.js +24 -0
  340. package/dist/workers/utils/volume-profile.worker.util.d.ts +200 -0
  341. package/dist/workers/utils/volume-profile.worker.util.js +631 -0
  342. package/package.json +10 -4
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The OPRA rules every wrun source lane that reads US options data keeps (UW-PARITY source contract v2,
3
+ * global rules 6 and 7), whatever its kind (a registry poll lane declaring `opra`, a row lane declaring
4
+ * `governed: 'opra'`): written once here, read by both planners, the run pass and the live tick.
5
+ *
6
+ * - WHO may read: `mayReadOpra` (opra-read-access.leaf: an official package always, a draft or community
7
+ * package only while the `opra-user-scripts` flag opened the plane to it). Any other run is refused by
8
+ * name before any fetch, `opra-official-only:<class>`, seeded as the wall on US options data (the
9
+ * options chain's own record, `cme-wall` / `opra`).
10
+ * - The ASK: an OPRA lane's payload names the plane it reads (`wrunPlane: 'opra'`, which Door C judges as
11
+ * an OPRA ask whatever the payload's exchange) and the tier the read is routed to (`servedTier`,
12
+ * governed-route.util `governedMarketDataTier`, re-read on every ask), so no source cache serves one
13
+ * tier's rows to the other and the legend names the tier the rows rode.
14
+ * - PROVENANCE: a run that asks such a lane stamps the overlay's OPRA provenance before its first fetch
15
+ * and sheds it once a result read off another source replaced the rows (wrun-overlay-run.util).
16
+ *
17
+ * Light at module load (it sits on the row builder's import graph): the refusal helper and the leaf.
18
+ */
19
+ import { type OpraReadFacts } from '../chart/opra-read-access.leaf.js';
20
+ import { type WrunRefusalSeed } from './wrun-refusal.util.js';
21
+ /** The stem of an OPRA lane's named refusal: `opra-official-only:<class>`. */
22
+ export declare const WRUN_OPRA_OFFICIAL_ONLY_CODE = "opra-official-only";
23
+ /** The routed tier an OPRA lane's ask names. */
24
+ export type WrunOpraServedTier = 'realtime' | 'delayed';
25
+ /** The named refusal of an OPRA lane a run may not read: `opra-official-only:<class>`. */
26
+ export declare function wrunOpraOfficialOnlyCode(sourceClass: string): string;
27
+ /** The record seed of that refusal: the wall on US options data (the options chain's own). */
28
+ export declare const WRUN_OPRA_WALL_SEED: WrunRefusalSeed;
29
+ /** Refuse an input of an OPRA lane for a run that may not read the plane, by name, before any fetch. */
30
+ export declare function refuseWrunOpraLaneInput(ctx: {
31
+ inputName: string;
32
+ sourceClass: string;
33
+ }): never;
34
+ /** Refuse it when the run may not read OPRA (`mayReadOpra`); a run that may passes untouched. */
35
+ export declare function assertWrunOpraLaneReadable(run: OpraReadFacts | null | undefined, ctx: {
36
+ inputName: string;
37
+ sourceClass: string;
38
+ }): void;
39
+ /** The payload fields an OPRA lane's ask carries beside its own: the plane it reads and its routed tier. */
40
+ export declare function wrunOpraLanePayloadFields(servedTier: WrunOpraServedTier): Record<string, unknown>;
41
+ /** Whether a lane's acquisition (the payload its run asked) is an OPRA lane's. */
42
+ export declare function isWrunOpraLaneAcquisition(acquisition: unknown): acquisition is Readonly<Record<string, unknown>>;
43
+ /** The routed tier an OPRA lane's acquisition names (a word it does not know reads delayed, the safe tier). */
44
+ export declare function wrunOpraLaneServedTier(acquisition: Readonly<Record<string, unknown>>): WrunOpraServedTier;
45
+ /** An OPRA lane's recorded payload asked again at the tier the read is routed to NOW (a reconcile after a
46
+ * tier move asks the new tier, the chain's own rule); any other payload unchanged. */
47
+ export declare function wrunOpraLanePayloadAt(payload: Readonly<Record<string, unknown>>, servedTier: WrunOpraServedTier): Readonly<Record<string, unknown>>;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * The OPRA rules every wrun source lane that reads US options data keeps (UW-PARITY source contract v2,
3
+ * global rules 6 and 7), whatever its kind (a registry poll lane declaring `opra`, a row lane declaring
4
+ * `governed: 'opra'`): written once here, read by both planners, the run pass and the live tick.
5
+ *
6
+ * - WHO may read: `mayReadOpra` (opra-read-access.leaf: an official package always, a draft or community
7
+ * package only while the `opra-user-scripts` flag opened the plane to it). Any other run is refused by
8
+ * name before any fetch, `opra-official-only:<class>`, seeded as the wall on US options data (the
9
+ * options chain's own record, `cme-wall` / `opra`).
10
+ * - The ASK: an OPRA lane's payload names the plane it reads (`wrunPlane: 'opra'`, which Door C judges as
11
+ * an OPRA ask whatever the payload's exchange) and the tier the read is routed to (`servedTier`,
12
+ * governed-route.util `governedMarketDataTier`, re-read on every ask), so no source cache serves one
13
+ * tier's rows to the other and the legend names the tier the rows rode.
14
+ * - PROVENANCE: a run that asks such a lane stamps the overlay's OPRA provenance before its first fetch
15
+ * and sheds it once a result read off another source replaced the rows (wrun-overlay-run.util).
16
+ *
17
+ * Light at module load (it sits on the row builder's import graph): the refusal helper and the leaf.
18
+ */
19
+ import { mayReadOpra, WRUN_PLANE_PAYLOAD_KEY } from '../chart/opra-read-access.leaf.js';
20
+ import { attachWrunRefusal } from './wrun-refusal.util.js';
21
+ /** The stem of an OPRA lane's named refusal: `opra-official-only:<class>`. */
22
+ export const WRUN_OPRA_OFFICIAL_ONLY_CODE = 'opra-official-only';
23
+ /** The named refusal of an OPRA lane a run may not read: `opra-official-only:<class>`. */
24
+ export function wrunOpraOfficialOnlyCode(sourceClass) {
25
+ return `${WRUN_OPRA_OFFICIAL_ONLY_CODE}:${sourceClass}`;
26
+ }
27
+ /** The record seed of that refusal: the wall on US options data (the options chain's own). */
28
+ export const WRUN_OPRA_WALL_SEED = Object.freeze({ cls: 'cme-wall', variant: 'opra' });
29
+ /** Refuse an input of an OPRA lane for a run that may not read the plane, by name, before any fetch. */
30
+ export function refuseWrunOpraLaneInput(ctx) {
31
+ throw attachWrunRefusal(new Error(`Input '${ctx.inputName}' (${ctx.sourceClass}) reads US options data, which is open to OpenMarket's own ` +
32
+ `Indicators only (${wrunOpraOfficialOnlyCode(ctx.sourceClass)}): a package you wrote or added from the ` +
33
+ 'community cannot read it yet'), WRUN_OPRA_WALL_SEED);
34
+ }
35
+ /** Refuse it when the run may not read OPRA (`mayReadOpra`); a run that may passes untouched. */
36
+ export function assertWrunOpraLaneReadable(run, ctx) {
37
+ if (!mayReadOpra(run))
38
+ refuseWrunOpraLaneInput(ctx);
39
+ }
40
+ /** The payload fields an OPRA lane's ask carries beside its own: the plane it reads and its routed tier. */
41
+ export function wrunOpraLanePayloadFields(servedTier) {
42
+ return { [WRUN_PLANE_PAYLOAD_KEY]: 'opra', servedTier };
43
+ }
44
+ /** Whether a lane's acquisition (the payload its run asked) is an OPRA lane's. */
45
+ export function isWrunOpraLaneAcquisition(acquisition) {
46
+ return (acquisition !== null &&
47
+ typeof acquisition === 'object' &&
48
+ acquisition[WRUN_PLANE_PAYLOAD_KEY] === 'opra');
49
+ }
50
+ /** The routed tier an OPRA lane's acquisition names (a word it does not know reads delayed, the safe tier). */
51
+ export function wrunOpraLaneServedTier(acquisition) {
52
+ return acquisition.servedTier === 'realtime' ? 'realtime' : 'delayed';
53
+ }
54
+ /** An OPRA lane's recorded payload asked again at the tier the read is routed to NOW (a reconcile after a
55
+ * tier move asks the new tier, the chain's own rule); any other payload unchanged. */
56
+ export function wrunOpraLanePayloadAt(payload, servedTier) {
57
+ return isWrunOpraLaneAcquisition(payload) ? { ...payload, servedTier } : payload;
58
+ }
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The underlying options statistics classes (UW-PARITY sources S5a `option_daily` and S5b `option_stats_10m`, on every
3
+ * chain since OPTIONS-PORT P5) as both threads read them: the field list and its order (the lane row's columns after
4
+ * the stamp), each field's point field on OPTION_UNDERLYING_STATS (kiyotaka-go `OptionUnderlyingStats`, protobuf-es
5
+ * names), the K types, the acquisition's chain fields and the named refusal. The lane files (main thread), the K
6
+ * control and its worker twin read this one table.
7
+ *
8
+ * The rows (tsdb-gateway `option_underlying_stats.go`, the option-underlying-stats cjob): one book per bucket, a
9
+ * row's symbol its book, filed by the chain's exchange and underlying (the OPRA ticker, the CME futures contract, a
10
+ * crypto venue's root coin), at DAY (a session date stamped at its UTC midnight: OPRA's New York session written
11
+ * after the close, a crypto venue's UTC day, a CME settlement) or TEN_MINUTES (for the underlyings the plane samples:
12
+ * any other answers no row, which is how the data plane says it is not sampled). A one-book read names the exchange,
13
+ * the underlying and the book; an OPRA read names no book, as it always has (contract C1).
14
+ *
15
+ * Units (contract C3): volatilities in percentage points, exposures in USD, walls and levels as prices; volume and
16
+ * open interest in coin on a crypto chain and in contracts on OPRA and CME; premium in USD, and no value on a crypto
17
+ * or CME chain until their print rows exist (the row leaves it unset, which reads as no value).
18
+ *
19
+ * Import-free: a lane file stays light at module load and the worker twin reads it too.
20
+ */
21
+ /** The fields, in the kit's order (om `WRUN_OPTION_STATS_FIELDS`); field i is lane row column i + 1. `coin` is the
22
+ * chain's underlying as a symbol code (`encodeSymbol`), the rest the row's own values. */
23
+ export declare const WRUN_OPTION_STATS_FIELDS: readonly ["coin", "underlying_price", "atm_iv_1d", "atm_iv_5d", "atm_iv_7d", "atm_iv_14d", "atm_iv_30d", "atm_iv_60d", "atm_iv_90d", "atm_iv_180d", "atm_iv_365d", "rr25_30d", "call_volume", "put_volume", "call_premium", "put_premium", "call_oi", "put_oi", "net_gex", "net_dex", "net_vex", "net_charm", "net_vanna", "front_net_gex", "call_wall", "put_wall", "gamma_flip", "gamma_magnet", "max_pain_front", "implied_move_front", "n_contracts"];
24
+ export type WrunOptionStatsField = (typeof WRUN_OPTION_STATS_FIELDS)[number];
25
+ /** Each value field's point field (the series module's decoded column); `coin` is the read's own underlying. */
26
+ export declare const WRUN_OPTION_STATS_POINT_FIELDS: Readonly<Record<Exclude<WrunOptionStatsField, 'coin'>, string>>;
27
+ /** The backend type both classes read, by name (a lane refuses it by name while the protocol package lacks it). */
28
+ export declare const WRUN_OPTION_STATS_TYPE = "OPTION_UNDERLYING_STATS";
29
+ /** The grain a read asks: a session date or ten minutes. */
30
+ export type WrunOptionStatsGrain = 'day' | '10m';
31
+ /** The K type each class asks (`K_OPTION_UNDERLYING_STATS_DAY`, `K_OPTION_UNDERLYING_STATS_10M`): om's fetch types. */
32
+ export declare const WRUN_OPTION_STATS_KTYPES: Readonly<Record<WrunOptionStatsGrain, string>>;
33
+ /** The interval each grain is read at. */
34
+ export declare const WRUN_OPTION_STATS_INTERVALS: Readonly<Record<WrunOptionStatsGrain, string>>;
35
+ /** The named refusal of an underlying the data plane samples no ten-minute rows for (U7's configured list). */
36
+ export declare const WRUN_NOT_IN_10M_UNIVERSE_CODE = "not-in-10m-universe";
37
+ /**
38
+ * The fields a stats acquisition names its chain in (the lane's plan, the K control's settings), beside `coin` (the
39
+ * chain's underlying, the key its plane files the rows under):
40
+ * - `statsExchange`: the exchange the chain lists on, on every plane (the instance's plane follows it, and the read
41
+ * names it as its venue);
42
+ * - `statsBook`: the ONE book a one-book read names (the row symbol), on every plane but OPRA, whose read stays by
43
+ * coin with no symbol (contract C1);
44
+ * - `statsContinuous`: the continuous alias a CME chain was read off (its lead contract is `coin`; a roll moves the
45
+ * acquisition).
46
+ */
47
+ export declare const WRUN_OPTION_STATS_EXCHANGE_FIELD = "statsExchange";
48
+ export declare const WRUN_OPTION_STATS_BOOK_FIELD = "statsBook";
49
+ export declare const WRUN_OPTION_STATS_CONTINUOUS_FIELD = "statsContinuous";
@@ -0,0 +1,115 @@
1
+ /**
2
+ * The underlying options statistics classes (UW-PARITY sources S5a `option_daily` and S5b `option_stats_10m`, on every
3
+ * chain since OPTIONS-PORT P5) as both threads read them: the field list and its order (the lane row's columns after
4
+ * the stamp), each field's point field on OPTION_UNDERLYING_STATS (kiyotaka-go `OptionUnderlyingStats`, protobuf-es
5
+ * names), the K types, the acquisition's chain fields and the named refusal. The lane files (main thread), the K
6
+ * control and its worker twin read this one table.
7
+ *
8
+ * The rows (tsdb-gateway `option_underlying_stats.go`, the option-underlying-stats cjob): one book per bucket, a
9
+ * row's symbol its book, filed by the chain's exchange and underlying (the OPRA ticker, the CME futures contract, a
10
+ * crypto venue's root coin), at DAY (a session date stamped at its UTC midnight: OPRA's New York session written
11
+ * after the close, a crypto venue's UTC day, a CME settlement) or TEN_MINUTES (for the underlyings the plane samples:
12
+ * any other answers no row, which is how the data plane says it is not sampled). A one-book read names the exchange,
13
+ * the underlying and the book; an OPRA read names no book, as it always has (contract C1).
14
+ *
15
+ * Units (contract C3): volatilities in percentage points, exposures in USD, walls and levels as prices; volume and
16
+ * open interest in coin on a crypto chain and in contracts on OPRA and CME; premium in USD, and no value on a crypto
17
+ * or CME chain until their print rows exist (the row leaves it unset, which reads as no value).
18
+ *
19
+ * Import-free: a lane file stays light at module load and the worker twin reads it too.
20
+ */
21
+ /** The fields, in the kit's order (om `WRUN_OPTION_STATS_FIELDS`); field i is lane row column i + 1. `coin` is the
22
+ * chain's underlying as a symbol code (`encodeSymbol`), the rest the row's own values. */
23
+ export const WRUN_OPTION_STATS_FIELDS = Object.freeze([
24
+ 'coin',
25
+ 'underlying_price',
26
+ 'atm_iv_1d',
27
+ 'atm_iv_5d',
28
+ 'atm_iv_7d',
29
+ 'atm_iv_14d',
30
+ 'atm_iv_30d',
31
+ 'atm_iv_60d',
32
+ 'atm_iv_90d',
33
+ 'atm_iv_180d',
34
+ 'atm_iv_365d',
35
+ 'rr25_30d',
36
+ 'call_volume',
37
+ 'put_volume',
38
+ 'call_premium',
39
+ 'put_premium',
40
+ 'call_oi',
41
+ 'put_oi',
42
+ 'net_gex',
43
+ 'net_dex',
44
+ 'net_vex',
45
+ 'net_charm',
46
+ 'net_vanna',
47
+ 'front_net_gex',
48
+ 'call_wall',
49
+ 'put_wall',
50
+ 'gamma_flip',
51
+ 'gamma_magnet',
52
+ 'max_pain_front',
53
+ 'implied_move_front',
54
+ 'n_contracts',
55
+ ]);
56
+ /** Each value field's point field (the series module's decoded column); `coin` is the read's own underlying. */
57
+ export const WRUN_OPTION_STATS_POINT_FIELDS = Object.freeze({
58
+ underlying_price: 'underlyingPrice',
59
+ atm_iv_1d: 'atmIv1d',
60
+ atm_iv_5d: 'atmIv5d',
61
+ atm_iv_7d: 'atmIv7d',
62
+ atm_iv_14d: 'atmIv14d',
63
+ atm_iv_30d: 'atmIv30d',
64
+ atm_iv_60d: 'atmIv60d',
65
+ atm_iv_90d: 'atmIv90d',
66
+ atm_iv_180d: 'atmIv180d',
67
+ atm_iv_365d: 'atmIv365d',
68
+ rr25_30d: 'rr2530d',
69
+ call_volume: 'callVolume',
70
+ put_volume: 'putVolume',
71
+ call_premium: 'callPremium',
72
+ put_premium: 'putPremium',
73
+ call_oi: 'callOi',
74
+ put_oi: 'putOi',
75
+ net_gex: 'netGex',
76
+ net_dex: 'netDex',
77
+ net_vex: 'netVex',
78
+ net_charm: 'netCharm',
79
+ net_vanna: 'netVanna',
80
+ front_net_gex: 'frontNetGex',
81
+ call_wall: 'callWall',
82
+ put_wall: 'putWall',
83
+ gamma_flip: 'gammaFlip',
84
+ gamma_magnet: 'gammaMagnet',
85
+ max_pain_front: 'maxPainFront',
86
+ implied_move_front: 'impliedMoveFront',
87
+ n_contracts: 'nContracts',
88
+ });
89
+ /** The backend type both classes read, by name (a lane refuses it by name while the protocol package lacks it). */
90
+ export const WRUN_OPTION_STATS_TYPE = 'OPTION_UNDERLYING_STATS';
91
+ /** The K type each class asks (`K_OPTION_UNDERLYING_STATS_DAY`, `K_OPTION_UNDERLYING_STATS_10M`): om's fetch types. */
92
+ export const WRUN_OPTION_STATS_KTYPES = Object.freeze({
93
+ day: 'option_underlying_stats_day',
94
+ '10m': 'option_underlying_stats_10m',
95
+ });
96
+ /** The interval each grain is read at. */
97
+ export const WRUN_OPTION_STATS_INTERVALS = Object.freeze({
98
+ day: '1d',
99
+ '10m': '10m',
100
+ });
101
+ /** The named refusal of an underlying the data plane samples no ten-minute rows for (U7's configured list). */
102
+ export const WRUN_NOT_IN_10M_UNIVERSE_CODE = 'not-in-10m-universe';
103
+ /**
104
+ * The fields a stats acquisition names its chain in (the lane's plan, the K control's settings), beside `coin` (the
105
+ * chain's underlying, the key its plane files the rows under):
106
+ * - `statsExchange`: the exchange the chain lists on, on every plane (the instance's plane follows it, and the read
107
+ * names it as its venue);
108
+ * - `statsBook`: the ONE book a one-book read names (the row symbol), on every plane but OPRA, whose read stays by
109
+ * coin with no symbol (contract C1);
110
+ * - `statsContinuous`: the continuous alias a CME chain was read off (its lead contract is `coin`; a roll moves the
111
+ * acquisition).
112
+ */
113
+ export const WRUN_OPTION_STATS_EXCHANGE_FIELD = 'statsExchange';
114
+ export const WRUN_OPTION_STATS_BOOK_FIELD = 'statsBook';
115
+ export const WRUN_OPTION_STATS_CONTINUOUS_FIELD = 'statsContinuous';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The identity of an OPRA-only row lane on its chart (`option_prints`, `option_contract_flow`: the underlying the
3
+ * OPRA plane keys its series by, `coin`). A thin re-export kept for those lanes' imports: the wrapper lives beside the
4
+ * one chain resolver (sources/opra-option-lanes.util `resolveWrunOpraLaneUnderlying`, over the same chart chain
5
+ * resolution `option_surface` and `option_strikes` read), its refusals by name unchanged: the directory that did not
6
+ * answer (`service-no-answer` / `opra-directory`, Retry) and a chart OPRA lists no options for (`no-options` /
7
+ * `chain`).
8
+ */
9
+ import type { WrunPollLaneContext } from './sources/wrun-poll-lane.types.js';
10
+ export { resolveWrunOpraLaneUnderlying } from './sources/opra-option-lanes.util.js';
11
+ /** The chart a lane resolves its underlying on (a row lane's plan context carries these). */
12
+ export type WrunOpraUnderlyingContext = Pick<WrunPollLaneContext, 'inputName' | 'sourceClass' | 'coin' | 'exchange' | 'symbol'>;
@@ -0,0 +1 @@
1
+ export { resolveWrunOpraLaneUnderlying } from './sources/opra-option-lanes.util.js';
@@ -0,0 +1,142 @@
1
+ import type { WrunBackendTier } from './wrun-tier-grid.util.js';
2
+ /** The gateway type the class reads, by name. */
3
+ export declare const WRUN_OPTION_PRINT_AGG_TYPE = "OPTION_PRINT_AGG";
4
+ /** f64s per tuple, the `present` mask included. */
5
+ export declare const WRUN_OPTION_CONTRACT_FLOW_WIDTH = 17;
6
+ /** The tuple's columns. */
7
+ export declare const WRUN_OPTION_CONTRACT_FLOW_COLUMN: Readonly<{
8
+ readonly root: 0;
9
+ readonly expiry: 1;
10
+ readonly side: 2;
11
+ readonly strike: 3;
12
+ readonly volAsk: 4;
13
+ readonly volBid: 5;
14
+ readonly volMid: 6;
15
+ readonly volNone: 7;
16
+ readonly premAsk: 8;
17
+ readonly premBid: 9;
18
+ readonly shareDeltaNet: 10;
19
+ readonly vwap: 11;
20
+ readonly lastPrice: 12;
21
+ readonly ivLast: 13;
22
+ readonly volAboveAsk: 14;
23
+ readonly volBelowBid: 15;
24
+ readonly present: 16;
25
+ }>;
26
+ /** The `present` bits by name (14, the partial bar, is the shared one). */
27
+ export declare const WRUN_OPTION_CONTRACT_FLOW_BIT: Readonly<{
28
+ readonly vwap: 0;
29
+ readonly iv: 1;
30
+ readonly shareDelta: 2;
31
+ }>;
32
+ /** OPTION_PRINT_AGG's contract tiers (tsdb-gateway `option_print_agg_{1m,5m,1h,1d}`): 1m kept 7 days, 5m 30, the
33
+ * hour and the day for good. Each key is the interval word the K control asks the tier by.
34
+ * `servedLagMs` (read by the coarsest tier choice only: the 1m tier stays the fallback for every bar): how long after
35
+ * a bar ends a coarser tier may serve it.
36
+ * - Every coarser tier waits out the delayed window's lag, so a delayed read's end never falls inside one of its
37
+ * buckets: the reader serves that bucket whole, and a 5m or wider bucket would carry prints younger than the
38
+ * 15-minute delay (the 120 s margin covers a 1m bucket only).
39
+ * - The hour and the day are materialized only (no forming bucket), each landing a closed bucket at its refresh
40
+ * job's next run past the job's end offset (tsdb-gateway values.cme.yaml): the hour by `option-print` (every 2
41
+ * minutes, 5 minutes back), the day by `option-print-slow` (hourly at :30, 4 hours back); the lags add a margin for
42
+ * the run. */
43
+ export declare const WRUN_OPTION_PRINT_AGG_TIERS: readonly WrunBackendTier[];
44
+ /** The most contract rows one read may hold: the worker twin fails a window past it loudly, never truncated, and the
45
+ * lane's row budget keeps its asks under it before any fetch. */
46
+ export declare const WRUN_OPTION_CONTRACT_FLOW_MAX_ROWS = 500000;
47
+ /**
48
+ * The contract rows one regular session holds at each tier (one row per contract per bucket it traded in), the row
49
+ * budget's projection for EVERY underlying: SPY's, measured on 2026-10-14 (120 of its 13,168 listed contracts sampled
50
+ * at random, every 1m trade bar of the session, scaled to the chain), the upper end of a bootstrap 90% interval (the
51
+ * point estimates: 169k, 84k, 23k and 6.0k). A smaller chain is projected as SPY's (its older bars go partial sooner
52
+ * than they need to); a larger one could still reach the worker's cap, which then fails loudly.
53
+ */
54
+ export declare const WRUN_OPTION_CONTRACT_FLOW_SESSION_ROWS: Readonly<Record<string, number>>;
55
+ /** The regular-session print minutes inside `[fromMs, toMs)`: each weekday's 09:30 to 16:15 New York (a holiday
56
+ * counts as a session, so the projection only errs high). */
57
+ export declare function wrunOptionPrintSessionMinutes(fromMs: number, toMs: number): number;
58
+ /** The rows one host bar is projected to read at its tier, up to the clock (the lane's row budget): the session's
59
+ * rows at that tier in proportion to the print minutes the bar covers. No tier: none. */
60
+ export declare function wrunOptionContractFlowBarRows(bar: {
61
+ openMs: number;
62
+ endMs: number;
63
+ tier?: WrunBackendTier;
64
+ }, nowMs: number): number;
65
+ /** One bucket's sums for one contract, as the worker hands them to the fold. */
66
+ export declare const WRUN_OPTION_CONTRACT_FLOW_RAW: Readonly<{
67
+ readonly root: 0;
68
+ readonly expiry: 1;
69
+ readonly side: 2;
70
+ readonly strike: 3;
71
+ readonly volAsk: 4;
72
+ readonly volBid: 5;
73
+ readonly volMid: 6;
74
+ readonly volNone: 7;
75
+ readonly premAsk: 8;
76
+ readonly premBid: 9;
77
+ readonly shareDeltaAsk: 10;
78
+ readonly shareDeltaBid: 11;
79
+ readonly sumPxSize: 12;
80
+ readonly sumSize: 13;
81
+ readonly lastPrice: 14;
82
+ readonly ivLast: 15;
83
+ /** Underlying price x contracts over the bucket's prints that carried an underlying (`sum_spot_size`). */
84
+ readonly sumSpotSize: 16;
85
+ readonly volAboveAsk: 17;
86
+ readonly volBelowBid: 18;
87
+ readonly flags: 19;
88
+ /** The contracts of those prints (`size_priced`). */
89
+ readonly sizePriced: 20;
90
+ }>;
91
+ export declare const WRUN_OPTION_CONTRACT_FLOW_RAW_WIDTH = 21;
92
+ /** The acquisition an `option_contract_flow` instance asks with. */
93
+ export interface WrunOptionContractFlowAcquisition {
94
+ coin: string;
95
+ /** "nearest:N" or "0dte"; absent is "all". */
96
+ expiries?: string;
97
+ strikeWindowPct?: number;
98
+ minVolume?: number;
99
+ /** The tier key of the ask (a fold reads the ask's own). */
100
+ tier?: string;
101
+ }
102
+ /** An instance's payload as its acquisition (knob fields that are not valid read absent). */
103
+ export declare function wrunOptionContractFlowAcquisitionOf(extras: Readonly<Record<string, unknown>> | null | undefined): WrunOptionContractFlowAcquisition;
104
+ /** Whether a payload is an `option_contract_flow` lane ask the K control serves: it names the OPRA plane, a coin and
105
+ * one of the contract tiers (any other caller is declined, fail closed). */
106
+ export declare function isWrunOptionContractFlowAsk(payload: Readonly<Record<string, unknown>> | null | undefined): boolean;
107
+ /** The tier a key names (one of the contract tiers), or undefined. */
108
+ export declare function wrunOptionPrintAggTierOf(key: unknown): WrunBackendTier | undefined;
109
+ /** Why a row was dropped (counted, never a made-up value). */
110
+ export type WrunOptionContractFlowDrop = 'time' | 'contract' | 'root' | 'scope' | 'value';
111
+ /** The rows this thread dropped since load, by reason (the lane's diagnostics: a refused root among them). */
112
+ export declare function wrunOptionContractFlowDrops(): Readonly<Record<WrunOptionContractFlowDrop, number>>;
113
+ /** Spec hook: zero the drop counters. */
114
+ export declare function __resetWrunOptionContractFlowDropsForTest(): void;
115
+ /** One CONTRACT row of a bucket: its start and its raw tuple. */
116
+ export interface WrunOptionContractFlowRow {
117
+ bucketMs: number;
118
+ raw: number[];
119
+ }
120
+ /**
121
+ * One OPTION_PRINT_AGG CONTRACT row as a raw tuple (the history shape: a reshaped protobuf-es message, int64 as
122
+ * bigint, unset optionals undefined; a JSON shape reads the same). `series` names the contract (its OSI symbol, the
123
+ * option type). A scope row, a row missing its time or contract, or one whose root the codec refuses is dropped and
124
+ * counted.
125
+ */
126
+ export declare function wrunOptionContractFlowRowOf(point: Readonly<Record<string, unknown>> | null | undefined, series: Readonly<Record<string, unknown>> | null | undefined): WrunOptionContractFlowRow | WrunOptionContractFlowDrop;
127
+ /** Whether a contract row is a "0dte" row: its expiry falls on the trade date of its bucket (the New York date at
128
+ * the bucket's middle, so a UTC day bucket reads its own session's date). */
129
+ export declare function wrunOptionContractFlowRowIsZeroDte(row: WrunOptionContractFlowRow, tierMs: number): boolean;
130
+ /**
131
+ * One host bar's contract tuples from its buckets' raw rows (in bucket order), under the acquisition's knobs:
132
+ * - every contract's sums over the bar, its last price from its newest bucket and its IV from its newest bucket that
133
+ * had one;
134
+ * - `expiries: "nearest:N"`: the contracts of the bar's N nearest expiries (among every contract that traded);
135
+ * - `strike_window_pct`: the strikes within that many percent of the bar's underlying, its contract-weighted price
136
+ * over the bar's prints that carried one (sum_spot_size / size_priced over every contract row of the bar: the same
137
+ * from any tier and any row order; a bar no priced print reached keeps every strike, there being nothing to judge
138
+ * by);
139
+ * - `min_volume`: a contract whose bar total contracts (`sum_size`) is below it is dropped.
140
+ * Sorted by root, expiry, strike, then side.
141
+ */
142
+ export declare function foldWrunOptionContractFlowBar(rows: ReadonlyArray<ReadonlyArray<unknown>>, acquisition: Readonly<Record<string, unknown>>): number[][];