erosolar-cli 1.7.194 → 1.7.195

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 (1089) hide show
  1. package/package.json +1 -1
  2. package/dist/StringUtils.d.ts +0 -8
  3. package/dist/StringUtils.d.ts.map +0 -1
  4. package/dist/StringUtils.js +0 -11
  5. package/dist/StringUtils.js.map +0 -1
  6. package/dist/adapters/browser/index.d.ts +0 -12
  7. package/dist/adapters/browser/index.d.ts.map +0 -1
  8. package/dist/adapters/browser/index.js +0 -11
  9. package/dist/adapters/browser/index.js.map +0 -1
  10. package/dist/adapters/node/index.d.ts +0 -17
  11. package/dist/adapters/node/index.d.ts.map +0 -1
  12. package/dist/adapters/node/index.js +0 -35
  13. package/dist/adapters/node/index.js.map +0 -1
  14. package/dist/adapters/remote/index.d.ts +0 -13
  15. package/dist/adapters/remote/index.d.ts.map +0 -1
  16. package/dist/adapters/remote/index.js +0 -20
  17. package/dist/adapters/remote/index.js.map +0 -1
  18. package/dist/adapters/types.d.ts +0 -14
  19. package/dist/adapters/types.d.ts.map +0 -1
  20. package/dist/adapters/types.js +0 -2
  21. package/dist/adapters/types.js.map +0 -1
  22. package/dist/alpha-zero/agentWrapper.d.ts +0 -84
  23. package/dist/alpha-zero/agentWrapper.d.ts.map +0 -1
  24. package/dist/alpha-zero/agentWrapper.js +0 -171
  25. package/dist/alpha-zero/agentWrapper.js.map +0 -1
  26. package/dist/alpha-zero/codeEvaluator.d.ts +0 -25
  27. package/dist/alpha-zero/codeEvaluator.d.ts.map +0 -1
  28. package/dist/alpha-zero/codeEvaluator.js +0 -273
  29. package/dist/alpha-zero/codeEvaluator.js.map +0 -1
  30. package/dist/alpha-zero/competitiveRunner.d.ts +0 -66
  31. package/dist/alpha-zero/competitiveRunner.d.ts.map +0 -1
  32. package/dist/alpha-zero/competitiveRunner.js +0 -224
  33. package/dist/alpha-zero/competitiveRunner.js.map +0 -1
  34. package/dist/alpha-zero/index.d.ts +0 -67
  35. package/dist/alpha-zero/index.d.ts.map +0 -1
  36. package/dist/alpha-zero/index.js +0 -99
  37. package/dist/alpha-zero/index.js.map +0 -1
  38. package/dist/alpha-zero/introspection.d.ts +0 -128
  39. package/dist/alpha-zero/introspection.d.ts.map +0 -1
  40. package/dist/alpha-zero/introspection.js +0 -300
  41. package/dist/alpha-zero/introspection.js.map +0 -1
  42. package/dist/alpha-zero/metricsTracker.d.ts +0 -71
  43. package/dist/alpha-zero/metricsTracker.d.ts.map +0 -1
  44. package/dist/alpha-zero/metricsTracker.js +0 -209
  45. package/dist/alpha-zero/metricsTracker.js.map +0 -1
  46. package/dist/alpha-zero/security/core.d.ts +0 -125
  47. package/dist/alpha-zero/security/core.d.ts.map +0 -1
  48. package/dist/alpha-zero/security/core.js +0 -271
  49. package/dist/alpha-zero/security/core.js.map +0 -1
  50. package/dist/alpha-zero/security/google.d.ts +0 -125
  51. package/dist/alpha-zero/security/google.d.ts.map +0 -1
  52. package/dist/alpha-zero/security/google.js +0 -311
  53. package/dist/alpha-zero/security/google.js.map +0 -1
  54. package/dist/alpha-zero/security/googleLoader.d.ts +0 -17
  55. package/dist/alpha-zero/security/googleLoader.d.ts.map +0 -1
  56. package/dist/alpha-zero/security/googleLoader.js +0 -41
  57. package/dist/alpha-zero/security/googleLoader.js.map +0 -1
  58. package/dist/alpha-zero/security/index.d.ts +0 -29
  59. package/dist/alpha-zero/security/index.d.ts.map +0 -1
  60. package/dist/alpha-zero/security/index.js +0 -32
  61. package/dist/alpha-zero/security/index.js.map +0 -1
  62. package/dist/alpha-zero/security/simulation.d.ts +0 -124
  63. package/dist/alpha-zero/security/simulation.d.ts.map +0 -1
  64. package/dist/alpha-zero/security/simulation.js +0 -277
  65. package/dist/alpha-zero/security/simulation.js.map +0 -1
  66. package/dist/alpha-zero/selfModification.d.ts +0 -109
  67. package/dist/alpha-zero/selfModification.d.ts.map +0 -1
  68. package/dist/alpha-zero/selfModification.js +0 -233
  69. package/dist/alpha-zero/selfModification.js.map +0 -1
  70. package/dist/alpha-zero/types.d.ts +0 -170
  71. package/dist/alpha-zero/types.d.ts.map +0 -1
  72. package/dist/alpha-zero/types.js +0 -31
  73. package/dist/alpha-zero/types.js.map +0 -1
  74. package/dist/bin/erosolar.d.ts +0 -9
  75. package/dist/bin/erosolar.d.ts.map +0 -1
  76. package/dist/bin/erosolar.js +0 -88
  77. package/dist/bin/erosolar.js.map +0 -1
  78. package/dist/bin/selfTest.d.ts +0 -14
  79. package/dist/bin/selfTest.d.ts.map +0 -1
  80. package/dist/bin/selfTest.js +0 -304
  81. package/dist/bin/selfTest.js.map +0 -1
  82. package/dist/browser/BrowserSessionManager.d.ts +0 -307
  83. package/dist/browser/BrowserSessionManager.d.ts.map +0 -1
  84. package/dist/browser/BrowserSessionManager.js +0 -713
  85. package/dist/browser/BrowserSessionManager.js.map +0 -1
  86. package/dist/capabilities/advancedTestGenerationCapability.d.ts +0 -17
  87. package/dist/capabilities/advancedTestGenerationCapability.d.ts.map +0 -1
  88. package/dist/capabilities/advancedTestGenerationCapability.js +0 -28
  89. package/dist/capabilities/advancedTestGenerationCapability.js.map +0 -1
  90. package/dist/capabilities/agentSpawningCapability.d.ts +0 -6
  91. package/dist/capabilities/agentSpawningCapability.d.ts.map +0 -1
  92. package/dist/capabilities/agentSpawningCapability.js +0 -115
  93. package/dist/capabilities/agentSpawningCapability.js.map +0 -1
  94. package/dist/capabilities/askUserCapability.d.ts +0 -21
  95. package/dist/capabilities/askUserCapability.d.ts.map +0 -1
  96. package/dist/capabilities/askUserCapability.js +0 -155
  97. package/dist/capabilities/askUserCapability.js.map +0 -1
  98. package/dist/capabilities/bashCapability.d.ts +0 -13
  99. package/dist/capabilities/bashCapability.d.ts.map +0 -1
  100. package/dist/capabilities/bashCapability.js +0 -24
  101. package/dist/capabilities/bashCapability.js.map +0 -1
  102. package/dist/capabilities/browserAutomationCapability.d.ts +0 -37
  103. package/dist/capabilities/browserAutomationCapability.d.ts.map +0 -1
  104. package/dist/capabilities/browserAutomationCapability.js +0 -49
  105. package/dist/capabilities/browserAutomationCapability.js.map +0 -1
  106. package/dist/capabilities/cloudCapability.d.ts +0 -13
  107. package/dist/capabilities/cloudCapability.d.ts.map +0 -1
  108. package/dist/capabilities/cloudCapability.js +0 -38
  109. package/dist/capabilities/cloudCapability.js.map +0 -1
  110. package/dist/capabilities/codeAnalysisCapability.d.ts +0 -13
  111. package/dist/capabilities/codeAnalysisCapability.d.ts.map +0 -1
  112. package/dist/capabilities/codeAnalysisCapability.js +0 -24
  113. package/dist/capabilities/codeAnalysisCapability.js.map +0 -1
  114. package/dist/capabilities/codeGenerationCapability.d.ts +0 -13
  115. package/dist/capabilities/codeGenerationCapability.d.ts.map +0 -1
  116. package/dist/capabilities/codeGenerationCapability.js +0 -25
  117. package/dist/capabilities/codeGenerationCapability.js.map +0 -1
  118. package/dist/capabilities/codeQualityCapability.d.ts +0 -13
  119. package/dist/capabilities/codeQualityCapability.d.ts.map +0 -1
  120. package/dist/capabilities/codeQualityCapability.js +0 -25
  121. package/dist/capabilities/codeQualityCapability.js.map +0 -1
  122. package/dist/capabilities/dependencySecurityCapability.d.ts +0 -13
  123. package/dist/capabilities/dependencySecurityCapability.d.ts.map +0 -1
  124. package/dist/capabilities/dependencySecurityCapability.js +0 -24
  125. package/dist/capabilities/dependencySecurityCapability.js.map +0 -1
  126. package/dist/capabilities/devCapability.d.ts +0 -13
  127. package/dist/capabilities/devCapability.d.ts.map +0 -1
  128. package/dist/capabilities/devCapability.js +0 -24
  129. package/dist/capabilities/devCapability.js.map +0 -1
  130. package/dist/capabilities/editCapability.d.ts +0 -17
  131. package/dist/capabilities/editCapability.d.ts.map +0 -1
  132. package/dist/capabilities/editCapability.js +0 -27
  133. package/dist/capabilities/editCapability.js.map +0 -1
  134. package/dist/capabilities/emailCapability.d.ts +0 -12
  135. package/dist/capabilities/emailCapability.d.ts.map +0 -1
  136. package/dist/capabilities/emailCapability.js +0 -22
  137. package/dist/capabilities/emailCapability.js.map +0 -1
  138. package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts +0 -17
  139. package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts.map +0 -1
  140. package/dist/capabilities/enhancedCodeIntelligenceCapability.js +0 -28
  141. package/dist/capabilities/enhancedCodeIntelligenceCapability.js.map +0 -1
  142. package/dist/capabilities/enhancedDevWorkflowCapability.d.ts +0 -17
  143. package/dist/capabilities/enhancedDevWorkflowCapability.d.ts.map +0 -1
  144. package/dist/capabilities/enhancedDevWorkflowCapability.js +0 -28
  145. package/dist/capabilities/enhancedDevWorkflowCapability.js.map +0 -1
  146. package/dist/capabilities/enhancedGitCapability.d.ts +0 -7
  147. package/dist/capabilities/enhancedGitCapability.d.ts.map +0 -1
  148. package/dist/capabilities/enhancedGitCapability.js +0 -220
  149. package/dist/capabilities/enhancedGitCapability.js.map +0 -1
  150. package/dist/capabilities/filesystemCapability.d.ts +0 -13
  151. package/dist/capabilities/filesystemCapability.d.ts.map +0 -1
  152. package/dist/capabilities/filesystemCapability.js +0 -24
  153. package/dist/capabilities/filesystemCapability.js.map +0 -1
  154. package/dist/capabilities/frontendTestingCapability.d.ts +0 -13
  155. package/dist/capabilities/frontendTestingCapability.d.ts.map +0 -1
  156. package/dist/capabilities/frontendTestingCapability.js +0 -28
  157. package/dist/capabilities/frontendTestingCapability.js.map +0 -1
  158. package/dist/capabilities/globCapability.d.ts +0 -17
  159. package/dist/capabilities/globCapability.d.ts.map +0 -1
  160. package/dist/capabilities/globCapability.js +0 -27
  161. package/dist/capabilities/globCapability.js.map +0 -1
  162. package/dist/capabilities/index.d.ts +0 -25
  163. package/dist/capabilities/index.d.ts.map +0 -1
  164. package/dist/capabilities/index.js +0 -25
  165. package/dist/capabilities/index.js.map +0 -1
  166. package/dist/capabilities/interactionCapability.d.ts +0 -12
  167. package/dist/capabilities/interactionCapability.d.ts.map +0 -1
  168. package/dist/capabilities/interactionCapability.js +0 -22
  169. package/dist/capabilities/interactionCapability.js.map +0 -1
  170. package/dist/capabilities/learnCapability.d.ts +0 -13
  171. package/dist/capabilities/learnCapability.d.ts.map +0 -1
  172. package/dist/capabilities/learnCapability.js +0 -24
  173. package/dist/capabilities/learnCapability.js.map +0 -1
  174. package/dist/capabilities/mcpCapability.d.ts +0 -6
  175. package/dist/capabilities/mcpCapability.d.ts.map +0 -1
  176. package/dist/capabilities/mcpCapability.js +0 -19
  177. package/dist/capabilities/mcpCapability.js.map +0 -1
  178. package/dist/capabilities/notebookCapability.d.ts +0 -17
  179. package/dist/capabilities/notebookCapability.d.ts.map +0 -1
  180. package/dist/capabilities/notebookCapability.js +0 -27
  181. package/dist/capabilities/notebookCapability.js.map +0 -1
  182. package/dist/capabilities/performanceMonitoringCapability.d.ts +0 -108
  183. package/dist/capabilities/performanceMonitoringCapability.d.ts.map +0 -1
  184. package/dist/capabilities/performanceMonitoringCapability.js +0 -176
  185. package/dist/capabilities/performanceMonitoringCapability.js.map +0 -1
  186. package/dist/capabilities/planningCapability.d.ts +0 -16
  187. package/dist/capabilities/planningCapability.d.ts.map +0 -1
  188. package/dist/capabilities/planningCapability.js +0 -26
  189. package/dist/capabilities/planningCapability.js.map +0 -1
  190. package/dist/capabilities/refactoringCapability.d.ts +0 -13
  191. package/dist/capabilities/refactoringCapability.d.ts.map +0 -1
  192. package/dist/capabilities/refactoringCapability.js +0 -25
  193. package/dist/capabilities/refactoringCapability.js.map +0 -1
  194. package/dist/capabilities/repoChecksCapability.d.ts +0 -10
  195. package/dist/capabilities/repoChecksCapability.d.ts.map +0 -1
  196. package/dist/capabilities/repoChecksCapability.js +0 -24
  197. package/dist/capabilities/repoChecksCapability.js.map +0 -1
  198. package/dist/capabilities/searchCapability.d.ts +0 -13
  199. package/dist/capabilities/searchCapability.d.ts.map +0 -1
  200. package/dist/capabilities/searchCapability.js +0 -24
  201. package/dist/capabilities/searchCapability.js.map +0 -1
  202. package/dist/capabilities/skillCapability.d.ts +0 -3
  203. package/dist/capabilities/skillCapability.d.ts.map +0 -1
  204. package/dist/capabilities/skillCapability.js +0 -77
  205. package/dist/capabilities/skillCapability.js.map +0 -1
  206. package/dist/capabilities/taskManagementCapability.d.ts +0 -12
  207. package/dist/capabilities/taskManagementCapability.d.ts.map +0 -1
  208. package/dist/capabilities/taskManagementCapability.js +0 -22
  209. package/dist/capabilities/taskManagementCapability.js.map +0 -1
  210. package/dist/capabilities/testingCapability.d.ts +0 -13
  211. package/dist/capabilities/testingCapability.d.ts.map +0 -1
  212. package/dist/capabilities/testingCapability.js +0 -25
  213. package/dist/capabilities/testingCapability.js.map +0 -1
  214. package/dist/capabilities/todoCapability.d.ts +0 -19
  215. package/dist/capabilities/todoCapability.d.ts.map +0 -1
  216. package/dist/capabilities/todoCapability.js +0 -169
  217. package/dist/capabilities/todoCapability.js.map +0 -1
  218. package/dist/capabilities/toolManifest.d.ts +0 -3
  219. package/dist/capabilities/toolManifest.d.ts.map +0 -1
  220. package/dist/capabilities/toolManifest.js +0 -160
  221. package/dist/capabilities/toolManifest.js.map +0 -1
  222. package/dist/capabilities/toolRegistry.d.ts +0 -22
  223. package/dist/capabilities/toolRegistry.d.ts.map +0 -1
  224. package/dist/capabilities/toolRegistry.js +0 -115
  225. package/dist/capabilities/toolRegistry.js.map +0 -1
  226. package/dist/capabilities/validationCapability.d.ts +0 -13
  227. package/dist/capabilities/validationCapability.d.ts.map +0 -1
  228. package/dist/capabilities/validationCapability.js +0 -24
  229. package/dist/capabilities/validationCapability.js.map +0 -1
  230. package/dist/capabilities/webCapability.d.ts +0 -12
  231. package/dist/capabilities/webCapability.d.ts.map +0 -1
  232. package/dist/capabilities/webCapability.js +0 -22
  233. package/dist/capabilities/webCapability.js.map +0 -1
  234. package/dist/config.d.ts +0 -25
  235. package/dist/config.d.ts.map +0 -1
  236. package/dist/config.js +0 -140
  237. package/dist/config.js.map +0 -1
  238. package/dist/contracts/v1/agent.d.ts +0 -147
  239. package/dist/contracts/v1/agent.d.ts.map +0 -1
  240. package/dist/contracts/v1/agent.js +0 -8
  241. package/dist/contracts/v1/agent.js.map +0 -1
  242. package/dist/contracts/v1/agentProfileManifest.d.ts +0 -60
  243. package/dist/contracts/v1/agentProfileManifest.d.ts.map +0 -1
  244. package/dist/contracts/v1/agentProfileManifest.js +0 -9
  245. package/dist/contracts/v1/agentProfileManifest.js.map +0 -1
  246. package/dist/contracts/v1/agentRules.d.ts +0 -60
  247. package/dist/contracts/v1/agentRules.d.ts.map +0 -1
  248. package/dist/contracts/v1/agentRules.js +0 -10
  249. package/dist/contracts/v1/agentRules.js.map +0 -1
  250. package/dist/contracts/v1/provider.d.ts +0 -149
  251. package/dist/contracts/v1/provider.d.ts.map +0 -1
  252. package/dist/contracts/v1/provider.js +0 -7
  253. package/dist/contracts/v1/provider.js.map +0 -1
  254. package/dist/contracts/v1/tool.d.ts +0 -136
  255. package/dist/contracts/v1/tool.d.ts.map +0 -1
  256. package/dist/contracts/v1/tool.js +0 -7
  257. package/dist/contracts/v1/tool.js.map +0 -1
  258. package/dist/contracts/v1/toolAccess.d.ts +0 -43
  259. package/dist/contracts/v1/toolAccess.d.ts.map +0 -1
  260. package/dist/contracts/v1/toolAccess.js +0 -9
  261. package/dist/contracts/v1/toolAccess.js.map +0 -1
  262. package/dist/core/LazyLoader.d.ts +0 -129
  263. package/dist/core/LazyLoader.d.ts.map +0 -1
  264. package/dist/core/LazyLoader.js +0 -240
  265. package/dist/core/LazyLoader.js.map +0 -1
  266. package/dist/core/agent.d.ts +0 -144
  267. package/dist/core/agent.d.ts.map +0 -1
  268. package/dist/core/agent.js +0 -780
  269. package/dist/core/agent.js.map +0 -1
  270. package/dist/core/agentProfileManifest.d.ts +0 -3
  271. package/dist/core/agentProfileManifest.d.ts.map +0 -1
  272. package/dist/core/agentProfileManifest.js +0 -188
  273. package/dist/core/agentProfileManifest.js.map +0 -1
  274. package/dist/core/agentProfiles.d.ts +0 -22
  275. package/dist/core/agentProfiles.d.ts.map +0 -1
  276. package/dist/core/agentProfiles.js +0 -35
  277. package/dist/core/agentProfiles.js.map +0 -1
  278. package/dist/core/agentRulebook.d.ts +0 -11
  279. package/dist/core/agentRulebook.d.ts.map +0 -1
  280. package/dist/core/agentRulebook.js +0 -136
  281. package/dist/core/agentRulebook.js.map +0 -1
  282. package/dist/core/agentSchemaLoader.d.ts +0 -131
  283. package/dist/core/agentSchemaLoader.d.ts.map +0 -1
  284. package/dist/core/agentSchemaLoader.js +0 -234
  285. package/dist/core/agentSchemaLoader.js.map +0 -1
  286. package/dist/core/cliTestHarness.d.ts +0 -200
  287. package/dist/core/cliTestHarness.d.ts.map +0 -1
  288. package/dist/core/cliTestHarness.js +0 -549
  289. package/dist/core/cliTestHarness.js.map +0 -1
  290. package/dist/core/contextManager.d.ts +0 -259
  291. package/dist/core/contextManager.d.ts.map +0 -1
  292. package/dist/core/contextManager.js +0 -1057
  293. package/dist/core/contextManager.js.map +0 -1
  294. package/dist/core/contextWindow.d.ts +0 -42
  295. package/dist/core/contextWindow.d.ts.map +0 -1
  296. package/dist/core/contextWindow.js +0 -123
  297. package/dist/core/contextWindow.js.map +0 -1
  298. package/dist/core/customCommands.d.ts +0 -18
  299. package/dist/core/customCommands.d.ts.map +0 -1
  300. package/dist/core/customCommands.js +0 -81
  301. package/dist/core/customCommands.js.map +0 -1
  302. package/dist/core/errors/apiKeyErrors.d.ts +0 -11
  303. package/dist/core/errors/apiKeyErrors.d.ts.map +0 -1
  304. package/dist/core/errors/apiKeyErrors.js +0 -159
  305. package/dist/core/errors/apiKeyErrors.js.map +0 -1
  306. package/dist/core/errors/errorTypes.d.ts +0 -111
  307. package/dist/core/errors/errorTypes.d.ts.map +0 -1
  308. package/dist/core/errors/errorTypes.js +0 -348
  309. package/dist/core/errors/errorTypes.js.map +0 -1
  310. package/dist/core/errors/safetyValidator.d.ts +0 -71
  311. package/dist/core/errors/safetyValidator.d.ts.map +0 -1
  312. package/dist/core/errors/safetyValidator.js +0 -302
  313. package/dist/core/errors/safetyValidator.js.map +0 -1
  314. package/dist/core/errors.d.ts +0 -4
  315. package/dist/core/errors.d.ts.map +0 -1
  316. package/dist/core/errors.js +0 -33
  317. package/dist/core/errors.js.map +0 -1
  318. package/dist/core/isolatedVerifier.d.ts +0 -40
  319. package/dist/core/isolatedVerifier.d.ts.map +0 -1
  320. package/dist/core/isolatedVerifier.js +0 -129
  321. package/dist/core/isolatedVerifier.js.map +0 -1
  322. package/dist/core/modelDiscovery.d.ts +0 -101
  323. package/dist/core/modelDiscovery.d.ts.map +0 -1
  324. package/dist/core/modelDiscovery.js +0 -780
  325. package/dist/core/modelDiscovery.js.map +0 -1
  326. package/dist/core/multilinePasteHandler.d.ts +0 -35
  327. package/dist/core/multilinePasteHandler.d.ts.map +0 -1
  328. package/dist/core/multilinePasteHandler.js +0 -80
  329. package/dist/core/multilinePasteHandler.js.map +0 -1
  330. package/dist/core/performanceMonitor.d.ts +0 -124
  331. package/dist/core/performanceMonitor.d.ts.map +0 -1
  332. package/dist/core/performanceMonitor.js +0 -195
  333. package/dist/core/performanceMonitor.js.map +0 -1
  334. package/dist/core/preferences.d.ts +0 -31
  335. package/dist/core/preferences.d.ts.map +0 -1
  336. package/dist/core/preferences.js +0 -232
  337. package/dist/core/preferences.js.map +0 -1
  338. package/dist/core/responseVerifier.d.ts +0 -98
  339. package/dist/core/responseVerifier.d.ts.map +0 -1
  340. package/dist/core/responseVerifier.js +0 -509
  341. package/dist/core/responseVerifier.js.map +0 -1
  342. package/dist/core/resultVerification.d.ts +0 -141
  343. package/dist/core/resultVerification.d.ts.map +0 -1
  344. package/dist/core/resultVerification.js +0 -482
  345. package/dist/core/resultVerification.js.map +0 -1
  346. package/dist/core/schemaValidator.d.ts +0 -44
  347. package/dist/core/schemaValidator.d.ts.map +0 -1
  348. package/dist/core/schemaValidator.js +0 -155
  349. package/dist/core/schemaValidator.js.map +0 -1
  350. package/dist/core/secretStore.d.ts +0 -47
  351. package/dist/core/secretStore.d.ts.map +0 -1
  352. package/dist/core/secretStore.js +0 -364
  353. package/dist/core/secretStore.js.map +0 -1
  354. package/dist/core/sessionStore.d.ts +0 -33
  355. package/dist/core/sessionStore.d.ts.map +0 -1
  356. package/dist/core/sessionStore.js +0 -188
  357. package/dist/core/sessionStore.js.map +0 -1
  358. package/dist/core/testUtils.d.ts +0 -121
  359. package/dist/core/testUtils.d.ts.map +0 -1
  360. package/dist/core/testUtils.js +0 -235
  361. package/dist/core/testUtils.js.map +0 -1
  362. package/dist/core/toolPreconditions.d.ts +0 -41
  363. package/dist/core/toolPreconditions.d.ts.map +0 -1
  364. package/dist/core/toolPreconditions.js +0 -319
  365. package/dist/core/toolPreconditions.js.map +0 -1
  366. package/dist/core/toolRuntime.d.ts +0 -137
  367. package/dist/core/toolRuntime.d.ts.map +0 -1
  368. package/dist/core/toolRuntime.js +0 -375
  369. package/dist/core/toolRuntime.js.map +0 -1
  370. package/dist/core/types.d.ts +0 -306
  371. package/dist/core/types.d.ts.map +0 -1
  372. package/dist/core/types.js +0 -76
  373. package/dist/core/types.js.map +0 -1
  374. package/dist/core/unified/errors.d.ts +0 -189
  375. package/dist/core/unified/errors.d.ts.map +0 -1
  376. package/dist/core/unified/errors.js +0 -497
  377. package/dist/core/unified/errors.js.map +0 -1
  378. package/dist/core/unified/index.d.ts +0 -19
  379. package/dist/core/unified/index.d.ts.map +0 -1
  380. package/dist/core/unified/index.js +0 -68
  381. package/dist/core/unified/index.js.map +0 -1
  382. package/dist/core/unified/schema.d.ts +0 -101
  383. package/dist/core/unified/schema.d.ts.map +0 -1
  384. package/dist/core/unified/schema.js +0 -350
  385. package/dist/core/unified/schema.js.map +0 -1
  386. package/dist/core/unified/toolRuntime.d.ts +0 -179
  387. package/dist/core/unified/toolRuntime.d.ts.map +0 -1
  388. package/dist/core/unified/toolRuntime.js +0 -517
  389. package/dist/core/unified/toolRuntime.js.map +0 -1
  390. package/dist/core/unified/tools.d.ts +0 -127
  391. package/dist/core/unified/tools.d.ts.map +0 -1
  392. package/dist/core/unified/tools.js +0 -1333
  393. package/dist/core/unified/tools.js.map +0 -1
  394. package/dist/core/unified/types.d.ts +0 -352
  395. package/dist/core/unified/types.d.ts.map +0 -1
  396. package/dist/core/unified/types.js +0 -12
  397. package/dist/core/unified/types.js.map +0 -1
  398. package/dist/core/unified/version.d.ts +0 -209
  399. package/dist/core/unified/version.d.ts.map +0 -1
  400. package/dist/core/unified/version.js +0 -454
  401. package/dist/core/unified/version.js.map +0 -1
  402. package/dist/core/validationRunner.d.ts +0 -93
  403. package/dist/core/validationRunner.d.ts.map +0 -1
  404. package/dist/core/validationRunner.js +0 -740
  405. package/dist/core/validationRunner.js.map +0 -1
  406. package/dist/headless/headlessApp.d.ts +0 -5
  407. package/dist/headless/headlessApp.d.ts.map +0 -1
  408. package/dist/headless/headlessApp.js +0 -189
  409. package/dist/headless/headlessApp.js.map +0 -1
  410. package/dist/intelligence/codeIntelligence.d.ts +0 -84
  411. package/dist/intelligence/codeIntelligence.d.ts.map +0 -1
  412. package/dist/intelligence/codeIntelligence.js +0 -493
  413. package/dist/intelligence/codeIntelligence.js.map +0 -1
  414. package/dist/intelligence/docGenerator.d.ts +0 -86
  415. package/dist/intelligence/docGenerator.d.ts.map +0 -1
  416. package/dist/intelligence/docGenerator.js +0 -564
  417. package/dist/intelligence/docGenerator.js.map +0 -1
  418. package/dist/intelligence/index.d.ts +0 -51
  419. package/dist/intelligence/index.d.ts.map +0 -1
  420. package/dist/intelligence/index.js +0 -253
  421. package/dist/intelligence/index.js.map +0 -1
  422. package/dist/intelligence/refactoring.d.ts +0 -50
  423. package/dist/intelligence/refactoring.d.ts.map +0 -1
  424. package/dist/intelligence/refactoring.js +0 -354
  425. package/dist/intelligence/refactoring.js.map +0 -1
  426. package/dist/intelligence/testGenerator.d.ts +0 -74
  427. package/dist/intelligence/testGenerator.d.ts.map +0 -1
  428. package/dist/intelligence/testGenerator.js +0 -483
  429. package/dist/intelligence/testGenerator.js.map +0 -1
  430. package/dist/mcp/config.d.ts +0 -8
  431. package/dist/mcp/config.d.ts.map +0 -1
  432. package/dist/mcp/config.js +0 -252
  433. package/dist/mcp/config.js.map +0 -1
  434. package/dist/mcp/sseClient.d.ts +0 -34
  435. package/dist/mcp/sseClient.d.ts.map +0 -1
  436. package/dist/mcp/sseClient.js +0 -299
  437. package/dist/mcp/sseClient.js.map +0 -1
  438. package/dist/mcp/stdioClient.d.ts +0 -24
  439. package/dist/mcp/stdioClient.d.ts.map +0 -1
  440. package/dist/mcp/stdioClient.js +0 -179
  441. package/dist/mcp/stdioClient.js.map +0 -1
  442. package/dist/mcp/toolBridge.d.ts +0 -12
  443. package/dist/mcp/toolBridge.d.ts.map +0 -1
  444. package/dist/mcp/toolBridge.js +0 -117
  445. package/dist/mcp/toolBridge.js.map +0 -1
  446. package/dist/mcp/types.d.ts +0 -60
  447. package/dist/mcp/types.d.ts.map +0 -1
  448. package/dist/mcp/types.js +0 -2
  449. package/dist/mcp/types.js.map +0 -1
  450. package/dist/plugins/index.d.ts +0 -49
  451. package/dist/plugins/index.d.ts.map +0 -1
  452. package/dist/plugins/index.js +0 -114
  453. package/dist/plugins/index.js.map +0 -1
  454. package/dist/plugins/providers/anthropic/index.d.ts +0 -11
  455. package/dist/plugins/providers/anthropic/index.d.ts.map +0 -1
  456. package/dist/plugins/providers/anthropic/index.js +0 -38
  457. package/dist/plugins/providers/anthropic/index.js.map +0 -1
  458. package/dist/plugins/providers/deepseek/index.d.ts +0 -11
  459. package/dist/plugins/providers/deepseek/index.d.ts.map +0 -1
  460. package/dist/plugins/providers/deepseek/index.js +0 -52
  461. package/dist/plugins/providers/deepseek/index.js.map +0 -1
  462. package/dist/plugins/providers/google/index.d.ts +0 -11
  463. package/dist/plugins/providers/google/index.d.ts.map +0 -1
  464. package/dist/plugins/providers/google/index.js +0 -40
  465. package/dist/plugins/providers/google/index.js.map +0 -1
  466. package/dist/plugins/providers/index.d.ts +0 -2
  467. package/dist/plugins/providers/index.d.ts.map +0 -1
  468. package/dist/plugins/providers/index.js +0 -20
  469. package/dist/plugins/providers/index.js.map +0 -1
  470. package/dist/plugins/providers/ollama/index.d.ts +0 -21
  471. package/dist/plugins/providers/ollama/index.d.ts.map +0 -1
  472. package/dist/plugins/providers/ollama/index.js +0 -69
  473. package/dist/plugins/providers/ollama/index.js.map +0 -1
  474. package/dist/plugins/providers/openai/index.d.ts +0 -12
  475. package/dist/plugins/providers/openai/index.d.ts.map +0 -1
  476. package/dist/plugins/providers/openai/index.js +0 -39
  477. package/dist/plugins/providers/openai/index.js.map +0 -1
  478. package/dist/plugins/providers/xai/index.d.ts +0 -11
  479. package/dist/plugins/providers/xai/index.d.ts.map +0 -1
  480. package/dist/plugins/providers/xai/index.js +0 -39
  481. package/dist/plugins/providers/xai/index.js.map +0 -1
  482. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts +0 -3
  483. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts.map +0 -1
  484. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js +0 -9
  485. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js.map +0 -1
  486. package/dist/plugins/tools/bash/localBashPlugin.d.ts +0 -3
  487. package/dist/plugins/tools/bash/localBashPlugin.d.ts.map +0 -1
  488. package/dist/plugins/tools/bash/localBashPlugin.js +0 -14
  489. package/dist/plugins/tools/bash/localBashPlugin.js.map +0 -1
  490. package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts +0 -14
  491. package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts.map +0 -1
  492. package/dist/plugins/tools/browser/browserAutomationPlugin.js +0 -26
  493. package/dist/plugins/tools/browser/browserAutomationPlugin.js.map +0 -1
  494. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts +0 -3
  495. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts.map +0 -1
  496. package/dist/plugins/tools/checks/localRepoChecksPlugin.js +0 -14
  497. package/dist/plugins/tools/checks/localRepoChecksPlugin.js.map +0 -1
  498. package/dist/plugins/tools/cloud/cloudPlugin.d.ts +0 -3
  499. package/dist/plugins/tools/cloud/cloudPlugin.d.ts.map +0 -1
  500. package/dist/plugins/tools/cloud/cloudPlugin.js +0 -14
  501. package/dist/plugins/tools/cloud/cloudPlugin.js.map +0 -1
  502. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts +0 -3
  503. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts.map +0 -1
  504. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -14
  505. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js.map +0 -1
  506. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts +0 -3
  507. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts.map +0 -1
  508. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js +0 -14
  509. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js.map +0 -1
  510. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts +0 -3
  511. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts.map +0 -1
  512. package/dist/plugins/tools/dependency/dependencyPlugin.js +0 -12
  513. package/dist/plugins/tools/dependency/dependencyPlugin.js.map +0 -1
  514. package/dist/plugins/tools/development/devPlugin.d.ts +0 -3
  515. package/dist/plugins/tools/development/devPlugin.d.ts.map +0 -1
  516. package/dist/plugins/tools/development/devPlugin.js +0 -14
  517. package/dist/plugins/tools/development/devPlugin.js.map +0 -1
  518. package/dist/plugins/tools/edit/editPlugin.d.ts +0 -9
  519. package/dist/plugins/tools/edit/editPlugin.d.ts.map +0 -1
  520. package/dist/plugins/tools/edit/editPlugin.js +0 -15
  521. package/dist/plugins/tools/edit/editPlugin.js.map +0 -1
  522. package/dist/plugins/tools/email/emailPlugin.d.ts +0 -3
  523. package/dist/plugins/tools/email/emailPlugin.d.ts.map +0 -1
  524. package/dist/plugins/tools/email/emailPlugin.js +0 -12
  525. package/dist/plugins/tools/email/emailPlugin.js.map +0 -1
  526. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts +0 -3
  527. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts.map +0 -1
  528. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js +0 -9
  529. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js.map +0 -1
  530. package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts +0 -3
  531. package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts.map +0 -1
  532. package/dist/plugins/tools/filesystem/localFilesystemPlugin.js +0 -14
  533. package/dist/plugins/tools/filesystem/localFilesystemPlugin.js.map +0 -1
  534. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts +0 -3
  535. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts.map +0 -1
  536. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js +0 -14
  537. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js.map +0 -1
  538. package/dist/plugins/tools/glob/globPlugin.d.ts +0 -9
  539. package/dist/plugins/tools/glob/globPlugin.d.ts.map +0 -1
  540. package/dist/plugins/tools/glob/globPlugin.js +0 -15
  541. package/dist/plugins/tools/glob/globPlugin.js.map +0 -1
  542. package/dist/plugins/tools/index.d.ts +0 -3
  543. package/dist/plugins/tools/index.d.ts.map +0 -1
  544. package/dist/plugins/tools/index.js +0 -3
  545. package/dist/plugins/tools/index.js.map +0 -1
  546. package/dist/plugins/tools/interaction/interactionPlugin.d.ts +0 -3
  547. package/dist/plugins/tools/interaction/interactionPlugin.d.ts.map +0 -1
  548. package/dist/plugins/tools/interaction/interactionPlugin.js +0 -12
  549. package/dist/plugins/tools/interaction/interactionPlugin.js.map +0 -1
  550. package/dist/plugins/tools/learn/learnPlugin.d.ts +0 -3
  551. package/dist/plugins/tools/learn/learnPlugin.d.ts.map +0 -1
  552. package/dist/plugins/tools/learn/learnPlugin.js +0 -14
  553. package/dist/plugins/tools/learn/learnPlugin.js.map +0 -1
  554. package/dist/plugins/tools/mcp/mcpPlugin.d.ts +0 -3
  555. package/dist/plugins/tools/mcp/mcpPlugin.d.ts.map +0 -1
  556. package/dist/plugins/tools/mcp/mcpPlugin.js +0 -9
  557. package/dist/plugins/tools/mcp/mcpPlugin.js.map +0 -1
  558. package/dist/plugins/tools/nodeDefaults.d.ts +0 -2
  559. package/dist/plugins/tools/nodeDefaults.d.ts.map +0 -1
  560. package/dist/plugins/tools/nodeDefaults.js +0 -63
  561. package/dist/plugins/tools/nodeDefaults.js.map +0 -1
  562. package/dist/plugins/tools/notebook/notebookPlugin.d.ts +0 -9
  563. package/dist/plugins/tools/notebook/notebookPlugin.d.ts.map +0 -1
  564. package/dist/plugins/tools/notebook/notebookPlugin.js +0 -15
  565. package/dist/plugins/tools/notebook/notebookPlugin.js.map +0 -1
  566. package/dist/plugins/tools/planning/planningPlugin.d.ts +0 -9
  567. package/dist/plugins/tools/planning/planningPlugin.d.ts.map +0 -1
  568. package/dist/plugins/tools/planning/planningPlugin.js +0 -15
  569. package/dist/plugins/tools/planning/planningPlugin.js.map +0 -1
  570. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts +0 -3
  571. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts.map +0 -1
  572. package/dist/plugins/tools/refactoring/refactoringPlugin.js +0 -12
  573. package/dist/plugins/tools/refactoring/refactoringPlugin.js.map +0 -1
  574. package/dist/plugins/tools/registry.d.ts +0 -22
  575. package/dist/plugins/tools/registry.d.ts.map +0 -1
  576. package/dist/plugins/tools/registry.js +0 -58
  577. package/dist/plugins/tools/registry.js.map +0 -1
  578. package/dist/plugins/tools/search/localSearchPlugin.d.ts +0 -3
  579. package/dist/plugins/tools/search/localSearchPlugin.d.ts.map +0 -1
  580. package/dist/plugins/tools/search/localSearchPlugin.js +0 -14
  581. package/dist/plugins/tools/search/localSearchPlugin.js.map +0 -1
  582. package/dist/plugins/tools/skills/skillPlugin.d.ts +0 -3
  583. package/dist/plugins/tools/skills/skillPlugin.d.ts.map +0 -1
  584. package/dist/plugins/tools/skills/skillPlugin.js +0 -9
  585. package/dist/plugins/tools/skills/skillPlugin.js.map +0 -1
  586. package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts +0 -3
  587. package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts.map +0 -1
  588. package/dist/plugins/tools/taskManagement/taskManagementPlugin.js +0 -12
  589. package/dist/plugins/tools/taskManagement/taskManagementPlugin.js.map +0 -1
  590. package/dist/plugins/tools/testing/testingPlugin.d.ts +0 -3
  591. package/dist/plugins/tools/testing/testingPlugin.d.ts.map +0 -1
  592. package/dist/plugins/tools/testing/testingPlugin.js +0 -12
  593. package/dist/plugins/tools/testing/testingPlugin.js.map +0 -1
  594. package/dist/plugins/tools/validation/validationPlugin.d.ts +0 -3
  595. package/dist/plugins/tools/validation/validationPlugin.d.ts.map +0 -1
  596. package/dist/plugins/tools/validation/validationPlugin.js +0 -14
  597. package/dist/plugins/tools/validation/validationPlugin.js.map +0 -1
  598. package/dist/plugins/tools/web/webPlugin.d.ts +0 -3
  599. package/dist/plugins/tools/web/webPlugin.d.ts.map +0 -1
  600. package/dist/plugins/tools/web/webPlugin.js +0 -12
  601. package/dist/plugins/tools/web/webPlugin.js.map +0 -1
  602. package/dist/providers/anthropicProvider.d.ts +0 -41
  603. package/dist/providers/anthropicProvider.d.ts.map +0 -1
  604. package/dist/providers/anthropicProvider.js +0 -446
  605. package/dist/providers/anthropicProvider.js.map +0 -1
  606. package/dist/providers/googleProvider.d.ts +0 -36
  607. package/dist/providers/googleProvider.d.ts.map +0 -1
  608. package/dist/providers/googleProvider.js +0 -312
  609. package/dist/providers/googleProvider.js.map +0 -1
  610. package/dist/providers/openaiChatCompletionsProvider.d.ts +0 -43
  611. package/dist/providers/openaiChatCompletionsProvider.d.ts.map +0 -1
  612. package/dist/providers/openaiChatCompletionsProvider.js +0 -468
  613. package/dist/providers/openaiChatCompletionsProvider.js.map +0 -1
  614. package/dist/providers/openaiResponsesProvider.d.ts +0 -38
  615. package/dist/providers/openaiResponsesProvider.d.ts.map +0 -1
  616. package/dist/providers/openaiResponsesProvider.js +0 -364
  617. package/dist/providers/openaiResponsesProvider.js.map +0 -1
  618. package/dist/providers/providerFactory.d.ts +0 -18
  619. package/dist/providers/providerFactory.d.ts.map +0 -1
  620. package/dist/providers/providerFactory.js +0 -25
  621. package/dist/providers/providerFactory.js.map +0 -1
  622. package/dist/providers/resilientProvider.d.ts +0 -94
  623. package/dist/providers/resilientProvider.d.ts.map +0 -1
  624. package/dist/providers/resilientProvider.js +0 -370
  625. package/dist/providers/resilientProvider.js.map +0 -1
  626. package/dist/runtime/agentController.d.ts +0 -65
  627. package/dist/runtime/agentController.d.ts.map +0 -1
  628. package/dist/runtime/agentController.js +0 -353
  629. package/dist/runtime/agentController.js.map +0 -1
  630. package/dist/runtime/agentHost.d.ts +0 -61
  631. package/dist/runtime/agentHost.d.ts.map +0 -1
  632. package/dist/runtime/agentHost.js +0 -156
  633. package/dist/runtime/agentHost.js.map +0 -1
  634. package/dist/runtime/agentSession.d.ts +0 -40
  635. package/dist/runtime/agentSession.d.ts.map +0 -1
  636. package/dist/runtime/agentSession.js +0 -206
  637. package/dist/runtime/agentSession.js.map +0 -1
  638. package/dist/runtime/browser.d.ts +0 -7
  639. package/dist/runtime/browser.d.ts.map +0 -1
  640. package/dist/runtime/browser.js +0 -10
  641. package/dist/runtime/browser.js.map +0 -1
  642. package/dist/runtime/cloud.d.ts +0 -7
  643. package/dist/runtime/cloud.d.ts.map +0 -1
  644. package/dist/runtime/cloud.js +0 -10
  645. package/dist/runtime/cloud.js.map +0 -1
  646. package/dist/runtime/node.d.ts +0 -8
  647. package/dist/runtime/node.d.ts.map +0 -1
  648. package/dist/runtime/node.js +0 -11
  649. package/dist/runtime/node.js.map +0 -1
  650. package/dist/runtime/universal.d.ts +0 -21
  651. package/dist/runtime/universal.d.ts.map +0 -1
  652. package/dist/runtime/universal.js +0 -29
  653. package/dist/runtime/universal.js.map +0 -1
  654. package/dist/security/active-stack-security.d.ts +0 -112
  655. package/dist/security/active-stack-security.d.ts.map +0 -1
  656. package/dist/security/active-stack-security.js +0 -296
  657. package/dist/security/active-stack-security.js.map +0 -1
  658. package/dist/security/advanced-persistence-research.d.ts +0 -92
  659. package/dist/security/advanced-persistence-research.d.ts.map +0 -1
  660. package/dist/security/advanced-persistence-research.js +0 -195
  661. package/dist/security/advanced-persistence-research.js.map +0 -1
  662. package/dist/security/advanced-targeting.d.ts +0 -119
  663. package/dist/security/advanced-targeting.d.ts.map +0 -1
  664. package/dist/security/advanced-targeting.js +0 -233
  665. package/dist/security/advanced-targeting.js.map +0 -1
  666. package/dist/security/assessment/vulnerabilityAssessment.d.ts +0 -104
  667. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +0 -1
  668. package/dist/security/assessment/vulnerabilityAssessment.js +0 -315
  669. package/dist/security/assessment/vulnerabilityAssessment.js.map +0 -1
  670. package/dist/security/authorization/securityAuthorization.d.ts +0 -88
  671. package/dist/security/authorization/securityAuthorization.d.ts.map +0 -1
  672. package/dist/security/authorization/securityAuthorization.js +0 -172
  673. package/dist/security/authorization/securityAuthorization.js.map +0 -1
  674. package/dist/security/comprehensive-targeting.d.ts +0 -85
  675. package/dist/security/comprehensive-targeting.d.ts.map +0 -1
  676. package/dist/security/comprehensive-targeting.js +0 -438
  677. package/dist/security/comprehensive-targeting.js.map +0 -1
  678. package/dist/security/global-security-integration.d.ts +0 -91
  679. package/dist/security/global-security-integration.d.ts.map +0 -1
  680. package/dist/security/global-security-integration.js +0 -218
  681. package/dist/security/global-security-integration.js.map +0 -1
  682. package/dist/security/index.d.ts +0 -38
  683. package/dist/security/index.d.ts.map +0 -1
  684. package/dist/security/index.js +0 -47
  685. package/dist/security/index.js.map +0 -1
  686. package/dist/security/persistence-analyzer.d.ts +0 -56
  687. package/dist/security/persistence-analyzer.d.ts.map +0 -1
  688. package/dist/security/persistence-analyzer.js +0 -187
  689. package/dist/security/persistence-analyzer.js.map +0 -1
  690. package/dist/security/persistence-cli.d.ts +0 -36
  691. package/dist/security/persistence-cli.d.ts.map +0 -1
  692. package/dist/security/persistence-cli.js +0 -160
  693. package/dist/security/persistence-cli.js.map +0 -1
  694. package/dist/security/persistence-research.d.ts +0 -92
  695. package/dist/security/persistence-research.d.ts.map +0 -1
  696. package/dist/security/persistence-research.js +0 -364
  697. package/dist/security/persistence-research.js.map +0 -1
  698. package/dist/security/research/persistenceResearch.d.ts +0 -97
  699. package/dist/security/research/persistenceResearch.d.ts.map +0 -1
  700. package/dist/security/research/persistenceResearch.js +0 -282
  701. package/dist/security/research/persistenceResearch.js.map +0 -1
  702. package/dist/security/security-integration.d.ts +0 -74
  703. package/dist/security/security-integration.d.ts.map +0 -1
  704. package/dist/security/security-integration.js +0 -137
  705. package/dist/security/security-integration.js.map +0 -1
  706. package/dist/security/security-testing-framework.d.ts +0 -112
  707. package/dist/security/security-testing-framework.d.ts.map +0 -1
  708. package/dist/security/security-testing-framework.js +0 -364
  709. package/dist/security/security-testing-framework.js.map +0 -1
  710. package/dist/security/simulation/attackSimulation.d.ts +0 -93
  711. package/dist/security/simulation/attackSimulation.d.ts.map +0 -1
  712. package/dist/security/simulation/attackSimulation.js +0 -341
  713. package/dist/security/simulation/attackSimulation.js.map +0 -1
  714. package/dist/security/strategic-operations.d.ts +0 -100
  715. package/dist/security/strategic-operations.d.ts.map +0 -1
  716. package/dist/security/strategic-operations.js +0 -276
  717. package/dist/security/strategic-operations.js.map +0 -1
  718. package/dist/security/tool-security-wrapper.d.ts +0 -58
  719. package/dist/security/tool-security-wrapper.d.ts.map +0 -1
  720. package/dist/security/tool-security-wrapper.js +0 -156
  721. package/dist/security/tool-security-wrapper.js.map +0 -1
  722. package/dist/shell/autoExecutor.d.ts +0 -70
  723. package/dist/shell/autoExecutor.d.ts.map +0 -1
  724. package/dist/shell/autoExecutor.js +0 -288
  725. package/dist/shell/autoExecutor.js.map +0 -1
  726. package/dist/shell/bracketedPasteManager.d.ts +0 -128
  727. package/dist/shell/bracketedPasteManager.d.ts.map +0 -1
  728. package/dist/shell/bracketedPasteManager.enhanced.d.ts +0 -2
  729. package/dist/shell/bracketedPasteManager.enhanced.d.ts.map +0 -1
  730. package/dist/shell/bracketedPasteManager.enhanced.js +0 -4
  731. package/dist/shell/bracketedPasteManager.enhanced.js.map +0 -1
  732. package/dist/shell/bracketedPasteManager.js +0 -372
  733. package/dist/shell/bracketedPasteManager.js.map +0 -1
  734. package/dist/shell/chatBox.d.ts +0 -228
  735. package/dist/shell/chatBox.d.ts.map +0 -1
  736. package/dist/shell/chatBox.js +0 -811
  737. package/dist/shell/chatBox.js.map +0 -1
  738. package/dist/shell/claudeCodeStreamHandler.d.ts +0 -145
  739. package/dist/shell/claudeCodeStreamHandler.d.ts.map +0 -1
  740. package/dist/shell/claudeCodeStreamHandler.js +0 -312
  741. package/dist/shell/claudeCodeStreamHandler.js.map +0 -1
  742. package/dist/shell/composableMessage.d.ts +0 -183
  743. package/dist/shell/composableMessage.d.ts.map +0 -1
  744. package/dist/shell/composableMessage.js +0 -420
  745. package/dist/shell/composableMessage.js.map +0 -1
  746. package/dist/shell/fileChangeTracker.d.ts +0 -39
  747. package/dist/shell/fileChangeTracker.d.ts.map +0 -1
  748. package/dist/shell/fileChangeTracker.js +0 -64
  749. package/dist/shell/fileChangeTracker.js.map +0 -1
  750. package/dist/shell/inputQueueManager.d.ts +0 -144
  751. package/dist/shell/inputQueueManager.d.ts.map +0 -1
  752. package/dist/shell/inputQueueManager.js +0 -290
  753. package/dist/shell/inputQueueManager.js.map +0 -1
  754. package/dist/shell/interactiveShell.d.ts +0 -312
  755. package/dist/shell/interactiveShell.d.ts.map +0 -1
  756. package/dist/shell/interactiveShell.js +0 -3271
  757. package/dist/shell/interactiveShell.js.map +0 -1
  758. package/dist/shell/liveStatus.d.ts +0 -29
  759. package/dist/shell/liveStatus.d.ts.map +0 -1
  760. package/dist/shell/liveStatus.js +0 -77
  761. package/dist/shell/liveStatus.js.map +0 -1
  762. package/dist/shell/shellApp.d.ts +0 -19
  763. package/dist/shell/shellApp.d.ts.map +0 -1
  764. package/dist/shell/shellApp.js +0 -364
  765. package/dist/shell/shellApp.js.map +0 -1
  766. package/dist/shell/streamingOutputManager.d.ts +0 -114
  767. package/dist/shell/streamingOutputManager.d.ts.map +0 -1
  768. package/dist/shell/streamingOutputManager.js +0 -213
  769. package/dist/shell/streamingOutputManager.js.map +0 -1
  770. package/dist/shell/systemPrompt.d.ts +0 -3
  771. package/dist/shell/systemPrompt.d.ts.map +0 -1
  772. package/dist/shell/systemPrompt.js +0 -73
  773. package/dist/shell/systemPrompt.js.map +0 -1
  774. package/dist/shell/taskCompletionDetector.d.ts +0 -106
  775. package/dist/shell/taskCompletionDetector.d.ts.map +0 -1
  776. package/dist/shell/taskCompletionDetector.js +0 -402
  777. package/dist/shell/taskCompletionDetector.js.map +0 -1
  778. package/dist/shell/terminalInput.d.ts +0 -221
  779. package/dist/shell/terminalInput.d.ts.map +0 -1
  780. package/dist/shell/terminalInput.js +0 -1082
  781. package/dist/shell/terminalInput.js.map +0 -1
  782. package/dist/shell/terminalInputAdapter.d.ts +0 -117
  783. package/dist/shell/terminalInputAdapter.d.ts.map +0 -1
  784. package/dist/shell/terminalInputAdapter.js +0 -217
  785. package/dist/shell/terminalInputAdapter.js.map +0 -1
  786. package/dist/shell/unifiedChatBox.d.ts +0 -194
  787. package/dist/shell/unifiedChatBox.d.ts.map +0 -1
  788. package/dist/shell/unifiedChatBox.js +0 -585
  789. package/dist/shell/unifiedChatBox.js.map +0 -1
  790. package/dist/shell/updateManager.d.ts +0 -2
  791. package/dist/shell/updateManager.d.ts.map +0 -1
  792. package/dist/shell/updateManager.js +0 -111
  793. package/dist/shell/updateManager.js.map +0 -1
  794. package/dist/skills/skillRepository.d.ts +0 -103
  795. package/dist/skills/skillRepository.d.ts.map +0 -1
  796. package/dist/skills/skillRepository.js +0 -237
  797. package/dist/skills/skillRepository.js.map +0 -1
  798. package/dist/skills/types.d.ts +0 -37
  799. package/dist/skills/types.d.ts.map +0 -1
  800. package/dist/skills/types.js +0 -2
  801. package/dist/skills/types.js.map +0 -1
  802. package/dist/subagents/taskRunner.d.ts +0 -23
  803. package/dist/subagents/taskRunner.d.ts.map +0 -1
  804. package/dist/subagents/taskRunner.js +0 -271
  805. package/dist/subagents/taskRunner.js.map +0 -1
  806. package/dist/tools/advancedTestGenerationTools.d.ts +0 -21
  807. package/dist/tools/advancedTestGenerationTools.d.ts.map +0 -1
  808. package/dist/tools/advancedTestGenerationTools.js +0 -301
  809. package/dist/tools/advancedTestGenerationTools.js.map +0 -1
  810. package/dist/tools/backgroundBashTools.d.ts +0 -21
  811. package/dist/tools/backgroundBashTools.d.ts.map +0 -1
  812. package/dist/tools/backgroundBashTools.js +0 -215
  813. package/dist/tools/backgroundBashTools.js.map +0 -1
  814. package/dist/tools/bashTools.d.ts +0 -8
  815. package/dist/tools/bashTools.d.ts.map +0 -1
  816. package/dist/tools/bashTools.js +0 -227
  817. package/dist/tools/bashTools.js.map +0 -1
  818. package/dist/tools/browserAutomationTools.d.ts +0 -23
  819. package/dist/tools/browserAutomationTools.d.ts.map +0 -1
  820. package/dist/tools/browserAutomationTools.js +0 -916
  821. package/dist/tools/browserAutomationTools.js.map +0 -1
  822. package/dist/tools/cloudTools.d.ts +0 -49
  823. package/dist/tools/cloudTools.d.ts.map +0 -1
  824. package/dist/tools/cloudTools.js +0 -1258
  825. package/dist/tools/cloudTools.js.map +0 -1
  826. package/dist/tools/code-quality-dashboard.d.ts +0 -57
  827. package/dist/tools/code-quality-dashboard.d.ts.map +0 -1
  828. package/dist/tools/code-quality-dashboard.js +0 -218
  829. package/dist/tools/code-quality-dashboard.js.map +0 -1
  830. package/dist/tools/codeAnalysisTools.d.ts +0 -74
  831. package/dist/tools/codeAnalysisTools.d.ts.map +0 -1
  832. package/dist/tools/codeAnalysisTools.js +0 -664
  833. package/dist/tools/codeAnalysisTools.js.map +0 -1
  834. package/dist/tools/codeGenerationTools.d.ts +0 -3
  835. package/dist/tools/codeGenerationTools.d.ts.map +0 -1
  836. package/dist/tools/codeGenerationTools.js +0 -439
  837. package/dist/tools/codeGenerationTools.js.map +0 -1
  838. package/dist/tools/codeQualityTools.d.ts +0 -3
  839. package/dist/tools/codeQualityTools.d.ts.map +0 -1
  840. package/dist/tools/codeQualityTools.js +0 -296
  841. package/dist/tools/codeQualityTools.js.map +0 -1
  842. package/dist/tools/dependencyTools.d.ts +0 -3
  843. package/dist/tools/dependencyTools.d.ts.map +0 -1
  844. package/dist/tools/dependencyTools.js +0 -283
  845. package/dist/tools/dependencyTools.js.map +0 -1
  846. package/dist/tools/devTools.d.ts +0 -10
  847. package/dist/tools/devTools.d.ts.map +0 -1
  848. package/dist/tools/devTools.js +0 -2305
  849. package/dist/tools/devTools.js.map +0 -1
  850. package/dist/tools/diffUtils.d.ts +0 -36
  851. package/dist/tools/diffUtils.d.ts.map +0 -1
  852. package/dist/tools/diffUtils.js +0 -528
  853. package/dist/tools/diffUtils.js.map +0 -1
  854. package/dist/tools/editTools.d.ts +0 -29
  855. package/dist/tools/editTools.d.ts.map +0 -1
  856. package/dist/tools/editTools.js +0 -419
  857. package/dist/tools/editTools.js.map +0 -1
  858. package/dist/tools/emailTools.d.ts +0 -21
  859. package/dist/tools/emailTools.d.ts.map +0 -1
  860. package/dist/tools/emailTools.js +0 -449
  861. package/dist/tools/emailTools.js.map +0 -1
  862. package/dist/tools/enhancedCodeIntelligenceTools.d.ts +0 -27
  863. package/dist/tools/enhancedCodeIntelligenceTools.d.ts.map +0 -1
  864. package/dist/tools/enhancedCodeIntelligenceTools.js +0 -418
  865. package/dist/tools/enhancedCodeIntelligenceTools.js.map +0 -1
  866. package/dist/tools/enhancedDevWorkflowTools.d.ts +0 -15
  867. package/dist/tools/enhancedDevWorkflowTools.d.ts.map +0 -1
  868. package/dist/tools/enhancedDevWorkflowTools.js +0 -303
  869. package/dist/tools/enhancedDevWorkflowTools.js.map +0 -1
  870. package/dist/tools/fileTools.d.ts +0 -3
  871. package/dist/tools/fileTools.d.ts.map +0 -1
  872. package/dist/tools/fileTools.js +0 -252
  873. package/dist/tools/fileTools.js.map +0 -1
  874. package/dist/tools/frontendTestingTools.d.ts +0 -35
  875. package/dist/tools/frontendTestingTools.d.ts.map +0 -1
  876. package/dist/tools/frontendTestingTools.js +0 -1254
  877. package/dist/tools/frontendTestingTools.js.map +0 -1
  878. package/dist/tools/globTools.d.ts +0 -15
  879. package/dist/tools/globTools.d.ts.map +0 -1
  880. package/dist/tools/globTools.js +0 -174
  881. package/dist/tools/globTools.js.map +0 -1
  882. package/dist/tools/grepTools.d.ts +0 -19
  883. package/dist/tools/grepTools.d.ts.map +0 -1
  884. package/dist/tools/grepTools.js +0 -339
  885. package/dist/tools/grepTools.js.map +0 -1
  886. package/dist/tools/interactionTools.d.ts +0 -13
  887. package/dist/tools/interactionTools.d.ts.map +0 -1
  888. package/dist/tools/interactionTools.js +0 -171
  889. package/dist/tools/interactionTools.js.map +0 -1
  890. package/dist/tools/learnTools.d.ts +0 -152
  891. package/dist/tools/learnTools.d.ts.map +0 -1
  892. package/dist/tools/learnTools.js +0 -1819
  893. package/dist/tools/learnTools.js.map +0 -1
  894. package/dist/tools/notebookEditTools.d.ts +0 -15
  895. package/dist/tools/notebookEditTools.d.ts.map +0 -1
  896. package/dist/tools/notebookEditTools.js +0 -197
  897. package/dist/tools/notebookEditTools.js.map +0 -1
  898. package/dist/tools/planningTools.d.ts +0 -11
  899. package/dist/tools/planningTools.d.ts.map +0 -1
  900. package/dist/tools/planningTools.js +0 -47
  901. package/dist/tools/planningTools.js.map +0 -1
  902. package/dist/tools/refactoringTools.d.ts +0 -3
  903. package/dist/tools/refactoringTools.d.ts.map +0 -1
  904. package/dist/tools/refactoringTools.js +0 -294
  905. package/dist/tools/refactoringTools.js.map +0 -1
  906. package/dist/tools/repoChecksTools.d.ts +0 -3
  907. package/dist/tools/repoChecksTools.d.ts.map +0 -1
  908. package/dist/tools/repoChecksTools.js +0 -161
  909. package/dist/tools/repoChecksTools.js.map +0 -1
  910. package/dist/tools/searchTools.d.ts +0 -3
  911. package/dist/tools/searchTools.d.ts.map +0 -1
  912. package/dist/tools/searchTools.js +0 -207
  913. package/dist/tools/searchTools.js.map +0 -1
  914. package/dist/tools/skillTools.d.ts +0 -8
  915. package/dist/tools/skillTools.d.ts.map +0 -1
  916. package/dist/tools/skillTools.js +0 -178
  917. package/dist/tools/skillTools.js.map +0 -1
  918. package/dist/tools/softwareEngineeringTools.d.ts +0 -7
  919. package/dist/tools/softwareEngineeringTools.d.ts.map +0 -1
  920. package/dist/tools/softwareEngineeringTools.js +0 -338
  921. package/dist/tools/softwareEngineeringTools.js.map +0 -1
  922. package/dist/tools/taskManagementTools.d.ts +0 -10
  923. package/dist/tools/taskManagementTools.d.ts.map +0 -1
  924. package/dist/tools/taskManagementTools.js +0 -157
  925. package/dist/tools/taskManagementTools.js.map +0 -1
  926. package/dist/tools/testingTools.d.ts +0 -3
  927. package/dist/tools/testingTools.d.ts.map +0 -1
  928. package/dist/tools/testingTools.js +0 -233
  929. package/dist/tools/testingTools.js.map +0 -1
  930. package/dist/tools/validationTools.d.ts +0 -7
  931. package/dist/tools/validationTools.d.ts.map +0 -1
  932. package/dist/tools/validationTools.js +0 -278
  933. package/dist/tools/validationTools.js.map +0 -1
  934. package/dist/tools/webTools.d.ts +0 -3
  935. package/dist/tools/webTools.d.ts.map +0 -1
  936. package/dist/tools/webTools.js +0 -495
  937. package/dist/tools/webTools.js.map +0 -1
  938. package/dist/ui/FixedInputArea.d.ts +0 -108
  939. package/dist/ui/FixedInputArea.d.ts.map +0 -1
  940. package/dist/ui/FixedInputArea.js +0 -312
  941. package/dist/ui/FixedInputArea.js.map +0 -1
  942. package/dist/ui/ShellUIAdapter.d.ts +0 -141
  943. package/dist/ui/ShellUIAdapter.d.ts.map +0 -1
  944. package/dist/ui/ShellUIAdapter.js +0 -680
  945. package/dist/ui/ShellUIAdapter.js.map +0 -1
  946. package/dist/ui/UnifiedUIController.d.ts +0 -70
  947. package/dist/ui/UnifiedUIController.d.ts.map +0 -1
  948. package/dist/ui/UnifiedUIController.js +0 -190
  949. package/dist/ui/UnifiedUIController.js.map +0 -1
  950. package/dist/ui/advancedTheme.d.ts +0 -246
  951. package/dist/ui/advancedTheme.d.ts.map +0 -1
  952. package/dist/ui/advancedTheme.js +0 -478
  953. package/dist/ui/advancedTheme.js.map +0 -1
  954. package/dist/ui/animation/AnimationScheduler.d.ts +0 -192
  955. package/dist/ui/animation/AnimationScheduler.d.ts.map +0 -1
  956. package/dist/ui/animation/AnimationScheduler.js +0 -432
  957. package/dist/ui/animation/AnimationScheduler.js.map +0 -1
  958. package/dist/ui/codeHighlighter.d.ts +0 -6
  959. package/dist/ui/codeHighlighter.d.ts.map +0 -1
  960. package/dist/ui/codeHighlighter.js +0 -855
  961. package/dist/ui/codeHighlighter.js.map +0 -1
  962. package/dist/ui/collapsibleContent.d.ts +0 -57
  963. package/dist/ui/collapsibleContent.d.ts.map +0 -1
  964. package/dist/ui/collapsibleContent.js +0 -106
  965. package/dist/ui/collapsibleContent.js.map +0 -1
  966. package/dist/ui/designSystem.d.ts +0 -26
  967. package/dist/ui/designSystem.d.ts.map +0 -1
  968. package/dist/ui/designSystem.js +0 -122
  969. package/dist/ui/designSystem.js.map +0 -1
  970. package/dist/ui/diffViewer.d.ts +0 -42
  971. package/dist/ui/diffViewer.d.ts.map +0 -1
  972. package/dist/ui/diffViewer.js +0 -343
  973. package/dist/ui/diffViewer.js.map +0 -1
  974. package/dist/ui/display.d.ts +0 -295
  975. package/dist/ui/display.d.ts.map +0 -1
  976. package/dist/ui/display.js +0 -1469
  977. package/dist/ui/display.js.map +0 -1
  978. package/dist/ui/errorFormatter.d.ts +0 -54
  979. package/dist/ui/errorFormatter.d.ts.map +0 -1
  980. package/dist/ui/errorFormatter.js +0 -251
  981. package/dist/ui/errorFormatter.js.map +0 -1
  982. package/dist/ui/gitDisplay.d.ts +0 -45
  983. package/dist/ui/gitDisplay.d.ts.map +0 -1
  984. package/dist/ui/gitDisplay.js +0 -215
  985. package/dist/ui/gitDisplay.js.map +0 -1
  986. package/dist/ui/gitFormatter.d.ts +0 -29
  987. package/dist/ui/gitFormatter.d.ts.map +0 -1
  988. package/dist/ui/gitFormatter.js +0 -203
  989. package/dist/ui/gitFormatter.js.map +0 -1
  990. package/dist/ui/interrupts/InterruptManager.d.ts +0 -142
  991. package/dist/ui/interrupts/InterruptManager.d.ts.map +0 -1
  992. package/dist/ui/interrupts/InterruptManager.js +0 -439
  993. package/dist/ui/interrupts/InterruptManager.js.map +0 -1
  994. package/dist/ui/keyboardShortcuts.d.ts +0 -49
  995. package/dist/ui/keyboardShortcuts.d.ts.map +0 -1
  996. package/dist/ui/keyboardShortcuts.js +0 -128
  997. package/dist/ui/keyboardShortcuts.js.map +0 -1
  998. package/dist/ui/layout.d.ts +0 -17
  999. package/dist/ui/layout.d.ts.map +0 -1
  1000. package/dist/ui/layout.js +0 -140
  1001. package/dist/ui/layout.js.map +0 -1
  1002. package/dist/ui/logFormatter.d.ts +0 -70
  1003. package/dist/ui/logFormatter.d.ts.map +0 -1
  1004. package/dist/ui/logFormatter.js +0 -323
  1005. package/dist/ui/logFormatter.js.map +0 -1
  1006. package/dist/ui/orchestration/StatusOrchestrator.d.ts +0 -156
  1007. package/dist/ui/orchestration/StatusOrchestrator.d.ts.map +0 -1
  1008. package/dist/ui/orchestration/StatusOrchestrator.js +0 -406
  1009. package/dist/ui/orchestration/StatusOrchestrator.js.map +0 -1
  1010. package/dist/ui/outputMode.d.ts +0 -22
  1011. package/dist/ui/outputMode.d.ts.map +0 -1
  1012. package/dist/ui/outputMode.js +0 -40
  1013. package/dist/ui/outputMode.js.map +0 -1
  1014. package/dist/ui/outputSummarizer.d.ts +0 -52
  1015. package/dist/ui/outputSummarizer.d.ts.map +0 -1
  1016. package/dist/ui/outputSummarizer.js +0 -242
  1017. package/dist/ui/outputSummarizer.js.map +0 -1
  1018. package/dist/ui/persistentPrompt.d.ts +0 -545
  1019. package/dist/ui/persistentPrompt.d.ts.map +0 -1
  1020. package/dist/ui/persistentPrompt.js +0 -1529
  1021. package/dist/ui/persistentPrompt.js.map +0 -1
  1022. package/dist/ui/progressBar.d.ts +0 -51
  1023. package/dist/ui/progressBar.d.ts.map +0 -1
  1024. package/dist/ui/progressBar.js +0 -153
  1025. package/dist/ui/progressBar.js.map +0 -1
  1026. package/dist/ui/progressIndicator.d.ts +0 -69
  1027. package/dist/ui/progressIndicator.d.ts.map +0 -1
  1028. package/dist/ui/progressIndicator.js +0 -145
  1029. package/dist/ui/progressIndicator.js.map +0 -1
  1030. package/dist/ui/richText.d.ts +0 -6
  1031. package/dist/ui/richText.d.ts.map +0 -1
  1032. package/dist/ui/richText.js +0 -391
  1033. package/dist/ui/richText.js.map +0 -1
  1034. package/dist/ui/shortcutsHelp.d.ts +0 -23
  1035. package/dist/ui/shortcutsHelp.d.ts.map +0 -1
  1036. package/dist/ui/shortcutsHelp.js +0 -89
  1037. package/dist/ui/shortcutsHelp.js.map +0 -1
  1038. package/dist/ui/streamingIndicators.d.ts +0 -42
  1039. package/dist/ui/streamingIndicators.d.ts.map +0 -1
  1040. package/dist/ui/streamingIndicators.js +0 -155
  1041. package/dist/ui/streamingIndicators.js.map +0 -1
  1042. package/dist/ui/tableFormatter.d.ts +0 -31
  1043. package/dist/ui/tableFormatter.d.ts.map +0 -1
  1044. package/dist/ui/tableFormatter.js +0 -186
  1045. package/dist/ui/tableFormatter.js.map +0 -1
  1046. package/dist/ui/telemetry/UITelemetry.d.ts +0 -181
  1047. package/dist/ui/telemetry/UITelemetry.d.ts.map +0 -1
  1048. package/dist/ui/telemetry/UITelemetry.js +0 -446
  1049. package/dist/ui/telemetry/UITelemetry.js.map +0 -1
  1050. package/dist/ui/textHighlighter.d.ts +0 -83
  1051. package/dist/ui/textHighlighter.d.ts.map +0 -1
  1052. package/dist/ui/textHighlighter.js +0 -267
  1053. package/dist/ui/textHighlighter.js.map +0 -1
  1054. package/dist/ui/theme.d.ts +0 -103
  1055. package/dist/ui/theme.d.ts.map +0 -1
  1056. package/dist/ui/theme.js +0 -128
  1057. package/dist/ui/theme.js.map +0 -1
  1058. package/dist/ui/thinkingTracker.d.ts +0 -51
  1059. package/dist/ui/thinkingTracker.d.ts.map +0 -1
  1060. package/dist/ui/thinkingTracker.js +0 -115
  1061. package/dist/ui/thinkingTracker.js.map +0 -1
  1062. package/dist/ui/toolDisplay.d.ts +0 -151
  1063. package/dist/ui/toolDisplay.d.ts.map +0 -1
  1064. package/dist/ui/toolDisplay.js +0 -1338
  1065. package/dist/ui/toolDisplay.js.map +0 -1
  1066. package/dist/ui/toolDisplayAdapter.d.ts +0 -66
  1067. package/dist/ui/toolDisplayAdapter.d.ts.map +0 -1
  1068. package/dist/ui/toolDisplayAdapter.js +0 -356
  1069. package/dist/ui/toolDisplayAdapter.js.map +0 -1
  1070. package/dist/ui/treeVisualizer.d.ts +0 -56
  1071. package/dist/ui/treeVisualizer.d.ts.map +0 -1
  1072. package/dist/ui/treeVisualizer.js +0 -247
  1073. package/dist/ui/treeVisualizer.js.map +0 -1
  1074. package/dist/utils/asyncUtils.d.ts +0 -95
  1075. package/dist/utils/asyncUtils.d.ts.map +0 -1
  1076. package/dist/utils/asyncUtils.js +0 -286
  1077. package/dist/utils/asyncUtils.js.map +0 -1
  1078. package/dist/utils/errorUtils.d.ts +0 -16
  1079. package/dist/utils/errorUtils.d.ts.map +0 -1
  1080. package/dist/utils/errorUtils.js +0 -66
  1081. package/dist/utils/errorUtils.js.map +0 -1
  1082. package/dist/workspace.d.ts +0 -8
  1083. package/dist/workspace.d.ts.map +0 -1
  1084. package/dist/workspace.js +0 -107
  1085. package/dist/workspace.js.map +0 -1
  1086. package/dist/workspace.validator.d.ts +0 -49
  1087. package/dist/workspace.validator.d.ts.map +0 -1
  1088. package/dist/workspace.validator.js +0 -214
  1089. package/dist/workspace.validator.js.map +0 -1
@@ -1,2305 +0,0 @@
1
- import { exec } from 'node:child_process';
2
- import { existsSync, readFileSync } from 'node:fs';
3
- import { join } from 'node:path';
4
- import { promisify } from 'node:util';
5
- import { verifiedSuccess, verifiedFailure, createCommandCheck, OutputPatterns, analyzeOutput, } from '../core/resultVerification.js';
6
- const execAsync = promisify(exec);
7
- export function createDevTools(workingDir) {
8
- return [
9
- {
10
- name: 'run_tests',
11
- description: 'Execute test suite using npm test or other test runners',
12
- parameters: {
13
- type: 'object',
14
- properties: {
15
- testPattern: {
16
- type: 'string',
17
- description: 'Optional test pattern or file to run specific tests',
18
- },
19
- timeout: {
20
- type: 'number',
21
- description: 'Timeout in milliseconds (default: 60000)',
22
- },
23
- },
24
- additionalProperties: false,
25
- },
26
- handler: async (args) => {
27
- const testPatternArg = args['testPattern'];
28
- const testPattern = typeof testPatternArg === 'string' && testPatternArg.trim() ? testPatternArg.trim() : undefined;
29
- const timeoutArg = args['timeout'];
30
- const timeout = typeof timeoutArg === 'number' && Number.isFinite(timeoutArg) && timeoutArg > 0 ? timeoutArg : 300000; // 5 min default
31
- const startTime = Date.now();
32
- try {
33
- // Check if package.json exists
34
- const packageJsonPath = join(workingDir, 'package.json');
35
- if (!existsSync(packageJsonPath)) {
36
- return verifiedFailure('Cannot run tests', 'package.json not found in working directory', ['Initialize npm project with `npm init`', 'Navigate to correct directory'], [{ check: 'package.json exists', passed: false, details: 'File not found' }]);
37
- }
38
- // Build test command
39
- let command = 'npm test';
40
- if (testPattern) {
41
- // Try to detect test runner and build appropriate command
42
- const packageInfo = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
43
- const scripts = packageInfo.scripts || {};
44
- const testScript = scripts['test'] ?? '';
45
- if (testScript.includes('jest')) {
46
- command = `npx jest ${testPattern}`;
47
- }
48
- else if (testScript.includes('vitest')) {
49
- command = `npx vitest run ${testPattern}`;
50
- }
51
- else if (testScript.includes('mocha')) {
52
- command = `npx mocha ${testPattern}`;
53
- }
54
- else {
55
- // Fallback to npm test with pattern
56
- command = `npm test -- ${testPattern}`;
57
- }
58
- }
59
- const { stdout, stderr } = await execAsync(command, {
60
- cwd: workingDir,
61
- timeout,
62
- maxBuffer: 1024 * 1024 * 10, // 10MB
63
- });
64
- const durationMs = Date.now() - startTime;
65
- const combinedOutput = [stdout, stderr].filter(Boolean).join('\n');
66
- // Analyze for test failure patterns
67
- const analysis = analyzeOutput(combinedOutput, OutputPatterns.npm, 0);
68
- const commandCheck = createCommandCheck('Test execution', 0, combinedOutput);
69
- if (analysis.isFailure) {
70
- return verifiedFailure('Tests failed', `Command: ${command}\n\nOutput:\n${combinedOutput}`, ['Review failing tests', 'Fix test assertions or code'], [commandCheck], durationMs);
71
- }
72
- return verifiedSuccess('Tests passed', `Command: ${command}\n\nOutput:\n${combinedOutput || '(no output)'}`, [commandCheck], durationMs);
73
- }
74
- catch (error) {
75
- const durationMs = Date.now() - startTime;
76
- const combinedError = [error.stdout, error.stderr, error.message].filter(Boolean).join('\n');
77
- if (error.killed) {
78
- return verifiedFailure(`Tests timed out after ${timeout}ms`, `The test command was killed after exceeding the timeout.\nPartial output:\n${combinedError || '(none)'}`, ['Increase timeout if tests legitimately need more time', 'Check for infinite loops or hanging tests'], [{ check: 'Timeout', passed: false, details: `Exceeded ${timeout}ms` }], durationMs);
79
- }
80
- return verifiedFailure(`Tests failed with exit code ${error.code ?? 1}`, `Error output:\n${combinedError || '(none)'}`, ['Review test failures', 'Fix failing tests'], [createCommandCheck('Test execution', error.code ?? 1, combinedError)], durationMs);
81
- }
82
- },
83
- },
84
- {
85
- name: 'install_dependencies',
86
- description: 'Install project dependencies using npm, yarn, or pnpm',
87
- parameters: {
88
- type: 'object',
89
- properties: {
90
- packageManager: {
91
- type: 'string',
92
- enum: ['npm', 'yarn', 'pnpm'],
93
- description: 'Package manager to use (default: npm)',
94
- },
95
- production: {
96
- type: 'boolean',
97
- description: 'Install only production dependencies',
98
- },
99
- },
100
- additionalProperties: false,
101
- },
102
- handler: async (args) => {
103
- const packageManager = typeof args['packageManager'] === 'string' ? args['packageManager'] : 'npm';
104
- const production = args['production'] === true;
105
- const startTime = Date.now();
106
- try {
107
- let command;
108
- if (packageManager === 'npm') {
109
- // Use npm install instead of npm ci if no package-lock.json exists
110
- const hasLockFile = existsSync(join(workingDir, 'package-lock.json'));
111
- command = hasLockFile
112
- ? (production ? 'npm ci --production' : 'npm ci')
113
- : (production ? 'npm install --production' : 'npm install');
114
- }
115
- else if (packageManager === 'yarn') {
116
- command = production ? 'yarn install --production' : 'yarn install';
117
- }
118
- else if (packageManager === 'pnpm') {
119
- command = production ? 'pnpm install --prod' : 'pnpm install';
120
- }
121
- else {
122
- return verifiedFailure(`Unsupported package manager: ${packageManager}`, 'Supported package managers: npm, yarn, pnpm', ['Use npm, yarn, or pnpm as the packageManager']);
123
- }
124
- const { stdout, stderr } = await execAsync(command, {
125
- cwd: workingDir,
126
- timeout: 300000, // 5 minutes
127
- maxBuffer: 1024 * 1024 * 10,
128
- });
129
- const durationMs = Date.now() - startTime;
130
- const combinedOutput = [stdout, stderr].filter(Boolean).join('\n');
131
- const analysis = analyzeOutput(combinedOutput, OutputPatterns.npm, 0);
132
- const commandCheck = createCommandCheck('Dependency installation', 0, combinedOutput);
133
- if (analysis.isFailure) {
134
- return verifiedFailure('Dependency installation had errors', `Command: ${command}\n\nOutput:\n${combinedOutput}`, ['Check for version conflicts', 'Clear npm cache and retry', 'Check network connectivity'], [commandCheck], durationMs);
135
- }
136
- return verifiedSuccess('Dependencies installed successfully', `Command: ${command}\n\nOutput:\n${combinedOutput || '(no output)'}`, [commandCheck], durationMs);
137
- }
138
- catch (error) {
139
- const durationMs = Date.now() - startTime;
140
- const combinedError = [error.stdout, error.stderr, error.message].filter(Boolean).join('\n');
141
- if (error.killed) {
142
- return verifiedFailure('Dependency installation timed out', `The installation was killed after exceeding 5 minute timeout.\nPartial output:\n${combinedError || '(none)'}`, ['Check network connectivity', 'Consider using run_in_background for slow connections'], [{ check: 'Timeout', passed: false, details: 'Exceeded 5 minutes' }], durationMs);
143
- }
144
- return verifiedFailure(`Dependency installation failed with exit code ${error.code ?? 1}`, `Error output:\n${combinedError || '(none)'}`, ['Review error message', 'Check package.json syntax', 'Clear npm cache: npm cache clean --force'], [createCommandCheck('Dependency installation', error.code ?? 1, combinedError)], durationMs);
145
- }
146
- },
147
- },
148
- {
149
- name: 'check_package_info',
150
- description: 'Get information about project dependencies and scripts from package.json',
151
- parameters: {
152
- type: 'object',
153
- properties: {
154
- detail: {
155
- type: 'string',
156
- enum: ['basic', 'dependencies', 'scripts', 'full'],
157
- description: 'Level of detail to include',
158
- },
159
- },
160
- additionalProperties: false,
161
- },
162
- handler: async (args) => {
163
- const detailArg = args['detail'];
164
- const detail = typeof detailArg === 'string' && detailArg.trim() ? detailArg : 'basic';
165
- try {
166
- const packageJsonPath = join(workingDir, 'package.json');
167
- if (!existsSync(packageJsonPath)) {
168
- return 'Error: package.json not found';
169
- }
170
- const packageInfo = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
171
- const output = [];
172
- output.push(`# Package Info: ${packageInfo.name || 'Unnamed'} v${packageInfo.version || 'Unknown'}`);
173
- output.push('');
174
- if (detail === 'basic' || detail === 'full') {
175
- output.push('## Basic Info');
176
- output.push(`- Name: ${packageInfo.name || 'Not specified'}`);
177
- output.push(`- Version: ${packageInfo.version || 'Not specified'}`);
178
- output.push('');
179
- }
180
- if ((detail === 'scripts' || detail === 'full') && packageInfo.scripts) {
181
- output.push('## Scripts');
182
- Object.entries(packageInfo.scripts).forEach(([name, script]) => {
183
- output.push(`- ${name}: ${script}`);
184
- });
185
- output.push('');
186
- }
187
- if ((detail === 'dependencies' || detail === 'full') && packageInfo.dependencies) {
188
- output.push('## Dependencies');
189
- Object.entries(packageInfo.dependencies).forEach(([name, version]) => {
190
- output.push(`- ${name}: ${version}`);
191
- });
192
- output.push('');
193
- }
194
- if ((detail === 'dependencies' || detail === 'full') && packageInfo.devDependencies) {
195
- output.push('## Dev Dependencies');
196
- Object.entries(packageInfo.devDependencies).forEach(([name, version]) => {
197
- output.push(`- ${name}: ${version}`);
198
- });
199
- output.push('');
200
- }
201
- return output.join('\n');
202
- }
203
- catch (error) {
204
- return `Error reading package.json: ${error instanceof Error ? error.message : String(error)}`;
205
- }
206
- },
207
- },
208
- {
209
- name: 'run_build',
210
- description: 'Execute build process using npm run build or other build commands',
211
- parameters: {
212
- type: 'object',
213
- properties: {
214
- buildCommand: {
215
- type: 'string',
216
- description: 'Custom build command (defaults to npm run build)',
217
- },
218
- timeout: {
219
- type: 'number',
220
- description: 'Timeout in milliseconds (default: 300000)',
221
- },
222
- },
223
- additionalProperties: false,
224
- },
225
- handler: async (args) => {
226
- const buildCommandArg = args['buildCommand'];
227
- const buildCommand = typeof buildCommandArg === 'string' && buildCommandArg.trim()
228
- ? buildCommandArg
229
- : 'npm run build';
230
- const timeoutArg = args['timeout'];
231
- const timeout = typeof timeoutArg === 'number' && Number.isFinite(timeoutArg) && timeoutArg > 0 ? timeoutArg : 300000; // 5 minutes
232
- try {
233
- const { stdout, stderr } = await execAsync(buildCommand, {
234
- cwd: workingDir,
235
- timeout,
236
- maxBuffer: 1024 * 1024 * 10,
237
- });
238
- let result = `Build command: ${buildCommand}\n\n`;
239
- if (stdout)
240
- result += `stdout:\n${stdout}\n`;
241
- if (stderr)
242
- result += `stderr:\n${stderr}\n`;
243
- return result || 'Build completed (no output)';
244
- }
245
- catch (error) {
246
- if (error.killed) {
247
- return `Error: Build command timed out after ${timeout}ms`;
248
- }
249
- return `Error running build: ${error.message}\nstderr: ${error.stderr || 'none'}`;
250
- }
251
- },
252
- },
253
- {
254
- name: 'npm_publish',
255
- description: 'Publish package to npm registry. Handles the full workflow: check login, commit changes, bump version, build, and publish.',
256
- parameters: {
257
- type: 'object',
258
- properties: {
259
- versionBump: {
260
- type: 'string',
261
- enum: ['patch', 'minor', 'major', 'prepatch', 'preminor', 'premajor', 'prerelease'],
262
- description: 'Version bump type (default: patch)',
263
- },
264
- commitMessage: {
265
- type: 'string',
266
- description: 'Commit message for uncommitted changes (if any). If not provided and there are uncommitted changes, will fail.',
267
- },
268
- tag: {
269
- type: 'string',
270
- description: 'npm tag for the release (default: latest)',
271
- },
272
- dryRun: {
273
- type: 'boolean',
274
- description: 'If true, performs all steps except the actual publish',
275
- },
276
- skipBuild: {
277
- type: 'boolean',
278
- description: 'Skip the build step (use if build is handled by npm prepare script)',
279
- },
280
- },
281
- additionalProperties: false,
282
- },
283
- handler: async (args) => {
284
- const versionBump = typeof args['versionBump'] === 'string' ? args['versionBump'] : 'patch';
285
- const commitMessage = typeof args['commitMessage'] === 'string' ? args['commitMessage'] : undefined;
286
- const tag = typeof args['tag'] === 'string' ? args['tag'] : 'latest';
287
- const dryRun = args['dryRun'] === true;
288
- const skipBuild = args['skipBuild'] === true;
289
- const steps = [];
290
- const errors = [];
291
- try {
292
- // Step 1: Check npm login status
293
- steps.push('## Step 1: Checking npm login status');
294
- try {
295
- const { stdout: whoami } = await execAsync('npm whoami', { cwd: workingDir, timeout: 30000 });
296
- steps.push(`✓ Logged in as: ${whoami.trim()}`);
297
- }
298
- catch (e) {
299
- errors.push('✗ Not logged into npm. Run `npm login` first.');
300
- return [...steps, '', '## Errors', ...errors].join('\n');
301
- }
302
- // Step 2: Check for uncommitted changes
303
- steps.push('');
304
- steps.push('## Step 2: Checking git status');
305
- try {
306
- const { stdout: gitStatus } = await execAsync('git status --porcelain', { cwd: workingDir, timeout: 10000 });
307
- if (gitStatus.trim()) {
308
- if (commitMessage) {
309
- steps.push(`Found uncommitted changes, committing with message: "${commitMessage}"`);
310
- await execAsync('git add .', { cwd: workingDir, timeout: 30000 });
311
- await execAsync(`git commit -m "${commitMessage.replace(/"/g, '\\"')}"`, { cwd: workingDir, timeout: 30000 });
312
- steps.push('✓ Changes committed');
313
- }
314
- else {
315
- errors.push('✗ Uncommitted changes found. Provide a commitMessage or commit manually first.');
316
- errors.push('Changed files:');
317
- gitStatus.trim().split('\n').forEach(line => errors.push(` ${line}`));
318
- return [...steps, '', '## Errors', ...errors].join('\n');
319
- }
320
- }
321
- else {
322
- steps.push('✓ Working directory clean');
323
- }
324
- }
325
- catch (e) {
326
- steps.push(`Warning: Could not check git status: ${e.message}`);
327
- }
328
- // Step 3: Read current version
329
- steps.push('');
330
- steps.push('## Step 3: Reading package info');
331
- const packageJsonPath = join(workingDir, 'package.json');
332
- if (!existsSync(packageJsonPath)) {
333
- errors.push('✗ package.json not found');
334
- return [...steps, '', '## Errors', ...errors].join('\n');
335
- }
336
- const packageInfo = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
337
- steps.push(`✓ Package: ${packageInfo.name} v${packageInfo.version}`);
338
- // Step 4: Build (unless skipped)
339
- if (!skipBuild) {
340
- steps.push('');
341
- steps.push('## Step 4: Building project');
342
- try {
343
- const { stderr: buildErr } = await execAsync('npm run build', {
344
- cwd: workingDir,
345
- timeout: 300000,
346
- maxBuffer: 1024 * 1024 * 10,
347
- });
348
- steps.push('✓ Build completed');
349
- if (buildErr && !buildErr.includes('npm WARN')) {
350
- steps.push(`Build stderr: ${buildErr.substring(0, 500)}`);
351
- }
352
- }
353
- catch (e) {
354
- errors.push(`✗ Build failed: ${e.message}`);
355
- return [...steps, '', '## Errors', ...errors].join('\n');
356
- }
357
- }
358
- else {
359
- steps.push('');
360
- steps.push('## Step 4: Build skipped (skipBuild=true)');
361
- }
362
- // Step 5: Version bump
363
- steps.push('');
364
- steps.push('## Step 5: Bumping version');
365
- try {
366
- const { stdout: versionOut } = await execAsync(`npm version ${versionBump}`, {
367
- cwd: workingDir,
368
- timeout: 30000,
369
- });
370
- const newVersion = versionOut.trim();
371
- steps.push(`✓ Version bumped to ${newVersion}`);
372
- }
373
- catch (e) {
374
- errors.push(`✗ Version bump failed: ${e.message}`);
375
- return [...steps, '', '## Errors', ...errors].join('\n');
376
- }
377
- // Step 6: Publish
378
- steps.push('');
379
- steps.push('## Step 6: Publishing to npm');
380
- if (dryRun) {
381
- steps.push('⚠ DRY RUN - skipping actual publish');
382
- try {
383
- const { stdout: dryRunOut } = await execAsync(`npm publish --dry-run --tag ${tag}`, {
384
- cwd: workingDir,
385
- timeout: 120000,
386
- maxBuffer: 1024 * 1024 * 10,
387
- });
388
- steps.push('Dry run output:');
389
- steps.push(dryRunOut.substring(0, 2000));
390
- }
391
- catch (e) {
392
- steps.push(`Dry run warning: ${e.message}`);
393
- }
394
- }
395
- else {
396
- try {
397
- const { stdout: publishOut } = await execAsync(`npm publish --tag ${tag}`, {
398
- cwd: workingDir,
399
- timeout: 120000,
400
- maxBuffer: 1024 * 1024 * 10,
401
- });
402
- steps.push(`✓ Published successfully`);
403
- // Extract package info from output
404
- const match = publishOut.match(/\+ ([^\s]+)/);
405
- if (match) {
406
- steps.push(`Published: ${match[1]}`);
407
- }
408
- }
409
- catch (e) {
410
- errors.push(`✗ Publish failed: ${e.message}`);
411
- return [...steps, '', '## Errors', ...errors].join('\n');
412
- }
413
- }
414
- // Step 7: Push to git
415
- steps.push('');
416
- steps.push('## Step 7: Pushing to git');
417
- try {
418
- await execAsync('git push && git push --tags', { cwd: workingDir, timeout: 60000 });
419
- steps.push('✓ Pushed commits and tags to remote');
420
- }
421
- catch (e) {
422
- steps.push(`Warning: Could not push to git: ${e.message}`);
423
- }
424
- // Summary
425
- steps.push('');
426
- steps.push('## Summary');
427
- const updatedPackage = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
428
- steps.push(`✓ ${updatedPackage.name}@${updatedPackage.version} ${dryRun ? '(dry run)' : 'published'}`);
429
- return steps.join('\n');
430
- }
431
- catch (error) {
432
- errors.push(`Unexpected error: ${error.message}`);
433
- return [...steps, '', '## Errors', ...errors].join('\n');
434
- }
435
- },
436
- },
437
- {
438
- name: 'npm_check_auth',
439
- description: 'Check npm authentication status and registry configuration',
440
- parameters: {
441
- type: 'object',
442
- properties: {},
443
- additionalProperties: false,
444
- },
445
- handler: async () => {
446
- const output = ['# npm Authentication Status', ''];
447
- try {
448
- // Check whoami
449
- try {
450
- const { stdout: whoami } = await execAsync('npm whoami', { cwd: workingDir, timeout: 30000 });
451
- output.push(`✓ Logged in as: **${whoami.trim()}**`);
452
- }
453
- catch {
454
- output.push('✗ Not logged in to npm');
455
- output.push('');
456
- output.push('To login, run: `npm login`');
457
- return output.join('\n');
458
- }
459
- // Check registry
460
- try {
461
- const { stdout: registry } = await execAsync('npm config get registry', { cwd: workingDir, timeout: 10000 });
462
- output.push(`Registry: ${registry.trim()}`);
463
- }
464
- catch {
465
- output.push('Registry: (could not determine)');
466
- }
467
- // Check token
468
- output.push('');
469
- output.push('## Token Status');
470
- try {
471
- const { stdout: tokenList } = await execAsync('npm token list 2>/dev/null | head -5', {
472
- cwd: workingDir,
473
- timeout: 30000,
474
- shell: '/bin/bash',
475
- });
476
- if (tokenList.trim()) {
477
- output.push('Active tokens found');
478
- }
479
- }
480
- catch {
481
- output.push('Could not list tokens (this is normal)');
482
- }
483
- return output.join('\n');
484
- }
485
- catch (error) {
486
- return `Error checking npm auth: ${error.message}`;
487
- }
488
- },
489
- },
490
- // ========================================================================
491
- // PyPI Publishing Tools
492
- // ========================================================================
493
- {
494
- name: 'python_publish',
495
- description: 'Publish Python package to PyPI. Handles the full workflow: check auth, commit changes, bump version, build, and publish.',
496
- parameters: {
497
- type: 'object',
498
- properties: {
499
- versionBump: {
500
- type: 'string',
501
- enum: ['patch', 'minor', 'major'],
502
- description: 'Version bump type (default: patch)',
503
- },
504
- commitMessage: {
505
- type: 'string',
506
- description: 'Commit message for uncommitted changes (if any)',
507
- },
508
- dryRun: {
509
- type: 'boolean',
510
- description: 'If true, performs all steps except the actual publish',
511
- },
512
- testPypi: {
513
- type: 'boolean',
514
- description: 'Publish to TestPyPI instead of PyPI (default: false)',
515
- },
516
- },
517
- additionalProperties: false,
518
- },
519
- handler: async (args) => {
520
- const versionBump = typeof args['versionBump'] === 'string' ? args['versionBump'] : 'patch';
521
- const commitMessage = typeof args['commitMessage'] === 'string' ? args['commitMessage'] : undefined;
522
- const dryRun = args['dryRun'] === true;
523
- const testPypi = args['testPypi'] === true;
524
- const steps = [];
525
- const errors = [];
526
- try {
527
- // Step 1: Detect Python project type and check auth
528
- steps.push('## Step 1: Detecting project type and checking authentication');
529
- const hasPoetry = existsSync(join(workingDir, 'pyproject.toml'));
530
- const hasSetupPy = existsSync(join(workingDir, 'setup.py'));
531
- const hasSetupCfg = existsSync(join(workingDir, 'setup.cfg'));
532
- let projectType = 'unknown';
533
- let currentVersion = '';
534
- if (hasPoetry) {
535
- const pyprojectContent = readFileSync(join(workingDir, 'pyproject.toml'), 'utf-8');
536
- if (pyprojectContent.includes('[tool.poetry]')) {
537
- projectType = 'poetry';
538
- const versionMatch = pyprojectContent.match(/version\s*=\s*"([^"]+)"/);
539
- if (versionMatch)
540
- currentVersion = versionMatch[1] || '';
541
- steps.push(`✓ Detected Poetry project (v${currentVersion})`);
542
- // Check Poetry auth
543
- try {
544
- await execAsync('poetry config pypi-token.pypi', { cwd: workingDir, timeout: 10000 });
545
- steps.push('✓ Poetry PyPI token configured');
546
- }
547
- catch {
548
- steps.push('⚠ PyPI token may not be configured. Run: poetry config pypi-token.pypi <token>');
549
- }
550
- }
551
- }
552
- if (projectType === 'unknown' && (hasSetupPy || hasSetupCfg)) {
553
- projectType = 'setuptools';
554
- // Try to get version from setup.py or setup.cfg
555
- if (hasSetupPy) {
556
- const setupContent = readFileSync(join(workingDir, 'setup.py'), 'utf-8');
557
- const versionMatch = setupContent.match(/version\s*=\s*['"]([^'"]+)['"]/);
558
- if (versionMatch)
559
- currentVersion = versionMatch[1] || '';
560
- }
561
- steps.push(`✓ Detected setuptools project${currentVersion ? ` (v${currentVersion})` : ''}`);
562
- // Check twine auth
563
- try {
564
- await execAsync('twine --version', { cwd: workingDir, timeout: 10000 });
565
- steps.push('✓ Twine is available');
566
- }
567
- catch {
568
- errors.push('✗ Twine not found. Install with: pip install twine');
569
- return [...steps, '', '## Errors', ...errors].join('\n');
570
- }
571
- }
572
- if (projectType === 'unknown') {
573
- errors.push('✗ Could not detect Python project type. Need pyproject.toml (Poetry) or setup.py/setup.cfg (setuptools)');
574
- return [...steps, '', '## Errors', ...errors].join('\n');
575
- }
576
- // Step 2: Check for uncommitted changes
577
- steps.push('');
578
- steps.push('## Step 2: Checking git status');
579
- try {
580
- const { stdout: gitStatus } = await execAsync('git status --porcelain', { cwd: workingDir, timeout: 10000 });
581
- if (gitStatus.trim()) {
582
- if (commitMessage) {
583
- steps.push(`Found uncommitted changes, committing with message: "${commitMessage}"`);
584
- await execAsync('git add .', { cwd: workingDir, timeout: 30000 });
585
- await execAsync(`git commit -m "${commitMessage.replace(/"/g, '\\"')}"`, { cwd: workingDir, timeout: 30000 });
586
- steps.push('✓ Changes committed');
587
- }
588
- else {
589
- errors.push('✗ Uncommitted changes found. Provide a commitMessage or commit manually first.');
590
- gitStatus.trim().split('\n').forEach(line => errors.push(` ${line}`));
591
- return [...steps, '', '## Errors', ...errors].join('\n');
592
- }
593
- }
594
- else {
595
- steps.push('✓ Working directory clean');
596
- }
597
- }
598
- catch (e) {
599
- steps.push(`Warning: Could not check git status: ${e.message}`);
600
- }
601
- // Step 3: Bump version
602
- steps.push('');
603
- steps.push('## Step 3: Bumping version');
604
- try {
605
- if (projectType === 'poetry') {
606
- const { stdout: versionOut } = await execAsync(`poetry version ${versionBump}`, {
607
- cwd: workingDir,
608
- timeout: 30000,
609
- });
610
- steps.push(`✓ ${versionOut.trim()}`);
611
- }
612
- else {
613
- // For setuptools, use bump2version if available, otherwise manual
614
- try {
615
- await execAsync(`bump2version ${versionBump}`, { cwd: workingDir, timeout: 30000 });
616
- steps.push(`✓ Version bumped with bump2version`);
617
- }
618
- catch {
619
- steps.push(`⚠ bump2version not available. Please manually update version in setup.py/setup.cfg`);
620
- }
621
- }
622
- }
623
- catch (e) {
624
- errors.push(`✗ Version bump failed: ${e.message}`);
625
- return [...steps, '', '## Errors', ...errors].join('\n');
626
- }
627
- // Step 4: Build
628
- steps.push('');
629
- steps.push('## Step 4: Building package');
630
- try {
631
- if (projectType === 'poetry') {
632
- await execAsync('poetry build', {
633
- cwd: workingDir,
634
- timeout: 120000,
635
- maxBuffer: 1024 * 1024 * 10,
636
- });
637
- steps.push('✓ Built with Poetry');
638
- }
639
- else {
640
- // Clean old builds
641
- await execAsync('rm -rf dist/ build/ *.egg-info', { cwd: workingDir, timeout: 10000, shell: '/bin/bash' });
642
- await execAsync('python -m build', {
643
- cwd: workingDir,
644
- timeout: 120000,
645
- maxBuffer: 1024 * 1024 * 10,
646
- });
647
- steps.push('✓ Built with python -m build');
648
- }
649
- }
650
- catch (e) {
651
- errors.push(`✗ Build failed: ${e.message}`);
652
- return [...steps, '', '## Errors', ...errors].join('\n');
653
- }
654
- // Step 5: Publish
655
- steps.push('');
656
- steps.push('## Step 5: Publishing to PyPI');
657
- const repository = testPypi ? 'testpypi' : 'pypi';
658
- if (dryRun) {
659
- steps.push(`⚠ DRY RUN - would publish to ${repository}`);
660
- steps.push('Files that would be uploaded:');
661
- try {
662
- const { stdout: distFiles } = await execAsync('ls -la dist/', { cwd: workingDir, timeout: 10000 });
663
- steps.push(distFiles);
664
- }
665
- catch {
666
- steps.push(' (could not list dist files)');
667
- }
668
- }
669
- else {
670
- try {
671
- if (projectType === 'poetry') {
672
- const publishCmd = testPypi
673
- ? 'poetry publish -r testpypi'
674
- : 'poetry publish';
675
- await execAsync(publishCmd, {
676
- cwd: workingDir,
677
- timeout: 120000,
678
- maxBuffer: 1024 * 1024 * 10,
679
- });
680
- }
681
- else {
682
- const uploadUrl = testPypi
683
- ? '--repository-url https://test.pypi.org/legacy/'
684
- : '';
685
- await execAsync(`twine upload ${uploadUrl} dist/*`, {
686
- cwd: workingDir,
687
- timeout: 120000,
688
- maxBuffer: 1024 * 1024 * 10,
689
- });
690
- }
691
- steps.push(`✓ Published to ${repository}`);
692
- }
693
- catch (e) {
694
- errors.push(`✗ Publish failed: ${e.message}`);
695
- return [...steps, '', '## Errors', ...errors].join('\n');
696
- }
697
- }
698
- // Step 6: Git commit version bump and push
699
- steps.push('');
700
- steps.push('## Step 6: Committing version bump and pushing');
701
- try {
702
- const { stdout: gitStatus } = await execAsync('git status --porcelain', { cwd: workingDir, timeout: 10000 });
703
- if (gitStatus.trim()) {
704
- await execAsync('git add .', { cwd: workingDir, timeout: 30000 });
705
- await execAsync('git commit -m "Bump version"', { cwd: workingDir, timeout: 30000 });
706
- steps.push('✓ Version bump committed');
707
- }
708
- await execAsync('git push && git push --tags', { cwd: workingDir, timeout: 60000 });
709
- steps.push('✓ Pushed to remote');
710
- }
711
- catch (e) {
712
- steps.push(`Warning: Could not push to git: ${e.message}`);
713
- }
714
- // Summary
715
- steps.push('');
716
- steps.push('## Summary');
717
- steps.push(`✓ Python package ${dryRun ? '(dry run)' : 'published'} to ${repository}`);
718
- return steps.join('\n');
719
- }
720
- catch (error) {
721
- errors.push(`Unexpected error: ${error.message}`);
722
- return [...steps, '', '## Errors', ...errors].join('\n');
723
- }
724
- },
725
- },
726
- {
727
- name: 'pypi_check_auth',
728
- description: 'Check PyPI authentication status for both Poetry and twine',
729
- parameters: {
730
- type: 'object',
731
- properties: {},
732
- additionalProperties: false,
733
- },
734
- handler: async () => {
735
- const output = ['# PyPI Authentication Status', ''];
736
- // Check Poetry
737
- output.push('## Poetry');
738
- try {
739
- const { stdout: poetryConfig } = await execAsync('poetry config --list 2>/dev/null | grep pypi', {
740
- cwd: workingDir,
741
- timeout: 10000,
742
- shell: '/bin/bash',
743
- });
744
- if (poetryConfig.includes('pypi-token')) {
745
- output.push('✓ PyPI token configured in Poetry');
746
- }
747
- else {
748
- output.push('✗ No PyPI token in Poetry');
749
- output.push(' Set with: poetry config pypi-token.pypi <your-token>');
750
- }
751
- }
752
- catch {
753
- output.push('Poetry not available or not configured');
754
- }
755
- // Check twine/pip
756
- output.push('');
757
- output.push('## Twine/pip');
758
- try {
759
- await execAsync('twine --version', { cwd: workingDir, timeout: 10000 });
760
- output.push('✓ Twine is installed');
761
- // Check for .pypirc
762
- const homedir = process.env['HOME'] || '';
763
- if (existsSync(join(homedir, '.pypirc'))) {
764
- output.push('✓ .pypirc found in home directory');
765
- }
766
- else {
767
- output.push('⚠ No .pypirc found. Twine will prompt for credentials.');
768
- }
769
- }
770
- catch {
771
- output.push('✗ Twine not installed');
772
- output.push(' Install with: pip install twine');
773
- }
774
- // Check for TWINE_* env vars
775
- output.push('');
776
- output.push('## Environment Variables');
777
- const twineUser = process.env['TWINE_USERNAME'];
778
- const twinePass = process.env['TWINE_PASSWORD'];
779
- if (twineUser) {
780
- output.push(`✓ TWINE_USERNAME set: ${twineUser}`);
781
- }
782
- if (twinePass) {
783
- output.push('✓ TWINE_PASSWORD is set');
784
- }
785
- if (!twineUser && !twinePass) {
786
- output.push('No TWINE_* environment variables set');
787
- }
788
- return output.join('\n');
789
- },
790
- },
791
- // ========================================================================
792
- // Cargo (Rust) Publishing Tools
793
- // ========================================================================
794
- {
795
- name: 'cargo_publish',
796
- description: 'Publish Rust crate to crates.io. Handles the full workflow: check auth, commit changes, bump version, build, and publish.',
797
- parameters: {
798
- type: 'object',
799
- properties: {
800
- versionBump: {
801
- type: 'string',
802
- enum: ['patch', 'minor', 'major'],
803
- description: 'Version bump type (default: patch)',
804
- },
805
- commitMessage: {
806
- type: 'string',
807
- description: 'Commit message for uncommitted changes (if any)',
808
- },
809
- dryRun: {
810
- type: 'boolean',
811
- description: 'If true, performs all steps except the actual publish',
812
- },
813
- allowDirty: {
814
- type: 'boolean',
815
- description: 'Allow publishing with uncommitted changes (default: false)',
816
- },
817
- },
818
- additionalProperties: false,
819
- },
820
- handler: async (args) => {
821
- const versionBump = typeof args['versionBump'] === 'string' ? args['versionBump'] : 'patch';
822
- const commitMessage = typeof args['commitMessage'] === 'string' ? args['commitMessage'] : undefined;
823
- const dryRun = args['dryRun'] === true;
824
- const allowDirty = args['allowDirty'] === true;
825
- const steps = [];
826
- const errors = [];
827
- try {
828
- // Step 1: Check Cargo.toml exists and auth
829
- steps.push('## Step 1: Checking project and authentication');
830
- const cargoTomlPath = join(workingDir, 'Cargo.toml');
831
- if (!existsSync(cargoTomlPath)) {
832
- errors.push('✗ Cargo.toml not found. This is not a Rust project.');
833
- return [...steps, '', '## Errors', ...errors].join('\n');
834
- }
835
- const cargoContent = readFileSync(cargoTomlPath, 'utf-8');
836
- const nameMatch = cargoContent.match(/name\s*=\s*"([^"]+)"/);
837
- const versionMatch = cargoContent.match(/version\s*=\s*"([^"]+)"/);
838
- const crateName = nameMatch ? nameMatch[1] : 'unknown';
839
- const currentVersion = versionMatch ? versionMatch[1] : '0.0.0';
840
- steps.push(`✓ Found crate: ${crateName} v${currentVersion}`);
841
- // Check cargo login
842
- try {
843
- const { stdout: whoami } = await execAsync('cargo owner --list 2>/dev/null | head -1', {
844
- cwd: workingDir,
845
- timeout: 30000,
846
- shell: '/bin/bash',
847
- });
848
- if (whoami.trim()) {
849
- steps.push(`✓ Logged in to crates.io`);
850
- }
851
- }
852
- catch {
853
- steps.push('⚠ Could not verify crates.io login. Make sure you ran `cargo login`');
854
- }
855
- // Step 2: Check for uncommitted changes
856
- steps.push('');
857
- steps.push('## Step 2: Checking git status');
858
- try {
859
- const { stdout: gitStatus } = await execAsync('git status --porcelain', { cwd: workingDir, timeout: 10000 });
860
- if (gitStatus.trim()) {
861
- if (commitMessage) {
862
- steps.push(`Found uncommitted changes, committing with message: "${commitMessage}"`);
863
- await execAsync('git add .', { cwd: workingDir, timeout: 30000 });
864
- await execAsync(`git commit -m "${commitMessage.replace(/"/g, '\\"')}"`, { cwd: workingDir, timeout: 30000 });
865
- steps.push('✓ Changes committed');
866
- }
867
- else if (!allowDirty) {
868
- errors.push('✗ Uncommitted changes found. Provide a commitMessage, commit manually, or use allowDirty=true.');
869
- gitStatus.trim().split('\n').forEach(line => errors.push(` ${line}`));
870
- return [...steps, '', '## Errors', ...errors].join('\n');
871
- }
872
- else {
873
- steps.push('⚠ Uncommitted changes present (allowDirty=true)');
874
- }
875
- }
876
- else {
877
- steps.push('✓ Working directory clean');
878
- }
879
- }
880
- catch (e) {
881
- steps.push(`Warning: Could not check git status: ${e.message}`);
882
- }
883
- // Step 3: Bump version
884
- steps.push('');
885
- steps.push('## Step 3: Bumping version');
886
- // Parse current version
887
- const versionParts = (currentVersion || '0.0.0').split('.').map(p => parseInt(p, 10) || 0);
888
- let [major = 0, minor = 0, patch = 0] = versionParts;
889
- switch (versionBump) {
890
- case 'major':
891
- major++;
892
- minor = 0;
893
- patch = 0;
894
- break;
895
- case 'minor':
896
- minor++;
897
- patch = 0;
898
- break;
899
- case 'patch':
900
- default:
901
- patch++;
902
- break;
903
- }
904
- const newVersion = `${major}.${minor}.${patch}`;
905
- // Update Cargo.toml
906
- const updatedCargo = cargoContent.replace(/version\s*=\s*"[^"]+"/, `version = "${newVersion}"`);
907
- const fs = await import('node:fs/promises');
908
- await fs.writeFile(cargoTomlPath, updatedCargo, 'utf-8');
909
- steps.push(`✓ Version bumped: ${currentVersion} → ${newVersion}`);
910
- // Update Cargo.lock
911
- try {
912
- await execAsync('cargo check', { cwd: workingDir, timeout: 120000 });
913
- steps.push('✓ Cargo.lock updated');
914
- }
915
- catch (e) {
916
- steps.push(`Warning: cargo check had issues: ${e.message}`);
917
- }
918
- // Step 4: Build and test
919
- steps.push('');
920
- steps.push('## Step 4: Building and testing');
921
- try {
922
- await execAsync('cargo build --release', {
923
- cwd: workingDir,
924
- timeout: 300000,
925
- maxBuffer: 1024 * 1024 * 10,
926
- });
927
- steps.push('✓ Release build successful');
928
- await execAsync('cargo test', {
929
- cwd: workingDir,
930
- timeout: 300000,
931
- maxBuffer: 1024 * 1024 * 10,
932
- });
933
- steps.push('✓ Tests passed');
934
- }
935
- catch (e) {
936
- errors.push(`✗ Build/test failed: ${e.message}`);
937
- return [...steps, '', '## Errors', ...errors].join('\n');
938
- }
939
- // Step 5: Publish
940
- steps.push('');
941
- steps.push('## Step 5: Publishing to crates.io');
942
- if (dryRun) {
943
- steps.push('⚠ DRY RUN - would publish to crates.io');
944
- try {
945
- const { stdout: dryRunOut } = await execAsync('cargo publish --dry-run', {
946
- cwd: workingDir,
947
- timeout: 120000,
948
- maxBuffer: 1024 * 1024 * 10,
949
- });
950
- steps.push('Dry run output:');
951
- steps.push(dryRunOut.substring(0, 2000));
952
- }
953
- catch (e) {
954
- steps.push(`Dry run notes: ${e.message}`);
955
- }
956
- }
957
- else {
958
- try {
959
- const publishFlags = allowDirty ? '--allow-dirty' : '';
960
- await execAsync(`cargo publish ${publishFlags}`, {
961
- cwd: workingDir,
962
- timeout: 180000,
963
- maxBuffer: 1024 * 1024 * 10,
964
- });
965
- steps.push(`✓ Published ${crateName}@${newVersion} to crates.io`);
966
- }
967
- catch (e) {
968
- errors.push(`✗ Publish failed: ${e.message}`);
969
- return [...steps, '', '## Errors', ...errors].join('\n');
970
- }
971
- }
972
- // Step 6: Git commit and push
973
- steps.push('');
974
- steps.push('## Step 6: Committing and pushing');
975
- try {
976
- await execAsync('git add Cargo.toml Cargo.lock', { cwd: workingDir, timeout: 10000 });
977
- await execAsync(`git commit -m "Release v${newVersion}"`, { cwd: workingDir, timeout: 30000 });
978
- await execAsync(`git tag -a "v${newVersion}" -m "Release v${newVersion}"`, { cwd: workingDir, timeout: 10000 });
979
- steps.push(`✓ Created tag v${newVersion}`);
980
- await execAsync('git push && git push --tags', { cwd: workingDir, timeout: 60000 });
981
- steps.push('✓ Pushed to remote');
982
- }
983
- catch (e) {
984
- steps.push(`Warning: Could not push to git: ${e.message}`);
985
- }
986
- // Summary
987
- steps.push('');
988
- steps.push('## Summary');
989
- steps.push(`✓ ${crateName}@${newVersion} ${dryRun ? '(dry run)' : 'published to crates.io'}`);
990
- return steps.join('\n');
991
- }
992
- catch (error) {
993
- errors.push(`Unexpected error: ${error.message}`);
994
- return [...steps, '', '## Errors', ...errors].join('\n');
995
- }
996
- },
997
- },
998
- {
999
- name: 'cargo_check_auth',
1000
- description: 'Check crates.io authentication status',
1001
- parameters: {
1002
- type: 'object',
1003
- properties: {},
1004
- additionalProperties: false,
1005
- },
1006
- handler: async () => {
1007
- const output = ['# Crates.io Authentication Status', ''];
1008
- // Check if cargo is available
1009
- try {
1010
- const { stdout: cargoVersion } = await execAsync('cargo --version', { cwd: workingDir, timeout: 10000 });
1011
- output.push(`✓ ${cargoVersion.trim()}`);
1012
- }
1013
- catch {
1014
- output.push('✗ Cargo not found. Install Rust from https://rustup.rs');
1015
- return output.join('\n');
1016
- }
1017
- // Check credentials file
1018
- const homedir = process.env['HOME'] || '';
1019
- const credentialsPath = join(homedir, '.cargo', 'credentials.toml');
1020
- const legacyCredentialsPath = join(homedir, '.cargo', 'credentials');
1021
- output.push('');
1022
- output.push('## Credentials');
1023
- if (existsSync(credentialsPath) || existsSync(legacyCredentialsPath)) {
1024
- output.push('✓ Credentials file found');
1025
- output.push(' To update token, run: cargo login');
1026
- }
1027
- else {
1028
- output.push('✗ No credentials file found');
1029
- output.push(' Run: cargo login <your-api-token>');
1030
- output.push(' Get token from: https://crates.io/settings/tokens');
1031
- }
1032
- // Check CARGO_REGISTRY_TOKEN env var
1033
- output.push('');
1034
- output.push('## Environment Variables');
1035
- if (process.env['CARGO_REGISTRY_TOKEN']) {
1036
- output.push('✓ CARGO_REGISTRY_TOKEN is set');
1037
- }
1038
- else {
1039
- output.push('CARGO_REGISTRY_TOKEN not set (optional)');
1040
- }
1041
- return output.join('\n');
1042
- },
1043
- },
1044
- // ========================================================================
1045
- // Git Workflow Tools
1046
- // ========================================================================
1047
- {
1048
- name: 'git_release',
1049
- description: 'Create a git release with tag, changelog generation, and optional GitHub release',
1050
- parameters: {
1051
- type: 'object',
1052
- properties: {
1053
- version: {
1054
- type: 'string',
1055
- description: 'Version tag (e.g., v1.0.0). If not provided, will auto-generate based on commits.',
1056
- },
1057
- message: {
1058
- type: 'string',
1059
- description: 'Release message/description',
1060
- },
1061
- generateChangelog: {
1062
- type: 'boolean',
1063
- description: 'Auto-generate changelog from commits since last tag (default: true)',
1064
- },
1065
- pushTag: {
1066
- type: 'boolean',
1067
- description: 'Push the tag to remote (default: true)',
1068
- },
1069
- createGithubRelease: {
1070
- type: 'boolean',
1071
- description: 'Create a GitHub release using gh CLI (default: false)',
1072
- },
1073
- },
1074
- additionalProperties: false,
1075
- },
1076
- handler: async (args) => {
1077
- const version = typeof args['version'] === 'string' ? args['version'] : undefined;
1078
- const message = typeof args['message'] === 'string' ? args['message'] : undefined;
1079
- const generateChangelog = args['generateChangelog'] !== false;
1080
- const pushTag = args['pushTag'] !== false;
1081
- const createGithubRelease = args['createGithubRelease'] === true;
1082
- const output = ['# Git Release', ''];
1083
- try {
1084
- // Get last tag
1085
- let lastTag = '';
1086
- try {
1087
- const { stdout } = await execAsync('git describe --tags --abbrev=0 2>/dev/null || echo ""', {
1088
- cwd: workingDir,
1089
- timeout: 10000,
1090
- shell: '/bin/bash',
1091
- });
1092
- lastTag = stdout.trim();
1093
- }
1094
- catch {
1095
- // No tags exist
1096
- }
1097
- // Determine version
1098
- let tagVersion = version;
1099
- if (!tagVersion) {
1100
- if (lastTag) {
1101
- // Increment patch version
1102
- const match = lastTag.match(/v?(\d+)\.(\d+)\.(\d+)/);
1103
- if (match) {
1104
- const [, major, minor, patch] = match;
1105
- tagVersion = `v${major}.${minor}.${parseInt(patch || '0', 10) + 1}`;
1106
- }
1107
- else {
1108
- tagVersion = 'v0.0.1';
1109
- }
1110
- }
1111
- else {
1112
- tagVersion = 'v0.0.1';
1113
- }
1114
- }
1115
- output.push(`Version: ${tagVersion}`);
1116
- output.push(`Previous: ${lastTag || '(none)'}`);
1117
- // Generate changelog
1118
- let changelog = '';
1119
- if (generateChangelog) {
1120
- output.push('');
1121
- output.push('## Changelog');
1122
- try {
1123
- const range = lastTag ? `${lastTag}..HEAD` : 'HEAD';
1124
- const { stdout: commits } = await execAsync(`git log ${range} --pretty=format:"- %s (%h)" --no-merges 2>/dev/null | head -50`, { cwd: workingDir, timeout: 10000, shell: '/bin/bash' });
1125
- changelog = commits.trim() || 'No commits since last release';
1126
- output.push(changelog);
1127
- }
1128
- catch {
1129
- changelog = 'Could not generate changelog';
1130
- output.push(changelog);
1131
- }
1132
- }
1133
- // Create tag
1134
- output.push('');
1135
- output.push('## Creating Tag');
1136
- const tagMessage = message || `Release ${tagVersion}\n\n${changelog}`;
1137
- try {
1138
- await execAsync(`git tag -a "${tagVersion}" -m "${tagMessage.replace(/"/g, '\\"')}"`, {
1139
- cwd: workingDir,
1140
- timeout: 30000,
1141
- });
1142
- output.push(`✓ Created tag: ${tagVersion}`);
1143
- }
1144
- catch (e) {
1145
- output.push(`✗ Failed to create tag: ${e.message}`);
1146
- return output.join('\n');
1147
- }
1148
- // Push tag
1149
- if (pushTag) {
1150
- output.push('');
1151
- output.push('## Pushing Tag');
1152
- try {
1153
- await execAsync(`git push origin "${tagVersion}"`, { cwd: workingDir, timeout: 60000 });
1154
- output.push(`✓ Pushed tag to origin`);
1155
- }
1156
- catch (e) {
1157
- output.push(`✗ Failed to push tag: ${e.message}`);
1158
- }
1159
- }
1160
- // Create GitHub release
1161
- if (createGithubRelease) {
1162
- output.push('');
1163
- output.push('## Creating GitHub Release');
1164
- try {
1165
- const releaseNotes = changelog || message || `Release ${tagVersion}`;
1166
- await execAsync(`gh release create "${tagVersion}" --title "${tagVersion}" --notes "${releaseNotes.replace(/"/g, '\\"')}"`, { cwd: workingDir, timeout: 60000 });
1167
- output.push(`✓ Created GitHub release`);
1168
- }
1169
- catch (e) {
1170
- output.push(`✗ Failed to create GitHub release: ${e.message}`);
1171
- output.push('Make sure gh CLI is installed and authenticated');
1172
- }
1173
- }
1174
- return output.join('\n');
1175
- }
1176
- catch (error) {
1177
- return `Error creating release: ${error.message}`;
1178
- }
1179
- },
1180
- },
1181
- {
1182
- name: 'git_sync',
1183
- description: 'Sync local branch with remote - fetch, pull, and optionally push',
1184
- parameters: {
1185
- type: 'object',
1186
- properties: {
1187
- branch: {
1188
- type: 'string',
1189
- description: 'Branch to sync (default: current branch)',
1190
- },
1191
- push: {
1192
- type: 'boolean',
1193
- description: 'Push local commits after pulling (default: false)',
1194
- },
1195
- rebase: {
1196
- type: 'boolean',
1197
- description: 'Use rebase instead of merge when pulling (default: false)',
1198
- },
1199
- stashChanges: {
1200
- type: 'boolean',
1201
- description: 'Stash uncommitted changes before sync, restore after (default: true)',
1202
- },
1203
- },
1204
- additionalProperties: false,
1205
- },
1206
- handler: async (args) => {
1207
- const branch = typeof args['branch'] === 'string' ? args['branch'] : undefined;
1208
- const push = args['push'] === true;
1209
- const rebase = args['rebase'] === true;
1210
- const stashChanges = args['stashChanges'] !== false;
1211
- const output = ['# Git Sync', ''];
1212
- let stashed = false;
1213
- try {
1214
- // Get current branch if not specified
1215
- let targetBranch = branch;
1216
- if (!targetBranch) {
1217
- const { stdout } = await execAsync('git branch --show-current', { cwd: workingDir, timeout: 10000 });
1218
- targetBranch = stdout.trim();
1219
- }
1220
- output.push(`Branch: ${targetBranch}`);
1221
- // Check for uncommitted changes
1222
- const { stdout: status } = await execAsync('git status --porcelain', { cwd: workingDir, timeout: 10000 });
1223
- const hasChanges = status.trim().length > 0;
1224
- if (hasChanges && stashChanges) {
1225
- output.push('');
1226
- output.push('## Stashing Changes');
1227
- await execAsync('git stash push -m "git_sync auto-stash"', { cwd: workingDir, timeout: 30000 });
1228
- output.push('✓ Stashed uncommitted changes');
1229
- stashed = true;
1230
- }
1231
- else if (hasChanges) {
1232
- output.push('');
1233
- output.push('⚠ Warning: Uncommitted changes present, sync may fail');
1234
- }
1235
- // Fetch
1236
- output.push('');
1237
- output.push('## Fetching');
1238
- await execAsync('git fetch --all --prune', { cwd: workingDir, timeout: 60000 });
1239
- output.push('✓ Fetched from all remotes');
1240
- // Pull
1241
- output.push('');
1242
- output.push('## Pulling');
1243
- const pullCmd = rebase ? `git pull --rebase origin ${targetBranch}` : `git pull origin ${targetBranch}`;
1244
- try {
1245
- const { stdout: pullOut } = await execAsync(pullCmd, { cwd: workingDir, timeout: 120000 });
1246
- output.push(`✓ Pulled from origin/${targetBranch}`);
1247
- if (pullOut.includes('Already up to date')) {
1248
- output.push('Already up to date');
1249
- }
1250
- }
1251
- catch (e) {
1252
- output.push(`✗ Pull failed: ${e.message}`);
1253
- if (stashed) {
1254
- await execAsync('git stash pop', { cwd: workingDir, timeout: 30000 });
1255
- output.push('✓ Restored stashed changes');
1256
- }
1257
- return output.join('\n');
1258
- }
1259
- // Push
1260
- if (push) {
1261
- output.push('');
1262
- output.push('## Pushing');
1263
- try {
1264
- await execAsync(`git push origin ${targetBranch}`, { cwd: workingDir, timeout: 60000 });
1265
- output.push(`✓ Pushed to origin/${targetBranch}`);
1266
- }
1267
- catch (e) {
1268
- output.push(`✗ Push failed: ${e.message}`);
1269
- }
1270
- }
1271
- // Restore stash
1272
- if (stashed) {
1273
- output.push('');
1274
- output.push('## Restoring Changes');
1275
- try {
1276
- await execAsync('git stash pop', { cwd: workingDir, timeout: 30000 });
1277
- output.push('✓ Restored stashed changes');
1278
- }
1279
- catch (e) {
1280
- output.push(`⚠ Failed to restore stash: ${e.message}`);
1281
- output.push('Run `git stash pop` manually');
1282
- }
1283
- }
1284
- return output.join('\n');
1285
- }
1286
- catch (error) {
1287
- if (stashed) {
1288
- try {
1289
- await execAsync('git stash pop', { cwd: workingDir, timeout: 30000 });
1290
- }
1291
- catch {
1292
- // Ignore
1293
- }
1294
- }
1295
- return `Error syncing: ${error.message}`;
1296
- }
1297
- },
1298
- },
1299
- {
1300
- name: 'git_cleanup',
1301
- description: 'Clean up git repository - prune branches, garbage collect, remove untracked files',
1302
- parameters: {
1303
- type: 'object',
1304
- properties: {
1305
- pruneBranches: {
1306
- type: 'boolean',
1307
- description: 'Delete local branches that have been merged (default: true)',
1308
- },
1309
- pruneRemote: {
1310
- type: 'boolean',
1311
- description: 'Prune remote-tracking branches (default: true)',
1312
- },
1313
- gc: {
1314
- type: 'boolean',
1315
- description: 'Run garbage collection (default: true)',
1316
- },
1317
- cleanUntracked: {
1318
- type: 'boolean',
1319
- description: 'Remove untracked files (DANGEROUS - default: false)',
1320
- },
1321
- dryRun: {
1322
- type: 'boolean',
1323
- description: 'Show what would be done without making changes',
1324
- },
1325
- },
1326
- additionalProperties: false,
1327
- },
1328
- handler: async (args) => {
1329
- const pruneBranches = args['pruneBranches'] !== false;
1330
- const pruneRemote = args['pruneRemote'] !== false;
1331
- const gc = args['gc'] !== false;
1332
- const cleanUntracked = args['cleanUntracked'] === true;
1333
- const dryRun = args['dryRun'] === true;
1334
- const output = ['# Git Cleanup', ''];
1335
- if (dryRun)
1336
- output.push('**DRY RUN - no changes will be made**\n');
1337
- try {
1338
- // Prune remote-tracking branches
1339
- if (pruneRemote) {
1340
- output.push('## Remote-tracking Branches');
1341
- if (dryRun) {
1342
- const { stdout } = await execAsync('git remote prune origin --dry-run', {
1343
- cwd: workingDir,
1344
- timeout: 30000,
1345
- });
1346
- output.push(stdout.trim() || 'No stale branches to prune');
1347
- }
1348
- else {
1349
- const { stdout } = await execAsync('git remote prune origin', { cwd: workingDir, timeout: 30000 });
1350
- output.push(stdout.trim() || '✓ No stale branches to prune');
1351
- }
1352
- output.push('');
1353
- }
1354
- // Find and delete merged branches
1355
- if (pruneBranches) {
1356
- output.push('## Merged Local Branches');
1357
- const { stdout: currentBranch } = await execAsync('git branch --show-current', {
1358
- cwd: workingDir,
1359
- timeout: 10000,
1360
- });
1361
- const { stdout: mergedBranches } = await execAsync('git branch --merged | grep -v "\\*" | grep -v "main" | grep -v "master" | grep -v "develop"', { cwd: workingDir, timeout: 10000, shell: '/bin/bash' }).catch(() => ({ stdout: '' }));
1362
- const branches = mergedBranches
1363
- .split('\n')
1364
- .map((b) => b.trim())
1365
- .filter((b) => b && b !== currentBranch.trim());
1366
- if (branches.length === 0) {
1367
- output.push('No merged branches to delete');
1368
- }
1369
- else {
1370
- for (const branch of branches) {
1371
- if (dryRun) {
1372
- output.push(`Would delete: ${branch}`);
1373
- }
1374
- else {
1375
- try {
1376
- await execAsync(`git branch -d "${branch}"`, { cwd: workingDir, timeout: 10000 });
1377
- output.push(`✓ Deleted: ${branch}`);
1378
- }
1379
- catch {
1380
- output.push(`✗ Could not delete: ${branch}`);
1381
- }
1382
- }
1383
- }
1384
- }
1385
- output.push('');
1386
- }
1387
- // Clean untracked files
1388
- if (cleanUntracked) {
1389
- output.push('## Untracked Files');
1390
- if (dryRun) {
1391
- const { stdout } = await execAsync('git clean -n -d', { cwd: workingDir, timeout: 30000 });
1392
- output.push(stdout.trim() || 'No untracked files to remove');
1393
- }
1394
- else {
1395
- const { stdout } = await execAsync('git clean -f -d', { cwd: workingDir, timeout: 30000 });
1396
- output.push(stdout.trim() || '✓ No untracked files to remove');
1397
- }
1398
- output.push('');
1399
- }
1400
- // Garbage collection
1401
- if (gc && !dryRun) {
1402
- output.push('## Garbage Collection');
1403
- await execAsync('git gc --auto', { cwd: workingDir, timeout: 300000 });
1404
- output.push('✓ Garbage collection complete');
1405
- }
1406
- return output.join('\n');
1407
- }
1408
- catch (error) {
1409
- return `Error during cleanup: ${error.message}`;
1410
- }
1411
- },
1412
- },
1413
- // ========================================================================
1414
- // Docker Tools
1415
- // ========================================================================
1416
- {
1417
- name: 'docker_build',
1418
- description: 'Build a Docker image with optional tagging and pushing to registry',
1419
- parameters: {
1420
- type: 'object',
1421
- properties: {
1422
- tag: {
1423
- type: 'string',
1424
- description: 'Image tag (e.g., myapp:latest)',
1425
- },
1426
- dockerfile: {
1427
- type: 'string',
1428
- description: 'Path to Dockerfile (default: Dockerfile)',
1429
- },
1430
- context: {
1431
- type: 'string',
1432
- description: 'Build context path (default: .)',
1433
- },
1434
- push: {
1435
- type: 'boolean',
1436
- description: 'Push to registry after building (default: false)',
1437
- },
1438
- noCache: {
1439
- type: 'boolean',
1440
- description: 'Build without cache (default: false)',
1441
- },
1442
- buildArgs: {
1443
- type: 'object',
1444
- description: 'Build arguments as key-value pairs',
1445
- },
1446
- platform: {
1447
- type: 'string',
1448
- description: 'Target platform (e.g., linux/amd64,linux/arm64)',
1449
- },
1450
- },
1451
- required: ['tag'],
1452
- additionalProperties: false,
1453
- },
1454
- handler: async (args) => {
1455
- const tag = args['tag'];
1456
- const dockerfile = typeof args['dockerfile'] === 'string' ? args['dockerfile'] : 'Dockerfile';
1457
- const context = typeof args['context'] === 'string' ? args['context'] : '.';
1458
- const push = args['push'] === true;
1459
- const noCache = args['noCache'] === true;
1460
- const buildArgs = args['buildArgs'];
1461
- const platform = typeof args['platform'] === 'string' ? args['platform'] : undefined;
1462
- const output = ['# Docker Build', ''];
1463
- try {
1464
- // Build command
1465
- let cmd = `docker build -t "${tag}" -f "${dockerfile}"`;
1466
- if (noCache)
1467
- cmd += ' --no-cache';
1468
- if (platform)
1469
- cmd += ` --platform ${platform}`;
1470
- if (buildArgs) {
1471
- for (const [key, value] of Object.entries(buildArgs)) {
1472
- cmd += ` --build-arg ${key}="${value}"`;
1473
- }
1474
- }
1475
- cmd += ` "${context}"`;
1476
- output.push(`## Building Image`);
1477
- output.push(`Command: ${cmd}`);
1478
- output.push('');
1479
- const { stderr } = await execAsync(cmd, {
1480
- cwd: workingDir,
1481
- timeout: 600000, // 10 minutes
1482
- maxBuffer: 1024 * 1024 * 50,
1483
- });
1484
- output.push('✓ Build completed');
1485
- if (stderr && !stderr.includes('deprecated')) {
1486
- output.push(`Warnings: ${stderr.substring(0, 500)}`);
1487
- }
1488
- // Push if requested
1489
- if (push) {
1490
- output.push('');
1491
- output.push('## Pushing Image');
1492
- try {
1493
- await execAsync(`docker push "${tag}"`, { cwd: workingDir, timeout: 300000 });
1494
- output.push(`✓ Pushed ${tag}`);
1495
- }
1496
- catch (e) {
1497
- output.push(`✗ Push failed: ${e.message}`);
1498
- }
1499
- }
1500
- return output.join('\n');
1501
- }
1502
- catch (error) {
1503
- return `Docker build failed: ${error.message}\n${error.stderr || ''}`;
1504
- }
1505
- },
1506
- },
1507
- {
1508
- name: 'docker_compose',
1509
- description: 'Run docker-compose commands (up, down, restart, logs, etc.)',
1510
- parameters: {
1511
- type: 'object',
1512
- properties: {
1513
- action: {
1514
- type: 'string',
1515
- enum: ['up', 'down', 'restart', 'logs', 'ps', 'build', 'pull', 'stop', 'start'],
1516
- description: 'Docker compose action',
1517
- },
1518
- services: {
1519
- type: 'array',
1520
- items: { type: 'string' },
1521
- description: 'Specific services to target (default: all)',
1522
- },
1523
- detach: {
1524
- type: 'boolean',
1525
- description: 'Run in detached mode (for up/restart)',
1526
- },
1527
- build: {
1528
- type: 'boolean',
1529
- description: 'Build images before starting (for up)',
1530
- },
1531
- follow: {
1532
- type: 'boolean',
1533
- description: 'Follow log output (for logs)',
1534
- },
1535
- tail: {
1536
- type: 'number',
1537
- description: 'Number of lines to show from end of logs',
1538
- },
1539
- composeFile: {
1540
- type: 'string',
1541
- description: 'Path to compose file (default: docker-compose.yml)',
1542
- },
1543
- },
1544
- required: ['action'],
1545
- additionalProperties: false,
1546
- },
1547
- handler: async (args) => {
1548
- const action = args['action'];
1549
- const services = Array.isArray(args['services']) ? args['services'] : [];
1550
- const detach = args['detach'] === true;
1551
- const build = args['build'] === true;
1552
- const follow = args['follow'] === true;
1553
- const tail = typeof args['tail'] === 'number' ? args['tail'] : undefined;
1554
- const composeFile = typeof args['composeFile'] === 'string' ? args['composeFile'] : undefined;
1555
- const output = ['# Docker Compose', ''];
1556
- try {
1557
- // Build command
1558
- let cmd = 'docker compose';
1559
- if (composeFile)
1560
- cmd += ` -f "${composeFile}"`;
1561
- cmd += ` ${action}`;
1562
- // Action-specific options
1563
- if (action === 'up') {
1564
- if (detach)
1565
- cmd += ' -d';
1566
- if (build)
1567
- cmd += ' --build';
1568
- }
1569
- if (action === 'logs') {
1570
- if (follow)
1571
- cmd += ' -f';
1572
- if (tail)
1573
- cmd += ` --tail=${tail}`;
1574
- }
1575
- if (services.length > 0) {
1576
- cmd += ` ${services.join(' ')}`;
1577
- }
1578
- output.push(`Command: ${cmd}`);
1579
- output.push('');
1580
- const timeout = action === 'logs' && follow ? 30000 : 300000;
1581
- const { stdout, stderr } = await execAsync(cmd, {
1582
- cwd: workingDir,
1583
- timeout,
1584
- maxBuffer: 1024 * 1024 * 10,
1585
- });
1586
- if (stdout)
1587
- output.push(stdout.substring(0, 5000));
1588
- if (stderr && !stderr.includes('deprecated')) {
1589
- output.push(`Stderr: ${stderr.substring(0, 1000)}`);
1590
- }
1591
- output.push('');
1592
- output.push(`✓ ${action} completed`);
1593
- return output.join('\n');
1594
- }
1595
- catch (error) {
1596
- if (error.killed) {
1597
- return `${output.join('\n')}\n\n(Command timed out - may still be running)`;
1598
- }
1599
- return `Docker compose ${action} failed: ${error.message}\n${error.stderr || ''}`;
1600
- }
1601
- },
1602
- },
1603
- // ========================================================================
1604
- // Project Scaffolding Tools
1605
- // ========================================================================
1606
- {
1607
- name: 'project_init',
1608
- description: 'Initialize a new project with common configurations (git, eslint, prettier, typescript, etc.)',
1609
- parameters: {
1610
- type: 'object',
1611
- properties: {
1612
- type: {
1613
- type: 'string',
1614
- enum: ['node', 'typescript', 'react', 'nextjs', 'python', 'go'],
1615
- description: 'Project type',
1616
- },
1617
- name: {
1618
- type: 'string',
1619
- description: 'Project name',
1620
- },
1621
- git: {
1622
- type: 'boolean',
1623
- description: 'Initialize git repository (default: true)',
1624
- },
1625
- eslint: {
1626
- type: 'boolean',
1627
- description: 'Add ESLint configuration (for JS/TS projects, default: true)',
1628
- },
1629
- prettier: {
1630
- type: 'boolean',
1631
- description: 'Add Prettier configuration (default: true)',
1632
- },
1633
- docker: {
1634
- type: 'boolean',
1635
- description: 'Add Dockerfile and docker-compose.yml (default: false)',
1636
- },
1637
- ci: {
1638
- type: 'string',
1639
- enum: ['github', 'gitlab', 'none'],
1640
- description: 'Add CI configuration (default: none)',
1641
- },
1642
- },
1643
- required: ['type'],
1644
- additionalProperties: false,
1645
- },
1646
- handler: async (args) => {
1647
- const projectType = args['type'];
1648
- const projectName = typeof args['name'] === 'string' ? args['name'] : 'my-project';
1649
- const initGit = args['git'] !== false;
1650
- const addEslint = args['eslint'] !== false;
1651
- const addPrettier = args['prettier'] !== false;
1652
- const addDocker = args['docker'] === true;
1653
- const ci = typeof args['ci'] === 'string' ? args['ci'] : 'none';
1654
- const output = [`# Project Initialization: ${projectName}`, ''];
1655
- output.push(`Type: ${projectType}`);
1656
- output.push('');
1657
- try {
1658
- // Initialize based on type
1659
- output.push('## Creating Project');
1660
- switch (projectType) {
1661
- case 'node':
1662
- await execAsync('npm init -y', { cwd: workingDir, timeout: 30000 });
1663
- output.push('✓ Initialized npm project');
1664
- break;
1665
- case 'typescript':
1666
- await execAsync('npm init -y && npm install typescript @types/node --save-dev', {
1667
- cwd: workingDir,
1668
- timeout: 120000,
1669
- });
1670
- await execAsync('npx tsc --init', { cwd: workingDir, timeout: 30000 });
1671
- output.push('✓ Initialized TypeScript project');
1672
- break;
1673
- case 'react':
1674
- await execAsync(`npx create-react-app ${projectName} --template typescript`, {
1675
- cwd: workingDir,
1676
- timeout: 300000,
1677
- });
1678
- output.push('✓ Created React app');
1679
- break;
1680
- case 'nextjs':
1681
- await execAsync(`npx create-next-app@latest ${projectName} --typescript --eslint --tailwind --app`, {
1682
- cwd: workingDir,
1683
- timeout: 300000,
1684
- });
1685
- output.push('✓ Created Next.js app');
1686
- break;
1687
- case 'python':
1688
- await execAsync('python3 -m venv .venv', { cwd: workingDir, timeout: 60000 });
1689
- output.push('✓ Created Python virtual environment');
1690
- break;
1691
- case 'go':
1692
- await execAsync(`go mod init ${projectName}`, { cwd: workingDir, timeout: 30000 });
1693
- output.push('✓ Initialized Go module');
1694
- break;
1695
- }
1696
- // Git
1697
- if (initGit) {
1698
- output.push('');
1699
- output.push('## Git');
1700
- try {
1701
- await execAsync('git init', { cwd: workingDir, timeout: 10000 });
1702
- output.push('✓ Initialized git repository');
1703
- }
1704
- catch {
1705
- output.push('Git already initialized or failed');
1706
- }
1707
- }
1708
- // ESLint (for JS/TS projects)
1709
- if (addEslint && ['node', 'typescript', 'react', 'nextjs'].includes(projectType)) {
1710
- output.push('');
1711
- output.push('## ESLint');
1712
- try {
1713
- await execAsync('npm install eslint --save-dev', { cwd: workingDir, timeout: 120000 });
1714
- output.push('✓ Installed ESLint');
1715
- }
1716
- catch (e) {
1717
- output.push(`ESLint setup: ${e.message}`);
1718
- }
1719
- }
1720
- // Prettier
1721
- if (addPrettier) {
1722
- output.push('');
1723
- output.push('## Prettier');
1724
- try {
1725
- await execAsync('npm install prettier --save-dev', { cwd: workingDir, timeout: 120000 });
1726
- output.push('✓ Installed Prettier');
1727
- }
1728
- catch (e) {
1729
- output.push(`Prettier setup: ${e.message}`);
1730
- }
1731
- }
1732
- // Docker
1733
- if (addDocker) {
1734
- output.push('');
1735
- output.push('## Docker');
1736
- output.push('Add Dockerfile and docker-compose.yml manually based on your needs');
1737
- }
1738
- // CI
1739
- if (ci !== 'none') {
1740
- output.push('');
1741
- output.push(`## CI (${ci})`);
1742
- if (ci === 'github') {
1743
- output.push('Add .github/workflows/ci.yml for GitHub Actions');
1744
- }
1745
- else if (ci === 'gitlab') {
1746
- output.push('Add .gitlab-ci.yml for GitLab CI');
1747
- }
1748
- }
1749
- output.push('');
1750
- output.push('## Summary');
1751
- output.push(`✓ Project ${projectName} initialized as ${projectType}`);
1752
- return output.join('\n');
1753
- }
1754
- catch (error) {
1755
- return `Project initialization failed: ${error.message}`;
1756
- }
1757
- },
1758
- },
1759
- // ========================================================================
1760
- // Environment & Secret Management
1761
- // ========================================================================
1762
- {
1763
- name: 'env_check',
1764
- description: 'Check environment configuration and required variables',
1765
- parameters: {
1766
- type: 'object',
1767
- properties: {
1768
- envFile: {
1769
- type: 'string',
1770
- description: 'Path to .env file to check (default: .env)',
1771
- },
1772
- exampleFile: {
1773
- type: 'string',
1774
- description: 'Path to .env.example to compare against',
1775
- },
1776
- requiredVars: {
1777
- type: 'array',
1778
- items: { type: 'string' },
1779
- description: 'List of required environment variables to check',
1780
- },
1781
- },
1782
- additionalProperties: false,
1783
- },
1784
- handler: async (args) => {
1785
- const envFile = typeof args['envFile'] === 'string' ? args['envFile'] : '.env';
1786
- const exampleFile = typeof args['exampleFile'] === 'string' ? args['exampleFile'] : '.env.example';
1787
- const requiredVars = Array.isArray(args['requiredVars']) ? args['requiredVars'] : [];
1788
- const output = ['# Environment Check', ''];
1789
- try {
1790
- const envPath = join(workingDir, envFile);
1791
- const examplePath = join(workingDir, exampleFile);
1792
- // Parse env file
1793
- const parseEnvFile = (content) => {
1794
- const vars = new Map();
1795
- for (const line of content.split('\n')) {
1796
- const trimmed = line.trim();
1797
- if (trimmed && !trimmed.startsWith('#')) {
1798
- const [key, ...valueParts] = trimmed.split('=');
1799
- if (key) {
1800
- vars.set(key.trim(), valueParts.join('=').trim());
1801
- }
1802
- }
1803
- }
1804
- return vars;
1805
- };
1806
- // Check .env exists
1807
- let envVars = new Map();
1808
- if (existsSync(envPath)) {
1809
- const content = readFileSync(envPath, 'utf-8');
1810
- envVars = parseEnvFile(content);
1811
- output.push(`✓ Found ${envFile} with ${envVars.size} variables`);
1812
- }
1813
- else {
1814
- output.push(`✗ ${envFile} not found`);
1815
- }
1816
- // Compare with example
1817
- if (existsSync(examplePath)) {
1818
- output.push('');
1819
- output.push(`## Comparing with ${exampleFile}`);
1820
- const exampleContent = readFileSync(examplePath, 'utf-8');
1821
- const exampleVars = parseEnvFile(exampleContent);
1822
- const missing = [];
1823
- const extra = [];
1824
- for (const key of exampleVars.keys()) {
1825
- if (!envVars.has(key)) {
1826
- missing.push(key);
1827
- }
1828
- }
1829
- for (const key of envVars.keys()) {
1830
- if (!exampleVars.has(key)) {
1831
- extra.push(key);
1832
- }
1833
- }
1834
- if (missing.length > 0) {
1835
- output.push(`✗ Missing variables: ${missing.join(', ')}`);
1836
- }
1837
- else {
1838
- output.push('✓ All example variables are defined');
1839
- }
1840
- if (extra.length > 0) {
1841
- output.push(`ℹ Extra variables: ${extra.join(', ')}`);
1842
- }
1843
- }
1844
- // Check required vars
1845
- if (requiredVars.length > 0) {
1846
- output.push('');
1847
- output.push('## Required Variables');
1848
- const missingRequired = [];
1849
- const emptyRequired = [];
1850
- for (const varName of requiredVars) {
1851
- const value = envVars.get(varName) ?? process.env[varName];
1852
- if (value === undefined) {
1853
- missingRequired.push(varName);
1854
- }
1855
- else if (value === '') {
1856
- emptyRequired.push(varName);
1857
- }
1858
- else {
1859
- output.push(`✓ ${varName}: set`);
1860
- }
1861
- }
1862
- if (missingRequired.length > 0) {
1863
- output.push(`✗ Missing: ${missingRequired.join(', ')}`);
1864
- }
1865
- if (emptyRequired.length > 0) {
1866
- output.push(`⚠ Empty: ${emptyRequired.join(', ')}`);
1867
- }
1868
- }
1869
- // Check for sensitive patterns in .env
1870
- output.push('');
1871
- output.push('## Security Check');
1872
- const sensitivePatterns = ['password', 'secret', 'key', 'token', 'credential'];
1873
- const exposedSecrets = [];
1874
- for (const [key, value] of envVars.entries()) {
1875
- const lowerKey = key.toLowerCase();
1876
- if (sensitivePatterns.some((p) => lowerKey.includes(p)) && value && value !== '***') {
1877
- exposedSecrets.push(key);
1878
- }
1879
- }
1880
- if (exposedSecrets.length > 0) {
1881
- output.push(`⚠ Sensitive variables found: ${exposedSecrets.length}`);
1882
- output.push('Make sure .env is in .gitignore');
1883
- }
1884
- else {
1885
- output.push('✓ No obvious sensitive data patterns found');
1886
- }
1887
- return output.join('\n');
1888
- }
1889
- catch (error) {
1890
- return `Environment check failed: ${error.message}`;
1891
- }
1892
- },
1893
- },
1894
- // ========================================================================
1895
- // Process & Service Management
1896
- // ========================================================================
1897
- {
1898
- name: 'service_status',
1899
- description: 'Check status of common development services (databases, caches, etc.)',
1900
- parameters: {
1901
- type: 'object',
1902
- properties: {
1903
- services: {
1904
- type: 'array',
1905
- items: {
1906
- type: 'string',
1907
- enum: ['postgres', 'mysql', 'redis', 'mongodb', 'elasticsearch', 'docker', 'nginx', 'node'],
1908
- },
1909
- description: 'Services to check (default: auto-detect)',
1910
- },
1911
- ports: {
1912
- type: 'array',
1913
- items: { type: 'number' },
1914
- description: 'Additional ports to check',
1915
- },
1916
- },
1917
- additionalProperties: false,
1918
- },
1919
- handler: async (args) => {
1920
- const services = Array.isArray(args['services']) ? args['services'] : [];
1921
- const ports = Array.isArray(args['ports']) ? args['ports'] : [];
1922
- const output = ['# Service Status', ''];
1923
- const serviceConfig = {
1924
- postgres: { port: 5432, process: 'postgres' },
1925
- mysql: { port: 3306, process: 'mysql' },
1926
- redis: { port: 6379, process: 'redis' },
1927
- mongodb: { port: 27017, process: 'mongod' },
1928
- elasticsearch: { port: 9200, process: 'java' },
1929
- docker: { port: 2375, process: 'docker' },
1930
- nginx: { port: 80, process: 'nginx' },
1931
- node: { port: 3000, process: 'node' },
1932
- };
1933
- const checkPort = async (port) => {
1934
- try {
1935
- const { stdout } = await execAsync(`lsof -i :${port} -sTCP:LISTEN 2>/dev/null | head -1`, {
1936
- cwd: workingDir,
1937
- timeout: 5000,
1938
- shell: '/bin/bash',
1939
- });
1940
- return stdout.trim().length > 0;
1941
- }
1942
- catch {
1943
- return false;
1944
- }
1945
- };
1946
- const checkProcess = async (name) => {
1947
- try {
1948
- const { stdout } = await execAsync(`pgrep -x "${name}" 2>/dev/null`, {
1949
- cwd: workingDir,
1950
- timeout: 5000,
1951
- shell: '/bin/bash',
1952
- });
1953
- return stdout.trim().length > 0;
1954
- }
1955
- catch {
1956
- return false;
1957
- }
1958
- };
1959
- // Check specified services
1960
- const servicesToCheck = services.length > 0 ? services : Object.keys(serviceConfig);
1961
- output.push('## Services');
1962
- for (const service of servicesToCheck) {
1963
- const config = serviceConfig[service];
1964
- if (!config)
1965
- continue;
1966
- const portOpen = await checkPort(config.port);
1967
- const processRunning = config.process ? await checkProcess(config.process) : false;
1968
- const status = portOpen ? '✓' : processRunning ? '⚠' : '✗';
1969
- const detail = portOpen ? `listening on :${config.port}` : processRunning ? 'process running' : 'not detected';
1970
- output.push(`${status} ${service}: ${detail}`);
1971
- }
1972
- // Check additional ports
1973
- if (ports.length > 0) {
1974
- output.push('');
1975
- output.push('## Custom Ports');
1976
- for (const port of ports) {
1977
- const open = await checkPort(port);
1978
- output.push(`${open ? '✓' : '✗'} Port ${port}: ${open ? 'in use' : 'available'}`);
1979
- }
1980
- }
1981
- // Docker status
1982
- output.push('');
1983
- output.push('## Docker');
1984
- try {
1985
- const { stdout: dockerPs } = await execAsync('docker ps --format "{{.Names}}: {{.Status}}" 2>/dev/null', {
1986
- cwd: workingDir,
1987
- timeout: 10000,
1988
- shell: '/bin/bash',
1989
- });
1990
- if (dockerPs.trim()) {
1991
- output.push('Running containers:');
1992
- dockerPs.split('\n').forEach((line) => {
1993
- if (line.trim())
1994
- output.push(` ${line.trim()}`);
1995
- });
1996
- }
1997
- else {
1998
- output.push('No running containers');
1999
- }
2000
- }
2001
- catch {
2002
- output.push('Docker not available');
2003
- }
2004
- return output.join('\n');
2005
- },
2006
- },
2007
- {
2008
- name: 'kill_port',
2009
- description: 'Kill process running on a specific port',
2010
- parameters: {
2011
- type: 'object',
2012
- properties: {
2013
- port: {
2014
- type: 'number',
2015
- description: 'Port number to free up',
2016
- },
2017
- force: {
2018
- type: 'boolean',
2019
- description: 'Force kill with SIGKILL instead of SIGTERM (default: false)',
2020
- },
2021
- },
2022
- required: ['port'],
2023
- additionalProperties: false,
2024
- },
2025
- handler: async (args) => {
2026
- const port = args['port'];
2027
- const force = args['force'] === true;
2028
- const output = [`# Kill Process on Port ${port}`, ''];
2029
- try {
2030
- // Find process on port
2031
- const { stdout: lsofOut } = await execAsync(`lsof -i :${port} -sTCP:LISTEN 2>/dev/null`, {
2032
- cwd: workingDir,
2033
- timeout: 10000,
2034
- shell: '/bin/bash',
2035
- });
2036
- if (!lsofOut.trim()) {
2037
- return `No process found listening on port ${port}`;
2038
- }
2039
- output.push('## Process Info');
2040
- output.push(lsofOut.trim());
2041
- output.push('');
2042
- // Extract PID
2043
- const lines = lsofOut.split('\n').filter((l) => l.trim());
2044
- if (lines.length < 2) {
2045
- return `Could not find process on port ${port}`;
2046
- }
2047
- const pidMatch = lines[1]?.match(/\S+\s+(\d+)/);
2048
- if (!pidMatch) {
2049
- return `Could not extract PID from lsof output`;
2050
- }
2051
- const pid = pidMatch[1];
2052
- const signal = force ? 'KILL' : 'TERM';
2053
- output.push(`## Killing Process`);
2054
- output.push(`PID: ${pid}`);
2055
- output.push(`Signal: ${signal}`);
2056
- await execAsync(`kill -${signal} ${pid}`, { cwd: workingDir, timeout: 10000 });
2057
- output.push(`✓ Sent ${signal} signal to process ${pid}`);
2058
- // Wait and verify
2059
- await new Promise((r) => setTimeout(r, 1000));
2060
- try {
2061
- const { stdout: checkOut } = await execAsync(`lsof -i :${port} -sTCP:LISTEN 2>/dev/null`, {
2062
- cwd: workingDir,
2063
- timeout: 5000,
2064
- shell: '/bin/bash',
2065
- });
2066
- if (checkOut.trim()) {
2067
- output.push(`⚠ Process may still be running. Try with force=true`);
2068
- }
2069
- else {
2070
- output.push(`✓ Port ${port} is now free`);
2071
- }
2072
- }
2073
- catch {
2074
- output.push(`✓ Port ${port} is now free`);
2075
- }
2076
- return output.join('\n');
2077
- }
2078
- catch (error) {
2079
- return `Failed to kill process on port ${port}: ${error.message}`;
2080
- }
2081
- },
2082
- },
2083
- // ========================================================================
2084
- // Dependency Management
2085
- // ========================================================================
2086
- {
2087
- name: 'deps_audit',
2088
- description: 'Audit dependencies for security vulnerabilities and outdated packages',
2089
- parameters: {
2090
- type: 'object',
2091
- properties: {
2092
- fix: {
2093
- type: 'boolean',
2094
- description: 'Attempt to fix vulnerabilities automatically (default: false)',
2095
- },
2096
- checkOutdated: {
2097
- type: 'boolean',
2098
- description: 'Check for outdated packages (default: true)',
2099
- },
2100
- level: {
2101
- type: 'string',
2102
- enum: ['info', 'low', 'moderate', 'high', 'critical'],
2103
- description: 'Minimum vulnerability level to report (default: moderate)',
2104
- },
2105
- },
2106
- additionalProperties: false,
2107
- },
2108
- handler: async (args) => {
2109
- const fix = args['fix'] === true;
2110
- const checkOutdated = args['checkOutdated'] !== false;
2111
- const level = typeof args['level'] === 'string' ? args['level'] : 'moderate';
2112
- const output = ['# Dependency Audit', ''];
2113
- try {
2114
- // npm audit
2115
- output.push('## Security Audit');
2116
- try {
2117
- const auditCmd = fix ? 'npm audit fix' : `npm audit --audit-level=${level}`;
2118
- const { stdout: auditOut, stderr: auditErr } = await execAsync(auditCmd, {
2119
- cwd: workingDir,
2120
- timeout: 120000,
2121
- maxBuffer: 1024 * 1024 * 10,
2122
- });
2123
- output.push(auditOut.substring(0, 3000) || '✓ No vulnerabilities found');
2124
- if (auditErr && !auditErr.includes('npm WARN')) {
2125
- output.push(`Warnings: ${auditErr.substring(0, 500)}`);
2126
- }
2127
- }
2128
- catch (e) {
2129
- // npm audit returns non-zero if vulnerabilities found
2130
- if (e.stdout) {
2131
- output.push(e.stdout.substring(0, 3000));
2132
- }
2133
- else {
2134
- output.push(`Audit check: ${e.message}`);
2135
- }
2136
- }
2137
- // Check outdated
2138
- if (checkOutdated) {
2139
- output.push('');
2140
- output.push('## Outdated Packages');
2141
- try {
2142
- const { stdout: outdatedOut } = await execAsync('npm outdated --json 2>/dev/null', {
2143
- cwd: workingDir,
2144
- timeout: 60000,
2145
- shell: '/bin/bash',
2146
- });
2147
- if (outdatedOut.trim() && outdatedOut !== '{}') {
2148
- const outdated = JSON.parse(outdatedOut);
2149
- const entries = Object.entries(outdated);
2150
- if (entries.length > 0) {
2151
- output.push(`Found ${entries.length} outdated package(s):`);
2152
- for (const [pkg, info] of entries.slice(0, 20)) {
2153
- output.push(` ${pkg}: ${info.current} → ${info.wanted} (latest: ${info.latest})`);
2154
- }
2155
- if (entries.length > 20) {
2156
- output.push(` ... and ${entries.length - 20} more`);
2157
- }
2158
- }
2159
- else {
2160
- output.push('✓ All packages are up to date');
2161
- }
2162
- }
2163
- else {
2164
- output.push('✓ All packages are up to date');
2165
- }
2166
- }
2167
- catch {
2168
- output.push('Could not check outdated packages');
2169
- }
2170
- }
2171
- // License check
2172
- output.push('');
2173
- output.push('## License Info');
2174
- try {
2175
- const { stdout: licenseOut } = await execAsync('npx license-checker --summary 2>/dev/null', {
2176
- cwd: workingDir,
2177
- timeout: 60000,
2178
- shell: '/bin/bash',
2179
- });
2180
- if (licenseOut.trim()) {
2181
- output.push(licenseOut.substring(0, 1000));
2182
- }
2183
- }
2184
- catch {
2185
- output.push('License checker not available (install with: npm i -g license-checker)');
2186
- }
2187
- return output.join('\n');
2188
- }
2189
- catch (error) {
2190
- return `Dependency audit failed: ${error.message}`;
2191
- }
2192
- },
2193
- },
2194
- {
2195
- name: 'deps_update',
2196
- description: 'Update dependencies to latest versions',
2197
- parameters: {
2198
- type: 'object',
2199
- properties: {
2200
- mode: {
2201
- type: 'string',
2202
- enum: ['patch', 'minor', 'major', 'latest'],
2203
- description: 'Update mode - patch (safest), minor, major, or latest (default: minor)',
2204
- },
2205
- packages: {
2206
- type: 'array',
2207
- items: { type: 'string' },
2208
- description: 'Specific packages to update (default: all)',
2209
- },
2210
- dryRun: {
2211
- type: 'boolean',
2212
- description: 'Show what would be updated without making changes',
2213
- },
2214
- runTests: {
2215
- type: 'boolean',
2216
- description: 'Run tests after update to verify (default: true)',
2217
- },
2218
- },
2219
- additionalProperties: false,
2220
- },
2221
- handler: async (args) => {
2222
- const mode = typeof args['mode'] === 'string' ? args['mode'] : 'minor';
2223
- const packages = Array.isArray(args['packages']) ? args['packages'] : [];
2224
- const dryRun = args['dryRun'] === true;
2225
- const runTests = args['runTests'] !== false;
2226
- const output = ['# Dependency Update', ''];
2227
- output.push(`Mode: ${mode}`);
2228
- if (dryRun)
2229
- output.push('**DRY RUN**');
2230
- output.push('');
2231
- try {
2232
- if (dryRun) {
2233
- // Just check what would be updated
2234
- output.push('## Would Update');
2235
- const { stdout } = await execAsync('npm outdated --json 2>/dev/null || true', {
2236
- cwd: workingDir,
2237
- timeout: 60000,
2238
- shell: '/bin/bash',
2239
- });
2240
- if (stdout.trim() && stdout !== '{}') {
2241
- const outdated = JSON.parse(stdout);
2242
- for (const [pkg, info] of Object.entries(outdated)) {
2243
- if (packages.length === 0 || packages.includes(pkg)) {
2244
- const target = mode === 'latest' ? info.latest : mode === 'major' ? info.latest : info.wanted;
2245
- output.push(` ${pkg}: ${info.current} → ${target}`);
2246
- }
2247
- }
2248
- }
2249
- else {
2250
- output.push('All packages are up to date');
2251
- }
2252
- return output.join('\n');
2253
- }
2254
- // Perform update
2255
- output.push('## Updating');
2256
- let updateCmd = 'npm update';
2257
- if (packages.length > 0) {
2258
- updateCmd = `npm update ${packages.join(' ')}`;
2259
- }
2260
- if (mode === 'latest' || mode === 'major') {
2261
- // For major updates, use npm-check-updates
2262
- output.push('Major/latest updates require npm-check-updates');
2263
- try {
2264
- const ncuCmd = packages.length > 0
2265
- ? `npx npm-check-updates -u ${packages.join(' ')}`
2266
- : 'npx npm-check-updates -u';
2267
- await execAsync(ncuCmd, { cwd: workingDir, timeout: 120000 });
2268
- await execAsync('npm install', { cwd: workingDir, timeout: 300000 });
2269
- output.push('✓ Updated package.json and installed');
2270
- }
2271
- catch (e) {
2272
- output.push(`Update failed: ${e.message}`);
2273
- return output.join('\n');
2274
- }
2275
- }
2276
- else {
2277
- const { stdout: updateOut } = await execAsync(updateCmd, {
2278
- cwd: workingDir,
2279
- timeout: 300000,
2280
- });
2281
- output.push(updateOut.substring(0, 2000) || '✓ Updated');
2282
- }
2283
- // Run tests
2284
- if (runTests) {
2285
- output.push('');
2286
- output.push('## Verifying');
2287
- try {
2288
- await execAsync('npm test', { cwd: workingDir, timeout: 300000 });
2289
- output.push('✓ Tests passed');
2290
- }
2291
- catch (e) {
2292
- output.push(`⚠ Tests failed: ${e.message}`);
2293
- output.push('Consider reverting: git checkout package.json package-lock.json && npm install');
2294
- }
2295
- }
2296
- return output.join('\n');
2297
- }
2298
- catch (error) {
2299
- return `Dependency update failed: ${error.message}`;
2300
- }
2301
- },
2302
- },
2303
- ];
2304
- }
2305
- //# sourceMappingURL=devTools.js.map