@orangecharts/wrun-chart-host 0.7.1 → 0.9.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 (210) hide show
  1. package/README.md +27 -4
  2. package/dist/constants/feature-flags.constants.d.ts +5 -0
  3. package/dist/constants/feature-flags.constants.js +32 -0
  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 +14 -0
  7. package/dist/constants/opra-compliance.constants.js +14 -0
  8. package/dist/constants/option-venues.constants.d.ts +29 -6
  9. package/dist/constants/option-venues.constants.js +19 -2
  10. package/dist/constants/venue-presets.constants.d.ts +17 -3
  11. package/dist/constants/venue-presets.constants.js +17 -3
  12. package/dist/host-env.d.ts +34 -4
  13. package/dist/host-env.js +21 -0
  14. package/dist/host-ports.types.d.ts +51 -3
  15. package/dist/index.d.ts +17 -0
  16. package/dist/index.js +17 -0
  17. package/dist/indicators/controls/tpo-session.util.d.ts +40 -11
  18. package/dist/indicators/controls/tpo-session.util.js +138 -14
  19. package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
  20. package/dist/interfaces/opra-realtime.interface.js +10 -10
  21. package/dist/interfaces/option-instrument.interface.d.ts +6 -0
  22. package/dist/interfaces/wrun-runtime.interface.d.ts +34 -13
  23. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +57 -10
  24. package/dist/kscript-data/controls/live-trades-merge.util.js +85 -16
  25. package/dist/market-data/billing.interface.d.ts +138 -17
  26. package/dist/market-data/billing.interface.js +25 -8
  27. package/dist/market-data/venues/index.d.ts +3 -3
  28. package/dist/market-data/venues/opra.contract.copy.json +5 -3
  29. package/dist/market-data/venues/opra.d.ts +3 -3
  30. package/dist/market-data/venues/opra.js +5 -4
  31. package/dist/replay/replayLadder.js +3 -1
  32. package/dist/settings-templates/footprint-rows.d.ts +25 -0
  33. package/dist/settings-templates/footprint-rows.js +127 -0
  34. package/dist/settings-templates/form-rows.d.ts +56 -0
  35. package/dist/settings-templates/form-rows.js +19 -0
  36. package/dist/settings-templates/frvp-fields.js +14 -0
  37. package/dist/settings-templates/index.d.ts +10 -1
  38. package/dist/settings-templates/index.js +11 -2
  39. package/dist/settings-templates/indicator-fields.js +78 -0
  40. package/dist/settings-templates/tool-rules.d.ts +35 -9
  41. package/dist/settings-templates/tool-rules.js +42 -8
  42. package/dist/settings-templates/tool-tables.generated.js +13 -2
  43. package/dist/utility/chart/candle-volume-unit.leaf.d.ts +16 -0
  44. package/dist/utility/chart/candle-volume-unit.leaf.js +61 -0
  45. package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
  46. package/dist/utility/chart/crypto-index.leaf.js +2 -2
  47. package/dist/utility/chart/footprint-columns.util.d.ts +74 -0
  48. package/dist/utility/chart/footprint-columns.util.js +106 -0
  49. package/dist/utility/chart/footprint-display-mode.util.d.ts +40 -0
  50. package/dist/utility/chart/footprint-display-mode.util.js +62 -0
  51. package/dist/utility/chart/footprint-sierra-look.util.d.ts +2 -0
  52. package/dist/utility/chart/footprint-sierra-look.util.js +37 -0
  53. package/dist/utility/chart/index-mode-admission.util.js +9 -1
  54. package/dist/utility/chart/index-mode.util.d.ts +5 -2
  55. package/dist/utility/chart/index-mode.util.js +23 -13
  56. package/dist/utility/chart/kscript-venue-policy.util.d.ts +28 -21
  57. package/dist/utility/chart/kscript-venue-policy.util.js +34 -26
  58. package/dist/utility/chart/marketKind.util.d.ts +12 -10
  59. package/dist/utility/chart/marketKind.util.js +17 -7
  60. package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
  61. package/dist/utility/chart/om-panel-push-style.util.js +17 -15
  62. package/dist/utility/chart/om-panel.util.d.ts +11 -0
  63. package/dist/utility/chart/om-panel.util.js +65 -6
  64. package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
  65. package/dist/utility/chart/profile-block-size.util.js +7 -0
  66. package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
  67. package/dist/utility/chart/quote-perp.leaf.js +20 -0
  68. package/dist/utility/chart/window-geometry.leaf.d.ts +23 -1
  69. package/dist/utility/chart/window-geometry.leaf.js +78 -6
  70. package/dist/utility/chart/window-owner.leaf.d.ts +13 -0
  71. package/dist/utility/chart/window-owner.leaf.js +5 -0
  72. package/dist/utility/chart/wrun-run-result.util.d.ts +5 -0
  73. package/dist/utility/chart/wrun-run-result.util.js +4 -1
  74. package/dist/utility/common/transformations.util.d.ts +7 -0
  75. package/dist/utility/common/transformations.util.js +11 -0
  76. package/dist/utility/options/cme-options-root.util.d.ts +25 -0
  77. package/dist/utility/options/cme-options-root.util.js +40 -0
  78. package/dist/utility/options/option-book.util.d.ts +27 -0
  79. package/dist/utility/options/option-book.util.js +76 -0
  80. package/dist/utility/options/option-trade-date.util.d.ts +50 -0
  81. package/dist/utility/options/option-trade-date.util.js +120 -0
  82. package/dist/utility/options/option-venue.util.d.ts +3 -3
  83. package/dist/utility/options/option-venue.util.js +3 -3
  84. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +1 -1
  85. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +2 -2
  86. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
  87. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
  88. package/dist/utility/wrun/sources/host-grid-landing.d.ts +4 -2
  89. package/dist/utility/wrun/sources/host-grid-landing.js +8 -0
  90. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +40 -4
  91. package/dist/utility/wrun/sources/lanes/options_flow.js +115 -18
  92. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +12 -9
  93. package/dist/utility/wrun/sources/opra-option-lanes.util.js +10 -7
  94. package/dist/utility/wrun/sources/row-lane-registry.js +10 -5
  95. package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
  96. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +3 -2
  97. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +30 -5
  98. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
  99. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +13 -5
  100. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +25 -1
  101. package/dist/utility/wrun/sources/row-lanes/option_prints.js +161 -30
  102. package/dist/utility/wrun/sources/row-lanes/option_strike_flow.d.ts +4 -0
  103. package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +65 -0
  104. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -1
  105. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +83 -2
  106. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +17 -1
  107. package/dist/utility/wrun/sources/row-lanes/option_surface.js +33 -2
  108. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +7 -1
  109. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +51 -5
  110. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +136 -3
  111. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +42 -0
  112. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +146 -0
  113. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +25 -5
  114. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +111 -20
  115. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +291 -48
  116. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
  117. package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
  118. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
  119. package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
  120. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
  121. package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
  122. package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
  123. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +147 -9
  124. package/dist/utility/wrun/wrun-chart-market-facts.util.js +345 -11
  125. package/dist/utility/wrun/wrun-cloud-record.leaf.d.ts +27 -0
  126. package/dist/utility/wrun/wrun-cloud-record.leaf.js +71 -0
  127. package/dist/utility/wrun/wrun-cloud-record.util.d.ts +4 -21
  128. package/dist/utility/wrun/wrun-cloud-record.util.js +5 -65
  129. package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
  130. package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
  131. package/dist/utility/wrun/wrun-color-settings.util.d.ts +22 -9
  132. package/dist/utility/wrun/wrun-color-settings.util.js +57 -23
  133. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
  134. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
  135. package/dist/utility/wrun/wrun-download-meter.util.d.ts +92 -0
  136. package/dist/utility/wrun/wrun-download-meter.util.js +122 -0
  137. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +10 -3
  138. package/dist/utility/wrun/wrun-draft-overlay.util.js +63 -6
  139. package/dist/utility/wrun/wrun-frames.js +5 -5
  140. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  141. package/dist/utility/wrun/wrun-hosted-wire-caps.js +11 -0
  142. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +33 -17
  143. package/dist/utility/wrun/wrun-hud-looks.util.js +30 -16
  144. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +29 -3
  145. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +33 -3
  146. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
  147. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
  148. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
  149. package/dist/utility/wrun/wrun-live-intake.util.d.ts +6 -2
  150. package/dist/utility/wrun/wrun-live-intake.util.js +136 -21
  151. package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -1
  152. package/dist/utility/wrun/wrun-live-tick.util.js +130 -44
  153. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
  154. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
  155. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +224 -0
  156. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +342 -0
  157. package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +88 -0
  158. package/dist/utility/wrun/wrun-market-size-defaults.util.js +471 -0
  159. package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +43 -8
  160. package/dist/utility/wrun/wrun-opra-flow.leaf.js +37 -6
  161. package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +51 -10
  162. package/dist/utility/wrun/wrun-option-contract-flow.util.js +85 -33
  163. package/dist/utility/wrun/wrun-option-prints.util.d.ts +172 -3
  164. package/dist/utility/wrun/wrun-option-prints.util.js +394 -17
  165. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +99 -0
  166. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +218 -0
  167. package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +365 -0
  168. package/dist/utility/wrun/wrun-option-strike-flow.util.js +797 -0
  169. package/dist/utility/wrun/wrun-option-views.util.d.ts +231 -7
  170. package/dist/utility/wrun/wrun-option-views.util.js +643 -23
  171. package/dist/utility/wrun/wrun-options-chain.util.d.ts +6 -4
  172. package/dist/utility/wrun/wrun-options-chain.util.js +8 -5
  173. package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
  174. package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
  175. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +3 -0
  176. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
  177. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
  178. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +9 -1
  179. package/dist/utility/wrun/wrun-overlay-recovery.util.js +32 -3
  180. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
  181. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  182. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +34 -6
  183. package/dist/utility/wrun/wrun-overlay-run.util.js +527 -180
  184. package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +15 -0
  185. package/dist/utility/wrun/wrun-pack-widths.leaf.js +22 -0
  186. package/dist/utility/wrun/wrun-pack.util.d.ts +13 -8
  187. package/dist/utility/wrun/wrun-pack.util.js +38 -21
  188. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +4 -0
  189. package/dist/utility/wrun/wrun-panel-mount.util.js +62 -22
  190. package/dist/utility/wrun/wrun-panel-style.util.d.ts +41 -14
  191. package/dist/utility/wrun/wrun-panel-style.util.js +86 -26
  192. package/dist/utility/wrun/wrun-param-map.util.d.ts +7 -6
  193. package/dist/utility/wrun/wrun-param-map.util.js +8 -5
  194. package/dist/utility/wrun/wrun-param-values.util.d.ts +10 -2
  195. package/dist/utility/wrun/wrun-param-values.util.js +2 -0
  196. package/dist/utility/wrun/wrun-pin-spelling.util.js +19 -10
  197. package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
  198. package/dist/utility/wrun/wrun-refusal.util.js +17 -2
  199. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +20 -0
  200. package/dist/utility/wrun/wrun-script-inputs.util.js +43 -0
  201. package/dist/utility/wrun/wrun-source-rows.util.d.ts +4 -0
  202. package/dist/utility/wrun/wrun-source-rows.util.js +92 -40
  203. package/dist/utility/wrun/wrun-tape-source.util.d.ts +133 -48
  204. package/dist/utility/wrun/wrun-tape-source.util.js +205 -62
  205. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
  206. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
  207. package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
  208. package/dist/workers/utils/volume-profile.worker.util.js +5 -2
  209. package/dist/workers/wrun/wrun-abi-host.js +3 -2
  210. package/package.json +11 -11
@@ -352,6 +352,7 @@ import { findMonday } from '../chart/titan-constants.pin.js';
352
352
  import { wrunBarSessionFactsResolver, } from '../chart/wrun-bar-session-facts.util.js';
353
353
  import { wrunSettingRefusedMessage } from '../scriptEditor/wrun-runtime-diagnostics.leaf.js';
354
354
  import { attachWrunRefusal, wrunPinFinerSeed } from './wrun-refusal.util.js';
355
+ import { isWrunAskedTapeSource, wrunTapeFloorParamOf } from './wrun-tape-source.util.js';
355
356
  import { WRUN_BROWSER_REFUSED_CLASS_CODES } from './wrun-browser-sources.leaf.js';
356
357
  import { wrunProtocolPendingSeed } from './wrun-protocol-pending.util.js';
357
358
  import { planWrunRowLaneInputs, wrunRowLaneCellRows } from './sources/wrun-row-lanes.util.js';
@@ -558,12 +559,14 @@ export function wrunChartGapBarsOf(rows) {
558
559
  export function wrunDemandedSourceClass(source) {
559
560
  return source === undefined || source.undemanded === true ? undefined : source.source;
560
561
  }
561
- /** A leg stream input (`candles`, `oi_candles`, `volume_profile_candles`: wrun-leg-stream-classes) the run's
562
- * sheet on this chart left undemanded (wrunSheetWithLaneGate: its `chart_interval_below` gates the lane off
563
- * on the chart's interval): no leg, no wire, no check, no ask; the row builder hands it a present EMPTY
564
- * block on every row. */
565
- function wrunGatedLegStream(source) {
566
- return isWrunLegStreamClass(source?.source) && source?.undemanded === true;
562
+ /** A celled input the run's sheet on this chart left undemanded: a leg stream (`candles`, `oi_candles`,
563
+ * `volume_profile_candles`: wrun-leg-stream-classes) its `chart_interval_below` gates off on the chart's interval
564
+ * (wrunSheetWithLaneGate), or a tape its `needed_by` leaves the market's size unit out of (wrunSheetWithLaneDemand,
565
+ * kit 0.95.0). No leg, no wire, no check, no ask; the row builder hands it a present EMPTY block on every row (zero
566
+ * cells), never the rows a lane of its class fetched for another input (Big Trades 0.8.0's two tapes ride one tape
567
+ * lane). A row lane keeps its own empty lane (`WrunCellLaneRead`, read before this). */
568
+ function wrunUnaskedCelledInput(input, source) {
569
+ return source?.undemanded === true && (input.cellType === 'array' || isWrunLegStreamClass(source.source));
567
570
  }
568
571
  /**
569
572
  * The row builder's lane an input reads: its source class, except a `trades`
@@ -1341,9 +1344,9 @@ export function planWrunPinnedWires(metadata, chartIntervalMs) {
1341
1344
  };
1342
1345
  for (const input of inputs) {
1343
1346
  const source = metadata.inputSources[input.name];
1344
- // A candles lane gated off on this chart (wrunGatedLegStream) plans nothing, before any check: no
1345
- // leg to fetch, wall-check or re-ask, and never a refusal for its knobs or its cells here.
1346
- if (!source || wrunGatedLegStream(source))
1347
+ // An unasked celled input (a gated candles lane, an unasked tape: wrunUnaskedCelledInput) plans nothing,
1348
+ // before any check: no leg to fetch, wall-check or re-ask, and never a refusal for its knobs or its cells here.
1349
+ if (!source || wrunUnaskedCelledInput(input, source))
1347
1350
  continue;
1348
1351
  const name = input.name;
1349
1352
  if (isWrunLaneStreamClass(source.source)) {
@@ -1909,8 +1912,11 @@ function checkWrunRowReads(metadata, sources, clock, hasRows) {
1909
1912
  }
1910
1913
  }
1911
1914
  // The row lanes (sources/row-lane-registry.ts): each celled input's lane from the static plan (a
1912
- // scalar input and one with no max_cells refuse here), its rows from the instance the run pass
1913
- // planned it into (`sources.rowLanes`; a caller that planned none reads an empty lane).
1915
+ // scalar input, one with no max_cells and a capacity no build writes refuse here), its rows from
1916
+ // the instance the run pass planned it into (`sources.rowLanes`; a caller that planned none reads
1917
+ // an empty lane), and the tuples a bar's block may hold in the run's module, the bound the packer
1918
+ // refuses past (the plan's `capacity`: the sheet's `capacity ?? max_cells`, a print union's whole
1919
+ // only where the capacity holds it).
1914
1920
  const cellLanes = new Map();
1915
1921
  const rowInputs = planWrunRowLaneInputs(metadata);
1916
1922
  if (rowInputs.length > 0) {
@@ -1925,7 +1931,12 @@ function checkWrunRowReads(metadata, sources, clock, hasRows) {
1925
1931
  key: `lane|${instance ?? 'unplanned'}#${planned.inputIndex}`,
1926
1932
  rows: (instance === undefined ? undefined : sources.rowLaneRows?.[instance]) ?? [],
1927
1933
  lane: planned.lane,
1928
- input: { name: planned.inputName, source: planned.source, maxCells: planned.maxCells },
1934
+ input: {
1935
+ name: planned.inputName,
1936
+ source: planned.source,
1937
+ maxCells: planned.maxCells,
1938
+ capacity: planned.capacity,
1939
+ },
1929
1940
  });
1930
1941
  }
1931
1942
  }
@@ -1954,8 +1965,8 @@ function checkWrunRowReads(metadata, sources, clock, hasRows) {
1954
1965
  if (wires.has(input.index) || lanes.has(input.index) || cellLanes.has(input.index))
1955
1966
  continue;
1956
1967
  const source = requireSource(metadata, input.name);
1957
- // A gated candles lane reads its empty block, no lane (wrunGatedLegStream).
1958
- if (wrunGatedLegStream(source))
1968
+ // An unasked celled input reads its empty block, no lane (wrunUnaskedCelledInput).
1969
+ if (wrunUnaskedCelledInput(input, source))
1959
1970
  continue;
1960
1971
  checkWrunLaneRead(metadata, input, source);
1961
1972
  }
@@ -2030,8 +2041,10 @@ function checkWrunLaneRead(metadata, input, source) {
2030
2041
  `(input '${input.name}')`);
2031
2042
  }
2032
2043
  }
2033
- /** The celled classes the browser lanes serve by an exact join (intrabar and candles ride legs). */
2034
- const WRUN_LANE_CELL_CLASSES = new Set([
2044
+ /** The celled classes the browser lanes serve by an exact join (intrabar and candles ride legs): each class's inputs
2045
+ * read the one lane its class rides, an unasked one none (`wrunUnaskedCelledInput`; the class guard walks this set,
2046
+ * tests/utility/wrun/wrun-source-rows.lane-demand.spec.ts). */
2047
+ export const WRUN_LANE_CELL_CLASSES = new Set([
2035
2048
  'book',
2036
2049
  'volume_profile',
2037
2050
  'trade_volume_by_size',
@@ -2110,9 +2123,10 @@ function wrunNeedsChartPrimary(metadata, intervalMs, lanes, sparseGrid) {
2110
2123
  return true;
2111
2124
  return source.interval !== undefined && wrunPinnedIntervalOf(source.interval)?.ms !== intervalMs;
2112
2125
  }
2113
- /** The run's settings the plan reads: the values of the params a tape input's `min_size` names
2114
- * (the floor the lane's acquisition was asked at), and no other (the browser paints every other
2115
- * setting on the sheet), so a sheet without a param-bound floor plans with none, as before. */
2126
+ /** The run's settings the plan reads: the values of the params a tape input's floor (`min_size` or
2127
+ * `min_value`) names (the floor the lane's acquisition was asked at), and no other (the browser
2128
+ * paints every other setting on the sheet), so a sheet without a param-bound floor plans with none,
2129
+ * as before. */
2116
2130
  function wrunTapePlanSettings(metadata, settings) {
2117
2131
  const planned = {};
2118
2132
  if (settings === undefined)
@@ -2123,42 +2137,77 @@ function wrunTapePlanSettings(metadata, settings) {
2123
2137
  }
2124
2138
  return planned;
2125
2139
  }
2126
- /** The params a tape input's `min_size` names: the host resolves that floor itself, from the run's
2127
- * settings (its planTapeFloors), so the plan reads their declarations and their values. */
2140
+ /** The params an asked tape input's floor (`min_size` or `min_value`) names: the host resolves that
2141
+ * floor itself, from the run's settings (its planTapeFloors), so the plan reads their declarations
2142
+ * and their values. An unasked tape (`isWrunAskedTapeSource`) is planned as no tape at all. */
2128
2143
  function wrunTapeFloorParams(metadata) {
2129
2144
  const names = new Set();
2130
2145
  for (const source of Object.values(metadata.inputSources)) {
2131
- if (source?.source === 'tape' && typeof source.min_size === 'string')
2132
- names.add(source.min_size);
2146
+ if (!isWrunAskedTapeSource(source))
2147
+ continue;
2148
+ const paramName = wrunTapeFloorParamOf(source);
2149
+ if (paramName !== undefined)
2150
+ names.add(paramName);
2133
2151
  }
2134
2152
  return names;
2135
2153
  }
2154
+ /**
2155
+ * A tape source as the shared host plans it: a dollar floor (`min_value`, C-DOLLAR) as the kit's tape floor facet
2156
+ * (`min_size`) over the same param or literal. The kit's tape class compares each cell's size column with its floor,
2157
+ * whatever the unit (its cell adapter keeps `size >= floor`), and the browser lane serves a dollar tape's cells sized
2158
+ * by their dollar value (k-trades.worker, the live fold's `tradesTapeCellSize`), so the floor and the column it reads
2159
+ * are one unit there. The installed kit (0.91.1) declares no `min_value` facet and refuses a tape without its own
2160
+ * floor; this is the browser lane's own plan input, never the package's sheet. A raw floor plans as declared.
2161
+ */
2162
+ /**
2163
+ * A source as the shared host plans it, without `needed_by` (kit 0.72.0, and on a secondary tape kit 0.95.0): the
2164
+ * browser's demand verdict is the run's only one (wrunSheetWithLaneDemand on the chart's own market: an input it left
2165
+ * undemanded reads its fill or an empty block, wrunUnaskedCelledInput, and one it asked is asked). The host reads the
2166
+ * word against its own size unit of the run market (`hostFills`), which the plan never carries (its market is the
2167
+ * placeholder, unit 0), so a list without 0 read there dropped an input the browser asked: a coins-only liquidations
2168
+ * lane read NaN on BTCUSDT with its rows fetched, and Big Trades 0.8.0's contracts tape would read zero cells on CME.
2169
+ */
2170
+ function wrunPlannedWithoutDemandWord(source) {
2171
+ if (source.needed_by === undefined)
2172
+ return source;
2173
+ const { needed_by: _decided, ...planned } = source;
2174
+ return planned;
2175
+ }
2176
+ function wrunPlannedTapeSource(source) {
2177
+ if (source.min_value === undefined || source.min_size !== undefined)
2178
+ return source;
2179
+ const { min_value: minValue, ...rest } = source;
2180
+ return { ...rest, min_size: minValue };
2181
+ }
2136
2182
  /**
2137
2183
  * The sheet the shared host plans for one build: every lane read (`WrunLaneRead`) as the lane
2138
2184
  * stand-in under its own missing policy, save a published feed's, planned as the kit's own series
2139
2185
  * wire (`wrunPlannedSeriesRead`: the host's rule e then carries the lane's pre-window bar), every
2140
- * stamp read (`wrunStampReads`) as an `open` read, a candles lane gated off on this chart
2141
- * (`wrunGatedLegStream`) as a cell-less NaN stand-in, and, when input 0 is no host primary, the
2142
- * chart's close prepended as input 0 (every declared input one index later). The sheet's
2143
- * presentation families and params stay out: the browser delivers its own families, and the pins
2144
- * the params set are already painted on the inputs (wrunSheetWithSettings). The one exception is a
2145
- * param a tape input's `min_size` names, which the plan resolves from the run's settings
2146
- * (`wrunTapeFloorParams`).
2186
+ * stamp read (`wrunStampReads`) as an `open` read, an unasked celled input (a candles lane gated off
2187
+ * on this chart, a tape the market does not ask: `wrunUnaskedCelledInput`) as a cell-less NaN
2188
+ * stand-in, and, when input 0 is no host primary, the chart's close prepended as input 0 (every
2189
+ * declared input one index later). No source carries `needed_by` (wrunPlannedWithoutDemandWord: the
2190
+ * browser's demand verdict is the run's one). The sheet's presentation families and params stay out:
2191
+ * the browser delivers its own families, and the pins the params set are already painted on the
2192
+ * inputs (wrunSheetWithSettings). The one exception is a param an asked tape input's floor names,
2193
+ * which the plan resolves from the run's settings (`wrunTapeFloorParams`).
2147
2194
  */
2148
2195
  function wrunPlannedSheet(metadata, lanes, stamps, shift, cellLanes = new Map()) {
2149
2196
  const inputSources = {};
2150
2197
  for (const input of metadata.inputs) {
2151
- const source = metadata.inputSources[input.name];
2152
- if (source === undefined)
2198
+ const declared = metadata.inputSources[input.name];
2199
+ if (declared === undefined)
2153
2200
  continue;
2201
+ // The host never reads the demand word: the browser decided it on the chart's own market.
2202
+ const source = wrunPlannedWithoutDemandWord(declared);
2154
2203
  if (cellLanes.has(input.index)) {
2155
2204
  // A row-lane read: the celled stand-in, its wire re-pointed at the lane's own blocks below.
2156
2205
  inputSources[input.name] = { ...WRUN_ROWS_CELL_LANE_STAND_IN };
2157
2206
  }
2158
- else if (wrunGatedLegStream(source)) {
2159
- // A gated candles lane is planned as a scalar stand-in (its cells dropped below) and read as the
2207
+ else if (wrunUnaskedCelledInput(input, source)) {
2208
+ // An unasked celled input is planned as a scalar stand-in (its cells dropped below) and read as the
2160
2209
  // plan's unserved wire, the NaN placeholder of a celled slot: the host never plans, checks or
2161
- // asks its leg, and the browser hands it an empty block on every row (wrunBrowserRowsOf).
2210
+ // asks its leg or its cells, and the browser hands it an empty block on every row (wrunBrowserRowsOf).
2162
2211
  inputSources[input.name] = { ...WRUN_ROWS_LANE_STAND_IN, missing: 'nan' };
2163
2212
  }
2164
2213
  else if (lanes.has(input.index)) {
@@ -2173,12 +2222,15 @@ function wrunPlannedSheet(metadata, lanes, stamps, shift, cellLanes = new Map())
2173
2222
  else if (stamps.has(input.index)) {
2174
2223
  inputSources[input.name] = { ...source, field: 'open' };
2175
2224
  }
2225
+ else if (source.source === 'tape') {
2226
+ inputSources[input.name] = wrunPlannedTapeSource(source);
2227
+ }
2176
2228
  else {
2177
2229
  inputSources[input.name] = source;
2178
2230
  }
2179
2231
  }
2180
2232
  const inputs = metadata.inputs.map((input) => {
2181
- const planned = wrunGatedLegStream(metadata.inputSources[input.name])
2233
+ const planned = !cellLanes.has(input.index) && wrunUnaskedCelledInput(input, metadata.inputSources[input.name])
2182
2234
  ? { index: input.index, name: input.name }
2183
2235
  : input;
2184
2236
  return shift === 0 ? planned : { ...planned, index: planned.index + 1 };
@@ -2409,9 +2461,9 @@ function wrunHostRunOf(metadata, sources, clock, cellsAfterTs) {
2409
2461
  const cellLegKeys = new Map();
2410
2462
  const softRefused = new Set();
2411
2463
  // The inputs this market does not need (wrunSheetWithLaneDemand: their needed_by leaves it out), and
2412
- // the candles lanes gated off on this chart (wrunSheetWithLaneGate, planned as a scalar stand-in): no
2413
- // lane was asked for them, so each scalar read is the plan's unserved wire, its fill on every row,
2414
- // never gating.
2464
+ // the candles lanes gated off on this chart (wrunSheetWithLaneGate): no lane was asked for them, so
2465
+ // each scalar read is the plan's unserved wire, its fill on every row, never gating, and each celled
2466
+ // one (planned as a scalar stand-in, wrunUnaskedCelledInput) reads its empty block (`emptyBlocks`).
2415
2467
  const undemanded = new Set(metadata.inputs
2416
2468
  .filter((input) => metadata.inputSources[input.name]?.undemanded === true)
2417
2469
  .map((input) => input.index));
@@ -2745,7 +2797,7 @@ function wrunHostRunOf(metadata, sources, clock, cellsAfterTs) {
2745
2797
  ...(reads.barFacts !== undefined ? { barFacts: reads.barFacts } : {}),
2746
2798
  };
2747
2799
  const emptyBlocks = metadata.inputs
2748
- .filter((input) => wrunGatedLegStream(metadata.inputSources[input.name]))
2800
+ .filter((input) => !reads.cellLanes.has(input.index) && wrunUnaskedCelledInput(input, metadata.inputSources[input.name]))
2749
2801
  .map((input) => input.index);
2750
2802
  return { plan, sources: answered, clock: hostClock, shift, stamps, emptyBlocks };
2751
2803
  }
@@ -1,82 +1,167 @@
1
1
  /**
2
- * The `tape` input source's browser-side contract (WRUN-BIG-TRADES-PLAN C1): how a package's
3
- * `inputSources.<name> = { source: "tape", min_size, history }` becomes the ONE acquisition the
4
- * K_TRADES large lane fetches and the live intake folds. Pure: no store, no chart, no fetch; the
5
- * run pass calls it at its head, before any lane fetch, so every refusal here lands by name and
6
- * at zero fetches.
2
+ * The `tape` input source's browser-side contract (WRUN-BIG-TRADES-PLAN C1, and C-DOLLAR for the dollar floor): how a
3
+ * package's `inputSources.<name> = { source: "tape", min_size | min_value, history }` becomes the ONE acquisition the
4
+ * K_TRADES large lane fetches and the live intake folds. Pure: no store, no chart, no fetch; the run pass calls it at
5
+ * its head, before any lane fetch, so every refusal here lands by name and at zero fetches.
7
6
  *
8
- * - `min_size: number | string`. A number literal is the smallest print size served (base units:
9
- * contracts on futures, coins on crypto). A string names a declared numeric `param`, resolved
10
- * from the run's CURRENT param values (`wrunParamValuesFromSettings`, the values `init()`
11
- * receives, so a settings edit moves the threshold with the module). The resolved value must be
12
- * finite and above zero, else the run refuses `wrun_tape_min_size_invalid` naming the input and
13
- * the param. `min_size` rides the wire as the gateway's `minAmount` (the K_TRADES worker), so an
14
- * unfiltered tape is never requested. The table's own floor ($10k quote on USD-quoted markets)
15
- * is a fact a package cannot lower: a `min_size` below it is served at the floor (documented,
16
- * never enforced here).
17
- * - `history: "0" | <duration>`: `"0"` (the default) is the live edge only; a duration
18
- * `^\d+(s|m|h|d)$` seeds that much history from TRADE_LARGE, at most `WRUN_TAPE_HISTORY_MAX_SEC`
19
- * (30 days); a zero-length spelling ("0m") is the live edge too. Anything else refuses
20
- * `wrun_tape_history_invalid`. The lane serves `min(history, the chart's loaded window)`, and no
21
- * more than the gateway's bar limit lets it today (`WRUN_TAPE_HISTORY_SERVED_MAX_SEC`: 15,000
22
- * one-minute points, about 10.4 days; k-trades.control.ts opens the ask at the first bar after it),
23
- * so the acquisition's `historySeconds` is the history served, capped there; `history` stays the
24
- * declared spelling the K_TRADES payload carries.
25
- * - Every tape input of a package must be celled (`cellType: "array"`) and resolve to the SAME
26
- * `min_size` and `history`: the browser lane serves one tape acquisition per package (one
27
- * K_TRADES fetch, one live fold), and silently serving a second input at the first input's
28
- * threshold would be a wrong-but-plausible block. Two inputs that differ refuse by name.
29
- * The om daemon shares the vocabulary (`wrun_tape_min_size_invalid`, `wrun_tape_history_invalid`).
7
+ * - A tape declares exactly ONE floor, `min_size` or `min_value`; both or neither refuses `wrun_tape_floor_invalid`
8
+ * naming the input. Each is a number literal or a string naming a declared numeric `param`, resolved from the run's
9
+ * CURRENT param values (`wrunParamValuesFromSettings`, the values `init()` receives, so a settings edit moves the
10
+ * floor with the module). The resolved value must be finite and above zero, else the run refuses by the floor's own
11
+ * code (`wrun_tape_min_size_invalid`, `wrun_tape_min_value_invalid`) naming the input and the param.
12
+ * - `min_size` is the smallest print size served in the venue's RAW STORED unit (coins on Binance, contracts on
13
+ * gate.io futures and OKX swaps, USD contracts on inverse venues, lots on CME). It rides the wire as the gateway's
14
+ * `minAmount` (the K_TRADES worker), and a cell's `size` is the raw amount. It keeps @om-core/big-trades 0.5.0
15
+ * running byte for byte; a raw floor means a different thing on every venue whose unit differs, which is why the
16
+ * dollar floor exists.
17
+ * - `min_value` is the smallest print served by its value in US dollars. It rides the wire as the gateway's
18
+ * `minQuoteAmount` (never beside a `minAmount`), and a cell's `size` is then the print's dollar value (the gateway's
19
+ * `quoteAmount` for a history row, the market's dollar unit times price times size for a live print,
20
+ * live-trades-merge.util `tradesTapeCellSize`), so a package compares and draws in the same unit as its floor. The
21
+ * cell layout is unchanged (`[tsOffsetMs, price, size, side]`).
22
+ * - The table's own floor ($10k quote on USD-quoted markets, a contracts floor per CME Group root) is a fact a package
23
+ * cannot lower: a floor below it is served at the table's floor (documented, never enforced here).
24
+ * - `history: "0" | <duration>`: `"0"` (the default) is the live edge only; a duration `^\d+(s|m|h|d)$` seeds that much
25
+ * history from TRADE_LARGE, at most `WRUN_TAPE_HISTORY_MAX_SEC` (30 days); a zero-length spelling ("0m") is the live
26
+ * edge too. Anything else refuses `wrun_tape_history_invalid`. The lane serves `min(history, the chart's loaded
27
+ * window)`, and no more than the gateway's bar limit lets it today (`WRUN_TAPE_HISTORY_SERVED_MAX_SEC`: 15,000
28
+ * one-minute points, about 10.4 days; k-trades.control.ts opens the ask at the first bar after it), so the
29
+ * acquisition's `historySeconds` is the history served, capped there; `history` stays the declared spelling the
30
+ * K_TRADES payload carries.
31
+ * - Every tape input the run ASKS must be celled (`cellType: "array"`) and resolve to the SAME floor (facet and
32
+ * value) and `history`: the browser lane serves one tape acquisition per package (one K_TRADES fetch, one live
33
+ * fold), and silently serving a second input at the first input's floor would be a wrong-but-plausible block. Two
34
+ * asked inputs that differ refuse by name.
35
+ * - A tape the chart's market does not ask (kit 0.95.0: its `needed_by` leaves the market's size unit out, so the run's
36
+ * sheet on the market marks it `undemanded`, wrunSheetWithLaneDemand) is no part of the acquisition: no floor, no
37
+ * history, no refusal and no setting words read it (`isWrunAskedTapeSource`), and every row reads zero cells for it
38
+ * (the row builder's empty block). Big Trades 0.8.0 floors CME in contracts (`min_size` on `tape_contracts`, asked
39
+ * on size unit 3) and every other market in dollars (`min_value` on `tape`, asked on 0, 1 and 2): one acquisition
40
+ * on every market, two floors in the sheet.
41
+ * The om daemon shares the vocabulary (`wrun_tape_floor_invalid`, `wrun_tape_min_size_invalid`,
42
+ * `wrun_tape_min_value_invalid`, `wrun_tape_history_invalid`).
30
43
  */
31
44
  import type { WrunIndicatorMetadata, WrunInputSource } from '../../interfaces/wrun-runtime.interface.js';
32
- /** A tape `min_size` that resolves to nothing servable (absent, a param the package does not
33
- * declare, non-finite or not above zero). */
45
+ /** A tape `min_size` that resolves to nothing servable (a param the package does not declare, non-finite or not
46
+ * above zero). */
34
47
  export declare const WRUN_TAPE_MIN_SIZE_INVALID_CODE = "wrun_tape_min_size_invalid";
48
+ /** A tape `min_value` that resolves to nothing servable (a param the package does not declare, non-finite or not
49
+ * above zero): C-DOLLAR's refusal, naming the input and the param. */
50
+ export declare const WRUN_TAPE_MIN_VALUE_INVALID_CODE = "wrun_tape_min_value_invalid";
51
+ /** A tape input declaring both floors or neither (C-DOLLAR): a tape serves exactly one floor. */
52
+ export declare const WRUN_TAPE_FLOOR_INVALID_CODE = "wrun_tape_floor_invalid";
53
+ /** A dollar tape (C-DOLLAR's `min_value`) on a market whose dollar unit no read can ever prove (a quote that is no
54
+ * dollar, a venue or a contract with no point value): none of its prints could be valued, so the run refuses it by
55
+ * name before any fetch. The om daemon's code for the same refusal (packages/sdk wrun-host refusals). */
56
+ export declare const WRUN_TAPE_VALUE_UNPROVEN_CODE = "wrun_tape_value_unproven";
35
57
  /** A tape `history` outside the contract ("0" or `^\d+(s|m|h|d)$` at most 30 days). */
36
58
  export declare const WRUN_TAPE_HISTORY_INVALID_CODE = "wrun_tape_history_invalid";
37
59
  /** A tape input on a chart interval the lane does not serve (a one-second or any sub-minute chart, a
38
60
  * calendar interval of a month or coarser): the shared host's refusal code (`WrunHostRefusalCode`,
39
61
  * the kit's `WRUN_TAPE_INTERVAL_UNSUPPORTED_CODE`), whose words its `wrunRefusalMessage` gives. */
40
62
  export declare const WRUN_TAPE_INTERVAL_UNSUPPORTED_CODE = "wrun_tape_interval_unsupported";
63
+ /** The large lane's history held more prints at or above the floor than the history worker reads
64
+ * (`TRADES_HISTORY_MAX_CELLS`): its refusal by name (wrun-lane-refusal.leaf), which the run words as
65
+ * too much data with the floor to raise (the `too-big` `tape` record, Open the settings), never as a
66
+ * source that did not answer. The same floor over the same history is refused again, so no ladder
67
+ * re-asks it: only a settings change (a higher floor) or a shorter window can pass it. */
68
+ export declare const WRUN_TAPE_TOO_MANY_TRADES_CODE = "tape-too-many-trades";
41
69
  /** The longest tape history a package may declare, in seconds (30 days). */
42
70
  export declare const WRUN_TAPE_HISTORY_MAX_SEC = 2592000;
43
71
  /** The longest tape history the lane serves today, in seconds: the gateway's bar limit on an
44
72
  * unaggregated read (TRADES_LARGE_BAR_LIMIT_SEC, about 10.4 days). A longer declared history (up to
45
73
  * the 30-day contract) is served from that horizon. */
46
74
  export declare const WRUN_TAPE_HISTORY_SERVED_MAX_SEC: number;
47
- /** The one tape acquisition a package resolves to: the K_TRADES payload extras the history fetch
48
- * and the reconcile ride (`minSize` in base units, `history` as declared), plus the inputs it
49
- * serves. */
50
- export interface WrunTapeAcquisition {
51
- minSize: number;
75
+ /** The two floor facets a tape input may declare, exactly one of them. */
76
+ export type WrunTapeFloorFacet = 'min_size' | 'min_value';
77
+ interface WrunTapeAcquisitionBase {
52
78
  history: string;
53
79
  /** The history served, in seconds: the declared one, capped at WRUN_TAPE_HISTORY_SERVED_MAX_SEC. */
54
80
  historySeconds: number;
55
81
  /** The tape inputs, by name, in declaration order. */
56
82
  inputNames: string[];
57
83
  }
84
+ /** The one tape acquisition a package resolves to: the K_TRADES payload extras the history fetch and the reconcile
85
+ * ride (exactly one floor: `minSize` in the raw stored unit, or `minValue` in US dollars; `history` as declared),
86
+ * plus the inputs it serves. */
87
+ export type WrunTapeAcquisition = WrunTapeAcquisitionBase & ({
88
+ minSize: number;
89
+ minValue?: undefined;
90
+ } | {
91
+ minValue: number;
92
+ minSize?: undefined;
93
+ });
94
+ /** Whether an input source is a tape the run asks: a `tape` source the run's sheet on the chart's market did not mark
95
+ * `undemanded` (wrunSheetWithLaneDemand, kit 0.95.0's `needed_by` on a secondary tape). THE predicate every reader
96
+ * of the package's tapes takes (the acquisition, its floor settings and words, the plan's floor params, the live
97
+ * refusals): an unasked tape has no lane, and its rows read zero cells. */
98
+ export declare function isWrunAskedTapeSource<Source extends Pick<WrunInputSource, 'source' | 'undemanded'>>(source: Source | null | undefined): source is Source & {
99
+ source: 'tape';
100
+ };
58
101
  /** The declared `history` as the lane reads it: "0" when absent. */
59
102
  export declare function wrunTapeHistoryOf(source: Pick<WrunInputSource, 'history'>): string;
60
103
  /** The seconds a valid tape history declares (0 for the live edge), or a refusal by name. */
61
104
  export declare function parseWrunTapeHistory(metadata: Pick<WrunIndicatorMetadata, 'id'>, inputName: string, history: string): number;
62
- /** The smallest print size a tape input serves: the literal, or the named param's current value;
63
- * refused by name when it is not finite and above zero (an unfiltered tape is the one request the
64
- * lane never makes). */
105
+ /** The floor facet a tape source declares when it declares exactly one, else undefined (both, or neither). */
106
+ export declare function wrunTapeFloorFacetOf(source: Pick<WrunInputSource, 'min_size' | 'min_value'>): WrunTapeFloorFacet | undefined;
107
+ /** The name of the param a tape source's floor reads (its one floor facet's string), else undefined (a literal floor,
108
+ * or a source declaring both floors or neither). */
109
+ export declare function wrunTapeFloorParamOf(source: Pick<WrunInputSource, 'min_size' | 'min_value'>): string | undefined;
110
+ /** The smallest print size a tape input serves (raw stored units): the literal, or the named param's current value;
111
+ * refused by name (`wrun_tape_min_size_invalid`) when it is not finite and above zero. */
65
112
  export declare function resolveWrunTapeMinSize(metadata: Pick<WrunIndicatorMetadata, 'id' | 'params'>, inputName: string, source: Pick<WrunInputSource, 'min_size'>, paramValues: Readonly<Record<string, number>>): number;
113
+ /** The smallest print value a tape input serves (US dollars): the literal, or the named param's current value;
114
+ * refused by name (`wrun_tape_min_value_invalid`, naming the input and the param) when it is not finite and above
115
+ * zero. */
116
+ export declare function resolveWrunTapeMinValue(metadata: Pick<WrunIndicatorMetadata, 'id' | 'params'>, inputName: string, source: Pick<WrunInputSource, 'min_value'>, paramValues: Readonly<Record<string, number>>): number;
117
+ /** A tape input's one floor, by its facet: refused `wrun_tape_floor_invalid` naming the input when it declares both
118
+ * floors or neither, else by the facet's own code when the value is not servable. */
119
+ export declare function resolveWrunTapeFloor(metadata: Pick<WrunIndicatorMetadata, 'id' | 'params'>, inputName: string, source: Pick<WrunInputSource, 'min_size' | 'min_value'>, paramValues: Readonly<Record<string, number>>): {
120
+ facet: WrunTapeFloorFacet;
121
+ value: number;
122
+ };
123
+ /** The floor an acquisition asks at, in its own unit (raw stored units under `min_size`, dollars under `min_value`). */
124
+ export declare function wrunTapeFloorOf(tape: Pick<WrunTapeAcquisition, 'minSize' | 'minValue'>): number;
125
+ /** The words a refusal states an acquisition's floor in: the raw number under `min_size`, a US dollar amount under
126
+ * `min_value` (`$500,000`). */
127
+ export declare function wrunTapeFloorWords(tape: Pick<WrunTapeAcquisition, 'minSize' | 'minValue'> | undefined): string;
66
128
  /**
67
- * Resolve every declared tape input against the run's param values into the package's one tape
68
- * acquisition, refusing by name before any fetch; undefined when the package declares no tape
69
- * input.
129
+ * Resolve every tape input the run asks (`isWrunAskedTapeSource`: the run's sheet on the chart's market, its
130
+ * unasked tapes marked) against the run's param values into the package's one tape acquisition, refusing by name
131
+ * before any fetch; undefined when the package asks no tape input here.
70
132
  */
71
133
  export declare function resolveWrunTapeAcquisition(metadata: Pick<WrunIndicatorMetadata, 'id' | 'params' | 'inputs' | 'inputSources'>, paramValues: Readonly<Record<string, number>>): WrunTapeAcquisition | undefined;
134
+ /** The words of the setting a tape's floor reads: the label (else the name) of the param its first asked tape input's
135
+ * floor (`min_size` or `min_value`) names, or the floor facet itself for a literal floor (a source edit raises it).
136
+ * An unasked tape's floor is no setting the chart's tape reads (Big Trades 0.8.0 on CME names Min size, the contracts
137
+ * floor, never Min value). */
138
+ export declare function wrunTapeFloorSettingWords(metadata: Pick<WrunIndicatorMetadata, 'params' | 'inputSources'>): string;
72
139
  /**
73
140
  * The settings a row build hands the shared host's plan for a param-bound floor
74
- * (`WrunChartSourceRows.settings`): the floor the lane's acquisition was asked at, under the name
75
- * of every param a tape input's `min_size` names. The host resolves that floor itself from the
76
- * settings it is handed (its planTapeFloors), so the plan's tape ask carries the floor the run
77
- * resolved from the overlay's current settings (`resolveWrunTapeAcquisition`): a full run hands its
78
- * acquisition's floor, a live build its session's (`context.acquisition.tape`), so a tail, a carry
79
- * advance or a reseed plans the ask its full run planned whatever the settings say meanwhile (a
80
- * refused settings run keeps the session). Undefined without a finite floor or a bound param.
141
+ * (`WrunChartSourceRows.settings`): the floor the lane's acquisition was asked at (`wrunTapeFloorOf`, in its own
142
+ * unit), under the name of every param a tape input's floor (`min_size` or `min_value`) names. The host resolves that
143
+ * floor itself from the settings it is handed (its planTapeFloors; a `min_value` tape is planned as the kit's floor
144
+ * facet over the dollar cells, wrun-source-rows.util `wrunPlannedSheet`), so the plan's tape ask carries the floor the
145
+ * run resolved from the overlay's current settings (`resolveWrunTapeAcquisition`): a full run hands its acquisition's
146
+ * floor, a live build its session's (`context.acquisition.tape`), so a tail, a carry advance or a reseed plans the ask
147
+ * its full run planned whatever the settings say meanwhile (a refused settings run keeps the session). An unasked
148
+ * tape's param is left out: its floor is in another unit, and the plan reads no cells for it. Undefined without a
149
+ * finite floor or a bound param.
150
+ */
151
+ export declare function wrunTapeFloorSettings(metadata: Pick<WrunIndicatorMetadata, 'inputSources'>, floorValue: unknown): Record<string, number> | undefined;
152
+ /** The floor a recorded tape acquisition (a K_TRADES payload: the full run's `fetchLane` extras, the live context's
153
+ * `acquisition.tape`) asks at, in its own unit: `minValue` when it floors by dollars, else `minSize`. */
154
+ export declare function wrunTapeAcquisitionFloor(acquisition: {
155
+ minSize?: unknown;
156
+ minValue?: unknown;
157
+ } | undefined): unknown;
158
+ /**
159
+ * The K_TRADES payload extras of a tape acquisition (the run pass's `fetchLane('trades', 'tp', ...)`, which the run
160
+ * records as the lane's acquisition: the history fetch, the reconcile's re-ask and the live fold read the SAME
161
+ * payload): the large lane, the declared history and the one floor. A dollar floor also carries `valuePerUnit`, the US
162
+ * dollars one price unit times one size unit of a live print is worth on the chart's market (the run head's
163
+ * `wrunMarketDollarUnit`); without it no live print can be priced and none folds (the history rows carry the gateway's
164
+ * own dollar value). A raw floor carries exactly what it always did, so 0.5.0's payload is unchanged.
81
165
  */
82
- export declare function wrunTapeFloorSettings(metadata: Pick<WrunIndicatorMetadata, 'inputSources'>, minSize: unknown): Record<string, number> | undefined;
166
+ export declare function wrunTapeLaneExtras(tape: WrunTapeAcquisition, valuePerUnit: number | undefined): Record<string, unknown>;
167
+ export {};