@invinite-org/chartlang-runtime 1.1.1 → 1.2.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/CHANGELOG.md +236 -0
- package/dist/barPoint.d.ts +20 -0
- package/dist/barPoint.d.ts.map +1 -0
- package/dist/barPoint.js +72 -0
- package/dist/barPoint.js.map +1 -0
- package/dist/bufferSnapshot.d.ts +102 -0
- package/dist/bufferSnapshot.d.ts.map +1 -0
- package/dist/bufferSnapshot.js +119 -0
- package/dist/bufferSnapshot.js.map +1 -0
- package/dist/createScriptRunner.d.ts +6 -3
- package/dist/createScriptRunner.d.ts.map +1 -1
- package/dist/createScriptRunner.js +29 -5
- package/dist/createScriptRunner.js.map +1 -1
- package/dist/dep/DepRunner.d.ts.map +1 -1
- package/dist/dep/DepRunner.js +1 -0
- package/dist/dep/DepRunner.js.map +1 -1
- package/dist/emit/draw/boxes/fillBetween.d.ts +45 -0
- package/dist/emit/draw/boxes/fillBetween.d.ts.map +1 -0
- package/dist/emit/draw/boxes/fillBetween.js +36 -0
- package/dist/emit/draw/boxes/fillBetween.js.map +1 -0
- package/dist/emit/draw/handle.d.ts +9 -0
- package/dist/emit/draw/handle.d.ts.map +1 -1
- package/dist/emit/draw/handle.js +65 -10
- package/dist/emit/draw/handle.js.map +1 -1
- package/dist/emit/draw/namespace.d.ts +4 -3
- package/dist/emit/draw/namespace.d.ts.map +1 -1
- package/dist/emit/draw/namespace.js +6 -3
- package/dist/emit/draw/namespace.js.map +1 -1
- package/dist/emit/plot.d.ts +7 -0
- package/dist/emit/plot.d.ts.map +1 -1
- package/dist/emit/plot.js +13 -0
- package/dist/emit/plot.js.map +1 -1
- package/dist/execution/dispose.d.ts.map +1 -1
- package/dist/execution/dispose.js +16 -0
- package/dist/execution/dispose.js.map +1 -1
- package/dist/execution/runComputeStep.d.ts.map +1 -1
- package/dist/execution/runComputeStep.js +10 -1
- package/dist/execution/runComputeStep.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/persistentStateStore.runtime.d.ts.map +1 -1
- package/dist/persistentStateStore.runtime.js +21 -7
- package/dist/persistentStateStore.runtime.js.map +1 -1
- package/dist/request/index.d.ts +2 -1
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +2 -1
- package/dist/request/index.js.map +1 -1
- package/dist/request/requestNamespace.d.ts.map +1 -1
- package/dist/request/requestNamespace.js +16 -3
- package/dist/request/requestNamespace.js.map +1 -1
- package/dist/request/security.d.ts +20 -1
- package/dist/request/security.d.ts.map +1 -1
- package/dist/request/security.js +62 -23
- package/dist/request/security.js.map +1 -1
- package/dist/request/securityExprRunner.d.ts +133 -0
- package/dist/request/securityExprRunner.d.ts.map +1 -0
- package/dist/request/securityExprRunner.js +235 -0
- package/dist/request/securityExprRunner.js.map +1 -0
- package/dist/request/streamBars.d.ts +14 -1
- package/dist/request/streamBars.d.ts.map +1 -1
- package/dist/request/streamBars.js +39 -1
- package/dist/request/streamBars.js.map +1 -1
- package/dist/runtimeContext.d.ts +48 -0
- package/dist/runtimeContext.d.ts.map +1 -1
- package/dist/runtimeContext.js.map +1 -1
- package/dist/seriesView.d.ts +42 -17
- package/dist/seriesView.d.ts.map +1 -1
- package/dist/seriesView.js +65 -42
- package/dist/seriesView.js.map +1 -1
- package/dist/state/index.d.ts +2 -1
- package/dist/state/index.d.ts.map +1 -1
- package/dist/state/index.js +2 -1
- package/dist/state/index.js.map +1 -1
- package/dist/state/lifecycle.d.ts +40 -0
- package/dist/state/lifecycle.d.ts.map +1 -1
- package/dist/state/lifecycle.js +53 -0
- package/dist/state/lifecycle.js.map +1 -1
- package/dist/state/seriesPersistence.d.ts +48 -0
- package/dist/state/seriesPersistence.d.ts.map +1 -0
- package/dist/state/seriesPersistence.js +87 -0
- package/dist/state/seriesPersistence.js.map +1 -0
- package/dist/state/seriesSlot.d.ts +105 -0
- package/dist/state/seriesSlot.d.ts.map +1 -0
- package/dist/state/seriesSlot.js +123 -0
- package/dist/state/seriesSlot.js.map +1 -0
- package/dist/state/stateNamespace.d.ts.map +1 -1
- package/dist/state/stateNamespace.js +28 -0
- package/dist/state/stateNamespace.js.map +1 -1
- package/dist/streamState.d.ts +25 -19
- package/dist/streamState.d.ts.map +1 -1
- package/dist/streamState.js +40 -66
- package/dist/streamState.js.map +1 -1
- package/dist/ta/adx.d.ts +3 -2
- package/dist/ta/adx.d.ts.map +1 -1
- package/dist/ta/adx.js +3 -2
- package/dist/ta/adx.js.map +1 -1
- package/dist/ta/alma.d.ts +6 -4
- package/dist/ta/alma.d.ts.map +1 -1
- package/dist/ta/alma.js +19 -6
- package/dist/ta/alma.js.map +1 -1
- package/dist/ta/atr.d.ts +3 -2
- package/dist/ta/atr.d.ts.map +1 -1
- package/dist/ta/atr.js +3 -2
- package/dist/ta/atr.js.map +1 -1
- package/dist/ta/bb.d.ts +3 -2
- package/dist/ta/bb.d.ts.map +1 -1
- package/dist/ta/bb.js +3 -2
- package/dist/ta/bb.js.map +1 -1
- package/dist/ta/chaikinOsc.d.ts +3 -2
- package/dist/ta/chaikinOsc.d.ts.map +1 -1
- package/dist/ta/chaikinOsc.js +3 -2
- package/dist/ta/chaikinOsc.js.map +1 -1
- package/dist/ta/crossover.d.ts +3 -2
- package/dist/ta/crossover.d.ts.map +1 -1
- package/dist/ta/crossover.js +3 -2
- package/dist/ta/crossover.js.map +1 -1
- package/dist/ta/crossunder.d.ts +3 -2
- package/dist/ta/crossunder.d.ts.map +1 -1
- package/dist/ta/crossunder.js +3 -2
- package/dist/ta/crossunder.js.map +1 -1
- package/dist/ta/dmi.d.ts +4 -3
- package/dist/ta/dmi.d.ts.map +1 -1
- package/dist/ta/dmi.js +4 -3
- package/dist/ta/dmi.js.map +1 -1
- package/dist/ta/ema.d.ts +3 -2
- package/dist/ta/ema.d.ts.map +1 -1
- package/dist/ta/ema.js +3 -2
- package/dist/ta/ema.js.map +1 -1
- package/dist/ta/eom.d.ts +3 -1
- package/dist/ta/eom.d.ts.map +1 -1
- package/dist/ta/eom.js +3 -1
- package/dist/ta/eom.js.map +1 -1
- package/dist/ta/highestbars.d.ts +25 -0
- package/dist/ta/highestbars.d.ts.map +1 -0
- package/dist/ta/highestbars.js +106 -0
- package/dist/ta/highestbars.js.map +1 -0
- package/dist/ta/historicalVolatility.d.ts +3 -2
- package/dist/ta/historicalVolatility.d.ts.map +1 -1
- package/dist/ta/historicalVolatility.js +3 -2
- package/dist/ta/historicalVolatility.js.map +1 -1
- package/dist/ta/ichimoku.d.ts +3 -1
- package/dist/ta/ichimoku.d.ts.map +1 -1
- package/dist/ta/ichimoku.js +3 -1
- package/dist/ta/ichimoku.js.map +1 -1
- package/dist/ta/lowestbars.d.ts +25 -0
- package/dist/ta/lowestbars.d.ts.map +1 -0
- package/dist/ta/lowestbars.js +102 -0
- package/dist/ta/lowestbars.js.map +1 -0
- package/dist/ta/macd.d.ts +3 -2
- package/dist/ta/macd.d.ts.map +1 -1
- package/dist/ta/macd.js +3 -2
- package/dist/ta/macd.js.map +1 -1
- package/dist/ta/massIndex.d.ts +3 -2
- package/dist/ta/massIndex.d.ts.map +1 -1
- package/dist/ta/massIndex.js +3 -2
- package/dist/ta/massIndex.js.map +1 -1
- package/dist/ta/mfi.d.ts +3 -1
- package/dist/ta/mfi.d.ts.map +1 -1
- package/dist/ta/mfi.js +3 -1
- package/dist/ta/mfi.js.map +1 -1
- package/dist/ta/netVolume.d.ts +3 -1
- package/dist/ta/netVolume.d.ts.map +1 -1
- package/dist/ta/netVolume.js +3 -1
- package/dist/ta/netVolume.js.map +1 -1
- package/dist/ta/nvi.d.ts +3 -1
- package/dist/ta/nvi.d.ts.map +1 -1
- package/dist/ta/nvi.js +3 -1
- package/dist/ta/nvi.js.map +1 -1
- package/dist/ta/persistence.d.ts.map +1 -1
- package/dist/ta/persistence.js +1 -40
- package/dist/ta/persistence.js.map +1 -1
- package/dist/ta/ppo.d.ts +3 -2
- package/dist/ta/ppo.d.ts.map +1 -1
- package/dist/ta/ppo.js +3 -2
- package/dist/ta/ppo.js.map +1 -1
- package/dist/ta/pvi.d.ts +3 -1
- package/dist/ta/pvi.d.ts.map +1 -1
- package/dist/ta/pvi.js +3 -1
- package/dist/ta/pvi.js.map +1 -1
- package/dist/ta/pvo.d.ts +3 -1
- package/dist/ta/pvo.d.ts.map +1 -1
- package/dist/ta/pvo.js +3 -1
- package/dist/ta/pvo.js.map +1 -1
- package/dist/ta/pvt.d.ts +3 -1
- package/dist/ta/pvt.d.ts.map +1 -1
- package/dist/ta/pvt.js +3 -1
- package/dist/ta/pvt.js.map +1 -1
- package/dist/ta/registry.d.ts +7 -1
- package/dist/ta/registry.d.ts.map +1 -1
- package/dist/ta/registry.js +4 -0
- package/dist/ta/registry.js.map +1 -1
- package/dist/ta/rsi.d.ts +3 -2
- package/dist/ta/rsi.d.ts.map +1 -1
- package/dist/ta/rsi.js +3 -2
- package/dist/ta/rsi.js.map +1 -1
- package/dist/ta/rvi.d.ts +3 -2
- package/dist/ta/rvi.d.ts.map +1 -1
- package/dist/ta/rvi.js +3 -2
- package/dist/ta/rvi.js.map +1 -1
- package/dist/ta/sma.d.ts +6 -3
- package/dist/ta/sma.d.ts.map +1 -1
- package/dist/ta/sma.js +6 -3
- package/dist/ta/sma.js.map +1 -1
- package/dist/ta/stdev.d.ts +3 -2
- package/dist/ta/stdev.d.ts.map +1 -1
- package/dist/ta/stdev.js +3 -2
- package/dist/ta/stdev.js.map +1 -1
- package/dist/ta/trendStrengthIndex.d.ts +3 -2
- package/dist/ta/trendStrengthIndex.d.ts.map +1 -1
- package/dist/ta/trendStrengthIndex.js +3 -2
- package/dist/ta/trendStrengthIndex.js.map +1 -1
- package/dist/ta/trix.d.ts +4 -3
- package/dist/ta/trix.d.ts.map +1 -1
- package/dist/ta/trix.js +4 -3
- package/dist/ta/trix.js.map +1 -1
- package/dist/ta/vortex.d.ts +3 -2
- package/dist/ta/vortex.d.ts.map +1 -1
- package/dist/ta/vortex.js +3 -2
- package/dist/ta/vortex.js.map +1 -1
- package/package.json +3 -3
- package/dist/ta/lib/applyOffset.d.ts +0 -19
- package/dist/ta/lib/applyOffset.d.ts.map +0 -1
- package/dist/ta/lib/applyOffset.js +0 -38
- package/dist/ta/lib/applyOffset.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,241 @@
|
|
|
1
1
|
# @invinite-org/chartlang-runtime
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 850ae21: Add `bar.point(offset, price)` — index authoring sugar for anchoring drawings
|
|
8
|
+
by bar offset instead of an absolute timestamp.
|
|
9
|
+
|
|
10
|
+
`bar.point` resolves the offset to the existing time-based `WorldPoint`
|
|
11
|
+
(`{ time, price }`) at compute time, so it composes directly with every
|
|
12
|
+
`draw.*` anchor argument and introduces no new wire format or anchor union:
|
|
13
|
+
|
|
14
|
+
- `bar.point(0, price)` — the current bar.
|
|
15
|
+
- `bar.point(-n, price)` — `n` bars back, using the real historical timestamp
|
|
16
|
+
from the runtime's time ring buffer (`NaN` time past retained history; never
|
|
17
|
+
throws).
|
|
18
|
+
- `bar.point(n, price)` — a future bar, with the time extrapolated from the
|
|
19
|
+
median recent bar spacing (falling back to the parsed bar interval when
|
|
20
|
+
fewer than two bars are retained).
|
|
21
|
+
|
|
22
|
+
The compiler's max-lookback analysis now counts a negative integer-literal
|
|
23
|
+
`bar.point(-n, …)` offset toward `maxLookback` exactly like a `series[n]`
|
|
24
|
+
lookback, so the runtime sizes the time buffer deeply enough; positive (future)
|
|
25
|
+
offsets and dynamic offsets contribute no extra depth. The recogniser peels
|
|
26
|
+
parentheses, so the converter's emitted form `bar.point(-(n), …)` is sized
|
|
27
|
+
identically to a hand-written `bar.point(-n, …)` (without it, a converted
|
|
28
|
+
historical tracking line sized its buffer to 0 and resolved to a NaN anchor).
|
|
29
|
+
|
|
30
|
+
The Pine v6 converter now lowers `bar_index` drawing anchors to
|
|
31
|
+
`bar.point(<signed offset>, <price>)` and drops the dead `__BAR_INTERVAL_MS`
|
|
32
|
+
sentinel and its `bar.time ± (N * __BAR_INTERVAL_MS)` arithmetic — future
|
|
33
|
+
anchors resolve at runtime instead of needing a host-supplied bar interval.
|
|
34
|
+
|
|
35
|
+
- ca19e20: Bidirectional plot `offset` — negative offsets shift a plotted series left.
|
|
36
|
+
|
|
37
|
+
`offset` becomes a presentation-only **display shift** in bars with the
|
|
38
|
+
fixed sign convention `+n` = right (future), `−n` = left (past); the
|
|
39
|
+
numeric series value is unshifted. This replaces the old value-read model
|
|
40
|
+
(where a positive offset made `series.current` read the value N bars ago
|
|
41
|
+
and a negative offset resolved to `NaN`). The `*Opts` `offset` JSDoc (and
|
|
42
|
+
ALMA's `barShift`) now describe both directions and drop the old
|
|
43
|
+
"negative ⇒ NaN" wording (`AlmaOpts.offset`, the Gaussian-centre
|
|
44
|
+
position, is unchanged).
|
|
45
|
+
|
|
46
|
+
`PlotEmission` gains an optional presentation field `xShift?: number`
|
|
47
|
+
(signed integer bars; omitted/`0` ≡ no shift, so a no-shift emission is
|
|
48
|
+
byte-identical to today). `validateEmission` rejects a non-integer
|
|
49
|
+
`xShift`. The compiler no longer counts `offset` toward `maxLookback`
|
|
50
|
+
(the value is no longer read from a deeper slot). The runtime threads the
|
|
51
|
+
declared offset onto the emission as `xShift` (reading a
|
|
52
|
+
`WeakMap<Series, number>` offset tag set by `makeShiftedSeriesView`; ALMA
|
|
53
|
+
tags `opts.barShift`) and stops the old value-read shift so
|
|
54
|
+
`series.current` is unshifted; the reference adapter renders it by
|
|
55
|
+
projecting `xShift` onto the x-axis (extending the viewport for
|
|
56
|
+
future-shifted points).
|
|
57
|
+
|
|
58
|
+
The Pine converter now maps `plot(<ta.* call>, offset=N)` onto the
|
|
59
|
+
emitted `ta.*` call's `offset` opt (signed, both directions); a plot
|
|
60
|
+
whose value is not a direct `ta.*` call drops the offset and emits the
|
|
61
|
+
new `plot-offset-needs-ta-call` warning, and a plot-level offset
|
|
62
|
+
replacing the ta call's own `offset=` emits `plot-offset-overrides-ta-offset`.
|
|
63
|
+
|
|
64
|
+
The conformance harness's `plot-field` assertion gains an `xShift` field,
|
|
65
|
+
and a new scenario pins both shift directions plus the unshifted value
|
|
66
|
+
series.
|
|
67
|
+
|
|
68
|
+
- 6235ad7: Make the compute bar's OHLCV + derived fields directly indexable as a series.
|
|
69
|
+
|
|
70
|
+
`bar.close`, `bar.open`, `bar.high`, `bar.low`, `bar.volume`, and the derived
|
|
71
|
+
`bar.hl2` / `bar.hlc3` / `bar.ohlc4` / `bar.hlcc4` are now `PriceSeries` /
|
|
72
|
+
`VolumeSeries` (`number & Series<number>`) on the bar passed to `compute`
|
|
73
|
+
(`ComputeContext.bar`, typed as the new `BarSeries`). Each field is **both** a
|
|
74
|
+
scalar — `bar.close * 2`, `plot(bar.close)`, `ta.ema(bar.close, 20)` keep
|
|
75
|
+
working unchanged — **and** an indexable series, so a script can read prior
|
|
76
|
+
bars directly:
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
const sma5 =
|
|
80
|
+
(bar.close[0] + bar.close[1] + bar.close[2] + bar.close[3] + bar.close[4]) /
|
|
81
|
+
5;
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
This removes the `ta.ema(bar.close, 1)` identity-trick that scripts previously
|
|
85
|
+
needed to "republish" a scalar price as an indexable `Series`.
|
|
86
|
+
|
|
87
|
+
The adapter-supplied candle type `Bar` (and `request.lowerTf` intrabar bars) is
|
|
88
|
+
unchanged — it stays scalar OHLCV; only the streaming `compute` bar gains the
|
|
89
|
+
series shape. `request.security`'s higher-timeframe bar remains the separate
|
|
90
|
+
`SecurityBar`.
|
|
91
|
+
|
|
92
|
+
Migration note: because the field is now an object, `Number.isFinite(bar.close)`
|
|
93
|
+
is always `false` (it does not coerce) and `bar.close === 42` is `false` (object
|
|
94
|
+
vs number). Use `bar.close.current` or `+bar.close` in those raw-number
|
|
95
|
+
contexts. `bar.point(0, bar.close)` continues to work — the runtime coerces the
|
|
96
|
+
anchor price to a scalar.
|
|
97
|
+
|
|
98
|
+
- 3bf391a: Add the `draw.fillBetween(edgeA, edgeB, opts?)` drawing primitive — a
|
|
99
|
+
native filled ribbon between two edges (the closed polygon `edgeA`
|
|
100
|
+
forward then `edgeB` reversed). It is the chartlang equivalent of Pine's
|
|
101
|
+
`linefill.new(line1, line2, color)` / `fill(plot1, plot2)`. The
|
|
102
|
+
pine-converter now lowers static two-line `linefill.new` to it instead of
|
|
103
|
+
approximating with `draw.rotatedRectangle`, retiring the
|
|
104
|
+
`linefill-rotatedrect-approximated` diagnostic.
|
|
105
|
+
- 8086003: Add an optional presentation-only `z` (render-order / z-index) option to
|
|
106
|
+
`plot()` and every `draw.*` primitive. Default `0`; higher renders on
|
|
107
|
+
top, ties fall back to the existing group + declaration order. Finite
|
|
108
|
+
numbers only. Affects stacking only — values, alerts, and `state.*` are
|
|
109
|
+
unchanged.
|
|
110
|
+
|
|
111
|
+
Adapter kit: `PlotEmission` and `DrawingEmission` gain the matching
|
|
112
|
+
presentation-only `z?: number` wire field, validated by
|
|
113
|
+
`validateEmission` as a finite number (NaN / ±Infinity rejected;
|
|
114
|
+
fractional and negative allowed). Omitted/`0` stays byte-identical to a
|
|
115
|
+
pre-feature emission, so existing goldens and conformance hashes are
|
|
116
|
+
untouched.
|
|
117
|
+
|
|
118
|
+
Runtime: `plotImpl` reads `opts.z`, and the drawing-emit path
|
|
119
|
+
(`createDrawingHandle`) lifts `z` out of `state.style` — into a shallow
|
|
120
|
+
clone with `z` removed, where the per-kind `draw.*` impls fold the opts
|
|
121
|
+
bag — and threads it onto the top-level `PlotEmission.z` /
|
|
122
|
+
`DrawingEmission.z` with the same omit-when-`0` conditional spread used
|
|
123
|
+
for `xShift`. `z` is persisted **beside** the drawing slot's `state`
|
|
124
|
+
(never inside `DrawingState`), so an `update` retains the last value. A
|
|
125
|
+
no-`z` plot or drawing emits no `z` key — byte-identical to the
|
|
126
|
+
pre-feature baseline. `draw.table` / `draw.group` do not carry `z` in
|
|
127
|
+
v1.
|
|
128
|
+
|
|
129
|
+
Pine converter: `explicit_plot_zorder` is now a recognized no-op instead
|
|
130
|
+
of an unmapped warning. chartlang already layers marks by declaration
|
|
131
|
+
order within their group (the normative ordering contract), which is
|
|
132
|
+
exactly what Pine's `explicit_plot_zorder=true` makes authoritative — so
|
|
133
|
+
the flag is satisfied by default and needs no chartlang option.
|
|
134
|
+
`mapDeclarationArgs` no longer raises `indicator-arg-not-mapped` for it;
|
|
135
|
+
instead it emits a single `explicit-plot-zorder-default` info note
|
|
136
|
+
(covering both `explicit_plot_zorder=true` and the Pine-default
|
|
137
|
+
`=false`). The converter still never _emits_ a numeric `z` — Pine has no
|
|
138
|
+
per-element z source construct. Other unmapped `indicator(...)` args
|
|
139
|
+
(`timeframe`, etc.) keep warning.
|
|
140
|
+
|
|
141
|
+
Compiler: the ambient `@invinite-org/chartlang-core` `.d.ts` shim gains a
|
|
142
|
+
`ZOrdered { z?: number }` mixin intersected into `PlotOpts` and every
|
|
143
|
+
`draw.*` option type (mirroring core's `drawingStyle.ts`), so a compiled
|
|
144
|
+
script's `plot(value, { z })` **and** `draw.*(…, { z })` type-check (the
|
|
145
|
+
shim stays in lockstep with core).
|
|
146
|
+
|
|
147
|
+
Conformance: a new `z-order` scenario pins the plot `z` →
|
|
148
|
+
`PlotEmission.z` wire contract — a `plot(value, { z: -1 })` emits
|
|
149
|
+
`z: -1`, a no-`z` plot omits the field (omit-when-`0` byte-identity), and
|
|
150
|
+
a value-hash proves `z` never transforms the series. The `plot-field`
|
|
151
|
+
assertion's `field` union widens to also accept `"z"`.
|
|
152
|
+
|
|
153
|
+
- 073f41b: Add the higher-timeframe expression/callback overload to `request.security`.
|
|
154
|
+
Alongside the existing data form `request.security({ interval })` →
|
|
155
|
+
`SecurityBar`, scripts can now write `request.security({ interval }, (bar) =>
|
|
156
|
+
…)` → `Series<number>`, where the callback runs on the **higher-timeframe
|
|
157
|
+
clock** — `request.security({ interval: "1W" }, (bar) => ta.ema(bar.close, 20))`
|
|
158
|
+
is a true weekly EMA(20) (20 weekly bars), not 20 main bars of a weekly-stepped
|
|
159
|
+
series. The result is aligned no-lookahead down to the main timeline.
|
|
160
|
+
|
|
161
|
+
- **core** — the `SecurityExpr` callback type (re-exported from the package
|
|
162
|
+
root), the second `security` overload, and the shared `statefulPrimitives`
|
|
163
|
+
entry annotated as covering both arities.
|
|
164
|
+
- **compiler** — records one `SecurityExpressionDescriptor { slotId, interval,
|
|
165
|
+
paramName }` per expression callsite in `manifest.securityExpressions`
|
|
166
|
+
(sorted by `slotId`, omitted for the data-only form), and validates each
|
|
167
|
+
callback against the allowed subset — its `bar` parameter and body locals,
|
|
168
|
+
the ambient `ta` / `inputs`, safe `Math.*` globals, and literals — rejecting
|
|
169
|
+
any captured outer binding with the new
|
|
170
|
+
`request-security-expr-captures-local` diagnostic.
|
|
171
|
+
- **runtime** — mounts one `SecurityExprRunner` per manifest entry: the
|
|
172
|
+
callback is captured lazily on the first main compute, driven once per HTF bar
|
|
173
|
+
close through a dedicated fold `StreamState` so `ta.*` accumulate on the HTF
|
|
174
|
+
clock, and one sampled value per HTF bar feeds a per-slot output buffer that
|
|
175
|
+
`request.security(opts, expr)` returns aligned no-lookahead to the main
|
|
176
|
+
timeline. Capability / interval / stream fallbacks return an all-NaN series
|
|
177
|
+
with a deduped diagnostic.
|
|
178
|
+
- **host-worker / host-quickjs** — boot the expression form unchanged; the
|
|
179
|
+
`__manifest` sidecar already carries `securityExpressions`.
|
|
180
|
+
- **pine-converter** — Pine's `request.security(sym, "D", ta.ema(close, 9))`
|
|
181
|
+
now lowers to the chartlang callback form
|
|
182
|
+
`request.security({ interval: "1d" }, (bar) => ta.ema(bar.close, 9))` (a bare
|
|
183
|
+
OHLCV third arg keeps lowering to the data form).
|
|
184
|
+
- **conformance** — new scenarios prove the weekly expression value differs
|
|
185
|
+
from a same-length main-timeframe EMA, plus the `multiTimeframe: false` NaN
|
|
186
|
+
fallback.
|
|
187
|
+
|
|
188
|
+
- 5a9c24d: Add `state.series(init)` — a writable, indexable user series. Store an
|
|
189
|
+
arbitrary value each bar (`s.value = expr`) and read its history N bars
|
|
190
|
+
back (`s[1]`). Number-coercible (`+s`, `s.current`) and usable as a `ta.*`
|
|
191
|
+
source. The Pine converter lowers a history-indexed `var` to it.
|
|
192
|
+
- 08c536c: Add the `ta.highestbars` / `ta.lowestbars` primitives plus the cross-package
|
|
193
|
+
wiring that makes them usable as drawing anchors and Pine-converter targets.
|
|
194
|
+
|
|
195
|
+
- **core / runtime:** `ta.highestbars(source, length, opts?)` and
|
|
196
|
+
`ta.lowestbars(source, length, opts?)` return the bar OFFSET (≤ 0) to the
|
|
197
|
+
highest / lowest `source` value over the trailing `length` bars (window
|
|
198
|
+
INCLUDES the current bar). `0` → current bar is the extreme; `-k` → the
|
|
199
|
+
extreme occurred `k` bars ago. Ties resolve to the most recent bar; NaN
|
|
200
|
+
inputs are skipped; warmup is `length − 1` bars; tick-mode replays the
|
|
201
|
+
in-progress head as the offset-0 candidate. Registered in
|
|
202
|
+
`STATEFUL_PRIMITIVES` (now 174 entries) and `TA_REGISTRY` (now 96 entries).
|
|
203
|
+
- **compiler:** a literal-length `ta.highestbars` / `ta.lowestbars` call
|
|
204
|
+
contributes `length − 1` toward `maxLookback`, so the runtime sizes the time
|
|
205
|
+
ring buffer deep enough for a `bar.point(<that offset>, …)` anchor to resolve.
|
|
206
|
+
A non-literal length contributes 0.
|
|
207
|
+
- **pine-converter:** `ta.highestbars` / `ta.lowestbars` now map to the real
|
|
208
|
+
chartlang primitives (previously lossy passthroughs to `ta.highest` /
|
|
209
|
+
`ta.lowest`). **Behavior change:** a DYNAMIC `bar_index + <non-literal>`
|
|
210
|
+
drawing-x anchor no longer raises the hard `requires-bar-interval` error —
|
|
211
|
+
the offset is resolved by `bar.point` at runtime sign-agnostically (a
|
|
212
|
+
negative runtime offset, e.g. what `ta.highestbars` returns, resolves to the
|
|
213
|
+
historical timestamp via the time buffer). Only the literal `bar_index + N`
|
|
214
|
+
future case still requires a bar interval.
|
|
215
|
+
- **conformance:** new `TA_HIGHEST_LOWEST_BARS_SCENARIO` export pins both
|
|
216
|
+
primitives end-to-end through the compiler + runtime over the bundled
|
|
217
|
+
`goldenBars.json` fixture, and is added to `ALL_SCENARIOS`.
|
|
218
|
+
|
|
219
|
+
### Patch Changes
|
|
220
|
+
|
|
221
|
+
- 850ae21: Promote every remaining `@experimental` symbol to `@stable`. The entire
|
|
222
|
+
`pine-converter` public surface, the three `pineConverterRoundTrip*` conformance
|
|
223
|
+
scenarios, and `runtime/barPoint.ts` now carry the stable maturity marker.
|
|
224
|
+
Annotation-only — no behavior, API, or output changes; goldens and conformance
|
|
225
|
+
reports are byte-identical. The hand-authored `docs/converter/index.md`
|
|
226
|
+
stability line is updated to match.
|
|
227
|
+
- Updated dependencies [850ae21]
|
|
228
|
+
- Updated dependencies [ca19e20]
|
|
229
|
+
- Updated dependencies [6235ad7]
|
|
230
|
+
- Updated dependencies [3bf391a]
|
|
231
|
+
- Updated dependencies [8086003]
|
|
232
|
+
- Updated dependencies [850ae21]
|
|
233
|
+
- Updated dependencies [073f41b]
|
|
234
|
+
- Updated dependencies [5a9c24d]
|
|
235
|
+
- Updated dependencies [08c536c]
|
|
236
|
+
- @invinite-org/chartlang-core@1.2.0
|
|
237
|
+
- @invinite-org/chartlang-adapter-kit@1.3.0
|
|
238
|
+
|
|
3
239
|
## 1.1.1
|
|
4
240
|
|
|
5
241
|
### Patch Changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Price, WorldPoint } from "@invinite-org/chartlang-core";
|
|
2
|
+
import type { Float64RingBuffer } from "./ringBuffer.js";
|
|
3
|
+
/**
|
|
4
|
+
* Resolve a `bar.point(offset, price)` call to the time-based
|
|
5
|
+
* {@link WorldPoint} the rest of the drawing pipeline already speaks.
|
|
6
|
+
*
|
|
7
|
+
* `offset === 0` reads the live `bar.time`; `offset < 0` reads the real
|
|
8
|
+
* historical timestamp `|offset|` bars back from the time ring buffer
|
|
9
|
+
* (`NaN` past retention); `offset > 0` extrapolates `lastTime + offset *
|
|
10
|
+
* spacing`, where `spacing` is the median retained-bar delta and falls back
|
|
11
|
+
* to the parsed bar interval when fewer than two bars are retained. `price`
|
|
12
|
+
* passes through unchanged. Never throws.
|
|
13
|
+
*
|
|
14
|
+
* @since 0.9
|
|
15
|
+
* @stable
|
|
16
|
+
* @example
|
|
17
|
+
* // const wp = resolveBarPoint(stream.ohlcv.time, "1D", currentTime, -10, 42);
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveBarPoint(time: Float64RingBuffer, interval: string, currentTime: number, offset: number, price: Price): WorldPoint;
|
|
20
|
+
//# sourceMappingURL=barPoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barPoint.d.ts","sourceRoot":"","sources":["../src/barPoint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAoCzD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAC3B,IAAI,EAAE,iBAAiB,EACvB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,GACb,UAAU,CAaZ"}
|
package/dist/barPoint.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Copyright (c) 2026 Invinite. Licensed under the MIT License.
|
|
2
|
+
// See the LICENSE file in the repo root for full license text.
|
|
3
|
+
import { intervalToSeconds } from "@invinite-org/chartlang-core";
|
|
4
|
+
/**
|
|
5
|
+
* Parse a bar-interval string to its spacing in milliseconds, or `NaN` when
|
|
6
|
+
* the string is not a parseable interval. `intervalToSeconds` throws on an
|
|
7
|
+
* unparseable descriptor; this wrapper swallows that so `bar.point` stays a
|
|
8
|
+
* non-throwing, graceful-degradation helper.
|
|
9
|
+
*/
|
|
10
|
+
function intervalSpacingMs(interval) {
|
|
11
|
+
try {
|
|
12
|
+
return intervalToSeconds({ value: interval, label: interval, group: "" }) * 1000;
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return Number.NaN;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The median delta between the most recent retained bar times, used to
|
|
20
|
+
* extrapolate future-bar timestamps. Walks the newest `min(length - 1, cap)`
|
|
21
|
+
* deltas (cap keeps the scan O(1) on long histories) and returns the median;
|
|
22
|
+
* `NaN` when fewer than two bars are retained or every delta is non-finite.
|
|
23
|
+
*/
|
|
24
|
+
function medianSpacingMs(time) {
|
|
25
|
+
const pairs = Math.min(time.length - 1, 100);
|
|
26
|
+
if (pairs < 1)
|
|
27
|
+
return Number.NaN;
|
|
28
|
+
const deltas = [];
|
|
29
|
+
for (let i = 0; i < pairs; i += 1) {
|
|
30
|
+
const delta = time.at(i) - time.at(i + 1);
|
|
31
|
+
if (Number.isFinite(delta))
|
|
32
|
+
deltas.push(delta);
|
|
33
|
+
}
|
|
34
|
+
if (deltas.length === 0)
|
|
35
|
+
return Number.NaN;
|
|
36
|
+
deltas.sort((a, b) => a - b);
|
|
37
|
+
const mid = deltas.length >> 1;
|
|
38
|
+
return deltas.length % 2 === 1 ? deltas[mid] : (deltas[mid - 1] + deltas[mid]) / 2;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Resolve a `bar.point(offset, price)` call to the time-based
|
|
42
|
+
* {@link WorldPoint} the rest of the drawing pipeline already speaks.
|
|
43
|
+
*
|
|
44
|
+
* `offset === 0` reads the live `bar.time`; `offset < 0` reads the real
|
|
45
|
+
* historical timestamp `|offset|` bars back from the time ring buffer
|
|
46
|
+
* (`NaN` past retention); `offset > 0` extrapolates `lastTime + offset *
|
|
47
|
+
* spacing`, where `spacing` is the median retained-bar delta and falls back
|
|
48
|
+
* to the parsed bar interval when fewer than two bars are retained. `price`
|
|
49
|
+
* passes through unchanged. Never throws.
|
|
50
|
+
*
|
|
51
|
+
* @since 0.9
|
|
52
|
+
* @stable
|
|
53
|
+
* @example
|
|
54
|
+
* // const wp = resolveBarPoint(stream.ohlcv.time, "1D", currentTime, -10, 42);
|
|
55
|
+
*/
|
|
56
|
+
export function resolveBarPoint(time, interval, currentTime, offset, price) {
|
|
57
|
+
// `price` is a `Price` (number) by contract, but a script may pass a bar
|
|
58
|
+
// price field (`bar.point(0, bar.close)`) which is now a number-coercible
|
|
59
|
+
// series view. Coerce to the scalar so the persisted `WorldPoint.price`
|
|
60
|
+
// is always a number, never the view object. `Number(NaN)` stays NaN.
|
|
61
|
+
const p = Number(price);
|
|
62
|
+
if (offset === 0)
|
|
63
|
+
return { time: currentTime, price: p };
|
|
64
|
+
if (offset < 0)
|
|
65
|
+
return { time: time.at(-offset), price: p };
|
|
66
|
+
const spacing = (() => {
|
|
67
|
+
const median = medianSpacingMs(time);
|
|
68
|
+
return Number.isFinite(median) ? median : intervalSpacingMs(interval);
|
|
69
|
+
})();
|
|
70
|
+
return { time: currentTime + offset * spacing, price: p };
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=barPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barPoint.js","sourceRoot":"","sources":["../src/barPoint.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAG/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAIjE;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACvC,IAAI,CAAC;QACD,OAAO,iBAAiB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC;IACrF,CAAC;IAAC,MA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Z,yEAAyE;IACzE,0EAA0E;IAC1E,wEAAwE;IACxE,sEAAsE;IACtE,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,IAAI,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACzD,IAAI,MAAM,GAAG,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC5D,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE;QAClB,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC1E,CAAC,CAAC,EAAE,CAAC;IACL,OAAO,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { Price, WorldPoint } from \"@invinite-org/chartlang-core\";\nimport { intervalToSeconds } from \"@invinite-org/chartlang-core\";\n\nimport type { Float64RingBuffer } from \"./ringBuffer.js\";\n\n/**\n * Parse a bar-interval string to its spacing in milliseconds, or `NaN` when\n * the string is not a parseable interval. `intervalToSeconds` throws on an\n * unparseable descriptor; this wrapper swallows that so `bar.point` stays a\n * non-throwing, graceful-degradation helper.\n */\nfunction intervalSpacingMs(interval: string): number {\n try {\n return intervalToSeconds({ value: interval, label: interval, group: \"\" }) * 1000;\n } catch {\n return Number.NaN;\n }\n}\n\n/**\n * The median delta between the most recent retained bar times, used to\n * extrapolate future-bar timestamps. Walks the newest `min(length - 1, cap)`\n * deltas (cap keeps the scan O(1) on long histories) and returns the median;\n * `NaN` when fewer than two bars are retained or every delta is non-finite.\n */\nfunction medianSpacingMs(time: Float64RingBuffer): number {\n const pairs = Math.min(time.length - 1, 100);\n if (pairs < 1) return Number.NaN;\n const deltas: number[] = [];\n for (let i = 0; i < pairs; i += 1) {\n const delta = time.at(i) - time.at(i + 1);\n if (Number.isFinite(delta)) deltas.push(delta);\n }\n if (deltas.length === 0) return Number.NaN;\n deltas.sort((a, b) => a - b);\n const mid = deltas.length >> 1;\n return deltas.length % 2 === 1 ? deltas[mid] : (deltas[mid - 1] + deltas[mid]) / 2;\n}\n\n/**\n * Resolve a `bar.point(offset, price)` call to the time-based\n * {@link WorldPoint} the rest of the drawing pipeline already speaks.\n *\n * `offset === 0` reads the live `bar.time`; `offset < 0` reads the real\n * historical timestamp `|offset|` bars back from the time ring buffer\n * (`NaN` past retention); `offset > 0` extrapolates `lastTime + offset *\n * spacing`, where `spacing` is the median retained-bar delta and falls back\n * to the parsed bar interval when fewer than two bars are retained. `price`\n * passes through unchanged. Never throws.\n *\n * @since 0.9\n * @stable\n * @example\n * // const wp = resolveBarPoint(stream.ohlcv.time, \"1D\", currentTime, -10, 42);\n */\nexport function resolveBarPoint(\n time: Float64RingBuffer,\n interval: string,\n currentTime: number,\n offset: number,\n price: Price,\n): WorldPoint {\n // `price` is a `Price` (number) by contract, but a script may pass a bar\n // price field (`bar.point(0, bar.close)`) which is now a number-coercible\n // series view. Coerce to the scalar so the persisted `WorldPoint.price`\n // is always a number, never the view object. `Number(NaN)` stays NaN.\n const p = Number(price);\n if (offset === 0) return { time: currentTime, price: p };\n if (offset < 0) return { time: time.at(-offset), price: p };\n const spacing = (() => {\n const median = medianSpacingMs(time);\n return Number.isFinite(median) ? median : intervalSpacingMs(interval);\n })();\n return { time: currentTime + offset * spacing, price: p };\n}\n"]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { JsonValue } from "@invinite-org/chartlang-core";
|
|
2
|
+
import { Float64RingBuffer } from "./ringBuffer.js";
|
|
3
|
+
/**
|
|
4
|
+
* JSON-clean snapshot shape of a {@link Float64RingBuffer} — the head
|
|
5
|
+
* index, the filled count, and the raw cell values with non-finite cells
|
|
6
|
+
* persisted as `null` (the snapshot validator rejects `NaN`). Shared by the
|
|
7
|
+
* `ta.*` and `state.series` slot persistence paths.
|
|
8
|
+
*
|
|
9
|
+
* @since 0.5
|
|
10
|
+
* @internal
|
|
11
|
+
* @stable
|
|
12
|
+
* @example
|
|
13
|
+
* // const snap: BufferSnapshot = { headIndex: 0, filled: 1, values: [1] };
|
|
14
|
+
*/
|
|
15
|
+
export type BufferSnapshot = Readonly<{
|
|
16
|
+
headIndex: number;
|
|
17
|
+
filled: number;
|
|
18
|
+
values: ReadonlyArray<number | null>;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Narrow an `unknown` to a plain (non-array) object record. The first guard
|
|
22
|
+
* every snapshot restore runs before reading named fields.
|
|
23
|
+
*
|
|
24
|
+
* @since 0.5
|
|
25
|
+
* @internal
|
|
26
|
+
* @stable
|
|
27
|
+
* @example
|
|
28
|
+
* isRecord({ a: 1 }); // true
|
|
29
|
+
*/
|
|
30
|
+
export declare function isRecord(value: unknown): value is Readonly<Record<string, unknown>>;
|
|
31
|
+
/**
|
|
32
|
+
* Narrow an `unknown` to a finite integer (used for `headIndex` / `filled`
|
|
33
|
+
* snapshot fields).
|
|
34
|
+
*
|
|
35
|
+
* @since 0.5
|
|
36
|
+
* @internal
|
|
37
|
+
* @stable
|
|
38
|
+
* @example
|
|
39
|
+
* isInteger(3); // true
|
|
40
|
+
*/
|
|
41
|
+
export declare function isInteger(value: unknown): value is number;
|
|
42
|
+
/**
|
|
43
|
+
* Map a runtime number to its JSON-clean form: a finite number rides
|
|
44
|
+
* through, any non-finite value (`NaN`, `±Infinity`) becomes `null` so the
|
|
45
|
+
* snapshot validator accepts it.
|
|
46
|
+
*
|
|
47
|
+
* @since 0.5
|
|
48
|
+
* @internal
|
|
49
|
+
* @stable
|
|
50
|
+
* @example
|
|
51
|
+
* finiteOrNull(Number.NaN); // null
|
|
52
|
+
*/
|
|
53
|
+
export declare function finiteOrNull(value: number): number | null;
|
|
54
|
+
/**
|
|
55
|
+
* Inverse of {@link finiteOrNull} for restore: a persisted `null` rehydrates
|
|
56
|
+
* to `NaN`, a finite number rides through, and anything else (a string, an
|
|
57
|
+
* `Infinity` that slipped past serialise) fails to `null` so the caller can
|
|
58
|
+
* reject the whole slot.
|
|
59
|
+
*
|
|
60
|
+
* @since 0.5
|
|
61
|
+
* @internal
|
|
62
|
+
* @stable
|
|
63
|
+
* @example
|
|
64
|
+
* restoreNumber(null); // NaN
|
|
65
|
+
*/
|
|
66
|
+
export declare function restoreNumber(value: unknown): number | null;
|
|
67
|
+
/**
|
|
68
|
+
* Validate that an `unknown` is a well-formed {@link BufferSnapshot}: integer
|
|
69
|
+
* `headIndex` + `filled`, and a `values` array whose every cell is `null` or
|
|
70
|
+
* a finite number.
|
|
71
|
+
*
|
|
72
|
+
* @since 0.5
|
|
73
|
+
* @internal
|
|
74
|
+
* @stable
|
|
75
|
+
* @example
|
|
76
|
+
* isBufferSnapshot({ headIndex: 0, filled: 0, values: [] }); // true
|
|
77
|
+
*/
|
|
78
|
+
export declare function isBufferSnapshot(value: unknown): value is BufferSnapshot;
|
|
79
|
+
/**
|
|
80
|
+
* Serialise a {@link Float64RingBuffer} into its JSON-clean
|
|
81
|
+
* {@link BufferSnapshot} record.
|
|
82
|
+
*
|
|
83
|
+
* @since 0.5
|
|
84
|
+
* @internal
|
|
85
|
+
* @stable
|
|
86
|
+
* @example
|
|
87
|
+
* // const snap = serialiseBuffer(new Float64RingBuffer(8));
|
|
88
|
+
*/
|
|
89
|
+
export declare function serialiseBuffer(buffer: Float64RingBuffer): JsonValue;
|
|
90
|
+
/**
|
|
91
|
+
* Rebuild a {@link Float64RingBuffer} of the given `capacity` from a
|
|
92
|
+
* {@link BufferSnapshot}, returning `null` when the snapshot is incompatible
|
|
93
|
+
* with the capacity (the underlying restore throws and is caught).
|
|
94
|
+
*
|
|
95
|
+
* @since 0.5
|
|
96
|
+
* @internal
|
|
97
|
+
* @stable
|
|
98
|
+
* @example
|
|
99
|
+
* // const buf = restoreBuffer(snap, 8); // null on capacity mismatch
|
|
100
|
+
*/
|
|
101
|
+
export declare function restoreBuffer(snapshot: BufferSnapshot, capacity: number): Float64RingBuffer | null;
|
|
102
|
+
//# sourceMappingURL=bufferSnapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bufferSnapshot.d.ts","sourceRoot":"","sources":["../src/bufferSnapshot.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACxC,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAEnF;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEzD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEzD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAG3D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CASxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAOpE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CACzB,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,MAAM,GACjB,iBAAiB,GAAG,IAAI,CAQ1B"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Copyright (c) 2026 Invinite. Licensed under the MIT License.
|
|
2
|
+
// See the LICENSE file in the repo root for full license text.
|
|
3
|
+
import { Float64RingBuffer } from "./ringBuffer.js";
|
|
4
|
+
/**
|
|
5
|
+
* Narrow an `unknown` to a plain (non-array) object record. The first guard
|
|
6
|
+
* every snapshot restore runs before reading named fields.
|
|
7
|
+
*
|
|
8
|
+
* @since 0.5
|
|
9
|
+
* @internal
|
|
10
|
+
* @stable
|
|
11
|
+
* @example
|
|
12
|
+
* isRecord({ a: 1 }); // true
|
|
13
|
+
*/
|
|
14
|
+
export function isRecord(value) {
|
|
15
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Narrow an `unknown` to a finite integer (used for `headIndex` / `filled`
|
|
19
|
+
* snapshot fields).
|
|
20
|
+
*
|
|
21
|
+
* @since 0.5
|
|
22
|
+
* @internal
|
|
23
|
+
* @stable
|
|
24
|
+
* @example
|
|
25
|
+
* isInteger(3); // true
|
|
26
|
+
*/
|
|
27
|
+
export function isInteger(value) {
|
|
28
|
+
return typeof value === "number" && Number.isInteger(value);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Map a runtime number to its JSON-clean form: a finite number rides
|
|
32
|
+
* through, any non-finite value (`NaN`, `±Infinity`) becomes `null` so the
|
|
33
|
+
* snapshot validator accepts it.
|
|
34
|
+
*
|
|
35
|
+
* @since 0.5
|
|
36
|
+
* @internal
|
|
37
|
+
* @stable
|
|
38
|
+
* @example
|
|
39
|
+
* finiteOrNull(Number.NaN); // null
|
|
40
|
+
*/
|
|
41
|
+
export function finiteOrNull(value) {
|
|
42
|
+
return Number.isFinite(value) ? value : null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Inverse of {@link finiteOrNull} for restore: a persisted `null` rehydrates
|
|
46
|
+
* to `NaN`, a finite number rides through, and anything else (a string, an
|
|
47
|
+
* `Infinity` that slipped past serialise) fails to `null` so the caller can
|
|
48
|
+
* reject the whole slot.
|
|
49
|
+
*
|
|
50
|
+
* @since 0.5
|
|
51
|
+
* @internal
|
|
52
|
+
* @stable
|
|
53
|
+
* @example
|
|
54
|
+
* restoreNumber(null); // NaN
|
|
55
|
+
*/
|
|
56
|
+
export function restoreNumber(value) {
|
|
57
|
+
if (value === null)
|
|
58
|
+
return Number.NaN;
|
|
59
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Validate that an `unknown` is a well-formed {@link BufferSnapshot}: integer
|
|
63
|
+
* `headIndex` + `filled`, and a `values` array whose every cell is `null` or
|
|
64
|
+
* a finite number.
|
|
65
|
+
*
|
|
66
|
+
* @since 0.5
|
|
67
|
+
* @internal
|
|
68
|
+
* @stable
|
|
69
|
+
* @example
|
|
70
|
+
* isBufferSnapshot({ headIndex: 0, filled: 0, values: [] }); // true
|
|
71
|
+
*/
|
|
72
|
+
export function isBufferSnapshot(value) {
|
|
73
|
+
if (!isRecord(value))
|
|
74
|
+
return false;
|
|
75
|
+
if (!isInteger(value.headIndex) || !isInteger(value.filled))
|
|
76
|
+
return false;
|
|
77
|
+
return (Array.isArray(value.values) &&
|
|
78
|
+
value.values.every((entry) => entry === null || (typeof entry === "number" && Number.isFinite(entry))));
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Serialise a {@link Float64RingBuffer} into its JSON-clean
|
|
82
|
+
* {@link BufferSnapshot} record.
|
|
83
|
+
*
|
|
84
|
+
* @since 0.5
|
|
85
|
+
* @internal
|
|
86
|
+
* @stable
|
|
87
|
+
* @example
|
|
88
|
+
* // const snap = serialiseBuffer(new Float64RingBuffer(8));
|
|
89
|
+
*/
|
|
90
|
+
export function serialiseBuffer(buffer) {
|
|
91
|
+
const snapshot = buffer.serialiseSnapshotBuffer();
|
|
92
|
+
return {
|
|
93
|
+
headIndex: snapshot.headIndex,
|
|
94
|
+
filled: snapshot.filled,
|
|
95
|
+
values: snapshot.values,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Rebuild a {@link Float64RingBuffer} of the given `capacity` from a
|
|
100
|
+
* {@link BufferSnapshot}, returning `null` when the snapshot is incompatible
|
|
101
|
+
* with the capacity (the underlying restore throws and is caught).
|
|
102
|
+
*
|
|
103
|
+
* @since 0.5
|
|
104
|
+
* @internal
|
|
105
|
+
* @stable
|
|
106
|
+
* @example
|
|
107
|
+
* // const buf = restoreBuffer(snap, 8); // null on capacity mismatch
|
|
108
|
+
*/
|
|
109
|
+
export function restoreBuffer(snapshot, capacity) {
|
|
110
|
+
const buffer = new Float64RingBuffer(capacity);
|
|
111
|
+
try {
|
|
112
|
+
buffer.restoreFromSnapshotBuffer(snapshot);
|
|
113
|
+
return buffer;
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=bufferSnapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bufferSnapshot.js","sourceRoot":"","sources":["../src/bufferSnapshot.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAI/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAoBpD;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CA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M,QAAQ,GAAG,MAAM,CAAC,uBAAuB,EAAE,CAAC;IAClD,OAAO;QACH,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;KAC1B,CAAC;AACN,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CACzB,QAAwB,EACxB,QAAgB;IAEhB,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC/C,IAAI,CAAC;QACD,MAAM,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;QAC3C,OAAO,MAAM,CAAC;IAClB,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) 2026 Invinite. Licensed under the MIT License.\n// See the LICENSE file in the repo root for full license text.\n\nimport type { JsonValue } from \"@invinite-org/chartlang-core\";\n\nimport { Float64RingBuffer } from \"./ringBuffer.js\";\n\n/**\n * JSON-clean snapshot shape of a {@link Float64RingBuffer} — the head\n * index, the filled count, and the raw cell values with non-finite cells\n * persisted as `null` (the snapshot validator rejects `NaN`). Shared by the\n * `ta.*` and `state.series` slot persistence paths.\n *\n * @since 0.5\n * @internal\n * @stable\n * @example\n * // const snap: BufferSnapshot = { headIndex: 0, filled: 1, values: [1] };\n */\nexport type BufferSnapshot = Readonly<{\n headIndex: number;\n filled: number;\n values: ReadonlyArray<number | null>;\n}>;\n\n/**\n * Narrow an `unknown` to a plain (non-array) object record. The first guard\n * every snapshot restore runs before reading named fields.\n *\n * @since 0.5\n * @internal\n * @stable\n * @example\n * isRecord({ a: 1 }); // true\n */\nexport function isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n/**\n * Narrow an `unknown` to a finite integer (used for `headIndex` / `filled`\n * snapshot fields).\n *\n * @since 0.5\n * @internal\n * @stable\n * @example\n * isInteger(3); // true\n */\nexport function isInteger(value: unknown): value is number {\n return typeof value === \"number\" && Number.isInteger(value);\n}\n\n/**\n * Map a runtime number to its JSON-clean form: a finite number rides\n * through, any non-finite value (`NaN`, `±Infinity`) becomes `null` so the\n * snapshot validator accepts it.\n *\n * @since 0.5\n * @internal\n * @stable\n * @example\n * finiteOrNull(Number.NaN); // null\n */\nexport function finiteOrNull(value: number): number | null {\n return Number.isFinite(value) ? value : null;\n}\n\n/**\n * Inverse of {@link finiteOrNull} for restore: a persisted `null` rehydrates\n * to `NaN`, a finite number rides through, and anything else (a string, an\n * `Infinity` that slipped past serialise) fails to `null` so the caller can\n * reject the whole slot.\n *\n * @since 0.5\n * @internal\n * @stable\n * @example\n * restoreNumber(null); // NaN\n */\nexport function restoreNumber(value: unknown): number | null {\n if (value === null) return Number.NaN;\n return typeof value === \"number\" && Number.isFinite(value) ? value : null;\n}\n\n/**\n * Validate that an `unknown` is a well-formed {@link BufferSnapshot}: integer\n * `headIndex` + `filled`, and a `values` array whose every cell is `null` or\n * a finite number.\n *\n * @since 0.5\n * @internal\n * @stable\n * @example\n * isBufferSnapshot({ headIndex: 0, filled: 0, values: [] }); // true\n */\nexport function isBufferSnapshot(value: unknown): value is BufferSnapshot {\n if (!isRecord(value)) return false;\n if (!isInteger(value.headIndex) || !isInteger(value.filled)) return false;\n return (\n Array.isArray(value.values) &&\n value.values.every(\n (entry) => entry === null || (typeof entry === \"number\" && Number.isFinite(entry)),\n )\n );\n}\n\n/**\n * Serialise a {@link Float64RingBuffer} into its JSON-clean\n * {@link BufferSnapshot} record.\n *\n * @since 0.5\n * @internal\n * @stable\n * @example\n * // const snap = serialiseBuffer(new Float64RingBuffer(8));\n */\nexport function serialiseBuffer(buffer: Float64RingBuffer): JsonValue {\n const snapshot = buffer.serialiseSnapshotBuffer();\n return {\n headIndex: snapshot.headIndex,\n filled: snapshot.filled,\n values: snapshot.values,\n };\n}\n\n/**\n * Rebuild a {@link Float64RingBuffer} of the given `capacity` from a\n * {@link BufferSnapshot}, returning `null` when the snapshot is incompatible\n * with the capacity (the underlying restore throws and is caught).\n *\n * @since 0.5\n * @internal\n * @stable\n * @example\n * // const buf = restoreBuffer(snap, 8); // null on capacity mismatch\n */\nexport function restoreBuffer(\n snapshot: BufferSnapshot,\n capacity: number,\n): Float64RingBuffer | null {\n const buffer = new Float64RingBuffer(capacity);\n try {\n buffer.restoreFromSnapshotBuffer(snapshot);\n return buffer;\n } catch {\n return null;\n }\n}\n"]}
|
|
@@ -145,10 +145,13 @@ export type CreateScriptRunnerArgs = {
|
|
|
145
145
|
* `ACTIVE_RUNTIME_CONTEXT`. Phase 1 ships a single-stream model; the
|
|
146
146
|
* `requestedIntervals` field on the manifest is always empty.
|
|
147
147
|
*
|
|
148
|
-
* Capacity sizing follows PLAN §6.6:
|
|
148
|
+
* Capacity sizing follows PLAN §6.6: take the max of
|
|
149
149
|
* `manifest.seriesCapacities.ohlcv` (compiler-emitted per-series
|
|
150
|
-
* lookback)
|
|
151
|
-
*
|
|
150
|
+
* lookback) or the `manifest.maxLookback + 1` floor, and
|
|
151
|
+
* `manifest.seriesCapacities.dynamicFallback` (the 5000-slot safety net the
|
|
152
|
+
* compiler emits when a series is read at a non-literal index it cannot size
|
|
153
|
+
* statically), clamped to a minimum of 1 so an empty-history script still has
|
|
154
|
+
* a valid head slot.
|
|
152
155
|
*
|
|
153
156
|
* @since 0.1 — widened to accept `CompiledScriptBundle` in 0.7.
|
|
154
157
|
* @example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createScriptRunner.d.ts","sourceRoot":"","sources":["../src/createScriptRunner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,eAAe,EAClB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACR,GAAG,EACH,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACT,cAAc,EACjB,MAAM,8BAA8B,CA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