@orangecharts/wrun-chart-host 0.10.0 → 0.11.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.
Files changed (152) hide show
  1. package/README.md +1 -0
  2. package/dist/constants/feature-flags.constants.d.ts +9 -0
  3. package/dist/constants/feature-flags.constants.js +67 -4
  4. package/dist/constants/governed-exchanges.constants.d.ts +12 -0
  5. package/dist/constants/governed-exchanges.constants.js +16 -0
  6. package/dist/constants/option-venues.constants.d.ts +2 -2
  7. package/dist/host-env.d.ts +1 -9
  8. package/dist/host-ports.types.d.ts +36 -7
  9. package/dist/index.d.ts +7 -1
  10. package/dist/index.js +7 -1
  11. package/dist/indicators/controls/tpo-session.util.d.ts +36 -13
  12. package/dist/indicators/controls/tpo-session.util.js +217 -236
  13. package/dist/interfaces/cancel-reason.interface.d.ts +1 -1
  14. package/dist/interfaces/cme-realtime.interface.d.ts +16 -9
  15. package/dist/interfaces/cme-realtime.interface.js +6 -3
  16. package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
  17. package/dist/interfaces/opra-realtime.interface.d.ts +1 -5
  18. package/dist/interfaces/prediction-market.interface.d.ts +7 -0
  19. package/dist/interfaces/stocks-realtime.interface.d.ts +57 -0
  20. package/dist/interfaces/stocks-realtime.interface.js +32 -0
  21. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +48 -117
  22. package/dist/kscript-data/controls/live-trades-merge.util.js +97 -207
  23. package/dist/market-data/billing.interface.d.ts +86 -12
  24. package/dist/market-data/billing.interface.js +23 -4
  25. package/dist/market-data/venue.d.ts +65 -2
  26. package/dist/market-data/venues/index.d.ts +135 -5
  27. package/dist/market-data/venues/index.js +2 -1
  28. package/dist/market-data/venues/opra.contract.copy.json +3 -2
  29. package/dist/market-data/venues/opra.d.ts +2 -2
  30. package/dist/market-data/venues/opra.js +5 -2
  31. package/dist/market-data/venues/stocks.contract.copy.json +64 -0
  32. package/dist/market-data/venues/stocks.d.ts +130 -0
  33. package/dist/market-data/venues/stocks.js +117 -0
  34. package/dist/settings-templates/footprint-rows.js +35 -2
  35. package/dist/settings-templates/form-rows.d.ts +2 -1
  36. package/dist/settings-templates/indicator-fields.js +34 -4
  37. package/dist/settings-templates/tool-rules.d.ts +12 -5
  38. package/dist/settings-templates/tool-rules.js +11 -5
  39. package/dist/settings-templates/tool-tables.generated.js +4 -0
  40. package/dist/utility/chart/cme-cache-context.util.d.ts +5 -3
  41. package/dist/utility/chart/cme-cache-context.util.js +10 -6
  42. package/dist/utility/chart/cme-realtime.util.js +10 -0
  43. package/dist/utility/chart/cme-user-scripts-gate.util.d.ts +83 -0
  44. package/dist/utility/chart/cme-user-scripts-gate.util.js +142 -0
  45. package/dist/utility/chart/effective-chart-session.util.d.ts +14 -0
  46. package/dist/utility/chart/effective-chart-session.util.js +39 -0
  47. package/dist/utility/chart/host-bar-placement.util.d.ts +28 -0
  48. package/dist/utility/chart/host-bar-placement.util.js +170 -30
  49. package/dist/utility/chart/index-host-tier.util.d.ts +3 -1
  50. package/dist/utility/chart/index-host-tier.util.js +7 -2
  51. package/dist/utility/chart/index-mode-admission.util.js +25 -11
  52. package/dist/utility/chart/kscript-apply-fingerprint.util.js +1 -1
  53. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +6 -9
  54. package/dist/utility/chart/kscript-live-coalesce.util.js +8 -9
  55. package/dist/utility/chart/kscript-live-source-identity.util.d.ts +9 -0
  56. package/dist/utility/chart/kscript-live-source-identity.util.js +10 -1
  57. package/dist/utility/chart/kscript-provenance-keys.util.js +7 -0
  58. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
  59. package/dist/utility/chart/kscript-venue-policy.util.d.ts +115 -21
  60. package/dist/utility/chart/kscript-venue-policy.util.js +194 -40
  61. package/dist/utility/chart/live-bucket.util.d.ts +24 -8
  62. package/dist/utility/chart/live-bucket.util.js +85 -27
  63. package/dist/utility/chart/market-sessions.util.d.ts +83 -0
  64. package/dist/utility/chart/market-sessions.util.js +220 -0
  65. package/dist/utility/chart/marketKind.util.js +5 -0
  66. package/dist/utility/chart/mixed-mode.util.d.ts +7 -0
  67. package/dist/utility/chart/mixed-mode.util.js +14 -0
  68. package/dist/utility/chart/opra-user-scripts-gate.util.d.ts +11 -16
  69. package/dist/utility/chart/opra-user-scripts-gate.util.js +12 -28
  70. package/dist/utility/chart/rth-session.util.d.ts +9 -8
  71. package/dist/utility/chart/rth-session.util.js +23 -20
  72. package/dist/utility/chart/session-interval.util.d.ts +2 -1
  73. package/dist/utility/chart/session-interval.util.js +1 -3
  74. package/dist/utility/chart/trading-day.util.d.ts +17 -0
  75. package/dist/utility/chart/trading-day.util.js +59 -0
  76. package/dist/utility/chart/window-owner.leaf.d.ts +23 -2
  77. package/dist/utility/chart/window-owner.leaf.js +45 -3
  78. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +33 -15
  79. package/dist/utility/chart/wrun-bar-session-facts.util.js +70 -20
  80. package/dist/utility/intl-locale.util.js +5 -0
  81. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
  82. package/dist/utility/v2/gate-plane.util.d.ts +12 -3
  83. package/dist/utility/v2/gate-plane.util.js +30 -4
  84. package/dist/utility/v2/gate-session-latch.util.js +1 -1
  85. package/dist/utility/v2/stocks-governed.util.d.ts +16 -0
  86. package/dist/utility/v2/stocks-governed.util.js +34 -0
  87. package/dist/utility/wrun/derived-roots.leaf.d.ts +13 -0
  88. package/dist/utility/wrun/derived-roots.leaf.js +27 -0
  89. package/dist/utility/wrun/derived-roots.util.d.ts +1 -9
  90. package/dist/utility/wrun/derived-roots.util.js +3 -23
  91. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +4 -3
  92. package/dist/utility/wrun/run-schedule/wrun-own-candles.util.d.ts +24 -3
  93. package/dist/utility/wrun/run-schedule/wrun-own-candles.util.js +46 -10
  94. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +2 -0
  95. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +63 -16
  96. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +58 -14
  97. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +34 -11
  98. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +106 -30
  99. package/dist/utility/wrun/wrun-browser-sources.leaf.js +1 -2
  100. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +7 -4
  101. package/dist/utility/wrun/wrun-chart-market-facts.util.js +12 -8
  102. package/dist/utility/wrun/wrun-color-settings.util.d.ts +9 -0
  103. package/dist/utility/wrun/wrun-color-settings.util.js +33 -0
  104. package/dist/utility/wrun/wrun-handles.util.d.ts +7 -3
  105. package/dist/utility/wrun/wrun-handles.util.js +9 -8
  106. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +68 -0
  107. package/dist/utility/wrun/wrun-input-requirements.leaf.js +163 -7
  108. package/dist/utility/wrun/wrun-leg-close.util.d.ts +59 -23
  109. package/dist/utility/wrun/wrun-leg-close.util.js +186 -28
  110. package/dist/utility/wrun/wrun-live-intake.util.d.ts +26 -12
  111. package/dist/utility/wrun/wrun-live-intake.util.js +219 -155
  112. package/dist/utility/wrun/wrun-live-tick.util.d.ts +9 -5
  113. package/dist/utility/wrun/wrun-live-tick.util.js +130 -94
  114. package/dist/utility/wrun/wrun-market-facts.util.d.ts +13 -3
  115. package/dist/utility/wrun/wrun-market-facts.util.js +13 -3
  116. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +20 -10
  117. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +10 -5
  118. package/dist/utility/wrun/wrun-option-book-rows.util.d.ts +56 -0
  119. package/dist/utility/wrun/wrun-option-book-rows.util.js +96 -0
  120. package/dist/utility/wrun/wrun-option-views.util.d.ts +281 -20
  121. package/dist/utility/wrun/wrun-option-views.util.js +391 -50
  122. package/dist/utility/wrun/wrun-options-chain.util.d.ts +3 -3
  123. package/dist/utility/wrun/wrun-options-chain.util.js +2 -0
  124. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +15 -2
  125. package/dist/utility/wrun/wrun-overlay-drivers.util.js +13 -3
  126. package/dist/utility/wrun/wrun-overlay-recovery.util.js +3 -1
  127. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +60 -11
  128. package/dist/utility/wrun/wrun-overlay-run.util.js +529 -113
  129. package/dist/utility/wrun/wrun-panel-mount.util.js +51 -6
  130. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +15 -2
  131. package/dist/utility/wrun/wrun-pin-spelling.util.js +27 -3
  132. package/dist/utility/wrun/wrun-refusal.util.d.ts +3 -2
  133. package/dist/utility/wrun/wrun-refusal.util.js +22 -0
  134. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +26 -0
  135. package/dist/utility/wrun/wrun-registry-errors.util.js +34 -0
  136. package/dist/utility/wrun/wrun-replay-lane.util.js +3 -2
  137. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +20 -6
  138. package/dist/utility/wrun/wrun-run-interval-session.util.js +22 -7
  139. package/dist/utility/wrun/wrun-run-interval.util.d.ts +39 -7
  140. package/dist/utility/wrun/wrun-run-interval.util.js +49 -9
  141. package/dist/utility/wrun/wrun-socket-row-source.js +7 -2
  142. package/dist/utility/wrun/wrun-source-rows.util.d.ts +29 -22
  143. package/dist/utility/wrun/wrun-source-rows.util.js +62 -41
  144. package/dist/utility/wrun/wrun-tape-per-order.util.js +1 -20
  145. package/dist/utility/wrun/wrun-tape-source.util.d.ts +17 -9
  146. package/dist/utility/wrun/wrun-tape-source.util.js +20 -12
  147. package/dist/utility/wrun/wrun-volume-profile.util.js +37 -29
  148. package/dist/workers/constants/socket-slots.d.ts +91 -6
  149. package/dist/workers/constants/socket-slots.js +85 -6
  150. package/package.json +5 -5
  151. package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +0 -56
  152. package/dist/kscript-data/controls/live-trades-order-gate.util.js +0 -107
@@ -6,6 +6,7 @@ import { WRUN_ROW_LANE_ID_PREFIX, } from './wrun-row-lane.types.js';
6
6
  import { assertWrunOpraLaneReadable } from '../wrun-opra-lane.util.js';
7
7
  import { resolveWrunUnderlyingMarket, resolveWrunUnderlyingSettingKnob, wrunTakesUnderlying, wrunUnderlyingKnob, wrunUnderlyingLaneContext, wrunUnderlyingRootOf, wrunUnderlyingVenueWord, } from '../derived-roots.util.js';
8
8
  import { wrunSheetCellBlockTuples } from '../wrun-cell-capacity.leaf.js';
9
+ import { optionTradeDateClockOf, optionTradeDayByClock, optionTradeDayStartMsByClock, } from '../../options/option-trade-date.util.js';
9
10
  import { WRUN_OPTION_FLOW_TODAY_FIELD, wrunOptionFlowTodayFromOf } from '../wrun-option-contract-flow.util.js';
10
11
  import { wrunOptionInputTupleWidth, wrunOptionKitBarHasRows, wrunOptionLaneCarriesNext, wrunOptionLaneFirstPaintBudget, wrunOptionLaneTupleWidth, } from '../wrun-option-views.util.js';
11
12
  import { wrunPartialMarkerTuple, wrunPresentIsPartial, wrunTuplesMarkedPartial } from '../wrun-present-bits.util.js';
@@ -250,7 +251,8 @@ async function planWrunRowLaneUnderlying(source, ctx, run) {
250
251
  return undefined;
251
252
  const market = await resolveWrunUnderlyingMarket(root, ctx, run);
252
253
  // A CME root's chain is CME options data whatever the chart: the display wall before any read (and after the facets,
253
- // as for every chain instance).
254
+ // as for every chain instance). OpenMarket's own packages only, whatever the `cme-user-scripts` gate says (no implied
255
+ // expansion to CME options).
254
256
  if (market.family === 'cme')
255
257
  assertWrunLaneChainPlaneReadable('cme', market.exchange, run, ctx);
256
258
  if (market.family === 'opra') {
@@ -445,7 +447,8 @@ export function wrunRowLaneAddKey(chartIndex, indicatorId, instanceKey) {
445
447
  * row budget (the smaller cut wins), the read asks its newest slice first and alone, then the newest older bars its
446
448
  * share fits by the slice's own wire bytes, and no others; every bar it leaves unasked reads partial (bit 14 with the
447
449
  * marker tuple; an empty block on a class with no `present` mask), and the cut is named once the asks landed
448
- * (`onBudgetCut`, `budget: 'download'`). No early handover in that mode. Absent: today's asks, exactly.
450
+ * (`onBudgetCut`, `budget: 'download'`). No early handover in that mode. Absent: the plan's asks, over the bars the
451
+ * add's memo does not hold (`opts.addMemo`).
449
452
  *
450
453
  * A replay's window (`window.replayCursorMs`, plan L6a): a flow or snapshot lane's bars end at the replay's cursor
451
454
  * (`wrunRowLaneWindowAtReplayCursor`), so nothing after it is asked, and the read keeps a replay memo (the add memo's
@@ -490,20 +493,28 @@ export async function fetchWrunRowLaneRows(lane, extras, askedWindow, fallback,
490
493
  const cut = wrunRowLaneBudgetCutOf(lane.laneKey, lane.rowBudget, withinHorizon, budgeted, window, sessionGrid);
491
494
  reportWrunRowLaneBudgetCut(cut, window.intervalMs, opts.onBudgetCut);
492
495
  }
493
- // One download budget per add (`opts.addMemo`, wrun-row-lane-add-memo.util): the bars a budgeted read of this add
494
- // already landed whole and final are reused, the bars its budget cut stay partial, and only the rest is asked. A
495
- // replay's read keeps its own memo, never the add's, so a later read at its cursor asks only the bars it lacks.
496
- const addMemo = window.replayCursorMs !== undefined && Number.isFinite(window.replayCursorMs)
497
- ? { key: `replay|${wrunRowLaneAddFingerprintOf(lane, extras, window)}`, role: 'replay' }
498
- : opts.addMemo;
496
+ // One record per add (`opts.addMemo`, wrun-row-lane-add-memo.util): the bars a read of this add already landed whole
497
+ // and final are reused and only the rest is asked, whether or not a budget applies; the bars a budgeted read cut stay
498
+ // partial. A replay's read keeps its own memo, never the add's, so a later read at its cursor asks only the bars it
499
+ // lacks. When a bar's row is final is the acquisition's (`wrunRowLaneRowDependencyOf`): one whose rows no bar's clock
500
+ // settles keeps no memo at all.
501
+ const dependency = wrunRowLaneRowDependencyOf(lane, extras);
502
+ const memoDependency = dependency.kind === 'never' ? undefined : dependency;
503
+ const addMemo = memoDependency === undefined
504
+ ? undefined
505
+ : window.replayCursorMs !== undefined && Number.isFinite(window.replayCursorMs)
506
+ ? { key: `replay|${wrunRowLaneAddFingerprintOf(lane, extras, window)}`, role: 'replay' }
507
+ : opts.addMemo;
499
508
  const memoUtil = addMemo === undefined ? undefined : await import('./wrun-row-lane-add-memo.util.js');
500
509
  const memoFingerprint = addMemo === undefined ? '' : wrunRowLaneAddFingerprintOf(lane, extras, window);
501
- const wholeRun = addMemo?.role === 'run' && opts.download === undefined;
502
- if (wholeRun && memoUtil !== undefined && addMemo !== undefined)
503
- memoUtil.forgetWrunRowLaneAdd(addMemo.key);
504
- const memo = memoUtil === undefined || addMemo === undefined || wholeRun
510
+ const held = memoUtil === undefined || addMemo === undefined
505
511
  ? undefined
506
512
  : memoUtil.wrunRowLaneAddMemoOf(addMemo.key, memoFingerprint);
513
+ // A whole run (no `download`: its plan fits the budget, or the cut is off) still reuses the add's landed bars; it
514
+ // asks the bars a budgeted read cut and owes the budget nothing.
515
+ const memo = held !== undefined && memoUtil !== undefined && addMemo?.role === 'run' && opts.download === undefined
516
+ ? memoUtil.wrunRowLaneAddMemoWhole(held)
517
+ : held;
507
518
  const heldCut = memo === undefined ? [] : window.barOpens.filter((stampMs) => memo.cut.has(stampMs) && !memo.landed.has(stampMs));
508
519
  const freshAsks = memo === undefined || memoUtil === undefined
509
520
  ? asks
@@ -513,10 +524,11 @@ export async function fetchWrunRowLaneRows(lane, extras, askedWindow, fallback,
513
524
  // and so are an instance's whose facets ask a per-bar word of the gateway (OPTLOAD G5: a surface pick, the strike kit
514
525
  // fold), sized by the rows its answer holds; every other instance asks as the tier rule made it.
515
526
  const sliceBudget = rowBudget ?? wrunOptionLaneFirstPaintBudget(lane.sourceClass, extras, lane.width);
516
- // A budgeted run of an add that already spent reads within what is left of the add's share.
517
- const download = opts.download === undefined || memo === undefined
527
+ // A budgeted run of an add that already spent reads within what is left of the add's share (none named yet: its own).
528
+ const memoShareBytes = memo?.shareBytes;
529
+ const download = opts.download === undefined || memo === undefined || memoShareBytes === undefined
518
530
  ? opts.download
519
- : { ...opts.download, share: Math.max(0, memo.shareBytes - memo.spentBytes) };
531
+ : { ...opts.download, share: Math.max(0, memoShareBytes - memo.spentBytes) };
520
532
  const firstPaint = sliceBudget === undefined && download === undefined ? undefined : await import('./wrun-row-lane-first-paint.util.js');
521
533
  // The slice is cut on a trade date's first bar wherever the chart reads trade dates (`window.tradeDateOf`), so it
522
534
  // holds whole sessions, on every run alike: a first paint asks the windows a later run asks (one cache entry each).
@@ -562,11 +574,14 @@ export async function fetchWrunRowLaneRows(lane, extras, askedWindow, fallback,
562
574
  return wrunLandCellRowsOnHostBars(rows, landing.kind, { intervalMs: window.intervalMs, barGrid: window.barGrid, tierMs: gridAsk.tier?.ms, nowMs: window.nowMs }, fold === undefined ? undefined : (group) => fold(group, askExtras)).map((row) => wrunRowLanePlainRow(row, width));
563
575
  };
564
576
  const byBar = new Map();
565
- // The add's landed bars come back as they landed (a copy: the memo's rows are never handed out to be written).
577
+ // The add's landed bars come back as they landed (a copy: the memo's rows are never handed out to be written), each
578
+ // standing in for an ask only: never for a bar this read's plan leaves partial (past the lane's horizon or its row
579
+ // budget now), which a fresh read shows as a marker alone.
566
580
  if (memo !== undefined) {
567
581
  const inWindow = new Set(window.barOpens);
582
+ const leftPartial = new Set(planPartial);
568
583
  for (const [stampMs, row] of memo.landed) {
569
- if (row !== undefined && inWindow.has(stampMs)) {
584
+ if (row !== undefined && inWindow.has(stampMs) && !leftPartial.has(stampMs)) {
570
585
  byBar.set(stampMs, row.map((cell) => (Array.isArray(cell) ? cell.slice() : cell)));
571
586
  }
572
587
  }
@@ -729,11 +744,9 @@ export async function fetchWrunRowLaneRows(lane, extras, askedWindow, fallback,
729
744
  // The asks the chart's fetch did not confirm whole, named once they all landed.
730
745
  if (unconfirmed.size > 0)
731
746
  opts.onUnconfirmed?.([...unconfirmed].sort((a, b) => a - b));
732
- // The add's memo after this read: a budgeted run's leaves one, a replay's read too (a whole read or not), and a read
733
- // the memo served brings it up to date; a bar an unconfirmed ask answered joins none (asked again by the next read).
734
- if (memoUtil !== undefined &&
735
- addMemo !== undefined &&
736
- (opts.download !== undefined || memo !== undefined || addMemo.role === 'replay')) {
747
+ // The add's memo after this read: every read that names its add (a run's, a live read's, a replay's) leaves one,
748
+ // budgeted or not; a bar an unconfirmed ask answered joins none (asked again by the next read).
749
+ if (memoUtil !== undefined && addMemo !== undefined && memoDependency !== undefined) {
737
750
  const asked = (stampMs) => {
738
751
  const { fromMs } = wrunHostBarSpanOf(stampMs, window.intervalMs, sessionGrid);
739
752
  return sentAsks.some((gridAsk) => fromMs >= gridAsk.fromMs && fromMs < gridAsk.toMs);
@@ -742,6 +755,7 @@ export async function fetchWrunRowLaneRows(lane, extras, askedWindow, fallback,
742
755
  memoUtil.rememberWrunRowLaneAdd(addMemo.key, memoUtil.wrunRowLaneAddMemoAfter({
743
756
  previous: memo,
744
757
  fingerprint: memoFingerprint,
758
+ dependency: memoDependency,
745
759
  window,
746
760
  sessionGrid,
747
761
  askedBars,
@@ -769,18 +783,71 @@ export async function fetchWrunRowLaneRows(lane, extras, askedWindow, fallback,
769
783
  function wrunRowLaneRowMarkedPartial(row) {
770
784
  return row.slice(1).some((tuple) => Array.isArray(tuple) && wrunPresentIsPartial(Number(tuple[tuple.length - 1])));
771
785
  }
786
+ /**
787
+ * What one host bar's landed row depends on beyond its own span, read off a row lane instance's acquisition: the add
788
+ * memo's ONE eligibility rule (wrun-row-lane-add-memo.util `WrunRowLaneRowDependency`), so no read reuses a row a later
789
+ * read would answer otherwise (LIVE-REREAD review 2026-10-28). By the acquisition's own words, whatever the lane:
790
+ * - a window-wide cut (`newest`, and `newestTailMs` beside it: the window's N newest prints, option_prints): a bar's
791
+ * rows depend on every newer print of the read's window: `never`;
792
+ * - `history: "today"` (the flow lanes): which bars hold rows depends on the trade date of the chart's newest bar (the K
793
+ * control's `todayFromMs`), which no bar's clock settles: `never`;
794
+ * - `span: "session"` (the flow lanes): one sum per contract per trade date on the session's first bar, growing all
795
+ * session: `session`, its trade date's end on the chain's clock (`optionTradeDateClockOf`, the clock the worker
796
+ * twins group by); `never` for a chain the acquisition names no exchange of;
797
+ * - a kit fold carrying the next bar's strikes (`wrunOptionLaneCarriesNext`): `next-bar`, its rows read as the paging
798
+ * seam reads them (`wrunOptionKitBarHasRows`);
799
+ * - anything else: `bar`, final the lag after its own end.
800
+ * And by the lane's landing, an empty bar: quiet on a flow (nothing traded), never final on a snapshot (`emptyIsQuiet`
801
+ * false: a picture not shown yet, a failed read answered empty, a folded kit read's older bars past its cap, a CME
802
+ * surface bar whose settlement row is not published yet; LIVE-REREAD sweep 2026-10-28).
803
+ */
804
+ export function wrunRowLaneRowDependencyOf(lane, extras) {
805
+ if (extras.newest !== undefined || extras.newestTailMs !== undefined)
806
+ return { kind: 'never', why: 'window-newest' };
807
+ if (extras.history === 'today')
808
+ return { kind: 'never', why: 'history-today' };
809
+ const emptyIsQuiet = lane.landing.kind !== 'snapshot';
810
+ if (extras.span === 'session') {
811
+ const field = lane.chain?.exchangeField;
812
+ const exchange = field === undefined ? undefined : extras[field];
813
+ if (typeof exchange !== 'string' || exchange === '')
814
+ return { kind: 'never', why: 'session-without-clock' };
815
+ const clock = optionTradeDateClockOf({ exchange, coin: typeof extras.coin === 'string' ? extras.coin : '' });
816
+ return {
817
+ kind: 'session',
818
+ emptyIsQuiet,
819
+ // The first instant of the next trade date a bar's falls before (a weekend or a holiday skipped), else never.
820
+ sessionEndMs: (stampMs) => {
821
+ const day = optionTradeDayByClock(clock, stampMs);
822
+ for (let next = day + 1; next <= day + 4; next += 1) {
823
+ const startMs = optionTradeDayStartMsByClock(clock, next);
824
+ if (Number.isFinite(startMs))
825
+ return startMs;
826
+ }
827
+ return Number.POSITIVE_INFINITY;
828
+ },
829
+ };
830
+ }
831
+ if (wrunOptionLaneCarriesNext(lane.sourceClass, extras)) {
832
+ return { kind: 'next-bar', emptyIsQuiet, hasRows: (row) => wrunOptionKitBarHasRows(row.slice(1)) };
833
+ }
834
+ return { kind: 'bar', emptyIsQuiet };
835
+ }
772
836
  /** The add memo's fingerprint (wrun-row-lane-add-memo.util): the lane, the acquisition without a per-ask field (the
773
- * measured key's skips and the lane's fold cap) and the bar span. A run's extras and a reconcile's recorded acquisition
774
- * of the same instance print the same. Never the bar grid's record: the live session's market names no
775
- * `transformations` where the chart's metadata does (INT 2026-10-23: every reconcile missed the run's memo), and the
776
- * memo's bars are matched by their stamps anyway. */
837
+ * measured key's skips and the lane's fold cap), the bar span and the bar grid's session. A run's extras and a
838
+ * reconcile's recorded acquisition of the same instance print the same. Never the bar grid's whole record: the live
839
+ * session's market names no `transformations` where the chart's metadata does (INT 2026-10-23: every reconcile missed
840
+ * the run's memo). Its session, though, both name alike (the live market's is the chart's), and it decides what a bar
841
+ * holds under one stamp: a session switch (regular hours to the whole session) keeps the add, and a CME day bar keeps
842
+ * its stamp while its span moves, so a memo of one session never serves the other's bars. */
777
843
  function wrunRowLaneAddFingerprintOf(lane, extras, window) {
778
844
  const foldField = lane.download?.fold?.field;
779
845
  const fields = {};
780
846
  for (const [key, value] of Object.entries(extras))
781
847
  if (key !== foldField)
782
848
  fields[key] = value;
783
- return measuredKeyOf(lane.laneKey, fields, undefined, window.intervalMs);
849
+ const session = window.barGrid?.sessionType;
850
+ return `${measuredKeyOf(lane.laneKey, fields, undefined, window.intervalMs)}|${typeof session === 'string' ? session : ''}`;
784
851
  }
785
852
  /** The newest projection a budgeted read measured (`landWithinDownloadShare`), by lane and acquisition: its wire bytes a
786
853
  * millisecond of bars. In memory, the newest `MEASURED_KEPT`. */
@@ -1140,13 +1207,19 @@ const measuredBars = new Map();
1140
1207
  const MEASURED_KEPT = 64;
1141
1208
  const MEASURED_BARS = 500;
1142
1209
  /** The ask's fields that never change what a bar holds: its tier (keyed apart), the routed tier and plane, the market
1143
- * placeholders a recorded acquisition carries, today's first instant and the instance's own bound. */
1210
+ * placeholders a recorded acquisition carries, today's first instant and the instance's own bound. Also the fields the
1211
+ * chart's fetch writes on the payload it is handed, which the run records as the lane's acquisition (titan-charts
1212
+ * `acquireKScriptSourceData`: the resolved market, and `interval`, the source's own interval; the bar span is keyed
1213
+ * apart): a run's extras and a reconcile's recorded acquisition print the same. With `interval` printed, the live start
1214
+ * missed the add's memo whenever a run had asked the lane (LIVE-REREAD 2026-10-28, ES1! 1h whole session, Premium by
1215
+ * Expiry: the forming bar's ask recorded `interval: '1h'`, and the live start read the window's 8 final bars again). */
1144
1216
  const MEASURED_SKIP = new Set([
1145
1217
  WRUN_ROW_LANE_TIER_FIELD,
1146
1218
  'servedTier',
1147
1219
  'wrunPlane',
1148
1220
  'symbol',
1149
1221
  'exchange',
1222
+ 'interval',
1150
1223
  WRUN_OPTION_FLOW_TODAY_FIELD,
1151
1224
  'maxCells',
1152
1225
  ]);
@@ -1204,8 +1277,11 @@ function noteWrunRowLaneMeasured(laneKey, extras, asks, landed, partialBars, win
1204
1277
  continue;
1205
1278
  if (presentMask !== false && tuples.some(marked))
1206
1279
  continue;
1207
- const tier = asks.find((ask) => span.fromMs >= ask.fromMs && span.fromMs < ask.toMs)?.tier;
1208
- const key = measuredKeyOf(laneKey, extras, tier?.key, span.toMs - span.fromMs);
1280
+ // A bar no ask of this read named came from the add's memo: the read that landed it measured it.
1281
+ const ask = asks.find((gridAsk) => span.fromMs >= gridAsk.fromMs && span.fromMs < gridAsk.toMs);
1282
+ if (ask === undefined)
1283
+ continue;
1284
+ const key = measuredKeyOf(laneKey, extras, ask.tier?.key, span.toMs - span.fromMs);
1209
1285
  const read = reads.get(key) ?? { bars: 0, tuples: 0 };
1210
1286
  reads.set(key, { bars: read.bars + 1, tuples: read.tuples + tuples.length });
1211
1287
  }
@@ -40,8 +40,7 @@ export const WRUN_BROWSER_BUILTIN_SOURCE_CLASSES = [
40
40
  'options_chain',
41
41
  // USD order-size bucketed flow per bar over the chart's K_TRADE_VOLUME_BY_SIZE lane (celled).
42
42
  'trade_volume_by_size',
43
- // The raw prints per bar over the K_TRADES lane (celled): history from TRADE_LARGE, live from
44
- // the raw TRADE channel (wrun-tape-source.util).
43
+ // The big trades per bar (celled): TRADE_LARGE rows, history and live (wrun-tape-source.util).
45
44
  'tape',
46
45
  ];
47
46
  /**
@@ -30,9 +30,10 @@
30
30
  * other market the chart serves, all priced per unit (spot,
31
31
  * perpetuals, stocks, ETFs, forex, indices, metals, prediction
32
32
  * markets, economic series).
33
- * zone om's venue rule: US listings and POLYGON_INDICES New York,
34
- * the CME family Chicago, LBMA and LME London, every other
35
- * venue 0 (UTC, the clock every 24/7 market keeps).
33
+ * zone om's venue rule: US listings, POLYGON_INDICES and forex
34
+ * (FX_OTC, POLYGON_FX) New York, the CME family Chicago, LBMA
35
+ * and LME London, every other venue 0 (UTC, the clock every
36
+ * 24/7 market keeps).
36
37
  * quote_is_usd the row's quote (`quoteAssetId`, else `quoteCoinName`): USD
37
38
  * 1, anything else 2, a dollar stablecoin included; without
38
39
  * one, US listings and POLYGON_INDICES 1, then the market's
@@ -41,7 +42,9 @@
41
42
  * tail of the directory's normalized symbol `BTC-USDT`), else 0.
42
43
  * session_open om's venue rule: the minute on the venue's clock its trade day
43
44
  * opens, 1020 (17:00 Chicago, WRUN_MARKET_SESSION_OPEN_CME) for
44
- * the CME family, the zone's Chicago branch, else 0 (midnight).
45
+ * the CME family, the zone's Chicago branch, 1020 (17:00 New
46
+ * York, WRUN_MARKET_SESSION_OPEN_FOREX) for forex, whose day
47
+ * runs 17:00 to 17:00 New York, else 0 (midnight).
45
48
  *
46
49
  * Beside the five the host fill carries `market.option_multiplier()` (kit 0.87.0,
47
50
  * om WRUN_OPTION_FACT_FILLS, which only the chart's browser lane fills): the US
@@ -30,9 +30,10 @@
30
30
  * other market the chart serves, all priced per unit (spot,
31
31
  * perpetuals, stocks, ETFs, forex, indices, metals, prediction
32
32
  * markets, economic series).
33
- * zone om's venue rule: US listings and POLYGON_INDICES New York,
34
- * the CME family Chicago, LBMA and LME London, every other
35
- * venue 0 (UTC, the clock every 24/7 market keeps).
33
+ * zone om's venue rule: US listings, POLYGON_INDICES and forex
34
+ * (FX_OTC, POLYGON_FX) New York, the CME family Chicago, LBMA
35
+ * and LME London, every other venue 0 (UTC, the clock every
36
+ * 24/7 market keeps).
36
37
  * quote_is_usd the row's quote (`quoteAssetId`, else `quoteCoinName`): USD
37
38
  * 1, anything else 2, a dollar stablecoin included; without
38
39
  * one, US listings and POLYGON_INDICES 1, then the market's
@@ -41,7 +42,9 @@
41
42
  * tail of the directory's normalized symbol `BTC-USDT`), else 0.
42
43
  * session_open om's venue rule: the minute on the venue's clock its trade day
43
44
  * opens, 1020 (17:00 Chicago, WRUN_MARKET_SESSION_OPEN_CME) for
44
- * the CME family, the zone's Chicago branch, else 0 (midnight).
45
+ * the CME family, the zone's Chicago branch, 1020 (17:00 New
46
+ * York, WRUN_MARKET_SESSION_OPEN_FOREX) for forex, whose day
47
+ * runs 17:00 to 17:00 New York, else 0 (midnight).
45
48
  *
46
49
  * Beside the five the host fill carries `market.option_multiplier()` (kit 0.87.0,
47
50
  * om WRUN_OPTION_FACT_FILLS, which only the chart's browser lane fills): the US
@@ -69,7 +72,7 @@ import { checkIsEconomic, getMarketKind } from '../chart/marketKind.util.js';
69
72
  import { optionsMarketUnderlyingVenue, optionVenueForExchange } from '../options/option-venue.util.js';
70
73
  import { isPlainOptionContract } from '../options/option-trade-units.util.js';
71
74
  import { isOpraGoverned } from '../v2/opra-governed.util.js';
72
- import { WRUN_LANE_CURRENCY_AUTO, WRUN_MARKET_FACT_FILLS, WRUN_MARKET_KINDS, WRUN_MARKET_QUOTE_IS_USD, WRUN_MARKET_SESSION_OPEN_CME, wrunLaneCurrency, wrunMarketSizeUnit, wrunMarketZoneCode, wrunCoinLegSource, wrunFollowsCoin, wrunRowVisibleHere, wrunVisibleByNeedsKind, } from './wrun-market-facts.util.js';
75
+ import { WRUN_LANE_CURRENCY_AUTO, WRUN_MARKET_FACT_FILLS, WRUN_MARKET_KINDS, WRUN_MARKET_QUOTE_IS_USD, WRUN_MARKET_SESSION_OPEN_CME, WRUN_MARKET_SESSION_OPEN_FOREX, wrunLaneCurrency, wrunMarketSizeUnit, wrunMarketZoneCode, wrunCoinLegSource, wrunFollowsCoin, wrunRowVisibleHere, wrunVisibleByNeedsKind, } from './wrun-market-facts.util.js';
73
76
  import { isWrunLegStreamClass } from './wrun-leg-stream-classes.js';
74
77
  import { isTradesDollarQuoteAsset } from '../../kscript-data/controls/live-trades-merge.util.js';
75
78
  import { getExchangeFromSymbol } from '../../helpers/data.helpers.js';
@@ -343,7 +346,8 @@ export function wrunChartMarketFacts(market, row) {
343
346
  const ownKind = spec?.kind ?? (checkIsEconomic(venue) ? 'economic' : undefined);
344
347
  const kind = (row !== undefined ? rowKind(row) : undefined) ?? venueKind(venue, symbol) ?? ownKind ?? 'unknown';
345
348
  const pointValue = cme ? (spec?.pointValue ?? 0) : UNKNOWN_MULTIPLIER_EXCHANGES.has(venue) ? 0 : 1;
346
- const zone = US_LISTING_EXCHANGES.has(venue) || INDEX_EXCHANGES.has(venue)
349
+ const forex = FOREX_EXCHANGES.has(venue);
350
+ const zone = US_LISTING_EXCHANGES.has(venue) || INDEX_EXCHANGES.has(venue) || forex
347
351
  ? NEW_YORK
348
352
  : cme
349
353
  ? CHICAGO
@@ -360,7 +364,7 @@ export function wrunChartMarketFacts(market, row) {
360
364
  ? 'usd'
361
365
  : 'other';
362
366
  const quote = (row !== undefined ? rowQuote(row) : undefined) ?? venueQuote ?? ownQuote ?? 'unknown';
363
- const sessionOpen = cme ? WRUN_MARKET_SESSION_OPEN_CME : 0;
367
+ const sessionOpen = cme ? WRUN_MARKET_SESSION_OPEN_CME : forex ? WRUN_MARKET_SESSION_OPEN_FOREX : 0;
364
368
  return { kind: kindCode(kind), pointValue, zone, quoteIsUsd: quoteCode(quote), sessionOpen };
365
369
  }
366
370
  /** The host_fill word of `market.dollar_multiplier()` (kit 0.95.0). */
@@ -496,7 +500,7 @@ export function wrunDeclaresDollarMultiplier(declarations) {
496
500
  /** The facts the directory row answers: wrunChartMarketFacts reads the row for
497
501
  * `kind` (its asset class) and `quote_is_usd` (its quote) alone. The other
498
502
  * three are the venue tables' (`point_value` the CME root's or the venue's
499
- * unit rule, `zone` the venue's clock, `session_open` the CME family's open):
503
+ * unit rule, `zone` the venue's clock, `session_open` the CME family's and forex's open):
500
504
  * no row moves them. */
501
505
  const WRUN_DIRECTORY_MARKET_FACTS = new Set(['kind', 'quote_is_usd']);
502
506
  /** True when the sheet declares a fact the directory row answers (`kind`,
@@ -301,6 +301,15 @@ export declare function wrunVisibilityOwners(metadata: WrunVisibilitySheet | und
301
301
  export declare function wrunParamOutputTargets(param: WrunMetadataParam, outputs: unknown, key: string): Array<Record<string, unknown> & {
302
302
  name: string;
303
303
  }>;
304
+ /** The colour param whose declared targets paint a Style target's `color` exactly (a target with its own alpha
305
+ * paints a derived colour and does not count), with the sheet path it writes: the heir a saved Style colour row
306
+ * hands its pick to when a republish drops the row for the param (wrun-twin-pin-move styleRowHeir). The target
307
+ * is a Style row's (`<output>`, `text:<renderer>`, `box:<name>`, ...); undefined when the sheet does not paint it
308
+ * or no colour param writes that location. */
309
+ export declare function wrunColourTargetOwner(metadata: WrunIndicatorMetadata, target: string): {
310
+ name: string;
311
+ path: ReadonlyArray<string | number>;
312
+ } | undefined;
304
313
  /** Every Style target whose visibility a boolean param owns (wrunVisibilityTargetOwners): an
305
314
  * output by its name, any other drawn kind by its prefixed target. Such a target shows by the
306
315
  * painted sheet alone and offers no Visible row. */
@@ -832,6 +832,39 @@ export function wrunParamOutputTargets(param, outputs, key) {
832
832
  }
833
833
  return written;
834
834
  }
835
+ /** The colour param whose declared targets paint a Style target's `color` exactly (a target with its own alpha
836
+ * paints a derived colour and does not count), with the sheet path it writes: the heir a saved Style colour row
837
+ * hands its pick to when a republish drops the row for the param (wrun-twin-pin-move styleRowHeir). The target
838
+ * is a Style row's (`<output>`, `text:<renderer>`, `box:<name>`, ...); undefined when the sheet does not paint it
839
+ * or no colour param writes that location. */
840
+ export function wrunColourTargetOwner(metadata, target) {
841
+ const write = wrunStyleTargetWrites(metadata, target, 'color', '#000000').find((entry) => entry.kind === 'value');
842
+ if (write === undefined)
843
+ return undefined;
844
+ const resolve = (path) => {
845
+ if (path.length !== 3)
846
+ return undefined;
847
+ const section = metadata[path[0]];
848
+ const key = childKey(section, path[1]);
849
+ return key === undefined ? undefined : [path[0], key, path[2]];
850
+ };
851
+ const wanted = resolve(write.path);
852
+ if (wanted === undefined)
853
+ return undefined;
854
+ for (const param of Array.isArray(metadata.params) ? metadata.params : []) {
855
+ if (param.type !== 'color')
856
+ continue;
857
+ const owns = paramTargets(param).targets.some((candidate) => {
858
+ if (candidate.alpha !== undefined)
859
+ return false;
860
+ const path = resolve(candidate.path);
861
+ return path !== undefined && path.every((segment, at) => segment === wanted[at]);
862
+ });
863
+ if (owns)
864
+ return { name: param.name, path: wanted };
865
+ }
866
+ return undefined;
867
+ }
835
868
  /** Every Style target whose visibility a boolean param owns (wrunVisibilityTargetOwners): an
836
869
  * output by its name, any other drawn kind by its prefixed target. Such a target shows by the
837
870
  * painted sheet alone and offers no Visible row. */
@@ -224,9 +224,10 @@ export declare function wrunDrawStylePropClears(spec: WrunDrawStylePropSpec): bo
224
224
  * polygon fill) and a line's fill toward its `fill_to` line (`fillColor`,
225
225
  * on the wire only while a target is set; alpha is the fill's opacity);
226
226
  * `border` is a label's `border`; `glow` is every kind's `glowColor`;
227
- * `emblem` a label's `emblemColor`; `gradient_end` a box's `gradient:
228
- * [backgroundColor at the call, end]` (and `gradientDirection: "vertical"`
229
- * when unset); `text` a box's `textColor`. */
227
+ * `emblem` a label's `emblemColor`; `gradient_end` a box's or (since kit
228
+ * scaffold 104) a polyline's `gradient: [its fill at the call, end]` (a
229
+ * box's `backgroundColor`, a polyline's `fillColor`; and `gradientDirection:
230
+ * "vertical"` when unset); `text` a box's `textColor`. */
230
231
  export declare const WRUN3_COLOR_PROPS: {
231
232
  readonly stroke: 0;
232
233
  readonly fill: 1;
@@ -495,6 +496,9 @@ export interface WrunHandlePolylineLookProps {
495
496
  opacity?: number;
496
497
  zOrder?: number;
497
498
  fillColor?: string;
499
+ /** Colour prop 5 and style prop 26 (DW34 on a polyline, kit scaffold 104). */
500
+ gradient?: string[];
501
+ gradientDirection?: WrunHandleGradientDirection;
498
502
  closed?: true;
499
503
  smooth?: true;
500
504
  arrow?: WrunHandleArrow;
@@ -284,7 +284,7 @@ export const WRUN3_STYLE_PROP_SPECS = [
284
284
  {
285
285
  prop: WRUN3_STYLE_PROPS.gradient_direction,
286
286
  name: 'gradient_direction',
287
- kinds: ['box'],
287
+ kinds: ['box', 'polyline'],
288
288
  integer: true,
289
289
  words: WRUN_GRADIENT_DIRECTIONS,
290
290
  },
@@ -322,9 +322,10 @@ export function wrunDrawStylePropClears(spec) {
322
322
  * polygon fill) and a line's fill toward its `fill_to` line (`fillColor`,
323
323
  * on the wire only while a target is set; alpha is the fill's opacity);
324
324
  * `border` is a label's `border`; `glow` is every kind's `glowColor`;
325
- * `emblem` a label's `emblemColor`; `gradient_end` a box's `gradient:
326
- * [backgroundColor at the call, end]` (and `gradientDirection: "vertical"`
327
- * when unset); `text` a box's `textColor`. */
325
+ * `emblem` a label's `emblemColor`; `gradient_end` a box's or (since kit
326
+ * scaffold 104) a polyline's `gradient: [its fill at the call, end]` (a
327
+ * box's `backgroundColor`, a polyline's `fillColor`; and `gradientDirection:
328
+ * "vertical"` when unset); `text` a box's `textColor`. */
328
329
  export const WRUN3_COLOR_PROPS = {
329
330
  stroke: 0,
330
331
  fill: 1,
@@ -341,7 +342,7 @@ export const WRUN3_COLOR_PROP_SPECS = [
341
342
  { prop: WRUN3_COLOR_PROPS.border, name: 'border', kinds: ['label'] },
342
343
  { prop: WRUN3_COLOR_PROPS.glow, name: 'glow', kinds: ['line', 'box', 'label', 'polyline'] },
343
344
  { prop: WRUN3_COLOR_PROPS.emblem, name: 'emblem', kinds: ['label'] },
344
- { prop: WRUN3_COLOR_PROPS.gradient_end, name: 'gradient_end', kinds: ['box'] },
345
+ { prop: WRUN3_COLOR_PROPS.gradient_end, name: 'gradient_end', kinds: ['box', 'polyline'] },
345
346
  { prop: WRUN3_COLOR_PROPS.text, name: 'text', kinds: ['box'] },
346
347
  ];
347
348
  /** Caps: a breach refuses the evaluation by name, never drops or truncates.
@@ -1920,8 +1921,8 @@ function applyStyle(kind, spec, value, slotText, props) {
1920
1921
  * fill keys, a label's background, a polyline's polygon fill, and a line's
1921
1922
  * fill half (kept raw, on the wire only beside its fill_to target); border,
1922
1923
  * glow, emblem and text land on their own keys; gradient_end snapshots the
1923
- * box's fill colour at the call as the first stop and defaults the
1924
- * direction to vertical. */
1924
+ * fill colour at the call (a box's backgroundColor, a polyline's fillColor)
1925
+ * as the first stop and defaults the direction to vertical. */
1925
1926
  function applyColor(kind, spec, color, props) {
1926
1927
  switch (spec.name) {
1927
1928
  case 'stroke':
@@ -1952,7 +1953,7 @@ function applyColor(kind, spec, color, props) {
1952
1953
  props.emblemColor = color;
1953
1954
  break;
1954
1955
  case 'gradient_end':
1955
- props.gradient = [props.backgroundColor, color];
1956
+ props.gradient = [kind === 'polyline' ? props.fillColor : props.backgroundColor, color];
1956
1957
  if (props.gradientDirection === undefined)
1957
1958
  props.gradientDirection = 'vertical';
1958
1959
  break;
@@ -61,6 +61,9 @@ export type WrunInputRequirement = ({
61
61
  * Recorded only on a lane whose absence can hold the run: a quiet lane's readers (book, trades,
62
62
  * oi, liquidations, tape) draw without it whatever they declare. Absent: none is optional. */
63
63
  optional?: readonly string[];
64
+ /** The inputs follow the chart's coin to another venue's market (`follow: "coin"`, kit 0.77.0 coin legs): read by
65
+ * the chart's coin whatever their kind (`wrunRequirementReadsChartCoin`). Absent: they read no coin's market. */
66
+ followsCoin?: true;
64
67
  };
65
68
  /** The gateway type each chart-market class's lane fetches (its K control's data type). */
66
69
  export declare const CHART_MARKET_GATEWAY_TYPES: Readonly<Record<string, string>>;
@@ -81,6 +84,36 @@ export declare function wrunRequirementClasses(): string[];
81
84
  * chart-market requirement with an empty gateway type: unknown, never "needs nothing".
82
85
  */
83
86
  export declare function wrunInputRequirements(effectiveSheet: WrunIndicatorMetadata): WrunInputRequirement[];
87
+ /**
88
+ * Whether a requirement reads by the chart's coin: the options chain and every chain lane (`options`: the chain
89
+ * decision reads the coin's chain on a market that is no options venue), every provider lane (`provider`: its coin
90
+ * list, the Deribit coin set or the chart's coin itself) and every coin leg (`followsCoin`: the coin's market on
91
+ * another venue). Every other input reads the chart market's own series, a pinned market, a governed plane or
92
+ * nothing of the market.
93
+ */
94
+ export declare function wrunRequirementReadsChartCoin(req: Pick<WrunInputRequirement, 'kind' | 'followsCoin'>): boolean;
95
+ /**
96
+ * The prediction-market wall (Kyle 2026-10-29: options indicators on a Polymarket chart make no sense). A prediction
97
+ * market's price is the odds of an outcome, and the coin its chart carries is no asset that price follows: the symbol
98
+ * pipeline's coin match places no series key and answers BTC (symbol-resolve.util `getCoin`), and an event about a coin
99
+ * names that coin. An input read by the chart's coin (`wrunRequirementReadsChartCoin`) would draw another market's
100
+ * options, volatility or flows under the odds, so every prediction venue (`isPredictionExchangeName`: Polymarket,
101
+ * HIP4) refuses it whatever fill it declares: a wall like the CME and OPRA ones, since the fill would stand in for a
102
+ * series the market can never have. Whether the market reads the input at all (`needed_by`, a `when` setting) is the
103
+ * caller's to settle first. The picker's verdict and the works-on list (wrun-input-requirements.util) and the run's
104
+ * head (`wrunPredictionMarketWalledInput`) read this one rule.
105
+ */
106
+ export declare function wrunPredictionMarketWalls(req: Pick<WrunInputRequirement, 'kind' | 'followsCoin'>, exchange: string | undefined | null): boolean;
107
+ /**
108
+ * The first input of a sheet the prediction-market wall refuses on `exchange` (`wrunPredictionMarketWalls`), with its
109
+ * source class, in input order. Undefined off a prediction venue, or when no input the market demands reads by the
110
+ * chart's coin: the sheet is the one the run reads there (its settings applied and its lane demand at the market's size
111
+ * unit, so a `when` setting that is off or a `needed_by` leaving the unit out marks the input `undemanded`).
112
+ */
113
+ export declare function wrunPredictionMarketWalledInput(sheet: WrunIndicatorMetadata, exchange: string | undefined | null): {
114
+ name: string;
115
+ sourceClass: string;
116
+ } | undefined;
84
117
  /**
85
118
  * Whether an input reads its declared fill over an empty lane instead of holding the run (the
86
119
  * honest-picture rule's quiet reader): a scalar input's `missing: "nan"` blanks the outputs it
@@ -120,6 +153,8 @@ export interface WrunUnservedLane {
120
153
  exchange: string;
121
154
  symbol: string;
122
155
  };
156
+ /** The run market a lane on the chart's own market was judged on (a Trades chart's tape); absent: the chart's. */
157
+ judgedExchange?: string;
123
158
  /** The first reader the market demands (by input index) that cannot draw without the lane
124
159
  * (`wrunInputDrawsWithoutLane`): the run refuses by its name. Absent: the lane stays undispatched
125
160
  * and every reader reads its fill. */
@@ -151,5 +186,38 @@ export declare function wrunUnservedLanes(sheet: Pick<WrunIndicatorMetadata, 'in
151
186
  coin: string;
152
187
  }, opts?: {
153
188
  nativeLanes?: readonly string[];
189
+ runMarket?: {
190
+ exchange: string;
191
+ } | null;
154
192
  }): WrunUnservedLane[];
193
+ /** How a lane class reads the run market: where its trades print, where its rows came from, the chart's own, none. */
194
+ export type WrunRunMarketRead = 'run-market' | 'candle-source' | 'chart-market' | 'none';
195
+ /** Every lane class declares its read here: a class left out reads the stored market by accident (the guard spec). */
196
+ export declare const WRUN_RUN_MARKET_READS: Readonly<Record<string, WrunRunMarketRead>>;
197
+ /** A lane class's read, undefined for a class the table does not name. */
198
+ export declare function wrunRunMarketReadOfClass(sourceClass: unknown): WrunRunMarketRead | undefined;
199
+ /** The chart fetch type a class asks its chart-market rows through, undefined when it asks none of its own. */
200
+ export declare function wrunRunMarketFetchTypeOf(sourceClass: string): string | undefined;
201
+ /** How an ask of a fetch type reads the run market (`fetchLane` decides by its type); an unlisted type stays put. */
202
+ export declare function wrunRunMarketReadOfFetchType(type: string): WrunRunMarketRead;
203
+ /** The market a class reading the chart's own market is judged on: the run market, which then names its facts. */
204
+ export declare function wrunRunMarketOn(sourceClass: string, market: {
205
+ exchange: string | undefined;
206
+ coin: string;
207
+ }, runMarket: {
208
+ exchange: string;
209
+ } | null | undefined): {
210
+ exchange: string | undefined;
211
+ coin: string;
212
+ };
213
+ /** Whether a sheet reads the run market: a demanded input of a run-market class on the chart's own market. */
214
+ export declare function wrunSheetReadsRunMarket(sheet: Pick<WrunIndicatorMetadata, 'inputs' | 'inputSources'>): boolean;
215
+ /** Whether a source reads the run market: a run-market type on the chart's own market (history pin and live map). */
216
+ export declare function wrunSourceReadsRunMarket(type: string, payload: {
217
+ exchange?: unknown;
218
+ symbol?: unknown;
219
+ }, chart: {
220
+ exchange?: unknown;
221
+ symbol?: unknown;
222
+ } | null | undefined): boolean;
155
223
  export {};