@apralabs/apra-fleet 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/README.md +53 -12
  2. package/dist/agents/backlog-groomer.md +42 -21
  3. package/dist/agents/ci-watcher.md +14 -0
  4. package/dist/agents/deployer.md +59 -46
  5. package/dist/agents/doer.md +157 -134
  6. package/dist/agents/harvester.md +31 -32
  7. package/dist/agents/integ-test-runner.md +92 -113
  8. package/dist/agents/kb-reconciler.md +40 -42
  9. package/dist/agents/plan-reviewer.md +139 -63
  10. package/dist/agents/planner.md +176 -100
  11. package/dist/agents/regression-test-runner.md +77 -81
  12. package/dist/agents/reviewer.md +69 -85
  13. package/dist/agents/schemas/integ-test-runner-output.json +1 -1
  14. package/dist/agents/schemas/plan-reviewer-output.json +37 -0
  15. package/dist/agents/schemas/regression-test-runner-output.json +4 -17
  16. package/dist/cli/agent-transform.d.ts +83 -2
  17. package/dist/cli/agent-transform.d.ts.map +1 -1
  18. package/dist/cli/agent-transform.js +266 -21
  19. package/dist/cli/agent-transform.js.map +1 -1
  20. package/dist/cli/auth.d.ts.map +1 -1
  21. package/dist/cli/auth.js +29 -11
  22. package/dist/cli/auth.js.map +1 -1
  23. package/dist/cli/config.d.ts +7 -5
  24. package/dist/cli/config.d.ts.map +1 -1
  25. package/dist/cli/config.js +44 -43
  26. package/dist/cli/config.js.map +1 -1
  27. package/dist/cli/install.d.ts +33 -0
  28. package/dist/cli/install.d.ts.map +1 -1
  29. package/dist/cli/install.js +294 -61
  30. package/dist/cli/install.js.map +1 -1
  31. package/dist/cli/kb-directives.d.ts.map +1 -1
  32. package/dist/cli/kb-directives.js +2 -1
  33. package/dist/cli/kb-directives.js.map +1 -1
  34. package/dist/cli/register-member.d.ts.map +1 -1
  35. package/dist/cli/register-member.js +7 -3
  36. package/dist/cli/register-member.js.map +1 -1
  37. package/dist/cli/start.d.ts.map +1 -1
  38. package/dist/cli/start.js +7 -0
  39. package/dist/cli/start.js.map +1 -1
  40. package/dist/cli/uninstall.d.ts.map +1 -1
  41. package/dist/cli/uninstall.js +5 -3
  42. package/dist/cli/uninstall.js.map +1 -1
  43. package/dist/cli/watch.d.ts +26 -3
  44. package/dist/cli/watch.d.ts.map +1 -1
  45. package/dist/cli/watch.js +41 -9
  46. package/dist/cli/watch.js.map +1 -1
  47. package/dist/commands/kb-server.d.ts +3 -0
  48. package/dist/commands/kb-server.d.ts.map +1 -1
  49. package/dist/commands/kb-server.js +43 -3
  50. package/dist/commands/kb-server.js.map +1 -1
  51. package/dist/index.js +3 -3
  52. package/dist/os/git-bash-candidates.d.ts +35 -0
  53. package/dist/os/git-bash-candidates.d.ts.map +1 -0
  54. package/dist/os/git-bash-candidates.js +46 -0
  55. package/dist/os/git-bash-candidates.js.map +1 -0
  56. package/dist/os/index.d.ts +13 -4
  57. package/dist/os/index.d.ts.map +1 -1
  58. package/dist/os/index.js +17 -2
  59. package/dist/os/index.js.map +1 -1
  60. package/dist/os/linux.d.ts +6 -0
  61. package/dist/os/linux.d.ts.map +1 -1
  62. package/dist/os/linux.js +36 -3
  63. package/dist/os/linux.js.map +1 -1
  64. package/dist/os/os-commands.d.ts +68 -2
  65. package/dist/os/os-commands.d.ts.map +1 -1
  66. package/dist/os/os-commands.js.map +1 -1
  67. package/dist/os/windows-gitbash.d.ts +98 -0
  68. package/dist/os/windows-gitbash.d.ts.map +1 -0
  69. package/dist/os/windows-gitbash.js +259 -0
  70. package/dist/os/windows-gitbash.js.map +1 -0
  71. package/dist/os/windows.d.ts +6 -0
  72. package/dist/os/windows.d.ts.map +1 -1
  73. package/dist/os/windows.js +73 -8
  74. package/dist/os/windows.js.map +1 -1
  75. package/dist/providers/agy.d.ts +118 -8
  76. package/dist/providers/agy.d.ts.map +1 -1
  77. package/dist/providers/agy.js +580 -55
  78. package/dist/providers/agy.js.map +1 -1
  79. package/dist/providers/claude.d.ts +83 -4
  80. package/dist/providers/claude.d.ts.map +1 -1
  81. package/dist/providers/claude.js +365 -12
  82. package/dist/providers/claude.js.map +1 -1
  83. package/dist/providers/codex.d.ts +7 -4
  84. package/dist/providers/codex.d.ts.map +1 -1
  85. package/dist/providers/codex.js +24 -4
  86. package/dist/providers/codex.js.map +1 -1
  87. package/dist/providers/copilot.d.ts +7 -4
  88. package/dist/providers/copilot.d.ts.map +1 -1
  89. package/dist/providers/copilot.js +27 -4
  90. package/dist/providers/copilot.js.map +1 -1
  91. package/dist/providers/index.d.ts +0 -1
  92. package/dist/providers/index.d.ts.map +1 -1
  93. package/dist/providers/index.js +0 -3
  94. package/dist/providers/index.js.map +1 -1
  95. package/dist/providers/none.d.ts +7 -4
  96. package/dist/providers/none.d.ts.map +1 -1
  97. package/dist/providers/none.js +22 -4
  98. package/dist/providers/none.js.map +1 -1
  99. package/dist/providers/opencode.d.ts +6 -3
  100. package/dist/providers/opencode.d.ts.map +1 -1
  101. package/dist/providers/opencode.js +27 -4
  102. package/dist/providers/opencode.js.map +1 -1
  103. package/dist/providers/provider.d.ts +215 -11
  104. package/dist/providers/provider.d.ts.map +1 -1
  105. package/dist/providers/provider.js +58 -2
  106. package/dist/providers/provider.js.map +1 -1
  107. package/dist/services/agent-provisioner.js +2 -2
  108. package/dist/services/agent-provisioner.js.map +1 -1
  109. package/dist/services/agy-project.d.ts +102 -0
  110. package/dist/services/agy-project.d.ts.map +1 -0
  111. package/dist/services/agy-project.js +356 -0
  112. package/dist/services/agy-project.js.map +1 -0
  113. package/dist/services/auth-socket.js +4 -4
  114. package/dist/services/auth-web.js +1 -1
  115. package/dist/services/cloud/activity.js +2 -2
  116. package/dist/services/cloud/activity.js.map +1 -1
  117. package/dist/services/cloud/lifecycle.d.ts.map +1 -1
  118. package/dist/services/cloud/lifecycle.js +33 -4
  119. package/dist/services/cloud/lifecycle.js.map +1 -1
  120. package/dist/services/context-admission.d.ts.map +1 -1
  121. package/dist/services/context-admission.js +9 -7
  122. package/dist/services/context-admission.js.map +1 -1
  123. package/dist/services/credential-cleanup.d.ts.map +1 -1
  124. package/dist/services/credential-cleanup.js +47 -10
  125. package/dist/services/credential-cleanup.js.map +1 -1
  126. package/dist/services/exit-drain.d.ts +44 -0
  127. package/dist/services/exit-drain.d.ts.map +1 -0
  128. package/dist/services/exit-drain.js +52 -0
  129. package/dist/services/exit-drain.js.map +1 -0
  130. package/dist/services/github-app.d.ts.map +1 -1
  131. package/dist/services/github-app.js +32 -4
  132. package/dist/services/github-app.js.map +1 -1
  133. package/dist/services/http-transport.d.ts +1 -0
  134. package/dist/services/http-transport.d.ts.map +1 -1
  135. package/dist/services/http-transport.js +48 -1
  136. package/dist/services/http-transport.js.map +1 -1
  137. package/dist/services/knowledge/kb-config.d.ts +42 -0
  138. package/dist/services/knowledge/kb-config.d.ts.map +1 -0
  139. package/dist/services/knowledge/kb-config.js +54 -0
  140. package/dist/services/knowledge/kb-config.js.map +1 -0
  141. package/dist/services/knowledge/kb-providers.d.ts +7 -1
  142. package/dist/services/knowledge/kb-providers.d.ts.map +1 -1
  143. package/dist/services/knowledge/kb-providers.js +191 -17
  144. package/dist/services/knowledge/kb-providers.js.map +1 -1
  145. package/dist/services/knowledge/require-sqlite-project.d.ts +32 -0
  146. package/dist/services/knowledge/require-sqlite-project.d.ts.map +1 -0
  147. package/dist/services/knowledge/require-sqlite-project.js +38 -0
  148. package/dist/services/knowledge/require-sqlite-project.js.map +1 -0
  149. package/dist/services/member-home.d.ts +1 -1
  150. package/dist/services/member-home.d.ts.map +1 -1
  151. package/dist/services/member-home.js +15 -12
  152. package/dist/services/member-home.js.map +1 -1
  153. package/dist/services/model-pricing.d.ts.map +1 -1
  154. package/dist/services/model-pricing.js +7 -8
  155. package/dist/services/model-pricing.js.map +1 -1
  156. package/dist/services/orphan-recovery.d.ts +6 -3
  157. package/dist/services/orphan-recovery.d.ts.map +1 -1
  158. package/dist/services/orphan-recovery.js +17 -14
  159. package/dist/services/orphan-recovery.js.map +1 -1
  160. package/dist/services/preflight-check.js +2 -2
  161. package/dist/services/preflight-check.js.map +1 -1
  162. package/dist/services/secret-token.d.ts +38 -0
  163. package/dist/services/secret-token.d.ts.map +1 -0
  164. package/dist/services/secret-token.js +51 -0
  165. package/dist/services/secret-token.js.map +1 -0
  166. package/dist/services/service-manager/types.d.ts +3 -1
  167. package/dist/services/service-manager/types.d.ts.map +1 -1
  168. package/dist/services/service-manager/windows.d.ts +14 -2
  169. package/dist/services/service-manager/windows.d.ts.map +1 -1
  170. package/dist/services/service-manager/windows.js +65 -7
  171. package/dist/services/service-manager/windows.js.map +1 -1
  172. package/dist/services/shell-probe.d.ts +131 -0
  173. package/dist/services/shell-probe.d.ts.map +1 -0
  174. package/dist/services/shell-probe.js +210 -0
  175. package/dist/services/shell-probe.js.map +1 -0
  176. package/dist/services/singleton.d.ts +2 -0
  177. package/dist/services/singleton.d.ts.map +1 -1
  178. package/dist/services/singleton.js +1 -1
  179. package/dist/services/singleton.js.map +1 -1
  180. package/dist/services/ssh.d.ts.map +1 -1
  181. package/dist/services/ssh.js +60 -4
  182. package/dist/services/ssh.js.map +1 -1
  183. package/dist/services/stall/find-log-file.d.ts.map +1 -1
  184. package/dist/services/stall/find-log-file.js +22 -16
  185. package/dist/services/stall/find-log-file.js.map +1 -1
  186. package/dist/services/stall/read-log-tail.d.ts.map +1 -1
  187. package/dist/services/stall/read-log-tail.js +26 -15
  188. package/dist/services/stall/read-log-tail.js.map +1 -1
  189. package/dist/services/stall/stall-detector.d.ts +53 -4
  190. package/dist/services/stall/stall-detector.d.ts.map +1 -1
  191. package/dist/services/stall/stall-detector.js +212 -34
  192. package/dist/services/stall/stall-detector.js.map +1 -1
  193. package/dist/services/stall/stall-poller.d.ts.map +1 -1
  194. package/dist/services/stall/stall-poller.js +35 -42
  195. package/dist/services/stall/stall-poller.js.map +1 -1
  196. package/dist/services/strategy.d.ts +9 -0
  197. package/dist/services/strategy.d.ts.map +1 -1
  198. package/dist/services/strategy.js +119 -8
  199. package/dist/services/strategy.js.map +1 -1
  200. package/dist/services/substitution-engine.js +2 -2
  201. package/dist/services/substitution-engine.js.map +1 -1
  202. package/dist/services/tool-registry.d.ts.map +1 -1
  203. package/dist/services/tool-registry.js +5 -3
  204. package/dist/services/tool-registry.js.map +1 -1
  205. package/dist/services/user-config.js +1 -1
  206. package/dist/services/user-config.js.map +1 -1
  207. package/dist/services/vcs/azure-devops.d.ts +67 -2
  208. package/dist/services/vcs/azure-devops.d.ts.map +1 -1
  209. package/dist/services/vcs/azure-devops.js +281 -15
  210. package/dist/services/vcs/azure-devops.js.map +1 -1
  211. package/dist/services/vcs/bitbucket.d.ts.map +1 -1
  212. package/dist/services/vcs/bitbucket.js +16 -0
  213. package/dist/services/vcs/bitbucket.js.map +1 -1
  214. package/dist/services/vcs/github.d.ts.map +1 -1
  215. package/dist/services/vcs/github.js +24 -0
  216. package/dist/services/vcs/github.js.map +1 -1
  217. package/dist/services/vcs/types.d.ts +123 -2
  218. package/dist/services/vcs/types.d.ts.map +1 -1
  219. package/dist/skills/fleet-sprint-cli/SKILL.md +20 -1
  220. package/dist/skills/pm/SKILL.md +1 -2
  221. package/dist/skills/pm/cost.md +0 -4
  222. package/dist/skills/pm/fleet-addendum.md +2 -3
  223. package/dist/tools/check-status.d.ts +7 -4
  224. package/dist/tools/check-status.d.ts.map +1 -1
  225. package/dist/tools/check-status.js +5 -3
  226. package/dist/tools/check-status.js.map +1 -1
  227. package/dist/tools/cloud-control.js +2 -2
  228. package/dist/tools/cloud-control.js.map +1 -1
  229. package/dist/tools/compose-permissions.d.ts +6 -0
  230. package/dist/tools/compose-permissions.d.ts.map +1 -1
  231. package/dist/tools/compose-permissions.js +211 -50
  232. package/dist/tools/compose-permissions.js.map +1 -1
  233. package/dist/tools/credential-store-set.js +1 -1
  234. package/dist/tools/execute-command.d.ts.map +1 -1
  235. package/dist/tools/execute-command.js +56 -29
  236. package/dist/tools/execute-command.js.map +1 -1
  237. package/dist/tools/execute-prompt.d.ts +15 -2
  238. package/dist/tools/execute-prompt.d.ts.map +1 -1
  239. package/dist/tools/execute-prompt.js +1214 -873
  240. package/dist/tools/execute-prompt.js.map +1 -1
  241. package/dist/tools/kb-capture.d.ts +2 -2
  242. package/dist/tools/kb-capture.d.ts.map +1 -1
  243. package/dist/tools/kb-capture.js +29 -5
  244. package/dist/tools/kb-capture.js.map +1 -1
  245. package/dist/tools/kb-export.d.ts +2 -2
  246. package/dist/tools/kb-export.d.ts.map +1 -1
  247. package/dist/tools/kb-export.js +3 -28
  248. package/dist/tools/kb-export.js.map +1 -1
  249. package/dist/tools/kb-feedback.d.ts.map +1 -1
  250. package/dist/tools/kb-feedback.js +3 -1
  251. package/dist/tools/kb-feedback.js.map +1 -1
  252. package/dist/tools/kb-freshness-sweep.d.ts.map +1 -1
  253. package/dist/tools/kb-freshness-sweep.js +3 -1
  254. package/dist/tools/kb-freshness-sweep.js.map +1 -1
  255. package/dist/tools/kb-import.d.ts.map +1 -1
  256. package/dist/tools/kb-import.js +2 -1
  257. package/dist/tools/kb-import.js.map +1 -1
  258. package/dist/tools/kb-list.d.ts.map +1 -1
  259. package/dist/tools/kb-list.js +3 -1
  260. package/dist/tools/kb-list.js.map +1 -1
  261. package/dist/tools/kb-query.d.ts +2 -2
  262. package/dist/tools/kb-reconcile-prefilter.d.ts.map +1 -1
  263. package/dist/tools/kb-reconcile-prefilter.js +3 -1
  264. package/dist/tools/kb-reconcile-prefilter.js.map +1 -1
  265. package/dist/tools/kb-resolve-contradiction.d.ts.map +1 -1
  266. package/dist/tools/kb-resolve-contradiction.js +3 -1
  267. package/dist/tools/kb-resolve-contradiction.js.map +1 -1
  268. package/dist/tools/kb-setup.d.ts.map +1 -1
  269. package/dist/tools/kb-setup.js +125 -20
  270. package/dist/tools/kb-setup.js.map +1 -1
  271. package/dist/tools/kb-stats.d.ts.map +1 -1
  272. package/dist/tools/kb-stats.js +64 -43
  273. package/dist/tools/kb-stats.js.map +1 -1
  274. package/dist/tools/list-members.d.ts +2 -2
  275. package/dist/tools/list-members.d.ts.map +1 -1
  276. package/dist/tools/list-members.js +7 -2
  277. package/dist/tools/list-members.js.map +1 -1
  278. package/dist/tools/member-detail.d.ts +2 -2
  279. package/dist/tools/member-detail.d.ts.map +1 -1
  280. package/dist/tools/member-detail.js +22 -3
  281. package/dist/tools/member-detail.js.map +1 -1
  282. package/dist/tools/member-reservation.d.ts +58 -1
  283. package/dist/tools/member-reservation.d.ts.map +1 -1
  284. package/dist/tools/member-reservation.js +71 -18
  285. package/dist/tools/member-reservation.js.map +1 -1
  286. package/dist/tools/monitor-task.d.ts.map +1 -1
  287. package/dist/tools/monitor-task.js +17 -2
  288. package/dist/tools/monitor-task.js.map +1 -1
  289. package/dist/tools/provision-auth.d.ts +80 -1
  290. package/dist/tools/provision-auth.d.ts.map +1 -1
  291. package/dist/tools/provision-auth.js +147 -59
  292. package/dist/tools/provision-auth.js.map +1 -1
  293. package/dist/tools/provision-vcs-auth.d.ts +96 -3
  294. package/dist/tools/provision-vcs-auth.d.ts.map +1 -1
  295. package/dist/tools/provision-vcs-auth.js +254 -88
  296. package/dist/tools/provision-vcs-auth.js.map +1 -1
  297. package/dist/tools/register-member.d.ts +21 -12
  298. package/dist/tools/register-member.d.ts.map +1 -1
  299. package/dist/tools/register-member.js +141 -16
  300. package/dist/tools/register-member.js.map +1 -1
  301. package/dist/tools/remove-member.d.ts.map +1 -1
  302. package/dist/tools/remove-member.js +29 -4
  303. package/dist/tools/remove-member.js.map +1 -1
  304. package/dist/tools/revoke-vcs-auth.js +2 -2
  305. package/dist/tools/revoke-vcs-auth.js.map +1 -1
  306. package/dist/tools/send-email.d.ts +2 -2
  307. package/dist/tools/setup-git-app.d.ts.map +1 -1
  308. package/dist/tools/setup-git-app.js +11 -7
  309. package/dist/tools/setup-git-app.js.map +1 -1
  310. package/dist/tools/setup-ssh-key.d.ts.map +1 -1
  311. package/dist/tools/setup-ssh-key.js +2 -1
  312. package/dist/tools/setup-ssh-key.js.map +1 -1
  313. package/dist/tools/shutdown-server.d.ts +2 -0
  314. package/dist/tools/shutdown-server.d.ts.map +1 -1
  315. package/dist/tools/shutdown-server.js +23 -1
  316. package/dist/tools/shutdown-server.js.map +1 -1
  317. package/dist/tools/stop-prompt.js +2 -2
  318. package/dist/tools/stop-prompt.js.map +1 -1
  319. package/dist/tools/update-agent-cli.js +2 -2
  320. package/dist/tools/update-agent-cli.js.map +1 -1
  321. package/dist/tools/update-member.d.ts +21 -12
  322. package/dist/tools/update-member.d.ts.map +1 -1
  323. package/dist/tools/update-member.js +61 -12
  324. package/dist/tools/update-member.js.map +1 -1
  325. package/dist/tools/vcs-credential-exec.d.ts +127 -0
  326. package/dist/tools/vcs-credential-exec.d.ts.map +1 -0
  327. package/dist/tools/vcs-credential-exec.js +197 -0
  328. package/dist/tools/vcs-credential-exec.js.map +1 -0
  329. package/dist/types.d.ts +24 -1
  330. package/dist/types.d.ts.map +1 -1
  331. package/dist/utils/agent-helpers.d.ts +36 -0
  332. package/dist/utils/agent-helpers.d.ts.map +1 -1
  333. package/dist/utils/agent-helpers.js +39 -1
  334. package/dist/utils/agent-helpers.js.map +1 -1
  335. package/dist/utils/log-helpers.d.ts.map +1 -1
  336. package/dist/utils/log-helpers.js +2 -2
  337. package/dist/utils/log-helpers.js.map +1 -1
  338. package/dist/utils/platform.d.ts +7 -0
  339. package/dist/utils/platform.d.ts.map +1 -1
  340. package/dist/utils/platform.js +11 -1
  341. package/dist/utils/platform.js.map +1 -1
  342. package/dist/utils/prompt-errors.d.ts.map +1 -1
  343. package/dist/utils/prompt-errors.js +7 -1
  344. package/dist/utils/prompt-errors.js.map +1 -1
  345. package/dist/utils/shell-escape.d.ts +16 -0
  346. package/dist/utils/shell-escape.d.ts.map +1 -1
  347. package/dist/utils/shell-escape.js +22 -2
  348. package/dist/utils/shell-escape.js.map +1 -1
  349. package/dist/utils/vcs-provider-detect.d.ts +65 -0
  350. package/dist/utils/vcs-provider-detect.d.ts.map +1 -0
  351. package/dist/utils/vcs-provider-detect.js +109 -0
  352. package/dist/utils/vcs-provider-detect.js.map +1 -0
  353. package/dist/utils/workspace-trust.d.ts +20 -17
  354. package/dist/utils/workspace-trust.d.ts.map +1 -1
  355. package/dist/utils/workspace-trust.js +91 -1
  356. package/dist/utils/workspace-trust.js.map +1 -1
  357. package/dist/workflows/auto-sprint.js +180 -32
  358. package/package.json +7 -5
  359. package/packages/apra-fleet-client/src/client/api.mjs +403 -12
  360. package/packages/apra-fleet-client/src/client/errors.mjs +6 -2
  361. package/packages/apra-fleet-se/apra-pm/agents/_shared/GRAPH-SEMANTICS.md +10 -2
  362. package/packages/apra-fleet-se/apra-pm/agents/backlog-groomer.md +42 -21
  363. package/packages/apra-fleet-se/apra-pm/agents/ci-watcher.md +14 -0
  364. package/packages/apra-fleet-se/apra-pm/agents/deployer.md +59 -46
  365. package/packages/apra-fleet-se/apra-pm/agents/doer.md +157 -134
  366. package/packages/apra-fleet-se/apra-pm/agents/harvester.md +31 -32
  367. package/packages/apra-fleet-se/apra-pm/agents/integ-test-runner.md +92 -113
  368. package/packages/apra-fleet-se/apra-pm/agents/kb-reconciler.md +40 -42
  369. package/packages/apra-fleet-se/apra-pm/agents/plan-reviewer.md +139 -63
  370. package/packages/apra-fleet-se/apra-pm/agents/planner.md +176 -100
  371. package/packages/apra-fleet-se/apra-pm/agents/regression-test-runner.md +77 -81
  372. package/packages/apra-fleet-se/apra-pm/agents/reviewer.md +69 -85
  373. package/packages/apra-fleet-se/apra-pm/agents/schemas/integ-test-runner-output.json +1 -1
  374. package/packages/apra-fleet-se/apra-pm/agents/schemas/plan-reviewer-output.json +37 -0
  375. package/packages/apra-fleet-se/apra-pm/agents/schemas/regression-test-runner-output.json +4 -17
  376. package/packages/apra-fleet-se/apra-pm/skills/pm/SKILL.md +1 -2
  377. package/packages/apra-fleet-se/apra-pm/skills/pm/cost.md +0 -4
  378. package/packages/apra-fleet-se/apra-pm/skills/pm/fleet-addendum.md +2 -3
  379. package/packages/apra-fleet-se/bin/cli.mjs +280 -3
  380. package/packages/apra-fleet-se/bin/serve.mjs +114 -5
  381. package/packages/apra-fleet-se/fleet-sprint/abort.mjs +481 -0
  382. package/packages/apra-fleet-se/fleet-sprint/beads-children.mjs +491 -0
  383. package/packages/apra-fleet-se/fleet-sprint/beads-identity-check.mjs +282 -0
  384. package/packages/apra-fleet-se/fleet-sprint/beads-identity.mjs +208 -0
  385. package/packages/apra-fleet-se/fleet-sprint/beads-scope.mjs +638 -0
  386. package/packages/apra-fleet-se/fleet-sprint/beads-transitions.mjs +301 -0
  387. package/packages/apra-fleet-se/fleet-sprint/branch-ensure.mjs +96 -0
  388. package/packages/apra-fleet-se/fleet-sprint/conflict-ladder.mjs +8 -0
  389. package/packages/apra-fleet-se/fleet-sprint/contracts.mjs +199 -34
  390. package/packages/apra-fleet-se/fleet-sprint/coordination.mjs +516 -0
  391. package/packages/apra-fleet-se/fleet-sprint/dispatch-failure.mjs +184 -0
  392. package/packages/apra-fleet-se/fleet-sprint/dispatch-role.mjs +1121 -0
  393. package/packages/apra-fleet-se/fleet-sprint/dispatch-safety-guard.mjs +216 -4
  394. package/packages/apra-fleet-se/fleet-sprint/docs/README.md +23 -8
  395. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-manual-recovery-verified.md +10 -8
  396. package/packages/apra-fleet-se/fleet-sprint/docs/dolt-sync-redesign.md +285 -4
  397. package/packages/apra-fleet-se/fleet-sprint/docs/escalate-to-llm-design.md +3 -3
  398. package/packages/apra-fleet-se/fleet-sprint/docs/run-sprint-cycle-prelude-decision.md +215 -0
  399. package/packages/apra-fleet-se/fleet-sprint/docs/shared-orchestrator-reservation-design.md +12 -12
  400. package/packages/apra-fleet-se/fleet-sprint/docs/stabilization-log.md +14 -4
  401. package/packages/apra-fleet-se/fleet-sprint/dolt-literal-guard.mjs +56 -1
  402. package/packages/apra-fleet-se/fleet-sprint/dolt-settle.mjs +275 -99
  403. package/packages/apra-fleet-se/fleet-sprint/dolt-sync.mjs +1054 -39
  404. package/packages/apra-fleet-se/fleet-sprint/errors.mjs +308 -0
  405. package/packages/apra-fleet-se/fleet-sprint/explicit-id-create-guard.mjs +501 -0
  406. package/packages/apra-fleet-se/fleet-sprint/fatal-diagnostics.mjs +134 -0
  407. package/packages/apra-fleet-se/fleet-sprint/full-db-fetch-guard.mjs +102 -0
  408. package/packages/apra-fleet-se/fleet-sprint/git-sync.mjs +556 -0
  409. package/packages/apra-fleet-se/fleet-sprint/git-topology.mjs +495 -0
  410. package/packages/apra-fleet-se/fleet-sprint/guarded-modules.mjs +564 -0
  411. package/packages/apra-fleet-se/fleet-sprint/inline-ladder-guard.mjs +216 -0
  412. package/packages/apra-fleet-se/fleet-sprint/kb.mjs +728 -0
  413. package/packages/apra-fleet-se/fleet-sprint/mcp-result.mjs +75 -0
  414. package/packages/apra-fleet-se/fleet-sprint/member-provisioning.mjs +252 -0
  415. package/packages/apra-fleet-se/fleet-sprint/member-sync.mjs +581 -0
  416. package/packages/apra-fleet-se/fleet-sprint/member-target.mjs +93 -0
  417. package/packages/apra-fleet-se/fleet-sprint/newtask-text.mjs +266 -0
  418. package/packages/apra-fleet-se/fleet-sprint/parent-notes-staleness.mjs +201 -0
  419. package/packages/apra-fleet-se/fleet-sprint/phases/deploy.mjs +136 -0
  420. package/packages/apra-fleet-se/fleet-sprint/phases/develop.mjs +822 -0
  421. package/packages/apra-fleet-se/fleet-sprint/phases/ensure-sprint-branch.mjs +294 -0
  422. package/packages/apra-fleet-se/fleet-sprint/phases/final-review.mjs +403 -0
  423. package/packages/apra-fleet-se/fleet-sprint/phases/harvest.mjs +180 -0
  424. package/packages/apra-fleet-se/fleet-sprint/phases/integ-test.mjs +358 -0
  425. package/packages/apra-fleet-se/fleet-sprint/phases/plan.mjs +390 -0
  426. package/packages/apra-fleet-se/fleet-sprint/phases/publish-pr.mjs +323 -0
  427. package/packages/apra-fleet-se/fleet-sprint/phases/re-review.mjs +232 -0
  428. package/packages/apra-fleet-se/fleet-sprint/phases/regression-test.mjs +174 -0
  429. package/packages/apra-fleet-se/fleet-sprint/phases/replan.mjs +197 -0
  430. package/packages/apra-fleet-se/fleet-sprint/phases/review.mjs +305 -0
  431. package/packages/apra-fleet-se/fleet-sprint/prompts.mjs +559 -0
  432. package/packages/apra-fleet-se/fleet-sprint/role-policies.mjs +1416 -0
  433. package/packages/apra-fleet-se/fleet-sprint/round-session.mjs +100 -0
  434. package/packages/apra-fleet-se/fleet-sprint/runner.js +1672 -9072
  435. package/packages/apra-fleet-se/fleet-sprint/se-os-commands.mjs +134 -0
  436. package/packages/apra-fleet-se/fleet-sprint/se-posix.mjs +159 -0
  437. package/packages/apra-fleet-se/fleet-sprint/se-windows-gitbash.mjs +97 -0
  438. package/packages/apra-fleet-se/fleet-sprint/se-windows.mjs +143 -0
  439. package/packages/apra-fleet-se/fleet-sprint/shell-command-guard.mjs +304 -0
  440. package/packages/apra-fleet-se/fleet-sprint/skills/fleet-sprint-cli/SKILL.md +20 -1
  441. package/packages/apra-fleet-se/fleet-sprint/skills/fleet-supervisor/SKILL.md +21 -2
  442. package/packages/apra-fleet-se/fleet-sprint/sprint-args.mjs +454 -0
  443. package/packages/apra-fleet-se/fleet-sprint/sprint-report.mjs +239 -0
  444. package/packages/apra-fleet-se/fleet-sprint/sprint-state.mjs +163 -0
  445. package/packages/apra-fleet-se/fleet-sprint/unbracketed-push-guard.mjs +234 -0
  446. package/packages/apra-fleet-se/fleet-sprint/usage-limit-controller.mjs +211 -0
  447. package/packages/apra-fleet-se/fleet-sprint/vcs-auth.mjs +1279 -0
  448. package/packages/apra-fleet-se/fleet-sprint/vcs-module.mjs +204 -19
  449. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/azure-devops.mjs +707 -12
  450. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/bitbucket.mjs +28 -0
  451. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/dolt.mjs +33 -4
  452. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/github.mjs +191 -43
  453. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/index.mjs +333 -6
  454. package/packages/apra-fleet-se/fleet-sprint/vcs-providers/shell-helpers.mjs +165 -0
  455. package/packages/apra-fleet-se/fleet-sprint/viewer-extensions.mjs +167 -37
  456. package/packages/apra-fleet-se/fleet-sprint/worklists.mjs +559 -0
  457. package/packages/apra-fleet-se/package.json +1 -1
  458. package/packages/apra-fleet-workflow/src/viewer/index.mjs +178 -1
  459. package/packages/apra-fleet-workflow/src/workflow/index.mjs +478 -32
  460. package/skills/fleet/SKILL.md +27 -16
  461. package/skills/fleet/auth-azdevops.md +57 -7
  462. package/skills/fleet/auth-bitbucket.md +5 -5
  463. package/skills/fleet/auth-github.md +7 -6
  464. package/skills/fleet/beads-conflict-resolution.md +141 -0
  465. package/skills/fleet/beads.md +16 -12
  466. package/skills/fleet/onboarding.md +6 -6
  467. package/skills/fleet/permissions.md +11 -7
  468. package/skills/fleet/profiles/node.json +1 -1
  469. package/skills/fleet/skill-matrix.md +1 -1
  470. package/skills/fleet/troubleshooting.md +4 -3
  471. package/version.json +1 -1
  472. package/dist/providers/gemini.d.ts +0 -52
  473. package/dist/providers/gemini.d.ts.map +0 -1
  474. package/dist/providers/gemini.js +0 -236
  475. package/dist/providers/gemini.js.map +0 -1
  476. package/packages/apra-fleet-se/fleet-sprint/docs/coach-role-design.md +0 -23
@@ -1,5 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
+ import { guardedModulePaths } from './guarded-modules.mjs';
3
4
 
4
5
  // =============================================================================
5
6
  // apra-fleet-eft.3.3 -- dispatch-safety guard checker, extracted so it is
@@ -19,6 +20,16 @@ import path from 'path';
19
20
  // Invariant under test (unchanged from eft.3.1): EVERY `command(` / `agent(`
20
21
  // call site in a scanned source file must supply an explicit `member_name`
21
22
  // (or `member_id`) in its options object.
23
+ //
24
+ // MODULE-LIST GENERALIZATION: this guard is no longer pointed at a single
25
+ // hard-coded file. checkModules() below reads the SHARED guarded-module list
26
+ // (./guarded-modules.mjs) -- the one place a newly extracted fleet-sprint
27
+ // module is registered -- so a dispatch that moves out of runner.js into a
28
+ // new module stays covered instead of silently falling out of scan scope.
29
+ // checkPath() remains exported and behaves exactly as before; it is still the
30
+ // right entry point for scanning one specific file (a fixture, or a module
31
+ // like dolt-sync.mjs that is deliberately not on the shared list). This
32
+ // module is the reference implementation the sibling guards follow.
22
33
  // =============================================================================
23
34
 
24
35
  /**
@@ -63,18 +74,177 @@ export function skipStringLiteral(src, start, quoteChar) {
63
74
  return i;
64
75
  }
65
76
 
77
+ // A `/` that opens a REGEX literal (as opposed to a division/`/=` operator)
78
+ // is only ever preceded -- skipping whitespace -- by one of these punctuation
79
+ // characters, by the start of the file, or by one of the listed keywords.
80
+ // This is the same heuristic real tokenizers use to disambiguate the two: a
81
+ // division operator always follows a value (an identifier, number, `)`, `]`,
82
+ // `}`, or a closing quote), never one of these. Good enough for source text
83
+ // that is valid, already-linted JS (this repo's own modules), which is the
84
+ // only input maskComments() is ever run against.
85
+ const REGEX_PRECEDING_PUNCT_CHARS = new Set('([{,;:=!&|?+-*%^~<>'.split(''));
86
+ const REGEX_PRECEDING_KEYWORDS = new Set([
87
+ 'return', 'typeof', 'instanceof', 'in', 'of', 'new', 'delete', 'void',
88
+ 'yield', 'throw', 'case', 'do', 'else', 'await',
89
+ ]);
90
+
91
+ /**
92
+ * True when a `/` at position `idx` in `text` opens a regex literal rather
93
+ * than a division or `/=` operator. Scans backward from `idx` (skipping
94
+ * whitespace) to the last significant character/word and checks it against
95
+ * REGEX_PRECEDING_PUNCT_CHARS/REGEX_PRECEDING_KEYWORDS above. `text` must
96
+ * already have comments masked to whitespace at every position before `idx`
97
+ * (both maskComments()'s own in-progress `out` buffer and its finished
98
+ * return value satisfy this), so a `/` right after where a comment used to
99
+ * be correctly sees whatever preceded the comment, not the comment itself.
100
+ * EXPORTED so any OTHER walk over an already-masked copy of source (e.g. a
101
+ * depth-count loop that must not miscount a quote or bracket embedded in a
102
+ * regex body) can reuse the exact same regex-vs-division heuristic instead
103
+ * of re-deriving it -- see extractBalancedCall() below and
104
+ * unbracketed-push-guard.mjs's findFunctionBodyRange() for two consumers
105
+ * that got this wrong before apra-fleet-btj9.10.
106
+ */
107
+ export function canStartRegex(text, idx) {
108
+ let j = idx - 1;
109
+ while (j >= 0 && /\s/.test(text[j])) j--;
110
+ if (j < 0) return true; // start of file
111
+ if (REGEX_PRECEDING_PUNCT_CHARS.has(text[j])) return true;
112
+ let k = j;
113
+ while (k >= 0 && /[A-Za-z0-9_$]/.test(text[k])) k--;
114
+ const word = text.slice(k + 1, j + 1);
115
+ return REGEX_PRECEDING_KEYWORDS.has(word);
116
+ }
117
+
118
+ /**
119
+ * Returns the index of the closing `/` of a regex literal that opens at
120
+ * `start`, or -1 if none is found before end-of-line/end-of-file (a regex
121
+ * literal can never span a raw newline in valid JS, so hitting one means the
122
+ * leading `/` was misclassified as a regex start -- the caller falls back to
123
+ * treating it as an ordinary character). Tracks bracket-expression state
124
+ * (`[...]`) because a `/` inside a character class does not close the regex
125
+ * (this is exactly what SAFE_TEXT_RE = /^[A-Za-z0-9 .,:;!?()'_/+[\]-]+$/ in
126
+ * newtask-text.mjs relies on), and skips backslash-escaped characters
127
+ * (inside or outside the class) the same way skipStringLiteral() does.
128
+ * EXPORTED for the same reason as canStartRegex() above.
129
+ */
130
+ export function skipRegexLiteral(src, start) {
131
+ let inClass = false;
132
+ for (let i = start + 1; i < src.length; i++) {
133
+ const ch = src[i];
134
+ if (ch === '\\') { i++; continue; }
135
+ if (ch === '\n') return -1;
136
+ if (inClass) {
137
+ if (ch === ']') inClass = false;
138
+ continue;
139
+ }
140
+ if (ch === '[') { inClass = true; continue; }
141
+ if (ch === '/') return i;
142
+ }
143
+ return -1;
144
+ }
145
+
146
+ /**
147
+ * Replaces every comment's characters with spaces (newlines preserved), so
148
+ * the result has the SAME length and line numbering as `src` but no comment
149
+ * text -- mirrors test/helpers/dispatch-pin-scanner.mjs's maskComments()
150
+ * (that file's stripComments() helper is NOT length-preserving, which would
151
+ * corrupt the positional index math extractBalancedCall depends on).
152
+ *
153
+ * WHY THIS EXISTS (apra-fleet-3swo.34): extractBalancedCall()'s depth walk
154
+ * skips over string literals but, before this fix, did not skip comments.
155
+ * runner.js's prose comments are full of apostrophes (e.g. "the streak's
156
+ * scope"); an unmasked walk reads that apostrophe as an opening quote and
157
+ * swallows everything -- including real closing parens -- until the next
158
+ * apostrophe, so a call site's balanced range can silently run away to the
159
+ * end of the file. Masking comments out before walking parens/quotes is what
160
+ * makes the balanced range trustworthy; the returned callText is still
161
+ * sliced from the ORIGINAL (unmasked) src so callers keep seeing real
162
+ * comment text, just with correct boundaries.
163
+ *
164
+ * REGEX LITERALS (apra-fleet-btj9.10): a regex whose body contains a quote or
165
+ * apostrophe -- e.g. newtask-text.mjs's
166
+ * `SAFE_TEXT_RE = /^[A-Za-z0-9 .,:;!?()'_/+[\]-]+$/` or branch-ensure.mjs's
167
+ * `/couldn't find remote ref/i` -- used to open the SAME kind of phantom
168
+ * string the comment-blindness fix above closed for apostrophes in prose: the
169
+ * string branch below would treat that quote as opening a real string and
170
+ * copy everything up to the next matching quote through UNMASKED, including
171
+ * any real comment in between (whose stray parens could then desync a later
172
+ * extractBalancedCall() depth walk). Regex literals are recognized (via
173
+ * canStartRegex()/skipRegexLiteral() above) and copied through verbatim --
174
+ * like a string, not stripped -- BEFORE the string branch gets a chance to
175
+ * misread the quote inside one.
176
+ *
177
+ * @param {string} src
178
+ * @returns {string}
179
+ */
180
+ export function maskComments(src) {
181
+ let out = '';
182
+ for (let i = 0; i < src.length; i++) {
183
+ const ch = src[i];
184
+ if (ch === '/' && src[i + 1] === '/') {
185
+ while (i < src.length && src[i] !== '\n') { out += ' '; i++; }
186
+ out += '\n';
187
+ continue;
188
+ }
189
+ if (ch === '/' && src[i + 1] === '*') {
190
+ const end = src.indexOf('*/', i + 2);
191
+ const stop = end < 0 ? src.length - 1 : end + 1;
192
+ for (; i <= stop; i++) out += src[i] === '\n' ? '\n' : ' ';
193
+ i--;
194
+ continue;
195
+ }
196
+ if (ch === '/' && canStartRegex(out, out.length)) {
197
+ const end = skipRegexLiteral(src, i);
198
+ if (end !== -1) {
199
+ let flagEnd = end;
200
+ while (flagEnd + 1 < src.length && /[a-zA-Z]/.test(src[flagEnd + 1])) flagEnd++;
201
+ out += src.slice(i, flagEnd + 1);
202
+ i = flagEnd;
203
+ continue;
204
+ }
205
+ // Not actually a regex (no closing `/` before end of line) --
206
+ // fall through and let the default branch below copy the `/`
207
+ // as an ordinary character.
208
+ }
209
+ if (ch === '"' || ch === "'" || ch === '`') {
210
+ const end = skipStringLiteral(src, i, ch);
211
+ out += src.slice(i, end + 1);
212
+ i = end;
213
+ continue;
214
+ }
215
+ out += ch;
216
+ }
217
+ return out;
218
+ }
219
+
66
220
  /**
67
221
  * Given the index of an opening '(' in `src`, returns the full call-site
68
222
  * text from that '(' through its matching ')', tracking paren depth and
69
223
  * skipping over string/template-literal contents (so parens embedded in
70
224
  * string/template content, e.g. `bd show ${ids.join(' ')}`, never disturb
71
- * the depth count).
225
+ * the depth count) AND over comment spans (so an apostrophe in prose, e.g.
226
+ * "the streak's scope", is never misread as opening a string -- see
227
+ * maskComments() above). The depth/quote walk runs over a comment-masked
228
+ * copy of `src`, but the returned text is sliced from the ORIGINAL `src` so
229
+ * real comment content is preserved in the output.
230
+ *
231
+ * ALSO skips over regex literals in this SAME walk (apra-fleet-btj9.10):
232
+ * maskComments() copies a regex literal's body through verbatim (like a
233
+ * string's), so a quote/apostrophe inside one (e.g. a call argument written
234
+ * `/it's ok/`) is still sitting right there in `masked`. Without this,
235
+ * THIS walk's own quote branch below would re-discover that apostrophe and
236
+ * misread it as opening a real string, potentially running the depth walk
237
+ * away past the call's real closing paren. Uses the same
238
+ * canStartRegex()/skipRegexLiteral() maskComments() itself uses, so a
239
+ * `/` is only ever treated as a regex open here in the exact cases it would
240
+ * have been treated as one during masking.
72
241
  */
73
242
  export function extractBalancedCall(src, openParenIdx) {
243
+ const masked = maskComments(src);
74
244
  let depth = 0;
75
245
  let i = openParenIdx;
76
- for (; i < src.length; i++) {
77
- const ch = src[i];
246
+ for (; i < masked.length; i++) {
247
+ const ch = masked[i];
78
248
  if (ch === '(') {
79
249
  depth++;
80
250
  } else if (ch === ')') {
@@ -82,8 +252,11 @@ export function extractBalancedCall(src, openParenIdx) {
82
252
  if (depth === 0) {
83
253
  return src.slice(openParenIdx, i + 1);
84
254
  }
255
+ } else if (ch === '/' && canStartRegex(masked, i)) {
256
+ const end = skipRegexLiteral(masked, i);
257
+ if (end !== -1) i = end;
85
258
  } else if (ch === '"' || ch === "'" || ch === '`') {
86
- i = skipStringLiteral(src, i, ch);
259
+ i = skipStringLiteral(masked, i, ch);
87
260
  }
88
261
  }
89
262
  // Unbalanced -- should never happen against real, syntactically-valid
@@ -175,3 +348,42 @@ export function checkPath(filePath) {
175
348
  const violations = findViolations(sites, fileLabel);
176
349
  return { sites, violations };
177
350
  }
351
+
352
+ /**
353
+ * Aggregate entry point: scans EVERY module in the shared guarded-module list
354
+ * (fleet-sprint/guarded-modules.mjs -- runner.js today, plus whatever is
355
+ * extracted from it) and returns the union of their call sites and
356
+ * violations. This is the reference implementation the other mechanical
357
+ * guards in this directory follow.
358
+ *
359
+ * Each violation string already carries the basename of the file it came
360
+ * from (findViolations' `fileLabel`), so an aggregate run over several
361
+ * modules attributes every finding to the correct module rather than to a
362
+ * single hard-coded runner.js label. `sitesByFile` gives per-module call-site
363
+ * counts for baseline assertions that need them.
364
+ *
365
+ * `paths` defaults to the shared list; callers pass
366
+ * guardedModulePaths([fixture]) to prove the list -- not a hard-coded name --
367
+ * is what the guard actually reads.
368
+ *
369
+ * @param {string[]} [paths]
370
+ * @returns {{ sites: object[], violations: string[], files: string[], sitesByFile: Record<string, object[]> }}
371
+ */
372
+ export function checkModules(paths = guardedModulePaths()) {
373
+ if (!Array.isArray(paths)) {
374
+ throw new TypeError('checkModules(paths): paths must be an array of file paths');
375
+ }
376
+ const sites = [];
377
+ const violations = [];
378
+ const files = [];
379
+ const sitesByFile = {};
380
+ for (const p of paths) {
381
+ const file = path.basename(p);
382
+ const result = checkPath(p);
383
+ files.push(file);
384
+ sitesByFile[file] = result.sites;
385
+ sites.push(...result.sites.map((s) => ({ ...s, file })));
386
+ violations.push(...result.violations);
387
+ }
388
+ return { sites, violations, files, sitesByFile };
389
+ }
@@ -79,7 +79,7 @@ Watch progress there rather than tailing raw stdout.
79
79
 
80
80
  | Flag | Short | Required | Default | Description |
81
81
  |---|---|---|---|---|
82
- | `--issue <ids>` | `-i` | yes | -- | Target issue ID(s), comma separated (e.g. `epic-1,epic-2`). Scope resolves via `bd list --parent <id>` -- see the epics section below. |
82
+ | `--issue <ids>` | `-i` | yes | -- | Target issue ID(s), comma separated (e.g. `epic-1,epic-2`). Scope resolves to each id's full descendant subtree -- see the epics section below. |
83
83
  | `--members <ids>` | `-m` | yes | -- | Member IDs/names to use, comma separated. Members act as repo targets for parallelism. |
84
84
  | `--branch <name>` | `-b` | yes | -- | Sprint branch to develop on. Created from `--base` if it does not exist; reused as-is if it does. |
85
85
  | `--base <name>` | `-B` | yes | -- | Base branch the sprint branch is created from, and the branch the eventual PR targets. |
@@ -90,13 +90,24 @@ Watch progress there rather than tailing raw stdout.
90
90
  | `--role-map <json\|@file>` | | no | -- | JSON object mapping role -> member[], e.g. `'{"doer":["m1","m2"]}'`. Inline JSON or `@path/to/file.json`. |
91
91
  | `--viewer-port <port>` | | no | `8080` | Port for the local dashboard viewer. |
92
92
  | `--budget <usd>` | | no | unlimited | USD ceiling for this run's total estimated spend. |
93
- | `--dispatch-timeout-s <s>` | | no | `9000` | Per-dispatch time budget in seconds, applied as both the inactivity timeout and the hard ceiling on every agent dispatch (integ-test dispatch ceiling is 2x, regression-test ceiling is 3x). Minimum 60. Lower it for small sprints so a hung dispatch costs minutes, not 2.5 hours. |
93
+ | `--dispatch-timeout-s <s>` | | no | `9000` | Per-dispatch total time budget in seconds -- the hard ceiling on every agent dispatch (integ-test dispatch ceiling is 2x, regression-test ceiling is 3x). Minimum 60. The inactivity/stall threshold used to detect a hung dispatch is derived from this value but capped separately at 30 minutes, so raising this budget for a large sprint does not also grant a stalled dispatch a correspondingly longer grace period before it is killed. Lower it for small sprints so a hung dispatch costs minutes, not 2.5 hours. |
94
94
  | `--sync` | | no | off | Synced topology mode (orchestrator-bracketed git sync): members may sit on differing HEADs but must share the same origin URL and pass a `bd dolt pull` probe. Omitted uses shared-workspace mode (all members on the same HEAD). |
95
95
  | `--help` | `-h` | | | Show the engine's help. |
96
96
 
97
97
  Unrecognized flags fail loudly rather than being silently ignored, so a typo
98
98
  like `--max-cycle` aborts instead of quietly applying the default.
99
99
 
100
+ **A shared/`unreservable` orchestrator member goes in `--role-map` ONLY, never
101
+ in `--members`.** `--members` (and `--role-map` values for git-having roles
102
+ like doer/reviewer/harvester) still get git-identity/topology-checked and, on
103
+ resume, git-resynced. A member registered `unreservable: true` (e.g. a
104
+ beads-only orchestrator shared across concurrent sprints) is exempted from
105
+ those checks only when it appears exclusively via `roleMap.orchestrator` --
106
+ listing it in `--members` too is redundant and not required, and defeats the
107
+ exemption for anything outside the topology precondition (e.g. a paused/
108
+ resumed sprint's resync step still runs real git commands against every
109
+ `--members` entry, unreservable or not).
110
+
100
111
  ## Preconditions worth checking first
101
112
 
102
113
  - The target issue (e.g. `apra-fleet-7pm`) must exist and be open:
@@ -143,15 +154,19 @@ bead that used `blocks` instead had `dependency_count: 5` and, once
143
154
  children were also parented under it, deadlocked completely.
144
155
 
145
156
  This also matters for launching a sprint: `fleet-sprint`'s `--issue <id>`
146
- flag resolves the sprint's scope via `bd list --parent <id>` internally --
147
- it only ever understands the `parent-child` hierarchy. A `blocked-by`-only
148
- manifest bead is invisible to fleet-sprint's scope filter no matter what you
149
- pass to `--issue`; only true children are picked up.
157
+ flag resolves the sprint's scope by walking the `parent-child` tree down from
158
+ `<id>` -- `bdListScoped()` fetches the whole project's beads once and does
159
+ the descendant walk in memory, so every descendant at any depth is in scope
160
+ (not just direct children), but nothing outside the parent-child hierarchy
161
+ ever is. A `blocked-by`-only manifest bead is invisible to fleet-sprint's
162
+ scope filter no matter what you pass to `--issue`; only true children are
163
+ picked up. See `packages/apra-fleet-se/docs/fleet-sprint-cli-contract.md` for
164
+ the full algorithm and worked examples.
150
165
 
151
166
  ## Recovering a wedged member reservation (launched via the supervisor)
152
167
 
153
- If a sprint was launched through the supervisor (`fleet-se serve`, `POST
154
- /api/sprints`) and its child process crashes or is killed, the supervisor's
168
+ If a sprint was launched through the supervisor (`bin/serve.mjs`, installed
169
+ as `fleet-se-serve`; `POST /api/sprints`) and its child process crashes or is killed, the supervisor's
155
170
  reservation ledger does **not** release that sprint's claim on its own during
156
171
  normal runtime -- only a supervisor restart, or an explicit operator call,
157
172
  clears it. Symptom: relaunching against the same member(s) is rejected with
@@ -42,14 +42,16 @@ The embedded `bd` binary does NOT ship enough of the Dolt CLI to drive a
42
42
  merge-conflict resolution over SQL -- that requires the real `dolt` binary and
43
43
  a real `dolt sql-server` process, temporarily, against the SAME data directory.
44
44
 
45
- CORRECTED 2026-08-13 (`dolt-sync-redesign.md` Part 5, Precondition V2). This
46
- step previously said `winget install --id DoltHub.Dolt` on Windows, plus
47
- `apt`/`brew` on POSIX. That was a genuine mistake and must not be repeated:
48
- winget delivered a STALE 1.86.3 build while this repo carries its own version
49
- pin, so an OS package manager is a second, unpinned version channel -- banned
50
- from every code path and runbook this design owns. It also created a PATH
51
- problem of its own: a winget-installed binary is invisible to processes that
52
- started before the install, which is every SSH-dispatched session.
45
+ **Never install it with an OS package manager** (`winget`, `apt`, `brew`).
46
+ Two independent reasons, both load-bearing (see `dolt-sync-redesign.md`
47
+ Part 5, Precondition V2):
48
+
49
+ - A package manager is a second, unpinned version channel. It will happily
50
+ deliver a build older than this repo's own version pin, and the landmines
51
+ this procedure works around are version-specific.
52
+ - A freshly package-manager-installed binary is invisible to processes that
53
+ started before the install -- which is every SSH-dispatched session, so the
54
+ install appears to succeed and the binary still cannot be found.
53
55
 
54
56
  The fleet's ONE pinned channel is the same GitHub release asset
55
57
  `src/cli/dolt-install.ts` uses (`DOLT_VERSION`, currently `v2.2.0`), landed at