@orangecharts/wrun-chart-host 0.6.0 → 0.7.1
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 +14 -5
- package/dist/constants/marketCapabilities.constants.d.ts +5 -0
- package/dist/constants/marketCapabilities.constants.js +16 -0
- package/dist/host-ports.types.d.ts +35 -3
- package/dist/index.d.ts +11 -1
- package/dist/index.js +11 -1
- package/dist/indicators/controls/tpo-session.util.js +42 -18
- package/dist/market-data/billing.interface.d.ts +2 -1
- package/dist/settings-templates/index.d.ts +2 -0
- package/dist/settings-templates/index.js +19 -5
- package/dist/settings-templates/indicator-fields.d.ts +2 -0
- package/dist/settings-templates/indicator-fields.js +10 -0
- package/dist/settings-templates/tool-rules.d.ts +12 -2
- package/dist/settings-templates/tool-rules.js +9 -2
- package/dist/settings-templates/tool-tables.generated.js +9 -0
- package/dist/utility/chart/crypto-index.leaf.d.ts +16 -0
- package/dist/utility/chart/crypto-index.leaf.js +19 -0
- package/dist/utility/chart/index-mode-admission.util.js +9 -1
- package/dist/utility/chart/index-mode.util.d.ts +11 -5
- package/dist/utility/chart/index-mode.util.js +22 -10
- package/dist/utility/chart/kscript-source-answer-budget.leaf.d.ts +36 -0
- package/dist/utility/chart/kscript-source-answer-budget.leaf.js +39 -0
- package/dist/utility/chart/kscript-source-degrade.leaf.d.ts +38 -1
- package/dist/utility/chart/kscript-source-degrade.leaf.js +39 -1
- package/dist/utility/chart/live-bucket.util.d.ts +2 -1
- package/dist/utility/chart/live-bucket.util.js +47 -15
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +15 -1
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +9 -0
- package/dist/utility/chart/market-session-schedule.util.d.ts +3 -1
- package/dist/utility/chart/market-session-schedule.util.js +24 -2
- package/dist/utility/chart/marketKind.util.d.ts +12 -7
- package/dist/utility/chart/marketKind.util.js +15 -5
- package/dist/utility/chart/ny-calendar.util.d.ts +104 -0
- package/dist/utility/chart/ny-calendar.util.js +346 -0
- package/dist/utility/chart/om-panel.util.d.ts +14 -2
- package/dist/utility/chart/om-panel.util.js +108 -40
- package/dist/utility/chart/rth-session.util.d.ts +10 -7
- package/dist/utility/chart/rth-session.util.js +17 -22
- package/dist/utility/chart/trading-day.util.js +90 -18
- package/dist/utility/chart/us-equities-session.util.js +20 -67
- package/dist/utility/chart/wrun-bar-session-facts.util.js +14 -1
- package/dist/utility/common/time.util.d.ts +7 -1
- package/dist/utility/common/time.util.js +11 -41
- package/dist/utility/number-format.util.d.ts +17 -7
- package/dist/utility/number-format.util.js +18 -8
- package/dist/utility/options/option-symbol.util.js +13 -2
- package/dist/utility/symbol-selection/contract-expiry.util.js +9 -1
- package/dist/utility/watchlist/import/import-request.leaf.d.ts +4 -1
- package/dist/utility/watchlist/import/import-request.leaf.js +5 -2
- package/dist/utility/watchlist/import/tradingview-symbols.leaf.d.ts +25 -4
- package/dist/utility/watchlist/import/tradingview-symbols.leaf.js +62 -4
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +19 -0
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +57 -0
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +23 -0
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +90 -0
- package/dist/utility/wrun/run-schedule/wrun-lane-groups.util.d.ts +39 -0
- package/dist/utility/wrun/run-schedule/wrun-lane-groups.util.js +60 -0
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +77 -0
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +195 -0
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.d.ts +56 -0
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.js +70 -0
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +53 -0
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +239 -0
- package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +16 -0
- package/dist/utility/wrun/sources/lanes/option_stats_10m.js +14 -0
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +43 -18
- package/dist/utility/wrun/sources/lanes/options_flow.js +209 -72
- package/dist/utility/wrun/sources/lanes/token_supply.js +5 -31
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -18
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +12 -57
- package/dist/utility/wrun/sources/row-lane-registry.d.ts +1 -1
- package/dist/utility/wrun/sources/row-lane-registry.js +22 -8
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +61 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +103 -8
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +5 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +24 -12
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +55 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +95 -18
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +15 -1
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +23 -8
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +11 -11
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +14 -2
- package/dist/utility/wrun/sources/wrun-poll-lane.types.js +6 -3
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +43 -8
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +77 -11
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +31 -16
- package/dist/utility/wrun/sources/wrun-row-lane.types.js +2 -0
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +52 -12
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +110 -46
- package/dist/utility/wrun/wrun-browser-sources.leaf.d.ts +10 -0
- package/dist/utility/wrun/wrun-browser-sources.leaf.js +12 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +53 -18
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -0
- package/dist/utility/wrun/wrun-color-settings.util.js +45 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.js +14 -8
- package/dist/utility/wrun/wrun-failure-cause.d.ts +1 -1
- package/dist/utility/wrun/wrun-failure-cause.js +14 -0
- package/dist/utility/wrun/wrun-frames.js +6 -2
- package/dist/utility/wrun/wrun-host.service.d.ts +26 -18
- package/dist/utility/wrun/wrun-host.service.js +49 -52
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +1 -1
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +2 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +7 -4
- package/dist/utility/wrun/wrun-kit-run-tables.util.d.ts +24 -0
- package/dist/utility/wrun/wrun-kit-run-tables.util.js +87 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +2 -1
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +8 -2
- package/dist/utility/wrun/wrun-live-tick.util.js +35 -16
- package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +40 -13
- package/dist/utility/wrun/wrun-opra-flow.leaf.js +39 -12
- package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +70 -21
- package/dist/utility/wrun/wrun-option-contract-flow.util.js +257 -112
- package/dist/utility/wrun/wrun-option-prints.util.d.ts +62 -22
- package/dist/utility/wrun/wrun-option-prints.util.js +148 -46
- package/dist/utility/wrun/wrun-option-views.util.d.ts +262 -0
- package/dist/utility/wrun/wrun-option-views.util.js +356 -0
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +23 -2
- package/dist/utility/wrun/wrun-options-chain.util.js +37 -3
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +18 -3
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +32 -7
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +9 -3
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +146 -18
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +50 -6
- package/dist/utility/wrun/wrun-overlay-run.util.js +816 -243
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +5 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +28 -12
- package/dist/utility/wrun/wrun-pin-venues.util.js +4 -6
- package/dist/utility/wrun/wrun-present-bits.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-present-bits.util.js +39 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-refusal-surface.util.js +5 -4
- package/dist/utility/wrun/wrun-refusal.util.d.ts +66 -6
- package/dist/utility/wrun/wrun-refusal.util.js +335 -40
- package/dist/utility/wrun/wrun-source-rows.util.js +11 -0
- package/dist/utility/wrun/wrun-tier-grid.util.d.ts +28 -3
- package/dist/utility/wrun/wrun-tier-grid.util.js +79 -19
- package/dist/utility/wrun/wrun-transient-rerun.util.d.ts +14 -3
- package/dist/utility/wrun/wrun-transient-rerun.util.js +33 -8
- package/package.json +5 -5
- package/dist/utility/wrun/wrun-opra-underlying.util.d.ts +0 -12
- package/dist/utility/wrun/wrun-opra-underlying.util.js +0 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* reads it off a failure (wrun-refusal.util `wrunFailureCauseOf`) and carries it at `refusal.telemetry.cause`.
|
|
11
11
|
*/
|
|
12
12
|
import { type WrunServerAnswerRowId } from './wrun-hosted-wire-caps.js';
|
|
13
|
-
export declare const WRUN_FAILURE_CAUSES: readonly ["no-reply", "session-kicked", "connection-unavailable", "connection-lost", "dial-failed", "socket-stale", "worker-restarted", "chart-gone", "capability-unavailable", "request-timeout", "paging-incomplete", "aborted", "superseded", "access-denied", "session-expired", "backend-unavailable", "reply-unreadable", "worker-dead", "chunk-load", "network", "none", "other"];
|
|
13
|
+
export declare const WRUN_FAILURE_CAUSES: readonly ["no-reply", "session-kicked", "connection-unavailable", "connection-lost", "dial-failed", "socket-stale", "worker-restarted", "chart-gone", "capability-unavailable", "request-timeout", "paging-incomplete", "aborted", "superseded", "access-denied", "session-expired", "backend-unavailable", "reply-unreadable", "worker-dead", "chunk-load", "network", "package-withdrawn", "package-hosted", "compile-failed", "twin-declined", "integration-error", "source-budget", "source-failed", "source-declined", "none", "other"];
|
|
14
14
|
export type WrunFailureBaseCause = (typeof WRUN_FAILURE_CAUSES)[number];
|
|
15
15
|
/** A cloud answer's cause: `server:` and the answer-table row the frame matched. */
|
|
16
16
|
export type WrunFailureServerCause = `server:${WrunServerAnswerRowId}`;
|
|
@@ -31,6 +31,20 @@ export const WRUN_FAILURE_CAUSES = Object.freeze([
|
|
|
31
31
|
'worker-dead',
|
|
32
32
|
'chunk-load',
|
|
33
33
|
'network',
|
|
34
|
+
// What stopped a package before it ran (wrun-refusal.util `wrunLoaderFailureCauseOf`): the registry withdrew it (a
|
|
35
|
+
// resolve answered 404 or 410, a yanked version), its version runs on OpenMarket servers only, this device could not
|
|
36
|
+
// compile it, its built-in's twin declined, the chart's adapter refused its output. None is transient.
|
|
37
|
+
'package-withdrawn',
|
|
38
|
+
'package-hosted',
|
|
39
|
+
'compile-failed',
|
|
40
|
+
'twin-declined',
|
|
41
|
+
'integration-error',
|
|
42
|
+
// What the source ladder gave up on (the terminal `service-no-answer` record of a secondary source lane, after its
|
|
43
|
+
// two recovery rungs): the lane did not answer within its budget, its read failed, or its source declined the
|
|
44
|
+
// chart's market. None is transient: the ladder already asked again.
|
|
45
|
+
'source-budget',
|
|
46
|
+
'source-failed',
|
|
47
|
+
'source-declined',
|
|
34
48
|
'none',
|
|
35
49
|
'other',
|
|
36
50
|
]);
|
|
@@ -797,8 +797,12 @@ export function parseWrunPanelFrame(raw, slot, declaration) {
|
|
|
797
797
|
panel: { ...panel, id: 'wrun-frame' },
|
|
798
798
|
rows: frame.rows,
|
|
799
799
|
}, { lane: 'wrun' });
|
|
800
|
-
|
|
801
|
-
|
|
800
|
+
// A row refusal names the row and why (`invalid panel row 3: cell 4 is not ...`), so the one console line that
|
|
801
|
+
// reports a refused frame says which cell refused it.
|
|
802
|
+
if (!result.ok) {
|
|
803
|
+
const row = result.row === undefined ? '' : ` ${result.row.index}: ${result.row.reason}`;
|
|
804
|
+
return invalidWrunFrame(slot, `${result.rejectReason}${row}`);
|
|
805
|
+
}
|
|
802
806
|
if (isPanelClearFrame(result.data))
|
|
803
807
|
return invalidWrunFrame(slot, 'unexpected clear frame');
|
|
804
808
|
if (chrome.markets !== undefined && chrome.markets.length !== result.data.rows.length) {
|
|
@@ -55,14 +55,13 @@ import type { WrunIndicatorMetadata, WrunModuleHandle, WrunOutputRow } from '../
|
|
|
55
55
|
import { attachWrunLive, WrunLiveOrderError, wrunLiveOf } from '../../interfaces/wrun-runtime.interface.js';
|
|
56
56
|
import { type WrunInputRow } from './wrun-pack.util.js';
|
|
57
57
|
import { WrunWorkerPoisonError } from './wrun-registry-errors.util.js';
|
|
58
|
-
/** Sources the kit marks daemon-only
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
|
|
65
|
-
export declare function assertWrunBrowserSources(metadata: WrunIndicatorMetadata): Promise<void> | void;
|
|
58
|
+
/** Sources the kit marks daemon-only are computed by the daemon, which owns their dependencies: the first
|
|
59
|
+
* input declaring one refuses the browser run by name, with the kit's words for it. Synchronous: the
|
|
60
|
+
* table is the kit's, copied import-free (wrun-kit-run-tables.util, pinned to the kit's export by its
|
|
61
|
+
* kit-mirror spec), so no run loads the kit bundle on the main thread to read it (OPTLOAD g1 round 3:
|
|
62
|
+
* that read evaluated 3.6 MB of authoring code, 836 ms on a measured add, for a table the kit ships empty).
|
|
63
|
+
* The chart's own candle classes (`ohlcv`, `time`) are never daemon-only. */
|
|
64
|
+
export declare function assertWrunBrowserSources(metadata: WrunIndicatorMetadata): void;
|
|
66
65
|
/** One respawn of the shared worker per window (the kScript shared worker's
|
|
67
66
|
* `restartWithReseedBackoff` rule, sized for this host's 20 s run timeout
|
|
68
67
|
* instead of kScript's 90 s call timeouts): a second death inside the window
|
|
@@ -150,16 +149,25 @@ export declare class WrunBrowserHost {
|
|
|
150
149
|
* the first death, so the first spawn ever never opens a window. */
|
|
151
150
|
private lastRespawnAt;
|
|
152
151
|
private respawnHeldUntil;
|
|
153
|
-
/** Spin the sandbox worker
|
|
154
|
-
*
|
|
155
|
-
* the
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
|
|
152
|
+
/** Spin the sandbox worker (its script's fetch starts with the spawn) and
|
|
153
|
+
* load the shared host (the packer, the leg planner, the strategy
|
|
154
|
+
* resolver; the worker holds its own for the module rewrite) ahead of the
|
|
155
|
+
* first add or Run, so the first package a reader mounts pays neither the
|
|
156
|
+
* worker spawn nor the host's parse on its click. Never the authoring kit:
|
|
157
|
+
* no run reads it on this thread (the kit tables a run reads are
|
|
158
|
+
* import-free copies, wrun-kit-run-tables.util), and its 3.6 MB evaluation
|
|
159
|
+
* was the longest main-thread task of a measured first add (OPTLOAD g1
|
|
160
|
+
* round 3). The
|
|
161
|
+
* web app's signals reach it through one owner
|
|
162
|
+
* (src/utility/chart/demand-code-warm.util.ts: a surface's open, the
|
|
163
|
+
* intent toward it); the add door, a restored package and a row's settled
|
|
164
|
+
* intent call it beside their own loads. Idempotent; a load failure
|
|
165
|
+
* surfaces on the first module load or run as before. A held respawn is not
|
|
166
|
+
* warmed around: the window exists to keep the worker down. Resolves true
|
|
167
|
+
* once the host landed and the worker spawned, false when either failed, so
|
|
168
|
+
* the caller can tell a warm from a failed one (an intent's latch clears on
|
|
169
|
+
* false and the next intent asks again). Never throws, never rejects. */
|
|
170
|
+
warm(): Promise<boolean>;
|
|
163
171
|
/** The active quarantine of a package, if its hold is still running. */
|
|
164
172
|
quarantineOf(metadata: Pick<WrunIndicatorMetadata, 'id' | 'wasm_sha256'>): WrunHostQuarantine | undefined;
|
|
165
173
|
/** Forget every quarantine and the respawn window (specs only). */
|
|
@@ -55,41 +55,27 @@ import { ensureWrunChartHostSharedHost, wrunChartHostEnv } from '../../host-env.
|
|
|
55
55
|
import { abiAtLeast, attachWrunLive, WrunLiveOrderError, wrunLiveOf, wrunModuleKey, } from '../../interfaces/wrun-runtime.interface.js';
|
|
56
56
|
import { LOCAL_ENGINE_SELF_HEAL_RESET_GRACE_MS, localEngineSelfHealDelayMs, } from '../chart/local-engine-self-heal-backoff.util.js';
|
|
57
57
|
import { attachWrunStrategy, readWrunStrategySheet, wrunStrategyParamsOf } from './wrun-box-segment.util.js';
|
|
58
|
+
import { WRUN_DAEMON_ONLY_SOURCE_DISCLOSURES } from './wrun-kit-run-tables.util.js';
|
|
58
59
|
import { assertWrunSheetAbiCoupling, attachWrunDrawSkips, attachWrunHandles, readWrunHandleDefaults, } from './wrun-handles.util.js';
|
|
59
60
|
import { packWrunRows, unpackWrunResponse, wrunAbiVersion } from './wrun-pack.util.js';
|
|
60
61
|
import { WrunQuarantinedError, WrunWorkerPoisonError } from './wrun-registry-errors.util.js';
|
|
61
62
|
import { bindWrunHostLiveSeriesEnd } from './wrun-overlay-drivers.util.js';
|
|
62
|
-
/** Sources the kit marks daemon-only
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* shared host entry does not export it. */
|
|
63
|
+
/** Sources the kit marks daemon-only are computed by the daemon, which owns their dependencies: the first
|
|
64
|
+
* input declaring one refuses the browser run by name, with the kit's words for it. Synchronous: the
|
|
65
|
+
* table is the kit's, copied import-free (wrun-kit-run-tables.util, pinned to the kit's export by its
|
|
66
|
+
* kit-mirror spec), so no run loads the kit bundle on the main thread to read it (OPTLOAD g1 round 3:
|
|
67
|
+
* that read evaluated 3.6 MB of authoring code, 836 ms on a measured add, for a table the kit ships empty).
|
|
68
|
+
* The chart's own candle classes (`ohlcv`, `time`) are never daemon-only. */
|
|
69
69
|
export function assertWrunBrowserSources(metadata) {
|
|
70
|
-
const candidates = [];
|
|
71
70
|
for (const input of metadata.inputs) {
|
|
72
71
|
for (const source of [input.source, metadata.inputSources[input.name]?.source]) {
|
|
73
|
-
if (typeof source
|
|
74
|
-
|
|
72
|
+
if (typeof source !== 'string' || source === 'ohlcv' || source === 'time')
|
|
73
|
+
continue;
|
|
74
|
+
if (!Object.hasOwn(WRUN_DAEMON_ONLY_SOURCE_DISCLOSURES, source))
|
|
75
|
+
continue;
|
|
76
|
+
throw new Error(`Input '${input.name}' (${source}): ${WRUN_DAEMON_ONLY_SOURCE_DISCLOSURES[source]}`);
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
|
-
if (candidates.length === 0)
|
|
78
|
-
return;
|
|
79
|
-
return wrunChartHostEnv()
|
|
80
|
-
.transport.loadWrunKit()
|
|
81
|
-
.then(({ wrunIndicatorKit }) => {
|
|
82
|
-
const daemonOnlySources = wrunIndicatorKit.WRUN_DAEMON_ONLY_SOURCES;
|
|
83
|
-
if (!daemonOnlySources)
|
|
84
|
-
return;
|
|
85
|
-
for (const [name, source] of candidates) {
|
|
86
|
-
const disclosure = typeof daemonOnlySources.has === 'function'
|
|
87
|
-
? daemonOnlySources.has(source) && 'computed on your daemon, not in the tab'
|
|
88
|
-
: Reflect.get(daemonOnlySources, source);
|
|
89
|
-
if (typeof disclosure === 'string')
|
|
90
|
-
throw new Error(`Input '${name}' (${source}): ${disclosure}`);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
79
|
}
|
|
94
80
|
const WRUN_RUN_TIMEOUT_MS = 20_000;
|
|
95
81
|
/** One respawn of the shared worker per window (the kScript shared worker's
|
|
@@ -294,24 +280,41 @@ export class WrunBrowserHost {
|
|
|
294
280
|
* the first death, so the first spawn ever never opens a window. */
|
|
295
281
|
lastRespawnAt = null;
|
|
296
282
|
respawnHeldUntil = 0;
|
|
297
|
-
/** Spin the sandbox worker
|
|
298
|
-
*
|
|
299
|
-
* the
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
283
|
+
/** Spin the sandbox worker (its script's fetch starts with the spawn) and
|
|
284
|
+
* load the shared host (the packer, the leg planner, the strategy
|
|
285
|
+
* resolver; the worker holds its own for the module rewrite) ahead of the
|
|
286
|
+
* first add or Run, so the first package a reader mounts pays neither the
|
|
287
|
+
* worker spawn nor the host's parse on its click. Never the authoring kit:
|
|
288
|
+
* no run reads it on this thread (the kit tables a run reads are
|
|
289
|
+
* import-free copies, wrun-kit-run-tables.util), and its 3.6 MB evaluation
|
|
290
|
+
* was the longest main-thread task of a measured first add (OPTLOAD g1
|
|
291
|
+
* round 3). The
|
|
292
|
+
* web app's signals reach it through one owner
|
|
293
|
+
* (src/utility/chart/demand-code-warm.util.ts: a surface's open, the
|
|
294
|
+
* intent toward it); the add door, a restored package and a row's settled
|
|
295
|
+
* intent call it beside their own loads. Idempotent; a load failure
|
|
296
|
+
* surfaces on the first module load or run as before. A held respawn is not
|
|
297
|
+
* warmed around: the window exists to keep the worker down. Resolves true
|
|
298
|
+
* once the host landed and the worker spawned, false when either failed, so
|
|
299
|
+
* the caller can tell a warm from a failed one (an intent's latch clears on
|
|
300
|
+
* false and the next intent asks again). Never throws, never rejects. */
|
|
306
301
|
warm() {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
302
|
+
let workerSpawned = true;
|
|
303
|
+
try {
|
|
304
|
+
if (this.respawnHold() === null)
|
|
305
|
+
this.ensureWorker();
|
|
306
|
+
}
|
|
307
|
+
catch {
|
|
308
|
+
workerSpawned = false;
|
|
309
|
+
}
|
|
310
|
+
let hostLoading;
|
|
311
|
+
try {
|
|
312
|
+
hostLoading = wrunChartHostEnv().loadSharedHost();
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
hostLoading = Promise.reject(error);
|
|
316
|
+
}
|
|
317
|
+
return hostLoading.then(() => workerSpawned, () => false);
|
|
315
318
|
}
|
|
316
319
|
/** The active quarantine of a package, if its hold is still running. */
|
|
317
320
|
quarantineOf(metadata) {
|
|
@@ -450,9 +453,7 @@ export class WrunBrowserHost {
|
|
|
450
453
|
}
|
|
451
454
|
async runSeries(input) {
|
|
452
455
|
const lane = this.admit(input.metadata, input.overrideQuarantine);
|
|
453
|
-
|
|
454
|
-
if (sourceCheck)
|
|
455
|
-
await sourceCheck;
|
|
456
|
+
assertWrunBrowserSources(input.metadata);
|
|
456
457
|
// The packer and the strategy resolver read the shared host (loaded once, off the boot graph;
|
|
457
458
|
// a loaded host adds no await, so a warm run dispatches in the same task as before).
|
|
458
459
|
const hostLoading = ensureWrunChartHostSharedHost();
|
|
@@ -476,9 +477,7 @@ export class WrunBrowserHost {
|
|
|
476
477
|
* key (see the worker's ownership rule). */
|
|
477
478
|
async startLiveSeries(input) {
|
|
478
479
|
const lane = this.admit(input.metadata, input.overrideQuarantine);
|
|
479
|
-
|
|
480
|
-
if (sourceCheck)
|
|
481
|
-
await sourceCheck;
|
|
480
|
+
assertWrunBrowserSources(input.metadata);
|
|
482
481
|
// The packer and the strategy resolver read the shared host (loaded once, off the boot graph;
|
|
483
482
|
// a loaded host adds no await, so a warm run dispatches in the same task as before).
|
|
484
483
|
const hostLoading = ensureWrunChartHostSharedHost();
|
|
@@ -513,9 +512,7 @@ export class WrunBrowserHost {
|
|
|
513
512
|
* broker config rides the session, only the rows' broker feed ships). */
|
|
514
513
|
async runLiveRows(input) {
|
|
515
514
|
const lane = this.admit(input.metadata, input.overrideQuarantine);
|
|
516
|
-
|
|
517
|
-
if (sourceCheck)
|
|
518
|
-
await sourceCheck;
|
|
515
|
+
assertWrunBrowserSources(input.metadata);
|
|
519
516
|
// The packer and the strategy resolver read the shared host (loaded once, off the boot graph;
|
|
520
517
|
// a loaded host adds no await, so a warm run dispatches in the same task as before).
|
|
521
518
|
const hostLoading = ensureWrunChartHostSharedHost();
|
|
@@ -341,7 +341,7 @@ export declare function wrunFrameRefusalMemory(text: string): 'window' | 'identi
|
|
|
341
341
|
*/
|
|
342
342
|
export declare const WRUN_KIT_REFUSAL_STAGES: {
|
|
343
343
|
readonly validate: readonly ["wrun_abi_unsupported", "wrun_pin_venue_unknown", "wrun_sheet_over_cap", "wrun_abi_channel_missing", "wrun_intrabar_interval_required", "wrun_intrabar_primary", "wrun_candles_interval_required", "wrun_candles_primary", "wrun_options_chain_venue", "wrun_options_chain_expiries", "wrun_options_chain_market_pinned", "wrun_offset_needs_view", "wrun_offset_count_required", "wrun_bars_needs_leg", "wrun_chart_interval_below_needs_candles", "wrun_chart_interval_below_primary", "wrun_chart_interval_below_forming", "wrun_pin_venue_refused", "wrun_pin_symbol_literal", "wrun_tape_history_unavailable", "wrun_strategy_feed_not_ohlcv", "wrun_strategy_slippage_model_unsupported", "wrun_strategy_reserved_output", "wrun_tape_min_size_invalid", "wrun_option_knob_invalid", "wrun_option_market_pinned", "wrun_option_prints_min_premium_required", "wrun_options_flow_venue_field", "wrun_options_flow_venue_required", "wrun_options_flow_venue_scope", "wrun_oi_candles_interval_required", "wrun_oi_candles_primary", "wrun_volume_profile_candles_interval_required", "wrun_volume_profile_candles_primary"];
|
|
344
|
-
readonly plan: readonly ["wrun_options_coin_unknown", "wrun_source_unsupported", "wrun_not_in_10m_universe", "wrun_opra_lane_refused", "wrun_opra_official_only", "wrun_option_contract_flow_unsupported", "wrun_option_contract_state_unsupported", "wrun_option_daily_unsupported", "wrun_option_prints_one_acquisition", "wrun_option_prints_unsupported", "wrun_option_stats_10m_unsupported", "wrun_option_surface_unsupported", "wrun_options_flow_unsupported", "wrun_field_unsupported", "wrun_tenor_unsupported", "wrun_view_unsupported", "wrun_family_unsupported", "wrun_displacement_needs_cap", "wrun_options_chain_venue_unavailable", "wrun_options_chain_unavailable", "wrun_options_chain_one_venue", "wrun_lane_input_refused", "wrun_permission_denied", "wrun_coin_leg_unsupported", "wrun_coin_leg_unresolved", "wrun_pin_unsupported", "wrun_custom_interval_unsupported", "wrun_intrabar_leg_off_grid", "wrun_intrabar_ratio_over_cap", "wrun_intrabar_unsupported", "wrun_candles_bars_over_cap", "wrun_candles_ratio_over_cap", "wrun_oi_candles_unsupported", "wrun_volume_profile_candles_unsupported", "wrun_trade_volume_by_size_unsupported", "wrun_view_leg_off_grid", "wrun_view_leg_equal", "wrun_time_facts_unsupported", "wrun_etf_flow_unsupported", "wrun_volatility_index_unsupported", "wrun_long_short_ratio_unsupported", "wrun_options_oi_unsupported", "wrun_options_volume_unsupported", "wrun_ethena_positions_unsupported", "wrun_etf_holdings_unsupported", "wrun_etf_premium_unsupported", "wrun_economic_unsupported", "wrun_treasury_balance_unsupported", "wrun_bitfinex_funding_unsupported", "wrun_strategy_costs_in_sheet", "wrun_window_bars_invalid", "wrun_cells_unavailable", "wrun_tape_unavailable", "wrun_tape_interval_unsupported", "wrun_metric_source_missing_policy", "wrun_series_source_primary", "wrun_series_source_densification", "wrun_metric_pin_coarser_than_primary", "wrun_forming_primary_not_own_candles", "wrun_package_lock_invalid", "wrun_package_lock_missing", "wrun_package_not_installed", "wrun_package_lock_mismatch", "wrun_composition_cycle", "wrun_composition_depth", "wrun_options_chain_unsupported", "wrun_volume_profile_ticks_unsupported", "wrun_celled_metric_unsupported", "wrun_series_source_missing", "wrun_series_source_invalid", "wrun_params_invalid", "wrun_source_bindings_invalid", "wrun_output_displaced", "wrun_pin_unresolvable"];
|
|
344
|
+
readonly plan: readonly ["wrun_options_coin_unknown", "wrun_source_unsupported", "wrun_not_in_10m_universe", "wrun_opra_lane_refused", "wrun_opra_official_only", "wrun_option_contract_flow_unsupported", "wrun_option_contract_state_unsupported", "wrun_option_daily_unsupported", "wrun_option_prints_one_acquisition", "wrun_option_prints_unsupported", "wrun_option_prints_v2_unsupported", "wrun_option_stats_10m_unsupported", "wrun_option_surface_unsupported", "wrun_options_flow_unsupported", "wrun_field_unsupported", "wrun_tenor_unsupported", "wrun_view_unsupported", "wrun_family_unsupported", "wrun_displacement_needs_cap", "wrun_options_chain_venue_unavailable", "wrun_options_chain_unavailable", "wrun_options_chain_one_venue", "wrun_lane_input_refused", "wrun_permission_denied", "wrun_coin_leg_unsupported", "wrun_coin_leg_unresolved", "wrun_pin_unsupported", "wrun_custom_interval_unsupported", "wrun_intrabar_leg_off_grid", "wrun_intrabar_ratio_over_cap", "wrun_intrabar_unsupported", "wrun_candles_bars_over_cap", "wrun_candles_ratio_over_cap", "wrun_oi_candles_unsupported", "wrun_volume_profile_candles_unsupported", "wrun_trade_volume_by_size_unsupported", "wrun_view_leg_off_grid", "wrun_view_leg_equal", "wrun_time_facts_unsupported", "wrun_etf_flow_unsupported", "wrun_volatility_index_unsupported", "wrun_long_short_ratio_unsupported", "wrun_options_oi_unsupported", "wrun_options_volume_unsupported", "wrun_ethena_positions_unsupported", "wrun_etf_holdings_unsupported", "wrun_etf_premium_unsupported", "wrun_economic_unsupported", "wrun_treasury_balance_unsupported", "wrun_bitfinex_funding_unsupported", "wrun_strategy_costs_in_sheet", "wrun_window_bars_invalid", "wrun_cells_unavailable", "wrun_tape_unavailable", "wrun_tape_interval_unsupported", "wrun_metric_source_missing_policy", "wrun_series_source_primary", "wrun_series_source_densification", "wrun_metric_pin_coarser_than_primary", "wrun_forming_primary_not_own_candles", "wrun_package_lock_invalid", "wrun_package_lock_missing", "wrun_package_not_installed", "wrun_package_lock_mismatch", "wrun_composition_cycle", "wrun_composition_depth", "wrun_options_chain_unsupported", "wrun_volume_profile_ticks_unsupported", "wrun_celled_metric_unsupported", "wrun_series_source_missing", "wrun_series_source_invalid", "wrun_params_invalid", "wrun_source_bindings_invalid", "wrun_output_displaced", "wrun_pin_unresolvable"];
|
|
345
345
|
readonly shape: readonly ["wrun_draw_kind_limit", "wrun_draw_total_limit", "wrun_draw_polyline_too_large", "wrun_draw_calls_per_row", "wrun_render_result_too_large", "wrun_draw_kind_mismatch", "wrun_draw_handle_missing", "wrun_draw_label_slot_absent", "wrun_draw_non_finite", "wrun_draw_phase", "wrun_draw_id_negative", "wrun_draw_kind_undeclared", "wrun_draw_prop_unknown", "wrun_draw_prop_unsupported", "wrun_draw_style_out_of_range", "wrun_draw_polyline_empty", "wrun_draw_polyline_out_of_bounds", "wrun_draw_label_slot_undeclared", "wrun_draw_polyline_budget", "wrun_strategy_id_limit", "wrun_strategy_id_too_long", "wrun_strategy_id_invalid_utf8", "wrun_strategy_calls_per_row", "wrun_strategy_trade_limit", "wrun_strategy_non_finite", "wrun_strategy_bad_direction", "wrun_strategy_not_declared", "wrun_strategy_phase", "wrun_strategy_id_out_of_bounds", "wrun_text_param_phase", "wrun_text_param_memory", "wrun_bar_count_phase", "wrun_frame_invalid", "wrun_frame_phase", "wrun_frame_undeclared", "wrun_frame_length", "wrun_frame_too_large", "wrun_frame_run_too_large", "wrun_frame_memory", "wrun_frame_utf8"];
|
|
346
346
|
readonly pack: readonly ["wrun_cell_block_invalid", "wrun_run_cells_too_large", "wrun_cell_block_too_large"];
|
|
347
347
|
readonly align: readonly ["wrun_densify_empty_fetch", "wrun_densify_mixed_phase", "wrun_liquidation_side_unmatched", "wrun_bound_series_empty", "wrun_cell_data_malformed"];
|
|
@@ -533,6 +533,8 @@ export const WRUN_KIT_REFUSAL_STAGES = {
|
|
|
533
533
|
'wrun_option_daily_unsupported',
|
|
534
534
|
'wrun_option_prints_one_acquisition',
|
|
535
535
|
'wrun_option_prints_unsupported',
|
|
536
|
+
// kit 0.88.0 (OPTIONS-PORT P7): the prints with their block and RFQ identity, a host that does not serve them.
|
|
537
|
+
'wrun_option_prints_v2_unsupported',
|
|
536
538
|
'wrun_option_stats_10m_unsupported',
|
|
537
539
|
'wrun_option_surface_unsupported',
|
|
538
540
|
'wrun_options_flow_unsupported',
|
|
@@ -151,10 +151,13 @@ const REQUIREMENT_ROWS = {
|
|
|
151
151
|
coins: BTC_ETH,
|
|
152
152
|
}),
|
|
153
153
|
volatility_index: () => ({ kind: 'provider', sourceClass: 'volatility_index', provider: 'DERIBIT', coins: BTC_ETH }),
|
|
154
|
-
//
|
|
155
|
-
//
|
|
156
|
-
//
|
|
157
|
-
|
|
154
|
+
// The options flow of the chart's options chain (a chain poll lane, sources/lanes/options_flow): its ticker, market and
|
|
155
|
+
// venue scopes read the chain the options chain's `auto` decides, on whichever plane it lists on (its `venue` names a
|
|
156
|
+
// scope's venue, never the chain); `equity`, `etf` and `index` (the leaf's WRUN_OPTIONS_FLOW_OPRA_SCOPES) read US
|
|
157
|
+
// listed options alone, the OPRA plane's governed row.
|
|
158
|
+
options_flow: (source) => ['equity', 'etf', 'index'].includes(text(source.scope))
|
|
159
|
+
? { kind: 'governed', sourceClass: 'options_flow', plane: 'opra' }
|
|
160
|
+
: wrunChainLaneRequirement('options_flow', undefined),
|
|
158
161
|
// The daily options statistics of the chart's options chain (a chain poll lane, sources/lanes/option_daily): read on
|
|
159
162
|
// whichever plane the chain lists on, through the options chain's own venue decision (`wrunChainLaneRequirement`).
|
|
160
163
|
option_daily: (source) => wrunChainLaneRequirement('option_daily', source),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The indicator kit's tables a chart run reads on the main thread, copied verbatim and import-free (OPTLOAD g1
|
|
3
|
+
* round 3, 2026-10-21). A run read each off the kit bundle (transport.loadWrunKit): 3.6 MB of authoring code whose
|
|
4
|
+
* evaluation held the main thread 836 ms on a measured first add of IV Rank, for two small tables (the daemon-only
|
|
5
|
+
* one ships empty in kit 0.87.0). The kit's authoring code runs in the compile and language workers, which load
|
|
6
|
+
* their own copy; nothing on the main thread loads it for a run.
|
|
7
|
+
*
|
|
8
|
+
* The values never drift from the kit's: tests/utility/wrun/wrun-kit-run-tables.kit-mirror.spec.ts pins every table
|
|
9
|
+
* here to the kit's own export, so a re-vendor that changes one fails there by name instead of drifting.
|
|
10
|
+
* tests/structure/wrun-engine-off-main-thread.spec.ts holds the main thread to no kit load at all.
|
|
11
|
+
*/
|
|
12
|
+
/** The sentence a source class the kit lists in its daemon-only Set is refused with. */
|
|
13
|
+
export declare const WRUN_DAEMON_ONLY_DEFAULT_DISCLOSURE = "computed on your daemon, not in the tab";
|
|
14
|
+
/**
|
|
15
|
+
* The source classes the kit marks daemon-only (`WRUN_DAEMON_ONLY_SOURCES`) with the words a browser run refuses each
|
|
16
|
+
* with: the daemon computes such a class and owns its dependencies, so the first input declaring one refuses the
|
|
17
|
+
* browser run by name (WrunBrowserHost's source gate, assertWrunBrowserSources). The kit ships a Set (every class
|
|
18
|
+
* refused with the sentence above) and may ship a record of per-class wording instead; this copy holds the words
|
|
19
|
+
* either way. Kit 0.87.0: none.
|
|
20
|
+
*/
|
|
21
|
+
export declare const WRUN_DAEMON_ONLY_SOURCE_DISCLOSURES: Readonly<Record<string, string>>;
|
|
22
|
+
/** The kit's address book for the `token_supply` lane (`WRUN_TOKEN_NAMES`): coin ticker to the gateway's display
|
|
23
|
+
* name, in the kit's order. */
|
|
24
|
+
export declare const WRUN_KIT_TOKEN_NAMES: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The indicator kit's tables a chart run reads on the main thread, copied verbatim and import-free (OPTLOAD g1
|
|
3
|
+
* round 3, 2026-10-21). A run read each off the kit bundle (transport.loadWrunKit): 3.6 MB of authoring code whose
|
|
4
|
+
* evaluation held the main thread 836 ms on a measured first add of IV Rank, for two small tables (the daemon-only
|
|
5
|
+
* one ships empty in kit 0.87.0). The kit's authoring code runs in the compile and language workers, which load
|
|
6
|
+
* their own copy; nothing on the main thread loads it for a run.
|
|
7
|
+
*
|
|
8
|
+
* The values never drift from the kit's: tests/utility/wrun/wrun-kit-run-tables.kit-mirror.spec.ts pins every table
|
|
9
|
+
* here to the kit's own export, so a re-vendor that changes one fails there by name instead of drifting.
|
|
10
|
+
* tests/structure/wrun-engine-off-main-thread.spec.ts holds the main thread to no kit load at all.
|
|
11
|
+
*/
|
|
12
|
+
/** The sentence a source class the kit lists in its daemon-only Set is refused with. */
|
|
13
|
+
export const WRUN_DAEMON_ONLY_DEFAULT_DISCLOSURE = 'computed on your daemon, not in the tab';
|
|
14
|
+
/**
|
|
15
|
+
* The source classes the kit marks daemon-only (`WRUN_DAEMON_ONLY_SOURCES`) with the words a browser run refuses each
|
|
16
|
+
* with: the daemon computes such a class and owns its dependencies, so the first input declaring one refuses the
|
|
17
|
+
* browser run by name (WrunBrowserHost's source gate, assertWrunBrowserSources). The kit ships a Set (every class
|
|
18
|
+
* refused with the sentence above) and may ship a record of per-class wording instead; this copy holds the words
|
|
19
|
+
* either way. Kit 0.87.0: none.
|
|
20
|
+
*/
|
|
21
|
+
export const WRUN_DAEMON_ONLY_SOURCE_DISCLOSURES = Object.freeze({});
|
|
22
|
+
/** The kit's address book for the `token_supply` lane (`WRUN_TOKEN_NAMES`): coin ticker to the gateway's display
|
|
23
|
+
* name, in the kit's order. */
|
|
24
|
+
export const WRUN_KIT_TOKEN_NAMES = Object.freeze({
|
|
25
|
+
AAVE: 'Aave',
|
|
26
|
+
ADA: 'Cardano',
|
|
27
|
+
ALGO: 'Algorand',
|
|
28
|
+
APT: 'Aptos',
|
|
29
|
+
ARB: 'Arbitrum',
|
|
30
|
+
ASTER: 'Aster',
|
|
31
|
+
ATOM: 'Cosmos Hub',
|
|
32
|
+
AVAX: 'Avalanche',
|
|
33
|
+
BCH: 'Bitcoin Cash',
|
|
34
|
+
BNB: 'BNB',
|
|
35
|
+
BONK: 'Bonk',
|
|
36
|
+
BTC: 'Bitcoin',
|
|
37
|
+
CRV: 'Curve DAO',
|
|
38
|
+
DOGE: 'Dogecoin',
|
|
39
|
+
DOT: 'Polkadot',
|
|
40
|
+
ENA: 'Ethena',
|
|
41
|
+
ETC: 'Ethereum Classic',
|
|
42
|
+
ETH: 'Ethereum',
|
|
43
|
+
FET: 'Artificial Superintelligence Alliance',
|
|
44
|
+
FIL: 'Filecoin',
|
|
45
|
+
FLOKI: 'FLOKI',
|
|
46
|
+
GRT: 'The Graph',
|
|
47
|
+
HBAR: 'Hedera',
|
|
48
|
+
HYPE: 'Hyperliquid',
|
|
49
|
+
ICP: 'Internet Computer',
|
|
50
|
+
IMX: 'Immutable',
|
|
51
|
+
INJ: 'Injective',
|
|
52
|
+
JUP: 'Jupiter',
|
|
53
|
+
KAS: 'Kaspa',
|
|
54
|
+
LDO: 'Lido DAO',
|
|
55
|
+
LINK: 'Chainlink',
|
|
56
|
+
LTC: 'Litecoin',
|
|
57
|
+
MKR: 'Maker',
|
|
58
|
+
NEAR: 'NEAR Protocol',
|
|
59
|
+
ONDO: 'Ondo',
|
|
60
|
+
OP: 'Optimism',
|
|
61
|
+
PENDLE: 'Pendle',
|
|
62
|
+
PEPE: 'Pepe',
|
|
63
|
+
POL: 'POL (ex-MATIC)',
|
|
64
|
+
RENDER: 'Render',
|
|
65
|
+
RUNE: 'THORChain',
|
|
66
|
+
SEI: 'Sei',
|
|
67
|
+
SHIB: 'Shiba Inu',
|
|
68
|
+
SOL: 'Solana',
|
|
69
|
+
STX: 'Stacks',
|
|
70
|
+
SUI: 'Sui',
|
|
71
|
+
TAO: 'Bittensor',
|
|
72
|
+
TIA: 'Celestia',
|
|
73
|
+
TON: 'Toncoin',
|
|
74
|
+
TRUMP: 'Official Trump',
|
|
75
|
+
TRX: 'TRON',
|
|
76
|
+
UNI: 'Uniswap',
|
|
77
|
+
USDC: 'USDC',
|
|
78
|
+
USDT: 'Tether',
|
|
79
|
+
VET: 'VeChain',
|
|
80
|
+
VIRTUAL: 'Virtuals Protocol',
|
|
81
|
+
WIF: 'dogwifhat',
|
|
82
|
+
WLD: 'Worldcoin',
|
|
83
|
+
XLM: 'Stellar',
|
|
84
|
+
XMR: 'Monero',
|
|
85
|
+
XRP: 'XRP',
|
|
86
|
+
ZEC: 'Zcash',
|
|
87
|
+
});
|
|
@@ -54,7 +54,8 @@ export interface WrunRunFailedIdentity {
|
|
|
54
54
|
windowLastTs: number;
|
|
55
55
|
settingsSignature: string;
|
|
56
56
|
}
|
|
57
|
-
/** One settled executor run, as `onWrunOverlayRunSettled` reports it
|
|
57
|
+
/** One settled executor run, as `onWrunOverlayRunSettled` reports it: a run of an overlay that still stands (a run
|
|
58
|
+
* that settles after its overlay's teardown is never reported, so a same-id remount hears its own runs only). */
|
|
58
59
|
export interface WrunRunSettledEvent {
|
|
59
60
|
indicatorId: string;
|
|
60
61
|
chartIndex: number;
|
|
@@ -403,8 +403,14 @@ export declare class WrunTapeLiveRefusal extends Error {
|
|
|
403
403
|
* The note a tick's failure leaves, or null when the record does not classify
|
|
404
404
|
* it (a generic failure, or a class the full run owns: no bars, a deadline).
|
|
405
405
|
* A tick drew before, so its record is a note wherever the C2 table leaves the
|
|
406
|
-
* severity to the raiser (too-big: paused for a run, a note for a tick)
|
|
407
|
-
*
|
|
406
|
+
* severity to the raiser (too-big: paused for a run, a note for a tick). The
|
|
407
|
+
* note re-words the record and keeps everything else the record read off the
|
|
408
|
+
* failure: the raiser's technical text (its details), its cause
|
|
409
|
+
* (`telemetry.cause`, which `wrun_failure_shown` reports and the transient
|
|
410
|
+
* grace reads, as for the run's own record), the run attempt and the answer's
|
|
411
|
+
* flags. Only the ask's own stamp (`clientRequestId`) stays off: every drain
|
|
412
|
+
* is a new ask, and the note's key (one write per session) must not change
|
|
413
|
+
* with it.
|
|
408
414
|
*/
|
|
409
415
|
export declare function wrunLiveTickRefusalOf(error: unknown, ctx: WrunRefusalContext): WrunRefusal | null;
|
|
410
416
|
/**
|
|
@@ -182,6 +182,7 @@ import { hostBucketResolverFor } from '../chart/host-bar-placement.util.js';
|
|
|
182
182
|
import { attachWrunStrategy, isWrunStrategySheet, wrunStrategyOf } from './wrun-box-segment.util.js';
|
|
183
183
|
import { wrunDailyLaneDayStart, wrunDailyLaneHeadEqual, wrunDailyLaneReconcileTo, } from './wrun-daily-lane.util.js';
|
|
184
184
|
import { withWrunDeadline, WRUN_SOURCE_FETCH_DEADLINE_MS } from './wrun-deadline.util.js';
|
|
185
|
+
import { wrunAnswerKeepsHeldOverMarkers } from './wrun-present-bits.util.js';
|
|
185
186
|
import { wrunParamValuesFromSettings } from './wrun-script-inputs.util.js';
|
|
186
187
|
import { wrunOverlayLegendNote } from './wrun-draft-legend-note.util.js';
|
|
187
188
|
import { wrunTextParamValuesFromSettings } from './wrun-text-params.util.js';
|
|
@@ -1996,22 +1997,33 @@ async function wrunEditorTabProbe() {
|
|
|
1996
1997
|
* The note a tick's failure leaves, or null when the record does not classify
|
|
1997
1998
|
* it (a generic failure, or a class the full run owns: no bars, a deadline).
|
|
1998
1999
|
* A tick drew before, so its record is a note wherever the C2 table leaves the
|
|
1999
|
-
* severity to the raiser (too-big: paused for a run, a note for a tick)
|
|
2000
|
-
*
|
|
2000
|
+
* severity to the raiser (too-big: paused for a run, a note for a tick). The
|
|
2001
|
+
* note re-words the record and keeps everything else the record read off the
|
|
2002
|
+
* failure: the raiser's technical text (its details), its cause
|
|
2003
|
+
* (`telemetry.cause`, which `wrun_failure_shown` reports and the transient
|
|
2004
|
+
* grace reads, as for the run's own record), the run attempt and the answer's
|
|
2005
|
+
* flags. Only the ask's own stamp (`clientRequestId`) stays off: every drain
|
|
2006
|
+
* is a new ask, and the note's key (one write per session) must not change
|
|
2007
|
+
* with it.
|
|
2001
2008
|
*/
|
|
2002
2009
|
export function wrunLiveTickRefusalOf(error, ctx) {
|
|
2003
2010
|
const record = wrunRefusalFor(error, ctx);
|
|
2004
2011
|
if (WRUN_TICK_QUIET_REFUSAL_CLASSES.has(record.cls))
|
|
2005
2012
|
return null;
|
|
2006
|
-
const note =
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2013
|
+
const note = {
|
|
2014
|
+
...record,
|
|
2015
|
+
...wrunRefusalFor({
|
|
2016
|
+
cls: record.cls,
|
|
2017
|
+
variant: record.variant,
|
|
2018
|
+
params: { ...record.params },
|
|
2019
|
+
...(record.market ? { market: record.market } : {}),
|
|
2020
|
+
out: record.out,
|
|
2021
|
+
severity: 'note',
|
|
2022
|
+
}, ctx),
|
|
2023
|
+
details: record.details,
|
|
2024
|
+
};
|
|
2025
|
+
delete note.clientRequestId;
|
|
2026
|
+
return note;
|
|
2015
2027
|
}
|
|
2016
2028
|
/** Say a drain's classified failure once, as a note for the `tick` owner (no
|
|
2017
2029
|
* toast; the last good result stays drawn), while the session the drain ran
|
|
@@ -3174,6 +3186,7 @@ async function askWrunReconcileSourceAnswer(context, ledger, ask, meta) {
|
|
|
3174
3186
|
// (the chart's, or a session's run interval).
|
|
3175
3187
|
...(ask.interval === undefined ? wrunReconcileRunIntervalOption(context) : { interval: ask.interval }),
|
|
3176
3188
|
...(ask.nativeRows === true ? { nativeRows: true } : {}),
|
|
3189
|
+
...(ask.endExclusive === true ? { endExclusive: true } : {}),
|
|
3177
3190
|
}), WRUN_SOURCE_FETCH_DEADLINE_MS, `wrun live reconcile fetch '${ask.type}' (${ask.key}) for '${context.fetchKey}'`);
|
|
3178
3191
|
return Array.isArray(fetched) ? fetched : null;
|
|
3179
3192
|
}
|
|
@@ -3811,13 +3824,19 @@ function wrunRowLaneKeepsHeld(context, lane) {
|
|
|
3811
3824
|
return instance !== undefined && wrunRowLaneByKey(instance.laneKey)?.liveByCoin?.reconcile !== undefined;
|
|
3812
3825
|
}
|
|
3813
3826
|
/** A row lane's answer merged over the rows it held by its lane's own rule (a `liveByCoin` lane's `reconcile`:
|
|
3814
|
-
* a print shown live never vanishes on the next poll), else the answer as it came
|
|
3827
|
+
* a print shown live never vanishes on the next poll), else the answer as it came; then, on a lane with a `present`
|
|
3828
|
+
* mask, a held row that carries data stands where the answer names its bar only with the partial marker
|
|
3829
|
+
* (`wrunAnswerKeepsHeldOverMarkers`). */
|
|
3815
3830
|
function wrunRowLaneReconcileAnswer(context, lane, held, answer) {
|
|
3816
3831
|
const instance = context.rowLanes?.find((candidate) => candidate.key === lane);
|
|
3817
|
-
const
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3832
|
+
const descriptor = instance === undefined ? undefined : wrunRowLaneByKey(instance.laneKey);
|
|
3833
|
+
const reconcile = descriptor?.liveByCoin?.reconcile;
|
|
3834
|
+
const merged = reconcile === undefined
|
|
3835
|
+
? answer
|
|
3836
|
+
: reconcile(held, answer);
|
|
3837
|
+
return descriptor === undefined || descriptor.presentMask === false
|
|
3838
|
+
? merged
|
|
3839
|
+
: wrunAnswerKeepsHeldOverMarkers(held, merged);
|
|
3821
3840
|
}
|
|
3822
3841
|
function laneRowsOf(context, lane) {
|
|
3823
3842
|
if (isWrunPollLaneId(lane))
|