@orangecharts/wrun-chart-host 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/constants/feature-flags.constants.d.ts +6 -1
- package/dist/constants/feature-flags.constants.js +67 -24
- package/dist/constants/opra-compliance.constants.d.ts +3 -2
- package/dist/constants/opra-compliance.constants.js +3 -2
- package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
- package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
- package/dist/constants/venue-presets.constants.d.ts +20 -20
- package/dist/constants/venue-presets.constants.js +24 -26
- package/dist/host-env.d.ts +29 -5
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +69 -15
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
- package/dist/interfaces/replay.interface.d.ts +8 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +18 -2
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +41 -4
- package/dist/kscript-data/controls/live-trades-merge.util.js +52 -7
- package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +56 -0
- package/dist/kscript-data/controls/live-trades-order-gate.util.js +107 -0
- package/dist/market-data/billing.interface.d.ts +95 -31
- package/dist/market-data/billing.interface.js +36 -5
- package/dist/market-data/venue.d.ts +88 -6
- package/dist/market-data/venues/cme.contract.copy.json +66 -0
- package/dist/market-data/venues/cme.d.ts +126 -0
- package/dist/market-data/venues/cme.js +133 -0
- package/dist/market-data/venues/index.d.ts +162 -5
- package/dist/market-data/venues/index.js +48 -6
- package/dist/settings-templates/index.js +7 -3
- package/dist/settings-templates/indicator-fields.d.ts +5 -4
- package/dist/settings-templates/indicator-fields.js +45 -6
- package/dist/settings-templates/tool-rules.d.ts +27 -17
- package/dist/settings-templates/tool-rules.js +27 -11
- package/dist/settings-templates/tool-tables.generated.js +91 -31
- package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
- package/dist/utility/chart/book-live-bucket.util.js +47 -0
- package/dist/utility/chart/index-mode-admission.util.js +15 -2
- package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
- package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +7 -2
- package/dist/utility/chart/kscript-live-coalesce.util.js +9 -3
- package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +54 -35
- package/dist/utility/chart/kscript-venue-policy.util.js +78 -42
- package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
- package/dist/utility/chart/market-session-schedule.util.js +16 -0
- package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
- package/dist/utility/chart/opra-read-access.leaf.js +5 -3
- package/dist/utility/chart/rth-session.util.d.ts +3 -2
- package/dist/utility/chart/rth-session.util.js +2 -1
- package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
- package/dist/utility/chart/window-geometry.leaf.js +22 -6
- package/dist/utility/chart/wrun-run-result.util.d.ts +12 -0
- package/dist/utility/chart/wrun-run-result.util.js +141 -6
- package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
- package/dist/utility/options/option-bar-anchor.util.js +340 -0
- package/dist/utility/options/option-venue.util.d.ts +18 -0
- package/dist/utility/options/option-venue.util.js +27 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
- package/dist/utility/wrun/derived-roots.util.d.ts +213 -0
- package/dist/utility/wrun/derived-roots.util.js +471 -0
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +41 -6
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -2
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -2
- package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
- package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +2 -1
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +3 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +19 -4
- package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +52 -13
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +88 -19
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +2 -1
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +24 -9
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +39 -10
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +64 -0
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +89 -0
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +15 -3
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +22 -3
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +31 -0
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +174 -13
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +685 -27
- package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
- package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +53 -12
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +101 -53
- package/dist/utility/wrun/wrun-download-meter.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-download-meter.util.js +14 -2
- package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
- package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
- package/dist/utility/wrun/wrun-frames.d.ts +27 -6
- package/dist/utility/wrun/wrun-frames.js +73 -10
- package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
- package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +18 -4
- package/dist/utility/wrun/wrun-hud-looks.util.js +45 -13
- package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +13 -7
- package/dist/utility/wrun/wrun-live-intake.util.js +82 -29
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-live-tick.util.js +158 -14
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +49 -10
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +65 -5
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +31 -5
- package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
- package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
- package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
- package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +23 -6
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +47 -11
- package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +86 -19
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +168 -62
- package/dist/utility/wrun/wrun-option-views.util.d.ts +47 -13
- package/dist/utility/wrun/wrun-option-views.util.js +98 -26
- package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
- package/dist/utility/wrun/wrun-output-style.util.js +20 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +17 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +100 -31
- package/dist/utility/wrun/wrun-overlay-run.util.js +733 -114
- package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-panel-mount.util.js +63 -13
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +10 -9
- package/dist/utility/wrun/wrun-panel-style.util.js +58 -9
- package/dist/utility/wrun/wrun-param-map.util.d.ts +14 -11
- package/dist/utility/wrun/wrun-param-map.util.js +10 -5
- package/dist/utility/wrun/wrun-param-values.util.d.ts +14 -4
- package/dist/utility/wrun/wrun-param-values.util.js +4 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
- package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
- package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-run-interval.util.js +9 -6
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +45 -1
- package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
- package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
- package/dist/utility/wrun/wrun-socket-row-source.js +113 -8
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +5 -1
- package/dist/utility/wrun/wrun-source-rows.util.js +16 -3
- package/dist/utility/wrun/wrun-style-words.util.js +6 -4
- package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
- package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-tape-per-order.util.js +26 -0
- package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
- package/dist/utils/replay/replay-buffer-math.js +227 -20
- package/package.json +11 -11
|
@@ -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'];
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
* only: 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
5
|
* Indicator packages (all first-party) keep working. The OPRA licence (US
|
|
6
|
-
* equity and index options
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Q12, Q13) must come before it opens again. This module is the single
|
|
15
|
-
* decider for both planes.
|
|
6
|
+
* equity and index options) covers user-authored scripting too, in the
|
|
7
|
+
* browser and on OpenMarket's servers (Kyle 2026-10-27, the signed set),
|
|
8
|
+
* behind the `opra-user-scripts` flag: while it is lit, a user run the
|
|
9
|
+
* browser executes reads OPRA like a first-party one (`isOpraUserScriptRun`,
|
|
10
|
+
* ONE decision for the display wall, the data wall and the engine policy; the
|
|
11
|
+
* CME plane never reads it). The data tier belongs to the viewer, never to the
|
|
12
|
+
* script: the browser lane reads through the viewer's own gate sockets. This
|
|
13
|
+
* module is the single decider for both planes.
|
|
16
14
|
* Every run door (add, mount, protected fetch, cache paint, alerts arm,
|
|
17
15
|
* editor Run), the per-payload data guard in titan-charts dataFetch, and the
|
|
18
16
|
* engine policy descriptor consult it; nothing else may re-derive provenance
|
|
@@ -93,30 +91,48 @@ export declare function isOfficialWrunOverlay(settings: KScriptProvenanceSetting
|
|
|
93
91
|
export declare function resolveKScriptRunProvenance(settings: KScriptProvenanceSettingsLike | null | undefined): KScriptRunProvenance;
|
|
94
92
|
export declare function isFirstPartyKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
95
93
|
/**
|
|
96
|
-
* A user run the browser executes:
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
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).
|
|
94
|
+
* A user run the browser executes (`opraUserRunLane` `browser`): neither a hosted Cloud run nor a protected script,
|
|
95
|
+
* which run on a server lane that reads governed data through its own gate identity (UW-PARITY H3), so a browser flag
|
|
96
|
+
* never opens a plane to them. The runs the `opra-user-scripts` flag opens the OPRA plane to (`isOpraUserScriptRun`);
|
|
97
|
+
* read without the flag where a door must know a decision waits on it (the flag's hydration).
|
|
104
98
|
*/
|
|
105
99
|
export declare function isOpraUserScriptCandidate(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Whether a hosted (Cloud) user run's lane reads the OPRA chain of a US stock or ETF chart (contract
|
|
102
|
+
* opra-server-lanes H3, the cloud lane, which admits the run's owner by the same `opra-user-scripts` flag and serves
|
|
103
|
+
* the owner's own tier): the lane capability the works-on list reads for a Cloud record, apart from the browser
|
|
104
|
+
* decision above. Never an OPRA contract chart (the cloud lane has no candle path with an actor: a Cloud run there
|
|
105
|
+
* stays refused by the display wall) and never a stock twin's chain (the cloud reads the chart's own market).
|
|
106
|
+
*/
|
|
107
|
+
export declare function isOpraCloudChainRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
108
|
+
/** The words the OPRA contract-chart wall shows a user run it refuses (web locale keys, `opraContractChartWallKey`). */
|
|
109
|
+
export declare const OPRA_USER_SCRIPT_WALL_KEY = "indicators.opra.userScriptNotSupported";
|
|
110
|
+
export declare const OPRA_CLOUD_CONTRACT_CHART_WALL_KEY = "indicators.opra.cloudOnContractChartNotSupported";
|
|
111
|
+
export type OpraContractChartWallKey = typeof OPRA_USER_SCRIPT_WALL_KEY | typeof OPRA_CLOUD_CONTRACT_CHART_WALL_KEY;
|
|
112
|
+
/**
|
|
113
|
+
* The words every door that refuses a user run on an OPRA contract chart shows (the add toast, Door A; the chip, Door
|
|
114
|
+
* H), picked by the run's lane and never by the flag: a hosted (Cloud) record has no path on a contract chart whatever
|
|
115
|
+
* the `opra-user-scripts` flag says (its own sentence); a run the browser executes is refused there only while the
|
|
116
|
+
* flag is dark, and a protected script always (the user-script sentence). It names words only: whether the door opens
|
|
117
|
+
* is the walls' decision (`isKScriptDisplayBlockedOnExchange`, `isOpraReadableKScriptRun`).
|
|
118
|
+
*/
|
|
119
|
+
export declare function opraContractChartWallKey(settings: KScriptProvenanceSettingsLike | null | undefined): OpraContractChartWallKey;
|
|
106
120
|
/**
|
|
107
121
|
* Whether the OPRA plane is open to this user run. The ONE decision every OPRA door reads, directly or through the
|
|
108
122
|
* walls below: the display wall, the data wall (the dataFetch door, the protected pre-flight, the cache paint), the
|
|
109
123
|
* engine policy, and the wrun chain decision. The CME plane never reads it.
|
|
110
124
|
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
125
|
+
* Open to a browser user run (`isOpraUserScriptCandidate`) while the `opra-user-scripts` flag is lit: the OPRA
|
|
126
|
+
* licence covers user-authored scripting (Kyle 2026-10-27). The tier follows the viewer, never the run: the browser
|
|
127
|
+
* lane reads through the viewer's own gate sockets (the gate's tier frame for the session picks the real-time or the
|
|
128
|
+
* delayed socket), so the same script reads real-time rows for a paying viewer and delayed rows for every other one.
|
|
129
|
+
* A hosted (Cloud) record and a protected script stay out of this decision: a Cloud run on an OPRA contract chart has
|
|
130
|
+
* no server path yet (the cloud lane reads the chain of a US stock or ETF chart only), and a protected script has no
|
|
131
|
+
* actor path on the engine lane. The flag is read first: while it is dark (the default) no record is read at all.
|
|
116
132
|
*/
|
|
117
|
-
export declare function isOpraUserScriptRun(
|
|
118
|
-
/** Whether a run may consume the OPRA plane's data: every first-party run, and
|
|
119
|
-
* `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
|
|
133
|
+
export declare function isOpraUserScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
134
|
+
/** Whether a run may consume the OPRA plane's data: every first-party run, and a user run the flag opened it to
|
|
135
|
+
* (`isOpraUserScriptRun`; `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
|
|
120
136
|
export declare function isOpraReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
121
137
|
/** Whether a source exchange touches a CME-governed venue (the CME-only curation and copy). */
|
|
122
138
|
export declare function payloadTouchesCmeVenue(exchange: unknown): boolean;
|
|
@@ -140,8 +156,8 @@ export declare function payloadTouchesGovernedVenue(exchange: unknown): boolean;
|
|
|
140
156
|
* teardown, resubscribe, self-heal, suite/layout/copy apply) consult
|
|
141
157
|
* isKScriptDisplayBlockedOnExchange below instead, which is a strict superset
|
|
142
158
|
* of this predicate. Per plane: a CME leg blocks every user run; an OPRA leg
|
|
143
|
-
* blocks
|
|
144
|
-
*
|
|
159
|
+
* blocks a user run unless the `opra-user-scripts` flag opened the plane to it
|
|
160
|
+
* (`isOpraReadableKScriptRun`).
|
|
145
161
|
*/
|
|
146
162
|
export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
147
163
|
/**
|
|
@@ -178,11 +194,13 @@ export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settin
|
|
|
178
194
|
*
|
|
179
195
|
* OPRA (no CME leg): every first-party run is explicitly venue-approved, the
|
|
180
196
|
* built-ins, the converted corpus, the official docs and the official
|
|
181
|
-
* packages alike
|
|
182
|
-
* user
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
197
|
+
* packages alike, and every user run is blocked unless the
|
|
198
|
+
* `opra-user-scripts` flag opened the plane to it (the data wall's own
|
|
199
|
+
* per-plane verdict, so the two walls read one decision,
|
|
200
|
+
* `isOpraUserScriptRun`): a hosted (Cloud) record and a protected script stay
|
|
201
|
+
* blocked on an OPRA contract chart either way. The CME per-script curation
|
|
202
|
+
* is CME evidence and does not apply there; a book-reading official is
|
|
203
|
+
* refused by the options mode (OPRA has no book), not by this wall.
|
|
186
204
|
*/
|
|
187
205
|
export declare function isKScriptDisplayBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
188
206
|
/**
|
|
@@ -206,8 +224,9 @@ export declare function shouldBlockKScriptSourcePayload(args: {
|
|
|
206
224
|
* engine: first-party runs get no engine policy at all; user runs get the
|
|
207
225
|
* governed set of every gate plane as deniedExchanges once the engine pin
|
|
208
226
|
* supports it, so a user script on a crypto chart cannot pull an explicit
|
|
209
|
-
* OPRA source either
|
|
210
|
-
*
|
|
227
|
+
* OPRA source either, unless the `opra-user-scripts` flag opened the OPRA
|
|
228
|
+
* plane to the run (`isOpraUserScriptRun`): its set is then the CME family
|
|
229
|
+
* alone.
|
|
211
230
|
*/
|
|
212
231
|
export interface KScriptDataAccessPolicyDescriptor {
|
|
213
232
|
governedExchanges: readonly string[];
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
* only: 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
5
|
* Indicator packages (all first-party) keep working. The OPRA licence (US
|
|
6
|
-
* equity and index options
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Q12, Q13) must come before it opens again. This module is the single
|
|
15
|
-
* decider for both planes.
|
|
6
|
+
* equity and index options) covers user-authored scripting too, in the
|
|
7
|
+
* browser and on OpenMarket's servers (Kyle 2026-10-27, the signed set),
|
|
8
|
+
* behind the `opra-user-scripts` flag: while it is lit, a user run the
|
|
9
|
+
* browser executes reads OPRA like a first-party one (`isOpraUserScriptRun`,
|
|
10
|
+
* ONE decision for the display wall, the data wall and the engine policy; the
|
|
11
|
+
* CME plane never reads it). The data tier belongs to the viewer, never to the
|
|
12
|
+
* script: the browser lane reads through the viewer's own gate sockets. This
|
|
13
|
+
* module is the single decider for both planes.
|
|
16
14
|
* Every run door (add, mount, protected fetch, cache paint, alerts arm,
|
|
17
15
|
* editor Run), the per-payload data guard in titan-charts dataFetch, and the
|
|
18
16
|
* engine policy descriptor consult it; nothing else may re-derive provenance
|
|
@@ -34,6 +32,8 @@ import { isWrunDraftScriptId } from '../wrun/wrun-draft-overlay.util.js';
|
|
|
34
32
|
import { isWrunOfficialPackage } from '../wrun/wrun-official-scope.leaf.js';
|
|
35
33
|
// Worker-safe too: it reads the twin stamp, the registry ref and the built-in keys alone.
|
|
36
34
|
import { builtinIdentityOf } from './builtin-identity.util.js';
|
|
35
|
+
// Dependency-free: the flag store hands the flag's live readers to it (no store import here).
|
|
36
|
+
import { isOpraUserScriptsFlagOn } from './opra-user-scripts-gate.util.js';
|
|
37
37
|
// Leaf module (no imports): the row source a record runs on (a Cloud record rides the socket source).
|
|
38
38
|
import { wrunRowSourceKindOf } from '../wrun/wrun-overlay-identity.util.js';
|
|
39
39
|
// Near-leaf (the identity leaf only): the migration on read of a record persisted before lane parity wave 3. The
|
|
@@ -152,38 +152,73 @@ export function isFirstPartyKScriptRun(settings) {
|
|
|
152
152
|
return isCmeFirstPartyOfficialDocId(settings?.customScriptId);
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
|
-
*
|
|
156
|
-
* document or package, anything unrecognized
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* flag
|
|
155
|
+
* The lane a user run reads OPRA on, if any: the browser's (`browser`: a script or Indicator draft the viewer wrote, a
|
|
156
|
+
* community document or package, anything unrecognized, run in this browser) or the hosted Cloud lane's (`cloud`: the
|
|
157
|
+
* record on the socket row source, `wrunRowSourceKindOf`, read through the migration on read, `wrunCloudRecordOf`, so
|
|
158
|
+
* the wave-3 record, `wrunRunTarget: 'cloud'` with no `wrunRef`, and a record persisted before wave 3, `wrunRef`,
|
|
159
|
+
* alike). Undefined for a first-party run and for a protected script (the engine lane has no actor path). The record is
|
|
160
|
+
* read through that migration before the protected flag: a record persisted before wave 3 still carries the wave-2
|
|
161
|
+
* hosted mount's keys (`isProtectedScript: true` beside `wrunRef`, wrun-cloud-row-compat.util) until its adoption, and
|
|
162
|
+
* the migration takes the flag off, so it reads as the Cloud record it is, never a protected script.
|
|
163
163
|
*/
|
|
164
|
-
|
|
164
|
+
function opraUserRunLane(settings) {
|
|
165
165
|
if (!settings || isFirstPartyKScriptRun(settings))
|
|
166
|
-
return
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
return undefined;
|
|
167
|
+
const record = wrunCloudRecordOf(settings) ?? settings;
|
|
168
|
+
if (record.isProtectedScript === true)
|
|
169
|
+
return undefined;
|
|
170
|
+
return wrunRowSourceKindOf(record) === 'socket' ? 'cloud' : 'browser';
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* A user run the browser executes (`opraUserRunLane` `browser`): neither a hosted Cloud run nor a protected script,
|
|
174
|
+
* which run on a server lane that reads governed data through its own gate identity (UW-PARITY H3), so a browser flag
|
|
175
|
+
* never opens a plane to them. The runs the `opra-user-scripts` flag opens the OPRA plane to (`isOpraUserScriptRun`);
|
|
176
|
+
* read without the flag where a door must know a decision waits on it (the flag's hydration).
|
|
177
|
+
*/
|
|
178
|
+
export function isOpraUserScriptCandidate(settings) {
|
|
179
|
+
return opraUserRunLane(settings) === 'browser';
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Whether a hosted (Cloud) user run's lane reads the OPRA chain of a US stock or ETF chart (contract
|
|
183
|
+
* opra-server-lanes H3, the cloud lane, which admits the run's owner by the same `opra-user-scripts` flag and serves
|
|
184
|
+
* the owner's own tier): the lane capability the works-on list reads for a Cloud record, apart from the browser
|
|
185
|
+
* decision above. Never an OPRA contract chart (the cloud lane has no candle path with an actor: a Cloud run there
|
|
186
|
+
* stays refused by the display wall) and never a stock twin's chain (the cloud reads the chart's own market).
|
|
187
|
+
*/
|
|
188
|
+
export function isOpraCloudChainRun(settings) {
|
|
189
|
+
return isOpraUserScriptsFlagOn() && opraUserRunLane(settings) === 'cloud';
|
|
190
|
+
}
|
|
191
|
+
/** The words the OPRA contract-chart wall shows a user run it refuses (web locale keys, `opraContractChartWallKey`). */
|
|
192
|
+
export const OPRA_USER_SCRIPT_WALL_KEY = 'indicators.opra.userScriptNotSupported';
|
|
193
|
+
export const OPRA_CLOUD_CONTRACT_CHART_WALL_KEY = 'indicators.opra.cloudOnContractChartNotSupported';
|
|
194
|
+
/**
|
|
195
|
+
* The words every door that refuses a user run on an OPRA contract chart shows (the add toast, Door A; the chip, Door
|
|
196
|
+
* H), picked by the run's lane and never by the flag: a hosted (Cloud) record has no path on a contract chart whatever
|
|
197
|
+
* the `opra-user-scripts` flag says (its own sentence); a run the browser executes is refused there only while the
|
|
198
|
+
* flag is dark, and a protected script always (the user-script sentence). It names words only: whether the door opens
|
|
199
|
+
* is the walls' decision (`isKScriptDisplayBlockedOnExchange`, `isOpraReadableKScriptRun`).
|
|
200
|
+
*/
|
|
201
|
+
export function opraContractChartWallKey(settings) {
|
|
202
|
+
return opraUserRunLane(settings) === 'cloud' ? OPRA_CLOUD_CONTRACT_CHART_WALL_KEY : OPRA_USER_SCRIPT_WALL_KEY;
|
|
170
203
|
}
|
|
171
204
|
/**
|
|
172
205
|
* Whether the OPRA plane is open to this user run. The ONE decision every OPRA door reads, directly or through the
|
|
173
206
|
* walls below: the display wall, the data wall (the dataFetch door, the protected pre-flight, the cache paint), the
|
|
174
207
|
* engine policy, and the wrun chain decision. The CME plane never reads it.
|
|
175
208
|
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
209
|
+
* Open to a browser user run (`isOpraUserScriptCandidate`) while the `opra-user-scripts` flag is lit: the OPRA
|
|
210
|
+
* licence covers user-authored scripting (Kyle 2026-10-27). The tier follows the viewer, never the run: the browser
|
|
211
|
+
* lane reads through the viewer's own gate sockets (the gate's tier frame for the session picks the real-time or the
|
|
212
|
+
* delayed socket), so the same script reads real-time rows for a paying viewer and delayed rows for every other one.
|
|
213
|
+
* A hosted (Cloud) record and a protected script stay out of this decision: a Cloud run on an OPRA contract chart has
|
|
214
|
+
* no server path yet (the cloud lane reads the chain of a US stock or ETF chart only), and a protected script has no
|
|
215
|
+
* actor path on the engine lane. The flag is read first: while it is dark (the default) no record is read at all.
|
|
181
216
|
*/
|
|
182
|
-
export function isOpraUserScriptRun(
|
|
183
|
-
return
|
|
217
|
+
export function isOpraUserScriptRun(settings) {
|
|
218
|
+
return isOpraUserScriptsFlagOn() && isOpraUserScriptCandidate(settings);
|
|
184
219
|
}
|
|
185
|
-
/** Whether a run may consume the OPRA plane's data: every first-party run, and
|
|
186
|
-
* `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
|
|
220
|
+
/** Whether a run may consume the OPRA plane's data: every first-party run, and a user run the flag opened it to
|
|
221
|
+
* (`isOpraUserScriptRun`; `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
|
|
187
222
|
export function isOpraReadableKScriptRun(settings) {
|
|
188
223
|
return mayReadOpra({ official: isFirstPartyKScriptRun(settings), opraUserScripts: isOpraUserScriptRun(settings) });
|
|
189
224
|
}
|
|
@@ -221,8 +256,8 @@ export function payloadTouchesGovernedVenue(exchange) {
|
|
|
221
256
|
* teardown, resubscribe, self-heal, suite/layout/copy apply) consult
|
|
222
257
|
* isKScriptDisplayBlockedOnExchange below instead, which is a strict superset
|
|
223
258
|
* of this predicate. Per plane: a CME leg blocks every user run; an OPRA leg
|
|
224
|
-
* blocks
|
|
225
|
-
*
|
|
259
|
+
* blocks a user run unless the `opra-user-scripts` flag opened the plane to it
|
|
260
|
+
* (`isOpraReadableKScriptRun`).
|
|
226
261
|
*/
|
|
227
262
|
export function isUserKScriptBlockedOnExchange(exchange, settings) {
|
|
228
263
|
if (payloadTouchesCmeVenue(exchange) && !isFirstPartyKScriptRun(settings))
|
|
@@ -263,11 +298,13 @@ export function isUserKScriptBlockedOnExchange(exchange, settings) {
|
|
|
263
298
|
*
|
|
264
299
|
* OPRA (no CME leg): every first-party run is explicitly venue-approved, the
|
|
265
300
|
* built-ins, the converted corpus, the official docs and the official
|
|
266
|
-
* packages alike
|
|
267
|
-
* user
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
301
|
+
* packages alike, and every user run is blocked unless the
|
|
302
|
+
* `opra-user-scripts` flag opened the plane to it (the data wall's own
|
|
303
|
+
* per-plane verdict, so the two walls read one decision,
|
|
304
|
+
* `isOpraUserScriptRun`): a hosted (Cloud) record and a protected script stay
|
|
305
|
+
* blocked on an OPRA contract chart either way. The CME per-script curation
|
|
306
|
+
* is CME evidence and does not apply there; a book-reading official is
|
|
307
|
+
* refused by the options mode (OPRA has no book), not by this wall.
|
|
271
308
|
*/
|
|
272
309
|
export function isKScriptDisplayBlockedOnExchange(exchange, settings) {
|
|
273
310
|
if (!payloadTouchesGovernedVenue(exchange))
|
|
@@ -296,7 +333,7 @@ export function isKScriptDisplayBlockedOnExchange(exchange, settings) {
|
|
|
296
333
|
* rejections, and a policy block is a standing state, not an incident.
|
|
297
334
|
*/
|
|
298
335
|
export function shouldBlockKScriptSourcePayload(args) {
|
|
299
|
-
// The data wall's per-plane verdict: an OPRA source
|
|
336
|
+
// The data wall's per-plane verdict: an OPRA source a flag-opened user run declares is served (`isOpraUserScriptRun`).
|
|
300
337
|
const blocked = isUserKScriptBlockedOnExchange(args.payloadExchange, args.settings) ||
|
|
301
338
|
(payloadReadsOpraPlane(args.payload) && !isOpraReadableKScriptRun(args.settings));
|
|
302
339
|
if (!blocked)
|
|
@@ -308,8 +345,7 @@ const ENGINE_GOVERNED_EXCHANGES = Object.freeze([
|
|
|
308
345
|
...CME_GOVERNED_EXCHANGES,
|
|
309
346
|
...OPRA_GOVERNED_EXCHANGES,
|
|
310
347
|
]);
|
|
311
|
-
/** The CME family alone: the set a user run
|
|
312
|
-
* closed). */
|
|
348
|
+
/** The CME family alone: the set a user run the `opra-user-scripts` flag opened OPRA to is denied. */
|
|
313
349
|
const ENGINE_CME_GOVERNED_EXCHANGES = Object.freeze([...CME_GOVERNED_EXCHANGES]);
|
|
314
350
|
export function buildKScriptDataAccessPolicy(settings) {
|
|
315
351
|
return {
|
|
@@ -44,6 +44,16 @@ export declare function isCmeAlwaysOnSymbol(symbol: unknown): boolean;
|
|
|
44
44
|
export declare function cmeAlwaysOnSinceMs(symbol: unknown): number | null;
|
|
45
45
|
/** The always-on schedule: open except inside the Saturday maintenance window. */
|
|
46
46
|
export declare function getAlwaysOnScheduleStatus(nowMs: number): GovernedFuturesScheduleStatus;
|
|
47
|
+
/**
|
|
48
|
+
* Whether a governed symbol's product trades at `tMs` by its schedule, at any
|
|
49
|
+
* instant of its history: an always-on root from its launch instant
|
|
50
|
+
* (`cmeAlwaysOnSinceMs`) everywhere but the Saturday 02:00-04:00 CT
|
|
51
|
+
* maintenance window, before it and for every other root the Globex weekly
|
|
52
|
+
* cycle. Holidays read open (module doc). For readers that judge past bars (the
|
|
53
|
+
* option reads' bar proofs, which may drop only an instant the product holds no
|
|
54
|
+
* trading at); a status asks `getGovernedFuturesScheduleStatusForSymbol`.
|
|
55
|
+
*/
|
|
56
|
+
export declare function isGovernedFuturesSymbolOpenAt(symbol: unknown, tMs: number): boolean;
|
|
47
57
|
/**
|
|
48
58
|
* Schedule status for a specific governed symbol: always-on roots get the
|
|
49
59
|
* 24/7 schedule, everything else the Globex weekly cycle. Callers that have a
|
|
@@ -251,6 +251,22 @@ export function getAlwaysOnScheduleStatus(nowMs) {
|
|
|
251
251
|
// Unreachable: a 7-day sweep always contains a Saturday.
|
|
252
252
|
return { open: true, nextOpenMs: null, nextCloseMs: null };
|
|
253
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* Whether a governed symbol's product trades at `tMs` by its schedule, at any
|
|
256
|
+
* instant of its history: an always-on root from its launch instant
|
|
257
|
+
* (`cmeAlwaysOnSinceMs`) everywhere but the Saturday 02:00-04:00 CT
|
|
258
|
+
* maintenance window, before it and for every other root the Globex weekly
|
|
259
|
+
* cycle. Holidays read open (module doc). For readers that judge past bars (the
|
|
260
|
+
* option reads' bar proofs, which may drop only an instant the product holds no
|
|
261
|
+
* trading at); a status asks `getGovernedFuturesScheduleStatusForSymbol`.
|
|
262
|
+
*/
|
|
263
|
+
export function isGovernedFuturesSymbolOpenAt(symbol, tMs) {
|
|
264
|
+
const sinceMs = cmeAlwaysOnSinceMs(symbol);
|
|
265
|
+
if (sinceMs === null || tMs < sinceMs)
|
|
266
|
+
return isGovernedFuturesScheduleOpen(tMs);
|
|
267
|
+
const mow = minutesOfWeek(wallClockPartsAt(tMs));
|
|
268
|
+
return mow < ALWAYS_ON_MAINTENANCE_START_MIN || mow >= ALWAYS_ON_MAINTENANCE_END_MIN;
|
|
269
|
+
}
|
|
254
270
|
/**
|
|
255
271
|
* Schedule status for a specific governed symbol: always-on roots get the
|
|
256
272
|
* 24/7 schedule, everything else the Globex weekly cycle. Callers that have a
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* The ONE answer to "may this run read the OPRA plane" (UW-PARITY source contract v2, global rule 6):
|
|
3
3
|
* an official run (an OpenMarket package, any first-party run) always; a draft or community run only
|
|
4
4
|
* while the `opra-user-scripts` flag opened the plane to it (`isOpraUserScriptRun`,
|
|
5
|
-
* kscript-venue-policy.util
|
|
6
|
-
* `isOpraReadableKScriptRun`, the wrun run head,
|
|
7
|
-
* refusal (`opra-official-only:<class>`) and the poll
|
|
5
|
+
* kscript-venue-policy.util: the OPRA licence covers user-authored scripting, Kyle 2026-10-27). Every
|
|
6
|
+
* OPRA door reads it: the data wall and Door C through `isOpraReadableKScriptRun`, the wrun run head,
|
|
7
|
+
* the options chain decision, each source lane's refusal (`opra-official-only:<class>`) and the poll
|
|
8
|
+
* and row lanes' plan context. Who may read is all it answers: the tier a read rides is the viewer's,
|
|
9
|
+
* decided by the gate per socket, never by this answer.
|
|
8
10
|
*
|
|
9
11
|
* A LEAF on purpose (no imports): the poll-lane and row-lane planners sit on the row builder's import
|
|
10
12
|
* graph, and the venue policy is worker-safe; both read this without reaching each other.
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* The ONE answer to "may this run read the OPRA plane" (UW-PARITY source contract v2, global rule 6):
|
|
3
3
|
* an official run (an OpenMarket package, any first-party run) always; a draft or community run only
|
|
4
4
|
* while the `opra-user-scripts` flag opened the plane to it (`isOpraUserScriptRun`,
|
|
5
|
-
* kscript-venue-policy.util
|
|
6
|
-
* `isOpraReadableKScriptRun`, the wrun run head,
|
|
7
|
-
* refusal (`opra-official-only:<class>`) and the poll
|
|
5
|
+
* kscript-venue-policy.util: the OPRA licence covers user-authored scripting, Kyle 2026-10-27). Every
|
|
6
|
+
* OPRA door reads it: the data wall and Door C through `isOpraReadableKScriptRun`, the wrun run head,
|
|
7
|
+
* the options chain decision, each source lane's refusal (`opra-official-only:<class>`) and the poll
|
|
8
|
+
* and row lanes' plan context. Who may read is all it answers: the tier a read rides is the viewer's,
|
|
9
|
+
* decided by the gate per socket, never by this answer.
|
|
8
10
|
*
|
|
9
11
|
* A LEAF on purpose (no imports): the poll-lane and row-lane planners sit on the row builder's import
|
|
10
12
|
* graph, and the venue policy is worker-safe; both read this without reaching each other.
|
|
@@ -236,13 +236,14 @@ export declare function rthSessionCloseMs(symbol: unknown, tsMs: number): number
|
|
|
236
236
|
/**
|
|
237
237
|
* The instant a FOLDED footprint bucket stops changing, on either fold grid:
|
|
238
238
|
* anchored buckets end at `min(start + tf, session close)`
|
|
239
|
-
* (`rthAnchoredBucketEndMs`);
|
|
239
|
+
* (`rthAnchoredBucketEndMs`); 'eth'-grid buckets (the market's own full-session
|
|
240
|
+
* grid, whose starts the caller keys) nominally end at `start + tf`
|
|
240
241
|
* but the RTH filter stops feeding them at the session close, so the bucket
|
|
241
242
|
* holding the close is complete at 20:15Z, not at the top of the next hour.
|
|
242
243
|
* Forming/closed classification (the poll-apply gate) must use this end or a
|
|
243
244
|
* closed stub/close-straddling row would count as forming long after it froze.
|
|
244
245
|
*/
|
|
245
|
-
export declare function footprintFoldBucketEndMs(symbol: unknown, bucketStartMs: number, tfMs: number, bucketMode: 'anchored' | '
|
|
246
|
+
export declare function footprintFoldBucketEndMs(symbol: unknown, bucketStartMs: number, tfMs: number, bucketMode: 'anchored' | 'eth'): number | null;
|
|
246
247
|
/**
|
|
247
248
|
* Does the bucket `[bucketStartMs, bucketStartMs + tfMs)` overlap its venue
|
|
248
249
|
* day's RTH session at all? The live gate for FOLDED footprints on the utc
|
|
@@ -659,7 +659,8 @@ export function rthSessionCloseMs(symbol, tsMs) {
|
|
|
659
659
|
/**
|
|
660
660
|
* The instant a FOLDED footprint bucket stops changing, on either fold grid:
|
|
661
661
|
* anchored buckets end at `min(start + tf, session close)`
|
|
662
|
-
* (`rthAnchoredBucketEndMs`);
|
|
662
|
+
* (`rthAnchoredBucketEndMs`); 'eth'-grid buckets (the market's own full-session
|
|
663
|
+
* grid, whose starts the caller keys) nominally end at `start + tf`
|
|
663
664
|
* but the RTH filter stops feeding them at the session close, so the bucket
|
|
664
665
|
* holding the close is complete at 20:15Z, not at the top of the next hour.
|
|
665
666
|
* Forming/closed classification (the poll-apply gate) must use this end or a
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The owner setting of a window that shows its tables ALONE: the window an add opens beside its chart Indicator
|
|
3
|
+
* (web's window-cell.util writes the same key; the child mount and this geometry read it off the owner's engine
|
|
4
|
+
* settings). Its child mount mounts the `panel.table` children and no other child, and its geometry hides the owner's
|
|
5
|
+
* own pane beside them (settleOwnerPane): the chart Indicator beside the window keeps every other pane, so none shows
|
|
6
|
+
* twice. It means nothing on a cell that is no window.
|
|
7
|
+
*/
|
|
8
|
+
export declare const WRUN_WINDOW_TABLES_ONLY_SETTING = "wrunWindowTablesOnly";
|
|
1
9
|
export type WindowPaneKind = 'table' | 'chart' | 'time';
|
|
2
10
|
export interface WindowPane {
|
|
3
11
|
id: string;
|
|
@@ -44,7 +44,11 @@
|
|
|
44
44
|
* be the window's only pane (never a blank window) and on the reversal; a
|
|
45
45
|
* pane the reader hid stays theirs. While hidden, the meta carries the
|
|
46
46
|
* window's mark (window-owner.leaf isPaneHiddenByWindow), so the run gates
|
|
47
|
-
* never take it for the reader's collapse: the owner keeps running.
|
|
47
|
+
* never take it for the reader's collapse: the owner keeps running. A window
|
|
48
|
+
* that shows its tables alone (WRUN_WINDOW_TABLES_ONLY_SETTING: the window an
|
|
49
|
+
* add opened beside its chart Indicator) hides the owner's pane beside its
|
|
50
|
+
* tables whatever that pane draws: the chart Indicator beside it shows it
|
|
51
|
+
* already. It still comes back when it would be the window's only pane.
|
|
48
52
|
*
|
|
49
53
|
* The reader's own split outranks the plan. The reconcile runs at the end of
|
|
50
54
|
* EVERY run of the owner (the child mount calls it on each live tick), so a
|
|
@@ -70,6 +74,14 @@ import { PANEL_CHART_GRID_HEIGHT, panelGridHeight } from './om-panel.util.js';
|
|
|
70
74
|
import { MIN_GRID_HEIGHT_ALLOWED } from './titan-constants.pin.js';
|
|
71
75
|
import { WRUN_WINDOW_SPLIT_SETTING } from './window-owner.leaf.js';
|
|
72
76
|
import { wrunChildOverlayParentId } from '../wrun/wrun-child-overlay-id.util.js';
|
|
77
|
+
/**
|
|
78
|
+
* The owner setting of a window that shows its tables ALONE: the window an add opens beside its chart Indicator
|
|
79
|
+
* (web's window-cell.util writes the same key; the child mount and this geometry read it off the owner's engine
|
|
80
|
+
* settings). Its child mount mounts the `panel.table` children and no other child, and its geometry hides the owner's
|
|
81
|
+
* own pane beside them (settleOwnerPane): the chart Indicator beside the window keeps every other pane, so none shows
|
|
82
|
+
* twice. It means nothing on a cell that is no window.
|
|
83
|
+
*/
|
|
84
|
+
export const WRUN_WINDOW_TABLES_ONLY_SETTING = 'wrunWindowTablesOnly';
|
|
73
85
|
/** The split key of a window pane: `self` for the owner, a child's id past `<owner>::`. */
|
|
74
86
|
export function windowSplitKeyOf(paneId) {
|
|
75
87
|
const parent = wrunChildOverlayParentId(paneId);
|
|
@@ -244,17 +256,21 @@ function showOwnerPane(tc, ownerId) {
|
|
|
244
256
|
/**
|
|
245
257
|
* The owner's own pane under the window layout (C5): hidden while it draws nothing beside another window pane of the
|
|
246
258
|
* owner, so the plan (the visible panes) leaves it out; shown again once it draws or once it would be the window's
|
|
247
|
-
* only pane.
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
259
|
+
* only pane. A window that shows its tables alone (WRUN_WINDOW_TABLES_ONLY_SETTING) hides it beside another window
|
|
260
|
+
* pane whatever it draws (QA 2026-10-22: the window beside an add showed the owner's lower pane the chart beside it
|
|
261
|
+
* already showed), and still shows it when it would be the window's only pane (never a blank window). Only the pane
|
|
262
|
+
* collapse is used (the owner's eye, which its children follow, is untouched), the meta carries the window's mark
|
|
263
|
+
* while hidden (so the run gates tell it from the reader's collapse, window-owner.leaf isPaneHiddenByWindow), only a
|
|
264
|
+
* marked pane is shown again, and an engine without the collapse keeps today's pane. Returns whether the engine
|
|
265
|
+
* changed.
|
|
251
266
|
*/
|
|
252
267
|
function settleOwnerPane(tc, ownerId) {
|
|
253
268
|
const owner = tc.metadata.find((meta) => meta.id === ownerId);
|
|
254
269
|
if (!owner || owner.type !== 'offchart' || owner.hostPaneId)
|
|
255
270
|
return false;
|
|
256
271
|
const others = tc.metadata.some((meta) => meta.id !== ownerId && isWindowPaneMeta(meta, ownerId));
|
|
257
|
-
|
|
272
|
+
const tablesOnly = owner.settings?.[WRUN_WINDOW_TABLES_ONLY_SETTING] === true;
|
|
273
|
+
if (!others || (!tablesOnly && !ownerPaneDrawsNothing(owner)))
|
|
258
274
|
return showOwnerPane(tc, ownerId);
|
|
259
275
|
if (owner.isPaneHidden === true || typeof tc.togglePaneWithAnimation !== 'function')
|
|
260
276
|
return false;
|
|
@@ -774,6 +774,12 @@ export interface WrunRunNote extends RuntimeDiagnostic {
|
|
|
774
774
|
export interface WrunRunResult {
|
|
775
775
|
define: WrunRunDefine;
|
|
776
776
|
outputs: Record<string, WrunRunResultOutput>;
|
|
777
|
+
/** The owner's HUD headline (wrunHudHeadlineOf): the first `presentation.hud` tile declared `headline: true`
|
|
778
|
+
* (LK05), read on the run's last ready row like the latest-values snapshot reads it: its string slot's text, or
|
|
779
|
+
* its output's value formatted like the card's. The words a panel pane whose frame carries no rows says through its
|
|
780
|
+
* caption (wrun-panel-mount.util), since a HUD card is drawn on a chart cell only and the snapshot that feeds it is
|
|
781
|
+
* published after the children mount. Absent when no tile is a headline or the row holds nothing for it. */
|
|
782
|
+
headline?: string;
|
|
777
783
|
/** The overlay's container spans the run (kScriptContainerSpansRun): the integration lays it over
|
|
778
784
|
* the chart's bars from its first row through the run's last bar, as a kScript container spans
|
|
779
785
|
* its engine timeline. Its outputs arrive as [ts, value] rows the shared preparation keeps only
|
|
@@ -785,6 +791,12 @@ export interface WrunRunResult {
|
|
|
785
791
|
failureReason?: string;
|
|
786
792
|
/** The sheet entries the build dropped instead of failing the run (absent when none). */
|
|
787
793
|
notes?: WrunRunNote[];
|
|
794
|
+
/** The Style targets (wrun-visibility-table) this run drew nothing for (wrunRunEmptyTargets): an output, a range
|
|
795
|
+
* or a fill with no finite value on any ready row (an `omit_if_empty` declaration the build left out, or a plot
|
|
796
|
+
* an input switched off), a drawing, a segment or a handle kind with no record. The Style page draws their lines
|
|
797
|
+
* dimmed with the reason (WrunLayoutPanel), read off the latest-values snapshot the run publishes. Absent when
|
|
798
|
+
* every judged target drew. */
|
|
799
|
+
emptyTargets?: string[];
|
|
788
800
|
/** Every child's author-facing notices in child order (a TPO whose rows the
|
|
789
801
|
* rows-per-period cap coarsened); absent when no child has one. The run
|
|
790
802
|
* still draws: these are warnings (`wrunRunNoticesOf`). */
|