@continuumdao/continuum-node-sdk 1.3.7 → 1.3.8

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 (62) hide show
  1. package/dist/core/chart/index.d.ts +6 -0
  2. package/dist/core/chart/index.d.ts.map +1 -0
  3. package/dist/core/chart/index.js +6 -0
  4. package/dist/core/chart/index.js.map +1 -0
  5. package/dist/core/chart/keygen-format.d.ts +21 -0
  6. package/dist/core/chart/keygen-format.d.ts.map +1 -0
  7. package/dist/core/chart/keygen-format.js +43 -0
  8. package/dist/core/chart/keygen-format.js.map +1 -0
  9. package/dist/core/chart/ohlcv.d.ts +21 -0
  10. package/dist/core/chart/ohlcv.d.ts.map +1 -0
  11. package/dist/core/chart/ohlcv.js +54 -0
  12. package/dist/core/chart/ohlcv.js.map +1 -0
  13. package/dist/core/chart/overlay-schemas.d.ts +385 -0
  14. package/dist/core/chart/overlay-schemas.d.ts.map +1 -0
  15. package/dist/core/chart/overlay-schemas.js +99 -0
  16. package/dist/core/chart/overlay-schemas.js.map +1 -0
  17. package/dist/core/chart/overlays.d.ts +7 -0
  18. package/dist/core/chart/overlays.d.ts.map +1 -0
  19. package/dist/core/chart/overlays.js +579 -0
  20. package/dist/core/chart/overlays.js.map +1 -0
  21. package/dist/core/chart/panes.d.ts +7 -0
  22. package/dist/core/chart/panes.d.ts.map +1 -0
  23. package/dist/core/chart/panes.js +30 -0
  24. package/dist/core/chart/panes.js.map +1 -0
  25. package/dist/core/chart/prepare.d.ts +5 -0
  26. package/dist/core/chart/prepare.d.ts.map +1 -0
  27. package/dist/core/chart/prepare.js +175 -0
  28. package/dist/core/chart/prepare.js.map +1 -0
  29. package/dist/core/chart/schemas.d.ts +321 -0
  30. package/dist/core/chart/schemas.d.ts.map +1 -0
  31. package/dist/core/chart/schemas.js +86 -0
  32. package/dist/core/chart/schemas.js.map +1 -0
  33. package/dist/core/chart/volume-direction.d.ts +15 -0
  34. package/dist/core/chart/volume-direction.d.ts.map +1 -0
  35. package/dist/core/chart/volume-direction.js +63 -0
  36. package/dist/core/chart/volume-direction.js.map +1 -0
  37. package/dist/core/keygen-messaging.d.ts +4 -1
  38. package/dist/core/keygen-messaging.d.ts.map +1 -1
  39. package/dist/core/keygen-messaging.js +70 -1
  40. package/dist/core/keygen-messaging.js.map +1 -1
  41. package/dist/core/ta/catalog.d.ts +1 -1
  42. package/dist/core/ta/schemas.d.ts +3 -3
  43. package/dist/mcp/chart.d.ts +3 -0
  44. package/dist/mcp/chart.d.ts.map +1 -0
  45. package/dist/mcp/chart.js +14 -0
  46. package/dist/mcp/chart.js.map +1 -0
  47. package/dist/mcp/keygen-messaging.d.ts.map +1 -1
  48. package/dist/mcp/keygen-messaging.js +13 -3
  49. package/dist/mcp/keygen-messaging.js.map +1 -1
  50. package/dist/mcp/register.d.ts.map +1 -1
  51. package/dist/mcp/register.js +3 -0
  52. package/dist/mcp/register.js.map +1 -1
  53. package/dist/mcp/resources/agent-mcp-servers.md +34 -0
  54. package/dist/mcp/resources/chart.md +186 -0
  55. package/dist/mcp/resources/keygen.md +8 -1
  56. package/dist/mcp/resources/overview.md +1 -0
  57. package/dist/mcp/resources/technical-indicators.md +3 -1
  58. package/dist/schemas/extended.d.ts +26 -0
  59. package/dist/schemas/extended.d.ts.map +1 -1
  60. package/dist/schemas/extended.js +35 -1
  61. package/dist/schemas/extended.js.map +1 -1
  62. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ export { prepareChart, isChartV1Payload } from './prepare.js';
2
+ export { expandChartOverlays } from './overlays.js';
3
+ export { buildChartAttachmentRef, formatChartKeyGenFence, formatMpcTaskResultChartsYaml, sha256HexUtf8, type ChartAttachmentRef, } from './keygen-format.js';
4
+ export { ohlcvToPrepareChartInput, type OhlcvRow, type OhlcvToPrepareChartInputOptions } from './ohlcv.js';
5
+ export { CHART_V1_KIND, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_MAX_POINTS, PrepareChartInputSchema, PrepareChartOutputSchema, ChartV1PayloadSchema, type PrepareChartInput, type PrepareChartOutput, type ChartV1Payload, type ChartSeriesType, type ChartTime, } from './schemas.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAClD,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,6BAA6B,EAC7B,aAAa,EACb,KAAK,kBAAkB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,wBAAwB,EAAE,KAAK,QAAQ,EAAE,KAAK,+BAA+B,EAAC,MAAM,YAAY,CAAC;AACzG,OAAO,EACN,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,SAAS,GACd,MAAM,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { prepareChart, isChartV1Payload } from './prepare.js';
2
+ export { expandChartOverlays } from './overlays.js';
3
+ export { buildChartAttachmentRef, formatChartKeyGenFence, formatMpcTaskResultChartsYaml, sha256HexUtf8, } from './keygen-format.js';
4
+ export { ohlcvToPrepareChartInput } from './ohlcv.js';
5
+ export { CHART_V1_KIND, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_MAX_POINTS, PrepareChartInputSchema, PrepareChartOutputSchema, ChartV1PayloadSchema, } from './schemas.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAClD,OAAO,EACN,uBAAuB,EACvB,sBAAsB,EACtB,6BAA6B,EAC7B,aAAa,GAEb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,wBAAwB,EAAsD,MAAM,YAAY,CAAC;AACzG,OAAO,EACN,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GAMpB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { CHART_V1_KIND, type PrepareChartOutput } from './schemas.js';
2
+ export type ChartAttachmentRef = {
3
+ id?: string;
4
+ title?: string;
5
+ attachmentId: string;
6
+ sha256: string;
7
+ kind: typeof CHART_V1_KIND;
8
+ };
9
+ export declare function sha256HexUtf8(text: string): string;
10
+ /** Build mpc-task-result charts[] ref from a prepare_chart envelope (after upload). */
11
+ export declare function buildChartAttachmentRef(envelope: PrepareChartOutput, upload: {
12
+ attachmentId: string;
13
+ sha256?: string;
14
+ }, options?: {
15
+ id?: string;
16
+ title?: string;
17
+ }): ChartAttachmentRef;
18
+ /** Optional inline fallback for tiny charts when attachment upload is unavailable. */
19
+ export declare function formatChartKeyGenFence(envelope: PrepareChartOutput): string;
20
+ export declare function formatMpcTaskResultChartsYaml(refs: ChartAttachmentRef[]): string;
21
+ //# sourceMappingURL=keygen-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keygen-format.d.ts","sourceRoot":"","sources":["../../../src/core/chart/keygen-format.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAE,KAAK,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,aAAa,CAAC;CAC3B,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,uFAAuF;AACvF,wBAAgB,uBAAuB,CACtC,QAAQ,EAAE,kBAAkB,EAC5B,MAAM,EAAE;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAC,EAC/C,OAAO,CAAC,EAAE;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAC,GACrC,kBAAkB,CASpB;AAED,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAG3E;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAmBhF"}
@@ -0,0 +1,43 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { CHART_V1_KIND } from './schemas.js';
3
+ export function sha256HexUtf8(text) {
4
+ return createHash('sha256').update(text, 'utf8').digest('hex');
5
+ }
6
+ /** Build mpc-task-result charts[] ref from a prepare_chart envelope (after upload). */
7
+ export function buildChartAttachmentRef(envelope, upload, options) {
8
+ const json = JSON.stringify(envelope);
9
+ return {
10
+ id: options?.id?.trim() || undefined,
11
+ title: options?.title?.trim() || envelope.chart.title?.trim() || undefined,
12
+ attachmentId: upload.attachmentId.trim(),
13
+ sha256: (upload.sha256 ?? sha256HexUtf8(json)).trim(),
14
+ kind: CHART_V1_KIND,
15
+ };
16
+ }
17
+ /** Optional inline fallback for tiny charts when attachment upload is unavailable. */
18
+ export function formatChartKeyGenFence(envelope) {
19
+ const json = JSON.stringify(envelope);
20
+ return '```continuum/chart/v1\n' + json + '\n```';
21
+ }
22
+ export function formatMpcTaskResultChartsYaml(refs) {
23
+ if (refs.length === 0) {
24
+ return '';
25
+ }
26
+ const lines = ['charts:'];
27
+ for (const ref of refs) {
28
+ if (ref.id?.trim()) {
29
+ lines.push(` - id: ${ref.id.trim()}`);
30
+ }
31
+ else {
32
+ lines.push(' -');
33
+ }
34
+ if (ref.title?.trim()) {
35
+ lines.push(` title: ${JSON.stringify(ref.title.trim())}`);
36
+ }
37
+ lines.push(` attachmentId: ${ref.attachmentId}`);
38
+ lines.push(` sha256: ${ref.sha256}`);
39
+ lines.push(` kind: ${ref.kind}`);
40
+ }
41
+ return lines.join('\n');
42
+ }
43
+ //# sourceMappingURL=keygen-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keygen-format.js","sourceRoot":"","sources":["../../../src/core/chart/keygen-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,EAAC,aAAa,EAA0B,MAAM,cAAc,CAAC;AAUpE,MAAM,UAAU,aAAa,CAAC,IAAY;IACzC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,uBAAuB,CACtC,QAA4B,EAC5B,MAA+C,EAC/C,OAAuC;IAEvC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO;QACN,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,SAAS;QACpC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,SAAS;QAC1E,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE;QACxC,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE;QACrD,IAAI,EAAE,aAAa;KACnB,CAAC;AACH,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,sBAAsB,CAAC,QAA4B;IAClE,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,yBAAyB,GAAG,IAAI,GAAG,OAAO,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,IAA0B;IACvE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACX,CAAC;IACD,MAAM,KAAK,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,IAAI,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC;YACpB,KAAK,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACP,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;QACD,IAAI,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC;YACvB,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9D,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,qBAAqB,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;QACpD,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QACxC,KAAK,CAAC,IAAI,CAAC,aAAa,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { PrepareChartInput } from './schemas.js';
2
+ export type OhlcvRow = {
3
+ timeMs?: number;
4
+ timeSec?: number;
5
+ time?: string | number;
6
+ open: number;
7
+ high: number;
8
+ low: number;
9
+ close: number;
10
+ volume?: number;
11
+ };
12
+ export type OhlcvToPrepareChartInputOptions = {
13
+ title?: string;
14
+ height?: number;
15
+ maxPoints?: number;
16
+ includeVolume?: boolean;
17
+ label?: string;
18
+ };
19
+ /** Map generic OHLCV rows to prepareChart input (candlestick + optional volume histogram). */
20
+ export declare function ohlcvToPrepareChartInput(rows: OhlcvRow[], options: OhlcvToPrepareChartInputOptions): PrepareChartInput;
21
+ //# sourceMappingURL=ohlcv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ohlcv.d.ts","sourceRoot":"","sources":["../../../src/core/chart/ohlcv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,QAAQ,GAAG;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAeF,8FAA8F;AAC9F,wBAAgB,wBAAwB,CACvC,IAAI,EAAE,QAAQ,EAAE,EAChB,OAAO,EAAE,+BAA+B,GACtC,iBAAiB,CA0CnB"}
@@ -0,0 +1,54 @@
1
+ function rowTime(raw) {
2
+ if (raw.time != null) {
3
+ return raw.time;
4
+ }
5
+ if (raw.timeSec != null && Number.isFinite(raw.timeSec)) {
6
+ return raw.timeSec;
7
+ }
8
+ if (raw.timeMs != null && Number.isFinite(raw.timeMs)) {
9
+ return raw.timeMs;
10
+ }
11
+ return null;
12
+ }
13
+ /** Map generic OHLCV rows to prepareChart input (candlestick + optional volume histogram). */
14
+ export function ohlcvToPrepareChartInput(rows, options) {
15
+ const includeVolume = options.includeVolume !== false;
16
+ const candles = rows
17
+ .map((row) => {
18
+ const time = rowTime(row);
19
+ if (time == null) {
20
+ return null;
21
+ }
22
+ return {
23
+ time,
24
+ open: row.open,
25
+ high: row.high,
26
+ low: row.low,
27
+ close: row.close,
28
+ };
29
+ })
30
+ .filter((row) => row != null);
31
+ const label = options.label ?? 'Price';
32
+ const input = {
33
+ ...(options.title?.trim() ? { title: options.title.trim() } : {}),
34
+ height: options.height,
35
+ ...(options.maxPoints != null ? { options: { maxPoints: options.maxPoints } } : {}),
36
+ series: [{ id: 'candles', type: 'candlestick', label, data: candles }],
37
+ };
38
+ if (includeVolume) {
39
+ const volume = rows
40
+ .map((row) => {
41
+ const time = rowTime(row);
42
+ if (time == null || row.volume == null || !Number.isFinite(row.volume)) {
43
+ return null;
44
+ }
45
+ return { time, value: row.volume };
46
+ })
47
+ .filter((row) => row != null);
48
+ if (volume.length > 0) {
49
+ input.series.push({ id: 'volume', type: 'histogram', label: 'Volume', data: volume });
50
+ }
51
+ }
52
+ return input;
53
+ }
54
+ //# sourceMappingURL=ohlcv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ohlcv.js","sourceRoot":"","sources":["../../../src/core/chart/ohlcv.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,385 @@
1
+ import { z } from 'zod';
2
+ export declare const ChartMaOverlaySchema: z.ZodObject<{
3
+ type: z.ZodEnum<{
4
+ sma: "sma";
5
+ ema: "ema";
6
+ }>;
7
+ sourceSeriesId: z.ZodString;
8
+ period: z.ZodOptional<z.ZodNumber>;
9
+ id: z.ZodOptional<z.ZodString>;
10
+ label: z.ZodOptional<z.ZodString>;
11
+ overlay: z.ZodOptional<z.ZodBoolean>;
12
+ priceScaleId: z.ZodOptional<z.ZodEnum<{
13
+ left: "left";
14
+ right: "right";
15
+ }>>;
16
+ style: z.ZodOptional<z.ZodObject<{
17
+ color: z.ZodOptional<z.ZodString>;
18
+ lineWidth: z.ZodOptional<z.ZodNumber>;
19
+ lineStyle: z.ZodOptional<z.ZodEnum<{
20
+ solid: "solid";
21
+ dashed: "dashed";
22
+ dotted: "dotted";
23
+ }>>;
24
+ }, z.core.$strict>>;
25
+ }, z.core.$strict>;
26
+ export declare const ChartBollingerOverlaySchema: z.ZodObject<{
27
+ type: z.ZodLiteral<"bollinger">;
28
+ sourceSeriesId: z.ZodString;
29
+ period: z.ZodOptional<z.ZodNumber>;
30
+ stdDev: z.ZodOptional<z.ZodNumber>;
31
+ id: z.ZodOptional<z.ZodString>;
32
+ overlay: z.ZodOptional<z.ZodBoolean>;
33
+ priceScaleId: z.ZodOptional<z.ZodEnum<{
34
+ left: "left";
35
+ right: "right";
36
+ }>>;
37
+ style: z.ZodOptional<z.ZodObject<{
38
+ color: z.ZodOptional<z.ZodString>;
39
+ lineWidth: z.ZodOptional<z.ZodNumber>;
40
+ lineStyle: z.ZodOptional<z.ZodEnum<{
41
+ solid: "solid";
42
+ dashed: "dashed";
43
+ dotted: "dotted";
44
+ }>>;
45
+ }, z.core.$strict>>;
46
+ }, z.core.$strict>;
47
+ export declare const ChartFibonacciRangeSchema: z.ZodObject<{
48
+ high: z.ZodNumber;
49
+ low: z.ZodNumber;
50
+ trend: z.ZodEnum<{
51
+ up: "up";
52
+ down: "down";
53
+ }>;
54
+ }, z.core.$strict>;
55
+ export declare const ChartFibonacciOverlaySchema: z.ZodObject<{
56
+ type: z.ZodLiteral<"fibonacci">;
57
+ sourceSeriesId: z.ZodOptional<z.ZodString>;
58
+ range: z.ZodOptional<z.ZodObject<{
59
+ high: z.ZodNumber;
60
+ low: z.ZodNumber;
61
+ trend: z.ZodEnum<{
62
+ up: "up";
63
+ down: "down";
64
+ }>;
65
+ }, z.core.$strict>>;
66
+ levels: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
67
+ trend: z.ZodOptional<z.ZodEnum<{
68
+ up: "up";
69
+ down: "down";
70
+ }>>;
71
+ id: z.ZodOptional<z.ZodString>;
72
+ overlay: z.ZodOptional<z.ZodBoolean>;
73
+ priceScaleId: z.ZodOptional<z.ZodEnum<{
74
+ left: "left";
75
+ right: "right";
76
+ }>>;
77
+ style: z.ZodOptional<z.ZodObject<{
78
+ color: z.ZodOptional<z.ZodString>;
79
+ lineWidth: z.ZodOptional<z.ZodNumber>;
80
+ lineStyle: z.ZodOptional<z.ZodEnum<{
81
+ solid: "solid";
82
+ dashed: "dashed";
83
+ dotted: "dotted";
84
+ }>>;
85
+ }, z.core.$strict>>;
86
+ }, z.core.$strict>;
87
+ export declare const ChartRsiOverlaySchema: z.ZodObject<{
88
+ type: z.ZodLiteral<"rsi">;
89
+ sourceSeriesId: z.ZodString;
90
+ period: z.ZodOptional<z.ZodNumber>;
91
+ id: z.ZodOptional<z.ZodString>;
92
+ label: z.ZodOptional<z.ZodString>;
93
+ style: z.ZodOptional<z.ZodObject<{
94
+ color: z.ZodOptional<z.ZodString>;
95
+ lineWidth: z.ZodOptional<z.ZodNumber>;
96
+ lineStyle: z.ZodOptional<z.ZodEnum<{
97
+ solid: "solid";
98
+ dashed: "dashed";
99
+ dotted: "dotted";
100
+ }>>;
101
+ }, z.core.$strict>>;
102
+ }, z.core.$strict>;
103
+ export declare const ChartMacdOverlaySchema: z.ZodObject<{
104
+ type: z.ZodLiteral<"macd">;
105
+ sourceSeriesId: z.ZodString;
106
+ fastPeriod: z.ZodOptional<z.ZodNumber>;
107
+ slowPeriod: z.ZodOptional<z.ZodNumber>;
108
+ signalPeriod: z.ZodOptional<z.ZodNumber>;
109
+ id: z.ZodOptional<z.ZodString>;
110
+ style: z.ZodOptional<z.ZodObject<{
111
+ color: z.ZodOptional<z.ZodString>;
112
+ lineWidth: z.ZodOptional<z.ZodNumber>;
113
+ lineStyle: z.ZodOptional<z.ZodEnum<{
114
+ solid: "solid";
115
+ dashed: "dashed";
116
+ dotted: "dotted";
117
+ }>>;
118
+ }, z.core.$strict>>;
119
+ }, z.core.$strict>;
120
+ export declare const ChartStochasticRsiOverlaySchema: z.ZodObject<{
121
+ type: z.ZodLiteral<"stochasticrsi">;
122
+ sourceSeriesId: z.ZodString;
123
+ rsiPeriod: z.ZodOptional<z.ZodNumber>;
124
+ stochasticPeriod: z.ZodOptional<z.ZodNumber>;
125
+ kPeriod: z.ZodOptional<z.ZodNumber>;
126
+ dPeriod: z.ZodOptional<z.ZodNumber>;
127
+ id: z.ZodOptional<z.ZodString>;
128
+ style: z.ZodOptional<z.ZodObject<{
129
+ color: z.ZodOptional<z.ZodString>;
130
+ lineWidth: z.ZodOptional<z.ZodNumber>;
131
+ lineStyle: z.ZodOptional<z.ZodEnum<{
132
+ solid: "solid";
133
+ dashed: "dashed";
134
+ dotted: "dotted";
135
+ }>>;
136
+ }, z.core.$strict>>;
137
+ }, z.core.$strict>;
138
+ export declare const ChartOverlayInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
139
+ type: z.ZodEnum<{
140
+ sma: "sma";
141
+ ema: "ema";
142
+ }>;
143
+ sourceSeriesId: z.ZodString;
144
+ period: z.ZodOptional<z.ZodNumber>;
145
+ id: z.ZodOptional<z.ZodString>;
146
+ label: z.ZodOptional<z.ZodString>;
147
+ overlay: z.ZodOptional<z.ZodBoolean>;
148
+ priceScaleId: z.ZodOptional<z.ZodEnum<{
149
+ left: "left";
150
+ right: "right";
151
+ }>>;
152
+ style: z.ZodOptional<z.ZodObject<{
153
+ color: z.ZodOptional<z.ZodString>;
154
+ lineWidth: z.ZodOptional<z.ZodNumber>;
155
+ lineStyle: z.ZodOptional<z.ZodEnum<{
156
+ solid: "solid";
157
+ dashed: "dashed";
158
+ dotted: "dotted";
159
+ }>>;
160
+ }, z.core.$strict>>;
161
+ }, z.core.$strict>, z.ZodObject<{
162
+ type: z.ZodLiteral<"bollinger">;
163
+ sourceSeriesId: z.ZodString;
164
+ period: z.ZodOptional<z.ZodNumber>;
165
+ stdDev: z.ZodOptional<z.ZodNumber>;
166
+ id: z.ZodOptional<z.ZodString>;
167
+ overlay: z.ZodOptional<z.ZodBoolean>;
168
+ priceScaleId: z.ZodOptional<z.ZodEnum<{
169
+ left: "left";
170
+ right: "right";
171
+ }>>;
172
+ style: z.ZodOptional<z.ZodObject<{
173
+ color: z.ZodOptional<z.ZodString>;
174
+ lineWidth: z.ZodOptional<z.ZodNumber>;
175
+ lineStyle: z.ZodOptional<z.ZodEnum<{
176
+ solid: "solid";
177
+ dashed: "dashed";
178
+ dotted: "dotted";
179
+ }>>;
180
+ }, z.core.$strict>>;
181
+ }, z.core.$strict>, z.ZodObject<{
182
+ type: z.ZodLiteral<"fibonacci">;
183
+ sourceSeriesId: z.ZodOptional<z.ZodString>;
184
+ range: z.ZodOptional<z.ZodObject<{
185
+ high: z.ZodNumber;
186
+ low: z.ZodNumber;
187
+ trend: z.ZodEnum<{
188
+ up: "up";
189
+ down: "down";
190
+ }>;
191
+ }, z.core.$strict>>;
192
+ levels: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
193
+ trend: z.ZodOptional<z.ZodEnum<{
194
+ up: "up";
195
+ down: "down";
196
+ }>>;
197
+ id: z.ZodOptional<z.ZodString>;
198
+ overlay: z.ZodOptional<z.ZodBoolean>;
199
+ priceScaleId: z.ZodOptional<z.ZodEnum<{
200
+ left: "left";
201
+ right: "right";
202
+ }>>;
203
+ style: z.ZodOptional<z.ZodObject<{
204
+ color: z.ZodOptional<z.ZodString>;
205
+ lineWidth: z.ZodOptional<z.ZodNumber>;
206
+ lineStyle: z.ZodOptional<z.ZodEnum<{
207
+ solid: "solid";
208
+ dashed: "dashed";
209
+ dotted: "dotted";
210
+ }>>;
211
+ }, z.core.$strict>>;
212
+ }, z.core.$strict>, z.ZodObject<{
213
+ type: z.ZodLiteral<"rsi">;
214
+ sourceSeriesId: z.ZodString;
215
+ period: z.ZodOptional<z.ZodNumber>;
216
+ id: z.ZodOptional<z.ZodString>;
217
+ label: z.ZodOptional<z.ZodString>;
218
+ style: z.ZodOptional<z.ZodObject<{
219
+ color: z.ZodOptional<z.ZodString>;
220
+ lineWidth: z.ZodOptional<z.ZodNumber>;
221
+ lineStyle: z.ZodOptional<z.ZodEnum<{
222
+ solid: "solid";
223
+ dashed: "dashed";
224
+ dotted: "dotted";
225
+ }>>;
226
+ }, z.core.$strict>>;
227
+ }, z.core.$strict>, z.ZodObject<{
228
+ type: z.ZodLiteral<"macd">;
229
+ sourceSeriesId: z.ZodString;
230
+ fastPeriod: z.ZodOptional<z.ZodNumber>;
231
+ slowPeriod: z.ZodOptional<z.ZodNumber>;
232
+ signalPeriod: z.ZodOptional<z.ZodNumber>;
233
+ id: z.ZodOptional<z.ZodString>;
234
+ style: z.ZodOptional<z.ZodObject<{
235
+ color: z.ZodOptional<z.ZodString>;
236
+ lineWidth: z.ZodOptional<z.ZodNumber>;
237
+ lineStyle: z.ZodOptional<z.ZodEnum<{
238
+ solid: "solid";
239
+ dashed: "dashed";
240
+ dotted: "dotted";
241
+ }>>;
242
+ }, z.core.$strict>>;
243
+ }, z.core.$strict>, z.ZodObject<{
244
+ type: z.ZodLiteral<"stochasticrsi">;
245
+ sourceSeriesId: z.ZodString;
246
+ rsiPeriod: z.ZodOptional<z.ZodNumber>;
247
+ stochasticPeriod: z.ZodOptional<z.ZodNumber>;
248
+ kPeriod: z.ZodOptional<z.ZodNumber>;
249
+ dPeriod: z.ZodOptional<z.ZodNumber>;
250
+ id: z.ZodOptional<z.ZodString>;
251
+ style: z.ZodOptional<z.ZodObject<{
252
+ color: z.ZodOptional<z.ZodString>;
253
+ lineWidth: z.ZodOptional<z.ZodNumber>;
254
+ lineStyle: z.ZodOptional<z.ZodEnum<{
255
+ solid: "solid";
256
+ dashed: "dashed";
257
+ dotted: "dotted";
258
+ }>>;
259
+ }, z.core.$strict>>;
260
+ }, z.core.$strict>], "type">;
261
+ export declare const PrepareChartOverlaysSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
262
+ type: z.ZodEnum<{
263
+ sma: "sma";
264
+ ema: "ema";
265
+ }>;
266
+ sourceSeriesId: z.ZodString;
267
+ period: z.ZodOptional<z.ZodNumber>;
268
+ id: z.ZodOptional<z.ZodString>;
269
+ label: z.ZodOptional<z.ZodString>;
270
+ overlay: z.ZodOptional<z.ZodBoolean>;
271
+ priceScaleId: z.ZodOptional<z.ZodEnum<{
272
+ left: "left";
273
+ right: "right";
274
+ }>>;
275
+ style: z.ZodOptional<z.ZodObject<{
276
+ color: z.ZodOptional<z.ZodString>;
277
+ lineWidth: z.ZodOptional<z.ZodNumber>;
278
+ lineStyle: z.ZodOptional<z.ZodEnum<{
279
+ solid: "solid";
280
+ dashed: "dashed";
281
+ dotted: "dotted";
282
+ }>>;
283
+ }, z.core.$strict>>;
284
+ }, z.core.$strict>, z.ZodObject<{
285
+ type: z.ZodLiteral<"bollinger">;
286
+ sourceSeriesId: z.ZodString;
287
+ period: z.ZodOptional<z.ZodNumber>;
288
+ stdDev: z.ZodOptional<z.ZodNumber>;
289
+ id: z.ZodOptional<z.ZodString>;
290
+ overlay: z.ZodOptional<z.ZodBoolean>;
291
+ priceScaleId: z.ZodOptional<z.ZodEnum<{
292
+ left: "left";
293
+ right: "right";
294
+ }>>;
295
+ style: z.ZodOptional<z.ZodObject<{
296
+ color: z.ZodOptional<z.ZodString>;
297
+ lineWidth: z.ZodOptional<z.ZodNumber>;
298
+ lineStyle: z.ZodOptional<z.ZodEnum<{
299
+ solid: "solid";
300
+ dashed: "dashed";
301
+ dotted: "dotted";
302
+ }>>;
303
+ }, z.core.$strict>>;
304
+ }, z.core.$strict>, z.ZodObject<{
305
+ type: z.ZodLiteral<"fibonacci">;
306
+ sourceSeriesId: z.ZodOptional<z.ZodString>;
307
+ range: z.ZodOptional<z.ZodObject<{
308
+ high: z.ZodNumber;
309
+ low: z.ZodNumber;
310
+ trend: z.ZodEnum<{
311
+ up: "up";
312
+ down: "down";
313
+ }>;
314
+ }, z.core.$strict>>;
315
+ levels: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
316
+ trend: z.ZodOptional<z.ZodEnum<{
317
+ up: "up";
318
+ down: "down";
319
+ }>>;
320
+ id: z.ZodOptional<z.ZodString>;
321
+ overlay: z.ZodOptional<z.ZodBoolean>;
322
+ priceScaleId: z.ZodOptional<z.ZodEnum<{
323
+ left: "left";
324
+ right: "right";
325
+ }>>;
326
+ style: z.ZodOptional<z.ZodObject<{
327
+ color: z.ZodOptional<z.ZodString>;
328
+ lineWidth: z.ZodOptional<z.ZodNumber>;
329
+ lineStyle: z.ZodOptional<z.ZodEnum<{
330
+ solid: "solid";
331
+ dashed: "dashed";
332
+ dotted: "dotted";
333
+ }>>;
334
+ }, z.core.$strict>>;
335
+ }, z.core.$strict>, z.ZodObject<{
336
+ type: z.ZodLiteral<"rsi">;
337
+ sourceSeriesId: z.ZodString;
338
+ period: z.ZodOptional<z.ZodNumber>;
339
+ id: z.ZodOptional<z.ZodString>;
340
+ label: z.ZodOptional<z.ZodString>;
341
+ style: z.ZodOptional<z.ZodObject<{
342
+ color: z.ZodOptional<z.ZodString>;
343
+ lineWidth: z.ZodOptional<z.ZodNumber>;
344
+ lineStyle: z.ZodOptional<z.ZodEnum<{
345
+ solid: "solid";
346
+ dashed: "dashed";
347
+ dotted: "dotted";
348
+ }>>;
349
+ }, z.core.$strict>>;
350
+ }, z.core.$strict>, z.ZodObject<{
351
+ type: z.ZodLiteral<"macd">;
352
+ sourceSeriesId: z.ZodString;
353
+ fastPeriod: z.ZodOptional<z.ZodNumber>;
354
+ slowPeriod: z.ZodOptional<z.ZodNumber>;
355
+ signalPeriod: z.ZodOptional<z.ZodNumber>;
356
+ id: z.ZodOptional<z.ZodString>;
357
+ style: z.ZodOptional<z.ZodObject<{
358
+ color: z.ZodOptional<z.ZodString>;
359
+ lineWidth: z.ZodOptional<z.ZodNumber>;
360
+ lineStyle: z.ZodOptional<z.ZodEnum<{
361
+ solid: "solid";
362
+ dashed: "dashed";
363
+ dotted: "dotted";
364
+ }>>;
365
+ }, z.core.$strict>>;
366
+ }, z.core.$strict>, z.ZodObject<{
367
+ type: z.ZodLiteral<"stochasticrsi">;
368
+ sourceSeriesId: z.ZodString;
369
+ rsiPeriod: z.ZodOptional<z.ZodNumber>;
370
+ stochasticPeriod: z.ZodOptional<z.ZodNumber>;
371
+ kPeriod: z.ZodOptional<z.ZodNumber>;
372
+ dPeriod: z.ZodOptional<z.ZodNumber>;
373
+ id: z.ZodOptional<z.ZodString>;
374
+ style: z.ZodOptional<z.ZodObject<{
375
+ color: z.ZodOptional<z.ZodString>;
376
+ lineWidth: z.ZodOptional<z.ZodNumber>;
377
+ lineStyle: z.ZodOptional<z.ZodEnum<{
378
+ solid: "solid";
379
+ dashed: "dashed";
380
+ dotted: "dotted";
381
+ }>>;
382
+ }, z.core.$strict>>;
383
+ }, z.core.$strict>], "type">>;
384
+ export type ChartOverlayInput = z.infer<typeof ChartOverlayInputSchema>;
385
+ //# sourceMappingURL=overlay-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay-schemas.d.ts","sourceRoot":"","sources":["../../../src/core/chart/overlay-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAUtB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;kBAWvB,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;kBAW9B,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;kBAM5B,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgBrC,CAAC;AAEJ,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;kBASxB,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;kBAUzB,CAAC;AAEX,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;kBAWlC,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAOlC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAA0C,CAAC;AAElF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { z } from 'zod';
2
+ const overlayStyleSchema = z
3
+ .object({
4
+ color: z.string().min(1).optional(),
5
+ lineWidth: z.number().positive().optional(),
6
+ lineStyle: z.enum(['solid', 'dashed', 'dotted']).optional(),
7
+ })
8
+ .strict();
9
+ export const ChartMaOverlaySchema = z
10
+ .object({
11
+ type: z.enum(['sma', 'ema']),
12
+ sourceSeriesId: z.string().min(1).max(64),
13
+ period: z.number().int().min(2).max(500).optional(),
14
+ id: z.string().min(1).max(64).optional(),
15
+ label: z.string().min(1).max(128).optional(),
16
+ overlay: z.boolean().optional(),
17
+ priceScaleId: z.enum(['left', 'right']).optional(),
18
+ style: overlayStyleSchema.optional(),
19
+ })
20
+ .strict();
21
+ export const ChartBollingerOverlaySchema = z
22
+ .object({
23
+ type: z.literal('bollinger'),
24
+ sourceSeriesId: z.string().min(1).max(64),
25
+ period: z.number().int().min(2).max(500).optional(),
26
+ stdDev: z.number().positive().max(10).optional(),
27
+ id: z.string().min(1).max(64).optional(),
28
+ overlay: z.boolean().optional(),
29
+ priceScaleId: z.enum(['left', 'right']).optional(),
30
+ style: overlayStyleSchema.optional(),
31
+ })
32
+ .strict();
33
+ export const ChartFibonacciRangeSchema = z
34
+ .object({
35
+ high: z.number(),
36
+ low: z.number(),
37
+ trend: z.enum(['up', 'down']),
38
+ })
39
+ .strict();
40
+ export const ChartFibonacciOverlaySchema = z
41
+ .object({
42
+ type: z.literal('fibonacci'),
43
+ sourceSeriesId: z.string().min(1).max(64).optional(),
44
+ range: ChartFibonacciRangeSchema.optional(),
45
+ /** Subset of retracement ratios; default all standard levels (0 … 1). */
46
+ levels: z.array(z.number().min(0).max(1)).min(1).max(12).optional(),
47
+ trend: z.enum(['up', 'down']).optional(),
48
+ id: z.string().min(1).max(64).optional(),
49
+ overlay: z.boolean().optional(),
50
+ priceScaleId: z.enum(['left', 'right']).optional(),
51
+ style: overlayStyleSchema.optional(),
52
+ })
53
+ .strict()
54
+ .refine(o => o.sourceSeriesId != null || o.range != null, {
55
+ message: 'Fibonacci overlay requires sourceSeriesId and/or range.',
56
+ });
57
+ export const ChartRsiOverlaySchema = z
58
+ .object({
59
+ type: z.literal('rsi'),
60
+ sourceSeriesId: z.string().min(1).max(64),
61
+ period: z.number().int().min(2).max(500).optional(),
62
+ id: z.string().min(1).max(64).optional(),
63
+ label: z.string().min(1).max(128).optional(),
64
+ style: overlayStyleSchema.optional(),
65
+ })
66
+ .strict();
67
+ export const ChartMacdOverlaySchema = z
68
+ .object({
69
+ type: z.literal('macd'),
70
+ sourceSeriesId: z.string().min(1).max(64),
71
+ fastPeriod: z.number().int().min(2).max(500).optional(),
72
+ slowPeriod: z.number().int().min(2).max(500).optional(),
73
+ signalPeriod: z.number().int().min(2).max(500).optional(),
74
+ id: z.string().min(1).max(64).optional(),
75
+ style: overlayStyleSchema.optional(),
76
+ })
77
+ .strict();
78
+ export const ChartStochasticRsiOverlaySchema = z
79
+ .object({
80
+ type: z.literal('stochasticrsi'),
81
+ sourceSeriesId: z.string().min(1).max(64),
82
+ rsiPeriod: z.number().int().min(2).max(500).optional(),
83
+ stochasticPeriod: z.number().int().min(2).max(500).optional(),
84
+ kPeriod: z.number().int().min(1).max(500).optional(),
85
+ dPeriod: z.number().int().min(1).max(500).optional(),
86
+ id: z.string().min(1).max(64).optional(),
87
+ style: overlayStyleSchema.optional(),
88
+ })
89
+ .strict();
90
+ export const ChartOverlayInputSchema = z.discriminatedUnion('type', [
91
+ ChartMaOverlaySchema,
92
+ ChartBollingerOverlaySchema,
93
+ ChartFibonacciOverlaySchema,
94
+ ChartRsiOverlaySchema,
95
+ ChartMacdOverlaySchema,
96
+ ChartStochasticRsiOverlaySchema,
97
+ ]);
98
+ export const PrepareChartOverlaysSchema = z.array(ChartOverlayInputSchema).max(8);
99
+ //# sourceMappingURL=overlay-schemas.js.map