@hailer/mcp 0.1.17 → 0.2.1

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 (200) hide show
  1. package/dist/app.js +24 -20
  2. package/dist/core.d.ts +33 -9
  3. package/dist/core.js +279 -147
  4. package/dist/mcp/UserContextCache.js +18 -0
  5. package/dist/mcp/hailer-clients.d.ts +9 -1
  6. package/dist/mcp/hailer-clients.js +13 -3
  7. package/dist/mcp/signal-handler.js +1 -1
  8. package/dist/mcp/tool-registry.d.ts +3 -1
  9. package/dist/mcp/tool-registry.js +4 -1
  10. package/dist/mcp/tools/activity.js +43 -34
  11. package/dist/mcp/tools/bot-config/constants.d.ts +23 -0
  12. package/dist/mcp/tools/bot-config/constants.js +94 -0
  13. package/dist/mcp/tools/{bot-config.d.ts → bot-config/core.d.ts} +6 -6
  14. package/dist/mcp/tools/{bot-config.js → bot-config/core.js} +15 -15
  15. package/dist/mcp/tools/bot-config/index.d.ts +10 -0
  16. package/dist/mcp/tools/bot-config/index.js +59 -0
  17. package/dist/mcp/tools/bot-config/tools.d.ts +7 -0
  18. package/dist/mcp/tools/bot-config/tools.js +15 -0
  19. package/dist/mcp/tools/bot-config/types.d.ts +50 -0
  20. package/dist/mcp/tools/bot-config/types.js +6 -0
  21. package/dist/mcp/tools/bug-fixer-tools.d.ts +21 -0
  22. package/dist/mcp/tools/{giuseppe-tools.js → bug-fixer-tools.js} +61 -61
  23. package/dist/mcp/tools/user.js +10 -29
  24. package/dist/mcp/tools/workflow.js +36 -2
  25. package/dist/mcp/utils/data-transformers.d.ts +0 -8
  26. package/dist/mcp/utils/data-transformers.js +0 -28
  27. package/dist/mcp/utils/index.d.ts +4 -1
  28. package/dist/mcp/utils/index.js +17 -3
  29. package/dist/mcp/utils/pagination.d.ts +40 -0
  30. package/dist/mcp/utils/pagination.js +55 -0
  31. package/dist/mcp/utils/response-builder.d.ts +53 -0
  32. package/dist/mcp/utils/response-builder.js +110 -0
  33. package/dist/mcp/utils/tool-helpers.d.ts +0 -8
  34. package/dist/mcp/utils/tool-helpers.js +0 -24
  35. package/dist/mcp/utils/types.d.ts +1 -33
  36. package/dist/mcp-server.d.ts +2 -2
  37. package/dist/mcp-server.js +161 -139
  38. package/package.json +1 -1
  39. package/REFACTOR_STATUS.md +0 -127
  40. package/dist/agents/bot-manager.d.ts +0 -48
  41. package/dist/agents/bot-manager.js +0 -254
  42. package/dist/agents/factory.d.ts +0 -150
  43. package/dist/agents/factory.js +0 -650
  44. package/dist/agents/giuseppe/ai.d.ts +0 -83
  45. package/dist/agents/giuseppe/ai.js +0 -466
  46. package/dist/agents/giuseppe/bot.d.ts +0 -110
  47. package/dist/agents/giuseppe/bot.js +0 -780
  48. package/dist/agents/giuseppe/config.d.ts +0 -25
  49. package/dist/agents/giuseppe/config.js +0 -227
  50. package/dist/agents/giuseppe/files.d.ts +0 -52
  51. package/dist/agents/giuseppe/files.js +0 -338
  52. package/dist/agents/giuseppe/git.d.ts +0 -48
  53. package/dist/agents/giuseppe/git.js +0 -298
  54. package/dist/agents/giuseppe/index.d.ts +0 -97
  55. package/dist/agents/giuseppe/index.js +0 -258
  56. package/dist/agents/giuseppe/lsp.d.ts +0 -113
  57. package/dist/agents/giuseppe/lsp.js +0 -485
  58. package/dist/agents/giuseppe/monitor.d.ts +0 -118
  59. package/dist/agents/giuseppe/monitor.js +0 -621
  60. package/dist/agents/giuseppe/prompt.d.ts +0 -5
  61. package/dist/agents/giuseppe/prompt.js +0 -94
  62. package/dist/agents/giuseppe/registries/pending-classification.d.ts +0 -28
  63. package/dist/agents/giuseppe/registries/pending-classification.js +0 -50
  64. package/dist/agents/giuseppe/registries/pending-fix.d.ts +0 -30
  65. package/dist/agents/giuseppe/registries/pending-fix.js +0 -42
  66. package/dist/agents/giuseppe/registries/pending.d.ts +0 -27
  67. package/dist/agents/giuseppe/registries/pending.js +0 -49
  68. package/dist/agents/giuseppe/specialist.d.ts +0 -47
  69. package/dist/agents/giuseppe/specialist.js +0 -237
  70. package/dist/agents/giuseppe/types.d.ts +0 -123
  71. package/dist/agents/giuseppe/types.js +0 -9
  72. package/dist/agents/hailer-expert/index.d.ts +0 -8
  73. package/dist/agents/hailer-expert/index.js +0 -14
  74. package/dist/agents/hal/daemon.d.ts +0 -142
  75. package/dist/agents/hal/daemon.js +0 -1103
  76. package/dist/agents/hal/definitions.d.ts +0 -55
  77. package/dist/agents/hal/definitions.js +0 -263
  78. package/dist/agents/hal/index.d.ts +0 -3
  79. package/dist/agents/hal/index.js +0 -8
  80. package/dist/agents/index.d.ts +0 -18
  81. package/dist/agents/index.js +0 -48
  82. package/dist/agents/shared/base.d.ts +0 -216
  83. package/dist/agents/shared/base.js +0 -846
  84. package/dist/agents/shared/services/agent-registry.d.ts +0 -107
  85. package/dist/agents/shared/services/agent-registry.js +0 -629
  86. package/dist/agents/shared/services/conversation-manager.d.ts +0 -50
  87. package/dist/agents/shared/services/conversation-manager.js +0 -136
  88. package/dist/agents/shared/services/mcp-client.d.ts +0 -56
  89. package/dist/agents/shared/services/mcp-client.js +0 -124
  90. package/dist/agents/shared/services/message-classifier.d.ts +0 -37
  91. package/dist/agents/shared/services/message-classifier.js +0 -187
  92. package/dist/agents/shared/services/message-formatter.d.ts +0 -89
  93. package/dist/agents/shared/services/message-formatter.js +0 -371
  94. package/dist/agents/shared/services/session-logger.d.ts +0 -106
  95. package/dist/agents/shared/services/session-logger.js +0 -446
  96. package/dist/agents/shared/services/tool-executor.d.ts +0 -41
  97. package/dist/agents/shared/services/tool-executor.js +0 -169
  98. package/dist/agents/shared/services/workspace-schema-cache.d.ts +0 -125
  99. package/dist/agents/shared/services/workspace-schema-cache.js +0 -578
  100. package/dist/agents/shared/specialist.d.ts +0 -91
  101. package/dist/agents/shared/specialist.js +0 -399
  102. package/dist/agents/shared/tool-schema-loader.d.ts +0 -62
  103. package/dist/agents/shared/tool-schema-loader.js +0 -232
  104. package/dist/agents/shared/types.d.ts +0 -327
  105. package/dist/agents/shared/types.js +0 -121
  106. package/dist/client/agents/base.d.ts +0 -207
  107. package/dist/client/agents/base.js +0 -744
  108. package/dist/client/agents/definitions.d.ts +0 -53
  109. package/dist/client/agents/definitions.js +0 -263
  110. package/dist/client/agents/orchestrator.d.ts +0 -141
  111. package/dist/client/agents/orchestrator.js +0 -1062
  112. package/dist/client/agents/specialist.d.ts +0 -86
  113. package/dist/client/agents/specialist.js +0 -340
  114. package/dist/client/bot-entrypoint.d.ts +0 -7
  115. package/dist/client/bot-entrypoint.js +0 -103
  116. package/dist/client/bot-manager.d.ts +0 -44
  117. package/dist/client/bot-manager.js +0 -173
  118. package/dist/client/bot-runner.d.ts +0 -35
  119. package/dist/client/bot-runner.js +0 -188
  120. package/dist/client/chat-agent-daemon.d.ts +0 -464
  121. package/dist/client/chat-agent-daemon.js +0 -1774
  122. package/dist/client/daemon-factory.d.ts +0 -106
  123. package/dist/client/daemon-factory.js +0 -301
  124. package/dist/client/factory.d.ts +0 -111
  125. package/dist/client/factory.js +0 -314
  126. package/dist/client/index.d.ts +0 -17
  127. package/dist/client/index.js +0 -38
  128. package/dist/client/multi-bot-manager.d.ts +0 -42
  129. package/dist/client/multi-bot-manager.js +0 -161
  130. package/dist/client/orchestrator-daemon.d.ts +0 -87
  131. package/dist/client/orchestrator-daemon.js +0 -444
  132. package/dist/client/server.d.ts +0 -8
  133. package/dist/client/server.js +0 -251
  134. package/dist/client/services/agent-registry.d.ts +0 -108
  135. package/dist/client/services/agent-registry.js +0 -630
  136. package/dist/client/services/conversation-manager.d.ts +0 -50
  137. package/dist/client/services/conversation-manager.js +0 -136
  138. package/dist/client/services/mcp-client.d.ts +0 -48
  139. package/dist/client/services/mcp-client.js +0 -105
  140. package/dist/client/services/message-classifier.d.ts +0 -37
  141. package/dist/client/services/message-classifier.js +0 -187
  142. package/dist/client/services/message-formatter.d.ts +0 -84
  143. package/dist/client/services/message-formatter.js +0 -353
  144. package/dist/client/services/session-logger.d.ts +0 -106
  145. package/dist/client/services/session-logger.js +0 -446
  146. package/dist/client/services/tool-executor.d.ts +0 -41
  147. package/dist/client/services/tool-executor.js +0 -169
  148. package/dist/client/services/workspace-schema-cache.d.ts +0 -149
  149. package/dist/client/services/workspace-schema-cache.js +0 -732
  150. package/dist/client/specialist-daemon.d.ts +0 -77
  151. package/dist/client/specialist-daemon.js +0 -197
  152. package/dist/client/specialists.d.ts +0 -53
  153. package/dist/client/specialists.js +0 -178
  154. package/dist/client/tool-schema-loader.d.ts +0 -62
  155. package/dist/client/tool-schema-loader.js +0 -232
  156. package/dist/client/types.d.ts +0 -327
  157. package/dist/client/types.js +0 -121
  158. package/dist/commands/seed-config.d.ts +0 -9
  159. package/dist/commands/seed-config.js +0 -372
  160. package/dist/lib/context-manager.d.ts +0 -111
  161. package/dist/lib/context-manager.js +0 -431
  162. package/dist/lib/prompt-length-manager.d.ts +0 -81
  163. package/dist/lib/prompt-length-manager.js +0 -457
  164. package/dist/mcp/tools/giuseppe-tools.d.ts +0 -21
  165. package/dist/modules/bug-reports/bug-config.d.ts +0 -25
  166. package/dist/modules/bug-reports/bug-config.js +0 -187
  167. package/dist/modules/bug-reports/bug-monitor.d.ts +0 -108
  168. package/dist/modules/bug-reports/bug-monitor.js +0 -510
  169. package/dist/modules/bug-reports/giuseppe-agent.d.ts +0 -58
  170. package/dist/modules/bug-reports/giuseppe-agent.js +0 -467
  171. package/dist/modules/bug-reports/giuseppe-ai.d.ts +0 -83
  172. package/dist/modules/bug-reports/giuseppe-ai.js +0 -466
  173. package/dist/modules/bug-reports/giuseppe-bot.d.ts +0 -110
  174. package/dist/modules/bug-reports/giuseppe-bot.js +0 -804
  175. package/dist/modules/bug-reports/giuseppe-daemon.d.ts +0 -80
  176. package/dist/modules/bug-reports/giuseppe-daemon.js +0 -617
  177. package/dist/modules/bug-reports/giuseppe-files.d.ts +0 -64
  178. package/dist/modules/bug-reports/giuseppe-files.js +0 -375
  179. package/dist/modules/bug-reports/giuseppe-git.d.ts +0 -48
  180. package/dist/modules/bug-reports/giuseppe-git.js +0 -298
  181. package/dist/modules/bug-reports/giuseppe-lsp.d.ts +0 -113
  182. package/dist/modules/bug-reports/giuseppe-lsp.js +0 -485
  183. package/dist/modules/bug-reports/giuseppe-prompt.d.ts +0 -5
  184. package/dist/modules/bug-reports/giuseppe-prompt.js +0 -94
  185. package/dist/modules/bug-reports/index.d.ts +0 -77
  186. package/dist/modules/bug-reports/index.js +0 -215
  187. package/dist/modules/bug-reports/pending-classification-registry.d.ts +0 -28
  188. package/dist/modules/bug-reports/pending-classification-registry.js +0 -50
  189. package/dist/modules/bug-reports/pending-fix-registry.d.ts +0 -30
  190. package/dist/modules/bug-reports/pending-fix-registry.js +0 -42
  191. package/dist/modules/bug-reports/pending-registry.d.ts +0 -27
  192. package/dist/modules/bug-reports/pending-registry.js +0 -49
  193. package/dist/modules/bug-reports/types.d.ts +0 -123
  194. package/dist/modules/bug-reports/types.js +0 -9
  195. package/dist/routes/agents.d.ts +0 -44
  196. package/dist/routes/agents.js +0 -311
  197. package/dist/services/agent-credential-store.d.ts +0 -73
  198. package/dist/services/agent-credential-store.js +0 -212
  199. package/dist/services/bug-monitor.d.ts +0 -23
  200. package/dist/services/bug-monitor.js +0 -275
@@ -1,298 +0,0 @@
1
- "use strict";
2
- /**
3
- * Giuseppe Git Module - Git operations for committing, reverting, tagging
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.GiuseppeGit = void 0;
40
- const child_process_1 = require("child_process");
41
- const fs = __importStar(require("fs/promises"));
42
- const path = __importStar(require("path"));
43
- const logger_1 = require("../../lib/logger");
44
- const logger = (0, logger_1.createLogger)({ component: 'giuseppe-git' });
45
- class GiuseppeGit {
46
- /**
47
- * Get source files using git ls-files (fast and accurate)
48
- */
49
- async getSourceFilesFromGit(projectPath) {
50
- try {
51
- const result = (0, child_process_1.execSync)('git ls-files "*.tsx" "*.ts" "*.jsx" "*.js"', {
52
- cwd: projectPath,
53
- encoding: 'utf-8',
54
- stdio: ['pipe', 'pipe', 'pipe']
55
- });
56
- return result.trim().split('\n').filter(f => f && !f.includes('.test.') && !f.includes('.spec.'));
57
- }
58
- catch {
59
- // Fallback returns empty - caller should use file scan instead
60
- logger.debug('Git ls-files failed, caller should fallback to file scan', { projectPath });
61
- return [];
62
- }
63
- }
64
- /**
65
- * Commit changes to git
66
- */
67
- async commitChanges(app, bug) {
68
- try {
69
- // Check if git is initialized
70
- try {
71
- (0, child_process_1.execSync)('git rev-parse --is-inside-work-tree', {
72
- cwd: app.projectPath,
73
- encoding: 'utf-8',
74
- stdio: 'pipe'
75
- });
76
- }
77
- catch {
78
- logger.warn('No git repo in app project - skipping commit', { app: app.name });
79
- return { success: true, hash: 'no-git' };
80
- }
81
- // Stage all changes
82
- (0, child_process_1.execSync)('git add -A', {
83
- cwd: app.projectPath,
84
- encoding: 'utf-8',
85
- stdio: 'pipe'
86
- });
87
- // Create commit message
88
- const commitMessage = `fix: ${bug.name}\n\nBug ID: ${bug.id}\nFixed by Giuseppe Bot`;
89
- // Write commit message to temp file to avoid shell injection
90
- const commitMsgFile = path.join(app.projectPath, '.git', 'COMMIT_MSG_TEMP');
91
- await fs.writeFile(commitMsgFile, commitMessage, 'utf-8');
92
- try {
93
- (0, child_process_1.execSync)(`git commit -F "${commitMsgFile}"`, {
94
- cwd: app.projectPath,
95
- encoding: 'utf-8',
96
- stdio: 'pipe'
97
- });
98
- }
99
- finally {
100
- // Clean up temp file
101
- try {
102
- await fs.unlink(commitMsgFile);
103
- }
104
- catch { /* ignore */ }
105
- }
106
- // Get commit hash
107
- const hash = (0, child_process_1.execSync)('git rev-parse --short HEAD', {
108
- cwd: app.projectPath,
109
- encoding: 'utf-8',
110
- stdio: 'pipe'
111
- }).trim();
112
- logger.info('Committed changes', { app: app.name, hash, bugId: bug.id });
113
- return { success: true, hash };
114
- }
115
- catch (error) {
116
- logger.error('Failed to commit changes', { app: app.name, error });
117
- return { success: false };
118
- }
119
- }
120
- /**
121
- * Revert changes using git checkout
122
- */
123
- async revertChanges(app, files) {
124
- if (files.length === 0) {
125
- logger.info('No files to revert', { app: app.name });
126
- return;
127
- }
128
- try {
129
- // Check if git is initialized
130
- try {
131
- (0, child_process_1.execSync)('git rev-parse --is-inside-work-tree', {
132
- cwd: app.projectPath,
133
- encoding: 'utf-8',
134
- stdio: 'pipe'
135
- });
136
- }
137
- catch {
138
- logger.warn('No git repo in app project - cannot revert', { app: app.name });
139
- return;
140
- }
141
- // Revert each file to HEAD
142
- for (const file of files) {
143
- try {
144
- (0, child_process_1.execSync)(`git checkout HEAD -- "${file}"`, {
145
- cwd: app.projectPath,
146
- encoding: 'utf-8',
147
- stdio: 'pipe'
148
- });
149
- logger.info('Reverted file', { app: app.name, file });
150
- }
151
- catch (error) {
152
- logger.warn('Failed to revert file', { app: app.name, file, error });
153
- }
154
- }
155
- logger.info('Reverted changes', { app: app.name, fileCount: files.length });
156
- }
157
- catch (error) {
158
- logger.error('Failed to revert changes', { app: app.name, error });
159
- }
160
- }
161
- /**
162
- * Get latest version from git tags (e.g., v1.0.1 -> 1.0.1)
163
- * Returns null if no version tags found
164
- */
165
- getLatestVersionFromTags(projectPath) {
166
- try {
167
- // Get all version tags sorted by version (descending)
168
- const output = (0, child_process_1.execSync)('git tag --list "v*" --sort=-v:refname 2>/dev/null | head -1', { cwd: projectPath, encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
169
- if (output && output.startsWith('v')) {
170
- const version = output.substring(1); // Remove 'v' prefix
171
- logger.debug('Found latest version from git tags', { tag: output, version });
172
- return version;
173
- }
174
- return null;
175
- }
176
- catch {
177
- // No tags or git error - that's fine, fallback to manifest
178
- return null;
179
- }
180
- }
181
- /**
182
- * Create and push a version tag after successful publish
183
- */
184
- createVersionTag(projectPath, version) {
185
- try {
186
- const tag = `v${version}`;
187
- // Create annotated tag
188
- (0, child_process_1.execSync)(`git tag -a "${tag}" -m "Release ${version}"`, {
189
- cwd: projectPath,
190
- stdio: 'pipe'
191
- });
192
- // Push the tag
193
- (0, child_process_1.execSync)(`git push origin "${tag}"`, {
194
- cwd: projectPath,
195
- stdio: 'pipe'
196
- });
197
- logger.info('Created and pushed version tag', { tag, projectPath });
198
- return true;
199
- }
200
- catch (error) {
201
- logger.warn('Failed to create version tag', {
202
- version,
203
- error: error instanceof Error ? error.message : String(error)
204
- });
205
- return false;
206
- }
207
- }
208
- /**
209
- * Bump patch version in manifest.json (bug fixes always bump patch)
210
- * Uses git tags to determine latest version, falls back to manifest
211
- * 1.0.0 -> 1.0.1 -> 1.0.2 etc.
212
- */
213
- async bumpPatchVersion(projectPath) {
214
- try {
215
- // Find manifest.json
216
- let manifestPath = path.join(projectPath, 'manifest.json');
217
- let manifestExists = false;
218
- try {
219
- await fs.access(manifestPath);
220
- manifestExists = true;
221
- }
222
- catch {
223
- manifestPath = path.join(projectPath, 'public', 'manifest.json');
224
- try {
225
- await fs.access(manifestPath);
226
- manifestExists = true;
227
- }
228
- catch {
229
- manifestExists = false;
230
- }
231
- }
232
- if (!manifestExists) {
233
- logger.warn('No manifest.json found for version bump', { projectPath });
234
- return null;
235
- }
236
- const content = await fs.readFile(manifestPath, 'utf-8');
237
- const manifest = JSON.parse(content);
238
- // Get version from git tags first (persists across resets), fallback to manifest
239
- const tagVersion = this.getLatestVersionFromTags(projectPath);
240
- const manifestVersion = manifest.version || '0.0.0';
241
- const oldVersion = tagVersion || manifestVersion;
242
- logger.debug('Version sources', { tagVersion, manifestVersion, using: oldVersion });
243
- // Parse and bump patch (x.y.z -> x.y.z+1)
244
- const parts = oldVersion.split('.').map((p) => parseInt(p, 10) || 0);
245
- while (parts.length < 3)
246
- parts.push(0);
247
- parts[2]++;
248
- const newVersion = parts.join('.');
249
- manifest.version = newVersion;
250
- await fs.writeFile(manifestPath, JSON.stringify(manifest, null, 2) + '\n', 'utf-8');
251
- logger.info('Bumped patch version', { oldVersion, newVersion, manifestPath, fromTag: !!tagVersion });
252
- return { oldVersion, newVersion };
253
- }
254
- catch (error) {
255
- logger.error('Failed to bump patch version', { projectPath, error });
256
- return null;
257
- }
258
- }
259
- /**
260
- * Push to git remote
261
- */
262
- async push(projectPath) {
263
- try {
264
- (0, child_process_1.execSync)('git push', { cwd: projectPath, stdio: 'pipe' });
265
- logger.info('Pushed to git', { projectPath });
266
- return true;
267
- }
268
- catch (pushError) {
269
- logger.warn('Git push failed (non-fatal)', {
270
- error: pushError instanceof Error ? pushError.message : String(pushError)
271
- });
272
- return false;
273
- }
274
- }
275
- /**
276
- * Stage and commit version bump
277
- */
278
- async commitVersionBump(projectPath, version) {
279
- try {
280
- (0, child_process_1.execSync)('git add manifest.json public/manifest.json 2>/dev/null || git add manifest.json', {
281
- cwd: projectPath,
282
- stdio: 'pipe'
283
- });
284
- (0, child_process_1.execSync)(`git commit -m "chore: bump version to ${version} for bug fix"`, {
285
- cwd: projectPath,
286
- stdio: 'pipe'
287
- });
288
- return true;
289
- }
290
- catch {
291
- // Version file might already be staged, or git not initialized
292
- logger.debug('Version commit skipped (may already be committed)');
293
- return false;
294
- }
295
- }
296
- }
297
- exports.GiuseppeGit = GiuseppeGit;
298
- //# sourceMappingURL=giuseppe-git.js.map
@@ -1,113 +0,0 @@
1
- /**
2
- * Giuseppe LSP Module - Full LSP client for code intelligence
3
- * Spawns typescript-language-server and communicates via JSON-RPC
4
- */
5
- export interface LspSymbol {
6
- name: string;
7
- kind: string;
8
- line: number;
9
- character: number;
10
- }
11
- export interface LspReference {
12
- file: string;
13
- line: number;
14
- character: number;
15
- }
16
- export interface LspDiagnostic {
17
- file: string;
18
- line: number;
19
- character: number;
20
- message: string;
21
- severity: 'error' | 'warning' | 'info';
22
- }
23
- export interface CodeIssue {
24
- file: string;
25
- line: number;
26
- column: number;
27
- message: string;
28
- code: string;
29
- severity: 'error' | 'warning';
30
- }
31
- export interface AnalysisResult {
32
- success: boolean;
33
- issues: CodeIssue[];
34
- unusedProps: {
35
- name: string;
36
- line: number;
37
- file?: string;
38
- }[];
39
- summary: string;
40
- }
41
- export declare class GiuseppeLsp {
42
- private server;
43
- private requestId;
44
- private pendingRequests;
45
- private buffer;
46
- private initialized;
47
- private rootPath;
48
- /**
49
- * Start the LSP server for a project
50
- */
51
- start(projectPath: string): Promise<boolean>;
52
- /**
53
- * Stop the LSP server
54
- */
55
- stop(): Promise<void>;
56
- /**
57
- * Initialize LSP connection
58
- */
59
- private initialize;
60
- /**
61
- * Open a document for analysis
62
- */
63
- openDocument(filePath: string): Promise<void>;
64
- /**
65
- * Get all symbols in a document
66
- */
67
- getDocumentSymbols(filePath: string): Promise<LspSymbol[]>;
68
- /**
69
- * Find all references to a symbol at a position
70
- */
71
- findReferences(filePath: string, line: number, character: number): Promise<LspReference[]>;
72
- /**
73
- * Get hover info for a symbol
74
- */
75
- hover(filePath: string, line: number, character: number): Promise<string | null>;
76
- /**
77
- * Find unused props in a React component
78
- * Checks if props declared in interface are actually destructured in function params
79
- */
80
- findUnusedProps(filePath: string): Promise<{
81
- name: string;
82
- line: number;
83
- }[]>;
84
- /**
85
- * Full analysis of a file
86
- */
87
- analyzeFile(filePath: string): Promise<AnalysisResult>;
88
- /**
89
- * Analyze a project for issues
90
- */
91
- analyzeProject(projectPath: string): Promise<AnalysisResult>;
92
- /**
93
- * Analyze specific files and filter by bug keywords
94
- * This is the targeted analysis method - only looks at relevant files
95
- */
96
- analyzeRelevantFiles(projectPath: string, filePaths: string[], bugKeywords: string[]): Promise<AnalysisResult>;
97
- /**
98
- * Validate a fix compiles
99
- */
100
- validateFix(projectPath: string): Promise<{
101
- valid: boolean;
102
- errors: string[];
103
- }>;
104
- private sendRequest;
105
- private sendNotification;
106
- private handleData;
107
- private flattenSymbols;
108
- private symbolKindToString;
109
- private getLineNumber;
110
- private findProjectRoot;
111
- private findSourceFiles;
112
- }
113
- //# sourceMappingURL=giuseppe-lsp.d.ts.map