erosolar-cli 1.7.54 → 1.7.56

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 (283) hide show
  1. package/dist/core/agent.d.ts.map +1 -1
  2. package/dist/core/agent.js +14 -4
  3. package/dist/core/agent.js.map +1 -1
  4. package/dist/providers/anthropicProvider.d.ts.map +1 -1
  5. package/dist/providers/anthropicProvider.js +2 -1
  6. package/dist/providers/anthropicProvider.js.map +1 -1
  7. package/dist/ui/persistentPrompt.d.ts +24 -0
  8. package/dist/ui/persistentPrompt.d.ts.map +1 -1
  9. package/dist/ui/persistentPrompt.js +86 -4
  10. package/dist/ui/persistentPrompt.js.map +1 -1
  11. package/package.json +1 -1
  12. package/dist/active-stack-security.d.ts +0 -110
  13. package/dist/active-stack-security.js +0 -313
  14. package/dist/active-stack-security.js.map +0 -1
  15. package/dist/advanced-targeting.d.ts +0 -113
  16. package/dist/advanced-targeting.js +0 -252
  17. package/dist/advanced-targeting.js.map +0 -1
  18. package/dist/bin/adapters/node/index.js +0 -33
  19. package/dist/bin/adapters/types.js +0 -1
  20. package/dist/bin/alpha-zero/agentWrapper.js +0 -165
  21. package/dist/bin/alpha-zero/codeEvaluator.js +0 -272
  22. package/dist/bin/alpha-zero/competitiveRunner.js +0 -219
  23. package/dist/bin/alpha-zero/index.js +0 -98
  24. package/dist/bin/alpha-zero/introspection.js +0 -298
  25. package/dist/bin/alpha-zero/metricsTracker.js +0 -207
  26. package/dist/bin/alpha-zero/security/core.js +0 -269
  27. package/dist/bin/alpha-zero/security/google.js +0 -308
  28. package/dist/bin/alpha-zero/security/googleLoader.js +0 -40
  29. package/dist/bin/alpha-zero/security/index.js +0 -31
  30. package/dist/bin/alpha-zero/security/simulation.js +0 -274
  31. package/dist/bin/alpha-zero/selfModification.js +0 -231
  32. package/dist/bin/alpha-zero/types.js +0 -30
  33. package/dist/bin/bin/erosolar-optimized.js +0 -205
  34. package/dist/bin/capabilities/agentSpawningCapability.js +0 -116
  35. package/dist/bin/capabilities/bashCapability.js +0 -22
  36. package/dist/bin/capabilities/cloudCapability.js +0 -36
  37. package/dist/bin/capabilities/codeAnalysisCapability.js +0 -22
  38. package/dist/bin/capabilities/codeQualityCapability.js +0 -23
  39. package/dist/bin/capabilities/dependencySecurityCapability.js +0 -22
  40. package/dist/bin/capabilities/devCapability.js +0 -22
  41. package/dist/bin/capabilities/editCapability.js +0 -28
  42. package/dist/bin/capabilities/emailCapability.js +0 -20
  43. package/dist/bin/capabilities/enhancedGitCapability.js +0 -221
  44. package/dist/bin/capabilities/filesystemCapability.js +0 -22
  45. package/dist/bin/capabilities/globCapability.js +0 -28
  46. package/dist/bin/capabilities/interactionCapability.js +0 -20
  47. package/dist/bin/capabilities/learnCapability.js +0 -22
  48. package/dist/bin/capabilities/mcpCapability.js +0 -20
  49. package/dist/bin/capabilities/notebookCapability.js +0 -28
  50. package/dist/bin/capabilities/planningCapability.js +0 -27
  51. package/dist/bin/capabilities/refactoringCapability.js +0 -23
  52. package/dist/bin/capabilities/repoChecksCapability.js +0 -22
  53. package/dist/bin/capabilities/searchCapability.js +0 -22
  54. package/dist/bin/capabilities/skillCapability.js +0 -76
  55. package/dist/bin/capabilities/taskManagementCapability.js +0 -20
  56. package/dist/bin/capabilities/testingCapability.js +0 -23
  57. package/dist/bin/capabilities/toolManifest.js +0 -159
  58. package/dist/bin/capabilities/toolRegistry.js +0 -114
  59. package/dist/bin/capabilities/webCapability.js +0 -20
  60. package/dist/bin/config.js +0 -139
  61. package/dist/bin/contracts/v1/agent.js +0 -7
  62. package/dist/bin/contracts/v1/agentProfileManifest.js +0 -8
  63. package/dist/bin/contracts/v1/agentRules.js +0 -9
  64. package/dist/bin/contracts/v1/toolAccess.js +0 -8
  65. package/dist/bin/erosolar-optimized.d.ts +0 -12
  66. package/dist/bin/erosolar-optimized.d.ts.map +0 -1
  67. package/dist/bin/erosolar-optimized.js +0 -239
  68. package/dist/bin/erosolar-optimized.js.map +0 -1
  69. package/dist/bin/headless/headlessApp.js +0 -172
  70. package/dist/bin/mcp/config.js +0 -202
  71. package/dist/bin/mcp/stdioClient.js +0 -172
  72. package/dist/bin/mcp/toolBridge.js +0 -104
  73. package/dist/bin/mcp/types.js +0 -1
  74. package/dist/bin/plugins/index.js +0 -113
  75. package/dist/bin/plugins/providers/anthropic/index.js +0 -25
  76. package/dist/bin/plugins/providers/deepseek/index.js +0 -24
  77. package/dist/bin/plugins/providers/google/index.js +0 -26
  78. package/dist/bin/plugins/providers/index.js +0 -19
  79. package/dist/bin/plugins/providers/ollama/index.js +0 -59
  80. package/dist/bin/plugins/providers/openai/index.js +0 -26
  81. package/dist/bin/plugins/providers/xai/index.js +0 -24
  82. package/dist/bin/plugins/tools/agentSpawning/agentSpawningPlugin.js +0 -8
  83. package/dist/bin/plugins/tools/bash/localBashPlugin.js +0 -13
  84. package/dist/bin/plugins/tools/checks/localRepoChecksPlugin.js +0 -13
  85. package/dist/bin/plugins/tools/cloud/cloudPlugin.js +0 -13
  86. package/dist/bin/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +0 -13
  87. package/dist/bin/plugins/tools/codeQuality/codeQualityPlugin.js +0 -13
  88. package/dist/bin/plugins/tools/dependency/dependencyPlugin.js +0 -11
  89. package/dist/bin/plugins/tools/development/devPlugin.js +0 -13
  90. package/dist/bin/plugins/tools/edit/editPlugin.js +0 -14
  91. package/dist/bin/plugins/tools/email/emailPlugin.js +0 -11
  92. package/dist/bin/plugins/tools/enhancedGit/enhancedGitPlugin.js +0 -8
  93. package/dist/bin/plugins/tools/filesystem/localFilesystemPlugin.js +0 -13
  94. package/dist/bin/plugins/tools/glob/globPlugin.js +0 -14
  95. package/dist/bin/plugins/tools/index.js +0 -2
  96. package/dist/bin/plugins/tools/interaction/interactionPlugin.js +0 -11
  97. package/dist/bin/plugins/tools/learn/learnPlugin.js +0 -13
  98. package/dist/bin/plugins/tools/mcp/mcpPlugin.js +0 -8
  99. package/dist/bin/plugins/tools/nodeDefaults.js +0 -56
  100. package/dist/bin/plugins/tools/notebook/notebookPlugin.js +0 -14
  101. package/dist/bin/plugins/tools/planning/planningPlugin.js +0 -14
  102. package/dist/bin/plugins/tools/refactoring/refactoringPlugin.js +0 -11
  103. package/dist/bin/plugins/tools/registry.js +0 -57
  104. package/dist/bin/plugins/tools/search/localSearchPlugin.js +0 -13
  105. package/dist/bin/plugins/tools/skills/skillPlugin.js +0 -8
  106. package/dist/bin/plugins/tools/taskManagement/taskManagementPlugin.js +0 -11
  107. package/dist/bin/plugins/tools/testing/testingPlugin.js +0 -11
  108. package/dist/bin/plugins/tools/web/webPlugin.js +0 -11
  109. package/dist/bin/providers/anthropicProvider.js +0 -329
  110. package/dist/bin/providers/googleProvider.js +0 -203
  111. package/dist/bin/providers/openaiChatCompletionsProvider.js +0 -208
  112. package/dist/bin/providers/openaiResponsesProvider.js +0 -249
  113. package/dist/bin/providers/providerFactory.js +0 -24
  114. package/dist/bin/runtime/agentController.js +0 -321
  115. package/dist/bin/runtime/agentHost.js +0 -153
  116. package/dist/bin/runtime/agentSession.js +0 -195
  117. package/dist/bin/runtime/node.js +0 -10
  118. package/dist/bin/runtime/universal.js +0 -28
  119. package/dist/bin/skills/skillRepository.js +0 -236
  120. package/dist/bin/skills/types.js +0 -1
  121. package/dist/bin/subagents/taskRunner.js +0 -269
  122. package/dist/bin/tools/backgroundBashTools.js +0 -211
  123. package/dist/bin/tools/bashTools.js +0 -159
  124. package/dist/bin/tools/cloudTools.js +0 -864
  125. package/dist/bin/tools/codeAnalysisTools.js +0 -641
  126. package/dist/bin/tools/codeQualityTools.js +0 -294
  127. package/dist/bin/tools/dependencyTools.js +0 -282
  128. package/dist/bin/tools/devTools.js +0 -238
  129. package/dist/bin/tools/diffUtils.js +0 -137
  130. package/dist/bin/tools/editTools.js +0 -134
  131. package/dist/bin/tools/emailTools.js +0 -448
  132. package/dist/bin/tools/fileTools.js +0 -282
  133. package/dist/bin/tools/globTools.js +0 -173
  134. package/dist/bin/tools/grepTools.js +0 -332
  135. package/dist/bin/tools/interactionTools.js +0 -170
  136. package/dist/bin/tools/learnTools.js +0 -1818
  137. package/dist/bin/tools/notebookEditTools.js +0 -196
  138. package/dist/bin/tools/planningTools.js +0 -46
  139. package/dist/bin/tools/refactoringTools.js +0 -293
  140. package/dist/bin/tools/repoChecksTools.js +0 -160
  141. package/dist/bin/tools/searchTools.js +0 -206
  142. package/dist/bin/tools/skillTools.js +0 -177
  143. package/dist/bin/tools/taskManagementTools.js +0 -156
  144. package/dist/bin/tools/testingTools.js +0 -232
  145. package/dist/bin/tools/webTools.js +0 -480
  146. package/dist/bin/workspace.js +0 -106
  147. package/dist/bin/workspace.validator.js +0 -213
  148. package/dist/capabilities/offensiveSecurityCapability.d.ts +0 -26
  149. package/dist/capabilities/offensiveSecurityCapability.d.ts.map +0 -1
  150. package/dist/capabilities/offensiveSecurityCapability.js +0 -58
  151. package/dist/capabilities/offensiveSecurityCapability.js.map +0 -1
  152. package/dist/capabilities/realSecurityCapability.d.ts +0 -26
  153. package/dist/capabilities/realSecurityCapability.d.ts.map +0 -1
  154. package/dist/capabilities/realSecurityCapability.js +0 -53
  155. package/dist/capabilities/realSecurityCapability.js.map +0 -1
  156. package/dist/capabilities/securityCapability.d.ts +0 -32
  157. package/dist/capabilities/securityCapability.d.ts.map +0 -1
  158. package/dist/capabilities/securityCapability.js +0 -57
  159. package/dist/capabilities/securityCapability.js.map +0 -1
  160. package/dist/capabilities/ultimateSecurityCapability.d.ts +0 -42
  161. package/dist/capabilities/ultimateSecurityCapability.d.ts.map +0 -1
  162. package/dist/capabilities/ultimateSecurityCapability.js +0 -96
  163. package/dist/capabilities/ultimateSecurityCapability.js.map +0 -1
  164. package/dist/core/designThoughtCheck.d.ts +0 -196
  165. package/dist/core/designThoughtCheck.d.ts.map +0 -1
  166. package/dist/core/designThoughtCheck.js +0 -287
  167. package/dist/core/designThoughtCheck.js.map +0 -1
  168. package/dist/core/designThoughtCheckEngine.d.ts +0 -58
  169. package/dist/core/designThoughtCheckEngine.d.ts.map +0 -1
  170. package/dist/core/designThoughtCheckEngine.js +0 -358
  171. package/dist/core/designThoughtCheckEngine.js.map +0 -1
  172. package/dist/core/designThoughtCheckIntegration.d.ts +0 -103
  173. package/dist/core/designThoughtCheckIntegration.d.ts.map +0 -1
  174. package/dist/core/designThoughtCheckIntegration.js +0 -207
  175. package/dist/core/designThoughtCheckIntegration.js.map +0 -1
  176. package/dist/core/intelligenceTools.d.ts +0 -19
  177. package/dist/core/intelligenceTools.d.ts.map +0 -1
  178. package/dist/core/intelligenceTools.js +0 -453
  179. package/dist/core/intelligenceTools.js.map +0 -1
  180. package/dist/core/operationalTools.d.ts +0 -19
  181. package/dist/core/operationalTools.d.ts.map +0 -1
  182. package/dist/core/operationalTools.js +0 -467
  183. package/dist/core/operationalTools.js.map +0 -1
  184. package/dist/offensive/core/offensive-engine.d.ts +0 -171
  185. package/dist/offensive/core/offensive-engine.d.ts.map +0 -1
  186. package/dist/offensive/core/offensive-engine.js +0 -345
  187. package/dist/offensive/core/offensive-engine.js.map +0 -1
  188. package/dist/offensive/core/offensive-integration.d.ts +0 -129
  189. package/dist/offensive/core/offensive-integration.d.ts.map +0 -1
  190. package/dist/offensive/core/offensive-integration.js +0 -364
  191. package/dist/offensive/core/offensive-integration.js.map +0 -1
  192. package/dist/offensive/core/offensive-tools.d.ts +0 -55
  193. package/dist/offensive/core/offensive-tools.d.ts.map +0 -1
  194. package/dist/offensive/core/offensive-tools.js +0 -438
  195. package/dist/offensive/core/offensive-tools.js.map +0 -1
  196. package/dist/offensive/offensive-cli.d.ts +0 -48
  197. package/dist/offensive/offensive-cli.d.ts.map +0 -1
  198. package/dist/offensive/offensive-cli.js +0 -233
  199. package/dist/offensive/offensive-cli.js.map +0 -1
  200. package/dist/security/apt-simulation-cli.d.ts +0 -57
  201. package/dist/security/apt-simulation-cli.d.ts.map +0 -1
  202. package/dist/security/apt-simulation-cli.js +0 -278
  203. package/dist/security/apt-simulation-cli.js.map +0 -1
  204. package/dist/security/apt-simulation-engine-complete.d.ts +0 -97
  205. package/dist/security/apt-simulation-engine-complete.d.ts.map +0 -1
  206. package/dist/security/apt-simulation-engine-complete.js +0 -441
  207. package/dist/security/apt-simulation-engine-complete.js.map +0 -1
  208. package/dist/security/apt-simulation-engine.d.ts +0 -97
  209. package/dist/security/apt-simulation-engine.d.ts.map +0 -1
  210. package/dist/security/apt-simulation-engine.js +0 -441
  211. package/dist/security/apt-simulation-engine.js.map +0 -1
  212. package/dist/security/authorization.d.ts +0 -45
  213. package/dist/security/authorization.d.ts.map +0 -1
  214. package/dist/security/authorization.js +0 -128
  215. package/dist/security/authorization.js.map +0 -1
  216. package/dist/security/comprehensive-security-research.d.ts +0 -84
  217. package/dist/security/comprehensive-security-research.d.ts.map +0 -1
  218. package/dist/security/comprehensive-security-research.js +0 -211
  219. package/dist/security/comprehensive-security-research.js.map +0 -1
  220. package/dist/security/offensive/exploitationEngine.d.ts +0 -54
  221. package/dist/security/offensive/exploitationEngine.d.ts.map +0 -1
  222. package/dist/security/offensive/exploitationEngine.js +0 -263
  223. package/dist/security/offensive/exploitationEngine.js.map +0 -1
  224. package/dist/security/real/networkExploitation.d.ts +0 -92
  225. package/dist/security/real/networkExploitation.d.ts.map +0 -1
  226. package/dist/security/real/networkExploitation.js +0 -316
  227. package/dist/security/real/networkExploitation.js.map +0 -1
  228. package/dist/security/real/persistenceImplementation.d.ts +0 -62
  229. package/dist/security/real/persistenceImplementation.d.ts.map +0 -1
  230. package/dist/security/real/persistenceImplementation.js +0 -323
  231. package/dist/security/real/persistenceImplementation.js.map +0 -1
  232. package/dist/security/real/vulnerabilityScanner.d.ts +0 -73
  233. package/dist/security/real/vulnerabilityScanner.d.ts.map +0 -1
  234. package/dist/security/real/vulnerabilityScanner.js +0 -341
  235. package/dist/security/real/vulnerabilityScanner.js.map +0 -1
  236. package/dist/shell/capturePastePatch.d.ts +0 -9
  237. package/dist/shell/capturePastePatch.d.ts.map +0 -1
  238. package/dist/shell/capturePastePatch.js +0 -98
  239. package/dist/shell/capturePastePatch.js.map +0 -1
  240. package/dist/shell/enhancedInteractiveShell.d.ts +0 -90
  241. package/dist/shell/enhancedInteractiveShell.d.ts.map +0 -1
  242. package/dist/shell/enhancedInteractiveShell.js +0 -248
  243. package/dist/shell/enhancedInteractiveShell.js.map +0 -1
  244. package/dist/shell/inputProcessor.d.ts +0 -56
  245. package/dist/shell/inputProcessor.d.ts.map +0 -1
  246. package/dist/shell/inputProcessor.js +0 -172
  247. package/dist/shell/inputProcessor.js.map +0 -1
  248. package/dist/shell/interactiveShell-patch.d.ts +0 -27
  249. package/dist/shell/interactiveShell-patch.d.ts.map +0 -1
  250. package/dist/shell/interactiveShell-patch.js +0 -38
  251. package/dist/shell/interactiveShell-patch.js.map +0 -1
  252. package/dist/shell/interactiveShell-robust.d.ts +0 -26
  253. package/dist/shell/interactiveShell-robust.d.ts.map +0 -1
  254. package/dist/shell/interactiveShell-robust.js +0 -34
  255. package/dist/shell/interactiveShell-robust.js.map +0 -1
  256. package/dist/shell/multiLinePasteManager.d.ts +0 -106
  257. package/dist/shell/multiLinePasteManager.d.ts.map +0 -1
  258. package/dist/shell/multiLinePasteManager.js +0 -308
  259. package/dist/shell/multiLinePasteManager.js.map +0 -1
  260. package/dist/shell/processInputBlockPatch.d.ts +0 -8
  261. package/dist/shell/processInputBlockPatch.d.ts.map +0 -1
  262. package/dist/shell/processInputBlockPatch.js +0 -133
  263. package/dist/shell/processInputBlockPatch.js.map +0 -1
  264. package/dist/shell/unifiedInputProcessor.d.ts +0 -22
  265. package/dist/shell/unifiedInputProcessor.d.ts.map +0 -1
  266. package/dist/shell/unifiedInputProcessor.js +0 -78
  267. package/dist/shell/unifiedInputProcessor.js.map +0 -1
  268. package/dist/tools/enhancedSecurityTools.d.ts +0 -19
  269. package/dist/tools/enhancedSecurityTools.d.ts.map +0 -1
  270. package/dist/tools/enhancedSecurityTools.js +0 -215
  271. package/dist/tools/enhancedSecurityTools.js.map +0 -1
  272. package/dist/tools/offensiveSecurityTools.d.ts +0 -16
  273. package/dist/tools/offensiveSecurityTools.d.ts.map +0 -1
  274. package/dist/tools/offensiveSecurityTools.js +0 -285
  275. package/dist/tools/offensiveSecurityTools.js.map +0 -1
  276. package/dist/tools/realSecurityTools.d.ts +0 -18
  277. package/dist/tools/realSecurityTools.d.ts.map +0 -1
  278. package/dist/tools/realSecurityTools.js +0 -468
  279. package/dist/tools/realSecurityTools.js.map +0 -1
  280. package/dist/tools/securityTools.d.ts +0 -20
  281. package/dist/tools/securityTools.d.ts.map +0 -1
  282. package/dist/tools/securityTools.js +0 -449
  283. package/dist/tools/securityTools.js.map +0 -1
@@ -1,221 +0,0 @@
1
- import { exec } from 'node:child_process';
2
- import { promisify } from 'node:util';
3
- const execAsync = promisify(exec);
4
- export class EnhancedGitCapabilityModule {
5
- constructor() {
6
- this.id = 'capability.enhanced-git';
7
- }
8
- async create(context) {
9
- return {
10
- id: 'enhanced-git.tools',
11
- description: 'Enhanced git workflow with smart commits and PR creation',
12
- toolSuite: {
13
- id: 'enhanced-git',
14
- description: 'Advanced git operations including smart commits and PR management',
15
- tools: [
16
- {
17
- name: 'git_smart_commit',
18
- description: `Create intelligent git commits following best practices.
19
-
20
- IMPORTANT: Only create commits when requested by the user. If unclear, ask first.
21
-
22
- Git Safety Protocol:
23
- - NEVER update the git config
24
- - NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them
25
- - NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it
26
- - NEVER run force push to main/master, warn the user if they request it
27
- - Avoid git commit --amend. ONLY use --amend when either (1) user explicitly requested amend OR (2) adding edits from pre-commit hook
28
- - Before amending: ALWAYS check authorship (git log -1 --format='%an %ae')
29
- - NEVER commit changes unless the user explicitly asks you to
30
-
31
- When creating commits:
32
- 1. Run git status and git diff to see all changes
33
- 2. Run git log to see recent commit message style
34
- 3. Analyze changes and draft commit message
35
- 4. Add relevant untracked files to staging area
36
- 5. Create commit with proper message format
37
-
38
- Commit message format:
39
- <subject line>
40
-
41
- <body explaining the changes>
42
-
43
- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
44
-
45
- Co-Authored-By: Claude <noreply@anthropic.com>
46
-
47
- Important notes:
48
- - DO NOT push to remote unless explicitly requested
49
- - NEVER use -i flag (interactive mode not supported)
50
- - If no changes, do not create empty commit
51
- - Always use HEREDOC for commit messages`,
52
- parameters: {
53
- type: 'object',
54
- properties: {
55
- message: {
56
- type: 'string',
57
- description: 'The commit message subject line',
58
- },
59
- body: {
60
- type: 'string',
61
- description: 'Optional commit message body',
62
- },
63
- files: {
64
- type: 'array',
65
- items: { type: 'string' },
66
- description: 'Optional specific files to commit. If not provided, commits all staged changes.',
67
- },
68
- },
69
- required: ['message'],
70
- },
71
- handler: async (args) => {
72
- const { message, body, files } = args;
73
- try {
74
- // Check for changes
75
- const { stdout: statusOutput } = await execAsync('git status --porcelain', {
76
- cwd: context.workingDir,
77
- });
78
- if (!statusOutput.trim()) {
79
- return 'No changes to commit';
80
- }
81
- // Add files
82
- if (files && files.length > 0) {
83
- for (const file of files) {
84
- await execAsync(`git add "${file}"`, { cwd: context.workingDir });
85
- }
86
- }
87
- else {
88
- await execAsync('git add -A', { cwd: context.workingDir });
89
- }
90
- // Build commit message
91
- const fullMessage = this.buildCommitMessage(message, body);
92
- // Create commit
93
- const commitCommand = `git commit -m "$(cat <<'EOF'
94
- ${fullMessage}
95
- EOF
96
- )"`;
97
- const { stdout, stderr } = await execAsync(commitCommand, {
98
- cwd: context.workingDir,
99
- });
100
- return `Commit created successfully:\n\n${stdout}\n${stderr}`;
101
- }
102
- catch (error) {
103
- const message = error instanceof Error ? error.message : String(error);
104
- return `Error creating commit: ${message}`;
105
- }
106
- },
107
- },
108
- {
109
- name: 'git_create_pr',
110
- description: `Create a pull request using gh CLI.
111
-
112
- IMPORTANT: Only create PR when requested by the user.
113
-
114
- Steps for creating PR:
115
- 1. Run git status, git diff, and git log to understand current branch state
116
- 2. Check if branch tracks remote and is up to date
117
- 3. Analyze all commits that will be included in PR
118
- 4. Draft PR summary (not just latest commit, but ALL commits)
119
- 5. Create branch if needed, push with -u flag if needed
120
- 6. Create PR using gh pr create with proper format
121
-
122
- PR body format:
123
- ## Summary
124
- <1-3 bullet points>
125
-
126
- ## Test plan
127
- [Bulleted markdown checklist of TODOs for testing the pull request...]
128
-
129
- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
130
-
131
- Important:
132
- - Return the PR URL when done
133
- - Do not use TodoWrite or Task tools
134
- - Analyze ALL commits, not just the latest one`,
135
- parameters: {
136
- type: 'object',
137
- properties: {
138
- title: {
139
- type: 'string',
140
- description: 'The PR title',
141
- },
142
- body: {
143
- type: 'string',
144
- description: 'The PR body/description',
145
- },
146
- base: {
147
- type: 'string',
148
- description: 'Base branch (defaults to main)',
149
- },
150
- draft: {
151
- type: 'boolean',
152
- description: 'Create as draft PR',
153
- },
154
- },
155
- required: ['title', 'body'],
156
- },
157
- handler: async (args) => {
158
- const { title, body, base = 'main', draft = false } = args;
159
- try {
160
- // Check if gh CLI is available
161
- try {
162
- await execAsync('gh --version', { cwd: context.workingDir });
163
- }
164
- catch {
165
- return 'Error: gh CLI is not installed. Install it from https://cli.github.com/';
166
- }
167
- // Check current branch
168
- const { stdout: branchName } = await execAsync('git rev-parse --abbrev-ref HEAD', {
169
- cwd: context.workingDir,
170
- });
171
- const currentBranch = branchName.trim();
172
- if (currentBranch === base) {
173
- return `Error: Currently on ${base} branch. Create a feature branch first.`;
174
- }
175
- // Push if needed
176
- try {
177
- const { stdout: trackingOutput } = await execAsync('git rev-parse --abbrev-ref --symbolic-full-name @{u}', { cwd: context.workingDir });
178
- if (!trackingOutput.trim()) {
179
- await execAsync(`git push -u origin ${currentBranch}`, {
180
- cwd: context.workingDir,
181
- });
182
- }
183
- }
184
- catch {
185
- // No tracking branch, push with -u
186
- await execAsync(`git push -u origin ${currentBranch}`, {
187
- cwd: context.workingDir,
188
- });
189
- }
190
- // Create PR using heredoc
191
- const draftFlag = draft ? '--draft' : '';
192
- const prCommand = `gh pr create ${draftFlag} --base "${base}" --title "${title}" --body "$(cat <<'EOF'
193
- ${body}
194
- EOF
195
- )"`;
196
- const { stdout } = await execAsync(prCommand, { cwd: context.workingDir });
197
- return `Pull request created successfully:\n\n${stdout}`;
198
- }
199
- catch (error) {
200
- const message = error instanceof Error ? error.message : String(error);
201
- return `Error creating pull request: ${message}`;
202
- }
203
- },
204
- },
205
- ],
206
- },
207
- };
208
- }
209
- buildCommitMessage(subject, body) {
210
- const parts = [subject];
211
- if (body) {
212
- parts.push('');
213
- parts.push(body);
214
- }
215
- parts.push('');
216
- parts.push('🤖 Generated with [Claude Code](https://claude.com/claude-code)');
217
- parts.push('');
218
- parts.push('Co-Authored-By: Claude <noreply@anthropic.com>');
219
- return parts.join('\n');
220
- }
221
- }
@@ -1,22 +0,0 @@
1
- import { createFileTools } from '../tools/fileTools.js';
2
- export class FilesystemCapabilityModule {
3
- constructor(options = {}) {
4
- this.id = 'capability.filesystem';
5
- this.options = options;
6
- }
7
- async create(context) {
8
- const workingDir = this.options.workingDir ?? context.workingDir;
9
- return {
10
- id: this.options.id ?? 'filesystem.tools.local',
11
- description: this.options.description ?? 'Local file system access with deterministic diff summaries.',
12
- toolSuite: {
13
- id: 'fs',
14
- description: 'File operations',
15
- tools: createFileTools(workingDir),
16
- },
17
- metadata: {
18
- workingDir,
19
- },
20
- };
21
- }
22
- }
@@ -1,28 +0,0 @@
1
- import { createGlobTools } from '../tools/globTools.js';
2
- /**
3
- * Glob Capability Module
4
- *
5
- * Provides fast file pattern matching using glob patterns.
6
- * Optimized for large codebases with intelligent directory filtering.
7
- *
8
- * Tools:
9
- * - Glob: Fast pattern matching with modification time sorting
10
- *
11
- * Scope: filesystem:read
12
- */
13
- export class GlobCapabilityModule {
14
- constructor() {
15
- this.id = 'capability.glob';
16
- }
17
- async create(context) {
18
- const tools = createGlobTools(context.workingDir);
19
- return {
20
- id: 'glob.pattern_matching',
21
- description: 'Fast file pattern matching with glob support',
22
- toolSuite: {
23
- id: 'glob',
24
- tools,
25
- },
26
- };
27
- }
28
- }
@@ -1,20 +0,0 @@
1
- import { createInteractionTools } from '../tools/interactionTools.js';
2
- export class InteractionCapabilityModule {
3
- constructor(options = {}) {
4
- this.id = 'capability.interaction';
5
- this.options = options;
6
- }
7
- async create(_context) {
8
- return {
9
- id: this.options.id ?? 'interaction.tools.questions',
10
- description: this.options.description ??
11
- 'Interactive user question and clarification tools for gathering preferences and decisions.',
12
- toolSuite: {
13
- id: 'interaction',
14
- description: 'User interaction and question tools',
15
- tools: createInteractionTools(),
16
- },
17
- metadata: {},
18
- };
19
- }
20
- }
@@ -1,22 +0,0 @@
1
- import { createLearnTools } from '../tools/learnTools.js';
2
- export class LearnCapabilityModule {
3
- constructor(options = {}) {
4
- this.id = 'capability.learn';
5
- this.options = options;
6
- }
7
- async create(context) {
8
- const workingDir = this.options.workingDir ?? context.workingDir;
9
- return {
10
- id: this.options.id ?? 'learn.tools.exploration',
11
- description: this.options.description ?? 'Codebase exploration and learning tools for understanding project structure, patterns, and conventions.',
12
- toolSuite: {
13
- id: 'learn',
14
- description: 'Codebase learning and exploration',
15
- tools: createLearnTools(workingDir),
16
- },
17
- metadata: {
18
- workingDir,
19
- },
20
- };
21
- }
22
- }
@@ -1,20 +0,0 @@
1
- import { McpToolBridge } from '../mcp/toolBridge.js';
2
- export class McpCapabilityModule {
3
- constructor() {
4
- this.id = 'capability.mcp';
5
- }
6
- async create(context) {
7
- const bridge = new McpToolBridge(context);
8
- const suites = await bridge.initialize();
9
- if (!suites.length) {
10
- await bridge.dispose();
11
- return null;
12
- }
13
- return {
14
- id: 'mcp.tools',
15
- description: 'Model Context Protocol connectors declared via .mcp.json files.',
16
- toolSuites: suites,
17
- dispose: () => bridge.dispose(),
18
- };
19
- }
20
- }
@@ -1,28 +0,0 @@
1
- import { createNotebookEditTools } from '../tools/notebookEditTools.js';
2
- /**
3
- * Notebook Capability Module
4
- *
5
- * Provides Jupyter notebook editing capabilities.
6
- * Supports .ipynb files with cell-level operations.
7
- *
8
- * Tools:
9
- * - NotebookEdit: Replace, insert, or delete notebook cells
10
- *
11
- * Scope: filesystem:write, analysis:notebook
12
- */
13
- export class NotebookCapabilityModule {
14
- constructor() {
15
- this.id = 'capability.notebook';
16
- }
17
- async create(context) {
18
- const tools = createNotebookEditTools(context.workingDir);
19
- return {
20
- id: 'notebook.editing',
21
- description: 'Jupyter notebook (.ipynb) editing tools',
22
- toolSuite: {
23
- id: 'notebook',
24
- tools,
25
- },
26
- };
27
- }
28
- }
@@ -1,27 +0,0 @@
1
- import { createPlanningTools } from '../tools/planningTools.js';
2
- /**
3
- * Planning Capability Module
4
- *
5
- * Provides workflow planning and phase management tools.
6
- *
7
- * Tools:
8
- * - ExitPlanMode: Signal completion of planning phase
9
- *
10
- * Scope: planning:workflow
11
- */
12
- export class PlanningCapabilityModule {
13
- constructor() {
14
- this.id = 'capability.planning';
15
- }
16
- async create(_context) {
17
- const tools = createPlanningTools();
18
- return {
19
- id: 'planning.workflow',
20
- description: 'Workflow planning and phase management',
21
- toolSuite: {
22
- id: 'planning',
23
- tools,
24
- },
25
- };
26
- }
27
- }
@@ -1,23 +0,0 @@
1
- import { createRefactoringTools } from '../tools/refactoringTools.js';
2
- export class RefactoringCapabilityModule {
3
- constructor(options = {}) {
4
- this.id = 'capability.refactoring';
5
- this.options = options;
6
- }
7
- async create(context) {
8
- const workingDir = this.options.workingDir ?? context.workingDir;
9
- return {
10
- id: this.options.id ?? 'refactoring.tools.assistant',
11
- description: this.options.description ??
12
- 'Refactoring intelligence including hotspot detection, impact analysis, and actionable plan suggestions.',
13
- toolSuite: {
14
- id: 'refactoring',
15
- description: 'Refactoring assistants',
16
- tools: createRefactoringTools(workingDir),
17
- },
18
- metadata: {
19
- workingDir,
20
- },
21
- };
22
- }
23
- }
@@ -1,22 +0,0 @@
1
- import { createRepoCheckTools } from '../tools/repoChecksTools.js';
2
- export class RepoChecksCapabilityModule {
3
- constructor(options = {}) {
4
- this.id = 'capability.repo_checks';
5
- this.workingDirOverride = options.workingDir;
6
- }
7
- async create(context) {
8
- const workingDir = this.workingDirOverride ?? context.workingDir;
9
- return {
10
- id: 'repo.checks.tools',
11
- description: 'Run repository validation commands (npm test/build/lint) inside the sandbox.',
12
- toolSuite: {
13
- id: 'repo-checks',
14
- description: 'Repository quality checks',
15
- tools: createRepoCheckTools(workingDir),
16
- },
17
- metadata: {
18
- workingDir,
19
- },
20
- };
21
- }
22
- }
@@ -1,22 +0,0 @@
1
- import { createSearchTools } from '../tools/searchTools.js';
2
- export class SearchCapabilityModule {
3
- constructor(options = {}) {
4
- this.id = 'capability.search';
5
- this.options = options;
6
- }
7
- async create(context) {
8
- const workingDir = this.options.workingDir ?? context.workingDir;
9
- return {
10
- id: this.options.id ?? 'search.tools.repo',
11
- description: this.options.description ?? 'Repository-aware search helpers (glob + structural grep).',
12
- toolSuite: {
13
- id: 'search',
14
- description: 'Code search',
15
- tools: createSearchTools(workingDir),
16
- },
17
- metadata: {
18
- workingDir,
19
- },
20
- };
21
- }
22
- }
@@ -1,76 +0,0 @@
1
- import { skillRepository } from '../skills/skillRepository.js';
2
- export const skillCapability = {
3
- id: 'skill',
4
- async create(_context) {
5
- return {
6
- id: 'skills.tools',
7
- description: 'Skill discovery and execution',
8
- toolSuite: {
9
- id: 'skills',
10
- description: 'Skill management tools',
11
- tools: [
12
- {
13
- name: 'list_skills',
14
- description: 'List all available skills',
15
- handler: async () => {
16
- const skills = skillRepository.getAllSkills();
17
- if (skills.length === 0) {
18
- return 'No skills found. Create skill files in the skills directory.';
19
- }
20
- const output = [
21
- `Found ${skills.length} skills:`,
22
- ''
23
- ];
24
- for (const skill of skills) {
25
- output.push(`• ${skill.name} (${skill.id})`);
26
- output.push(` ${skill.description}`);
27
- output.push(` Category: ${skill.category}`);
28
- output.push(` Tags: ${skill.tags.join(', ')}`);
29
- output.push('');
30
- }
31
- return output.join('\n');
32
- }
33
- },
34
- {
35
- name: 'search_skills',
36
- description: 'Search skills by query',
37
- handler: async (args) => {
38
- const query = args?.query || '';
39
- const skills = skillRepository.searchSkills(query);
40
- if (skills.length === 0) {
41
- return `No skills found matching "${query}".`;
42
- }
43
- const output = [
44
- `Found ${skills.length} skills matching "${query}":`,
45
- ''
46
- ];
47
- for (const skill of skills) {
48
- output.push(`• ${skill.name} (${skill.id})`);
49
- output.push(` ${skill.description}`);
50
- output.push('');
51
- }
52
- return output.join('\n');
53
- }
54
- },
55
- {
56
- name: 'execute_skill',
57
- description: 'Execute a specific skill',
58
- handler: async (args) => {
59
- const typedArgs = args;
60
- const skillId = typedArgs?.skill_id;
61
- const input = typedArgs?.input || {};
62
- if (!skillId) {
63
- return 'Error: skill_id is required.';
64
- }
65
- const result = await skillRepository.executeSkill(skillId, input);
66
- if (!result.success) {
67
- return `Error executing skill: ${result.error}`;
68
- }
69
- return `Skill executed successfully in ${result.duration}ms.\n\nOutput:\n${JSON.stringify(result.output, null, 2)}`;
70
- }
71
- }
72
- ]
73
- }
74
- };
75
- }
76
- };
@@ -1,20 +0,0 @@
1
- import { createTaskManagementTools } from '../tools/taskManagementTools.js';
2
- export class TaskManagementCapabilityModule {
3
- constructor(options = {}) {
4
- this.id = 'capability.task-management';
5
- this.options = options;
6
- }
7
- async create(_context) {
8
- return {
9
- id: this.options.id ?? 'task-management.tools.todos',
10
- description: this.options.description ??
11
- 'Task tracking and planning tools for organizing complex multi-step work.',
12
- toolSuite: {
13
- id: 'task-management',
14
- description: 'Task tracking and todo management',
15
- tools: createTaskManagementTools(),
16
- },
17
- metadata: {},
18
- };
19
- }
20
- }
@@ -1,23 +0,0 @@
1
- import { createTestingTools } from '../tools/testingTools.js';
2
- export class TestingCapabilityModule {
3
- constructor(options = {}) {
4
- this.id = 'capability.testing';
5
- this.options = options;
6
- }
7
- async create(context) {
8
- const workingDir = this.options.workingDir ?? context.workingDir;
9
- return {
10
- id: this.options.id ?? 'testing.tools.coverage',
11
- description: this.options.description ??
12
- 'Test generation helpers plus coverage execution and reporting utilities.',
13
- toolSuite: {
14
- id: 'testing',
15
- description: 'Testing and coverage',
16
- tools: createTestingTools(workingDir),
17
- },
18
- metadata: {
19
- workingDir,
20
- },
21
- };
22
- }
23
- }