agent-bober 0.11.6 → 0.15.0

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 (570) hide show
  1. package/CHANGELOG.md +311 -0
  2. package/README.md +124 -9
  3. package/agents/bober-architect.md +38 -0
  4. package/agents/bober-code-reviewer.md +236 -0
  5. package/agents/bober-curator.md +37 -0
  6. package/agents/bober-deployer.md +267 -0
  7. package/agents/bober-diagnoser.md +289 -0
  8. package/agents/bober-evaluator.md +127 -1
  9. package/agents/bober-generator.md +122 -3
  10. package/agents/bober-planner.md +293 -32
  11. package/agents/bober-postmortemer.md +185 -0
  12. package/agents/bober-researcher.md +38 -0
  13. package/dist/cli/commands/approve.d.ts +17 -0
  14. package/dist/cli/commands/approve.d.ts.map +1 -0
  15. package/dist/cli/commands/approve.js +64 -0
  16. package/dist/cli/commands/approve.js.map +1 -0
  17. package/dist/cli/commands/audit-show.d.ts +14 -0
  18. package/dist/cli/commands/audit-show.d.ts.map +1 -0
  19. package/dist/cli/commands/audit-show.js +85 -0
  20. package/dist/cli/commands/audit-show.js.map +1 -0
  21. package/dist/cli/commands/config.d.ts +10 -0
  22. package/dist/cli/commands/config.d.ts.map +1 -0
  23. package/dist/cli/commands/config.js +73 -0
  24. package/dist/cli/commands/config.js.map +1 -0
  25. package/dist/cli/commands/eval.js +6 -6
  26. package/dist/cli/commands/eval.js.map +1 -1
  27. package/dist/cli/commands/graph.d.ts +8 -0
  28. package/dist/cli/commands/graph.d.ts.map +1 -0
  29. package/dist/cli/commands/graph.js +219 -0
  30. package/dist/cli/commands/graph.js.map +1 -0
  31. package/dist/cli/commands/impact.d.ts +19 -0
  32. package/dist/cli/commands/impact.d.ts.map +1 -0
  33. package/dist/cli/commands/impact.js +191 -0
  34. package/dist/cli/commands/impact.js.map +1 -0
  35. package/dist/cli/commands/incident.d.ts +19 -0
  36. package/dist/cli/commands/incident.d.ts.map +1 -0
  37. package/dist/cli/commands/incident.js +324 -0
  38. package/dist/cli/commands/incident.js.map +1 -0
  39. package/dist/cli/commands/init.js +82 -3
  40. package/dist/cli/commands/init.js.map +1 -1
  41. package/dist/cli/commands/list-approvals.d.ts +16 -0
  42. package/dist/cli/commands/list-approvals.d.ts.map +1 -0
  43. package/dist/cli/commands/list-approvals.js +57 -0
  44. package/dist/cli/commands/list-approvals.js.map +1 -0
  45. package/dist/cli/commands/onboard.d.ts +3 -0
  46. package/dist/cli/commands/onboard.d.ts.map +1 -0
  47. package/dist/cli/commands/onboard.js +190 -0
  48. package/dist/cli/commands/onboard.js.map +1 -0
  49. package/dist/cli/commands/plan.d.ts +12 -0
  50. package/dist/cli/commands/plan.d.ts.map +1 -1
  51. package/dist/cli/commands/plan.js +232 -37
  52. package/dist/cli/commands/plan.js.map +1 -1
  53. package/dist/cli/commands/playbook.d.ts +17 -0
  54. package/dist/cli/commands/playbook.d.ts.map +1 -0
  55. package/dist/cli/commands/playbook.js +123 -0
  56. package/dist/cli/commands/playbook.js.map +1 -0
  57. package/dist/cli/commands/postmortem.d.ts +12 -0
  58. package/dist/cli/commands/postmortem.d.ts.map +1 -0
  59. package/dist/cli/commands/postmortem.js +67 -0
  60. package/dist/cli/commands/postmortem.js.map +1 -0
  61. package/dist/cli/commands/reject.d.ts +17 -0
  62. package/dist/cli/commands/reject.d.ts.map +1 -0
  63. package/dist/cli/commands/reject.js +52 -0
  64. package/dist/cli/commands/reject.js.map +1 -0
  65. package/dist/cli/commands/rollback.d.ts +21 -0
  66. package/dist/cli/commands/rollback.d.ts.map +1 -0
  67. package/dist/cli/commands/rollback.js +90 -0
  68. package/dist/cli/commands/rollback.js.map +1 -0
  69. package/dist/cli/commands/run.d.ts +9 -0
  70. package/dist/cli/commands/run.d.ts.map +1 -1
  71. package/dist/cli/commands/run.js +31 -2
  72. package/dist/cli/commands/run.js.map +1 -1
  73. package/dist/cli/commands/sprint.d.ts.map +1 -1
  74. package/dist/cli/commands/sprint.js +8 -8
  75. package/dist/cli/commands/sprint.js.map +1 -1
  76. package/dist/cli/commands/telemetry.d.ts +16 -0
  77. package/dist/cli/commands/telemetry.d.ts.map +1 -0
  78. package/dist/cli/commands/telemetry.js +152 -0
  79. package/dist/cli/commands/telemetry.js.map +1 -0
  80. package/dist/cli/commands/worktree.d.ts +12 -0
  81. package/dist/cli/commands/worktree.d.ts.map +1 -0
  82. package/dist/cli/commands/worktree.js +57 -0
  83. package/dist/cli/commands/worktree.js.map +1 -0
  84. package/dist/cli/index.js +73 -2
  85. package/dist/cli/index.js.map +1 -1
  86. package/dist/config/defaults.d.ts.map +1 -1
  87. package/dist/config/defaults.js +27 -0
  88. package/dist/config/defaults.js.map +1 -1
  89. package/dist/config/index.d.ts +1 -1
  90. package/dist/config/index.d.ts.map +1 -1
  91. package/dist/config/index.js +4 -0
  92. package/dist/config/index.js.map +1 -1
  93. package/dist/config/loader.d.ts.map +1 -1
  94. package/dist/config/loader.js +18 -1
  95. package/dist/config/loader.js.map +1 -1
  96. package/dist/config/schema.d.ts +1016 -96
  97. package/dist/config/schema.d.ts.map +1 -1
  98. package/dist/config/schema.js +147 -0
  99. package/dist/config/schema.js.map +1 -1
  100. package/dist/contracts/eval-result.d.ts +38 -38
  101. package/dist/contracts/index.d.ts +2 -2
  102. package/dist/contracts/index.d.ts.map +1 -1
  103. package/dist/contracts/index.js +8 -4
  104. package/dist/contracts/index.js.map +1 -1
  105. package/dist/contracts/spec.d.ts +335 -40
  106. package/dist/contracts/spec.d.ts.map +1 -1
  107. package/dist/contracts/spec.js +210 -18
  108. package/dist/contracts/spec.js.map +1 -1
  109. package/dist/contracts/sprint-contract.d.ts +155 -88
  110. package/dist/contracts/sprint-contract.d.ts.map +1 -1
  111. package/dist/contracts/sprint-contract.js +176 -29
  112. package/dist/contracts/sprint-contract.js.map +1 -1
  113. package/dist/evaluators/builtin/api-check.js +1 -1
  114. package/dist/evaluators/builtin/api-check.js.map +1 -1
  115. package/dist/graph/artifact-store.d.ts +14 -0
  116. package/dist/graph/artifact-store.d.ts.map +1 -0
  117. package/dist/graph/artifact-store.js +100 -0
  118. package/dist/graph/artifact-store.js.map +1 -0
  119. package/dist/graph/cli.d.ts +49 -0
  120. package/dist/graph/cli.d.ts.map +1 -0
  121. package/dist/graph/cli.js +140 -0
  122. package/dist/graph/cli.js.map +1 -0
  123. package/dist/graph/client.d.ts +64 -0
  124. package/dist/graph/client.d.ts.map +1 -0
  125. package/dist/graph/client.js +216 -0
  126. package/dist/graph/client.js.map +1 -0
  127. package/dist/graph/fallback.d.ts +13 -0
  128. package/dist/graph/fallback.d.ts.map +1 -0
  129. package/dist/graph/fallback.js +57 -0
  130. package/dist/graph/fallback.js.map +1 -0
  131. package/dist/graph/hook-handler.d.ts +50 -0
  132. package/dist/graph/hook-handler.d.ts.map +1 -0
  133. package/dist/graph/hook-handler.js +217 -0
  134. package/dist/graph/hook-handler.js.map +1 -0
  135. package/dist/graph/incidents.d.ts +59 -0
  136. package/dist/graph/incidents.d.ts.map +1 -0
  137. package/dist/graph/incidents.js +22 -0
  138. package/dist/graph/incidents.js.map +1 -0
  139. package/dist/graph/mcp-client.d.ts +51 -0
  140. package/dist/graph/mcp-client.d.ts.map +1 -0
  141. package/dist/graph/mcp-client.js +285 -0
  142. package/dist/graph/mcp-client.js.map +1 -0
  143. package/dist/graph/onboarding-composer.d.ts +30 -0
  144. package/dist/graph/onboarding-composer.d.ts.map +1 -0
  145. package/dist/graph/onboarding-composer.js +275 -0
  146. package/dist/graph/onboarding-composer.js.map +1 -0
  147. package/dist/graph/pipeline-lifecycle.d.ts +86 -0
  148. package/dist/graph/pipeline-lifecycle.d.ts.map +1 -0
  149. package/dist/graph/pipeline-lifecycle.js +329 -0
  150. package/dist/graph/pipeline-lifecycle.js.map +1 -0
  151. package/dist/graph/preflight-budgets.d.ts +52 -0
  152. package/dist/graph/preflight-budgets.d.ts.map +1 -0
  153. package/dist/graph/preflight-budgets.js +78 -0
  154. package/dist/graph/preflight-budgets.js.map +1 -0
  155. package/dist/graph/preflight-injector.d.ts +116 -0
  156. package/dist/graph/preflight-injector.d.ts.map +1 -0
  157. package/dist/graph/preflight-injector.js +538 -0
  158. package/dist/graph/preflight-injector.js.map +1 -0
  159. package/dist/graph/prereq.d.ts +12 -0
  160. package/dist/graph/prereq.d.ts.map +1 -0
  161. package/dist/graph/prereq.js +61 -0
  162. package/dist/graph/prereq.js.map +1 -0
  163. package/dist/graph/prompts.d.ts +42 -0
  164. package/dist/graph/prompts.d.ts.map +1 -0
  165. package/dist/graph/prompts.js +80 -0
  166. package/dist/graph/prompts.js.map +1 -0
  167. package/dist/graph/sandbox.d.ts +19 -0
  168. package/dist/graph/sandbox.d.ts.map +1 -0
  169. package/dist/graph/sandbox.js +25 -0
  170. package/dist/graph/sandbox.js.map +1 -0
  171. package/dist/graph/token-usage.d.ts +21 -0
  172. package/dist/graph/token-usage.d.ts.map +1 -0
  173. package/dist/graph/token-usage.js +22 -0
  174. package/dist/graph/token-usage.js.map +1 -0
  175. package/dist/graph/types.d.ts +129 -0
  176. package/dist/graph/types.d.ts.map +1 -0
  177. package/dist/graph/types.js +12 -0
  178. package/dist/graph/types.js.map +1 -0
  179. package/dist/incident/orchestrator.d.ts +168 -0
  180. package/dist/incident/orchestrator.d.ts.map +1 -0
  181. package/dist/incident/orchestrator.js +279 -0
  182. package/dist/incident/orchestrator.js.map +1 -0
  183. package/dist/incident/playbook-search.d.ts +67 -0
  184. package/dist/incident/playbook-search.d.ts.map +1 -0
  185. package/dist/incident/playbook-search.js +288 -0
  186. package/dist/incident/playbook-search.js.map +1 -0
  187. package/dist/incident/postmortem.d.ts +44 -0
  188. package/dist/incident/postmortem.d.ts.map +1 -0
  189. package/dist/incident/postmortem.js +486 -0
  190. package/dist/incident/postmortem.js.map +1 -0
  191. package/dist/incident/resolution-verify.d.ts +186 -0
  192. package/dist/incident/resolution-verify.d.ts.map +1 -0
  193. package/dist/incident/resolution-verify.js +210 -0
  194. package/dist/incident/resolution-verify.js.map +1 -0
  195. package/dist/incident/rollback.d.ts +137 -0
  196. package/dist/incident/rollback.d.ts.map +1 -0
  197. package/dist/incident/rollback.js +328 -0
  198. package/dist/incident/rollback.js.map +1 -0
  199. package/dist/incident/timeline.d.ts +147 -0
  200. package/dist/incident/timeline.d.ts.map +1 -0
  201. package/dist/incident/timeline.js +452 -0
  202. package/dist/incident/timeline.js.map +1 -0
  203. package/dist/incident/types.d.ts +335 -0
  204. package/dist/incident/types.d.ts.map +1 -0
  205. package/dist/incident/types.js +158 -0
  206. package/dist/incident/types.js.map +1 -0
  207. package/dist/index.d.ts +3 -3
  208. package/dist/index.d.ts.map +1 -1
  209. package/dist/index.js +3 -3
  210. package/dist/index.js.map +1 -1
  211. package/dist/mcp/event-stream.d.ts +46 -0
  212. package/dist/mcp/event-stream.d.ts.map +1 -0
  213. package/dist/mcp/event-stream.js +421 -0
  214. package/dist/mcp/event-stream.js.map +1 -0
  215. package/dist/mcp/external-client.d.ts +38 -0
  216. package/dist/mcp/external-client.d.ts.map +1 -0
  217. package/dist/mcp/external-client.js +121 -0
  218. package/dist/mcp/external-client.js.map +1 -0
  219. package/dist/mcp/run-manager.d.ts +74 -9
  220. package/dist/mcp/run-manager.d.ts.map +1 -1
  221. package/dist/mcp/run-manager.js +127 -31
  222. package/dist/mcp/run-manager.js.map +1 -1
  223. package/dist/mcp/server.d.ts.map +1 -1
  224. package/dist/mcp/server.js +56 -0
  225. package/dist/mcp/server.js.map +1 -1
  226. package/dist/mcp/tools/abort-run.d.ts +2 -0
  227. package/dist/mcp/tools/abort-run.d.ts.map +1 -0
  228. package/dist/mcp/tools/abort-run.js +62 -0
  229. package/dist/mcp/tools/abort-run.js.map +1 -0
  230. package/dist/mcp/tools/anchor.js +1 -1
  231. package/dist/mcp/tools/anchor.js.map +1 -1
  232. package/dist/mcp/tools/approve-checkpoint.d.ts +2 -0
  233. package/dist/mcp/tools/approve-checkpoint.d.ts.map +1 -0
  234. package/dist/mcp/tools/approve-checkpoint.js +70 -0
  235. package/dist/mcp/tools/approve-checkpoint.js.map +1 -0
  236. package/dist/mcp/tools/brownfield.js +1 -1
  237. package/dist/mcp/tools/brownfield.js.map +1 -1
  238. package/dist/mcp/tools/contracts.js +2 -2
  239. package/dist/mcp/tools/contracts.js.map +1 -1
  240. package/dist/mcp/tools/eval.js +8 -8
  241. package/dist/mcp/tools/eval.js.map +1 -1
  242. package/dist/mcp/tools/get-project-state.d.ts +2 -0
  243. package/dist/mcp/tools/get-project-state.d.ts.map +1 -0
  244. package/dist/mcp/tools/get-project-state.js +107 -0
  245. package/dist/mcp/tools/get-project-state.js.map +1 -0
  246. package/dist/mcp/tools/get-run-status.d.ts +2 -0
  247. package/dist/mcp/tools/get-run-status.d.ts.map +1 -0
  248. package/dist/mcp/tools/get-run-status.js +40 -0
  249. package/dist/mcp/tools/get-run-status.js.map +1 -0
  250. package/dist/mcp/tools/graph-schemas.d.ts +100 -0
  251. package/dist/mcp/tools/graph-schemas.d.ts.map +1 -0
  252. package/dist/mcp/tools/graph-schemas.js +39 -0
  253. package/dist/mcp/tools/graph-schemas.js.map +1 -0
  254. package/dist/mcp/tools/graph.d.ts +19 -0
  255. package/dist/mcp/tools/graph.d.ts.map +1 -0
  256. package/dist/mcp/tools/graph.js +263 -0
  257. package/dist/mcp/tools/graph.js.map +1 -0
  258. package/dist/mcp/tools/incident.d.ts +2 -0
  259. package/dist/mcp/tools/incident.d.ts.map +1 -0
  260. package/dist/mcp/tools/incident.js +246 -0
  261. package/dist/mcp/tools/incident.js.map +1 -0
  262. package/dist/mcp/tools/index.d.ts +38 -18
  263. package/dist/mcp/tools/index.d.ts.map +1 -1
  264. package/dist/mcp/tools/index.js +74 -18
  265. package/dist/mcp/tools/index.js.map +1 -1
  266. package/dist/mcp/tools/list-active-runs.d.ts +2 -0
  267. package/dist/mcp/tools/list-active-runs.d.ts.map +1 -0
  268. package/dist/mcp/tools/list-active-runs.js +35 -0
  269. package/dist/mcp/tools/list-active-runs.js.map +1 -0
  270. package/dist/mcp/tools/list-pending-approvals.d.ts +2 -0
  271. package/dist/mcp/tools/list-pending-approvals.d.ts.map +1 -0
  272. package/dist/mcp/tools/list-pending-approvals.js +40 -0
  273. package/dist/mcp/tools/list-pending-approvals.js.map +1 -0
  274. package/dist/mcp/tools/list-projects.d.ts +2 -0
  275. package/dist/mcp/tools/list-projects.d.ts.map +1 -0
  276. package/dist/mcp/tools/list-projects.js +101 -0
  277. package/dist/mcp/tools/list-projects.js.map +1 -0
  278. package/dist/mcp/tools/list-specs.d.ts +2 -0
  279. package/dist/mcp/tools/list-specs.d.ts.map +1 -0
  280. package/dist/mcp/tools/list-specs.js +48 -0
  281. package/dist/mcp/tools/list-specs.js.map +1 -0
  282. package/dist/mcp/tools/plan.d.ts.map +1 -1
  283. package/dist/mcp/tools/plan.js +40 -14
  284. package/dist/mcp/tools/plan.js.map +1 -1
  285. package/dist/mcp/tools/playbook.d.ts +2 -0
  286. package/dist/mcp/tools/playbook.d.ts.map +1 -0
  287. package/dist/mcp/tools/playbook.js +104 -0
  288. package/dist/mcp/tools/playbook.js.map +1 -0
  289. package/dist/mcp/tools/postmortem.d.ts +2 -0
  290. package/dist/mcp/tools/postmortem.d.ts.map +1 -0
  291. package/dist/mcp/tools/postmortem.js +75 -0
  292. package/dist/mcp/tools/postmortem.js.map +1 -0
  293. package/dist/mcp/tools/react.js +1 -1
  294. package/dist/mcp/tools/react.js.map +1 -1
  295. package/dist/mcp/tools/reject-checkpoint.d.ts +2 -0
  296. package/dist/mcp/tools/reject-checkpoint.d.ts.map +1 -0
  297. package/dist/mcp/tools/reject-checkpoint.js +79 -0
  298. package/dist/mcp/tools/reject-checkpoint.js.map +1 -0
  299. package/dist/mcp/tools/rollback.d.ts +2 -0
  300. package/dist/mcp/tools/rollback.d.ts.map +1 -0
  301. package/dist/mcp/tools/rollback.js +78 -0
  302. package/dist/mcp/tools/rollback.js.map +1 -0
  303. package/dist/mcp/tools/run-in-worktree.d.ts +2 -0
  304. package/dist/mcp/tools/run-in-worktree.d.ts.map +1 -0
  305. package/dist/mcp/tools/run-in-worktree.js +90 -0
  306. package/dist/mcp/tools/run-in-worktree.js.map +1 -0
  307. package/dist/mcp/tools/run.js +1 -1
  308. package/dist/mcp/tools/run.js.map +1 -1
  309. package/dist/mcp/tools/solidity.js +1 -1
  310. package/dist/mcp/tools/solidity.js.map +1 -1
  311. package/dist/mcp/tools/sprint.d.ts.map +1 -1
  312. package/dist/mcp/tools/sprint.js +11 -11
  313. package/dist/mcp/tools/sprint.js.map +1 -1
  314. package/dist/mcp/tools/status.d.ts.map +1 -1
  315. package/dist/mcp/tools/status.js +11 -0
  316. package/dist/mcp/tools/status.js.map +1 -1
  317. package/dist/mcp/tools/subscribe-events.d.ts +2 -0
  318. package/dist/mcp/tools/subscribe-events.d.ts.map +1 -0
  319. package/dist/mcp/tools/subscribe-events.js +48 -0
  320. package/dist/mcp/tools/subscribe-events.js.map +1 -0
  321. package/dist/mcp/tools/unsubscribe-events.d.ts +2 -0
  322. package/dist/mcp/tools/unsubscribe-events.d.ts.map +1 -0
  323. package/dist/mcp/tools/unsubscribe-events.js +45 -0
  324. package/dist/mcp/tools/unsubscribe-events.js.map +1 -0
  325. package/dist/orchestrator/agent-loader.d.ts +16 -0
  326. package/dist/orchestrator/agent-loader.d.ts.map +1 -1
  327. package/dist/orchestrator/agent-loader.js +16 -0
  328. package/dist/orchestrator/agent-loader.js.map +1 -1
  329. package/dist/orchestrator/architect-agent.d.ts.map +1 -1
  330. package/dist/orchestrator/architect-agent.js +37 -8
  331. package/dist/orchestrator/architect-agent.js.map +1 -1
  332. package/dist/orchestrator/checkpoints/audit.d.ts +128 -0
  333. package/dist/orchestrator/checkpoints/audit.d.ts.map +1 -0
  334. package/dist/orchestrator/checkpoints/audit.js +272 -0
  335. package/dist/orchestrator/checkpoints/audit.js.map +1 -0
  336. package/dist/orchestrator/checkpoints/feedback-router.d.ts +213 -0
  337. package/dist/orchestrator/checkpoints/feedback-router.d.ts.map +1 -0
  338. package/dist/orchestrator/checkpoints/feedback-router.js +438 -0
  339. package/dist/orchestrator/checkpoints/feedback-router.js.map +1 -0
  340. package/dist/orchestrator/checkpoints/index.d.ts +11 -0
  341. package/dist/orchestrator/checkpoints/index.d.ts.map +1 -0
  342. package/dist/orchestrator/checkpoints/index.js +12 -0
  343. package/dist/orchestrator/checkpoints/index.js.map +1 -0
  344. package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts +35 -0
  345. package/dist/orchestrator/checkpoints/mechanisms/cli.d.ts.map +1 -0
  346. package/dist/orchestrator/checkpoints/mechanisms/cli.js +153 -0
  347. package/dist/orchestrator/checkpoints/mechanisms/cli.js.map +1 -0
  348. package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts +34 -0
  349. package/dist/orchestrator/checkpoints/mechanisms/disk.d.ts.map +1 -0
  350. package/dist/orchestrator/checkpoints/mechanisms/disk.js +139 -0
  351. package/dist/orchestrator/checkpoints/mechanisms/disk.js.map +1 -0
  352. package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts +141 -0
  353. package/dist/orchestrator/checkpoints/mechanisms/pr.d.ts.map +1 -0
  354. package/dist/orchestrator/checkpoints/mechanisms/pr.js +445 -0
  355. package/dist/orchestrator/checkpoints/mechanisms/pr.js.map +1 -0
  356. package/dist/orchestrator/checkpoints/noop.d.ts +12 -0
  357. package/dist/orchestrator/checkpoints/noop.d.ts.map +1 -0
  358. package/dist/orchestrator/checkpoints/noop.js +13 -0
  359. package/dist/orchestrator/checkpoints/noop.js.map +1 -0
  360. package/dist/orchestrator/checkpoints/registry.d.ts +48 -0
  361. package/dist/orchestrator/checkpoints/registry.d.ts.map +1 -0
  362. package/dist/orchestrator/checkpoints/registry.js +89 -0
  363. package/dist/orchestrator/checkpoints/registry.js.map +1 -0
  364. package/dist/orchestrator/checkpoints/renderers/_util.d.ts +50 -0
  365. package/dist/orchestrator/checkpoints/renderers/_util.d.ts.map +1 -0
  366. package/dist/orchestrator/checkpoints/renderers/_util.js +137 -0
  367. package/dist/orchestrator/checkpoints/renderers/_util.js.map +1 -0
  368. package/dist/orchestrator/checkpoints/renderers/code-review.d.ts +15 -0
  369. package/dist/orchestrator/checkpoints/renderers/code-review.d.ts.map +1 -0
  370. package/dist/orchestrator/checkpoints/renderers/code-review.js +66 -0
  371. package/dist/orchestrator/checkpoints/renderers/code-review.js.map +1 -0
  372. package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts +15 -0
  373. package/dist/orchestrator/checkpoints/renderers/curator-briefing.d.ts.map +1 -0
  374. package/dist/orchestrator/checkpoints/renderers/curator-briefing.js +40 -0
  375. package/dist/orchestrator/checkpoints/renderers/curator-briefing.js.map +1 -0
  376. package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts +15 -0
  377. package/dist/orchestrator/checkpoints/renderers/eval-result.d.ts.map +1 -0
  378. package/dist/orchestrator/checkpoints/renderers/eval-result.js +54 -0
  379. package/dist/orchestrator/checkpoints/renderers/eval-result.js.map +1 -0
  380. package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts +49 -0
  381. package/dist/orchestrator/checkpoints/renderers/generator-diff.d.ts.map +1 -0
  382. package/dist/orchestrator/checkpoints/renderers/generator-diff.js +154 -0
  383. package/dist/orchestrator/checkpoints/renderers/generator-diff.js.map +1 -0
  384. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts +15 -0
  385. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.d.ts.map +1 -0
  386. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js +59 -0
  387. package/dist/orchestrator/checkpoints/renderers/pipeline-summary.js.map +1 -0
  388. package/dist/orchestrator/checkpoints/renderers/plan.d.ts +15 -0
  389. package/dist/orchestrator/checkpoints/renderers/plan.d.ts.map +1 -0
  390. package/dist/orchestrator/checkpoints/renderers/plan.js +34 -0
  391. package/dist/orchestrator/checkpoints/renderers/plan.js.map +1 -0
  392. package/dist/orchestrator/checkpoints/renderers/registry.d.ts +43 -0
  393. package/dist/orchestrator/checkpoints/renderers/registry.d.ts.map +1 -0
  394. package/dist/orchestrator/checkpoints/renderers/registry.js +83 -0
  395. package/dist/orchestrator/checkpoints/renderers/registry.js.map +1 -0
  396. package/dist/orchestrator/checkpoints/renderers/research.d.ts +15 -0
  397. package/dist/orchestrator/checkpoints/renderers/research.d.ts.map +1 -0
  398. package/dist/orchestrator/checkpoints/renderers/research.js +39 -0
  399. package/dist/orchestrator/checkpoints/renderers/research.js.map +1 -0
  400. package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts +20 -0
  401. package/dist/orchestrator/checkpoints/renderers/sprint-contract.d.ts.map +1 -0
  402. package/dist/orchestrator/checkpoints/renderers/sprint-contract.js +57 -0
  403. package/dist/orchestrator/checkpoints/renderers/sprint-contract.js.map +1 -0
  404. package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts +15 -0
  405. package/dist/orchestrator/checkpoints/renderers/sprint-summary.d.ts.map +1 -0
  406. package/dist/orchestrator/checkpoints/renderers/sprint-summary.js +38 -0
  407. package/dist/orchestrator/checkpoints/renderers/sprint-summary.js.map +1 -0
  408. package/dist/orchestrator/checkpoints/sites.d.ts +22 -0
  409. package/dist/orchestrator/checkpoints/sites.d.ts.map +1 -0
  410. package/dist/orchestrator/checkpoints/sites.js +57 -0
  411. package/dist/orchestrator/checkpoints/sites.js.map +1 -0
  412. package/dist/orchestrator/checkpoints/types.d.ts +51 -0
  413. package/dist/orchestrator/checkpoints/types.d.ts.map +1 -0
  414. package/dist/orchestrator/checkpoints/types.js +9 -0
  415. package/dist/orchestrator/checkpoints/types.js.map +1 -0
  416. package/dist/orchestrator/code-reviewer-agent.d.ts +50 -0
  417. package/dist/orchestrator/code-reviewer-agent.d.ts.map +1 -0
  418. package/dist/orchestrator/code-reviewer-agent.js +283 -0
  419. package/dist/orchestrator/code-reviewer-agent.js.map +1 -0
  420. package/dist/orchestrator/context-handoff.d.ts +484 -224
  421. package/dist/orchestrator/context-handoff.d.ts.map +1 -1
  422. package/dist/orchestrator/context-handoff.js +32 -12
  423. package/dist/orchestrator/context-handoff.js.map +1 -1
  424. package/dist/orchestrator/curator-agent.d.ts.map +1 -1
  425. package/dist/orchestrator/curator-agent.js +63 -12
  426. package/dist/orchestrator/curator-agent.js.map +1 -1
  427. package/dist/orchestrator/deploy/classify.d.ts +31 -0
  428. package/dist/orchestrator/deploy/classify.d.ts.map +1 -0
  429. package/dist/orchestrator/deploy/classify.js +109 -0
  430. package/dist/orchestrator/deploy/classify.js.map +1 -0
  431. package/dist/orchestrator/deploy/execute.d.ts +45 -0
  432. package/dist/orchestrator/deploy/execute.d.ts.map +1 -0
  433. package/dist/orchestrator/deploy/execute.js +146 -0
  434. package/dist/orchestrator/deploy/execute.js.map +1 -0
  435. package/dist/orchestrator/deploy/executor.d.ts +22 -0
  436. package/dist/orchestrator/deploy/executor.d.ts.map +1 -0
  437. package/dist/orchestrator/deploy/executor.js +31 -0
  438. package/dist/orchestrator/deploy/executor.js.map +1 -0
  439. package/dist/orchestrator/deploy/index.d.ts +21 -0
  440. package/dist/orchestrator/deploy/index.d.ts.map +1 -0
  441. package/dist/orchestrator/deploy/index.js +21 -0
  442. package/dist/orchestrator/deploy/index.js.map +1 -0
  443. package/dist/orchestrator/deploy/resolve.d.ts +51 -0
  444. package/dist/orchestrator/deploy/resolve.d.ts.map +1 -0
  445. package/dist/orchestrator/deploy/resolve.js +53 -0
  446. package/dist/orchestrator/deploy/resolve.js.map +1 -0
  447. package/dist/orchestrator/deploy/spawn.d.ts +60 -0
  448. package/dist/orchestrator/deploy/spawn.d.ts.map +1 -0
  449. package/dist/orchestrator/deploy/spawn.js +62 -0
  450. package/dist/orchestrator/deploy/spawn.js.map +1 -0
  451. package/dist/orchestrator/deploy/types.d.ts +98 -0
  452. package/dist/orchestrator/deploy/types.d.ts.map +1 -0
  453. package/dist/orchestrator/deploy/types.js +39 -0
  454. package/dist/orchestrator/deploy/types.js.map +1 -0
  455. package/dist/orchestrator/evaluator-agent.d.ts.map +1 -1
  456. package/dist/orchestrator/evaluator-agent.js +23 -10
  457. package/dist/orchestrator/evaluator-agent.js.map +1 -1
  458. package/dist/orchestrator/generator-agent.d.ts.map +1 -1
  459. package/dist/orchestrator/generator-agent.js +24 -11
  460. package/dist/orchestrator/generator-agent.js.map +1 -1
  461. package/dist/orchestrator/model-resolver.d.ts.map +1 -1
  462. package/dist/orchestrator/model-resolver.js +4 -2
  463. package/dist/orchestrator/model-resolver.js.map +1 -1
  464. package/dist/orchestrator/observability/index.d.ts +12 -0
  465. package/dist/orchestrator/observability/index.d.ts.map +1 -0
  466. package/dist/orchestrator/observability/index.js +12 -0
  467. package/dist/orchestrator/observability/index.js.map +1 -0
  468. package/dist/orchestrator/observability/merge.d.ts +73 -0
  469. package/dist/orchestrator/observability/merge.d.ts.map +1 -0
  470. package/dist/orchestrator/observability/merge.js +110 -0
  471. package/dist/orchestrator/observability/merge.js.map +1 -0
  472. package/dist/orchestrator/pipeline.d.ts +28 -0
  473. package/dist/orchestrator/pipeline.d.ts.map +1 -1
  474. package/dist/orchestrator/pipeline.js +223 -30
  475. package/dist/orchestrator/pipeline.js.map +1 -1
  476. package/dist/orchestrator/planner-agent.d.ts +21 -1
  477. package/dist/orchestrator/planner-agent.d.ts.map +1 -1
  478. package/dist/orchestrator/planner-agent.js +16 -6
  479. package/dist/orchestrator/planner-agent.js.map +1 -1
  480. package/dist/orchestrator/research-agent.d.ts.map +1 -1
  481. package/dist/orchestrator/research-agent.js +46 -9
  482. package/dist/orchestrator/research-agent.js.map +1 -1
  483. package/dist/orchestrator/tools/handlers.d.ts +2 -0
  484. package/dist/orchestrator/tools/handlers.d.ts.map +1 -1
  485. package/dist/orchestrator/tools/handlers.js +1 -1
  486. package/dist/orchestrator/tools/handlers.js.map +1 -1
  487. package/dist/orchestrator/tools/index.d.ts +84 -1
  488. package/dist/orchestrator/tools/index.d.ts.map +1 -1
  489. package/dist/orchestrator/tools/index.js +164 -1
  490. package/dist/orchestrator/tools/index.js.map +1 -1
  491. package/dist/orchestrator/worktree.d.ts +18 -0
  492. package/dist/orchestrator/worktree.d.ts.map +1 -0
  493. package/dist/orchestrator/worktree.js +129 -0
  494. package/dist/orchestrator/worktree.js.map +1 -0
  495. package/dist/providers/anthropic.d.ts +8 -1
  496. package/dist/providers/anthropic.d.ts.map +1 -1
  497. package/dist/providers/anthropic.js +86 -5
  498. package/dist/providers/anthropic.js.map +1 -1
  499. package/dist/providers/factory.d.ts.map +1 -1
  500. package/dist/providers/factory.js +35 -2
  501. package/dist/providers/factory.js.map +1 -1
  502. package/dist/providers/google.d.ts.map +1 -1
  503. package/dist/providers/google.js +5 -0
  504. package/dist/providers/google.js.map +1 -1
  505. package/dist/providers/index.d.ts +1 -1
  506. package/dist/providers/index.d.ts.map +1 -1
  507. package/dist/providers/index.js.map +1 -1
  508. package/dist/providers/openai.d.ts.map +1 -1
  509. package/dist/providers/openai.js +4 -0
  510. package/dist/providers/openai.js.map +1 -1
  511. package/dist/providers/types.d.ts +25 -2
  512. package/dist/providers/types.d.ts.map +1 -1
  513. package/dist/state/approval-state.d.ts +74 -0
  514. package/dist/state/approval-state.d.ts.map +1 -0
  515. package/dist/state/approval-state.js +127 -0
  516. package/dist/state/approval-state.js.map +1 -0
  517. package/dist/state/history.d.ts.map +1 -1
  518. package/dist/state/history.js +3 -3
  519. package/dist/state/history.js.map +1 -1
  520. package/dist/state/index.d.ts +3 -0
  521. package/dist/state/index.d.ts.map +1 -1
  522. package/dist/state/index.js +4 -1
  523. package/dist/state/index.js.map +1 -1
  524. package/dist/state/plan-state.js +1 -1
  525. package/dist/state/plan-state.js.map +1 -1
  526. package/dist/state/review-state.d.ts +15 -0
  527. package/dist/state/review-state.d.ts.map +1 -0
  528. package/dist/state/review-state.js +51 -0
  529. package/dist/state/review-state.js.map +1 -0
  530. package/dist/state/run-state.d.ts +39 -0
  531. package/dist/state/run-state.d.ts.map +1 -0
  532. package/dist/state/run-state.js +101 -0
  533. package/dist/state/run-state.js.map +1 -0
  534. package/dist/state/sprint-state.d.ts +9 -2
  535. package/dist/state/sprint-state.d.ts.map +1 -1
  536. package/dist/state/sprint-state.js +25 -11
  537. package/dist/state/sprint-state.js.map +1 -1
  538. package/dist/telemetry/emit.d.ts +41 -0
  539. package/dist/telemetry/emit.d.ts.map +1 -0
  540. package/dist/telemetry/emit.js +65 -0
  541. package/dist/telemetry/emit.js.map +1 -0
  542. package/dist/utils/git.d.ts +27 -0
  543. package/dist/utils/git.d.ts.map +1 -1
  544. package/dist/utils/git.js +50 -0
  545. package/dist/utils/git.js.map +1 -1
  546. package/hooks/hooks.json +17 -1
  547. package/hooks/session-start +42 -0
  548. package/package.json +6 -2
  549. package/scripts/check-prereqs.sh +12 -0
  550. package/scripts/e2e-graph-smoke.sh +167 -0
  551. package/scripts/graph-hook.mjs +151 -0
  552. package/scripts/migrate-specs.mjs +127 -0
  553. package/scripts/run-kpi-gate.mjs +245 -0
  554. package/scripts/sync-skills.mjs +99 -0
  555. package/skills/bober.code-review/SKILL.md +186 -0
  556. package/skills/bober.debug/SKILL.md +300 -0
  557. package/skills/bober.deploy/SKILL.md +262 -0
  558. package/skills/bober.diagnose/SKILL.md +254 -0
  559. package/skills/bober.graph/SKILL.md +85 -0
  560. package/skills/bober.impact/SKILL.md +101 -0
  561. package/skills/bober.incident/SKILL.md +245 -0
  562. package/skills/bober.onboard/SKILL.md +84 -0
  563. package/skills/bober.plan/SKILL.md +51 -0
  564. package/skills/bober.plan/references/spec-schema.md +31 -4
  565. package/skills/bober.postmortem/SKILL.md +231 -0
  566. package/skills/bober.run/SKILL.md +41 -7
  567. package/skills/bober.runbook/SKILL.md +335 -0
  568. package/skills/bober.sprint/SKILL.md +6 -259
  569. package/skills/bober.using-bober/SKILL.md +133 -0
  570. package/skills/bober.verify/SKILL.md +143 -0
@@ -19,28 +19,64 @@ import { registerReactTool } from "./react.js";
19
19
  import { registerSolidityTool } from "./solidity.js";
20
20
  import { registerAnchorTool } from "./anchor.js";
21
21
  import { registerPlaywrightTool } from "./playwright.js";
22
+ import { registerListActiveRunsTool } from "./list-active-runs.js";
23
+ import { registerGetRunStatusTool } from "./get-run-status.js";
24
+ import { registerAbortRunTool } from "./abort-run.js";
25
+ import { registerSubscribeEventsTool } from "./subscribe-events.js";
26
+ import { registerUnsubscribeEventsTool } from "./unsubscribe-events.js";
27
+ import { registerRunInWorktreeTool } from "./run-in-worktree.js";
28
+ import { registerListPendingApprovalsTool } from "./list-pending-approvals.js";
29
+ import { registerApproveCheckpointTool } from "./approve-checkpoint.js";
30
+ import { registerRejectCheckpointTool } from "./reject-checkpoint.js";
31
+ import { registerListProjectsTool } from "./list-projects.js";
32
+ import { registerListSpecsTool } from "./list-specs.js";
33
+ import { registerGetProjectStateTool } from "./get-project-state.js";
34
+ import { registerIncidentTools } from "./incident.js";
35
+ import { registerRollbackTool } from "./rollback.js";
36
+ import { registerPostmortemTool } from "./postmortem.js";
37
+ import { registerPlaybookTools } from "./playbook.js";
22
38
  /**
23
39
  * Registers all built-in agent-bober MCP tools into the global registry.
24
40
  * Call this once before starting the MCP server.
25
41
  *
26
- * Registered tools (17 total):
27
- * 1. bober_init – Initialise a project
28
- * 2. bober_plan – Generate a sprint plan
29
- * 3. bober_sprint – Execute the next sprint cycle
30
- * 4. bober_eval – Evaluate a sprint
31
- * 5. bober_run – Start the full pipeline asynchronously
32
- * 6. bober_status – Poll pipeline status
33
- * 7. bober_contracts – List/read sprint contracts
34
- * 8. bober_spec – Read the latest plan spec
35
- * 9. bober_principles – Read/write .bober/principles.md
36
- * 10. bober_config – Read/update bober.config.json
37
- * 11. bober_architect – Solution architecture (5-checkpoint flow + ADRs)
38
- * 12. bober_research – Two-phase codebase research (fact-only)
39
- * 13. bober_brownfield – Brownfield pipeline (existing codebase)
40
- * 14. bober_react – React web application pipeline
41
- * 15. bober_solidity – EVM smart contract pipeline
42
- * 16. bober_anchor – Solana program pipeline (Anchor)
43
- * 17. bober_playwright – Playwright E2E setup and runner
42
+ * Registered tools (37 total):
43
+ * 1. bober_init – Initialise a project
44
+ * 2. bober_plan – Generate a sprint plan
45
+ * 3. bober_sprint – Execute the next sprint cycle
46
+ * 4. bober_eval – Evaluate a sprint
47
+ * 5. bober_run – Start the full pipeline asynchronously
48
+ * 6. bober_status – Poll pipeline status
49
+ * 7. bober_contracts – List/read sprint contracts
50
+ * 8. bober_spec – Read the latest plan spec
51
+ * 9. bober_principles – Read/write .bober/principles.md
52
+ * 10. bober_config – Read/update bober.config.json
53
+ * 11. bober_architect – Solution architecture (5-checkpoint flow + ADRs)
54
+ * 12. bober_research – Two-phase codebase research (fact-only)
55
+ * 13. bober_brownfield – Brownfield pipeline (existing codebase)
56
+ * 14. bober_react – React web application pipeline
57
+ * 15. bober_solidity – EVM smart contract pipeline
58
+ * 16. bober_anchor – Solana program pipeline (Anchor)
59
+ * 17. bober_playwright – Playwright E2E setup and runner
60
+ * 18. bober_list_active_runs – List all runs by status
61
+ * 19. bober_get_run_status – Get one run by runId
62
+ * 20. bober_abort_run – Abort a run by runId
63
+ * 21. bober_subscribe_events – Subscribe to runId-scoped event notifications
64
+ * 22. bober_unsubscribe_events – Unsubscribe from a runId-scoped event stream
65
+ * 23. bober_run_in_worktree – Start the pipeline in an isolated git worktree
66
+ * 24. bober_list_pending_approvals – List pending careful-flow checkpoints
67
+ * 25. bober_approve_checkpoint – Approve a pending checkpoint (writes .approved.json)
68
+ * 26. bober_reject_checkpoint – Reject a pending checkpoint with feedback
69
+ * 27. bober_list_projects – Enumerate projects under one or more search roots
70
+ * 28. bober_list_specs – List PlanSpecs in a project
71
+ * 29. bober_get_project_state – Aggregate per-project counts for the cockpit sidebar
72
+ * 30. bober_incident_start – Create a new incident from a symptom
73
+ * 31. bober_incident_status – Read the current status of an incident
74
+ * 32. bober_incident_list – List all incidents sorted by createdAt descending
75
+ * 33. bober_incident_abort – Abort an incident at any phase (terminal)
76
+ * 34. bober_rollback_start – Plan and execute rollback for an incident
77
+ * 35. bober_postmortem_get – Read incident postmortem.md and return parsed content
78
+ * 36. bober_playbook_list – List all playbooks from .bober/playbooks/
79
+ * 37. bober_playbook_search – Search playbooks matching a symptom
44
80
  */
45
81
  export function registerAllTools() {
46
82
  // ── Core workflow tools ─────────────────────────────────────────
@@ -52,6 +88,7 @@ export function registerAllTools() {
52
88
  registerResearchTool();
53
89
  // ── Async pipeline tools ────────────────────────────────────────
54
90
  registerRunTool();
91
+ registerRunInWorktreeTool();
55
92
  registerBrownfieldTool();
56
93
  registerReactTool();
57
94
  registerSolidityTool();
@@ -59,6 +96,25 @@ export function registerAllTools() {
59
96
  registerStatusTool();
60
97
  // ── Utility tools ──────────────────────────────────────────────
61
98
  registerPlaywrightTool();
99
+ // ── Multi-run management tools ─────────────────────────────────
100
+ registerListActiveRunsTool();
101
+ registerGetRunStatusTool();
102
+ registerAbortRunTool();
103
+ // ── Event stream tools (cockpit-integration sprint 3) ──────────
104
+ registerSubscribeEventsTool();
105
+ registerUnsubscribeEventsTool();
106
+ // ── Cockpit careful-flow + discovery tools (cockpit-integration sprint 5) ──
107
+ registerListPendingApprovalsTool();
108
+ registerApproveCheckpointTool();
109
+ registerRejectCheckpointTool();
110
+ registerListProjectsTool();
111
+ registerListSpecsTool();
112
+ registerGetProjectStateTool();
113
+ // ── Vision-era incident/rollback/postmortem/playbook (cockpit-integration sprint 6) ──
114
+ registerIncidentTools();
115
+ registerRollbackTool();
116
+ registerPostmortemTool();
117
+ registerPlaybookTools();
62
118
  // ── Read / configuration tools ──────────────────────────────────
63
119
  registerContractsTool();
64
120
  registerSpecTool();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tools/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,qEAAqE;AACrE,qEAAqE;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,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C;IAEzB,kEAAkE;IAClE,0BAA0B,EAAE,CAAC;IAC7B,wBAAwB,EAAE,CAAC;IAC3B,oBAAoB,EAAE,CAAC;IAEvB,kEAAkE;IAClE,2BAA2B,EAAE,CAAC;IAC9B,6BAA6B,EAAE,CAAC;IAEhC,8EAA8E;IAC9E,gCAAgC,EAAE,CAAC;IACnC,6BAA6B,EAAE,CAAC;IAChC,4BAA4B,EAAE,CAAC;IAC/B,wBAAwB,EAAE,CAAC;IAC3B,qBAAqB,EAAE,CAAC;IACxB,2BAA2B,EAAE,CAAC;IAE9B,wFAAwF;IACxF,qBAAqB,EAAE,CAAC;IACxB,oBAAoB,EAAE,CAAC;IACvB,sBAAsB,EAAE,CAAC;IACzB,qBAAqB,EAAE,CAAC;IAExB,mEAAmE;IACnE,qBAAqB,EAAE,CAAC;IACxB,gBAAgB,EAAE,CAAC;IACnB,sBAAsB,EAAE,CAAC;IACzB,kBAAkB,EAAE,CAAC;AACvB,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function registerListActiveRunsTool(): void;
2
+ //# sourceMappingURL=list-active-runs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-active-runs.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/list-active-runs.ts"],"names":[],"mappings":"AAWA,wBAAgB,0BAA0B,IAAI,IAAI,CA6BjD"}
@@ -0,0 +1,35 @@
1
+ // ── bober_list_active_runs tool ──────────────────────────────────────
2
+ //
3
+ // Returns all known runs tracked by the RunManager, optionally filtered
4
+ // by status. When no status filter is provided, all runs are returned
5
+ // regardless of their current status.
6
+ import { registerTool } from "./registry.js";
7
+ import { runManager } from "../run-manager.js";
8
+ // ── Registration ─────────────────────────────────────────────────────
9
+ export function registerListActiveRunsTool() {
10
+ registerTool({
11
+ name: "bober_list_active_runs",
12
+ description: "List all runs tracked by the multi-run RunManager. " +
13
+ "Optionally filter by status. Returns an array of RunState objects.",
14
+ inputSchema: {
15
+ type: "object",
16
+ properties: {
17
+ status: {
18
+ type: "string",
19
+ enum: ["running", "completed", "failed", "aborted"],
20
+ description: "Optional status filter. Omit to return all runs.",
21
+ },
22
+ },
23
+ additionalProperties: false,
24
+ },
25
+ handler: async (args) => {
26
+ const statusFilter = typeof args.status === "string" ? args.status : undefined;
27
+ const all = runManager.listAllRuns();
28
+ const filtered = statusFilter
29
+ ? all.filter((s) => s.status === statusFilter)
30
+ : all;
31
+ return JSON.stringify(filtered, null, 2);
32
+ },
33
+ });
34
+ }
35
+ //# sourceMappingURL=list-active-runs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-active-runs.js","sourceRoot":"","sources":["../../../src/mcp/tools/list-active-runs.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,wEAAwE;AAExE,MAAM,UAAU,0BAA0B;IACxC,YAAY,CAAC;QACX,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACT,qDAAqD;YACrD,oEAAoE;QACtE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;oBACnD,WAAW,EAAE,kDAAkD;iBAChE;aACF;YACD,oBAAoB,EAAE,KAAK;SAC5B;QACD,OAAO,EAAE,KAAK,EAAE,IAA6B,EAAmB,EAAE;YAChE,MAAM,YAAY,GAChB,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAE5D,MAAM,GAAG,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;YACrC,MAAM,QAAQ,GAAG,YAAY;gBAC3B,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,YAAY,CAAC;gBAC9C,CAAC,CAAC,GAAG,CAAC;YAER,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC3C,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function registerListPendingApprovalsTool(): void;
2
+ //# sourceMappingURL=list-pending-approvals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-pending-approvals.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/list-pending-approvals.ts"],"names":[],"mappings":"AAgBA,wBAAgB,gCAAgC,IAAI,IAAI,CA6BvD"}
@@ -0,0 +1,40 @@
1
+ // ── bober_list_pending_approvals tool ────────────────────────────────
2
+ //
3
+ // Returns all pending checkpoints in cockpit-row shape:
4
+ // [{ checkpointId, ageMs, prompt }]
5
+ // Optional projectPath (must be absolute when supplied).
6
+ //
7
+ // Sprint 5 (cockpit-integration)
8
+ import { cwd } from "node:process";
9
+ import { isAbsolute } from "node:path";
10
+ import { registerTool } from "./registry.js";
11
+ import { listPendingApprovals } from "../../state/approval-state.js";
12
+ // ── Registration ─────────────────────────────────────────────────────
13
+ export function registerListPendingApprovalsTool() {
14
+ registerTool({
15
+ name: "bober_list_pending_approvals",
16
+ description: "List all pending careful-flow checkpoints awaiting human approval. " +
17
+ "Returns an array of { checkpointId, ageMs, prompt } — the same shape " +
18
+ "as `bober list-approvals --json`. Optional projectPath defaults to cwd; " +
19
+ "when supplied it MUST be absolute.",
20
+ inputSchema: {
21
+ type: "object",
22
+ properties: {
23
+ projectPath: {
24
+ type: "string",
25
+ description: "Absolute path to the project root. Defaults to cwd when omitted.",
26
+ },
27
+ },
28
+ additionalProperties: false,
29
+ },
30
+ handler: async (args) => {
31
+ const projectPath = typeof args.projectPath === "string" ? args.projectPath : cwd();
32
+ if (typeof args.projectPath === "string" && !isAbsolute(args.projectPath)) {
33
+ return JSON.stringify({ error: "projectPath must be absolute" });
34
+ }
35
+ const rows = await listPendingApprovals(projectPath);
36
+ return JSON.stringify(rows, null, 2);
37
+ },
38
+ });
39
+ }
40
+ //# sourceMappingURL=list-pending-approvals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-pending-approvals.js","sourceRoot":"","sources":["../../../src/mcp/tools/list-pending-approvals.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,EAAE;AACF,wDAAwD;AACxD,sCAAsC;AACtC,yDAAyD;AACzD,EAAE;AACF,iCAAiC;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,wEAAwE;AAExE,MAAM,UAAU,gCAAgC;IAC9C,YAAY,CAAC;QACX,IAAI,EAAE,8BAA8B;QACpC,WAAW,EACT,qEAAqE;YACrE,uEAAuE;YACvE,0EAA0E;YAC1E,oCAAoC;QACtC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,kEAAkE;iBACrE;aACF;YACD,oBAAoB,EAAE,KAAK;SAC5B;QACD,OAAO,EAAE,KAAK,EAAE,IAA6B,EAAmB,EAAE;YAChE,MAAM,WAAW,GACf,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YAClE,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC1E,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,8BAA8B,EAAE,CAAC,CAAC;YACnE,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,WAAW,CAAC,CAAC;YACrD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function registerListProjectsTool(): void;
2
+ //# sourceMappingURL=list-projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-projects.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/list-projects.ts"],"names":[],"mappings":"AAiCA,wBAAgB,wBAAwB,IAAI,IAAI,CA4F/C"}
@@ -0,0 +1,101 @@
1
+ // ── bober_list_projects tool ──────────────────────────────────────────
2
+ //
3
+ // Walks each searchRoot one level deep looking for subdirectories
4
+ // containing bober.config.json. Returns an array of ProjectRow objects.
5
+ //
6
+ // Behavior:
7
+ // - Unreadable searchRoot → soft-skip with stderr warning (never throw).
8
+ // - Directories without bober.config.json → silently skipped.
9
+ // - No caching — every call walks fresh.
10
+ // - Does NOT instantiate RunManager; uses readRunStatesFromDisk for
11
+ // per-project run enumeration.
12
+ //
13
+ // Sprint 5 (cockpit-integration)
14
+ import { readdir, readFile, access } from "node:fs/promises";
15
+ import { constants } from "node:fs";
16
+ import { join, basename } from "node:path";
17
+ import { registerTool } from "./registry.js";
18
+ import { readRunStatesFromDisk } from "../../state/run-state.js";
19
+ // ── Registration ─────────────────────────────────────────────────────
20
+ export function registerListProjectsTool() {
21
+ registerTool({
22
+ name: "bober_list_projects",
23
+ description: "Enumerate bober projects under one or more search roots by walking each root " +
24
+ "one level deep for directories containing bober.config.json. " +
25
+ "Returns [{ projectPath, name, mode?, hasActiveRuns, lastRunAt? }]. " +
26
+ "Unreadable roots are skipped with a stderr warning. " +
27
+ "Does not instantiate RunManager — reads disk state directly.",
28
+ inputSchema: {
29
+ type: "object",
30
+ properties: {
31
+ searchRoots: {
32
+ type: "array",
33
+ items: { type: "string" },
34
+ description: "Array of absolute directory paths to search one level deep.",
35
+ },
36
+ },
37
+ required: ["searchRoots"],
38
+ additionalProperties: false,
39
+ },
40
+ handler: async (args) => {
41
+ const searchRoots = Array.isArray(args.searchRoots)
42
+ ? args.searchRoots.filter((x) => typeof x === "string")
43
+ : [];
44
+ if (searchRoots.length === 0) {
45
+ return JSON.stringify({ error: "searchRoots must be a non-empty array of strings." });
46
+ }
47
+ const rows = [];
48
+ for (const root of searchRoots) {
49
+ let dirEntries;
50
+ try {
51
+ dirEntries = await readdir(root, { withFileTypes: true });
52
+ }
53
+ catch (err) {
54
+ process.stderr.write(`[bober_list_projects] Skipping unreadable searchRoot ${root}: ${err instanceof Error ? err.message : String(err)}\n`);
55
+ continue;
56
+ }
57
+ for (const entry of dirEntries) {
58
+ if (!entry.isDirectory())
59
+ continue;
60
+ const projectPath = join(root, entry.name);
61
+ const configPath = join(projectPath, "bober.config.json");
62
+ try {
63
+ await access(configPath, constants.R_OK);
64
+ }
65
+ catch {
66
+ continue; // silently skip dirs without bober.config.json
67
+ }
68
+ // Parse minimally — only project.name and project.mode are needed.
69
+ let name = basename(projectPath);
70
+ let mode;
71
+ try {
72
+ const raw = await readFile(configPath, "utf-8");
73
+ const parsed = JSON.parse(raw);
74
+ if (parsed.project?.name)
75
+ name = parsed.project.name;
76
+ if (parsed.project?.mode)
77
+ mode = parsed.project.mode;
78
+ }
79
+ catch {
80
+ // keep basename fallback for name
81
+ }
82
+ // Active runs / lastRunAt — read from disk without RunManager
83
+ const runs = await readRunStatesFromDisk(projectPath);
84
+ const hasActiveRuns = runs.some((r) => r.status === "running");
85
+ const lastRunAt = runs.length > 0
86
+ ? runs.map((r) => r.startedAt).sort().slice(-1)[0]
87
+ : undefined;
88
+ rows.push({
89
+ projectPath,
90
+ name,
91
+ ...(mode !== undefined ? { mode } : {}),
92
+ hasActiveRuns,
93
+ ...(lastRunAt !== undefined ? { lastRunAt } : {}),
94
+ });
95
+ }
96
+ }
97
+ return JSON.stringify(rows, null, 2);
98
+ },
99
+ });
100
+ }
101
+ //# sourceMappingURL=list-projects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-projects.js","sourceRoot":"","sources":["../../../src/mcp/tools/list-projects.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,kEAAkE;AAClE,wEAAwE;AACxE,EAAE;AACF,YAAY;AACZ,yEAAyE;AACzE,8DAA8D;AAC9D,yCAAyC;AACzC,oEAAoE;AACpE,iCAAiC;AACjC,EAAE;AACF,iCAAiC;AAEjC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAe,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAYjE,wEAAwE;AAExE,MAAM,UAAU,wBAAwB;IACtC,YAAY,CAAC;QACX,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,+EAA+E;YAC/E,+DAA+D;YAC/D,qEAAqE;YACrE,sDAAsD;YACtD,8DAA8D;QAChE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EACT,6DAA6D;iBAChE;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,CAAC;YACzB,oBAAoB,EAAE,KAAK;SAC5B;QACD,OAAO,EAA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K,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;qBAClD,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function registerListSpecsTool(): void;
2
+ //# sourceMappingURL=list-specs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-specs.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/list-specs.ts"],"names":[],"mappings":"AA0BA,wBAAgB,qBAAqB,IAAI,IAAI,CAsC5C"}
@@ -0,0 +1,48 @@
1
+ // ── bober_list_specs tool ─────────────────────────────────────────────
2
+ //
3
+ // Reads .bober/specs/*.json and returns an array of SpecRow objects.
4
+ // Uses listSpecs() from plan-state.ts which already does loose-parsing
5
+ // (safeParse + skip invalid files) — perfect for cockpit listing.
6
+ //
7
+ // Sprint 5 (cockpit-integration)
8
+ import { cwd } from "node:process";
9
+ import { isAbsolute } from "node:path";
10
+ import { registerTool } from "./registry.js";
11
+ import { listSpecs } from "../../state/plan-state.js";
12
+ // ── Registration ─────────────────────────────────────────────────────
13
+ export function registerListSpecsTool() {
14
+ registerTool({
15
+ name: "bober_list_specs",
16
+ description: "List all PlanSpecs in a project's .bober/specs/ directory. " +
17
+ "Returns [{ specId, title, status, sprintCount, completedAt? }]. " +
18
+ "Tolerates version mismatches — invalid spec files are silently skipped. " +
19
+ "projectPath must be absolute.",
20
+ inputSchema: {
21
+ type: "object",
22
+ properties: {
23
+ projectPath: {
24
+ type: "string",
25
+ description: "Absolute path to the project root.",
26
+ },
27
+ },
28
+ required: ["projectPath"],
29
+ additionalProperties: false,
30
+ },
31
+ handler: async (args) => {
32
+ const projectPath = typeof args.projectPath === "string" ? args.projectPath : cwd();
33
+ if (typeof args.projectPath === "string" && !isAbsolute(args.projectPath)) {
34
+ return JSON.stringify({ error: "projectPath must be absolute" });
35
+ }
36
+ const specs = await listSpecs(projectPath);
37
+ const rows = specs.map((s) => ({
38
+ specId: s.specId,
39
+ title: s.title,
40
+ status: s.status,
41
+ sprintCount: Array.isArray(s.sprints) ? s.sprints.length : 0,
42
+ ...(s.completedAt ? { completedAt: s.completedAt } : {}),
43
+ }));
44
+ return JSON.stringify(rows, null, 2);
45
+ },
46
+ });
47
+ }
48
+ //# sourceMappingURL=list-specs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-specs.js","sourceRoot":"","sources":["../../../src/mcp/tools/list-specs.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,kEAAkE;AAClE,EAAE;AACF,iCAAiC;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAYtD,wEAAwE;AAExE,MAAM,UAAU,qBAAqB;IACnC,YAAY,CAAC;QACX,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,6DAA6D;YAC7D,kEAAkE;YAClE,0EAA0E;YAC1E,+BAA+B;QACjC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oCAAoC;iBAClD;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,CAAC;YACzB,oBAAoB,EAAE,KAAK;SAC5B;QACD,OAAO,EAAE,KAAK,EAAE,IAA6B,EAAmB,EAAE;YAChE,MAAM,WAAW,GACf,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YAClE,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC1E,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,8BAA8B,EAAE,CAAC,CAAC;YACnE,CAAC;YAED,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,CAAC;YAC3C,MAAM,IAAI,GAAc,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACxC,MAAM,EAAE,CAAC,CAAC,MAAM;gBAChB,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,MAAM,EAAE,CAAC,CAAC,MAAM;gBAChB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC5D,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACzD,CAAC,CAAC,CAAC;YAEJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/plan.ts"],"names":[],"mappings":"AAkBA,wBAAgB,gBAAgB,IAAI,IAAI,CAiGvC"}
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/plan.ts"],"names":[],"mappings":"AAkBA,wBAAgB,gBAAgB,IAAI,IAAI,CAkIvC"}
@@ -50,39 +50,65 @@ export function registerPlanTool() {
50
50
  }
51
51
  await ensureBoberDir(projectRoot);
52
52
  try {
53
- const spec = await runPlanner(task, projectRoot, config);
54
- // Generate sprint contracts from features (same as pipeline.ts)
53
+ const plannerResult = await runPlanner(task, projectRoot, config);
54
+ const spec = plannerResult.spec;
55
+ // If the planner refused (high ambiguity), surface the open
56
+ // questions instead of running sprints. The MCP caller decides
57
+ // what to do — typically prompt the user for answers.
58
+ if (plannerResult.kind === "needs-clarification") {
59
+ return JSON.stringify({
60
+ specId: spec.specId,
61
+ status: spec.status,
62
+ title: spec.title,
63
+ description: spec.description,
64
+ ambiguityScore: spec.ambiguityScore,
65
+ clarificationQuestions: spec.clarificationQuestions,
66
+ savedTo: `.bober/specs/${spec.specId}.json`,
67
+ message: "Planner needs clarification before sprint contracts can be generated. " +
68
+ `Resolve via 'bober plan answer ${spec.specId} <questionId> "<answer>"' or edit the spec file directly.`,
69
+ }, null, 2);
70
+ }
71
+ // Generate sprint contracts from features (same as pipeline.ts).
72
+ // These auto-generated contracts are placeholders; planner-authored
73
+ // contracts (saved by the bober-planner subagent) are richer.
55
74
  const contracts = [];
56
- for (const feature of spec.features) {
75
+ for (let i = 0; i < spec.features.length; i++) {
76
+ const feature = spec.features[i];
57
77
  const contract = createContract(feature.title, feature.description, feature.acceptanceCriteria.map((ac, idx) => ({
58
- id: `${feature.id}-criterion-${idx + 1}`,
78
+ criterionId: `${feature.featureId}-criterion-${idx + 1}`,
59
79
  description: ac,
60
80
  verificationMethod: "agent-evaluation",
61
- })));
81
+ })), {
82
+ specId: spec.specId,
83
+ sprintNumber: i + 1,
84
+ features: [feature.featureId],
85
+ });
62
86
  contracts.push(contract);
63
87
  await saveContract(projectRoot, contract);
64
88
  }
65
89
  const summary = {
66
- id: spec.id,
90
+ specId: spec.specId,
67
91
  title: spec.title,
68
92
  description: spec.description,
69
- projectType: spec.projectType,
93
+ mode: spec.mode,
94
+ status: spec.status,
70
95
  techStack: spec.techStack,
71
96
  sprintCount: spec.features.length,
72
97
  sprints: spec.features.map((f, idx) => ({
73
- id: f.id,
74
- contractId: contracts[idx]?.id,
75
- feature: f.title,
98
+ featureId: f.featureId,
99
+ contractId: contracts[idx]?.contractId,
100
+ title: f.title,
76
101
  description: f.description,
77
102
  priority: f.priority,
78
- estimatedSprints: f.estimatedSprints,
103
+ estimatedComplexity: f.estimatedComplexity,
79
104
  criteriaCount: f.acceptanceCriteria.length,
80
105
  status: "proposed",
81
106
  })),
82
- contractIds: contracts.map((c) => c.id),
83
- nonFunctional: spec.nonFunctional,
107
+ contractIds: contracts.map((c) => c.contractId),
108
+ assumptions: spec.assumptions,
109
+ outOfScope: spec.outOfScope,
84
110
  constraints: spec.constraints,
85
- savedTo: `.bober/specs/${spec.id}.json`,
111
+ savedTo: `.bober/specs/${spec.specId}.json`,
86
112
  };
87
113
  return JSON.stringify(summary, null, 2);
88
114
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/mcp/tools/plan.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,mEAAmE;AACnE,yCAAyC;AAEzC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,wEAAwE;AAExE,MAAM,UAAU,gBAAgB;IAC9B,YAAY,CAAC;QACX,IAAI,EAAE,YAAY;QAClB,WAAW,EACT,sEAAsE;YACtE,sEAAsE;YACtE,2EAA2E;QAC7E,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI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AC;gBAEF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAC1C,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,IAAI,CAAC,SAAS,CAAC;oBACpB,KAAK,EAAE,mBAAmB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;iBAC7E,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function registerPlaybookTools(): void;
2
+ //# sourceMappingURL=playbook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playbook.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/playbook.ts"],"names":[],"mappings":"AAwBA,wBAAgB,qBAAqB,IAAI,IAAI,CAmG5C"}
@@ -0,0 +1,104 @@
1
+ // ── bober_playbook_list + bober_playbook_search tools ─────────────────
2
+ //
3
+ // Two thin adapters over loadPlaybooks + searchPlaybooks from src/incident/playbook-search.ts.
4
+ // No business logic here — all logic delegated to the underlying helpers.
5
+ //
6
+ // Sprint 6 (cockpit-integration)
7
+ import { cwd } from "node:process";
8
+ import { isAbsolute } from "node:path";
9
+ import { registerTool } from "./registry.js";
10
+ import { loadPlaybooks, searchPlaybooks, HIGH_CONFIDENCE_THRESHOLD, LOW_CONFIDENCE_THRESHOLD, } from "../../incident/playbook-search.js";
11
+ function classifyTier(confidence) {
12
+ if (confidence >= HIGH_CONFIDENCE_THRESHOLD)
13
+ return "high";
14
+ if (confidence >= LOW_CONFIDENCE_THRESHOLD)
15
+ return "suggestion";
16
+ return "low";
17
+ }
18
+ export function registerPlaybookTools() {
19
+ // ── bober_playbook_list ─────────────────────────────────────────────
20
+ registerTool({
21
+ name: "bober_playbook_list",
22
+ description: "List all playbooks from .bober/playbooks/. " +
23
+ "Delegates to loadPlaybooks from src/incident/playbook-search.ts. " +
24
+ "Returns [{ name, classification, applicableSymptoms }].",
25
+ inputSchema: {
26
+ type: "object",
27
+ properties: {
28
+ projectPath: {
29
+ type: "string",
30
+ description: "Absolute project root (defaults to cwd).",
31
+ },
32
+ },
33
+ additionalProperties: false,
34
+ },
35
+ handler: async (args) => {
36
+ const projectPath = typeof args.projectPath === "string" ? args.projectPath : cwd();
37
+ if (typeof args.projectPath === "string" && !isAbsolute(args.projectPath)) {
38
+ return JSON.stringify({ error: "projectPath must be absolute" });
39
+ }
40
+ let playbooks;
41
+ try {
42
+ playbooks = await loadPlaybooks(projectPath);
43
+ }
44
+ catch (err) {
45
+ return JSON.stringify({
46
+ error: `Failed to load playbooks: ${err instanceof Error ? err.message : String(err)}`,
47
+ });
48
+ }
49
+ return JSON.stringify(playbooks.map((p) => ({
50
+ name: p.name,
51
+ classification: p.classification,
52
+ applicableSymptoms: p.applicableSymptoms,
53
+ })), null, 2);
54
+ },
55
+ });
56
+ // ── bober_playbook_search ───────────────────────────────────────────
57
+ registerTool({
58
+ name: "bober_playbook_search",
59
+ description: "Search playbooks matching a symptom. " +
60
+ "Delegates to searchPlaybooks from src/incident/playbook-search.ts. " +
61
+ "Returns [{ name, confidence, tier, matchedTokens }] sorted descending by confidence.",
62
+ inputSchema: {
63
+ type: "object",
64
+ properties: {
65
+ symptom: {
66
+ type: "string",
67
+ description: "Free-text symptom to search for.",
68
+ },
69
+ projectPath: {
70
+ type: "string",
71
+ description: "Absolute project root (defaults to cwd).",
72
+ },
73
+ },
74
+ required: ["symptom"],
75
+ additionalProperties: false,
76
+ },
77
+ handler: async (args) => {
78
+ const symptom = typeof args.symptom === "string" ? args.symptom.trim() : "";
79
+ if (!symptom) {
80
+ return JSON.stringify({ error: "symptom is required and must be a non-empty string." });
81
+ }
82
+ const projectPath = typeof args.projectPath === "string" ? args.projectPath : cwd();
83
+ if (typeof args.projectPath === "string" && !isAbsolute(args.projectPath)) {
84
+ return JSON.stringify({ error: "projectPath must be absolute" });
85
+ }
86
+ let matches;
87
+ try {
88
+ matches = await searchPlaybooks(symptom, projectPath);
89
+ }
90
+ catch (err) {
91
+ return JSON.stringify({
92
+ error: `Failed to search playbooks: ${err instanceof Error ? err.message : String(err)}`,
93
+ });
94
+ }
95
+ return JSON.stringify(matches.map((m) => ({
96
+ name: m.playbook.name,
97
+ confidence: m.confidence,
98
+ tier: classifyTier(m.confidence),
99
+ matchedTokens: m.matchedTokens,
100
+ })), null, 2);
101
+ },
102
+ });
103
+ }
104
+ //# sourceMappingURL=playbook.js.map