verbolab 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +71 -0
  3. package/dist/bin/verbo.d.ts +3 -0
  4. package/dist/bin/verbo.d.ts.map +1 -0
  5. package/dist/bin/verbo.js +1156 -0
  6. package/dist/bin/verbo.js.map +1 -0
  7. package/dist/relay/index.d.ts +2 -0
  8. package/dist/relay/index.d.ts.map +1 -0
  9. package/dist/relay/index.js +15 -0
  10. package/dist/relay/index.js.map +1 -0
  11. package/dist/src/agent/agent-launcher.d.ts +64 -0
  12. package/dist/src/agent/agent-launcher.d.ts.map +1 -0
  13. package/dist/src/agent/agent-launcher.js +326 -0
  14. package/dist/src/agent/agent-launcher.js.map +1 -0
  15. package/dist/src/agent/agent-monitor.d.ts +16 -0
  16. package/dist/src/agent/agent-monitor.d.ts.map +1 -0
  17. package/dist/src/agent/agent-monitor.js +41 -0
  18. package/dist/src/agent/agent-monitor.js.map +1 -0
  19. package/dist/src/agent/fun-names.d.ts +9 -0
  20. package/dist/src/agent/fun-names.d.ts.map +1 -0
  21. package/dist/src/agent/fun-names.js +118 -0
  22. package/dist/src/agent/fun-names.js.map +1 -0
  23. package/dist/src/agent/mcp-shim.d.ts +45 -0
  24. package/dist/src/agent/mcp-shim.d.ts.map +1 -0
  25. package/dist/src/agent/mcp-shim.js +192 -0
  26. package/dist/src/agent/mcp-shim.js.map +1 -0
  27. package/dist/src/agent/personas.d.ts +47 -0
  28. package/dist/src/agent/personas.d.ts.map +1 -0
  29. package/dist/src/agent/personas.js +86 -0
  30. package/dist/src/agent/personas.js.map +1 -0
  31. package/dist/src/agent/provider-detection.d.ts +21 -0
  32. package/dist/src/agent/provider-detection.d.ts.map +1 -0
  33. package/dist/src/agent/provider-detection.js +47 -0
  34. package/dist/src/agent/provider-detection.js.map +1 -0
  35. package/dist/src/agent/providers/claude-provider.d.ts +3 -0
  36. package/dist/src/agent/providers/claude-provider.d.ts.map +1 -0
  37. package/dist/src/agent/providers/claude-provider.js +119 -0
  38. package/dist/src/agent/providers/claude-provider.js.map +1 -0
  39. package/dist/src/agent/providers/gemini-provider.d.ts +13 -0
  40. package/dist/src/agent/providers/gemini-provider.d.ts.map +1 -0
  41. package/dist/src/agent/providers/gemini-provider.js +143 -0
  42. package/dist/src/agent/providers/gemini-provider.js.map +1 -0
  43. package/dist/src/agent/providers/openai-provider.d.ts +3 -0
  44. package/dist/src/agent/providers/openai-provider.d.ts.map +1 -0
  45. package/dist/src/agent/providers/openai-provider.js +127 -0
  46. package/dist/src/agent/providers/openai-provider.js.map +1 -0
  47. package/dist/src/agent/providers/registry.d.ts +19 -0
  48. package/dist/src/agent/providers/registry.d.ts.map +1 -0
  49. package/dist/src/agent/providers/registry.js +30 -0
  50. package/dist/src/agent/providers/registry.js.map +1 -0
  51. package/dist/src/agent/providers/types.d.ts +118 -0
  52. package/dist/src/agent/providers/types.d.ts.map +1 -0
  53. package/dist/src/agent/providers/types.js +2 -0
  54. package/dist/src/agent/providers/types.js.map +1 -0
  55. package/dist/src/approval/approval-server.d.ts +17 -0
  56. package/dist/src/approval/approval-server.d.ts.map +1 -0
  57. package/dist/src/approval/approval-server.js +90 -0
  58. package/dist/src/approval/approval-server.js.map +1 -0
  59. package/dist/src/approval/approval-store.d.ts +29 -0
  60. package/dist/src/approval/approval-store.d.ts.map +1 -0
  61. package/dist/src/approval/approval-store.js +94 -0
  62. package/dist/src/approval/approval-store.js.map +1 -0
  63. package/dist/src/auth/auth-store.d.ts +18 -0
  64. package/dist/src/auth/auth-store.d.ts.map +1 -0
  65. package/dist/src/auth/auth-store.js +34 -0
  66. package/dist/src/auth/auth-store.js.map +1 -0
  67. package/dist/src/auth/device-code-client.d.ts +32 -0
  68. package/dist/src/auth/device-code-client.d.ts.map +1 -0
  69. package/dist/src/auth/device-code-client.js +41 -0
  70. package/dist/src/auth/device-code-client.js.map +1 -0
  71. package/dist/src/auth/plan-enforcer.d.ts +8 -0
  72. package/dist/src/auth/plan-enforcer.d.ts.map +1 -0
  73. package/dist/src/auth/plan-enforcer.js +14 -0
  74. package/dist/src/auth/plan-enforcer.js.map +1 -0
  75. package/dist/src/commands/audit.d.ts +7 -0
  76. package/dist/src/commands/audit.d.ts.map +1 -0
  77. package/dist/src/commands/audit.js +92 -0
  78. package/dist/src/commands/audit.js.map +1 -0
  79. package/dist/src/commands/team.d.ts +48 -0
  80. package/dist/src/commands/team.d.ts.map +1 -0
  81. package/dist/src/commands/team.js +175 -0
  82. package/dist/src/commands/team.js.map +1 -0
  83. package/dist/src/config/verbo-config.d.ts +43 -0
  84. package/dist/src/config/verbo-config.d.ts.map +1 -0
  85. package/dist/src/config/verbo-config.js +111 -0
  86. package/dist/src/config/verbo-config.js.map +1 -0
  87. package/dist/src/core/agent-session-store.d.ts +69 -0
  88. package/dist/src/core/agent-session-store.d.ts.map +1 -0
  89. package/dist/src/core/agent-session-store.js +168 -0
  90. package/dist/src/core/agent-session-store.js.map +1 -0
  91. package/dist/src/core/audit-log-store.d.ts +33 -0
  92. package/dist/src/core/audit-log-store.d.ts.map +1 -0
  93. package/dist/src/core/audit-log-store.js +104 -0
  94. package/dist/src/core/audit-log-store.js.map +1 -0
  95. package/dist/src/core/compliance.d.ts +50 -0
  96. package/dist/src/core/compliance.d.ts.map +1 -0
  97. package/dist/src/core/compliance.js +59 -0
  98. package/dist/src/core/compliance.js.map +1 -0
  99. package/dist/src/core/conflict-detector.d.ts +19 -0
  100. package/dist/src/core/conflict-detector.d.ts.map +1 -0
  101. package/dist/src/core/conflict-detector.js +87 -0
  102. package/dist/src/core/conflict-detector.js.map +1 -0
  103. package/dist/src/core/conflict-enforcer.d.ts +37 -0
  104. package/dist/src/core/conflict-enforcer.d.ts.map +1 -0
  105. package/dist/src/core/conflict-enforcer.js +139 -0
  106. package/dist/src/core/conflict-enforcer.js.map +1 -0
  107. package/dist/src/core/cost-store.d.ts +55 -0
  108. package/dist/src/core/cost-store.d.ts.map +1 -0
  109. package/dist/src/core/cost-store.js +140 -0
  110. package/dist/src/core/cost-store.js.map +1 -0
  111. package/dist/src/core/hot-files.d.ts +19 -0
  112. package/dist/src/core/hot-files.d.ts.map +1 -0
  113. package/dist/src/core/hot-files.js +64 -0
  114. package/dist/src/core/hot-files.js.map +1 -0
  115. package/dist/src/core/human-action-store.d.ts +33 -0
  116. package/dist/src/core/human-action-store.d.ts.map +1 -0
  117. package/dist/src/core/human-action-store.js +92 -0
  118. package/dist/src/core/human-action-store.js.map +1 -0
  119. package/dist/src/core/learning-store.d.ts +32 -0
  120. package/dist/src/core/learning-store.d.ts.map +1 -0
  121. package/dist/src/core/learning-store.js +95 -0
  122. package/dist/src/core/learning-store.js.map +1 -0
  123. package/dist/src/core/merge-queue.d.ts +28 -0
  124. package/dist/src/core/merge-queue.d.ts.map +1 -0
  125. package/dist/src/core/merge-queue.js +92 -0
  126. package/dist/src/core/merge-queue.js.map +1 -0
  127. package/dist/src/core/notification-service.d.ts +13 -0
  128. package/dist/src/core/notification-service.d.ts.map +1 -0
  129. package/dist/src/core/notification-service.js +126 -0
  130. package/dist/src/core/notification-service.js.map +1 -0
  131. package/dist/src/core/notifications.d.ts +10 -0
  132. package/dist/src/core/notifications.d.ts.map +1 -0
  133. package/dist/src/core/notifications.js +33 -0
  134. package/dist/src/core/notifications.js.map +1 -0
  135. package/dist/src/core/orchestrator-store.d.ts +44 -0
  136. package/dist/src/core/orchestrator-store.d.ts.map +1 -0
  137. package/dist/src/core/orchestrator-store.js +69 -0
  138. package/dist/src/core/orchestrator-store.js.map +1 -0
  139. package/dist/src/core/parallelizer.d.ts +47 -0
  140. package/dist/src/core/parallelizer.d.ts.map +1 -0
  141. package/dist/src/core/parallelizer.js +224 -0
  142. package/dist/src/core/parallelizer.js.map +1 -0
  143. package/dist/src/core/pipeline-rollback.d.ts +29 -0
  144. package/dist/src/core/pipeline-rollback.d.ts.map +1 -0
  145. package/dist/src/core/pipeline-rollback.js +84 -0
  146. package/dist/src/core/pipeline-rollback.js.map +1 -0
  147. package/dist/src/core/pipeline-runner.d.ts +73 -0
  148. package/dist/src/core/pipeline-runner.d.ts.map +1 -0
  149. package/dist/src/core/pipeline-runner.js +165 -0
  150. package/dist/src/core/pipeline-runner.js.map +1 -0
  151. package/dist/src/core/pr-creator.d.ts +22 -0
  152. package/dist/src/core/pr-creator.d.ts.map +1 -0
  153. package/dist/src/core/pr-creator.js +55 -0
  154. package/dist/src/core/pr-creator.js.map +1 -0
  155. package/dist/src/core/rbac.d.ts +27 -0
  156. package/dist/src/core/rbac.d.ts.map +1 -0
  157. package/dist/src/core/rbac.js +76 -0
  158. package/dist/src/core/rbac.js.map +1 -0
  159. package/dist/src/core/startup-cleanup.d.ts +47 -0
  160. package/dist/src/core/startup-cleanup.d.ts.map +1 -0
  161. package/dist/src/core/startup-cleanup.js +150 -0
  162. package/dist/src/core/startup-cleanup.js.map +1 -0
  163. package/dist/src/core/task-store.d.ts +96 -0
  164. package/dist/src/core/task-store.d.ts.map +1 -0
  165. package/dist/src/core/task-store.js +309 -0
  166. package/dist/src/core/task-store.js.map +1 -0
  167. package/dist/src/core/verbo-config-editor.d.ts +44 -0
  168. package/dist/src/core/verbo-config-editor.d.ts.map +1 -0
  169. package/dist/src/core/verbo-config-editor.js +204 -0
  170. package/dist/src/core/verbo-config-editor.js.map +1 -0
  171. package/dist/src/core/verbo-config.d.ts +35 -0
  172. package/dist/src/core/verbo-config.d.ts.map +1 -0
  173. package/dist/src/core/verbo-config.js +55 -0
  174. package/dist/src/core/verbo-config.js.map +1 -0
  175. package/dist/src/core/verbo-md.d.ts +96 -0
  176. package/dist/src/core/verbo-md.d.ts.map +1 -0
  177. package/dist/src/core/verbo-md.js +410 -0
  178. package/dist/src/core/verbo-md.js.map +1 -0
  179. package/dist/src/db/database.d.ts +9 -0
  180. package/dist/src/db/database.d.ts.map +1 -0
  181. package/dist/src/db/database.js +37 -0
  182. package/dist/src/db/database.js.map +1 -0
  183. package/dist/src/db/migrations/001-personas-subtasks.d.ts +10 -0
  184. package/dist/src/db/migrations/001-personas-subtasks.d.ts.map +1 -0
  185. package/dist/src/db/migrations/001-personas-subtasks.js +32 -0
  186. package/dist/src/db/migrations/001-personas-subtasks.js.map +1 -0
  187. package/dist/src/db/migrations/002-rbac.d.ts +9 -0
  188. package/dist/src/db/migrations/002-rbac.d.ts.map +1 -0
  189. package/dist/src/db/migrations/002-rbac.js +31 -0
  190. package/dist/src/db/migrations/002-rbac.js.map +1 -0
  191. package/dist/src/db/migrations/003-provider-column.d.ts +8 -0
  192. package/dist/src/db/migrations/003-provider-column.d.ts.map +1 -0
  193. package/dist/src/db/migrations/003-provider-column.js +12 -0
  194. package/dist/src/db/migrations/003-provider-column.js.map +1 -0
  195. package/dist/src/db/migrations/004-pipeline-cost.d.ts +8 -0
  196. package/dist/src/db/migrations/004-pipeline-cost.d.ts.map +1 -0
  197. package/dist/src/db/migrations/004-pipeline-cost.js +23 -0
  198. package/dist/src/db/migrations/004-pipeline-cost.js.map +1 -0
  199. package/dist/src/db/migrations/005-audit-log-timestamp.d.ts +10 -0
  200. package/dist/src/db/migrations/005-audit-log-timestamp.d.ts.map +1 -0
  201. package/dist/src/db/migrations/005-audit-log-timestamp.js +39 -0
  202. package/dist/src/db/migrations/005-audit-log-timestamp.js.map +1 -0
  203. package/dist/src/db/migrations/006-human-action-type.d.ts +9 -0
  204. package/dist/src/db/migrations/006-human-action-type.d.ts.map +1 -0
  205. package/dist/src/db/migrations/006-human-action-type.js +16 -0
  206. package/dist/src/db/migrations/006-human-action-type.js.map +1 -0
  207. package/dist/src/db/schema.d.ts +6 -0
  208. package/dist/src/db/schema.d.ts.map +1 -0
  209. package/dist/src/db/schema.js +255 -0
  210. package/dist/src/db/schema.js.map +1 -0
  211. package/dist/src/deps/dependabot-generator.d.ts +22 -0
  212. package/dist/src/deps/dependabot-generator.d.ts.map +1 -0
  213. package/dist/src/deps/dependabot-generator.js +83 -0
  214. package/dist/src/deps/dependabot-generator.js.map +1 -0
  215. package/dist/src/deps/dependabot-monitor.d.ts +22 -0
  216. package/dist/src/deps/dependabot-monitor.d.ts.map +1 -0
  217. package/dist/src/deps/dependabot-monitor.js +28 -0
  218. package/dist/src/deps/dependabot-monitor.js.map +1 -0
  219. package/dist/src/deps/package-auditor.d.ts +24 -0
  220. package/dist/src/deps/package-auditor.d.ts.map +1 -0
  221. package/dist/src/deps/package-auditor.js +118 -0
  222. package/dist/src/deps/package-auditor.js.map +1 -0
  223. package/dist/src/init/ensure-init.d.ts +6 -0
  224. package/dist/src/init/ensure-init.d.ts.map +1 -0
  225. package/dist/src/init/ensure-init.js +27 -0
  226. package/dist/src/init/ensure-init.js.map +1 -0
  227. package/dist/src/init/project-detector.d.ts +11 -0
  228. package/dist/src/init/project-detector.d.ts.map +1 -0
  229. package/dist/src/init/project-detector.js +117 -0
  230. package/dist/src/init/project-detector.js.map +1 -0
  231. package/dist/src/init/questionnaire.d.ts +5 -0
  232. package/dist/src/init/questionnaire.d.ts.map +1 -0
  233. package/dist/src/init/questionnaire.js +112 -0
  234. package/dist/src/init/questionnaire.js.map +1 -0
  235. package/dist/src/init/template.d.ts +17 -0
  236. package/dist/src/init/template.d.ts.map +1 -0
  237. package/dist/src/init/template.js +46 -0
  238. package/dist/src/init/template.js.map +1 -0
  239. package/dist/src/intelligence/claude-client.d.ts +3 -0
  240. package/dist/src/intelligence/claude-client.d.ts.map +1 -0
  241. package/dist/src/intelligence/claude-client.js +12 -0
  242. package/dist/src/intelligence/claude-client.js.map +1 -0
  243. package/dist/src/intelligence/conflict-mediator.d.ts +17 -0
  244. package/dist/src/intelligence/conflict-mediator.d.ts.map +1 -0
  245. package/dist/src/intelligence/conflict-mediator.js +83 -0
  246. package/dist/src/intelligence/conflict-mediator.js.map +1 -0
  247. package/dist/src/intelligence/github-orchestrator.d.ts +30 -0
  248. package/dist/src/intelligence/github-orchestrator.d.ts.map +1 -0
  249. package/dist/src/intelligence/github-orchestrator.js +270 -0
  250. package/dist/src/intelligence/github-orchestrator.js.map +1 -0
  251. package/dist/src/intelligence/kill-switch.d.ts +10 -0
  252. package/dist/src/intelligence/kill-switch.d.ts.map +1 -0
  253. package/dist/src/intelligence/kill-switch.js +12 -0
  254. package/dist/src/intelligence/kill-switch.js.map +1 -0
  255. package/dist/src/intelligence/learnings-extractor.d.ts +13 -0
  256. package/dist/src/intelligence/learnings-extractor.d.ts.map +1 -0
  257. package/dist/src/intelligence/learnings-extractor.js +74 -0
  258. package/dist/src/intelligence/learnings-extractor.js.map +1 -0
  259. package/dist/src/intelligence/project-scanner.d.ts +2 -0
  260. package/dist/src/intelligence/project-scanner.d.ts.map +1 -0
  261. package/dist/src/intelligence/project-scanner.js +28 -0
  262. package/dist/src/intelligence/project-scanner.js.map +1 -0
  263. package/dist/src/intelligence/task-decomposer.d.ts +14 -0
  264. package/dist/src/intelligence/task-decomposer.d.ts.map +1 -0
  265. package/dist/src/intelligence/task-decomposer.js +97 -0
  266. package/dist/src/intelligence/task-decomposer.js.map +1 -0
  267. package/dist/src/intelligence/types.d.ts +14 -0
  268. package/dist/src/intelligence/types.d.ts.map +1 -0
  269. package/dist/src/intelligence/types.js +2 -0
  270. package/dist/src/intelligence/types.js.map +1 -0
  271. package/dist/src/mcp/server.d.ts +63 -0
  272. package/dist/src/mcp/server.d.ts.map +1 -0
  273. package/dist/src/mcp/server.js +537 -0
  274. package/dist/src/mcp/server.js.map +1 -0
  275. package/dist/src/mcp/stdio-entry.d.ts +2 -0
  276. package/dist/src/mcp/stdio-entry.d.ts.map +1 -0
  277. package/dist/src/mcp/stdio-entry.js +124 -0
  278. package/dist/src/mcp/stdio-entry.js.map +1 -0
  279. package/dist/src/mcp/subtask-handlers.d.ts +7 -0
  280. package/dist/src/mcp/subtask-handlers.d.ts.map +1 -0
  281. package/dist/src/mcp/subtask-handlers.js +50 -0
  282. package/dist/src/mcp/subtask-handlers.js.map +1 -0
  283. package/dist/src/security/network-proxy.d.ts +20 -0
  284. package/dist/src/security/network-proxy.d.ts.map +1 -0
  285. package/dist/src/security/network-proxy.js +125 -0
  286. package/dist/src/security/network-proxy.js.map +1 -0
  287. package/dist/src/security/network-sandbox.d.ts +19 -0
  288. package/dist/src/security/network-sandbox.d.ts.map +1 -0
  289. package/dist/src/security/network-sandbox.js +100 -0
  290. package/dist/src/security/network-sandbox.js.map +1 -0
  291. package/dist/src/security/sanitize.d.ts +13 -0
  292. package/dist/src/security/sanitize.d.ts.map +1 -0
  293. package/dist/src/security/sanitize.js +19 -0
  294. package/dist/src/security/sanitize.js.map +1 -0
  295. package/dist/src/security/secrets-patterns.d.ts +29 -0
  296. package/dist/src/security/secrets-patterns.d.ts.map +1 -0
  297. package/dist/src/security/secrets-patterns.js +430 -0
  298. package/dist/src/security/secrets-patterns.js.map +1 -0
  299. package/dist/src/security/secrets-scanner.d.ts +26 -0
  300. package/dist/src/security/secrets-scanner.d.ts.map +1 -0
  301. package/dist/src/security/secrets-scanner.js +62 -0
  302. package/dist/src/security/secrets-scanner.js.map +1 -0
  303. package/dist/src/skills/classifier.d.ts +9 -0
  304. package/dist/src/skills/classifier.d.ts.map +1 -0
  305. package/dist/src/skills/classifier.js +41 -0
  306. package/dist/src/skills/classifier.js.map +1 -0
  307. package/dist/src/skills/registry.d.ts +16 -0
  308. package/dist/src/skills/registry.d.ts.map +1 -0
  309. package/dist/src/skills/registry.js +61 -0
  310. package/dist/src/skills/registry.js.map +1 -0
  311. package/dist/src/sync/events.d.ts +9 -0
  312. package/dist/src/sync/events.d.ts.map +1 -0
  313. package/dist/src/sync/events.js +2 -0
  314. package/dist/src/sync/events.js.map +1 -0
  315. package/dist/src/sync/relay-server.d.ts +18 -0
  316. package/dist/src/sync/relay-server.d.ts.map +1 -0
  317. package/dist/src/sync/relay-server.js +131 -0
  318. package/dist/src/sync/relay-server.js.map +1 -0
  319. package/dist/src/sync/sync-client.d.ts +31 -0
  320. package/dist/src/sync/sync-client.d.ts.map +1 -0
  321. package/dist/src/sync/sync-client.js +314 -0
  322. package/dist/src/sync/sync-client.js.map +1 -0
  323. package/dist/src/tui/app.d.ts +35 -0
  324. package/dist/src/tui/app.d.ts.map +1 -0
  325. package/dist/src/tui/app.js +676 -0
  326. package/dist/src/tui/app.js.map +1 -0
  327. package/dist/src/tui/components/activity-feed.d.ts +12 -0
  328. package/dist/src/tui/components/activity-feed.d.ts.map +1 -0
  329. package/dist/src/tui/components/activity-feed.js +82 -0
  330. package/dist/src/tui/components/activity-feed.js.map +1 -0
  331. package/dist/src/tui/components/agent-list.d.ts +19 -0
  332. package/dist/src/tui/components/agent-list.d.ts.map +1 -0
  333. package/dist/src/tui/components/agent-list.js +33 -0
  334. package/dist/src/tui/components/agent-list.js.map +1 -0
  335. package/dist/src/tui/components/agent-row.d.ts +12 -0
  336. package/dist/src/tui/components/agent-row.d.ts.map +1 -0
  337. package/dist/src/tui/components/agent-row.js +37 -0
  338. package/dist/src/tui/components/agent-row.js.map +1 -0
  339. package/dist/src/tui/components/approval-terminal.d.ts +13 -0
  340. package/dist/src/tui/components/approval-terminal.d.ts.map +1 -0
  341. package/dist/src/tui/components/approval-terminal.js +34 -0
  342. package/dist/src/tui/components/approval-terminal.js.map +1 -0
  343. package/dist/src/tui/components/audit-viewer.d.ts +16 -0
  344. package/dist/src/tui/components/audit-viewer.d.ts.map +1 -0
  345. package/dist/src/tui/components/audit-viewer.js +46 -0
  346. package/dist/src/tui/components/audit-viewer.js.map +1 -0
  347. package/dist/src/tui/components/auth-gate.d.ts +9 -0
  348. package/dist/src/tui/components/auth-gate.d.ts.map +1 -0
  349. package/dist/src/tui/components/auth-gate.js +112 -0
  350. package/dist/src/tui/components/auth-gate.js.map +1 -0
  351. package/dist/src/tui/components/command-palette.d.ts +12 -0
  352. package/dist/src/tui/components/command-palette.d.ts.map +1 -0
  353. package/dist/src/tui/components/command-palette.js +51 -0
  354. package/dist/src/tui/components/command-palette.js.map +1 -0
  355. package/dist/src/tui/components/compliance-badge.d.ts +11 -0
  356. package/dist/src/tui/components/compliance-badge.d.ts.map +1 -0
  357. package/dist/src/tui/components/compliance-badge.js +12 -0
  358. package/dist/src/tui/components/compliance-badge.js.map +1 -0
  359. package/dist/src/tui/components/decomposition-review.d.ts +10 -0
  360. package/dist/src/tui/components/decomposition-review.d.ts.map +1 -0
  361. package/dist/src/tui/components/decomposition-review.js +19 -0
  362. package/dist/src/tui/components/decomposition-review.js.map +1 -0
  363. package/dist/src/tui/components/dependency-graph.d.ts +13 -0
  364. package/dist/src/tui/components/dependency-graph.d.ts.map +1 -0
  365. package/dist/src/tui/components/dependency-graph.js +143 -0
  366. package/dist/src/tui/components/dependency-graph.js.map +1 -0
  367. package/dist/src/tui/components/diff-viewer.d.ts +11 -0
  368. package/dist/src/tui/components/diff-viewer.d.ts.map +1 -0
  369. package/dist/src/tui/components/diff-viewer.js +82 -0
  370. package/dist/src/tui/components/diff-viewer.js.map +1 -0
  371. package/dist/src/tui/components/edit-task-input.d.ts +10 -0
  372. package/dist/src/tui/components/edit-task-input.d.ts.map +1 -0
  373. package/dist/src/tui/components/edit-task-input.js +20 -0
  374. package/dist/src/tui/components/edit-task-input.js.map +1 -0
  375. package/dist/src/tui/components/footer.d.ts +12 -0
  376. package/dist/src/tui/components/footer.d.ts.map +1 -0
  377. package/dist/src/tui/components/footer.js +41 -0
  378. package/dist/src/tui/components/footer.js.map +1 -0
  379. package/dist/src/tui/components/header.d.ts +8 -0
  380. package/dist/src/tui/components/header.d.ts.map +1 -0
  381. package/dist/src/tui/components/header.js +20 -0
  382. package/dist/src/tui/components/header.js.map +1 -0
  383. package/dist/src/tui/components/human-actions.d.ts +14 -0
  384. package/dist/src/tui/components/human-actions.d.ts.map +1 -0
  385. package/dist/src/tui/components/human-actions.js +43 -0
  386. package/dist/src/tui/components/human-actions.js.map +1 -0
  387. package/dist/src/tui/components/log-panel.d.ts +10 -0
  388. package/dist/src/tui/components/log-panel.d.ts.map +1 -0
  389. package/dist/src/tui/components/log-panel.js +38 -0
  390. package/dist/src/tui/components/log-panel.js.map +1 -0
  391. package/dist/src/tui/components/memory-viewer.d.ts +10 -0
  392. package/dist/src/tui/components/memory-viewer.d.ts.map +1 -0
  393. package/dist/src/tui/components/memory-viewer.js +44 -0
  394. package/dist/src/tui/components/memory-viewer.js.map +1 -0
  395. package/dist/src/tui/components/new-task-input.d.ts +9 -0
  396. package/dist/src/tui/components/new-task-input.d.ts.map +1 -0
  397. package/dist/src/tui/components/new-task-input.js +21 -0
  398. package/dist/src/tui/components/new-task-input.js.map +1 -0
  399. package/dist/src/tui/components/orchestrator-status.d.ts +9 -0
  400. package/dist/src/tui/components/orchestrator-status.d.ts.map +1 -0
  401. package/dist/src/tui/components/orchestrator-status.js +15 -0
  402. package/dist/src/tui/components/orchestrator-status.js.map +1 -0
  403. package/dist/src/tui/components/parallelize-banner.d.ts +8 -0
  404. package/dist/src/tui/components/parallelize-banner.d.ts.map +1 -0
  405. package/dist/src/tui/components/parallelize-banner.js +9 -0
  406. package/dist/src/tui/components/parallelize-banner.js.map +1 -0
  407. package/dist/src/tui/components/progress-bar.d.ts +9 -0
  408. package/dist/src/tui/components/progress-bar.d.ts.map +1 -0
  409. package/dist/src/tui/components/progress-bar.js +15 -0
  410. package/dist/src/tui/components/progress-bar.js.map +1 -0
  411. package/dist/src/tui/components/review-queue.d.ts +13 -0
  412. package/dist/src/tui/components/review-queue.d.ts.map +1 -0
  413. package/dist/src/tui/components/review-queue.js +78 -0
  414. package/dist/src/tui/components/review-queue.js.map +1 -0
  415. package/dist/src/tui/components/rich-header.d.ts +11 -0
  416. package/dist/src/tui/components/rich-header.d.ts.map +1 -0
  417. package/dist/src/tui/components/rich-header.js +25 -0
  418. package/dist/src/tui/components/rich-header.js.map +1 -0
  419. package/dist/src/tui/components/spinner.d.ts +7 -0
  420. package/dist/src/tui/components/spinner.d.ts.map +1 -0
  421. package/dist/src/tui/components/spinner.js +8 -0
  422. package/dist/src/tui/components/spinner.js.map +1 -0
  423. package/dist/src/tui/components/status-bar.d.ts +23 -0
  424. package/dist/src/tui/components/status-bar.d.ts.map +1 -0
  425. package/dist/src/tui/components/status-bar.js +28 -0
  426. package/dist/src/tui/components/status-bar.js.map +1 -0
  427. package/dist/src/tui/components/task-queue.d.ts +11 -0
  428. package/dist/src/tui/components/task-queue.d.ts.map +1 -0
  429. package/dist/src/tui/components/task-queue.js +30 -0
  430. package/dist/src/tui/components/task-queue.js.map +1 -0
  431. package/dist/src/tui/components/team-view.d.ts +13 -0
  432. package/dist/src/tui/components/team-view.d.ts.map +1 -0
  433. package/dist/src/tui/components/team-view.js +12 -0
  434. package/dist/src/tui/components/team-view.js.map +1 -0
  435. package/dist/src/tui/graph-renderer.d.ts +11 -0
  436. package/dist/src/tui/graph-renderer.d.ts.map +1 -0
  437. package/dist/src/tui/graph-renderer.js +296 -0
  438. package/dist/src/tui/graph-renderer.js.map +1 -0
  439. package/dist/src/tui/hooks/use-bell.d.ts +21 -0
  440. package/dist/src/tui/hooks/use-bell.d.ts.map +1 -0
  441. package/dist/src/tui/hooks/use-bell.js +38 -0
  442. package/dist/src/tui/hooks/use-bell.js.map +1 -0
  443. package/dist/src/tui/hooks/use-ci-status.d.ts +16 -0
  444. package/dist/src/tui/hooks/use-ci-status.d.ts.map +1 -0
  445. package/dist/src/tui/hooks/use-ci-status.js +97 -0
  446. package/dist/src/tui/hooks/use-ci-status.js.map +1 -0
  447. package/dist/src/tui/hooks/use-command-palette.d.ts +37 -0
  448. package/dist/src/tui/hooks/use-command-palette.d.ts.map +1 -0
  449. package/dist/src/tui/hooks/use-command-palette.js +108 -0
  450. package/dist/src/tui/hooks/use-command-palette.js.map +1 -0
  451. package/dist/src/tui/hooks/use-diff-view.d.ts +16 -0
  452. package/dist/src/tui/hooks/use-diff-view.d.ts.map +1 -0
  453. package/dist/src/tui/hooks/use-diff-view.js +75 -0
  454. package/dist/src/tui/hooks/use-diff-view.js.map +1 -0
  455. package/dist/src/tui/hooks/use-keyboard.d.ts +3 -0
  456. package/dist/src/tui/hooks/use-keyboard.d.ts.map +1 -0
  457. package/dist/src/tui/hooks/use-keyboard.js +70 -0
  458. package/dist/src/tui/hooks/use-keyboard.js.map +1 -0
  459. package/dist/src/tui/hooks/use-log-stream.d.ts +25 -0
  460. package/dist/src/tui/hooks/use-log-stream.d.ts.map +1 -0
  461. package/dist/src/tui/hooks/use-log-stream.js +83 -0
  462. package/dist/src/tui/hooks/use-log-stream.js.map +1 -0
  463. package/dist/src/tui/hooks/use-spinner.d.ts +3 -0
  464. package/dist/src/tui/hooks/use-spinner.d.ts.map +1 -0
  465. package/dist/src/tui/hooks/use-spinner.js +13 -0
  466. package/dist/src/tui/hooks/use-spinner.js.map +1 -0
  467. package/dist/src/tui/hooks/use-store.d.ts +33 -0
  468. package/dist/src/tui/hooks/use-store.d.ts.map +1 -0
  469. package/dist/src/tui/hooks/use-store.js +21 -0
  470. package/dist/src/tui/hooks/use-store.js.map +1 -0
  471. package/dist/src/tui/lib/diff-parser.d.ts +24 -0
  472. package/dist/src/tui/lib/diff-parser.d.ts.map +1 -0
  473. package/dist/src/tui/lib/diff-parser.js +115 -0
  474. package/dist/src/tui/lib/diff-parser.js.map +1 -0
  475. package/dist/src/tui/lib/palette-commands.d.ts +14 -0
  476. package/dist/src/tui/lib/palette-commands.d.ts.map +1 -0
  477. package/dist/src/tui/lib/palette-commands.js +101 -0
  478. package/dist/src/tui/lib/palette-commands.js.map +1 -0
  479. package/dist/src/tui/tui.d.ts +8 -0
  480. package/dist/src/tui/tui.d.ts.map +1 -0
  481. package/dist/src/tui/tui.js +8 -0
  482. package/dist/src/tui/tui.js.map +1 -0
  483. package/package.json +66 -0
  484. package/skills/api-design.md +84 -0
  485. package/skills/backend-typescript.md +76 -0
  486. package/skills/data-modeling.md +73 -0
  487. package/skills/devops-ci.md +82 -0
  488. package/skills/frontend-design.md +69 -0
  489. package/skills/observability.md +73 -0
  490. package/skills/react-nextjs.md +76 -0
  491. package/skills/refactoring.md +77 -0
  492. package/skills/security.md +75 -0
  493. package/skills/testing.md +69 -0
@@ -0,0 +1,119 @@
1
+ import { spawn, execFile } from 'child_process';
2
+ import { promisify } from 'util';
3
+ import fs from 'fs';
4
+ import path from 'path';
5
+ const execFileAsync = promisify(execFile);
6
+ export function createClaudeProvider() {
7
+ const name = 'claude';
8
+ async function isAvailable() {
9
+ try {
10
+ await execFileAsync('claude', ['--version']);
11
+ return true;
12
+ }
13
+ catch {
14
+ return false;
15
+ }
16
+ }
17
+ function supportsFeature(feature) {
18
+ // Claude natively supports all Verbo features
19
+ return feature === 'mcp' || feature === 'worktree' || feature === 'tool-approval';
20
+ }
21
+ function writeWorktreeConfig(config) {
22
+ const { worktreePath, approvalPort, trustLevel = 'medium' } = config;
23
+ const claudeDir = path.join(worktreePath, '.claude');
24
+ if (!fs.existsSync(claudeDir))
25
+ fs.mkdirSync(claudeDir, { recursive: true });
26
+ // High trust: no approval hooks needed
27
+ if (trustLevel === 'high') {
28
+ fs.writeFileSync(path.join(claudeDir, 'settings.json'), JSON.stringify({}, null, 2));
29
+ return;
30
+ }
31
+ // Low trust: all tools need approval; Medium: only Bash/Write
32
+ const matcher = trustLevel === 'low' ? '.*' : 'Bash|Write';
33
+ const settings = {
34
+ hooks: {
35
+ PreToolUse: [
36
+ {
37
+ matcher,
38
+ hooks: [
39
+ {
40
+ type: 'http',
41
+ url: `http://127.0.0.1:${approvalPort}/hooks`,
42
+ timeout: 300,
43
+ },
44
+ ],
45
+ },
46
+ ],
47
+ },
48
+ };
49
+ fs.writeFileSync(path.join(claudeDir, 'settings.json'), JSON.stringify(settings, null, 2));
50
+ }
51
+ function translateToolDefinition(tool) {
52
+ // Claude natively supports MCP; no translation needed
53
+ return { raw: tool };
54
+ }
55
+ function translateToolCall(call) {
56
+ // Claude natively supports MCP; no translation needed
57
+ return { toolName: call.originalMCPTool, arguments: call.arguments };
58
+ }
59
+ function translateToolResult(result) {
60
+ // Claude natively supports MCP; no translation needed
61
+ return { callId: result.toolName, content: result.content, isError: result.isError };
62
+ }
63
+ async function launch(config, callbacks) {
64
+ const { worktreePath, worktreeBranch, promptText, mcpConfigPath, env = {} } = config;
65
+ const child = spawn('claude', [
66
+ '-p', promptText,
67
+ '--mcp-config', mcpConfigPath,
68
+ '--output-format', 'stream-json',
69
+ '--verbose',
70
+ '--allowedTools', 'Read,Glob,Grep,Edit,Write,Bash,mcp__verbo__claim_task,mcp__verbo__update_progress,mcp__verbo__complete_task,mcp__verbo__create_task,mcp__verbo__report_files,mcp__verbo__get_conflicts,mcp__verbo__unclaim_task,mcp__verbo__flag_human_action,mcp__verbo__list_human_actions,mcp__verbo__resolve_human_action,mcp__verbo__report_token_usage,mcp__verbo__spawn_subtask,mcp__verbo__await_subtask,mcp__verbo__list_tasks,mcp__verbo__list_sessions',
71
+ ], {
72
+ cwd: worktreePath,
73
+ stdio: ['ignore', 'pipe', 'pipe'],
74
+ env: { ...process.env, ...env },
75
+ });
76
+ if (callbacks?.onOutput && child.stdout) {
77
+ child.stdout.on('data', (data) => {
78
+ callbacks.onOutput(data.toString());
79
+ });
80
+ }
81
+ if (callbacks?.onError && child.stderr) {
82
+ child.stderr.on('data', (data) => {
83
+ callbacks.onError(data.toString());
84
+ });
85
+ }
86
+ if (callbacks?.onExit) {
87
+ child.on('close', (code, signal) => {
88
+ callbacks.onExit(code, signal);
89
+ });
90
+ }
91
+ return {
92
+ pid: child.pid,
93
+ process: child,
94
+ worktreePath,
95
+ worktreeBranch,
96
+ provider: name,
97
+ };
98
+ }
99
+ function kill(pid) {
100
+ try {
101
+ process.kill(pid);
102
+ }
103
+ catch {
104
+ // Process may already be dead — ignore the error
105
+ }
106
+ }
107
+ return {
108
+ name,
109
+ isAvailable,
110
+ supportsFeature,
111
+ writeWorktreeConfig,
112
+ translateToolDefinition,
113
+ translateToolCall,
114
+ translateToolResult,
115
+ launch,
116
+ kill,
117
+ };
118
+ }
119
+ //# sourceMappingURL=claude-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-provider.js","sourceRoot":"","sources":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AAC;QACpB,CAAC;QAAC,MAAM,CAAC;YACP,iDAAiD;QACnD,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI;QACJ,WAAW;QACX,eAAe;QACf,mBAAmB;QACnB,uBAAuB;QACvB,iBAAiB;QACjB,mBAAmB;QACnB,MAAM;QACN,IAAI;KACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { AgentProvider } from './types.js';
2
+ /**
3
+ * Gemini CLI provider.
4
+ *
5
+ * Since the Gemini CLI does not natively support MCP, this provider implements
6
+ * the shim layer:
7
+ * - MCP tool names are stripped of their namespace prefix and registered as
8
+ * Gemini FunctionDeclarations (e.g. `mcp__verbo__claim_task` → `claim_task`).
9
+ * - A per-instance Map<shortName, fullMCPName> enables reverse lookup when
10
+ * Gemini emits a `functionCall` JSON event.
11
+ */
12
+ export declare function createGeminiProvider(): AgentProvider;
13
+ //# sourceMappingURL=gemini-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-provider.d.ts","sourceRoot":"","sources":["../../../../src/agent/providers/gemini-provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EAYd,MAAM,YAAY,CAAC;AAIpB;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,IAAI,aAAa,CAoJpD"}
@@ -0,0 +1,143 @@
1
+ import { spawn, execFile } from 'child_process';
2
+ import { promisify } from 'util';
3
+ const execFileAsync = promisify(execFile);
4
+ /**
5
+ * Gemini CLI provider.
6
+ *
7
+ * Since the Gemini CLI does not natively support MCP, this provider implements
8
+ * the shim layer:
9
+ * - MCP tool names are stripped of their namespace prefix and registered as
10
+ * Gemini FunctionDeclarations (e.g. `mcp__verbo__claim_task` → `claim_task`).
11
+ * - A per-instance Map<shortName, fullMCPName> enables reverse lookup when
12
+ * Gemini emits a `functionCall` JSON event.
13
+ */
14
+ export function createGeminiProvider() {
15
+ const name = 'gemini';
16
+ // shortName → full MCP tool name (populated by translateToolDefinition)
17
+ const shortToMCP = new Map();
18
+ /**
19
+ * Strip all namespace segments from an MCP tool name.
20
+ * mcp__verbo__claim_task → claim_task
21
+ * verbo__status → status
22
+ * search → search
23
+ */
24
+ function stripNamespace(mcpName) {
25
+ const segments = mcpName.split('__');
26
+ return segments[segments.length - 1];
27
+ }
28
+ async function isAvailable() {
29
+ try {
30
+ await execFileAsync('gemini', ['--version']);
31
+ return true;
32
+ }
33
+ catch {
34
+ return false;
35
+ }
36
+ }
37
+ function supportsFeature(_feature) {
38
+ // Gemini CLI has no native MCP, worktree, or tool-approval support
39
+ return false;
40
+ }
41
+ function writeWorktreeConfig(_config) {
42
+ // Gemini CLI requires no project-level config file
43
+ }
44
+ /**
45
+ * Translate one MCP tool into a Gemini FunctionDeclaration and register the
46
+ * short name → full MCP name mapping for later reverse lookup.
47
+ */
48
+ function translateToolDefinition(tool) {
49
+ const shortName = stripNamespace(tool.name);
50
+ shortToMCP.set(shortName, tool.name);
51
+ const properties = {};
52
+ const required = [];
53
+ for (const param of tool.parameters) {
54
+ properties[param.name] = {
55
+ type: param.type,
56
+ description: param.description,
57
+ };
58
+ if (param.required) {
59
+ required.push(param.name);
60
+ }
61
+ }
62
+ return {
63
+ raw: {
64
+ name: shortName,
65
+ description: tool.description,
66
+ parameters: {
67
+ type: 'object',
68
+ properties,
69
+ required,
70
+ },
71
+ },
72
+ };
73
+ }
74
+ /**
75
+ * Translate a Gemini functionCall event back to an MCP tool call.
76
+ * `call.providerName` is the short name emitted by Gemini; we reverse-look it
77
+ * up in the map. Falls back to `call.originalMCPTool` if not found.
78
+ */
79
+ function translateToolCall(call) {
80
+ const fullName = shortToMCP.get(call.providerName) ?? call.originalMCPTool;
81
+ return {
82
+ toolName: fullName,
83
+ arguments: call.arguments,
84
+ };
85
+ }
86
+ function translateToolResult(result) {
87
+ return {
88
+ callId: result.toolName,
89
+ content: result.content,
90
+ isError: result.isError,
91
+ };
92
+ }
93
+ async function launch(config, callbacks) {
94
+ const { worktreePath, worktreeBranch, promptText, env = {} } = config;
95
+ const child = spawn('gemini', ['-p', promptText, '--output-format', 'json'], {
96
+ cwd: worktreePath,
97
+ stdio: ['ignore', 'pipe', 'pipe'],
98
+ env: { ...process.env, ...env },
99
+ });
100
+ if (callbacks?.onOutput && child.stdout) {
101
+ child.stdout.on('data', (data) => {
102
+ callbacks.onOutput(data.toString());
103
+ });
104
+ }
105
+ if (callbacks?.onError && child.stderr) {
106
+ child.stderr.on('data', (data) => {
107
+ callbacks.onError(data.toString());
108
+ });
109
+ }
110
+ if (callbacks?.onExit) {
111
+ child.on('close', (code, signal) => {
112
+ callbacks.onExit(code, signal);
113
+ });
114
+ }
115
+ return {
116
+ pid: child.pid,
117
+ process: child,
118
+ worktreePath,
119
+ worktreeBranch,
120
+ provider: name,
121
+ };
122
+ }
123
+ function kill(pid) {
124
+ try {
125
+ process.kill(pid);
126
+ }
127
+ catch {
128
+ // Process may already be dead — ignore the error
129
+ }
130
+ }
131
+ return {
132
+ name,
133
+ isAvailable,
134
+ supportsFeature,
135
+ writeWorktreeConfig,
136
+ translateToolDefinition,
137
+ translateToolCall,
138
+ translateToolResult,
139
+ launch,
140
+ kill,
141
+ };
142
+ }
143
+ //# sourceMappingURL=gemini-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-provider.js","sourceRoot":"","sources":["../../../../src/agent/providers/gemini-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAgBjC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,IAAI,GAAiB,QAAQ,CAAC;IAEpC,wEAAwE;IACxE,MAAM,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;IAE7C;;;;;OAKG;IACH,SAAS,cAAc,CAAC,OAAe;QACrC,M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AM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE;gBACvC,SAAS,CAAC,OAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACL,CAAC;QAED,IAAI,SAAS,EAAE,MAAM,EAAE,CAAC;YACtB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAmB,EAAE,MAAqB,EAAE,EAAE;gBAC/D,SAAS,CAAC,MAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,GAAG,EAAE,KAAK,CAAC,GAAa;YACxB,OAAO,EAAE,KAAK;YACd,YAAY;YACZ,cAAc;YACd,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC;IAED,SAAS,IAAI,CAAC,GAAW;QACvB,IAAI,CAAC;YACH,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;QAAC,MAAM,CAAC;YACP,iDAAiD;QACnD,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI;QACJ,WAAW;QACX,eAAe;QACf,mBAAmB;QACnB,uBAAuB;QACvB,iBAAiB;QACjB,mBAAmB;QACnB,MAAM;QACN,IAAI;KACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AgentProvider } from './types.js';
2
+ export declare function createOpenAIProvider(): AgentProvider;
3
+ //# sourceMappingURL=openai-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai-provider.d.ts","sourceRoot":"","sources":["../../../../src/agent/providers/openai-provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EAYd,MAAM,YAAY,CAAC;AAIpB,wBAAgB,oBAAoB,IAAI,aAAa,CA6IpD"}
@@ -0,0 +1,127 @@
1
+ import { spawn, execFile } from 'child_process';
2
+ import { promisify } from 'util';
3
+ const execFileAsync = promisify(execFile);
4
+ export function createOpenAIProvider() {
5
+ const name = 'openai';
6
+ // Namespace mapping: OpenAI function name → original MCP tool name
7
+ // e.g. "verbo__claim_task" → "mcp__verbo__claim_task"
8
+ const namespaceMap = new Map();
9
+ /** Convert an MCP tool name to its OpenAI function equivalent.
10
+ * mcp__verbo__claim_task → verbo__claim_task (strip leading "mcp__") */
11
+ function mcpToOpenAIName(mcpName) {
12
+ return mcpName.replace(/^mcp__/, '');
13
+ }
14
+ async function isAvailable() {
15
+ try {
16
+ await execFileAsync('codex', ['--version']);
17
+ return true;
18
+ }
19
+ catch {
20
+ return false;
21
+ }
22
+ }
23
+ function supportsFeature(feature) {
24
+ // Codex can work in any directory via cwd; MCP and hook-approval require native support
25
+ return feature === 'worktree';
26
+ }
27
+ function writeWorktreeConfig(_config) {
28
+ // OpenAI Codex does not require provider-specific config files in the worktree
29
+ }
30
+ function translateToolDefinition(tool) {
31
+ const openaiName = mcpToOpenAIName(tool.name);
32
+ namespaceMap.set(openaiName, tool.name);
33
+ const properties = {};
34
+ const required = [];
35
+ for (const param of tool.parameters) {
36
+ properties[param.name] = {
37
+ type: param.type,
38
+ description: param.description,
39
+ ...(param.schema ?? {}),
40
+ };
41
+ if (param.required)
42
+ required.push(param.name);
43
+ }
44
+ return {
45
+ raw: {
46
+ type: 'function',
47
+ function: {
48
+ name: openaiName,
49
+ description: tool.description,
50
+ parameters: {
51
+ type: 'object',
52
+ properties,
53
+ required,
54
+ },
55
+ },
56
+ },
57
+ };
58
+ }
59
+ function translateToolCall(call) {
60
+ // Reverse the namespace map; fall back to prefixing with "mcp__" if not registered
61
+ const mcpName = namespaceMap.get(call.providerName) ?? `mcp__${call.providerName}`;
62
+ return {
63
+ toolName: mcpName,
64
+ arguments: call.arguments,
65
+ };
66
+ }
67
+ function translateToolResult(result) {
68
+ return {
69
+ callId: result.toolName,
70
+ content: result.content,
71
+ isError: result.isError,
72
+ };
73
+ }
74
+ async function launch(config, callbacks) {
75
+ const { worktreePath, worktreeBranch, promptText, env = {} } = config;
76
+ const child = spawn('codex', [
77
+ '--approval-mode', 'auto',
78
+ promptText,
79
+ ], {
80
+ cwd: worktreePath,
81
+ stdio: ['ignore', 'pipe', 'pipe'],
82
+ env: { ...process.env, ...env },
83
+ });
84
+ if (callbacks?.onOutput && child.stdout) {
85
+ child.stdout.on('data', (data) => {
86
+ callbacks.onOutput(data.toString());
87
+ });
88
+ }
89
+ if (callbacks?.onError && child.stderr) {
90
+ child.stderr.on('data', (data) => {
91
+ callbacks.onError(data.toString());
92
+ });
93
+ }
94
+ if (callbacks?.onExit) {
95
+ child.on('close', (code, signal) => {
96
+ callbacks.onExit(code, signal);
97
+ });
98
+ }
99
+ return {
100
+ pid: child.pid,
101
+ process: child,
102
+ worktreePath,
103
+ worktreeBranch,
104
+ provider: name,
105
+ };
106
+ }
107
+ function kill(pid) {
108
+ try {
109
+ process.kill(pid);
110
+ }
111
+ catch {
112
+ // Process may already be dead — ignore the error
113
+ }
114
+ }
115
+ return {
116
+ name,
117
+ isAvailable,
118
+ supportsFeature,
119
+ writeWorktreeConfig,
120
+ translateToolDefinition,
121
+ translateToolCall,
122
+ translateToolResult,
123
+ launch,
124
+ kill,
125
+ };
126
+ }
127
+ //# sourceMappingURL=openai-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai-provider.js","sourceRoot":"","sources":["../../../../src/agent/providers/openai-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAgBjC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,MAAM,UAAU,oBAAoB;IAClC,MAAM,IAAI,GAAiB,QAAQ,CAAC;IAEpC,mEAAmE;IACnE,sDAAsD;IACtD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAE/C;8EAC0E;IAC1E,SAAS,eAAe,CAAC,OAA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vC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE;gBACvC,SAAS,CAAC,OAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACL,CAAC;QAED,IAAI,SAAS,EAAE,MAAM,EAAE,CAAC;YACtB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAmB,EAAE,MAAqB,EAAE,EAAE;gBAC/D,SAAS,CAAC,MAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,GAAG,EAAE,KAAK,CAAC,GAAa;YACxB,OAAO,EAAE,KAAK;YACd,YAAY;YACZ,cAAc;YACd,QAAQ,EAAE,IAAI;SACf,CAAC;IACJ,CAAC;IAED,SAAS,IAAI,CAAC,GAAW;QACvB,IAAI,CAAC;YACH,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;QAAC,MAAM,CAAC;YACP,iDAAiD;QACnD,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI;QACJ,WAAW;QACX,eAAe;QACf,mBAAmB;QACnB,uBAAuB;QACvB,iBAAiB;QACjB,mBAAmB;QACnB,MAAM;QACN,IAAI;KACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { AgentProvider } from './types.js';
2
+ export interface ProviderRegistry {
3
+ /** Register a provider. Later registrations for the same name overwrite earlier ones. */
4
+ register(provider: AgentProvider): void;
5
+ /** Return the provider registered under `name`, or undefined if not registered. */
6
+ get(name: string): AgentProvider | undefined;
7
+ /**
8
+ * Return all registered providers whose CLI is currently installed.
9
+ * Results are returned in registration order (i.e. preference order).
10
+ */
11
+ available(): Promise<AgentProvider[]>;
12
+ /**
13
+ * Return the highest-priority available provider, checking in registration order.
14
+ * Returns undefined when no registered provider is installed.
15
+ */
16
+ detect(): Promise<AgentProvider | undefined>;
17
+ }
18
+ export declare function createProviderRegistry(): ProviderRegistry;
19
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/agent/providers/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhD,MAAM,WAAW,gBAAgB;IAC/B,yFAAyF;IACzF,QAAQ,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAExC,mFAAmF;IACnF,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAE7C;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IAEtC;;;OAGG;IACH,MAAM,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC9C;AAID,wBAAgB,sBAAsB,IAAI,gBAAgB,CAgCzD"}
@@ -0,0 +1,30 @@
1
+ // ---- Factory ----
2
+ export function createProviderRegistry() {
3
+ // Insertion-ordered map — preserves preference order across register() calls.
4
+ const providers = new Map();
5
+ function register(provider) {
6
+ providers.set(provider.name, provider);
7
+ }
8
+ function get(name) {
9
+ return providers.get(name);
10
+ }
11
+ async function available() {
12
+ const results = [];
13
+ for (const provider of providers.values()) {
14
+ if (await provider.isAvailable()) {
15
+ results.push(provider);
16
+ }
17
+ }
18
+ return results;
19
+ }
20
+ async function detect() {
21
+ for (const provider of providers.values()) {
22
+ if (await provider.isAvailable()) {
23
+ return provider;
24
+ }
25
+ }
26
+ return undefined;
27
+ }
28
+ return { register, get, available, detect };
29
+ }
30
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/agent/providers/registry.ts"],"names":[],"mappings":"AAwBA,oBAAoB;AAEpB,MAAM,UAAU,sBAAsB;IACpC,8EAA8E;IAC9E,MAAM,SAAS,GAAG,IAAI,GAAG,EAAyB,CAAC;IAEnD,SAAS,QAAQ,CAAC,QAAuB;QACvC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,SAAS,GAAG,CAAC,IAAY;QACvB,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,KAAK,UAAU,SAAS;QACtB,MAAM,OAAO,GAAoB,EAAE,CAAC;QACpC,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC;YAC1C,IAAI,MAAM,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;gBACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,UAAU,MAAM;QACnB,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC;YAC1C,IAAI,MAAM,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;gBACjC,OAAO,QAAQ,CAAC;YAClB,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,118 @@
1
+ import type { ChildProcess } from 'child_process';
2
+ export type ProviderName = 'claude' | 'openai' | 'gemini';
3
+ export type ProviderFeature = 'mcp' | 'worktree' | 'tool-approval';
4
+ export type TrustLevel = 'low' | 'medium' | 'high';
5
+ export interface MCPToolParameter {
6
+ name: string;
7
+ description: string;
8
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array';
9
+ required: boolean;
10
+ schema?: Record<string, unknown>;
11
+ }
12
+ export interface MCPToolDefinition {
13
+ name: string;
14
+ description: string;
15
+ parameters: MCPToolParameter[];
16
+ }
17
+ export interface MCPToolCall {
18
+ toolName: string;
19
+ arguments: Record<string, unknown>;
20
+ }
21
+ export interface MCPToolResult {
22
+ toolName: string;
23
+ content: string;
24
+ isError: boolean;
25
+ }
26
+ export interface ProviderToolDefinition {
27
+ raw: unknown;
28
+ }
29
+ export interface ProviderToolCall {
30
+ id: string;
31
+ providerName: string;
32
+ arguments: Record<string, unknown>;
33
+ originalMCPTool: string;
34
+ }
35
+ export interface ProviderToolResult {
36
+ callId: string;
37
+ content: string;
38
+ isError: boolean;
39
+ }
40
+ export interface AgentProcess {
41
+ pid: number;
42
+ process: ChildProcess;
43
+ worktreePath: string;
44
+ worktreeBranch: string;
45
+ /** Provider that owns this process */
46
+ provider: ProviderName;
47
+ }
48
+ export interface AgentLaunchConfig {
49
+ taskId: string;
50
+ title: string;
51
+ description?: string;
52
+ filePaths?: string[];
53
+ trustLevel?: TrustLevel;
54
+ worktreePath: string;
55
+ worktreeBranch: string;
56
+ /** Path to verbo's mcp.json — providers that support MCP use this directly */
57
+ mcpConfigPath: string;
58
+ /** Pre-built prompt text from the orchestrator */
59
+ promptText: string;
60
+ approvalPort: number;
61
+ /** Additional environment variables to merge into the spawned process env */
62
+ env?: Record<string, string>;
63
+ /** Provider-level overrides from VERBO.md config */
64
+ providerOptions?: Record<string, unknown>;
65
+ }
66
+ export interface AgentLifecycleCallbacks {
67
+ onOutput?: (data: string) => void;
68
+ onError?: (data: string) => void;
69
+ onExit?: (code: number | null, signal: string | null) => void;
70
+ }
71
+ export interface AgentProvider {
72
+ /** Stable identifier */
73
+ readonly name: ProviderName;
74
+ /**
75
+ * Check whether this provider's CLI binary is installed and executable.
76
+ * Must not throw — return false if the binary is absent.
77
+ */
78
+ isAvailable(): Promise<boolean>;
79
+ /**
80
+ * Declare which optional Verbo features this provider supports.
81
+ * The orchestrator uses this to decide whether to write hook config, etc.
82
+ */
83
+ supportsFeature(feature: ProviderFeature): boolean;
84
+ /**
85
+ * Write provider-specific config into the worktree (e.g. .claude/settings.json
86
+ * for Claude). Called by orchestrator after createWorktree(), before launch().
87
+ */
88
+ writeWorktreeConfig(config: AgentLaunchConfig): void;
89
+ /**
90
+ * Translate one MCP tool definition into the provider's native function schema.
91
+ * Used by the shim layer for non-MCP providers.
92
+ */
93
+ translateToolDefinition(tool: MCPToolDefinition): ProviderToolDefinition;
94
+ /**
95
+ * Translate a provider's native function-call event back into an MCP tool call.
96
+ */
97
+ translateToolCall(call: ProviderToolCall): MCPToolCall;
98
+ /**
99
+ * Translate an MCP tool result back to the provider's native result format.
100
+ */
101
+ translateToolResult(result: MCPToolResult): ProviderToolResult;
102
+ /**
103
+ * Spawn the provider binary with all required flags. The orchestrator has
104
+ * already created the worktree and written config.
105
+ */
106
+ launch(config: AgentLaunchConfig, callbacks?: AgentLifecycleCallbacks): Promise<AgentProcess>;
107
+ /**
108
+ * Kill a running agent process.
109
+ */
110
+ kill(pid: number): void;
111
+ }
112
+ export interface ProviderRegistry {
113
+ register(provider: AgentProvider): void;
114
+ get(name: ProviderName): AgentProvider | undefined;
115
+ available(): Promise<AgentProvider[]>;
116
+ detect(): Promise<AgentProvider | undefined>;
117
+ }
118
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/agent/providers/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,UAAU,GAAG,eAAe,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAInD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAA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AAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE9F;;OAEG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAID,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IACxC,GAAG,CAAC,IAAI,EAAE,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;IACnD,SAAS,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACtC,MAAM,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC9C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/agent/providers/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import type { ApprovalStore } from './approval-store.js';
2
+ import type { AgentSessionStore } from '../core/agent-session-store.js';
3
+ export interface ApprovalServerOptions {
4
+ port: number;
5
+ approvals: ApprovalStore;
6
+ sessions?: AgentSessionStore;
7
+ pollIntervalMs?: number;
8
+ timeoutMs?: number;
9
+ }
10
+ export interface ApprovalServer {
11
+ port(): number;
12
+ isYoloMode(): boolean;
13
+ setYoloMode(enabled: boolean): void;
14
+ stop(): Promise<void>;
15
+ }
16
+ export declare function createApprovalServer(options: ApprovalServerOptions): Promise<ApprovalServer>;
17
+ //# sourceMappingURL=approval-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-server.d.ts","sourceRoot":"","sources":["../../../src/approval/approval-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAIxE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,IAAI,MAAM,CAAC;IACf,UAAU,IAAI,OAAO,CAAC;IACtB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAID,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC,CAiGlG"}