@orangecharts/wrun-chart-host 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -8
- package/dist/constants/feature-flags.constants.js +7 -2
- package/dist/constants/marketCapabilities.constants.d.ts +5 -0
- package/dist/constants/marketCapabilities.constants.js +16 -0
- package/dist/host-env.d.ts +3 -19
- package/dist/host-ports.types.d.ts +36 -17
- package/dist/index.d.ts +12 -1
- package/dist/index.js +12 -1
- package/dist/indicators/controls/tpo-session.util.js +42 -18
- package/dist/interfaces/wrun-runtime.interface.d.ts +88 -13
- package/dist/interfaces/wrun-runtime.interface.js +17 -3
- package/dist/market-data/billing.interface.d.ts +2 -1
- package/dist/settings-templates/indicator-fields.js +10 -0
- package/dist/utility/chart/chart-mount-epoch.util.d.ts +12 -0
- package/dist/utility/chart/chart-mount-epoch.util.js +32 -0
- package/dist/utility/chart/crypto-index.leaf.d.ts +16 -0
- package/dist/utility/chart/crypto-index.leaf.js +19 -0
- package/dist/utility/chart/index-mode-admission.util.js +9 -1
- package/dist/utility/chart/index-mode.util.d.ts +11 -5
- package/dist/utility/chart/index-mode.util.js +22 -10
- package/dist/utility/chart/kscript-source-answer-budget.leaf.d.ts +36 -0
- package/dist/utility/chart/kscript-source-answer-budget.leaf.js +39 -0
- package/dist/utility/chart/kscript-source-degrade.leaf.d.ts +38 -1
- package/dist/utility/chart/kscript-source-degrade.leaf.js +39 -1
- package/dist/utility/chart/live-bucket.util.d.ts +2 -1
- package/dist/utility/chart/live-bucket.util.js +47 -15
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +15 -1
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +9 -0
- package/dist/utility/chart/market-session-schedule.util.d.ts +3 -1
- package/dist/utility/chart/market-session-schedule.util.js +24 -2
- package/dist/utility/chart/marketKind.util.d.ts +12 -7
- package/dist/utility/chart/marketKind.util.js +15 -5
- package/dist/utility/chart/ny-calendar.util.d.ts +104 -0
- package/dist/utility/chart/ny-calendar.util.js +346 -0
- package/dist/utility/chart/om-panel.util.d.ts +14 -2
- package/dist/utility/chart/om-panel.util.js +108 -40
- package/dist/utility/chart/rth-session.util.d.ts +10 -7
- package/dist/utility/chart/rth-session.util.js +17 -22
- package/dist/utility/chart/trading-day.util.js +90 -18
- package/dist/utility/chart/us-equities-session.util.js +20 -67
- package/dist/utility/chart/wrun-bar-session-facts.util.js +14 -1
- package/dist/utility/common/time.util.d.ts +7 -1
- package/dist/utility/common/time.util.js +11 -41
- package/dist/utility/number-format.util.d.ts +17 -7
- package/dist/utility/number-format.util.js +18 -8
- package/dist/utility/options/option-symbol.util.js +13 -2
- package/dist/utility/symbol-selection/contract-expiry.util.js +9 -1
- package/dist/utility/watchlist/import/import-request.leaf.d.ts +4 -1
- package/dist/utility/watchlist/import/import-request.leaf.js +5 -2
- package/dist/utility/watchlist/import/tradingview-symbols.leaf.d.ts +25 -4
- package/dist/utility/watchlist/import/tradingview-symbols.leaf.js +62 -4
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +19 -0
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +57 -0
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +23 -0
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +90 -0
- package/dist/utility/wrun/run-schedule/wrun-lane-groups.util.d.ts +39 -0
- package/dist/utility/wrun/run-schedule/wrun-lane-groups.util.js +60 -0
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +77 -0
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +195 -0
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.d.ts +56 -0
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.js +70 -0
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +53 -0
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +239 -0
- package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +16 -0
- package/dist/utility/wrun/sources/lanes/option_stats_10m.js +14 -0
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +43 -18
- package/dist/utility/wrun/sources/lanes/options_flow.js +209 -72
- package/dist/utility/wrun/sources/lanes/token_supply.js +5 -31
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -18
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +12 -57
- package/dist/utility/wrun/sources/row-lane-registry.d.ts +1 -1
- package/dist/utility/wrun/sources/row-lane-registry.js +22 -8
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +61 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +103 -8
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +5 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +24 -12
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +55 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +95 -18
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +15 -1
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +23 -8
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +11 -11
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +14 -2
- package/dist/utility/wrun/sources/wrun-poll-lane.types.js +6 -3
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +43 -8
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +77 -11
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +31 -16
- package/dist/utility/wrun/sources/wrun-row-lane.types.js +2 -0
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +52 -12
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +110 -46
- package/dist/utility/wrun/wrun-bar-count.util.d.ts +17 -6
- package/dist/utility/wrun/wrun-bar-count.util.js +27 -12
- package/dist/utility/wrun/wrun-browser-sources.leaf.d.ts +10 -0
- package/dist/utility/wrun/wrun-browser-sources.leaf.js +12 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +53 -18
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -0
- package/dist/utility/wrun/wrun-color-settings.util.js +45 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.js +14 -8
- package/dist/utility/wrun/wrun-failure-cause.d.ts +1 -1
- package/dist/utility/wrun/wrun-failure-cause.js +14 -0
- package/dist/utility/wrun/wrun-frames.js +6 -2
- package/dist/utility/wrun/wrun-host.service.d.ts +131 -59
- package/dist/utility/wrun/wrun-host.service.js +391 -194
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +1 -1
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +2 -0
- package/dist/utility/wrun/wrun-hover.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-hover.util.js +25 -4
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +7 -4
- package/dist/utility/wrun/wrun-kit-run-tables.util.d.ts +24 -0
- package/dist/utility/wrun/wrun-kit-run-tables.util.js +87 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +2 -1
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +8 -2
- package/dist/utility/wrun/wrun-live-tick.util.js +35 -16
- package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +40 -13
- package/dist/utility/wrun/wrun-opra-flow.leaf.js +39 -12
- package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +70 -21
- package/dist/utility/wrun/wrun-option-contract-flow.util.js +257 -112
- package/dist/utility/wrun/wrun-option-prints.util.d.ts +62 -22
- package/dist/utility/wrun/wrun-option-prints.util.js +148 -46
- package/dist/utility/wrun/wrun-option-views.util.d.ts +262 -0
- package/dist/utility/wrun/wrun-option-views.util.js +356 -0
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +23 -2
- package/dist/utility/wrun/wrun-options-chain.util.js +37 -3
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +20 -5
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +32 -7
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +9 -3
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +146 -18
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +52 -8
- package/dist/utility/wrun/wrun-overlay-run.util.js +816 -243
- package/dist/utility/wrun/wrun-pack.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +5 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +28 -12
- package/dist/utility/wrun/wrun-pin-venues.util.js +4 -6
- package/dist/utility/wrun/wrun-prefix-cohort.util.d.ts +1 -1
- package/dist/utility/wrun/wrun-prefix-cohort.util.js +1 -1
- package/dist/utility/wrun/wrun-present-bits.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-present-bits.util.js +39 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-refusal-surface.util.js +5 -4
- package/dist/utility/wrun/wrun-refusal.util.d.ts +66 -6
- package/dist/utility/wrun/wrun-refusal.util.js +335 -40
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +5 -3
- package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +2 -2
- package/dist/utility/wrun/wrun-sha256.leaf.d.ts +13 -0
- package/dist/utility/wrun/wrun-sha256.leaf.js +84 -0
- package/dist/utility/wrun/wrun-source-rows.util.js +11 -0
- package/dist/utility/wrun/wrun-tier-grid.util.d.ts +28 -3
- package/dist/utility/wrun/wrun-tier-grid.util.js +79 -19
- package/dist/utility/wrun/wrun-transient-rerun.util.d.ts +14 -3
- package/dist/utility/wrun/wrun-transient-rerun.util.js +33 -8
- package/dist/workers/wrun/wrun-abi-host.d.ts +15 -2
- package/dist/workers/wrun/wrun-abi-host.js +31 -12
- package/dist/workers/wrun/wrun-engine-handler.d.ts +11 -28
- package/dist/workers/wrun/wrun-engine-handler.js +181 -12
- package/package.json +5 -5
- package/dist/utility/wrun/wrun-opra-underlying.util.d.ts +0 -12
- package/dist/utility/wrun/wrun-opra-underlying.util.js +0 -1
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@ Peers, pinned exactly (install them beside the package):
|
|
|
10
10
|
|
|
11
11
|
| Peer | Version | Why |
|
|
12
12
|
| --- | --- | --- |
|
|
13
|
-
| `@orangecharts/indicator-kit` | 0.
|
|
14
|
-
| `@orangecharts/orange-v2-pb-common` | 12.
|
|
13
|
+
| `@orangecharts/indicator-kit` | 0.88.0 | the shared host's types (`@orangecharts/indicator-kit/host`); the host module itself comes through the env |
|
|
14
|
+
| `@orangecharts/orange-v2-pb-common` | 12.72.0 | the protocol enums the lanes, pins and venue rules read (`Exchange`, `Type`, `Category`), from 0.3.0 |
|
|
15
15
|
| `dayjs` | 1.11.23 | sessions and trading days (the `utc`, `timezone`, `isoWeek` and `quarterOfYear` plugins) |
|
|
16
16
|
| `lodash-es` | 4.18.1 | the color settings and the transforms, by per-function subpath |
|
|
17
17
|
|
|
@@ -30,8 +30,9 @@ At 0.4.0, 27: the panel mount `utility/wrun/wrun-panel-mount.util` joins them (i
|
|
|
30
30
|
`utility/wrun/wrun-overlay-lifecycle.lazy`, the run pass `utility/wrun/wrun-overlay-run.util`, `replay/replayLadder`,
|
|
31
31
|
`utility/market-events/market-events.util` and `utility/wrun/wrun-overlay-identity.util` join them. The entry served
|
|
32
32
|
the last one at 0.4.0: from 0.5.0 its `isWrunDraftOverlaySettings` is the draft overlay module's (a draft ref, or a
|
|
33
|
-
draft script id without a package ref), so import the identity module's names by its subpath.
|
|
34
|
-
the modules it
|
|
33
|
+
draft script id without a package ref), so import the identity module's names by its subpath. 0.6.0 and 0.7.0 keep
|
|
34
|
+
the same 33: the eleven modules 0.7.0 adds all join the entry, and the one it deletes
|
|
35
|
+
(`utility/wrun/wrun-opra-underlying.util`) was in it. `src/index.ts` names the modules it joins.
|
|
35
36
|
|
|
36
37
|
## The host env (ports)
|
|
37
38
|
|
|
@@ -73,10 +74,16 @@ throw by name. 0.5.0 adds the phase 2 contract: 84 members and the `ui` and `eng
|
|
|
73
74
|
session, the drivers, the engine and the executor read, and two optional members: `clock.watchHostSuspended` (a host
|
|
74
75
|
that parks its chart while the page stays visible reports it, and the package's visible deadlines pause) and
|
|
75
76
|
`chart.commonStore` (the go-to-date history flag the live tick reads in the caller's turn; without it every chart reads
|
|
76
|
-
as live). It retires
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
as live). It retires the three `run` loaders: they are optional at 0.5.0 (the package loads the lifecycle door, the
|
|
78
|
+
refusal surface and the series stream itself), and 0.6.0 removes them with the `run` namespace: 131 members by the
|
|
79
|
+
contract's count (134 at 0.5.0), 133 in `host-env` with 0.5.0's two optional members. Their payload types and loader
|
|
80
|
+
views are `host-ports.types`. 0.7.0 keeps the 133 members and widens one loader view: the module
|
|
81
|
+
`transport.loadV2Service()` answers (`WrunV2ServiceModule`) gains `warmGateReaderFor(exchange)` and
|
|
82
|
+
`warmGateReaderOnIntent(exchange, surface)`, which package code calls only inside the two gate reader warms a host's
|
|
83
|
+
door calls (`warmWrunSheetGateReaders`, `warmWrunChartGateReaderOnIntent`). From 0.7.0 no package code reads
|
|
84
|
+
`transport.loadWrunKit`: a run reads the kit's two tables from `utility/wrun/wrun-kit-run-tables.util`, pinned to the
|
|
85
|
+
kit. A source fetch also takes an optional `onSent` (the request's own wire send, which a lane's budget then counts
|
|
86
|
+
from). The guide lists every member, what reads it and what web binds it.
|
|
80
87
|
|
|
81
88
|
A read before the set throws `wrun_chart_host_env_unset`. The env lives on the realm's global object under
|
|
82
89
|
`Symbol.for('@orangecharts/wrun-chart-host/env')`, so every copy of the package in a realm reads the same one.
|
|
@@ -99,6 +106,8 @@ What each published version holds. A host installs a version with the peers of i
|
|
|
99
106
|
|
|
100
107
|
| Version | Peers | What changed |
|
|
101
108
|
| --- | --- | --- |
|
|
109
|
+
| 0.7.0 | `@orangecharts/indicator-kit` 0.88.0, `@orangecharts/orange-v2-pb-common` 12.72.0, `dayjs` 1.11.23, `lodash-es` 4.18.1 | The options lanes of OPTIONS-PORT P7: `options_flow` becomes a chain lane, and with `option_prints` and `option_contract_flow` it reads the chart's option chain on a crypto option venue and on a CME futures chart as well as on OPRA; option contract flow plans to one source answer budget every layer reads (`utility/chart/kscript-source-answer-budget.leaf`). The run schedule (`utility/wrun/run-schedule/`, six modules): each lane group is sent at its own plan, held or in-flight reads are reused, and a host's door can dial the chart's gate reader before an add (`warmWrunSheetGateReaders`) or when a surface opens (`warmWrunChartGateReaderOnIntent`). Row lanes ask end-exclusive (`WrunSourceFetchOptions.endExclusive`) and keep held bars over budget markers; panel rows paint with missing readings, and a lane is asked only within its reach (`WrunWarmupEvidence.sourceReachFromTs`, the `source-reach` backfill outcome). Trading-day opens are solved as titan solves them across DST edges, and each zone's offset is read once a day (`utility/chart/ny-calendar.util`). Crypto indices chart as main symbols (`utility/chart/crypto-index.leaf`); the symbol comparison keeps its user label as instance state in the settings templates; a run no longer loads the kit on the main thread (`utility/wrun/wrun-kit-run-tables.util`). Every failed run names its cause: `WRUN_FAILURE_CAUSES` gains eight words (`package-withdrawn`, `package-hosted`, `compile-failed`, `twin-declined` and `integration-error` for what stopped a package before it ran; `source-budget`, `source-failed` and `source-declined` for a source lane the ladder gave up on), a package the registry no longer serves shows "no longer available from its publisher" with Remove and never Retry, and a source chip names the feed and what happened (the words under `wrun.unavailable` and `kscript.legend.card.removeIndicator`, which a host's word table needs). A lane's budget counts from its dispatch until the transport reports the request's wire send (`WrunSourceFetchOptions.onSent`, optional: a transport that never reports keeps the dispatch budget), then from the send, 60 s at most from the dispatch; the ladder never ends a lane while a late read is out, and the record it ends on names its cause and the episode that armed it (a restore, a person's add, a live rebuild). The transient grace holds a failure only for an overlay a rerun driver runs, unless the host declares that it reruns the overlay itself (`holdWrunTransientRefusal(target, onExpire, { hostReruns: true })`, `WrunTransientHoldOptions`; off by default): the mobile app's protected run heal does, so its Marketplace indicators load through an outage instead of showing their chip at once. `onWrunOverlayRunSettled` announces a run of a standing overlay only: a run that settles after its overlay's teardown (typically dropped by the teardown's cancel of its pending row-source ask) is the ring's alone, so a same-id remount no longer reads its predecessor's dropped run as its own first run. OPTLOAD G5: an `options_chain` or `option_contract_state` input may declare chain page views (`page_view`, `page_views`; `utility/wrun/wrun-option-views.util`), which ride the lane's ask as view fields for the host's chain transport to send in one chain summary read; a fold view refuses by name (`wrun_option_view_unread`) and a view param's `"@<param>"` handle is painted like `ticks_per_bar`. On the OPRA plane both lanes hold the plane's chain by coin instead of reading the chain directory (`wrunHeldOpraPlaneChain`). One loader view widens: the module `transport.loadV2Service()` answers gains `warmGateReaderFor(exchange)` and `warmGateReaderOnIntent(exchange, surface)`; the env keeps its 133 members, and no package code reads `transport.loadWrunKit` any more. 11 modules join, all in the entry, and `utility/wrun/wrun-opra-underlying.util` goes with its `WrunOpraUnderlyingContext`: 416 dist modules (406 at 0.6.0), 33 by subpath only. `utility/wrun/sources/opra-option-lanes.util` drops `resolveWrunOpraLaneUnderlying` and `resolveWrunLaneOpraChain`; a lane resolves its chain through `resolveWrunLaneChainChart` and `decideWrunLaneChain`. The kit peer moves from 0.87.0 to 0.88.0 and the protocol enums peer from 12.69.0 to 12.72.0. |
|
|
110
|
+
| 0.6.0 | `@orangecharts/indicator-kit` 0.87.0, `@orangecharts/orange-v2-pb-common` 12.69.0, `dayjs` 1.11.23, `lodash-es` 4.18.1 | The shared engine protocol: a module's bytes cross `postMessage` (the mobile app's portability rule) and the engine worker hashes them (`utility/wrun/wrun-sha256.leaf`), checks the sheet's pin, clamps, prepares and compiles them, caching up to 16 compiled modules per worker, so the main thread neither hashes nor compiles. `compileModule` becomes `loadModule`, which answers an opaque `WrunModuleHandle` (key, sha256, ABI, imports as `{ module, name }` pairs; no bytes); every full run and live-start carries the module's key, ABI and bytes (copied, never transferred), and the worker reuses its cached module or compiles the bytes on a miss, so a respawned worker compiles again. A request runs on two 20 s clocks, the start ceiling from the post (queue plus compile) and the run deadline from the worker's `running`; `loadModule` rejects a failed compile as a `WebAssembly.CompileError` with the worker's words and a pin mismatch with the words it had before 0.6.0. The `run` namespace goes with its three loaders (`run.loadOverlayLifecycleDoor`, `run.loadRefusalSurface`, `run.loadSeriesStream`, retired at 0.5.0), `WrunHostRun` and their three loader views in `host-ports.types`: 131 members by the contract's count, 133 with 0.5.0's two optional ones. Peers unchanged. |
|
|
102
111
|
| 0.5.0 | `@orangecharts/indicator-kit` 0.87.0, `@orangecharts/orange-v2-pb-common` 12.69.0, `dayjs` 1.11.23, `lodash-es` 4.18.1 | Phase 2: the live session (the live tick, intake, hidden-tab hold, coin lane live channels, series stream), the drivers and the heal ladder (the lifecycle door, `utility/wrun/wrun-overlay-lifecycle.lazy` by subpath, its runtime and the recovery ladders), the prefix runs, the engine (`workers/wrun/wrun-abi-host`, `workers/wrun/wrun-engine-handler`, the browser host), the host facts and the executor (`utility/wrun/wrun-overlay-run.util`, by subpath) with its row sources: 135 modules, 398 in all. The env gains the 84 phase 2 members, the `ui` and `engine` namespaces and the optional `clock.watchHostSuspended` and `chart.commonStore`; the three `run` loaders turn optional (gone at 0.6.0). The panel mount reads a host's planned pane heights on every cell and retranslates an unchanged child in place, keeping a reader's expanded pane through a retire. The entry no longer serves `utility/wrun/wrun-overlay-identity.util` (by subpath; above). The kit peer moves from 0.86.3 to 0.87.0 (`option_multiplier`); the other peers are unchanged. |
|
|
103
112
|
| 0.4.0 | `@orangecharts/indicator-kit` 0.86.3, `@orangecharts/orange-v2-pb-common` 12.69.0, `dayjs` 1.11.23, `lodash-es` 4.18.1 | Phase 1b: the panel mount (`utility/wrun/wrun-panel-mount.util`, by subpath) and its door (`utility/wrun/wrun-panel-mount.lazy`), the run interval rules (`utility/chart/indicator-run-interval.util`) with the builtin script snippets they type against, the pause dim and six leaves (the window owner and window geometry rules, the date-labelled interval rule, the HTML escape, the run interval projection and plot gate types): 11 modules, 262 in all. The mount reads the host through the env: the 12 members reserved until 0.4.0, `t` and `diagnostics.debug`. Peers unchanged. |
|
|
104
113
|
| 0.3.0 | `@orangecharts/indicator-kit` 0.86.3, `@orangecharts/orange-v2-pb-common` 12.69.0, `dayjs` 1.11.23, `lodash-es` 4.18.1 | Three programs ship together. The settings templates: the nested entry `@orangecharts/wrun-chart-host/settings-templates`, one declared settings schema for every template (`TEMPLATE_SCHEMA_VERSION` 2). The phase 1 host contract: 42 env members (`host-env`) with their payload types and loader views (`host-ports.types`), 22 read by 0.3.0 modules, the rest reserved. Phase 1a's move: the lane layer (both lane registries, read through generated indexes, the lane files and planners), the row builder, legs and pins, the cloud row source and the main-grid stages, with what they read: 142 modules, 250 in all. The kit peer moves from 0.80.0 to 0.86.3 (leg streams and per-span levels) and the protocol enums package joins the peers. |
|
|
@@ -40,8 +40,13 @@ export const FeatureFlag = {
|
|
|
40
40
|
// paper"). Rides this key, read through `isOn` (`isPaperTradingOn`):
|
|
41
41
|
// unminted, absent and guest all read off, so production ships it dark; an internal role reads it
|
|
42
42
|
// on through the server's bypass, the dev/internal localStorage override lights it locally
|
|
43
|
-
// (`kiyo.flag-overrides` -> `{"paper-trading": true}`). Mint it enabled to open it up. The
|
|
44
|
-
//
|
|
43
|
+
// (`kiyo.flag-overrides` -> `{"paper-trading": true}`). Mint it enabled to open it up. The same
|
|
44
|
+
// key also lights the three exchange venues launched dark (docs/features/cex-execution/README.md,
|
|
45
|
+
// "Dark launch, entities, passphrase"): OKX, Deribit, and Coinbase derivatives (the Deribit engine
|
|
46
|
+
// for non-US accounts), their discovery and new linking, read through `isOn` by `isCexVenueFlagOn`.
|
|
47
|
+
// A key this browser already holds for one of them keeps trading after the flag turns off. The
|
|
48
|
+
// build switch `PAPER_TRADING_ENABLED` takes only the paper venue out of a build, never the
|
|
49
|
+
// exchange venues.
|
|
45
50
|
PaperTrading: 'paper-trading',
|
|
46
51
|
// The trading hub (docs/features/trading-hub/README.md): one Trade door beside the avatar that
|
|
47
52
|
// folds the desktop's linking, accounts and trade settings into one dialog. Rides the master
|
|
@@ -25,6 +25,11 @@ export interface IMarketCapabilities {
|
|
|
25
25
|
/** Determines how alert symbols are formatted. Polymarket uses the market's
|
|
26
26
|
* conditionId; tradfi/forex/etc. use coin-style; dex uses pool slug. */
|
|
27
27
|
alertSymbolMode: 'coin' | 'slug' | 'conditionId';
|
|
28
|
+
/** Whether alerts can be CREATED on this venue. Absent = true. False where
|
|
29
|
+
* the alert engine serves no lane for the venue, so an armed alert would
|
|
30
|
+
* save and never fire (the crypto indices). Read by the creation doors only
|
|
31
|
+
* (venue-alerts.util); listing, editing and deleting alerts never read it. */
|
|
32
|
+
supportsAlerts?: boolean;
|
|
28
33
|
/** Finest interval the venue serves, in ms. Absent = the interval ladder's
|
|
29
34
|
* own floor applies (economic series observe at most once a day). */
|
|
30
35
|
minIntervalMs?: number;
|
|
@@ -179,6 +179,22 @@ export const MARKET_CAPABILITIES = {
|
|
|
179
179
|
// keep record identity with CME_FUTURES_CAPABILITIES.
|
|
180
180
|
futures: CME_FUTURES_CAPABILITIES,
|
|
181
181
|
options: OPRA_OPTIONS_CAPABILITIES,
|
|
182
|
+
// The crypto-wide indices (CRYPTOCAP: BTC.D, TOTAL, ...). Value candles on
|
|
183
|
+
// the period fetch, 24/7 on uniform bars like crypto, at every interval from
|
|
184
|
+
// 1m up (the calendar ones included; nothing below 1m, checkIsBlockedOn1s),
|
|
185
|
+
// but no trades, volume, book or profile behind them, and no alert engine lane.
|
|
186
|
+
cryptoIndex: {
|
|
187
|
+
barTimestamps: 'uniform',
|
|
188
|
+
fetchMode: 'period',
|
|
189
|
+
supportsVolumeStats: false,
|
|
190
|
+
supportsTradesFeed: false,
|
|
191
|
+
supportsMarketStats: false,
|
|
192
|
+
supportsFRVP: false,
|
|
193
|
+
supportsOrderbook: false,
|
|
194
|
+
supportsAlerts: false,
|
|
195
|
+
alertSymbolMode: 'coin',
|
|
196
|
+
allowsCalendarIntervals: true,
|
|
197
|
+
},
|
|
182
198
|
};
|
|
183
199
|
// =============================================================================
|
|
184
200
|
// MarketKind shorthand sets — for `IIndicatorControl.marketKinds` declarations.
|
package/dist/host-env.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* bundle that splits it, a spec that resets its module registry) reads the one the realm's entry set.
|
|
11
11
|
*/
|
|
12
12
|
import type * as WrunKitHost from '@orangecharts/indicator-kit/host';
|
|
13
|
-
import type { WrunAttemptOutcome, WrunAttemptStageMs, WrunAttemptToken, WrunChartHandle, WrunChartModeModule, WrunChartPaintMode, WrunChartPaintOptions, WrunChartPaintTarget, WrunChartRoutingModule, WrunChartStoreModule, WrunChartStoreView, WrunCommonStoreModule, WrunConsoleRefusalRun, WrunContinuousContractsModule, WrunContrastGuardContext, WrunDataFetchingModule, WrunDeclaredDepthAsk, WrunDeribitOptionsModule, WrunEditorShellModule, WrunEndOfDataMarkerReason, WrunEngineWorker, WrunEngineWorkerOptions, WrunFailureShow, WrunFeedStreamApi, WrunFeedsServiceModule, WrunHiddenLiveDrainOutcome, WrunHostOverlayRef, WrunIndicatorRegistryModule, WrunIndicatorTypesModule, WrunInputRequirement, WrunIntegrateOptions, WrunIntegrateResult, WrunKitModule, WrunKScriptErrorEnvelopeModule, WrunLegendHoverModule, WrunLiveCoalesceFlush, WrunLiveCoalesceTickDecision, WrunLiveFeedServiceModule, WrunLiveRefreshGateDecision, WrunMarketEventsStoreModule, WrunMetadataServiceModule, WrunOffchartGridHeightsModule, WrunOptionChainServiceModule, WrunOptionsChainVenuesModule, WrunOptionsChartSourceModule, WrunOptionsGateModule, WrunOptionsOverlayProvenanceModule,
|
|
13
|
+
import type { WrunAttemptOutcome, WrunAttemptStageMs, WrunAttemptToken, WrunChartHandle, WrunChartModeModule, WrunChartPaintMode, WrunChartPaintOptions, WrunChartPaintTarget, WrunChartRoutingModule, WrunChartStoreModule, WrunChartStoreView, WrunCommonStoreModule, WrunConsoleRefusalRun, WrunContinuousContractsModule, WrunContrastGuardContext, WrunDataFetchingModule, WrunDeclaredDepthAsk, WrunDeribitOptionsModule, WrunEditorShellModule, WrunEndOfDataMarkerReason, WrunEngineWorker, WrunEngineWorkerOptions, WrunFailureShow, WrunFeedStreamApi, WrunFeedsServiceModule, WrunHiddenLiveDrainOutcome, WrunHostOverlayRef, WrunIndicatorRegistryModule, WrunIndicatorTypesModule, WrunInputRequirement, WrunIntegrateOptions, WrunIntegrateResult, WrunKitModule, WrunKScriptErrorEnvelopeModule, WrunLegendHoverModule, WrunLiveCoalesceFlush, WrunLiveCoalesceTickDecision, WrunLiveFeedServiceModule, WrunLiveRefreshGateDecision, WrunMarketEventsStoreModule, WrunMetadataServiceModule, WrunOffchartGridHeightsModule, WrunOptionChainServiceModule, WrunOptionsChainVenuesModule, WrunOptionsChartSourceModule, WrunOptionsGateModule, WrunOptionsOverlayProvenanceModule, WrunOverlayMeasureResult, WrunPackEnsureInput, WrunPackEnsureResult, WrunPaneBudgetRankingModule, WrunPlotGateChart, WrunPlotGateRefusal, WrunPriceMarkerTarget, WrunRefreshRowsOptions, WrunRefreshRowsResult, WrunRefusalActionsModule, WrunSearchPayloadToMarketsRequestModule, WrunSignalSheetView, WrunSignalSoundCheck, WrunSocketChartRows, WrunSocketLoadSignals, WrunSocketTransport, WrunSocketTransportModule, WrunSourceCountMetadataLike, WrunSourceDegradeEntry, WrunSourceFetchOptions, WrunStandInTarget, WrunStandInWriteArgs, WrunStandInWriteOutcome, WrunSymbolDisplayModule, WrunTitanChartsModule, WrunTpoBlockCatalogModule, WrunTwinsRosterModule, WrunV2ServiceModule, WrunVenueLegsArgs, WrunVenueLegsResult, WrunWarmupBackfillAsk, WrunWarmupBackfillOutcome } from './host-ports.types.js';
|
|
14
14
|
import type { CmeServedAccess } from './interfaces/cme-realtime.interface.js';
|
|
15
15
|
import type { WrunDrawSkips, WrunOutputRow } from './interfaces/wrun-runtime.interface.js';
|
|
16
16
|
import type { WrunLatestSnapshot } from './utility/wrun/wrun-latest-snapshot.js';
|
|
@@ -125,7 +125,8 @@ export interface WrunChartHostDiagnostics {
|
|
|
125
125
|
* a sync call answering the Promise the executor awaits at :5762, :6642). */
|
|
126
126
|
publishSkippedNotice(chartIndex: number, indicatorId: string, skips: WrunDrawSkips | undefined): Promise<void>;
|
|
127
127
|
}
|
|
128
|
-
/** What the layer reads from its host.
|
|
128
|
+
/** What the layer reads from its host. REMOVED 0.6.0: the `run` namespace, whose three transitional loaders 0.5.0
|
|
129
|
+
* retired (the package imports the lifecycle door, the refusal surface and the series stream itself). */
|
|
129
130
|
export interface WrunChartHostEnv {
|
|
130
131
|
/** A user-facing string by its locale key (web: the i18n plugin). Reserved until 0.4.0 (the panel mount's legend
|
|
131
132
|
* words). CHANGED 0.5.0: + `plural` (vue-i18n's third argument). web: (key, params, plural) => plural === undefined ?
|
|
@@ -154,9 +155,6 @@ export interface WrunChartHostEnv {
|
|
|
154
155
|
market: WrunHostMarket;
|
|
155
156
|
/** 0.3.0. */
|
|
156
157
|
transport: WrunHostTransport;
|
|
157
|
-
/** 0.3.0, transitional (D-4). Retired at 0.5.0: every member optional, none called by package code; removed at
|
|
158
|
-
* 0.6.0. */
|
|
159
|
-
run: WrunHostRun;
|
|
160
158
|
/** 0.3.0, reserved until 0.5.0. */
|
|
161
159
|
clock: WrunHostClock;
|
|
162
160
|
/** 0.5.0. */
|
|
@@ -470,20 +468,6 @@ export interface WrunHostTransport {
|
|
|
470
468
|
* factory :132, inside the socket module load's .then). */
|
|
471
469
|
loadLiveFeedService(): Promise<WrunLiveFeedServiceModule>;
|
|
472
470
|
}
|
|
473
|
-
/** TRANSITIONAL (D-4): loaders into modules Phase 2 moved. Retired at 0.5.0: each is optional and no package code
|
|
474
|
-
* calls it (the three modules are package modules, loaded package-internally with the same destructuring); removed
|
|
475
|
-
* at 0.6.0. A host may keep binding them until then (web does, web-ports/boot.ts). */
|
|
476
|
-
export interface WrunHostRun {
|
|
477
|
-
/** 0.3.0, boot loader; retired at 0.5.0 (the socket row source imports ./wrun-overlay-lifecycle.lazy). web:
|
|
478
|
-
* import('@/utility/wrun/wrun-overlay-lifecycle.lazy') viewed as { requestWrunOverlayRerun }. */
|
|
479
|
-
loadOverlayLifecycleDoor?(): Promise<WrunOverlayLifecycleDoorModule>;
|
|
480
|
-
/** 0.3.0, boot loader; retired at 0.5.0 (the socket row source imports ./wrun-refusal-surface.util). web:
|
|
481
|
-
* import('@/utility/wrun/wrun-refusal-surface.util') viewed as { liveWrunRefusalAttempt }. */
|
|
482
|
-
loadRefusalSurface?(): Promise<WrunRefusalSurfaceModule>;
|
|
483
|
-
/** 0.3.0, boot loader; retired at 0.5.0 (the series lane imports ../../wrun-series-stream.util). web:
|
|
484
|
-
* import('@/utility/wrun/wrun-series-stream.util') viewed as { openWrunSeriesStream }. */
|
|
485
|
-
loadSeriesStream?(): Promise<WrunSeriesStreamModule>;
|
|
486
|
-
}
|
|
487
471
|
/** Page visibility (reserved until 0.5.0, boot; live at 0.5.0, the live tick reads both) and the hidden live pace
|
|
488
472
|
* (0.5.0, boot). Timers and Date.now stay direct (D-10). */
|
|
489
473
|
export interface WrunHostClock {
|
|
@@ -22,11 +22,10 @@ import type { HistoryWallKind } from './utility/chart/history-wall.util.js';
|
|
|
22
22
|
import type { OverlayRunInterval as WrunOverlayRunInterval } from './utility/chart/indicator-run-interval.util.js';
|
|
23
23
|
import type { WrunVisibilityChart } from './utility/chart/wrun-visibility-chart.util.js';
|
|
24
24
|
import type { OptionSource as WrunOptionSource } from './utility/options/option-venue.util.js';
|
|
25
|
-
import type { WrunPollLaneLiveAsk, WrunPollLaneLiveSink, WrunPollLaneLiveSubscription } from './utility/wrun/sources/wrun-poll-lane.types.js';
|
|
26
25
|
import type { WrunOptionsChainCryptoVenues as WrunOptionsChainVenues, WrunOptionsChainCryptoVenueWord } from './utility/wrun/wrun-options-chain.util.js';
|
|
27
26
|
import type { WrunRunReason } from './utility/wrun/wrun-lifecycle.contract.js';
|
|
28
27
|
import type { WrunPaneFormatChart } from './utility/wrun/wrun-pane-format.util.js';
|
|
29
|
-
import type { WrunRefusal,
|
|
28
|
+
import type { WrunRefusal, WrunRefusalClass, WrunRefusalOverlayTarget } from './utility/wrun/wrun-refusal.util.js';
|
|
30
29
|
import type { WrunRowSourceIdentity } from './utility/wrun/wrun-row-source.js';
|
|
31
30
|
import type { WrunSocketTransport } from './utility/wrun/wrun-socket-row-source.js';
|
|
32
31
|
import type { WrunColorTheme } from './utility/wrun/wrun-style-words.util.js';
|
|
@@ -331,11 +330,28 @@ export interface WrunMainCandleFetchOptions {
|
|
|
331
330
|
operationName?: string;
|
|
332
331
|
};
|
|
333
332
|
}
|
|
333
|
+
/** What suspects an options add is coming and warms the chart's gate reader for it, with no add asked yet (OPTLOAD g1
|
|
334
|
+
* round 2): a surface's open (`indicators-dialog`, `options-panel`: run-schedule/wrun-chart-gate-reader.util
|
|
335
|
+
* `warmWrunChartGateReaderOnIntent`), or a row's settled intent (`add-intent`: a hover's dwell, a detail panel; the
|
|
336
|
+
* loader's intent warm through wrun-gate-reader-warm.util `warmWrunSheetGateReaders`). */
|
|
337
|
+
export type WrunGateReaderIntentSurface = 'indicators-dialog' | 'options-panel' | 'add-intent';
|
|
338
|
+
/** What an intent warm did: `dialed` (this tab dials the reader and holds its lease), `already` (this tab's reader was
|
|
339
|
+
* dialing or open), `held-elsewhere` (another tab holds that reader for this identity and tier), `busy` (another tab is
|
|
340
|
+
* deciding its warm now), `unknown` (the browser cannot say who holds it: never dialed), `no-plane` (the chart's options
|
|
341
|
+
* ride no gate plane), `not-served` (no reader carries the account's reads: a guest, a CME terms wall),
|
|
342
|
+
* `not-entitled` (the gate refused this identity there, or the dial's own guards stopped it), `failed` (a load or a
|
|
343
|
+
* port failed). */
|
|
344
|
+
export type WrunGateReaderIntentWarm = 'dialed' | 'already' | 'held-elsewhere' | 'busy' | 'unknown' | 'no-plane' | 'not-served' | 'not-entitled' | 'failed';
|
|
334
345
|
/** Loader view of the V2 transport the main candles ride (web: services/v2.service.ts default `fetchData`, generic on
|
|
335
|
-
* web; the payload is the transport's own type, `never` here)
|
|
346
|
+
* web; the payload is the transport's own type, `never` here), the gate reader warm a door asks of it
|
|
347
|
+
* (`warmGateReaderFor`: dial the reader a read naming the exchange rides, under the on-demand guards; a hint,
|
|
348
|
+
* run-schedule/wrun-gate-reader-warm.util), and the intent warm a surface's open asks of it (`warmGateReaderOnIntent`:
|
|
349
|
+
* the same reader, only when no other tab of the browser holds it). */
|
|
336
350
|
export interface WrunV2ServiceModule {
|
|
337
351
|
readonly default: {
|
|
338
352
|
fetchData(indicator: string, payload: never, chartIndex: number, options: WrunMainCandleFetchOptions): Promise<void>;
|
|
353
|
+
warmGateReaderFor(exchange: string): void;
|
|
354
|
+
warmGateReaderOnIntent(exchange: string, surface: WrunGateReaderIntentSurface): Promise<WrunGateReaderIntentWarm>;
|
|
339
355
|
};
|
|
340
356
|
}
|
|
341
357
|
/** A markets request as the app hands it to the worker (web: workers/messages/indicator-v2.messages.ts
|
|
@@ -632,20 +648,8 @@ export interface WrunKScriptErrorEnvelopeModule {
|
|
|
632
648
|
editorRun: boolean;
|
|
633
649
|
}): RuntimeDiagnostic[];
|
|
634
650
|
}
|
|
635
|
-
/** Loader view of the overlay lifecycle door. */
|
|
636
|
-
export interface WrunOverlayLifecycleDoorModule {
|
|
637
|
-
requestWrunOverlayRerun(chartIndex: number, indicatorId: string, reason: 'source-recovery'): Promise<void> | false;
|
|
638
|
-
}
|
|
639
|
-
/** Loader view of the refusal surface. */
|
|
640
|
-
export interface WrunRefusalSurfaceModule {
|
|
641
|
-
liveWrunRefusalAttempt(chartIndex: number, indicatorId: string): WrunRefusalAttemptToken | null;
|
|
642
|
-
}
|
|
643
651
|
/** A lane's live channel ask, sink and handle (utility/wrun/sources/wrun-poll-lane.types.ts, moved in phase 1a). */
|
|
644
652
|
export type { WrunPollLaneLiveAsk, WrunPollLaneLiveSink, WrunPollLaneLiveSubscription, } from './utility/wrun/sources/wrun-poll-lane.types.js';
|
|
645
|
-
/** Loader view of the series stream. */
|
|
646
|
-
export interface WrunSeriesStreamModule {
|
|
647
|
-
openWrunSeriesStream(ask: WrunPollLaneLiveAsk, sink: WrunPollLaneLiveSink): Promise<WrunPollLaneLiveSubscription>;
|
|
648
|
-
}
|
|
649
653
|
/** The engine surface a paint request reaches (web: `KScriptChartPaintTarget`). */
|
|
650
654
|
export interface WrunChartPaintTarget {
|
|
651
655
|
requestLiveRecompute?(opts?: {
|
|
@@ -851,8 +855,16 @@ export interface WrunSourceFetchOptions {
|
|
|
851
855
|
preferPackedOrderbookWorker?: boolean;
|
|
852
856
|
latestAnchorBars?: number;
|
|
853
857
|
retryAttempt?: number;
|
|
854
|
-
/** SRCDEGRADE dispatch anchor: called when the request actually goes to the wire (or joins one that has).
|
|
858
|
+
/** SRCDEGRADE dispatch anchor: called when the request actually goes to the wire (or joins one that has). A wrun
|
|
859
|
+
* lane's budget counts from it (wrun-overlay-run.util `WrunLaneSendAnchor`). */
|
|
855
860
|
onDispatched?: () => void;
|
|
861
|
+
/** The request's own wire send (the transport worker's REQUEST_SENT), for a transport that reports it: a wrun lane's
|
|
862
|
+
* budget moves its anchor to it, so the socket's open and the worker's queue spend none of it. Optional for the
|
|
863
|
+
* host (web's dataFetch reports it once per call: its first own v2 send, the packed book request handed to the
|
|
864
|
+
* worker, or a joined leader's send; the web port then forwards `onSent` alone, so a request waiting in the v2
|
|
865
|
+
* queue or behind the socket open keeps its full budget, and a transport that never reports keeps the dispatch
|
|
866
|
+
* budget). */
|
|
867
|
+
onSent?: () => void;
|
|
856
868
|
/** Slow-link watchdog hint from the engine proxy: a longer transport silence bound for this source's wire pieces. */
|
|
857
869
|
responseWatchdogMs?: number;
|
|
858
870
|
/** Never touch the overlay's legend errorMessage on this fetch. */
|
|
@@ -861,6 +873,9 @@ export interface WrunSourceFetchOptions {
|
|
|
861
873
|
interval?: string;
|
|
862
874
|
/** The caller joins the rows onto the chart itself: the asked window stands and the control's own rows return. */
|
|
863
875
|
nativeRows?: boolean;
|
|
876
|
+
/** The asked window's end is exclusive and already closes its last bar (a row lane's host-grid ask): no inclusive
|
|
877
|
+
* bar is padded past it. */
|
|
878
|
+
endExclusive?: boolean;
|
|
864
879
|
/** Called once with the acquisition's wire verdict when the rows this call answers were acquired. */
|
|
865
880
|
onSourceVerdict?: (verdict: WrunSourceFetchVerdict) => void;
|
|
866
881
|
}
|
|
@@ -1015,6 +1030,10 @@ export interface WrunWarmupEvidence {
|
|
|
1015
1030
|
replayCapBars?: number;
|
|
1016
1031
|
/** The bar the result's declared warm-up ends at, null or absent when it declares none. */
|
|
1017
1032
|
declaredWarmupEndTs?: number | null;
|
|
1033
|
+
/** Where the rows of the result's history sources begin at the clock (sources/wrun-row-lanes.util
|
|
1034
|
+
* `wrunRunSourceReachFromMs`), null or absent when unknown or when a source reads without a reach: a first value
|
|
1035
|
+
* that history explains buys no page ('source-reach'). */
|
|
1036
|
+
sourceReachFromTs?: number | null;
|
|
1018
1037
|
}
|
|
1019
1038
|
/** A warm-up backfill ask after a run (web: `LocalKScriptWarmupBackfillAsk`; the engine is the chart handle). */
|
|
1020
1039
|
export interface WrunWarmupBackfillAsk {
|
|
@@ -1044,7 +1063,7 @@ export interface WrunWarmupBackfillAsk {
|
|
|
1044
1063
|
* `LocalKScriptWarmupBackfillOutcome`; the reasons of local-kscript-warmup-depth.util.ts and the decider's own). */
|
|
1045
1064
|
export interface WrunWarmupBackfillOutcome {
|
|
1046
1065
|
requested: boolean;
|
|
1047
|
-
reason: 'warmup-visible' | 'no-values-yet' | 'declared-depth' | 'no-rows' | 'no-viewport' | 'warmup-offscreen' | 'gap-too-small' | 'rounds-exhausted' | 'left-exhausted' | 'gesture-active' | 'sources-pending' | 'zero-lookback-empty' | 'no-dense-output' | 'no-progress' | 'page-pending';
|
|
1066
|
+
reason: 'warmup-visible' | 'no-values-yet' | 'declared-depth' | 'no-rows' | 'no-viewport' | 'warmup-offscreen' | 'gap-too-small' | 'rounds-exhausted' | 'left-exhausted' | 'gesture-active' | 'sources-pending' | 'zero-lookback-empty' | 'source-reach' | 'no-dense-output' | 'no-progress' | 'page-pending';
|
|
1048
1067
|
roundsUsed: number;
|
|
1049
1068
|
range?: {
|
|
1050
1069
|
startTs: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -73,6 +73,7 @@ export * from './utility/chart/cme-session-bucket.util.js';
|
|
|
73
73
|
export * from './utility/chart/cme-trade-calendar.util.js';
|
|
74
74
|
export * from './utility/chart/color-customization.leaf.js';
|
|
75
75
|
export * from './utility/chart/continuous-contracts.util.js';
|
|
76
|
+
export * from './utility/chart/crypto-index.leaf.js';
|
|
76
77
|
export * from './utility/chart/date-labelled-interval.leaf.js';
|
|
77
78
|
export * from './utility/chart/feed-interval.util.js';
|
|
78
79
|
export * from './utility/chart/fetch-dedupe-policy.util.js';
|
|
@@ -115,6 +116,7 @@ export * from './utility/chart/kscript-run-result-equality.util.js';
|
|
|
115
116
|
export * from './utility/chart/kscript-run-result-normalize.util.js';
|
|
116
117
|
export * from './utility/chart/kscript-run-result-shape.util.js';
|
|
117
118
|
export * from './utility/chart/kscript-settings-revision.leaf.js';
|
|
119
|
+
export * from './utility/chart/kscript-source-answer-budget.leaf.js';
|
|
118
120
|
export * from './utility/chart/kscript-source-degrade.leaf.js';
|
|
119
121
|
export * from './utility/chart/kscript-source-retention.util.js';
|
|
120
122
|
export * from './utility/chart/kscript-standin-identity.leaf.js';
|
|
@@ -136,6 +138,7 @@ export * from './utility/chart/local-technical-script-range.leaf.js';
|
|
|
136
138
|
export * from './utility/chart/market-session-schedule.util.js';
|
|
137
139
|
export * from './utility/chart/marketKind.util.js';
|
|
138
140
|
export * from './utility/chart/mixed-mode.util.js';
|
|
141
|
+
export * from './utility/chart/ny-calendar.util.js';
|
|
139
142
|
export * from './utility/chart/ohlcv-row-readiness.util.js';
|
|
140
143
|
export * from './utility/chart/om-panel-push-style.util.js';
|
|
141
144
|
export * from './utility/chart/om-panel.util.js';
|
|
@@ -199,6 +202,12 @@ export * from './utility/watchlist/import/import-request.leaf.js';
|
|
|
199
202
|
export * from './utility/watchlist/import/tradingview-symbols.leaf.js';
|
|
200
203
|
export * from './utility/wrun-alert-params.leaf.js';
|
|
201
204
|
export * from './utility/wrun-display-name.util.js';
|
|
205
|
+
export * from './utility/wrun/run-schedule/wrun-chart-gate-reader.util.js';
|
|
206
|
+
export * from './utility/wrun/run-schedule/wrun-gate-reader-warm.util.js';
|
|
207
|
+
export * from './utility/wrun/run-schedule/wrun-lane-groups.util.js';
|
|
208
|
+
export * from './utility/wrun/run-schedule/wrun-late-reads.util.js';
|
|
209
|
+
export * from './utility/wrun/run-schedule/wrun-own-candles.util.js';
|
|
210
|
+
export * from './utility/wrun/run-schedule/wrun-prefix-feeds.util.js';
|
|
202
211
|
export * from './utility/wrun/sources/host-grid-landing.js';
|
|
203
212
|
export * from './utility/wrun/sources/lanes/bitfinex_funding.js';
|
|
204
213
|
export * from './utility/wrun/sources/lanes/economic.js';
|
|
@@ -266,6 +275,7 @@ export * from './utility/wrun/wrun-inert-legend.util.js';
|
|
|
266
275
|
export * from './utility/wrun/wrun-input-requirements.leaf.js';
|
|
267
276
|
export * from './utility/wrun/wrun-integration-budget.util.js';
|
|
268
277
|
export * from './utility/wrun/wrun-integration-route.util.js';
|
|
278
|
+
export * from './utility/wrun/wrun-kit-run-tables.util.js';
|
|
269
279
|
export * from './utility/wrun/wrun-lane-refusal.leaf.js';
|
|
270
280
|
export * from './utility/wrun/wrun-lane-warmup.util.js';
|
|
271
281
|
export * from './utility/wrun/wrun-latest-history.leaf.js';
|
|
@@ -290,11 +300,11 @@ export * from './utility/wrun/wrun-oi-lane.util.js';
|
|
|
290
300
|
export * from './utility/wrun/wrun-opra-flow.leaf.js';
|
|
291
301
|
export * from './utility/wrun/wrun-opra-lane.util.js';
|
|
292
302
|
export * from './utility/wrun/wrun-opra-stats.leaf.js';
|
|
293
|
-
export * from './utility/wrun/wrun-opra-underlying.util.js';
|
|
294
303
|
export * from './utility/wrun/wrun-option-contract-flow.util.js';
|
|
295
304
|
export * from './utility/wrun/wrun-option-knobs.util.js';
|
|
296
305
|
export * from './utility/wrun/wrun-option-prints.util.js';
|
|
297
306
|
export * from './utility/wrun/wrun-option-summary-lane.util.js';
|
|
307
|
+
export * from './utility/wrun/wrun-option-views.util.js';
|
|
298
308
|
export * from './utility/wrun/wrun-options-stop.util.js';
|
|
299
309
|
export * from './utility/wrun/wrun-output-style.util.js';
|
|
300
310
|
export * from './utility/wrun/wrun-overlay-drivers.util.js';
|
|
@@ -339,6 +349,7 @@ export * from './utility/wrun/wrun-script-inputs.util.js';
|
|
|
339
349
|
export * from './utility/wrun/wrun-series-stream.util.js';
|
|
340
350
|
export * from './utility/wrun/wrun-setting-words.lazy.js';
|
|
341
351
|
export * from './utility/wrun/wrun-setting-words.util.js';
|
|
352
|
+
export * from './utility/wrun/wrun-sha256.leaf.js';
|
|
342
353
|
export * from './utility/wrun/wrun-sheet-remembered.util.js';
|
|
343
354
|
export * from './utility/wrun/wrun-signal-sound-reasons.leaf.js';
|
|
344
355
|
export * from './utility/wrun/wrun-socket-row-source.js';
|
package/dist/index.js
CHANGED
|
@@ -76,6 +76,7 @@ export * from './utility/chart/cme-session-bucket.util.js';
|
|
|
76
76
|
export * from './utility/chart/cme-trade-calendar.util.js';
|
|
77
77
|
export * from './utility/chart/color-customization.leaf.js';
|
|
78
78
|
export * from './utility/chart/continuous-contracts.util.js';
|
|
79
|
+
export * from './utility/chart/crypto-index.leaf.js';
|
|
79
80
|
export * from './utility/chart/date-labelled-interval.leaf.js';
|
|
80
81
|
export * from './utility/chart/feed-interval.util.js';
|
|
81
82
|
export * from './utility/chart/fetch-dedupe-policy.util.js';
|
|
@@ -118,6 +119,7 @@ export * from './utility/chart/kscript-run-result-equality.util.js';
|
|
|
118
119
|
export * from './utility/chart/kscript-run-result-normalize.util.js';
|
|
119
120
|
export * from './utility/chart/kscript-run-result-shape.util.js';
|
|
120
121
|
export * from './utility/chart/kscript-settings-revision.leaf.js';
|
|
122
|
+
export * from './utility/chart/kscript-source-answer-budget.leaf.js';
|
|
121
123
|
export * from './utility/chart/kscript-source-degrade.leaf.js';
|
|
122
124
|
export * from './utility/chart/kscript-source-retention.util.js';
|
|
123
125
|
export * from './utility/chart/kscript-standin-identity.leaf.js';
|
|
@@ -139,6 +141,7 @@ export * from './utility/chart/local-technical-script-range.leaf.js';
|
|
|
139
141
|
export * from './utility/chart/market-session-schedule.util.js';
|
|
140
142
|
export * from './utility/chart/marketKind.util.js';
|
|
141
143
|
export * from './utility/chart/mixed-mode.util.js';
|
|
144
|
+
export * from './utility/chart/ny-calendar.util.js';
|
|
142
145
|
export * from './utility/chart/ohlcv-row-readiness.util.js';
|
|
143
146
|
export * from './utility/chart/om-panel-push-style.util.js';
|
|
144
147
|
export * from './utility/chart/om-panel.util.js';
|
|
@@ -202,6 +205,12 @@ export * from './utility/watchlist/import/import-request.leaf.js';
|
|
|
202
205
|
export * from './utility/watchlist/import/tradingview-symbols.leaf.js';
|
|
203
206
|
export * from './utility/wrun-alert-params.leaf.js';
|
|
204
207
|
export * from './utility/wrun-display-name.util.js';
|
|
208
|
+
export * from './utility/wrun/run-schedule/wrun-chart-gate-reader.util.js';
|
|
209
|
+
export * from './utility/wrun/run-schedule/wrun-gate-reader-warm.util.js';
|
|
210
|
+
export * from './utility/wrun/run-schedule/wrun-lane-groups.util.js';
|
|
211
|
+
export * from './utility/wrun/run-schedule/wrun-late-reads.util.js';
|
|
212
|
+
export * from './utility/wrun/run-schedule/wrun-own-candles.util.js';
|
|
213
|
+
export * from './utility/wrun/run-schedule/wrun-prefix-feeds.util.js';
|
|
205
214
|
export * from './utility/wrun/sources/host-grid-landing.js';
|
|
206
215
|
export * from './utility/wrun/sources/lanes/bitfinex_funding.js';
|
|
207
216
|
export * from './utility/wrun/sources/lanes/economic.js';
|
|
@@ -269,6 +278,7 @@ export * from './utility/wrun/wrun-inert-legend.util.js';
|
|
|
269
278
|
export * from './utility/wrun/wrun-input-requirements.leaf.js';
|
|
270
279
|
export * from './utility/wrun/wrun-integration-budget.util.js';
|
|
271
280
|
export * from './utility/wrun/wrun-integration-route.util.js';
|
|
281
|
+
export * from './utility/wrun/wrun-kit-run-tables.util.js';
|
|
272
282
|
export * from './utility/wrun/wrun-lane-refusal.leaf.js';
|
|
273
283
|
export * from './utility/wrun/wrun-lane-warmup.util.js';
|
|
274
284
|
export * from './utility/wrun/wrun-latest-history.leaf.js';
|
|
@@ -293,11 +303,11 @@ export * from './utility/wrun/wrun-oi-lane.util.js';
|
|
|
293
303
|
export * from './utility/wrun/wrun-opra-flow.leaf.js';
|
|
294
304
|
export * from './utility/wrun/wrun-opra-lane.util.js';
|
|
295
305
|
export * from './utility/wrun/wrun-opra-stats.leaf.js';
|
|
296
|
-
export * from './utility/wrun/wrun-opra-underlying.util.js';
|
|
297
306
|
export * from './utility/wrun/wrun-option-contract-flow.util.js';
|
|
298
307
|
export * from './utility/wrun/wrun-option-knobs.util.js';
|
|
299
308
|
export * from './utility/wrun/wrun-option-prints.util.js';
|
|
300
309
|
export * from './utility/wrun/wrun-option-summary-lane.util.js';
|
|
310
|
+
export * from './utility/wrun/wrun-option-views.util.js';
|
|
301
311
|
export * from './utility/wrun/wrun-options-stop.util.js';
|
|
302
312
|
export * from './utility/wrun/wrun-output-style.util.js';
|
|
303
313
|
export * from './utility/wrun/wrun-overlay-drivers.util.js';
|
|
@@ -342,6 +352,7 @@ export * from './utility/wrun/wrun-script-inputs.util.js';
|
|
|
342
352
|
export * from './utility/wrun/wrun-series-stream.util.js';
|
|
343
353
|
export * from './utility/wrun/wrun-setting-words.lazy.js';
|
|
344
354
|
export * from './utility/wrun/wrun-setting-words.util.js';
|
|
355
|
+
export * from './utility/wrun/wrun-sha256.leaf.js';
|
|
345
356
|
export * from './utility/wrun/wrun-sheet-remembered.util.js';
|
|
346
357
|
export * from './utility/wrun/wrun-signal-sound-reasons.leaf.js';
|
|
347
358
|
export * from './utility/wrun/wrun-socket-row-source.js';
|
|
@@ -2,6 +2,7 @@ import dayjs from 'dayjs';
|
|
|
2
2
|
import isoWeek from 'dayjs/plugin/isoWeek.js';
|
|
3
3
|
import timezone from 'dayjs/plugin/timezone.js';
|
|
4
4
|
import utc from 'dayjs/plugin/utc.js';
|
|
5
|
+
import { zoneWallMsAt } from '../../utility/chart/ny-calendar.util.js';
|
|
5
6
|
import { getTradingDayAnchor, getTradingDayTpoTimeRange } from '../../utility/chart/trading-day.util.js';
|
|
6
7
|
dayjs.extend(utc);
|
|
7
8
|
dayjs.extend(isoWeek);
|
|
@@ -122,14 +123,15 @@ const WALL_TIME_MEMO_CAP = 512;
|
|
|
122
123
|
const wallTimeUnixMemo = new Map();
|
|
123
124
|
/**
|
|
124
125
|
* The instant whose wall clock in `zone` reads `minutes` past midnight on
|
|
125
|
-
*
|
|
126
|
-
* `startOf('day').add(minutes, 'minute')` counts REAL
|
|
127
|
-
* by the offset delta on 23h/25h transition days. For
|
|
126
|
+
* the calendar date `dayKey` ('YYYY-MM-DD'). Parsing the wall string with
|
|
127
|
+
* dayjs.tz is DST-exact: `startOf('day').add(minutes, 'minute')` counts REAL
|
|
128
|
+
* minutes, which drifts by the offset delta on 23h/25h transition days. For
|
|
129
|
+
* UTC zones both agree.
|
|
128
130
|
*/
|
|
129
|
-
function wallTimeOnDay(
|
|
131
|
+
function wallTimeOnDay(dayKey, minutes, zone) {
|
|
130
132
|
const hours = String(Math.floor(minutes / 60)).padStart(2, '0');
|
|
131
133
|
const mins = String(minutes % 60).padStart(2, '0');
|
|
132
|
-
const wall = `${
|
|
134
|
+
const wall = `${dayKey} ${hours}:${mins}`;
|
|
133
135
|
try {
|
|
134
136
|
return dayjs.tz(wall, zone);
|
|
135
137
|
}
|
|
@@ -138,17 +140,40 @@ function wallTimeOnDay(day, minutes, zone) {
|
|
|
138
140
|
}
|
|
139
141
|
}
|
|
140
142
|
/** `wallTimeOnDay(...).unix()`, memoised per (day, minutes, zone): the same few wall times are asked every tick. */
|
|
141
|
-
function wallTimeUnixOnDay(
|
|
143
|
+
function wallTimeUnixOnDay(dayKey, minutes, zone) {
|
|
142
144
|
const key = `${dayKey}|${minutes}|${zone}`;
|
|
143
145
|
const hit = wallTimeUnixMemo.get(key);
|
|
144
146
|
if (hit !== undefined)
|
|
145
147
|
return hit;
|
|
146
|
-
const value = wallTimeOnDay(
|
|
148
|
+
const value = wallTimeOnDay(dayKey, minutes, zone).unix();
|
|
147
149
|
if (wallTimeUnixMemo.size >= WALL_TIME_MEMO_CAP)
|
|
148
150
|
wallTimeUnixMemo.clear();
|
|
149
151
|
wallTimeUnixMemo.set(key, value);
|
|
150
152
|
return value;
|
|
151
153
|
}
|
|
154
|
+
const DAY_MS = 86_400_000;
|
|
155
|
+
const pad = (value, width) => String(value).padStart(width, '0');
|
|
156
|
+
/**
|
|
157
|
+
* The 'YYYY-MM-DD' key of the `zone` calendar date after the one holding
|
|
158
|
+
* `timestamp` (unix seconds), as `unixInTimeZone(...).startOf('day').add(1, 'day')`
|
|
159
|
+
* formats it, from the zone clock (ny-calendar.util: one Intl reading per UTC
|
|
160
|
+
* day). An unknown zone reads UTC, as `unixInTimeZone` does; dayjs reads the
|
|
161
|
+
* instants the zone clock does not serve. The day cache is left alone: its
|
|
162
|
+
* last-day span is the one `resolveTpoTimeRangeWindow` answers from.
|
|
163
|
+
*/
|
|
164
|
+
function nextZoneDateKey(timestamp, zone) {
|
|
165
|
+
let wallMs;
|
|
166
|
+
try {
|
|
167
|
+
wallMs = zoneWallMsAt(zone, timestamp * 1000);
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
wallMs = timestamp * 1000;
|
|
171
|
+
}
|
|
172
|
+
if (Number.isNaN(wallMs))
|
|
173
|
+
return unixInTimeZone(timestamp, zone).startOf('day').add(1, 'day').format('YYYY-MM-DD');
|
|
174
|
+
const next = new Date(Math.floor(wallMs / DAY_MS) * DAY_MS + DAY_MS);
|
|
175
|
+
return `${pad(next.getUTCFullYear(), 4)}-${pad(next.getUTCMonth() + 1, 2)}-${pad(next.getUTCDate(), 2)}`;
|
|
176
|
+
}
|
|
152
177
|
export function resolveTpoTimeRangeWindow(timestamp, customTimeRange) {
|
|
153
178
|
if (!customTimeRange)
|
|
154
179
|
return undefined;
|
|
@@ -165,22 +190,20 @@ export function resolveTpoTimeRangeWindow(timestamp, customTimeRange) {
|
|
|
165
190
|
const nextDay = dayStart.add(1, 'day');
|
|
166
191
|
const previousKey = previousDay.format('YYYY-MM-DD');
|
|
167
192
|
const nextKey = nextDay.format('YYYY-MM-DD');
|
|
168
|
-
const startToday = wallTimeUnixOnDay(
|
|
169
|
-
const endToday = wallTimeUnixOnDay(
|
|
193
|
+
const startToday = wallTimeUnixOnDay(dayKey, startMinutes, zone);
|
|
194
|
+
const endToday = wallTimeUnixOnDay(dayKey, endMinutes, zone);
|
|
170
195
|
if (startMinutes === endMinutes) {
|
|
171
196
|
const crossesIntoToday = timestamp < startToday;
|
|
172
|
-
const start = crossesIntoToday ? wallTimeUnixOnDay(
|
|
173
|
-
const end = crossesIntoToday ? startToday : wallTimeUnixOnDay(
|
|
197
|
+
const start = crossesIntoToday ? wallTimeUnixOnDay(previousKey, startMinutes, zone) : startToday;
|
|
198
|
+
const end = crossesIntoToday ? startToday : wallTimeUnixOnDay(nextKey, startMinutes, zone);
|
|
174
199
|
return { startSec: start, endSec: end, fullSession: true };
|
|
175
200
|
}
|
|
176
201
|
if (startMinutes < endMinutes) {
|
|
177
202
|
return { startSec: startToday, endSec: endToday, fullSession: false };
|
|
178
203
|
}
|
|
179
204
|
const isPostMidnightContinuation = timestamp < endToday;
|
|
180
|
-
const start = isPostMidnightContinuation
|
|
181
|
-
|
|
182
|
-
: startToday;
|
|
183
|
-
const end = isPostMidnightContinuation ? endToday : wallTimeUnixOnDay(nextDay, nextKey, endMinutes, zone);
|
|
205
|
+
const start = isPostMidnightContinuation ? wallTimeUnixOnDay(previousKey, startMinutes, zone) : startToday;
|
|
206
|
+
const end = isPostMidnightContinuation ? endToday : wallTimeUnixOnDay(nextKey, endMinutes, zone);
|
|
184
207
|
return { startSec: start, endSec: end, fullSession: false };
|
|
185
208
|
}
|
|
186
209
|
export function containsTpoWindowTime(timestamp, window) {
|
|
@@ -207,11 +230,12 @@ export function getNextTpoSessionStart(timestamp, sessionType, customTimeRange)
|
|
|
207
230
|
if (sessionType === 'Daily' && timeWindow) {
|
|
208
231
|
// The next session opens at the window's start wall time on the next
|
|
209
232
|
// wall day, computed wall-exactly: a flat +24h drifts by an hour across
|
|
210
|
-
// DST transitions (23h/25h days).
|
|
233
|
+
// DST transitions (23h/25h days). The date from the zone clock and the
|
|
234
|
+
// instant from the window's own wall-time memo: the TPO folds ask once
|
|
235
|
+
// per period, where three dayjs conversions ran each time.
|
|
211
236
|
const zone = timezoneName(customTimeRange?.timezone);
|
|
212
237
|
const startMinutes = parseTpoTimeToMinutes(customTimeRange?.start_time) ?? 0;
|
|
213
|
-
|
|
214
|
-
return wallTimeOnDay(startDay.add(1, 'day'), startMinutes, zone).unix();
|
|
238
|
+
return wallTimeUnixOnDay(nextZoneDateKey(timeWindow.startSec, zone), startMinutes, zone);
|
|
215
239
|
}
|
|
216
240
|
const date = dayjs.unix(timestamp).utc();
|
|
217
241
|
const offset = getTpoCrossDayOffset(customTimeRange);
|