@orangecharts/wrun-chart-host 0.8.0 → 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 (145) hide show
  1. package/README.md +2 -1
  2. package/dist/constants/feature-flags.constants.d.ts +4 -0
  3. package/dist/constants/feature-flags.constants.js +27 -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 +11 -6
  9. package/dist/constants/option-venues.constants.js +5 -2
  10. package/dist/host-env.d.ts +10 -4
  11. package/dist/host-ports.types.d.ts +39 -3
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +1 -0
  14. package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
  15. package/dist/interfaces/opra-realtime.interface.js +10 -10
  16. package/dist/interfaces/wrun-runtime.interface.d.ts +34 -13
  17. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +53 -10
  18. package/dist/kscript-data/controls/live-trades-merge.util.js +81 -16
  19. package/dist/market-data/billing.interface.d.ts +138 -17
  20. package/dist/market-data/billing.interface.js +25 -8
  21. package/dist/market-data/venues/index.d.ts +3 -3
  22. package/dist/market-data/venues/opra.contract.copy.json +5 -3
  23. package/dist/market-data/venues/opra.d.ts +3 -3
  24. package/dist/market-data/venues/opra.js +5 -4
  25. package/dist/replay/replayLadder.js +3 -1
  26. package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
  27. package/dist/utility/chart/crypto-index.leaf.js +2 -2
  28. package/dist/utility/chart/index-mode-admission.util.js +9 -1
  29. package/dist/utility/chart/index-mode.util.d.ts +5 -2
  30. package/dist/utility/chart/index-mode.util.js +23 -13
  31. package/dist/utility/chart/kscript-venue-policy.util.d.ts +28 -21
  32. package/dist/utility/chart/kscript-venue-policy.util.js +30 -24
  33. package/dist/utility/chart/marketKind.util.d.ts +12 -10
  34. package/dist/utility/chart/marketKind.util.js +17 -7
  35. package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
  36. package/dist/utility/chart/om-panel-push-style.util.js +17 -15
  37. package/dist/utility/chart/om-panel.util.js +6 -6
  38. package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
  39. package/dist/utility/chart/profile-block-size.util.js +7 -0
  40. package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
  41. package/dist/utility/chart/quote-perp.leaf.js +20 -0
  42. package/dist/utility/chart/wrun-run-result.util.d.ts +5 -0
  43. package/dist/utility/chart/wrun-run-result.util.js +4 -1
  44. package/dist/utility/common/transformations.util.d.ts +7 -0
  45. package/dist/utility/common/transformations.util.js +11 -0
  46. package/dist/utility/options/option-venue.util.d.ts +3 -3
  47. package/dist/utility/options/option-venue.util.js +3 -3
  48. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +1 -1
  49. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +2 -2
  50. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
  51. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
  52. package/dist/utility/wrun/sources/row-lane-registry.js +3 -2
  53. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
  54. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +13 -5
  55. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +11 -0
  56. package/dist/utility/wrun/sources/row-lanes/option_prints.js +63 -9
  57. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +8 -0
  58. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +12 -0
  59. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +5 -2
  60. package/dist/utility/wrun/sources/row-lanes/option_surface.js +5 -2
  61. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +11 -5
  62. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +31 -10
  63. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +33 -1
  64. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +95 -6
  65. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +25 -5
  66. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +55 -18
  67. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +146 -40
  68. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
  69. package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
  70. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
  71. package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
  72. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
  73. package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
  74. package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
  75. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +147 -9
  76. package/dist/utility/wrun/wrun-chart-market-facts.util.js +345 -11
  77. package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
  78. package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
  79. package/dist/utility/wrun/wrun-color-settings.util.d.ts +15 -4
  80. package/dist/utility/wrun/wrun-color-settings.util.js +31 -12
  81. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
  82. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
  83. package/dist/utility/wrun/wrun-download-meter.util.d.ts +92 -0
  84. package/dist/utility/wrun/wrun-download-meter.util.js +122 -0
  85. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +6 -1
  86. package/dist/utility/wrun/wrun-draft-overlay.util.js +23 -3
  87. package/dist/utility/wrun/wrun-frames.js +5 -5
  88. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  89. package/dist/utility/wrun/wrun-hosted-wire-caps.js +7 -0
  90. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +33 -17
  91. package/dist/utility/wrun/wrun-hud-looks.util.js +30 -16
  92. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
  93. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
  94. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
  95. package/dist/utility/wrun/wrun-live-intake.util.d.ts +6 -2
  96. package/dist/utility/wrun/wrun-live-intake.util.js +136 -21
  97. package/dist/utility/wrun/wrun-live-tick.util.js +91 -38
  98. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
  99. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
  100. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +166 -48
  101. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +216 -33
  102. package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +51 -7
  103. package/dist/utility/wrun/wrun-market-size-defaults.util.js +314 -56
  104. package/dist/utility/wrun/wrun-option-prints.util.d.ts +41 -2
  105. package/dist/utility/wrun/wrun-option-prints.util.js +80 -13
  106. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +3 -0
  107. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +3 -0
  108. package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +23 -0
  109. package/dist/utility/wrun/wrun-option-strike-flow.util.js +55 -0
  110. package/dist/utility/wrun/wrun-option-views.util.d.ts +51 -7
  111. package/dist/utility/wrun/wrun-option-views.util.js +151 -28
  112. package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
  113. package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
  114. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +3 -0
  115. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
  116. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
  117. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +7 -0
  118. package/dist/utility/wrun/wrun-overlay-recovery.util.js +25 -1
  119. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
  120. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  121. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +34 -6
  122. package/dist/utility/wrun/wrun-overlay-run.util.js +416 -171
  123. package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +4 -4
  124. package/dist/utility/wrun/wrun-pack-widths.leaf.js +4 -4
  125. package/dist/utility/wrun/wrun-pack.util.d.ts +7 -3
  126. package/dist/utility/wrun/wrun-pack.util.js +20 -9
  127. package/dist/utility/wrun/wrun-panel-style.util.d.ts +27 -15
  128. package/dist/utility/wrun/wrun-panel-style.util.js +42 -20
  129. package/dist/utility/wrun/wrun-param-map.util.d.ts +7 -6
  130. package/dist/utility/wrun/wrun-param-map.util.js +8 -5
  131. package/dist/utility/wrun/wrun-param-values.util.d.ts +10 -2
  132. package/dist/utility/wrun/wrun-param-values.util.js +2 -0
  133. package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
  134. package/dist/utility/wrun/wrun-refusal.util.js +10 -1
  135. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +7 -0
  136. package/dist/utility/wrun/wrun-source-rows.util.d.ts +4 -0
  137. package/dist/utility/wrun/wrun-source-rows.util.js +92 -40
  138. package/dist/utility/wrun/wrun-tape-source.util.d.ts +126 -50
  139. package/dist/utility/wrun/wrun-tape-source.util.js +193 -68
  140. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
  141. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
  142. package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
  143. package/dist/workers/utils/volume-profile.worker.util.js +5 -2
  144. package/dist/workers/wrun/wrun-abi-host.js +3 -2
  145. package/package.json +11 -11
@@ -1,3 +1,5 @@
1
+ /** The manner of assent an acceptance records: the click on the agreement's own "I AGREE" button. */
2
+ export const MARKET_DATA_ASSENT_MANNER = 'click:i-agree';
1
3
  const DAY_MS = 86_400_000;
2
4
  /** Every question of the venue's questionnaire answered with its qualifying answer. */
3
5
  export function isMarketDataNonProfessional(venue, answers) {
@@ -6,14 +8,15 @@ export function isMarketDataNonProfessional(venue, answers) {
6
8
  /**
7
9
  * A declaration on the venue's current form (a new question set means a new declaration) whose validity has not ended
8
10
  * at `now`, either classification. The client owns expiry: `now` is the caller's clock (the store's last evaluation),
9
- * never an implied Date.now(). A record without `expiresAt` never expires here; one whose `expiresAt` does not parse
10
- * reads expired (ask again rather than trust it).
11
+ * never an implied Date.now(). A record without `expiresAt` reads lapsed, as does one whose `expiresAt` does not parse
12
+ * (ask again rather than trust it): status is reconfirmed every 12 months (Exhibit A Q19.3), and a record that names
13
+ * no end can never be shown to be inside its year.
11
14
  */
12
15
  export function isMarketDataAttestationLive(venue, attestation, now) {
13
16
  if (!attestation || attestation.formVersion !== venue.questionnaire.formVersion)
14
17
  return false;
15
18
  if (attestation.expiresAt === undefined)
16
- return true;
19
+ return false;
17
20
  const ends = Date.parse(attestation.expiresAt);
18
21
  return Number.isFinite(ends) && now < ends;
19
22
  }
@@ -21,9 +24,17 @@ export function isMarketDataAttestationLive(venue, attestation, now) {
21
24
  export function isMarketDataAttestationCurrent(venue, attestation, now) {
22
25
  return attestation?.classification === 'non_professional' && isMarketDataAttestationLive(venue, attestation, now);
23
26
  }
24
- /** A professional declaration on the current form, still valid at `now`: real-time is not sold to the account. */
27
+ /**
28
+ * A professional declaration on the current form, still valid at `now`: real-time is not sold to the account. A
29
+ * professional record that names no expiry still refuses: a missing field never lifts a refusal (only a new
30
+ * non-professional declaration the server records does).
31
+ */
25
32
  export function isMarketDataProfessionalDeclaration(venue, attestation, now) {
26
- return attestation?.classification === 'professional' && isMarketDataAttestationLive(venue, attestation, now);
33
+ if (attestation?.classification !== 'professional')
34
+ return false;
35
+ if (attestation.expiresAt === undefined)
36
+ return attestation.formVersion === venue.questionnaire.formVersion;
37
+ return isMarketDataAttestationLive(venue, attestation, now);
27
38
  }
28
39
  /**
29
40
  * The expiry (ISO, as served) a still-current non-professional declaration must be renewed by, once `now` is inside
@@ -36,9 +47,15 @@ export function marketDataAttestationRenewBy(venue, attestation, now) {
36
47
  ? attestation.expiresAt
37
48
  : null;
38
49
  }
39
- /** An acceptance counts only for the agreement version the venue presents, never for an older text. */
40
- export function isMarketDataAgreementCurrent(venue, agreement) {
41
- return agreement?.accepted === true && agreement.agreementVersion === venue.agreement.version;
50
+ /**
51
+ * An acceptance counts only for the agreement version the SERVER presents now (`current`: its K1 answer), never for an
52
+ * older text and never for the version a build carries (the venue card's `agreement.version` is the contract export's
53
+ * pin, not the current text). With no current agreement read, nothing counts.
54
+ */
55
+ export function isMarketDataAgreementCurrent(current, agreement) {
56
+ if (!current?.version)
57
+ return false;
58
+ return agreement?.accepted === true && agreement.agreementVersion === current.version;
42
59
  }
43
60
  export class MarketDataBillingError extends Error {
44
61
  kind;
@@ -61,8 +61,8 @@ export declare const MARKET_DATA_VENUES: readonly [{
61
61
  readonly renewalWindowDays: 30;
62
62
  };
63
63
  readonly agreement: {
64
- readonly version: "opra-subscriber-2026-10";
65
- readonly url: "https://www.opraplan.com/";
64
+ readonly version: "opra-b1-2026-10-22";
65
+ readonly url: "/api/v1/opra/agreement";
66
66
  readonly delayedRequiresAcceptance: false;
67
67
  };
68
68
  readonly delayMinutes: 15;
@@ -73,7 +73,7 @@ export declare const MARKET_DATA_VENUES: readonly [{
73
73
  readonly i18nNamespace: "opraRealtimeData";
74
74
  readonly storeId: "opraRealtime";
75
75
  readonly surfaces: readonly ["chain-page-subtitle", "chain-price-pill", "chain-table-marker", "chain-strike-preview", "chain-index-notice", "flow-tape", "terminal-options-tab", "options-overlay-legends", "indicator-legend-notes", "contract-chart-delay-chip", "contract-chart-delay-card", "chart-source-line", "watchlist-panel", "watchlist-cell-tooltip", "board", "purchase-live-price"];
76
- readonly contractRevision: "2026-10-20.1";
76
+ readonly contractRevision: "2026-10-22.1";
77
77
  }];
78
78
  /** A registered venue's key. */
79
79
  export type MarketDataVenueKey = (typeof MARKET_DATA_VENUES)[number]['key'];
@@ -1,5 +1,5 @@
1
1
  {
2
- "revision": "2026-10-20.1",
2
+ "revision": "2026-10-22.1",
3
3
  "key": "opra",
4
4
  "productGroups": ["OPRA"],
5
5
  "products": [
@@ -27,8 +27,10 @@
27
27
  ],
28
28
  "identityLimits": { "text": 200, "address": 300 },
29
29
  "agreement": {
30
- "version": "opra-subscriber-2026-10",
31
- "url": "https://www.opraplan.com/"
30
+ "version": "opra-b1-2026-10-22",
31
+ "sha256": "105d1b2d6a89cc9416f2d2ebb18e97bed7973e4d2c39353cc55315421b958814",
32
+ "addendumVersion": "opra-b1-addendum-2026-10-22",
33
+ "url": "/api/v1/opra/agreement"
32
34
  },
33
35
  "delaySeconds": 900,
34
36
  "basePath": "/opra"
@@ -54,8 +54,8 @@ export declare const OPRA_VENUE: {
54
54
  readonly renewalWindowDays: 30;
55
55
  };
56
56
  readonly agreement: {
57
- readonly version: "opra-subscriber-2026-10";
58
- readonly url: "https://www.opraplan.com/";
57
+ readonly version: "opra-b1-2026-10-22";
58
+ readonly url: "/api/v1/opra/agreement";
59
59
  readonly delayedRequiresAcceptance: false;
60
60
  };
61
61
  readonly delayMinutes: 15;
@@ -66,5 +66,5 @@ export declare const OPRA_VENUE: {
66
66
  readonly i18nNamespace: "opraRealtimeData";
67
67
  readonly storeId: "opraRealtime";
68
68
  readonly surfaces: readonly ["chain-page-subtitle", "chain-price-pill", "chain-table-marker", "chain-strike-preview", "chain-index-notice", "flow-tape", "terminal-options-tab", "options-overlay-legends", "indicator-legend-notes", "contract-chart-delay-chip", "contract-chart-delay-card", "chart-source-line", "watchlist-panel", "watchlist-cell-tooltip", "board", "purchase-live-price"];
69
- readonly contractRevision: "2026-10-20.1";
69
+ readonly contractRevision: "2026-10-22.1";
70
70
  };
@@ -41,9 +41,10 @@ export const OPRA_VENUE = {
41
41
  validityDays: 365,
42
42
  renewalWindowDays: 30,
43
43
  },
44
- // RELEASE BLOCKER (named, do not bury): the agreement text, its version id and the link need the compliance
45
- // sign-off before the `opra` flag is lit.
46
- agreement: { version: 'opra-subscriber-2026-10', url: 'https://www.opraplan.com/', delayedRequiresAcceptance: false },
44
+ // The agreement orange's export names (OPRA's B-1 and its addendum, populated): its text, hash and addendum are
45
+ // served by `url` (contract K1) and an assent names them (K2). The current version is always the server's answer,
46
+ // never this pin (isMarketDataAgreementCurrent).
47
+ agreement: { version: 'opra-b1-2026-10-22', url: '/api/v1/opra/agreement', delayedRequiresAcceptance: false },
47
48
  // OPRA defines delayed data as at least 15 minutes old; the gate's delayed window matches (900 s).
48
49
  delayMinutes: 15,
49
50
  // The Vendor Agreement's exact phrase (Exhibit A section 14): OPRA_DELAY_NOTICE in
@@ -70,5 +71,5 @@ export const OPRA_VENUE = {
70
71
  'board',
71
72
  'purchase-live-price',
72
73
  ],
73
- contractRevision: '2026-10-20.1',
74
+ contractRevision: '2026-10-22.1',
74
75
  };
@@ -1,6 +1,7 @@
1
1
  // Replay fidelity ladder: measured retention and request-shaping constants.
2
2
  import { RAIL_TFS, RAIL_TF_BOOK_EDGE_SEC, RAIL_TF_BUCKET_SEC, RAIL_TF_EDGE_SEC, REPLAY_LADDER_EDGES_SEC, REPLAY_STEP_TFS, REPLAY_STEP_TF_BOOK_EDGE_SEC, REPLAY_STEP_TF_BUCKET_SEC, REPLAY_STEP_TF_EDGE_SEC, } from '../constants/replay-ladder.leaf.js';
3
3
  import { FEATURE_LIMITS, GATEWAY_TIER_MAX_BARS } from '../constants/feature-limits.constants.js';
4
+ import { checkIsCryptoIndex } from '../utility/chart/crypto-index.leaf.js';
4
5
  import { checkIsBlockedOn1s } from '../utility/chart/index-mode.util.js';
5
6
  import { standardIntervalMsAtOrBelow } from '../utility/chart/interval-registry.util.js';
6
7
  const orderedCoveringTfs = ['1m', '5m', '15m', '1h', '1d'];
@@ -295,7 +296,8 @@ export function clampReplayReach(requestedMs, domain, resolution, maxBars, inten
295
296
  export function reconcileReplayResolution(ageSec, chartIntervalMs, exchange) {
296
297
  const age = Math.max(0, ageSec);
297
298
  const playbackTf = coarseRailTfForAge(age, chartIntervalMs);
298
- const tickAvailable = age <= REPLAY_LADDER_EDGES_SEC.tick && !checkIsBlockedOn1s(exchange);
299
+ // Tick replay steps through trades: a crypto index serves 1s candles but has no trades behind them.
300
+ const tickAvailable = age <= REPLAY_LADDER_EDGES_SEC.tick && !checkIsBlockedOn1s(exchange) && !checkIsCryptoIndex(exchange);
299
301
  const candidates = replayResolutionFallbackCandidatesForChartInterval(chartIntervalMs);
300
302
  const chartResolution = replayResolutionForChartInterval(chartIntervalMs);
301
303
  const available = candidates.filter((resolution) => resolution.kind === 'tick' ? tickAvailable : REPLAY_STEP_TF_EDGE_SEC[resolution.tf] >= age);
@@ -3,8 +3,8 @@
3
3
  * docs/features/data/cryptocap-indices.md). The backend prints each series as raw CRYPTO_DOMINANCE points and serves
4
4
  * its candles as CRYPTO_DOMINANCE_AGG on tsdb-gateway v2: value candles with no volume, trades or book behind them.
5
5
  *
6
- * A leaf on purpose, with no imports: the market-kind table (`marketKind.util`) and the ticker hub and the sub-minute
7
- * block (`index-mode.util`) both read this list, and neither may call into the other at module load. Web code asks
6
+ * A leaf on purpose, with no imports: the market-kind table (`marketKind.util`), the ticker hub (`index-mode.util`) and
7
+ * the replay ladder all read it, and none may call into the others at module load. Web code asks
8
8
  * `checkIsCryptoIndex` here, never through `index-mode.util` or `marketKind.util`: over a hundred specs mock those two
9
9
  * with partial factories, and a predicate read through such a mock throws.
10
10
  */
@@ -3,8 +3,8 @@
3
3
  * docs/features/data/cryptocap-indices.md). The backend prints each series as raw CRYPTO_DOMINANCE points and serves
4
4
  * its candles as CRYPTO_DOMINANCE_AGG on tsdb-gateway v2: value candles with no volume, trades or book behind them.
5
5
  *
6
- * A leaf on purpose, with no imports: the market-kind table (`marketKind.util`) and the ticker hub and the sub-minute
7
- * block (`index-mode.util`) both read this list, and neither may call into the other at module load. Web code asks
6
+ * A leaf on purpose, with no imports: the market-kind table (`marketKind.util`), the ticker hub (`index-mode.util`) and
7
+ * the replay ladder all read it, and none may call into the others at module load. Web code asks
8
8
  * `checkIsCryptoIndex` here, never through `index-mode.util` or `marketKind.util`: over a hundred specs mock those two
9
9
  * with partial factories, and a predicate read through such a mock throws.
10
10
  */
@@ -16,12 +16,14 @@
16
16
  * book and list no options, so they serve no volume profile, buy/sell volume, order book,
17
17
  * implied volatility or skew, whatever the index-mode admission lets through; a crypto index
18
18
  * (CRYPTOCAP, not index-mode: it fetches by period like crypto) serves its value candles and no
19
- * other lane at all;
19
+ * other lane at all; a quote-priced perpetual market (Variational, also period-fetched) serves its
20
+ * quote candles, funding and open interest, and no trade, volume, book, profile or options lane;
20
21
  * - the coin table: the option-summary lanes (implied volatility, skew) hold a series for the
21
22
  * coins `WRUN_OPTION_SUMMARY_COINS` lists (BTC and ETH) and no other.
22
23
  * The dispatcher's own admission (`isKScriptTypeServedOnIndexMode`) stays as it is.
23
24
  */
24
25
  import { checkIsCryptoIndex } from './crypto-index.leaf.js';
26
+ import { checkIsQuotePerp } from './quote-perp.leaf.js';
25
27
  import { checkIsIndexMode } from './index-mode.util.js';
26
28
  import { checkIsForexOrCommodity } from './marketKind.util.js';
27
29
  import { WRUN_OPTION_SUMMARY_COINS, WRUN_OPTION_SUMMARY_LANES } from '../wrun/wrun-option-summary-lane.util.js';
@@ -39,6 +41,9 @@ const FOREX_COMMODITY_UNSERVED_TYPES = new Set([
39
41
  ]);
40
42
  /** The one lane fetch type a crypto index market serves (the market-kind table): its value candles. */
41
43
  const CRYPTO_INDEX_SERVED_TYPES = new Set(['ohlcv']);
44
+ /** The lane fetch types a quote-priced perpetual market serves (the market-kind table): its quote candles and the
45
+ * two perpetual series the gateway serves beside them. */
46
+ const QUOTE_PERP_SERVED_TYPES = new Set(['ohlcv', 'funding_rate', 'open_interest']);
42
47
  /** The lane fetch types served for some coins only, and those coins (the coin table). */
43
48
  const COIN_SERVED_TYPES = Object.freeze({
44
49
  [WRUN_OPTION_SUMMARY_LANES.implied_volatility.type]: WRUN_OPTION_SUMMARY_COINS,
@@ -63,6 +68,9 @@ export function wrunLaneServiceOnMarket({ type, exchange, coin, nativeRows, }) {
63
68
  if (!CRYPTO_INDEX_SERVED_TYPES.has(type) && checkIsCryptoIndex(exchange)) {
64
69
  return { served: false, reason: 'market-kind' };
65
70
  }
71
+ if (!QUOTE_PERP_SERVED_TYPES.has(type) && checkIsQuotePerp(exchange)) {
72
+ return { served: false, reason: 'market-kind' };
73
+ }
66
74
  const coins = COIN_SERVED_TYPES[type];
67
75
  const word = typeof coin === 'string' ? coin.trim().toUpperCase() : '';
68
76
  if (coins !== undefined && word !== '' && !coins.includes(word))
@@ -56,8 +56,11 @@ export declare function checkIsIndexMode(exchange: string | undefined): boolean;
56
56
  export declare function checkIsIndexVenue(exchange: string | undefined): boolean;
57
57
  /**
58
58
  * Exchanges that print quotes instead of trades: value-only candles with no
59
- * volume and a quote channel live (forex, commodity and the index venues on
60
- * TICKER/TICKER_AGG, the crypto indices on CRYPTO_DOMINANCE/CRYPTO_DOMINANCE_AGG).
59
+ * volume and a quote channel live (forex, commodity, the index venues and the
60
+ * quote-priced perpetual venues on TICKER/TICKER_AGG, the crypto indices on
61
+ * CRYPTO_DOMINANCE/CRYPTO_DOMINANCE_AGG). A venue the gateway serves only as
62
+ * quotes must answer true here: unlisted, it reads as crypto and asks for
63
+ * trades it is never served (venue-price-source.ratchet.spec.ts).
61
64
  * The hub of the quote routing: the candle parse (the ohlcv and K_OHLCV
62
65
  * workers keep a volume-less row), the sided-candle refusal and the live
63
66
  * channel (`liveQuoteType`, live-feed-channel-factory.util) all read it; the
@@ -1,5 +1,6 @@
1
1
  import { formatDisplayToExchange } from '../exchange-normalization.util.js';
2
- import { CRYPTO_INDEX_EXCHANGES, checkIsCryptoIndex } from './crypto-index.leaf.js';
2
+ import { checkIsCryptoIndex } from './crypto-index.leaf.js';
3
+ import { checkIsQuotePerp } from './quote-perp.leaf.js';
3
4
  import { PREDICTION_MARKET_EXCHANGE_NAMES } from './prediction-identity.util.js';
4
5
  // ============================================================================
5
6
  // EXCHANGE CONSTANTS
@@ -49,15 +50,12 @@ const INDEX_MODE_EXCHANGES = [
49
50
  ...COMMODITY_EXCHANGES,
50
51
  ...INDEX_VENUE_EXCHANGES,
51
52
  ];
52
- // Exchanges that don't support 1s interval (index mode + prediction + forex + commodity + the
53
- // crypto indices). Prediction venues poll a price rather than printing trades, so none of them can
54
- // host a 1s bar: the list tracks the venue SET, not Polymarket alone. The crypto indices'
55
- // candle tables start at 1m, so no sub-minute rung is ever served there.
56
- const EXCHANGES_BLOCKED_ON_1S = [
57
- ...INDEX_MODE_EXCHANGES,
58
- ...PREDICTION_MARKET_EXCHANGE_NAMES,
59
- ...CRYPTO_INDEX_EXCHANGES,
60
- ];
53
+ // Exchanges that don't support 1s interval (index mode + prediction + forex + commodity). Prediction
54
+ // venues poll a price rather than printing trades, so none of them can host a 1s bar: the list tracks
55
+ // the venue SET, not Polymarket alone. The crypto indices (CRYPTOCAP) are not here: their 1s candles
56
+ // read the raw prints (tsdb-gateway's crypto_dominance_agg_1s tier), like a crypto pair's trades. The
57
+ // quote-priced perpetual venues are blocked by their own predicate (checkIsBlockedOn1s).
58
+ const EXCHANGES_BLOCKED_ON_1S = [...INDEX_MODE_EXCHANGES, ...PREDICTION_MARKET_EXCHANGE_NAMES];
61
59
  const PM_SIGNAL_CRYPTO_SYMBOLS = ['BTC', 'ETH', 'SOL', 'XRP'];
62
60
  const PM_SIGNAL_TRADFI_SYMBOLS = [
63
61
  'TSLA',
@@ -322,8 +320,11 @@ export function checkIsIndexVenue(exchange) {
322
320
  }
323
321
  /**
324
322
  * Exchanges that print quotes instead of trades: value-only candles with no
325
- * volume and a quote channel live (forex, commodity and the index venues on
326
- * TICKER/TICKER_AGG, the crypto indices on CRYPTO_DOMINANCE/CRYPTO_DOMINANCE_AGG).
323
+ * volume and a quote channel live (forex, commodity, the index venues and the
324
+ * quote-priced perpetual venues on TICKER/TICKER_AGG, the crypto indices on
325
+ * CRYPTO_DOMINANCE/CRYPTO_DOMINANCE_AGG). A venue the gateway serves only as
326
+ * quotes must answer true here: unlisted, it reads as crypto and asks for
327
+ * trades it is never served (venue-price-source.ratchet.spec.ts).
327
328
  * The hub of the quote routing: the candle parse (the ohlcv and K_OHLCV
328
329
  * workers keep a volume-less row), the sided-candle refusal and the live
329
330
  * channel (`liveQuoteType`, live-feed-channel-factory.util) all read it; the
@@ -334,7 +335,11 @@ export function checkIsIndexVenue(exchange) {
334
335
  * cme-futures-capability.spec.ts.
335
336
  */
336
337
  export function checkIsTickerDataType(exchange) {
337
- return (checkIsForex(exchange) || checkIsCommodity(exchange) || checkIsIndexVenue(exchange) || checkIsCryptoIndex(exchange));
338
+ return (checkIsForex(exchange) ||
339
+ checkIsCommodity(exchange) ||
340
+ checkIsIndexVenue(exchange) ||
341
+ checkIsCryptoIndex(exchange) ||
342
+ checkIsQuotePerp(exchange));
338
343
  }
339
344
  export function checkIsBlockedOn1s(exchange) {
340
345
  if (isCmeFuturesPolicyActive(exchange))
@@ -345,6 +350,11 @@ export function checkIsBlockedOn1s(exchange) {
345
350
  // sub-minute rung (1s 5s 15s 30s) is ever servable on a contract.
346
351
  if (isOpraGoverned(exchange))
347
352
  return true;
353
+ // Quote-priced perpetual venues: the gateway serves TICKER_AGG from the
354
+ // minute up ("interval SECOND is not served for TICKER_AGG"). The leaf
355
+ // predicate, case-insensitive like the kind that routes their quotes.
356
+ if (checkIsQuotePerp(exchange))
357
+ return true;
348
358
  return checkIsExchangeInSet(exchange, EXCHANGES_BLOCKED_ON_1S_SET);
349
359
  }
350
360
  export function getMarketType(exchange) {
@@ -6,10 +6,13 @@
6
6
  * equity and index options, Kyle 2026-10-14) draws the same line: chart-only
7
7
  * first-party indicators are display use, user-authored scripting waits for
8
8
  * OPRA's confirmation. Kyle 2026-10-17 assumed that confirmation behind the
9
- * `opra-user-scripts` flag: while it is lit, a user run the browser executes
10
- * reads OPRA like a first-party one (`isOpraUserScriptRun`, ONE decision for
11
- * the display wall, the data wall and the engine policy; the CME plane never
12
- * reads it). This module is the single decider for both planes.
9
+ * `opra-user-scripts` flag; since 2026-10-22 (the OPRA gate compliance round,
10
+ * plan row D3) the policy no longer reads it: `isOpraUserScriptRun`, ONE
11
+ * decision for the display wall, the data wall and the engine policy, refuses
12
+ * every user run, so a lit flag reads exactly like a dark one. A scope
13
+ * assessment with OPRA (the filing's Non-Display Declaration, Exhibit A Q8,
14
+ * Q12, Q13) must come before it opens again. This module is the single
15
+ * decider for both planes.
13
16
  * Every run door (add, mount, protected fetch, cache paint, alerts arm,
14
17
  * editor Run), the per-payload data guard in titan-charts dataFetch, and the
15
18
  * engine policy descriptor consult it; nothing else may re-derive provenance
@@ -95,20 +98,25 @@ export declare function isFirstPartyKScriptRun(settings: KScriptProvenanceSettin
95
98
  * server lane, which reads governed data through its own gate identity (UW-PARITY H3), so a browser flag never opens
96
99
  * a plane to them. A Cloud run is the record on the socket row source (`wrunRowSourceKindOf`), read through the
97
100
  * migration on read (`wrunCloudRecordOf`): the wave-3 record (`wrunRunTarget: 'cloud'`, no `wrunRef`) and a record
98
- * persisted before wave 3 (`wrunRef`) alike. The runs the `opra-user-scripts` flag can open the OPRA plane to; read
99
- * without the flag where a door must know a decision waits on it (the flag's hydration).
101
+ * persisted before wave 3 (`wrunRef`) alike. The runs the `opra-user-scripts` flag opened the OPRA plane to while it
102
+ * was honoured (`isOpraUserScriptRun`); read without the flag where a door must know a decision waits on it (the
103
+ * flag's hydration).
100
104
  */
101
105
  export declare function isOpraUserScriptCandidate(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
102
106
  /**
103
- * Whether the `opra-user-scripts` flag (Kyle 2026-10-17: the OPRA permission for user-authored scripts assumed)
104
- * opens the OPRA plane to this run: a browser user run (`isOpraUserScriptCandidate`) while the flag is lit. The ONE
105
- * decision every OPRA door reads, directly or through the walls below: the display wall, the data wall (the
106
- * dataFetch door, the protected pre-flight, the cache paint), the engine policy, and the wrun chain decision. The
107
- * CME plane never reads it. The flag is read first: while it is dark (the default) no record is read at all.
107
+ * Whether the OPRA plane is open to this user run. The ONE decision every OPRA door reads, directly or through the
108
+ * walls below: the display wall, the data wall (the dataFetch door, the protected pre-flight, the cache paint), the
109
+ * engine policy, and the wrun chain decision. The CME plane never reads it.
110
+ *
111
+ * Always false (2026-10-22, the OPRA gate compliance round, plan row D3): the `opra-user-scripts` flag (Kyle
112
+ * 2026-10-17: the OPRA permission for user-authored scripts assumed) opened the plane to a browser user run
113
+ * (`isOpraUserScriptCandidate`) while lit; it is no longer honoured, and stays defined only so nothing that names it
114
+ * breaks. OPRA's approval covers web display only: user-authored scripting over OPRA data stays refused until a scope
115
+ * assessment with OPRA (the filing's Non-Display Declaration, Exhibit A Q8, Q12, Q13) allows it.
108
116
  */
109
- export declare function isOpraUserScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
110
- /** Whether a run may consume the OPRA plane's data: every first-party run, and a user run the flag opened it to
111
- * (`mayReadOpra`, the one decision the wrun run head and every source lane read too). */
117
+ export declare function isOpraUserScriptRun(_settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
118
+ /** Whether a run may consume the OPRA plane's data: every first-party run, and no user run (`isOpraUserScriptRun`;
119
+ * `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
112
120
  export declare function isOpraReadableKScriptRun(settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
113
121
  /** Whether a source exchange touches a CME-governed venue (the CME-only curation and copy). */
114
122
  export declare function payloadTouchesCmeVenue(exchange: unknown): boolean;
@@ -132,8 +140,8 @@ export declare function payloadTouchesGovernedVenue(exchange: unknown): boolean;
132
140
  * teardown, resubscribe, self-heal, suite/layout/copy apply) consult
133
141
  * isKScriptDisplayBlockedOnExchange below instead, which is a strict superset
134
142
  * of this predicate. Per plane: a CME leg blocks every user run; an OPRA leg
135
- * blocks a user run unless the `opra-user-scripts` flag opened the plane to it
136
- * (`isOpraReadableKScriptRun`).
143
+ * blocks every user run too (`isOpraReadableKScriptRun`: the flag that could
144
+ * open the plane is no longer honoured, see `isOpraUserScriptRun`).
137
145
  */
138
146
  export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settings: KScriptProvenanceSettingsLike | null | undefined): boolean;
139
147
  /**
@@ -171,9 +179,8 @@ export declare function isUserKScriptBlockedOnExchange(exchange: unknown, settin
171
179
  * OPRA (no CME leg): every first-party run is explicitly venue-approved, the
172
180
  * built-ins, the converted corpus, the official docs and the official
173
181
  * packages alike (chart-only display use under the OPRA licence), and every
174
- * user run is blocked unless the `opra-user-scripts` flag opened the plane to
175
- * it (the data wall's own per-plane verdict, so the two walls read one flag
176
- * decision). The CME per-script curation is CME evidence and does not apply
182
+ * user run is blocked (the data wall's own per-plane verdict, so the two walls
183
+ * read one decision, `isOpraUserScriptRun`). The CME per-script curation is CME evidence and does not apply
177
184
  * there; a book-reading official is refused by the options mode (OPRA has no
178
185
  * book), not by this wall.
179
186
  */
@@ -199,8 +206,8 @@ export declare function shouldBlockKScriptSourcePayload(args: {
199
206
  * engine: first-party runs get no engine policy at all; user runs get the
200
207
  * governed set of every gate plane as deniedExchanges once the engine pin
201
208
  * supports it, so a user script on a crypto chart cannot pull an explicit
202
- * OPRA source either, unless the `opra-user-scripts` flag opened the OPRA
203
- * plane to the run (`isOpraUserScriptRun`): its set is then the CME family alone.
209
+ * OPRA source either. A run the OPRA plane is open to (`isOpraUserScriptRun`,
210
+ * none since 2026-10-22) would get the CME family alone.
204
211
  */
205
212
  export interface KScriptDataAccessPolicyDescriptor {
206
213
  governedExchanges: readonly string[];
@@ -6,10 +6,13 @@
6
6
  * equity and index options, Kyle 2026-10-14) draws the same line: chart-only
7
7
  * first-party indicators are display use, user-authored scripting waits for
8
8
  * OPRA's confirmation. Kyle 2026-10-17 assumed that confirmation behind the
9
- * `opra-user-scripts` flag: while it is lit, a user run the browser executes
10
- * reads OPRA like a first-party one (`isOpraUserScriptRun`, ONE decision for
11
- * the display wall, the data wall and the engine policy; the CME plane never
12
- * reads it). This module is the single decider for both planes.
9
+ * `opra-user-scripts` flag; since 2026-10-22 (the OPRA gate compliance round,
10
+ * plan row D3) the policy no longer reads it: `isOpraUserScriptRun`, ONE
11
+ * decision for the display wall, the data wall and the engine policy, refuses
12
+ * every user run, so a lit flag reads exactly like a dark one. A scope
13
+ * assessment with OPRA (the filing's Non-Display Declaration, Exhibit A Q8,
14
+ * Q12, Q13) must come before it opens again. This module is the single
15
+ * decider for both planes.
13
16
  * Every run door (add, mount, protected fetch, cache paint, alerts arm,
14
17
  * editor Run), the per-payload data guard in titan-charts dataFetch, and the
15
18
  * engine policy descriptor consult it; nothing else may re-derive provenance
@@ -31,8 +34,6 @@ import { isWrunDraftScriptId } from '../wrun/wrun-draft-overlay.util.js';
31
34
  import { isWrunOfficialPackage } from '../wrun/wrun-official-scope.leaf.js';
32
35
  // Worker-safe too: it reads the twin stamp, the registry ref and the built-in keys alone.
33
36
  import { builtinIdentityOf } from './builtin-identity.util.js';
34
- // Dependency-free: the flag store hands the flag's live readers to it (no store import here).
35
- import { isOpraUserScriptsFlagOn } from './opra-user-scripts-gate.util.js';
36
37
  // Leaf module (no imports): the row source a record runs on (a Cloud record rides the socket source).
37
38
  import { wrunRowSourceKindOf } from '../wrun/wrun-overlay-identity.util.js';
38
39
  // Near-leaf (the identity leaf only): the migration on read of a record persisted before lane parity wave 3. The
@@ -156,8 +157,9 @@ export function isFirstPartyKScriptRun(settings) {
156
157
  * server lane, which reads governed data through its own gate identity (UW-PARITY H3), so a browser flag never opens
157
158
  * a plane to them. A Cloud run is the record on the socket row source (`wrunRowSourceKindOf`), read through the
158
159
  * migration on read (`wrunCloudRecordOf`): the wave-3 record (`wrunRunTarget: 'cloud'`, no `wrunRef`) and a record
159
- * persisted before wave 3 (`wrunRef`) alike. The runs the `opra-user-scripts` flag can open the OPRA plane to; read
160
- * without the flag where a door must know a decision waits on it (the flag's hydration).
160
+ * persisted before wave 3 (`wrunRef`) alike. The runs the `opra-user-scripts` flag opened the OPRA plane to while it
161
+ * was honoured (`isOpraUserScriptRun`); read without the flag where a door must know a decision waits on it (the
162
+ * flag's hydration).
161
163
  */
162
164
  export function isOpraUserScriptCandidate(settings) {
163
165
  if (!settings || isFirstPartyKScriptRun(settings))
@@ -167,17 +169,21 @@ export function isOpraUserScriptCandidate(settings) {
167
169
  return settings.isProtectedScript !== true;
168
170
  }
169
171
  /**
170
- * Whether the `opra-user-scripts` flag (Kyle 2026-10-17: the OPRA permission for user-authored scripts assumed)
171
- * opens the OPRA plane to this run: a browser user run (`isOpraUserScriptCandidate`) while the flag is lit. The ONE
172
- * decision every OPRA door reads, directly or through the walls below: the display wall, the data wall (the
173
- * dataFetch door, the protected pre-flight, the cache paint), the engine policy, and the wrun chain decision. The
174
- * CME plane never reads it. The flag is read first: while it is dark (the default) no record is read at all.
172
+ * Whether the OPRA plane is open to this user run. The ONE decision every OPRA door reads, directly or through the
173
+ * walls below: the display wall, the data wall (the dataFetch door, the protected pre-flight, the cache paint), the
174
+ * engine policy, and the wrun chain decision. The CME plane never reads it.
175
+ *
176
+ * Always false (2026-10-22, the OPRA gate compliance round, plan row D3): the `opra-user-scripts` flag (Kyle
177
+ * 2026-10-17: the OPRA permission for user-authored scripts assumed) opened the plane to a browser user run
178
+ * (`isOpraUserScriptCandidate`) while lit; it is no longer honoured, and stays defined only so nothing that names it
179
+ * breaks. OPRA's approval covers web display only: user-authored scripting over OPRA data stays refused until a scope
180
+ * assessment with OPRA (the filing's Non-Display Declaration, Exhibit A Q8, Q12, Q13) allows it.
175
181
  */
176
- export function isOpraUserScriptRun(settings) {
177
- return isOpraUserScriptsFlagOn() && isOpraUserScriptCandidate(settings);
182
+ export function isOpraUserScriptRun(_settings) {
183
+ return false;
178
184
  }
179
- /** Whether a run may consume the OPRA plane's data: every first-party run, and a user run the flag opened it to
180
- * (`mayReadOpra`, the one decision the wrun run head and every source lane read too). */
185
+ /** Whether a run may consume the OPRA plane's data: every first-party run, and no user run (`isOpraUserScriptRun`;
186
+ * `mayReadOpra`, the one decision the wrun run head and every source lane read too). */
181
187
  export function isOpraReadableKScriptRun(settings) {
182
188
  return mayReadOpra({ official: isFirstPartyKScriptRun(settings), opraUserScripts: isOpraUserScriptRun(settings) });
183
189
  }
@@ -215,8 +221,8 @@ export function payloadTouchesGovernedVenue(exchange) {
215
221
  * teardown, resubscribe, self-heal, suite/layout/copy apply) consult
216
222
  * isKScriptDisplayBlockedOnExchange below instead, which is a strict superset
217
223
  * of this predicate. Per plane: a CME leg blocks every user run; an OPRA leg
218
- * blocks a user run unless the `opra-user-scripts` flag opened the plane to it
219
- * (`isOpraReadableKScriptRun`).
224
+ * blocks every user run too (`isOpraReadableKScriptRun`: the flag that could
225
+ * open the plane is no longer honoured, see `isOpraUserScriptRun`).
220
226
  */
221
227
  export function isUserKScriptBlockedOnExchange(exchange, settings) {
222
228
  if (payloadTouchesCmeVenue(exchange) && !isFirstPartyKScriptRun(settings))
@@ -258,9 +264,8 @@ export function isUserKScriptBlockedOnExchange(exchange, settings) {
258
264
  * OPRA (no CME leg): every first-party run is explicitly venue-approved, the
259
265
  * built-ins, the converted corpus, the official docs and the official
260
266
  * packages alike (chart-only display use under the OPRA licence), and every
261
- * user run is blocked unless the `opra-user-scripts` flag opened the plane to
262
- * it (the data wall's own per-plane verdict, so the two walls read one flag
263
- * decision). The CME per-script curation is CME evidence and does not apply
267
+ * user run is blocked (the data wall's own per-plane verdict, so the two walls
268
+ * read one decision, `isOpraUserScriptRun`). The CME per-script curation is CME evidence and does not apply
264
269
  * there; a book-reading official is refused by the options mode (OPRA has no
265
270
  * book), not by this wall.
266
271
  */
@@ -291,7 +296,7 @@ export function isKScriptDisplayBlockedOnExchange(exchange, settings) {
291
296
  * rejections, and a policy block is a standing state, not an incident.
292
297
  */
293
298
  export function shouldBlockKScriptSourcePayload(args) {
294
- // The data wall's per-plane verdict: an OPRA source a flag-opened user run declares is served.
299
+ // The data wall's per-plane verdict: an OPRA source is served to a first-party run only (`isOpraUserScriptRun`).
295
300
  const blocked = isUserKScriptBlockedOnExchange(args.payloadExchange, args.settings) ||
296
301
  (payloadReadsOpraPlane(args.payload) && !isOpraReadableKScriptRun(args.settings));
297
302
  if (!blocked)
@@ -303,7 +308,8 @@ const ENGINE_GOVERNED_EXCHANGES = Object.freeze([
303
308
  ...CME_GOVERNED_EXCHANGES,
304
309
  ...OPRA_GOVERNED_EXCHANGES,
305
310
  ]);
306
- /** The CME family alone: the set a user run the `opra-user-scripts` flag opened OPRA to is denied. */
311
+ /** The CME family alone: the set a user run OPRA is open to would be denied (none while `isOpraUserScriptRun` is
312
+ * closed). */
307
313
  const ENGINE_CME_GOVERNED_EXCHANGES = Object.freeze([...CME_GOVERNED_EXCHANGES]);
308
314
  export function buildKScriptDataAccessPolicy(settings) {
309
315
  return {
@@ -5,12 +5,13 @@ import { type OmTargetMetadata } from './om-target.util.js';
5
5
  * The frontend's market-kind vocabulary: TitanCharts' `MarketKind` union plus
6
6
  * FE-owned kinds for governed CME venues (`'futures'`), HyperLiquid
7
7
  * prediction markets (`'hip4'`), economic series (`'economic'`: FRED and
8
- * the ECONOMICS catalog publishers, which the engine still knows as `'fred'`)
9
- * and the crypto-wide indices (`'cryptoIndex'`: CRYPTOCAP's BTC.D, TOTAL, ...).
10
- * TitanCharts does not know these kinds; anything handed into the engine
11
- * narrows through `toTitanMarketKind`.
8
+ * the ECONOMICS catalog publishers, which the engine still knows as `'fred'`),
9
+ * the crypto-wide indices (`'cryptoIndex'`: CRYPTOCAP's BTC.D, TOTAL, ...)
10
+ * and the perpetual venues that publish quotes, never trades (`'quotePerp'`:
11
+ * Variational, quote-perp.leaf). TitanCharts does not know these kinds;
12
+ * anything handed into the engine narrows through `toTitanMarketKind`.
12
13
  */
13
- export type VenueMarketKind = Exclude<MarketKind, 'fred'> | 'economic' | 'futures' | 'hip4' | 'options' | 'cryptoIndex';
14
+ export type VenueMarketKind = Exclude<MarketKind, 'fred'> | 'economic' | 'futures' | 'hip4' | 'options' | 'cryptoIndex' | 'quotePerp';
14
15
  /** Which wire path serves an economic series (see `economicSource`). */
15
16
  export type EconomicSource = 'fred' | 'observation';
16
17
  /**
@@ -127,15 +128,16 @@ export declare function checkIsForexCommodityOrFutures(exchange: string | undefi
127
128
  * the engine's `'fred'` (single-value series treatment); `'cryptoIndex'`
128
129
  * maps to `'crypto'`: the indices print 24/7 (about every 250 ms after a
129
130
  * price move, every 5 s per coin) onto uniform bars from 1m up, the crypto
130
- * treatment's own shape, gap policy included. FE-internal code always sees
131
- * the honest venue kind.
131
+ * treatment's own shape, gap policy included. `'quotePerp'` maps to
132
+ * `'crypto'` too: its perpetuals quote around the clock onto uniform minute
133
+ * bars. FE-internal code always sees the honest venue kind.
132
134
  */
133
135
  export declare function toTitanMarketKind(kind: VenueMarketKind): MarketKind;
134
136
  /**
135
137
  * True when TitanCharts must omit the dedicated 'volume' legend overlay:
136
- * economic series, forex/commodity venues and the crypto indices ship no
137
- * per-bar volume. Governed CME futures DO ship contracts volume on TRADE_AGG
138
- * bars, so they keep it.
138
+ * economic series, forex/commodity venues, the crypto indices and the
139
+ * quote-priced perpetual venues ship no per-bar volume. Governed CME futures
140
+ * DO ship contracts volume on TRADE_AGG bars, so they keep it.
139
141
  */
140
142
  export declare function venueOmitsVolumeOverlay(exchange: string | undefined | null): boolean;
141
143
  export declare function checkIsDex(exchange: string | undefined | null): boolean;