@orangecharts/wrun-chart-host 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/constants/economic.constants.d.ts +2 -0
- package/dist/constants/economic.constants.js +2 -0
- package/dist/constants/feature-flags.constants.d.ts +13 -5
- package/dist/constants/feature-flags.constants.js +76 -35
- package/dist/constants/feature-limits.constants.d.ts +72 -4
- package/dist/constants/feature-limits.constants.js +104 -24
- package/dist/constants/interval.constants.js +5 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.d.ts +12 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.js +14 -0
- package/dist/constants/marketCapabilities.constants.d.ts +9 -0
- package/dist/constants/marketCapabilities.constants.js +39 -11
- package/dist/constants/typed-indicator-source.leaf.d.ts +7 -0
- package/dist/constants/typed-indicator-source.leaf.js +47 -0
- package/dist/constants/typed-session-history-venue.leaf.d.ts +7 -0
- package/dist/constants/typed-session-history-venue.leaf.js +9 -0
- package/dist/constants/typed-width-fold.leaf.d.ts +52 -0
- package/dist/constants/typed-width-fold.leaf.js +101 -0
- package/dist/constants/typed-width-source.leaf.d.ts +24 -0
- package/dist/constants/typed-width-source.leaf.js +126 -0
- package/dist/constants/typed-width.leaf.d.ts +57 -0
- package/dist/constants/typed-width.leaf.js +78 -0
- package/dist/host-env.d.ts +10 -0
- package/dist/host-env.js +7 -0
- package/dist/host-ports.types.d.ts +23 -17
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +35 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +66 -3
- package/dist/interfaces/wrun-runtime.interface.js +11 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +13 -0
- package/dist/kscript-data/controls/live-trades-merge.util.js +16 -1
- package/dist/market-data/billing.interface.d.ts +12 -45
- package/dist/market-data/billing.interface.js +2 -2
- package/dist/replay/replayLadder.js +7 -4
- package/dist/settings-templates/footprint-rows.d.ts +6 -0
- package/dist/settings-templates/footprint-rows.js +6 -0
- package/dist/settings-templates/frvp-fields.js +14 -0
- package/dist/settings-templates/indicator-fields.js +36 -0
- package/dist/settings-templates/tool-tables.generated.js +19 -1
- package/dist/utility/chart/__fixtures__/live-bucket-regular-golden.json +1706 -0
- package/dist/utility/chart/cache-alignment.util.d.ts +42 -0
- package/dist/utility/chart/cache-alignment.util.js +88 -18
- package/dist/utility/chart/calendar-interval.util.d.ts +83 -1
- package/dist/utility/chart/calendar-interval.util.js +152 -4
- package/dist/utility/chart/candle-bar-end.util.d.ts +11 -4
- package/dist/utility/chart/candle-bar-end.util.js +17 -6
- package/dist/utility/chart/chart-time-domain.util.d.ts +3 -0
- package/dist/utility/chart/chart-time-domain.util.js +13 -4
- package/dist/utility/chart/feed-interval.util.d.ts +4 -2
- package/dist/utility/chart/feed-interval.util.js +5 -2
- package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +3 -1
- package/dist/utility/chart/fetch-dedupe-policy.util.js +19 -1
- package/dist/utility/chart/footprint-display-mode.util.d.ts +2 -0
- package/dist/utility/chart/footprint-display-mode.util.js +5 -0
- package/dist/utility/chart/governed-lanes-gate.util.d.ts +46 -0
- package/dist/utility/chart/governed-lanes-gate.util.js +71 -0
- package/dist/utility/chart/governed-lanes-reader-seat.d.ts +14 -0
- package/dist/utility/chart/governed-lanes-reader-seat.js +14 -0
- package/dist/utility/chart/history-wall.util.d.ts +13 -2
- package/dist/utility/chart/history-wall.util.js +11 -4
- package/dist/utility/chart/index-mode-admission.util.js +9 -1
- package/dist/utility/chart/index-mode.util.d.ts +2 -2
- package/dist/utility/chart/index-mode.util.js +12 -6
- package/dist/utility/chart/index-otc.leaf.d.ts +37 -0
- package/dist/utility/chart/index-otc.leaf.js +68 -0
- package/dist/utility/chart/interval-ladder.util.d.ts +5 -2
- package/dist/utility/chart/interval-ladder.util.js +44 -4
- package/dist/utility/chart/interval-registry.util.d.ts +22 -1
- package/dist/utility/chart/interval-registry.util.js +50 -2
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +32 -4
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +22 -5
- package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +10 -0
- package/dist/utility/chart/kscript-drawing-safe-area.util.js +30 -3
- package/dist/utility/chart/kscript-legend-entries.util.d.ts +21 -4
- package/dist/utility/chart/kscript-legend-entries.util.js +27 -5
- package/dist/utility/chart/kscript-main-grid-stages.util.js +74 -24
- package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
- package/dist/utility/chart/kscript-row-name.leaf.d.ts +13 -0
- package/dist/utility/chart/kscript-row-name.leaf.js +18 -0
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +61 -26
- package/dist/utility/chart/kscript-venue-policy.util.js +138 -37
- package/dist/utility/chart/live-bucket.util.d.ts +29 -4
- package/dist/utility/chart/live-bucket.util.js +45 -12
- package/dist/utility/chart/market-session-schedule.util.d.ts +19 -0
- package/dist/utility/chart/market-session-schedule.util.js +2 -1
- package/dist/utility/chart/market-session.util.d.ts +62 -10
- package/dist/utility/chart/market-session.util.js +93 -13
- package/dist/utility/chart/marketKind.util.d.ts +11 -12
- package/dist/utility/chart/marketKind.util.js +45 -13
- package/dist/utility/chart/mixed-mode.util.d.ts +18 -0
- package/dist/utility/chart/om-target.util.js +6 -4
- package/dist/utility/chart/price-precision.util.d.ts +20 -6
- package/dist/utility/chart/price-precision.util.js +34 -7
- package/dist/utility/chart/profile-frame-window.util.d.ts +15 -0
- package/dist/utility/chart/profile-frame-window.util.js +12 -0
- package/dist/utility/chart/rth-session.util.d.ts +3 -1
- package/dist/utility/chart/rth-session.util.js +3 -1
- package/dist/utility/chart/script-source-session.util.d.ts +43 -0
- package/dist/utility/chart/script-source-session.util.js +61 -0
- package/dist/utility/chart/typed-width-grid.util.d.ts +23 -0
- package/dist/utility/chart/typed-width-grid.util.js +203 -0
- package/dist/utility/common/transformations.util.d.ts +6 -0
- package/dist/utility/common/transformations.util.js +28 -4
- package/dist/utility/market-events/market-events.util.js +3 -0
- package/dist/utility/number-format.util.d.ts +14 -1
- package/dist/utility/number-format.util.js +22 -4
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +24 -1
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +115 -0
- package/dist/utility/v2/v2-enums.leaf.js +5 -0
- package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +2 -1
- package/dist/utility/wrun/sources/row-lanes/dark_pool.js +4 -3
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-batched-marks.util.js +96 -17
- package/dist/utility/wrun/wrun-canvases.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-canvases.util.js +7 -12
- package/dist/utility/wrun/wrun-cap-notice.util.d.ts +5 -0
- package/dist/utility/wrun/wrun-cap-notice.util.js +23 -0
- package/dist/utility/wrun/wrun-card-style.util.d.ts +1 -1
- package/dist/utility/wrun/wrun-card-style.util.js +2 -2
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +23 -8
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +24 -9
- package/dist/utility/wrun/wrun-child-overlay-id.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-child-overlay-id.util.js +24 -0
- package/dist/utility/wrun/wrun-cloud-cme-stamp.util.d.ts +72 -0
- package/dist/utility/wrun/wrun-cloud-cme-stamp.util.js +151 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +10 -6
- package/dist/utility/wrun/wrun-cme-root-specs.util.js +19 -13
- package/dist/utility/wrun/wrun-color-facts.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-color-facts.util.js +8 -5
- package/dist/utility/wrun/wrun-colour-tone.lazy.d.ts +20 -0
- package/dist/utility/wrun/wrun-colour-tone.lazy.js +23 -0
- package/dist/utility/wrun/wrun-colour-tone.util.d.ts +14 -0
- package/dist/utility/wrun/wrun-colour-tone.util.js +119 -0
- package/dist/utility/wrun/wrun-dark-pool.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-dark-pool.util.js +5 -4
- package/dist/utility/wrun/wrun-frames.d.ts +1 -1
- package/dist/utility/wrun/wrun-frames.js +2 -2
- package/dist/utility/wrun/wrun-handles.util.d.ts +1 -1
- package/dist/utility/wrun/wrun-handles.util.js +1 -1
- package/dist/utility/wrun/wrun-host.service.d.ts +32 -2
- package/dist/utility/wrun/wrun-host.service.js +44 -2
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +20 -0
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +85 -2
- package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +37 -0
- package/dist/utility/wrun/wrun-hosted-wire.util.js +54 -0
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +1 -0
- package/dist/utility/wrun/wrun-hud-looks.util.js +6 -11
- package/dist/utility/wrun/wrun-integration-route.util.d.ts +24 -0
- package/dist/utility/wrun/wrun-integration-route.util.js +19 -0
- package/dist/utility/wrun/wrun-live-intake.util.js +17 -1
- package/dist/utility/wrun/wrun-live-patch.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-live-patch.util.js +10 -4
- package/dist/utility/wrun/wrun-live-tick.util.js +64 -5
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +40 -6
- package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +10 -8
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +3 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +17 -0
- package/dist/utility/wrun/wrun-overlay-run.util.js +318 -55
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +1 -1
- package/dist/utility/wrun/wrun-panel-mount.util.js +42 -13
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-pin-venues.util.js +11 -4
- package/dist/utility/wrun/wrun-refusal.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-refusal.util.js +102 -13
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +5 -3
- package/dist/utility/wrun/wrun-registry-errors.util.js +5 -3
- package/dist/utility/wrun/wrun-row-source-factory.js +17 -1
- package/dist/utility/wrun/wrun-row-source.d.ts +8 -1
- package/dist/utility/wrun/wrun-run-health.util.js +1 -1
- package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +1 -1
- package/dist/utility/wrun/wrun-sandbox-row-source.js +9 -0
- package/dist/utility/wrun/wrun-session-composition.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-session-composition.util.js +3 -2
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +12 -5
- package/dist/utility/wrun/wrun-setting-words.util.js +25 -8
- package/dist/utility/wrun/wrun-socket-row-source.d.ts +26 -1
- package/dist/utility/wrun/wrun-socket-row-source.js +125 -12
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-source-rows.util.js +8 -7
- package/dist/utility/wrun/wrun-style-words.util.d.ts +31 -9
- package/dist/utility/wrun/wrun-style-words.util.js +46 -15
- package/dist/utility/wrun/wrun-trades-lane.util.js +2 -1
- package/dist/utility/wrun/wrun-trap-replay.util.d.ts +42 -0
- package/dist/utility/wrun/wrun-trap-replay.util.js +63 -0
- package/dist/utility/wrun/wrun-volume-profile.util.js +6 -5
- package/dist/utility/wrun-display-name.util.d.ts +10 -0
- package/dist/utility/wrun-display-name.util.js +21 -0
- package/dist/utils/replay/replay-buffer-math.d.ts +2 -0
- package/dist/utils/replay/replay-buffer-math.js +2 -0
- package/dist/workers/constants/socket-slots.d.ts +1 -1
- package/dist/workers/utils/time.worker.util.js +2 -2
- package/dist/workers/utils/volume-profile.worker.util.d.ts +9 -0
- package/dist/workers/utils/volume-profile.worker.util.js +20 -0
- package/dist/workers/wrun/wrun-abi-host.d.ts +3 -0
- package/dist/workers/wrun/wrun-abi-host.js +82 -5
- package/dist/workers/wrun/wrun-engine-handler.js +53 -4
- package/dist/workers/wrun/wrun-trap-frames.leaf.d.ts +28 -0
- package/dist/workers/wrun/wrun-trap-frames.leaf.js +108 -0
- package/package.json +11 -11
|
@@ -144,7 +144,7 @@ export interface WrunMountCell {
|
|
|
144
144
|
* window's weights, or a normal cell's remembered pane heights (the heights its reader dragged, so a remounted
|
|
145
145
|
* pane comes back at them). The mount keeps it for the retranslate, and a child it names keeps its pane when only
|
|
146
146
|
* its height moved (the host owns that height). Absent: a window plans from the run's children, a normal cell
|
|
147
|
-
*
|
|
147
|
+
* takes the heights remembered on the owner's row (rememberedChildPaneHeights), else the shared heights. */
|
|
148
148
|
planned?: ReadonlyMap<string, number>;
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
* OT32). Every child's eye follows the parent's, except where the reader
|
|
53
53
|
* moved a child's own eye (an inset's): that flip stands (syncChildVisibility).
|
|
54
54
|
*/
|
|
55
|
-
import { wrunChartHostEnv, wrunHostLeavesTablesToWindow } from '../../host-env.js';
|
|
55
|
+
import { wrunChartHostEnv, wrunHostLeavesTablesToWindow, wrunHostWithoutUndoSteps } from '../../host-env.js';
|
|
56
56
|
import { isDateLabelledBarInterval } from '../chart/date-labelled-interval.leaf.js';
|
|
57
|
-
import { KSCRIPT_LEGEND_VALUE_INK, kScriptLegendEntries, kScriptLegendLineFormat, kScriptLegendLineFormatOptions, kScriptLegendLines, kScriptLegendLineSwatchAt, kScriptLegendLineValueAt, kScriptLegendSlotCells, padKScriptLegendSlots, } from '../chart/kscript-legend-entries.util.js';
|
|
57
|
+
import { KSCRIPT_LEGEND_VALUE_INK, kScriptLegendEntries, kScriptLegendLineFormat, kScriptLegendLineFormatOptions, kScriptLegendLines, kScriptLegendLineSwatchAt, kScriptLegendLineValueAt, kScriptLegendSlotCells, padKScriptLegendSlots, createKScriptLegendSlotsUsed, } from '../chart/kscript-legend-entries.util.js';
|
|
58
58
|
import { panelGridHeight, refreshPanelOverlayInPlace, samePanelPane, translatePanelToEngine, withoutEmptyTableColumns, } from '../chart/om-panel.util.js';
|
|
59
59
|
import { isWrunWindowOwner } from '../chart/window-owner.leaf.js';
|
|
60
60
|
import { ownerPaneDrawsNothing, planWindowWeights, reconcileWindowOwnerGeometry, savedWindowSplit, tableRowCountOf, WRUN_WINDOW_TABLES_ONLY_SETTING, } from '../chart/window-geometry.leaf.js';
|
|
61
61
|
import { wrunLegendName } from '../chart/wrun-legend-name.util.js';
|
|
62
62
|
import { wrunResultLegendColors, wrunSeriesChildId, } from '../chart/wrun-run-result.util.js';
|
|
63
|
-
import { budgetWrunBatchedRetained, budgetWrunBatchedRows, commitWrunBatchedPlan, currentWrunBatchedPlan, forgetWrunBatchedCells, isWrunBatchedMarksKind, noteWrunBatchedRowsCut, planWrunBatchedMerged, restoreWrunBatchedLedger, snapshotWrunBatchedLedger, WRUN_BATCHED_MARKS_KINDS, wrunBatchedChargeOf, wrunBatchedChildConfig, wrunBatchedChildrenOverShare, wrunBatchedEngineVerdict, wrunBatchedSiblingsToRebalance, } from './wrun-batched-marks.util.js';
|
|
63
|
+
import { budgetWrunBatchedRetained, budgetWrunBatchedRows, commitWrunBatchedPlan, currentWrunBatchedPlan, forgetWrunBatchedCells, isWrunBatchedMarksKind, noteWrunBatchedRowsCut, planWrunBatchedMerged, restoreWrunBatchedLedger, snapshotWrunBatchedLedger, WRUN_BATCHED_MARKS_KINDS, wrunBatchedChargeOf, wrunBatchedChildConfig, wrunBatchedChildrenOverShare, wrunBatchedEngineVerdict, wrunBatchedMarksLevelOf, wrunBatchedSiblingsToRebalance, } from './wrun-batched-marks.util.js';
|
|
64
64
|
import { forgetWrunCanvasReadout, keepWrunHeatmapScaleSample, rememberWrunCanvasReadout, wrunCanvasChildConfig, wrunHeatmapScaleDecided, wrunHeatmapScaleKept, wrunHeatmapSensitivityBounds, wrunPlainCanvasRow, } from './wrun-canvases.util.js';
|
|
65
|
-
import { wrunChildHiddenRowKey } from './wrun-child-overlay-id.util.js';
|
|
65
|
+
import { wrunChildHiddenRowKey, wrunChildPaneHeightRowChildId } from './wrun-child-overlay-id.util.js';
|
|
66
66
|
import { wrunHeatmapSensitivitySetting, wrunHeatmapSensitivityValue } from './wrun-color-settings.util.js';
|
|
67
67
|
import { budgetWrunHeatmapRetained, budgetWrunHeatmapRows, commitWrunHeatmapPlan, currentWrunHeatmapPlan, planWrunHeatmapMerged, restoreWrunHeatmapLedger, snapshotWrunHeatmapLedger, wrunHeatmapCellLayoutOf, wrunHeatmapChildrenOverShare, wrunHeatmapSiblingsToRebalance, } from './wrun-heatmap-cell-budget.util.js';
|
|
68
68
|
import { wrunChildOverlayParentId } from './wrun-child-overlay-id.util.js';
|
|
@@ -203,8 +203,9 @@ function installChild(tc, child, theme) {
|
|
|
203
203
|
forgetWrunLevelsHoverRows(child.config.id);
|
|
204
204
|
}
|
|
205
205
|
function removeChild(tc, id) {
|
|
206
|
+
// The engine deletes the drawings on the child's pane with it, one event each: never steps of the person's history.
|
|
206
207
|
if (overlayPresent(tc, id))
|
|
207
|
-
tc.removeOverlay(id);
|
|
208
|
+
wrunHostWithoutUndoSteps(() => tc.removeOverlay(id));
|
|
208
209
|
}
|
|
209
210
|
/** Drop what a child registered for the hover surfaces (the symmetric
|
|
210
211
|
* retract of installChild and the canvas config builder). */
|
|
@@ -435,9 +436,11 @@ function seriesChildConfig(child, ctx) {
|
|
|
435
436
|
getLegendText: wrunSeriesChildLegendText(builtinTwin, ctx.priceDigits),
|
|
436
437
|
settings: {
|
|
437
438
|
...childLegendControls(ctx.parentName),
|
|
438
|
-
// Below the chart: the shared weight,
|
|
439
|
-
|
|
439
|
+
// Below the chart: the shared weight, the pane's declared share over it, and the plan's over both (a window's
|
|
440
|
+
// weight, or the height the reader dragged it to), the order a panel takes (panelConfig).
|
|
441
|
+
...(onPrice ? {} : { gridHeight: CHILD_PANE_GRID_HEIGHT }),
|
|
440
442
|
...settingWords,
|
|
443
|
+
...(!onPrice && ctx.planned?.has(id) === true ? { gridHeight: ctx.planned.get(id) } : {}),
|
|
441
444
|
...(palette.length > 0 ? { colors: palette } : {}),
|
|
442
445
|
...seriesChildChartSettings(parentSettings),
|
|
443
446
|
},
|
|
@@ -649,6 +652,9 @@ function legendOhlcLabels() {
|
|
|
649
652
|
* `legend: false` is never a line (kScriptLegendLines). A proven twin's pane
|
|
650
653
|
* (`builtinTwin`) prints by its built-in's legend rule instead. */
|
|
651
654
|
export function wrunSeriesChildLegendText(builtinTwin, priceDigits) {
|
|
655
|
+
// The slots this pane's legend hook has addressed: its answers pad only
|
|
656
|
+
// those, never the whole 16-slot pool (padKScriptLegendSlots).
|
|
657
|
+
const slots = createKScriptLegendSlotsUsed();
|
|
652
658
|
return (point, meta) => {
|
|
653
659
|
const placement = {
|
|
654
660
|
onPrice: false,
|
|
@@ -658,10 +664,10 @@ export function wrunSeriesChildLegendText(builtinTwin, priceDigits) {
|
|
|
658
664
|
const format = (value, line) => formatWrunLegendValue(value, placement, kScriptLegendLineFormat(meta, line), kScriptLegendLineFormatOptions(meta, line));
|
|
659
665
|
const entries = kScriptLegendEntries(point, meta, format, { ohlcLabels: legendOhlcLabels() });
|
|
660
666
|
if (entries.length > 1)
|
|
661
|
-
return padKScriptLegendSlots(entries);
|
|
667
|
+
return padKScriptLegendSlots(entries, slots);
|
|
662
668
|
const [line] = kScriptLegendLines(meta);
|
|
663
669
|
if (line === undefined)
|
|
664
|
-
return padKScriptLegendSlots([]);
|
|
670
|
+
return padKScriptLegendSlots([], slots);
|
|
665
671
|
const ts = Array.isArray(point) && typeof point[0] === 'number' ? point[0] : undefined;
|
|
666
672
|
const value = kScriptLegendLineValueAt(line, ts, { meta });
|
|
667
673
|
return padKScriptLegendSlots([
|
|
@@ -672,7 +678,7 @@ export function wrunSeriesChildLegendText(builtinTwin, priceDigits) {
|
|
|
672
678
|
color: KSCRIPT_LEGEND_VALUE_INK,
|
|
673
679
|
swatch: kScriptLegendLineSwatchAt(meta, line, ts),
|
|
674
680
|
},
|
|
675
|
-
]);
|
|
681
|
+
], slots);
|
|
676
682
|
};
|
|
677
683
|
}
|
|
678
684
|
/** The lower pane's static legend: the slot pool the dynamic readout
|
|
@@ -686,6 +692,22 @@ export function wrunSeriesChildLegendSlots(_palette) {
|
|
|
686
692
|
/** The series child's overlay id (`<parent>::series:<name>`), defined by the
|
|
687
693
|
* adapter (the visibility apply reads it there) and re-exported here. */
|
|
688
694
|
export { wrunSeriesChildId };
|
|
695
|
+
/** The heights a reader dragged an owner's child panes to (`<kind>:<name>:gridHeight` on the owner's settings, the
|
|
696
|
+
* viewer rows the store's saveGridHeights writes, wrunChildPaneHeightRowKey), by child id, each held between the
|
|
697
|
+
* drag floor and the rowless ceiling. Undefined when the owner remembers none
|
|
698
|
+
* (an older document, a pane never dragged): the mount then sizes as it always did. */
|
|
699
|
+
function rememberedChildPaneHeights(settings, overlayId) {
|
|
700
|
+
let heights;
|
|
701
|
+
for (const [key, value] of Object.entries(settings ?? {})) {
|
|
702
|
+
const id = wrunChildPaneHeightRowChildId(overlayId, key);
|
|
703
|
+
if (id === null || typeof value !== 'number' || !Number.isFinite(value) || value <= 0 || value >= 1)
|
|
704
|
+
continue;
|
|
705
|
+
// Held to what a drag can produce (titan layoutManager MIN_HEIGHT 0.1) and to the rowless ceiling (0.5): the
|
|
706
|
+
// restore reserves child panes unscaled (docs/features/chart/rowless-pane-heights.md).
|
|
707
|
+
(heights ??= new Map()).set(id, Math.min(Math.max(value, 0.1), 0.5));
|
|
708
|
+
}
|
|
709
|
+
return heights;
|
|
710
|
+
}
|
|
689
711
|
function isSeriesChildId(id) {
|
|
690
712
|
return id.includes('::series:');
|
|
691
713
|
}
|
|
@@ -1920,6 +1942,10 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
|
|
|
1920
1942
|
planned = new Map(weights.map(({ id, gridHeight }) => [id, gridHeight]));
|
|
1921
1943
|
}
|
|
1922
1944
|
}
|
|
1945
|
+
// A normal cell the host hands no plan: the heights the reader dragged the child panes to, kept on the owner's
|
|
1946
|
+
// row (rememberedChildPaneHeights), so a layout or tab switch and a reload remount each pane at its height.
|
|
1947
|
+
if (!windowCell && !planned)
|
|
1948
|
+
planned = rememberedChildPaneHeights(parent.settings, overlayId);
|
|
1923
1949
|
current.windowCell = windowCell;
|
|
1924
1950
|
current.planned = planned;
|
|
1925
1951
|
// The words an empty panel pane shows: re-read on every pass that carries frames (a tick carries no drawings and
|
|
@@ -1992,9 +2018,12 @@ export function mountWrunChildOverlays({ tc, overlayId, runResult, replaceFrames
|
|
|
1992
2018
|
}
|
|
1993
2019
|
const gated = entry.input.newer !== undefined ? 'old-engine' : batchedGateCause(tc, entry.config.plot, packs[at]);
|
|
1994
2020
|
// The engine draws the kind: a look its kind renderer would draw as another (the diamond, the log size law
|
|
1995
|
-
// and its px bounds before the engine release that draws flags,
|
|
1996
|
-
//
|
|
1997
|
-
|
|
2021
|
+
// and its px bounds before the engine release that draws flags; Glass, Solid and the size beside the mark
|
|
2022
|
+
// before the marks pack that reads level 2, wrunBatchedEngineVerdict) is refused by name and reason like a
|
|
2023
|
+
// layout newer than this chart, never drawn as another look.
|
|
2024
|
+
const engineShort = gated === null
|
|
2025
|
+
? wrunBatchedEngineVerdict(entry.input, (type) => tc.hasPlotRenderer?.(type) === true, wrunBatchedMarksLevelOf(tc))
|
|
2026
|
+
: null;
|
|
1998
2027
|
const newer = entry.input.newer ?? engineShort ?? undefined;
|
|
1999
2028
|
const cause = newer !== undefined ? 'old-engine' : gated;
|
|
2000
2029
|
if (cause === null)
|
|
@@ -4,8 +4,9 @@ import type { WrunUnservedLeg } from './wrun-run-health.util.js';
|
|
|
4
4
|
import type { WrunPinnedLeg, WrunPinnedWire } from './wrun-source-rows.util.js';
|
|
5
5
|
/** The venues the gateway serves no series for to scripts yet: a pin on one is soft-refused per
|
|
6
6
|
* input with a `WRUN_LEG_UNSERVED` row naming why (never silently NaN). Remove a venue here the
|
|
7
|
-
* moment the gateway lists it; nothing else gates it.
|
|
8
|
-
|
|
7
|
+
* moment the gateway lists it; nothing else gates it. POLYGON_INDICES is retired and stays: a
|
|
8
|
+
* script saved with a pin on it must keep reading unserved, never unknown. */
|
|
9
|
+
export declare const WRUN_PIN_UNSERVED_EXCHANGES: readonly ["POLYGON_INDICES", "INDICES_OTC"];
|
|
9
10
|
/** A pin on a venue word the chart's lanes cannot ask (`wrunPinVenueVerdict` 'unknown'): the sheet
|
|
10
11
|
* contract's code (om's WRUN_PIN_VENUE_UNKNOWN_CODE; the shared host this chart loads does not
|
|
11
12
|
* carry it yet), refused before any fetch as a failed run. */
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
* on a session venue (`wrun_pin_session_interval_unserved`: a 3d candle there groups trading days
|
|
18
18
|
* and would be confirmed early). An own-market leg carries no `market` and is never a pin (the
|
|
19
19
|
* display wall decides the chart's own venue, `isKScriptDisplayBlockedOnExchange`).
|
|
20
|
-
* - An index venue (`WRUN_PIN_UNSERVED_EXCHANGES`:
|
|
20
|
+
* - An index venue (`WRUN_PIN_UNSERVED_EXCHANGES`: the index and yield venue, and the retired
|
|
21
|
+
* POLYGON_INDICES so a saved pin on it stays unserved) is UNSERVED until the data
|
|
21
22
|
* service serves index series to scripts (WRUN-CAPS-BACKEND-REQUEST.md, ask 2a: the directory
|
|
22
23
|
* still holds the index rows out): the leg is soft-refused per input the way the lane refusals
|
|
23
24
|
* are, never fetched, never in the live context, its inputs reading their missing fill while a
|
|
@@ -54,14 +55,17 @@ import { Exchange } from '@orangecharts/orange-v2-pb-common';
|
|
|
54
55
|
import { delimiter } from '../../constants/data-source.constants.js';
|
|
55
56
|
import { Intervals } from '../../constants/interval.constants.js';
|
|
56
57
|
import { checkIsIndexMode } from '../chart/index-mode.util.js';
|
|
58
|
+
import { INDEX_OTC_EXCHANGES } from '../chart/index-otc.leaf.js';
|
|
59
|
+
import { PUBLISHER_ONLY_EXCHANGES } from '../../constants/economic.constants.js';
|
|
57
60
|
import { normalizeLegacyExchange } from '../chart/legacy-exchange.leaf.js';
|
|
58
61
|
import { extractTokensFromTransformations, parsedTransformations } from '../common/transformations.util.js';
|
|
59
62
|
import { wrunChartHostEnv } from '../../host-env.js';
|
|
60
63
|
import { attachWrunRefusal, wrunAuthorRuleSeed } from './wrun-refusal.util.js';
|
|
61
64
|
/** The venues the gateway serves no series for to scripts yet: a pin on one is soft-refused per
|
|
62
65
|
* input with a `WRUN_LEG_UNSERVED` row naming why (never silently NaN). Remove a venue here the
|
|
63
|
-
* moment the gateway lists it; nothing else gates it.
|
|
64
|
-
|
|
66
|
+
* moment the gateway lists it; nothing else gates it. POLYGON_INDICES is retired and stays: a
|
|
67
|
+
* script saved with a pin on it must keep reading unserved, never unknown. */
|
|
68
|
+
export const WRUN_PIN_UNSERVED_EXCHANGES = ['POLYGON_INDICES', ...INDEX_OTC_EXCHANGES];
|
|
65
69
|
/** A pin on a venue word the chart's lanes cannot ask (`wrunPinVenueVerdict` 'unknown'): the sheet
|
|
66
70
|
* contract's code (om's WRUN_PIN_VENUE_UNKNOWN_CODE; the shared host this chart loads does not
|
|
67
71
|
* carry it yet), refused before any fetch as a failed run. */
|
|
@@ -117,7 +121,10 @@ function wrunPinVenueIsSessionGrid(exchange) {
|
|
|
117
121
|
* rewritten: wrun-pin-spelling.util respells the run's copy). Exact, as the wire reads the word. */
|
|
118
122
|
export function wrunPinVenueOnWire(exchange) {
|
|
119
123
|
const code = Exchange[exchange];
|
|
120
|
-
return (typeof code === 'number' &&
|
|
124
|
+
return (typeof code === 'number' &&
|
|
125
|
+
code !== Exchange.UNKNOWN_EXCHANGE &&
|
|
126
|
+
!PUBLISHER_ONLY_EXCHANGES.has(exchange) &&
|
|
127
|
+
normalizeLegacyExchange(exchange) === exchange);
|
|
121
128
|
}
|
|
122
129
|
/** What the chart does with a pin on `exchange`: `refused` (a CME Group venue the run's facts do not
|
|
123
130
|
* open, by name, the run does not start), `unserved` (an index venue the gateway does not serve to
|
|
@@ -302,6 +302,10 @@ export declare function wrunAuthorRuleSeed(code: string, out?: WrunRefusalOut):
|
|
|
302
302
|
/** The code of an engine trap no runtime row explains (`RuntimeError: memory access out of bounds`): the record and
|
|
303
303
|
* the events name it, and its cause reads `other`, never `none` (nothing explains which line of the code broke). */
|
|
304
304
|
export declare const WRUN_ENGINE_TRAP_CODE = "engine_trap";
|
|
305
|
+
/** The ONE record of a refused tape interval, the browser lane's (wrun-overlay-run.util
|
|
306
|
+
* `assertWrunTapeServedOnInterval`) and the cloud's: a calendar chart is coarser than the tape serves, a typed
|
|
307
|
+
* candle size (20m, 2d) sits on no rung the tape could name, any other (one second) is finer. */
|
|
308
|
+
export declare function wrunTapeIntervalSeed(chartInterval: string): WrunRefusalSeed;
|
|
305
309
|
/**
|
|
306
310
|
* The record seed of a refusal the cloud answered, by its code and the facts its frame carried
|
|
307
311
|
* (wrun-hosted-wire-caps `WrunFrameRefusal`), never its sentence: the no-candles answer is the browser
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
* name the cause the record names.
|
|
47
47
|
*/
|
|
48
48
|
import { Intervals } from '../../constants/interval.constants.js';
|
|
49
|
+
import { isTypedWidth } from '../../constants/typed-width.leaf.js';
|
|
49
50
|
import { isGateProvider } from '../../workers/constants/socket-slots.js';
|
|
50
51
|
import { isCalendarIntervalLabel } from '../chart/calendar-interval.util.js';
|
|
51
52
|
import { walledVenueOf } from '../v2/gate-plane.util.js';
|
|
@@ -239,6 +240,10 @@ const VARIANTS = {
|
|
|
239
240
|
'interval-unserved': {
|
|
240
241
|
fine: row('wrun.refusal.sentence.intervalUnserved', 'wrun.refusal.chip.intervalUnserved', ['feed', 'interval', 'chartInterval'], { severity: 'paused' }),
|
|
241
242
|
coarse: row('wrun.refusal.sentence.intervalTooCoarse', 'wrun.refusal.chip.intervalTooCoarse', ['feed', 'interval', 'chartInterval'], { severity: 'paused' }),
|
|
243
|
+
// A typed candle size (20m, 2d): no finer or coarser rung to name, so the way out is the interval list.
|
|
244
|
+
typed: row('wrun.refusal.sentence.intervalTyped', 'wrun.refusal.chip.intervalTyped', ['feed', 'chartInterval'], {
|
|
245
|
+
severity: 'paused',
|
|
246
|
+
}),
|
|
242
247
|
// The Indicator itself needs a chart this fine (TPO letters a coarser bar cannot place): it
|
|
243
248
|
// names no feed, the Indicator's name is the subject.
|
|
244
249
|
'at-most': row('wrun.refusal.sentence.intervalAtMost', 'wrun.refusal.chip.intervalAtMost', ['interval', 'chartInterval'], { severity: 'paused' }),
|
|
@@ -282,13 +287,18 @@ const VARIANTS = {
|
|
|
282
287
|
// The same wall on a US stocks tape the run may not read (kscript-venue-policy `isUserKScriptBlockedOnExchange`):
|
|
283
288
|
// `venue` names the tape's listing venue (NASDAQ), never CME.
|
|
284
289
|
stocks: row('wrun.refusal.sentence.stocksWall', 'wrun.refusal.chip.stocksWall', ['venue'], { severity: 'paused' }),
|
|
290
|
+
// The US stocks plane's server lane refusing a viewer with no US stock data (`stocks_entitlement_required`): the
|
|
291
|
+
// account's registration words, the tape's chip.
|
|
292
|
+
'stocks-access': row('indicators.stocks.registrationRequired', 'wrun.refusal.chip.stocksWall', ['venue'], {
|
|
293
|
+
severity: 'paused',
|
|
294
|
+
}),
|
|
285
295
|
// The CME chain wall: works-on (CME markets), never the switch OUT, a Binance perp where the chain is walled again.
|
|
286
296
|
chain: row('wrun.refusal.sentence.cmeChain', 'wrun.refusal.chip.cmeChain', [], {
|
|
287
297
|
severity: 'paused',
|
|
288
298
|
out: { kind: 'works-on' },
|
|
289
299
|
}),
|
|
290
300
|
// CME user studies (the `cme-user-scripts` gate, kscript-venue-policy.util `isCmeUserScriptRun`): a hosted (Cloud)
|
|
291
|
-
// run on CME
|
|
301
|
+
// run on CME while `cme-lanes` is dark (reversed 2026-11-11), or a server `cme_lane_unavailable`.
|
|
292
302
|
cloud: row('wrun.refusal.sentence.cmeCloud', 'wrun.refusal.chip.cmeCloud', [], { severity: 'paused' }),
|
|
293
303
|
// A running study the gate stopped in place when the viewer's access moved (the account, the CME data terms, the
|
|
294
304
|
// served access, the session): its source and settings stay.
|
|
@@ -300,8 +310,9 @@ const VARIANTS = {
|
|
|
300
310
|
'studies-off': row('wrun.refusal.sentence.cmeStudiesOff', 'wrun.refusal.chip.cmeStudiesOff', [], {
|
|
301
311
|
severity: 'paused',
|
|
302
312
|
}),
|
|
303
|
-
// A strategy sheet on a CME chart, whoever wrote it (Kyle 2026-10-29
|
|
304
|
-
//
|
|
313
|
+
// A strategy sheet on a CME chart, whoever wrote it, while the `cme-lanes` flag is dark (Kyle 2026-10-29,
|
|
314
|
+
// kscript-venue-policy `isCmeStrategyClosed`): strategy testing is no CME chart study, so the run head refuses it
|
|
315
|
+
// before any fetch (wrun-overlay-run.util, `WrunStrategyVenueBlockedError`).
|
|
305
316
|
strategy: row('wrun.refusal.sentence.cmeStrategy', 'wrun.refusal.chip.cmeStrategy', [], { severity: 'paused' }),
|
|
306
317
|
// A sheet with an input read by the chart's coin on a prediction market (Kyle 2026-10-29): the run head refuses it
|
|
307
318
|
// before any fetch (wrun-overlay-run.util, `WrunPredictionMarketBlockedError`; the rule is
|
|
@@ -842,6 +853,66 @@ function numberMatch(message, re) {
|
|
|
842
853
|
const n = Number(match[1]);
|
|
843
854
|
return Number.isFinite(n) ? n : undefined;
|
|
844
855
|
}
|
|
856
|
+
/**
|
|
857
|
+
* The governed planes' server-lane codes (the governed-lanes cutover: `cme-lanes`, `stocks-lanes`), `<plane>_<reason>`
|
|
858
|
+
* as kscript-backend answers them for a hosted run or a protected script, read like the OPRA lane's codes
|
|
859
|
+
* (opra-alert-refusal.util: the code itself, or the code named in the words). Every one maps onto a row that already
|
|
860
|
+
* has words, so a lit flag over a server lane that is still off shows copy, never an empty pane.
|
|
861
|
+
*/
|
|
862
|
+
const WRUN_GOVERNED_LANE_CODE = '(cme|stocks)_(entitlement_required|realtime_required|entitlement_changed|tier_changed|lane_unavailable|' +
|
|
863
|
+
'upstream_unavailable|actor_required|grant_refused)';
|
|
864
|
+
const WRUN_GOVERNED_LANE_CODE_RE = new RegExp(`\\b${WRUN_GOVERNED_LANE_CODE}\\b`);
|
|
865
|
+
const WRUN_GOVERNED_LANE_CODE_EXACT_RE = new RegExp(`^${WRUN_GOVERNED_LANE_CODE}$`);
|
|
866
|
+
/** The governed plane and reason of a server-lane code, or undefined for any other code. */
|
|
867
|
+
function wrunGovernedLaneCodeOf(code) {
|
|
868
|
+
const match = WRUN_GOVERNED_LANE_CODE_EXACT_RE.exec(code);
|
|
869
|
+
return match === null
|
|
870
|
+
? undefined
|
|
871
|
+
: { plane: match[1], reason: match[2] };
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* The record seed of a governed plane's server-lane code (`wrunGovernedLaneCodeOf`), onto the rows that already hold
|
|
875
|
+
* its words: the viewer holds no access (`entitlement_required`: CME's terms row, its pin the market the frame names,
|
|
876
|
+
* else the chart's, else CME; the stocks plane's registration row, its venue the tape's), the access or
|
|
877
|
+
* the served tier moved under a running study (`entitlement_changed`, the `tier_changed` event: "Access changed; the
|
|
878
|
+
* study stopped"), the plane's server lane is off (`lane_unavailable`: CME's browser-only row, the stocks tape's wall
|
|
879
|
+
* by its venue), the plane's upstream did not answer (`upstream_unavailable`: the envelope's market-data row, Retry).
|
|
880
|
+
* The viewer's access does not cover real time there (`realtime_required`) reads as `entitlement_required` does; a
|
|
881
|
+
* server-side fault the viewer cannot fix (`actor_required`: the run was not sent as an owner; `grant_refused`: its
|
|
882
|
+
* grant was refused) reads as the market-data row, Retry. Undefined for any other code.
|
|
883
|
+
*/
|
|
884
|
+
function wrunGovernedLaneSeed(code, value, ctx) {
|
|
885
|
+
const governed = wrunGovernedLaneCodeOf(code);
|
|
886
|
+
if (governed === undefined)
|
|
887
|
+
return undefined;
|
|
888
|
+
const { plane, reason } = governed;
|
|
889
|
+
switch (reason) {
|
|
890
|
+
case 'entitlement_required':
|
|
891
|
+
case 'realtime_required':
|
|
892
|
+
return plane === 'cme'
|
|
893
|
+
? { cls: 'pin-refused', variant: 'terms', params: { pin: value || ctx?.chart?.symbol || 'CME' } }
|
|
894
|
+
: {
|
|
895
|
+
cls: 'cme-wall',
|
|
896
|
+
variant: 'stocks-access',
|
|
897
|
+
params: { venue: stocksTapeVenueLabel(value || ctx?.chart?.exchange || '') || 'US' },
|
|
898
|
+
};
|
|
899
|
+
case 'entitlement_changed':
|
|
900
|
+
case 'tier_changed':
|
|
901
|
+
return { cls: 'cme-wall', variant: 'stopped' };
|
|
902
|
+
case 'lane_unavailable':
|
|
903
|
+
if (plane === 'cme')
|
|
904
|
+
return { cls: 'cme-wall', variant: 'cloud' };
|
|
905
|
+
return {
|
|
906
|
+
cls: 'cme-wall',
|
|
907
|
+
variant: 'stocks',
|
|
908
|
+
params: { venue: stocksTapeVenueLabel(value || ctx?.chart?.exchange || '') || 'US' },
|
|
909
|
+
};
|
|
910
|
+
case 'upstream_unavailable':
|
|
911
|
+
case 'actor_required':
|
|
912
|
+
case 'grant_refused':
|
|
913
|
+
return { cls: 'service-no-answer', variant: 'market-data' };
|
|
914
|
+
}
|
|
915
|
+
}
|
|
845
916
|
/** The seed a stable code in the message names, or undefined. */
|
|
846
917
|
function seedFromCodes(message, ctx) {
|
|
847
918
|
if (message.includes('wrun_cell_block_too_large')) {
|
|
@@ -886,6 +957,10 @@ function seedFromCodes(message, ctx) {
|
|
|
886
957
|
return wrunAuthorRuleSeed(optionsCode);
|
|
887
958
|
}
|
|
888
959
|
}
|
|
960
|
+
// A governed plane's server-lane code (the governed-lanes cutover, `<plane>_<reason>`) named in the words.
|
|
961
|
+
const governed = WRUN_GOVERNED_LANE_CODE_RE.exec(message)?.[0];
|
|
962
|
+
if (governed !== undefined)
|
|
963
|
+
return wrunGovernedLaneSeed(governed, undefined, ctx);
|
|
889
964
|
// Unseeded, the words are a server host's (the browser lane always attaches its seed): the server lanes read no CME.
|
|
890
965
|
if (message.includes('wrun_pin_venue_refused')) {
|
|
891
966
|
const pin = /\bwrun_pin_venue_refused: (\S+) is CME\b/.exec(message)?.[1] ??
|
|
@@ -961,13 +1036,17 @@ const TAB_FULL_REFUSAL_CODES = new Set([
|
|
|
961
1036
|
'wrun_foreign_sources_over_cap',
|
|
962
1037
|
'wrun_instances_over_cap',
|
|
963
1038
|
]);
|
|
964
|
-
/** The
|
|
965
|
-
* `assertWrunTapeServedOnInterval`): a calendar chart is coarser than the tape serves,
|
|
966
|
-
* (one second) finer. */
|
|
967
|
-
function
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1039
|
+
/** The ONE record of a refused tape interval, the browser lane's (wrun-overlay-run.util
|
|
1040
|
+
* `assertWrunTapeServedOnInterval`) and the cloud's: a calendar chart is coarser than the tape serves, a typed
|
|
1041
|
+
* candle size (20m, 2d) sits on no rung the tape could name, any other (one second) is finer. */
|
|
1042
|
+
export function wrunTapeIntervalSeed(chartInterval) {
|
|
1043
|
+
if (isCalendarIntervalLabel(chartInterval)) {
|
|
1044
|
+
return { cls: 'interval-unserved', variant: 'coarse', params: { feed: 'tape', interval: '1M', chartInterval } };
|
|
1045
|
+
}
|
|
1046
|
+
if (isTypedWidth(chartInterval)) {
|
|
1047
|
+
return { cls: 'interval-unserved', variant: 'typed', params: { feed: 'tape', chartInterval } };
|
|
1048
|
+
}
|
|
1049
|
+
return { cls: 'interval-unserved', variant: 'fine', params: { feed: 'tape', interval: '1m', chartInterval } };
|
|
971
1050
|
}
|
|
972
1051
|
/**
|
|
973
1052
|
* The record seed of a refusal the cloud answered, by its code and the facts its frame carried
|
|
@@ -998,7 +1077,7 @@ export function wrunCloudRefusalSeed(code, facts = {}, ctx) {
|
|
|
998
1077
|
const value = chart ? undefined : facts.value;
|
|
999
1078
|
const chartInterval = chart?.interval ?? value;
|
|
1000
1079
|
if (code === 'wrun_tape_interval_unsupported' && chartInterval)
|
|
1001
|
-
return
|
|
1080
|
+
return wrunTapeIntervalSeed(chartInterval);
|
|
1002
1081
|
if (TAB_FULL_REFUSAL_CODES.has(code)) {
|
|
1003
1082
|
const params = { code };
|
|
1004
1083
|
if (facts.limit !== undefined && Number.isFinite(facts.limit))
|
|
@@ -1019,13 +1098,16 @@ export function wrunCloudRefusalSeed(code, facts = {}, ctx) {
|
|
|
1019
1098
|
if (code === 'wrun_options_chain_venue_unavailable' && coin !== '' && venue !== undefined) {
|
|
1020
1099
|
return { cls: 'no-options', variant: 'venue', params: { venue, coin } };
|
|
1021
1100
|
}
|
|
1022
|
-
// A pin on CME data names the venue the frame names, else CME; a server host
|
|
1101
|
+
// A pin on CME data names the venue the frame names, else CME; a server host's pin refusal reads `cloud`.
|
|
1023
1102
|
if (code === 'wrun_pin_venue_refused') {
|
|
1024
1103
|
return { cls: 'pin-refused', variant: 'cloud', params: { pin: facts.value ?? 'CME' } };
|
|
1025
1104
|
}
|
|
1026
1105
|
if (code === 'wrun_pin_venue_unknown' && facts.value) {
|
|
1027
1106
|
return { cls: 'run-failed', variant: 'pin-venue-unknown', params: { venue: facts.value } };
|
|
1028
1107
|
}
|
|
1108
|
+
const governed = wrunGovernedLaneSeed(code, facts.value, ctx);
|
|
1109
|
+
if (governed !== undefined)
|
|
1110
|
+
return governed;
|
|
1029
1111
|
return { cls: 'run-failed', variant: 'refused', params: { code } };
|
|
1030
1112
|
}
|
|
1031
1113
|
/** The record seed of a presentation family a source left out of a batch that drew (a note: the rest
|
|
@@ -1051,6 +1133,11 @@ function cloudRefusalOfError(error, message, answer) {
|
|
|
1051
1133
|
const coded = socketRefusalOf(error) ?? wrunFrameRefusalOf(message);
|
|
1052
1134
|
if (coded !== undefined)
|
|
1053
1135
|
return coded;
|
|
1136
|
+
// A governed plane's server-lane code rides the frame's words (`[VENUE_NOT_ALLOWED] ... cme_lane_unavailable`, the
|
|
1137
|
+
// OPRA lane's shape): it names the refusal before the frame's own code does.
|
|
1138
|
+
const governed = WRUN_GOVERNED_LANE_CODE_RE.exec(message)?.[0];
|
|
1139
|
+
if (governed !== undefined)
|
|
1140
|
+
return { code: governed };
|
|
1054
1141
|
if (answer?.frameCode !== undefined && (answer.memory !== undefined || answer.unknownCode === true)) {
|
|
1055
1142
|
return { code: answer.frameCode };
|
|
1056
1143
|
}
|
|
@@ -1281,7 +1368,9 @@ function variantFor(seed, ctx) {
|
|
|
1281
1368
|
return ctx.chart?.cme ? 'unresolved' : 'chain';
|
|
1282
1369
|
}
|
|
1283
1370
|
case 'interval-unserved':
|
|
1284
|
-
return declared === 'coarse' || declared === '
|
|
1371
|
+
return declared === 'coarse' || declared === 'typed' || declared === 'at-most' || declared === 'exact'
|
|
1372
|
+
? declared
|
|
1373
|
+
: 'fine';
|
|
1285
1374
|
case 'service-no-answer':
|
|
1286
1375
|
if (declared !== undefined && variantSpec('service-no-answer', declared))
|
|
1287
1376
|
return declared;
|
|
@@ -76,9 +76,11 @@ export declare class WrunVenueBlockedError extends WrunRegistryAddRefusedError {
|
|
|
76
76
|
}
|
|
77
77
|
export declare function isWrunVenueBlockedError(error: unknown): error is WrunVenueBlockedError;
|
|
78
78
|
/** Thrown at the head of the WRUN run pass for a strategy sheet on a CME
|
|
79
|
-
* chart
|
|
80
|
-
*
|
|
81
|
-
*
|
|
79
|
+
* chart while the `cme-lanes` cutover flag is dark (kscript-venue-policy
|
|
80
|
+
* `isCmeStrategyClosed`): strategy testing is no CME chart study, so every
|
|
81
|
+
* strategy is refused there, an OpenMarket package's included (Kyle
|
|
82
|
+
* 2026-10-29), before anything is fetched or computed. Under a lit flag a
|
|
83
|
+
* strategy sheet on a CME chart runs through the ordinary CME study rule. A venue refusal like the wall's
|
|
82
84
|
* (the venue policy's own message, so the kScript error envelope reads
|
|
83
85
|
* VENUE_BLOCKED, and the same held settle: the run after the chart leaves
|
|
84
86
|
* CME computes), with one difference: no wall painter stands behind it (the
|
|
@@ -95,9 +95,11 @@ export function isWrunVenueBlockedError(error) {
|
|
|
95
95
|
return error instanceof WrunVenueBlockedError;
|
|
96
96
|
}
|
|
97
97
|
/** Thrown at the head of the WRUN run pass for a strategy sheet on a CME
|
|
98
|
-
* chart
|
|
99
|
-
*
|
|
100
|
-
*
|
|
98
|
+
* chart while the `cme-lanes` cutover flag is dark (kscript-venue-policy
|
|
99
|
+
* `isCmeStrategyClosed`): strategy testing is no CME chart study, so every
|
|
100
|
+
* strategy is refused there, an OpenMarket package's included (Kyle
|
|
101
|
+
* 2026-10-29), before anything is fetched or computed. Under a lit flag a
|
|
102
|
+
* strategy sheet on a CME chart runs through the ordinary CME study rule. A venue refusal like the wall's
|
|
101
103
|
* (the venue policy's own message, so the kScript error envelope reads
|
|
102
104
|
* VENUE_BLOCKED, and the same held settle: the run after the chart leaves
|
|
103
105
|
* CME computes), with one difference: no wall painter stands behind it (the
|
|
@@ -257,6 +257,15 @@ function payloadTransportFor(module, payloadSettings, owner) {
|
|
|
257
257
|
};
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
+
/** Two batches' governed-plane marks joined (`WrunRowBatch.governed`): every plane either names, the later batch's
|
|
261
|
+
* receipt where both name one. Undefined while neither names any. */
|
|
262
|
+
function wrunGovernedJoined(earlier, later) {
|
|
263
|
+
if (earlier === undefined)
|
|
264
|
+
return later;
|
|
265
|
+
if (later === undefined)
|
|
266
|
+
return earlier;
|
|
267
|
+
return { ...earlier, ...later };
|
|
268
|
+
}
|
|
260
269
|
/** The whole window a session spans (both bounds open). */
|
|
261
270
|
const WRUN_SOCKET_SESSION_WINDOW = { fromMs: Number.NEGATIVE_INFINITY, toMs: Number.POSITIVE_INFINITY };
|
|
262
271
|
/** The bars a window without finite bounds asks for: the replay lane's window through its cutoff while the chart
|
|
@@ -329,7 +338,14 @@ class SocketWrunRowSourceAdapter {
|
|
|
329
338
|
catch (error) {
|
|
330
339
|
throw this.module !== undefined ? this.module.wrunSocketPagingFailure(error) : error;
|
|
331
340
|
}
|
|
332
|
-
|
|
341
|
+
// The run's governed-plane mark is kept across the create-then-range paging: every plane the create's answer named
|
|
342
|
+
// rides the paged batch too (the source's mark is sticky for the run; this keeps it whatever the page answered).
|
|
343
|
+
const governed = wrunGovernedJoined(created.governed, whole.governed);
|
|
344
|
+
return {
|
|
345
|
+
...whole,
|
|
346
|
+
...(created.sheet !== undefined && whole.sheet === undefined ? { sheet: created.sheet } : {}),
|
|
347
|
+
...(governed !== undefined ? { governed } : {}),
|
|
348
|
+
};
|
|
333
349
|
}
|
|
334
350
|
async range(window) {
|
|
335
351
|
const source = await this.loaded();
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* lanes; no source carries a sentence. A refused family leaves the sheet the batch delivered
|
|
22
22
|
* (`wrunRowBatchDeliveredSheet`, the one rule the pass reads every batch by).
|
|
23
23
|
*/
|
|
24
|
-
import type { WrunHostedGrid, WrunHostedRefusal, WrunHostedWire } from './wrun-hosted-wire.util.js';
|
|
24
|
+
import type { WrunGovernedMark, WrunHostedGrid, WrunHostedRefusal, WrunHostedWire } from './wrun-hosted-wire.util.js';
|
|
25
25
|
import type { WrunOpraServedReceipt } from './wrun-opra-lane.util.js';
|
|
26
26
|
import type { RuntimeDiagnostic } from '../../interfaces/kscript-diagnostics.interface.js';
|
|
27
27
|
import type { WrunIndicatorMetadata } from '../../interfaces/wrun-runtime.interface.js';
|
|
@@ -89,6 +89,13 @@ export interface WrunRowBatch {
|
|
|
89
89
|
* batch the session's newest receipt (absent once a result names no OPRA read, or no tier); on a live frame, the
|
|
90
90
|
* frame's own, present only when it carried the mark and a tier. Absent: no tier word, never the account's tier. */
|
|
91
91
|
opraServed?: WrunOpraServedReceipt;
|
|
92
|
+
/** The cloud run's governed-plane mark (the governed-lanes cutover's cross-repo contract, the hosted reply's
|
|
93
|
+
* `output.wrunGoverned`): one entry per governed plane (`cme`, `stocks`) the run read. Its `cme` entry stamps the
|
|
94
|
+
* overlay's CME provenance before any row lands (wrun-cloud-cme-stamp.util): no CME-derived row reaches Kata or any
|
|
95
|
+
* AI feature. Sticky for the run: once a batch or a frame of a run carried a plane, every later batch and frame of
|
|
96
|
+
* that run carries it (paging, re-range, reconnect). Fail closed: a mark the source could not read names every
|
|
97
|
+
* plane. Absent from a source that does not speak it (the browser lanes stamp their own runs). */
|
|
98
|
+
governed?: WrunGovernedMark;
|
|
92
99
|
/** On a live frame only, with no rows: the cloud served the session's OPRA rows at another tier than the rows the
|
|
93
100
|
* session held (a downgrade or an upgrade of the owner's tier, the receipt's transition). The source dropped
|
|
94
101
|
* every row it held, its coverage and its run-level keys; the overlay takes its rows off the chart, ends its live
|
|
@@ -117,7 +117,7 @@ export function wrunFeedMissingDiagnostics(feeds, ctx) {
|
|
|
117
117
|
/** The technical words of one input on an unserved leg: the alerts engine's for the same refusal
|
|
118
118
|
* (its wrun-input-plan), so a script reads one reason on every host. */
|
|
119
119
|
function unservedInputMessage(input, leg) {
|
|
120
|
-
return (`Input '${input}' pins ${leg.symbol} on ${leg.exchange}; index
|
|
120
|
+
return (`Input '${input}' pins ${leg.symbol} on ${leg.exchange}; index and yield series are not served yet: ` +
|
|
121
121
|
`the gateway holds ${leg.exchange} out of the market directory until the backend opens it, ` +
|
|
122
122
|
`so the input reads its missing fill (NaN) on every bar.`);
|
|
123
123
|
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* registry and dedupe table.
|
|
33
33
|
*/
|
|
34
34
|
import type { WrunChartHandle } from '../../host-ports.types.js';
|
|
35
|
-
import type
|
|
35
|
+
import { type WrunIndicatorMetadata, type WrunModuleHandle, type WrunOutputRow } from '../../interfaces/wrun-runtime.interface.js';
|
|
36
36
|
import type { WrunCellRows } from './wrun-canvases.util.js';
|
|
37
37
|
import { type WrunStrategyRunInput } from './wrun-host.service.js';
|
|
38
38
|
import { type WrunInputRow } from './wrun-pack.util.js';
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
*/
|
|
34
34
|
import { ensureWrunChartHostSharedHost, wrunChartHostEnv } from '../../host-env.js';
|
|
35
35
|
import { KSCRIPT_STALLED_CODE } from '../../constants/scriptEditor/execution.constants.js';
|
|
36
|
+
import { wrunTrapOf, } from '../../interfaces/wrun-runtime.interface.js';
|
|
37
|
+
import { attachWrunTrapSeed } from './wrun-trap-replay.util.js';
|
|
36
38
|
import { isWrunBandedBookSource } from './wrun-book-bands.leaf.js';
|
|
37
39
|
import { wrunHandlesOf } from './wrun-handles.util.js';
|
|
38
40
|
import { getWrunBrowserHost } from './wrun-host.service.js';
|
|
@@ -335,9 +337,12 @@ export class SandboxWrunRowSource {
|
|
|
335
337
|
// The session lock this call's live open holds (released by the landing, or below on a failure).
|
|
336
338
|
let release;
|
|
337
339
|
let epoch;
|
|
340
|
+
// What the editor's trap replay needs from the plan (declared inside the try): the request and the live flag.
|
|
341
|
+
let seed;
|
|
338
342
|
try {
|
|
339
343
|
this.assertStanding(indicatorId);
|
|
340
344
|
const plan = await this.host.prepare(window, record);
|
|
345
|
+
seed = { request: plan.request, live: plan.live };
|
|
341
346
|
this.assertStanding(indicatorId);
|
|
342
347
|
let rows;
|
|
343
348
|
if (plan.live) {
|
|
@@ -378,6 +383,10 @@ export class SandboxWrunRowSource {
|
|
|
378
383
|
release();
|
|
379
384
|
}
|
|
380
385
|
this.lowerHold(hold);
|
|
386
|
+
// A trap in this full run or live start: the replay's seed rides the rejection (references only).
|
|
387
|
+
const trap = wrunTrapOf(error);
|
|
388
|
+
if (seed !== undefined && trap !== undefined)
|
|
389
|
+
attachWrunTrapSeed(error, seed, trap);
|
|
381
390
|
throw error;
|
|
382
391
|
}
|
|
383
392
|
}
|
|
@@ -26,9 +26,10 @@ export interface WrunSessionLanesView {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* The one rule for the dollar lane: the US dollars one contract of the chart's market is worth per whole point of its
|
|
29
|
-
* price (CME_ROOT_SPECS: NQ1! and NQZ6 read NQ, 20) on a CME Group futures market whose root is
|
|
29
|
+
* price (CME_ROOT_SPECS: NQ1! and NQZ6 read NQ, 20) on a CME Group futures market whose root is priced in US dollars,
|
|
30
30
|
* so a side of a session-fed bar prices at contracts x this x (high + low + close) / 3. Undefined everywhere else (a
|
|
31
|
-
* root off the table, a cents-
|
|
31
|
+
* root off the table, a cents-priced grain kept off the dollar features, an option contract, a market off the CME
|
|
32
|
+
* family): a script declaring the
|
|
32
33
|
* dollar lane there is ineligible and reads OpenMarket's rows whole.
|
|
33
34
|
*/
|
|
34
35
|
export declare function wrunSessionDollarPointValue(market: WrunSessionLanesView['market']): number | undefined;
|
|
@@ -26,9 +26,10 @@ function asksOwnMarket(acquisition, market) {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* The one rule for the dollar lane: the US dollars one contract of the chart's market is worth per whole point of its
|
|
29
|
-
* price (CME_ROOT_SPECS: NQ1! and NQZ6 read NQ, 20) on a CME Group futures market whose root is
|
|
29
|
+
* price (CME_ROOT_SPECS: NQ1! and NQZ6 read NQ, 20) on a CME Group futures market whose root is priced in US dollars,
|
|
30
30
|
* so a side of a session-fed bar prices at contracts x this x (high + low + close) / 3. Undefined everywhere else (a
|
|
31
|
-
* root off the table, a cents-
|
|
31
|
+
* root off the table, a cents-priced grain kept off the dollar features, an option contract, a market off the CME
|
|
32
|
+
* family): a script declaring the
|
|
32
33
|
* dollar lane there is ineligible and reads OpenMarket's rows whole.
|
|
33
34
|
*/
|
|
34
35
|
export function wrunSessionDollarPointValue(market) {
|
|
@@ -43,11 +43,18 @@ export interface WrunSettingWords {
|
|
|
43
43
|
* own, a zone moves its clock); UTC when absent. */
|
|
44
44
|
zoneOffsetMs?: DisplayOffset;
|
|
45
45
|
}
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
/** True when a choice is a line style choice: it has options and every one of them (its label, as the row shows
|
|
47
|
+
* it) is a line style word, case ignored. A choice that merely holds one such word among others (a mark look
|
|
48
|
+
* labelled "Solid" beside "Glass") is not. */
|
|
49
|
+
export declare function wrunIsLineStyleChoice(labels: ReadonlyArray<string>): boolean;
|
|
50
|
+
/** A choice label as the viewer reads it: a platform word in the viewer's
|
|
51
|
+
* language when the surface passes its words ("chart" always; a line style
|
|
52
|
+
* word only when `lineStyleChoice` says the choice is a line style choice:
|
|
53
|
+
* `wrunIsLineStyleChoice` over its labels, or a Style row's `lineStyle`),
|
|
54
|
+
* any other label as written. A look option labelled "Solid" keeps "Solid".
|
|
55
|
+
* Display only: a stored value, a persisted label and every lookup by label
|
|
56
|
+
* keep the original word. */
|
|
57
|
+
export declare function wrunChoiceWord(label: string, words?: WrunSettingWords, lineStyleChoice?: boolean): string;
|
|
51
58
|
/** The words of a coded setting (a choice, a multi, a time, a session clock);
|
|
52
59
|
* undefined for every other kind, which a surface prints its own way. */
|
|
53
60
|
export declare function wrunCodedWords(shape: WrunWordsShape, value: unknown, words?: WrunSettingWords): string | undefined;
|