@cluesmith/codev 3.2.3 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (445) hide show
  1. package/dashboard-dist/assets/index-BZRTEMtH.css +32 -0
  2. package/dashboard-dist/assets/{index-BZ1x7x1X.js → index-JCbkpAcV.js} +33 -33
  3. package/dashboard-dist/assets/index-JCbkpAcV.js.map +1 -0
  4. package/dashboard-dist/index.html +2 -2
  5. package/dist/agent-farm/cli.d.ts.map +1 -1
  6. package/dist/agent-farm/cli.js +173 -0
  7. package/dist/agent-farm/cli.js.map +1 -1
  8. package/dist/agent-farm/commands/attach.js +2 -2
  9. package/dist/agent-farm/commands/attach.js.map +1 -1
  10. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  11. package/dist/agent-farm/commands/cleanup.js +16 -0
  12. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  13. package/dist/agent-farm/commands/inbox.d.ts +42 -0
  14. package/dist/agent-farm/commands/inbox.d.ts.map +1 -0
  15. package/dist/agent-farm/commands/inbox.js +129 -0
  16. package/dist/agent-farm/commands/inbox.js.map +1 -0
  17. package/dist/agent-farm/commands/interrupt.d.ts +20 -0
  18. package/dist/agent-farm/commands/interrupt.d.ts.map +1 -0
  19. package/dist/agent-farm/commands/interrupt.js +65 -0
  20. package/dist/agent-farm/commands/interrupt.js.map +1 -0
  21. package/dist/agent-farm/commands/reset/constants.d.ts +52 -0
  22. package/dist/agent-farm/commands/reset/constants.d.ts.map +1 -0
  23. package/dist/agent-farm/commands/reset/constants.js +52 -0
  24. package/dist/agent-farm/commands/reset/constants.js.map +1 -0
  25. package/dist/agent-farm/commands/reset/context.d.ts +230 -0
  26. package/dist/agent-farm/commands/reset/context.d.ts.map +1 -0
  27. package/dist/agent-farm/commands/reset/context.js +428 -0
  28. package/dist/agent-farm/commands/reset/context.js.map +1 -0
  29. package/dist/agent-farm/commands/reset/index.d.ts +192 -0
  30. package/dist/agent-farm/commands/reset/index.d.ts.map +1 -0
  31. package/dist/agent-farm/commands/reset/index.js +488 -0
  32. package/dist/agent-farm/commands/reset/index.js.map +1 -0
  33. package/dist/agent-farm/commands/reset/receipt.d.ts +97 -0
  34. package/dist/agent-farm/commands/reset/receipt.d.ts.map +1 -0
  35. package/dist/agent-farm/commands/reset/receipt.js +149 -0
  36. package/dist/agent-farm/commands/reset/receipt.js.map +1 -0
  37. package/dist/agent-farm/commands/reset/reorient.d.ts +117 -0
  38. package/dist/agent-farm/commands/reset/reorient.d.ts.map +1 -0
  39. package/dist/agent-farm/commands/reset/reorient.js +313 -0
  40. package/dist/agent-farm/commands/reset/reorient.js.map +1 -0
  41. package/dist/agent-farm/commands/reset.d.ts +19 -0
  42. package/dist/agent-farm/commands/reset.d.ts.map +1 -0
  43. package/dist/agent-farm/commands/reset.js +292 -0
  44. package/dist/agent-farm/commands/reset.js.map +1 -0
  45. package/dist/agent-farm/commands/send.d.ts +2 -2
  46. package/dist/agent-farm/commands/send.d.ts.map +1 -1
  47. package/dist/agent-farm/commands/send.js +52 -11
  48. package/dist/agent-farm/commands/send.js.map +1 -1
  49. package/dist/agent-farm/commands/setup.d.ts +4 -1
  50. package/dist/agent-farm/commands/setup.d.ts.map +1 -1
  51. package/dist/agent-farm/commands/setup.js +8 -4
  52. package/dist/agent-farm/commands/setup.js.map +1 -1
  53. package/dist/agent-farm/commands/spawn-worktree.d.ts +116 -6
  54. package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
  55. package/dist/agent-farm/commands/spawn-worktree.js +345 -74
  56. package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
  57. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  58. package/dist/agent-farm/commands/spawn.js +13 -1
  59. package/dist/agent-farm/commands/spawn.js.map +1 -1
  60. package/dist/agent-farm/commands/status.d.ts.map +1 -1
  61. package/dist/agent-farm/commands/status.js +105 -9
  62. package/dist/agent-farm/commands/status.js.map +1 -1
  63. package/dist/agent-farm/commands/tower-sweep-husks.d.ts +6 -0
  64. package/dist/agent-farm/commands/tower-sweep-husks.d.ts.map +1 -0
  65. package/dist/agent-farm/commands/tower-sweep-husks.js +77 -0
  66. package/dist/agent-farm/commands/tower-sweep-husks.js.map +1 -0
  67. package/dist/agent-farm/commands/tower.d.ts.map +1 -1
  68. package/dist/agent-farm/commands/tower.js +34 -0
  69. package/dist/agent-farm/commands/tower.js.map +1 -1
  70. package/dist/agent-farm/commands/whoami.d.ts +65 -0
  71. package/dist/agent-farm/commands/whoami.d.ts.map +1 -0
  72. package/dist/agent-farm/commands/whoami.js +196 -0
  73. package/dist/agent-farm/commands/whoami.js.map +1 -0
  74. package/dist/agent-farm/db/index.d.ts +1 -1
  75. package/dist/agent-farm/db/index.d.ts.map +1 -1
  76. package/dist/agent-farm/db/index.js +80 -1
  77. package/dist/agent-farm/db/index.js.map +1 -1
  78. package/dist/agent-farm/db/mailbox.d.ts +222 -0
  79. package/dist/agent-farm/db/mailbox.d.ts.map +1 -0
  80. package/dist/agent-farm/db/mailbox.js +304 -0
  81. package/dist/agent-farm/db/mailbox.js.map +1 -0
  82. package/dist/agent-farm/db/schema.d.ts +1 -1
  83. package/dist/agent-farm/db/schema.d.ts.map +1 -1
  84. package/dist/agent-farm/db/schema.js +35 -0
  85. package/dist/agent-farm/db/schema.js.map +1 -1
  86. package/dist/agent-farm/db/types.d.ts +45 -0
  87. package/dist/agent-farm/db/types.d.ts.map +1 -1
  88. package/dist/agent-farm/db/types.js.map +1 -1
  89. package/dist/agent-farm/lib/builder-lookup.d.ts +1 -1
  90. package/dist/agent-farm/lib/builder-lookup.js +2 -2
  91. package/dist/agent-farm/lib/builder-lookup.js.map +1 -1
  92. package/dist/agent-farm/lib/reconnect-backoff.d.ts +54 -0
  93. package/dist/agent-farm/lib/reconnect-backoff.d.ts.map +1 -0
  94. package/dist/agent-farm/lib/reconnect-backoff.js +47 -0
  95. package/dist/agent-farm/lib/reconnect-backoff.js.map +1 -0
  96. package/dist/agent-farm/lib/tower-client.d.ts +16 -6
  97. package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
  98. package/dist/agent-farm/lib/tower-client.js +37 -6
  99. package/dist/agent-farm/lib/tower-client.js.map +1 -1
  100. package/dist/agent-farm/lib/tunnel-client.d.ts +69 -1
  101. package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
  102. package/dist/agent-farm/lib/tunnel-client.js +218 -27
  103. package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
  104. package/dist/agent-farm/servers/architect-session-holder.d.ts +133 -0
  105. package/dist/agent-farm/servers/architect-session-holder.d.ts.map +1 -0
  106. package/dist/agent-farm/servers/architect-session-holder.js +268 -0
  107. package/dist/agent-farm/servers/architect-session-holder.js.map +1 -0
  108. package/dist/agent-farm/servers/cron-delivery.d.ts +72 -0
  109. package/dist/agent-farm/servers/cron-delivery.d.ts.map +1 -0
  110. package/dist/agent-farm/servers/cron-delivery.js +80 -0
  111. package/dist/agent-farm/servers/cron-delivery.js.map +1 -0
  112. package/dist/agent-farm/servers/delayed-send.d.ts +85 -0
  113. package/dist/agent-farm/servers/delayed-send.d.ts.map +1 -0
  114. package/dist/agent-farm/servers/delayed-send.js +165 -0
  115. package/dist/agent-farm/servers/delayed-send.js.map +1 -0
  116. package/dist/agent-farm/servers/gate-profiles.d.ts +67 -0
  117. package/dist/agent-farm/servers/gate-profiles.d.ts.map +1 -0
  118. package/dist/agent-farm/servers/gate-profiles.js +113 -0
  119. package/dist/agent-farm/servers/gate-profiles.js.map +1 -0
  120. package/dist/agent-farm/servers/mailbox-delivery.d.ts +370 -0
  121. package/dist/agent-farm/servers/mailbox-delivery.d.ts.map +1 -0
  122. package/dist/agent-farm/servers/mailbox-delivery.js +617 -0
  123. package/dist/agent-farm/servers/mailbox-delivery.js.map +1 -0
  124. package/dist/agent-farm/servers/mailbox-wiring.d.ts +125 -0
  125. package/dist/agent-farm/servers/mailbox-wiring.d.ts.map +1 -0
  126. package/dist/agent-farm/servers/mailbox-wiring.js +425 -0
  127. package/dist/agent-farm/servers/mailbox-wiring.js.map +1 -0
  128. package/dist/agent-farm/servers/message-write.d.ts +53 -1
  129. package/dist/agent-farm/servers/message-write.d.ts.map +1 -1
  130. package/dist/agent-farm/servers/message-write.js +63 -0
  131. package/dist/agent-farm/servers/message-write.js.map +1 -1
  132. package/dist/agent-farm/servers/overview.d.ts.map +1 -1
  133. package/dist/agent-farm/servers/overview.js +23 -4
  134. package/dist/agent-farm/servers/overview.js.map +1 -1
  135. package/dist/agent-farm/servers/process-census.d.ts +41 -0
  136. package/dist/agent-farm/servers/process-census.d.ts.map +1 -0
  137. package/dist/agent-farm/servers/process-census.js +62 -0
  138. package/dist/agent-farm/servers/process-census.js.map +1 -0
  139. package/dist/agent-farm/servers/render-gate.d.ts +141 -0
  140. package/dist/agent-farm/servers/render-gate.d.ts.map +1 -0
  141. package/dist/agent-farm/servers/render-gate.js +251 -0
  142. package/dist/agent-farm/servers/render-gate.js.map +1 -0
  143. package/dist/agent-farm/servers/session-log-sweep.d.ts +93 -0
  144. package/dist/agent-farm/servers/session-log-sweep.d.ts.map +1 -0
  145. package/dist/agent-farm/servers/session-log-sweep.js +165 -0
  146. package/dist/agent-farm/servers/session-log-sweep.js.map +1 -0
  147. package/dist/agent-farm/servers/session-submit.d.ts +90 -0
  148. package/dist/agent-farm/servers/session-submit.d.ts.map +1 -0
  149. package/dist/agent-farm/servers/session-submit.js +127 -0
  150. package/dist/agent-farm/servers/session-submit.js.map +1 -0
  151. package/dist/agent-farm/servers/shellper-husk-sweep.d.ts +87 -0
  152. package/dist/agent-farm/servers/shellper-husk-sweep.d.ts.map +1 -0
  153. package/dist/agent-farm/servers/shellper-husk-sweep.js +129 -0
  154. package/dist/agent-farm/servers/shellper-husk-sweep.js.map +1 -0
  155. package/dist/agent-farm/servers/tower-cron.d.ts +10 -7
  156. package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
  157. package/dist/agent-farm/servers/tower-cron.js +58 -53
  158. package/dist/agent-farm/servers/tower-cron.js.map +1 -1
  159. package/dist/agent-farm/servers/tower-instances.d.ts +14 -2
  160. package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
  161. package/dist/agent-farm/servers/tower-instances.js +128 -19
  162. package/dist/agent-farm/servers/tower-instances.js.map +1 -1
  163. package/dist/agent-farm/servers/tower-messages.d.ts +38 -1
  164. package/dist/agent-farm/servers/tower-messages.d.ts.map +1 -1
  165. package/dist/agent-farm/servers/tower-messages.js +106 -1
  166. package/dist/agent-farm/servers/tower-messages.js.map +1 -1
  167. package/dist/agent-farm/servers/tower-routes.d.ts +16 -4
  168. package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
  169. package/dist/agent-farm/servers/tower-routes.js +807 -99
  170. package/dist/agent-farm/servers/tower-routes.js.map +1 -1
  171. package/dist/agent-farm/servers/tower-server.js +241 -15
  172. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  173. package/dist/agent-farm/servers/tower-terminals.d.ts +17 -2
  174. package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
  175. package/dist/agent-farm/servers/tower-terminals.js +139 -124
  176. package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
  177. package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -1
  178. package/dist/agent-farm/servers/tower-tunnel.js +63 -4
  179. package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
  180. package/dist/agent-farm/servers/tower-types.d.ts +2 -1
  181. package/dist/agent-farm/servers/tower-types.d.ts.map +1 -1
  182. package/dist/agent-farm/servers/tower-utils.d.ts +99 -1
  183. package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
  184. package/dist/agent-farm/servers/tower-utils.js +242 -6
  185. package/dist/agent-farm/servers/tower-utils.js.map +1 -1
  186. package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
  187. package/dist/agent-farm/servers/tower-websocket.js +6 -21
  188. package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
  189. package/dist/agent-farm/servers/write-queue.d.ts +35 -0
  190. package/dist/agent-farm/servers/write-queue.d.ts.map +1 -0
  191. package/dist/agent-farm/servers/write-queue.js +56 -0
  192. package/dist/agent-farm/servers/write-queue.js.map +1 -0
  193. package/dist/agent-farm/state.d.ts +6 -1
  194. package/dist/agent-farm/state.d.ts.map +1 -1
  195. package/dist/agent-farm/state.js +5 -2
  196. package/dist/agent-farm/state.js.map +1 -1
  197. package/dist/agent-farm/types.d.ts +39 -0
  198. package/dist/agent-farm/types.d.ts.map +1 -1
  199. package/dist/agent-farm/utils/agent-names.d.ts +2 -2
  200. package/dist/agent-farm/utils/agent-names.d.ts.map +1 -1
  201. package/dist/agent-farm/utils/agent-names.js +3 -3
  202. package/dist/agent-farm/utils/agent-names.js.map +1 -1
  203. package/dist/agent-farm/utils/architect-name.d.ts +2 -2
  204. package/dist/agent-farm/utils/architect-name.d.ts.map +1 -1
  205. package/dist/agent-farm/utils/architect-name.js +3 -3
  206. package/dist/agent-farm/utils/architect-name.js.map +1 -1
  207. package/dist/agent-farm/utils/config.d.ts +13 -0
  208. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  209. package/dist/agent-farm/utils/config.js +33 -1
  210. package/dist/agent-farm/utils/config.js.map +1 -1
  211. package/dist/agent-farm/utils/harness.d.ts +103 -7
  212. package/dist/agent-farm/utils/harness.d.ts.map +1 -1
  213. package/dist/agent-farm/utils/harness.js +126 -19
  214. package/dist/agent-farm/utils/harness.js.map +1 -1
  215. package/dist/cli.d.ts.map +1 -1
  216. package/dist/cli.js +6 -32
  217. package/dist/cli.js.map +1 -1
  218. package/dist/commands/adopt.d.ts +3 -2
  219. package/dist/commands/adopt.d.ts.map +1 -1
  220. package/dist/commands/adopt.js +7 -6
  221. package/dist/commands/adopt.js.map +1 -1
  222. package/dist/commands/consult/agy-auth-cache.d.ts +97 -0
  223. package/dist/commands/consult/agy-auth-cache.d.ts.map +1 -0
  224. package/dist/commands/consult/agy-auth-cache.js +320 -0
  225. package/dist/commands/consult/agy-auth-cache.js.map +1 -0
  226. package/dist/commands/consult/cli-options.d.ts +34 -0
  227. package/dist/commands/consult/cli-options.d.ts.map +1 -0
  228. package/dist/commands/consult/cli-options.js +67 -0
  229. package/dist/commands/consult/cli-options.js.map +1 -0
  230. package/dist/commands/consult/index.d.ts +56 -2
  231. package/dist/commands/consult/index.d.ts.map +1 -1
  232. package/dist/commands/consult/index.js +330 -27
  233. package/dist/commands/consult/index.js.map +1 -1
  234. package/dist/commands/consult/metrics.d.ts +42 -0
  235. package/dist/commands/consult/metrics.d.ts.map +1 -1
  236. package/dist/commands/consult/metrics.js +129 -9
  237. package/dist/commands/consult/metrics.js.map +1 -1
  238. package/dist/commands/doctor.d.ts +28 -0
  239. package/dist/commands/doctor.d.ts.map +1 -1
  240. package/dist/commands/doctor.js +258 -22
  241. package/dist/commands/doctor.js.map +1 -1
  242. package/dist/commands/init.d.ts +3 -2
  243. package/dist/commands/init.d.ts.map +1 -1
  244. package/dist/commands/init.js +7 -6
  245. package/dist/commands/init.js.map +1 -1
  246. package/dist/commands/porch/checks.d.ts +23 -0
  247. package/dist/commands/porch/checks.d.ts.map +1 -1
  248. package/dist/commands/porch/checks.js +60 -0
  249. package/dist/commands/porch/checks.js.map +1 -1
  250. package/dist/commands/porch/config.d.ts +20 -0
  251. package/dist/commands/porch/config.d.ts.map +1 -1
  252. package/dist/commands/porch/config.js +20 -0
  253. package/dist/commands/porch/config.js.map +1 -1
  254. package/dist/commands/porch/index.d.ts.map +1 -1
  255. package/dist/commands/porch/index.js +32 -36
  256. package/dist/commands/porch/index.js.map +1 -1
  257. package/dist/commands/porch/next.d.ts.map +1 -1
  258. package/dist/commands/porch/next.js +2 -41
  259. package/dist/commands/porch/next.js.map +1 -1
  260. package/dist/commands/update.d.ts +4 -4
  261. package/dist/commands/update.d.ts.map +1 -1
  262. package/dist/commands/update.js +9 -11
  263. package/dist/commands/update.js.map +1 -1
  264. package/dist/lib/config.d.ts +70 -3
  265. package/dist/lib/config.d.ts.map +1 -1
  266. package/dist/lib/config.js +67 -3
  267. package/dist/lib/config.js.map +1 -1
  268. package/dist/lib/consult-lanes.d.ts +149 -0
  269. package/dist/lib/consult-lanes.d.ts.map +1 -0
  270. package/dist/lib/consult-lanes.js +360 -0
  271. package/dist/lib/consult-lanes.js.map +1 -0
  272. package/dist/lib/default-branch.d.ts +1 -1
  273. package/dist/lib/default-branch.js +1 -1
  274. package/dist/lib/github.js +1 -1
  275. package/dist/lib/github.js.map +1 -1
  276. package/dist/lib/gitignore.d.ts +25 -2
  277. package/dist/lib/gitignore.d.ts.map +1 -1
  278. package/dist/lib/gitignore.js +70 -0
  279. package/dist/lib/gitignore.js.map +1 -1
  280. package/dist/lib/migration-backup-audit.d.ts +64 -0
  281. package/dist/lib/migration-backup-audit.d.ts.map +1 -0
  282. package/dist/lib/migration-backup-audit.js +145 -0
  283. package/dist/lib/migration-backup-audit.js.map +1 -0
  284. package/dist/lib/prompt-behavior-metrics.d.ts +67 -0
  285. package/dist/lib/prompt-behavior-metrics.d.ts.map +1 -0
  286. package/dist/lib/prompt-behavior-metrics.js +290 -0
  287. package/dist/lib/prompt-behavior-metrics.js.map +1 -0
  288. package/dist/lib/protocol-drift-audit.d.ts +118 -0
  289. package/dist/lib/protocol-drift-audit.d.ts.map +1 -0
  290. package/dist/lib/protocol-drift-audit.js +217 -0
  291. package/dist/lib/protocol-drift-audit.js.map +1 -0
  292. package/dist/lib/scaffold.d.ts +10 -3
  293. package/dist/lib/scaffold.d.ts.map +1 -1
  294. package/dist/lib/scaffold.js +29 -26
  295. package/dist/lib/scaffold.js.map +1 -1
  296. package/dist/lib/skeleton.d.ts +22 -1
  297. package/dist/lib/skeleton.d.ts.map +1 -1
  298. package/dist/lib/skeleton.js +120 -0
  299. package/dist/lib/skeleton.js.map +1 -1
  300. package/dist/lib/test-env.d.ts +74 -0
  301. package/dist/lib/test-env.d.ts.map +1 -0
  302. package/dist/lib/test-env.js +92 -0
  303. package/dist/lib/test-env.js.map +1 -0
  304. package/dist/terminal/pty-manager.d.ts +9 -0
  305. package/dist/terminal/pty-manager.d.ts.map +1 -1
  306. package/dist/terminal/pty-manager.js +32 -6
  307. package/dist/terminal/pty-manager.js.map +1 -1
  308. package/dist/terminal/pty-session.d.ts +156 -4
  309. package/dist/terminal/pty-session.d.ts.map +1 -1
  310. package/dist/terminal/pty-session.js +307 -42
  311. package/dist/terminal/pty-session.js.map +1 -1
  312. package/dist/terminal/ring-buffer.d.ts +39 -6
  313. package/dist/terminal/ring-buffer.d.ts.map +1 -1
  314. package/dist/terminal/ring-buffer.js +74 -6
  315. package/dist/terminal/ring-buffer.js.map +1 -1
  316. package/dist/terminal/session-manager.d.ts +129 -0
  317. package/dist/terminal/session-manager.d.ts.map +1 -1
  318. package/dist/terminal/session-manager.js +337 -44
  319. package/dist/terminal/session-manager.js.map +1 -1
  320. package/dist/terminal/session-screen.d.ts +91 -0
  321. package/dist/terminal/session-screen.d.ts.map +1 -0
  322. package/dist/terminal/session-screen.js +135 -0
  323. package/dist/terminal/session-screen.js.map +1 -0
  324. package/dist/terminal/shellper-client.d.ts +19 -4
  325. package/dist/terminal/shellper-client.d.ts.map +1 -1
  326. package/dist/terminal/shellper-client.js +70 -8
  327. package/dist/terminal/shellper-client.js.map +1 -1
  328. package/dist/terminal/shellper-main.js +2 -1
  329. package/dist/terminal/shellper-main.js.map +1 -1
  330. package/dist/terminal/shellper-process.d.ts +1 -1
  331. package/dist/terminal/shellper-process.d.ts.map +1 -1
  332. package/dist/terminal/shellper-process.js +33 -9
  333. package/dist/terminal/shellper-process.js.map +1 -1
  334. package/dist/terminal/shellper-protocol.d.ts +40 -2
  335. package/dist/terminal/shellper-protocol.d.ts.map +1 -1
  336. package/dist/terminal/shellper-protocol.js +72 -5
  337. package/dist/terminal/shellper-protocol.js.map +1 -1
  338. package/dist/terminal/shellper-replay-buffer.d.ts +69 -7
  339. package/dist/terminal/shellper-replay-buffer.d.ts.map +1 -1
  340. package/dist/terminal/shellper-replay-buffer.js +167 -31
  341. package/dist/terminal/shellper-replay-buffer.js.map +1 -1
  342. package/package.json +11 -9
  343. package/skeleton/.claude/skills/afx/SKILL.md +27 -1
  344. package/skeleton/.claude/skills/arch-init/SKILL.md +135 -0
  345. package/skeleton/.claude/skills/arch-save/SKILL.md +183 -0
  346. package/skeleton/.claude/skills/codev/SKILL.md +33 -2
  347. package/skeleton/.claude/skills/runnable-worktrees/SKILL.md +119 -0
  348. package/skeleton/.codex/skills/afx/SKILL.md +170 -0
  349. package/skeleton/.codex/skills/arch-init/SKILL.md +135 -0
  350. package/skeleton/.codex/skills/arch-save/SKILL.md +183 -0
  351. package/skeleton/.codex/skills/codev/SKILL.md +90 -0
  352. package/skeleton/.codex/skills/consult/SKILL.md +96 -0
  353. package/skeleton/.codex/skills/generate-image/SKILL.md +45 -0
  354. package/skeleton/.codex/skills/porch/SKILL.md +60 -0
  355. package/skeleton/.codex/skills/runnable-worktrees/SKILL.md +119 -0
  356. package/skeleton/.codex/skills/update-arch-docs/SKILL.md +132 -0
  357. package/skeleton/protocols/air/builder-prompt.md +28 -47
  358. package/skeleton/protocols/air/consult-types/impl-review.md +17 -34
  359. package/skeleton/protocols/air/consult-types/pr-review.md +14 -37
  360. package/skeleton/protocols/air/prompts/implement.md +20 -73
  361. package/skeleton/protocols/air/prompts/pr.md +22 -54
  362. package/skeleton/protocols/air/protocol.md +40 -71
  363. package/skeleton/protocols/aspir/builder-prompt.md +29 -66
  364. package/skeleton/protocols/aspir/consult-types/impl-review.md +17 -44
  365. package/skeleton/protocols/aspir/consult-types/phase-review.md +17 -44
  366. package/skeleton/protocols/aspir/consult-types/plan-review.md +14 -38
  367. package/skeleton/protocols/aspir/consult-types/pr-review.md +13 -39
  368. package/skeleton/protocols/aspir/consult-types/spec-review.md +13 -33
  369. package/skeleton/protocols/aspir/prompts/implement.md +27 -196
  370. package/skeleton/protocols/aspir/prompts/plan.md +21 -85
  371. package/skeleton/protocols/aspir/prompts/review.md +29 -228
  372. package/skeleton/protocols/aspir/prompts/specify.md +25 -111
  373. package/skeleton/protocols/aspir/protocol.json +10 -0
  374. package/skeleton/protocols/aspir/protocol.md +36 -82
  375. package/skeleton/protocols/bugfix/builder-prompt.md +23 -45
  376. package/skeleton/protocols/bugfix/consult-types/impl-review.md +21 -45
  377. package/skeleton/protocols/bugfix/consult-types/pr-review.md +18 -52
  378. package/skeleton/protocols/bugfix/prompts/fix.md +16 -61
  379. package/skeleton/protocols/bugfix/prompts/investigate.md +18 -62
  380. package/skeleton/protocols/bugfix/prompts/pr.md +22 -57
  381. package/skeleton/protocols/bugfix/protocol.md +44 -50
  382. package/skeleton/protocols/experiment/builder-prompt.md +25 -58
  383. package/skeleton/protocols/experiment/protocol.md +22 -188
  384. package/skeleton/protocols/experiment/templates/notes.md +11 -71
  385. package/skeleton/protocols/maintain/builder-prompt.md +24 -45
  386. package/skeleton/protocols/maintain/consult-types/impl-review.md +17 -44
  387. package/skeleton/protocols/maintain/consult-types/pr-review.md +13 -39
  388. package/skeleton/protocols/maintain/prompts/maintain.md +1 -1
  389. package/skeleton/protocols/maintain/protocol.md +32 -266
  390. package/skeleton/protocols/maintain/templates/maintenance-run.md +11 -0
  391. package/skeleton/protocols/pir/builder-prompt.md +30 -64
  392. package/skeleton/protocols/pir/consult-types/impl-review.md +17 -50
  393. package/skeleton/protocols/pir/consult-types/pr-review.md +11 -40
  394. package/skeleton/protocols/pir/prompts/implement.md +1 -2
  395. package/skeleton/protocols/pir/prompts/plan.md +0 -3
  396. package/skeleton/protocols/pir/prompts/review.md +1 -1
  397. package/skeleton/protocols/pir/protocol.md +54 -177
  398. package/skeleton/protocols/research/builder-prompt.md +27 -58
  399. package/skeleton/protocols/research/protocol.md +28 -153
  400. package/skeleton/protocols/spike/builder-prompt.md +30 -48
  401. package/skeleton/protocols/spike/protocol.md +24 -107
  402. package/skeleton/protocols/spike/templates/findings.md +9 -39
  403. package/skeleton/protocols/spir/builder-prompt.md +33 -62
  404. package/skeleton/protocols/spir/consult-types/impl-review.md +17 -44
  405. package/skeleton/protocols/spir/consult-types/phase-review.md +17 -44
  406. package/skeleton/protocols/spir/consult-types/plan-review.md +14 -38
  407. package/skeleton/protocols/spir/consult-types/pr-review.md +13 -39
  408. package/skeleton/protocols/spir/consult-types/spec-review.md +13 -33
  409. package/skeleton/protocols/spir/prompts/implement.md +26 -195
  410. package/skeleton/protocols/spir/prompts/plan.md +20 -84
  411. package/skeleton/protocols/spir/prompts/review.md +28 -227
  412. package/skeleton/protocols/spir/prompts/specify.md +24 -110
  413. package/skeleton/protocols/spir/protocol.json +10 -0
  414. package/skeleton/protocols/spir/protocol.md +84 -633
  415. package/skeleton/protocols/spir/templates/plan.md +28 -147
  416. package/skeleton/protocols/spir/templates/review.md +21 -80
  417. package/skeleton/protocols/spir/templates/spec.md +24 -118
  418. package/skeleton/resources/commands/agent-farm.md +348 -0
  419. package/skeleton/resources/commands/codev.md +5 -0
  420. package/skeleton/resources/commands/consult.md +262 -8
  421. package/skeleton/resources/commands/overview.md +1 -0
  422. package/skeleton/roles/architect.md +67 -306
  423. package/skeleton/roles/builder.md +77 -191
  424. package/skeleton/templates/AGENTS.md +2 -0
  425. package/skeleton/templates/CLAUDE.md +2 -0
  426. package/templates/tower.html +39 -2
  427. package/dashboard-dist/assets/index-BZ1x7x1X.js.map +0 -1
  428. package/dashboard-dist/assets/index-DB1KBSNE.css +0 -32
  429. package/dist/agent-farm/servers/send-buffer.d.ts +0 -59
  430. package/dist/agent-farm/servers/send-buffer.d.ts.map +0 -1
  431. package/dist/agent-farm/servers/send-buffer.js +0 -103
  432. package/dist/agent-farm/servers/send-buffer.js.map +0 -1
  433. package/skeleton/porch/prompts/defend.md +0 -108
  434. package/skeleton/porch/prompts/diagnose.md +0 -70
  435. package/skeleton/porch/prompts/evaluate.md +0 -132
  436. package/skeleton/porch/prompts/fix.md +0 -59
  437. package/skeleton/porch/prompts/implement.md +0 -88
  438. package/skeleton/porch/prompts/plan.md +0 -74
  439. package/skeleton/porch/prompts/pr.md +0 -84
  440. package/skeleton/porch/prompts/review.md +0 -249
  441. package/skeleton/porch/prompts/specify.md +0 -53
  442. package/skeleton/porch/prompts/test.md +0 -63
  443. package/skeleton/protocols/aspir/templates/plan.md +0 -184
  444. package/skeleton/protocols/aspir/templates/review.md +0 -120
  445. package/skeleton/protocols/aspir/templates/spec.md +0 -154
@@ -237,6 +237,65 @@ Status values:
237
237
 
238
238
  ---
239
239
 
240
+ ### afx whoami
241
+
242
+ Report this terminal's agent identity — workspace, type, and name — from
243
+ Tower/global.db's perspective.
244
+
245
+ ```bash
246
+ afx whoami
247
+ afx whoami --json
248
+ ```
249
+
250
+ **Description:**
251
+
252
+ Resolves who the current terminal's agent is. Identity precedence:
253
+
254
+ 1. **Builder worktree** — when CWD is inside `.builders/<id>/`, the canonical
255
+ builder id is verified against `global.db` (the same resolution `afx send`
256
+ uses). An unverifiable worktree identity is an error, never a fallthrough
257
+ to the next signal.
258
+ 2. **`CODEV_ARCHITECT_NAME`** — the env var Tower injects into architect
259
+ terminals.
260
+ 3. **Unknown** — exits non-zero with an explanation. There is no implicit
261
+ fallback to `main` (issue #1094: unverified identities misroute messages).
262
+
263
+ Works without Tower running (reads `global.db` read-only).
264
+
265
+ **Example output (architect terminal):**
266
+
267
+ ```
268
+ workspace: codev
269
+ type: architect
270
+ name: main
271
+ ```
272
+
273
+ **Example output (builder worktree):**
274
+
275
+ ```
276
+ workspace: codev
277
+ type: builder
278
+ name: builder-spir-984
279
+ architect: main
280
+ ```
281
+
282
+ The `architect:` line is the builder's spawning architect; it is omitted when
283
+ not recorded (legacy rows).
284
+
285
+ **JSON output:**
286
+
287
+ ```bash
288
+ afx whoami --json
289
+ # {"workspace":"codev","type":"builder","name":"builder-spir-984","architect":"main"}
290
+ ```
291
+
292
+ On failure, `--json` prints `{"error":"..."}` to stdout (the human-readable
293
+ explanation still goes to stderr) and exits 1.
294
+
295
+ **Exit codes:** `0` identity resolved; `1` identity unknown or unverifiable.
296
+
297
+ ---
298
+
240
299
  ### afx cleanup
241
300
 
242
301
  Clean up a builder worktree and branch.
@@ -283,6 +342,41 @@ afx send [builder] [message] [options]
283
342
  - `--interrupt` - Send Ctrl+C first
284
343
  - `--raw` - Skip structured message formatting
285
344
  - `--no-enter` - Do not send Enter after message
345
+ - `--delay <seconds>` - Deliver after N seconds instead of immediately
346
+
347
+ **Delayed delivery (`--delay`):**
348
+
349
+ Tower holds the message and delivers it after the stated delay, so the sending process is
350
+ free to exit in the meantime. That is the point: a session can schedule a message to
351
+ *itself* for after something that destroys it.
352
+
353
+ - **Authorised at request time, delivered later.** Target resolution and the
354
+ builder-spoofing check run when the command is issued, exactly as for an immediate send.
355
+ A delayed send cannot defer a check past the conditions that would fail it.
356
+ - **Bounds:** a whole number of seconds, 1–3600, rejected at both the CLI and server
357
+ boundaries — a bad value silently changes *when* (or whether) a message arrives rather
358
+ than failing loudly.
359
+ - **Persisted and durable (Spec 1313).** The message is written to Tower's durable mailbox at
360
+ request time with a due time (`not_before`), so a pending delayed send **survives a Tower
361
+ restart** — the render gate still guarantees it only lands on a clean, verified-empty prompt
362
+ when it comes due (this reverses Spec 1307's original drop-on-restart behaviour; the gate now
363
+ provides the protection that behaviour wanted). A pre-due delayed send is listable — and
364
+ cancellable — via `afx inbox`.
365
+ - **Ordering:** a delayed message never overtakes one already queued for that session — its
366
+ durable row is created at request time, and the mailbox delivers the oldest *eligible* row
367
+ first, so a pre-due message does not block a later message that is already due, and concurrent
368
+ deliveries to one agent do not interleave. Request order across *differing* delays is **not**
369
+ preserved — `--delay 30` then `--delay 5` delivers the 5-second one first, because that is what
370
+ `--delay` means.
371
+ - **Reporting:** the CLI says "scheduled", not "sent", and returns the mailbox id of the
372
+ persisted row.
373
+ - `--interrupt` is combinable (the Ctrl+C defers *with* the message); the API's `escape`
374
+ option is not (an ESC bypasses buffering precisely so it interrupts the *current* turn).
375
+
376
+ ```bash
377
+ # Deliver in 15 seconds; this shell can exit immediately
378
+ afx send architect:main --delay 15 --raw '/arch-init main'
379
+ ```
286
380
 
287
381
  **Description:**
288
382
 
@@ -291,6 +385,18 @@ Sends text to a builder's terminal. Useful for:
291
385
  - Interrupting long-running processes
292
386
  - Sending instructions or context
293
387
 
388
+ **Outcome (Spec 1313 — mailbox-first delivery):**
389
+
390
+ `afx send` reports the real first outcome instead of an unconditional "delivered":
391
+
392
+ - **delivered** — the message was written to the recipient's prompt after a clean render-gate pass (an empty, render-verified prompt).
393
+ - **held** — the prompt was not clear, so the message is persisted in Tower's durable mailbox and **delivers automatically** the moment the recipient's prompt is clean (after a submit, on output quiescence, or a poll backstop). The response carries a **why-held reason** and a mailbox id:
394
+ - `busy` — a draft, menu, dialog, or wrapper screen occupies the prompt;
395
+ - `no-profile` — the target app has no render-gate classifier profile (only `claude`, `codex`, and `agy` are modeled);
396
+ - `no-live-pty` — the recipient agent has no live terminal right now (it delivers when the agent respawns — rows address agents, not PTYs).
397
+
398
+ A held message is **never force-injected** onto a busy line: a message body is only ever written to a verified-empty prompt, so it cannot fuse with a half-typed draft, and held rows survive Tower restart/shutdown (no shutdown force-flush). See held mail with `afx inbox`, read one (including its body) with `afx inbox show <id>`, and clear one with `afx inbox dismiss <id>`. `--interrupt` is the explicit, deliberate bypass: it interrupts the agent and writes without holding (unchanged semantics).
399
+
294
400
  **Examples:**
295
401
 
296
402
  ```bash
@@ -309,6 +415,164 @@ afx send 42 --file src/api.ts "Review this implementation"
309
415
 
310
416
  ---
311
417
 
418
+ ### afx inbox
419
+
420
+ List, inspect, and dismiss **held** (undelivered) messages — the human-facing visibility surface for Spec 1313's mailbox. `afx send` persists a message it can't deliver immediately as a held row that delivers automatically once the recipient's prompt is clear; `afx inbox` lets a human see what is still waiting, read a specific message body, and clear rows — without reading Tower logs.
421
+
422
+ ```bash
423
+ afx inbox [options]
424
+ afx inbox show <id> [options]
425
+ afx inbox dismiss <id> [options]
426
+ ```
427
+
428
+ **`afx inbox`** — list every currently-held message in the workspace. Metadata only — message bodies are never shown in the list (or in logs); use `afx inbox show <id>` to read one:
429
+
430
+ | Column | Meaning |
431
+ |---|---|
432
+ | `ID` | Mailbox row id (pass to `show` / `dismiss`) |
433
+ | `AGE` | How long the message has been held (`5s`, `3m`, `2h`, `1d`) |
434
+ | `REASON` | Why-held: `busy`, `no-profile`, or `no-live-pty`; a trailing `!` marks a row past the escalation age |
435
+ | `FROM → TO` | Sender → recipient agent |
436
+ | `WORKSPACE` | Owning workspace |
437
+
438
+ **Options:**
439
+ - `-w, --workspace <path>` - Workspace to list (default: current workspace — `afx inbox` is workspace-scoped, not Tower-wide)
440
+ - `-p, --port <port>` - Tower port (default: 4100)
441
+
442
+ **`afx inbox show <id>`** — display a single message by id, **including its body**. This is the one CLI surface that surfaces a body: the redaction rule keeps bodies out of logs, diagnostics, and telemetry — not out of this local operator view, which travels over the same local Tower connection the message already uses. `show` works on a row of **any** status (held / delivered / superseded / dismissed), so a resolved row stays inspectable by id for audit until it is pruned. Prints the metadata (status, why-held reason, from → to, workspace, timestamps) followed by the raw body.
443
+
444
+ **Options:**
445
+ - `-p, --port <port>` - Tower port (default: 4100)
446
+
447
+ **`afx inbox dismiss <id>`** — mark a held message dismissed. A soft, auditable transition (the row is marked `dismissed`, not deleted) that **never delivers** the message. Any workspace operator may dismiss any held row (same local-human trust level as `afx send`).
448
+
449
+ **Options:**
450
+ - `-p, --port <port>` - Tower port (default: 4100)
451
+
452
+ **Examples:**
453
+
454
+ ```bash
455
+ # List held messages in the current workspace
456
+ afx inbox
457
+
458
+ # Show one message including its body (works for any status, held or resolved)
459
+ afx inbox show 5f3c9a2b-1e4d-4c7a-9f21-8b6d0e2a1c33
460
+
461
+ # Dismiss a held message by id (never delivers it)
462
+ afx inbox dismiss 5f3c9a2b-1e4d-4c7a-9f21-8b6d0e2a1c33
463
+ ```
464
+
465
+ Dismissal is CLI-only; the dashboard and VSCode held-count indicators surface the count but are read-only (Spec 1313 decision 8).
466
+
467
+ ---
468
+
469
+ ### afx interrupt
470
+
471
+ Interrupt a builder mid-turn by sending an ESC keystroke to its PTY.
472
+
473
+ ```bash
474
+ afx interrupt <builder> [options]
475
+ ```
476
+
477
+ **Arguments:**
478
+ - `builder` - Target builder. Same addressing as `afx send`.
479
+
480
+ **Options:**
481
+ - `--no-enter` - Send ESC alone, without the trailing Enter
482
+
483
+ **Description:**
484
+
485
+ This is the only recovery that reaches a builder **mid-turn**. When a builder chains foreground waits
486
+ inside a single turn, every `afx send` — including your order to stop — queues unread until that turn
487
+ ends. ESC interrupts the running tool and ends the turn, after which the queued messages process. The
488
+ trailing Enter (default) is what lets them through.
489
+
490
+ Distinct from `afx send --interrupt`, which sends Ctrl+C.
491
+
492
+ **Examples:**
493
+
494
+ ```bash
495
+ # Builder is wedged on a foreground wait and not reading messages
496
+ afx interrupt 0042
497
+
498
+ # Then the queued instruction lands
499
+ afx send 0042 "That producer died — stop waiting and report."
500
+ ```
501
+
502
+ ---
503
+
504
+ ### afx reset
505
+
506
+ Reset a builder's context: have it save its working state, clear the conversation, then re-orient it.
507
+
508
+ ```bash
509
+ afx reset <builder> [options]
510
+ ```
511
+
512
+ **Arguments:**
513
+ - `builder` - Target builder. Same addressing as `afx send`.
514
+
515
+ **Options:**
516
+ - `--note <text>` - Extra context appended to the re-orientation
517
+ - `--file <path>` - Append file content to the re-orientation (48KB max, read from *your* filesystem)
518
+ - `--dry-run` - Print the save request and both re-orientation payloads; write nothing to the builder
519
+ - `--interrupt-first` - Send ESC before the save request, for a builder already wedged mid-turn
520
+ - `--mode <strict|soft>` - Override the builder mode if it cannot be detected
521
+ - `--timeout <seconds>` - How long to wait for the save-state receipt (default 300)
522
+ - `--min-bytes <n>` - Minimum state-file size to accept as substantive (default 1000)
523
+ - `--quiet-window <ms>` - Terminal silence that counts as turn-ended (default 1500)
524
+
525
+ **Description:**
526
+
527
+ Long-running builders exhaust their context window. `afx spawn --resume` reattaches the *same*
528
+ conversation, so a deep session resumes deep — it does not give the builder a fresh window. `afx reset`
529
+ does, without losing what the builder knows.
530
+
531
+ The sequence:
532
+
533
+ 1. Assemble the re-orientation and write it to `.builder-reorient.md` in the worktree.
534
+ 2. Ask the builder to write its complete working state to `.builder-state.md`, stamped with a one-time
535
+ nonce.
536
+ 3. Wait for that file and **verify** it: correct nonce (not a stale file from an earlier reset),
537
+ substantive size, and stable across two observations (not still being written).
538
+ 4. Wait for the terminal to fall silent, so the clear is not typed mid-turn. If it does not settle, send
539
+ **one** ESC and wait again.
540
+ 5. Send `/clear`.
541
+ 6. Deliver the re-orientation: role, protocol, mode, project, worktree, branch, the porch re-entry
542
+ instruction, and a pointer to the state file.
543
+
544
+ **Every gate fails safe.** If the state file never arrives, carries the wrong nonce, is a stub, is still
545
+ growing, or the builder will not go quiet — the command **aborts without clearing** and exits non-zero,
546
+ naming the gate that failed. A builder whose context was not cleared has lost nothing.
547
+
548
+ Both worktree artifacts use the `.builder-` prefix, so `afx cleanup` still classifies the worktree as
549
+ clean, and both are untracked so `porch done`'s staged-file sweep cannot pick them up.
550
+
551
+ Requires a harness with in-session context reset (Claude Code). Other harnesses abort loudly rather than
552
+ substituting a different mechanism — use the boundary-recycle pattern instead (let the builder finish,
553
+ then `afx spawn <id> --resume`).
554
+
555
+ **Examples:**
556
+
557
+ ```bash
558
+ # See exactly what would be sent, without touching the builder
559
+ afx reset 0042 --dry-run
560
+
561
+ # Standard reset
562
+ afx reset 0042
563
+
564
+ # Add context that post-dates the builder's saved state
565
+ afx reset 0042 --note "PR #90 merged while you were mid-phase. Rebase before continuing."
566
+
567
+ # The builder is wedged mid-turn and not reading messages
568
+ afx reset 0042 --interrupt-first
569
+
570
+ # A builder that legitimately needs longer to write its state
571
+ afx reset 0042 --timeout 600
572
+ ```
573
+
574
+ ---
575
+
312
576
  ### afx open
313
577
 
314
578
  Open file annotation viewer.
@@ -478,6 +742,42 @@ afx tower status [options]
478
742
 
479
743
  ---
480
744
 
745
+ ### afx cron
746
+
747
+ Manage scheduled tasks defined as YAML files in `.af-cron/` at the workspace root. The Tower scheduler loads these every tick, runs due commands, and delivers messages through the normal send pipeline.
748
+
749
+ ```bash
750
+ afx cron list # List all cron tasks
751
+ afx cron status <name> # Check task status
752
+ afx cron run <name> # Run immediately
753
+ afx cron enable <name> # Enable
754
+ afx cron disable <name> # Disable
755
+ ```
756
+
757
+ There is NO `afx cron add` — create YAML files in `.af-cron/` directly.
758
+
759
+ **Task YAML format:**
760
+
761
+ ```yaml
762
+ name: Service Health Check # required, unique per workspace
763
+ schedule: "*/15 * * * *" # required, cron expression (or @hourly/@daily/@startup)
764
+ command: ./health-check.sh # required, run via shell
765
+ message: "Health alert: ${output}" # required, ${output} = trimmed command output
766
+ condition: "exitCode != 0" # optional JS expression, see below
767
+ target: architect # optional, default architect
768
+ timeout: 30 # optional, seconds, default 30
769
+ enabled: true # optional, default true
770
+ ```
771
+
772
+ **Condition environment:** `condition` is a JavaScript expression evaluated with two variables in scope:
773
+
774
+ - `output` (string) — the command's trimmed output
775
+ - `exitCode` (number) — `0` on success, the command's exit code on non-zero exit, `124` on timeout, `-1` on spawn failure
776
+
777
+ With a `condition`, the message is delivered exactly when the expression evaluates truthy — including on failed runs, so `condition: "exitCode != 0"` alerts when the command fails. Without a `condition`, the message is delivered only when the command exits 0.
778
+
779
+ ---
780
+
481
781
  ### afx db
482
782
 
483
783
  Database debugging and maintenance commands.
@@ -549,6 +849,36 @@ Customize commands via `.codev/config.json` at the project root:
549
849
  }
550
850
  ```
551
851
 
852
+ ### Porch Gate Artifact Auto-Open
853
+
854
+ When Porch requests a specification, plan, or review gate, it automatically
855
+ opens the phase artifact in Tower. This is enabled when the setting is unset or
856
+ `true`. Set `porch.autoOpenArtifacts` to `false` to prevent that automatic
857
+ `afx open` action:
858
+
859
+ ```json
860
+ {
861
+ "porch": {
862
+ "autoOpenArtifacts": false
863
+ }
864
+ }
865
+ ```
866
+
867
+ This setting controls only Porch's automatic gate artifact opens. A manual
868
+ `afx open <path>` still creates a Tower file tab and follows the dashboard's
869
+ normal focus behavior.
870
+
871
+ You can set the preference globally in `~/.codev/config.json`, for the team in
872
+ the project's committed `.codev/config.json`, or per engineer and project in
873
+ the gitignored `.codev/config.local.json`. Project settings override global
874
+ settings, and project-local settings override both.
875
+
876
+ When the main workspace has `.codev/config.local.json`, Agent Farm copies it
877
+ into each builder during spawn and `afx setup`. The builder receives a managed
878
+ regular-file snapshot rather than a write-through symlink, so builder edits
879
+ cannot change the main workspace's personal config. Running `afx setup` again
880
+ refreshes the snapshot from the main workspace.
881
+
552
882
  Or override via CLI flags:
553
883
 
554
884
  ```bash
@@ -556,6 +886,24 @@ afx workspace start --architect-cmd "claude --model opus"
556
886
  afx spawn 42 --protocol spir --builder-cmd "claude --model haiku"
557
887
  ```
558
888
 
889
+ ### Mailbox retention and escalation
890
+
891
+ `afx send`'s mailbox (Spec 1313) has two Tower-global knobs under a `mailbox` key:
892
+
893
+ ```json
894
+ {
895
+ "mailbox": {
896
+ "retentionDays": 30,
897
+ "escalationSeconds": 60
898
+ }
899
+ }
900
+ ```
901
+
902
+ - `mailbox.retentionDays` (default `30`) — how long a **terminal** mailbox row (delivered, superseded, or dismissed) is retained before Tower prunes it. **Held** rows are never pruned — they persist until they deliver, are superseded, or are dismissed via `afx inbox`.
903
+ - `mailbox.escalationSeconds` (default `60`) — how long a row may stay **held** before it crosses the escalation age. At that point the drainer marks the row `escalated`, emits the escalation broadcast, and moves the dashboard / VSCode held-count indicator into its attention state. This is **visibility only** — crossing the escalation age never triggers delivery (there is no force path; a held message still delivers only onto a verified-empty prompt).
904
+
905
+ Both are Tower-global (they apply to the whole Tower, not per-project) and optional — omit them to use the defaults above.
906
+
559
907
  ---
560
908
 
561
909
  ## Files
@@ -102,6 +102,11 @@ Verifies that all required dependencies are installed and properly configured:
102
102
  - Gemini (Antigravity CLI, `agy`)
103
103
  - Codex (`@openai/codex`)
104
104
 
105
+ **Migration Backups (report-only):**
106
+ - Leftover copies of pre-migration state — whole-directory `~/.agent-farm.bak-*` / `~/agent-farm-db-backup-*` copies and the `*.pre-merge-<timestamp>` renames left by `afx db consolidate` — listed with age and size on disk.
107
+ - Nothing reaps these automatically, so doctor surfaces each one together with the exact `rm -rf` command and leaves the decision to you. It never deletes anything.
108
+ - Backups younger than 7 days are listed but not counted as warnings; the section is omitted entirely when there are none.
109
+
105
110
  **Exit Codes:**
106
111
  - `0` - All OK or warnings only
107
112
  - `1` - Required dependencies missing