@orangecharts/wrun-chart-host 0.15.0 → 0.17.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 (202) hide show
  1. package/README.md +2 -0
  2. package/dist/constants/economic.constants.d.ts +2 -0
  3. package/dist/constants/economic.constants.js +2 -0
  4. package/dist/constants/feature-flags.constants.d.ts +13 -5
  5. package/dist/constants/feature-flags.constants.js +76 -35
  6. package/dist/constants/feature-limits.constants.d.ts +72 -4
  7. package/dist/constants/feature-limits.constants.js +104 -24
  8. package/dist/constants/interval.constants.js +5 -0
  9. package/dist/constants/kscript-data-interval-restrictions.constants.d.ts +12 -0
  10. package/dist/constants/kscript-data-interval-restrictions.constants.js +14 -0
  11. package/dist/constants/marketCapabilities.constants.d.ts +9 -0
  12. package/dist/constants/marketCapabilities.constants.js +39 -11
  13. package/dist/constants/typed-indicator-source.leaf.d.ts +7 -0
  14. package/dist/constants/typed-indicator-source.leaf.js +47 -0
  15. package/dist/constants/typed-session-history-venue.leaf.d.ts +7 -0
  16. package/dist/constants/typed-session-history-venue.leaf.js +9 -0
  17. package/dist/constants/typed-width-fold.leaf.d.ts +52 -0
  18. package/dist/constants/typed-width-fold.leaf.js +101 -0
  19. package/dist/constants/typed-width-source.leaf.d.ts +24 -0
  20. package/dist/constants/typed-width-source.leaf.js +126 -0
  21. package/dist/constants/typed-width.leaf.d.ts +57 -0
  22. package/dist/constants/typed-width.leaf.js +78 -0
  23. package/dist/host-env.d.ts +10 -0
  24. package/dist/host-env.js +7 -0
  25. package/dist/host-ports.types.d.ts +23 -17
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.js +4 -0
  28. package/dist/interfaces/kscript-diagnostics.interface.d.ts +35 -0
  29. package/dist/interfaces/wrun-runtime.interface.d.ts +66 -3
  30. package/dist/interfaces/wrun-runtime.interface.js +11 -0
  31. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +13 -0
  32. package/dist/kscript-data/controls/live-trades-merge.util.js +16 -1
  33. package/dist/market-data/billing.interface.d.ts +12 -45
  34. package/dist/market-data/billing.interface.js +2 -2
  35. package/dist/replay/replayLadder.js +7 -4
  36. package/dist/settings-templates/footprint-rows.d.ts +6 -0
  37. package/dist/settings-templates/footprint-rows.js +6 -0
  38. package/dist/settings-templates/frvp-fields.js +14 -0
  39. package/dist/settings-templates/indicator-fields.js +36 -0
  40. package/dist/settings-templates/tool-tables.generated.js +19 -1
  41. package/dist/utility/chart/__fixtures__/live-bucket-regular-golden.json +1706 -0
  42. package/dist/utility/chart/cache-alignment.util.d.ts +42 -0
  43. package/dist/utility/chart/cache-alignment.util.js +88 -18
  44. package/dist/utility/chart/calendar-interval.util.d.ts +83 -1
  45. package/dist/utility/chart/calendar-interval.util.js +152 -4
  46. package/dist/utility/chart/candle-bar-end.util.d.ts +11 -4
  47. package/dist/utility/chart/candle-bar-end.util.js +17 -6
  48. package/dist/utility/chart/chart-time-domain.util.d.ts +3 -0
  49. package/dist/utility/chart/chart-time-domain.util.js +13 -4
  50. package/dist/utility/chart/feed-interval.util.d.ts +4 -2
  51. package/dist/utility/chart/feed-interval.util.js +5 -2
  52. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +3 -1
  53. package/dist/utility/chart/fetch-dedupe-policy.util.js +19 -1
  54. package/dist/utility/chart/footprint-display-mode.util.d.ts +2 -0
  55. package/dist/utility/chart/footprint-display-mode.util.js +5 -0
  56. package/dist/utility/chart/governed-lanes-gate.util.d.ts +46 -0
  57. package/dist/utility/chart/governed-lanes-gate.util.js +71 -0
  58. package/dist/utility/chart/governed-lanes-reader-seat.d.ts +14 -0
  59. package/dist/utility/chart/governed-lanes-reader-seat.js +14 -0
  60. package/dist/utility/chart/history-wall.util.d.ts +13 -2
  61. package/dist/utility/chart/history-wall.util.js +11 -4
  62. package/dist/utility/chart/index-mode-admission.util.js +9 -1
  63. package/dist/utility/chart/index-mode.util.d.ts +2 -2
  64. package/dist/utility/chart/index-mode.util.js +12 -6
  65. package/dist/utility/chart/index-otc.leaf.d.ts +37 -0
  66. package/dist/utility/chart/index-otc.leaf.js +68 -0
  67. package/dist/utility/chart/interval-ladder.util.d.ts +5 -2
  68. package/dist/utility/chart/interval-ladder.util.js +44 -4
  69. package/dist/utility/chart/interval-registry.util.d.ts +22 -1
  70. package/dist/utility/chart/interval-registry.util.js +50 -2
  71. package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +32 -4
  72. package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +22 -5
  73. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +10 -0
  74. package/dist/utility/chart/kscript-drawing-safe-area.util.js +30 -3
  75. package/dist/utility/chart/kscript-legend-entries.util.d.ts +21 -4
  76. package/dist/utility/chart/kscript-legend-entries.util.js +27 -5
  77. package/dist/utility/chart/kscript-main-grid-stages.util.js +74 -24
  78. package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
  79. package/dist/utility/chart/kscript-row-name.leaf.d.ts +13 -0
  80. package/dist/utility/chart/kscript-row-name.leaf.js +18 -0
  81. package/dist/utility/chart/kscript-venue-policy.util.d.ts +61 -26
  82. package/dist/utility/chart/kscript-venue-policy.util.js +138 -37
  83. package/dist/utility/chart/live-bucket.util.d.ts +29 -4
  84. package/dist/utility/chart/live-bucket.util.js +45 -12
  85. package/dist/utility/chart/market-session-schedule.util.d.ts +19 -0
  86. package/dist/utility/chart/market-session-schedule.util.js +2 -1
  87. package/dist/utility/chart/market-session.util.d.ts +62 -10
  88. package/dist/utility/chart/market-session.util.js +93 -13
  89. package/dist/utility/chart/marketKind.util.d.ts +11 -12
  90. package/dist/utility/chart/marketKind.util.js +45 -13
  91. package/dist/utility/chart/mixed-mode.util.d.ts +18 -0
  92. package/dist/utility/chart/om-target.util.js +6 -4
  93. package/dist/utility/chart/price-precision.util.d.ts +20 -6
  94. package/dist/utility/chart/price-precision.util.js +34 -7
  95. package/dist/utility/chart/profile-frame-window.util.d.ts +15 -0
  96. package/dist/utility/chart/profile-frame-window.util.js +12 -0
  97. package/dist/utility/chart/rth-session.util.d.ts +3 -1
  98. package/dist/utility/chart/rth-session.util.js +3 -1
  99. package/dist/utility/chart/script-source-session.util.d.ts +43 -0
  100. package/dist/utility/chart/script-source-session.util.js +61 -0
  101. package/dist/utility/chart/typed-width-grid.util.d.ts +23 -0
  102. package/dist/utility/chart/typed-width-grid.util.js +203 -0
  103. package/dist/utility/common/transformations.util.d.ts +6 -0
  104. package/dist/utility/common/transformations.util.js +28 -4
  105. package/dist/utility/market-events/market-events.util.js +3 -0
  106. package/dist/utility/number-format.util.d.ts +14 -1
  107. package/dist/utility/number-format.util.js +22 -4
  108. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +24 -1
  109. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +115 -0
  110. package/dist/utility/v2/v2-enums.leaf.js +5 -0
  111. package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +2 -1
  112. package/dist/utility/wrun/sources/row-lanes/dark_pool.js +4 -3
  113. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +13 -3
  114. package/dist/utility/wrun/wrun-batched-marks.util.js +96 -17
  115. package/dist/utility/wrun/wrun-canvases.util.d.ts +4 -2
  116. package/dist/utility/wrun/wrun-canvases.util.js +7 -12
  117. package/dist/utility/wrun/wrun-cap-notice.util.d.ts +5 -0
  118. package/dist/utility/wrun/wrun-cap-notice.util.js +23 -0
  119. package/dist/utility/wrun/wrun-card-style.util.d.ts +1 -1
  120. package/dist/utility/wrun/wrun-card-style.util.js +2 -2
  121. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +23 -8
  122. package/dist/utility/wrun/wrun-chart-market-facts.util.js +24 -9
  123. package/dist/utility/wrun/wrun-child-overlay-id.util.d.ts +10 -0
  124. package/dist/utility/wrun/wrun-child-overlay-id.util.js +24 -0
  125. package/dist/utility/wrun/wrun-cloud-cme-stamp.util.d.ts +72 -0
  126. package/dist/utility/wrun/wrun-cloud-cme-stamp.util.js +151 -0
  127. package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +10 -6
  128. package/dist/utility/wrun/wrun-cme-root-specs.util.js +19 -13
  129. package/dist/utility/wrun/wrun-color-facts.util.d.ts +3 -3
  130. package/dist/utility/wrun/wrun-color-facts.util.js +8 -5
  131. package/dist/utility/wrun/wrun-colour-tone.lazy.d.ts +20 -0
  132. package/dist/utility/wrun/wrun-colour-tone.lazy.js +23 -0
  133. package/dist/utility/wrun/wrun-colour-tone.util.d.ts +14 -0
  134. package/dist/utility/wrun/wrun-colour-tone.util.js +119 -0
  135. package/dist/utility/wrun/wrun-dark-pool.util.d.ts +3 -2
  136. package/dist/utility/wrun/wrun-dark-pool.util.js +5 -4
  137. package/dist/utility/wrun/wrun-frames.d.ts +1 -1
  138. package/dist/utility/wrun/wrun-frames.js +2 -2
  139. package/dist/utility/wrun/wrun-handles.util.d.ts +1 -1
  140. package/dist/utility/wrun/wrun-handles.util.js +1 -1
  141. package/dist/utility/wrun/wrun-host.service.d.ts +32 -2
  142. package/dist/utility/wrun/wrun-host.service.js +44 -2
  143. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +20 -0
  144. package/dist/utility/wrun/wrun-hosted-wire-caps.js +85 -2
  145. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +37 -0
  146. package/dist/utility/wrun/wrun-hosted-wire.util.js +54 -0
  147. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +1 -0
  148. package/dist/utility/wrun/wrun-hud-looks.util.js +6 -11
  149. package/dist/utility/wrun/wrun-integration-route.util.d.ts +24 -0
  150. package/dist/utility/wrun/wrun-integration-route.util.js +19 -0
  151. package/dist/utility/wrun/wrun-live-intake.util.js +17 -1
  152. package/dist/utility/wrun/wrun-live-patch.util.d.ts +6 -1
  153. package/dist/utility/wrun/wrun-live-patch.util.js +10 -4
  154. package/dist/utility/wrun/wrun-live-tick.util.js +64 -5
  155. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +40 -6
  156. package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +2 -2
  157. package/dist/utility/wrun/wrun-market-size-defaults.util.js +10 -8
  158. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +3 -0
  159. package/dist/utility/wrun/wrun-overlay-drivers.util.js +3 -0
  160. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +17 -0
  161. package/dist/utility/wrun/wrun-overlay-run.util.js +318 -55
  162. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +1 -1
  163. package/dist/utility/wrun/wrun-panel-mount.util.js +42 -13
  164. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +3 -2
  165. package/dist/utility/wrun/wrun-pin-venues.util.js +11 -4
  166. package/dist/utility/wrun/wrun-refusal.util.d.ts +4 -0
  167. package/dist/utility/wrun/wrun-refusal.util.js +102 -13
  168. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +5 -3
  169. package/dist/utility/wrun/wrun-registry-errors.util.js +5 -3
  170. package/dist/utility/wrun/wrun-row-source-factory.js +17 -1
  171. package/dist/utility/wrun/wrun-row-source.d.ts +8 -1
  172. package/dist/utility/wrun/wrun-run-health.util.js +1 -1
  173. package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +1 -1
  174. package/dist/utility/wrun/wrun-sandbox-row-source.js +9 -0
  175. package/dist/utility/wrun/wrun-session-composition.util.d.ts +3 -2
  176. package/dist/utility/wrun/wrun-session-composition.util.js +3 -2
  177. package/dist/utility/wrun/wrun-setting-words.util.d.ts +12 -5
  178. package/dist/utility/wrun/wrun-setting-words.util.js +25 -8
  179. package/dist/utility/wrun/wrun-socket-row-source.d.ts +26 -1
  180. package/dist/utility/wrun/wrun-socket-row-source.js +125 -12
  181. package/dist/utility/wrun/wrun-source-rows.util.d.ts +3 -3
  182. package/dist/utility/wrun/wrun-source-rows.util.js +8 -7
  183. package/dist/utility/wrun/wrun-style-words.util.d.ts +31 -9
  184. package/dist/utility/wrun/wrun-style-words.util.js +46 -15
  185. package/dist/utility/wrun/wrun-trades-lane.util.js +2 -1
  186. package/dist/utility/wrun/wrun-trap-replay.util.d.ts +42 -0
  187. package/dist/utility/wrun/wrun-trap-replay.util.js +63 -0
  188. package/dist/utility/wrun/wrun-volume-profile.util.js +6 -5
  189. package/dist/utility/wrun-display-name.util.d.ts +10 -0
  190. package/dist/utility/wrun-display-name.util.js +21 -0
  191. package/dist/utils/replay/replay-buffer-math.d.ts +2 -0
  192. package/dist/utils/replay/replay-buffer-math.js +2 -0
  193. package/dist/workers/constants/socket-slots.d.ts +1 -1
  194. package/dist/workers/utils/time.worker.util.js +2 -2
  195. package/dist/workers/utils/volume-profile.worker.util.d.ts +9 -0
  196. package/dist/workers/utils/volume-profile.worker.util.js +20 -0
  197. package/dist/workers/wrun/wrun-abi-host.d.ts +3 -0
  198. package/dist/workers/wrun/wrun-abi-host.js +82 -5
  199. package/dist/workers/wrun/wrun-engine-handler.js +53 -4
  200. package/dist/workers/wrun/wrun-trap-frames.leaf.d.ts +28 -0
  201. package/dist/workers/wrun/wrun-trap-frames.leaf.js +108 -0
  202. package/package.json +11 -11
@@ -6,22 +6,30 @@
6
6
  * gate, `cme-user-scripts` (cme-user-scripts-gate.util): while it is open (the
7
7
  * flag lit AND the viewer entitled to CME data), a user run the browser
8
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
9
+ * decision for the display wall, the data wall and the engine policy). While
10
+ * the `cme-lanes` flag is dark that is the browser lane only (never a hosted
11
+ * (Cloud) run or a protected script) and kscript-backend denies CME to every
12
+ * user run; the owner reversed that on 2026-11-11: lit, the server lanes are
13
+ * admitted too and judge a user run's CME reads on their own. The OPRA licence (US equity and index options) covers
13
14
  * user-authored scripting too, in the browser and on OpenMarket's servers
14
15
  * (Kyle 2026-10-27, the signed set), behind the `opra-user-scripts` flag:
15
16
  * while it is lit, a user run the browser executes reads OPRA like a
16
17
  * first-party one (`isOpraUserScriptRun`, the same three doors). The US stocks
17
18
  * 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
+ * cloud lane (Kyle 2026-10-29), and to protected scripts while `stocks-lanes`
20
+ * is lit (reversed 2026-11-11), on the tapes STOCKS_TAPE_SCRIPTING_VENUES
19
21
  * lists, the one compliance switch (`isStocksTapeReadableKScriptRun`): every
20
22
  * tape since Kyle 2026-11-06; a tape it leaves out would stay first-party
21
23
  * only. Each plane reads its own gate alone: no plane's decision
22
24
  * opens another. The data tier belongs to the viewer, never to the script: the
23
25
  * browser lane reads through the viewer's own gate sockets. This module is the
24
26
  * single decider for every plane.
27
+ * The governed-lanes cutover (governed-lanes-gate.util `governedLanesOpen`, one flag per plane: `cme-lanes`,
28
+ * `opra-lanes`, `stocks-lanes`) widens each plane's own decision to the server lanes: while a plane's flag is lit, a
29
+ * hosted (Cloud) run and a protected script qualify there like a browser run (CME still behind its whole gate, the
30
+ * flag, sign-in and the CME data terms); while it is dark (the default) every answer is the one above. One lane stays
31
+ * out whatever its flag says: OPRA's cloud lane, which reads the chain of a US stock or ETF chart alone
32
+ * (`isOpraCloudChainRun`) and has no path on an OPRA contract chart (Kyle 2026-11-14).
25
33
  * Every run door (add, mount, protected fetch, cache paint, alerts arm,
26
34
  * editor Run), the per-payload data guard in titan-charts dataFetch, and the
27
35
  * engine policy descriptor consult it; nothing else may re-derive provenance
@@ -30,6 +38,7 @@
30
38
  * Browser-safe AND worker-safe: zero Vue / store / i18n imports. The
31
39
  * store-reading overlay form lives in kscript-venue-policy.store.util.ts.
32
40
  */
41
+ import { gateProviderForExchange } from '../v2/gate-plane.util.js';
33
42
  export { isReservedKScriptProvenanceKey, KSCRIPT_RESERVED_PROVENANCE_KEYS } from './kscript-provenance-keys.util.js';
34
43
  /**
35
44
  * Where a technical-script run's source came from. Everything except 'user'
@@ -109,9 +118,17 @@ export declare function isOfficialWrunOverlay(settings: KScriptProvenanceSetting
109
118
  export declare function resolveKScriptRunProvenance(settings: KScriptProvenanceSettingsLike | null | undefined): KScriptRunProvenance;
110
119
  export declare function isFirstPartyKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
111
120
  /**
112
- * A user run the browser executes (`userRunLane` `browser`): neither a hosted Cloud run nor a protected script,
113
- * which run on a server lane that reads governed data through its own gate identity (UW-PARITY H3), so a browser flag
114
- * never opens a plane to them. The runs the `opra-user-scripts` flag opens the OPRA plane to (`isOpraUserScriptRun`);
121
+ * The server lane a user run reads a governed plane on: `cloud` (the hosted record) or `protected` (a protected
122
+ * script kscript-backend runs), else undefined (a browser user run, a first-party run, no settings). The lanes the
123
+ * governed-lanes cutover flags open and close; the lifecycle and the re-judgments read it to stop or wall exactly the
124
+ * studies a darkened lanes flag no longer admits, never a browser study.
125
+ */
126
+ export declare function userRunServerLaneOf(settings: KScriptProvenanceSettingsLike | null | undefined): 'cloud' | 'protected' | undefined;
127
+ /**
128
+ * A user run the browser executes (`userRunLane` `browser`): while the `opra-lanes` flag is dark, neither a hosted
129
+ * Cloud run nor a protected script, which run on a server lane that reads governed data through its own gate identity
130
+ * (UW-PARITY H3), so a browser flag never opens a plane to them; while it is lit, a protected script too, and never a
131
+ * hosted Cloud run, which has no path on an OPRA contract chart (`userRunLaneAdmitted`). The runs the `opra-user-scripts` flag opens the OPRA plane to (`isOpraUserScriptRun`);
115
132
  * read without the flag where a door must know a decision waits on it (the flag's hydration).
116
133
  */
117
134
  export declare function isOpraUserScriptCandidate(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
@@ -130,9 +147,10 @@ export type OpraContractChartWallKey = typeof OPRA_USER_SCRIPT_WALL_KEY | typeof
130
147
  /**
131
148
  * The words every door that refuses a user run on an OPRA contract chart shows (the add toast, Door A; the chip, Door
132
149
  * H), picked by the run's lane and never by the flag: a hosted (Cloud) record has no path on a contract chart whatever
133
- * the `opra-user-scripts` flag says (its own sentence); a run the browser executes is refused there only while the
134
- * flag is dark, and a protected script always (the user-script sentence). It names words only: whether the door opens
135
- * is the walls' decision (`isKScriptDisplayBlockedOnExchange`, `isOpraReadableKScriptRun`).
150
+ * the `opra-user-scripts` and `opra-lanes` flags say (its own sentence, lit or dark); a run the browser executes is
151
+ * refused there only while the flag is dark, and a protected script while `opra-lanes` is dark (the user-script
152
+ * sentence). It names words only: whether the door opens is the walls' decision (`isKScriptDisplayBlockedOnExchange`,
153
+ * `isOpraReadableKScriptRun`).
136
154
  */
137
155
  export declare function opraContractChartWallKey(settings: KScriptProvenanceSettingsLike | null | undefined): OpraContractChartWallKey;
138
156
  /**
@@ -144,9 +162,9 @@ export declare function opraContractChartWallKey(settings: KScriptProvenanceSett
144
162
  * licence covers user-authored scripting (Kyle 2026-10-27). The tier follows the viewer, never the run: the browser
145
163
  * lane reads through the viewer's own gate sockets (the gate's tier frame for the session picks the real-time or the
146
164
  * delayed socket), so the same script reads real-time rows for a paying viewer and delayed rows for every other one.
147
- * A hosted (Cloud) record and a protected script stay out of this decision: a Cloud run on an OPRA contract chart has
148
- * no server path yet (the cloud lane reads the chain of a US stock or ETF chart only), and a protected script has no
149
- * actor path on the engine lane. The flag is read first: while it is dark (the default) no record is read at all.
165
+ * A hosted (Cloud) record stays out of this decision whatever the `opra-lanes` flag says: a Cloud run on an OPRA
166
+ * contract chart has no server path (the cloud lane reads the chain of a US stock or ETF chart only). A protected
167
+ * script stays out while `opra-lanes` is dark. The flag is read first: while it is dark (the default) no record is read at all.
150
168
  */
151
169
  export declare function isOpraUserScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
152
170
  /** Whether a run may consume the OPRA plane's data: every first-party run, and a user run the flag opened it to
@@ -155,19 +173,20 @@ export declare function isOpraReadableKScriptRun(settings: KScriptProvenanceSett
155
173
  /**
156
174
  * Whether a run may read a US stocks tape open to user scripting (`STOCKS_TAPE_SCRIPTING_VENUES`): every first-party
157
175
  * run, a user run the browser executes and a hosted (Cloud) user run (`userRunLane`), the lanes Kyle opened on
158
- * 2026-10-29, like OPRA since its launch and on the cloud lane too. A protected script keeps its lane's rule: the
159
- * engine lane has no actor path, so a user's protected script stays refused as on every gate plane. The tier is the
160
- * gate's per socket (delayed 905 s for everyone today), never the script's, and no alert reads the tape whatever this
161
- * answers (opra-alert-door.util `stocks-closed`). A tape the list leaves out never reads this: it stays first-party
162
- * only.
176
+ * 2026-10-29, like OPRA since its launch and on the cloud lane too. While the `stocks-lanes` flag is dark a user's
177
+ * protected script stays refused, and no alert reads the tape whatever this answers (opra-alert-door.util
178
+ * `stocks-closed`); the owner reversed both on 2026-11-11: lit, a protected script reads the tape too. The tier is the
179
+ * gate's per socket (delayed 905 s for everyone today), never the script's. A tape the list leaves out never reads
180
+ * this: it stays first-party only.
163
181
  */
164
182
  export declare function isStocksTapeReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
165
183
  /**
166
184
  * A user run the browser executes (`userRunLane` `browser`, the OPRA plane's candidate too): the runs the
167
- * `cme-user-scripts` gate opens the CME plane to (`isCmeUserScriptRun`). A hosted (Cloud) record and a protected script
168
- * never qualify, whatever the gate says: CME chart studies run in the browser alone, and the server
169
- * lanes deny CME to every user run. Read without the gate where a door must know a decision waits on it (the flag's
170
- * hydration, the lifecycle that stops a running study).
185
+ * `cme-user-scripts` gate opens the CME plane to (`isCmeUserScriptRun`). While the `cme-lanes` cutover flag is dark, a
186
+ * hosted (Cloud) record and a protected script never qualify, whatever the gate says: CME chart studies run in the
187
+ * browser alone, and the server lanes deny CME to every user run. While it is lit, they qualify too
188
+ * (`userRunLaneAdmitted`), still behind the whole gate. Read without the gate where a door must know a decision waits
189
+ * on it (the flag's hydration, the lifecycle that stops a running study).
171
190
  */
172
191
  export declare function isCmeUserScriptCandidate(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
173
192
  /**
@@ -199,9 +218,9 @@ export type CmeUserScriptWallKey = typeof CME_USER_SCRIPT_WALL_KEY | typeof CME_
199
218
  * The words every door that refuses a user run on CME shows (the add toast, Door A; the chip, Door H; the editor's
200
219
  * Run), picked by the run's lane like `opraContractChartWallKey`. While the flag is dark every lane reads today's words
201
220
  * (`CME_USER_SCRIPT_WALL_KEY`): the feature does not exist for that viewer, so no door names a browser lane it cannot
202
- * offer. Under a lit flag a hosted (Cloud) record or a protected script has no CME path (`CME_CLOUD_WALL_KEY`: CME chart
203
- * studies run in the browser), and a run the browser executes is refused only for the viewer's
204
- * entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never refused on CME and reads
221
+ * offer. Under a lit flag, while `cme-lanes` is dark, a hosted (Cloud) record or a protected script has no CME path
222
+ * (`CME_CLOUD_WALL_KEY`; reversed 2026-11-11: with `cme-lanes` lit it reads the terms words like a browser run), and a
223
+ * run the browser executes is refused only for the viewer's entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never refused on CME and reads
205
224
  * today's words. Words only: whether the door opens is the walls' decision
206
225
  * (`isKScriptDisplayBlockedOnExchange`, `isCmeReadableKScriptRun`).
207
226
  */
@@ -245,6 +264,22 @@ export declare function payloadTouchesClosedStocksTapeVenue(exchange: unknown):
245
264
  * governed leg must block, so the array form is .some().
246
265
  */
247
266
  export declare function payloadTouchesGovernedVenue(exchange: unknown): boolean;
267
+ export { gateProviderForExchange };
268
+ /**
269
+ * True iff the payload touches at least one governed plane whose lanes flag is dark (`governedLanesOpen`), or a CME
270
+ * venue the cutover never opens (GLOBEX, `isCmeLanesExcludedVenue`). The same argument shape and BLOCKING semantics as
271
+ * the payloadTouches* helpers (a string, or the array form with .some()): any closed plane blocks. Ungoverned exchanges
272
+ * read false.
273
+ */
274
+ export declare function governedLanesClosedOn(exchange: unknown): boolean;
275
+ /**
276
+ * Whether the CME plane's server lanes are open (`cme-lanes` lit, on the venues it opens): the decider's answer for a
277
+ * door that asks about a CME read off a CME chart (a sheet's CME pin), never the raw switch.
278
+ */
279
+ export declare function cmeServerLanesOpen(): boolean;
280
+ /** True iff the exchange is CME-governed and the 'cme' lanes flag is dark (or the venue is one the cutover never
281
+ * opens, GLOBEX). This is the whole strategy rule on CME after this program. */
282
+ export declare function isCmeStrategyClosed(exchange: string | null | undefined): boolean;
248
283
  /**
249
284
  * DATA-wall door predicate: user-authored run targeting a governed venue.
250
285
  * Still the right check for the data-plane guards (the data-fetching funnel,
@@ -6,22 +6,30 @@
6
6
  * gate, `cme-user-scripts` (cme-user-scripts-gate.util): while it is open (the
7
7
  * flag lit AND the viewer entitled to CME data), a user run the browser
8
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
9
+ * decision for the display wall, the data wall and the engine policy). While
10
+ * the `cme-lanes` flag is dark that is the browser lane only (never a hosted
11
+ * (Cloud) run or a protected script) and kscript-backend denies CME to every
12
+ * user run; the owner reversed that on 2026-11-11: lit, the server lanes are
13
+ * admitted too and judge a user run's CME reads on their own. The OPRA licence (US equity and index options) covers
13
14
  * user-authored scripting too, in the browser and on OpenMarket's servers
14
15
  * (Kyle 2026-10-27, the signed set), behind the `opra-user-scripts` flag:
15
16
  * while it is lit, a user run the browser executes reads OPRA like a
16
17
  * first-party one (`isOpraUserScriptRun`, the same three doors). The US stocks
17
18
  * 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
+ * cloud lane (Kyle 2026-10-29), and to protected scripts while `stocks-lanes`
20
+ * is lit (reversed 2026-11-11), on the tapes STOCKS_TAPE_SCRIPTING_VENUES
19
21
  * lists, the one compliance switch (`isStocksTapeReadableKScriptRun`): every
20
22
  * tape since Kyle 2026-11-06; a tape it leaves out would stay first-party
21
23
  * only. Each plane reads its own gate alone: no plane's decision
22
24
  * opens another. The data tier belongs to the viewer, never to the script: the
23
25
  * browser lane reads through the viewer's own gate sockets. This module is the
24
26
  * single decider for every plane.
27
+ * The governed-lanes cutover (governed-lanes-gate.util `governedLanesOpen`, one flag per plane: `cme-lanes`,
28
+ * `opra-lanes`, `stocks-lanes`) widens each plane's own decision to the server lanes: while a plane's flag is lit, a
29
+ * hosted (Cloud) run and a protected script qualify there like a browser run (CME still behind its whole gate, the
30
+ * flag, sign-in and the CME data terms); while it is dark (the default) every answer is the one above. One lane stays
31
+ * out whatever its flag says: OPRA's cloud lane, which reads the chain of a US stock or ETF chart alone
32
+ * (`isOpraCloudChainRun`) and has no path on an OPRA contract chart (Kyle 2026-11-14).
25
33
  * Every run door (add, mount, protected fetch, cache paint, alerts arm,
26
34
  * editor Run), the per-payload data guard in titan-charts dataFetch, and the
27
35
  * engine policy descriptor consult it; nothing else may re-derive provenance
@@ -30,11 +38,11 @@
30
38
  * Browser-safe AND worker-safe: zero Vue / store / i18n imports. The
31
39
  * store-reading overlay form lives in kscript-venue-policy.store.util.ts.
32
40
  */
33
- import { CME_GOVERNED_EXCHANGES } from '../../interfaces/cme-realtime.interface.js';
41
+ import { CME_BUNDLE_EXCHANGES, CME_GOVERNED_EXCHANGES } from '../../interfaces/cme-realtime.interface.js';
34
42
  import { OPRA_GOVERNED_EXCHANGES } from '../../interfaces/opra-realtime.interface.js';
35
43
  import { STOCKS_GOVERNED_EXCHANGES, STOCKS_TAPE_SCRIPTING_VENUES } from '../../interfaces/stocks-realtime.interface.js';
36
44
  import { isCmeFuturesPolicyActive } from './marketKind.util.js';
37
- import { isOpraGoverned, isStocksTapeGoverned, walledVenueOf } from '../v2/gate-plane.util.js';
45
+ import { gateProviderForExchange, isOpraGoverned, isStocksTapeGoverned, walledVenueOf } from '../v2/gate-plane.util.js';
38
46
  import { stocksTapeVenueLabel } from '../v2/stocks-governed.util.js';
39
47
  import { isConvertedScriptId } from '../../constants/scriptEditor/converted-script-id.leaf.js';
40
48
  import { isTempScriptId } from '../scriptEditor/temp-script-id.util.js';
@@ -49,6 +57,8 @@ import { wrunAppLayerOf } from '../wrun/wrun-app-layer.leaf.js';
49
57
  import { isOpraUserScriptsFlagOn } from './opra-user-scripts-gate.util.js';
50
58
  // Dependency-free too: the flag store and the web's CME entitlement hand their live readers to it.
51
59
  import { isCmeUserScriptsFlagOn, isCmeUserScriptsGateOpen } from './cme-user-scripts-gate.util.js';
60
+ // Dependency-free too: the flag store hands the governed-lanes cutover flags' live reader to it.
61
+ import { governedLanesOpen } from './governed-lanes-gate.util.js';
52
62
  // Leaf module (no imports): the row source a record runs on (a Cloud record rides the socket source).
53
63
  import { wrunRowSourceKindOf } from '../wrun/wrun-overlay-identity.util.js';
54
64
  // Near-leaf (the identity leaf only): the migration on read of a record persisted before lane parity wave 3. The
@@ -184,7 +194,9 @@ export function isFirstPartyKScriptRun(settings) {
184
194
  * Indicator draft the viewer wrote, a community document or package, anything unrecognized, run in this browser) or
185
195
  * the hosted Cloud lane's (`cloud`: the record on the socket row source, `wrunRowSourceKindOf`, read through the
186
196
  * migration on read, `wrunCloudRecordOf`, so the wave-3 record, `wrunRunTarget: 'cloud'` with no `wrunRef`, and a
187
- * record persisted before wave 3, `wrunRef`, alike). Undefined for a first-party run and for a protected script (the engine lane has no actor path). The record is
197
+ * record persisted before wave 3, `wrunRef`, alike), or kscript-backend's (`protected`: a protected script). Undefined
198
+ * for a first-party run alone. A plane admits `cloud` and `protected` only while its lanes flag is lit
199
+ * (`userRunLaneAdmitted`). The record is
188
200
  * read through that migration before the protected flag: a record persisted before wave 3 still carries the wave-2
189
201
  * hosted mount's keys (`isProtectedScript: true` beside `wrunRef`, wrun-cloud-row-compat.util) until its adoption, and
190
202
  * the migration takes the flag off, so it reads as the Cloud record it is, never a protected script. Both planes read
@@ -196,17 +208,44 @@ function userRunLane(settings) {
196
208
  return undefined;
197
209
  const record = wrunCloudRecordOf(settings) ?? settings;
198
210
  if (record.isProtectedScript === true)
199
- return undefined;
211
+ return 'protected';
200
212
  return wrunRowSourceKindOf(record) === 'socket' ? 'cloud' : 'browser';
201
213
  }
202
214
  /**
203
- * A user run the browser executes (`userRunLane` `browser`): neither a hosted Cloud run nor a protected script,
204
- * which run on a server lane that reads governed data through its own gate identity (UW-PARITY H3), so a browser flag
205
- * never opens a plane to them. The runs the `opra-user-scripts` flag opens the OPRA plane to (`isOpraUserScriptRun`);
215
+ * The server lane a user run reads a governed plane on: `cloud` (the hosted record) or `protected` (a protected
216
+ * script kscript-backend runs), else undefined (a browser user run, a first-party run, no settings). The lanes the
217
+ * governed-lanes cutover flags open and close; the lifecycle and the re-judgments read it to stop or wall exactly the
218
+ * studies a darkened lanes flag no longer admits, never a browser study.
219
+ */
220
+ export function userRunServerLaneOf(settings) {
221
+ const lane = userRunLane(settings);
222
+ return lane === 'cloud' || lane === 'protected' ? lane : undefined;
223
+ }
224
+ /**
225
+ * Whether a plane admits a user run's lane: the browser lane always (each plane's own flag or gate still decides), the
226
+ * server lanes (`cloud`, `protected`) only while the plane's governed-lanes cutover flag is lit (`governedLanesOpen`).
227
+ * The OPRA plane never admits the `cloud` lane here, lit or dark: the cloud reads the OPRA chain of a US stock or ETF
228
+ * chart alone (`isOpraCloudChainRun`, its own decision) and refuses every Cloud run on an OPRA contract chart
229
+ * (`wrun_opra_lane_refused`), so the plane decision keeps it walled before anything is sent (Kyle 2026-11-14).
230
+ * A first-party run has no user lane and is never admitted here (its planes read it as first party instead).
231
+ */
232
+ function userRunLaneAdmitted(settings, plane) {
233
+ const lane = userRunLane(settings);
234
+ if (lane === 'browser')
235
+ return true;
236
+ if (lane === 'cloud' && plane === 'opra')
237
+ return false;
238
+ return lane !== undefined && governedLanesOpen(plane);
239
+ }
240
+ /**
241
+ * A user run the browser executes (`userRunLane` `browser`): while the `opra-lanes` flag is dark, neither a hosted
242
+ * Cloud run nor a protected script, which run on a server lane that reads governed data through its own gate identity
243
+ * (UW-PARITY H3), so a browser flag never opens a plane to them; while it is lit, a protected script too, and never a
244
+ * hosted Cloud run, which has no path on an OPRA contract chart (`userRunLaneAdmitted`). The runs the `opra-user-scripts` flag opens the OPRA plane to (`isOpraUserScriptRun`);
206
245
  * read without the flag where a door must know a decision waits on it (the flag's hydration).
207
246
  */
208
247
  export function isOpraUserScriptCandidate(settings) {
209
- return userRunLane(settings) === 'browser';
248
+ return userRunLaneAdmitted(settings, 'opra');
210
249
  }
211
250
  /**
212
251
  * Whether a hosted (Cloud) user run's lane reads the OPRA chain of a US stock or ETF chart (contract
@@ -224,9 +263,10 @@ export const OPRA_CLOUD_CONTRACT_CHART_WALL_KEY = 'indicators.opra.cloudOnContra
224
263
  /**
225
264
  * The words every door that refuses a user run on an OPRA contract chart shows (the add toast, Door A; the chip, Door
226
265
  * H), picked by the run's lane and never by the flag: a hosted (Cloud) record has no path on a contract chart whatever
227
- * the `opra-user-scripts` flag says (its own sentence); a run the browser executes is refused there only while the
228
- * flag is dark, and a protected script always (the user-script sentence). It names words only: whether the door opens
229
- * is the walls' decision (`isKScriptDisplayBlockedOnExchange`, `isOpraReadableKScriptRun`).
266
+ * the `opra-user-scripts` and `opra-lanes` flags say (its own sentence, lit or dark); a run the browser executes is
267
+ * refused there only while the flag is dark, and a protected script while `opra-lanes` is dark (the user-script
268
+ * sentence). It names words only: whether the door opens is the walls' decision (`isKScriptDisplayBlockedOnExchange`,
269
+ * `isOpraReadableKScriptRun`).
230
270
  */
231
271
  export function opraContractChartWallKey(settings) {
232
272
  return userRunLane(settings) === 'cloud' ? OPRA_CLOUD_CONTRACT_CHART_WALL_KEY : OPRA_USER_SCRIPT_WALL_KEY;
@@ -240,9 +280,9 @@ export function opraContractChartWallKey(settings) {
240
280
  * licence covers user-authored scripting (Kyle 2026-10-27). The tier follows the viewer, never the run: the browser
241
281
  * lane reads through the viewer's own gate sockets (the gate's tier frame for the session picks the real-time or the
242
282
  * delayed socket), so the same script reads real-time rows for a paying viewer and delayed rows for every other one.
243
- * A hosted (Cloud) record and a protected script stay out of this decision: a Cloud run on an OPRA contract chart has
244
- * no server path yet (the cloud lane reads the chain of a US stock or ETF chart only), and a protected script has no
245
- * actor path on the engine lane. The flag is read first: while it is dark (the default) no record is read at all.
283
+ * A hosted (Cloud) record stays out of this decision whatever the `opra-lanes` flag says: a Cloud run on an OPRA
284
+ * contract chart has no server path (the cloud lane reads the chain of a US stock or ETF chart only). A protected
285
+ * script stays out while `opra-lanes` is dark. The flag is read first: while it is dark (the default) no record is read at all.
246
286
  */
247
287
  export function isOpraUserScriptRun(settings) {
248
288
  return isOpraUserScriptsFlagOn() && isOpraUserScriptCandidate(settings);
@@ -255,24 +295,29 @@ export function isOpraReadableKScriptRun(settings) {
255
295
  /**
256
296
  * Whether a run may read a US stocks tape open to user scripting (`STOCKS_TAPE_SCRIPTING_VENUES`): every first-party
257
297
  * run, a user run the browser executes and a hosted (Cloud) user run (`userRunLane`), the lanes Kyle opened on
258
- * 2026-10-29, like OPRA since its launch and on the cloud lane too. A protected script keeps its lane's rule: the
259
- * engine lane has no actor path, so a user's protected script stays refused as on every gate plane. The tier is the
260
- * gate's per socket (delayed 905 s for everyone today), never the script's, and no alert reads the tape whatever this
261
- * answers (opra-alert-door.util `stocks-closed`). A tape the list leaves out never reads this: it stays first-party
262
- * only.
298
+ * 2026-10-29, like OPRA since its launch and on the cloud lane too. While the `stocks-lanes` flag is dark a user's
299
+ * protected script stays refused, and no alert reads the tape whatever this answers (opra-alert-door.util
300
+ * `stocks-closed`); the owner reversed both on 2026-11-11: lit, a protected script reads the tape too. The tier is the
301
+ * gate's per socket (delayed 905 s for everyone today), never the script's. A tape the list leaves out never reads
302
+ * this: it stays first-party only.
263
303
  */
264
304
  export function isStocksTapeReadableKScriptRun(settings) {
265
- return isFirstPartyKScriptRun(settings) || userRunLane(settings) !== undefined;
305
+ if (isFirstPartyKScriptRun(settings))
306
+ return true;
307
+ const lane = userRunLane(settings);
308
+ // A protected script reads the tape only while the `stocks-lanes` cutover flag is lit.
309
+ return lane === 'browser' || lane === 'cloud' || (lane === 'protected' && governedLanesOpen('stocks'));
266
310
  }
267
311
  /**
268
312
  * A user run the browser executes (`userRunLane` `browser`, the OPRA plane's candidate too): the runs the
269
- * `cme-user-scripts` gate opens the CME plane to (`isCmeUserScriptRun`). A hosted (Cloud) record and a protected script
270
- * never qualify, whatever the gate says: CME chart studies run in the browser alone, and the server
271
- * lanes deny CME to every user run. Read without the gate where a door must know a decision waits on it (the flag's
272
- * hydration, the lifecycle that stops a running study).
313
+ * `cme-user-scripts` gate opens the CME plane to (`isCmeUserScriptRun`). While the `cme-lanes` cutover flag is dark, a
314
+ * hosted (Cloud) record and a protected script never qualify, whatever the gate says: CME chart studies run in the
315
+ * browser alone, and the server lanes deny CME to every user run. While it is lit, they qualify too
316
+ * (`userRunLaneAdmitted`), still behind the whole gate. Read without the gate where a door must know a decision waits
317
+ * on it (the flag's hydration, the lifecycle that stops a running study).
273
318
  */
274
319
  export function isCmeUserScriptCandidate(settings) {
275
- return userRunLane(settings) === 'browser';
320
+ return userRunLaneAdmitted(settings, 'cme');
276
321
  }
277
322
  /**
278
323
  * Whether the CME plane is open to this user run. The ONE decision every CME door reads, directly or through the walls
@@ -294,7 +339,10 @@ export function isCmeReadableKScriptRun(settings) {
294
339
  }
295
340
  /** A CME chart study: a user run the gate opened the CME plane to, on a CME chart (the run head's `cmeStudyChain`). */
296
341
  export function isCmeChartStudyRun(settings, chartExchange) {
297
- return payloadTouchesCmeVenue(chartExchange) && isCmeUserScriptRun(settings);
342
+ return (payloadTouchesCmeVenue(chartExchange) &&
343
+ isCmeUserScriptRun(settings) &&
344
+ // A server-lane run on a venue the cutover never opens (GLOBEX) is no study: the wall refuses it.
345
+ !(payloadTouches(chartExchange, isCmeLanesExcludedVenue) && userRunServerLaneOf(settings) !== undefined));
298
346
  }
299
347
  /** The words a door shows a user run the CME wall refuses (web locale keys, `cmeUserScriptWallKey`), and the
300
348
  * lifecycle's words for a study a closing gate stopped in place, its source kept (`CME_STUDY_STOPPED_KEY`: the
@@ -308,18 +356,20 @@ export const CME_STUDIES_OFF_KEY = 'indicators.cme.studiesOff';
308
356
  * The words every door that refuses a user run on CME shows (the add toast, Door A; the chip, Door H; the editor's
309
357
  * Run), picked by the run's lane like `opraContractChartWallKey`. While the flag is dark every lane reads today's words
310
358
  * (`CME_USER_SCRIPT_WALL_KEY`): the feature does not exist for that viewer, so no door names a browser lane it cannot
311
- * offer. Under a lit flag a hosted (Cloud) record or a protected script has no CME path (`CME_CLOUD_WALL_KEY`: CME chart
312
- * studies run in the browser), and a run the browser executes is refused only for the viewer's
313
- * entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never refused on CME and reads
359
+ * offer. Under a lit flag, while `cme-lanes` is dark, a hosted (Cloud) record or a protected script has no CME path
360
+ * (`CME_CLOUD_WALL_KEY`; reversed 2026-11-11: with `cme-lanes` lit it reads the terms words like a browser run), and a
361
+ * run the browser executes is refused only for the viewer's entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never refused on CME and reads
314
362
  * today's words. Words only: whether the door opens is the walls' decision
315
363
  * (`isKScriptDisplayBlockedOnExchange`, `isCmeReadableKScriptRun`).
316
364
  */
317
365
  export function cmeUserScriptWallKey(settings) {
318
366
  if (!isCmeUserScriptsFlagOn())
319
367
  return CME_USER_SCRIPT_WALL_KEY;
320
- const lane = userRunLane(settings);
321
- if (lane === 'browser')
368
+ // A candidate is refused for the viewer's entitlement alone: the browser lane, and under a lit `cme-lanes` flag the
369
+ // server lanes too.
370
+ if (isCmeUserScriptCandidate(settings))
322
371
  return CME_ENTITLEMENT_REQUIRED_KEY;
372
+ const lane = userRunLane(settings);
323
373
  return lane === 'cloud' || !isFirstPartyKScriptRun(settings) ? CME_CLOUD_WALL_KEY : CME_USER_SCRIPT_WALL_KEY;
324
374
  }
325
375
  /** `cmeUserScriptWallKey`'s lane rule in the pin row's words: derived from it, so the two never drift. */
@@ -333,7 +383,13 @@ export function cmePinRefusalVariant(settings) {
333
383
  export const STOCKS_USER_SCRIPT_WALL_KEY = 'indicators.stocks.userScriptNotSupported';
334
384
  /** The wall's words per plane (a `Record`: a plane without its own words is a type error); CME's lane rule stays CME's. */
335
385
  const VENUE_WALL_WORDS = {
336
- cme: (_exchange, settings) => ({ key: cmeUserScriptWallKey(settings), params: {} }),
386
+ // A server-lane run on a venue the cutover never opens (GLOBEX) reads the server lanes' words, never the terms'.
387
+ cme: (exchange, settings) => ({
388
+ key: isCmeUserScriptsFlagOn() && isCmeLanesExcludedVenue(exchange) && userRunServerLaneOf(settings) !== undefined
389
+ ? CME_CLOUD_WALL_KEY
390
+ : cmeUserScriptWallKey(settings),
391
+ params: {},
392
+ }),
337
393
  opra: (_exchange, settings) => ({ key: opraContractChartWallKey(settings), params: {} }),
338
394
  stocks: (exchange) => ({ key: STOCKS_USER_SCRIPT_WALL_KEY, params: { venue: stocksTapeVenueLabel(exchange) } }),
339
395
  };
@@ -389,6 +445,47 @@ export function payloadTouchesClosedStocksTapeVenue(exchange) {
389
445
  export function payloadTouchesGovernedVenue(exchange) {
390
446
  return (payloadTouchesCmeVenue(exchange) || payloadTouchesOpraVenue(exchange) || payloadTouchesStocksTapeVenue(exchange));
391
447
  }
448
+ // The governed plane one exchange code belongs to ('cme' | 'opra' | 'stocks', or null: a listing venue's plain code,
449
+ // NASDAQ, is none) is the gate plane's own answer, `gateProviderForExchange`, by the per-plane predicates the
450
+ // payloadTouches* helpers read. Re-exported here, never redefined, so the venue doors read it beside the decisions.
451
+ // Not gate-plane.util's `governedPlaneOf`: that one routes a whole request (every member on one plane) and answers the
452
+ // plane's descriptor.
453
+ export { gateProviderForExchange };
454
+ /** The CME-family codes the `cme-lanes` cutover opens: the purchasable DCMs alone (CME_BUNDLE_EXCHANGES). */
455
+ const CME_LANES_VENUES = new Set(CME_BUNDLE_EXCHANGES);
456
+ /**
457
+ * A CME-family code the `cme-lanes` cutover never opens (2026-11-11): the GLOBEX metadata alias. The server keeps it
458
+ * price-only and off every server lane, so whatever the flag says it reads as a dark plane here: the alert door admits a
459
+ * raw price alert alone, every server-lane answer stays closed, and a browser lane keeps today's answer.
460
+ */
461
+ function isCmeLanesExcludedVenue(code) {
462
+ return gateProviderForExchange(code) === 'cme' && !CME_LANES_VENUES.has(code.toUpperCase());
463
+ }
464
+ /**
465
+ * True iff the payload touches at least one governed plane whose lanes flag is dark (`governedLanesOpen`), or a CME
466
+ * venue the cutover never opens (GLOBEX, `isCmeLanesExcludedVenue`). The same argument shape and BLOCKING semantics as
467
+ * the payloadTouches* helpers (a string, or the array form with .some()): any closed plane blocks. Ungoverned exchanges
468
+ * read false.
469
+ */
470
+ export function governedLanesClosedOn(exchange) {
471
+ return payloadTouches(exchange, (code) => {
472
+ const plane = gateProviderForExchange(code);
473
+ return plane !== null && (!governedLanesOpen(plane) || isCmeLanesExcludedVenue(code));
474
+ });
475
+ }
476
+ /**
477
+ * Whether the CME plane's server lanes are open (`cme-lanes` lit, on the venues it opens): the decider's answer for a
478
+ * door that asks about a CME read off a CME chart (a sheet's CME pin), never the raw switch.
479
+ */
480
+ export function cmeServerLanesOpen() {
481
+ return !governedLanesClosedOn('CME');
482
+ }
483
+ /** True iff the exchange is CME-governed and the 'cme' lanes flag is dark (or the venue is one the cutover never
484
+ * opens, GLOBEX). This is the whole strategy rule on CME after this program. */
485
+ export function isCmeStrategyClosed(exchange) {
486
+ return (gateProviderForExchange(exchange) === 'cme' &&
487
+ (!governedLanesOpen('cme') || isCmeLanesExcludedVenue(String(exchange))));
488
+ }
392
489
  /**
393
490
  * DATA-wall door predicate: user-authored run targeting a governed venue.
394
491
  * Still the right check for the data-plane guards (the data-fetching funnel,
@@ -408,6 +505,10 @@ export function payloadTouchesGovernedVenue(exchange) {
408
505
  export function isUserKScriptBlockedOnExchange(exchange, settings) {
409
506
  if (payloadTouchesCmeVenue(exchange) && !isCmeReadableKScriptRun(settings))
410
507
  return true;
508
+ // A CME venue the `cme-lanes` cutover never opens (GLOBEX, 2026-11-11) stays closed to every server-lane user run
509
+ // whatever the flag says; a browser run keeps today's answer above.
510
+ if (payloadTouches(exchange, isCmeLanesExcludedVenue) && userRunServerLaneOf(settings) !== undefined)
511
+ return true;
411
512
  // The US stocks tape (Kyle 2026-10-29): user-authored indicators read the tapes STOCKS_TAPE_SCRIPTING_VENUES lists,
412
513
  // in the browser and on the cloud lane (every tape since Kyle 2026-11-06); a tape it leaves out would stay
413
514
  // first-party only. A mixed payload is judged per leg (.some): one closed tape refuses it.
@@ -25,7 +25,12 @@
25
25
  * 5. a session-lattice venue on its own lattice (session-lattice.util: the CME
26
26
  * family from 2m to 12h, 1d, 3d; forex from 4h up), the profile the
27
27
  * gateway rolls that venue up on;
28
- * 6. everything else: the UTC floor.
28
+ * 6. everything else: the UTC floor (for a typed day or week length, the
29
+ * fixed grid from Monday 2000-01-03: calendar-interval.util).
30
+ * A custom width under a day (typed-width.leaf) is never bucket exact: on a CME regular-hours chart it rides 3, on a
31
+ * regular-session stock 4, on CME full session, forex, an extended-hours stock and a US option the lazy session grid
32
+ * through `typedSessionGrid` (null while the slot is empty), and everywhere else 6. A walk over the length table sets
33
+ * `lengthRow` on the venue and reads such a width as any other length (the session feed's reach).
29
34
  * Null means the frame has no bucket (off-session under 3 or 4): the chart
30
35
  * holds no bar there, so drop it. At 30m and finer the session grids share
31
36
  * the UTC floor's lattice, never its bars: a regular-session chart holds none
@@ -38,6 +43,12 @@ export interface LiveBucketVenue {
38
43
  sessionType?: unknown;
39
44
  /** A formula chart's expression: its legs, not `exchange`, decide the lattice. */
40
45
  transformations?: unknown;
46
+ /**
47
+ * Set by a walk over the length table (the session feed's reach, session-fill-window), never by a chart: the width
48
+ * is read as a row of that table, not as a custom size. 4m and 3h are rows no session chart could sit on before
49
+ * custom sizes, and the walk keeps the answers it had there, so no other interval's reach moves.
50
+ */
51
+ lengthRow?: boolean;
41
52
  }
42
53
  /**
43
54
  * A chart's bar-grid identity as a worker reads it (plain, cloneable fields only): the venue a worker
@@ -49,6 +60,16 @@ export declare function liveBucketVenueOf(metadata: {
49
60
  sessionType?: unknown;
50
61
  transformations?: unknown;
51
62
  } | null | undefined): LiveBucketVenue;
63
+ /**
64
+ * The session grid of a custom size (typed-width-grid.util `typedBarStartMs`), set once per realm by the lazy file
65
+ * that builds such a chart's candles (the page: typed-fold-ask.util; the data worker: its fold kit). Empty until
66
+ * then, and a grid that asks it answers null: the frame has no bucket, never another grid's.
67
+ */
68
+ export declare const typedSessionGrid: {
69
+ startMs?: (tsMs: number, widthMs: number, venue: LiveBucketVenue) => number | null;
70
+ };
71
+ /** Whether the live bucket at `intervalMs` depends on the venue, so a writer must pass it (a custom width always does). */
72
+ export declare function liveBucketReadsVenue(intervalMs: number): boolean;
52
73
  /**
53
74
  * The session lattice the series' history rides (session-lattice.util, the
54
75
  * profile the gateway rolls its venue up on): its formula's timeline legs,
@@ -88,9 +109,13 @@ export declare function liveBucketStartMs(tsMs: number, intervalMs: number, venu
88
109
  */
89
110
  export declare function liveBucketBarsAreLabels(intervalMs: number, venue?: LiveBucketVenue | null): boolean;
90
111
  /**
91
- * Whether the venue's bars at `intervalMs` open on the UTC interval lattice (the UTC floor, `findMonday`, a session's 30m
92
- * and finer floor). False on a session lattice, where bars follow the trading calendar: anchored at the session's open
93
- * (a stock or a chart-RTH product from 45m to 12h, a session-lattice venue) or labels (`liveBucketBarsAreLabels`).
112
+ * Whether the venue's bars at `intervalMs` open on one fixed lattice of the interval, every bar one length after the
113
+ * last with one phase: the UTC floor, `findMonday`, a session's 30m and finer floor, and a typed day or week length's
114
+ * grid from Monday 2000-01-03 (`fixedGridFloorMs`), which is fixed but not epoch-aligned. Its one reader
115
+ * (wrun-source-rows `wrunChartRowsOffIntervalGrid`) counts phases of the interval, which a fixed lattice of any
116
+ * origin passes with one. False on a session lattice, where bars follow the trading calendar: anchored at the
117
+ * session's open (a stock or a chart-RTH product from 45m to 12h, a session-lattice venue) or labels
118
+ * (`liveBucketBarsAreLabels`).
94
119
  */
95
120
  export declare function liveBucketBarsOnUtcLattice(intervalMs: number, venue?: LiveBucketVenue | null): boolean;
96
121
  /**