@orangecharts/wrun-chart-host 0.8.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 +3 -1
- package/dist/constants/feature-flags.constants.d.ts +9 -0
- package/dist/constants/feature-flags.constants.js +86 -16
- package/dist/constants/marketCapabilities.constants.d.ts +14 -9
- package/dist/constants/marketCapabilities.constants.js +36 -13
- package/dist/constants/opra-compliance.constants.d.ts +15 -0
- package/dist/constants/opra-compliance.constants.js +15 -0
- package/dist/constants/option-venues.constants.d.ts +11 -6
- package/dist/constants/option-venues.constants.js +5 -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 +39 -9
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +108 -18
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
- package/dist/interfaces/opra-realtime.interface.js +10 -10
- package/dist/interfaces/replay.interface.d.ts +8 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +52 -15
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +94 -14
- package/dist/kscript-data/controls/live-trades-merge.util.js +132 -22
- 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 +227 -42
- package/dist/market-data/billing.interface.js +60 -12
- 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 +165 -8
- package/dist/market-data/venues/index.js +48 -6
- package/dist/market-data/venues/opra.contract.copy.json +5 -3
- package/dist/market-data/venues/opra.d.ts +3 -3
- package/dist/market-data/venues/opra.js +5 -4
- package/dist/replay/replayLadder.js +3 -1
- 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/crypto-index.leaf.d.ts +2 -2
- package/dist/utility/chart/crypto-index.leaf.js +2 -2
- package/dist/utility/chart/index-mode-admission.util.js +24 -3
- package/dist/utility/chart/index-mode.util.d.ts +5 -2
- package/dist/utility/chart/index-mode.util.js +23 -13
- 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 +53 -27
- package/dist/utility/chart/kscript-venue-policy.util.js +74 -32
- 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/marketKind.util.d.ts +12 -10
- package/dist/utility/chart/marketKind.util.js +17 -7
- package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
- package/dist/utility/chart/om-panel-push-style.util.js +17 -15
- package/dist/utility/chart/om-panel.util.js +6 -6
- 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/profile-block-size.util.d.ts +16 -0
- package/dist/utility/chart/profile-block-size.util.js +7 -0
- package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
- package/dist/utility/chart/quote-perp.leaf.js +20 -0
- 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 +17 -0
- package/dist/utility/chart/wrun-run-result.util.js +145 -7
- package/dist/utility/common/transformations.util.d.ts +7 -0
- package/dist/utility/common/transformations.util.js +11 -0
- 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 +21 -3
- package/dist/utility/options/option-venue.util.js +30 -3
- 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 +5 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +6 -4
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
- 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-lane-registry.js +3 -2
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +15 -6
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +14 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +82 -13
- package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -8
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +95 -14
- package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +5 -2
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +7 -3
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +35 -14
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +70 -20
- 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 +45 -1
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +114 -6
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +56 -5
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +224 -26
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +822 -58
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
- package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
- package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
- 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-canvas-readout.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +192 -13
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +437 -55
- package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
- package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +15 -4
- package/dist/utility/wrun/wrun-color-settings.util.js +31 -12
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
- package/dist/utility/wrun/wrun-download-meter.util.d.ts +107 -0
- package/dist/utility/wrun/wrun-download-meter.util.js +134 -0
- 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-draft-overlay.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-draft-overlay.util.js +23 -3
- package/dist/utility/wrun/wrun-frames.d.ts +27 -6
- package/dist/utility/wrun/wrun-frames.js +78 -15
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +7 -0
- 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 +51 -21
- package/dist/utility/wrun/wrun-hud-looks.util.js +74 -28
- package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +19 -9
- package/dist/utility/wrun/wrun-live-intake.util.js +213 -45
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-live-tick.util.js +246 -49
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +205 -48
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +277 -34
- package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +51 -7
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +340 -56
- 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-prints.util.d.ts +41 -2
- package/dist/utility/wrun/wrun-option-prints.util.js +80 -13
- 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 +26 -6
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +50 -11
- package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +109 -19
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +222 -61
- package/dist/utility/wrun/wrun-option-views.util.d.ts +96 -18
- package/dist/utility/wrun/wrun-option-views.util.js +246 -51
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
- 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 +20 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -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-recovery.util.d.ts +7 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +25 -1
- package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
- package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +134 -37
- package/dist/utility/wrun/wrun-overlay-run.util.js +1118 -254
- package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +4 -4
- package/dist/utility/wrun/wrun-pack-widths.leaf.js +4 -4
- package/dist/utility/wrun/wrun-pack.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-pack.util.js +20 -9
- 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 +37 -24
- package/dist/utility/wrun/wrun-panel-style.util.js +100 -29
- package/dist/utility/wrun/wrun-param-map.util.d.ts +15 -11
- package/dist/utility/wrun/wrun-param-map.util.js +13 -5
- package/dist/utility/wrun/wrun-param-values.util.d.ts +21 -3
- package/dist/utility/wrun/wrun-param-values.util.js +6 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
- 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-refusal.util.js +10 -1
- 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 +52 -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 +9 -1
- package/dist/utility/wrun/wrun-source-rows.util.js +108 -43
- 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/utility/wrun/wrun-tape-source.util.d.ts +126 -50
- package/dist/utility/wrun/wrun-tape-source.util.js +193 -68
- package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
- package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
- package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
- package/dist/utils/replay/replay-buffer-math.js +227 -20
- package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
- package/dist/workers/utils/volume-profile.worker.util.js +5 -2
- package/dist/workers/wrun/wrun-abi-host.js +3 -2
- package/package.json +5 -5
|
@@ -3,13 +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
|
-
*
|
|
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.
|
|
13
14
|
* Every run door (add, mount, protected fetch, cache paint, alerts arm,
|
|
14
15
|
* editor Run), the per-payload data guard in titan-charts dataFetch, and the
|
|
15
16
|
* engine policy descriptor consult it; nothing else may re-derive provenance
|
|
@@ -90,25 +91,48 @@ export declare function isOfficialWrunOverlay(settings: KScriptProvenanceSetting
|
|
|
90
91
|
export declare function resolveKScriptRunProvenance(settings: KScriptProvenanceSettingsLike | null | undefined): KScriptRunProvenance;
|
|
91
92
|
export declare function isFirstPartyKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
92
93
|
/**
|
|
93
|
-
* A user run the browser executes:
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* migration on read (`wrunCloudRecordOf`): the wave-3 record (`wrunRunTarget: 'cloud'`, no `wrunRef`) and a record
|
|
98
|
-
* persisted before wave 3 (`wrunRef`) alike. The runs the `opra-user-scripts` flag can open the OPRA plane to; read
|
|
99
|
-
* without the flag where a door must know a decision waits on it (the 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).
|
|
100
98
|
*/
|
|
101
99
|
export declare function isOpraUserScriptCandidate(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
102
100
|
/**
|
|
103
|
-
* Whether
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
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;
|
|
120
|
+
/**
|
|
121
|
+
* Whether the OPRA plane is open to this user run. The ONE decision every OPRA door reads, directly or through the
|
|
122
|
+
* walls below: the display wall, the data wall (the dataFetch door, the protected pre-flight, the cache paint), the
|
|
123
|
+
* engine policy, and the wrun chain decision. The CME plane never reads it.
|
|
124
|
+
*
|
|
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.
|
|
108
132
|
*/
|
|
109
133
|
export declare function isOpraUserScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
110
134
|
/** Whether a run may consume the OPRA plane's data: every first-party run, and a user run the flag opened it to
|
|
111
|
-
* (`mayReadOpra`, the one decision the wrun run head and every source lane read too). */
|
|
135
|
+
* (`isOpraUserScriptRun`; `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
|
|
112
136
|
export declare function isOpraReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
113
137
|
/** Whether a source exchange touches a CME-governed venue (the CME-only curation and copy). */
|
|
114
138
|
export declare function payloadTouchesCmeVenue(exchange: unknown): boolean;
|
|
@@ -170,12 +194,13 @@ export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settin
|
|
|
170
194
|
*
|
|
171
195
|
* OPRA (no CME leg): every first-party run is explicitly venue-approved, the
|
|
172
196
|
* built-ins, the converted corpus, the official docs and the official
|
|
173
|
-
* packages alike
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
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.
|
|
179
204
|
*/
|
|
180
205
|
export declare function isKScriptDisplayBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
181
206
|
/**
|
|
@@ -200,7 +225,8 @@ export declare function shouldBlockKScriptSourcePayload(args: {
|
|
|
200
225
|
* governed set of every gate plane as deniedExchanges once the engine pin
|
|
201
226
|
* supports it, so a user script on a crypto chart cannot pull an explicit
|
|
202
227
|
* OPRA source either, unless the `opra-user-scripts` flag opened the OPRA
|
|
203
|
-
* plane to the run (`isOpraUserScriptRun`): its set is then the CME family
|
|
228
|
+
* plane to the run (`isOpraUserScriptRun`): its set is then the CME family
|
|
229
|
+
* alone.
|
|
204
230
|
*/
|
|
205
231
|
export interface KScriptDataAccessPolicyDescriptor {
|
|
206
232
|
governedExchanges: readonly string[];
|
|
@@ -3,13 +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
|
-
*
|
|
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.
|
|
13
14
|
* Every run door (add, mount, protected fetch, cache paint, alerts arm,
|
|
14
15
|
* editor Run), the per-payload data guard in titan-charts dataFetch, and the
|
|
15
16
|
* engine policy descriptor consult it; nothing else may re-derive provenance
|
|
@@ -151,33 +152,73 @@ export function isFirstPartyKScriptRun(settings) {
|
|
|
151
152
|
return isCmeFirstPartyOfficialDocId(settings?.customScriptId);
|
|
152
153
|
}
|
|
153
154
|
/**
|
|
154
|
-
*
|
|
155
|
-
* document or package, anything unrecognized
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
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.
|
|
161
163
|
*/
|
|
162
|
-
|
|
164
|
+
function opraUserRunLane(settings) {
|
|
163
165
|
if (!settings || isFirstPartyKScriptRun(settings))
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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';
|
|
168
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';
|
|
169
194
|
/**
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
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;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Whether the OPRA plane is open to this user run. The ONE decision every OPRA door reads, directly or through the
|
|
206
|
+
* walls below: the display wall, the data wall (the dataFetch door, the protected pre-flight, the cache paint), the
|
|
207
|
+
* engine policy, and the wrun chain decision. The CME plane never reads it.
|
|
208
|
+
*
|
|
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.
|
|
175
216
|
*/
|
|
176
217
|
export function isOpraUserScriptRun(settings) {
|
|
177
218
|
return isOpraUserScriptsFlagOn() && isOpraUserScriptCandidate(settings);
|
|
178
219
|
}
|
|
179
220
|
/** Whether a run may consume the OPRA plane's data: every first-party run, and a user run the flag opened it to
|
|
180
|
-
* (`mayReadOpra`, the one decision the wrun run head and every source lane read too). */
|
|
221
|
+
* (`isOpraUserScriptRun`; `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
|
|
181
222
|
export function isOpraReadableKScriptRun(settings) {
|
|
182
223
|
return mayReadOpra({ official: isFirstPartyKScriptRun(settings), opraUserScripts: isOpraUserScriptRun(settings) });
|
|
183
224
|
}
|
|
@@ -257,12 +298,13 @@ export function isUserKScriptBlockedOnExchange(exchange, settings) {
|
|
|
257
298
|
*
|
|
258
299
|
* OPRA (no CME leg): every first-party run is explicitly venue-approved, the
|
|
259
300
|
* built-ins, the converted corpus, the official docs and the official
|
|
260
|
-
* packages alike
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
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.
|
|
266
308
|
*/
|
|
267
309
|
export function isKScriptDisplayBlockedOnExchange(exchange, settings) {
|
|
268
310
|
if (!payloadTouchesGovernedVenue(exchange))
|
|
@@ -291,7 +333,7 @@ export function isKScriptDisplayBlockedOnExchange(exchange, settings) {
|
|
|
291
333
|
* rejections, and a policy block is a standing state, not an incident.
|
|
292
334
|
*/
|
|
293
335
|
export function shouldBlockKScriptSourcePayload(args) {
|
|
294
|
-
// The data wall's per-plane verdict: an OPRA source a flag-opened user run declares is served.
|
|
336
|
+
// The data wall's per-plane verdict: an OPRA source a flag-opened user run declares is served (`isOpraUserScriptRun`).
|
|
295
337
|
const blocked = isUserKScriptBlockedOnExchange(args.payloadExchange, args.settings) ||
|
|
296
338
|
(payloadReadsOpraPlane(args.payload) && !isOpraReadableKScriptRun(args.settings));
|
|
297
339
|
if (!blocked)
|
|
@@ -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
|
|
@@ -5,12 +5,13 @@ import { type OmTargetMetadata } from './om-target.util.js';
|
|
|
5
5
|
* The frontend's market-kind vocabulary: TitanCharts' `MarketKind` union plus
|
|
6
6
|
* FE-owned kinds for governed CME venues (`'futures'`), HyperLiquid
|
|
7
7
|
* prediction markets (`'hip4'`), economic series (`'economic'`: FRED and
|
|
8
|
-
* the ECONOMICS catalog publishers, which the engine still knows as `'fred'`)
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* the ECONOMICS catalog publishers, which the engine still knows as `'fred'`),
|
|
9
|
+
* the crypto-wide indices (`'cryptoIndex'`: CRYPTOCAP's BTC.D, TOTAL, ...)
|
|
10
|
+
* and the perpetual venues that publish quotes, never trades (`'quotePerp'`:
|
|
11
|
+
* Variational, quote-perp.leaf). TitanCharts does not know these kinds;
|
|
12
|
+
* anything handed into the engine narrows through `toTitanMarketKind`.
|
|
12
13
|
*/
|
|
13
|
-
export type VenueMarketKind = Exclude<MarketKind, 'fred'> | 'economic' | 'futures' | 'hip4' | 'options' | 'cryptoIndex';
|
|
14
|
+
export type VenueMarketKind = Exclude<MarketKind, 'fred'> | 'economic' | 'futures' | 'hip4' | 'options' | 'cryptoIndex' | 'quotePerp';
|
|
14
15
|
/** Which wire path serves an economic series (see `economicSource`). */
|
|
15
16
|
export type EconomicSource = 'fred' | 'observation';
|
|
16
17
|
/**
|
|
@@ -127,15 +128,16 @@ export declare function checkIsForexCommodityOrFutures(exchange: string | undefi
|
|
|
127
128
|
* the engine's `'fred'` (single-value series treatment); `'cryptoIndex'`
|
|
128
129
|
* maps to `'crypto'`: the indices print 24/7 (about every 250 ms after a
|
|
129
130
|
* price move, every 5 s per coin) onto uniform bars from 1m up, the crypto
|
|
130
|
-
* treatment's own shape, gap policy included.
|
|
131
|
-
* the
|
|
131
|
+
* treatment's own shape, gap policy included. `'quotePerp'` maps to
|
|
132
|
+
* `'crypto'` too: its perpetuals quote around the clock onto uniform minute
|
|
133
|
+
* bars. FE-internal code always sees the honest venue kind.
|
|
132
134
|
*/
|
|
133
135
|
export declare function toTitanMarketKind(kind: VenueMarketKind): MarketKind;
|
|
134
136
|
/**
|
|
135
137
|
* True when TitanCharts must omit the dedicated 'volume' legend overlay:
|
|
136
|
-
* economic series, forex/commodity venues
|
|
137
|
-
* per-bar volume. Governed CME futures
|
|
138
|
-
* bars, so they keep it.
|
|
138
|
+
* economic series, forex/commodity venues, the crypto indices and the
|
|
139
|
+
* quote-priced perpetual venues ship no per-bar volume. Governed CME futures
|
|
140
|
+
* DO ship contracts volume on TRADE_AGG bars, so they keep it.
|
|
139
141
|
*/
|
|
140
142
|
export declare function venueOmitsVolumeOverlay(exchange: string | undefined | null): boolean;
|
|
141
143
|
export declare function checkIsDex(exchange: string | undefined | null): boolean;
|
|
@@ -2,6 +2,7 @@ import { MARKET_CAPABILITIES, ONCHAIN_POOL_CAPABILITIES, } from '../../constants
|
|
|
2
2
|
import { isBlkExchange } from '../blk-market.util.js';
|
|
3
3
|
import { ECONOMIC_EXCHANGES, FRED_EXCHANGE } from '../../constants/economic.constants.js';
|
|
4
4
|
import { CRYPTO_INDEX_EXCHANGES } from './crypto-index.leaf.js';
|
|
5
|
+
import { QUOTE_PERP_EXCHANGES } from './quote-perp.leaf.js';
|
|
5
6
|
import { isCmeGoverned, normalizeExchangeCode } from './cme-realtime.util.js';
|
|
6
7
|
import { isGovernedPlaneExchange } from '../v2/gate-plane.util.js';
|
|
7
8
|
import { isOmTargetPane } from './om-target.util.js';
|
|
@@ -80,6 +81,11 @@ const EXCHANGE_TO_KIND = {
|
|
|
80
81
|
// Crypto-wide indices (CRYPTOCAP): value prints 24/7 with no trades,
|
|
81
82
|
// volume or book behind them (crypto-index.leaf owns the list).
|
|
82
83
|
...Object.fromEntries(CRYPTO_INDEX_EXCHANGES.map((code) => [code, 'cryptoIndex'])),
|
|
84
|
+
// Perpetual venues that publish quotes, never trades (Variational): TICKER
|
|
85
|
+
// candles and prints, funding and open interest, no trades, volume or book
|
|
86
|
+
// (quote-perp.leaf owns the list). Unlisted, they read as crypto and ask for
|
|
87
|
+
// trades the gateway never serves them.
|
|
88
|
+
...Object.fromEntries(QUOTE_PERP_EXCHANGES.map((code) => [code, 'quotePerp'])),
|
|
83
89
|
// Polymarket
|
|
84
90
|
POLYMARKET: 'polymarket',
|
|
85
91
|
// Hip3 (Hyperliquid synthetic derivatives)
|
|
@@ -285,8 +291,9 @@ export function checkIsForexCommodityOrFutures(exchange) {
|
|
|
285
291
|
* the engine's `'fred'` (single-value series treatment); `'cryptoIndex'`
|
|
286
292
|
* maps to `'crypto'`: the indices print 24/7 (about every 250 ms after a
|
|
287
293
|
* price move, every 5 s per coin) onto uniform bars from 1m up, the crypto
|
|
288
|
-
* treatment's own shape, gap policy included.
|
|
289
|
-
* the
|
|
294
|
+
* treatment's own shape, gap policy included. `'quotePerp'` maps to
|
|
295
|
+
* `'crypto'` too: its perpetuals quote around the clock onto uniform minute
|
|
296
|
+
* bars. FE-internal code always sees the honest venue kind.
|
|
290
297
|
*/
|
|
291
298
|
export function toTitanMarketKind(kind) {
|
|
292
299
|
if (kind === 'futures' || kind === 'options')
|
|
@@ -295,18 +302,21 @@ export function toTitanMarketKind(kind) {
|
|
|
295
302
|
return 'polymarket';
|
|
296
303
|
if (kind === 'economic')
|
|
297
304
|
return 'fred';
|
|
298
|
-
if (kind === 'cryptoIndex')
|
|
305
|
+
if (kind === 'cryptoIndex' || kind === 'quotePerp')
|
|
299
306
|
return 'crypto';
|
|
300
307
|
return kind;
|
|
301
308
|
}
|
|
302
309
|
/**
|
|
303
310
|
* True when TitanCharts must omit the dedicated 'volume' legend overlay:
|
|
304
|
-
* economic series, forex/commodity venues
|
|
305
|
-
* per-bar volume. Governed CME futures
|
|
306
|
-
* bars, so they keep it.
|
|
311
|
+
* economic series, forex/commodity venues, the crypto indices and the
|
|
312
|
+
* quote-priced perpetual venues ship no per-bar volume. Governed CME futures
|
|
313
|
+
* DO ship contracts volume on TRADE_AGG bars, so they keep it.
|
|
307
314
|
*/
|
|
308
315
|
export function venueOmitsVolumeOverlay(exchange) {
|
|
309
|
-
|
|
316
|
+
if (checkIsEconomic(exchange) || checkIsForexOrCommodity(exchange))
|
|
317
|
+
return true;
|
|
318
|
+
const kind = getMarketKind(exchange);
|
|
319
|
+
return kind === 'cryptoIndex' || kind === 'quotePerp';
|
|
310
320
|
}
|
|
311
321
|
export function checkIsDex(exchange) {
|
|
312
322
|
return getMarketKind(exchange) === 'dex';
|
|
@@ -43,13 +43,13 @@ export declare function invalidSeriesStyleWord(series: Record<string, unknown>,
|
|
|
43
43
|
* style word it does not declare (a declared word always wins). Tuned against the approved mock
|
|
44
44
|
* (openmarket mocks/yzi-chart-style), within what the engine draws:
|
|
45
45
|
*
|
|
46
|
-
* - bars, histogram
|
|
47
|
-
*
|
|
48
|
-
* -
|
|
49
|
-
* `
|
|
50
|
-
* -
|
|
51
|
-
*
|
|
52
|
-
*
|
|
46
|
+
* - bars, histogram, line, scatter: no chrome word, so the plain default both lanes share
|
|
47
|
+
* (`hairlines`, wrunPanelChrome): value hairlines, no frame, no vertical grid.
|
|
48
|
+
* - bars, histogram: bars at about half their slot with a rounded data end (`bar_width`,
|
|
49
|
+
* `bar_radius`).
|
|
50
|
+
* - line: a smoothed stroke and a fading fill.
|
|
51
|
+
* - scatter: points in the engine's own default teal at half opacity, so a dense cloud reads as
|
|
52
|
+
* density. A row's own colour wins.
|
|
53
53
|
* - pie: no frame, 2 px gaps between slices and the total in the hole when the pie has one.
|
|
54
54
|
* Slices keep their leader-line labels (name and percent); a pie that declares
|
|
55
55
|
* `legend_style: 'title'` lists them as chips beside the title instead, as on the wrun lane
|
|
@@ -63,6 +63,8 @@ const guide = shape({
|
|
|
63
63
|
const ALL = ['bars', 'line', 'scatter', 'histogram', 'pie', 'heatmap', 'table', 'tiles'];
|
|
64
64
|
const AXIS = ['line', 'bars', 'histogram', 'scatter'];
|
|
65
65
|
const BARS = ['bars', 'histogram'];
|
|
66
|
+
/** A chrome word the sheet type gains without a key here fails to compile. */
|
|
67
|
+
const CHROME_WORDS = Object.keys({ box: 1, grid: 1, none: 1, hairlines: 1 });
|
|
66
68
|
/** Every panel style word: its valid values and the kinds it applies to (the SDK's table, plus
|
|
67
69
|
* the two bar words). A word the interface gains without a rule here fails to compile. */
|
|
68
70
|
const PANEL_WORD_RULES = {
|
|
@@ -71,7 +73,7 @@ const PANEL_WORD_RULES = {
|
|
|
71
73
|
stats_row: { kinds: ['line'], valid: bool },
|
|
72
74
|
font_family: { kinds: ALL, valid: oneOf(WRUN_FONT_FAMILIES) },
|
|
73
75
|
hover_card: { kinds: ['line', 'bars', 'histogram', 'scatter', 'pie', 'heatmap', 'tiles'], valid: bool },
|
|
74
|
-
chrome: { kinds: ['line', 'bars', 'histogram', 'scatter', 'pie'], valid: oneOf(
|
|
76
|
+
chrome: { kinds: ['line', 'bars', 'histogram', 'scatter', 'pie'], valid: oneOf(CHROME_WORDS) },
|
|
75
77
|
format: { kinds: ALL, valid: format },
|
|
76
78
|
decimals: { kinds: ALL, valid: decimals },
|
|
77
79
|
signed: { kinds: ALL, valid: bool },
|
|
@@ -192,8 +194,8 @@ export const PANEL_SERIES_STYLE_WORDS = new Set(Object.keys(SERIES_WORD_RULES));
|
|
|
192
194
|
/** The words the kit does not validate yet: checked on the wrun lane too. */
|
|
193
195
|
const APP_CHECKED_WORDS = new Set(['bar_width', 'bar_radius']);
|
|
194
196
|
/** The SDK's conditions past the kind table: x words need a numeric x (or a scatter), the side
|
|
195
|
-
* box needs place side, a pie
|
|
196
|
-
* one (wrunPanelAllowsWord and refineWrunPanelStyle). */
|
|
197
|
+
* box needs place side, a pie's chrome is box or none, chips are a line legend and pane a line or
|
|
198
|
+
* bars one (wrunPanelAllowsWord and refineWrunPanelStyle). */
|
|
197
199
|
function fitsPanel(scope, word, value) {
|
|
198
200
|
const numeric = scope.x === 'index' || scope.x === 'number';
|
|
199
201
|
switch (word) {
|
|
@@ -207,7 +209,7 @@ function fitsPanel(scope, word, value) {
|
|
|
207
209
|
case 'height_px':
|
|
208
210
|
return scope.place === 'side';
|
|
209
211
|
case 'chrome':
|
|
210
|
-
return
|
|
212
|
+
return scope.kind !== 'pie' || value === 'box' || value === 'none';
|
|
211
213
|
case 'legend_style':
|
|
212
214
|
if (value === 'chips')
|
|
213
215
|
return scope.kind === 'line';
|
|
@@ -250,13 +252,13 @@ export function invalidSeriesStyleWord(series, kind) {
|
|
|
250
252
|
* style word it does not declare (a declared word always wins). Tuned against the approved mock
|
|
251
253
|
* (openmarket mocks/yzi-chart-style), within what the engine draws:
|
|
252
254
|
*
|
|
253
|
-
* - bars, histogram
|
|
254
|
-
*
|
|
255
|
-
* -
|
|
256
|
-
* `
|
|
257
|
-
* -
|
|
258
|
-
*
|
|
259
|
-
*
|
|
255
|
+
* - bars, histogram, line, scatter: no chrome word, so the plain default both lanes share
|
|
256
|
+
* (`hairlines`, wrunPanelChrome): value hairlines, no frame, no vertical grid.
|
|
257
|
+
* - bars, histogram: bars at about half their slot with a rounded data end (`bar_width`,
|
|
258
|
+
* `bar_radius`).
|
|
259
|
+
* - line: a smoothed stroke and a fading fill.
|
|
260
|
+
* - scatter: points in the engine's own default teal at half opacity, so a dense cloud reads as
|
|
261
|
+
* density. A row's own colour wins.
|
|
260
262
|
* - pie: no frame, 2 px gaps between slices and the total in the hole when the pie has one.
|
|
261
263
|
* Slices keep their leader-line labels (name and percent); a pie that declares
|
|
262
264
|
* `legend_style: 'title'` lists them as chips beside the title instead, as on the wrun lane
|
|
@@ -266,10 +268,10 @@ export function invalidSeriesStyleWord(series, kind) {
|
|
|
266
268
|
* - heatmap, tiles: no word to quiet them; today's look stands.
|
|
267
269
|
*/
|
|
268
270
|
export const OM_PANEL_QUIET_DEFAULTS = {
|
|
269
|
-
bars: {
|
|
270
|
-
histogram: {
|
|
271
|
-
line: {
|
|
272
|
-
scatter: {
|
|
271
|
+
bars: { bar_width: 0.52, bar_radius: 3 },
|
|
272
|
+
histogram: { bar_width: 0.52, bar_radius: 3 },
|
|
273
|
+
line: { smooth: true, fill_fade: true },
|
|
274
|
+
scatter: { color: '#43d3c380' },
|
|
273
275
|
pie: { chrome: 'none', slice_gap: 2 },
|
|
274
276
|
table: { border_width: 0, grid_lines: 'rows', grid_width: 1 },
|
|
275
277
|
};
|
|
@@ -60,7 +60,6 @@ const FONT_WEIGHTS = new Set(['normal', 'medium', 'bold']);
|
|
|
60
60
|
const VALUE_FORMATS = new Set(WRUN_VALUE_FORMATS);
|
|
61
61
|
/** The pane kinds whose `chrome` word reaches the engine as `chromeStyle`. */
|
|
62
62
|
const CHROME_KINDS = new Set(['line', 'bars', 'histogram', 'scatter', 'pie']);
|
|
63
|
-
const DEFAULT_HEATMAP_PALETTE = ['#e06c75', '#7a7f93', '#98c379'];
|
|
64
63
|
/** Chart-shaped panels (bars, curves, scatter, pie, heatmap, tiles) keep one weight below the chart. */
|
|
65
64
|
export const PANEL_CHART_GRID_HEIGHT = 0.22;
|
|
66
65
|
/** The engine's table defaults: 12 px text with 8 px cell padding gives 28 px rows, 8 px edge padding. */
|
|
@@ -674,9 +673,10 @@ export function translatePanelToEngine(frame, ctx = {}) {
|
|
|
674
673
|
let settings;
|
|
675
674
|
if (panel.x === 'time') {
|
|
676
675
|
const sorted = [...rows].sort((a, b) => a[0] - b[0]);
|
|
677
|
-
if (effective
|
|
678
|
-
// The rich curve
|
|
679
|
-
//
|
|
676
|
+
if (effective !== 'box') {
|
|
677
|
+
// The rich curve (every chrome but box, the hairlines default too)
|
|
678
|
+
// spaces points by their time (gaps stay gaps) and labels the axis
|
|
679
|
+
// in the chart's display timezone (SC37).
|
|
680
680
|
panelRows = sorted.map((row) => [timeKeyMs(row[0]), ...row.slice(1)]);
|
|
681
681
|
settings = {
|
|
682
682
|
series,
|
|
@@ -770,11 +770,11 @@ export function translatePanelToEngine(frame, ctx = {}) {
|
|
|
770
770
|
const yKeys = [...new Set(rows.map((row) => row[1]))];
|
|
771
771
|
const xIndices = new Map(xKeys.map((key, index) => [key, index]));
|
|
772
772
|
const yIndices = new Map(yKeys.map((key, index) => [key, index]));
|
|
773
|
+
// The palette is the heatmap mapper's (wrunHeatmapStyle: the declared or
|
|
774
|
+
// default stops; none under the engine's signed scale, SC06).
|
|
773
775
|
const settings = {
|
|
774
776
|
rowLabels: yKeys.map(String),
|
|
775
777
|
colLabels: xKeys.map(String),
|
|
776
|
-
// The signed scale is the engine's own diverging default (SC06).
|
|
777
|
-
...(panel.scale === 'signed' ? {} : { palette: [...DEFAULT_HEATMAP_PALETTE] }),
|
|
778
778
|
fontFamily,
|
|
779
779
|
};
|
|
780
780
|
const result = finish('matrix', rows.map((row) => [yIndices.get(row[1]), xIndices.get(row[0]), row[2]]), settings);
|
|
@@ -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.
|