@orangecharts/wrun-chart-host 0.9.0 → 0.11.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 (252) hide show
  1. package/README.md +2 -0
  2. package/dist/constants/feature-flags.constants.d.ts +15 -1
  3. package/dist/constants/feature-flags.constants.js +130 -24
  4. package/dist/constants/governed-exchanges.constants.d.ts +12 -0
  5. package/dist/constants/governed-exchanges.constants.js +16 -0
  6. package/dist/constants/opra-compliance.constants.d.ts +3 -2
  7. package/dist/constants/opra-compliance.constants.js +3 -2
  8. package/dist/constants/option-venues.constants.d.ts +2 -2
  9. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
  10. package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
  11. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
  12. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
  13. package/dist/constants/venue-presets.constants.d.ts +20 -20
  14. package/dist/constants/venue-presets.constants.js +24 -26
  15. package/dist/host-env.d.ts +21 -5
  16. package/dist/host-env.js +6 -0
  17. package/dist/host-ports.types.d.ts +102 -19
  18. package/dist/index.d.ts +18 -0
  19. package/dist/index.js +18 -0
  20. package/dist/interfaces/cancel-reason.interface.d.ts +1 -1
  21. package/dist/interfaces/cme-realtime.interface.d.ts +16 -9
  22. package/dist/interfaces/cme-realtime.interface.js +6 -3
  23. package/dist/interfaces/kscript-diagnostics.interface.d.ts +12 -0
  24. package/dist/interfaces/opra-realtime.interface.d.ts +1 -5
  25. package/dist/interfaces/prediction-market.interface.d.ts +7 -0
  26. package/dist/interfaces/replay.interface.d.ts +8 -0
  27. package/dist/interfaces/stocks-realtime.interface.d.ts +57 -0
  28. package/dist/interfaces/stocks-realtime.interface.js +32 -0
  29. package/dist/interfaces/wrun-runtime.interface.d.ts +18 -2
  30. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +62 -94
  31. package/dist/kscript-data/controls/live-trades-merge.util.js +106 -171
  32. package/dist/market-data/billing.interface.d.ts +174 -36
  33. package/dist/market-data/billing.interface.js +58 -8
  34. package/dist/market-data/venue.d.ts +152 -7
  35. package/dist/market-data/venues/cme.contract.copy.json +66 -0
  36. package/dist/market-data/venues/cme.d.ts +126 -0
  37. package/dist/market-data/venues/cme.js +133 -0
  38. package/dist/market-data/venues/index.d.ts +294 -7
  39. package/dist/market-data/venues/index.js +49 -6
  40. package/dist/market-data/venues/opra.contract.copy.json +3 -2
  41. package/dist/market-data/venues/opra.d.ts +2 -2
  42. package/dist/market-data/venues/opra.js +5 -2
  43. package/dist/market-data/venues/stocks.contract.copy.json +64 -0
  44. package/dist/market-data/venues/stocks.d.ts +130 -0
  45. package/dist/market-data/venues/stocks.js +117 -0
  46. package/dist/settings-templates/footprint-rows.js +35 -2
  47. package/dist/settings-templates/form-rows.d.ts +2 -1
  48. package/dist/settings-templates/index.js +7 -3
  49. package/dist/settings-templates/indicator-fields.d.ts +5 -4
  50. package/dist/settings-templates/indicator-fields.js +79 -10
  51. package/dist/settings-templates/tool-rules.d.ts +32 -15
  52. package/dist/settings-templates/tool-rules.js +33 -11
  53. package/dist/settings-templates/tool-tables.generated.js +95 -31
  54. package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
  55. package/dist/utility/chart/book-live-bucket.util.js +47 -0
  56. package/dist/utility/chart/cme-cache-context.util.d.ts +5 -3
  57. package/dist/utility/chart/cme-cache-context.util.js +10 -6
  58. package/dist/utility/chart/cme-realtime.util.js +10 -0
  59. package/dist/utility/chart/cme-user-scripts-gate.util.d.ts +83 -0
  60. package/dist/utility/chart/cme-user-scripts-gate.util.js +142 -0
  61. package/dist/utility/chart/effective-chart-session.util.d.ts +14 -0
  62. package/dist/utility/chart/effective-chart-session.util.js +39 -0
  63. package/dist/utility/chart/host-bar-placement.util.d.ts +28 -0
  64. package/dist/utility/chart/host-bar-placement.util.js +170 -30
  65. package/dist/utility/chart/index-host-tier.util.d.ts +3 -1
  66. package/dist/utility/chart/index-host-tier.util.js +7 -2
  67. package/dist/utility/chart/index-mode-admission.util.js +30 -3
  68. package/dist/utility/chart/kscript-apply-fingerprint.util.js +1 -1
  69. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
  70. package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
  71. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +9 -7
  72. package/dist/utility/chart/kscript-live-coalesce.util.js +13 -8
  73. package/dist/utility/chart/kscript-live-source-identity.util.d.ts +9 -0
  74. package/dist/utility/chart/kscript-live-source-identity.util.js +10 -1
  75. package/dist/utility/chart/kscript-provenance-keys.util.js +13 -0
  76. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +5 -1
  77. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
  78. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
  79. package/dist/utility/chart/kscript-venue-policy.util.d.ts +156 -43
  80. package/dist/utility/chart/kscript-venue-policy.util.js +249 -59
  81. package/dist/utility/chart/live-bucket.util.d.ts +24 -8
  82. package/dist/utility/chart/live-bucket.util.js +85 -27
  83. package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
  84. package/dist/utility/chart/market-session-schedule.util.js +16 -0
  85. package/dist/utility/chart/marketKind.util.js +5 -0
  86. package/dist/utility/chart/mixed-mode.util.d.ts +7 -0
  87. package/dist/utility/chart/mixed-mode.util.js +14 -0
  88. package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
  89. package/dist/utility/chart/opra-read-access.leaf.js +5 -3
  90. package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +11 -16
  91. package/dist/utility/chart/opra-user-scripts-gate.util.js +12 -28
  92. package/dist/utility/chart/rth-session.util.d.ts +12 -10
  93. package/dist/utility/chart/rth-session.util.js +25 -21
  94. package/dist/utility/chart/trading-day.util.d.ts +17 -0
  95. package/dist/utility/chart/trading-day.util.js +59 -0
  96. package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
  97. package/dist/utility/chart/window-geometry.leaf.js +22 -6
  98. package/dist/utility/chart/window-owner.leaf.d.ts +23 -2
  99. package/dist/utility/chart/window-owner.leaf.js +45 -3
  100. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +33 -15
  101. package/dist/utility/chart/wrun-bar-session-facts.util.js +70 -20
  102. package/dist/utility/chart/wrun-run-result.util.d.ts +12 -0
  103. package/dist/utility/chart/wrun-run-result.util.js +141 -6
  104. package/dist/utility/intl-locale.util.js +5 -0
  105. package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
  106. package/dist/utility/options/option-bar-anchor.util.js +340 -0
  107. package/dist/utility/options/option-venue.util.d.ts +18 -0
  108. package/dist/utility/options/option-venue.util.js +27 -0
  109. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +4 -0
  110. package/dist/utility/v2/gate-plane.util.d.ts +12 -3
  111. package/dist/utility/v2/gate-plane.util.js +30 -4
  112. package/dist/utility/v2/gate-session-latch.util.js +1 -1
  113. package/dist/utility/v2/stocks-governed.util.d.ts +16 -0
  114. package/dist/utility/v2/stocks-governed.util.js +34 -0
  115. package/dist/utility/wrun/derived-roots.leaf.d.ts +13 -0
  116. package/dist/utility/wrun/derived-roots.leaf.js +27 -0
  117. package/dist/utility/wrun/derived-roots.util.d.ts +205 -0
  118. package/dist/utility/wrun/derived-roots.util.js +451 -0
  119. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +43 -7
  120. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
  121. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
  122. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
  123. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -2
  124. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -2
  125. package/dist/utility/wrun/run-schedule/wrun-own-candles.util.d.ts +24 -3
  126. package/dist/utility/wrun/run-schedule/wrun-own-candles.util.js +46 -10
  127. package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
  128. package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
  129. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
  130. package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
  131. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
  132. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +2 -1
  133. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +3 -0
  134. package/dist/utility/wrun/sources/row-lanes/option_prints.js +19 -4
  135. package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
  136. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +52 -13
  137. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +88 -19
  138. package/dist/utility/wrun/sources/row-lanes/option_surface.js +2 -1
  139. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
  140. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +24 -9
  141. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +41 -10
  142. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +111 -0
  143. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +133 -0
  144. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +15 -3
  145. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +22 -3
  146. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +31 -0
  147. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +197 -13
  148. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +761 -27
  149. package/dist/utility/wrun/wrun-browser-sources.leaf.js +1 -2
  150. package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
  151. package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
  152. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +60 -16
  153. package/dist/utility/wrun/wrun-chart-market-facts.util.js +113 -61
  154. package/dist/utility/wrun/wrun-color-settings.util.d.ts +9 -0
  155. package/dist/utility/wrun/wrun-color-settings.util.js +33 -0
  156. package/dist/utility/wrun/wrun-download-meter.util.d.ts +15 -0
  157. package/dist/utility/wrun/wrun-download-meter.util.js +14 -2
  158. package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
  159. package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
  160. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
  161. package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
  162. package/dist/utility/wrun/wrun-frames.d.ts +27 -6
  163. package/dist/utility/wrun/wrun-frames.js +73 -10
  164. package/dist/utility/wrun/wrun-handles.util.d.ts +7 -3
  165. package/dist/utility/wrun/wrun-handles.util.js +9 -8
  166. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
  167. package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
  168. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +18 -4
  169. package/dist/utility/wrun/wrun-hud-looks.util.js +45 -13
  170. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +68 -0
  171. package/dist/utility/wrun/wrun-input-requirements.leaf.js +163 -7
  172. package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
  173. package/dist/utility/wrun/wrun-leg-close.util.d.ts +59 -23
  174. package/dist/utility/wrun/wrun-leg-close.util.js +186 -28
  175. package/dist/utility/wrun/wrun-live-intake.util.d.ts +35 -15
  176. package/dist/utility/wrun/wrun-live-intake.util.js +243 -126
  177. package/dist/utility/wrun/wrun-live-tick.util.d.ts +13 -5
  178. package/dist/utility/wrun/wrun-live-tick.util.js +279 -99
  179. package/dist/utility/wrun/wrun-market-facts.util.d.ts +13 -3
  180. package/dist/utility/wrun/wrun-market-facts.util.js +13 -3
  181. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +60 -11
  182. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +70 -5
  183. package/dist/utility/wrun/wrun-market-size-defaults.util.js +31 -5
  184. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
  185. package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
  186. package/dist/utility/wrun/wrun-option-book-rows.util.d.ts +56 -0
  187. package/dist/utility/wrun/wrun-option-book-rows.util.js +96 -0
  188. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
  189. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
  190. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +23 -6
  191. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +47 -11
  192. package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +86 -19
  193. package/dist/utility/wrun/wrun-option-strike-flow.util.js +168 -62
  194. package/dist/utility/wrun/wrun-option-views.util.d.ts +323 -28
  195. package/dist/utility/wrun/wrun-option-views.util.js +484 -71
  196. package/dist/utility/wrun/wrun-options-chain.util.d.ts +3 -3
  197. package/dist/utility/wrun/wrun-options-chain.util.js +2 -0
  198. package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
  199. package/dist/utility/wrun/wrun-output-style.util.js +20 -2
  200. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +32 -2
  201. package/dist/utility/wrun/wrun-overlay-drivers.util.js +13 -3
  202. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
  203. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
  204. package/dist/utility/wrun/wrun-overlay-recovery.util.js +3 -1
  205. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +160 -42
  206. package/dist/utility/wrun/wrun-overlay-run.util.js +1244 -209
  207. package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
  208. package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
  209. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
  210. package/dist/utility/wrun/wrun-panel-mount.util.js +114 -19
  211. package/dist/utility/wrun/wrun-panel-style.util.d.ts +10 -9
  212. package/dist/utility/wrun/wrun-panel-style.util.js +58 -9
  213. package/dist/utility/wrun/wrun-param-map.util.d.ts +14 -11
  214. package/dist/utility/wrun/wrun-param-map.util.js +10 -5
  215. package/dist/utility/wrun/wrun-param-values.util.d.ts +14 -4
  216. package/dist/utility/wrun/wrun-param-values.util.js +4 -0
  217. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +15 -2
  218. package/dist/utility/wrun/wrun-pin-spelling.util.js +39 -14
  219. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
  220. package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
  221. package/dist/utility/wrun/wrun-refusal.util.d.ts +3 -2
  222. package/dist/utility/wrun/wrun-refusal.util.js +22 -0
  223. package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
  224. package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
  225. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +26 -0
  226. package/dist/utility/wrun/wrun-registry-errors.util.js +34 -0
  227. package/dist/utility/wrun/wrun-replay-lane.util.js +3 -2
  228. package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
  229. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +20 -6
  230. package/dist/utility/wrun/wrun-run-interval-session.util.js +22 -7
  231. package/dist/utility/wrun/wrun-run-interval.util.d.ts +43 -9
  232. package/dist/utility/wrun/wrun-run-interval.util.js +58 -15
  233. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +45 -1
  234. package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
  235. package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
  236. package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
  237. package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
  238. package/dist/utility/wrun/wrun-socket-row-source.js +118 -8
  239. package/dist/utility/wrun/wrun-source-rows.util.d.ts +29 -18
  240. package/dist/utility/wrun/wrun-source-rows.util.js +61 -27
  241. package/dist/utility/wrun/wrun-style-words.util.js +6 -4
  242. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
  243. package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
  244. package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
  245. package/dist/utility/wrun/wrun-tape-per-order.util.js +7 -0
  246. package/dist/utility/wrun/wrun-tape-source.util.d.ts +17 -9
  247. package/dist/utility/wrun/wrun-tape-source.util.js +20 -12
  248. package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
  249. package/dist/utils/replay/replay-buffer-math.js +227 -20
  250. package/dist/workers/constants/socket-slots.d.ts +91 -6
  251. package/dist/workers/constants/socket-slots.js +85 -6
  252. package/package.json +5 -5
@@ -0,0 +1,205 @@
1
+ import type { OpraOptionPlaneStop, WrunChartOptionsMarket, WrunChartOptionsMarketRef, WrunGateProvider } from '../../host-ports.types.js';
2
+ import type { WrunMetadataParam } from '../../interfaces/wrun-runtime.interface.js';
3
+ import { type OpraReadFacts } from '../chart/opra-read-access.leaf.js';
4
+ import { type WrunChartOptionsMarketDecision } from './run-schedule/wrun-chart-gate-reader.util.js';
5
+ import type { WrunLaneChainDecider, WrunLaneChartChain } from './sources/opra-option-lanes.util.js';
6
+ import type { WrunPollLaneContext } from './sources/wrun-poll-lane.types.js';
7
+ import { type WrunOptionsChainCryptoVenueWord, type WrunOptionsChainDecision } from './wrun-options-chain.util.js';
8
+ export { WRUN_DERIVED_ROOTS, defaultDerivedRoot, wrunDerivedRootsOf } from './derived-roots.leaf.js';
9
+ /** The knob's name on a source. */
10
+ export declare const WRUN_UNDERLYING_KNOB = "underlying";
11
+ /** The knob's default word: the chart's own chain. */
12
+ export declare const WRUN_UNDERLYING_AUTO = "auto";
13
+ /** The knob's word for the table's default root of the chart's root. */
14
+ export declare const WRUN_UNDERLYING_DERIVED = "derived";
15
+ /** The classes that take the knob (contract F). */
16
+ export declare const WRUN_UNDERLYING_CLASSES: readonly string[];
17
+ /** The stem of a root no venue family lists: `wrun_underlying_unresolved:<root>`. */
18
+ export declare const WRUN_UNDERLYING_UNRESOLVED_CODE = "wrun_underlying_unresolved";
19
+ /** What the knob says: the chart's own chain, the table's default root of the chart's root, or one root. */
20
+ export type WrunUnderlyingKnob = {
21
+ kind: 'auto';
22
+ } | {
23
+ kind: 'derived';
24
+ } | {
25
+ kind: 'root';
26
+ root: string;
27
+ };
28
+ /** Whether `sourceClass` takes the knob. */
29
+ export declare function wrunTakesUnderlying(sourceClass: string): boolean;
30
+ /** The knob's literal reading (absent is "auto"); undefined for a value that is no literal (a setting's name, a word
31
+ * outside the grammar). */
32
+ export declare function wrunUnderlyingKnobOf(value: unknown): WrunUnderlyingKnob | undefined;
33
+ /** The setting a knob value names: an author's handle ("@root") or the name the sheet records ("root"); undefined for
34
+ * a literal and for anything else. */
35
+ export declare function wrunUnderlyingSettingName(value: unknown): string | undefined;
36
+ /** A source's knob, validated: its literal reading, or a refusal by name (`wrun_option_knob_invalid`, om's one name
37
+ * for an options knob outside its words; a setting's name the planners did not read lands here too). */
38
+ export declare function wrunUnderlyingKnob(source: Readonly<Record<string, unknown>>, ctx: {
39
+ inputName: string;
40
+ sourceClass: string;
41
+ }): WrunUnderlyingKnob;
42
+ /**
43
+ * A source whose `underlying` names a setting, read as the word the setting's pick names (the planners' read, before a
44
+ * lane judges the knob, as `resolveWrunOptionSettingKnobs` reads the kit's table): the setting must be a compute select
45
+ * of the sheet with a value this run read, its pick's word (its `style_values` entry when the select declares them,
46
+ * else its label) one of the knob's literals, else the input is refused by name (`wrun_option_knob_invalid`). A
47
+ * literal, a class that takes no knob, and every source of a run that read no setting values are left as they are.
48
+ */
49
+ export declare function resolveWrunUnderlyingSettingKnob<Source extends Readonly<Record<string, unknown>>>(ctx: {
50
+ inputName: string;
51
+ sourceClass: string;
52
+ }, source: Source, params: readonly WrunMetadataParam[], values: Readonly<Record<string, number>> | undefined): Source;
53
+ /**
54
+ * The chart's root as the mapping table keys it: a CME chart's futures root (its contract's, an option contract's
55
+ * underlying future's: ES for ES1!, ESZ6 and `ESZ6 C6000`), else the chart's coin (a stock or ETF ticker, an OPRA
56
+ * contract's underlying, a crypto coin), upper case; '' when the chart names none.
57
+ */
58
+ export declare function wrunChartRootOf(chart: {
59
+ exchange?: unknown;
60
+ symbol?: unknown;
61
+ coin?: unknown;
62
+ }): string;
63
+ /** The refusal of a root no venue family lists (`wrun_underlying_unresolved:<root>`), seeded as a chart with no option
64
+ * chain (the record names the root), so a declared `missing: "empty"` reads an empty block, the planners' one rule. */
65
+ export declare function wrunUnderlyingUnresolvedError(ctx: {
66
+ inputName: string;
67
+ sourceClass: string;
68
+ }, root: string, why: string): Error;
69
+ /** The root a knob reads: undefined for "auto" and for the chart's own root (`wrunChartRootOf`: the chart's own chain,
70
+ * read exactly as "auto" reads it, on its own venue); "derived" the table's default root of the chart's root, refused
71
+ * by name when the table maps it to none. */
72
+ export declare function wrunUnderlyingRootOf(knob: WrunUnderlyingKnob, ctx: {
73
+ inputName: string;
74
+ sourceClass: string;
75
+ exchange: string;
76
+ symbol: string;
77
+ coin: string;
78
+ }): string | undefined;
79
+ /** The venue family that lists a root. */
80
+ export type WrunUnderlyingFamily = 'crypto' | 'cme' | 'opra';
81
+ /** The market a root's chain is read as (`resolveWrunUnderlyingMarket`): its family, and the chart market a chart of
82
+ * that root would be. A crypto root read on the chart's own crypto venue names that venue's word (`venue`: the input
83
+ * reads it where it declares no venue of its own); an OPRA root kept off the plane names the stop (`opraStop`: the
84
+ * `opra` flag dark). */
85
+ export interface WrunUnderlyingMarket {
86
+ family: WrunUnderlyingFamily;
87
+ exchange: string;
88
+ symbol: string;
89
+ coin: string;
90
+ venue?: WrunOptionsChainCryptoVenueWord;
91
+ opraStop?: OpraOptionPlaneStop;
92
+ /** A stock twin's lane market (`wrunChartOptionsLaneMarket`): the chart market whose options it stands in for. */
93
+ twinOf?: {
94
+ exchange: string;
95
+ symbol: string;
96
+ };
97
+ }
98
+ /** The chart a root's family is judged beside: its market (the crypto venue its own chain lists on) and, when the run
99
+ * already resolved it, its chain (the options chain lane's). */
100
+ export interface WrunUnderlyingChart {
101
+ inputName: string;
102
+ sourceClass: string;
103
+ exchange: string;
104
+ symbol: string;
105
+ coin: string;
106
+ category?: number;
107
+ }
108
+ /**
109
+ * The market a root's chain is read as, by the venue family that lists it (the module doc): a crypto root on the chart's
110
+ * own crypto venue when it lists the root, else on the root's listing venue (`wrunUnderlyingCryptoMarket`), a CME root
111
+ * its continuous alias on the exchange it lists on (`CME_ROOT_SPECS`), any other root a US root on the OPRA plane. For
112
+ * an OPRA root and a run the plane is open to (`mayReadOpra`), the `opra` flag is read first (a bounded wait for its map)
113
+ * and a plane it keeps the account off of names its stop; then a root neither the index roots nor the table name must be
114
+ * listed by the plane's expiry directory, or it refuses by name (`wrun_underlying_unresolved:<root>`). A run the plane is
115
+ * closed to reads nothing here: the caller's wall refuses it before any read. `chart` is the chart the input sits on,
116
+ * `chartChain` its chain when the caller already resolved it.
117
+ */
118
+ export declare function resolveWrunUnderlyingMarket(root: string, chart: WrunUnderlyingChart, run: OpraReadFacts | undefined, chartChain?: WrunLaneChartChain): Promise<WrunUnderlyingMarket>;
119
+ /** The `venue` word an input reads a root's chain under: its own when it declares one, else the chart's crypto venue the
120
+ * root's market names (`WrunUnderlyingMarket.venue`), else as declared ("auto", or absent). */
121
+ export declare function wrunUnderlyingVenueWord<Declared>(declared: Declared, market: Pick<WrunUnderlyingMarket, 'venue'>): Declared | WrunOptionsChainCryptoVenueWord;
122
+ /** A lane's context for a root's market (`resolveWrunUnderlyingMarket`, or a stock twin's lane market,
123
+ * `wrunChartOptionsLaneMarket`): the chart's, with the root's market in place of the chart's (no category: the root's
124
+ * market is no option contract), the OPRA plane named for an OPRA root (its chain is the plane's own by coin, no
125
+ * directory read), and a twin's chart market named (`stockTwinOf`: its crypto venue words still read their venues'
126
+ * chains) beside the run's one decision for it (`optionsDecision`, the twin's lane market being that decision's); any
127
+ * other root's market names neither, whatever the context it replaces named (the run decided the chart's market, not
128
+ * the root's). */
129
+ export declare function wrunUnderlyingLaneContext<Ctx extends WrunPollLaneContext>(ctx: Ctx, market: WrunUnderlyingMarket): Ctx;
130
+ /**
131
+ * The lane market a run's chain lanes read a stock twin's options as (the shape `resolveWrunUnderlyingMarket` builds for
132
+ * an OPRA root): the OPRA plane's one exchange, the stock's ticker as the symbol and the coin, and the chart market it
133
+ * stands in for (`twinOf`). Undefined for every other options market (the chart's own: no lane is swapped). The market is
134
+ * the run's one decision (`decideWrunRunOptionsMarket`): the seam names a twin's stock only while the `opra` flag is lit,
135
+ * so no stop is named.
136
+ */
137
+ export declare function wrunChartOptionsLaneMarket(market: WrunChartOptionsMarket | undefined): WrunUnderlyingMarket | undefined;
138
+ /** A run's ONE options market (`decideWrunRunOptionsMarket`): the decision, and for a stock twin the lane market its
139
+ * chain lanes are planned against (`wrunChartOptionsLaneMarket`). */
140
+ export interface WrunRunOptionsMarket extends WrunChartOptionsMarketDecision {
141
+ lane?: WrunUnderlyingMarket;
142
+ }
143
+ /** A run's decided options market as noted (`wrunDecidedOptionsMarket`). */
144
+ export interface WrunDecidedOptionsMarket {
145
+ exchange: string;
146
+ plane: WrunGateProvider | null;
147
+ }
148
+ /** A chart's metadata as the options decisions take it: its market, coin and category (strings and the category). */
149
+ export declare function wrunChartOptionsMarketRefOf(chart: {
150
+ exchange?: unknown;
151
+ symbol?: unknown;
152
+ coin?: unknown;
153
+ category?: unknown;
154
+ } | null | undefined): WrunChartOptionsMarketRef;
155
+ /**
156
+ * The ONE options market a run reads, decided at its head after the bounded waits (run-schedule/wrun-chart-gate-reader.util
157
+ * `decideWrunChartOptionsMarket`: the `opra` flag where it decides the chart's options or the overlay is `stamped` with
158
+ * an OPRA read, the stock twin answer under a lit flag or a stamp), so a run that started under one answer never mixes
159
+ * planes: its planners, its options chain lane, its download plan and its host fill read this decision in place of the
160
+ * seam, and every chain lane resolves its chain under this decision's plane (`optionsDecision` on its context). A later
161
+ * twin answer, or the `opra` flag landing, reruns the chart's options runs once the market they resolve to moved off
162
+ * the decision a browser run noted (`noteWrunRunOptionsMarket`, the host's listeners read `wrunDecidedOptionsMarket`).
163
+ */
164
+ export declare function decideWrunRunOptionsMarket(chart: {
165
+ exchange?: unknown;
166
+ symbol?: unknown;
167
+ coin?: unknown;
168
+ category?: unknown;
169
+ } | null | undefined, stamped?: boolean): Promise<WrunRunOptionsMarket>;
170
+ /**
171
+ * Note the decision a run the browser computes reads (the sandbox prepare, the browser lanes' own step), per chart
172
+ * market: the facts read beside the run (a live tick's `market.option_multiplier()`, `wrunDecidedOptionsExchange`)
173
+ * follow it, and the host reruns the chart's options runs once their market moved off it (`wrunDecidedOptionsMarket`).
174
+ * A batch the cloud computes notes nothing: the server reads the chain of the chart market it is sent.
175
+ */
176
+ export declare function noteWrunRunOptionsMarket(chart: {
177
+ exchange?: unknown;
178
+ symbol?: unknown;
179
+ } | null | undefined, decided: Pick<WrunRunOptionsMarket, 'market' | 'plane'>): void;
180
+ /** The options market the latest browser run on this chart market decided (`noteWrunRunOptionsMarket`), undefined
181
+ * before one noted. */
182
+ export declare function wrunDecidedOptionsMarket(market: {
183
+ exchange?: unknown;
184
+ symbol?: unknown;
185
+ }): WrunDecidedOptionsMarket | undefined;
186
+ /** The options exchange the latest browser run on this chart market decided, undefined before one noted: the chart's
187
+ * own then. */
188
+ export declare function wrunDecidedOptionsExchange(market: {
189
+ exchange?: unknown;
190
+ symbol?: unknown;
191
+ }): string | undefined;
192
+ /** Spec seam: forget every decision noted. */
193
+ export declare function __resetWrunDecidedOptionsMarketsForTests(): void;
194
+ /**
195
+ * One `options_chain` input's chain decision when its `underlying` names a root (the run's options chain lane,
196
+ * wrun-overlay-run.util `wrunOptionsChainLaneExtrasFor`), or undefined for "auto": the setting it names read first
197
+ * (`resolveWrunUnderlyingSettingKnob`), the root's market resolved (`resolveWrunUnderlyingMarket`), then the ONE venue
198
+ * decision every chain class shares (opra-option-lanes.util `decideWrunLaneChainIdentity`) over that market's chain:
199
+ * an OPRA root's the plane's own by coin, with its stop or the session another screen holds named (the decision's OPRA
200
+ * wall, before any read, for a run the plane is closed to); a crypto or CME root's what a chart of that root resolves,
201
+ * its crypto venue word's listing asked for that root. A crypto root the chart's own crypto venue lists reads that venue
202
+ * (the chart's chain is the run's, `chartChain`) unless the input declares a venue of its own. The decision names the
203
+ * root's chain (`chainUnderlying`), so two inputs reading two chains meet the one-venue rule.
204
+ */
205
+ export declare function wrunUnderlyingOptionsChainDecision(source: Readonly<Record<string, unknown>>, who: WrunLaneChainDecider, params: readonly WrunMetadataParam[], values: Readonly<Record<string, number>> | undefined, chartChain?: WrunLaneChartChain): Promise<WrunOptionsChainDecision | undefined>;