@invinite-org/chartlang-adapter-kit 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +1380 -0
  2. package/LICENSE +21 -0
  3. package/README.md +69 -0
  4. package/dist/base/bufferingAdapter.d.ts +52 -0
  5. package/dist/base/bufferingAdapter.d.ts.map +1 -0
  6. package/dist/base/bufferingAdapter.js +68 -0
  7. package/dist/base/bufferingAdapter.js.map +1 -0
  8. package/dist/base/index.d.ts +3 -0
  9. package/dist/base/index.d.ts.map +1 -0
  10. package/dist/base/index.js +5 -0
  11. package/dist/base/index.js.map +1 -0
  12. package/dist/base/passThroughAdapter.d.ts +49 -0
  13. package/dist/base/passThroughAdapter.d.ts.map +1 -0
  14. package/dist/base/passThroughAdapter.js +61 -0
  15. package/dist/base/passThroughAdapter.js.map +1 -0
  16. package/dist/capabilities/capabilities.d.ts +336 -0
  17. package/dist/capabilities/capabilities.d.ts.map +1 -0
  18. package/dist/capabilities/capabilities.js +616 -0
  19. package/dist/capabilities/capabilities.js.map +1 -0
  20. package/dist/capabilities/index.d.ts +2 -0
  21. package/dist/capabilities/index.d.ts.map +1 -0
  22. package/dist/capabilities/index.js +4 -0
  23. package/dist/capabilities/index.js.map +1 -0
  24. package/dist/defineAdapter.d.ts +74 -0
  25. package/dist/defineAdapter.d.ts.map +1 -0
  26. package/dist/defineAdapter.js +55 -0
  27. package/dist/defineAdapter.js.map +1 -0
  28. package/dist/index.d.ts +12 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +9 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/mocks/index.d.ts +3 -0
  33. package/dist/mocks/index.d.ts.map +1 -0
  34. package/dist/mocks/index.js +4 -0
  35. package/dist/mocks/index.js.map +1 -0
  36. package/dist/mocks/mockCandleSource.d.ts +68 -0
  37. package/dist/mocks/mockCandleSource.d.ts.map +1 -0
  38. package/dist/mocks/mockCandleSource.js +61 -0
  39. package/dist/mocks/mockCandleSource.js.map +1 -0
  40. package/dist/types.d.ts +655 -0
  41. package/dist/types.d.ts.map +1 -0
  42. package/dist/types.js +4 -0
  43. package/dist/types.js.map +1 -0
  44. package/dist/validation/decodeDrawing.d.ts +29 -0
  45. package/dist/validation/decodeDrawing.d.ts.map +1 -0
  46. package/dist/validation/decodeDrawing.js +35 -0
  47. package/dist/validation/decodeDrawing.js.map +1 -0
  48. package/dist/validation/index.d.ts +4 -0
  49. package/dist/validation/index.d.ts.map +1 -0
  50. package/dist/validation/index.js +5 -0
  51. package/dist/validation/index.js.map +1 -0
  52. package/dist/validation/validateEmission.d.ts +70 -0
  53. package/dist/validation/validateEmission.d.ts.map +1 -0
  54. package/dist/validation/validateEmission.js +1481 -0
  55. package/dist/validation/validateEmission.js.map +1 -0
  56. package/package.json +41 -0
@@ -0,0 +1,655 @@
1
+ import type { AlertSeverity, Bar, Color, DrawingCounts as CoreDrawingCounts, DrawingKind as CoreDrawingKind, InputKind as CoreInputKind, PlotKind as CorePlotKind, DrawingState, IntervalDescriptor, JsonValue, LineStyle, LogLevel, SymbolType } from "@invinite-org/chartlang-core";
2
+ /**
3
+ * Adapter-supplied candle event the runtime consumes through
4
+ * `Adapter.candles(...)`. `history` is a batched warm-up payload; `close`
5
+ * carries a finalised bar; `tick` carries an intra-bar update that the
6
+ * runtime applies to the current bar's head slot.
7
+ *
8
+ * @since 0.1
9
+ * @stable
10
+ * @example
11
+ * const evt: CandleEvent = { kind: "history", bars: [] };
12
+ */
13
+ export type CandleEvent = {
14
+ readonly kind: "history";
15
+ readonly bars: ReadonlyArray<Bar>;
16
+ /**
17
+ * Secondary-stream key. Omit for the main stream; set to a
18
+ * requested interval value such as `"1D"` for MTF candles.
19
+ *
20
+ * @since 0.5
21
+ */
22
+ readonly streamKey?: string;
23
+ } | {
24
+ readonly kind: "close";
25
+ readonly bar: Bar;
26
+ /**
27
+ * Secondary-stream key. Omit for the main stream; set to a
28
+ * requested interval value such as `"1D"` for MTF candles.
29
+ *
30
+ * @since 0.5
31
+ */
32
+ readonly streamKey?: string;
33
+ } | {
34
+ readonly kind: "tick";
35
+ readonly bar: Bar;
36
+ /**
37
+ * Secondary-stream key. Omit for the main stream; set to a
38
+ * requested interval value such as `"1D"` for MTF candles.
39
+ *
40
+ * @since 0.5
41
+ */
42
+ readonly streamKey?: string;
43
+ };
44
+ /**
45
+ * Indicator plot styles Phase 1 ships. Re-exported from
46
+ * `@invinite-org/chartlang-core` so the script-facing and adapter-facing
47
+ * surfaces stay in lock-step — the full PLAN §7.2 set lands in Phase 2+,
48
+ * additively, in the core declaration. Pinned set — additive only across
49
+ * `apiVersion: 1.x`.
50
+ *
51
+ * @since 0.1
52
+ * @stable
53
+ * @example
54
+ * const k: PlotKind = "line";
55
+ */
56
+ export type PlotKind = CorePlotKind;
57
+ /**
58
+ * Drawing kind discriminator. Phase 3 widens the Phase-1 `"line"`
59
+ * placeholder to the full 61-entry kebab-case union — re-exported from
60
+ * `@invinite-org/chartlang-core`. The wire format is kebab-case; the
61
+ * camelCase TypeScript surface (`draw.horizontalLine`,
62
+ * `draw.fibRetracement`, …) is pinned via core's
63
+ * `KIND_CAMELCASE` / `KIND_KEBABCASE` bijection. Phase-1 / Phase-2
64
+ * adapter code that wrote `drawingKind: "line"` keeps compiling — the
65
+ * widening is purely additive. Pinned set — additive only across
66
+ * `apiVersion: 1.x`.
67
+ *
68
+ * @since 0.1
69
+ * @stable
70
+ * @example
71
+ * const k: DrawingKind = "fib-retracement";
72
+ * void k;
73
+ */
74
+ export type DrawingKind = CoreDrawingKind;
75
+ /**
76
+ * Channels an alert emission can be dispatched on. Adapters declare the
77
+ * subset they support via `Capabilities.alerts`; emissions to unsupported
78
+ * channels drop with `unsupported-alert-channel`.
79
+ *
80
+ * @since 0.1
81
+ * @stable
82
+ * @example
83
+ * const c: AlertChannel = "toast";
84
+ */
85
+ export type AlertChannel = "log" | "toast" | "webhook" | "email" | "sms" | "push";
86
+ /**
87
+ * Input families an adapter is willing to surface in the script-settings
88
+ * UI. Phase-1 example scripts use defaults only; `input.*` runtime
89
+ * resolution lands in Phase 4.
90
+ *
91
+ * @since 0.1
92
+ * @stable
93
+ * @example
94
+ * const k: InputKind = "int";
95
+ */
96
+ export type InputKind = CoreInputKind;
97
+ /**
98
+ * `syminfo.*` fields the adapter populates. Phase-1 scripts don't read
99
+ * symbol metadata; the type is here so consumer-repo adapters can pin
100
+ * against a stable shape now.
101
+ *
102
+ * @since 0.1
103
+ * @stable
104
+ * @example
105
+ * const f: SymInfoField = "ticker";
106
+ */
107
+ export type SymInfoField = "ticker" | "type" | "mintick" | "currency" | "basecurrency" | "exchange" | "timezone" | "session" | "meta";
108
+ /**
109
+ * Adapter-supplied per-mount symbol metadata payload consumed by the
110
+ * runtime's `syminfo.*` view builder.
111
+ *
112
+ * @since 0.4
113
+ * @stable
114
+ * @example
115
+ * const info: AdapterSymInfo = {
116
+ * ticker: "DEMO",
117
+ * type: "equity",
118
+ * mintick: 0.01,
119
+ * };
120
+ * void info;
121
+ */
122
+ export type AdapterSymInfo = Readonly<{
123
+ ticker?: string;
124
+ type?: SymbolType;
125
+ mintick?: number;
126
+ currency?: string;
127
+ basecurrency?: string;
128
+ exchange?: string;
129
+ timezone?: string;
130
+ session?: string;
131
+ meta?: Readonly<Record<string, JsonValue>>;
132
+ }>;
133
+ /**
134
+ * Per-script drawing-emission budget. Excess `draw.*` calls fall back to
135
+ * no-op + `drawing-budget-exceeded`. Mirrors Pine's `max_*_count` family.
136
+ *
137
+ * Canonical declaration lives in `@invinite-org/chartlang-core/types`
138
+ * (Phase 3) so `ScriptManifest.maxDrawings?` and
139
+ * `Capabilities.maxDrawingsPerScript` pin the same shape — the public
140
+ * surface here is preserved via a type re-export. The re-export
141
+ * preserves the `adapter-kit → core` dependency direction.
142
+ *
143
+ * @since 0.1
144
+ * @stable
145
+ * @example
146
+ * const c: DrawingCounts = {
147
+ * lines: 50, labels: 50, boxes: 50, polylines: 50, other: 50,
148
+ * };
149
+ * void c;
150
+ */
151
+ export type DrawingCounts = CoreDrawingCounts;
152
+ /**
153
+ * Capability bag an adapter declares. The runtime, host-worker, and
154
+ * editor all gate emissions through this shape. Primitives outside the
155
+ * declared set become silent no-ops + diagnostic (PLAN §7.4).
156
+ * Capability keys are pinned — additive only across `apiVersion: 1.x`.
157
+ *
158
+ * Phase 1 omits `feedExternalSeries`-related `inputs` entries from any
159
+ * declared subset; Phase 4 wires the surface.
160
+ *
161
+ * @since 0.1
162
+ * @stable
163
+ * @example
164
+ * const c: Capabilities = {
165
+ * plots: new Set(["line"]),
166
+ * drawings: new Set(),
167
+ * alerts: new Set(["toast"]),
168
+ * alertConditions: false,
169
+ * logs: false,
170
+ * inputs: new Set(),
171
+ * intervals: [],
172
+ * multiTimeframe: false,
173
+ * subPanes: 0,
174
+ * symInfoFields: new Set(),
175
+ * maxDrawingsPerScript: {
176
+ * lines: 0, labels: 0, boxes: 0, polylines: 0, other: 0,
177
+ * },
178
+ * maxLookback: 5000,
179
+ * maxTickHz: 10,
180
+ * };
181
+ */
182
+ export type Capabilities = {
183
+ readonly plots: ReadonlySet<PlotKind>;
184
+ readonly drawings: ReadonlySet<DrawingKind>;
185
+ readonly alerts: ReadonlySet<AlertChannel>;
186
+ /**
187
+ * Whether the adapter can route `defineAlertCondition` user-wired
188
+ * alerts per PLAN §11.2.
189
+ *
190
+ * @since 0.4
191
+ * @stable
192
+ * @example
193
+ * const enabled: Capabilities["alertConditions"] = false;
194
+ * void enabled;
195
+ */
196
+ readonly alertConditions: boolean;
197
+ /**
198
+ * Whether the adapter renders `runtime.log.*` messages per PLAN §11.3.
199
+ *
200
+ * @since 0.4
201
+ * @stable
202
+ * @example
203
+ * const enabled: Capabilities["logs"] = false;
204
+ * void enabled;
205
+ */
206
+ readonly logs: boolean;
207
+ readonly inputs: ReadonlySet<InputKind>;
208
+ /**
209
+ * Timeframes this adapter can deliver candles for. Order is meaningful
210
+ * for editor pickers and `request.security` validation (PLAN §4.5).
211
+ *
212
+ * @since 0.4
213
+ * @stable
214
+ * @example
215
+ * const intervals: Capabilities["intervals"] = [
216
+ * { value: "1D", label: "1 day", group: "daily" },
217
+ * ];
218
+ * void intervals;
219
+ */
220
+ readonly intervals: ReadonlyArray<IntervalDescriptor>;
221
+ /**
222
+ * Whether the adapter can deliver more than one candle stream per script
223
+ * load. `false` triggers the Phase 4 all-NaN fallback for
224
+ * `request.security` (PLAN §4.5).
225
+ *
226
+ * @since 0.4
227
+ * @stable
228
+ * @example
229
+ * const enabled: Capabilities["multiTimeframe"] = false;
230
+ * void enabled;
231
+ */
232
+ readonly multiTimeframe: boolean;
233
+ /**
234
+ * Max number of sub-panes the adapter can render for one script. Use
235
+ * `Number.MAX_SAFE_INTEGER` as the unlimited sentinel per PLAN §7.2.
236
+ *
237
+ * @since 0.4
238
+ * @stable
239
+ * @example
240
+ * const max: Capabilities["subPanes"] = Number.MAX_SAFE_INTEGER;
241
+ * void max;
242
+ */
243
+ readonly subPanes: number;
244
+ /**
245
+ * `syminfo.*` fields this adapter populates. Missing fields evaluate to
246
+ * empty sentinels per PLAN §4.8.
247
+ *
248
+ * @since 0.4
249
+ * @stable
250
+ * @example
251
+ * const fields: Capabilities["symInfoFields"] = new Set(["ticker"]);
252
+ * void fields;
253
+ */
254
+ readonly symInfoFields: ReadonlySet<SymInfoField>;
255
+ /**
256
+ * Per-script drawing-emission budget consumed by runtime drawing gates
257
+ * and bucketed by PLAN §10 drawing categories.
258
+ *
259
+ * @since 0.4
260
+ * @stable
261
+ * @example
262
+ * const counts: Capabilities["maxDrawingsPerScript"] = {
263
+ * lines: 50, labels: 50, boxes: 50, polylines: 50, other: 50,
264
+ * };
265
+ * void counts;
266
+ */
267
+ readonly maxDrawingsPerScript: DrawingCounts;
268
+ readonly maxLookback: number;
269
+ readonly maxTickHz: number;
270
+ };
271
+ /**
272
+ * Plot style discriminated union. Phase 1 shipped `line` / `step-line` /
273
+ * `horizontal-line`; Phase 2 adds `histogram` / `bars` / `area` /
274
+ * `filled-band` / `label` / `marker` per PLAN §7.3. Phase 5 will extend
275
+ * further (`shape`, `character`, `arrow`, `vertical-line`,
276
+ * `bar-override`, …). Every expansion is additive — `apiVersion: 1`
277
+ * scripts stay valid.
278
+ *
279
+ * @since 0.1
280
+ * @stable
281
+ * @example
282
+ * const line: PlotStyle = { kind: "line", lineWidth: 1, lineStyle: "solid" };
283
+ * const hist: PlotStyle = { kind: "histogram", baseline: 0 };
284
+ * const band: PlotStyle = { kind: "filled-band", upper: 1, lower: -1, alpha: 0.2 };
285
+ * void line; void hist; void band;
286
+ */
287
+ export type PlotStyle = {
288
+ readonly kind: "line";
289
+ readonly lineWidth: number;
290
+ readonly lineStyle: LineStyle;
291
+ } | {
292
+ readonly kind: "step-line";
293
+ readonly lineWidth: number;
294
+ readonly lineStyle: LineStyle;
295
+ } | {
296
+ readonly kind: "horizontal-line";
297
+ readonly lineWidth: number;
298
+ readonly lineStyle: LineStyle;
299
+ }
300
+ /** Phase 2 — column rising from `baseline` to `value`. @since 0.2 */
301
+ | {
302
+ readonly kind: "histogram" | "bars";
303
+ readonly baseline: number;
304
+ }
305
+ /** Phase 2 — filled polygon under a polyline. @since 0.2 */
306
+ | {
307
+ readonly kind: "area";
308
+ readonly lineWidth: number;
309
+ readonly lineStyle: LineStyle;
310
+ readonly fillAlpha: number;
311
+ }
312
+ /** Phase 2 — region between two polylines. `upper` / `lower` may be
313
+ * `null` to mark a per-bar gap; both `null` is rejected by
314
+ * {@link validateEmission}. @since 0.2 */
315
+ | {
316
+ readonly kind: "filled-band";
317
+ readonly upper: number | null;
318
+ readonly lower: number | null;
319
+ readonly alpha: number;
320
+ }
321
+ /** Phase 2 — text annotation anchored above / below / at the value.
322
+ * @since 0.2 */
323
+ | {
324
+ readonly kind: "label";
325
+ readonly text: string;
326
+ readonly position: "above" | "below" | "anchor";
327
+ }
328
+ /** Phase 2 — discrete glyph at the value. @since 0.2 */
329
+ | {
330
+ readonly kind: "marker";
331
+ readonly shape: "circle" | "triangle-up" | "triangle-down" | "square" | "diamond";
332
+ readonly size: number;
333
+ }
334
+ /** Phase 5 — Pine `plotshape` glyph at the plot anchor. @since 0.5 */
335
+ | {
336
+ readonly kind: "shape";
337
+ readonly shape: "circle" | "triangle-up" | "triangle-down" | "square" | "diamond" | "cross" | "xcross" | "flag";
338
+ readonly size: number;
339
+ readonly location?: "above" | "below" | "absolute";
340
+ }
341
+ /** Phase 5 — Pine `plotchar` text glyph at the plot anchor. @since 0.5 */
342
+ | {
343
+ readonly kind: "character";
344
+ readonly char: string;
345
+ readonly size: number;
346
+ readonly location?: "above" | "below" | "absolute";
347
+ }
348
+ /** Phase 5 — Pine `plotarrow` directional marker. @since 0.5 */
349
+ | {
350
+ readonly kind: "arrow";
351
+ readonly direction: "up" | "down";
352
+ readonly size: number;
353
+ }
354
+ /** Phase 5 — Pine `plotcandle` body-color override. @since 0.5 */
355
+ | {
356
+ readonly kind: "candle-override";
357
+ readonly bull: Color;
358
+ readonly bear: Color;
359
+ readonly doji?: Color;
360
+ }
361
+ /** Phase 5 — Pine `plotbar` outline-color override. @since 0.5 */
362
+ | {
363
+ readonly kind: "bar-override";
364
+ readonly color: Color;
365
+ }
366
+ /** Phase 5 — Pine `bgcolor` background band. @since 0.5 */
367
+ | {
368
+ readonly kind: "bg-color";
369
+ readonly color: Color;
370
+ readonly transp?: number;
371
+ }
372
+ /** Phase 5 — Pine `barcolor` candle/bar tint. @since 0.5 */
373
+ | {
374
+ readonly kind: "bar-color";
375
+ readonly color: Color;
376
+ }
377
+ /** Phase 5 — volume-profile horizontal histogram buckets. @since 0.5 */
378
+ | {
379
+ readonly kind: "horizontal-histogram";
380
+ readonly buckets: ReadonlyArray<Readonly<{
381
+ readonly price: number;
382
+ readonly volume: number;
383
+ readonly color?: Color;
384
+ }>>;
385
+ };
386
+ /**
387
+ * A `plot()` / `hline()` emission the runtime sends to the adapter.
388
+ * Numeric `value: null` is the wire-level "skip this bar" — NaN/Infinity
389
+ * are forbidden in `value` and anywhere in `meta` (PLAN §7.3 universal
390
+ * payload rules).
391
+ *
392
+ * @since 0.1
393
+ * @stable
394
+ * @example
395
+ * const e: PlotEmission = {
396
+ * kind: "plot",
397
+ * slotId: "ema-cross.ts:12:5#0",
398
+ * title: "EMA",
399
+ * style: { kind: "line", lineWidth: 1, lineStyle: "solid" },
400
+ * bar: 100,
401
+ * time: 1_700_000_000_000,
402
+ * value: 42.31,
403
+ * color: "#3b82f6",
404
+ * meta: {},
405
+ * pane: "overlay",
406
+ * };
407
+ */
408
+ export type PlotEmission = {
409
+ readonly kind: "plot";
410
+ readonly slotId: string;
411
+ readonly title: string;
412
+ readonly style: PlotStyle;
413
+ readonly bar: number;
414
+ readonly time: number;
415
+ readonly value: number | null;
416
+ readonly color: string | null;
417
+ readonly meta: Readonly<Record<string, JsonValue>>;
418
+ readonly pane: "overlay" | "new" | string;
419
+ };
420
+ /**
421
+ * An `alert()` emission. `dedupeKey` is computed by the runtime
422
+ * (`slotId + bar + hash(message + meta)`) and adapters that dispatch
423
+ * via async channels MUST use it for idempotency.
424
+ *
425
+ * @since 0.1
426
+ * @stable
427
+ * @example
428
+ * const e: AlertEmission = {
429
+ * kind: "alert",
430
+ * slotId: "rsi.ts:42:1#0",
431
+ * severity: "warning",
432
+ * message: "RSI divergence",
433
+ * bar: 200,
434
+ * time: 1_700_000_000_000,
435
+ * meta: {},
436
+ * channels: ["toast"],
437
+ * dedupeKey: "rsi.ts:42:1#0|200|deadbeef",
438
+ * };
439
+ */
440
+ export type AlertEmission = {
441
+ readonly kind: "alert";
442
+ readonly slotId: string;
443
+ readonly severity: AlertSeverity;
444
+ readonly message: string;
445
+ readonly bar: number;
446
+ readonly time: number;
447
+ readonly meta: Readonly<Record<string, JsonValue>>;
448
+ readonly channels: ReadonlyArray<AlertChannel>;
449
+ readonly dedupeKey: string;
450
+ };
451
+ /**
452
+ * Per-bar emission produced by `ComputeContext.signal(conditionId, fired)`.
453
+ * Adapters route these named, user-wired conditions to delivery channels
454
+ * configured in their own UI.
455
+ *
456
+ * @since 0.5
457
+ * @stable
458
+ * @example
459
+ * const e: AlertConditionEmission = {
460
+ * kind: "alert-condition",
461
+ * conditionId: "bullishCross",
462
+ * title: "Bullish cross",
463
+ * description: "Fast EMA crossed above slow EMA",
464
+ * defaultMessage: "{{ticker}} crossed up",
465
+ * fired: true,
466
+ * bar: 42,
467
+ * time: 1_700_000_000_000,
468
+ * };
469
+ * void e;
470
+ */
471
+ export type AlertConditionEmission = {
472
+ readonly kind: "alert-condition";
473
+ readonly conditionId: string;
474
+ readonly title: string;
475
+ readonly description: string;
476
+ readonly defaultMessage: string;
477
+ readonly fired: boolean;
478
+ readonly bar: number;
479
+ readonly time: number;
480
+ };
481
+ /**
482
+ * Per-bar debug log produced by `runtime.log.info/warn/error(...)`.
483
+ * Logs are capability-gated by `Capabilities.logs`; disabled logs are
484
+ * silent no-ops because they are debugging output rather than signal.
485
+ *
486
+ * @since 0.5
487
+ * @stable
488
+ * @example
489
+ * const e: LogEmission = {
490
+ * kind: "log",
491
+ * level: "info",
492
+ * message: "ema warmed",
493
+ * meta: { ema: 42 },
494
+ * bar: 10,
495
+ * time: 1_700_000_000_000,
496
+ * };
497
+ * void e;
498
+ */
499
+ export type LogEmission = {
500
+ readonly kind: "log";
501
+ readonly level: LogLevel;
502
+ readonly message: string;
503
+ readonly meta?: Readonly<Record<string, JsonValue>>;
504
+ readonly bar: number;
505
+ readonly time: number;
506
+ };
507
+ /**
508
+ * A `draw.*` emission. Phase 3 narrows `state` from `unknown` to the
509
+ * typed {@link DrawingState} discriminated union. `op: "create"`
510
+ * carries the initial state; `op: "update"` carries the FULL merged
511
+ * state per the §10.3 full-state semantic (not a patch); `op:
512
+ * "remove"` carries the last-known state.
513
+ *
514
+ * @since 0.1
515
+ * @stable
516
+ * @example
517
+ * const e: DrawingEmission = {
518
+ * kind: "drawing",
519
+ * handleId: "ph3.ts:1:1#0",
520
+ * drawingKind: "line",
521
+ * op: "create",
522
+ * state: {
523
+ * kind: "line",
524
+ * anchors: [{ time: 0, price: 0 }, { time: 1, price: 1 }],
525
+ * style: {},
526
+ * },
527
+ * bar: 0,
528
+ * time: 0,
529
+ * };
530
+ * void e;
531
+ */
532
+ export type DrawingEmission = {
533
+ readonly kind: "drawing";
534
+ readonly handleId: string;
535
+ readonly drawingKind: DrawingKind;
536
+ readonly op: "create" | "update" | "remove";
537
+ readonly state: DrawingState;
538
+ readonly bar: number;
539
+ readonly time: number;
540
+ };
541
+ /**
542
+ * Stable machine-readable diagnostic code emitted by the runtime / host
543
+ * when an emission is dropped, an input fails coercion, or a budget is
544
+ * exceeded. Pinned set — additive only across `apiVersion: 1.x`.
545
+ *
546
+ * @since 0.1
547
+ * @stable
548
+ * @example
549
+ * const code: DiagnosticCode = "unsupported-plot-kind";
550
+ */
551
+ export type DiagnosticCode = "unsupported-plot-kind" | "unsupported-drawing-kind" | "unsupported-alert-channel" | "unsupported-pane" | "unsupported-interval" | "multi-timeframe-not-supported" | "unknown-secondary-stream" | "lookback-exceeded" | "drawing-budget-exceeded" | "dropped-by-policy" | "input-coercion-failed" | "alert-conditions-not-supported" | "unknown-alert-condition" | "alert-rate-limited" | "runtime-cpu-budget-exceeded" | "runtime-memory-budget-exceeded" | "runtime-log-budget-exceeded" | "malformed-log-meta" | "runtime-error-thrown" | "session-info-missing" | "fixed-range-inverted" | "state-snapshot-restored" | "state-snapshot-future-dated" | "state-snapshot-malformed" | "state-snapshot-save-failed" | "malformed-emission";
552
+ /**
553
+ * A non-rendered diagnostic the runtime / host surfaces to the editor +
554
+ * error reporters. Never user-visible on its own.
555
+ *
556
+ * @since 0.1
557
+ * @stable
558
+ * @example
559
+ * const d: RuntimeDiagnostic = {
560
+ * kind: "diagnostic",
561
+ * severity: "warning",
562
+ * code: "unsupported-plot-kind",
563
+ * message: "plot kind 'area' not in adapter capabilities",
564
+ * slotId: "ema.ts:1:1#0",
565
+ * bar: 10,
566
+ * };
567
+ */
568
+ export type RuntimeDiagnostic = {
569
+ readonly kind: "diagnostic";
570
+ readonly severity: "info" | "warning" | "error";
571
+ readonly code: DiagnosticCode;
572
+ readonly message: string;
573
+ readonly slotId: string | null;
574
+ readonly bar: number | null;
575
+ };
576
+ /**
577
+ * Top-level drain payload the runtime hands `Adapter.onEmissions(...)`.
578
+ * Phase 1 ships `plots` / `drawings` / `alerts` / `diagnostics`; Phase 5
579
+ * additively adds `alertConditions` + `logs` (per PLAN §7.3).
580
+ *
581
+ * @since 0.1
582
+ * @stable
583
+ * @example
584
+ * const e: RunnerEmissions = {
585
+ * plots: [],
586
+ * drawings: [],
587
+ * alerts: [],
588
+ * alertConditions: [],
589
+ * logs: [],
590
+ * diagnostics: [],
591
+ * fromBar: 0,
592
+ * toBar: 0,
593
+ * };
594
+ */
595
+ export type RunnerEmissions = {
596
+ readonly plots: ReadonlyArray<PlotEmission>;
597
+ readonly drawings: ReadonlyArray<DrawingEmission>;
598
+ readonly alerts: ReadonlyArray<AlertEmission>;
599
+ readonly alertConditions: ReadonlyArray<AlertConditionEmission>;
600
+ readonly logs: ReadonlyArray<LogEmission>;
601
+ readonly diagnostics: ReadonlyArray<RuntimeDiagnostic>;
602
+ readonly fromBar: number;
603
+ readonly toBar: number;
604
+ };
605
+ /**
606
+ * The host-side contract every chartlang adapter implements. Phase 1
607
+ * omits PLAN §7.1's optional `feedExternalSeries?` — that surface
608
+ * arrives in Phase 4 alongside `input.external-series`. The shape is
609
+ * additive, so consumer-repo adapters won't need a breaking change to
610
+ * opt in later.
611
+ *
612
+ * @since 0.1
613
+ * @stable
614
+ * @example
615
+ * declare const a: Adapter;
616
+ * for await (const e of a.candles({ interval: "chart" })) {
617
+ * void e;
618
+ * }
619
+ */
620
+ export type Adapter = {
621
+ readonly id: string;
622
+ readonly name: string;
623
+ readonly capabilities: Capabilities;
624
+ /**
625
+ * Optional per-script input override resolver. Called by hosts at script
626
+ * mount with the script id/name and merged over manifest defaults by the
627
+ * runtime.
628
+ *
629
+ * @since 0.4
630
+ * @stable
631
+ * @example
632
+ * const resolveInputs: Adapter["resolveInputs"] = (scriptId) => ({
633
+ * length: scriptId === "demo" ? 20 : 14,
634
+ * });
635
+ * void resolveInputs;
636
+ */
637
+ readonly resolveInputs?: (scriptId: string) => Readonly<Record<string, unknown>>;
638
+ /**
639
+ * Optional per-mount symbol metadata payload used to populate
640
+ * `syminfo.*`. Fields are still gated by `capabilities.symInfoFields`.
641
+ *
642
+ * @since 0.4
643
+ * @stable
644
+ * @example
645
+ * const info: Adapter["symInfo"] = { ticker: "DEMO" };
646
+ * void info;
647
+ */
648
+ readonly symInfo?: AdapterSymInfo;
649
+ candles(opts: {
650
+ interval: string | "chart";
651
+ }): AsyncIterable<CandleEvent>;
652
+ onEmissions(emissions: RunnerEmissions): void;
653
+ dispose(): void;
654
+ };
655
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,aAAa,EACb,GAAG,EACH,KAAK,EACL,aAAa,IAAI,iBAAiB,EAClC,WAAW,IAAI,eAAe,EAC9B,SAAS,IAAI,aAAa,EAC1B,QAAQ,IAAI,YAAY,EACxB,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,UAAU,EACb,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GACjB;IACI,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC/B,GACD;IACI,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,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Aa,CAAC,sBAAsB,CAAC,CAAC;IAChE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,OAAO,GAAG;IAClB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACjF;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC,OAAO,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IAC1E,WAAW,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI,CAAC;IAC9C,OAAO,IAAI,IAAI,CAAC;CACnB,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,4 @@
1
+ // Copyright (c) 2026 Invinite. Licensed under the MIT License.
2
+ // See the LICENSE file in the repo root for full license text.
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D"}