@orangecharts/wrun-chart-host 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/constants/feature-flags.constants.d.ts +9 -0
- package/dist/constants/feature-flags.constants.js +67 -4
- package/dist/constants/governed-exchanges.constants.d.ts +12 -0
- package/dist/constants/governed-exchanges.constants.js +16 -0
- package/dist/constants/option-venues.constants.d.ts +2 -2
- package/dist/host-env.d.ts +1 -9
- package/dist/host-ports.types.d.ts +36 -7
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -1
- package/dist/interfaces/cancel-reason.interface.d.ts +1 -1
- package/dist/interfaces/cme-realtime.interface.d.ts +16 -9
- package/dist/interfaces/cme-realtime.interface.js +6 -3
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +1 -5
- package/dist/interfaces/prediction-market.interface.d.ts +7 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +57 -0
- package/dist/interfaces/stocks-realtime.interface.js +32 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +48 -117
- package/dist/kscript-data/controls/live-trades-merge.util.js +97 -207
- package/dist/market-data/billing.interface.d.ts +86 -12
- package/dist/market-data/billing.interface.js +23 -4
- package/dist/market-data/venue.d.ts +65 -2
- package/dist/market-data/venues/index.d.ts +135 -5
- package/dist/market-data/venues/index.js +2 -1
- package/dist/market-data/venues/opra.contract.copy.json +3 -2
- package/dist/market-data/venues/opra.d.ts +2 -2
- package/dist/market-data/venues/opra.js +5 -2
- package/dist/market-data/venues/stocks.contract.copy.json +64 -0
- package/dist/market-data/venues/stocks.d.ts +130 -0
- package/dist/market-data/venues/stocks.js +117 -0
- package/dist/settings-templates/footprint-rows.js +35 -2
- package/dist/settings-templates/form-rows.d.ts +2 -1
- package/dist/settings-templates/indicator-fields.js +34 -4
- package/dist/settings-templates/tool-rules.d.ts +12 -5
- package/dist/settings-templates/tool-rules.js +11 -5
- package/dist/settings-templates/tool-tables.generated.js +4 -0
- package/dist/utility/chart/cme-cache-context.util.d.ts +5 -3
- package/dist/utility/chart/cme-cache-context.util.js +10 -6
- package/dist/utility/chart/cme-realtime.util.js +10 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.d.ts +83 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.js +142 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +14 -0
- package/dist/utility/chart/effective-chart-session.util.js +39 -0
- package/dist/utility/chart/host-bar-placement.util.d.ts +28 -0
- package/dist/utility/chart/host-bar-placement.util.js +170 -30
- package/dist/utility/chart/index-host-tier.util.d.ts +3 -1
- package/dist/utility/chart/index-host-tier.util.js +7 -2
- package/dist/utility/chart/index-mode-admission.util.js +25 -11
- package/dist/utility/chart/kscript-apply-fingerprint.util.js +1 -1
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +6 -9
- package/dist/utility/chart/kscript-live-coalesce.util.js +8 -9
- package/dist/utility/chart/kscript-live-source-identity.util.d.ts +9 -0
- package/dist/utility/chart/kscript-live-source-identity.util.js +10 -1
- package/dist/utility/chart/kscript-provenance-keys.util.js +7 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +115 -21
- package/dist/utility/chart/kscript-venue-policy.util.js +194 -40
- package/dist/utility/chart/live-bucket.util.d.ts +24 -8
- package/dist/utility/chart/live-bucket.util.js +85 -27
- package/dist/utility/chart/marketKind.util.js +5 -0
- package/dist/utility/chart/mixed-mode.util.d.ts +7 -0
- package/dist/utility/chart/mixed-mode.util.js +14 -0
- package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +11 -16
- package/dist/utility/chart/opra-user-scripts-gate.util.js +12 -28
- package/dist/utility/chart/rth-session.util.d.ts +9 -8
- package/dist/utility/chart/rth-session.util.js +23 -20
- package/dist/utility/chart/trading-day.util.d.ts +17 -0
- package/dist/utility/chart/trading-day.util.js +59 -0
- package/dist/utility/chart/window-owner.leaf.d.ts +23 -2
- package/dist/utility/chart/window-owner.leaf.js +45 -3
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +33 -15
- package/dist/utility/chart/wrun-bar-session-facts.util.js +70 -20
- package/dist/utility/intl-locale.util.js +5 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
- package/dist/utility/v2/gate-plane.util.d.ts +12 -3
- package/dist/utility/v2/gate-plane.util.js +30 -4
- package/dist/utility/v2/gate-session-latch.util.js +1 -1
- package/dist/utility/v2/stocks-governed.util.d.ts +16 -0
- package/dist/utility/v2/stocks-governed.util.js +34 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +13 -0
- package/dist/utility/wrun/derived-roots.leaf.js +27 -0
- package/dist/utility/wrun/derived-roots.util.d.ts +1 -9
- package/dist/utility/wrun/derived-roots.util.js +3 -23
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +4 -3
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.d.ts +24 -3
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.js +46 -10
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +2 -0
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +63 -16
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +58 -14
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +34 -11
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +106 -30
- package/dist/utility/wrun/wrun-browser-sources.leaf.js +1 -2
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +7 -4
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +12 -8
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-color-settings.util.js +33 -0
- package/dist/utility/wrun/wrun-handles.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-handles.util.js +9 -8
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +68 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +163 -7
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +59 -23
- package/dist/utility/wrun/wrun-leg-close.util.js +186 -28
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +26 -12
- package/dist/utility/wrun/wrun-live-intake.util.js +219 -155
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +9 -5
- package/dist/utility/wrun/wrun-live-tick.util.js +130 -94
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-market-facts.util.js +13 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +20 -10
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +10 -5
- package/dist/utility/wrun/wrun-option-book-rows.util.d.ts +56 -0
- package/dist/utility/wrun/wrun-option-book-rows.util.js +96 -0
- package/dist/utility/wrun/wrun-option-views.util.d.ts +281 -20
- package/dist/utility/wrun/wrun-option-views.util.js +391 -50
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-options-chain.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +15 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +13 -3
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +3 -1
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +60 -11
- package/dist/utility/wrun/wrun-overlay-run.util.js +529 -113
- package/dist/utility/wrun/wrun-panel-mount.util.js +51 -6
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +15 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.js +27 -3
- package/dist/utility/wrun/wrun-refusal.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-refusal.util.js +22 -0
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-registry-errors.util.js +34 -0
- package/dist/utility/wrun/wrun-replay-lane.util.js +3 -2
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-run-interval-session.util.js +22 -7
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +39 -7
- package/dist/utility/wrun/wrun-run-interval.util.js +49 -9
- package/dist/utility/wrun/wrun-socket-row-source.js +7 -2
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +29 -22
- package/dist/utility/wrun/wrun-source-rows.util.js +62 -41
- package/dist/utility/wrun/wrun-tape-per-order.util.js +1 -20
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +17 -9
- package/dist/utility/wrun/wrun-tape-source.util.js +20 -12
- package/dist/workers/constants/socket-slots.d.ts +91 -6
- package/dist/workers/constants/socket-slots.js +85 -6
- package/package.json +11 -11
- package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +0 -56
- package/dist/kscript-data/controls/live-trades-order-gate.util.js +0 -107
|
@@ -29,7 +29,7 @@ const TABLES_JSON_CAP = 64;
|
|
|
29
29
|
// No class fields: this module rides into the kScript worker's ENTRY chunk, and a
|
|
30
30
|
// lowered field puts the bundler's defineProperty helper there for the lazy engine
|
|
31
31
|
// chunk to import back, which WebKit answers by evaluating the entry twice
|
|
32
|
-
// (
|
|
32
|
+
// (build/vite-plugins/worker-entry-reimport-guard.ts).
|
|
33
33
|
class Fnv {
|
|
34
34
|
constructor() {
|
|
35
35
|
this.h = FNV_OFFSET;
|
|
@@ -18,19 +18,16 @@ export declare function noteLocalKScriptHiddenHold(): void;
|
|
|
18
18
|
export declare function noteLocalKScriptHiddenRun(): void;
|
|
19
19
|
export declare function getLocalKScriptHiddenHoldStats(): LocalKScriptHiddenHoldStats;
|
|
20
20
|
export declare function shouldAccumulateV2LiveDataPoints(sourceType: unknown): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* The size floor a raw TRADE print must clear to fold into ANY `trades`
|
|
23
|
-
* source of an engine: the smallest declared minSize (0 when a source has
|
|
24
|
-
* none). Applied at intake, before the pending queue, so a busy feed's small
|
|
25
|
-
* prints cannot push a qualifying print out of the 1,024-message window. On a
|
|
26
|
-
* tape judged per aggressor order (wrun-tape-per-order.util `wrunTapePerOrder`)
|
|
27
|
-
* the fan-out judges it per order instead (live-trades-order-gate.util), so the
|
|
28
|
-
* small fills of an order that reached it still fold.
|
|
29
|
-
*/
|
|
21
|
+
/** The smallest trades minSize, applied before the queue so small prints never push a qualifying one out of the window. */
|
|
30
22
|
export declare function v2LiveTradesSizeFloor(snapshots: ReadonlyArray<{
|
|
31
23
|
sourceType?: string;
|
|
32
24
|
payload?: unknown;
|
|
33
25
|
}> | undefined): number;
|
|
26
|
+
/** The router hands both trades channels to every trades source: queue a frame only for a source of its channel. */
|
|
27
|
+
export declare function v2LiveTradesSourcesReadChannel(snapshots: ReadonlyArray<{
|
|
28
|
+
sourceType?: string;
|
|
29
|
+
payload?: unknown;
|
|
30
|
+
}> | undefined, large: boolean): boolean;
|
|
34
31
|
/** True when a live trade message carries a print below `floor` (a non-print message never is). The print is read on
|
|
35
32
|
* either case the fold reads (live-trades-merge.util `liveTradeOfPoint`: the raw TRADE `trade`, the TRADE_LARGE
|
|
36
33
|
* `tradeLarge`), so the floor never passes a print the fold would judge. */
|
|
@@ -38,15 +38,7 @@ export function getLocalKScriptHiddenHoldStats() {
|
|
|
38
38
|
export function shouldAccumulateV2LiveDataPoints(sourceType) {
|
|
39
39
|
return !(typeof sourceType === 'string' && sourceType.toLowerCase() === 'orderbook');
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
42
|
-
* The size floor a raw TRADE print must clear to fold into ANY `trades`
|
|
43
|
-
* source of an engine: the smallest declared minSize (0 when a source has
|
|
44
|
-
* none). Applied at intake, before the pending queue, so a busy feed's small
|
|
45
|
-
* prints cannot push a qualifying print out of the 1,024-message window. On a
|
|
46
|
-
* tape judged per aggressor order (wrun-tape-per-order.util `wrunTapePerOrder`)
|
|
47
|
-
* the fan-out judges it per order instead (live-trades-order-gate.util), so the
|
|
48
|
-
* small fills of an order that reached it still fold.
|
|
49
|
-
*/
|
|
41
|
+
/** The smallest trades minSize, applied before the queue so small prints never push a qualifying one out of the window. */
|
|
50
42
|
export function v2LiveTradesSizeFloor(snapshots) {
|
|
51
43
|
let floor = Number.POSITIVE_INFINITY;
|
|
52
44
|
let any = false;
|
|
@@ -59,6 +51,13 @@ export function v2LiveTradesSizeFloor(snapshots) {
|
|
|
59
51
|
}
|
|
60
52
|
return any && Number.isFinite(floor) ? floor : 0;
|
|
61
53
|
}
|
|
54
|
+
/** The router hands both trades channels to every trades source: queue a frame only for a source of its channel. */
|
|
55
|
+
export function v2LiveTradesSourcesReadChannel(snapshots, large) {
|
|
56
|
+
if (snapshots === undefined)
|
|
57
|
+
return true;
|
|
58
|
+
return snapshots.some((snapshot) => snapshot.sourceType === 'trades' &&
|
|
59
|
+
(snapshot.payload?.large === true) === large);
|
|
60
|
+
}
|
|
62
61
|
/** True when a live trade message carries a print below `floor` (a non-print message never is). The print is read on
|
|
63
62
|
* either case the fold reads (live-trades-merge.util `liveTradeOfPoint`: the raw TRADE `trade`, the TRADE_LARGE
|
|
64
63
|
* `tradeLarge`), so the floor never passes a print the fold would judge. */
|
|
@@ -49,6 +49,11 @@ export type KScriptLiveSourceIdentityContext = {
|
|
|
49
49
|
* sources, the coalesce key and the ring keep the wire identity.
|
|
50
50
|
*/
|
|
51
51
|
leadAliasSymbol?: string;
|
|
52
|
+
/** The chart's tape market, offered for any frame type to a run-market source a run may read; never rewrites the frame. */
|
|
53
|
+
marketAlias?: {
|
|
54
|
+
exchange: string;
|
|
55
|
+
symbol: string;
|
|
56
|
+
};
|
|
52
57
|
};
|
|
53
58
|
/**
|
|
54
59
|
* Does a source payload's (resolved) identity accept a live message with the
|
|
@@ -86,6 +91,10 @@ export declare function findAllMatchingKScriptLiveSourceSnapshots<T extends KScr
|
|
|
86
91
|
symbol?: string;
|
|
87
92
|
};
|
|
88
93
|
leadAliasSymbol?: string;
|
|
94
|
+
marketAlias?: {
|
|
95
|
+
exchange: string;
|
|
96
|
+
symbol: string;
|
|
97
|
+
};
|
|
89
98
|
includeData?: boolean;
|
|
90
99
|
}): KScriptLiveSourceMatch<T>[];
|
|
91
100
|
/**
|
|
@@ -66,6 +66,14 @@ export function matchKScriptLiveSourcePayloadIdentity(payload, context) {
|
|
|
66
66
|
const sourceExchange = resolveKScriptSourceIdentityValue(rawExchange, context.chartMetadata?.exchange);
|
|
67
67
|
const expectedSymbol = context.incomingSymbol ?? context.chartMetadata?.symbol;
|
|
68
68
|
const expectedExchange = context.incomingExchange ?? context.chartMetadata?.exchange;
|
|
69
|
+
const alias = context.marketAlias;
|
|
70
|
+
if (alias !== undefined &&
|
|
71
|
+
context.incomingExchange === alias.exchange &&
|
|
72
|
+
context.incomingSymbol === alias.symbol &&
|
|
73
|
+
sourceExchange === context.chartMetadata?.exchange &&
|
|
74
|
+
sourceSymbol === context.chartMetadata?.symbol) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
69
77
|
if (sourceSymbol &&
|
|
70
78
|
expectedSymbol &&
|
|
71
79
|
sourceSymbol !== expectedSymbol &&
|
|
@@ -86,7 +94,7 @@ export function matchKScriptLiveSourcePayloadIdentity(payload, context) {
|
|
|
86
94
|
* requested.
|
|
87
95
|
*/
|
|
88
96
|
export function findAllMatchingKScriptLiveSourceSnapshots(args) {
|
|
89
|
-
const { snapshots, sourceType, incomingExchange, incomingSymbol, chartMetadata, leadAliasSymbol, includeData = true, } = args;
|
|
97
|
+
const { snapshots, sourceType, incomingExchange, incomingSymbol, chartMetadata, leadAliasSymbol, marketAlias, includeData = true, } = args;
|
|
90
98
|
if (!Array.isArray(snapshots))
|
|
91
99
|
return [];
|
|
92
100
|
return snapshots
|
|
@@ -98,6 +106,7 @@ export function findAllMatchingKScriptLiveSourceSnapshots(args) {
|
|
|
98
106
|
incomingSymbol,
|
|
99
107
|
chartMetadata,
|
|
100
108
|
leadAliasSymbol,
|
|
109
|
+
marketAlias,
|
|
101
110
|
});
|
|
102
111
|
})
|
|
103
112
|
.filter((source) => Boolean(source.sourceName))
|
|
@@ -56,6 +56,13 @@ export const KSCRIPT_RESERVED_PROVENANCE_KEYS = new Set([
|
|
|
56
56
|
// (options-overlay-provenance.util): the hosted chart read and the MCP
|
|
57
57
|
// withhold an overlay by it, so a same-named input must never clear it.
|
|
58
58
|
'metaExchange',
|
|
59
|
+
// The CME provenance stamp of a CME user study (`'CME'`), written on both
|
|
60
|
+
// settings copies when the fetch door admits a CME payload to a user run
|
|
61
|
+
// (Door C) and before the engine is created on a CME chart (Door B): the
|
|
62
|
+
// chart read and the MCP withhold the study by it, the mounted view reads it
|
|
63
|
+
// as a plane script and the console marks its output, so a same-named input
|
|
64
|
+
// must never clear it.
|
|
65
|
+
'metaCmeExchange',
|
|
59
66
|
]);
|
|
60
67
|
export function isReservedKScriptProvenanceKey(name) {
|
|
61
68
|
return typeof name === 'string' && KSCRIPT_RESERVED_PROVENANCE_KEYS.has(name);
|
|
@@ -29,7 +29,9 @@ export interface KScriptStandInRow {
|
|
|
29
29
|
}
|
|
30
30
|
export type KScriptStandInWriteOutcome = 'written' | 'throttled' | 'no-row' | 'no-key' | 'no-candles' | 'no-rows' | 'not-live-edge' | 'not-template' | 'incomplete'
|
|
31
31
|
/** A whole write stamped older than the one the key already holds or has queued: the newer picture stays. */
|
|
32
|
-
| 'stamp-older'
|
|
32
|
+
| 'stamp-older'
|
|
33
|
+
/** A wrun row's run bars ride the CME session lattice (a coarser interval than the chart's there): never stored. */
|
|
34
|
+
| 'run-interval' | `ineligible:${string}`;
|
|
33
35
|
/**
|
|
34
36
|
* Why a row's wrun identity names no package a stand-in can key, or null (also for a row with no
|
|
35
37
|
* wrun identity at all): a draft is the author's session-only run, a dev-local run serves bytes no
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CME
|
|
3
|
-
*
|
|
2
|
+
* CME governed market data feeds first-party display features by default:
|
|
3
|
+
* user-authored kScript scripts must not consume it, while the built-in
|
|
4
4
|
* technical scripts, the converted-script corpus and OpenMarket's own official
|
|
5
|
-
* Indicator packages (all first-party) keep working. The
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
5
|
+
* Indicator packages (all first-party) keep working. The CME plane has its own
|
|
6
|
+
* gate, `cme-user-scripts` (cme-user-scripts-gate.util): while it is open (the
|
|
7
|
+
* flag lit AND the viewer entitled to CME data), a user run the browser
|
|
8
|
+
* executes reads CME like a first-party one (`isCmeUserScriptRun`, ONE
|
|
9
|
+
* decision for the display wall, the data wall and the engine policy), the
|
|
10
|
+
* browser lane only: never a hosted (Cloud) run or a protected script, and
|
|
11
|
+
* never read server-side (kscript-backend denies CME to every user run
|
|
12
|
+
* whatever the gate says). The OPRA licence (US equity and index options) covers
|
|
13
|
+
* user-authored scripting too, in the browser and on OpenMarket's servers
|
|
14
|
+
* (Kyle 2026-10-27, the signed set), behind the `opra-user-scripts` flag:
|
|
15
|
+
* while it is lit, a user run the browser executes reads OPRA like a
|
|
16
|
+
* first-party one (`isOpraUserScriptRun`, the same three doors). The US stocks
|
|
17
|
+
* tape is open to user-authored indicators too, in the browser and on the
|
|
18
|
+
* cloud lane (Kyle 2026-10-29), on the tapes STOCKS_TAPE_SCRIPTING_VENUES
|
|
19
|
+
* lists, the one compliance switch (`isStocksTapeReadableKScriptRun`); a tape
|
|
20
|
+
* it leaves out (NASDAQ_TAPE until the UTP derived-data answer) stays
|
|
21
|
+
* first-party only. Each plane reads its own gate alone: no plane's decision
|
|
22
|
+
* opens another. The data tier belongs to the viewer, never to the script: the
|
|
23
|
+
* browser lane reads through the viewer's own gate sockets. This module is the
|
|
24
|
+
* single decider for every plane.
|
|
14
25
|
* Every run door (add, mount, protected fetch, cache paint, alerts arm,
|
|
15
26
|
* editor Run), the per-payload data guard in titan-charts dataFetch, and the
|
|
16
27
|
* engine policy descriptor consult it; nothing else may re-derive provenance
|
|
@@ -91,7 +102,7 @@ export declare function isOfficialWrunOverlay(settings: KScriptProvenanceSetting
|
|
|
91
102
|
export declare function resolveKScriptRunProvenance(settings: KScriptProvenanceSettingsLike | null | undefined): KScriptRunProvenance;
|
|
92
103
|
export declare function isFirstPartyKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
93
104
|
/**
|
|
94
|
-
* A user run the browser executes (`
|
|
105
|
+
* A user run the browser executes (`userRunLane` `browser`): neither a hosted Cloud run nor a protected script,
|
|
95
106
|
* which run on a server lane that reads governed data through its own gate identity (UW-PARITY H3), so a browser flag
|
|
96
107
|
* never opens a plane to them. The runs the `opra-user-scripts` flag opens the OPRA plane to (`isOpraUserScriptRun`);
|
|
97
108
|
* read without the flag where a door must know a decision waits on it (the flag's hydration).
|
|
@@ -134,13 +145,75 @@ export declare function isOpraUserScriptRun(settings: KScriptProvenanceSettingsL
|
|
|
134
145
|
/** Whether a run may consume the OPRA plane's data: every first-party run, and a user run the flag opened it to
|
|
135
146
|
* (`isOpraUserScriptRun`; `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
|
|
136
147
|
export declare function isOpraReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Whether a run may read a US stocks tape open to user scripting (`STOCKS_TAPE_SCRIPTING_VENUES`): every first-party
|
|
150
|
+
* run, a user run the browser executes and a hosted (Cloud) user run (`userRunLane`), the lanes Kyle opened on
|
|
151
|
+
* 2026-10-29, like OPRA since its launch and on the cloud lane too. A protected script keeps its lane's rule: the
|
|
152
|
+
* engine lane has no actor path, so a user's protected script stays refused as on every gate plane. The tier is the
|
|
153
|
+
* gate's per socket (delayed 905 s for everyone today), never the script's, and no alert reads the tape whatever this
|
|
154
|
+
* answers (opra-alert-door.util `stocks-closed`). A tape the list leaves out never reads this: it stays first-party
|
|
155
|
+
* only.
|
|
156
|
+
*/
|
|
157
|
+
export declare function isStocksTapeReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* A user run the browser executes (`userRunLane` `browser`, the OPRA plane's candidate too): the runs the
|
|
160
|
+
* `cme-user-scripts` gate opens the CME plane to (`isCmeUserScriptRun`). A hosted (Cloud) record and a protected script
|
|
161
|
+
* never qualify, whatever the gate says: CME chart studies run in the browser alone, and the server
|
|
162
|
+
* lanes deny CME to every user run. Read without the gate where a door must know a decision waits on it (the flag's
|
|
163
|
+
* hydration, the lifecycle that stops a running study).
|
|
164
|
+
*/
|
|
165
|
+
export declare function isCmeUserScriptCandidate(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Whether the CME plane is open to this user run. The ONE decision every CME door reads, directly or through the walls
|
|
168
|
+
* below: the display wall, the data wall (the dataFetch door, the protected pre-flight, the cache paint) and the engine
|
|
169
|
+
* policy. The OPRA plane never reads it.
|
|
170
|
+
*
|
|
171
|
+
* Open to a browser user run (`isCmeUserScriptCandidate`) while the `cme-user-scripts` gate is open: the flag lit AND
|
|
172
|
+
* the viewer entitled to CME data (cme-user-scripts-gate.util, both read live). The tier follows the viewer, never the
|
|
173
|
+
* run: the browser lane reads through the viewer's own gate sockets. The gate is read first: while it is closed (the
|
|
174
|
+
* default, and every worker, guest and store-less context) no record is read at all.
|
|
175
|
+
*/
|
|
176
|
+
export declare function isCmeUserScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
177
|
+
/** Whether a run may consume the CME plane's data: every first-party run, and a user run the `cme-user-scripts` gate
|
|
178
|
+
* opened it to (`isCmeUserScriptRun`). */
|
|
179
|
+
export declare function isCmeReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
180
|
+
/** The words a door shows a user run the CME wall refuses (web locale keys, `cmeUserScriptWallKey`), and the
|
|
181
|
+
* lifecycle's words for a study a closing gate stopped in place, its source kept (`CME_STUDY_STOPPED_KEY`: the
|
|
182
|
+
* viewer's access moved; `CME_STUDIES_OFF_KEY`: the flag went dark). */
|
|
183
|
+
export declare const CME_USER_SCRIPT_WALL_KEY = "indicators.errors.CME_USER_SCRIPT_NOT_SUPPORTED";
|
|
184
|
+
export declare const CME_CLOUD_WALL_KEY = "indicators.cme.cloudNotSupported";
|
|
185
|
+
export declare const CME_ENTITLEMENT_REQUIRED_KEY = "indicators.cme.termsRequired";
|
|
186
|
+
export declare const CME_STUDY_STOPPED_KEY = "indicators.cme.studyStopped";
|
|
187
|
+
export declare const CME_STUDIES_OFF_KEY = "indicators.cme.studiesOff";
|
|
188
|
+
export type CmeUserScriptWallKey = typeof CME_USER_SCRIPT_WALL_KEY | typeof CME_CLOUD_WALL_KEY | typeof CME_ENTITLEMENT_REQUIRED_KEY;
|
|
189
|
+
/**
|
|
190
|
+
* The words every door that refuses a user run on CME shows (the add toast, Door A; the chip, Door H; the editor's
|
|
191
|
+
* Run), picked by the run's lane like `opraContractChartWallKey`. While the flag is dark every lane reads today's words
|
|
192
|
+
* (`CME_USER_SCRIPT_WALL_KEY`): the feature does not exist for that viewer, so no door names a browser lane it cannot
|
|
193
|
+
* offer. Under a lit flag a hosted (Cloud) record or a protected script has no CME path (`CME_CLOUD_WALL_KEY`: CME chart
|
|
194
|
+
* studies run in the browser), and a run the browser executes is refused only for the viewer's
|
|
195
|
+
* entitlement (`CME_ENTITLEMENT_REQUIRED_KEY`: the CME data terms). A first-party run is never this wall's (the doors
|
|
196
|
+
* word the curation themselves) and reads today's words. Words only: whether the door opens is the walls' decision
|
|
197
|
+
* (`isKScriptDisplayBlockedOnExchange`, `isCmeReadableKScriptRun`).
|
|
198
|
+
*/
|
|
199
|
+
export declare function cmeUserScriptWallKey(settings: KScriptProvenanceSettingsLike | null | undefined): CmeUserScriptWallKey;
|
|
137
200
|
/** Whether a source exchange touches a CME-governed venue (the CME-only curation and copy). */
|
|
138
201
|
export declare function payloadTouchesCmeVenue(exchange: unknown): boolean;
|
|
139
202
|
/** Whether a source exchange touches the OPRA options plane (an explicit OPRA leg on any chart included). */
|
|
140
203
|
export declare function payloadTouchesOpraVenue(exchange: unknown): boolean;
|
|
204
|
+
/** Whether a payload names a US stocks tape venue (NYSE_TAPE, NYSE_ARCA_TAPE, NASDAQ_TAPE: the stocks gate's plane;
|
|
205
|
+
* a listing venue's plain code, NASDAQ, is the free lane and never one). */
|
|
206
|
+
export declare function payloadTouchesStocksTapeVenue(exchange: unknown): boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Whether a payload names a US stocks tape still closed to user scripting: NASDAQ_TAPE (Tape C) until the UTP
|
|
209
|
+
* derived-data answer adds it to STOCKS_TAPE_SCRIPTING_VENUES. Every user run is refused there, as on CME; the provenance-blind
|
|
210
|
+
* doors (the editor's paused Run) read it beside the CME predicate.
|
|
211
|
+
*/
|
|
212
|
+
export declare function payloadTouchesClosedStocksTapeVenue(exchange: unknown): boolean;
|
|
141
213
|
/**
|
|
142
214
|
* Whether a source exchange (string or the multi-exchange array form) touches
|
|
143
|
-
* a governed venue on any gate plane (CME futures, OPRA options
|
|
215
|
+
* a governed venue on any gate plane (CME futures, OPRA options, the US
|
|
216
|
+
* stocks tape).
|
|
144
217
|
* Deliberately NOT governed-route.util's isGovernedExchange /
|
|
145
218
|
* isGovernedReaderPayload: their array form uses .every() because that is
|
|
146
219
|
* ROUTING semantics (a mixed multi-exchange metadata query must keep the
|
|
@@ -155,9 +228,14 @@ export declare function payloadTouchesGovernedVenue(exchange: unknown): boolean;
|
|
|
155
228
|
* first-party officials legitimately pass. The OPERATIONAL doors (add, mount,
|
|
156
229
|
* teardown, resubscribe, self-heal, suite/layout/copy apply) consult
|
|
157
230
|
* isKScriptDisplayBlockedOnExchange below instead, which is a strict superset
|
|
158
|
-
* of this predicate. Per plane: a CME leg blocks
|
|
159
|
-
*
|
|
160
|
-
* (`
|
|
231
|
+
* of this predicate. Per plane, each by its own decision: a CME leg blocks a
|
|
232
|
+
* user run unless the `cme-user-scripts` gate opened the plane to it
|
|
233
|
+
* (`isCmeReadableKScriptRun`); an OPRA leg blocks a user run unless the
|
|
234
|
+
* `opra-user-scripts` flag opened the plane to it (`isOpraReadableKScriptRun`);
|
|
235
|
+
* a US stocks tape leg blocks a protected user script on a tape open to user
|
|
236
|
+
* scripting (`isStocksTapeReadableKScriptRun`) and every user run on a tape
|
|
237
|
+
* still closed to it (NASDAQ_TAPE). A mixed payload is served only when every
|
|
238
|
+
* plane it touches is open to the run.
|
|
161
239
|
*/
|
|
162
240
|
export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
163
241
|
/**
|
|
@@ -186,12 +264,19 @@ export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settin
|
|
|
186
264
|
* the add route mounts on a governed venue; a twin of any other built-in
|
|
187
265
|
* carried there (an in-place symbol switch, a restore, a paste or copy) is
|
|
188
266
|
* blocked. User-provenance
|
|
189
|
-
* runs are never venue-approved, so this is a strict superset
|
|
190
|
-
* isUserKScriptBlockedOnExchange. Fail-closed both ways: an unrecognized
|
|
267
|
+
* runs are never venue-approved by the curation, so this is a strict superset
|
|
268
|
+
* of isUserKScriptBlockedOnExchange. Fail-closed both ways: an unrecognized
|
|
191
269
|
* official blocks, and provenance spoofing via script-input names is already
|
|
192
270
|
* neutralized upstream by KSCRIPT_RESERVED_PROVENANCE_KEYS (a spoofed run
|
|
193
271
|
* classifies 'user' and is never approved regardless of claimed keys).
|
|
194
272
|
*
|
|
273
|
+
* CME user studies: a user run the `cme-user-scripts` gate opened the CME
|
|
274
|
+
* plane to (`isCmeUserScriptRun`, the data wall's own per-plane verdict, so
|
|
275
|
+
* the two walls read one decision) draws on a CME chart, and the curation
|
|
276
|
+
* never applies to it: the official allow-list is CME evidence for
|
|
277
|
+
* first-party docs alone, never a list a user run must join. A hosted (Cloud)
|
|
278
|
+
* record and a protected script stay blocked on CME whatever the gate says.
|
|
279
|
+
*
|
|
195
280
|
* OPRA (no CME leg): every first-party run is explicitly venue-approved, the
|
|
196
281
|
* built-ins, the converted corpus, the official docs and the official
|
|
197
282
|
* packages alike, and every user run is blocked unless the
|
|
@@ -201,6 +286,12 @@ export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settin
|
|
|
201
286
|
* blocked on an OPRA contract chart either way. The CME per-script curation
|
|
202
287
|
* is CME evidence and does not apply there; a book-reading official is
|
|
203
288
|
* refused by the options mode (OPRA has no book), not by this wall.
|
|
289
|
+
*
|
|
290
|
+
* The US stocks tape (no CME leg) follows the data wall the same way: every
|
|
291
|
+
* first-party run is venue-approved, a user run in the browser or on the cloud
|
|
292
|
+
* lane draws on a tape open to user scripting (STOCKS_TAPE_SCRIPTING_VENUES),
|
|
293
|
+
* and a protected user script, or any user run on a tape still closed to user
|
|
294
|
+
* scripting (NASDAQ_TAPE), is blocked. The CME curation does not apply there either.
|
|
204
295
|
*/
|
|
205
296
|
export declare function isKScriptDisplayBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
|
|
206
297
|
/**
|
|
@@ -224,9 +315,12 @@ export declare function shouldBlockKScriptSourcePayload(args: {
|
|
|
224
315
|
* engine: first-party runs get no engine policy at all; user runs get the
|
|
225
316
|
* governed set of every gate plane as deniedExchanges once the engine pin
|
|
226
317
|
* supports it, so a user script on a crypto chart cannot pull an explicit
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
318
|
+
* governed source either, less each plane open to the run, by that plane's
|
|
319
|
+
* own decision: the OPRA plane when the `opra-user-scripts` flag opened it
|
|
320
|
+
* (`isOpraUserScriptRun`), the CME family when the `cme-user-scripts` gate
|
|
321
|
+
* opened it (`isCmeUserScriptRun`). The closed tapes (the stocks tapes
|
|
322
|
+
* STOCKS_TAPE_SCRIPTING_VENUES leaves out) stay in every user run's set; the
|
|
323
|
+
* tapes open to user scripting are in no user run's set.
|
|
230
324
|
*/
|
|
231
325
|
export interface KScriptDataAccessPolicyDescriptor {
|
|
232
326
|
governedExchanges: readonly string[];
|