@orangecharts/wrun-chart-host 0.8.0 → 0.10.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 (246) hide show
  1. package/README.md +3 -1
  2. package/dist/constants/feature-flags.constants.d.ts +9 -0
  3. package/dist/constants/feature-flags.constants.js +86 -16
  4. package/dist/constants/marketCapabilities.constants.d.ts +14 -9
  5. package/dist/constants/marketCapabilities.constants.js +36 -13
  6. package/dist/constants/opra-compliance.constants.d.ts +15 -0
  7. package/dist/constants/opra-compliance.constants.js +15 -0
  8. package/dist/constants/option-venues.constants.d.ts +11 -6
  9. package/dist/constants/option-venues.constants.js +5 -2
  10. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
  11. package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
  12. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
  13. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
  14. package/dist/constants/venue-presets.constants.d.ts +20 -20
  15. package/dist/constants/venue-presets.constants.js +24 -26
  16. package/dist/host-env.d.ts +39 -9
  17. package/dist/host-env.js +6 -0
  18. package/dist/host-ports.types.d.ts +108 -18
  19. package/dist/index.d.ts +14 -0
  20. package/dist/index.js +14 -0
  21. package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
  22. package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
  23. package/dist/interfaces/opra-realtime.interface.js +10 -10
  24. package/dist/interfaces/replay.interface.d.ts +8 -0
  25. package/dist/interfaces/wrun-runtime.interface.d.ts +52 -15
  26. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +94 -14
  27. package/dist/kscript-data/controls/live-trades-merge.util.js +132 -22
  28. package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +56 -0
  29. package/dist/kscript-data/controls/live-trades-order-gate.util.js +107 -0
  30. package/dist/market-data/billing.interface.d.ts +227 -42
  31. package/dist/market-data/billing.interface.js +60 -12
  32. package/dist/market-data/venue.d.ts +88 -6
  33. package/dist/market-data/venues/cme.contract.copy.json +66 -0
  34. package/dist/market-data/venues/cme.d.ts +126 -0
  35. package/dist/market-data/venues/cme.js +133 -0
  36. package/dist/market-data/venues/index.d.ts +165 -8
  37. package/dist/market-data/venues/index.js +48 -6
  38. package/dist/market-data/venues/opra.contract.copy.json +5 -3
  39. package/dist/market-data/venues/opra.d.ts +3 -3
  40. package/dist/market-data/venues/opra.js +5 -4
  41. package/dist/replay/replayLadder.js +3 -1
  42. package/dist/settings-templates/index.js +7 -3
  43. package/dist/settings-templates/indicator-fields.d.ts +5 -4
  44. package/dist/settings-templates/indicator-fields.js +45 -6
  45. package/dist/settings-templates/tool-rules.d.ts +27 -17
  46. package/dist/settings-templates/tool-rules.js +27 -11
  47. package/dist/settings-templates/tool-tables.generated.js +91 -31
  48. package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
  49. package/dist/utility/chart/book-live-bucket.util.js +47 -0
  50. package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
  51. package/dist/utility/chart/crypto-index.leaf.js +2 -2
  52. package/dist/utility/chart/index-mode-admission.util.js +24 -3
  53. package/dist/utility/chart/index-mode.util.d.ts +5 -2
  54. package/dist/utility/chart/index-mode.util.js +23 -13
  55. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
  56. package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
  57. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +7 -2
  58. package/dist/utility/chart/kscript-live-coalesce.util.js +9 -3
  59. package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
  60. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
  61. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
  62. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
  63. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -27
  64. package/dist/utility/chart/kscript-venue-policy.util.js +74 -32
  65. package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
  66. package/dist/utility/chart/market-session-schedule.util.js +16 -0
  67. package/dist/utility/chart/marketKind.util.d.ts +12 -10
  68. package/dist/utility/chart/marketKind.util.js +17 -7
  69. package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
  70. package/dist/utility/chart/om-panel-push-style.util.js +17 -15
  71. package/dist/utility/chart/om-panel.util.js +6 -6
  72. package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
  73. package/dist/utility/chart/opra-read-access.leaf.js +5 -3
  74. package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
  75. package/dist/utility/chart/profile-block-size.util.js +7 -0
  76. package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
  77. package/dist/utility/chart/quote-perp.leaf.js +20 -0
  78. package/dist/utility/chart/rth-session.util.d.ts +3 -2
  79. package/dist/utility/chart/rth-session.util.js +2 -1
  80. package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
  81. package/dist/utility/chart/window-geometry.leaf.js +22 -6
  82. package/dist/utility/chart/wrun-run-result.util.d.ts +17 -0
  83. package/dist/utility/chart/wrun-run-result.util.js +145 -7
  84. package/dist/utility/common/transformations.util.d.ts +7 -0
  85. package/dist/utility/common/transformations.util.js +11 -0
  86. package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
  87. package/dist/utility/options/option-bar-anchor.util.js +340 -0
  88. package/dist/utility/options/option-venue.util.d.ts +21 -3
  89. package/dist/utility/options/option-venue.util.js +30 -3
  90. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
  91. package/dist/utility/wrun/derived-roots.util.d.ts +213 -0
  92. package/dist/utility/wrun/derived-roots.util.js +471 -0
  93. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +41 -6
  94. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
  95. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
  96. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
  97. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +5 -3
  98. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +6 -4
  99. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
  100. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
  101. package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
  102. package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
  103. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
  104. package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
  105. package/dist/utility/wrun/sources/row-lane-registry.js +3 -2
  106. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
  107. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
  108. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +15 -6
  109. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +14 -0
  110. package/dist/utility/wrun/sources/row-lanes/option_prints.js +82 -13
  111. package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
  112. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -8
  113. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +95 -14
  114. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +5 -2
  115. package/dist/utility/wrun/sources/row-lanes/option_surface.js +7 -3
  116. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
  117. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +35 -14
  118. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +70 -20
  119. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +64 -0
  120. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +89 -0
  121. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +45 -1
  122. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +114 -6
  123. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +56 -5
  124. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +224 -26
  125. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +822 -58
  126. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
  127. package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
  128. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
  129. package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
  130. package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
  131. package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
  132. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
  133. package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
  134. package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
  135. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +192 -13
  136. package/dist/utility/wrun/wrun-chart-market-facts.util.js +437 -55
  137. package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
  138. package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
  139. package/dist/utility/wrun/wrun-color-settings.util.d.ts +15 -4
  140. package/dist/utility/wrun/wrun-color-settings.util.js +31 -12
  141. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
  142. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
  143. package/dist/utility/wrun/wrun-download-meter.util.d.ts +107 -0
  144. package/dist/utility/wrun/wrun-download-meter.util.js +134 -0
  145. package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
  146. package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
  147. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
  148. package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
  149. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +6 -1
  150. package/dist/utility/wrun/wrun-draft-overlay.util.js +23 -3
  151. package/dist/utility/wrun/wrun-frames.d.ts +27 -6
  152. package/dist/utility/wrun/wrun-frames.js +78 -15
  153. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  154. package/dist/utility/wrun/wrun-hosted-wire-caps.js +7 -0
  155. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
  156. package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
  157. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +51 -21
  158. package/dist/utility/wrun/wrun-hud-looks.util.js +74 -28
  159. package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
  160. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
  161. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
  162. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
  163. package/dist/utility/wrun/wrun-live-intake.util.d.ts +19 -9
  164. package/dist/utility/wrun/wrun-live-intake.util.js +213 -45
  165. package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
  166. package/dist/utility/wrun/wrun-live-tick.util.js +246 -49
  167. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
  168. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
  169. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +205 -48
  170. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +277 -34
  171. package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +51 -7
  172. package/dist/utility/wrun/wrun-market-size-defaults.util.js +340 -56
  173. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
  174. package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
  175. package/dist/utility/wrun/wrun-option-prints.util.d.ts +41 -2
  176. package/dist/utility/wrun/wrun-option-prints.util.js +80 -13
  177. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
  178. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
  179. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +26 -6
  180. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +50 -11
  181. package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +109 -19
  182. package/dist/utility/wrun/wrun-option-strike-flow.util.js +222 -61
  183. package/dist/utility/wrun/wrun-option-views.util.d.ts +96 -18
  184. package/dist/utility/wrun/wrun-option-views.util.js +246 -51
  185. package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
  186. package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
  187. package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
  188. package/dist/utility/wrun/wrun-output-style.util.js +20 -2
  189. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +20 -0
  190. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
  191. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
  192. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
  193. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
  194. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +7 -0
  195. package/dist/utility/wrun/wrun-overlay-recovery.util.js +25 -1
  196. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
  197. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  198. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +134 -37
  199. package/dist/utility/wrun/wrun-overlay-run.util.js +1118 -254
  200. package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +4 -4
  201. package/dist/utility/wrun/wrun-pack-widths.leaf.js +4 -4
  202. package/dist/utility/wrun/wrun-pack.util.d.ts +7 -3
  203. package/dist/utility/wrun/wrun-pack.util.js +20 -9
  204. package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
  205. package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
  206. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
  207. package/dist/utility/wrun/wrun-panel-mount.util.js +63 -13
  208. package/dist/utility/wrun/wrun-panel-style.util.d.ts +37 -24
  209. package/dist/utility/wrun/wrun-panel-style.util.js +100 -29
  210. package/dist/utility/wrun/wrun-param-map.util.d.ts +15 -11
  211. package/dist/utility/wrun/wrun-param-map.util.js +13 -5
  212. package/dist/utility/wrun/wrun-param-values.util.d.ts +21 -3
  213. package/dist/utility/wrun/wrun-param-values.util.js +6 -0
  214. package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
  215. package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
  216. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
  217. package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
  218. package/dist/utility/wrun/wrun-refusal.util.js +10 -1
  219. package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
  220. package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
  221. package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
  222. package/dist/utility/wrun/wrun-run-interval.util.d.ts +4 -2
  223. package/dist/utility/wrun/wrun-run-interval.util.js +9 -6
  224. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +52 -1
  225. package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
  226. package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
  227. package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
  228. package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
  229. package/dist/utility/wrun/wrun-socket-row-source.js +113 -8
  230. package/dist/utility/wrun/wrun-source-rows.util.d.ts +9 -1
  231. package/dist/utility/wrun/wrun-source-rows.util.js +108 -43
  232. package/dist/utility/wrun/wrun-style-words.util.js +6 -4
  233. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
  234. package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
  235. package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
  236. package/dist/utility/wrun/wrun-tape-per-order.util.js +26 -0
  237. package/dist/utility/wrun/wrun-tape-source.util.d.ts +126 -50
  238. package/dist/utility/wrun/wrun-tape-source.util.js +193 -68
  239. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
  240. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
  241. package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
  242. package/dist/utils/replay/replay-buffer-math.js +227 -20
  243. package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
  244. package/dist/workers/utils/volume-profile.worker.util.js +5 -2
  245. package/dist/workers/wrun/wrun-abi-host.js +3 -2
  246. package/package.json +5 -5
@@ -34,19 +34,32 @@
34
34
  * packer judges `max_cells`, never a fetch facet). A market pin, `history` and `min_size` are refused by name; a
35
35
  * block over `max_cells` refuses the run (wrun_cell_block_too_large, never truncated). One chain per package.
36
36
  * - `fold` "kit" (OPTLOAD G5, kit 0.90.0; wrun-option-views.util): `nearest`, `window_pct` (required), `lens`,
37
- * `step_rows` (required), `carry` and `levels`, refused by the SDK's rules by name (`wrun_option_knob_invalid`); its
38
- * `expiries` word is "all" or none (kit 0.91.1: the fold keeps its expiries with its own `nearest`, any other word
39
- * refused at declaration). Each bar reads the fold of its newest
37
+ * `step_rows` (required), `carry`, `levels` and `curve` (kit 0.96.0, beside `levels` only), refused by the SDK's
38
+ * rules by name (`wrun_option_knob_invalid`); its `expiries` word is "all" or none (kit 0.91.1: the fold keeps its
39
+ * expiries with its own `nearest`, any other word refused at declaration). Each bar reads the fold of its newest
40
40
  * minute, 14-value rows (`[1, totals..., max_pain, zero_gamma, call_wall, put_wall, spot, refused]` when `levels`,
41
+ * with `curve` the curve row `[2, gex_at_spot, gamma_flip, curve_spot, priced_at_ms, contracts, 0...]` after it,
41
42
  * then `[0, strike, value]` at the strikes the template draws), asked of the gateway at the chart's bars
42
- * (`strikeKitFold` and its params, `strikeMaxCells` the input's `max_cells`) and folded by the worker by the same
43
- * rules while the gateway refuses the read. A bar whose newest minute held more rows than `max_cells` answers its
43
+ * (`strikeKitFold` and its params, `strikeMaxCells` the input's `max_cells`, with `curve` `strikeKitCurve` and
44
+ * `strikeKitMultiplier`, the chart's `market.option_multiplier()`) and folded by the worker with the kit's own fold
45
+ * while the gateway refuses the read. A bar whose newest minute held more rows than `max_cells` answers its
44
46
  * levels row refused, and that refuses the run (wrun_cell_block_too_large), as a block over `max_cells` does today;
45
47
  * an input declaring `missing: "empty"` reads that bar empty instead (C1.2b). The run carries the 14-value rows: the
46
48
  * lane's plan, the packer and the shared aligner (kit 0.91.1) size the block by the input's width
47
49
  * (`WRUN_OPTION_STRIKES_KIT_SERVED`).
48
50
  * - O1 (OPTLOAD G5): on the OPRA plane the chain is the plane's own by coin (`wrunHeldOpraPlaneChain`), no chain
49
51
  * directory read.
52
+ * - `velocity_windows` (SKYLIT-PARITY contract H; the om schema takes the knob by this name and shape): 1 to 7 distinct
53
+ * windows in minutes from 1, 5, 10, 15, 60, 240 and 1440, a literal list. It rides the ask
54
+ * (`strikeVelocityWindowsMin`, the knob's order) and each tuple appends four lists after `underlying`, each one entry
55
+ * per window in the knob's order: `[...12 values, net_gex_velocity..., net_dex_velocity..., net_vex_velocity...,
56
+ * oi_velocity...]`, width 12 + 4N (`wrunOptionStrikesVelocityWidth`). Without the knob the 12-value tuple is
57
+ * byte-identical. The gateway answers velocity on its fold BAR state read alone, whose rows are per strike (every
58
+ * live expiry of the bar summed), so every tuple of one strike in one bar carries the strike's lists; NaN where the
59
+ * gateway has no lagged minute, where it does not draw the chart's bars, on a crypto chain (the state fold sums every
60
+ * book of the coin) and wherever the read fails. Refused by name beside `fold: "kit"` (the gateway refuses velocity
61
+ * on the kit fold) and, while the kit sizes an input by the class width alone, by this host
62
+ * (`WRUN_OPTION_STRIKES_VELOCITY_SERVED`).
50
63
  *
51
64
  * LIGHT at module load: the chain resolver's directory, listing and lead reads run inside `identity` and `facets`.
52
65
  */
@@ -103,13 +116,47 @@ export declare const WRUN_OPTION_VIEWS_UNSERVED_REFUSAL = "wrun_option_views_uns
103
116
  * after its knobs pass, never read wrong.
104
117
  */
105
118
  export declare const WRUN_OPTION_STRIKES_KIT_SERVED = true;
119
+ /**
120
+ * Whether this host answers the strike kit fold's curve row (kit 0.96.0: `curve: true` beside `levels: true`, a row of
121
+ * the gamma curve's readings after each bar's levels row). It does (OPTLOAD W3 U4): the ask names `strikeKitCurve` and
122
+ * `strikeKitMultiplier`, the worker reads the gateway's curve fields into the row (pb-common 12.74.0, fields 24 to 28)
123
+ * and folds it with the kit's own fold while the gateway refuses the read; a grouped answer without the curve fields
124
+ * is refused, never drawn. False refuses a `curve: true` input by name after its knobs pass.
125
+ */
126
+ export declare const WRUN_OPTION_STRIKES_KIT_CURVE_SERVED = true;
127
+ /**
128
+ * Whether this host carries the velocity lists (`velocity_windows`) into a run. Not yet: the shared host plans and
129
+ * aligns each input at the KIT's width rule (kit `planWrunRun`, `alignWrunRows`, `wrunOptionInputTupleWidth`), and the
130
+ * kit sizes an option_strikes input at the class's 12 values until the om schema names the knob, so a velocity block
131
+ * (12 + 4N values a tuple) would split wrong there. So an input declaring the knob is refused by name after its words
132
+ * pass, never read wrong; the kit bump whose rule sizes it (`wrunOptionStrikesVelocityWidth`) sets this true
133
+ * (tests/utility/wrun/sources/option_strikes.velocity.spec.ts holds the two together).
134
+ */
135
+ export declare const WRUN_OPTION_STRIKES_VELOCITY_SERVED = false;
136
+ /**
137
+ * An input's velocity windows as the ask carries them (`strikeVelocityWindowsMin`, the knob's order), none without the
138
+ * knob, or a refusal by name: a value outside the knob's words (`wrun_option_knob_invalid`), the knob beside
139
+ * `fold: "kit"` (the gateway answers velocity on the state fold alone), and while this host does not carry the lists
140
+ * into a run (`WRUN_OPTION_STRIKES_VELOCITY_SERVED`).
141
+ */
142
+ export declare function wrunOptionStrikesVelocityExtras(source: Readonly<Record<string, unknown>>, ctx: WrunRowLaneContext): WrunPollLaneExtras | undefined;
106
143
  /**
107
144
  * The acquisition fields of an input's strike kit fold (OPTLOAD G5): the fold, its params and the input's `max_cells`,
108
145
  * so the gateway (or the worker's fold while the gateway refuses it) answers a refused levels row for a bar whose newest
109
- * minute held more rows. The fold reads every expiry of the minute (its `nearest` keeps the soonest): an `expiries`
110
- * word other than "all" beside it was refused at declaration (`wrunOptionLaneAskOfSource`, the SDK's words).
146
+ * minute held more rows; with `curve`, the curve fields and `optionMultiplier` (the chart's
147
+ * `market.option_multiplier()`, `wrunOptionStrikesChartMultiplier`). The fold reads every expiry of the minute (its
148
+ * `nearest` keeps the soonest): an `expiries` word other than "all" beside it was refused at declaration
149
+ * (`wrunOptionLaneAskOfSource`, the SDK's words).
150
+ */
151
+ export declare function wrunOptionStrikesKitExtras(ask: WrunOptionLaneAsk, ctx: WrunRowLaneContext & WrunRowLanePlanFacts, optionMultiplier?: number): WrunPollLaneExtras;
152
+ /**
153
+ * The multiplier the curve reads: the chart's `market.option_multiplier()` as the host fill computes it
154
+ * (wrun-chart-market-facts.util `wrunChartOptionMultiplier`: OPRA 100, a CME root's point value, crypto 1, else 0), so
155
+ * the gateway's curve values the chain as the template's own curve did. The lane context's market is the one the
156
+ * chain is read as: a stock twin's context names its stock on the OPRA plane (100). Loaded with the facts module at
157
+ * the first curve ask: the lane module stays off the boot path's weight.
111
158
  */
112
- export declare function wrunOptionStrikesKitExtras(ask: WrunOptionLaneAsk, ctx: WrunRowLaneContext & WrunRowLanePlanFacts): WrunPollLaneExtras;
159
+ export declare function wrunOptionStrikesChartMultiplier(ctx: Pick<WrunRowLaneContext, 'exchange' | 'symbol'>): Promise<number>;
113
160
  /** Whether a kit fold bar's rows carry the refusal: its levels row with `refused` 1 (the bar's newest minute held more
114
161
  * rows than the input's `max_cells`). */
115
162
  export declare function wrunOptionStrikesKitRefused(tuples: ReadonlyArray<ReadonlyArray<number>>): boolean;
@@ -34,25 +34,39 @@
34
34
  * packer judges `max_cells`, never a fetch facet). A market pin, `history` and `min_size` are refused by name; a
35
35
  * block over `max_cells` refuses the run (wrun_cell_block_too_large, never truncated). One chain per package.
36
36
  * - `fold` "kit" (OPTLOAD G5, kit 0.90.0; wrun-option-views.util): `nearest`, `window_pct` (required), `lens`,
37
- * `step_rows` (required), `carry` and `levels`, refused by the SDK's rules by name (`wrun_option_knob_invalid`); its
38
- * `expiries` word is "all" or none (kit 0.91.1: the fold keeps its expiries with its own `nearest`, any other word
39
- * refused at declaration). Each bar reads the fold of its newest
37
+ * `step_rows` (required), `carry`, `levels` and `curve` (kit 0.96.0, beside `levels` only), refused by the SDK's
38
+ * rules by name (`wrun_option_knob_invalid`); its `expiries` word is "all" or none (kit 0.91.1: the fold keeps its
39
+ * expiries with its own `nearest`, any other word refused at declaration). Each bar reads the fold of its newest
40
40
  * minute, 14-value rows (`[1, totals..., max_pain, zero_gamma, call_wall, put_wall, spot, refused]` when `levels`,
41
+ * with `curve` the curve row `[2, gex_at_spot, gamma_flip, curve_spot, priced_at_ms, contracts, 0...]` after it,
41
42
  * then `[0, strike, value]` at the strikes the template draws), asked of the gateway at the chart's bars
42
- * (`strikeKitFold` and its params, `strikeMaxCells` the input's `max_cells`) and folded by the worker by the same
43
- * rules while the gateway refuses the read. A bar whose newest minute held more rows than `max_cells` answers its
43
+ * (`strikeKitFold` and its params, `strikeMaxCells` the input's `max_cells`, with `curve` `strikeKitCurve` and
44
+ * `strikeKitMultiplier`, the chart's `market.option_multiplier()`) and folded by the worker with the kit's own fold
45
+ * while the gateway refuses the read. A bar whose newest minute held more rows than `max_cells` answers its
44
46
  * levels row refused, and that refuses the run (wrun_cell_block_too_large), as a block over `max_cells` does today;
45
47
  * an input declaring `missing: "empty"` reads that bar empty instead (C1.2b). The run carries the 14-value rows: the
46
48
  * lane's plan, the packer and the shared aligner (kit 0.91.1) size the block by the input's width
47
49
  * (`WRUN_OPTION_STRIKES_KIT_SERVED`).
48
50
  * - O1 (OPTLOAD G5): on the OPRA plane the chain is the plane's own by coin (`wrunHeldOpraPlaneChain`), no chain
49
51
  * directory read.
52
+ * - `velocity_windows` (SKYLIT-PARITY contract H; the om schema takes the knob by this name and shape): 1 to 7 distinct
53
+ * windows in minutes from 1, 5, 10, 15, 60, 240 and 1440, a literal list. It rides the ask
54
+ * (`strikeVelocityWindowsMin`, the knob's order) and each tuple appends four lists after `underlying`, each one entry
55
+ * per window in the knob's order: `[...12 values, net_gex_velocity..., net_dex_velocity..., net_vex_velocity...,
56
+ * oi_velocity...]`, width 12 + 4N (`wrunOptionStrikesVelocityWidth`). Without the knob the 12-value tuple is
57
+ * byte-identical. The gateway answers velocity on its fold BAR state read alone, whose rows are per strike (every
58
+ * live expiry of the bar summed), so every tuple of one strike in one bar carries the strike's lists; NaN where the
59
+ * gateway has no lagged minute, where it does not draw the chart's bars, on a crypto chain (the state fold sums every
60
+ * book of the coin) and wherever the read fails. Refused by name beside `fold: "kit"` (the gateway refuses velocity
61
+ * on the kit fold) and, while the kit sizes an input by the class width alone, by this host
62
+ * (`WRUN_OPTION_STRIKES_VELOCITY_SERVED`).
50
63
  *
51
64
  * LIGHT at module load: the chain resolver's directory, listing and lead reads run inside `identity` and `facets`.
52
65
  */
53
66
  import { decideWrunLaneChain, decideWrunLaneChainIdentity, refuseWrunLaneStrayKnob, resolveWrunLaneChainChart, WRUN_OPTION_CHART_UNRESOLVED_CODE, wrunLaneChainLeadMoved, wrunLaneChainRefusalError, wrunLaneChartKey, } from '../opra-option-lanes.util.js';
54
67
  import { refuseWrunPollInput } from '../wrun-poll-lane.types.js';
55
- import { WRUN_OPTION_STRIKES_KIT_LAYOUTS, WRUN_OPTION_STRIKES_KIT_REFUSED_COLUMN, wrunHeldOpraPlaneChain, wrunOptionLaneAskFields, wrunOptionLaneAskOfSource, } from '../../wrun-option-views.util.js';
68
+ import { WRUN_OPTION_STRIKES_KIT_LAYOUTS, WRUN_OPTION_STRIKES_KIT_REFUSED_COLUMN, WRUN_OPTION_STRIKES_VELOCITY_FIELD, WRUN_OPTION_STRIKES_VELOCITY_KNOB, WRUN_OPTION_STRIKES_VELOCITY_TAKES, wrunHeldOpraPlaneChain, wrunOptionLaneAskFields, wrunOptionLaneAskOfSource, wrunOptionStrikesVelocityWindows, } from '../../wrun-option-views.util.js';
69
+ import { refuseWrunOptionKnob } from '../../wrun-option-knobs.util.js';
56
70
  import { WRUN_OPTIONS_CHAIN_EXPIRIES_CODE, wrunOptionsChainExpiries, wrunOptionsChainIdentityKey, } from '../../wrun-options-chain.util.js';
57
71
  import { attachWrunRefusal, wrunAuthorRuleSeed } from '../../wrun-refusal.util.js';
58
72
  /** f64s per tuple (om's `WRUN_OPTION_STRIKES_TUPLE_WIDTH`). */
@@ -135,14 +149,71 @@ export const WRUN_OPTION_VIEWS_UNSERVED_REFUSAL = 'wrun_option_views_unserved';
135
149
  * after its knobs pass, never read wrong.
136
150
  */
137
151
  export const WRUN_OPTION_STRIKES_KIT_SERVED = true;
152
+ /**
153
+ * Whether this host answers the strike kit fold's curve row (kit 0.96.0: `curve: true` beside `levels: true`, a row of
154
+ * the gamma curve's readings after each bar's levels row). It does (OPTLOAD W3 U4): the ask names `strikeKitCurve` and
155
+ * `strikeKitMultiplier`, the worker reads the gateway's curve fields into the row (pb-common 12.74.0, fields 24 to 28)
156
+ * and folds it with the kit's own fold while the gateway refuses the read; a grouped answer without the curve fields
157
+ * is refused, never drawn. False refuses a `curve: true` input by name after its knobs pass.
158
+ */
159
+ export const WRUN_OPTION_STRIKES_KIT_CURVE_SERVED = true;
160
+ /**
161
+ * Whether this host carries the velocity lists (`velocity_windows`) into a run. Not yet: the shared host plans and
162
+ * aligns each input at the KIT's width rule (kit `planWrunRun`, `alignWrunRows`, `wrunOptionInputTupleWidth`), and the
163
+ * kit sizes an option_strikes input at the class's 12 values until the om schema names the knob, so a velocity block
164
+ * (12 + 4N values a tuple) would split wrong there. So an input declaring the knob is refused by name after its words
165
+ * pass, never read wrong; the kit bump whose rule sizes it (`wrunOptionStrikesVelocityWidth`) sets this true
166
+ * (tests/utility/wrun/sources/option_strikes.velocity.spec.ts holds the two together).
167
+ */
168
+ export const WRUN_OPTION_STRIKES_VELOCITY_SERVED = false;
169
+ /**
170
+ * An input's velocity windows as the ask carries them (`strikeVelocityWindowsMin`, the knob's order), none without the
171
+ * knob, or a refusal by name: a value outside the knob's words (`wrun_option_knob_invalid`), the knob beside
172
+ * `fold: "kit"` (the gateway answers velocity on the state fold alone), and while this host does not carry the lists
173
+ * into a run (`WRUN_OPTION_STRIKES_VELOCITY_SERVED`).
174
+ */
175
+ export function wrunOptionStrikesVelocityExtras(source, ctx) {
176
+ const value = source[WRUN_OPTION_STRIKES_VELOCITY_KNOB];
177
+ if (value === undefined)
178
+ return undefined;
179
+ const windows = wrunOptionStrikesVelocityWindows(value);
180
+ if (windows === undefined) {
181
+ return refuseWrunOptionKnob(ctx, WRUN_OPTION_STRIKES_VELOCITY_KNOB, value, WRUN_OPTION_STRIKES_VELOCITY_TAKES);
182
+ }
183
+ if (source.fold === 'kit') {
184
+ return refuseWrunOptionKnob(ctx, WRUN_OPTION_STRIKES_VELOCITY_KNOB, value, 'the strike rows alone, never fold "kit" (drop one of the two)');
185
+ }
186
+ if (!WRUN_OPTION_STRIKES_VELOCITY_SERVED) {
187
+ return refuseWrunPollInput(ctx, `reads option_strikes with ${WRUN_OPTION_STRIKES_VELOCITY_KNOB} (${WRUN_OPTION_VIEWS_UNSERVED_REFUSAL}): this ` +
188
+ "app does not carry the strike velocity columns into a run yet; drop the knob and read the strike rows' " +
189
+ 'own columns', wrunAuthorRuleSeed(WRUN_OPTION_VIEWS_UNSERVED_REFUSAL));
190
+ }
191
+ return { [WRUN_OPTION_STRIKES_VELOCITY_FIELD]: windows };
192
+ }
138
193
  /**
139
194
  * The acquisition fields of an input's strike kit fold (OPTLOAD G5): the fold, its params and the input's `max_cells`,
140
195
  * so the gateway (or the worker's fold while the gateway refuses it) answers a refused levels row for a bar whose newest
141
- * minute held more rows. The fold reads every expiry of the minute (its `nearest` keeps the soonest): an `expiries`
142
- * word other than "all" beside it was refused at declaration (`wrunOptionLaneAskOfSource`, the SDK's words).
196
+ * minute held more rows; with `curve`, the curve fields and `optionMultiplier` (the chart's
197
+ * `market.option_multiplier()`, `wrunOptionStrikesChartMultiplier`). The fold reads every expiry of the minute (its
198
+ * `nearest` keeps the soonest): an `expiries` word other than "all" beside it was refused at declaration
199
+ * (`wrunOptionLaneAskOfSource`, the SDK's words).
143
200
  */
144
- export function wrunOptionStrikesKitExtras(ask, ctx) {
145
- return wrunOptionLaneAskFields(ask, { maxCells: ctx.maxCells });
201
+ export function wrunOptionStrikesKitExtras(ask, ctx, optionMultiplier) {
202
+ return wrunOptionLaneAskFields(ask, {
203
+ maxCells: ctx.maxCells,
204
+ ...(optionMultiplier !== undefined ? { optionMultiplier } : {}),
205
+ });
206
+ }
207
+ /**
208
+ * The multiplier the curve reads: the chart's `market.option_multiplier()` as the host fill computes it
209
+ * (wrun-chart-market-facts.util `wrunChartOptionMultiplier`: OPRA 100, a CME root's point value, crypto 1, else 0), so
210
+ * the gateway's curve values the chain as the template's own curve did. The lane context's market is the one the
211
+ * chain is read as: a stock twin's context names its stock on the OPRA plane (100). Loaded with the facts module at
212
+ * the first curve ask: the lane module stays off the boot path's weight.
213
+ */
214
+ export async function wrunOptionStrikesChartMultiplier(ctx) {
215
+ const { wrunChartOptionMultiplier } = await import('../../wrun-chart-market-facts.util.js');
216
+ return wrunChartOptionMultiplier({ exchange: ctx.exchange, symbol: ctx.symbol });
146
217
  }
147
218
  /** Whether a kit fold bar's rows carry the refusal: its levels row with `refused` 1 (the bar's newest minute held more
148
219
  * rows than the input's `max_cells`). */
@@ -182,8 +253,9 @@ export const rowLane = {
182
253
  horizon: wrunOptionStrikesHorizon,
183
254
  acquisitionMoved: wrunOptionStrikesAcquisitionMoved,
184
255
  identity: async (ctx) => {
185
- // O1: on the OPRA plane the chain is the plane's own by coin, no chain directory read.
186
- const held = await wrunHeldOpraPlaneChain(ctx.exchange, ctx.coin, ctx.opraPlane);
256
+ // O1: on the OPRA plane the chain is the plane's own by coin, no chain directory read (the chart market judged whole
257
+ // where the planner handed no verdict).
258
+ const held = await wrunHeldOpraPlaneChain(ctx.exchange, ctx.coin, ctx.opraPlane, ctx.symbol);
187
259
  rememberStrikesChart(wrunLaneChartKey(ctx), await resolveWrunLaneChainChart(ctx, held));
188
260
  },
189
261
  facets: async (source, ctx) => {
@@ -212,11 +284,19 @@ export const rowLane = {
212
284
  throw wrunLaneChainRefusalError(decision, 'option_strikes');
213
285
  // The kit fold and its params, by the SDK's rules (`wrun_option_knob_invalid`), then this host's guard.
214
286
  const kit = wrunOptionLaneAskOfSource(source, ctx);
215
- const kitExtras = kit === undefined ? undefined : wrunOptionStrikesKitExtras(kit, ctx);
216
- if (kitExtras !== undefined && !WRUN_OPTION_STRIKES_KIT_SERVED) {
287
+ if (kit !== undefined && !WRUN_OPTION_STRIKES_KIT_SERVED) {
217
288
  return refuseWrunPollInput(ctx, `reads option_strikes with fold "kit" (${WRUN_OPTION_VIEWS_UNSERVED_REFUSAL}): this app does not carry the ` +
218
289
  "kit fold's rows into a run yet; read the strike rows whole (drop fold and its params)", wrunAuthorRuleSeed(WRUN_OPTION_VIEWS_UNSERVED_REFUSAL));
219
290
  }
291
+ if (kit?.params.curve === 1 && !WRUN_OPTION_STRIKES_KIT_CURVE_SERVED) {
292
+ return refuseWrunPollInput(ctx, `reads option_strikes with fold "kit" and curve (${WRUN_OPTION_VIEWS_UNSERVED_REFUSAL}): this app does not ` +
293
+ "answer the kit fold's curve row yet; drop curve and read the gamma curve from the strike rows", wrunAuthorRuleSeed(WRUN_OPTION_VIEWS_UNSERVED_REFUSAL));
294
+ }
295
+ const velocityExtras = wrunOptionStrikesVelocityExtras(source, ctx);
296
+ // The curve's multiplier is read for an input declaring it alone: any other asks exactly what it asked before.
297
+ const kitExtras = kit === undefined
298
+ ? undefined
299
+ : wrunOptionStrikesKitExtras(kit, ctx, kit.params.curve === 1 ? await wrunOptionStrikesChartMultiplier(ctx) : undefined);
220
300
  const chain = await decideWrunLaneChain(chart, { venue: source.venue, book: source.book }, ctx);
221
301
  return {
222
302
  // The chain's identity as the options chain keys it (one chain per package: `acquisitions: 'one'`).
@@ -225,6 +305,7 @@ export const rowLane = {
225
305
  // The run's bar span: the worker keeps the newest minute of each of these bars.
226
306
  hostIntervalMs: ctx.intervalMs,
227
307
  ...kitExtras,
308
+ ...velocityExtras,
228
309
  };
229
310
  },
230
311
  cells: wrunOptionStrikesCells,
@@ -33,8 +33,11 @@
33
33
  * the SDK's reference), so the template reads the one or two tuples it reads today. The pick's fields ride the
34
34
  * acquisition (`surfacePick` and its params, with the run's bar span), so the worker asks OPTION_SURFACE grouped to
35
35
  * the chart's bars with the pick applied there (`optionRead`: the gateway lands each bar on its newest sealed 5m
36
- * bucket, as this lane lands it) and reads today's buckets while the gateway refuses the read; the pick applied on
37
- * the page to a bar the gateway picked picks the same tuples. An input without `pick` asks and lands as before.
36
+ * bucket, as this lane lands it), or, where the chart's bars are no grouping the gateway draws (an RTH CME chart's
37
+ * 13:30Z hours, a daily bar), in the widest UTC groups that nest inside them (OPTLOAD W3 SURF-NEST: a few rows a bar,
38
+ * each its group's newest sealed bucket picked; this lane lands each bar on its newest row), and reads today's
39
+ * buckets while the gateway refuses the read; the pick applied on the page to a bar the gateway picked picks the
40
+ * same tuples. An input without `pick` asks and lands as before.
38
41
  * - O1 (OPTLOAD G5): on the OPRA plane the chain is the plane's own by coin (`wrunHeldOpraPlaneChain`), no chain
39
42
  * directory read.
40
43
  *
@@ -33,8 +33,11 @@
33
33
  * the SDK's reference), so the template reads the one or two tuples it reads today. The pick's fields ride the
34
34
  * acquisition (`surfacePick` and its params, with the run's bar span), so the worker asks OPTION_SURFACE grouped to
35
35
  * the chart's bars with the pick applied there (`optionRead`: the gateway lands each bar on its newest sealed 5m
36
- * bucket, as this lane lands it) and reads today's buckets while the gateway refuses the read; the pick applied on
37
- * the page to a bar the gateway picked picks the same tuples. An input without `pick` asks and lands as before.
36
+ * bucket, as this lane lands it), or, where the chart's bars are no grouping the gateway draws (an RTH CME chart's
37
+ * 13:30Z hours, a daily bar), in the widest UTC groups that nest inside them (OPTLOAD W3 SURF-NEST: a few rows a bar,
38
+ * each its group's newest sealed bucket picked; this lane lands each bar on its newest row), and reads today's
39
+ * buckets while the gateway refuses the read; the pick applied on the page to a bar the gateway picked picks the
40
+ * same tuples. An input without `pick` asks and lands as before.
38
41
  * - O1 (OPTLOAD G5): on the OPRA plane the chain is the plane's own by coin (`wrunHeldOpraPlaneChain`), no chain
39
42
  * directory read.
40
43
  *
@@ -146,7 +149,8 @@ export const rowLane = {
146
149
  await assertWrunProtocolType(ctx, WRUN_OPTION_SURFACE_TYPE, 'option_surface');
147
150
  // O1: on the OPRA plane the chain is the plane's own by coin, no chain directory read.
148
151
  const held = await wrunHeldOpraPlaneChain(ctx.exchange, ctx.coin, ctx.opraPlane);
149
- rememberSurfaceChart(wrunLaneChartKey(ctx), await resolveWrunLaneChainChart(ctx, held));
152
+ // Every input decides through decideWrunLaneChain: the crypto venue listing waits for a crypto venue word.
153
+ rememberSurfaceChart(wrunLaneChartKey(ctx), await resolveWrunLaneChainChart(ctx, held, { cryptoListingOnDemand: true }));
150
154
  },
151
155
  facets: async (source, ctx) => {
152
156
  for (const [knob, owners] of STRAY_KNOBS) {
@@ -38,7 +38,9 @@
38
38
  * interval pin and a view on these classes refuse in the pinned-wire planner before the lane is
39
39
  * planned; `forming` views and bindings are refused by the kit.
40
40
  */
41
+ import type { OpraOptionPlaneStop } from '../../../host-ports.types.js';
41
42
  import type { WrunInputSource } from '../../../interfaces/wrun-runtime.interface.js';
43
+ import type { GateProvider } from '../../../workers/constants/socket-slots.js';
42
44
  import type { WrunDailyLanding } from '../wrun-daily-lane.util.js';
43
45
  import { type WrunRefusalSeed } from '../wrun-refusal.util.js';
44
46
  import type { WrunBackendTier, WrunTierChoice, WrunTierLanding } from '../wrun-tier-grid.util.js';
@@ -81,6 +83,23 @@ export interface WrunPollLaneContext {
81
83
  /** The chart's options ride the OPRA plane (the run's `isOpraPlaneExchange`, the planner's one verdict), handed to a
82
84
  * `chain` lane: its chain there is OPRA's chain of the chart's own underlying. Absent reads false. */
83
85
  opraPlane?: boolean;
86
+ /** The chart market a stock twin's lane context stands in for (derived-roots.util `wrunUnderlyingLaneContext` over the
87
+ * run's twin lane market, `wrunChartOptionsLaneMarket`): the context names the twin's stock on the OPRA plane, and a
88
+ * crypto venue word still reads that venue's chain of the coin (opra-option-lanes.util `resolveWrunLaneCryptoVenues`).
89
+ * Absent on every other context. */
90
+ stockTwinOf?: {
91
+ exchange: string;
92
+ symbol: string;
93
+ };
94
+ /** The run's one options decision for the market this context names (derived-roots.util
95
+ * `decideWrunRunOptionsMarket`, handed on by the planners): the gate plane its chain rides, and off every plane the
96
+ * known stop. A chain lane's chain resolution reads it instead of deciding the plane again
97
+ * (opra-option-lanes.util `resolveWrunLaneChartChain`), so no lane of a run reads another plane than its head
98
+ * decided. Absent outside a run's plan: the plane is read when the chain resolves. */
99
+ optionsDecision?: {
100
+ plane: GateProvider | null;
101
+ opraStop?: OpraOptionPlaneStop;
102
+ };
84
103
  /**
85
104
  * The run's plan as an identity: one object per `planWrunPollLanes` call, the same for every input it plans. A lane
86
105
  * keys a resolution every input of the run shares by it (a `WeakMap`: a `chain` lane's chart, its chain and its
@@ -42,6 +42,7 @@
42
42
  import type { WrunIndicatorMetadata, WrunInputSource, WrunMetadataParam } from '../../../interfaces/wrun-runtime.interface.js';
43
43
  import type { OpraReadFacts } from '../../chart/opra-read-access.leaf.js';
44
44
  import type { OpraOptionPlaneStop } from '../../../host-ports.types.js';
45
+ import { type WrunRunOptionsMarket } from '../derived-roots.util.js';
45
46
  import { type WrunRefusalSeed } from '../wrun-refusal.util.js';
46
47
  import { type WrunPollLane, type WrunPollLaneContext, type WrunPollLaneId, type WrunPollLaneInstance, type WrunPollLaneSource } from './wrun-poll-lane.types.js';
47
48
  import { type WrunLaneChainPlane, type WrunRowLaneHorizon } from './wrun-row-lane.types.js';
@@ -76,15 +77,21 @@ export declare function wrunPollLaneInstanceKey(laneKey: string, extras: Readonl
76
77
  * says it: such a chart serves candles, time and the global series (named by class). */
77
78
  export declare function wrunPollLaneIndexModeReason(): string;
78
79
  /** What the run hands the poll planner beside the chart: its OPRA facts (`mayReadOpra`: who may read the plane)
79
- * and the predicate an `opra` lane is admitted by (`isOpraPlaneExchange`: the chart's options ride the OPRA plane,
80
- * a US stock or ETF chart under either venue spelling while the `opra` flag is lit, an OPRA contract chart; absent,
81
- * no chart is judged off the plane). */
80
+ * and the predicate an `opra` lane is admitted by (`isOpraPlaneExchange`, over the chart market's exchange and
81
+ * symbol: the chart's options ride the OPRA plane, a US stock or ETF chart under either venue spelling while the
82
+ * `opra` flag is lit, an OPRA contract chart, a stock twin reading its stock's chain; absent, no chart is judged off
83
+ * the plane). */
82
84
  export interface WrunPollLaneRunFacts extends OpraReadFacts {
83
- isOpraPlaneExchange?: (exchange: string) => boolean;
85
+ isOpraPlaneExchange?: (exchange: string, symbol: string) => boolean;
84
86
  /** Why a chart off the plane is off it although its options list on OPRA (opra-options-gate.util
85
87
  * `opraOptionPlaneStop`: the flag check's `flag-off`, the plane router's `chart-kind`); absent, the market's own
86
88
  * words ("no such feed here"). */
87
- opraPlaneStop?: (exchange: string) => OpraOptionPlaneStop | undefined;
89
+ opraPlaneStop?: (exchange: string, symbol: string) => OpraOptionPlaneStop | undefined;
90
+ /** The run's one options decision (derived-roots.util `decideWrunRunOptionsMarket`, taken at its head): every chain
91
+ * lane's input on the chart it was taken for carries it (`wrunChainLaneContext`), so its chain resolves under the
92
+ * decided plane, and a stock twin's input is planned against the twin's lane market (`options.lane`, through
93
+ * `wrunUnderlyingLaneContext`, as an `underlying` root's is). Absent: the plane is read when the chain resolves. */
94
+ options?: WrunRunOptionsMarket;
88
95
  /** The run's current setting values by name (wrun-param-values.util `wrunParamValuesFromSettings` over the
89
96
  * overlay's settings): what an option knob naming a setting reads (`resolveWrunOptionSettingKnobs`). Absent, no
90
97
  * knob's setting is read, and a lane refuses a name it cannot read by name. */
@@ -92,12 +99,13 @@ export interface WrunPollLaneRunFacts extends OpraReadFacts {
92
99
  }
93
100
  /**
94
101
  * The kind of value a setting-bound option knob takes (om kit `WrunOptionParamKnobKind`): `number` a number, int or
95
- * price setting's number; `word` the label of a select's picked option, one of the knob's words; `list` the labels of a
96
- * multi's picked options, each one of the knob's words, in the words' order.
102
+ * price setting's number; `word` the word of a select's picked option (its `style_values` entry when the select
103
+ * declares them, else its label), one of the knob's words; `list` the labels of a multi's picked options, each one of
104
+ * the knob's words, in the words' order.
97
105
  */
98
106
  export type WrunOptionSettingKnobKind = 'number' | 'word' | 'list';
99
107
  /**
100
- * The option knobs a setting may stand for, by source class, with the kind each takes (om kit 0.89.0
108
+ * The option knobs a setting may stand for, by source class, with the kind each takes (om kit 0.96.0
101
109
  * `WRUN_OPTION_PARAM_KNOBS`, row for row): ONE table for both planners, read before a poll lane's `plan` and a row lane's
102
110
  * `facets` (`resolveWrunOptionSettingKnobs`), so no lane reads a setting itself. The sheet records the setting's NAME in
103
111
  * the knob (an author's `min_premium: "@floor"` compiles to `"floor"`), and every host reads that setting's current
@@ -106,11 +114,16 @@ export type WrunOptionSettingKnobKind = 'number' | 'word' | 'list';
106
114
  * the kit's.
107
115
  */
108
116
  export declare const WRUN_OPTION_SETTING_KNOBS: Readonly<Record<string, Readonly<Record<string, WrunOptionSettingKnobKind>>>>;
117
+ /** The words a word or list knob takes from a setting (om `wrunOptionKnobWords`): the print classes' `types`,
118
+ * `moneyness` and `sides` (wrun-option-prints.util), and option_strike_flow's `expiries` (the words a setting picks);
119
+ * none for any other knob. */
120
+ export declare function wrunOptionSettingKnobWords(knob: string): readonly string[];
109
121
  /**
110
122
  * One input's source with every option knob that names a setting read as the setting's current value (om
111
123
  * `resolveOptionParamKnobs`, the SDK host's rule, over the class's row of `WRUN_OPTION_SETTING_KNOBS`): a number knob
112
- * takes a number, int or price setting's number; a word knob (`types`, `moneyness`) the label of a select's picked
113
- * option, one of its words; a list knob (`sides`) the labels of a multi's picked options, in the words' order. The name
124
+ * takes a number, int or price setting's number; a word knob (`types`, `moneyness`, option_strike_flow's `expiries`)
125
+ * the word of a select's picked option, its `style_values` entry when the select declares them, else its label, one of
126
+ * its words; a list knob (`sides`) the labels of a multi's picked options, in the words' order. The name
114
127
  * must be a compute setting of the sheet (a style knob is none) with a value this run read, of the knob's kind and
115
128
  * picking its words, else the input is refused by name (`wrun_option_knob_invalid`). A literal (a number, a list, a word
116
129
  * of the knob's own) is left as it is (its lane judges it), and so is every input when the run read no setting values; a
@@ -128,9 +141,17 @@ export interface WrunChartOpraPlane {
128
141
  * `opraOptionPlaneStop`: the flag check's `flag-off`, the plane router's `chart-kind`); absent, none is known. */
129
142
  stop?: OpraOptionPlaneStop;
130
143
  }
131
- /** The chart's OPRA plane facts, off the predicates the run injects (`isOpraPlaneExchange`: absent, no chart rides
132
- * the plane; `opraPlaneStop`, asked only off the plane). */
133
- export declare function wrunChartOpraPlane(exchange: string, facts: Pick<WrunPollLaneRunFacts, 'isOpraPlaneExchange' | 'opraPlaneStop'> | undefined): WrunChartOpraPlane;
144
+ /** The chart's OPRA plane facts, off the predicates the run injects over the chart's market, exchange and symbol
145
+ * (`isOpraPlaneExchange`: absent, no chart rides the plane; `opraPlaneStop`, asked only off the plane). */
146
+ export declare function wrunChartOpraPlane(chart: Pick<WrunPollLaneContext, 'exchange' | 'symbol'>, facts: Pick<WrunPollLaneRunFacts, 'isOpraPlaneExchange' | 'opraPlaneStop'> | undefined): WrunChartOpraPlane;
147
+ /**
148
+ * A chain lane input's context under the run's one options decision (`options`), both planners' one rule: on the chart
149
+ * the decision was taken for, the decision rides along (`optionsDecision`: the plane the input's chain resolves under,
150
+ * never decided again) and a stock twin's lane market stands in place of the chart's (`wrunUnderlyingLaneContext`, the
151
+ * swap an `underlying` root's input reads). A context with no decision, or one of another chart market (a switch since
152
+ * the head: the run is superseded), is left as it is.
153
+ */
154
+ export declare function wrunChainLaneContext<Ctx extends WrunPollLaneContext>(ctx: Ctx, options: WrunRunOptionsMarket | undefined): Ctx;
134
155
  /**
135
156
  * Why one input of a lane the chart does not serve is not served, as `wrunUnservedLaneInput` reads it: the planner's
136
157
  * own words after the input's label (`words`, with the `stop` when a known stop keeps the chart's OPRA options off the
@@ -195,7 +216,7 @@ export declare function wrunLaneUnservedScopeRefusal(error: unknown): error is E
195
216
  * stop. Undefined: the lane resolves its chain (its instance then meets its own plane's wall,
196
217
  * `assertWrunLaneChainPlaneReadable`).
197
218
  */
198
- export declare function wrunChainLaneStop(plane: WrunChartOpraPlane, run: OpraReadFacts | undefined, ctx: Pick<WrunPollLaneContext, 'inputName' | 'sourceClass'>): WrunUnservedLaneWhy | undefined;
219
+ export declare function wrunChainLaneStop(plane: WrunChartOpraPlane, run: OpraReadFacts | undefined, ctx: Pick<WrunPollLaneContext, 'inputName' | 'sourceClass' | 'stockTwinOf'>, venue?: unknown): WrunUnservedLaneWhy | undefined;
199
220
  /** The run's plan against the chart (WRUN-REFUSALS contract): the lane instances to fetch, and
200
221
  * the feeds the chart's fetch never serves to inputs that declared a missing fill (one entry per
201
222
  * lane key, its inputs in declaration order). */