@apralabs/apra-fleet 0.2.2

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 (482) hide show
  1. package/LICENSE +182 -0
  2. package/README.md +324 -0
  3. package/dist/cli/auth.d.ts +2 -0
  4. package/dist/cli/auth.d.ts.map +1 -0
  5. package/dist/cli/auth.js +210 -0
  6. package/dist/cli/auth.js.map +1 -0
  7. package/dist/cli/config.d.ts +30 -0
  8. package/dist/cli/config.d.ts.map +1 -0
  9. package/dist/cli/config.js +157 -0
  10. package/dist/cli/config.js.map +1 -0
  11. package/dist/cli/install.d.ts +37 -0
  12. package/dist/cli/install.d.ts.map +1 -0
  13. package/dist/cli/install.js +630 -0
  14. package/dist/cli/install.js.map +1 -0
  15. package/dist/cli/secret.d.ts +2 -0
  16. package/dist/cli/secret.d.ts.map +1 -0
  17. package/dist/cli/secret.js +366 -0
  18. package/dist/cli/secret.js.map +1 -0
  19. package/dist/cli/uninstall.d.ts +2 -0
  20. package/dist/cli/uninstall.d.ts.map +1 -0
  21. package/dist/cli/uninstall.js +312 -0
  22. package/dist/cli/uninstall.js.map +1 -0
  23. package/dist/cli/update.d.ts +2 -0
  24. package/dist/cli/update.d.ts.map +1 -0
  25. package/dist/cli/update.js +105 -0
  26. package/dist/cli/update.js.map +1 -0
  27. package/dist/delivery-mode.d.ts +19 -0
  28. package/dist/delivery-mode.d.ts.map +1 -0
  29. package/dist/delivery-mode.js +26 -0
  30. package/dist/delivery-mode.js.map +1 -0
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +272 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/onboarding/text.d.ts +83 -0
  36. package/dist/onboarding/text.d.ts.map +1 -0
  37. package/dist/onboarding/text.js +126 -0
  38. package/dist/onboarding/text.js.map +1 -0
  39. package/dist/os/index.d.ts +9 -0
  40. package/dist/os/index.d.ts.map +1 -0
  41. package/dist/os/index.js +16 -0
  42. package/dist/os/index.js.map +1 -0
  43. package/dist/os/linux.d.ts +50 -0
  44. package/dist/os/linux.d.ts.map +1 -0
  45. package/dist/os/linux.js +244 -0
  46. package/dist/os/linux.js.map +1 -0
  47. package/dist/os/macos.d.ts +12 -0
  48. package/dist/os/macos.d.ts.map +1 -0
  49. package/dist/os/macos.js +41 -0
  50. package/dist/os/macos.js.map +1 -0
  51. package/dist/os/os-commands.d.ts +47 -0
  52. package/dist/os/os-commands.d.ts.map +1 -0
  53. package/dist/os/os-commands.js +3 -0
  54. package/dist/os/os-commands.js.map +1 -0
  55. package/dist/os/windows-wrapper.d.ts +6 -0
  56. package/dist/os/windows-wrapper.d.ts.map +1 -0
  57. package/dist/os/windows-wrapper.js +9 -0
  58. package/dist/os/windows-wrapper.js.map +1 -0
  59. package/dist/os/windows.d.ts +44 -0
  60. package/dist/os/windows.d.ts.map +1 -0
  61. package/dist/os/windows.js +269 -0
  62. package/dist/os/windows.js.map +1 -0
  63. package/dist/paths.d.ts +2 -0
  64. package/dist/paths.d.ts.map +1 -0
  65. package/dist/paths.js +4 -0
  66. package/dist/paths.js.map +1 -0
  67. package/dist/providers/agy.d.ts +41 -0
  68. package/dist/providers/agy.d.ts.map +1 -0
  69. package/dist/providers/agy.js +208 -0
  70. package/dist/providers/agy.js.map +1 -0
  71. package/dist/providers/claude.d.ts +40 -0
  72. package/dist/providers/claude.d.ts.map +1 -0
  73. package/dist/providers/claude.js +178 -0
  74. package/dist/providers/claude.js.map +1 -0
  75. package/dist/providers/codex.d.ts +44 -0
  76. package/dist/providers/codex.d.ts.map +1 -0
  77. package/dist/providers/codex.js +173 -0
  78. package/dist/providers/codex.js.map +1 -0
  79. package/dist/providers/copilot.d.ts +40 -0
  80. package/dist/providers/copilot.d.ts.map +1 -0
  81. package/dist/providers/copilot.js +172 -0
  82. package/dist/providers/copilot.js.map +1 -0
  83. package/dist/providers/gemini.d.ts +41 -0
  84. package/dist/providers/gemini.d.ts.map +1 -0
  85. package/dist/providers/gemini.js +192 -0
  86. package/dist/providers/gemini.js.map +1 -0
  87. package/dist/providers/index.d.ts +10 -0
  88. package/dist/providers/index.d.ts.map +1 -0
  89. package/dist/providers/index.js +27 -0
  90. package/dist/providers/index.js.map +1 -0
  91. package/dist/providers/provider.d.ts +85 -0
  92. package/dist/providers/provider.d.ts.map +1 -0
  93. package/dist/providers/provider.js +21 -0
  94. package/dist/providers/provider.js.map +1 -0
  95. package/dist/services/auth-socket.d.ts +87 -0
  96. package/dist/services/auth-socket.d.ts.map +1 -0
  97. package/dist/services/auth-socket.js +684 -0
  98. package/dist/services/auth-socket.js.map +1 -0
  99. package/dist/services/auth-web.d.ts +31 -0
  100. package/dist/services/auth-web.d.ts.map +1 -0
  101. package/dist/services/auth-web.js +202 -0
  102. package/dist/services/auth-web.js.map +1 -0
  103. package/dist/services/cloud/activity.d.ts +16 -0
  104. package/dist/services/cloud/activity.d.ts.map +1 -0
  105. package/dist/services/cloud/activity.js +61 -0
  106. package/dist/services/cloud/activity.js.map +1 -0
  107. package/dist/services/cloud/aws.d.ts +24 -0
  108. package/dist/services/cloud/aws.d.ts.map +1 -0
  109. package/dist/services/cloud/aws.js +114 -0
  110. package/dist/services/cloud/aws.js.map +1 -0
  111. package/dist/services/cloud/cost.d.ts +46 -0
  112. package/dist/services/cloud/cost.d.ts.map +1 -0
  113. package/dist/services/cloud/cost.js +161 -0
  114. package/dist/services/cloud/cost.js.map +1 -0
  115. package/dist/services/cloud/idle-manager.d.ts +20 -0
  116. package/dist/services/cloud/idle-manager.d.ts.map +1 -0
  117. package/dist/services/cloud/idle-manager.js +103 -0
  118. package/dist/services/cloud/idle-manager.js.map +1 -0
  119. package/dist/services/cloud/lifecycle.d.ts +14 -0
  120. package/dist/services/cloud/lifecycle.d.ts.map +1 -0
  121. package/dist/services/cloud/lifecycle.js +128 -0
  122. package/dist/services/cloud/lifecycle.js.map +1 -0
  123. package/dist/services/cloud/task-wrapper.d.ts +30 -0
  124. package/dist/services/cloud/task-wrapper.d.ts.map +1 -0
  125. package/dist/services/cloud/task-wrapper.js +116 -0
  126. package/dist/services/cloud/task-wrapper.js.map +1 -0
  127. package/dist/services/cloud/types.d.ts +26 -0
  128. package/dist/services/cloud/types.d.ts.map +1 -0
  129. package/dist/services/cloud/types.js +2 -0
  130. package/dist/services/cloud/types.js.map +1 -0
  131. package/dist/services/credential-cleanup.d.ts +4 -0
  132. package/dist/services/credential-cleanup.d.ts.map +1 -0
  133. package/dist/services/credential-cleanup.js +61 -0
  134. package/dist/services/credential-cleanup.js.map +1 -0
  135. package/dist/services/credential-store.d.ts +56 -0
  136. package/dist/services/credential-store.d.ts.map +1 -0
  137. package/dist/services/credential-store.js +280 -0
  138. package/dist/services/credential-store.js.map +1 -0
  139. package/dist/services/file-transfer.d.ts +22 -0
  140. package/dist/services/file-transfer.d.ts.map +1 -0
  141. package/dist/services/file-transfer.js +14 -0
  142. package/dist/services/file-transfer.js.map +1 -0
  143. package/dist/services/git-config.d.ts +6 -0
  144. package/dist/services/git-config.d.ts.map +1 -0
  145. package/dist/services/git-config.js +31 -0
  146. package/dist/services/git-config.js.map +1 -0
  147. package/dist/services/github-app.d.ts +30 -0
  148. package/dist/services/github-app.d.ts.map +1 -0
  149. package/dist/services/github-app.js +96 -0
  150. package/dist/services/github-app.js.map +1 -0
  151. package/dist/services/icons.d.ts +16 -0
  152. package/dist/services/icons.d.ts.map +1 -0
  153. package/dist/services/icons.js +67 -0
  154. package/dist/services/icons.js.map +1 -0
  155. package/dist/services/known-hosts.d.ts +23 -0
  156. package/dist/services/known-hosts.d.ts.map +1 -0
  157. package/dist/services/known-hosts.js +86 -0
  158. package/dist/services/known-hosts.js.map +1 -0
  159. package/dist/services/onboarding.d.ts +68 -0
  160. package/dist/services/onboarding.d.ts.map +1 -0
  161. package/dist/services/onboarding.js +205 -0
  162. package/dist/services/onboarding.js.map +1 -0
  163. package/dist/services/registry.d.ts +16 -0
  164. package/dist/services/registry.d.ts.map +1 -0
  165. package/dist/services/registry.js +156 -0
  166. package/dist/services/registry.js.map +1 -0
  167. package/dist/services/sftp.d.ts +16 -0
  168. package/dist/services/sftp.d.ts.map +1 -0
  169. package/dist/services/sftp.js +104 -0
  170. package/dist/services/sftp.js.map +1 -0
  171. package/dist/services/ssh.d.ts +29 -0
  172. package/dist/services/ssh.d.ts.map +1 -0
  173. package/dist/services/ssh.js +297 -0
  174. package/dist/services/ssh.js.map +1 -0
  175. package/dist/services/stall/find-log-file.d.ts +2 -0
  176. package/dist/services/stall/find-log-file.d.ts.map +1 -0
  177. package/dist/services/stall/find-log-file.js +153 -0
  178. package/dist/services/stall/find-log-file.js.map +1 -0
  179. package/dist/services/stall/index.d.ts +4 -0
  180. package/dist/services/stall/index.d.ts.map +1 -0
  181. package/dist/services/stall/index.js +4 -0
  182. package/dist/services/stall/index.js.map +1 -0
  183. package/dist/services/stall/log-path-resolver.d.ts +4 -0
  184. package/dist/services/stall/log-path-resolver.d.ts.map +1 -0
  185. package/dist/services/stall/log-path-resolver.js +32 -0
  186. package/dist/services/stall/log-path-resolver.js.map +1 -0
  187. package/dist/services/stall/log-path-resolver.test.d.ts +2 -0
  188. package/dist/services/stall/log-path-resolver.test.d.ts.map +1 -0
  189. package/dist/services/stall/log-path-resolver.test.js +76 -0
  190. package/dist/services/stall/log-path-resolver.test.js.map +1 -0
  191. package/dist/services/stall/read-log-tail.d.ts +6 -0
  192. package/dist/services/stall/read-log-tail.d.ts.map +1 -0
  193. package/dist/services/stall/read-log-tail.js +44 -0
  194. package/dist/services/stall/read-log-tail.js.map +1 -0
  195. package/dist/services/stall/stall-detector.d.ts +25 -0
  196. package/dist/services/stall/stall-detector.d.ts.map +1 -0
  197. package/dist/services/stall/stall-detector.js +153 -0
  198. package/dist/services/stall/stall-detector.js.map +1 -0
  199. package/dist/services/stall/stall-poller.d.ts +6 -0
  200. package/dist/services/stall/stall-poller.d.ts.map +1 -0
  201. package/dist/services/stall/stall-poller.js +75 -0
  202. package/dist/services/stall/stall-poller.js.map +1 -0
  203. package/dist/services/stall/time-utils.d.ts +4 -0
  204. package/dist/services/stall/time-utils.d.ts.map +1 -0
  205. package/dist/services/stall/time-utils.js +22 -0
  206. package/dist/services/stall/time-utils.js.map +1 -0
  207. package/dist/services/statusline.d.ts +10 -0
  208. package/dist/services/statusline.d.ts.map +1 -0
  209. package/dist/services/statusline.js +84 -0
  210. package/dist/services/statusline.js.map +1 -0
  211. package/dist/services/strategy.d.ts +16 -0
  212. package/dist/services/strategy.d.ts.map +1 -0
  213. package/dist/services/strategy.js +241 -0
  214. package/dist/services/strategy.js.map +1 -0
  215. package/dist/services/task-cleanup.d.ts +3 -0
  216. package/dist/services/task-cleanup.d.ts.map +1 -0
  217. package/dist/services/task-cleanup.js +81 -0
  218. package/dist/services/task-cleanup.js.map +1 -0
  219. package/dist/services/update-check.d.ts +15 -0
  220. package/dist/services/update-check.d.ts.map +1 -0
  221. package/dist/services/update-check.js +67 -0
  222. package/dist/services/update-check.js.map +1 -0
  223. package/dist/services/user-config.d.ts +12 -0
  224. package/dist/services/user-config.d.ts.map +1 -0
  225. package/dist/services/user-config.js +73 -0
  226. package/dist/services/user-config.js.map +1 -0
  227. package/dist/services/vcs/azure-devops.d.ts +7 -0
  228. package/dist/services/vcs/azure-devops.d.ts.map +1 -0
  229. package/dist/services/vcs/azure-devops.js +38 -0
  230. package/dist/services/vcs/azure-devops.js.map +1 -0
  231. package/dist/services/vcs/bitbucket.d.ts +6 -0
  232. package/dist/services/vcs/bitbucket.d.ts.map +1 -0
  233. package/dist/services/vcs/bitbucket.js +31 -0
  234. package/dist/services/vcs/bitbucket.js.map +1 -0
  235. package/dist/services/vcs/constants.d.ts +2 -0
  236. package/dist/services/vcs/constants.d.ts.map +1 -0
  237. package/dist/services/vcs/constants.js +6 -0
  238. package/dist/services/vcs/constants.js.map +1 -0
  239. package/dist/services/vcs/github.d.ts +6 -0
  240. package/dist/services/vcs/github.d.ts.map +1 -0
  241. package/dist/services/vcs/github.js +81 -0
  242. package/dist/services/vcs/github.js.map +1 -0
  243. package/dist/services/vcs/types.d.ts +52 -0
  244. package/dist/services/vcs/types.d.ts.map +1 -0
  245. package/dist/services/vcs/types.js +8 -0
  246. package/dist/services/vcs/types.js.map +1 -0
  247. package/dist/smoke-test.d.ts +10 -0
  248. package/dist/smoke-test.d.ts.map +1 -0
  249. package/dist/smoke-test.js +102 -0
  250. package/dist/smoke-test.js.map +1 -0
  251. package/dist/tools/check-status.d.ts +11 -0
  252. package/dist/tools/check-status.d.ts.map +1 -0
  253. package/dist/tools/check-status.js +247 -0
  254. package/dist/tools/check-status.js.map +1 -0
  255. package/dist/tools/cloud-control.d.ts +17 -0
  256. package/dist/tools/cloud-control.d.ts.map +1 -0
  257. package/dist/tools/cloud-control.js +102 -0
  258. package/dist/tools/cloud-control.js.map +1 -0
  259. package/dist/tools/compose-permissions.d.ts +26 -0
  260. package/dist/tools/compose-permissions.d.ts.map +1 -0
  261. package/dist/tools/compose-permissions.js +217 -0
  262. package/dist/tools/compose-permissions.js.map +1 -0
  263. package/dist/tools/credential-store-delete.d.ts +11 -0
  264. package/dist/tools/credential-store-delete.d.ts.map +1 -0
  265. package/dist/tools/credential-store-delete.js +15 -0
  266. package/dist/tools/credential-store-delete.js.map +1 -0
  267. package/dist/tools/credential-store-list.d.ts +4 -0
  268. package/dist/tools/credential-store-list.d.ts.map +1 -0
  269. package/dist/tools/credential-store-list.js +30 -0
  270. package/dist/tools/credential-store-list.js.map +1 -0
  271. package/dist/tools/credential-store-set.d.ts +26 -0
  272. package/dist/tools/credential-store-set.d.ts.map +1 -0
  273. package/dist/tools/credential-store-set.js +28 -0
  274. package/dist/tools/credential-store-set.js.map +1 -0
  275. package/dist/tools/credential-store-update.d.ts +20 -0
  276. package/dist/tools/credential-store-update.d.ts.map +1 -0
  277. package/dist/tools/credential-store-update.js +38 -0
  278. package/dist/tools/credential-store-update.js.map +1 -0
  279. package/dist/tools/execute-command.d.ts +33 -0
  280. package/dist/tools/execute-command.d.ts.map +1 -0
  281. package/dist/tools/execute-command.js +231 -0
  282. package/dist/tools/execute-command.js.map +1 -0
  283. package/dist/tools/execute-prompt.d.ts +36 -0
  284. package/dist/tools/execute-prompt.d.ts.map +1 -0
  285. package/dist/tools/execute-prompt.js +310 -0
  286. package/dist/tools/execute-prompt.js.map +1 -0
  287. package/dist/tools/list-members.d.ts +11 -0
  288. package/dist/tools/list-members.d.ts.map +1 -0
  289. package/dist/tools/list-members.js +108 -0
  290. package/dist/tools/list-members.js.map +1 -0
  291. package/dist/tools/member-detail.d.ts +17 -0
  292. package/dist/tools/member-detail.d.ts.map +1 -0
  293. package/dist/tools/member-detail.js +263 -0
  294. package/dist/tools/member-detail.js.map +1 -0
  295. package/dist/tools/monitor-task.d.ts +20 -0
  296. package/dist/tools/monitor-task.d.ts.map +1 -0
  297. package/dist/tools/monitor-task.js +89 -0
  298. package/dist/tools/monitor-task.js.map +1 -0
  299. package/dist/tools/provision-auth.d.ts +17 -0
  300. package/dist/tools/provision-auth.d.ts.map +1 -0
  301. package/dist/tools/provision-auth.js +256 -0
  302. package/dist/tools/provision-auth.js.map +1 -0
  303. package/dist/tools/provision-vcs-auth.d.ts +50 -0
  304. package/dist/tools/provision-vcs-auth.d.ts.map +1 -0
  305. package/dist/tools/provision-vcs-auth.js +187 -0
  306. package/dist/tools/provision-vcs-auth.js.map +1 -0
  307. package/dist/tools/receive-files.d.ts +20 -0
  308. package/dist/tools/receive-files.d.ts.map +1 -0
  309. package/dist/tools/receive-files.js +82 -0
  310. package/dist/tools/receive-files.js.map +1 -0
  311. package/dist/tools/register-member.d.ts +74 -0
  312. package/dist/tools/register-member.d.ts.map +1 -0
  313. package/dist/tools/register-member.js +310 -0
  314. package/dist/tools/register-member.js.map +1 -0
  315. package/dist/tools/remove-member.d.ts +17 -0
  316. package/dist/tools/remove-member.d.ts.map +1 -0
  317. package/dist/tools/remove-member.js +126 -0
  318. package/dist/tools/remove-member.js.map +1 -0
  319. package/dist/tools/revoke-vcs-auth.d.ts +23 -0
  320. package/dist/tools/revoke-vcs-auth.d.ts.map +1 -0
  321. package/dist/tools/revoke-vcs-auth.js +55 -0
  322. package/dist/tools/revoke-vcs-auth.js.map +1 -0
  323. package/dist/tools/send-files.d.ts +20 -0
  324. package/dist/tools/send-files.d.ts.map +1 -0
  325. package/dist/tools/send-files.js +103 -0
  326. package/dist/tools/send-files.js.map +1 -0
  327. package/dist/tools/setup-git-app.d.ts +17 -0
  328. package/dist/tools/setup-git-app.d.ts.map +1 -0
  329. package/dist/tools/setup-git-app.js +89 -0
  330. package/dist/tools/setup-git-app.js.map +1 -0
  331. package/dist/tools/setup-ssh-key.d.ts +14 -0
  332. package/dist/tools/setup-ssh-key.d.ts.map +1 -0
  333. package/dist/tools/setup-ssh-key.js +119 -0
  334. package/dist/tools/setup-ssh-key.js.map +1 -0
  335. package/dist/tools/shutdown-server.d.ts +4 -0
  336. package/dist/tools/shutdown-server.d.ts.map +1 -0
  337. package/dist/tools/shutdown-server.js +9 -0
  338. package/dist/tools/shutdown-server.js.map +1 -0
  339. package/dist/tools/stop-prompt.d.ts +14 -0
  340. package/dist/tools/stop-prompt.d.ts.map +1 -0
  341. package/dist/tools/stop-prompt.js +44 -0
  342. package/dist/tools/stop-prompt.js.map +1 -0
  343. package/dist/tools/update-agent-cli.d.ts +17 -0
  344. package/dist/tools/update-agent-cli.d.ts.map +1 -0
  345. package/dist/tools/update-agent-cli.js +110 -0
  346. package/dist/tools/update-agent-cli.js.map +1 -0
  347. package/dist/tools/update-member.d.ts +77 -0
  348. package/dist/tools/update-member.d.ts.map +1 -0
  349. package/dist/tools/update-member.js +202 -0
  350. package/dist/tools/update-member.js.map +1 -0
  351. package/dist/tools/version.d.ts +4 -0
  352. package/dist/tools/version.d.ts.map +1 -0
  353. package/dist/tools/version.js +7 -0
  354. package/dist/tools/version.js.map +1 -0
  355. package/dist/types.d.ts +70 -0
  356. package/dist/types.d.ts.map +1 -0
  357. package/dist/types.js +2 -0
  358. package/dist/types.js.map +1 -0
  359. package/dist/utils/agent-helpers.d.ts +41 -0
  360. package/dist/utils/agent-helpers.d.ts.map +1 -0
  361. package/dist/utils/agent-helpers.js +84 -0
  362. package/dist/utils/agent-helpers.js.map +1 -0
  363. package/dist/utils/ansi.d.ts +6 -0
  364. package/dist/utils/ansi.d.ts.map +1 -0
  365. package/dist/utils/ansi.js +20 -0
  366. package/dist/utils/ansi.js.map +1 -0
  367. package/dist/utils/auth-env.d.ts +8 -0
  368. package/dist/utils/auth-env.d.ts.map +1 -0
  369. package/dist/utils/auth-env.js +30 -0
  370. package/dist/utils/auth-env.js.map +1 -0
  371. package/dist/utils/collect-secret.d.ts +2 -0
  372. package/dist/utils/collect-secret.d.ts.map +1 -0
  373. package/dist/utils/collect-secret.js +80 -0
  374. package/dist/utils/collect-secret.js.map +1 -0
  375. package/dist/utils/credential-validation.d.ts +13 -0
  376. package/dist/utils/credential-validation.d.ts.map +1 -0
  377. package/dist/utils/credential-validation.js +35 -0
  378. package/dist/utils/credential-validation.js.map +1 -0
  379. package/dist/utils/crypto.d.ts +3 -0
  380. package/dist/utils/crypto.d.ts.map +1 -0
  381. package/dist/utils/crypto.js +61 -0
  382. package/dist/utils/crypto.js.map +1 -0
  383. package/dist/utils/deep-merge.d.ts +3 -0
  384. package/dist/utils/deep-merge.d.ts.map +1 -0
  385. package/dist/utils/deep-merge.js +23 -0
  386. package/dist/utils/deep-merge.js.map +1 -0
  387. package/dist/utils/file-permissions.d.ts +8 -0
  388. package/dist/utils/file-permissions.d.ts.map +1 -0
  389. package/dist/utils/file-permissions.js +13 -0
  390. package/dist/utils/file-permissions.js.map +1 -0
  391. package/dist/utils/gpu-parser.d.ts +6 -0
  392. package/dist/utils/gpu-parser.d.ts.map +1 -0
  393. package/dist/utils/gpu-parser.js +15 -0
  394. package/dist/utils/gpu-parser.js.map +1 -0
  395. package/dist/utils/log-helpers.d.ts +29 -0
  396. package/dist/utils/log-helpers.d.ts.map +1 -0
  397. package/dist/utils/log-helpers.js +128 -0
  398. package/dist/utils/log-helpers.js.map +1 -0
  399. package/dist/utils/oob-timeout.d.ts +2 -0
  400. package/dist/utils/oob-timeout.d.ts.map +1 -0
  401. package/dist/utils/oob-timeout.js +2 -0
  402. package/dist/utils/oob-timeout.js.map +1 -0
  403. package/dist/utils/pid-helpers.d.ts +11 -0
  404. package/dist/utils/pid-helpers.d.ts.map +1 -0
  405. package/dist/utils/pid-helpers.js +21 -0
  406. package/dist/utils/pid-helpers.js.map +1 -0
  407. package/dist/utils/platform.d.ts +13 -0
  408. package/dist/utils/platform.d.ts.map +1 -0
  409. package/dist/utils/platform.js +60 -0
  410. package/dist/utils/platform.js.map +1 -0
  411. package/dist/utils/prompt-errors.d.ts +5 -0
  412. package/dist/utils/prompt-errors.d.ts.map +1 -0
  413. package/dist/utils/prompt-errors.js +15 -0
  414. package/dist/utils/prompt-errors.js.map +1 -0
  415. package/dist/utils/resolve-member.d.ts +18 -0
  416. package/dist/utils/resolve-member.d.ts.map +1 -0
  417. package/dist/utils/resolve-member.js +23 -0
  418. package/dist/utils/resolve-member.js.map +1 -0
  419. package/dist/utils/secure-input.d.ts +6 -0
  420. package/dist/utils/secure-input.d.ts.map +1 -0
  421. package/dist/utils/secure-input.js +60 -0
  422. package/dist/utils/secure-input.js.map +1 -0
  423. package/dist/utils/shell-escape.d.ts +43 -0
  424. package/dist/utils/shell-escape.d.ts.map +1 -0
  425. package/dist/utils/shell-escape.js +67 -0
  426. package/dist/utils/shell-escape.js.map +1 -0
  427. package/dist/utils/ssh-error-messages.d.ts +5 -0
  428. package/dist/utils/ssh-error-messages.d.ts.map +1 -0
  429. package/dist/utils/ssh-error-messages.js +20 -0
  430. package/dist/utils/ssh-error-messages.js.map +1 -0
  431. package/dist/version.d.ts +18 -0
  432. package/dist/version.d.ts.map +1 -0
  433. package/dist/version.js +101 -0
  434. package/dist/version.js.map +1 -0
  435. package/hooks/hooks-config.json +15 -0
  436. package/hooks/post-register-member.sh +10 -0
  437. package/package.json +82 -0
  438. package/scripts/agy-settings-merge.js +27 -0
  439. package/scripts/agy-transcript-reader.js +62 -0
  440. package/scripts/fleet-statusline.sh +43 -0
  441. package/skills/fleet/SKILL.md +262 -0
  442. package/skills/fleet/auth-azdevops.md +72 -0
  443. package/skills/fleet/auth-bitbucket.md +65 -0
  444. package/skills/fleet/auth-github.md +86 -0
  445. package/skills/fleet/beads.md +90 -0
  446. package/skills/fleet/onboarding.md +92 -0
  447. package/skills/fleet/permissions.md +23 -0
  448. package/skills/fleet/profiles/base-dev.json +18 -0
  449. package/skills/fleet/profiles/base-reviewer.json +14 -0
  450. package/skills/fleet/profiles/cpp.json +4 -0
  451. package/skills/fleet/profiles/dotnet.json +4 -0
  452. package/skills/fleet/profiles/go.json +4 -0
  453. package/skills/fleet/profiles/jvm.json +4 -0
  454. package/skills/fleet/profiles/node.json +4 -0
  455. package/skills/fleet/profiles/python.json +4 -0
  456. package/skills/fleet/profiles/rust.json +4 -0
  457. package/skills/fleet/profiles/tpl-permissions.json +5 -0
  458. package/skills/fleet/skill-matrix.md +34 -0
  459. package/skills/fleet/troubleshooting.md +13 -0
  460. package/skills/pm/SKILL.md +110 -0
  461. package/skills/pm/backlog-item.md +65 -0
  462. package/skills/pm/beads.md +192 -0
  463. package/skills/pm/cleanup.md +15 -0
  464. package/skills/pm/context-file.md +40 -0
  465. package/skills/pm/doer-reviewer.md +123 -0
  466. package/skills/pm/init.md +25 -0
  467. package/skills/pm/multi-pair-sprint.md +64 -0
  468. package/skills/pm/plan-prompt.md +94 -0
  469. package/skills/pm/simple-sprint.md +42 -0
  470. package/skills/pm/single-pair-sprint.md +178 -0
  471. package/skills/pm/tpl-deploy.md +24 -0
  472. package/skills/pm/tpl-design.md +29 -0
  473. package/skills/pm/tpl-doer.md +43 -0
  474. package/skills/pm/tpl-plan.md +72 -0
  475. package/skills/pm/tpl-pm.md +2 -0
  476. package/skills/pm/tpl-progress.json +28 -0
  477. package/skills/pm/tpl-projects.md +4 -0
  478. package/skills/pm/tpl-requirements.md +21 -0
  479. package/skills/pm/tpl-reviewer-plan.md +53 -0
  480. package/skills/pm/tpl-reviewer.md +72 -0
  481. package/skills/pm/tpl-status.md +29 -0
  482. package/version.json +3 -0
@@ -0,0 +1,101 @@
1
+ // BUILD_VERSION is replaced by esbuild `define` at bundle time.
2
+ // In dev (tsc), it stays as-is and we fall back to reading version.json.
3
+ import { createRequire } from 'node:module';
4
+ /**
5
+ * Core version resolution logic with injectable root directory.
6
+ *
7
+ * The `rootDir` parameter is a testability seam: callers may pass a path that
8
+ * does not contain a valid version.json to exercise the catch -> 'v0.0.0-unknown'
9
+ * fallback without needing to mock native built-ins. Production code always
10
+ * calls this via resolveVersion() which supplies the real package root.
11
+ *
12
+ * NOTE: the seam is intentionally minimal -- only rootDir is injectable.
13
+ * The require() loader is NOT injected because changing it would undermine
14
+ * the createRequire(import.meta.url) lazy-load strategy that keeps this
15
+ * module from being perturbed by consumers that mock 'node:fs' at module scope
16
+ * (see update.test.ts). For the fallback test, a non-existent rootDir is
17
+ * sufficient to trigger the catch without mocking anything.
18
+ */
19
+ export function resolveVersionFromRoot(rootDir) {
20
+ // fs/path/url are loaded lazily via require() rather than top-level ESM
21
+ // imports so that consumers which mock 'node:fs' at module scope do not
22
+ // perturb this module-load-time call (serverVersion is assigned eagerly).
23
+ // Under ESM (tsc output for npm) `require` and `__dirname` do not exist,
24
+ // so we build a require() from import.meta.url and derive the dir from it.
25
+ // Under CJS/SEA we use the bare globals so the existing path is unaffected.
26
+ try {
27
+ let req;
28
+ if (typeof __dirname === 'undefined') {
29
+ // ESM path (tsc output for npm).
30
+ req = createRequire(import.meta.url);
31
+ }
32
+ else {
33
+ // CJS / SEA path.
34
+ req = require;
35
+ }
36
+ const { readFileSync, existsSync } = req('node:fs');
37
+ const { join } = req('node:path');
38
+ const root = rootDir;
39
+ const vf = JSON.parse(readFileSync(join(root, 'version.json'), 'utf-8'));
40
+ // 3. Dev-only git-hash suffix. npm installs ship no .git/ directory, so
41
+ // this naturally yields a bare semver for npm users.
42
+ let hash = '';
43
+ try {
44
+ const headPath = join(root, '.git', 'HEAD');
45
+ if (existsSync(headPath)) {
46
+ const head = readFileSync(headPath, 'utf-8').trim();
47
+ if (head.startsWith('ref: ')) {
48
+ const refPath = join(root, '.git', head.slice(5));
49
+ if (existsSync(refPath)) {
50
+ hash = '_' + readFileSync(refPath, 'utf-8').trim().slice(0, 6);
51
+ }
52
+ }
53
+ else {
54
+ hash = '_' + head.slice(0, 6);
55
+ }
56
+ }
57
+ }
58
+ catch { /* no git info */ }
59
+ return `v${vf.version}${hash}`;
60
+ }
61
+ catch {
62
+ return 'v0.0.0-unknown';
63
+ }
64
+ }
65
+ function resolveVersion() {
66
+ // 1. Build-time injection (esbuild bundle / SEA binary)
67
+ try {
68
+ if (typeof BUILD_VERSION !== 'undefined')
69
+ return BUILD_VERSION;
70
+ }
71
+ catch {
72
+ // BUILD_VERSION not defined -- dev/npm mode
73
+ }
74
+ // 2. Resolve the package root containing version.json.
75
+ // fs/path/url are loaded lazily via require() rather than top-level ESM
76
+ // imports so that consumers which mock 'node:fs' at module scope do not
77
+ // perturb this module-load-time call (serverVersion is assigned eagerly).
78
+ // Under ESM (tsc output for npm) `require` and `__dirname` do not exist,
79
+ // so we build a require() from import.meta.url and derive the dir from it.
80
+ // Under CJS/SEA we use the bare globals so the existing path is unaffected.
81
+ let req;
82
+ let dir;
83
+ if (typeof __dirname === 'undefined') {
84
+ // ESM path (tsc output for npm).
85
+ req = createRequire(import.meta.url);
86
+ const { fileURLToPath } = req('node:url');
87
+ const { dirname } = req('node:path');
88
+ dir = dirname(fileURLToPath(import.meta.url));
89
+ }
90
+ else {
91
+ // CJS / SEA path. __dirname points to dist/ (tsc output).
92
+ req = require;
93
+ dir = __dirname;
94
+ }
95
+ const { join } = req('node:path');
96
+ // dist/ entry -> package root is one level up.
97
+ const root = join(dir, '..');
98
+ return resolveVersionFromRoot(root);
99
+ }
100
+ export const serverVersion = resolveVersion();
101
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,15 @@
1
+ {
2
+ "hooks": {
3
+ "PostToolUse": [
4
+ {
5
+ "matcher": "mcp__apra-fleet__register_member",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node -e \"const fs = require('fs'), path = require('path'), cp = require('child_process'); let home = process.env.USERPROFILE || process.env.HOME || ''; if (process.platform === 'linux' && home.startsWith('/home/')) { const user = process.env.USER || home.split('/').pop(); const wslHome = '/mnt/c/Users/' + user; if (fs.existsSync(wslHome)) home = wslHome; } const p = path.join(home, '.apra-fleet', 'hooks', 'post-register-member.sh'); if (fs.existsSync(p)) { cp.execSync('bash \\\"' + p + '\\\"', { stdio: 'inherit' }); }\""
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
@@ -0,0 +1,10 @@
1
+ #!/bin/bash
2
+ # PostToolUse hook for mcp__apra-fleet__register_member
3
+ # Self-contained onboarding nudge — works with or without the PM skill.
4
+ #
5
+ # Installed by install.sh into the user's ~/.claude/settings.json hook config.
6
+ # Hook input (stdin): JSON with tool_name, tool_input, session_id, etc.
7
+
8
+ cat <<'EOF'
9
+ {"decision":"block","reason":"New member registered. Run onboarding before dispatching work.","hookSpecificOutput":{"hookEventName":"PostToolUse","additionalContext":"Onboarding checklist:\n1. Remote members: migrate to SSH key auth via setup_ssh_key (skip for local members)\n2. Check member_detail to confirm connectivity and auth status\n3. Detect VCS provider: execute_command → git remote -v on the member\n4. Provision VCS auth if needed via provision_vcs_auth\n5. Disable AI attribution: execute_command → write {\"attribution\":{\"commit\":\"\",\"pr\":\"\"}} to .claude/settings.json on the member\n6. Ask user for member roles (development, review, testing, devops)\n7. If PM skill is installed, update the project status file with member profile"}}
10
+ EOF
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "@apralabs/apra-fleet",
3
+ "version": "0.2.2",
4
+ "description": "MCP server for orchestrating multiple agentic AI instances (Claude, Gemini, Codex, Copilot, AGY) across machines via SSH",
5
+ "author": "Apra Labs",
6
+ "homepage": "https://github.com/Apra-Labs/apra-fleet",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/Apra-Labs/apra-fleet.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/Apra-Labs/apra-fleet/issues"
13
+ },
14
+ "type": "module",
15
+ "main": "dist/index.js",
16
+ "bin": {
17
+ "apra-fleet": "dist/index.js"
18
+ },
19
+ "engines": {
20
+ "node": ">=22.0.0"
21
+ },
22
+ "files": [
23
+ "dist/",
24
+ "hooks/",
25
+ "scripts/fleet-statusline.sh",
26
+ "scripts/agy-settings-merge.js",
27
+ "scripts/agy-transcript-reader.js",
28
+ "skills/",
29
+ "version.json"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "scripts": {
35
+ "build": "tsc",
36
+ "build:sea": "node scripts/build-sea.mjs",
37
+ "build:sea-config": "node scripts/gen-sea-config.mjs",
38
+ "build:sea-package": "node scripts/package-sea.mjs",
39
+ "build:binary": "npm run build:sea && npm run build:sea-config && npm run build:sea-package",
40
+ "start": "node dist/index.js",
41
+ "dev": "tsc --watch",
42
+ "test": "vitest run",
43
+ "test:watch": "vitest",
44
+ "smoke": "tsc && node dist/smoke-test.js",
45
+ "integration": "tsc && npx tsx tests/integration.test.ts",
46
+ "prepare": "node scripts/install-hooks.mjs",
47
+ "prepublishOnly": "npm run build"
48
+ },
49
+ "keywords": [
50
+ "ai-agent",
51
+ "anthropic",
52
+ "automation",
53
+ "claude",
54
+ "claude-code",
55
+ "devtools",
56
+ "fleet",
57
+ "mcp",
58
+ "model-context-protocol",
59
+ "multi-agent",
60
+ "orchestration",
61
+ "remote-execution",
62
+ "ssh"
63
+ ],
64
+ "license": "Apache-2.0",
65
+ "dependencies": {
66
+ "@inquirer/password": "^5.0.11",
67
+ "@modelcontextprotocol/sdk": "^1.27.0",
68
+ "smol-toml": "^1.6.1",
69
+ "ssh2": "^1.17.0",
70
+ "uuid": "^14.0.0",
71
+ "zod": "^3.25.0"
72
+ },
73
+ "devDependencies": {
74
+ "@types/node": "^22.0.0",
75
+ "@types/ssh2": "^1.15.0",
76
+ "@types/uuid": "^10.0.0",
77
+ "esbuild": "^0.27.4",
78
+ "postject": "^1.0.0-alpha.6",
79
+ "typescript": "^5.5.0",
80
+ "vitest": "^4.0.18"
81
+ }
82
+ }
@@ -0,0 +1,27 @@
1
+ // agy-settings-merge.js -- writes per-workspace model override for Antigravity.
2
+ //
3
+ // Merges a model name into .gemini/antigravity-cli/settings.json (relative to cwd)
4
+ // without overwriting other fields (colorScheme, statusLine, permissions, etc.).
5
+ //
6
+ // argv[1] = model display name (e.g. "Gemini 3.5 Flash (Medium)")
7
+
8
+ const fs = require('fs');
9
+ const path = require('path');
10
+
11
+ const model = process.argv[2];
12
+ if (!model) {
13
+ process.exit(0);
14
+ }
15
+
16
+ const sp = path.join('.gemini', 'antigravity-cli', 'settings.json');
17
+ fs.mkdirSync(path.dirname(sp), { recursive: true });
18
+
19
+ let settings = {};
20
+ try {
21
+ settings = JSON.parse(fs.readFileSync(sp, 'utf8'));
22
+ } catch {
23
+ // file missing or malformed -- start fresh
24
+ }
25
+
26
+ settings.model = model;
27
+ fs.writeFileSync(sp, JSON.stringify(settings, null, 2) + '\n');
@@ -0,0 +1,62 @@
1
+ // agy-transcript-reader.js -- reads the Antigravity CLI conversation transcript.
2
+ //
3
+ // Tries two strategies to locate the transcript:
4
+ // 1. Direct UUID lookup: brain/<convId>/.system_generated/logs/transcript.jsonl
5
+ // (when agy honors --conversation)
6
+ // 2. Folder-based lookup: last_conversations.json[workFolder]
7
+ // (when agy ignores --conversation and registers under its work folder,
8
+ // which happens for local members in a git repo)
9
+ //
10
+ // argv[1] = conversation UUID that fleet minted and passed via --conversation
11
+ // argv[2] = work folder path for the fallback lookup
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+
16
+ try {
17
+ const home = process.env.USERPROFILE || process.env.HOME || '';
18
+ const convId = process.argv[2];
19
+ const workDir = process.argv[3] || '';
20
+
21
+ function readTranscript(id) {
22
+ const tp = path.join(
23
+ home, '.gemini', 'antigravity-cli', 'brain',
24
+ id, '.system_generated', 'logs', 'transcript.jsonl'
25
+ );
26
+ if (fs.existsSync(tp)) {
27
+ console.log('FLEET_TRANSCRIPT_START');
28
+ console.log(fs.readFileSync(tp, 'utf8'));
29
+ console.log('FLEET_TRANSCRIPT_END');
30
+ return true;
31
+ }
32
+ return false;
33
+ }
34
+
35
+ // Strategy 1: direct UUID lookup
36
+ if (convId && readTranscript(convId)) {
37
+ process.exit(0);
38
+ }
39
+
40
+ // Strategy 2: folder-based lookup via last_conversations.json
41
+ const cachePath = path.join(
42
+ home, '.gemini', 'antigravity-cli', 'cache', 'last_conversations.json'
43
+ );
44
+ if (workDir && fs.existsSync(cachePath)) {
45
+ const cache = JSON.parse(fs.readFileSync(cachePath, 'utf8'));
46
+ const norm = (p) => path.resolve(p).toLowerCase().split(path.sep).join('/');
47
+ const target = norm(workDir);
48
+ for (const k of Object.keys(cache)) {
49
+ if (norm(k) === target) {
50
+ if (readTranscript(cache[k])) {
51
+ process.exit(0);
52
+ }
53
+ break;
54
+ }
55
+ }
56
+ console.log('FLEET_TRANSCRIPT_MISSING:NOT_IN_CACHE:' + target);
57
+ } else {
58
+ console.log('FLEET_TRANSCRIPT_MISSING:' + (convId || 'NO_ID'));
59
+ }
60
+ } catch (e) {
61
+ console.log('FLEET_TRANSCRIPT_ERROR:' + e.message);
62
+ }
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env bash
2
+ # Fleet statusline script for Claude Code.
3
+ # Reads pre-rendered statusline.txt and appends a freshness indicator
4
+ # based on file mtime — gradient from green to red:
5
+ #
6
+ # Claude Code pipes JSON session data to stdin — we consume it to avoid
7
+ # broken-pipe but don't need it; the fleet server writes the real state.
8
+
9
+ cat > /dev/null # drain stdin
10
+
11
+ STATUSLINE_FILE="${APRA_FLEET_DATA_DIR:-$HOME/.apra-fleet/data}/statusline.txt"
12
+
13
+ if [ ! -f "$STATUSLINE_FILE" ]; then
14
+ echo "Fleet: no status"
15
+ exit 0
16
+ fi
17
+
18
+ # Read the pre-rendered line
19
+ LINE=$(cat "$STATUSLINE_FILE")
20
+
21
+ # Compute age in seconds (portable: works on macOS + Linux + Git Bash)
22
+ if stat --version >/dev/null 2>&1; then
23
+ # GNU stat (Linux, Git Bash on Windows)
24
+ MTIME=$(stat -c %Y "$STATUSLINE_FILE" 2>/dev/null)
25
+ else
26
+ # BSD stat (macOS)
27
+ MTIME=$(stat -f %m "$STATUSLINE_FILE" 2>/dev/null)
28
+ fi
29
+
30
+ NOW=$(date +%s)
31
+ AGE=$(( NOW - ${MTIME:-0} ))
32
+
33
+ if [ "$AGE" -lt 10 ]; then FRESH="✅" # <10s fresh
34
+ elif [ "$AGE" -lt 60 ]; then FRESH="☑️" # <1m recent
35
+ elif [ "$AGE" -lt 300 ]; then FRESH="✔️" # <5m ok
36
+ elif [ "$AGE" -lt 900 ]; then FRESH="⏳" # <15m getting stale
37
+ elif [ "$AGE" -lt 1800 ]; then FRESH="⚠️" # <30m stale warning
38
+ elif [ "$AGE" -lt 3600 ]; then FRESH="🟡" # <1h attention
39
+ elif [ "$AGE" -lt 7200 ]; then FRESH="🟠" # <2h concern
40
+ else FRESH="🔴" # >2h stale, possibly down
41
+ fi
42
+
43
+ echo "${LINE} ${FRESH}"
@@ -0,0 +1,262 @@
1
+ ---
2
+ name: fleet
3
+ description: Fleet infrastructure mechanics - member management, permissions, onboarding, provider awareness, and tool usage patterns
4
+ ---
5
+
6
+ # Fleet Skill
7
+
8
+ This skill defines how to interact with fleet infrastructure: registering and onboarding members, managing permissions, dispatching work, monitoring tasks, and handling provider-specific differences.
9
+
10
+ ## Core Fleet Tools
11
+
12
+ | Tool | Purpose |
13
+ |------|---------|
14
+ | `register_member` | Add a new member to the fleet |
15
+ | `list_members` | List all fleet members and their status |
16
+ | `member_detail` | Get detailed info on a member (provider, OS, icon, etc.) |
17
+ | `update_member` | Update member metadata (icon, name, etc.) |
18
+ | `remove_member` | Remove a member from the fleet |
19
+ | `fleet_status` | Check member idle/busy state before dispatch |
20
+ | `execute_command` | Run shell commands on a member |
21
+ | `execute_prompt` | Dispatch a prompt to a member's LLM agent |
22
+ | `send_files` | Push files from local to a member's work folder |
23
+ | `receive_files` | Pull files from a member's work folder |
24
+ | `monitor_task` | Check status of a long-running background task on any member. The `auto_stop` parameter and GPU utilization polling are cloud-only features. |
25
+ | `compose_permissions` | Generate and deliver provider-native permission config |
26
+ | `provision_llm_auth` | Provision LLM authentication for a **remote** member. |
27
+ | `provision_vcs_auth` | Provision VCS credentials (GitHub, Bitbucket, Azure DevOps) |
28
+ | `revoke_vcs_auth` | Revoke VCS credentials |
29
+ | `setup_ssh_key` | Migrate remote member from password to key-based auth |
30
+ | `setup_git_app` | Configure GitHub App for token minting |
31
+ | `update_llm_cli` | Update the LLM CLI on a member |
32
+ | `cloud_control` | Manage cloud infrastructure for members |
33
+ | `shutdown_server` | Shut down a remote member's server |
34
+ | `credential_store_set` | Store a secret credential for use in commands (entered OOB - never in chat) |
35
+ | `credential_store_list` | List stored credential names (values are never returned) |
36
+ | `credential_store_delete` | Delete a stored credential by name |
37
+ | `credential_store_update` | Update credential metadata (members, TTL, network policy) without re-entering the secret |
38
+ | `stop_prompt` | Kill the active LLM process on a member. **Always call `TaskStop` after calling `stop_prompt`**.<br><br>**Use when:** a member is hung, working on the wrong thing, or needs to be cancelled. |
39
+
40
+ See sub-documents for detailed usage:
41
+ - `onboarding.md` - full 8-step member onboarding sequence
42
+ - `permissions.md` - permission composition and denial handling
43
+ - `profiles/` - stack permission profiles (base-dev, base-reviewer, node, python, go, etc.) - add new profiles here to support additional stacks or roles
44
+ - `troubleshooting.md` - fleet tool troubleshooting by symptom
45
+ - `skill-matrix.md` - skill installation matrix by project + VCS + role
46
+ - `auth-github.md`, `auth-bitbucket.md`, `auth-azdevops.md` - VCS auth provisioning per provider
47
+ - `beads.md` - Beads persistent task DB: commands, backlog ops, session recovery patterns
48
+
49
+ ## Beads - Persistent Task Tracking
50
+
51
+ Beads (`bd` CLI) is installed automatically by `apra-fleet install`. It gives fleet users a persistent, dependency-aware task database that survives across sessions, branches, and members.
52
+
53
+ **Run `bd` via `Bash` on the orchestrator - never via `execute_command` on a member.**
54
+
55
+ See `beads.md` for the full command reference and workflow examples.
56
+
57
+ ## Secure Credentials
58
+
59
+ The `{{secure.NAME}}` pattern lets you reference stored secrets in any command without ever exposing plaintext to the LLM or logs.
60
+
61
+ **How it works:**
62
+ 1. Store a secret with `credential_store_set` - Fleet opens an OOB terminal prompt, so the value never appears in chat
63
+ 2. Reference it as `{{secure.NAME}}` anywhere in a command string passed to `execute_command`, `register_member`, `update_member`, `provision_vcs_auth`, or `provision_auth`
64
+ 3. Fleet resolves the token server-side before execution; LLM does not see the secret.
65
+
66
+ **When to use:**
67
+ - Any API key, token, or password that a member needs in a shell command
68
+ - Rotating credentials: `credential_store_delete` then `credential_store_set` - no re-provisioning required
69
+ - Pre-loading secrets before a dispatch so members can authenticate in commands autonomously
70
+
71
+ NOTE: **`{{secure.NAME}}` only resolves in specific credential fields** (listed above). Using it in any other parameter (e.g. a prompt, a path field in a non-credential tool, or any other unsupported parameter) will pass the token string through literally - the secret will NOT be injected, and the raw handle name will be visible in logs. Only use `{{secure.NAME}}` in the fields documented above.
72
+
73
+ **Access control (scoping):** Credentials can be scoped to specific members.
74
+ - `members="*"` (default) - all members can access the credential
75
+ - `members="alice,bob"` - only those members can access it
76
+ - Scoping is enforced at resolve time - a member outside the allowed set receives an access-denied error
77
+ - **Updating scope or metadata:** Use `credential_store_update` to change `members`, `ttl_seconds`, or `network_policy` without re-entering the secret. Use `credential_store_set` again only if you need to change the secret value (triggers OOB re-entry).
78
+
79
+ **TTL (time-to-live):** Set `ttl_seconds` to auto-expire a credential. Expired credentials
80
+ are rejected at resolve time with a clear error (not silently empty).
81
+
82
+ Example: `credential_store_set name=ci_token ttl_seconds=3600`
83
+
84
+ **Network egress policy:** Attach a network policy to a credential to control outbound
85
+ network access for commands that use it:
86
+
87
+ | Policy | Behaviour |
88
+ |--------|-----------|
89
+ | `'allow'` (default) | No restriction |
90
+ | `'deny'` | Commands invoking network tools (curl, wget, ssh, git push, etc.) are blocked |
91
+ | `'confirm'` | OOB prompt before the network call is allowed |
92
+
93
+ ## Member Identification
94
+
95
+ All tools accept `member_id` (UUID) or `member_name` (friendly name) to identify a member. `member_id` takes precedence when both are provided.
96
+
97
+ ## Tool Boundaries
98
+
99
+ - **Local members:** ALWAYS use fleet tools (`execute_command`, `execute_prompt`, `send_files`, etc.) - never SSH directly or bypass fleet infrastructure
100
+ - Fleet tools are the canonical interface - all member interactions go through them
101
+
102
+ ## Dispatch Rules
103
+
104
+ **Rule:** Shell commands (git, npm, bash scripts, file ops) -> `execute_command`. LLM reasoning tasks (write code, review, plan, analyse) -> `execute_prompt`. When in doubt: if a human could write the exact command string upfront, it's `execute_command`.
105
+
106
+ - **`execute_prompt`** - always wrap in a background Agent: `Agent(run_in_background=true)`. No exceptions.
107
+ - **`execute_command`** - any command that may take several seconds must be wrapped in a background Agent. Short reads (`cat`, `git status`, `echo`) can be called inline. Always use bash syntax - Git Bash is universally available on developer machines. Never use PowerShell or cmd.exe syntax, even on Windows members.
108
+ - **When clubbing fleet calls into a background Agent:** Always name the tool explicitly in the subagent prompt - write "use `execute_command` to run..." or "use `execute_prompt` to dispatch...". Never leave tool selection implicit.
109
+ - **`send_files` / `receive_files`** - transfers exceeding 1MB must use a background Agent.
110
+
111
+ **Concurrent dispatch guard:** Only one `execute_prompt` can be in-flight per member at a time (enforced server-side). A second concurrent dispatch returns immediately with:
112
+
113
+ ```
114
+ x execute_prompt is already running for "<member-name>"
115
+ ```
116
+
117
+ Use `stop_prompt` to cancel the in-flight session before re-dispatching.
118
+
119
+ ## Pre-dispatch Checks
120
+
121
+ Before dispatching any work:
122
+ 1. `fleet_status` - confirm member is idle (status must not be busy)
123
+ 2. Member must have completed onboarding - see `onboarding.md`
124
+
125
+ Do not dispatch to a busy member. If busy, wait or re-check `member_detail`.
126
+
127
+ ## File Transfer
128
+
129
+ Both `send_files` and `receive_files` are batch operations - always transfer all files in a single call, never one file per call.
130
+
131
+ - `send_files` - push any files to a member: context files, plans, scripts, binaries, configs, or any other content. Takes `local_paths` (array of local file paths) and optional `dest_subdir` (destination subdirectory relative to work_folder on member; defaults to work_folder root, equivalent to `"."`). Always try to batch multiple files in a single call.
132
+ - `receive_files` - pull files back: results, logs, build artifacts, updated configs, etc. Takes `remote_paths` (array of file paths on the member) and `local_dest_dir` (local directory to write files into). Always try to batch multiple files in a single call.
133
+
134
+ **Directories and globs:** `send_files` accepts individual file paths only - directories and glob patterns are not supported yet. To transfer an entire directory, tar it locally and extract on the member:
135
+
136
+ ```
137
+ 1. execute_command on local: tar -czf /tmp/src.tar.gz -C /path/to src/
138
+ 2. send_files: local_paths=["/tmp/src.tar.gz"]
139
+ 3. execute_command on member: tar -xzf src.tar.gz && rm src.tar.gz
140
+ ```
141
+
142
+ **Cross-OS transfers:** Both `send_files` and `receive_files` work bidirectionally for Linux<->Windows transfers (fleet host on Linux, member on Windows, and vice versa).
143
+
144
+ ## Permissions
145
+
146
+ `compose_permissions` produces provider-native config automatically. See `permissions.md` for:
147
+ - How to compose and deliver permissions before dispatching work
148
+ - How to handle permission denials during execution
149
+ - How to recompose when switching roles
150
+
151
+ ## execute_prompt Timeout Parameters
152
+
153
+ `execute_prompt` accepts two independent timeout parameters:
154
+
155
+ | Parameter | Semantics |
156
+ |-----------|-----------|
157
+ | `timeout_s` | **Inactivity timeout** - the session is killed only if no stdout/stderr output arrives for this many seconds. The timer resets on every output chunk. Active sessions (writing code, running tests, producing tokens) are never killed by this timer as long as output keeps flowing. Default: 300s (5 min). |
158
+ | `max_total_s` | **Hard ceiling** - the session is killed after this total elapsed time in seconds regardless of activity. Optional; defaults to unlimited. |
159
+
160
+ **When to use which:**
161
+
162
+ - Use `timeout_s` for normal dispatch. It extends the deadline automatically as long as the member is active, so you don't need to over-estimate how long a task takes.
163
+ - Use `max_total_s` only for tasks that must never run forever - CI pipelines, automated batch jobs, or any context where an unbounded runaway is unacceptable.
164
+ - Both timers run concurrently; whichever fires first kills the process.
165
+
166
+ ## execute_prompt: Session Resume
167
+
168
+ The `resume` parameter controls whether a prior session is continued:
169
+
170
+ | Value | Behaviour |
171
+ |-------|-----------|
172
+ | `true` (default) | If a session ID is stored for this member, continues it. If none exists, starts fresh. |
173
+ | `false` | Always starts a fresh session - ignores any stored session ID. |
174
+
175
+ `resume` is boolean only. There is no way to target a specific session ID by value.
176
+ The tool always resumes the most recently stored session for that member.
177
+
178
+ **Automatic stale-session recovery:** If `resume=true` and the stored session has expired
179
+ or the provider returns an error, `execute_prompt` retries once automatically with a fresh
180
+ session. This recovery is transparent - no caller intervention required.
181
+
182
+ **Provider support:**
183
+
184
+ | Provider | Session resume | Notes |
185
+ |----------|---------------|-------|
186
+ | Claude | Full | `claude --resume <sessionId>` |
187
+ | Antigravity (agy) | Full | `agy --conversation <sessionId>` |
188
+ | Codex | Partial | `resume` command supported |
189
+ | Copilot | None | Always starts fresh regardless of `resume` value |
190
+ | Gemini | Full | Native session support |
191
+
192
+ Session IDs are parsed from `execute_prompt` output and stored server-side per member.
193
+ The output footer contains: `session: <sessionId>` when the provider supports it.
194
+
195
+ ## Unattended Execution Modes
196
+
197
+ Configured via `register_member` or `update_member` with the `unattended` parameter:
198
+
199
+ | Mode | Behaviour |
200
+ |------|-----------|
201
+ | `false` (default) | Interactive - member prompts for permission approvals |
202
+ | `'auto'` | Trust the permissions config written by `compose_permissions` - auto-approves tools in the allow list |
203
+ | `'dangerous'` | Skip all permission checks globally, bypassing the allow list |
204
+
205
+ Per-provider flag behaviour:
206
+
207
+ | Provider | `'auto'` flag | `'dangerous'` flag |
208
+ |----------|--------------|-------------------|
209
+ | Claude | `--permission-mode auto` | `--dangerously-skip-permissions` |
210
+ | Antigravity (agy) | None (config-file only via `compose_permissions`) | `--dangerously-skip-permissions` |
211
+ | Codex | `--ask-for-approval auto-edit` | `--sandbox danger-full-access --ask-for-approval never` |
212
+ | Copilot | Not supported - warns and runs interactively | Not supported |
213
+ | Gemini | None (config-file only via `compose_permissions`) | `--yolo` |
214
+
215
+ Auto-approval is delivered via config files written by `compose_permissions` - call it before every dispatch.
216
+
217
+ **Prefer `auto` + `compose_permissions` over `dangerous`** - `auto` scopes approval to the
218
+ explicitly listed tools; `dangerous` bypasses all checks globally.
219
+
220
+ **Always call `compose_permissions` before dispatch regardless of unattended mode.**
221
+ The permissions config file must be delivered to the member's work folder before the CLI
222
+ starts - `compose_permissions` does this for all providers.
223
+
224
+ ## Model Tiers
225
+
226
+ Use model tiers: `cheap` for execution (commands, status, tests, deploys), `standard` for construction (code, config, devops), `premium` for planning, review, design, and architecture. The server resolves tiers to the appropriate model for each provider. User override always wins. When in doubt, prefer cheaper.
227
+
228
+ Pass as `model: "cheap" | "standard" | "premium"` in `execute_prompt`.
229
+
230
+ ## Member Icons
231
+
232
+ Icons are auto-assigned by the server and returned in `register_member` / `list_members` / `member_detail`. Prefix every member reference in output with their icon: ` alice: building auth module`.
233
+
234
+ To override, use `update_member` with the icon parameter.
235
+
236
+ ## Update Notices
237
+
238
+ `fleet_status` output may include a one-line update notice at the top when a newer release of apra-fleet is available:
239
+
240
+ ```
241
+ [i] apra-fleet v0.1.8 is available (installed: v0.1.7). Run `/pm deploy apra-fleet` to update.
242
+ ```
243
+
244
+ When you see this notice, surface it to the user verbatim before the rest of the status output. Do not suppress or paraphrase it. In JSON format the notice appears as an `updateAvailable` object with `latest` and `installed` fields - surface it the same way.
245
+
246
+ ## Provider Awareness
247
+
248
+ | Concern | How to handle |
249
+ |---------|---------------|
250
+ | **Agent context file** | Use `member_detail` -> `llmProvider` to determine filename: CLAUDE.md (Claude), AGY.md (Antigravity), GEMINI.md (Gemini), AGENTS.md (Codex), COPILOT.md (Copilot) |
251
+ | **Attribution config** | Claude-only (Step 2 in onboarding.md) - skip for all other providers |
252
+ | **Timeouts** | Antigravity/Gemini members are slower -> use 2-3x timeout multiplier for `execute_prompt` dispatches to those members. Minimum `timeout_s: 900` for any non-trivial task. |
253
+
254
+ ## Fleet Logs
255
+
256
+ The fleet server writes structured JSONL logs to `APRA_FLEET_DATA_DIR/logs/fleet-<pid>.log`. Multiple fleet instances each have their own log file. **To find the correct log file for the server you are talking to, call `fleet_status` - it reports the exact log file path** (e.g. `logging: ~/.apra-fleet/data/logs/fleet-40064.log`). Never guess by listing the directory.
257
+
258
+ Use `jq` to read logs:
259
+
260
+ ```bash
261
+ cat "$APRA_FLEET_DATA_DIR/logs/fleet-<pid>.log" | jq '.'
262
+ ```