@jotx-labs/mcp 2.4.246

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 (45) hide show
  1. package/dist/__tests__/server.test.d.ts +2 -0
  2. package/dist/__tests__/server.test.d.ts.map +1 -0
  3. package/dist/__tests__/server.test.js +28 -0
  4. package/dist/__tests__/server.test.js.map +1 -0
  5. package/dist/__tests__/validation.test.d.ts +2 -0
  6. package/dist/__tests__/validation.test.d.ts.map +1 -0
  7. package/dist/__tests__/validation.test.js +25 -0
  8. package/dist/__tests__/validation.test.js.map +1 -0
  9. package/dist/index.d.ts +23 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +30 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/server.d.ts +35 -0
  14. package/dist/server.d.ts.map +1 -0
  15. package/dist/server.js +131 -0
  16. package/dist/server.js.map +1 -0
  17. package/dist/syntax-guide.d.ts +19 -0
  18. package/dist/syntax-guide.d.ts.map +1 -0
  19. package/dist/syntax-guide.js +342 -0
  20. package/dist/syntax-guide.js.map +1 -0
  21. package/dist/tools/context-tools.d.ts +12 -0
  22. package/dist/tools/context-tools.d.ts.map +1 -0
  23. package/dist/tools/context-tools.js +82 -0
  24. package/dist/tools/context-tools.js.map +1 -0
  25. package/dist/tools/file-tools.d.ts +12 -0
  26. package/dist/tools/file-tools.d.ts.map +1 -0
  27. package/dist/tools/file-tools.js +150 -0
  28. package/dist/tools/file-tools.js.map +1 -0
  29. package/dist/tools/graph-tools.d.ts +12 -0
  30. package/dist/tools/graph-tools.d.ts.map +1 -0
  31. package/dist/tools/graph-tools.js +222 -0
  32. package/dist/tools/graph-tools.js.map +1 -0
  33. package/dist/tools/search-tools.d.ts +12 -0
  34. package/dist/tools/search-tools.d.ts.map +1 -0
  35. package/dist/tools/search-tools.js +63 -0
  36. package/dist/tools/search-tools.js.map +1 -0
  37. package/dist/tools/validation-tools.d.ts +12 -0
  38. package/dist/tools/validation-tools.d.ts.map +1 -0
  39. package/dist/tools/validation-tools.js +159 -0
  40. package/dist/tools/validation-tools.js.map +1 -0
  41. package/dist/types.d.ts +95 -0
  42. package/dist/types.d.ts.map +1 -0
  43. package/dist/types.js +9 -0
  44. package/dist/types.js.map +1 -0
  45. package/package.json +40 -0
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=server.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/server.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const server_1 = require("../server");
4
+ // Mock dependencies
5
+ const mockFileOps = {
6
+ listFiles: jest.fn().mockResolvedValue(['file1.jot', 'file2.jot']),
7
+ readFile: jest.fn().mockResolvedValue('content'),
8
+ writeFile: jest.fn().mockResolvedValue(undefined),
9
+ fileExists: jest.fn().mockResolvedValue(true),
10
+ searchFiles: jest.fn().mockResolvedValue([]),
11
+ };
12
+ const config = {
13
+ workspacePath: '/mock/workspace',
14
+ fileOps: mockFileOps,
15
+ };
16
+ describe('createJotxMCPServer', () => {
17
+ let server;
18
+ beforeEach(() => {
19
+ server = (0, server_1.createJotxMCPServer)(config);
20
+ });
21
+ test('creates an MCP server instance', () => {
22
+ expect(server).toBeDefined();
23
+ });
24
+ // Note: detailed tool verification would require inspecting private server state
25
+ // or integration testing the protocol using a client.
26
+ // For unit tests, we primarily check that the factory runs without error.
27
+ });
28
+ //# sourceMappingURL=server.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.test.js","sourceRoot":"","sources":["../../src/__tests__/server.test.ts"],"names":[],"mappings":";;AAAA,sCAA+C;AAI/C,oBAAoB;AACpB,MAAM,WAAW,GAAY;IACzB,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAClE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;IAChD,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;IACjD,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC;IAC7C,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC;CAC/C,CAAA;AAED,MAAM,MAAM,GAAkB;IAC1B,aAAa,EAAE,iBAAiB;IAChC,OAAO,EAAE,WAAW;CACvB,CAAA;AAED,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACjC,IAAI,MAAiB,CAAA;IAErB,UAAU,CAAC,GAAG,EAAE;QACZ,MAAM,GAAG,IAAA,4BAAmB,EAAC,MAAM,CAAC,CAAA;IACxC,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACxC,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAA;IAChC,CAAC,CAAC,CAAA;IAEF,iFAAiF;IACjF,sDAAsD;IACtD,0EAA0E;AAC9E,CAAC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/validation.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // Mock dependencies
4
+ const mockFileOps = {
5
+ listFiles: jest.fn(),
6
+ readFile: jest.fn(),
7
+ writeFile: jest.fn(),
8
+ fileExists: jest.fn(),
9
+ searchFiles: jest.fn(),
10
+ };
11
+ const config = {
12
+ workspacePath: '/mock/workspace',
13
+ fileOps: mockFileOps,
14
+ syntaxGuidePath: '/mock/syntax.jot',
15
+ };
16
+ describe('MCP Validation Tools', () => {
17
+ // These tests integration-test the validation logic via the server factory
18
+ // In a real scenario, we'd mock the underlying tool handler or test it cleanly.
19
+ // Since MCP SDK hides tool handlers, we primarily rely on the fact that
20
+ // registerValidationTools calls parseAndValidate from core.
21
+ test('placeholder for validation logic test', () => {
22
+ expect(true).toBe(true);
23
+ });
24
+ });
25
+ //# sourceMappingURL=validation.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.test.js","sourceRoot":"","sources":["../../src/__tests__/validation.test.ts"],"names":[],"mappings":";;AAGA,oBAAoB;AACpB,MAAM,WAAW,GAAY;IACzB,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE;IACpB,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE;IACnB,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE;IACpB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;IACrB,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE;CACzB,CAAA;AAED,MAAM,MAAM,GAAkB;IAC1B,aAAa,EAAE,iBAAiB;IAChC,OAAO,EAAE,WAAW;IACpB,eAAe,EAAE,kBAAkB;CACtC,CAAA;AAED,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,2EAA2E;IAC3E,gFAAgF;IAChF,wEAAwE;IACxE,4DAA4D;IAE5D,IAAI,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @jotx-labs/mcp — Jotx Model Context Protocol Server
3
+ *
4
+ * Expose Jotx workspaces via MCP for AI tool integration.
5
+ * Platform-agnostic — works with Electron, VS Code, and web.
6
+ *
7
+ * @module @jotx-labs/mcp
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * import { createJotxMCPServer } from '@jotx-labs/mcp'
12
+ *
13
+ * const server = createJotxMCPServer({
14
+ * workspacePath: '/path/to/workspace',
15
+ * fileOps: { readFile, writeFile, listFiles, searchFiles, fileExists },
16
+ * nodeManager: optionalNodeManager,
17
+ * })
18
+ * ```
19
+ */
20
+ export { createJotxMCPServer } from './server';
21
+ export type { JotxMCPConfig, FileOps, SearchResult, ValidationError, ValidationResult, EditorError, } from './types';
22
+ export { loadSyntaxGuide, getSyntaxGuideByTopic } from './syntax-guide';
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAG9C,YAAY,EACR,aAAa,EACb,OAAO,EACP,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,WAAW,GACd,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /**
3
+ * @jotx-labs/mcp — Jotx Model Context Protocol Server
4
+ *
5
+ * Expose Jotx workspaces via MCP for AI tool integration.
6
+ * Platform-agnostic — works with Electron, VS Code, and web.
7
+ *
8
+ * @module @jotx-labs/mcp
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * import { createJotxMCPServer } from '@jotx-labs/mcp'
13
+ *
14
+ * const server = createJotxMCPServer({
15
+ * workspacePath: '/path/to/workspace',
16
+ * fileOps: { readFile, writeFile, listFiles, searchFiles, fileExists },
17
+ * nodeManager: optionalNodeManager,
18
+ * })
19
+ * ```
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.getSyntaxGuideByTopic = exports.loadSyntaxGuide = exports.createJotxMCPServer = void 0;
23
+ // ─── Main API ────────────────────────────────────────────────────────
24
+ var server_1 = require("./server");
25
+ Object.defineProperty(exports, "createJotxMCPServer", { enumerable: true, get: function () { return server_1.createJotxMCPServer; } });
26
+ // ─── Utilities (for advanced usage) ──────────────────────────────────
27
+ var syntax_guide_1 = require("./syntax-guide");
28
+ Object.defineProperty(exports, "loadSyntaxGuide", { enumerable: true, get: function () { return syntax_guide_1.loadSyntaxGuide; } });
29
+ Object.defineProperty(exports, "getSyntaxGuideByTopic", { enumerable: true, get: function () { return syntax_guide_1.getSyntaxGuideByTopic; } });
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AAEH,wEAAwE;AACxE,mCAA8C;AAArC,6GAAA,mBAAmB,OAAA;AAY5B,wEAAwE;AACxE,+CAAuE;AAA9D,+GAAA,eAAe,OAAA;AAAE,qHAAA,qBAAqB,OAAA"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @jotx-labs/mcp — MCP Server Factory
3
+ *
4
+ * Creates a Jotx MCP server with all tools and resources registered.
5
+ * Platform-agnostic — host apps inject file I/O via the FileOps interface.
6
+ */
7
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
8
+ import { JotxMCPConfig } from './types';
9
+ /**
10
+ * Create a Jotx MCP server with all tools and resources.
11
+ *
12
+ * @param config - Platform-specific configuration
13
+ * @returns A configured McpServer ready to connect via transport
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * // In Electron main process:
18
+ * import { createJotxMCPServer } from '@jotx-labs/mcp'
19
+ * import * as fs from 'fs'
20
+ *
21
+ * const server = createJotxMCPServer({
22
+ * workspacePath: '/path/to/workspace',
23
+ * nodeManager: workspaceIndexer.getNodeManager(),
24
+ * fileOps: {
25
+ * readFile: (p) => fs.promises.readFile(path.join(workspace, p), 'utf-8'),
26
+ * writeFile: (p, c) => fs.promises.writeFile(path.join(workspace, p), c),
27
+ * listFiles: async () => collectJotFiles(workspace),
28
+ * searchFiles: async (q) => searchIn(workspace, q),
29
+ * fileExists: (p) => fs.existsSync(path.join(workspace, p)),
30
+ * }
31
+ * })
32
+ * ```
33
+ */
34
+ export declare function createJotxMCPServer(config: JotxMCPConfig): McpServer;
35
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAGnE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAWvC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAsBpE"}
package/dist/server.js ADDED
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ /**
3
+ * @jotx-labs/mcp — MCP Server Factory
4
+ *
5
+ * Creates a Jotx MCP server with all tools and resources registered.
6
+ * Platform-agnostic — host apps inject file I/O via the FileOps interface.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.createJotxMCPServer = createJotxMCPServer;
10
+ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
11
+ const registry_1 = require("@jotx-labs/registry");
12
+ const standard_lib_1 = require("@jotx-labs/standard-lib");
13
+ const file_tools_1 = require("./tools/file-tools");
14
+ const search_tools_1 = require("./tools/search-tools");
15
+ const context_tools_1 = require("./tools/context-tools");
16
+ const graph_tools_1 = require("./tools/graph-tools");
17
+ const validation_tools_1 = require("./tools/validation-tools");
18
+ const syntax_guide_1 = require("./syntax-guide");
19
+ // Package version — kept in sync with package.json
20
+ const PACKAGE_VERSION = '2.4.245';
21
+ /**
22
+ * Create a Jotx MCP server with all tools and resources.
23
+ *
24
+ * @param config - Platform-specific configuration
25
+ * @returns A configured McpServer ready to connect via transport
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * // In Electron main process:
30
+ * import { createJotxMCPServer } from '@jotx-labs/mcp'
31
+ * import * as fs from 'fs'
32
+ *
33
+ * const server = createJotxMCPServer({
34
+ * workspacePath: '/path/to/workspace',
35
+ * nodeManager: workspaceIndexer.getNodeManager(),
36
+ * fileOps: {
37
+ * readFile: (p) => fs.promises.readFile(path.join(workspace, p), 'utf-8'),
38
+ * writeFile: (p, c) => fs.promises.writeFile(path.join(workspace, p), c),
39
+ * listFiles: async () => collectJotFiles(workspace),
40
+ * searchFiles: async (q) => searchIn(workspace, q),
41
+ * fileExists: (p) => fs.existsSync(path.join(workspace, p)),
42
+ * }
43
+ * })
44
+ * ```
45
+ */
46
+ function createJotxMCPServer(config) {
47
+ // Ensure standard blocks are registered for validation and schema tools
48
+ (0, standard_lib_1.registerStandardBlocks)();
49
+ const server = new mcp_js_1.McpServer({
50
+ name: 'jotx',
51
+ version: PACKAGE_VERSION,
52
+ });
53
+ // ─── Register All Tools ──────────────────────────────────────────
54
+ (0, file_tools_1.registerFileTools)(server, config);
55
+ (0, search_tools_1.registerSearchTools)(server, config);
56
+ (0, context_tools_1.registerContextTools)(server, config);
57
+ (0, graph_tools_1.registerGraphTools)(server, config);
58
+ (0, validation_tools_1.registerValidationTools)(server, config);
59
+ // ─── Register MCP Resources ──────────────────────────────────────
60
+ registerResources(server, config);
61
+ return server;
62
+ }
63
+ // ─── MCP Resources ───────────────────────────────────────────────────
64
+ function registerResources(server, config) {
65
+ const { nodeManager, fileOps } = config;
66
+ // Resource: Workspace Summary
67
+ server.resource('workspace-summary', 'jotx://workspace/summary', async (uri) => {
68
+ const files = await fileOps.listFiles();
69
+ const summary = {
70
+ workspacePath: config.workspacePath,
71
+ fileCount: files.length,
72
+ files: files.slice(0, 30),
73
+ };
74
+ if (nodeManager) {
75
+ const stats = nodeManager.getStats();
76
+ summary.graph = {
77
+ documents: stats.documents,
78
+ blocks: stats.blocks,
79
+ edges: stats.edges,
80
+ };
81
+ }
82
+ return {
83
+ contents: [{
84
+ uri: uri.href,
85
+ mimeType: 'application/json',
86
+ text: JSON.stringify(summary, null, 2),
87
+ }],
88
+ };
89
+ });
90
+ // Resource: Block Types
91
+ server.resource('block-types', 'jotx://block-types', async (uri) => {
92
+ const registry = registry_1.BlockRegistry.getInstance();
93
+ const allBlocks = registry.getAll();
94
+ const blockTypes = allBlocks.map(block => ({
95
+ type: block.type,
96
+ keyword: block.syntax.keyword || block.type,
97
+ hasChildren: block.syntax.hasChildren || false,
98
+ hasText: block.syntax.hasText || false,
99
+ properties: Object.entries(block.schema.properties).map(([name, prop]) => ({
100
+ name,
101
+ type: prop.type,
102
+ required: prop.required || false,
103
+ ...(prop.options ? { options: prop.options } : {}),
104
+ ...(prop.description ? { description: prop.description } : {}),
105
+ ...(prop.default !== undefined ? { default: prop.default } : {}),
106
+ })),
107
+ ...(block.ui?.label ? { label: block.ui.label } : {}),
108
+ ...(block.ui?.description ? { description: block.ui.description } : {}),
109
+ ...(block.ui?.icon ? { icon: block.ui.icon } : {}),
110
+ }));
111
+ return {
112
+ contents: [{
113
+ uri: uri.href,
114
+ mimeType: 'application/json',
115
+ text: JSON.stringify({ blockTypes, count: blockTypes.length }, null, 2),
116
+ }],
117
+ };
118
+ });
119
+ // Resource: Syntax Guide
120
+ server.resource('syntax-guide', 'jotx://syntax-guide', async (uri) => {
121
+ const guide = (0, syntax_guide_1.loadSyntaxGuide)(config.syntaxGuidePath);
122
+ return {
123
+ contents: [{
124
+ uri: uri.href,
125
+ mimeType: 'text/plain',
126
+ text: guide,
127
+ }],
128
+ };
129
+ });
130
+ }
131
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAyCH,kDAsBC;AA7DD,oEAAmE;AACnE,kDAAmD;AACnD,0DAAgE;AAEhE,mDAAsD;AACtD,uDAA0D;AAC1D,yDAA4D;AAC5D,qDAAwD;AACxD,+DAAkE;AAClE,iDAAgD;AAEh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,8BAAe,EAAC,MAAM,CAAC,eAAe,CAAC,CAAA;QAErD,OAAO;YACH,QAAQ,EAAE,CAAC;oBACP,GAAG,EAAE,GAAG,CAAC,IAAI;oBACb,QAAQ,EAAE,YAAY;oBACtB,IAAI,EAAE,KAAK;iBACd,CAAC;SACL,CAAA;IACL,CAAC,CACJ,CAAA;AACL,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Syntax Guide — Jotx User Manual content loader
3
+ *
4
+ * Provides the Jotx syntax reference for AI consumption.
5
+ * Can load from a file path (provided by host app) or return
6
+ * a concise embedded reference.
7
+ */
8
+ /**
9
+ * Load the syntax guide content.
10
+ * If a file path is provided, reads the full User Manual.
11
+ * Otherwise, returns the embedded concise reference.
12
+ */
13
+ export declare function loadSyntaxGuide(filePath?: string): string;
14
+ /**
15
+ * Get a topic-specific section from the syntax guide.
16
+ * If topic is not found, returns the full guide.
17
+ */
18
+ export declare function getSyntaxGuideByTopic(topic: string, fullGuide: string): string;
19
+ //# sourceMappingURL=syntax-guide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntax-guide.d.ts","sourceRoot":"","sources":["../src/syntax-guide.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAsOH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAUzD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAwD9E"}