@tradecanvas/mcp 0.0.0-stage → 1.32.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.
@@ -0,0 +1,8 @@
1
+ /** Edits (insert, delete, change one character) from `a` to `b`. */
2
+ export declare function editDistance(a: string, b: string): number;
3
+ /**
4
+ * The candidates closest to `word`, best first: the same word in another case,
5
+ * then the fewest edits within reach, then candidates that contain it.
6
+ */
7
+ export declare function closest(word: string, candidates: readonly string[], limit?: number): string[];
8
+ //# sourceMappingURL=similar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"similar.d.ts","sourceRoot":"","sources":["../src/similar.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAWzD;AAKD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,SAAI,GAAG,MAAM,EAAE,CAcxF"}
@@ -0,0 +1,23 @@
1
+ import { Catalog } from './catalog.js';
2
+ /** What a tool answers: data for clients that read structured content, and the same as text for the rest. */
3
+ export interface ToolResult {
4
+ text: string;
5
+ data: unknown;
6
+ isError?: boolean;
7
+ }
8
+ export interface ToolDefinition {
9
+ name: string;
10
+ title: string;
11
+ description: string;
12
+ inputSchema: {
13
+ type: 'object';
14
+ properties: Record<string, unknown>;
15
+ required?: string[];
16
+ additionalProperties: false;
17
+ };
18
+ run(args: Record<string, unknown>, catalog: Catalog): ToolResult;
19
+ }
20
+ export declare const TOOLS: readonly ToolDefinition[];
21
+ /** Runs a tool by name. Bad arguments come back as a tool error the agent can read and fix. */
22
+ export declare function runTool(name: string, args: Record<string, unknown>, catalog?: Catalog): ToolResult;
23
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAsD,MAAM,cAAc,CAAC;AAIlH,6GAA6G;AAC7G,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,oBAAoB,EAAE,KAAK,CAAA;KAAE,CAAC;IACvH,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU,CAAC;CAClE;AAyDD,eAAO,MAAM,KAAK,EAAE,SAAS,cAAc,EA4I1C,CAAC;AAEF,+FAA+F;AAC/F,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAE,OAAiB,GAAG,UAAU,CAI3G"}
@@ -0,0 +1,23 @@
1
+ import { Catalog, Target } from './catalog.js';
2
+ export interface Problem {
3
+ /** Where, as `chartOptions.renderer` or `cells[1].symbol`; '' for the object itself. */
4
+ path: string;
5
+ message: string;
6
+ /** The name or value that was most likely meant. */
7
+ suggestion?: string;
8
+ }
9
+ export interface Validation {
10
+ valid: boolean;
11
+ problems: Problem[];
12
+ /** Things that work, but need one more step. */
13
+ notes: string[];
14
+ }
15
+ /**
16
+ * Checks an options object for `new ChartWidget(el, options)`, `new Chart(el,
17
+ * options)` or `new ChartWidgetGrid(el, options)`: unknown names (with the one
18
+ * likely meant), values outside a union, wrong plain kinds, intervals, feature
19
+ * switches, style overrides and languages, nested options included. Values it
20
+ * cannot judge from JSON (adapters, theme objects, callbacks) pass.
21
+ */
22
+ export declare function validateOptions(target: Target, options: unknown, catalog?: Catalog): Validation;
23
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,OAAO,EAAoB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAG7F,MAAM,WAAW,OAAO;IACtB,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,gDAAgD;IAChD,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AA2LD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE,OAAiB,GAAG,UAAU,CAIxG"}
package/package.json CHANGED
@@ -1,6 +1,58 @@
1
1
  {
2
2
  "name": "@tradecanvas/mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.32.0",
4
+ "type": "module",
5
+ "description": "An MCP server for TradeCanvas: coding agents look up its indicators, drawing tools, options, feature switches and style keys, and check an options object before they use it.",
6
+ "license": "MIT",
7
+ "funding": {
8
+ "type": "github",
9
+ "url": "https://github.com/sponsors/bonguynvan"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/bonguynvan/tradecanvas.git",
14
+ "directory": "packages/mcp"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "keywords": [
20
+ "mcp",
21
+ "model-context-protocol",
22
+ "ai",
23
+ "coding-agent",
24
+ "trading",
25
+ "charts",
26
+ "tradecanvas"
27
+ ],
28
+ "homepage": "https://tradecanvas.dev/",
29
+ "bin": {
30
+ "tradecanvas-mcp": "./dist/cli.js"
31
+ },
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js"
36
+ }
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "README.md"
41
+ ],
42
+ "engines": {
43
+ "node": ">=20.19"
44
+ },
45
+ "dependencies": {
46
+ "@tradecanvas/commons": "1.32.0"
47
+ },
48
+ "devDependencies": {
49
+ "vitest": "^2.1.8"
50
+ },
51
+ "scripts": {
52
+ "build": "vite build",
53
+ "dev": "vite build --watch",
54
+ "clean": "rm -rf dist",
55
+ "test": "vitest run",
56
+ "test:watch": "vitest"
57
+ }
6
58
  }