@orangecharts/wrun-chart-host 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +3 -1
  2. package/dist/constants/feature-flags.constants.d.ts +9 -0
  3. package/dist/constants/feature-flags.constants.js +86 -16
  4. package/dist/constants/marketCapabilities.constants.d.ts +14 -9
  5. package/dist/constants/marketCapabilities.constants.js +36 -13
  6. package/dist/constants/opra-compliance.constants.d.ts +15 -0
  7. package/dist/constants/opra-compliance.constants.js +15 -0
  8. package/dist/constants/option-venues.constants.d.ts +11 -6
  9. package/dist/constants/option-venues.constants.js +5 -2
  10. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
  11. package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
  12. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
  13. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
  14. package/dist/constants/venue-presets.constants.d.ts +20 -20
  15. package/dist/constants/venue-presets.constants.js +24 -26
  16. package/dist/host-env.d.ts +39 -9
  17. package/dist/host-env.js +6 -0
  18. package/dist/host-ports.types.d.ts +108 -18
  19. package/dist/index.d.ts +14 -0
  20. package/dist/index.js +14 -0
  21. package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
  22. package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
  23. package/dist/interfaces/opra-realtime.interface.js +10 -10
  24. package/dist/interfaces/replay.interface.d.ts +8 -0
  25. package/dist/interfaces/wrun-runtime.interface.d.ts +52 -15
  26. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +94 -14
  27. package/dist/kscript-data/controls/live-trades-merge.util.js +132 -22
  28. package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +56 -0
  29. package/dist/kscript-data/controls/live-trades-order-gate.util.js +107 -0
  30. package/dist/market-data/billing.interface.d.ts +227 -42
  31. package/dist/market-data/billing.interface.js +60 -12
  32. package/dist/market-data/venue.d.ts +88 -6
  33. package/dist/market-data/venues/cme.contract.copy.json +66 -0
  34. package/dist/market-data/venues/cme.d.ts +126 -0
  35. package/dist/market-data/venues/cme.js +133 -0
  36. package/dist/market-data/venues/index.d.ts +165 -8
  37. package/dist/market-data/venues/index.js +48 -6
  38. package/dist/market-data/venues/opra.contract.copy.json +5 -3
  39. package/dist/market-data/venues/opra.d.ts +3 -3
  40. package/dist/market-data/venues/opra.js +5 -4
  41. package/dist/replay/replayLadder.js +3 -1
  42. package/dist/settings-templates/index.js +7 -3
  43. package/dist/settings-templates/indicator-fields.d.ts +5 -4
  44. package/dist/settings-templates/indicator-fields.js +45 -6
  45. package/dist/settings-templates/tool-rules.d.ts +27 -17
  46. package/dist/settings-templates/tool-rules.js +27 -11
  47. package/dist/settings-templates/tool-tables.generated.js +91 -31
  48. package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
  49. package/dist/utility/chart/book-live-bucket.util.js +47 -0
  50. package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
  51. package/dist/utility/chart/crypto-index.leaf.js +2 -2
  52. package/dist/utility/chart/index-mode-admission.util.js +24 -3
  53. package/dist/utility/chart/index-mode.util.d.ts +5 -2
  54. package/dist/utility/chart/index-mode.util.js +23 -13
  55. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
  56. package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
  57. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +7 -2
  58. package/dist/utility/chart/kscript-live-coalesce.util.js +9 -3
  59. package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
  60. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
  61. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
  62. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
  63. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -27
  64. package/dist/utility/chart/kscript-venue-policy.util.js +74 -32
  65. package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
  66. package/dist/utility/chart/market-session-schedule.util.js +16 -0
  67. package/dist/utility/chart/marketKind.util.d.ts +12 -10
  68. package/dist/utility/chart/marketKind.util.js +17 -7
  69. package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
  70. package/dist/utility/chart/om-panel-push-style.util.js +17 -15
  71. package/dist/utility/chart/om-panel.util.js +6 -6
  72. package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
  73. package/dist/utility/chart/opra-read-access.leaf.js +5 -3
  74. package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
  75. package/dist/utility/chart/profile-block-size.util.js +7 -0
  76. package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
  77. package/dist/utility/chart/quote-perp.leaf.js +20 -0
  78. package/dist/utility/chart/rth-session.util.d.ts +3 -2
  79. package/dist/utility/chart/rth-session.util.js +2 -1
  80. package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
  81. package/dist/utility/chart/window-geometry.leaf.js +22 -6
  82. package/dist/utility/chart/wrun-run-result.util.d.ts +17 -0
  83. package/dist/utility/chart/wrun-run-result.util.js +145 -7
  84. package/dist/utility/common/transformations.util.d.ts +7 -0
  85. package/dist/utility/common/transformations.util.js +11 -0
  86. package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
  87. package/dist/utility/options/option-bar-anchor.util.js +340 -0
  88. package/dist/utility/options/option-venue.util.d.ts +21 -3
  89. package/dist/utility/options/option-venue.util.js +30 -3
  90. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
  91. package/dist/utility/wrun/derived-roots.util.d.ts +213 -0
  92. package/dist/utility/wrun/derived-roots.util.js +471 -0
  93. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +41 -6
  94. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
  95. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
  96. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
  97. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +5 -3
  98. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +6 -4
  99. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
  100. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
  101. package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
  102. package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
  103. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
  104. package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
  105. package/dist/utility/wrun/sources/row-lane-registry.js +3 -2
  106. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
  107. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
  108. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +15 -6
  109. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +14 -0
  110. package/dist/utility/wrun/sources/row-lanes/option_prints.js +82 -13
  111. package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
  112. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -8
  113. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +95 -14
  114. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +5 -2
  115. package/dist/utility/wrun/sources/row-lanes/option_surface.js +7 -3
  116. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
  117. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +35 -14
  118. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +70 -20
  119. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +64 -0
  120. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +89 -0
  121. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +45 -1
  122. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +114 -6
  123. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +56 -5
  124. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +224 -26
  125. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +822 -58
  126. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
  127. package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
  128. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
  129. package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
  130. package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
  131. package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
  132. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
  133. package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
  134. package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
  135. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +192 -13
  136. package/dist/utility/wrun/wrun-chart-market-facts.util.js +437 -55
  137. package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
  138. package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
  139. package/dist/utility/wrun/wrun-color-settings.util.d.ts +15 -4
  140. package/dist/utility/wrun/wrun-color-settings.util.js +31 -12
  141. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
  142. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
  143. package/dist/utility/wrun/wrun-download-meter.util.d.ts +107 -0
  144. package/dist/utility/wrun/wrun-download-meter.util.js +134 -0
  145. package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
  146. package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
  147. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
  148. package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
  149. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +6 -1
  150. package/dist/utility/wrun/wrun-draft-overlay.util.js +23 -3
  151. package/dist/utility/wrun/wrun-frames.d.ts +27 -6
  152. package/dist/utility/wrun/wrun-frames.js +78 -15
  153. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  154. package/dist/utility/wrun/wrun-hosted-wire-caps.js +7 -0
  155. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
  156. package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
  157. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +51 -21
  158. package/dist/utility/wrun/wrun-hud-looks.util.js +74 -28
  159. package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
  160. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
  161. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
  162. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
  163. package/dist/utility/wrun/wrun-live-intake.util.d.ts +19 -9
  164. package/dist/utility/wrun/wrun-live-intake.util.js +213 -45
  165. package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
  166. package/dist/utility/wrun/wrun-live-tick.util.js +246 -49
  167. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
  168. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
  169. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +205 -48
  170. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +277 -34
  171. package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +51 -7
  172. package/dist/utility/wrun/wrun-market-size-defaults.util.js +340 -56
  173. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
  174. package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
  175. package/dist/utility/wrun/wrun-option-prints.util.d.ts +41 -2
  176. package/dist/utility/wrun/wrun-option-prints.util.js +80 -13
  177. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
  178. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
  179. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +26 -6
  180. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +50 -11
  181. package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +109 -19
  182. package/dist/utility/wrun/wrun-option-strike-flow.util.js +222 -61
  183. package/dist/utility/wrun/wrun-option-views.util.d.ts +96 -18
  184. package/dist/utility/wrun/wrun-option-views.util.js +246 -51
  185. package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
  186. package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
  187. package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
  188. package/dist/utility/wrun/wrun-output-style.util.js +20 -2
  189. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +20 -0
  190. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
  191. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
  192. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
  193. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
  194. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +7 -0
  195. package/dist/utility/wrun/wrun-overlay-recovery.util.js +25 -1
  196. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
  197. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  198. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +134 -37
  199. package/dist/utility/wrun/wrun-overlay-run.util.js +1118 -254
  200. package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +4 -4
  201. package/dist/utility/wrun/wrun-pack-widths.leaf.js +4 -4
  202. package/dist/utility/wrun/wrun-pack.util.d.ts +7 -3
  203. package/dist/utility/wrun/wrun-pack.util.js +20 -9
  204. package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
  205. package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
  206. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
  207. package/dist/utility/wrun/wrun-panel-mount.util.js +63 -13
  208. package/dist/utility/wrun/wrun-panel-style.util.d.ts +37 -24
  209. package/dist/utility/wrun/wrun-panel-style.util.js +100 -29
  210. package/dist/utility/wrun/wrun-param-map.util.d.ts +15 -11
  211. package/dist/utility/wrun/wrun-param-map.util.js +13 -5
  212. package/dist/utility/wrun/wrun-param-values.util.d.ts +21 -3
  213. package/dist/utility/wrun/wrun-param-values.util.js +6 -0
  214. package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
  215. package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
  216. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
  217. package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
  218. package/dist/utility/wrun/wrun-refusal.util.js +10 -1
  219. package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
  220. package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
  221. package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
  222. package/dist/utility/wrun/wrun-run-interval.util.d.ts +4 -2
  223. package/dist/utility/wrun/wrun-run-interval.util.js +9 -6
  224. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +52 -1
  225. package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
  226. package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
  227. package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
  228. package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
  229. package/dist/utility/wrun/wrun-socket-row-source.js +113 -8
  230. package/dist/utility/wrun/wrun-source-rows.util.d.ts +9 -1
  231. package/dist/utility/wrun/wrun-source-rows.util.js +108 -43
  232. package/dist/utility/wrun/wrun-style-words.util.js +6 -4
  233. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
  234. package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
  235. package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
  236. package/dist/utility/wrun/wrun-tape-per-order.util.js +26 -0
  237. package/dist/utility/wrun/wrun-tape-source.util.d.ts +126 -50
  238. package/dist/utility/wrun/wrun-tape-source.util.js +193 -68
  239. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
  240. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
  241. package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
  242. package/dist/utils/replay/replay-buffer-math.js +227 -20
  243. package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
  244. package/dist/workers/utils/volume-profile.worker.util.js +5 -2
  245. package/dist/workers/wrun/wrun-abi-host.js +3 -2
  246. package/package.json +5 -5
@@ -66,6 +66,7 @@ import { type WrunIntegrationRoute } from './wrun-integration-route.util.js';
66
66
  import type { OverlayRunInterval } from '../chart/indicator-run-interval.util.js';
67
67
  import { type WrunPrefixFeedClause } from './run-schedule/wrun-prefix-feeds.util.js';
68
68
  import { type WrunCandleGroup, type WrunFillPair, type WrunRunResult } from '../chart/wrun-run-result.util.js';
69
+ import { type WrunRowLaneBudgetCut } from './sources/wrun-row-lanes.util.js';
69
70
  import { type WrunEarningsMarket } from './wrun-earnings-facts.util.js';
70
71
  import { type WrunRunHealth } from './wrun-run-health.util.js';
71
72
  import { type WrunChartNames } from './wrun-chart-context.util.js';
@@ -73,6 +74,7 @@ import { type WrunFactsMarket } from './wrun-chart-market-facts.util.js';
73
74
  import { type WrunStrategyBarInput } from './wrun-host.service.js';
74
75
  import { type WrunRefusalAttemptToken, type WrunRefusalContext, type WrunRefusalSeed } from './wrun-refusal.util.js';
75
76
  import { type WrunHostFillContext } from './wrun-script-inputs.util.js';
77
+ import { type WrunDownloadSummary } from './wrun-download-meter.util.js';
76
78
  import type { WrunLatestSnapshot } from './wrun-latest-snapshot.js';
77
79
  import { wrunChartMarketIdentity, type WrunOverlayLiveContext, type WrunWarmupMiss } from './wrun-overlay-drivers.util.js';
78
80
  import type { WrunLegCandleClose } from '@orangecharts/indicator-kit/host';
@@ -84,6 +86,19 @@ import type { RuntimeDiagnostic } from '../../interfaces/kscript-diagnostics.int
84
86
  import { buildWrunOverlayRunResult, type WrunCanvasHostFill, type WrunOverlayResultOptions } from './wrun-overlay-result.util.js';
85
87
  import { wrunIntegratedRowsView } from './wrun-integration-budget.util.js';
86
88
  export { buildWrunOverlayRunResult, type WrunCanvasHostFill, type WrunOverlayResultOptions };
89
+ /**
90
+ * The chart market's units a result build reads, together: its size unit (`wrunChartSizeUnit`: an output whose
91
+ * `visible_by` leaves it out mounts nothing) and its dollar unit when proven (`wrunMarketDollarUnit`: the CME registry's
92
+ * point value of the contract, NQ 20; 1 on crypto and US stocks), which the batched marks' `units` caption and hover
93
+ * divide a record's dollar value by. Synchronous over the facts the run head warmed. Every build spreads it (the full
94
+ * run, the row-source run, the reseed, the refine, the prefix landing and the live tick), so a tail or a reseed never
95
+ * hands the children a size unit without the dollar unit: a tail without it would re-register the hover in dollars.
96
+ * tests/utility/wrun/wrun-big-trades-size-shown-as.spec.ts fails on a build that names a size unit by hand.
97
+ */
98
+ export declare function wrunResultMarketUnits(market: WrunFactsMarket | undefined): {
99
+ sizeUnit: number;
100
+ valuePerUnit?: number;
101
+ };
87
102
  export { wrunIntegratedRowsView };
88
103
  /** The leg bars an odds seed fetch reaches back before the window's open
89
104
  * (the hosted lane's seed span): the last observation before a thin
@@ -231,6 +246,8 @@ export type WrunRunStage = 'head' | 'lanes' | 'compute' | 'integrate' | 'prefix'
231
246
  */
232
247
  export declare function surfaceWrunRunFailureOnLegend(chartIndex: number, indicatorId: string, error: unknown, context?: {
233
248
  outputNames?: readonly string[];
249
+ /** The run's console provenance (`computed.opra`): its runtime trap row carries the row mark. */
250
+ opra?: boolean;
234
251
  /** The run's refusal context (the run pass builds it from the chart it ran on). */
235
252
  refusalContext?: WrunRefusalContext;
236
253
  /** The attempt token the run resolved before its first await; absent or null: no toast. */
@@ -261,6 +278,54 @@ export declare function wrunRefusalContextFor(input: {
261
278
  settings: unknown;
262
279
  chartMetadata: WrunRefusalChartMetadata;
263
280
  }): Promise<WrunRefusalContext>;
281
+ /** A row lane's read its row budget cut (`onBudgetCut`, wrun-row-lanes.util): the newest bars that fit read whole,
282
+ * the older ones partial, so the run drew fewer bars of that lane than the chart shows. */
283
+ export declare const WRUN_ROW_BUDGET_CUT_CODE = "WRUN_ROW_BUDGET_CUT";
284
+ /** The rows the run seam owns for its row budget cuts: replaced by every full run, cleared by a run that cut nothing. */
285
+ export declare const WRUN_ROW_BUDGET_ROW_CODES: ReadonlySet<string>;
286
+ /** The legend's localized sentence of a cut over its facts (`{ n }`, the bars kept, its plural choice). */
287
+ export declare const WRUN_ROW_BUDGET_CUT_NOTE_KEY = "wrun.rowBudget.cut";
288
+ /**
289
+ * The legend note rows of a run's row budget cuts, one per row lane instance its budget cut: warnings in the run-owned
290
+ * set `WRUN_ROW_BUDGET_ROW_CODES`, `message` the technical words (Copy details, the console), `details` the facts the
291
+ * legend's sentence reads (`WRUN_ROW_BUDGET_CUT_NOTE_KEY`: `{ n }`) beside the lane and the cut. A note, never a
292
+ * refusal: the run drew its newest bars, and without it a package that drew 30 bars of a long chart (Strike
293
+ * Footprint) said nothing about why. Empty for no cut, which is what clears the rows of an earlier run.
294
+ */
295
+ export declare function wrunRowBudgetCutDiagnostics(cuts: Iterable<WrunRowLaneBudgetCut>): RuntimeDiagnostic[];
296
+ /** The indicator download budget's two chips (OPTLOAD W3 R2), the source chip family's run-owned codes
297
+ * (kscript-source-degrade.util `FE_SOURCE_TRIMMED_CODE`, `FE_SOURCE_HEAVY_CODE`, spelled here because the package
298
+ * names no web module; tests/utility/wrun/wrun-overlay-run.download-budget.spec.ts pins them equal): replaced by every
299
+ * full run, cleared by a run that kept its budget. */
300
+ export declare const WRUN_DOWNLOAD_TRIMMED_CODE = "FE_SOURCE_TRIMMED";
301
+ export declare const WRUN_DOWNLOAD_HEAVY_CODE = "FE_SOURCE_HEAVY";
302
+ export declare const WRUN_DOWNLOAD_BUDGET_ROW_CODES: ReadonlySet<string>;
303
+ /** Bytes as the download chips write them, 1,000,000 a MB: "1 MB", "1.2 MB", "17 MB". */
304
+ export declare function wrunDownloadMbText(bytes: number): string;
305
+ /** A feed as a download chip names it: its label (the console's words), and the i18n key the legend says it in. */
306
+ export interface WrunDownloadFeed {
307
+ label: string;
308
+ key?: string;
309
+ }
310
+ /**
311
+ * The download budget's legend rows of one full run (R2), info rows in the run-owned set
312
+ * `WRUN_DOWNLOAD_BUDGET_ROW_CODES`, still text in the source chip family's coverage group (never a spinner, never a
313
+ * toast; runtime-diagnostics.util words them from `details`, the feeds by `feedKeys` where a lane has feed words):
314
+ * - `FE_SOURCE_TRIMMED` ("Newest bars only"), when the budget cut a read: the feeds it cut, the oldest bar all of them
315
+ * still read (`date`, `keptFromTs`: the newest of the cuts' oldest kept bars) and the budget;
316
+ * - `FE_SOURCE_HEAVY` ("Large download"), when the run downloaded more than its budget and cut nothing (one snapshot):
317
+ * the feed that downloaded the most, the size and the budget.
318
+ * Empty with the flag off, or for a run that kept its budget: what clears an earlier run's rows.
319
+ */
320
+ export declare function wrunDownloadBudgetDiagnostics(args: {
321
+ on: boolean;
322
+ cuts: Iterable<WrunRowLaneBudgetCut>;
323
+ summary: WrunDownloadSummary | undefined;
324
+ feedOf: (laneKeyOrType: string) => WrunDownloadFeed;
325
+ }): RuntimeDiagnostic[];
326
+ /** Whether the download budget's cut is on (`FeatureFlag.WrunDownloadBudgetCut`); a host whose flag store is not up
327
+ * reads off. */
328
+ export declare function wrunDownloadBudgetCutOn(): boolean;
264
329
  /**
265
330
  * The run health the chart's surfaces read (the chip policy, FE-RUN): an output a viewer cannot
266
331
  * see is not watched (`legend: false` and a sheet `visible: false`, which `wrunRunHealth` skips,
@@ -537,7 +602,13 @@ type WrunBuiltinLaneThunks = {
537
602
  };
538
603
  /** One lane keyed by its id to dispatch (a registry poll lane instance, a trades leg lane): its id and its fetch,
539
604
  * handed the signal its run raises when the lane's budget runs out (`runWrunSourceLanes`). */
540
- type WrunPollLaneThunk = readonly [key: string, run: (abandoned: AbortSignal) => Promise<WrunLaneRows>];
605
+ /** A lane's first rows before its whole answer (a row lane's first-paint slice: wrun-row-lanes.util
606
+ * `fetchWrunRowLaneRows` `onFirstSlice`), handed to its thunk by `runWrunSourceLanes`. */
607
+ type WrunLaneEarly = (rows: WrunLaneRows) => void;
608
+ type WrunPollLaneThunk = readonly [
609
+ key: string,
610
+ run: (abandoned: AbortSignal, early?: WrunLaneEarly) => Promise<WrunLaneRows>
611
+ ];
541
612
  type WrunSourceLaneThunks = WrunBuiltinLaneThunks & {
542
613
  /** The trades leg lanes (kit 0.77.0), one thunk per (quote, market) by its lane id. */
543
614
  tradeLegs?: ReadonlyArray<WrunPollLaneThunk>;
@@ -567,10 +638,12 @@ export declare function mergeWrunSourceLaneRuns(runs: ReadonlyArray<WrunSourceLa
567
638
  * rows with the cause (a budget expiry, an empty or declined answer, any
568
639
  * other rejection). Every cause here is retryable, except an answer the
569
640
  * data plane refused by name (wrun-lane-refusal.leaf): the same ask is
570
- * refused again, so no ladder re-asks it. */
641
+ * refused again, so no ladder re-asks it. A lane that answered its first rows alone (`filling`: a row lane's
642
+ * first-paint slice) is rows: its whole answer went on as a late read. */
571
643
  export type WrunLaneOutcome = {
572
644
  kind: 'rows';
573
645
  rows: WrunLaneRows;
646
+ filling?: true;
574
647
  } | {
575
648
  kind: 'degraded';
576
649
  rows: [];
@@ -609,10 +682,11 @@ export interface WrunSourceLanePolicy {
609
682
  /** Called with each lane id right before its thunk runs, and the lane's send anchor, which the fetch that asks the
610
683
  * lane hands its transport. */
611
684
  onDispatch?: (lane: string, anchor: WrunLaneSendAnchor) => void;
612
- /** Called with a lane's own answer when its budget ran out first (never when the answer itself failed): the read is
613
- * abandoned, never aborted, so it is still out, and a later run's dispatch may join or adopt it
614
- * (run-schedule/wrun-late-reads.util). */
615
- onLate?: (lane: string, answer: Promise<WrunLaneRows>) => void;
685
+ /** Called with a lane's own answer when the run stopped waiting for it while it was still out (never when the answer
686
+ * itself failed): its budget ran out first (`budget`), or the lane handed its first rows over first (`first-slice`:
687
+ * a row lane's first-paint slice, its older bars still out). The read is abandoned, never aborted, and a later run's
688
+ * dispatch may join or adopt it (run-schedule/wrun-late-reads.util). */
689
+ onLate?: (lane: string, answer: Promise<WrunLaneRows>, why: 'budget' | 'first-slice') => void;
616
690
  }
617
691
  /**
618
692
  * A lane's send anchor (`WrunSourceLanePolicy.onDispatch`): the fetch that asks the lane calls `request()` right before
@@ -645,34 +719,18 @@ export interface WrunLaneSendAnchor {
645
719
  * poll lanes (`thunks.pollLanes`, one thunk per planned instance) dispatch with
646
720
  * them, after the row builder's own lanes; their rows come back under
647
721
  * `tradeLegRows` and `pollLaneRows`, keyed by lane id and instance id.
722
+ *
723
+ * A lane may hand its first rows over before its whole answer (`early`, a row lane's first-paint slice on a full run's
724
+ * first paint): when they come before the whole answer and before the budget, the lane settles on them (outcome
725
+ * rows, `filling`) and its whole answer goes on as a late read (`onLate`, `first-slice`), exactly as a read its budget
726
+ * abandoned does, so the source ladder adopts it and nothing asks it twice. Early rows after the budget change
727
+ * nothing: the budget's late read is the whole answer already.
648
728
  */
649
729
  export declare function runWrunSourceLanes(thunks: WrunSourceLaneThunks, policy?: WrunSourceLanePolicy): Promise<WrunSourceLaneRun>;
650
- /**
651
- * The host-filled values a run's `market.*` params read (WRUN-INPUTS-PLAN
652
- * 1.1, `host_fill`): `tickSize` = the instrument tick the pane's engine
653
- * holds (`getPriceTick`, CME venues today), else the tick the chart's own
654
- * candles reveal (`wrunInferredMainTick`: Binance BTCUSDT reads 0.1, so a
655
- * `ticks` offset moves by ticks off CME too); absent when neither knows one,
656
- * which the kit helpers read as unavailable. `pricePrecision` = the decimals
657
- * the chart's MAIN price scale prints at (the engine tick's own decimals
658
- * when it holds one, else the axis-step rule; HIP-4 overrides both), the
659
- * same resolution `calculatePricePrecision` makes for the axis: an inferred
660
- * tick never moves it. Feature-detected on the engine: a pin without the
661
- * tick API, or a bare test double, yields no engine tick.
662
- * The chart words (`intervalSec` = `intervalMs` / 1000, the run clock's
663
- * interval; `bgColor` / `fgColor` = the pane theme's background and axis
664
- * text colour, packed) ride beside them (wrunChartContextHostFill); an
665
- * unknown interval or a theme-less engine leaves them absent. The main
666
- * scale's `priceStep` is the axis label spacing (it moves with zoom), never
667
- * a price unit: it only picks the axis precision here. With `market` (the
668
- * chart metadata), the market's facts ride too (`kind`, `pointValue`, `zone`,
669
- * `quoteIsUsd`, `sessionOpen`: wrunMarketFactsFor, over the directory row a
670
- * run of a package declaring `kind` or `quote_is_usd` awaited first). With
671
- * `earnings` (the chart metadata, passed for a sheet that declares an
672
- * earnings fact), the issuer's earnings facts ride too (`earningsNextMs`,
673
- * `earningsPrevMs`, `earningsSession`: wrunEarningsFactsFor, over the earnings
674
- * window a run of such a package warmed first).
675
- */
730
+ /** The chart metadata as a batch the cloud computed reads its facts (`integrateWrunRowSourceBatch`): the chart's own
731
+ * market's, named outright so no browser run's decision on the chart stands in (`wrunDecidedOptionsExchange`). The
732
+ * server resolves the chain of the chart market it is sent (follow-up: the backend's stock twin rule). */
733
+ export declare function wrunCloudFactsMarket(chartMetadata: WrunFactsMarket | undefined): WrunFactsMarket | undefined;
676
734
  export declare function wrunHostFillContextFor(tc: unknown, chartExchange: unknown, intervalMs?: number, market?: WrunFactsMarket, earnings?: WrunEarningsMarket): WrunHostFillContext;
677
735
  /**
678
736
  * The latest-values snapshot of a run's rows (wrun-hud-state, U10's frozen
@@ -695,18 +753,45 @@ export declare function wrunLatestSnapshotOf(metadata: Pick<WrunIndicatorMetadat
695
753
  * left out.
696
754
  */
697
755
  export declare function wrunOutputRowsOnChartBars(outputRows: ReadonlyArray<WrunOutputRow>, chart: unknown, run: Pick<OverlayRunInterval, 'intervalMs' | 'waitForClose' | 'sessionLattice'>): WrunOutputRow[];
756
+ /**
757
+ * Whose rows a presentation publishes (`presentWrunIntegration`), as a refused full run's snapshot
758
+ * (wrun-refusal-surface.util `wrunRefusedLatestSnapshotOf`) reads them: `run` for the verdicts that supersede every
759
+ * earlier one (contract C3: a full run's integrate, the cloud batch's, a reseed's), which replace it; `republish` for
760
+ * the rows a full run's live session carries on (a tick, a canvas refine, a landed pan page), which never do. Those
761
+ * rows belong to the computation the refusal superseded (another market, other settings), and the run's refusal
762
+ * still stands on the legend beside them, so their numbers would contradict its chip.
763
+ */
764
+ export type WrunLatestPublishOrigin = 'run' | 'republish';
765
+ /** What an integrate applied, as the snapshot's empty targets read it (wrunSnapshotEmptyTargets): the result's
766
+ * `emptyTargets`, and whether its rows were a window of the loaded range (`partial`: the mount keeps its rows
767
+ * outside it). */
768
+ export interface WrunAppliedEmptiness {
769
+ emptyTargets?: ReadonlyArray<string>;
770
+ partial?: boolean;
771
+ }
772
+ /**
773
+ * The Style targets the latest-values snapshot names as drawing nothing (WrunLatestSnapshot.emptyTargets, the Style
774
+ * page's silent lines): the applied result's own, judged over the whole loaded range. A result computed over a
775
+ * window of it (`partial`) speaks for that window only, and the mount keeps its rows outside, so it can clear a
776
+ * target (values in the window) but never mark one: the previous snapshot's targets it still finds empty. A
777
+ * republish that built no result (`applied` absent) carries the previous snapshot's forward.
778
+ */
779
+ export declare function wrunSnapshotEmptyTargets(previous: ReadonlyArray<string> | undefined, applied: WrunAppliedEmptiness | undefined): string[];
698
780
  /**
699
781
  * What follows every successful integrate, the full run's, the reseed's and
700
782
  * the tick's (after the lower-pane children mounted): the nested output
701
783
  * visibility the sheet (`visible: false`) and the Style page's Visible rows
702
784
  * ask for (U9's `applyWrunOutputVisibility`, parent and children), and the
703
785
  * latest-values snapshot the HUD layer, the legend and the hover inspector
704
- * read (`publishWrunLatestValues`), then the Indicator store's seen note for
705
- * a registry Indicator (`noteWrunRegistryRun`: once a page and day, the maker's
706
- * private reach; both row sources pass here). Presentation only: a failure here
707
- * is logged, never a second failure over a run that rendered.
786
+ * read (`publishWrunLatestValues`; a republish leaves a refused full run's
787
+ * snapshot as it is, `WrunLatestPublishOrigin`) with the applied result's
788
+ * `emptyTargets` (the Style page dims those lines), then the Indicator store's
789
+ * seen note for a registry Indicator (`noteWrunRegistryRun`: once a page and
790
+ * day, the maker's private reach; both row sources pass here). Presentation
791
+ * only: a failure here is logged, never a second failure over a run that
792
+ * rendered.
708
793
  */
709
- export declare function presentWrunIntegration(chartIndex: number, indicatorId: string, metadata: WrunIndicatorMetadata, settings: unknown, outputRows: ReadonlyArray<WrunOutputRow>, chart?: unknown, initArgs?: ReadonlyArray<number>, chartNames?: WrunChartNames, runInterval?: OverlayRunInterval | null): void;
794
+ export declare function presentWrunIntegration(chartIndex: number, indicatorId: string, metadata: WrunIndicatorMetadata, settings: unknown, outputRows: ReadonlyArray<WrunOutputRow>, chart?: unknown, initArgs?: ReadonlyArray<number>, chartNames?: WrunChartNames, runInterval?: OverlayRunInterval | null, origin?: WrunLatestPublishOrigin, applied?: WrunAppliedEmptiness): void;
710
795
  /**
711
796
  * The canvas fill a run integrates with: for a sheet that declares a TPO,
712
797
  * the block the catalog mirror holds for the chart market (a mirror miss, a
@@ -863,6 +948,18 @@ export interface WrunIntegrateOutcome {
863
948
  * route skip or a sparse run the mounted rows outrank. */
864
949
  applied: boolean;
865
950
  }
951
+ /**
952
+ * The result a mounted overlay shows now, as it was built, with the window it was computed over (the
953
+ * workspace switch's stand-in capture stores it, kscript-standin-switch.util): the live tick's last
954
+ * applied build (`liveApplied`), else the result this lane's last full integrate applied while its
955
+ * rows are still the ones mounted (the mount memo: a tick's whole integrate, a blank or a stand-in
956
+ * replaces them), else undefined. While a repaint is owed the chart lags the session, so nothing on
957
+ * it is known to show: undefined. Nothing is rebuilt or patched here.
958
+ */
959
+ export declare function wrunMountedRunResultOf(indicatorId: string, meta: Record<string, unknown>): {
960
+ runResult: WrunRunResult;
961
+ window?: WrunRunWindow;
962
+ } | undefined;
866
963
  /**
867
964
  * The chart's integration budget over the parent and its lower panes (`applyWrunIntegrationBudgetPolicy`,
868
965
  * wrun-integration-budget.util): rows past the kScript preflight's 400k refuse with the kScript path's diagnostic