@treedy/lsp-mcp 0.1.7 → 0.1.9

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 (54) 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/config.py +444 -0
  26. package/dist/bundled/python/src/rope_mcp/lsp/__init__.py +15 -0
  27. package/dist/bundled/python/src/rope_mcp/lsp/client.py +863 -0
  28. package/dist/bundled/python/src/rope_mcp/lsp/types.py +83 -0
  29. package/dist/bundled/python/src/rope_mcp/pyright_client.py +147 -0
  30. package/dist/bundled/python/src/rope_mcp/rope_client.py +198 -0
  31. package/dist/bundled/python/src/rope_mcp/server.py +1217 -0
  32. package/dist/bundled/python/src/rope_mcp/tools/__init__.py +24 -0
  33. package/dist/bundled/python/src/rope_mcp/tools/change_signature.py +184 -0
  34. package/dist/bundled/python/src/rope_mcp/tools/completions.py +84 -0
  35. package/dist/bundled/python/src/rope_mcp/tools/definition.py +51 -0
  36. package/dist/bundled/python/src/rope_mcp/tools/diagnostics.py +18 -0
  37. package/dist/bundled/python/src/rope_mcp/tools/hover.py +49 -0
  38. package/dist/bundled/python/src/rope_mcp/tools/move.py +81 -0
  39. package/dist/bundled/python/src/rope_mcp/tools/references.py +60 -0
  40. package/dist/bundled/python/src/rope_mcp/tools/rename.py +61 -0
  41. package/dist/bundled/python/src/rope_mcp/tools/search.py +128 -0
  42. package/dist/bundled/python/src/rope_mcp/tools/symbols.py +118 -0
  43. package/dist/bundled/python/uv.lock +979 -0
  44. package/dist/bundled/typescript/dist/index.js +29772 -0
  45. package/dist/bundled/typescript/dist/index.js.map +211 -0
  46. package/dist/bundled/typescript/package.json +46 -0
  47. package/dist/bundled/vue/dist/index.d.ts +8 -0
  48. package/dist/bundled/vue/dist/index.js +21176 -0
  49. package/dist/bundled/vue/dist/ts-vue-service.d.ts +67 -0
  50. package/dist/bundled/vue/dist/vue-service.d.ts +160 -0
  51. package/dist/bundled/vue/package.json +45 -0
  52. package/dist/index.js +695 -352
  53. package/dist/index.js.map +6 -6
  54. 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,160 @@
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
+ * Resolve a file path and validate it against the active workspace.
21
+ *
22
+ * Supports:
23
+ * 1. Absolute paths (must be within active workspace)
24
+ * 2. Relative paths (resolved against active workspace)
25
+ */
26
+ export declare function resolveFilePath(filePath: string): {
27
+ absPath: string | null;
28
+ error: string | null;
29
+ };
30
+ /**
31
+ * Validate that a file is within the active workspace.
32
+ * @deprecated Use resolveFilePath instead.
33
+ */
34
+ export declare function validateFileWorkspace(filePath: string): string | null;
35
+ /**
36
+ * Clear all connections and caches.
37
+ */
38
+ export declare function clearAllConnections(): void;
39
+ /**
40
+ * Find project root by looking for package.json or tsconfig.json
41
+ */
42
+ export declare function findProjectRoot(filePath: string): string;
43
+ /**
44
+ * Get file content from cache or disk
45
+ */
46
+ export declare function getFileContent(filePath: string): string;
47
+ /**
48
+ * Convert offset to line/column (1-based)
49
+ */
50
+ export declare function offsetToPosition(content: string, offset: number): {
51
+ line: number;
52
+ column: number;
53
+ };
54
+ /**
55
+ * Update document content for incremental analysis
56
+ * Now properly synchronizes with LSP server
57
+ */
58
+ export declare function updateDocument(filePath: string, content: string): Promise<void>;
59
+ /**
60
+ * Create Vue language service for a project
61
+ */
62
+ export declare function createVueLanguageService(projectRoot: string): Promise<void>;
63
+ /**
64
+ * Get quick info (hover) at a position
65
+ */
66
+ export declare function getQuickInfo(filePath: string, line: number, column: number): Promise<{
67
+ contents: string;
68
+ documentation?: string;
69
+ } | null>;
70
+ /**
71
+ * Get definition locations
72
+ */
73
+ export declare function getDefinition(filePath: string, line: number, column: number): Promise<Array<{
74
+ file: string;
75
+ line: number;
76
+ column: number;
77
+ }>>;
78
+ /**
79
+ * Get all references to a symbol
80
+ */
81
+ export declare function getReferences(filePath: string, line: number, column: number): Promise<Array<{
82
+ file: string;
83
+ line: number;
84
+ column: number;
85
+ }>>;
86
+ /**
87
+ * Get completions at a position
88
+ */
89
+ export declare function getCompletions(filePath: string, line: number, column: number, limit?: number): Promise<{
90
+ items: Array<{
91
+ name: string;
92
+ kind: string;
93
+ }>;
94
+ isIncomplete: boolean;
95
+ }>;
96
+ /**
97
+ * Get signature help at a position
98
+ */
99
+ export declare function getSignatureHelp(filePath: string, line: number, column: number): Promise<{
100
+ signatures: Array<{
101
+ label: string;
102
+ documentation?: string;
103
+ }>;
104
+ activeSignature: number;
105
+ activeParameter: number;
106
+ } | null>;
107
+ /**
108
+ * Get inlay hints for a file
109
+ */
110
+ export declare function getInlayHints(filePath: string): Promise<any[]>;
111
+ /**
112
+ * Diagnostic type for internal use
113
+ */
114
+ interface Diagnostic {
115
+ range: {
116
+ start: {
117
+ line: number;
118
+ character: number;
119
+ };
120
+ end: {
121
+ line: number;
122
+ character: number;
123
+ };
124
+ };
125
+ severity?: number;
126
+ message: string;
127
+ code?: string | number;
128
+ source?: string;
129
+ }
130
+ /**
131
+ * Get diagnostics for a file
132
+ *
133
+ * Strategy:
134
+ * 1. For single files, prefer LSP diagnostics (faster, incremental)
135
+ * 2. Fallback to vue-tsc only if LSP unavailable or for project-wide checks (if needed)
136
+ */
137
+ export declare function getDiagnostics(filePath: string): Promise<Diagnostic[]>;
138
+ /**
139
+ * Format a diagnostic for output
140
+ */
141
+ export declare function formatDiagnostic(diag: Diagnostic): {
142
+ file: string;
143
+ line: number;
144
+ column: number;
145
+ severity: string;
146
+ message: string;
147
+ code?: string | number;
148
+ };
149
+ /**
150
+ * Get project status
151
+ */
152
+ export declare function getProjectStatus(filePath: string): Promise<{
153
+ projectRoot: string;
154
+ hasVue: boolean;
155
+ vueVersion?: string;
156
+ hasVolar: boolean;
157
+ hasTsConfig: boolean;
158
+ tips: string[];
159
+ }>;
160
+ 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
+ }