erosolar-cli 1.7.195 → 1.7.197

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 (1085) hide show
  1. package/dist/StringUtils.d.ts +8 -0
  2. package/dist/StringUtils.d.ts.map +1 -0
  3. package/dist/StringUtils.js +11 -0
  4. package/dist/StringUtils.js.map +1 -0
  5. package/dist/adapters/browser/index.d.ts +12 -0
  6. package/dist/adapters/browser/index.d.ts.map +1 -0
  7. package/dist/adapters/browser/index.js +11 -0
  8. package/dist/adapters/browser/index.js.map +1 -0
  9. package/dist/adapters/node/index.d.ts +17 -0
  10. package/dist/adapters/node/index.d.ts.map +1 -0
  11. package/dist/adapters/node/index.js +35 -0
  12. package/dist/adapters/node/index.js.map +1 -0
  13. package/dist/adapters/remote/index.d.ts +13 -0
  14. package/dist/adapters/remote/index.d.ts.map +1 -0
  15. package/dist/adapters/remote/index.js +20 -0
  16. package/dist/adapters/remote/index.js.map +1 -0
  17. package/dist/adapters/types.d.ts +14 -0
  18. package/dist/adapters/types.d.ts.map +1 -0
  19. package/dist/adapters/types.js +2 -0
  20. package/dist/adapters/types.js.map +1 -0
  21. package/dist/alpha-zero/agentWrapper.d.ts +84 -0
  22. package/dist/alpha-zero/agentWrapper.d.ts.map +1 -0
  23. package/dist/alpha-zero/agentWrapper.js +171 -0
  24. package/dist/alpha-zero/agentWrapper.js.map +1 -0
  25. package/dist/alpha-zero/codeEvaluator.d.ts +25 -0
  26. package/dist/alpha-zero/codeEvaluator.d.ts.map +1 -0
  27. package/dist/alpha-zero/codeEvaluator.js +273 -0
  28. package/dist/alpha-zero/codeEvaluator.js.map +1 -0
  29. package/dist/alpha-zero/competitiveRunner.d.ts +66 -0
  30. package/dist/alpha-zero/competitiveRunner.d.ts.map +1 -0
  31. package/dist/alpha-zero/competitiveRunner.js +224 -0
  32. package/dist/alpha-zero/competitiveRunner.js.map +1 -0
  33. package/dist/alpha-zero/index.d.ts +67 -0
  34. package/dist/alpha-zero/index.d.ts.map +1 -0
  35. package/dist/alpha-zero/index.js +99 -0
  36. package/dist/alpha-zero/index.js.map +1 -0
  37. package/dist/alpha-zero/introspection.d.ts +128 -0
  38. package/dist/alpha-zero/introspection.d.ts.map +1 -0
  39. package/dist/alpha-zero/introspection.js +300 -0
  40. package/dist/alpha-zero/introspection.js.map +1 -0
  41. package/dist/alpha-zero/metricsTracker.d.ts +71 -0
  42. package/dist/alpha-zero/metricsTracker.d.ts.map +1 -0
  43. package/dist/alpha-zero/metricsTracker.js +209 -0
  44. package/dist/alpha-zero/metricsTracker.js.map +1 -0
  45. package/dist/alpha-zero/security/core.d.ts +125 -0
  46. package/dist/alpha-zero/security/core.d.ts.map +1 -0
  47. package/dist/alpha-zero/security/core.js +271 -0
  48. package/dist/alpha-zero/security/core.js.map +1 -0
  49. package/dist/alpha-zero/security/google.d.ts +125 -0
  50. package/dist/alpha-zero/security/google.d.ts.map +1 -0
  51. package/dist/alpha-zero/security/google.js +311 -0
  52. package/dist/alpha-zero/security/google.js.map +1 -0
  53. package/dist/alpha-zero/security/googleLoader.d.ts +17 -0
  54. package/dist/alpha-zero/security/googleLoader.d.ts.map +1 -0
  55. package/dist/alpha-zero/security/googleLoader.js +41 -0
  56. package/dist/alpha-zero/security/googleLoader.js.map +1 -0
  57. package/dist/alpha-zero/security/index.d.ts +29 -0
  58. package/dist/alpha-zero/security/index.d.ts.map +1 -0
  59. package/dist/alpha-zero/security/index.js +32 -0
  60. package/dist/alpha-zero/security/index.js.map +1 -0
  61. package/dist/alpha-zero/security/simulation.d.ts +124 -0
  62. package/dist/alpha-zero/security/simulation.d.ts.map +1 -0
  63. package/dist/alpha-zero/security/simulation.js +277 -0
  64. package/dist/alpha-zero/security/simulation.js.map +1 -0
  65. package/dist/alpha-zero/selfModification.d.ts +109 -0
  66. package/dist/alpha-zero/selfModification.d.ts.map +1 -0
  67. package/dist/alpha-zero/selfModification.js +233 -0
  68. package/dist/alpha-zero/selfModification.js.map +1 -0
  69. package/dist/alpha-zero/types.d.ts +170 -0
  70. package/dist/alpha-zero/types.d.ts.map +1 -0
  71. package/dist/alpha-zero/types.js +31 -0
  72. package/dist/alpha-zero/types.js.map +1 -0
  73. package/dist/bin/erosolar.d.ts +9 -0
  74. package/dist/bin/erosolar.d.ts.map +1 -0
  75. package/dist/bin/erosolar.js +88 -0
  76. package/dist/bin/erosolar.js.map +1 -0
  77. package/dist/bin/selfTest.d.ts +14 -0
  78. package/dist/bin/selfTest.d.ts.map +1 -0
  79. package/dist/bin/selfTest.js +304 -0
  80. package/dist/bin/selfTest.js.map +1 -0
  81. package/dist/browser/BrowserSessionManager.d.ts +307 -0
  82. package/dist/browser/BrowserSessionManager.d.ts.map +1 -0
  83. package/dist/browser/BrowserSessionManager.js +713 -0
  84. package/dist/browser/BrowserSessionManager.js.map +1 -0
  85. package/dist/capabilities/advancedTestGenerationCapability.d.ts +17 -0
  86. package/dist/capabilities/advancedTestGenerationCapability.d.ts.map +1 -0
  87. package/dist/capabilities/advancedTestGenerationCapability.js +28 -0
  88. package/dist/capabilities/advancedTestGenerationCapability.js.map +1 -0
  89. package/dist/capabilities/agentSpawningCapability.d.ts +6 -0
  90. package/dist/capabilities/agentSpawningCapability.d.ts.map +1 -0
  91. package/dist/capabilities/agentSpawningCapability.js +115 -0
  92. package/dist/capabilities/agentSpawningCapability.js.map +1 -0
  93. package/dist/capabilities/askUserCapability.d.ts +21 -0
  94. package/dist/capabilities/askUserCapability.d.ts.map +1 -0
  95. package/dist/capabilities/askUserCapability.js +155 -0
  96. package/dist/capabilities/askUserCapability.js.map +1 -0
  97. package/dist/capabilities/bashCapability.d.ts +13 -0
  98. package/dist/capabilities/bashCapability.d.ts.map +1 -0
  99. package/dist/capabilities/bashCapability.js +24 -0
  100. package/dist/capabilities/bashCapability.js.map +1 -0
  101. package/dist/capabilities/browserAutomationCapability.d.ts +37 -0
  102. package/dist/capabilities/browserAutomationCapability.d.ts.map +1 -0
  103. package/dist/capabilities/browserAutomationCapability.js +49 -0
  104. package/dist/capabilities/browserAutomationCapability.js.map +1 -0
  105. package/dist/capabilities/cloudCapability.d.ts +13 -0
  106. package/dist/capabilities/cloudCapability.d.ts.map +1 -0
  107. package/dist/capabilities/cloudCapability.js +38 -0
  108. package/dist/capabilities/cloudCapability.js.map +1 -0
  109. package/dist/capabilities/codeAnalysisCapability.d.ts +13 -0
  110. package/dist/capabilities/codeAnalysisCapability.d.ts.map +1 -0
  111. package/dist/capabilities/codeAnalysisCapability.js +24 -0
  112. package/dist/capabilities/codeAnalysisCapability.js.map +1 -0
  113. package/dist/capabilities/codeGenerationCapability.d.ts +13 -0
  114. package/dist/capabilities/codeGenerationCapability.d.ts.map +1 -0
  115. package/dist/capabilities/codeGenerationCapability.js +25 -0
  116. package/dist/capabilities/codeGenerationCapability.js.map +1 -0
  117. package/dist/capabilities/codeQualityCapability.d.ts +13 -0
  118. package/dist/capabilities/codeQualityCapability.d.ts.map +1 -0
  119. package/dist/capabilities/codeQualityCapability.js +25 -0
  120. package/dist/capabilities/codeQualityCapability.js.map +1 -0
  121. package/dist/capabilities/dependencySecurityCapability.d.ts +13 -0
  122. package/dist/capabilities/dependencySecurityCapability.d.ts.map +1 -0
  123. package/dist/capabilities/dependencySecurityCapability.js +24 -0
  124. package/dist/capabilities/dependencySecurityCapability.js.map +1 -0
  125. package/dist/capabilities/devCapability.d.ts +13 -0
  126. package/dist/capabilities/devCapability.d.ts.map +1 -0
  127. package/dist/capabilities/devCapability.js +24 -0
  128. package/dist/capabilities/devCapability.js.map +1 -0
  129. package/dist/capabilities/editCapability.d.ts +17 -0
  130. package/dist/capabilities/editCapability.d.ts.map +1 -0
  131. package/dist/capabilities/editCapability.js +27 -0
  132. package/dist/capabilities/editCapability.js.map +1 -0
  133. package/dist/capabilities/emailCapability.d.ts +12 -0
  134. package/dist/capabilities/emailCapability.d.ts.map +1 -0
  135. package/dist/capabilities/emailCapability.js +22 -0
  136. package/dist/capabilities/emailCapability.js.map +1 -0
  137. package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts +17 -0
  138. package/dist/capabilities/enhancedCodeIntelligenceCapability.d.ts.map +1 -0
  139. package/dist/capabilities/enhancedCodeIntelligenceCapability.js +28 -0
  140. package/dist/capabilities/enhancedCodeIntelligenceCapability.js.map +1 -0
  141. package/dist/capabilities/enhancedDevWorkflowCapability.d.ts +17 -0
  142. package/dist/capabilities/enhancedDevWorkflowCapability.d.ts.map +1 -0
  143. package/dist/capabilities/enhancedDevWorkflowCapability.js +28 -0
  144. package/dist/capabilities/enhancedDevWorkflowCapability.js.map +1 -0
  145. package/dist/capabilities/enhancedGitCapability.d.ts +7 -0
  146. package/dist/capabilities/enhancedGitCapability.d.ts.map +1 -0
  147. package/dist/capabilities/enhancedGitCapability.js +220 -0
  148. package/dist/capabilities/enhancedGitCapability.js.map +1 -0
  149. package/dist/capabilities/filesystemCapability.d.ts +13 -0
  150. package/dist/capabilities/filesystemCapability.d.ts.map +1 -0
  151. package/dist/capabilities/filesystemCapability.js +24 -0
  152. package/dist/capabilities/filesystemCapability.js.map +1 -0
  153. package/dist/capabilities/frontendTestingCapability.d.ts +13 -0
  154. package/dist/capabilities/frontendTestingCapability.d.ts.map +1 -0
  155. package/dist/capabilities/frontendTestingCapability.js +28 -0
  156. package/dist/capabilities/frontendTestingCapability.js.map +1 -0
  157. package/dist/capabilities/globCapability.d.ts +17 -0
  158. package/dist/capabilities/globCapability.d.ts.map +1 -0
  159. package/dist/capabilities/globCapability.js +27 -0
  160. package/dist/capabilities/globCapability.js.map +1 -0
  161. package/dist/capabilities/index.d.ts +25 -0
  162. package/dist/capabilities/index.d.ts.map +1 -0
  163. package/dist/capabilities/index.js +25 -0
  164. package/dist/capabilities/index.js.map +1 -0
  165. package/dist/capabilities/interactionCapability.d.ts +12 -0
  166. package/dist/capabilities/interactionCapability.d.ts.map +1 -0
  167. package/dist/capabilities/interactionCapability.js +22 -0
  168. package/dist/capabilities/interactionCapability.js.map +1 -0
  169. package/dist/capabilities/learnCapability.d.ts +13 -0
  170. package/dist/capabilities/learnCapability.d.ts.map +1 -0
  171. package/dist/capabilities/learnCapability.js +24 -0
  172. package/dist/capabilities/learnCapability.js.map +1 -0
  173. package/dist/capabilities/mcpCapability.d.ts +6 -0
  174. package/dist/capabilities/mcpCapability.d.ts.map +1 -0
  175. package/dist/capabilities/mcpCapability.js +19 -0
  176. package/dist/capabilities/mcpCapability.js.map +1 -0
  177. package/dist/capabilities/notebookCapability.d.ts +17 -0
  178. package/dist/capabilities/notebookCapability.d.ts.map +1 -0
  179. package/dist/capabilities/notebookCapability.js +27 -0
  180. package/dist/capabilities/notebookCapability.js.map +1 -0
  181. package/dist/capabilities/performanceMonitoringCapability.d.ts +108 -0
  182. package/dist/capabilities/performanceMonitoringCapability.d.ts.map +1 -0
  183. package/dist/capabilities/performanceMonitoringCapability.js +176 -0
  184. package/dist/capabilities/performanceMonitoringCapability.js.map +1 -0
  185. package/dist/capabilities/planningCapability.d.ts +16 -0
  186. package/dist/capabilities/planningCapability.d.ts.map +1 -0
  187. package/dist/capabilities/planningCapability.js +26 -0
  188. package/dist/capabilities/planningCapability.js.map +1 -0
  189. package/dist/capabilities/refactoringCapability.d.ts +13 -0
  190. package/dist/capabilities/refactoringCapability.d.ts.map +1 -0
  191. package/dist/capabilities/refactoringCapability.js +25 -0
  192. package/dist/capabilities/refactoringCapability.js.map +1 -0
  193. package/dist/capabilities/repoChecksCapability.d.ts +10 -0
  194. package/dist/capabilities/repoChecksCapability.d.ts.map +1 -0
  195. package/dist/capabilities/repoChecksCapability.js +24 -0
  196. package/dist/capabilities/repoChecksCapability.js.map +1 -0
  197. package/dist/capabilities/searchCapability.d.ts +13 -0
  198. package/dist/capabilities/searchCapability.d.ts.map +1 -0
  199. package/dist/capabilities/searchCapability.js +24 -0
  200. package/dist/capabilities/searchCapability.js.map +1 -0
  201. package/dist/capabilities/skillCapability.d.ts +3 -0
  202. package/dist/capabilities/skillCapability.d.ts.map +1 -0
  203. package/dist/capabilities/skillCapability.js +77 -0
  204. package/dist/capabilities/skillCapability.js.map +1 -0
  205. package/dist/capabilities/taskManagementCapability.d.ts +12 -0
  206. package/dist/capabilities/taskManagementCapability.d.ts.map +1 -0
  207. package/dist/capabilities/taskManagementCapability.js +22 -0
  208. package/dist/capabilities/taskManagementCapability.js.map +1 -0
  209. package/dist/capabilities/testingCapability.d.ts +13 -0
  210. package/dist/capabilities/testingCapability.d.ts.map +1 -0
  211. package/dist/capabilities/testingCapability.js +25 -0
  212. package/dist/capabilities/testingCapability.js.map +1 -0
  213. package/dist/capabilities/todoCapability.d.ts +19 -0
  214. package/dist/capabilities/todoCapability.d.ts.map +1 -0
  215. package/dist/capabilities/todoCapability.js +169 -0
  216. package/dist/capabilities/todoCapability.js.map +1 -0
  217. package/dist/capabilities/toolManifest.d.ts +3 -0
  218. package/dist/capabilities/toolManifest.d.ts.map +1 -0
  219. package/dist/capabilities/toolManifest.js +160 -0
  220. package/dist/capabilities/toolManifest.js.map +1 -0
  221. package/dist/capabilities/toolRegistry.d.ts +22 -0
  222. package/dist/capabilities/toolRegistry.d.ts.map +1 -0
  223. package/dist/capabilities/toolRegistry.js +115 -0
  224. package/dist/capabilities/toolRegistry.js.map +1 -0
  225. package/dist/capabilities/validationCapability.d.ts +13 -0
  226. package/dist/capabilities/validationCapability.d.ts.map +1 -0
  227. package/dist/capabilities/validationCapability.js +24 -0
  228. package/dist/capabilities/validationCapability.js.map +1 -0
  229. package/dist/capabilities/webCapability.d.ts +12 -0
  230. package/dist/capabilities/webCapability.d.ts.map +1 -0
  231. package/dist/capabilities/webCapability.js +22 -0
  232. package/dist/capabilities/webCapability.js.map +1 -0
  233. package/dist/config.d.ts +25 -0
  234. package/dist/config.d.ts.map +1 -0
  235. package/dist/config.js +140 -0
  236. package/dist/config.js.map +1 -0
  237. package/dist/contracts/v1/agent.d.ts +147 -0
  238. package/dist/contracts/v1/agent.d.ts.map +1 -0
  239. package/dist/contracts/v1/agent.js +8 -0
  240. package/dist/contracts/v1/agent.js.map +1 -0
  241. package/dist/contracts/v1/agentProfileManifest.d.ts +60 -0
  242. package/dist/contracts/v1/agentProfileManifest.d.ts.map +1 -0
  243. package/dist/contracts/v1/agentProfileManifest.js +9 -0
  244. package/dist/contracts/v1/agentProfileManifest.js.map +1 -0
  245. package/dist/contracts/v1/agentRules.d.ts +60 -0
  246. package/dist/contracts/v1/agentRules.d.ts.map +1 -0
  247. package/dist/contracts/v1/agentRules.js +10 -0
  248. package/dist/contracts/v1/agentRules.js.map +1 -0
  249. package/dist/contracts/v1/provider.d.ts +149 -0
  250. package/dist/contracts/v1/provider.d.ts.map +1 -0
  251. package/dist/contracts/v1/provider.js +7 -0
  252. package/dist/contracts/v1/provider.js.map +1 -0
  253. package/dist/contracts/v1/tool.d.ts +136 -0
  254. package/dist/contracts/v1/tool.d.ts.map +1 -0
  255. package/dist/contracts/v1/tool.js +7 -0
  256. package/dist/contracts/v1/tool.js.map +1 -0
  257. package/dist/contracts/v1/toolAccess.d.ts +43 -0
  258. package/dist/contracts/v1/toolAccess.d.ts.map +1 -0
  259. package/dist/contracts/v1/toolAccess.js +9 -0
  260. package/dist/contracts/v1/toolAccess.js.map +1 -0
  261. package/dist/core/LazyLoader.d.ts +129 -0
  262. package/dist/core/LazyLoader.d.ts.map +1 -0
  263. package/dist/core/LazyLoader.js +240 -0
  264. package/dist/core/LazyLoader.js.map +1 -0
  265. package/dist/core/agent.d.ts +150 -0
  266. package/dist/core/agent.d.ts.map +1 -0
  267. package/dist/core/agent.js +789 -0
  268. package/dist/core/agent.js.map +1 -0
  269. package/dist/core/agentProfileManifest.d.ts +3 -0
  270. package/dist/core/agentProfileManifest.d.ts.map +1 -0
  271. package/dist/core/agentProfileManifest.js +188 -0
  272. package/dist/core/agentProfileManifest.js.map +1 -0
  273. package/dist/core/agentProfiles.d.ts +22 -0
  274. package/dist/core/agentProfiles.d.ts.map +1 -0
  275. package/dist/core/agentProfiles.js +35 -0
  276. package/dist/core/agentProfiles.js.map +1 -0
  277. package/dist/core/agentRulebook.d.ts +11 -0
  278. package/dist/core/agentRulebook.d.ts.map +1 -0
  279. package/dist/core/agentRulebook.js +136 -0
  280. package/dist/core/agentRulebook.js.map +1 -0
  281. package/dist/core/agentSchemaLoader.d.ts +131 -0
  282. package/dist/core/agentSchemaLoader.d.ts.map +1 -0
  283. package/dist/core/agentSchemaLoader.js +234 -0
  284. package/dist/core/agentSchemaLoader.js.map +1 -0
  285. package/dist/core/cliTestHarness.d.ts +200 -0
  286. package/dist/core/cliTestHarness.d.ts.map +1 -0
  287. package/dist/core/cliTestHarness.js +549 -0
  288. package/dist/core/cliTestHarness.js.map +1 -0
  289. package/dist/core/contextManager.d.ts +259 -0
  290. package/dist/core/contextManager.d.ts.map +1 -0
  291. package/dist/core/contextManager.js +1057 -0
  292. package/dist/core/contextManager.js.map +1 -0
  293. package/dist/core/contextWindow.d.ts +42 -0
  294. package/dist/core/contextWindow.d.ts.map +1 -0
  295. package/dist/core/contextWindow.js +123 -0
  296. package/dist/core/contextWindow.js.map +1 -0
  297. package/dist/core/customCommands.d.ts +18 -0
  298. package/dist/core/customCommands.d.ts.map +1 -0
  299. package/dist/core/customCommands.js +81 -0
  300. package/dist/core/customCommands.js.map +1 -0
  301. package/dist/core/errors/apiKeyErrors.d.ts +11 -0
  302. package/dist/core/errors/apiKeyErrors.d.ts.map +1 -0
  303. package/dist/core/errors/apiKeyErrors.js +159 -0
  304. package/dist/core/errors/apiKeyErrors.js.map +1 -0
  305. package/dist/core/errors/errorTypes.d.ts +111 -0
  306. package/dist/core/errors/errorTypes.d.ts.map +1 -0
  307. package/dist/core/errors/errorTypes.js +348 -0
  308. package/dist/core/errors/errorTypes.js.map +1 -0
  309. package/dist/core/errors/errorUtils.d.ts +87 -0
  310. package/dist/core/errors/errorUtils.d.ts.map +1 -0
  311. package/dist/core/errors/errorUtils.js +158 -0
  312. package/dist/core/errors/errorUtils.js.map +1 -0
  313. package/dist/core/errors/safetyValidator.d.ts +71 -0
  314. package/dist/core/errors/safetyValidator.d.ts.map +1 -0
  315. package/dist/core/errors/safetyValidator.js +302 -0
  316. package/dist/core/errors/safetyValidator.js.map +1 -0
  317. package/dist/core/errors.d.ts +4 -0
  318. package/dist/core/errors.d.ts.map +1 -0
  319. package/dist/core/errors.js +33 -0
  320. package/dist/core/errors.js.map +1 -0
  321. package/dist/core/isolatedVerifier.d.ts +40 -0
  322. package/dist/core/isolatedVerifier.d.ts.map +1 -0
  323. package/dist/core/isolatedVerifier.js +129 -0
  324. package/dist/core/isolatedVerifier.js.map +1 -0
  325. package/dist/core/modelDiscovery.d.ts +101 -0
  326. package/dist/core/modelDiscovery.d.ts.map +1 -0
  327. package/dist/core/modelDiscovery.js +780 -0
  328. package/dist/core/modelDiscovery.js.map +1 -0
  329. package/dist/core/multilinePasteHandler.d.ts +35 -0
  330. package/dist/core/multilinePasteHandler.d.ts.map +1 -0
  331. package/dist/core/multilinePasteHandler.js +80 -0
  332. package/dist/core/multilinePasteHandler.js.map +1 -0
  333. package/dist/core/performanceMonitor.d.ts +124 -0
  334. package/dist/core/performanceMonitor.d.ts.map +1 -0
  335. package/dist/core/performanceMonitor.js +195 -0
  336. package/dist/core/performanceMonitor.js.map +1 -0
  337. package/dist/core/preferences.d.ts +31 -0
  338. package/dist/core/preferences.d.ts.map +1 -0
  339. package/dist/core/preferences.js +232 -0
  340. package/dist/core/preferences.js.map +1 -0
  341. package/dist/core/responseVerifier.d.ts +98 -0
  342. package/dist/core/responseVerifier.d.ts.map +1 -0
  343. package/dist/core/responseVerifier.js +509 -0
  344. package/dist/core/responseVerifier.js.map +1 -0
  345. package/dist/core/resultVerification.d.ts +141 -0
  346. package/dist/core/resultVerification.d.ts.map +1 -0
  347. package/dist/core/resultVerification.js +482 -0
  348. package/dist/core/resultVerification.js.map +1 -0
  349. package/dist/core/schemaValidator.d.ts +44 -0
  350. package/dist/core/schemaValidator.d.ts.map +1 -0
  351. package/dist/core/schemaValidator.js +155 -0
  352. package/dist/core/schemaValidator.js.map +1 -0
  353. package/dist/core/secretStore.d.ts +47 -0
  354. package/dist/core/secretStore.d.ts.map +1 -0
  355. package/dist/core/secretStore.js +364 -0
  356. package/dist/core/secretStore.js.map +1 -0
  357. package/dist/core/sessionStore.d.ts +33 -0
  358. package/dist/core/sessionStore.d.ts.map +1 -0
  359. package/dist/core/sessionStore.js +188 -0
  360. package/dist/core/sessionStore.js.map +1 -0
  361. package/dist/core/testUtils.d.ts +121 -0
  362. package/dist/core/testUtils.d.ts.map +1 -0
  363. package/dist/core/testUtils.js +235 -0
  364. package/dist/core/testUtils.js.map +1 -0
  365. package/dist/core/toolPreconditions.d.ts +41 -0
  366. package/dist/core/toolPreconditions.d.ts.map +1 -0
  367. package/dist/core/toolPreconditions.js +319 -0
  368. package/dist/core/toolPreconditions.js.map +1 -0
  369. package/dist/core/toolRuntime.d.ts +137 -0
  370. package/dist/core/toolRuntime.d.ts.map +1 -0
  371. package/dist/core/toolRuntime.js +375 -0
  372. package/dist/core/toolRuntime.js.map +1 -0
  373. package/dist/core/toolValidation.d.ts +117 -0
  374. package/dist/core/toolValidation.d.ts.map +1 -0
  375. package/dist/core/toolValidation.js +282 -0
  376. package/dist/core/toolValidation.js.map +1 -0
  377. package/dist/core/types/utilityTypes.d.ts +192 -0
  378. package/dist/core/types/utilityTypes.d.ts.map +1 -0
  379. package/dist/core/types/utilityTypes.js +272 -0
  380. package/dist/core/types/utilityTypes.js.map +1 -0
  381. package/dist/core/types.d.ts +306 -0
  382. package/dist/core/types.d.ts.map +1 -0
  383. package/dist/core/types.js +76 -0
  384. package/dist/core/types.js.map +1 -0
  385. package/dist/core/unified/errors.d.ts +189 -0
  386. package/dist/core/unified/errors.d.ts.map +1 -0
  387. package/dist/core/unified/errors.js +497 -0
  388. package/dist/core/unified/errors.js.map +1 -0
  389. package/dist/core/unified/index.d.ts +19 -0
  390. package/dist/core/unified/index.d.ts.map +1 -0
  391. package/dist/core/unified/index.js +68 -0
  392. package/dist/core/unified/index.js.map +1 -0
  393. package/dist/core/unified/schema.d.ts +101 -0
  394. package/dist/core/unified/schema.d.ts.map +1 -0
  395. package/dist/core/unified/schema.js +350 -0
  396. package/dist/core/unified/schema.js.map +1 -0
  397. package/dist/core/unified/toolRuntime.d.ts +179 -0
  398. package/dist/core/unified/toolRuntime.d.ts.map +1 -0
  399. package/dist/core/unified/toolRuntime.js +517 -0
  400. package/dist/core/unified/toolRuntime.js.map +1 -0
  401. package/dist/core/unified/tools.d.ts +127 -0
  402. package/dist/core/unified/tools.d.ts.map +1 -0
  403. package/dist/core/unified/tools.js +1333 -0
  404. package/dist/core/unified/tools.js.map +1 -0
  405. package/dist/core/unified/types.d.ts +352 -0
  406. package/dist/core/unified/types.d.ts.map +1 -0
  407. package/dist/core/unified/types.js +12 -0
  408. package/dist/core/unified/types.js.map +1 -0
  409. package/dist/core/unified/version.d.ts +209 -0
  410. package/dist/core/unified/version.d.ts.map +1 -0
  411. package/dist/core/unified/version.js +454 -0
  412. package/dist/core/unified/version.js.map +1 -0
  413. package/dist/core/validationRunner.d.ts +93 -0
  414. package/dist/core/validationRunner.d.ts.map +1 -0
  415. package/dist/core/validationRunner.js +740 -0
  416. package/dist/core/validationRunner.js.map +1 -0
  417. package/dist/headless/headlessApp.d.ts +5 -0
  418. package/dist/headless/headlessApp.d.ts.map +1 -0
  419. package/dist/headless/headlessApp.js +189 -0
  420. package/dist/headless/headlessApp.js.map +1 -0
  421. package/dist/intelligence/codeIntelligence.d.ts +84 -0
  422. package/dist/intelligence/codeIntelligence.d.ts.map +1 -0
  423. package/dist/intelligence/codeIntelligence.js +493 -0
  424. package/dist/intelligence/codeIntelligence.js.map +1 -0
  425. package/dist/intelligence/docGenerator.d.ts +86 -0
  426. package/dist/intelligence/docGenerator.d.ts.map +1 -0
  427. package/dist/intelligence/docGenerator.js +564 -0
  428. package/dist/intelligence/docGenerator.js.map +1 -0
  429. package/dist/intelligence/index.d.ts +51 -0
  430. package/dist/intelligence/index.d.ts.map +1 -0
  431. package/dist/intelligence/index.js +253 -0
  432. package/dist/intelligence/index.js.map +1 -0
  433. package/dist/intelligence/refactoring.d.ts +50 -0
  434. package/dist/intelligence/refactoring.d.ts.map +1 -0
  435. package/dist/intelligence/refactoring.js +354 -0
  436. package/dist/intelligence/refactoring.js.map +1 -0
  437. package/dist/intelligence/testGenerator.d.ts +74 -0
  438. package/dist/intelligence/testGenerator.d.ts.map +1 -0
  439. package/dist/intelligence/testGenerator.js +483 -0
  440. package/dist/intelligence/testGenerator.js.map +1 -0
  441. package/dist/mcp/config.d.ts +8 -0
  442. package/dist/mcp/config.d.ts.map +1 -0
  443. package/dist/mcp/config.js +252 -0
  444. package/dist/mcp/config.js.map +1 -0
  445. package/dist/mcp/sseClient.d.ts +34 -0
  446. package/dist/mcp/sseClient.d.ts.map +1 -0
  447. package/dist/mcp/sseClient.js +299 -0
  448. package/dist/mcp/sseClient.js.map +1 -0
  449. package/dist/mcp/stdioClient.d.ts +24 -0
  450. package/dist/mcp/stdioClient.d.ts.map +1 -0
  451. package/dist/mcp/stdioClient.js +179 -0
  452. package/dist/mcp/stdioClient.js.map +1 -0
  453. package/dist/mcp/toolBridge.d.ts +12 -0
  454. package/dist/mcp/toolBridge.d.ts.map +1 -0
  455. package/dist/mcp/toolBridge.js +117 -0
  456. package/dist/mcp/toolBridge.js.map +1 -0
  457. package/dist/mcp/types.d.ts +60 -0
  458. package/dist/mcp/types.d.ts.map +1 -0
  459. package/dist/mcp/types.js +2 -0
  460. package/dist/mcp/types.js.map +1 -0
  461. package/dist/plugins/index.d.ts +49 -0
  462. package/dist/plugins/index.d.ts.map +1 -0
  463. package/dist/plugins/index.js +114 -0
  464. package/dist/plugins/index.js.map +1 -0
  465. package/dist/plugins/providers/anthropic/index.d.ts +11 -0
  466. package/dist/plugins/providers/anthropic/index.d.ts.map +1 -0
  467. package/dist/plugins/providers/anthropic/index.js +38 -0
  468. package/dist/plugins/providers/anthropic/index.js.map +1 -0
  469. package/dist/plugins/providers/deepseek/index.d.ts +11 -0
  470. package/dist/plugins/providers/deepseek/index.d.ts.map +1 -0
  471. package/dist/plugins/providers/deepseek/index.js +52 -0
  472. package/dist/plugins/providers/deepseek/index.js.map +1 -0
  473. package/dist/plugins/providers/google/index.d.ts +11 -0
  474. package/dist/plugins/providers/google/index.d.ts.map +1 -0
  475. package/dist/plugins/providers/google/index.js +40 -0
  476. package/dist/plugins/providers/google/index.js.map +1 -0
  477. package/dist/plugins/providers/index.d.ts +2 -0
  478. package/dist/plugins/providers/index.d.ts.map +1 -0
  479. package/dist/plugins/providers/index.js +20 -0
  480. package/dist/plugins/providers/index.js.map +1 -0
  481. package/dist/plugins/providers/ollama/index.d.ts +21 -0
  482. package/dist/plugins/providers/ollama/index.d.ts.map +1 -0
  483. package/dist/plugins/providers/ollama/index.js +69 -0
  484. package/dist/plugins/providers/ollama/index.js.map +1 -0
  485. package/dist/plugins/providers/openai/index.d.ts +12 -0
  486. package/dist/plugins/providers/openai/index.d.ts.map +1 -0
  487. package/dist/plugins/providers/openai/index.js +39 -0
  488. package/dist/plugins/providers/openai/index.js.map +1 -0
  489. package/dist/plugins/providers/xai/index.d.ts +11 -0
  490. package/dist/plugins/providers/xai/index.d.ts.map +1 -0
  491. package/dist/plugins/providers/xai/index.js +39 -0
  492. package/dist/plugins/providers/xai/index.js.map +1 -0
  493. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts +3 -0
  494. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.d.ts.map +1 -0
  495. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js +9 -0
  496. package/dist/plugins/tools/agentSpawning/agentSpawningPlugin.js.map +1 -0
  497. package/dist/plugins/tools/bash/localBashPlugin.d.ts +3 -0
  498. package/dist/plugins/tools/bash/localBashPlugin.d.ts.map +1 -0
  499. package/dist/plugins/tools/bash/localBashPlugin.js +14 -0
  500. package/dist/plugins/tools/bash/localBashPlugin.js.map +1 -0
  501. package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts +14 -0
  502. package/dist/plugins/tools/browser/browserAutomationPlugin.d.ts.map +1 -0
  503. package/dist/plugins/tools/browser/browserAutomationPlugin.js +26 -0
  504. package/dist/plugins/tools/browser/browserAutomationPlugin.js.map +1 -0
  505. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts +3 -0
  506. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts.map +1 -0
  507. package/dist/plugins/tools/checks/localRepoChecksPlugin.js +14 -0
  508. package/dist/plugins/tools/checks/localRepoChecksPlugin.js.map +1 -0
  509. package/dist/plugins/tools/cloud/cloudPlugin.d.ts +3 -0
  510. package/dist/plugins/tools/cloud/cloudPlugin.d.ts.map +1 -0
  511. package/dist/plugins/tools/cloud/cloudPlugin.js +14 -0
  512. package/dist/plugins/tools/cloud/cloudPlugin.js.map +1 -0
  513. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts +3 -0
  514. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts.map +1 -0
  515. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +14 -0
  516. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js.map +1 -0
  517. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts +3 -0
  518. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts.map +1 -0
  519. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js +14 -0
  520. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js.map +1 -0
  521. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts +3 -0
  522. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts.map +1 -0
  523. package/dist/plugins/tools/dependency/dependencyPlugin.js +12 -0
  524. package/dist/plugins/tools/dependency/dependencyPlugin.js.map +1 -0
  525. package/dist/plugins/tools/development/devPlugin.d.ts +3 -0
  526. package/dist/plugins/tools/development/devPlugin.d.ts.map +1 -0
  527. package/dist/plugins/tools/development/devPlugin.js +14 -0
  528. package/dist/plugins/tools/development/devPlugin.js.map +1 -0
  529. package/dist/plugins/tools/edit/editPlugin.d.ts +9 -0
  530. package/dist/plugins/tools/edit/editPlugin.d.ts.map +1 -0
  531. package/dist/plugins/tools/edit/editPlugin.js +15 -0
  532. package/dist/plugins/tools/edit/editPlugin.js.map +1 -0
  533. package/dist/plugins/tools/email/emailPlugin.d.ts +3 -0
  534. package/dist/plugins/tools/email/emailPlugin.d.ts.map +1 -0
  535. package/dist/plugins/tools/email/emailPlugin.js +12 -0
  536. package/dist/plugins/tools/email/emailPlugin.js.map +1 -0
  537. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts +3 -0
  538. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.d.ts.map +1 -0
  539. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js +9 -0
  540. package/dist/plugins/tools/enhancedGit/enhancedGitPlugin.js.map +1 -0
  541. package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts +3 -0
  542. package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts.map +1 -0
  543. package/dist/plugins/tools/filesystem/localFilesystemPlugin.js +14 -0
  544. package/dist/plugins/tools/filesystem/localFilesystemPlugin.js.map +1 -0
  545. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts +3 -0
  546. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.d.ts.map +1 -0
  547. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js +14 -0
  548. package/dist/plugins/tools/frontendTesting/frontendTestingPlugin.js.map +1 -0
  549. package/dist/plugins/tools/glob/globPlugin.d.ts +9 -0
  550. package/dist/plugins/tools/glob/globPlugin.d.ts.map +1 -0
  551. package/dist/plugins/tools/glob/globPlugin.js +15 -0
  552. package/dist/plugins/tools/glob/globPlugin.js.map +1 -0
  553. package/dist/plugins/tools/index.d.ts +3 -0
  554. package/dist/plugins/tools/index.d.ts.map +1 -0
  555. package/dist/plugins/tools/index.js +3 -0
  556. package/dist/plugins/tools/index.js.map +1 -0
  557. package/dist/plugins/tools/interaction/interactionPlugin.d.ts +3 -0
  558. package/dist/plugins/tools/interaction/interactionPlugin.d.ts.map +1 -0
  559. package/dist/plugins/tools/interaction/interactionPlugin.js +12 -0
  560. package/dist/plugins/tools/interaction/interactionPlugin.js.map +1 -0
  561. package/dist/plugins/tools/learn/learnPlugin.d.ts +3 -0
  562. package/dist/plugins/tools/learn/learnPlugin.d.ts.map +1 -0
  563. package/dist/plugins/tools/learn/learnPlugin.js +14 -0
  564. package/dist/plugins/tools/learn/learnPlugin.js.map +1 -0
  565. package/dist/plugins/tools/mcp/mcpPlugin.d.ts +3 -0
  566. package/dist/plugins/tools/mcp/mcpPlugin.d.ts.map +1 -0
  567. package/dist/plugins/tools/mcp/mcpPlugin.js +9 -0
  568. package/dist/plugins/tools/mcp/mcpPlugin.js.map +1 -0
  569. package/dist/plugins/tools/nodeDefaults.d.ts +2 -0
  570. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -0
  571. package/dist/plugins/tools/nodeDefaults.js +63 -0
  572. package/dist/plugins/tools/nodeDefaults.js.map +1 -0
  573. package/dist/plugins/tools/notebook/notebookPlugin.d.ts +9 -0
  574. package/dist/plugins/tools/notebook/notebookPlugin.d.ts.map +1 -0
  575. package/dist/plugins/tools/notebook/notebookPlugin.js +15 -0
  576. package/dist/plugins/tools/notebook/notebookPlugin.js.map +1 -0
  577. package/dist/plugins/tools/planning/planningPlugin.d.ts +9 -0
  578. package/dist/plugins/tools/planning/planningPlugin.d.ts.map +1 -0
  579. package/dist/plugins/tools/planning/planningPlugin.js +15 -0
  580. package/dist/plugins/tools/planning/planningPlugin.js.map +1 -0
  581. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts +3 -0
  582. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts.map +1 -0
  583. package/dist/plugins/tools/refactoring/refactoringPlugin.js +12 -0
  584. package/dist/plugins/tools/refactoring/refactoringPlugin.js.map +1 -0
  585. package/dist/plugins/tools/registry.d.ts +22 -0
  586. package/dist/plugins/tools/registry.d.ts.map +1 -0
  587. package/dist/plugins/tools/registry.js +58 -0
  588. package/dist/plugins/tools/registry.js.map +1 -0
  589. package/dist/plugins/tools/search/localSearchPlugin.d.ts +3 -0
  590. package/dist/plugins/tools/search/localSearchPlugin.d.ts.map +1 -0
  591. package/dist/plugins/tools/search/localSearchPlugin.js +14 -0
  592. package/dist/plugins/tools/search/localSearchPlugin.js.map +1 -0
  593. package/dist/plugins/tools/skills/skillPlugin.d.ts +3 -0
  594. package/dist/plugins/tools/skills/skillPlugin.d.ts.map +1 -0
  595. package/dist/plugins/tools/skills/skillPlugin.js +9 -0
  596. package/dist/plugins/tools/skills/skillPlugin.js.map +1 -0
  597. package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts +3 -0
  598. package/dist/plugins/tools/taskManagement/taskManagementPlugin.d.ts.map +1 -0
  599. package/dist/plugins/tools/taskManagement/taskManagementPlugin.js +12 -0
  600. package/dist/plugins/tools/taskManagement/taskManagementPlugin.js.map +1 -0
  601. package/dist/plugins/tools/testing/testingPlugin.d.ts +3 -0
  602. package/dist/plugins/tools/testing/testingPlugin.d.ts.map +1 -0
  603. package/dist/plugins/tools/testing/testingPlugin.js +12 -0
  604. package/dist/plugins/tools/testing/testingPlugin.js.map +1 -0
  605. package/dist/plugins/tools/validation/validationPlugin.d.ts +3 -0
  606. package/dist/plugins/tools/validation/validationPlugin.d.ts.map +1 -0
  607. package/dist/plugins/tools/validation/validationPlugin.js +14 -0
  608. package/dist/plugins/tools/validation/validationPlugin.js.map +1 -0
  609. package/dist/plugins/tools/web/webPlugin.d.ts +3 -0
  610. package/dist/plugins/tools/web/webPlugin.d.ts.map +1 -0
  611. package/dist/plugins/tools/web/webPlugin.js +12 -0
  612. package/dist/plugins/tools/web/webPlugin.js.map +1 -0
  613. package/dist/providers/anthropicProvider.d.ts +41 -0
  614. package/dist/providers/anthropicProvider.d.ts.map +1 -0
  615. package/dist/providers/anthropicProvider.js +446 -0
  616. package/dist/providers/anthropicProvider.js.map +1 -0
  617. package/dist/providers/googleProvider.d.ts +36 -0
  618. package/dist/providers/googleProvider.d.ts.map +1 -0
  619. package/dist/providers/googleProvider.js +312 -0
  620. package/dist/providers/googleProvider.js.map +1 -0
  621. package/dist/providers/openaiChatCompletionsProvider.d.ts +43 -0
  622. package/dist/providers/openaiChatCompletionsProvider.d.ts.map +1 -0
  623. package/dist/providers/openaiChatCompletionsProvider.js +468 -0
  624. package/dist/providers/openaiChatCompletionsProvider.js.map +1 -0
  625. package/dist/providers/openaiResponsesProvider.d.ts +38 -0
  626. package/dist/providers/openaiResponsesProvider.d.ts.map +1 -0
  627. package/dist/providers/openaiResponsesProvider.js +364 -0
  628. package/dist/providers/openaiResponsesProvider.js.map +1 -0
  629. package/dist/providers/providerFactory.d.ts +18 -0
  630. package/dist/providers/providerFactory.d.ts.map +1 -0
  631. package/dist/providers/providerFactory.js +25 -0
  632. package/dist/providers/providerFactory.js.map +1 -0
  633. package/dist/providers/resilientProvider.d.ts +94 -0
  634. package/dist/providers/resilientProvider.d.ts.map +1 -0
  635. package/dist/providers/resilientProvider.js +370 -0
  636. package/dist/providers/resilientProvider.js.map +1 -0
  637. package/dist/runtime/agentController.d.ts +65 -0
  638. package/dist/runtime/agentController.d.ts.map +1 -0
  639. package/dist/runtime/agentController.js +353 -0
  640. package/dist/runtime/agentController.js.map +1 -0
  641. package/dist/runtime/agentHost.d.ts +61 -0
  642. package/dist/runtime/agentHost.d.ts.map +1 -0
  643. package/dist/runtime/agentHost.js +156 -0
  644. package/dist/runtime/agentHost.js.map +1 -0
  645. package/dist/runtime/agentSession.d.ts +40 -0
  646. package/dist/runtime/agentSession.d.ts.map +1 -0
  647. package/dist/runtime/agentSession.js +206 -0
  648. package/dist/runtime/agentSession.js.map +1 -0
  649. package/dist/runtime/browser.d.ts +7 -0
  650. package/dist/runtime/browser.d.ts.map +1 -0
  651. package/dist/runtime/browser.js +10 -0
  652. package/dist/runtime/browser.js.map +1 -0
  653. package/dist/runtime/cloud.d.ts +7 -0
  654. package/dist/runtime/cloud.d.ts.map +1 -0
  655. package/dist/runtime/cloud.js +10 -0
  656. package/dist/runtime/cloud.js.map +1 -0
  657. package/dist/runtime/node.d.ts +8 -0
  658. package/dist/runtime/node.d.ts.map +1 -0
  659. package/dist/runtime/node.js +11 -0
  660. package/dist/runtime/node.js.map +1 -0
  661. package/dist/runtime/universal.d.ts +21 -0
  662. package/dist/runtime/universal.d.ts.map +1 -0
  663. package/dist/runtime/universal.js +29 -0
  664. package/dist/runtime/universal.js.map +1 -0
  665. package/dist/security/active-stack-security.d.ts +112 -0
  666. package/dist/security/active-stack-security.d.ts.map +1 -0
  667. package/dist/security/active-stack-security.js +296 -0
  668. package/dist/security/active-stack-security.js.map +1 -0
  669. package/dist/security/advanced-persistence-research.d.ts +92 -0
  670. package/dist/security/advanced-persistence-research.d.ts.map +1 -0
  671. package/dist/security/advanced-persistence-research.js +195 -0
  672. package/dist/security/advanced-persistence-research.js.map +1 -0
  673. package/dist/security/advanced-targeting.d.ts +119 -0
  674. package/dist/security/advanced-targeting.d.ts.map +1 -0
  675. package/dist/security/advanced-targeting.js +233 -0
  676. package/dist/security/advanced-targeting.js.map +1 -0
  677. package/dist/security/assessment/vulnerabilityAssessment.d.ts +104 -0
  678. package/dist/security/assessment/vulnerabilityAssessment.d.ts.map +1 -0
  679. package/dist/security/assessment/vulnerabilityAssessment.js +315 -0
  680. package/dist/security/assessment/vulnerabilityAssessment.js.map +1 -0
  681. package/dist/security/authorization/securityAuthorization.d.ts +88 -0
  682. package/dist/security/authorization/securityAuthorization.d.ts.map +1 -0
  683. package/dist/security/authorization/securityAuthorization.js +172 -0
  684. package/dist/security/authorization/securityAuthorization.js.map +1 -0
  685. package/dist/security/comprehensive-targeting.d.ts +85 -0
  686. package/dist/security/comprehensive-targeting.d.ts.map +1 -0
  687. package/dist/security/comprehensive-targeting.js +438 -0
  688. package/dist/security/comprehensive-targeting.js.map +1 -0
  689. package/dist/security/global-security-integration.d.ts +91 -0
  690. package/dist/security/global-security-integration.d.ts.map +1 -0
  691. package/dist/security/global-security-integration.js +218 -0
  692. package/dist/security/global-security-integration.js.map +1 -0
  693. package/dist/security/index.d.ts +38 -0
  694. package/dist/security/index.d.ts.map +1 -0
  695. package/dist/security/index.js +47 -0
  696. package/dist/security/index.js.map +1 -0
  697. package/dist/security/persistence-analyzer.d.ts +56 -0
  698. package/dist/security/persistence-analyzer.d.ts.map +1 -0
  699. package/dist/security/persistence-analyzer.js +187 -0
  700. package/dist/security/persistence-analyzer.js.map +1 -0
  701. package/dist/security/persistence-cli.d.ts +36 -0
  702. package/dist/security/persistence-cli.d.ts.map +1 -0
  703. package/dist/security/persistence-cli.js +160 -0
  704. package/dist/security/persistence-cli.js.map +1 -0
  705. package/dist/security/persistence-research.d.ts +92 -0
  706. package/dist/security/persistence-research.d.ts.map +1 -0
  707. package/dist/security/persistence-research.js +364 -0
  708. package/dist/security/persistence-research.js.map +1 -0
  709. package/dist/security/research/persistenceResearch.d.ts +97 -0
  710. package/dist/security/research/persistenceResearch.d.ts.map +1 -0
  711. package/dist/security/research/persistenceResearch.js +282 -0
  712. package/dist/security/research/persistenceResearch.js.map +1 -0
  713. package/dist/security/security-integration.d.ts +74 -0
  714. package/dist/security/security-integration.d.ts.map +1 -0
  715. package/dist/security/security-integration.js +137 -0
  716. package/dist/security/security-integration.js.map +1 -0
  717. package/dist/security/security-testing-framework.d.ts +112 -0
  718. package/dist/security/security-testing-framework.d.ts.map +1 -0
  719. package/dist/security/security-testing-framework.js +364 -0
  720. package/dist/security/security-testing-framework.js.map +1 -0
  721. package/dist/security/simulation/attackSimulation.d.ts +93 -0
  722. package/dist/security/simulation/attackSimulation.d.ts.map +1 -0
  723. package/dist/security/simulation/attackSimulation.js +341 -0
  724. package/dist/security/simulation/attackSimulation.js.map +1 -0
  725. package/dist/security/strategic-operations.d.ts +100 -0
  726. package/dist/security/strategic-operations.d.ts.map +1 -0
  727. package/dist/security/strategic-operations.js +276 -0
  728. package/dist/security/strategic-operations.js.map +1 -0
  729. package/dist/security/tool-security-wrapper.d.ts +58 -0
  730. package/dist/security/tool-security-wrapper.d.ts.map +1 -0
  731. package/dist/security/tool-security-wrapper.js +156 -0
  732. package/dist/security/tool-security-wrapper.js.map +1 -0
  733. package/dist/shell/autoExecutor.d.ts +70 -0
  734. package/dist/shell/autoExecutor.d.ts.map +1 -0
  735. package/dist/shell/autoExecutor.js +288 -0
  736. package/dist/shell/autoExecutor.js.map +1 -0
  737. package/dist/shell/claudeCodeStreamHandler.d.ts +145 -0
  738. package/dist/shell/claudeCodeStreamHandler.d.ts.map +1 -0
  739. package/dist/shell/claudeCodeStreamHandler.js +312 -0
  740. package/dist/shell/claudeCodeStreamHandler.js.map +1 -0
  741. package/dist/shell/composableMessage.d.ts +183 -0
  742. package/dist/shell/composableMessage.d.ts.map +1 -0
  743. package/dist/shell/composableMessage.js +420 -0
  744. package/dist/shell/composableMessage.js.map +1 -0
  745. package/dist/shell/fileChangeTracker.d.ts +39 -0
  746. package/dist/shell/fileChangeTracker.d.ts.map +1 -0
  747. package/dist/shell/fileChangeTracker.js +64 -0
  748. package/dist/shell/fileChangeTracker.js.map +1 -0
  749. package/dist/shell/inputQueueManager.d.ts +144 -0
  750. package/dist/shell/inputQueueManager.d.ts.map +1 -0
  751. package/dist/shell/inputQueueManager.js +290 -0
  752. package/dist/shell/inputQueueManager.js.map +1 -0
  753. package/dist/shell/interactiveShell.d.ts +321 -0
  754. package/dist/shell/interactiveShell.d.ts.map +1 -0
  755. package/dist/shell/interactiveShell.js +3339 -0
  756. package/dist/shell/interactiveShell.js.map +1 -0
  757. package/dist/shell/liveStatus.d.ts +29 -0
  758. package/dist/shell/liveStatus.d.ts.map +1 -0
  759. package/dist/shell/liveStatus.js +77 -0
  760. package/dist/shell/liveStatus.js.map +1 -0
  761. package/dist/shell/shellApp.d.ts +19 -0
  762. package/dist/shell/shellApp.d.ts.map +1 -0
  763. package/dist/shell/shellApp.js +364 -0
  764. package/dist/shell/shellApp.js.map +1 -0
  765. package/dist/shell/streamingOutputManager.d.ts +114 -0
  766. package/dist/shell/streamingOutputManager.d.ts.map +1 -0
  767. package/dist/shell/streamingOutputManager.js +213 -0
  768. package/dist/shell/streamingOutputManager.js.map +1 -0
  769. package/dist/shell/systemPrompt.d.ts +3 -0
  770. package/dist/shell/systemPrompt.d.ts.map +1 -0
  771. package/dist/shell/systemPrompt.js +78 -0
  772. package/dist/shell/systemPrompt.js.map +1 -0
  773. package/dist/shell/taskCompletionDetector.d.ts +106 -0
  774. package/dist/shell/taskCompletionDetector.d.ts.map +1 -0
  775. package/dist/shell/taskCompletionDetector.js +402 -0
  776. package/dist/shell/taskCompletionDetector.js.map +1 -0
  777. package/dist/shell/terminalInput.d.ts +222 -0
  778. package/dist/shell/terminalInput.d.ts.map +1 -0
  779. package/dist/shell/terminalInput.js +1089 -0
  780. package/dist/shell/terminalInput.js.map +1 -0
  781. package/dist/shell/terminalInputAdapter.d.ts +121 -0
  782. package/dist/shell/terminalInputAdapter.d.ts.map +1 -0
  783. package/dist/shell/terminalInputAdapter.js +223 -0
  784. package/dist/shell/terminalInputAdapter.js.map +1 -0
  785. package/dist/shell/updateManager.d.ts +2 -0
  786. package/dist/shell/updateManager.d.ts.map +1 -0
  787. package/dist/shell/updateManager.js +111 -0
  788. package/dist/shell/updateManager.js.map +1 -0
  789. package/dist/skills/skillRepository.d.ts +103 -0
  790. package/dist/skills/skillRepository.d.ts.map +1 -0
  791. package/dist/skills/skillRepository.js +237 -0
  792. package/dist/skills/skillRepository.js.map +1 -0
  793. package/dist/skills/types.d.ts +37 -0
  794. package/dist/skills/types.d.ts.map +1 -0
  795. package/dist/skills/types.js +2 -0
  796. package/dist/skills/types.js.map +1 -0
  797. package/dist/subagents/taskRunner.d.ts +23 -0
  798. package/dist/subagents/taskRunner.d.ts.map +1 -0
  799. package/dist/subagents/taskRunner.js +271 -0
  800. package/dist/subagents/taskRunner.js.map +1 -0
  801. package/dist/tools/advancedTestGenerationTools.d.ts +21 -0
  802. package/dist/tools/advancedTestGenerationTools.d.ts.map +1 -0
  803. package/dist/tools/advancedTestGenerationTools.js +301 -0
  804. package/dist/tools/advancedTestGenerationTools.js.map +1 -0
  805. package/dist/tools/backgroundBashTools.d.ts +21 -0
  806. package/dist/tools/backgroundBashTools.d.ts.map +1 -0
  807. package/dist/tools/backgroundBashTools.js +215 -0
  808. package/dist/tools/backgroundBashTools.js.map +1 -0
  809. package/dist/tools/bashTools.d.ts +8 -0
  810. package/dist/tools/bashTools.d.ts.map +1 -0
  811. package/dist/tools/bashTools.js +227 -0
  812. package/dist/tools/bashTools.js.map +1 -0
  813. package/dist/tools/browserAutomationTools.d.ts +23 -0
  814. package/dist/tools/browserAutomationTools.d.ts.map +1 -0
  815. package/dist/tools/browserAutomationTools.js +916 -0
  816. package/dist/tools/browserAutomationTools.js.map +1 -0
  817. package/dist/tools/cloudTools.d.ts +49 -0
  818. package/dist/tools/cloudTools.d.ts.map +1 -0
  819. package/dist/tools/cloudTools.js +1258 -0
  820. package/dist/tools/cloudTools.js.map +1 -0
  821. package/dist/tools/code-quality-dashboard.d.ts +57 -0
  822. package/dist/tools/code-quality-dashboard.d.ts.map +1 -0
  823. package/dist/tools/code-quality-dashboard.js +218 -0
  824. package/dist/tools/code-quality-dashboard.js.map +1 -0
  825. package/dist/tools/codeAnalysisTools.d.ts +74 -0
  826. package/dist/tools/codeAnalysisTools.d.ts.map +1 -0
  827. package/dist/tools/codeAnalysisTools.js +664 -0
  828. package/dist/tools/codeAnalysisTools.js.map +1 -0
  829. package/dist/tools/codeGenerationTools.d.ts +3 -0
  830. package/dist/tools/codeGenerationTools.d.ts.map +1 -0
  831. package/dist/tools/codeGenerationTools.js +439 -0
  832. package/dist/tools/codeGenerationTools.js.map +1 -0
  833. package/dist/tools/codeQualityTools.d.ts +3 -0
  834. package/dist/tools/codeQualityTools.d.ts.map +1 -0
  835. package/dist/tools/codeQualityTools.js +296 -0
  836. package/dist/tools/codeQualityTools.js.map +1 -0
  837. package/dist/tools/dependencyTools.d.ts +3 -0
  838. package/dist/tools/dependencyTools.d.ts.map +1 -0
  839. package/dist/tools/dependencyTools.js +283 -0
  840. package/dist/tools/dependencyTools.js.map +1 -0
  841. package/dist/tools/devTools.d.ts +10 -0
  842. package/dist/tools/devTools.d.ts.map +1 -0
  843. package/dist/tools/devTools.js +2305 -0
  844. package/dist/tools/devTools.js.map +1 -0
  845. package/dist/tools/diffUtils.d.ts +36 -0
  846. package/dist/tools/diffUtils.d.ts.map +1 -0
  847. package/dist/tools/diffUtils.js +528 -0
  848. package/dist/tools/diffUtils.js.map +1 -0
  849. package/dist/tools/editTools.d.ts +29 -0
  850. package/dist/tools/editTools.d.ts.map +1 -0
  851. package/dist/tools/editTools.js +419 -0
  852. package/dist/tools/editTools.js.map +1 -0
  853. package/dist/tools/emailTools.d.ts +21 -0
  854. package/dist/tools/emailTools.d.ts.map +1 -0
  855. package/dist/tools/emailTools.js +449 -0
  856. package/dist/tools/emailTools.js.map +1 -0
  857. package/dist/tools/enhancedCodeIntelligenceTools.d.ts +27 -0
  858. package/dist/tools/enhancedCodeIntelligenceTools.d.ts.map +1 -0
  859. package/dist/tools/enhancedCodeIntelligenceTools.js +418 -0
  860. package/dist/tools/enhancedCodeIntelligenceTools.js.map +1 -0
  861. package/dist/tools/enhancedDevWorkflowTools.d.ts +15 -0
  862. package/dist/tools/enhancedDevWorkflowTools.d.ts.map +1 -0
  863. package/dist/tools/enhancedDevWorkflowTools.js +303 -0
  864. package/dist/tools/enhancedDevWorkflowTools.js.map +1 -0
  865. package/dist/tools/fileTools.d.ts +3 -0
  866. package/dist/tools/fileTools.d.ts.map +1 -0
  867. package/dist/tools/fileTools.js +252 -0
  868. package/dist/tools/fileTools.js.map +1 -0
  869. package/dist/tools/frontendTestingTools.d.ts +35 -0
  870. package/dist/tools/frontendTestingTools.d.ts.map +1 -0
  871. package/dist/tools/frontendTestingTools.js +1254 -0
  872. package/dist/tools/frontendTestingTools.js.map +1 -0
  873. package/dist/tools/globTools.d.ts +15 -0
  874. package/dist/tools/globTools.d.ts.map +1 -0
  875. package/dist/tools/globTools.js +174 -0
  876. package/dist/tools/globTools.js.map +1 -0
  877. package/dist/tools/grepTools.d.ts +19 -0
  878. package/dist/tools/grepTools.d.ts.map +1 -0
  879. package/dist/tools/grepTools.js +339 -0
  880. package/dist/tools/grepTools.js.map +1 -0
  881. package/dist/tools/interactionTools.d.ts +13 -0
  882. package/dist/tools/interactionTools.d.ts.map +1 -0
  883. package/dist/tools/interactionTools.js +171 -0
  884. package/dist/tools/interactionTools.js.map +1 -0
  885. package/dist/tools/learnTools.d.ts +152 -0
  886. package/dist/tools/learnTools.d.ts.map +1 -0
  887. package/dist/tools/learnTools.js +1819 -0
  888. package/dist/tools/learnTools.js.map +1 -0
  889. package/dist/tools/notebookEditTools.d.ts +15 -0
  890. package/dist/tools/notebookEditTools.d.ts.map +1 -0
  891. package/dist/tools/notebookEditTools.js +197 -0
  892. package/dist/tools/notebookEditTools.js.map +1 -0
  893. package/dist/tools/planningTools.d.ts +12 -0
  894. package/dist/tools/planningTools.d.ts.map +1 -0
  895. package/dist/tools/planningTools.js +95 -0
  896. package/dist/tools/planningTools.js.map +1 -0
  897. package/dist/tools/refactoringTools.d.ts +3 -0
  898. package/dist/tools/refactoringTools.d.ts.map +1 -0
  899. package/dist/tools/refactoringTools.js +294 -0
  900. package/dist/tools/refactoringTools.js.map +1 -0
  901. package/dist/tools/repoChecksTools.d.ts +3 -0
  902. package/dist/tools/repoChecksTools.d.ts.map +1 -0
  903. package/dist/tools/repoChecksTools.js +161 -0
  904. package/dist/tools/repoChecksTools.js.map +1 -0
  905. package/dist/tools/searchTools.d.ts +3 -0
  906. package/dist/tools/searchTools.d.ts.map +1 -0
  907. package/dist/tools/searchTools.js +207 -0
  908. package/dist/tools/searchTools.js.map +1 -0
  909. package/dist/tools/skillTools.d.ts +8 -0
  910. package/dist/tools/skillTools.d.ts.map +1 -0
  911. package/dist/tools/skillTools.js +178 -0
  912. package/dist/tools/skillTools.js.map +1 -0
  913. package/dist/tools/softwareEngineeringTools.d.ts +7 -0
  914. package/dist/tools/softwareEngineeringTools.d.ts.map +1 -0
  915. package/dist/tools/softwareEngineeringTools.js +338 -0
  916. package/dist/tools/softwareEngineeringTools.js.map +1 -0
  917. package/dist/tools/taskManagementTools.d.ts +10 -0
  918. package/dist/tools/taskManagementTools.d.ts.map +1 -0
  919. package/dist/tools/taskManagementTools.js +157 -0
  920. package/dist/tools/taskManagementTools.js.map +1 -0
  921. package/dist/tools/testingTools.d.ts +3 -0
  922. package/dist/tools/testingTools.d.ts.map +1 -0
  923. package/dist/tools/testingTools.js +233 -0
  924. package/dist/tools/testingTools.js.map +1 -0
  925. package/dist/tools/validationTools.d.ts +7 -0
  926. package/dist/tools/validationTools.d.ts.map +1 -0
  927. package/dist/tools/validationTools.js +278 -0
  928. package/dist/tools/validationTools.js.map +1 -0
  929. package/dist/tools/webTools.d.ts +3 -0
  930. package/dist/tools/webTools.d.ts.map +1 -0
  931. package/dist/tools/webTools.js +495 -0
  932. package/dist/tools/webTools.js.map +1 -0
  933. package/dist/ui/FixedInputArea.d.ts +108 -0
  934. package/dist/ui/FixedInputArea.d.ts.map +1 -0
  935. package/dist/ui/FixedInputArea.js +312 -0
  936. package/dist/ui/FixedInputArea.js.map +1 -0
  937. package/dist/ui/ShellUIAdapter.d.ts +141 -0
  938. package/dist/ui/ShellUIAdapter.d.ts.map +1 -0
  939. package/dist/ui/ShellUIAdapter.js +680 -0
  940. package/dist/ui/ShellUIAdapter.js.map +1 -0
  941. package/dist/ui/UnifiedUIController.d.ts +70 -0
  942. package/dist/ui/UnifiedUIController.d.ts.map +1 -0
  943. package/dist/ui/UnifiedUIController.js +190 -0
  944. package/dist/ui/UnifiedUIController.js.map +1 -0
  945. package/dist/ui/advancedTheme.d.ts +246 -0
  946. package/dist/ui/advancedTheme.d.ts.map +1 -0
  947. package/dist/ui/advancedTheme.js +478 -0
  948. package/dist/ui/advancedTheme.js.map +1 -0
  949. package/dist/ui/animation/AnimationScheduler.d.ts +192 -0
  950. package/dist/ui/animation/AnimationScheduler.d.ts.map +1 -0
  951. package/dist/ui/animation/AnimationScheduler.js +432 -0
  952. package/dist/ui/animation/AnimationScheduler.js.map +1 -0
  953. package/dist/ui/codeHighlighter.d.ts +6 -0
  954. package/dist/ui/codeHighlighter.d.ts.map +1 -0
  955. package/dist/ui/codeHighlighter.js +855 -0
  956. package/dist/ui/codeHighlighter.js.map +1 -0
  957. package/dist/ui/collapsibleContent.d.ts +57 -0
  958. package/dist/ui/collapsibleContent.d.ts.map +1 -0
  959. package/dist/ui/collapsibleContent.js +106 -0
  960. package/dist/ui/collapsibleContent.js.map +1 -0
  961. package/dist/ui/designSystem.d.ts +26 -0
  962. package/dist/ui/designSystem.d.ts.map +1 -0
  963. package/dist/ui/designSystem.js +122 -0
  964. package/dist/ui/designSystem.js.map +1 -0
  965. package/dist/ui/diffViewer.d.ts +42 -0
  966. package/dist/ui/diffViewer.d.ts.map +1 -0
  967. package/dist/ui/diffViewer.js +343 -0
  968. package/dist/ui/diffViewer.js.map +1 -0
  969. package/dist/ui/display.d.ts +251 -0
  970. package/dist/ui/display.d.ts.map +1 -0
  971. package/dist/ui/display.js +1170 -0
  972. package/dist/ui/display.js.map +1 -0
  973. package/dist/ui/errorFormatter.d.ts +54 -0
  974. package/dist/ui/errorFormatter.d.ts.map +1 -0
  975. package/dist/ui/errorFormatter.js +251 -0
  976. package/dist/ui/errorFormatter.js.map +1 -0
  977. package/dist/ui/gitDisplay.d.ts +45 -0
  978. package/dist/ui/gitDisplay.d.ts.map +1 -0
  979. package/dist/ui/gitDisplay.js +215 -0
  980. package/dist/ui/gitDisplay.js.map +1 -0
  981. package/dist/ui/gitFormatter.d.ts +29 -0
  982. package/dist/ui/gitFormatter.d.ts.map +1 -0
  983. package/dist/ui/gitFormatter.js +203 -0
  984. package/dist/ui/gitFormatter.js.map +1 -0
  985. package/dist/ui/interrupts/InterruptManager.d.ts +142 -0
  986. package/dist/ui/interrupts/InterruptManager.d.ts.map +1 -0
  987. package/dist/ui/interrupts/InterruptManager.js +439 -0
  988. package/dist/ui/interrupts/InterruptManager.js.map +1 -0
  989. package/dist/ui/keyboardShortcuts.d.ts +49 -0
  990. package/dist/ui/keyboardShortcuts.d.ts.map +1 -0
  991. package/dist/ui/keyboardShortcuts.js +128 -0
  992. package/dist/ui/keyboardShortcuts.js.map +1 -0
  993. package/dist/ui/layout.d.ts +17 -0
  994. package/dist/ui/layout.d.ts.map +1 -0
  995. package/dist/ui/layout.js +140 -0
  996. package/dist/ui/layout.js.map +1 -0
  997. package/dist/ui/logFormatter.d.ts +70 -0
  998. package/dist/ui/logFormatter.d.ts.map +1 -0
  999. package/dist/ui/logFormatter.js +323 -0
  1000. package/dist/ui/logFormatter.js.map +1 -0
  1001. package/dist/ui/orchestration/StatusOrchestrator.d.ts +156 -0
  1002. package/dist/ui/orchestration/StatusOrchestrator.d.ts.map +1 -0
  1003. package/dist/ui/orchestration/StatusOrchestrator.js +406 -0
  1004. package/dist/ui/orchestration/StatusOrchestrator.js.map +1 -0
  1005. package/dist/ui/outputMode.d.ts +22 -0
  1006. package/dist/ui/outputMode.d.ts.map +1 -0
  1007. package/dist/ui/outputMode.js +40 -0
  1008. package/dist/ui/outputMode.js.map +1 -0
  1009. package/dist/ui/outputSummarizer.d.ts +52 -0
  1010. package/dist/ui/outputSummarizer.d.ts.map +1 -0
  1011. package/dist/ui/outputSummarizer.js +242 -0
  1012. package/dist/ui/outputSummarizer.js.map +1 -0
  1013. package/dist/ui/progressBar.d.ts +51 -0
  1014. package/dist/ui/progressBar.d.ts.map +1 -0
  1015. package/dist/ui/progressBar.js +153 -0
  1016. package/dist/ui/progressBar.js.map +1 -0
  1017. package/dist/ui/progressIndicator.d.ts +69 -0
  1018. package/dist/ui/progressIndicator.d.ts.map +1 -0
  1019. package/dist/ui/progressIndicator.js +145 -0
  1020. package/dist/ui/progressIndicator.js.map +1 -0
  1021. package/dist/ui/richText.d.ts +6 -0
  1022. package/dist/ui/richText.d.ts.map +1 -0
  1023. package/dist/ui/richText.js +391 -0
  1024. package/dist/ui/richText.js.map +1 -0
  1025. package/dist/ui/shortcutsHelp.d.ts +23 -0
  1026. package/dist/ui/shortcutsHelp.d.ts.map +1 -0
  1027. package/dist/ui/shortcutsHelp.js +89 -0
  1028. package/dist/ui/shortcutsHelp.js.map +1 -0
  1029. package/dist/ui/streamingIndicators.d.ts +42 -0
  1030. package/dist/ui/streamingIndicators.d.ts.map +1 -0
  1031. package/dist/ui/streamingIndicators.js +155 -0
  1032. package/dist/ui/streamingIndicators.js.map +1 -0
  1033. package/dist/ui/tableFormatter.d.ts +31 -0
  1034. package/dist/ui/tableFormatter.d.ts.map +1 -0
  1035. package/dist/ui/tableFormatter.js +186 -0
  1036. package/dist/ui/tableFormatter.js.map +1 -0
  1037. package/dist/ui/telemetry/UITelemetry.d.ts +181 -0
  1038. package/dist/ui/telemetry/UITelemetry.d.ts.map +1 -0
  1039. package/dist/ui/telemetry/UITelemetry.js +446 -0
  1040. package/dist/ui/telemetry/UITelemetry.js.map +1 -0
  1041. package/dist/ui/textHighlighter.d.ts +83 -0
  1042. package/dist/ui/textHighlighter.d.ts.map +1 -0
  1043. package/dist/ui/textHighlighter.js +267 -0
  1044. package/dist/ui/textHighlighter.js.map +1 -0
  1045. package/dist/ui/theme.d.ts +103 -0
  1046. package/dist/ui/theme.d.ts.map +1 -0
  1047. package/dist/ui/theme.js +128 -0
  1048. package/dist/ui/theme.js.map +1 -0
  1049. package/dist/ui/thinkingTracker.d.ts +51 -0
  1050. package/dist/ui/thinkingTracker.d.ts.map +1 -0
  1051. package/dist/ui/thinkingTracker.js +115 -0
  1052. package/dist/ui/thinkingTracker.js.map +1 -0
  1053. package/dist/ui/toolDisplay.d.ts +151 -0
  1054. package/dist/ui/toolDisplay.d.ts.map +1 -0
  1055. package/dist/ui/toolDisplay.js +1355 -0
  1056. package/dist/ui/toolDisplay.js.map +1 -0
  1057. package/dist/ui/toolDisplayAdapter.d.ts +66 -0
  1058. package/dist/ui/toolDisplayAdapter.d.ts.map +1 -0
  1059. package/dist/ui/toolDisplayAdapter.js +356 -0
  1060. package/dist/ui/toolDisplayAdapter.js.map +1 -0
  1061. package/dist/ui/treeVisualizer.d.ts +56 -0
  1062. package/dist/ui/treeVisualizer.d.ts.map +1 -0
  1063. package/dist/ui/treeVisualizer.js +247 -0
  1064. package/dist/ui/treeVisualizer.js.map +1 -0
  1065. package/dist/utils/asyncUtils.d.ts +95 -0
  1066. package/dist/utils/asyncUtils.d.ts.map +1 -0
  1067. package/dist/utils/asyncUtils.js +286 -0
  1068. package/dist/utils/asyncUtils.js.map +1 -0
  1069. package/dist/utils/errorUtils.d.ts +16 -0
  1070. package/dist/utils/errorUtils.d.ts.map +1 -0
  1071. package/dist/utils/errorUtils.js +66 -0
  1072. package/dist/utils/errorUtils.js.map +1 -0
  1073. package/dist/utils/planFormatter.d.ts +34 -0
  1074. package/dist/utils/planFormatter.d.ts.map +1 -0
  1075. package/dist/utils/planFormatter.js +140 -0
  1076. package/dist/utils/planFormatter.js.map +1 -0
  1077. package/dist/workspace.d.ts +8 -0
  1078. package/dist/workspace.d.ts.map +1 -0
  1079. package/dist/workspace.js +107 -0
  1080. package/dist/workspace.js.map +1 -0
  1081. package/dist/workspace.validator.d.ts +49 -0
  1082. package/dist/workspace.validator.d.ts.map +1 -0
  1083. package/dist/workspace.validator.js +214 -0
  1084. package/dist/workspace.validator.js.map +1 -0
  1085. package/package.json +2 -2
@@ -0,0 +1,2305 @@
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