@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
@@ -84,8 +84,23 @@ export const KSCRIPT_NESTED_PARENT_PROMOTION_KEYS = [
84
84
  'subsetRange',
85
85
  ...KSCRIPT_PARENT_OUTPUT_RENDER_META_KEYS,
86
86
  ];
87
+ /**
88
+ * The live refresh's field contract (contract R, EM-LOOK). A mount writes each plot on two records the engine
89
+ * draws from: its nested meta (the engine's `applyPlotOutputs` copies the run output's fields onto it) and its
90
+ * stored run output (`applyRunResult` keeps the whole result; an hline draws its line from it through
91
+ * `getPlotOutput`). The live lanes patch mounted plots in place and never call that apply
92
+ * (`patchMountedOutputRenderMetadata`), so every field the mount writes is either refreshed (this list: written
93
+ * when the output carries it, deleted when it drops a key of KSCRIPT_LIVE_REFRESH_DELETE_IF_ABSENT_KEYS, and a
94
+ * changed value is a render change, which claims a full repaint; a nested plot's settings by
95
+ * KSCRIPT_LIVE_REFRESH_RUN_SETTINGS_KEYS) or a declaration word a live run cannot move (a settings run remounts),
96
+ * declared static with its reason in the contract spec
97
+ * tests/packages/wrun-chart-host/utility/chart/kscript-titancharts-render-keys.constants.spec.ts, which reads the
98
+ * installed engine's write set and the guide fields the host mounts, and fails on a field that is neither.
99
+ */
87
100
  export const KSCRIPT_LIVE_REFRESH_RENDER_META_KEYS = [
88
101
  'activeData',
102
+ 'axisLabel',
103
+ 'axisTagLook',
89
104
  'batched',
90
105
  'color',
91
106
  'colors',
@@ -97,6 +112,7 @@ export const KSCRIPT_LIVE_REFRESH_RENDER_META_KEYS = [
97
112
  'getMultiLineLabels',
98
113
  'glow',
99
114
  'high',
115
+ 'label',
100
116
  'lineStyle',
101
117
  'low',
102
118
  'mainPlotKey',
@@ -116,15 +132,44 @@ export const KSCRIPT_LIVE_REFRESH_RENDER_META_KEYS = [
116
132
  'styleProperties',
117
133
  'subsetRange',
118
134
  'type',
135
+ 'value',
119
136
  'width',
120
137
  'widths',
121
138
  ];
139
+ /**
140
+ * An hline's level and axis tag (a kScript hline, a wrun guide): the engine's apply copies them onto an hline's
141
+ * nested meta only and deletes them from it when the output drops them (its `NESTED_HLINE_META_KEYS`), and the hline
142
+ * draws its line from the same fields on its stored run output. The live refresh owns them on an hline alone, on both
143
+ * records, and never writes them on another plot kind (a text plot's own `label` is not a level).
144
+ */
145
+ export const KSCRIPT_LIVE_REFRESH_HLINE_META_KEYS = ['axisLabel', 'axisTagLook', 'label', 'value'];
122
146
  export const KSCRIPT_LIVE_REFRESH_DELETE_IF_ABSENT_KEYS = [
147
+ 'axisLabel',
148
+ 'axisTagLook',
123
149
  'color',
124
150
  'colors',
151
+ 'label',
125
152
  'styleDataOffset',
126
153
  'styleProperties',
154
+ 'value',
127
155
  'widths',
128
156
  ];
157
+ /**
158
+ * The nested plot settings the engine's apply rebuilds from a run output that a live run can move (its
159
+ * `applyPlotOutputs` settings literal; the engine's renderers read a nested plot's style there, never at the top
160
+ * level): the palette (a slot palette's rows index it, so it only grows and is never synced), the width (a width
161
+ * binding) and the marker size it feeds, the value tag (a tag binding), the fill flag (a band's zero-baseline rule)
162
+ * and the fill gradient. The live refresh writes them on a nested plot as the engine would and keeps every other
163
+ * settings key as mounted (the Style page's stamps, the host's price markers). The settings the engine rebuilds from
164
+ * declaration words are static; the contract spec lists each with its reason.
165
+ */
166
+ export const KSCRIPT_LIVE_REFRESH_RUN_SETTINGS_KEYS = [
167
+ 'colors',
168
+ 'fillGradient',
169
+ 'fillMode',
170
+ 'markerSize',
171
+ 'showPriceDisplay',
172
+ 'width',
173
+ ];
129
174
  export const KSCRIPT_LIVE_REFRESH_RENDER_CONTRACT_SCALAR_KEYS = ['styleDataOffset'];
130
175
  export const KSCRIPT_LIVE_REFRESH_RENDER_CONTRACT_ARRAY_KEYS = ['color', 'colors', 'styleProperties'];
@@ -1,18 +1,27 @@
1
1
  /**
2
- * CME licensing allows governed market data in first-party display features
3
- * only: user-authored kScript scripts must not consume it, while the built-in
2
+ * CME governed market data feeds first-party display features by default:
3
+ * user-authored kScript scripts must not consume it, while the built-in
4
4
  * technical scripts, the converted-script corpus and OpenMarket's own official
5
- * Indicator packages (all first-party) keep working. The OPRA licence (US
6
- * equity and index options, Kyle 2026-10-14) draws the same line: chart-only
7
- * first-party indicators are display use, user-authored scripting waits for
8
- * OPRA's confirmation. Kyle 2026-10-17 assumed that confirmation behind the
9
- * `opra-user-scripts` flag; since 2026-10-22 (the OPRA gate compliance round,
10
- * plan row D3) the policy no longer reads it: `isOpraUserScriptRun`, ONE
11
- * decision for the display wall, the data wall and the engine policy, refuses
12
- * every user run, so a lit flag reads exactly like a dark one. A scope
13
- * assessment with OPRA (the filing's Non-Display Declaration, Exhibit A Q8,
14
- * Q12, Q13) must come before it opens again. This module is the single
15
- * decider for both planes.
5
+ * Indicator packages (all first-party) keep working. The CME plane has its own
6
+ * gate, `cme-user-scripts` (cme-user-scripts-gate.util): while it is open (the
7
+ * flag lit AND the viewer entitled to CME data), a user run the browser
8
+ * executes reads CME like a first-party one (`isCmeUserScriptRun`, ONE
9
+ * decision for the display wall, the data wall and the engine policy), the
10
+ * browser lane only: never a hosted (Cloud) run or a protected script, and
11
+ * never read server-side (kscript-backend denies CME to every user run
12
+ * whatever the gate says). The OPRA licence (US equity and index options) covers
13
+ * user-authored scripting too, in the browser and on OpenMarket's servers
14
+ * (Kyle 2026-10-27, the signed set), behind the `opra-user-scripts` flag:
15
+ * while it is lit, a user run the browser executes reads OPRA like a
16
+ * first-party one (`isOpraUserScriptRun`, the same three doors). The US stocks
17
+ * tape is open to user-authored indicators too, in the browser and on the
18
+ * cloud lane (Kyle 2026-10-29), on the tapes STOCKS_TAPE_SCRIPTING_VENUES
19
+ * lists, the one compliance switch (`isStocksTapeReadableKScriptRun`); a tape
20
+ * it leaves out (NASDAQ_TAPE until the UTP derived-data answer) stays
21
+ * first-party only. Each plane reads its own gate alone: no plane's decision
22
+ * opens another. The data tier belongs to the viewer, never to the script: the
23
+ * browser lane reads through the viewer's own gate sockets. This module is the
24
+ * single decider for every plane.
16
25
  * Every run door (add, mount, protected fetch, cache paint, alerts arm,
17
26
  * editor Run), the per-payload data guard in titan-charts dataFetch, and the
18
27
  * engine policy descriptor consult it; nothing else may re-derive provenance
@@ -93,38 +102,118 @@ export declare function isOfficialWrunOverlay(settings: KScriptProvenanceSetting
93
102
  export declare function resolveKScriptRunProvenance(settings: KScriptProvenanceSettingsLike | null | undefined): KScriptRunProvenance;
94
103
  export declare function isFirstPartyKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
95
104
  /**
96
- * A user run the browser executes: not first-party (a script or Indicator draft the viewer wrote, a community
97
- * document or package, anything unrecognized), and neither a hosted Cloud run nor a protected script: those run on a
98
- * server lane, which reads governed data through its own gate identity (UW-PARITY H3), so a browser flag never opens
99
- * a plane to them. A Cloud run is the record on the socket row source (`wrunRowSourceKindOf`), read through the
100
- * migration on read (`wrunCloudRecordOf`): the wave-3 record (`wrunRunTarget: 'cloud'`, no `wrunRef`) and a record
101
- * persisted before wave 3 (`wrunRef`) alike. The runs the `opra-user-scripts` flag opened the OPRA plane to while it
102
- * was honoured (`isOpraUserScriptRun`); read without the flag where a door must know a decision waits on it (the
103
- * flag's hydration).
105
+ * A user run the browser executes (`userRunLane` `browser`): neither a hosted Cloud run nor a protected script,
106
+ * which run on a server lane that reads governed data through its own gate identity (UW-PARITY H3), so a browser flag
107
+ * never opens a plane to them. The runs the `opra-user-scripts` flag opens the OPRA plane to (`isOpraUserScriptRun`);
108
+ * read without the flag where a door must know a decision waits on it (the flag's hydration).
104
109
  */
105
110
  export declare function isOpraUserScriptCandidate(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
111
+ /**
112
+ * Whether a hosted (Cloud) user run's lane reads the OPRA chain of a US stock or ETF chart (contract
113
+ * opra-server-lanes H3, the cloud lane, which admits the run's owner by the same `opra-user-scripts` flag and serves
114
+ * the owner's own tier): the lane capability the works-on list reads for a Cloud record, apart from the browser
115
+ * decision above. Never an OPRA contract chart (the cloud lane has no candle path with an actor: a Cloud run there
116
+ * stays refused by the display wall) and never a stock twin's chain (the cloud reads the chart's own market).
117
+ */
118
+ export declare function isOpraCloudChainRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
119
+ /** The words the OPRA contract-chart wall shows a user run it refuses (web locale keys, `opraContractChartWallKey`). */
120
+ export declare const OPRA_USER_SCRIPT_WALL_KEY = "indicators.opra.userScriptNotSupported";
121
+ export declare const OPRA_CLOUD_CONTRACT_CHART_WALL_KEY = "indicators.opra.cloudOnContractChartNotSupported";
122
+ export type OpraContractChartWallKey = typeof OPRA_USER_SCRIPT_WALL_KEY | typeof OPRA_CLOUD_CONTRACT_CHART_WALL_KEY;
123
+ /**
124
+ * The words every door that refuses a user run on an OPRA contract chart shows (the add toast, Door A; the chip, Door
125
+ * H), picked by the run's lane and never by the flag: a hosted (Cloud) record has no path on a contract chart whatever
126
+ * the `opra-user-scripts` flag says (its own sentence); a run the browser executes is refused there only while the
127
+ * flag is dark, and a protected script always (the user-script sentence). It names words only: whether the door opens
128
+ * is the walls' decision (`isKScriptDisplayBlockedOnExchange`, `isOpraReadableKScriptRun`).
129
+ */
130
+ export declare function opraContractChartWallKey(settings: KScriptProvenanceSettingsLike | null | undefined): OpraContractChartWallKey;
106
131
  /**
107
132
  * Whether the OPRA plane is open to this user run. The ONE decision every OPRA door reads, directly or through the
108
133
  * walls below: the display wall, the data wall (the dataFetch door, the protected pre-flight, the cache paint), the
109
134
  * engine policy, and the wrun chain decision. The CME plane never reads it.
110
135
  *
111
- * Always false (2026-10-22, the OPRA gate compliance round, plan row D3): the `opra-user-scripts` flag (Kyle
112
- * 2026-10-17: the OPRA permission for user-authored scripts assumed) opened the plane to a browser user run
113
- * (`isOpraUserScriptCandidate`) while lit; it is no longer honoured, and stays defined only so nothing that names it
114
- * breaks. OPRA's approval covers web display only: user-authored scripting over OPRA data stays refused until a scope
115
- * assessment with OPRA (the filing's Non-Display Declaration, Exhibit A Q8, Q12, Q13) allows it.
116
- */
117
- export declare function isOpraUserScriptRun(_settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
118
- /** Whether a run may consume the OPRA plane's data: every first-party run, and no user run (`isOpraUserScriptRun`;
119
- * `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
136
+ * Open to a browser user run (`isOpraUserScriptCandidate`) while the `opra-user-scripts` flag is lit: the OPRA
137
+ * licence covers user-authored scripting (Kyle 2026-10-27). The tier follows the viewer, never the run: the browser
138
+ * lane reads through the viewer's own gate sockets (the gate's tier frame for the session picks the real-time or the
139
+ * delayed socket), so the same script reads real-time rows for a paying viewer and delayed rows for every other one.
140
+ * A hosted (Cloud) record and a protected script stay out of this decision: a Cloud run on an OPRA contract chart has
141
+ * no server path yet (the cloud lane reads the chain of a US stock or ETF chart only), and a protected script has no
142
+ * actor path on the engine lane. The flag is read first: while it is dark (the default) no record is read at all.
143
+ */
144
+ export declare function isOpraUserScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
145
+ /** Whether a run may consume the OPRA plane's data: every first-party run, and a user run the flag opened it to
146
+ * (`isOpraUserScriptRun`; `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
120
147
  export declare function isOpraReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
148
+ /**
149
+ * Whether a run may read a US stocks tape open to user scripting (`STOCKS_TAPE_SCRIPTING_VENUES`): every first-party
150
+ * run, a user run the browser executes and a hosted (Cloud) user run (`userRunLane`), the lanes Kyle opened on
151
+ * 2026-10-29, like OPRA since its launch and on the cloud lane too. A protected script keeps its lane's rule: the
152
+ * engine lane has no actor path, so a user's protected script stays refused as on every gate plane. The tier is the
153
+ * gate's per socket (delayed 905 s for everyone today), never the script's, and no alert reads the tape whatever this
154
+ * answers (opra-alert-door.util `stocks-closed`). A tape the list leaves out never reads this: it stays first-party
155
+ * only.
156
+ */
157
+ export declare function isStocksTapeReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
158
+ /**
159
+ * A user run the browser executes (`userRunLane` `browser`, the OPRA plane's candidate too): the runs the
160
+ * `cme-user-scripts` gate opens the CME plane to (`isCmeUserScriptRun`). A hosted (Cloud) record and a protected script
161
+ * never qualify, whatever the gate says: CME chart studies run in the browser alone, and the server
162
+ * lanes deny CME to every user run. Read without the gate where a door must know a decision waits on it (the flag's
163
+ * hydration, the lifecycle that stops a running study).
164
+ */
165
+ export declare function isCmeUserScriptCandidate(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
166
+ /**
167
+ * Whether the CME plane is open to this user run. The ONE decision every CME door reads, directly or through the walls
168
+ * below: the display wall, the data wall (the dataFetch door, the protected pre-flight, the cache paint) and the engine
169
+ * policy. The OPRA plane never reads it.
170
+ *
171
+ * Open to a browser user run (`isCmeUserScriptCandidate`) while the `cme-user-scripts` gate is open: the flag lit AND
172
+ * the viewer entitled to CME data (cme-user-scripts-gate.util, both read live). The tier follows the viewer, never the
173
+ * run: the browser lane reads through the viewer's own gate sockets. The gate is read first: while it is closed (the
174
+ * default, and every worker, guest and store-less context) no record is read at all.
175
+ */
176
+ export declare function isCmeUserScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
177
+ /** Whether a run may consume the CME plane's data: every first-party run, and a user run the `cme-user-scripts` gate
178
+ * opened it to (`isCmeUserScriptRun`). */
179
+ export declare function isCmeReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
180
+ /** The words a door shows a user run the CME wall refuses (web locale keys, `cmeUserScriptWallKey`), and the
181
+ * lifecycle's words for a study a closing gate stopped in place, its source kept (`CME_STUDY_STOPPED_KEY`: the
182
+ * viewer's access moved; `CME_STUDIES_OFF_KEY`: the flag went dark). */
183
+ export declare const CME_USER_SCRIPT_WALL_KEY = "indicators.errors.CME_USER_SCRIPT_NOT_SUPPORTED";
184
+ export declare const CME_CLOUD_WALL_KEY = "indicators.cme.cloudNotSupported";
185
+ export declare const CME_ENTITLEMENT_REQUIRED_KEY = "indicators.cme.termsRequired";
186
+ export declare const CME_STUDY_STOPPED_KEY = "indicators.cme.studyStopped";
187
+ export declare const CME_STUDIES_OFF_KEY = "indicators.cme.studiesOff";
188
+ export type CmeUserScriptWallKey = typeof CME_USER_SCRIPT_WALL_KEY | typeof CME_CLOUD_WALL_KEY | typeof CME_ENTITLEMENT_REQUIRED_KEY;
189
+ /**
190
+ * The words every door that refuses a user run on CME shows (the add toast, Door A; the chip, Door H; the editor's
191
+ * Run), picked by the run's lane like `opraContractChartWallKey`. While the flag is dark every lane reads today's words
192
+ * (`CME_USER_SCRIPT_WALL_KEY`): the feature does not exist for that viewer, so no door names a browser lane it cannot
193
+ * offer. Under a lit flag a hosted (Cloud) record or a protected script has no CME path (`CME_CLOUD_WALL_KEY`: CME chart
194
+ * studies run in the browser), and a run the browser executes is refused only for the viewer's
195
+ * entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never this wall's (the doors
196
+ * word the curation themselves) and reads today's words. Words only: whether the door opens is the walls' decision
197
+ * (`isKScriptDisplayBlockedOnExchange`, `isCmeReadableKScriptRun`).
198
+ */
199
+ export declare function cmeUserScriptWallKey(settings: KScriptProvenanceSettingsLike | null | undefined): CmeUserScriptWallKey;
121
200
  /** Whether a source exchange touches a CME-governed venue (the CME-only curation and copy). */
122
201
  export declare function payloadTouchesCmeVenue(exchange: unknown): boolean;
123
202
  /** Whether a source exchange touches the OPRA options plane (an explicit OPRA leg on any chart included). */
124
203
  export declare function payloadTouchesOpraVenue(exchange: unknown): boolean;
204
+ /** Whether a payload names a US stocks tape venue (NYSE_TAPE, NYSE_ARCA_TAPE, NASDAQ_TAPE: the stocks gate's plane;
205
+ * a listing venue's plain code, NASDAQ, is the free lane and never one). */
206
+ export declare function payloadTouchesStocksTapeVenue(exchange: unknown): boolean;
207
+ /**
208
+ * Whether a payload names a US stocks tape still closed to user scripting: NASDAQ_TAPE (Tape C) until the UTP
209
+ * derived-data answer adds it to STOCKS_TAPE_SCRIPTING_VENUES. Every user run is refused there, as on CME; the provenance-blind
210
+ * doors (the editor's paused Run) read it beside the CME predicate.
211
+ */
212
+ export declare function payloadTouchesClosedStocksTapeVenue(exchange: unknown): boolean;
125
213
  /**
126
214
  * Whether a source exchange (string or the multi-exchange array form) touches
127
- * a governed venue on any gate plane (CME futures, OPRA options).
215
+ * a governed venue on any gate plane (CME futures, OPRA options, the US
216
+ * stocks tape).
128
217
  * Deliberately NOT governed-route.util's isGovernedExchange /
129
218
  * isGovernedReaderPayload: their array form uses .every() because that is
130
219
  * ROUTING semantics (a mixed multi-exchange metadata query must keep the
@@ -139,9 +228,14 @@ export declare function payloadTouchesGovernedVenue(exchange: unknown): boolean;
139
228
  * first-party officials legitimately pass. The OPERATIONAL doors (add, mount,
140
229
  * teardown, resubscribe, self-heal, suite/layout/copy apply) consult
141
230
  * isKScriptDisplayBlockedOnExchange below instead, which is a strict superset
142
- * of this predicate. Per plane: a CME leg blocks every user run; an OPRA leg
143
- * blocks every user run too (`isOpraReadableKScriptRun`: the flag that could
144
- * open the plane is no longer honoured, see `isOpraUserScriptRun`).
231
+ * of this predicate. Per plane, each by its own decision: a CME leg blocks a
232
+ * user run unless the `cme-user-scripts` gate opened the plane to it
233
+ * (`isCmeReadableKScriptRun`); an OPRA leg blocks a user run unless the
234
+ * `opra-user-scripts` flag opened the plane to it (`isOpraReadableKScriptRun`);
235
+ * a US stocks tape leg blocks a protected user script on a tape open to user
236
+ * scripting (`isStocksTapeReadableKScriptRun`) and every user run on a tape
237
+ * still closed to it (NASDAQ_TAPE). A mixed payload is served only when every
238
+ * plane it touches is open to the run.
145
239
  */
146
240
  export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
147
241
  /**
@@ -170,19 +264,34 @@ export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settin
170
264
  * the add route mounts on a governed venue; a twin of any other built-in
171
265
  * carried there (an in-place symbol switch, a restore, a paste or copy) is
172
266
  * blocked. User-provenance
173
- * runs are never venue-approved, so this is a strict superset of
174
- * isUserKScriptBlockedOnExchange. Fail-closed both ways: an unrecognized
267
+ * runs are never venue-approved by the curation, so this is a strict superset
268
+ * of isUserKScriptBlockedOnExchange. Fail-closed both ways: an unrecognized
175
269
  * official blocks, and provenance spoofing via script-input names is already
176
270
  * neutralized upstream by KSCRIPT_RESERVED_PROVENANCE_KEYS (a spoofed run
177
271
  * classifies 'user' and is never approved regardless of claimed keys).
178
272
  *
273
+ * CME user studies: a user run the `cme-user-scripts` gate opened the CME
274
+ * plane to (`isCmeUserScriptRun`, the data wall's own per-plane verdict, so
275
+ * the two walls read one decision) draws on a CME chart, and the curation
276
+ * never applies to it: the official allow-list is CME evidence for
277
+ * first-party docs alone, never a list a user run must join. A hosted (Cloud)
278
+ * record and a protected script stay blocked on CME whatever the gate says.
279
+ *
179
280
  * OPRA (no CME leg): every first-party run is explicitly venue-approved, the
180
281
  * built-ins, the converted corpus, the official docs and the official
181
- * packages alike (chart-only display use under the OPRA licence), and every
182
- * user run is blocked (the data wall's own per-plane verdict, so the two walls
183
- * read one decision, `isOpraUserScriptRun`). The CME per-script curation is CME evidence and does not apply
184
- * there; a book-reading official is refused by the options mode (OPRA has no
185
- * book), not by this wall.
282
+ * packages alike, and every user run is blocked unless the
283
+ * `opra-user-scripts` flag opened the plane to it (the data wall's own
284
+ * per-plane verdict, so the two walls read one decision,
285
+ * `isOpraUserScriptRun`): a hosted (Cloud) record and a protected script stay
286
+ * blocked on an OPRA contract chart either way. The CME per-script curation
287
+ * is CME evidence and does not apply there; a book-reading official is
288
+ * refused by the options mode (OPRA has no book), not by this wall.
289
+ *
290
+ * The US stocks tape (no CME leg) follows the data wall the same way: every
291
+ * first-party run is venue-approved, a user run in the browser or on the cloud
292
+ * lane draws on a tape open to user scripting (STOCKS_TAPE_SCRIPTING_VENUES),
293
+ * and a protected user script, or any user run on a tape still closed to user
294
+ * scripting (NASDAQ_TAPE), is blocked. The CME curation does not apply there either.
186
295
  */
187
296
  export declare function isKScriptDisplayBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
188
297
  /**
@@ -206,8 +315,12 @@ export declare function shouldBlockKScriptSourcePayload(args: {
206
315
  * engine: first-party runs get no engine policy at all; user runs get the
207
316
  * governed set of every gate plane as deniedExchanges once the engine pin
208
317
  * supports it, so a user script on a crypto chart cannot pull an explicit
209
- * OPRA source either. A run the OPRA plane is open to (`isOpraUserScriptRun`,
210
- * none since 2026-10-22) would get the CME family alone.
318
+ * governed source either, less each plane open to the run, by that plane's
319
+ * own decision: the OPRA plane when the `opra-user-scripts` flag opened it
320
+ * (`isOpraUserScriptRun`), the CME family when the `cme-user-scripts` gate
321
+ * opened it (`isCmeUserScriptRun`). The closed tapes (the stocks tapes
322
+ * STOCKS_TAPE_SCRIPTING_VENUES leaves out) stay in every user run's set; the
323
+ * tapes open to user scripting are in no user run's set.
211
324
  */
212
325
  export interface KScriptDataAccessPolicyDescriptor {
213
326
  governedExchanges: readonly string[];