@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
@@ -2,7 +2,7 @@ import type { OptionInstrumentSnapshot } from '../../interfaces/option-instrumen
2
2
  import type { OptionSource } from '../options/option-venue.util.js';
3
3
  import type { OpraOptionPlaneStop } from '../../host-ports.types.js';
4
4
  import type { WrunOptionsStopReason } from './wrun-refusal.util.js';
5
- import type { GateProvider } from '../../workers/constants/socket-slots.js';
5
+ import type { GateProvider, OptionsGateProvider } from '../../workers/constants/socket-slots.js';
6
6
  import type { OptionsChainScope } from '../../interfaces/options-chain-scope.interface.js';
7
7
  /** f64s per contract tuple (the shared host's `WRUN_HOST_CELL_TUPLE_WIDTHS.options_chain`, the width
8
8
  * the packer packs; wrun-source-words.kit-mirror.spec.ts pins it). */
@@ -64,7 +64,7 @@ export type WrunOptionsChainServedTier = 'realtime' | 'delayed';
64
64
  * `governedOptionSummaryTier` on the main thread's served-access mirror when the lane resolves the
65
65
  * read; absent: delayed, the tier every read is safe on). */
66
66
  export interface WrunGovernedOptionsChainIdentity {
67
- venue: GateProvider;
67
+ venue: OptionsGateProvider;
68
68
  exchange: string;
69
69
  underlying: string;
70
70
  scope?: OptionsChainScope;
@@ -145,7 +145,7 @@ export declare function wrunOptionsChainLaneScope(inputs: ReadonlyArray<{
145
145
  * an OPRA option contract chart): `cme` is the one plane with a venue word of
146
146
  * its own, and `auto` reads OPRA for an OpenMarket package only. */
147
147
  export type WrunOptionsChartSource = {
148
- venue: GateProvider;
148
+ venue: OptionsGateProvider;
149
149
  exchange: string;
150
150
  underlying: string;
151
151
  } | {
@@ -292,6 +292,8 @@ export function wrunOptionsChainFlagOffRefusal(args) {
292
292
  const WRUN_OPTIONS_CHAIN_DIRECTORY_NAMES = Object.freeze({
293
293
  cme: 'CME',
294
294
  opra: 'US',
295
+ // The stocks tape has no chain directory (a US stock's options are OPRA's); named for the Record's totality only.
296
+ stocks: 'US stocks',
295
297
  });
296
298
  /**
297
299
  * The `venue` knob against the chart, decided in ONE place for the run lane,
@@ -29,6 +29,9 @@ export declare const WRUN_CANDLE_STYLES: readonly ["candle", "hollow", "ohlc", "
29
29
  export declare const WRUN_BAR_GRADINGS: readonly ["linear", "square"];
30
30
  /** The on-line label pill of a guide (OT10). */
31
31
  export declare const WRUN_PILL_STYLES: readonly ["filled", "outlined"];
32
+ /** The axis tag look of a guide with `axis_label: true` (kit scaffold 102,
33
+ * the kit's `WRUN_OUTPUT_AXIS_LOOKS`). */
34
+ export declare const WRUN_AXIS_LOOKS: readonly ["pill", "quiet", "words"];
32
35
  /** The pane's value scale (OT18) and the engine value mode it maps to. */
33
36
  export declare const WRUN_PANE_SCALES: readonly ["linear", "log", "percent", "indexed"];
34
37
  /** Where a pane sits (OT24). */
@@ -110,8 +113,9 @@ export declare function wrunOutputLookPatch(output: WrunMetadataOutput, mount: W
110
113
  /** The hline fields a `role: "guide"` output adds (OT10): the on-line label
111
114
  * (`align` places the output's `label`, `pill_style` and `font_size` dress
112
115
  * it), the axis pill (`axis_label: true` puts value + label on the axis
113
- * instead), the constant `value` and the paint order. `lastValue` is the
114
- * output's last finite value (NaN when the run never gave one). */
116
+ * instead, `axis_look` picks the tag's look as `axisTagLook`), the constant
117
+ * `value` and the paint order. `lastValue` is the output's last finite value
118
+ * (NaN when the run never gave one). */
115
119
  export declare function wrunGuideLook(output: WrunMetadataOutput, lastValue: number, label: string): Record<string, unknown>;
116
120
  /** The candle look a group's first output declares (OT17): the body style
117
121
  * as the engine plot kind, the border and wick pairs (faded by the group's
@@ -52,6 +52,9 @@ const WRUN_CANDLE_PLOT_TYPES = {
52
52
  export const WRUN_BAR_GRADINGS = ['linear', 'square'];
53
53
  /** The on-line label pill of a guide (OT10). */
54
54
  export const WRUN_PILL_STYLES = ['filled', 'outlined'];
55
+ /** The axis tag look of a guide with `axis_label: true` (kit scaffold 102,
56
+ * the kit's `WRUN_OUTPUT_AXIS_LOOKS`). */
57
+ export const WRUN_AXIS_LOOKS = ['pill', 'quiet', 'words'];
55
58
  const WRUN_GUIDE_ALIGNS = ['left', 'center', 'right'];
56
59
  const WRUN_GRADIENT_MODES = ['pane', 'fill', 'line'];
57
60
  const WRUN_LINE_STYLE_WORDS = ['solid', 'dashed', 'dotted'];
@@ -421,6 +424,9 @@ export function wrunOutputLookPatch(output, mount, ctx) {
421
424
  if (output.price_line)
422
425
  patch.showLastValueLine = true;
423
426
  }
427
+ // A guide's axis tag look (scaffold 102): wrunGuideLook maps it, any other output refuses it by name.
428
+ if (output.axis_look !== undefined && !guide)
429
+ throw refusal(sheetId, subject, 'axis_look needs role "guide"');
424
430
  // OT04, OT16, OT32.
425
431
  Object.assign(patch, zOrderPatch(output.z, subject, sheetId));
426
432
  Object.assign(patch, glowPatch(output.glow, subject, sheetId));
@@ -569,8 +575,9 @@ export function wrunOutputLookPatch(output, mount, ctx) {
569
575
  /** The hline fields a `role: "guide"` output adds (OT10): the on-line label
570
576
  * (`align` places the output's `label`, `pill_style` and `font_size` dress
571
577
  * it), the axis pill (`axis_label: true` puts value + label on the axis
572
- * instead), the constant `value` and the paint order. `lastValue` is the
573
- * output's last finite value (NaN when the run never gave one). */
578
+ * instead, `axis_look` picks the tag's look as `axisTagLook`), the constant
579
+ * `value` and the paint order. `lastValue` is the output's last finite value
580
+ * (NaN when the run never gave one). */
574
581
  export function wrunGuideLook(output, lastValue, label) {
575
582
  const subject = `output '${output.name}'`;
576
583
  const patch = { value: lastValue };
@@ -609,6 +616,17 @@ export function wrunGuideLook(output, lastValue, label) {
609
616
  patch.axisLabel = true;
610
617
  patch.label = label;
611
618
  }
619
+ // The look of the tag `axis_label: true` puts on the axis (kit scaffold 102). An engine that predates the field
620
+ // ignores it and draws today's pill.
621
+ if (output.axis_look !== undefined) {
622
+ if (!isWord(WRUN_AXIS_LOOKS, output.axis_look)) {
623
+ throw refusal(undefined, subject, `axis_look must be one of ${wordList(WRUN_AXIS_LOOKS)}`);
624
+ }
625
+ if (output.axis_label !== true) {
626
+ throw refusal(undefined, subject, "axis_look needs axis_label: true (the look of the guide's axis tag)");
627
+ }
628
+ patch.axisTagLook = output.axis_look;
629
+ }
612
630
  Object.assign(patch, zOrderPatch(output.z, subject, undefined));
613
631
  return patch;
614
632
  }
@@ -80,6 +80,7 @@ import { type WrunRefusalAttemptToken } from './wrun-refusal.util.js';
80
80
  import type { WrunIndicatorMetadata, WrunModuleHandle, WrunOutputRow } from '../../interfaces/wrun-runtime.interface.js';
81
81
  import type { WrunCandleGroup, WrunFillPair } from '../chart/wrun-run-result.util.js';
82
82
  import type { WrunLaneAcquisition, WrunLiveLane } from './wrun-live-intake.util.js';
83
+ import type { WrunOpraServedReceipt } from './wrun-opra-lane.util.js';
83
84
  import type { WrunPollLaneInstance } from './sources/wrun-poll-lane.types.js';
84
85
  import type { WrunRowLaneInstance } from './sources/wrun-row-lane.types.js';
85
86
  import type { WrunLiveApplied } from './wrun-live-patch.util.js';
@@ -156,6 +157,15 @@ export interface WrunOverlayLiveContext {
156
157
  * an arm of the same identity; a save leaves the previous context until the rerun installs its
157
158
  * own. Absent on contexts stored before this field existed and on a draft: never sent. */
158
159
  computeIdentity?: string;
160
+ /** The registry version the installing run executed (its target's `version`): a session fallback
161
+ * (pinForThisSession) may run an older version than the row's saved pin, which `computeIdentity`
162
+ * cannot tell, so the workspace switch's stand-in capture (kscript-standin-switch.util) stores the
163
+ * shown picture only under the pin this session ran. Absent for a lane with no registry version. */
164
+ version?: string;
165
+ /** The settings revision the run computed with (`computed.generation`, C1: a compute-relevant save bumps it, a
166
+ * style save never): the switch's stand-in capture stores the shown picture only while the row still carries it,
167
+ * since a save moves the row at once and the session shows the previous computation until the rerun lands. */
168
+ settingsRevision?: number;
159
169
  /** An editor draft (isWrunDraftOverlaySettings): the run seam raised its run-health
160
170
  * verdict (wrun-run-health.util) and the live session keeps it honest. */
161
171
  draft: boolean;
@@ -300,6 +310,17 @@ export interface WrunOverlayLiveContext {
300
310
  /** Per lane, the SAME payload object the history fetch used (units, quote,
301
311
  * ladder identity), so a live fold lands in the history lane's units. */
302
312
  acquisition: Partial<Record<WrunLiveLane, WrunLaneAcquisition>>;
313
+ /** A Cloud session's: the receipt of the OPRA rows its newest answer was computed from (contract
314
+ * opra-server-lanes C4), the tier its legend's served word names on every tick; absent when the session reads no
315
+ * OPRA, or its newest answer named no tier (no word then, never the account's tier). */
316
+ cloudOpraServed?: WrunOpraServedReceipt;
317
+ /** The session reads OPRA data (the console provenance of the run that installed it, `computed.opra`; a cloud
318
+ * frame carrying the OPRA mark raises it): every debug line its ticks and reseeds publish states it. */
319
+ opraRead?: true;
320
+ /** The session reads CME data (the console provenance of the run that installed it, `computed.cme`: a run on a CME
321
+ * chart, or one whose lanes read the CME plane): every debug line its ticks and reseeds publish states it. No
322
+ * cloud frame raises it (the Cloud lane never reads CME). */
323
+ cmeRead?: true;
303
324
  /** The carry-forward state after every input row strictly before
304
325
  * `lastRowTs` (the seed the tail builder resumes from): the forward-fill
305
326
  * scalars, the forming buckets and the pinned legs' confirmed cursors. */
@@ -534,14 +555,23 @@ export declare function onWrunOverlayLiveTeardown(fn: (indicatorId: string, caus
534
555
  export declare function withWrunOverlaySessionLock<T>(indicatorId: string, fn: () => Promise<T> | T): Promise<T>;
535
556
  /**
536
557
  * The market identity a wrun run is bound to: exchange, symbol, interval and
537
- * transformations of the chart's main series. Read from the chart metadata
538
- * the caller hands in (the store stays out of this registry's eager graph).
558
+ * transformations of the chart's main series, then the session the chart
559
+ * rides (`effectiveChartSessionType`), appended so the leading terms keep
560
+ * their positions. A session flip is an identity change: a run in flight
561
+ * across it drops its old-session rows at the identity-left check, and the
562
+ * live tick rebuilds its context instead of folding into the old one. A
563
+ * spelled default (an absent word stamped with the market's default) and a
564
+ * 'regular' a future keeps at daily and higher (it rides ETH there) change
565
+ * nothing. Read from the chart metadata the caller hands in (the store stays
566
+ * out of this registry's eager graph); metadata without the word reads as
567
+ * the market's default.
539
568
  */
540
569
  export declare function wrunChartMarketIdentity(metadata: {
541
570
  exchange?: unknown;
542
571
  symbol?: unknown;
543
572
  interval?: unknown;
544
573
  transformations?: unknown;
574
+ sessionType?: unknown;
545
575
  } | null | undefined): string;
546
576
  export declare function registerWrunOverlayDriver(indicatorId: string, driver: WrunOverlayDriver): void;
547
577
  export declare function hasWrunOverlayDriver(indicatorId: string): boolean;
@@ -81,6 +81,7 @@ import { WrunChartGoneError, WrunDeadlineError } from './wrun-registry-errors.ut
81
81
  import { closeWrunRefusalAttempts, concludeWrunRefusalAttempt, liveWrunRefusalAttempt, openWrunRefusalAttempt, wrunRefusalAttemptOrigin, } from './wrun-refusal-surface.util.js';
82
82
  import { attachWrunRefusal, stampWrunRefusalTelemetry } from './wrun-refusal.util.js';
83
83
  import { wrunRunFailedIdentityOf } from './wrun-cap-notice.util.js';
84
+ import { effectiveChartSessionType } from '../chart/effective-chart-session.util.js';
84
85
  import { wrunChartHostEnv } from '../../host-env.js';
85
86
  const drivers = new Map();
86
87
  /** The executor's merge rank (wrun-lifecycle.contract.ts): settings > switch
@@ -359,13 +360,22 @@ export function withWrunOverlaySessionLock(indicatorId, fn) {
359
360
  }
360
361
  /**
361
362
  * The market identity a wrun run is bound to: exchange, symbol, interval and
362
- * transformations of the chart's main series. Read from the chart metadata
363
- * the caller hands in (the store stays out of this registry's eager graph).
363
+ * transformations of the chart's main series, then the session the chart
364
+ * rides (`effectiveChartSessionType`), appended so the leading terms keep
365
+ * their positions. A session flip is an identity change: a run in flight
366
+ * across it drops its old-session rows at the identity-left check, and the
367
+ * live tick rebuilds its context instead of folding into the old one. A
368
+ * spelled default (an absent word stamped with the market's default) and a
369
+ * 'regular' a future keeps at daily and higher (it rides ETH there) change
370
+ * nothing. Read from the chart metadata the caller hands in (the store stays
371
+ * out of this registry's eager graph); metadata without the word reads as
372
+ * the market's default.
364
373
  */
365
374
  export function wrunChartMarketIdentity(metadata) {
366
375
  if (!metadata)
367
376
  return '';
368
- return [metadata.exchange, metadata.symbol, metadata.interval, metadata.transformations]
377
+ const session = effectiveChartSessionType(metadata.exchange, metadata.symbol, metadata.interval, metadata.sessionType);
378
+ return [metadata.exchange, metadata.symbol, metadata.interval, metadata.transformations, session]
369
379
  .map((part) => (part === undefined || part === null ? '' : String(part)))
370
380
  .join('|');
371
381
  }
@@ -29,6 +29,15 @@
29
29
  * paints, fresh replaces"): the kScript runner's arm, take, bypass-token and
30
30
  * restore rules under the wrun id.
31
31
  *
32
+ * A chart that holds a wrun overlay publishes its chrome safe-area insets to
33
+ * the engine (DW06) while the overlay stands: the engine places records by
34
+ * them that the drawing safe area never sees (a docked matrix's header, a
35
+ * note label flagged for the chrome), on charts with no HUD, corner group or
36
+ * `safeArea` card. Each integrated run holds the chart's one chrome tracker
37
+ * for the overlay (`holdChartChromeSafeArea`, the tracker the drawings door
38
+ * and the HUD layer share), and the overlay's teardown lets go of it; a pause
39
+ * keeps it, since the paused picture stays.
40
+ *
32
41
  * The recovery ladders (heal, source rungs, casualty window) live in
33
42
  * wrun-overlay-recovery.util; the door re-exports the hold and the heal.
34
43
  * Import graph as in the drivers registry: the chart store and titan-charts are
@@ -114,5 +123,5 @@ export declare function resyncWrunOverlayAfterWake(chartIndex: number, indicator
114
123
  * without a driver.
115
124
  */
116
125
  export declare function withWrunOverlayExecutionMeasure<T>(chartIndex: number, indicatorId: string, reason: string, run: () => T): T;
117
- /** Clears the door's state and the recovery ladders' state. */
126
+ /** Clears the door's state (the chrome holds let go) and the recovery ladders' state. */
118
127
  export declare function __resetWrunOverlayLifecycleForTests(): void;
@@ -6,6 +6,7 @@ import { resolveLocalTechnicalScriptLazyRefreshRange, } from '../chart/local-tec
6
6
  import { overlayExecutionGuardKey } from '../chart/overlay-execution-guard-key.leaf.js';
7
7
  import { armLocalKScriptSourceRevalidation, clearLocalKScriptSourceRevalidation, disarmLocalKScriptSourceRevalidation, hasPendingLocalKScriptSourceRevalidation, installLocalKScriptSourceCacheBypass, markLocalKScriptSourceCacheHit, releaseLocalKScriptSourceCacheBypass, takePendingLocalKScriptSourceRevalidation, } from '../chart/local-kscript-source-revalidation.util.js';
8
8
  import { getChartDataFetchGeneration } from '../chart/chart-data-fetch-generation.util.js';
9
+ import { holdChartChromeSafeArea, releaseChartChromeSafeArea, } from '../chart/kscript-drawing-safe-area.util.js';
9
10
  import { isRealChartTimeRangeMs } from '../chart/chart-time-domain.util.js';
10
11
  import { ohlcvRowsHaveFiniteClose } from '../chart/ohlcv-row-readiness.util.js';
11
12
  import { wrunChartHostEnv } from '../../host-env.js';
@@ -426,12 +427,55 @@ async function runWrunSourceRevalidation(chartIndex, indicatorId, armedGeneratio
426
427
  }
427
428
  }
428
429
  // ---------------------------------------------------------------------------
430
+ // The chart chrome a wrun overlay's chart publishes (DW06)
431
+ // ---------------------------------------------------------------------------
432
+ // Per overlay: the chart engine its chrome hold is on.
433
+ const chromeHolds = new Map();
434
+ /**
435
+ * After an integrated run: the overlay's chart keeps its chrome insets
436
+ * reaching the engine. Every run holds again (a second hold of an id is no
437
+ * change), so a tracker that stopped with its pane DOM starts again with the
438
+ * next run; a chart replaced at the index takes the hold from the old engine.
439
+ * Never throws: the run it follows already landed.
440
+ */
441
+ function holdWrunChartChrome(indicatorId, chartIndex) {
442
+ if (!hasWrunOverlayDriver(indicatorId))
443
+ return;
444
+ try {
445
+ const tc = wrunChartHostEnv().chart.instance(chartIndex);
446
+ if (!tc)
447
+ return;
448
+ const held = chromeHolds.get(indicatorId);
449
+ if (held !== undefined && held !== tc)
450
+ releaseChartChromeSafeArea(held, indicatorId);
451
+ chromeHolds.set(indicatorId, tc);
452
+ holdChartChromeSafeArea(tc, indicatorId);
453
+ }
454
+ catch (error) {
455
+ console.warn('[wrun] could not hold the chart chrome for', indicatorId, error);
456
+ }
457
+ }
458
+ /** The overlay left its chart: its chrome hold goes (the chart's last hold sends the engine null insets). */
459
+ function releaseWrunChartChrome(indicatorId) {
460
+ const held = chromeHolds.get(indicatorId);
461
+ if (held === undefined)
462
+ return;
463
+ chromeHolds.delete(indicatorId);
464
+ releaseChartChromeSafeArea(held, indicatorId);
465
+ }
466
+ /** The door's one success hook: the chrome hold, then the SWR revalidation the run may owe. */
467
+ function onWrunComputeSucceeded(indicatorId, chartIndex) {
468
+ holdWrunChartChrome(indicatorId, chartIndex);
469
+ maybeScheduleWrunSourceRevalidation(indicatorId, chartIndex);
470
+ }
471
+ // ---------------------------------------------------------------------------
429
472
  // Teardown, registrations, test seam
430
473
  // ---------------------------------------------------------------------------
431
474
  /** Everything the door holds for one overlay goes with it, the SWR marks and
432
475
  * token under its id included (data-loading rule 3). A live-session suspend
433
- * runs the same hooks; the next integrated run marks and arms again. */
434
- function dropWrunLifecycleState(indicatorId) {
476
+ * runs the same hooks; the next integrated run marks and arms again. The
477
+ * chrome hold is the overlay's, not the session's: a suspend keeps it. */
478
+ function dropWrunLifecycleState(indicatorId, cause) {
435
479
  const timer = revalidationTimers.get(indicatorId);
436
480
  if (timer !== undefined)
437
481
  clearTimeout(timer);
@@ -440,12 +484,14 @@ function dropWrunLifecycleState(indicatorId) {
440
484
  revalidationCharts.delete(indicatorId);
441
485
  if (chartIndex !== undefined)
442
486
  clearLocalKScriptSourceRevalidation(chartIndex, indicatorId);
487
+ if (cause !== 'suspend')
488
+ releaseWrunChartChrome(indicatorId);
443
489
  }
444
490
  // Registered at import like the live intake and the tick lane. Specs that mock
445
491
  // the drivers util partially have no hook registry (reading a missing export of
446
492
  // a mocked module throws), so the registration is skipped there.
447
493
  try {
448
- onWrunOverlayComputeSucceeded(maybeScheduleWrunSourceRevalidation);
494
+ onWrunOverlayComputeSucceeded(onWrunComputeSucceeded);
449
495
  }
450
496
  catch {
451
497
  // partial module mock (specs)
@@ -456,11 +502,13 @@ try {
456
502
  catch {
457
503
  // partial module mock (specs)
458
504
  }
459
- /** Clears the door's state and the recovery ladders' state. */
505
+ /** Clears the door's state (the chrome holds let go) and the recovery ladders' state. */
460
506
  export function __resetWrunOverlayLifecycleForTests() {
461
507
  for (const timer of revalidationTimers.values())
462
508
  clearTimeout(timer);
463
509
  revalidationTimers.clear();
464
510
  revalidationCharts.clear();
511
+ for (const indicatorId of [...chromeHolds.keys()])
512
+ releaseWrunChartChrome(indicatorId);
465
513
  __resetWrunOverlayRecoveryForTests();
466
514
  }
@@ -11,6 +11,7 @@ import { KSCRIPT_SECONDARY_SOURCE_MAX_RECOVERY_ATTEMPTS, KSCRIPT_SECONDARY_SOURC
11
11
  import { __resetWrunLateReadsForTests, forgetWrunLateReads, onWrunLateReadSettled, wrunLateReadsAnswered, wrunLateReadsOut, } from './run-schedule/wrun-late-reads.util.js';
12
12
  import { isKScriptDisplayBlockedOnExchange, } from '../chart/kscript-venue-policy.util.js';
13
13
  import { wrunRunFailedIdentityOf, wrunRunIdentityOf } from './wrun-cap-notice.util.js';
14
+ import { wrunChartCandleVenue } from './run-schedule/wrun-own-candles.util.js';
14
15
  import { wrunChartHostEnv } from '../../host-env.js';
15
16
  import { WRUN_RUN_FAILURE_ROW_CODES, wrunAbortRuntimeDiagnostic, wrunRunFailureRuntimeDiagnostic, } from '../scriptEditor/wrun-runtime-diagnostics.leaf.js';
16
17
  import { bindWrunTransientRerunAdmission, claimWrunTransientRerun, isWrunTransientGracePending, isWrunTransientRerunOwed, oweWrunTransientRerun, requestWrunTransientRerun, takeWrunTransientOwedRerun, WRUN_SESSION_LOSS_TRIGGERS, } from './wrun-transient-rerun.util.js';
@@ -133,7 +134,8 @@ candidate = {}) {
133
134
  // The run head's reading: the workspace's exchange against the mounted
134
135
  // meta's settings (the persisted overlay's when the meta is not up yet).
135
136
  const settings = (meta?.settings ?? overlay?.settings);
136
- if (isKScriptDisplayBlockedOnExchange(workspace?.metadata?.exchange, settings))
137
+ // The market its candles came from, as the head reads it (a chart riding a tape is held where the tape walls).
138
+ if (isKScriptDisplayBlockedOnExchange(wrunChartCandleVenue(workspace?.metadata), settings))
137
139
  return 'venue-blocked';
138
140
  return failedDeterministicHold(indicatorId, reason, {
139
141
  window: candidate.window,