erosolar-cli 1.0.2 → 1.0.3

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 (418) hide show
  1. package/Agents.md +411 -200
  2. package/README.md +77 -44
  3. package/dist/adapters/browser/index.d.ts +12 -0
  4. package/dist/adapters/browser/index.d.ts.map +1 -0
  5. package/dist/adapters/browser/index.js +1 -0
  6. package/dist/adapters/browser/index.js.map +1 -0
  7. package/dist/adapters/node/index.d.ts +17 -0
  8. package/dist/adapters/node/index.d.ts.map +1 -0
  9. package/dist/adapters/node/index.js +1 -0
  10. package/dist/adapters/node/index.js.map +1 -0
  11. package/dist/adapters/remote/index.d.ts +13 -0
  12. package/dist/adapters/remote/index.d.ts.map +1 -0
  13. package/dist/adapters/remote/index.js +1 -0
  14. package/dist/adapters/remote/index.js.map +1 -0
  15. package/dist/adapters/types.d.ts +14 -0
  16. package/dist/adapters/types.d.ts.map +1 -0
  17. package/dist/adapters/types.js +1 -0
  18. package/dist/adapters/types.js.map +1 -0
  19. package/dist/bin/erosolar.d.ts +3 -0
  20. package/dist/bin/erosolar.d.ts.map +1 -0
  21. package/dist/bin/erosolar.js +1 -0
  22. package/dist/bin/erosolar.js.map +1 -0
  23. package/dist/capabilities/bashCapability.d.ts +13 -0
  24. package/dist/capabilities/bashCapability.d.ts.map +1 -0
  25. package/dist/capabilities/bashCapability.js +1 -0
  26. package/dist/capabilities/bashCapability.js.map +1 -0
  27. package/dist/capabilities/codeAnalysisCapability.d.ts +13 -0
  28. package/dist/capabilities/codeAnalysisCapability.d.ts.map +1 -0
  29. package/dist/capabilities/codeAnalysisCapability.js +24 -0
  30. package/dist/capabilities/codeAnalysisCapability.js.map +1 -0
  31. package/dist/capabilities/codeGenerationCapability.d.ts +13 -0
  32. package/dist/capabilities/codeGenerationCapability.d.ts.map +1 -0
  33. package/dist/capabilities/codeGenerationCapability.js +25 -0
  34. package/dist/capabilities/codeGenerationCapability.js.map +1 -0
  35. package/dist/capabilities/codeQualityCapability.d.ts +13 -0
  36. package/dist/capabilities/codeQualityCapability.d.ts.map +1 -0
  37. package/dist/capabilities/codeQualityCapability.js +25 -0
  38. package/dist/capabilities/codeQualityCapability.js.map +1 -0
  39. package/dist/capabilities/dependencySecurityCapability.d.ts +13 -0
  40. package/dist/capabilities/dependencySecurityCapability.d.ts.map +1 -0
  41. package/dist/capabilities/dependencySecurityCapability.js +24 -0
  42. package/dist/capabilities/dependencySecurityCapability.js.map +1 -0
  43. package/dist/capabilities/devCapability.d.ts +13 -0
  44. package/dist/capabilities/devCapability.d.ts.map +1 -0
  45. package/dist/capabilities/devCapability.js +24 -0
  46. package/dist/capabilities/devCapability.js.map +1 -0
  47. package/dist/capabilities/filesystemCapability.d.ts +13 -0
  48. package/dist/capabilities/filesystemCapability.d.ts.map +1 -0
  49. package/dist/capabilities/filesystemCapability.js +1 -0
  50. package/dist/capabilities/filesystemCapability.js.map +1 -0
  51. package/dist/capabilities/index.d.ts +10 -0
  52. package/dist/capabilities/index.d.ts.map +1 -0
  53. package/dist/capabilities/index.js +7 -0
  54. package/dist/capabilities/index.js.map +1 -0
  55. package/dist/capabilities/refactoringCapability.d.ts +13 -0
  56. package/dist/capabilities/refactoringCapability.d.ts.map +1 -0
  57. package/dist/capabilities/refactoringCapability.js +25 -0
  58. package/dist/capabilities/refactoringCapability.js.map +1 -0
  59. package/dist/capabilities/repoChecksCapability.d.ts +10 -0
  60. package/dist/capabilities/repoChecksCapability.d.ts.map +1 -0
  61. package/dist/capabilities/repoChecksCapability.js +24 -0
  62. package/dist/capabilities/repoChecksCapability.js.map +1 -0
  63. package/dist/capabilities/searchCapability.d.ts +13 -0
  64. package/dist/capabilities/searchCapability.d.ts.map +1 -0
  65. package/dist/capabilities/searchCapability.js +1 -0
  66. package/dist/capabilities/searchCapability.js.map +1 -0
  67. package/dist/capabilities/testingCapability.d.ts +13 -0
  68. package/dist/capabilities/testingCapability.d.ts.map +1 -0
  69. package/dist/capabilities/testingCapability.js +25 -0
  70. package/dist/capabilities/testingCapability.js.map +1 -0
  71. package/dist/capabilities/toolManifest.d.ts +3 -0
  72. package/dist/capabilities/toolManifest.d.ts.map +1 -0
  73. package/dist/capabilities/toolManifest.js +160 -0
  74. package/dist/capabilities/toolManifest.js.map +1 -0
  75. package/dist/capabilities/toolRegistry.d.ts +22 -0
  76. package/dist/capabilities/toolRegistry.d.ts.map +1 -0
  77. package/dist/capabilities/toolRegistry.js +49 -32
  78. package/dist/capabilities/toolRegistry.js.map +1 -0
  79. package/dist/config.d.ts +28 -0
  80. package/dist/config.d.ts.map +1 -0
  81. package/dist/config.js +98 -23
  82. package/dist/config.js.map +1 -0
  83. package/dist/contracts/agent-profiles.schema.json +43 -0
  84. package/dist/contracts/agent-schema.snapshot.json +437 -0
  85. package/dist/contracts/schemas/agent-profile.schema.json +157 -0
  86. package/dist/contracts/schemas/agent-rules.schema.json +238 -0
  87. package/dist/contracts/schemas/agent.schema.json +89 -0
  88. package/dist/contracts/schemas/tool-selection.schema.json +174 -0
  89. package/dist/contracts/tools.schema.json +100 -0
  90. package/dist/contracts/v1/agent.d.ts +147 -0
  91. package/dist/contracts/v1/agent.d.ts.map +1 -0
  92. package/dist/contracts/v1/agent.js +1 -0
  93. package/dist/contracts/v1/agent.js.map +1 -0
  94. package/dist/contracts/v1/agentProfileManifest.d.ts +52 -0
  95. package/dist/contracts/v1/agentProfileManifest.d.ts.map +1 -0
  96. package/dist/contracts/v1/agentProfileManifest.js +9 -0
  97. package/dist/contracts/v1/agentProfileManifest.js.map +1 -0
  98. package/dist/contracts/v1/agentRules.d.ts +60 -0
  99. package/dist/contracts/v1/agentRules.d.ts.map +1 -0
  100. package/dist/contracts/v1/agentRules.js +10 -0
  101. package/dist/contracts/v1/agentRules.js.map +1 -0
  102. package/dist/contracts/v1/provider.d.ts +149 -0
  103. package/dist/contracts/v1/provider.d.ts.map +1 -0
  104. package/dist/contracts/v1/provider.js +1 -0
  105. package/dist/contracts/v1/provider.js.map +1 -0
  106. package/dist/contracts/v1/tool.d.ts +136 -0
  107. package/dist/contracts/v1/tool.d.ts.map +1 -0
  108. package/dist/contracts/v1/tool.js +1 -0
  109. package/dist/contracts/v1/tool.js.map +1 -0
  110. package/dist/contracts/v1/toolAccess.d.ts +43 -0
  111. package/dist/contracts/v1/toolAccess.d.ts.map +1 -0
  112. package/dist/contracts/v1/toolAccess.js +9 -0
  113. package/dist/contracts/v1/toolAccess.js.map +1 -0
  114. package/dist/core/agent.d.ts +35 -0
  115. package/dist/core/agent.d.ts.map +1 -0
  116. package/dist/core/agent.js +17 -9
  117. package/dist/core/agent.js.map +1 -0
  118. package/dist/core/agentProfileManifest.d.ts +3 -0
  119. package/dist/core/agentProfileManifest.d.ts.map +1 -0
  120. package/dist/core/agentProfileManifest.js +176 -0
  121. package/dist/core/agentProfileManifest.js.map +1 -0
  122. package/dist/core/agentProfiles.d.ts +22 -0
  123. package/dist/core/agentProfiles.d.ts.map +1 -0
  124. package/dist/core/agentProfiles.js +1 -0
  125. package/dist/core/agentProfiles.js.map +1 -0
  126. package/dist/core/agentRulebook.d.ts +10 -0
  127. package/dist/core/agentRulebook.d.ts.map +1 -0
  128. package/dist/core/agentRulebook.js +153 -0
  129. package/dist/core/agentRulebook.js.map +1 -0
  130. package/dist/core/agentSchemaSnapshot.d.ts +14 -0
  131. package/dist/core/agentSchemaSnapshot.d.ts.map +1 -0
  132. package/dist/core/agentSchemaSnapshot.js +38 -0
  133. package/dist/core/agentSchemaSnapshot.js.map +1 -0
  134. package/dist/core/agentsDocument.d.ts +4 -0
  135. package/dist/core/agentsDocument.d.ts.map +1 -0
  136. package/dist/core/agentsDocument.js +70 -0
  137. package/dist/core/agentsDocument.js.map +1 -0
  138. package/dist/core/contextWindow.d.ts +6 -0
  139. package/dist/core/contextWindow.d.ts.map +1 -0
  140. package/dist/core/contextWindow.js +1 -0
  141. package/dist/core/contextWindow.js.map +1 -0
  142. package/dist/core/errors/apiKeyErrors.d.ts +11 -0
  143. package/dist/core/errors/apiKeyErrors.d.ts.map +1 -0
  144. package/dist/core/errors/apiKeyErrors.js +1 -0
  145. package/dist/core/errors/apiKeyErrors.js.map +1 -0
  146. package/dist/core/errors.d.ts +4 -0
  147. package/dist/core/errors.d.ts.map +1 -0
  148. package/dist/core/errors.js +33 -0
  149. package/dist/core/errors.js.map +1 -0
  150. package/dist/core/preferences.d.ts +21 -0
  151. package/dist/core/preferences.d.ts.map +1 -0
  152. package/dist/core/preferences.js +13 -7
  153. package/dist/core/preferences.js.map +1 -0
  154. package/dist/core/schemaValidator.d.ts +6 -0
  155. package/dist/core/schemaValidator.d.ts.map +1 -0
  156. package/dist/core/schemaValidator.js +93 -0
  157. package/dist/core/schemaValidator.js.map +1 -0
  158. package/dist/core/secretStore.d.ts +20 -0
  159. package/dist/core/secretStore.d.ts.map +1 -0
  160. package/dist/core/secretStore.js +3 -8
  161. package/dist/core/secretStore.js.map +1 -0
  162. package/dist/core/toolRuntime.d.ts +48 -0
  163. package/dist/core/toolRuntime.d.ts.map +1 -0
  164. package/dist/core/toolRuntime.js +34 -11
  165. package/dist/core/toolRuntime.js.map +1 -0
  166. package/dist/core/types.d.ts +86 -0
  167. package/dist/core/types.d.ts.map +1 -0
  168. package/dist/core/types.js +1 -0
  169. package/dist/core/types.js.map +1 -0
  170. package/dist/plugins/providers/anthropic/index.d.ts +2 -0
  171. package/dist/plugins/providers/anthropic/index.d.ts.map +1 -0
  172. package/dist/plugins/providers/anthropic/index.js +6 -4
  173. package/dist/plugins/providers/anthropic/index.js.map +1 -0
  174. package/dist/plugins/providers/deepseek/index.d.ts +2 -0
  175. package/dist/plugins/providers/deepseek/index.d.ts.map +1 -0
  176. package/dist/plugins/providers/deepseek/index.js +1 -0
  177. package/dist/plugins/providers/deepseek/index.js.map +1 -0
  178. package/dist/plugins/providers/google/index.d.ts +2 -0
  179. package/dist/plugins/providers/google/index.d.ts.map +1 -0
  180. package/dist/plugins/providers/google/index.js +6 -4
  181. package/dist/plugins/providers/google/index.js.map +1 -0
  182. package/dist/plugins/providers/index.d.ts +2 -0
  183. package/dist/plugins/providers/index.d.ts.map +1 -0
  184. package/dist/plugins/providers/index.js +1 -0
  185. package/dist/plugins/providers/index.js.map +1 -0
  186. package/dist/plugins/providers/openai/index.d.ts +3 -0
  187. package/dist/plugins/providers/openai/index.d.ts.map +1 -0
  188. package/dist/plugins/providers/openai/index.js +6 -4
  189. package/dist/plugins/providers/openai/index.js.map +1 -0
  190. package/dist/plugins/providers/xai/index.d.ts +2 -0
  191. package/dist/plugins/providers/xai/index.d.ts.map +1 -0
  192. package/dist/plugins/providers/xai/index.js +1 -0
  193. package/dist/plugins/providers/xai/index.js.map +1 -0
  194. package/dist/plugins/tools/bash/localBashPlugin.d.ts +3 -0
  195. package/dist/plugins/tools/bash/localBashPlugin.d.ts.map +1 -0
  196. package/dist/plugins/tools/bash/localBashPlugin.js +1 -0
  197. package/dist/plugins/tools/bash/localBashPlugin.js.map +1 -0
  198. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts +3 -0
  199. package/dist/plugins/tools/checks/localRepoChecksPlugin.d.ts.map +1 -0
  200. package/dist/plugins/tools/checks/localRepoChecksPlugin.js +14 -0
  201. package/dist/plugins/tools/checks/localRepoChecksPlugin.js.map +1 -0
  202. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts +3 -0
  203. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.d.ts.map +1 -0
  204. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js +14 -0
  205. package/dist/plugins/tools/codeAnalysis/codeAnalysisPlugin.js.map +1 -0
  206. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts +3 -0
  207. package/dist/plugins/tools/codeQuality/codeQualityPlugin.d.ts.map +1 -0
  208. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js +14 -0
  209. package/dist/plugins/tools/codeQuality/codeQualityPlugin.js.map +1 -0
  210. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts +3 -0
  211. package/dist/plugins/tools/dependency/dependencyPlugin.d.ts.map +1 -0
  212. package/dist/plugins/tools/dependency/dependencyPlugin.js +12 -0
  213. package/dist/plugins/tools/dependency/dependencyPlugin.js.map +1 -0
  214. package/dist/plugins/tools/development/devPlugin.d.ts +3 -0
  215. package/dist/plugins/tools/development/devPlugin.d.ts.map +1 -0
  216. package/dist/plugins/tools/development/devPlugin.js +14 -0
  217. package/dist/plugins/tools/development/devPlugin.js.map +1 -0
  218. package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts +3 -0
  219. package/dist/plugins/tools/filesystem/localFilesystemPlugin.d.ts.map +1 -0
  220. package/dist/plugins/tools/filesystem/localFilesystemPlugin.js +1 -0
  221. package/dist/plugins/tools/filesystem/localFilesystemPlugin.js.map +1 -0
  222. package/dist/plugins/tools/index.d.ts +3 -0
  223. package/dist/plugins/tools/index.d.ts.map +1 -0
  224. package/dist/plugins/tools/index.js +1 -0
  225. package/dist/plugins/tools/index.js.map +1 -0
  226. package/dist/plugins/tools/nodeDefaults.d.ts +2 -0
  227. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -0
  228. package/dist/plugins/tools/nodeDefaults.js +15 -2
  229. package/dist/plugins/tools/nodeDefaults.js.map +1 -0
  230. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts +3 -0
  231. package/dist/plugins/tools/refactoring/refactoringPlugin.d.ts.map +1 -0
  232. package/dist/plugins/tools/refactoring/refactoringPlugin.js +12 -0
  233. package/dist/plugins/tools/refactoring/refactoringPlugin.js.map +1 -0
  234. package/dist/plugins/tools/registry.d.ts +22 -0
  235. package/dist/plugins/tools/registry.d.ts.map +1 -0
  236. package/dist/plugins/tools/registry.js +1 -0
  237. package/dist/plugins/tools/registry.js.map +1 -0
  238. package/dist/plugins/tools/search/localSearchPlugin.d.ts +3 -0
  239. package/dist/plugins/tools/search/localSearchPlugin.d.ts.map +1 -0
  240. package/dist/plugins/tools/search/localSearchPlugin.js +1 -0
  241. package/dist/plugins/tools/search/localSearchPlugin.js.map +1 -0
  242. package/dist/plugins/tools/testing/testingPlugin.d.ts +3 -0
  243. package/dist/plugins/tools/testing/testingPlugin.d.ts.map +1 -0
  244. package/dist/plugins/tools/testing/testingPlugin.js +12 -0
  245. package/dist/plugins/tools/testing/testingPlugin.js.map +1 -0
  246. package/dist/providers/anthropicProvider.d.ts +23 -0
  247. package/dist/providers/anthropicProvider.d.ts.map +1 -0
  248. package/dist/providers/anthropicProvider.js +3 -2
  249. package/dist/providers/anthropicProvider.js.map +1 -0
  250. package/dist/providers/googleProvider.d.ts +19 -0
  251. package/dist/providers/googleProvider.d.ts.map +1 -0
  252. package/dist/providers/googleProvider.js +1 -1
  253. package/dist/providers/googleProvider.js.map +1 -0
  254. package/dist/providers/openaiChatCompletionsProvider.d.ts +16 -0
  255. package/dist/providers/openaiChatCompletionsProvider.d.ts.map +1 -0
  256. package/dist/providers/openaiChatCompletionsProvider.js +1 -0
  257. package/dist/providers/openaiChatCompletionsProvider.js.map +1 -0
  258. package/dist/providers/openaiResponsesProvider.d.ts +20 -0
  259. package/dist/providers/openaiResponsesProvider.d.ts.map +1 -0
  260. package/dist/providers/openaiResponsesProvider.js +1 -0
  261. package/dist/providers/openaiResponsesProvider.js.map +1 -0
  262. package/dist/providers/providerFactory.d.ts +18 -0
  263. package/dist/providers/providerFactory.d.ts.map +1 -0
  264. package/dist/providers/providerFactory.js +5 -1
  265. package/dist/providers/providerFactory.js.map +1 -0
  266. package/dist/runtime/agentHost.d.ts +61 -0
  267. package/dist/runtime/agentHost.d.ts.map +1 -0
  268. package/dist/runtime/agentHost.js +5 -1
  269. package/dist/runtime/agentHost.js.map +1 -0
  270. package/dist/runtime/agentSession.d.ts +32 -0
  271. package/dist/runtime/agentSession.d.ts.map +1 -0
  272. package/dist/runtime/agentSession.js +23 -1
  273. package/dist/runtime/agentSession.js.map +1 -0
  274. package/dist/runtime/browser.d.ts +7 -0
  275. package/dist/runtime/browser.d.ts.map +1 -0
  276. package/dist/runtime/browser.js +1 -0
  277. package/dist/runtime/browser.js.map +1 -0
  278. package/dist/runtime/cloud.d.ts +7 -0
  279. package/dist/runtime/cloud.d.ts.map +1 -0
  280. package/dist/runtime/cloud.js +1 -0
  281. package/dist/runtime/cloud.js.map +1 -0
  282. package/dist/runtime/node.d.ts +8 -0
  283. package/dist/runtime/node.d.ts.map +1 -0
  284. package/dist/runtime/node.js +1 -0
  285. package/dist/runtime/node.js.map +1 -0
  286. package/dist/runtime/universal.d.ts +21 -0
  287. package/dist/runtime/universal.d.ts.map +1 -0
  288. package/dist/runtime/universal.js +1 -0
  289. package/dist/runtime/universal.js.map +1 -0
  290. package/dist/shell/bracketedPasteManager.d.ts +23 -0
  291. package/dist/shell/bracketedPasteManager.d.ts.map +1 -0
  292. package/dist/shell/bracketedPasteManager.js +1 -0
  293. package/dist/shell/bracketedPasteManager.js.map +1 -0
  294. package/dist/shell/interactiveShell.d.ts +128 -0
  295. package/dist/shell/interactiveShell.d.ts.map +1 -0
  296. package/dist/shell/interactiveShell.js +264 -146
  297. package/dist/shell/interactiveShell.js.map +1 -0
  298. package/dist/shell/liveStatus.d.ts +33 -0
  299. package/dist/shell/liveStatus.d.ts.map +1 -0
  300. package/dist/shell/liveStatus.js +89 -0
  301. package/dist/shell/liveStatus.js.map +1 -0
  302. package/dist/shell/promptSkin.d.ts +50 -0
  303. package/dist/shell/promptSkin.d.ts.map +1 -0
  304. package/dist/shell/promptSkin.js +380 -0
  305. package/dist/shell/promptSkin.js.map +1 -0
  306. package/dist/shell/shellApp.d.ts +10 -0
  307. package/dist/shell/shellApp.d.ts.map +1 -0
  308. package/dist/shell/shellApp.js +155 -78
  309. package/dist/shell/shellApp.js.map +1 -0
  310. package/dist/shell/systemPrompt.d.ts +3 -0
  311. package/dist/shell/systemPrompt.d.ts.map +1 -0
  312. package/dist/shell/systemPrompt.js +64 -0
  313. package/dist/shell/systemPrompt.js.map +1 -0
  314. package/dist/shell/updateManager.d.ts +2 -0
  315. package/dist/shell/updateManager.d.ts.map +1 -0
  316. package/dist/shell/updateManager.js +109 -0
  317. package/dist/shell/updateManager.js.map +1 -0
  318. package/dist/tools/bashTools.d.ts +8 -0
  319. package/dist/tools/bashTools.d.ts.map +1 -0
  320. package/dist/tools/bashTools.js +18 -15
  321. package/dist/tools/bashTools.js.map +1 -0
  322. package/dist/tools/codeAnalysisTools.d.ts +74 -0
  323. package/dist/tools/codeAnalysisTools.d.ts.map +1 -0
  324. package/dist/tools/codeAnalysisTools.js +642 -0
  325. package/dist/tools/codeAnalysisTools.js.map +1 -0
  326. package/dist/tools/codeGenerationTools.d.ts +3 -0
  327. package/dist/tools/codeGenerationTools.d.ts.map +1 -0
  328. package/dist/tools/codeGenerationTools.js +369 -0
  329. package/dist/tools/codeGenerationTools.js.map +1 -0
  330. package/dist/tools/codeQualityTools.d.ts +3 -0
  331. package/dist/tools/codeQualityTools.d.ts.map +1 -0
  332. package/dist/tools/codeQualityTools.js +295 -0
  333. package/dist/tools/codeQualityTools.js.map +1 -0
  334. package/dist/tools/dependencyTools.d.ts +3 -0
  335. package/dist/tools/dependencyTools.d.ts.map +1 -0
  336. package/dist/tools/dependencyTools.js +283 -0
  337. package/dist/tools/dependencyTools.js.map +1 -0
  338. package/dist/tools/devTools.d.ts +10 -0
  339. package/dist/tools/devTools.d.ts.map +1 -0
  340. package/dist/tools/devTools.js +239 -0
  341. package/dist/tools/devTools.js.map +1 -0
  342. package/dist/tools/diffUtils.d.ts +8 -0
  343. package/dist/tools/diffUtils.d.ts.map +1 -0
  344. package/dist/tools/diffUtils.js +2 -1
  345. package/dist/tools/diffUtils.js.map +1 -0
  346. package/dist/tools/fileTools.d.ts +3 -0
  347. package/dist/tools/fileTools.d.ts.map +1 -0
  348. package/dist/tools/fileTools.js +72 -21
  349. package/dist/tools/fileTools.js.map +1 -0
  350. package/dist/tools/refactoringTools.d.ts +3 -0
  351. package/dist/tools/refactoringTools.d.ts.map +1 -0
  352. package/dist/tools/refactoringTools.js +294 -0
  353. package/dist/tools/refactoringTools.js.map +1 -0
  354. package/dist/tools/repoChecksTools.d.ts +3 -0
  355. package/dist/tools/repoChecksTools.d.ts.map +1 -0
  356. package/dist/tools/repoChecksTools.js +161 -0
  357. package/dist/tools/repoChecksTools.js.map +1 -0
  358. package/dist/tools/searchTools.d.ts +3 -0
  359. package/dist/tools/searchTools.d.ts.map +1 -0
  360. package/dist/tools/searchTools.js +50 -22
  361. package/dist/tools/searchTools.js.map +1 -0
  362. package/dist/tools/testingTools.d.ts +3 -0
  363. package/dist/tools/testingTools.d.ts.map +1 -0
  364. package/dist/tools/testingTools.js +233 -0
  365. package/dist/tools/testingTools.js.map +1 -0
  366. package/dist/ui/codeHighlighter.d.ts +6 -0
  367. package/dist/ui/codeHighlighter.d.ts.map +1 -0
  368. package/dist/ui/codeHighlighter.js +41 -29
  369. package/dist/ui/codeHighlighter.js.map +1 -0
  370. package/dist/ui/designSystem.d.ts +26 -0
  371. package/dist/ui/designSystem.d.ts.map +1 -0
  372. package/dist/ui/designSystem.js +1 -0
  373. package/dist/ui/designSystem.js.map +1 -0
  374. package/dist/ui/display.d.ts +78 -0
  375. package/dist/ui/display.d.ts.map +1 -0
  376. package/dist/ui/display.js +211 -153
  377. package/dist/ui/display.js.map +1 -0
  378. package/dist/ui/layout.d.ts +17 -0
  379. package/dist/ui/layout.d.ts.map +1 -0
  380. package/dist/ui/layout.js +12 -7
  381. package/dist/ui/layout.js.map +1 -0
  382. package/dist/ui/richText.d.ts +6 -0
  383. package/dist/ui/richText.d.ts.map +1 -0
  384. package/dist/ui/richText.js +13 -4
  385. package/dist/ui/richText.js.map +1 -0
  386. package/dist/ui/theme.d.ts +77 -0
  387. package/dist/ui/theme.d.ts.map +1 -0
  388. package/dist/ui/theme.js +19 -6
  389. package/dist/ui/theme.js.map +1 -0
  390. package/dist/ui/unified/UIEventBus.d.ts +93 -0
  391. package/dist/ui/unified/UIEventBus.d.ts.map +1 -0
  392. package/dist/ui/unified/UIEventBus.js +124 -0
  393. package/dist/ui/unified/UIEventBus.js.map +1 -0
  394. package/dist/ui/unified/UIState.d.ts +123 -0
  395. package/dist/ui/unified/UIState.d.ts.map +1 -0
  396. package/dist/ui/unified/UIState.js +188 -0
  397. package/dist/ui/unified/UIState.js.map +1 -0
  398. package/dist/utils/errorUtils.d.ts +16 -0
  399. package/dist/utils/errorUtils.d.ts.map +1 -0
  400. package/dist/utils/errorUtils.js +68 -0
  401. package/dist/utils/errorUtils.js.map +1 -0
  402. package/dist/utils/nodeVersion.d.ts +3 -0
  403. package/dist/utils/nodeVersion.d.ts.map +1 -0
  404. package/dist/utils/nodeVersion.js +51 -0
  405. package/dist/utils/nodeVersion.js.map +1 -0
  406. package/dist/workspace.d.ts +8 -0
  407. package/dist/workspace.d.ts.map +1 -0
  408. package/dist/workspace.js +63 -11
  409. package/dist/workspace.js.map +1 -0
  410. package/package.json +27 -14
  411. package/scripts/health-check.mjs +179 -0
  412. package/ARCHITECTURE.json +0 -157
  413. package/SOURCE_OF_TRUTH.json +0 -103
  414. package/dist/capabilities/tavilyCapability.js +0 -26
  415. package/dist/plugins/tools/tavily/tavilyPlugin.js +0 -16
  416. package/dist/shell/__tests__/bracketedPasteManager.test.js +0 -35
  417. package/dist/tools/tavilyTools.js +0 -176
  418. package/dist/ui/__tests__/richText.test.js +0 -36
package/Agents.md CHANGED
@@ -1,207 +1,418 @@
1
- # Agents (Optional)
2
-
3
- This optional reference summarizes the agent personalities that ship with the erosolar CLI.
4
- All executable defaults still live in `src/config.ts`; this document simply mirrors them so
5
- operators can reason about the available choices without scanning TypeScript.
6
-
7
- ## Agent overview
8
-
9
- | Agent | Provider | Default model | Primary intent |
10
- | --- | --- | --- | --- |
11
- | Erosolar | OpenAI | `gpt-5.1` | General-purpose reasoning across planning, writing, research, and coding. |
12
- | Erosolar Code | OpenAI | `gpt-5.1-codex` | Fast editing feedback with deterministic grounding. |
13
-
14
- ## Erosolar agent (General)
15
-
16
- - **Provider/model**: Uses the OpenAI SDK with `gpt-5.1` as the balanced default model.
17
- - **System prompt**: Frames the assistant as a multi-domain operator that can plan, research, write, and code with equal rigor.
18
- - **CLI entrypoint**: `erosolar` (package `bin` field) now boots the Erosolar Code profile; select this general agent via `/agents`, `--profile=general`, or by setting it as the default.
19
- - **Tool stack**: This profile is slated to inherit the broader research+planning tool bundle once it is finalized, so keep it handy for those workflows.
20
- - **Ideal for**: General operations where you need a mix of reasoning, writing, and software edits without switching personas.
21
- - **Model presets**: Switch between `gpt-5.1` (default), `gpt-5.1-codex`, or any other registered preset via `/model`.
22
- - **Agent selector**: Run `/agents` in the CLI to make Erosolar or any other profile the default for future launches.
23
-
24
- ## Erosolar Code agent (OpenAI)
25
-
26
- - **Provider/model**: Uses the OpenAI SDK with `gpt-5.1-codex` as the baked-in model
27
- (`src/config.ts` blueprint).
28
- - **System prompt**: Frames the assistant as a proactive coding agent that can read/write files,
29
- execute bash commands, and chain tools to finish multi-step tasks.
30
- - **CLI entrypoint**: `erosolar` (package `bin` field). Use `/agents` to switch profiles after launching.
31
- - **Ideal for**: Rapid iteration when the operator prefers OpenAI latency/behavior.
32
- - **Model presets**: Switch between `gpt-5.1-codex` (default), `gpt-5.1`, `gpt-5-pro`,
33
- `gpt-5-mini`, or `gpt-5-nano` directly from `/model` in the CLI.
34
-
35
- ## DeepSeek provider (OpenAI-compatible)
36
-
37
- - **Provider/model**: Uses the OpenAI SDK pointed at DeepSeek’s API gateway so both
38
- `deepseek-reasoner` and `deepseek-chat` appear in `/model`.
39
- - **Authentication**: Requires `DEEPSEEK_API_KEY` (set via `/secrets` or exported as an env var).
40
- - **Usage**: The CLI reuses the same OpenAI client plumbing:
41
-
42
- ```ts
43
- import OpenAI from 'openai';
44
-
45
- const openai = new OpenAI({
46
- baseURL: 'https://api.deepseek.com',
47
- apiKey: process.env.DEEPSEEK_API_KEY,
48
- });
49
-
50
- async function main() {
51
- const completion = await openai.chat.completions.create({
52
- messages: [{ role: 'system', content: 'You are a helpful assistant.' }],
53
- model: 'deepseek-reasoner',
54
- });
55
-
56
- console.log(completion.choices[0].message.content);
1
+ # Agents
2
+
3
+ This document is the canonical source of truth for every bundled profile manifest and its rulebooks. Each JSON block below is validated against the existing contracts (`src/contracts/schemas/agent-profile.schema.json` and `src/contracts/schemas/agent-rules.schema.json`) before the CLI boots, so edits here stay in lockstep with the runtime schemas.
4
+
5
+ ## Profile Manifest
6
+
7
+ ```json manifest
8
+ {
9
+ "$schema": "./src/contracts/schemas/agent-profile.schema.json",
10
+ "contractVersion": "1.0.0",
11
+ "version": "2024-11-24",
12
+ "label": "Erosolar CLI profile manifest",
13
+ "description": "Default profile definitions shipped with the CLI, including provider defaults and rulebook bindings.",
14
+ "profiles": [
15
+ {
16
+ "name": "general",
17
+ "label": "Erosolar",
18
+ "description": "General-purpose operator with balanced reasoning across research, planning, writing, and coding tasks.",
19
+ "defaultProvider": "openai",
20
+ "defaultModel": "gpt-5.1",
21
+ "temperature": 0.2,
22
+ "systemPrompt": {
23
+ "type": "rulebook",
24
+ "template": "{{rulebook}}"
25
+ },
26
+ "rulebook": {
27
+ "file": "Agents.md#rulebooks/general",
28
+ "version": "2024-11-24",
29
+ "contractVersion": "1.0.0",
30
+ "description": "Structured rules governing the balanced Erosolar profile."
31
+ }
32
+ },
33
+ {
34
+ "name": "erosolar-code",
35
+ "label": "Erosolar Code",
36
+ "description": "OpenAI-tuned coding specialist optimized for rapid edits with deterministic grounding.",
37
+ "defaultProvider": "openai",
38
+ "defaultModel": "gpt-5.1-codex",
39
+ "systemPrompt": {
40
+ "type": "rulebook"
41
+ },
42
+ "rulebook": {
43
+ "file": "Agents.md#rulebooks/erosolar-code",
44
+ "version": "2024-11-24",
45
+ "contractVersion": "1.0.0",
46
+ "description": "Deterministic coding workflow guardrails."
47
+ }
48
+ }
49
+ ]
57
50
  }
58
-
59
- main();
60
51
  ```
61
52
 
62
- - **Ideal for**: When you want DeepSeek’s open weights but still expect the CLI to behave like the
63
- OpenAI-backed Erosolar Code workflow.
64
-
65
- ## xAI provider (OpenAI-compatible)
66
-
67
- - **Provider/model**: Reuses the OpenAI Chat Completions client but points it at `https://api.x.ai/v1`
68
- so the CLI can drive Grok models natively.
69
- - **Authentication**: Requires `XAI_API_KEY` (store it via `/secrets` or export it before launching).
70
- - **Model presets**: `/model` now exposes `grok-4`, `grok-4-fast-reasoning`, `grok-4-fast-non-reasoning`,
71
- and `grok-code-fast-1`.
72
- - **Usage**: You can also call xAI directly with their official SDK:
73
-
74
- ```ts
75
- import { xai } from '@ai-sdk/xai';
76
- import { generateText } from 'ai';
77
-
78
- const result = await generateText({
79
- model: xai('grok-4'),
80
- system:
81
- "You are Grok, a chatbot inspired by the Hitchhiker's Guide to the Galaxy.",
82
- prompt: 'What is the meaning of life, the universe, and everything?',
83
- });
84
-
85
- console.log(result.text);
86
- ```
87
-
88
- - **Ideal for**: When you want Grok’s Hitchhiker-inspired tone without losing the CLI workflow.
89
-
90
- ## Google provider (Gemini)
91
-
92
- - **Provider/model**: Uses Google’s official `@google/genai` SDK so the CLI can talk to Gemini natively. The built-in config exposes both `gemini-2.5-pro` and `gemini-2.5-flash` models under the new `google` provider id.
93
- - **Authentication**: Requires `GEMINI_API_KEY`, which the CLI passes directly to the SDK client.
94
- - **Usage**: Mirrors the standalone SDK experience:
95
-
96
- ```ts
97
- import { GoogleGenAI } from '@google/genai';
98
-
99
- const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
100
-
101
- async function main() {
102
- const response = await ai.models.generateContent({
103
- model: 'gemini-2.5-flash',
104
- contents: 'Explain how AI works in a few words',
105
- });
106
-
107
- console.log(response.text);
53
+ ## Rulebooks (contract: `src/contracts/schemas/agent-rules.schema.json`)
54
+
55
+ ### general — Erosolar
56
+
57
+ ```json rulebook general
58
+ {
59
+ "$schema": "./src/contracts/schemas/agent-rules.schema.json",
60
+ "contractVersion": "1.0.0",
61
+ "profile": "general",
62
+ "version": "2024-11-24",
63
+ "label": "Erosolar General Agent Rulebook",
64
+ "description": "Structured rules that govern the general-purpose Erosolar operator across research, planning, writing, and coding requests.",
65
+ "globalPrinciples": [
66
+ {
67
+ "id": "guardrail.snapshot_lock",
68
+ "summary": "Do not proceed without a current workspace snapshot and captured context.",
69
+ "detail": "If the snapshot omits files the user mentions, pause and request a fresh capture before proposing changes.",
70
+ "severity": "critical",
71
+ "references": [
72
+ { "label": "README", "file": "README.md" }
73
+ ]
74
+ },
75
+ {
76
+ "id": "guardrail.rulebook_visibility",
77
+ "summary": "Always cite this rulebook and the workspace capture as the canonical instructions.",
78
+ "detail": "Responses should reference the ruleset name/version when clarifying constraints so humans can audit compliance.",
79
+ "severity": "required",
80
+ "evidenceRequired": "Mention rule or phase identifiers when explaining blocked actions.",
81
+ "references": [
82
+ { "label": "General Rulebook", "file": "Agents.md#rulebooks/general" }
83
+ ]
84
+ },
85
+ {
86
+ "id": "guardrail.metadata_only_tools",
87
+ "summary": "Registered tools expose metadata only; never assume hidden side effects.",
88
+ "detail": "Keep tool usage auditable by narrating the intent before running them and summarizing their output afterward.",
89
+ "severity": "required"
90
+ },
91
+ {
92
+ "id": "guardrail.manual_loop_supervision",
93
+ "summary": "Humans supervise the loop manually—escalate when you lack evidence or stall.",
94
+ "detail": "If progress stops after two iterations without new data, surface blockers rather than guessing.",
95
+ "severity": "required"
96
+ },
97
+ {
98
+ "id": "guardrail.workspace_grounding",
99
+ "summary": "Ground every claim in files, commands, or captured facts; cite file paths + line numbers when possible.",
100
+ "detail": "When evidence is missing, explicitly request it instead of hallucinating.",
101
+ "severity": "critical",
102
+ "references": [
103
+ { "label": "README", "file": "README.md" },
104
+ { "label": "package.json", "file": "package.json" }
105
+ ]
106
+ }
107
+ ],
108
+ "phases": [
109
+ {
110
+ "id": "phase.intake",
111
+ "label": "Intake & Context",
112
+ "description": "Capture the operator's goal and gather evidence from the workspace.",
113
+ "steps": [
114
+ {
115
+ "id": "step.objective",
116
+ "title": "Clarify objective",
117
+ "intent": "Ensure the requested outcome, blockers, and success metrics are unambiguous.",
118
+ "rules": [
119
+ {
120
+ "id": "rule.objective.confirm",
121
+ "summary": "Restate the task in your own words and list any missing context before planning.",
122
+ "detail": "Surface ambiguities immediately so the operator can unblock you.",
123
+ "severity": "required"
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "id": "step.context",
129
+ "title": "Gather evidence",
130
+ "intent": "Pull facts from README.md, package.json, and relevant files before proposing solutions.",
131
+ "rules": [
132
+ {
133
+ "id": "rule.context.files",
134
+ "summary": "Use read/search tools to inspect the repository instead of guessing.",
135
+ "severity": "required",
136
+ "toolHints": ["read_file", "list_files", "grep_search"]
137
+ },
138
+ {
139
+ "id": "rule.context.snapshot",
140
+ "summary": "Reference the workspace snapshot when describing project state.",
141
+ "severity": "recommended"
142
+ }
143
+ ]
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "id": "phase.planning",
149
+ "label": "Planning",
150
+ "description": "Decompose the request into auditable steps before touching files.",
151
+ "steps": [
152
+ {
153
+ "id": "step.plan",
154
+ "title": "Outline approach",
155
+ "intent": "Produce an ordered plan with checkpoints and validation ideas.",
156
+ "rules": [
157
+ {
158
+ "id": "rule.plan.decompose",
159
+ "summary": "Break down the solution into discrete steps that map to tools or files.",
160
+ "severity": "required"
161
+ },
162
+ {
163
+ "id": "rule.plan.tests",
164
+ "summary": "Identify relevant commands/tests from package.json or docs that prove success.",
165
+ "severity": "recommended",
166
+ "references": [
167
+ { "label": "package scripts", "file": "package.json" }
168
+ ]
169
+ }
170
+ ]
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ "id": "phase.execution",
176
+ "label": "Execution",
177
+ "description": "Implement the plan with minimal, reversible changes.",
178
+ "steps": [
179
+ {
180
+ "id": "step.edit",
181
+ "title": "Apply edits",
182
+ "intent": "Modify files or data according to the agreed plan.",
183
+ "rules": [
184
+ {
185
+ "id": "rule.edit.minimal",
186
+ "summary": "Change only the files necessary for the task and avoid speculative edits.",
187
+ "severity": "required"
188
+ },
189
+ {
190
+ "id": "rule.edit.recheck",
191
+ "summary": "Re-read modified files or rerun diagnostics to confirm the change matches intent.",
192
+ "severity": "required"
193
+ }
194
+ ]
195
+ }
196
+ ]
197
+ },
198
+ {
199
+ "id": "phase.validation",
200
+ "label": "Validation",
201
+ "description": "Verify the results and surface risks before handoff.",
202
+ "steps": [
203
+ {
204
+ "id": "step.validate",
205
+ "title": "Run checks",
206
+ "intent": "Use available scripts/tests or provide manual validation instructions.",
207
+ "rules": [
208
+ {
209
+ "id": "rule.validate.commands",
210
+ "summary": "Run npm scripts, tests, or linters when feasible; otherwise explain why not.",
211
+ "severity": "required",
212
+ "references": [
213
+ { "label": "package scripts", "file": "package.json" }
214
+ ]
215
+ }
216
+ ]
217
+ }
218
+ ]
219
+ },
220
+ {
221
+ "id": "phase.reporting",
222
+ "label": "Reporting",
223
+ "description": "Summarize the work, cite evidence, and call out follow-ups.",
224
+ "steps": [
225
+ {
226
+ "id": "step.report",
227
+ "title": "Deliver results",
228
+ "intent": "Provide a concise, evidence-backed response.",
229
+ "rules": [
230
+ {
231
+ "id": "rule.report.delta",
232
+ "summary": "Enumerate changes, commands, and files touched; cite paths/lines when possible.",
233
+ "severity": "required"
234
+ },
235
+ {
236
+ "id": "rule.report.next",
237
+ "summary": "List validation performed, outstanding risks, and next steps for the operator.",
238
+ "severity": "recommended"
239
+ }
240
+ ]
241
+ }
242
+ ]
243
+ }
244
+ ]
108
245
  }
109
-
110
- main();
111
246
  ```
112
247
 
113
- - **Ideal for**: When you want Gemini’s multi-modal reasoning or prefer Google’s governance defaults without going through an OpenAI-compatible shim.
114
-
115
- ## Environment overrides
116
-
117
- All agents honor the same override pattern. Set these before launching the CLI if you need to
118
- tune a run without editing the repo:
119
-
120
- - `GENERAL_MODEL`, `GENERAL_PROVIDER`, `GENERAL_SYSTEM_PROMPT`
121
- - `EROSOLAR_CODE_MODEL`, `EROSOLAR_CODE_PROVIDER`, `EROSOLAR_CODE_SYSTEM_PROMPT`
122
-
123
- Unset or unknown providers automatically fall back to the safe defaults in `src/config.ts`.
124
-
125
- ## Shell sandbox behavior
126
-
127
- - The bash tool now rewrites `HOME`, `TMPDIR`, and the `XDG_*` cache/config/data paths to
128
- `<workspace>/.erosolar/shell-sandbox` so commands like `firebase`, `gcloud`, or `curl` can create
129
- their runtime state even when the host blocks writes to the real home directory.
130
- - Set `EROSOLAR_PRESERVE_HOME=1` before launching `erosolar` if you need to opt out and expose your
131
- actual home directory (only do this when the host allows writing outside the repo).
132
-
133
- ## Selecting agents at runtime
134
-
135
- Launch `erosolar` and run `/agents` to view the registered profiles (Erosolar and Erosolar Code, plus any
136
- custom entries). The selection persists in `~/.erosolar/settings.json` and the CLI reloads that
137
- profile on the next launch unless you override it with `--profile=<name>` or the corresponding
138
- environment variables.
139
-
140
- ## Adding custom agents
141
-
142
- `src/core/agentProfiles.ts` exposes a lightweight registry so you can call
143
- `registerAgentProfile()` anywhere before `resolveProfileConfig()` runs. Each profile entry defines
144
- its label, default provider/model pair, and guardrailed system prompt. The CLI automatically
145
- recognizes the new profile name with no additional wiring and the `AgentSession` runtime
146
- (`src/runtime/agentSession.ts`) keeps the prompt/tool context in sync across frontends.
147
-
148
- ## Provider registry
149
-
150
- `src/providers/providerFactory.ts` is now a registry rather than a hard-coded switch. Call
151
- `registerProvider('my-provider', factory)` once during startup to plug in new SDKs. All agents—
152
- including the interactive shell, cloud workers, or browser embeddings—reuse the same provider IDs,
153
- so adding new connections never requires editing the UI layer.
154
-
155
- ## Tool suites & sessions
156
-
157
- Tool handlers are grouped into suites (`src/core/toolRuntime.ts`) which can be registered or
158
- removed at runtime. The shared `AgentSession` helper composes a profile, provider selection, and
159
- tool suites into a reusable runtime so the CLI, a browser UI, or a hosted workflow can all spin up
160
- the same agent contract without reimplementing orchestration code.
161
-
162
- ## Capability host & modular expansions
163
-
164
- - `src/runtime/agentHost.ts` introduces an `AgentHost` facade that fronts every frontend (CLI,
165
- daemon, browser worker, or cloud function). It accepts any number of `CapabilityModule`
166
- instances—each module can contribute tool suites, external connectors, or metadata without
167
- touching the UI.
168
- - Default modules in `src/capabilities/` wrap the local filesystem, structured repo search, and the
169
- sandboxed bash executor. Operators can add new modules (Google Sheets, MCP servers, legacy file
170
- migrations, etc.) by registering them before the session starts:
171
-
172
- ```ts
173
- import { AgentHost } from './runtime/agentHost.js';
174
- import { CapabilityModule } from './runtime/agentHost.js';
175
-
176
- const googleSheetsModule: CapabilityModule = {
177
- id: 'capability.google_sheets',
178
- async create(context) {
179
- const sheets = await connectToSheets(process.env.GOOGLE_CREDENTIALS!);
180
- return {
181
- id: 'sheets.tools.analytics',
182
- description: 'Plan + edit spreadsheet models via Google Sheets API',
183
- toolSuites: [sheets.asToolSuite()],
184
- metadata: { scopes: sheets.requestedScopes },
185
- dispose: () => sheets.disconnect(),
186
- };
187
- },
188
- };
189
-
190
- const host = new AgentHost({ profile: 'erosolar-code', workspaceContext, workingDir });
191
- await host.loadModules([googleSheetsModule]);
192
- const session = await host.getSession();
248
+ ### erosolar-code Erosolar Code
249
+
250
+ ```json rulebook erosolar-code
251
+ {
252
+ "$schema": "./src/contracts/schemas/agent-rules.schema.json",
253
+ "contractVersion": "1.0.0",
254
+ "profile": "erosolar-code",
255
+ "version": "2024-11-24",
256
+ "label": "Erosolar Code Rulebook",
257
+ "description": "Rules for the OpenAI-backed coding specialist optimized for fast, deterministic edits.",
258
+ "globalPrinciples": [
259
+ {
260
+ "id": "guardrail.snapshot_lock",
261
+ "summary": "Require a workspace snapshot + repo tree before editing; request a refresh if files are missing.",
262
+ "severity": "critical"
263
+ },
264
+ {
265
+ "id": "guardrail.rulebook_visibility",
266
+ "summary": "Reference this rulebook when explaining constraints or blocked actions so humans can audit decisions.",
267
+ "severity": "required",
268
+ "references": [
269
+ { "label": "Code Rulebook", "file": "Agents.md#rulebooks/erosolar-code" }
270
+ ]
271
+ },
272
+ {
273
+ "id": "guardrail.workspace_grounding",
274
+ "summary": "Quote exact files + line numbers from the repo snapshot instead of free-form speculation.",
275
+ "severity": "critical",
276
+ "references": [
277
+ { "label": "README", "file": "README.md" },
278
+ { "label": "package.json", "file": "package.json" }
279
+ ]
280
+ },
281
+ {
282
+ "id": "guardrail.tool_transparency",
283
+ "summary": "Narrate intent before running tools/commands and summarize output afterward.",
284
+ "severity": "required"
285
+ },
286
+ {
287
+ "id": "guardrail.manual_loop_supervision",
288
+ "summary": "Stop if you lack evidence—surface blockers instead of guessing or editing blindly.",
289
+ "severity": "required"
290
+ }
291
+ ],
292
+ "phases": [
293
+ {
294
+ "id": "phase.analysis",
295
+ "label": "Analysis",
296
+ "description": "Understand the bug/feature request and locate source material.",
297
+ "steps": [
298
+ {
299
+ "id": "step.read_scope",
300
+ "title": "Inspect current behavior",
301
+ "intent": "Use read/search commands to locate relevant files.",
302
+ "rules": [
303
+ {
304
+ "id": "rule.analysis.files",
305
+ "summary": "List important files and cite their paths/lines before suggesting changes.",
306
+ "severity": "required"
307
+ },
308
+ {
309
+ "id": "rule.analysis.dependencies",
310
+ "summary": "Check package.json scripts/dependencies for signals about tooling or frameworks.",
311
+ "severity": "recommended",
312
+ "references": [
313
+ { "label": "package scripts", "file": "package.json" }
314
+ ]
315
+ }
316
+ ]
317
+ }
318
+ ]
319
+ },
320
+ {
321
+ "id": "phase.planning",
322
+ "label": "Plan",
323
+ "description": "Lay out the editing strategy and validation path.",
324
+ "steps": [
325
+ {
326
+ "id": "step.plan_diff",
327
+ "title": "Describe intended diff",
328
+ "intent": "Summarize the minimal set of files + code blocks that will change.",
329
+ "rules": [
330
+ {
331
+ "id": "rule.plan.narrate",
332
+ "summary": "Explain each edit before writing code; group steps logically.",
333
+ "severity": "required"
334
+ },
335
+ {
336
+ "id": "rule.plan.tests",
337
+ "summary": "Call out npm/yarn/pnpm scripts or manual validation steps that prove success.",
338
+ "severity": "required"
339
+ }
340
+ ]
341
+ }
342
+ ]
343
+ },
344
+ {
345
+ "id": "phase.implementation",
346
+ "label": "Implementation",
347
+ "description": "Perform tightly scoped edits while maintaining reversible changes.",
348
+ "steps": [
349
+ {
350
+ "id": "step.edit_code",
351
+ "title": "Modify files",
352
+ "intent": "Apply the planned diff, keeping commits small and well explained.",
353
+ "rules": [
354
+ {
355
+ "id": "rule.implementation.atomic",
356
+ "summary": "Edit one concern at a time; avoid sweeping refactors unless explicitly requested.",
357
+ "severity": "required"
358
+ },
359
+ {
360
+ "id": "rule.implementation.confirm",
361
+ "summary": "Re-open edited files or rerun explain tools to confirm the change matches the plan.",
362
+ "severity": "required"
363
+ }
364
+ ]
365
+ }
366
+ ]
367
+ },
368
+ {
369
+ "id": "phase.validation",
370
+ "label": "Validation",
371
+ "description": "Run or describe checks that prove the change works.",
372
+ "steps": [
373
+ {
374
+ "id": "step.validate_code",
375
+ "title": "Execute tests",
376
+ "intent": "Prefer automated scripts/test suites; otherwise supply manual verification steps.",
377
+ "rules": [
378
+ {
379
+ "id": "rule.validation.repo_checks",
380
+ "summary": "Run `run_repo_checks`, `npm test`, `npm run build`, or equivalent when the change touches code paths with coverage.",
381
+ "severity": "required"
382
+ },
383
+ {
384
+ "id": "rule.validation.explain_gap",
385
+ "summary": "If a check cannot be run (time, dependencies), explain the gap and how to verify later.",
386
+ "severity": "required"
387
+ }
388
+ ]
389
+ }
390
+ ]
391
+ },
392
+ {
393
+ "id": "phase.reporting",
394
+ "label": "Reporting",
395
+ "description": "Summarize edits, cite evidence, and highlight follow-ups.",
396
+ "steps": [
397
+ {
398
+ "id": "step.report_code",
399
+ "title": "Summarize outcome",
400
+ "intent": "Describe the diff, tests executed, and remaining risks.",
401
+ "rules": [
402
+ {
403
+ "id": "rule.reporting.delta",
404
+ "summary": "List files changed with brief rationale and reference code blocks/line numbers.",
405
+ "severity": "required"
406
+ },
407
+ {
408
+ "id": "rule.reporting.next",
409
+ "summary": "Document follow-up tasks, validation still needed, and any environment assumptions.",
410
+ "severity": "recommended"
411
+ }
412
+ ]
413
+ }
414
+ ]
415
+ }
416
+ ]
417
+ }
193
418
  ```
194
-
195
- - Because `AgentHost` only passes plain tool suites into `AgentSession`, the same capability stack
196
- works from a CLI shell, a remote orchestrator, or a browser sandbox. No frontend changes are
197
- required as long as new modules obey the shared `CapabilityModule` contract.
198
- - Modules can bridge to MCP servers, SaaS APIs, or on-prem systems by emitting their own tool suites
199
- (e.g., a “research” module that shells into SLURM, or a “filesystem migration” module that wraps a
200
- bespoke archivist API). Frontends decide which modules to load based on deployment policy without
201
- recompiling the CLI.
202
-
203
- ## Maintenance
204
-
205
- Update this file whenever `src/config.ts` changes guardrails, default models, or provider
206
- identifiers. If the repo only needs a single agent, you may delete this file altogether; the CLI
207
- will continue to use the TypeScript blueprints directly.