@treedy/lsp-mcp 0.1.6 → 0.1.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 (76) hide show
  1. package/dist/bundled/pyright/dist/index.d.ts +2 -0
  2. package/dist/bundled/pyright/dist/index.js +1620 -0
  3. package/dist/bundled/pyright/dist/index.js.map +26 -0
  4. package/dist/bundled/pyright/dist/lsp/connection.d.ts +71 -0
  5. package/dist/bundled/pyright/dist/lsp/document-manager.d.ts +67 -0
  6. package/dist/bundled/pyright/dist/lsp/index.d.ts +3 -0
  7. package/dist/bundled/pyright/dist/lsp/types.d.ts +55 -0
  8. package/dist/bundled/pyright/dist/lsp-client.d.ts +55 -0
  9. package/dist/bundled/pyright/dist/tools/completions.d.ts +18 -0
  10. package/dist/bundled/pyright/dist/tools/definition.d.ts +16 -0
  11. package/dist/bundled/pyright/dist/tools/diagnostics.d.ts +12 -0
  12. package/dist/bundled/pyright/dist/tools/hover.d.ts +16 -0
  13. package/dist/bundled/pyright/dist/tools/references.d.ts +16 -0
  14. package/dist/bundled/pyright/dist/tools/rename.d.ts +18 -0
  15. package/dist/bundled/pyright/dist/tools/search.d.ts +20 -0
  16. package/dist/bundled/pyright/dist/tools/signature-help.d.ts +16 -0
  17. package/dist/bundled/pyright/dist/tools/status.d.ts +14 -0
  18. package/dist/bundled/pyright/dist/tools/symbols.d.ts +17 -0
  19. package/dist/bundled/pyright/dist/tools/update-document.d.ts +14 -0
  20. package/dist/bundled/pyright/dist/utils/position.d.ts +33 -0
  21. package/dist/bundled/pyright/package.json +54 -0
  22. package/dist/bundled/python/README.md +230 -0
  23. package/dist/bundled/python/pyproject.toml +61 -0
  24. package/dist/bundled/python/src/rope_mcp/__init__.py +3 -0
  25. package/dist/bundled/python/src/rope_mcp/__pycache__/__init__.cpython-312.pyc +0 -0
  26. package/dist/bundled/python/src/rope_mcp/__pycache__/__init__.cpython-313.pyc +0 -0
  27. package/dist/bundled/python/src/rope_mcp/__pycache__/config.cpython-312.pyc +0 -0
  28. package/dist/bundled/python/src/rope_mcp/__pycache__/config.cpython-313.pyc +0 -0
  29. package/dist/bundled/python/src/rope_mcp/__pycache__/pyright_client.cpython-313.pyc +0 -0
  30. package/dist/bundled/python/src/rope_mcp/__pycache__/rope_client.cpython-313.pyc +0 -0
  31. package/dist/bundled/python/src/rope_mcp/__pycache__/server.cpython-312.pyc +0 -0
  32. package/dist/bundled/python/src/rope_mcp/__pycache__/server.cpython-313.pyc +0 -0
  33. package/dist/bundled/python/src/rope_mcp/config.py +408 -0
  34. package/dist/bundled/python/src/rope_mcp/lsp/__init__.py +15 -0
  35. package/dist/bundled/python/src/rope_mcp/lsp/__pycache__/__init__.cpython-313.pyc +0 -0
  36. package/dist/bundled/python/src/rope_mcp/lsp/__pycache__/client.cpython-313.pyc +0 -0
  37. package/dist/bundled/python/src/rope_mcp/lsp/__pycache__/types.cpython-313.pyc +0 -0
  38. package/dist/bundled/python/src/rope_mcp/lsp/client.py +624 -0
  39. package/dist/bundled/python/src/rope_mcp/lsp/types.py +82 -0
  40. package/dist/bundled/python/src/rope_mcp/pyright_client.py +147 -0
  41. package/dist/bundled/python/src/rope_mcp/rope_client.py +198 -0
  42. package/dist/bundled/python/src/rope_mcp/server.py +963 -0
  43. package/dist/bundled/python/src/rope_mcp/tools/__init__.py +26 -0
  44. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/__init__.cpython-313.pyc +0 -0
  45. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/change_signature.cpython-313.pyc +0 -0
  46. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/completions.cpython-313.pyc +0 -0
  47. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/definition.cpython-313.pyc +0 -0
  48. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/diagnostics.cpython-313.pyc +0 -0
  49. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/hover.cpython-313.pyc +0 -0
  50. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/move.cpython-313.pyc +0 -0
  51. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/references.cpython-313.pyc +0 -0
  52. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/rename.cpython-313.pyc +0 -0
  53. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/search.cpython-313.pyc +0 -0
  54. package/dist/bundled/python/src/rope_mcp/tools/__pycache__/symbols.cpython-313.pyc +0 -0
  55. package/dist/bundled/python/src/rope_mcp/tools/change_signature.py +184 -0
  56. package/dist/bundled/python/src/rope_mcp/tools/completions.py +84 -0
  57. package/dist/bundled/python/src/rope_mcp/tools/definition.py +51 -0
  58. package/dist/bundled/python/src/rope_mcp/tools/diagnostics.py +18 -0
  59. package/dist/bundled/python/src/rope_mcp/tools/hover.py +49 -0
  60. package/dist/bundled/python/src/rope_mcp/tools/move.py +81 -0
  61. package/dist/bundled/python/src/rope_mcp/tools/references.py +60 -0
  62. package/dist/bundled/python/src/rope_mcp/tools/rename.py +61 -0
  63. package/dist/bundled/python/src/rope_mcp/tools/search.py +128 -0
  64. package/dist/bundled/python/src/rope_mcp/tools/symbols.py +118 -0
  65. package/dist/bundled/python/uv.lock +979 -0
  66. package/dist/bundled/typescript/dist/index.js +29534 -0
  67. package/dist/bundled/typescript/dist/index.js.map +211 -0
  68. package/dist/bundled/typescript/package.json +46 -0
  69. package/dist/bundled/vue/dist/index.d.ts +8 -0
  70. package/dist/bundled/vue/dist/index.js +21111 -0
  71. package/dist/bundled/vue/dist/ts-vue-service.d.ts +67 -0
  72. package/dist/bundled/vue/dist/vue-service.d.ts +144 -0
  73. package/dist/bundled/vue/package.json +45 -0
  74. package/dist/index.js +268 -112
  75. package/dist/index.js.map +5 -5
  76. package/package.json +1 -1
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Direct TypeScript Server Service for Vue files
3
+ *
4
+ * Uses tsserver directly with @vue/typescript-plugin to provide
5
+ * hover, definition, references for Vue SFCs.
6
+ */
7
+ /**
8
+ * Get quick info (hover) at a position
9
+ */
10
+ export declare function getQuickInfo(filePath: string, line: number, column: number): Promise<{
11
+ contents: string;
12
+ documentation?: string;
13
+ } | null>;
14
+ /**
15
+ * Get definition locations
16
+ */
17
+ export declare function getDefinition(filePath: string, line: number, column: number): Promise<Array<{
18
+ file: string;
19
+ line: number;
20
+ column: number;
21
+ }>>;
22
+ /**
23
+ * Get references to a symbol
24
+ */
25
+ export declare function getReferences(filePath: string, line: number, column: number): Promise<Array<{
26
+ file: string;
27
+ line: number;
28
+ column: number;
29
+ }>>;
30
+ /**
31
+ * Get completions at a position
32
+ */
33
+ export declare function getCompletions(filePath: string, line: number, column: number, limit?: number): Promise<{
34
+ items: Array<{
35
+ name: string;
36
+ kind: string;
37
+ }>;
38
+ isIncomplete: boolean;
39
+ }>;
40
+ /**
41
+ * Get signature help at a position
42
+ */
43
+ export declare function getSignatureHelp(filePath: string, line: number, column: number): Promise<{
44
+ signatures: Array<{
45
+ label: string;
46
+ documentation?: string;
47
+ parameters?: Array<{
48
+ label: string;
49
+ documentation?: string;
50
+ }>;
51
+ }>;
52
+ activeSignature: number;
53
+ activeParameter: number;
54
+ } | null>;
55
+ /**
56
+ * Get document symbols (navigation tree)
57
+ */
58
+ export declare function getDocumentSymbols(filePath: string): Promise<any | null>;
59
+ /**
60
+ * Get rename locations for a symbol
61
+ */
62
+ export declare function getRenameLocations(filePath: string, line: number, column: number): Promise<Array<{
63
+ file: string;
64
+ line: number;
65
+ column: number;
66
+ length: number;
67
+ }> | null>;
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Vue Language Service wrapper
3
+ *
4
+ * Provides programmatic access to Vue Language Server features
5
+ * by spawning vue-language-server and communicating via LSP.
6
+ */
7
+ /**
8
+ * Set the active workspace.
9
+ */
10
+ export declare function setActiveWorkspace(workspace: string): string;
11
+ /**
12
+ * Get the active workspace.
13
+ */
14
+ export declare function getActiveWorkspace(): string | null;
15
+ /**
16
+ * Check if a file is in the active workspace.
17
+ */
18
+ export declare function isFileInWorkspace(filePath: string): boolean;
19
+ /**
20
+ * Validate that a file is within the active workspace.
21
+ */
22
+ export declare function validateFileWorkspace(filePath: string): string | null;
23
+ /**
24
+ * Clear all connections and caches.
25
+ */
26
+ export declare function clearAllConnections(): void;
27
+ /**
28
+ * Find project root by looking for package.json or tsconfig.json
29
+ */
30
+ export declare function findProjectRoot(filePath: string): string;
31
+ /**
32
+ * Get file content from cache or disk
33
+ */
34
+ export declare function getFileContent(filePath: string): string;
35
+ /**
36
+ * Convert offset to line/column (1-based)
37
+ */
38
+ export declare function offsetToPosition(content: string, offset: number): {
39
+ line: number;
40
+ column: number;
41
+ };
42
+ /**
43
+ * Update document content for incremental analysis
44
+ * Now properly synchronizes with LSP server
45
+ */
46
+ export declare function updateDocument(filePath: string, content: string): Promise<void>;
47
+ /**
48
+ * Create Vue language service for a project
49
+ */
50
+ export declare function createVueLanguageService(projectRoot: string): Promise<void>;
51
+ /**
52
+ * Get quick info (hover) at a position
53
+ */
54
+ export declare function getQuickInfo(filePath: string, line: number, column: number): Promise<{
55
+ contents: string;
56
+ documentation?: string;
57
+ } | null>;
58
+ /**
59
+ * Get definition locations
60
+ */
61
+ export declare function getDefinition(filePath: string, line: number, column: number): Promise<Array<{
62
+ file: string;
63
+ line: number;
64
+ column: number;
65
+ }>>;
66
+ /**
67
+ * Get all references to a symbol
68
+ */
69
+ export declare function getReferences(filePath: string, line: number, column: number): Promise<Array<{
70
+ file: string;
71
+ line: number;
72
+ column: number;
73
+ }>>;
74
+ /**
75
+ * Get completions at a position
76
+ */
77
+ export declare function getCompletions(filePath: string, line: number, column: number, limit?: number): Promise<{
78
+ items: Array<{
79
+ name: string;
80
+ kind: string;
81
+ }>;
82
+ isIncomplete: boolean;
83
+ }>;
84
+ /**
85
+ * Get signature help at a position
86
+ */
87
+ export declare function getSignatureHelp(filePath: string, line: number, column: number): Promise<{
88
+ signatures: Array<{
89
+ label: string;
90
+ documentation?: string;
91
+ }>;
92
+ activeSignature: number;
93
+ activeParameter: number;
94
+ } | null>;
95
+ /**
96
+ * Diagnostic type for internal use
97
+ */
98
+ interface Diagnostic {
99
+ range: {
100
+ start: {
101
+ line: number;
102
+ character: number;
103
+ };
104
+ end: {
105
+ line: number;
106
+ character: number;
107
+ };
108
+ };
109
+ severity?: number;
110
+ message: string;
111
+ code?: string | number;
112
+ source?: string;
113
+ }
114
+ /**
115
+ * Get diagnostics for a file
116
+ *
117
+ * Strategy:
118
+ * 1. For single files, prefer LSP diagnostics (faster, incremental)
119
+ * 2. Fallback to vue-tsc only if LSP unavailable or for project-wide checks (if needed)
120
+ */
121
+ export declare function getDiagnostics(filePath: string): Promise<Diagnostic[]>;
122
+ /**
123
+ * Format a diagnostic for output
124
+ */
125
+ export declare function formatDiagnostic(diag: Diagnostic): {
126
+ file: string;
127
+ line: number;
128
+ column: number;
129
+ severity: string;
130
+ message: string;
131
+ code?: string | number;
132
+ };
133
+ /**
134
+ * Get project status
135
+ */
136
+ export declare function getProjectStatus(filePath: string): Promise<{
137
+ projectRoot: string;
138
+ hasVue: boolean;
139
+ vueVersion?: string;
140
+ hasVolar: boolean;
141
+ hasTsConfig: boolean;
142
+ tips: string[];
143
+ }>;
144
+ export {};
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@treedy/vue-lsp-mcp",
3
+ "version": "0.2.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "description": "MCP server for Vue Single File Components using Vue Language Server",
8
+ "type": "module",
9
+ "main": "dist/index.js",
10
+ "bin": {
11
+ "vue-lsp-mcp": "dist/index.js"
12
+ },
13
+ "scripts": {
14
+ "build": "bun run build.ts",
15
+ "dev": "bun run --watch src/index.ts",
16
+ "typecheck": "tsc --noEmit"
17
+ },
18
+ "dependencies": {
19
+ "@modelcontextprotocol/sdk": "^1.0.0",
20
+ "zod": "^3.23.8"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "^22.10.2",
24
+ "typescript": "^5.7.2"
25
+ },
26
+ "peerDependencies": {
27
+ "@vue/language-server": ">=2.0.0"
28
+ },
29
+ "peerDependenciesMeta": {
30
+ "@vue/language-server": {
31
+ "optional": true
32
+ }
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "keywords": [
38
+ "mcp",
39
+ "vue",
40
+ "lsp",
41
+ "language-server",
42
+ "volar"
43
+ ],
44
+ "license": "MIT"
45
+ }