macro-agent 0.2.5 → 0.2.6

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 (992) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +30 -56
  3. package/dist/acp/websocket-server.d.ts +6 -0
  4. package/dist/acp/websocket-server.d.ts.map +1 -1
  5. package/dist/acp/websocket-server.js +13 -0
  6. package/dist/acp/websocket-server.js.map +1 -1
  7. package/dist/acp/websocket-stream.d.ts +30 -0
  8. package/dist/acp/websocket-stream.d.ts.map +1 -0
  9. package/dist/acp/websocket-stream.js +118 -0
  10. package/dist/acp/websocket-stream.js.map +1 -0
  11. package/dist/activity/deduplication.d.ts +85 -0
  12. package/dist/activity/deduplication.d.ts.map +1 -0
  13. package/dist/activity/deduplication.js +149 -0
  14. package/dist/activity/deduplication.js.map +1 -0
  15. package/dist/activity/index.d.ts +16 -0
  16. package/dist/activity/index.d.ts.map +1 -0
  17. package/dist/activity/index.js +17 -0
  18. package/dist/activity/index.js.map +1 -0
  19. package/dist/activity/relevance.d.ts +81 -0
  20. package/dist/activity/relevance.d.ts.map +1 -0
  21. package/dist/activity/relevance.js +161 -0
  22. package/dist/activity/relevance.js.map +1 -0
  23. package/dist/activity/types.d.ts +169 -0
  24. package/dist/activity/types.d.ts.map +1 -0
  25. package/dist/activity/types.js +33 -0
  26. package/dist/activity/types.js.map +1 -0
  27. package/dist/activity/watcher.d.ts +64 -0
  28. package/dist/activity/watcher.d.ts.map +1 -0
  29. package/dist/activity/watcher.js +212 -0
  30. package/dist/activity/watcher.js.map +1 -0
  31. package/dist/adapters/federation.d.ts +8 -1
  32. package/dist/adapters/federation.d.ts.map +1 -1
  33. package/dist/adapters/federation.js +33 -2
  34. package/dist/adapters/federation.js.map +1 -1
  35. package/dist/agent/agent-manager-v2.d.ts.map +1 -1
  36. package/dist/agent/agent-manager-v2.js +7 -24
  37. package/dist/agent/agent-manager-v2.js.map +1 -1
  38. package/dist/agent/wake.d.ts +85 -0
  39. package/dist/agent/wake.d.ts.map +1 -0
  40. package/dist/agent/wake.js +278 -0
  41. package/dist/agent/wake.js.map +1 -0
  42. package/dist/api/server.d.ts.map +1 -1
  43. package/dist/api/server.js +41 -25
  44. package/dist/api/server.js.map +1 -1
  45. package/dist/api/types.d.ts +6 -0
  46. package/dist/api/types.d.ts.map +1 -1
  47. package/dist/auth/server-auth.d.ts +43 -0
  48. package/dist/auth/server-auth.d.ts.map +1 -0
  49. package/dist/auth/server-auth.js +80 -0
  50. package/dist/auth/server-auth.js.map +1 -0
  51. package/dist/auth/token.d.ts +4 -0
  52. package/dist/auth/token.d.ts.map +1 -1
  53. package/dist/auth/token.js +7 -6
  54. package/dist/auth/token.js.map +1 -1
  55. package/dist/boot-v2.d.ts +6 -3
  56. package/dist/boot-v2.d.ts.map +1 -1
  57. package/dist/boot-v2.js +44 -25
  58. package/dist/boot-v2.js.map +1 -1
  59. package/dist/cognitive/team-lifecycle.d.ts +82 -0
  60. package/dist/cognitive/team-lifecycle.d.ts.map +1 -0
  61. package/dist/cognitive/team-lifecycle.js +121 -0
  62. package/dist/cognitive/team-lifecycle.js.map +1 -0
  63. package/dist/cognitive/trajectory-extractor.d.ts +25 -0
  64. package/dist/cognitive/trajectory-extractor.d.ts.map +1 -0
  65. package/dist/cognitive/trajectory-extractor.js +134 -0
  66. package/dist/cognitive/trajectory-extractor.js.map +1 -0
  67. package/dist/control/control-server.d.ts.map +1 -1
  68. package/dist/control/control-server.js +10 -0
  69. package/dist/control/control-server.js.map +1 -1
  70. package/dist/dispatch/mail-inbound-consumer.d.ts.map +1 -1
  71. package/dist/dispatch/mail-inbound-consumer.js +43 -10
  72. package/dist/dispatch/mail-inbound-consumer.js.map +1 -1
  73. package/dist/index.d.ts +4 -0
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +6 -1
  76. package/dist/index.js.map +1 -1
  77. package/dist/lifecycle/handlers/generic.d.ts +27 -0
  78. package/dist/lifecycle/handlers/generic.d.ts.map +1 -0
  79. package/dist/lifecycle/handlers/generic.js +56 -0
  80. package/dist/lifecycle/handlers/generic.js.map +1 -0
  81. package/dist/lifecycle/handlers/index.d.ts +51 -0
  82. package/dist/lifecycle/handlers/index.d.ts.map +1 -0
  83. package/dist/lifecycle/handlers/index.js +110 -0
  84. package/dist/lifecycle/handlers/index.js.map +1 -0
  85. package/dist/lifecycle/handlers/integrator.d.ts +81 -0
  86. package/dist/lifecycle/handlers/integrator.d.ts.map +1 -0
  87. package/dist/lifecycle/handlers/integrator.js +451 -0
  88. package/dist/lifecycle/handlers/integrator.js.map +1 -0
  89. package/dist/lifecycle/handlers/monitor.d.ts +29 -0
  90. package/dist/lifecycle/handlers/monitor.d.ts.map +1 -0
  91. package/dist/lifecycle/handlers/monitor.js +79 -0
  92. package/dist/lifecycle/handlers/monitor.js.map +1 -0
  93. package/dist/lifecycle/handlers/worker.d.ts +56 -0
  94. package/dist/lifecycle/handlers/worker.d.ts.map +1 -0
  95. package/dist/lifecycle/handlers/worker.js +381 -0
  96. package/dist/lifecycle/handlers/worker.js.map +1 -0
  97. package/dist/lifecycle/handlers-v2.d.ts +0 -2
  98. package/dist/lifecycle/handlers-v2.d.ts.map +1 -1
  99. package/dist/lifecycle/handlers-v2.js +4 -55
  100. package/dist/lifecycle/handlers-v2.js.map +1 -1
  101. package/dist/mail/conversation-map.d.ts +33 -0
  102. package/dist/mail/conversation-map.d.ts.map +1 -0
  103. package/dist/mail/conversation-map.js +61 -0
  104. package/dist/mail/conversation-map.js.map +1 -0
  105. package/dist/mail/index.d.ts +11 -0
  106. package/dist/mail/index.d.ts.map +1 -0
  107. package/dist/mail/index.js +11 -0
  108. package/dist/mail/index.js.map +1 -0
  109. package/dist/mail/mail-service.d.ts +85 -0
  110. package/dist/mail/mail-service.d.ts.map +1 -0
  111. package/dist/mail/mail-service.js +121 -0
  112. package/dist/mail/mail-service.js.map +1 -0
  113. package/dist/mail/stores/eventstore-conversation-store.d.ts +40 -0
  114. package/dist/mail/stores/eventstore-conversation-store.d.ts.map +1 -0
  115. package/dist/mail/stores/eventstore-conversation-store.js +131 -0
  116. package/dist/mail/stores/eventstore-conversation-store.js.map +1 -0
  117. package/dist/mail/stores/eventstore-participant-store.d.ts +43 -0
  118. package/dist/mail/stores/eventstore-participant-store.d.ts.map +1 -0
  119. package/dist/mail/stores/eventstore-participant-store.js +145 -0
  120. package/dist/mail/stores/eventstore-participant-store.js.map +1 -0
  121. package/dist/mail/stores/eventstore-thread-store.d.ts +46 -0
  122. package/dist/mail/stores/eventstore-thread-store.d.ts.map +1 -0
  123. package/dist/mail/stores/eventstore-thread-store.js +118 -0
  124. package/dist/mail/stores/eventstore-thread-store.js.map +1 -0
  125. package/dist/mail/stores/eventstore-turn-store.d.ts +47 -0
  126. package/dist/mail/stores/eventstore-turn-store.d.ts.map +1 -0
  127. package/dist/mail/stores/eventstore-turn-store.js +153 -0
  128. package/dist/mail/stores/eventstore-turn-store.js.map +1 -0
  129. package/dist/mail/stores/index.d.ts +12 -0
  130. package/dist/mail/stores/index.d.ts.map +1 -0
  131. package/dist/mail/stores/index.js +12 -0
  132. package/dist/mail/stores/index.js.map +1 -0
  133. package/dist/mail/stores/types.d.ts +146 -0
  134. package/dist/mail/stores/types.d.ts.map +1 -0
  135. package/dist/mail/stores/types.js +13 -0
  136. package/dist/mail/stores/types.js.map +1 -0
  137. package/dist/mail/turn-recorder.d.ts +30 -0
  138. package/dist/mail/turn-recorder.d.ts.map +1 -0
  139. package/dist/mail/turn-recorder.js +98 -0
  140. package/dist/mail/turn-recorder.js.map +1 -0
  141. package/dist/map/adapter/acp-over-map.d.ts +115 -0
  142. package/dist/map/adapter/acp-over-map.d.ts.map +1 -0
  143. package/dist/map/adapter/acp-over-map.js +1024 -0
  144. package/dist/map/adapter/acp-over-map.js.map +1 -0
  145. package/dist/map/adapter/connection-manager.d.ts +150 -0
  146. package/dist/map/adapter/connection-manager.d.ts.map +1 -0
  147. package/dist/map/adapter/connection-manager.js +207 -0
  148. package/dist/map/adapter/connection-manager.js.map +1 -0
  149. package/dist/map/adapter/event-log.d.ts +87 -0
  150. package/dist/map/adapter/event-log.d.ts.map +1 -0
  151. package/dist/map/adapter/event-log.js +122 -0
  152. package/dist/map/adapter/event-log.js.map +1 -0
  153. package/dist/map/adapter/event-translator.d.ts +85 -0
  154. package/dist/map/adapter/event-translator.d.ts.map +1 -0
  155. package/dist/map/adapter/event-translator.js +295 -0
  156. package/dist/map/adapter/event-translator.js.map +1 -0
  157. package/dist/map/adapter/extensions/agent-detection.d.ts +49 -0
  158. package/dist/map/adapter/extensions/agent-detection.d.ts.map +1 -0
  159. package/dist/map/adapter/extensions/agent-detection.js +91 -0
  160. package/dist/map/adapter/extensions/agent-detection.js.map +1 -0
  161. package/dist/map/adapter/extensions/agent-lifecycle.d.ts +82 -0
  162. package/dist/map/adapter/extensions/agent-lifecycle.d.ts.map +1 -0
  163. package/dist/map/adapter/extensions/agent-lifecycle.js +164 -0
  164. package/dist/map/adapter/extensions/agent-lifecycle.js.map +1 -0
  165. package/dist/map/adapter/extensions/cognitive.d.ts +27 -0
  166. package/dist/map/adapter/extensions/cognitive.d.ts.map +1 -0
  167. package/dist/map/adapter/extensions/cognitive.js +158 -0
  168. package/dist/map/adapter/extensions/cognitive.js.map +1 -0
  169. package/dist/map/adapter/extensions/index.d.ts +95 -0
  170. package/dist/map/adapter/extensions/index.d.ts.map +1 -0
  171. package/dist/map/adapter/extensions/index.js +228 -0
  172. package/dist/map/adapter/extensions/index.js.map +1 -0
  173. package/dist/map/adapter/extensions/mcp-bridge.d.ts +57 -0
  174. package/dist/map/adapter/extensions/mcp-bridge.d.ts.map +1 -0
  175. package/dist/map/adapter/extensions/mcp-bridge.js +745 -0
  176. package/dist/map/adapter/extensions/mcp-bridge.js.map +1 -0
  177. package/dist/map/adapter/extensions/resume.d.ts +47 -0
  178. package/dist/map/adapter/extensions/resume.d.ts.map +1 -0
  179. package/dist/map/adapter/extensions/resume.js +59 -0
  180. package/dist/map/adapter/extensions/resume.js.map +1 -0
  181. package/dist/map/adapter/extensions/streams.d.ts +95 -0
  182. package/dist/map/adapter/extensions/streams.d.ts.map +1 -0
  183. package/dist/map/adapter/extensions/streams.js +515 -0
  184. package/dist/map/adapter/extensions/streams.js.map +1 -0
  185. package/dist/map/adapter/extensions/task.d.ts +40 -0
  186. package/dist/map/adapter/extensions/task.d.ts.map +1 -0
  187. package/dist/map/adapter/extensions/task.js +197 -0
  188. package/dist/map/adapter/extensions/task.js.map +1 -0
  189. package/dist/map/adapter/extensions/update-metadata.d.ts +29 -0
  190. package/dist/map/adapter/extensions/update-metadata.d.ts.map +1 -0
  191. package/dist/map/adapter/extensions/update-metadata.js +67 -0
  192. package/dist/map/adapter/extensions/update-metadata.js.map +1 -0
  193. package/dist/map/adapter/extensions/wake.d.ts +60 -0
  194. package/dist/map/adapter/extensions/wake.d.ts.map +1 -0
  195. package/dist/map/adapter/extensions/wake.js +144 -0
  196. package/dist/map/adapter/extensions/wake.js.map +1 -0
  197. package/dist/map/adapter/extensions/workspace-files.d.ts +42 -0
  198. package/dist/map/adapter/extensions/workspace-files.d.ts.map +1 -0
  199. package/dist/map/adapter/extensions/workspace-files.js +338 -0
  200. package/dist/map/adapter/extensions/workspace-files.js.map +1 -0
  201. package/dist/map/adapter/extensions/workspace.d.ts +57 -0
  202. package/dist/map/adapter/extensions/workspace.d.ts.map +1 -0
  203. package/dist/map/adapter/extensions/workspace.js +81 -0
  204. package/dist/map/adapter/extensions/workspace.js.map +1 -0
  205. package/dist/map/adapter/index.d.ts +20 -0
  206. package/dist/map/adapter/index.d.ts.map +1 -0
  207. package/dist/map/adapter/index.js +40 -0
  208. package/dist/map/adapter/index.js.map +1 -0
  209. package/dist/map/adapter/interface.d.ts +450 -0
  210. package/dist/map/adapter/interface.d.ts.map +1 -0
  211. package/dist/map/adapter/interface.js +24 -0
  212. package/dist/map/adapter/interface.js.map +1 -0
  213. package/dist/map/adapter/mail-handler-adapter.d.ts +27 -0
  214. package/dist/map/adapter/mail-handler-adapter.d.ts.map +1 -0
  215. package/dist/map/adapter/mail-handler-adapter.js +292 -0
  216. package/dist/map/adapter/mail-handler-adapter.js.map +1 -0
  217. package/dist/map/adapter/map-adapter.d.ts +200 -0
  218. package/dist/map/adapter/map-adapter.d.ts.map +1 -0
  219. package/dist/map/adapter/map-adapter.js +1199 -0
  220. package/dist/map/adapter/map-adapter.js.map +1 -0
  221. package/dist/map/adapter/rpc-handler.d.ts +263 -0
  222. package/dist/map/adapter/rpc-handler.d.ts.map +1 -0
  223. package/dist/map/adapter/rpc-handler.js +365 -0
  224. package/dist/map/adapter/rpc-handler.js.map +1 -0
  225. package/dist/map/adapter/subscription-manager.d.ts +174 -0
  226. package/dist/map/adapter/subscription-manager.d.ts.map +1 -0
  227. package/dist/map/adapter/subscription-manager.js +248 -0
  228. package/dist/map/adapter/subscription-manager.js.map +1 -0
  229. package/dist/map/adapter/types.d.ts +194 -0
  230. package/dist/map/adapter/types.d.ts.map +1 -0
  231. package/dist/map/adapter/types.js +27 -0
  232. package/dist/map/adapter/types.js.map +1 -0
  233. package/dist/map/adapter/websocket-integration.d.ts +113 -0
  234. package/dist/map/adapter/websocket-integration.d.ts.map +1 -0
  235. package/dist/map/adapter/websocket-integration.js +134 -0
  236. package/dist/map/adapter/websocket-integration.js.map +1 -0
  237. package/dist/map/cascade-action-handler.d.ts.map +1 -1
  238. package/dist/map/cascade-action-handler.js +19 -5
  239. package/dist/map/cascade-action-handler.js.map +1 -1
  240. package/dist/map/federation/envelope.d.ts +98 -0
  241. package/dist/map/federation/envelope.d.ts.map +1 -0
  242. package/dist/map/federation/envelope.js +160 -0
  243. package/dist/map/federation/envelope.js.map +1 -0
  244. package/dist/map/federation/federation-handler.d.ts +50 -0
  245. package/dist/map/federation/federation-handler.d.ts.map +1 -0
  246. package/dist/map/federation/federation-handler.js +306 -0
  247. package/dist/map/federation/federation-handler.js.map +1 -0
  248. package/dist/map/federation/index.d.ts +14 -0
  249. package/dist/map/federation/index.d.ts.map +1 -0
  250. package/dist/map/federation/index.js +13 -0
  251. package/dist/map/federation/index.js.map +1 -0
  252. package/dist/map/federation/types.d.ts +239 -0
  253. package/dist/map/federation/types.d.ts.map +1 -0
  254. package/dist/map/federation/types.js +23 -0
  255. package/dist/map/federation/types.js.map +1 -0
  256. package/dist/map/server.d.ts.map +1 -1
  257. package/dist/map/server.js +17 -2
  258. package/dist/map/server.js.map +1 -1
  259. package/dist/map/types.d.ts +6 -0
  260. package/dist/map/types.d.ts.map +1 -1
  261. package/dist/mcp/map-client.d.ts +39 -0
  262. package/dist/mcp/map-client.d.ts.map +1 -0
  263. package/dist/mcp/map-client.js +129 -0
  264. package/dist/mcp/map-client.js.map +1 -0
  265. package/dist/mcp/mcp-server.d.ts +72 -0
  266. package/dist/mcp/mcp-server.d.ts.map +1 -0
  267. package/dist/mcp/mcp-server.js +1027 -0
  268. package/dist/mcp/mcp-server.js.map +1 -0
  269. package/dist/mcp/tools/claim_task.d.ts +35 -0
  270. package/dist/mcp/tools/claim_task.d.ts.map +1 -0
  271. package/dist/mcp/tools/claim_task.js +58 -0
  272. package/dist/mcp/tools/claim_task.js.map +1 -0
  273. package/dist/mcp/tools/done-v2.d.ts +0 -1
  274. package/dist/mcp/tools/done-v2.d.ts.map +1 -1
  275. package/dist/mcp/tools/done-v2.js +0 -1
  276. package/dist/mcp/tools/done-v2.js.map +1 -1
  277. package/dist/mcp/tools/done.d.ts +102 -0
  278. package/dist/mcp/tools/done.d.ts.map +1 -0
  279. package/dist/mcp/tools/done.js +253 -0
  280. package/dist/mcp/tools/done.js.map +1 -0
  281. package/dist/mcp/tools/inject_context.d.ts +61 -0
  282. package/dist/mcp/tools/inject_context.d.ts.map +1 -0
  283. package/dist/mcp/tools/inject_context.js +123 -0
  284. package/dist/mcp/tools/inject_context.js.map +1 -0
  285. package/dist/mcp/tools/list_claimable_tasks.d.ts +38 -0
  286. package/dist/mcp/tools/list_claimable_tasks.d.ts.map +1 -0
  287. package/dist/mcp/tools/list_claimable_tasks.js +63 -0
  288. package/dist/mcp/tools/list_claimable_tasks.js.map +1 -0
  289. package/dist/mcp/tools/unclaim_task.d.ts +31 -0
  290. package/dist/mcp/tools/unclaim_task.d.ts.map +1 -0
  291. package/dist/mcp/tools/unclaim_task.js +47 -0
  292. package/dist/mcp/tools/unclaim_task.js.map +1 -0
  293. package/dist/mcp/tools/wait_for_activity.d.ts +60 -0
  294. package/dist/mcp/tools/wait_for_activity.d.ts.map +1 -0
  295. package/dist/mcp/tools/wait_for_activity.js +135 -0
  296. package/dist/mcp/tools/wait_for_activity.js.map +1 -0
  297. package/dist/monitor/health-check-service.d.ts +143 -0
  298. package/dist/monitor/health-check-service.d.ts.map +1 -0
  299. package/dist/monitor/health-check-service.js +240 -0
  300. package/dist/monitor/health-check-service.js.map +1 -0
  301. package/dist/monitor/index.d.ts +14 -0
  302. package/dist/monitor/index.d.ts.map +1 -0
  303. package/dist/monitor/index.js +14 -0
  304. package/dist/monitor/index.js.map +1 -0
  305. package/dist/monitor/stall-detector.d.ts +109 -0
  306. package/dist/monitor/stall-detector.d.ts.map +1 -0
  307. package/dist/monitor/stall-detector.js +152 -0
  308. package/dist/monitor/stall-detector.js.map +1 -0
  309. package/dist/peer/capability-manager.d.ts +56 -0
  310. package/dist/peer/capability-manager.d.ts.map +1 -0
  311. package/dist/peer/capability-manager.js +186 -0
  312. package/dist/peer/capability-manager.js.map +1 -0
  313. package/dist/peer/encapsulation-manager.d.ts +190 -0
  314. package/dist/peer/encapsulation-manager.d.ts.map +1 -0
  315. package/dist/peer/encapsulation-manager.js +486 -0
  316. package/dist/peer/encapsulation-manager.js.map +1 -0
  317. package/dist/peer/federation-manager.d.ts +223 -0
  318. package/dist/peer/federation-manager.d.ts.map +1 -0
  319. package/dist/peer/federation-manager.js +528 -0
  320. package/dist/peer/federation-manager.js.map +1 -0
  321. package/dist/peer/hierarchy-errors.d.ts +208 -0
  322. package/dist/peer/hierarchy-errors.d.ts.map +1 -0
  323. package/dist/peer/hierarchy-errors.js +268 -0
  324. package/dist/peer/hierarchy-errors.js.map +1 -0
  325. package/dist/peer/hierarchy-protocol.d.ts +159 -0
  326. package/dist/peer/hierarchy-protocol.d.ts.map +1 -0
  327. package/dist/peer/hierarchy-protocol.js +142 -0
  328. package/dist/peer/hierarchy-protocol.js.map +1 -0
  329. package/dist/peer/index.d.ts +15 -0
  330. package/dist/peer/index.d.ts.map +1 -0
  331. package/dist/peer/index.js +15 -0
  332. package/dist/peer/index.js.map +1 -0
  333. package/dist/peer/peer-manager.d.ts +99 -0
  334. package/dist/peer/peer-manager.d.ts.map +1 -0
  335. package/dist/peer/peer-manager.js +333 -0
  336. package/dist/peer/peer-manager.js.map +1 -0
  337. package/dist/peer/task-delegation.d.ts +189 -0
  338. package/dist/peer/task-delegation.d.ts.map +1 -0
  339. package/dist/peer/task-delegation.js +303 -0
  340. package/dist/peer/task-delegation.js.map +1 -0
  341. package/dist/peer/transports/index.d.ts +8 -0
  342. package/dist/peer/transports/index.d.ts.map +1 -0
  343. package/dist/peer/transports/index.js +8 -0
  344. package/dist/peer/transports/index.js.map +1 -0
  345. package/dist/peer/transports/local-transport.d.ts +56 -0
  346. package/dist/peer/transports/local-transport.d.ts.map +1 -0
  347. package/dist/peer/transports/local-transport.js +263 -0
  348. package/dist/peer/transports/local-transport.js.map +1 -0
  349. package/dist/peer/transports/websocket-transport.d.ts +86 -0
  350. package/dist/peer/transports/websocket-transport.d.ts.map +1 -0
  351. package/dist/peer/transports/websocket-transport.js +338 -0
  352. package/dist/peer/transports/websocket-transport.js.map +1 -0
  353. package/dist/peer/types.d.ts +268 -0
  354. package/dist/peer/types.d.ts.map +1 -0
  355. package/dist/peer/types.js +36 -0
  356. package/dist/peer/types.js.map +1 -0
  357. package/dist/router/address-resolver.d.ts +102 -0
  358. package/dist/router/address-resolver.d.ts.map +1 -0
  359. package/dist/router/address-resolver.js +198 -0
  360. package/dist/router/address-resolver.js.map +1 -0
  361. package/dist/router/broadcast.d.ts +53 -0
  362. package/dist/router/broadcast.d.ts.map +1 -0
  363. package/dist/router/broadcast.js +75 -0
  364. package/dist/router/broadcast.js.map +1 -0
  365. package/dist/router/channels.d.ts +148 -0
  366. package/dist/router/channels.d.ts.map +1 -0
  367. package/dist/router/channels.js +126 -0
  368. package/dist/router/channels.js.map +1 -0
  369. package/dist/router/index.d.ts +21 -0
  370. package/dist/router/index.d.ts.map +1 -0
  371. package/dist/router/index.js +18 -0
  372. package/dist/router/index.js.map +1 -0
  373. package/dist/router/message-router.d.ts +197 -0
  374. package/dist/router/message-router.d.ts.map +1 -0
  375. package/dist/router/message-router.js +903 -0
  376. package/dist/router/message-router.js.map +1 -0
  377. package/dist/router/message-types.d.ts +183 -0
  378. package/dist/router/message-types.d.ts.map +1 -0
  379. package/dist/router/message-types.js +79 -0
  380. package/dist/router/message-types.js.map +1 -0
  381. package/dist/router/role-resolver.d.ts +67 -0
  382. package/dist/router/role-resolver.d.ts.map +1 -0
  383. package/dist/router/role-resolver.js +106 -0
  384. package/dist/router/role-resolver.js.map +1 -0
  385. package/dist/router/signals.d.ts +253 -0
  386. package/dist/router/signals.d.ts.map +1 -0
  387. package/dist/router/signals.js +53 -0
  388. package/dist/router/signals.js.map +1 -0
  389. package/dist/router/types.d.ts +191 -0
  390. package/dist/router/types.d.ts.map +1 -0
  391. package/dist/router/types.js +34 -0
  392. package/dist/router/types.js.map +1 -0
  393. package/dist/router/wake.d.ts +111 -0
  394. package/dist/router/wake.d.ts.map +1 -0
  395. package/dist/router/wake.js +180 -0
  396. package/dist/router/wake.js.map +1 -0
  397. package/dist/server/combined-server.d.ts +95 -0
  398. package/dist/server/combined-server.d.ts.map +1 -0
  399. package/dist/server/combined-server.js +335 -0
  400. package/dist/server/combined-server.js.map +1 -0
  401. package/dist/steering/index.d.ts +11 -0
  402. package/dist/steering/index.d.ts.map +1 -0
  403. package/dist/steering/index.js +11 -0
  404. package/dist/steering/index.js.map +1 -0
  405. package/dist/steering/inject.d.ts +39 -0
  406. package/dist/steering/inject.d.ts.map +1 -0
  407. package/dist/steering/inject.js +197 -0
  408. package/dist/steering/inject.js.map +1 -0
  409. package/dist/steering/types.d.ts +100 -0
  410. package/dist/steering/types.d.ts.map +1 -0
  411. package/dist/steering/types.js +11 -0
  412. package/dist/steering/types.js.map +1 -0
  413. package/dist/store/backends/index.d.ts +11 -0
  414. package/dist/store/backends/index.d.ts.map +1 -0
  415. package/dist/store/backends/index.js +15 -0
  416. package/dist/store/backends/index.js.map +1 -0
  417. package/dist/store/backends/json-backend.d.ts +23 -0
  418. package/dist/store/backends/json-backend.d.ts.map +1 -0
  419. package/dist/store/backends/json-backend.js +220 -0
  420. package/dist/store/backends/json-backend.js.map +1 -0
  421. package/dist/store/backends/memory-backend.d.ts +12 -0
  422. package/dist/store/backends/memory-backend.d.ts.map +1 -0
  423. package/dist/store/backends/memory-backend.js +205 -0
  424. package/dist/store/backends/memory-backend.js.map +1 -0
  425. package/dist/store/backends/sqlite-backend.d.ts +27 -0
  426. package/dist/store/backends/sqlite-backend.d.ts.map +1 -0
  427. package/dist/store/backends/sqlite-backend.js +231 -0
  428. package/dist/store/backends/sqlite-backend.js.map +1 -0
  429. package/dist/store/backends/tinybase-backend.d.ts +22 -0
  430. package/dist/store/backends/tinybase-backend.d.ts.map +1 -0
  431. package/dist/store/backends/tinybase-backend.js +203 -0
  432. package/dist/store/backends/tinybase-backend.js.map +1 -0
  433. package/dist/store/backends/types.d.ts +175 -0
  434. package/dist/store/backends/types.d.ts.map +1 -0
  435. package/dist/store/backends/types.js +28 -0
  436. package/dist/store/backends/types.js.map +1 -0
  437. package/dist/store/event-store.d.ts +128 -0
  438. package/dist/store/event-store.d.ts.map +1 -0
  439. package/dist/store/event-store.js +1751 -0
  440. package/dist/store/event-store.js.map +1 -0
  441. package/dist/store/instance.d.ts +290 -0
  442. package/dist/store/instance.d.ts.map +1 -0
  443. package/dist/store/instance.js +363 -0
  444. package/dist/store/instance.js.map +1 -0
  445. package/dist/store/migrations.d.ts +41 -0
  446. package/dist/store/migrations.d.ts.map +1 -0
  447. package/dist/store/migrations.js +79 -0
  448. package/dist/store/migrations.js.map +1 -0
  449. package/dist/store/test-utils.d.ts +63 -0
  450. package/dist/store/test-utils.d.ts.map +1 -0
  451. package/dist/store/test-utils.js +63 -0
  452. package/dist/store/test-utils.js.map +1 -0
  453. package/dist/store/types/config.d.ts +16 -0
  454. package/dist/store/types/config.d.ts.map +1 -0
  455. package/dist/store/types/config.js +8 -0
  456. package/dist/store/types/config.js.map +1 -0
  457. package/dist/store/types/conversations.d.ts +91 -0
  458. package/dist/store/types/conversations.d.ts.map +1 -0
  459. package/dist/store/types/conversations.js +8 -0
  460. package/dist/store/types/conversations.js.map +1 -0
  461. package/dist/store/types/sessions.d.ts +44 -0
  462. package/dist/store/types/sessions.d.ts.map +1 -0
  463. package/dist/store/types/sessions.js +9 -0
  464. package/dist/store/types/sessions.js.map +1 -0
  465. package/dist/store/types.d.ts +115 -0
  466. package/dist/store/types.d.ts.map +1 -0
  467. package/dist/store/types.js +6 -0
  468. package/dist/store/types.js.map +1 -0
  469. package/dist/task/backend/index.d.ts +93 -0
  470. package/dist/task/backend/index.d.ts.map +1 -0
  471. package/dist/task/backend/index.js +178 -0
  472. package/dist/task/backend/index.js.map +1 -0
  473. package/dist/task/backend/memory.d.ts +70 -0
  474. package/dist/task/backend/memory.d.ts.map +1 -0
  475. package/dist/task/backend/memory.js +621 -0
  476. package/dist/task/backend/memory.js.map +1 -0
  477. package/dist/task/backend/opentasks/backend.d.ts +140 -0
  478. package/dist/task/backend/opentasks/backend.d.ts.map +1 -0
  479. package/dist/task/backend/opentasks/backend.js +1023 -0
  480. package/dist/task/backend/opentasks/backend.js.map +1 -0
  481. package/dist/task/backend/opentasks/client.d.ts +337 -0
  482. package/dist/task/backend/opentasks/client.d.ts.map +1 -0
  483. package/dist/task/backend/opentasks/client.js +225 -0
  484. package/dist/task/backend/opentasks/client.js.map +1 -0
  485. package/dist/task/backend/opentasks/daemon-manager.d.ts +89 -0
  486. package/dist/task/backend/opentasks/daemon-manager.d.ts.map +1 -0
  487. package/dist/task/backend/opentasks/daemon-manager.js +195 -0
  488. package/dist/task/backend/opentasks/daemon-manager.js.map +1 -0
  489. package/dist/task/backend/opentasks/index.d.ts +21 -0
  490. package/dist/task/backend/opentasks/index.d.ts.map +1 -0
  491. package/dist/task/backend/opentasks/index.js +21 -0
  492. package/dist/task/backend/opentasks/index.js.map +1 -0
  493. package/dist/task/backend/opentasks/mapping.d.ts +48 -0
  494. package/dist/task/backend/opentasks/mapping.d.ts.map +1 -0
  495. package/dist/task/backend/opentasks/mapping.js +77 -0
  496. package/dist/task/backend/opentasks/mapping.js.map +1 -0
  497. package/dist/task/backend/sudocode/__tests__/integration/test-utils.d.ts +54 -0
  498. package/dist/task/backend/sudocode/__tests__/integration/test-utils.d.ts.map +1 -0
  499. package/dist/task/backend/sudocode/__tests__/integration/test-utils.js +88 -0
  500. package/dist/task/backend/sudocode/__tests__/integration/test-utils.js.map +1 -0
  501. package/dist/task/backend/sudocode/backend.d.ts +155 -0
  502. package/dist/task/backend/sudocode/backend.d.ts.map +1 -0
  503. package/dist/task/backend/sudocode/backend.js +942 -0
  504. package/dist/task/backend/sudocode/backend.js.map +1 -0
  505. package/dist/task/backend/sudocode/client.d.ts +303 -0
  506. package/dist/task/backend/sudocode/client.d.ts.map +1 -0
  507. package/dist/task/backend/sudocode/client.js +101 -0
  508. package/dist/task/backend/sudocode/client.js.map +1 -0
  509. package/dist/task/backend/sudocode/index.d.ts +19 -0
  510. package/dist/task/backend/sudocode/index.d.ts.map +1 -0
  511. package/dist/task/backend/sudocode/index.js +17 -0
  512. package/dist/task/backend/sudocode/index.js.map +1 -0
  513. package/dist/task/backend/sudocode/mapping.d.ts +51 -0
  514. package/dist/task/backend/sudocode/mapping.d.ts.map +1 -0
  515. package/dist/task/backend/sudocode/mapping.js +86 -0
  516. package/dist/task/backend/sudocode/mapping.js.map +1 -0
  517. package/dist/task/backend/sudocode/server-client.d.ts +56 -0
  518. package/dist/task/backend/sudocode/server-client.d.ts.map +1 -0
  519. package/dist/task/backend/sudocode/server-client.js +367 -0
  520. package/dist/task/backend/sudocode/server-client.js.map +1 -0
  521. package/dist/task/backend/sudocode/standalone-client.d.ts +91 -0
  522. package/dist/task/backend/sudocode/standalone-client.d.ts.map +1 -0
  523. package/dist/task/backend/sudocode/standalone-client.js +476 -0
  524. package/dist/task/backend/sudocode/standalone-client.js.map +1 -0
  525. package/dist/task/backend/sudocode/sync-policy.d.ts +166 -0
  526. package/dist/task/backend/sudocode/sync-policy.d.ts.map +1 -0
  527. package/dist/task/backend/sudocode/sync-policy.js +221 -0
  528. package/dist/task/backend/sudocode/sync-policy.js.map +1 -0
  529. package/dist/task/backend/sudocode/tools.d.ts +87 -0
  530. package/dist/task/backend/sudocode/tools.d.ts.map +1 -0
  531. package/dist/task/backend/sudocode/tools.js +743 -0
  532. package/dist/task/backend/sudocode/tools.js.map +1 -0
  533. package/dist/task/backend/tool-provider.d.ts +56 -0
  534. package/dist/task/backend/tool-provider.d.ts.map +1 -0
  535. package/dist/task/backend/tool-provider.js +424 -0
  536. package/dist/task/backend/tool-provider.js.map +1 -0
  537. package/dist/task/backend/types.d.ts +297 -0
  538. package/dist/task/backend/types.d.ts.map +1 -0
  539. package/dist/task/backend/types.js +27 -0
  540. package/dist/task/backend/types.js.map +1 -0
  541. package/dist/task/backend/unified-tool-provider.d.ts +57 -0
  542. package/dist/task/backend/unified-tool-provider.d.ts.map +1 -0
  543. package/dist/task/backend/unified-tool-provider.js +623 -0
  544. package/dist/task/backend/unified-tool-provider.js.map +1 -0
  545. package/dist/task/index.d.ts +7 -0
  546. package/dist/task/index.d.ts.map +1 -0
  547. package/dist/task/index.js +7 -0
  548. package/dist/task/index.js.map +1 -0
  549. package/dist/task/retry-policy.d.ts +89 -0
  550. package/dist/task/retry-policy.d.ts.map +1 -0
  551. package/dist/task/retry-policy.js +160 -0
  552. package/dist/task/retry-policy.js.map +1 -0
  553. package/dist/task/task-manager.d.ts +70 -0
  554. package/dist/task/task-manager.d.ts.map +1 -0
  555. package/dist/task/task-manager.js +319 -0
  556. package/dist/task/task-manager.js.map +1 -0
  557. package/dist/task/types.d.ts +72 -0
  558. package/dist/task/types.d.ts.map +1 -0
  559. package/dist/task/types.js +33 -0
  560. package/dist/task/types.js.map +1 -0
  561. package/dist/teams/team-loader.d.ts +2 -1
  562. package/dist/teams/team-loader.d.ts.map +1 -1
  563. package/dist/teams/team-loader.js +2 -1
  564. package/dist/teams/team-loader.js.map +1 -1
  565. package/dist/teams/team-manager.d.ts +101 -0
  566. package/dist/teams/team-manager.d.ts.map +1 -0
  567. package/dist/teams/team-manager.js +260 -0
  568. package/dist/teams/team-manager.js.map +1 -0
  569. package/dist/teams/team-runtime-v2.d.ts +0 -3
  570. package/dist/teams/team-runtime-v2.d.ts.map +1 -1
  571. package/dist/teams/team-runtime-v2.js +8 -87
  572. package/dist/teams/team-runtime-v2.js.map +1 -1
  573. package/dist/teams/team-runtime.d.ts +245 -0
  574. package/dist/teams/team-runtime.d.ts.map +1 -0
  575. package/dist/teams/team-runtime.js +1023 -0
  576. package/dist/teams/team-runtime.js.map +1 -0
  577. package/dist/trigger/router/index.d.ts +11 -0
  578. package/dist/trigger/router/index.d.ts.map +1 -0
  579. package/dist/trigger/router/index.js +10 -0
  580. package/dist/trigger/router/index.js.map +1 -0
  581. package/dist/trigger/router/strategies/ai-router-strategy.d.ts +34 -0
  582. package/dist/trigger/router/strategies/ai-router-strategy.d.ts.map +1 -0
  583. package/dist/trigger/router/strategies/ai-router-strategy.js +359 -0
  584. package/dist/trigger/router/strategies/ai-router-strategy.js.map +1 -0
  585. package/dist/trigger/router/strategies/direct-strategy.d.ts +32 -0
  586. package/dist/trigger/router/strategies/direct-strategy.d.ts.map +1 -0
  587. package/dist/trigger/router/strategies/direct-strategy.js +119 -0
  588. package/dist/trigger/router/strategies/direct-strategy.js.map +1 -0
  589. package/dist/trigger/router/strategies/index.d.ts +11 -0
  590. package/dist/trigger/router/strategies/index.d.ts.map +1 -0
  591. package/dist/trigger/router/strategies/index.js +11 -0
  592. package/dist/trigger/router/strategies/index.js.map +1 -0
  593. package/dist/trigger/router/strategies/role-strategy.d.ts +39 -0
  594. package/dist/trigger/router/strategies/role-strategy.d.ts.map +1 -0
  595. package/dist/trigger/router/strategies/role-strategy.js +207 -0
  596. package/dist/trigger/router/strategies/role-strategy.js.map +1 -0
  597. package/dist/trigger/router/trigger-router.d.ts +54 -0
  598. package/dist/trigger/router/trigger-router.d.ts.map +1 -0
  599. package/dist/trigger/router/trigger-router.js +362 -0
  600. package/dist/trigger/router/trigger-router.js.map +1 -0
  601. package/dist/trigger/router/types.d.ts +225 -0
  602. package/dist/trigger/router/types.d.ts.map +1 -0
  603. package/dist/trigger/router/types.js +10 -0
  604. package/dist/trigger/router/types.js.map +1 -0
  605. package/dist/trigger/sources/cron/cron-service.d.ts.map +1 -1
  606. package/dist/trigger/sources/cron/cron-service.js +6 -3
  607. package/dist/trigger/sources/cron/cron-service.js.map +1 -1
  608. package/dist/trigger/trigger-system.d.ts +77 -0
  609. package/dist/trigger/trigger-system.d.ts.map +1 -0
  610. package/dist/trigger/trigger-system.js +84 -0
  611. package/dist/trigger/trigger-system.js.map +1 -0
  612. package/dist/util/git-safety.d.ts +33 -0
  613. package/dist/util/git-safety.d.ts.map +1 -0
  614. package/dist/util/git-safety.js +94 -0
  615. package/dist/util/git-safety.js.map +1 -0
  616. package/dist/workspace/dataplane-adapter.d.ts +260 -0
  617. package/dist/workspace/dataplane-adapter.d.ts.map +1 -0
  618. package/dist/workspace/dataplane-adapter.js +416 -0
  619. package/dist/workspace/dataplane-adapter.js.map +1 -0
  620. package/dist/workspace/index.d.ts +0 -1
  621. package/dist/workspace/index.d.ts.map +1 -1
  622. package/dist/workspace/index.js +0 -2
  623. package/dist/workspace/index.js.map +1 -1
  624. package/dist/workspace/landing/direct-push.d.ts.map +1 -1
  625. package/dist/workspace/landing/direct-push.js +22 -7
  626. package/dist/workspace/landing/direct-push.js.map +1 -1
  627. package/dist/workspace/landing/queue-to-branch.d.ts.map +1 -1
  628. package/dist/workspace/landing/queue-to-branch.js +1 -3
  629. package/dist/workspace/landing/queue-to-branch.js.map +1 -1
  630. package/dist/workspace/types.d.ts +0 -13
  631. package/dist/workspace/types.d.ts.map +1 -1
  632. package/dist/workspace/workspace-manager.d.ts +0 -11
  633. package/dist/workspace/workspace-manager.d.ts.map +1 -1
  634. package/dist/workspace/workspace-manager.js +0 -30
  635. package/dist/workspace/workspace-manager.js.map +1 -1
  636. package/package.json +28 -2
  637. package/templates/teams/self-driving/prompts/grinder.md +1 -0
  638. package/templates/teams/self-driving/prompts/judge.md +1 -0
  639. package/templates/teams/self-driving/prompts/planner.md +1 -0
  640. package/templates/teams/self-driving/roles/grinder.yaml +15 -0
  641. package/templates/teams/self-driving/roles/judge.yaml +10 -0
  642. package/templates/teams/self-driving/roles/planner.yaml +16 -0
  643. package/.claude/commands/openspec/apply.md +0 -23
  644. package/.claude/commands/openspec/archive.md +0 -27
  645. package/.claude/commands/openspec/proposal.md +0 -28
  646. package/.claude/settings.json +0 -133
  647. package/.gitattributes +0 -3
  648. package/.opentasks/config.json +0 -9
  649. package/.opentasks/graph.jsonl +0 -0
  650. package/.sessionlog/settings.json +0 -4
  651. package/.sudocode/issues.jsonl +0 -183
  652. package/.sudocode/specs.jsonl +0 -56
  653. package/AGENTS.md +0 -18
  654. package/CLAUDE.md +0 -923
  655. package/docs/architecture.md +0 -508
  656. package/docs/configuration.md +0 -323
  657. package/docs/conflict-recovery.md +0 -472
  658. package/docs/design/task-dispatcher.md +0 -880
  659. package/docs/design-subsystem-extraction.md +0 -627
  660. package/docs/git-cascade-integration-gaps.md +0 -678
  661. package/docs/implementation-details.md +0 -1127
  662. package/docs/implementation-summary.md +0 -448
  663. package/docs/lifecycle-events-design.md +0 -111
  664. package/docs/mail-integration.md +0 -608
  665. package/docs/openhive-capability-summary.md +0 -415
  666. package/docs/openhive-integration.md +0 -415
  667. package/docs/plan-self-driving-support.md +0 -433
  668. package/docs/roadmap-v2-gaps.md +0 -216
  669. package/docs/spec-self-driving-support.md +0 -462
  670. package/docs/team-templates.md +0 -860
  671. package/docs/teams.md +0 -306
  672. package/docs/trigger-system-design.md +0 -333
  673. package/docs/troubleshooting.md +0 -489
  674. package/docs/workspace-interfaces.md +0 -731
  675. package/docs/workspace-redesign-plan.md +0 -302
  676. package/examples/distributed-peer-communication.ts +0 -202
  677. package/examples/local-peer-communication.ts +0 -165
  678. package/index.js +0 -2
  679. package/mvp_docs/agent-execution-system.md +0 -347
  680. package/mvp_docs/agent-interface.md +0 -580
  681. package/mvp_docs/data-structures.md +0 -701
  682. package/mvp_docs/dynamic-meta-orchestration.md +0 -116
  683. package/mvp_docs/multi-agent-interaction-design.md +0 -779
  684. package/mvp_docs/mvp-implementation-plan.md +0 -1148
  685. package/renovate.json5 +0 -6
  686. package/scripts/test-acp-integration.ts +0 -422
  687. package/src/__tests__/boot-v2.test.ts +0 -631
  688. package/src/__tests__/e2e/acp-over-map-live.e2e.test.ts +0 -496
  689. package/src/__tests__/e2e/acp-over-map.e2e.test.ts +0 -457
  690. package/src/__tests__/e2e/agent-lifecycle.e2e.test.ts +0 -770
  691. package/src/__tests__/e2e/auto-sync.e2e.test.ts +0 -257
  692. package/src/__tests__/e2e/bootstrap.e2e.test.ts +0 -319
  693. package/src/__tests__/e2e/cascade-rebase.e2e.test.ts +0 -254
  694. package/src/__tests__/e2e/cc-swarm-bridge.e2e.test.ts +0 -253
  695. package/src/__tests__/e2e/cli-run.e2e.test.ts +0 -167
  696. package/src/__tests__/e2e/cognitive-workspace.e2e.test.ts +0 -282
  697. package/src/__tests__/e2e/dispatch-coordination.e2e.test.ts +0 -495
  698. package/src/__tests__/e2e/dispatch-live.e2e.test.ts +0 -564
  699. package/src/__tests__/e2e/dispatch-opentasks.e2e.test.ts +0 -496
  700. package/src/__tests__/e2e/dispatch-phase2-live.e2e.test.ts +0 -456
  701. package/src/__tests__/e2e/dispatch-phase2.e2e.test.ts +0 -386
  702. package/src/__tests__/e2e/dispatch.e2e.test.ts +0 -376
  703. package/src/__tests__/e2e/done-scenarios.e2e.test.ts +0 -322
  704. package/src/__tests__/e2e/live-agent.e2e.test.ts +0 -1330
  705. package/src/__tests__/e2e/map-server.e2e.test.ts +0 -128
  706. package/src/__tests__/e2e/map-sidecar.e2e.test.ts +0 -139
  707. package/src/__tests__/e2e/opentasks-integration.e2e.test.ts +0 -280
  708. package/src/__tests__/e2e/pull-mode.e2e.test.ts +0 -632
  709. package/src/__tests__/e2e/resume-continue.e2e.test.ts +0 -312
  710. package/src/__tests__/e2e/self-driving-v3.e2e.test.ts +0 -197
  711. package/src/__tests__/e2e/spawn-resolver.e2e.test.ts +0 -200
  712. package/src/__tests__/e2e/swarmkit-integration.e2e.test.ts +0 -562
  713. package/src/__tests__/e2e/swarmkit-live.e2e.test.ts +0 -1049
  714. package/src/__tests__/e2e/trajectory-tracking.e2e.test.ts +0 -258
  715. package/src/__tests__/e2e/trigger-wake.e2e.test.ts +0 -257
  716. package/src/__tests__/e2e/workspace-lifecycle.e2e.test.ts +0 -383
  717. package/src/__tests__/e2e/workspace-v3.e2e.test.ts +0 -413
  718. package/src/acp/__tests__/claude-code-replay.test.ts +0 -225
  719. package/src/acp/__tests__/macro-agent.test.ts +0 -387
  720. package/src/acp/__tests__/session-mapper.test.ts +0 -152
  721. package/src/acp/__tests__/websocket-server.test.ts +0 -194
  722. package/src/acp/claude-code-replay.ts +0 -208
  723. package/src/acp/index.ts +0 -32
  724. package/src/acp/macro-agent.ts +0 -995
  725. package/src/acp/map-bridge.ts +0 -193
  726. package/src/acp/session-mapper.ts +0 -116
  727. package/src/acp/types.ts +0 -99
  728. package/src/acp/websocket-server.ts +0 -213
  729. package/src/adapters/__tests__/federation.test.ts +0 -256
  730. package/src/adapters/__tests__/inbox-adapter.test.ts +0 -316
  731. package/src/adapters/__tests__/tasks-adapter.test.ts +0 -270
  732. package/src/adapters/federation.ts +0 -185
  733. package/src/adapters/inbox-adapter.ts +0 -292
  734. package/src/adapters/inbox-client-adapter.ts +0 -173
  735. package/src/adapters/index.ts +0 -44
  736. package/src/adapters/opentasks-daemon.ts +0 -252
  737. package/src/adapters/tasks-adapter.ts +0 -330
  738. package/src/adapters/types.ts +0 -286
  739. package/src/agent/__tests__/agent-manager-topology.test.ts +0 -73
  740. package/src/agent/__tests__/agent-manager-v2.completion-signal.test.ts +0 -284
  741. package/src/agent/__tests__/agent-manager-v2.permission-interception.test.ts +0 -296
  742. package/src/agent/__tests__/agent-manager-v2.permissions.test.ts +0 -233
  743. package/src/agent/__tests__/agent-manager-v2.test.ts +0 -614
  744. package/src/agent/__tests__/agent-store.test.ts +0 -465
  745. package/src/agent/__tests__/task-ref-resolution.test.ts +0 -231
  746. package/src/agent/agent-manager-v2.ts +0 -2187
  747. package/src/agent/agent-manager.ts +0 -403
  748. package/src/agent/agent-store.ts +0 -409
  749. package/src/agent/index.ts +0 -7
  750. package/src/agent/prompts/coordinator-signals.ts +0 -115
  751. package/src/agent/prompts/index.ts +0 -7
  752. package/src/agent/system-prompt.ts +0 -298
  753. package/src/agent/types.ts +0 -480
  754. package/src/agent-detection/__tests__/command-builder.test.ts +0 -336
  755. package/src/agent-detection/__tests__/detector.test.ts +0 -768
  756. package/src/agent-detection/__tests__/registry.test.ts +0 -254
  757. package/src/agent-detection/command-builder.ts +0 -90
  758. package/src/agent-detection/detector.ts +0 -307
  759. package/src/agent-detection/index.ts +0 -36
  760. package/src/agent-detection/registry.ts +0 -200
  761. package/src/agent-detection/types.ts +0 -184
  762. package/src/api/__tests__/server.test.ts +0 -292
  763. package/src/api/index.ts +0 -8
  764. package/src/api/server.ts +0 -380
  765. package/src/api/types.ts +0 -39
  766. package/src/auth/__tests__/token.test.ts +0 -100
  767. package/src/auth/index.ts +0 -1
  768. package/src/auth/token.ts +0 -82
  769. package/src/boot-v2.ts +0 -1343
  770. package/src/cli/__tests__/stable-instance-id.test.ts +0 -57
  771. package/src/cli/acp.ts +0 -101
  772. package/src/cli/inbox-mcp-proxy.ts +0 -56
  773. package/src/cli/index.ts +0 -566
  774. package/src/cli/mcp.ts +0 -305
  775. package/src/cli/parse-args.ts +0 -54
  776. package/src/cli/stable-instance-id.ts +0 -14
  777. package/src/cognitive/__tests__/macro-agent-backend.test.ts +0 -673
  778. package/src/cognitive/__tests__/session-converter.test.ts +0 -423
  779. package/src/cognitive/__tests__/workspace-handler.test.ts +0 -221
  780. package/src/cognitive/analyst-role.ts +0 -59
  781. package/src/cognitive/index.ts +0 -49
  782. package/src/cognitive/macro-agent-backend.ts +0 -402
  783. package/src/cognitive/session-converter.ts +0 -151
  784. package/src/cognitive/types.ts +0 -187
  785. package/src/cognitive/workspace-handler.ts +0 -163
  786. package/src/config/index.ts +0 -9
  787. package/src/config/project-config.ts +0 -294
  788. package/src/control/__tests__/control-resilience.test.ts +0 -251
  789. package/src/control/__tests__/control-socket.test.ts +0 -240
  790. package/src/control/control-client.ts +0 -337
  791. package/src/control/control-server.ts +0 -298
  792. package/src/control/index.ts +0 -17
  793. package/src/control/types.ts +0 -95
  794. package/src/dispatch/CLAUDE.md +0 -129
  795. package/src/dispatch/__tests__/loadout-translation.test.ts +0 -141
  796. package/src/dispatch/__tests__/mail-inbound-consumer.integration.test.ts +0 -519
  797. package/src/dispatch/__tests__/mail-inbound-consumer.test.ts +0 -800
  798. package/src/dispatch/__tests__/mail-inbound-reuse-consumer.test.ts +0 -575
  799. package/src/dispatch/__tests__/permission-evaluator.test.ts +0 -196
  800. package/src/dispatch/__tests__/permission-overlay.test.ts +0 -56
  801. package/src/dispatch/__tests__/permissions-handler.test.ts +0 -168
  802. package/src/dispatch/__tests__/spawn-agent-handler.test.ts +0 -282
  803. package/src/dispatch/loadout-translation.ts +0 -138
  804. package/src/dispatch/mail-inbound-consumer.ts +0 -560
  805. package/src/dispatch/mail-inbound-reuse-consumer.ts +0 -479
  806. package/src/dispatch/permission-evaluator.ts +0 -191
  807. package/src/dispatch/permission-overlay.ts +0 -89
  808. package/src/dispatch/permissions-handler.ts +0 -112
  809. package/src/dispatch/spawn-agent-handler.ts +0 -160
  810. package/src/index.ts +0 -117
  811. package/src/integrations/__tests__/context-builder.test.ts +0 -218
  812. package/src/integrations/__tests__/sessionlog.test.ts +0 -498
  813. package/src/integrations/__tests__/skilltree.test.ts +0 -136
  814. package/src/integrations/context-builder.ts +0 -280
  815. package/src/integrations/sessionlog.ts +0 -194
  816. package/src/integrations/skilltree.ts +0 -184
  817. package/src/lifecycle/__tests__/cascade-consolidation.test.ts +0 -240
  818. package/src/lifecycle/__tests__/handlers-v2.test.ts +0 -565
  819. package/src/lifecycle/cascade.ts +0 -335
  820. package/src/lifecycle/cleanup.ts +0 -373
  821. package/src/lifecycle/handlers-v2.ts +0 -508
  822. package/src/lifecycle/index.ts +0 -76
  823. package/src/lifecycle/types.ts +0 -260
  824. package/src/map/__tests__/cascade-bridge.test.ts +0 -229
  825. package/src/map/__tests__/cascade-diff-server.test.ts +0 -434
  826. package/src/map/__tests__/emit-event.test.ts +0 -71
  827. package/src/map/__tests__/lifecycle-bridge.test.ts +0 -430
  828. package/src/map/__tests__/mail-bridge.test.ts +0 -321
  829. package/src/map/__tests__/permission-forwarding.test.ts +0 -143
  830. package/src/map/__tests__/sidecar-diff-install-smoke.test.ts +0 -90
  831. package/src/map/__tests__/sidecar-integration.test.ts +0 -190
  832. package/src/map/__tests__/task-bridge.test.ts +0 -153
  833. package/src/map/__tests__/trajectory-reporter.test.ts +0 -173
  834. package/src/map/acp-bridge.ts +0 -293
  835. package/src/map/cascade-action-handler.ts +0 -205
  836. package/src/map/cascade-bridge.ts +0 -339
  837. package/src/map/cascade-diff-server.ts +0 -404
  838. package/src/map/cc-swarm-hooks.ts +0 -242
  839. package/src/map/coordination-handler.ts +0 -232
  840. package/src/map/index.ts +0 -18
  841. package/src/map/lifecycle-bridge.ts +0 -236
  842. package/src/map/mail-bridge.ts +0 -263
  843. package/src/map/repo-workspace.ts +0 -82
  844. package/src/map/server.ts +0 -758
  845. package/src/map/sidecar.ts +0 -826
  846. package/src/map/task-bridge.ts +0 -89
  847. package/src/map/trajectory-reporter.ts +0 -124
  848. package/src/map/types.ts +0 -304
  849. package/src/mcp/__tests__/mcp-server-v2.test.ts +0 -236
  850. package/src/mcp/index.ts +0 -6
  851. package/src/mcp/mcp-server-v2.ts +0 -485
  852. package/src/mcp/tools/done-v2.ts +0 -213
  853. package/src/mcp/types.ts +0 -432
  854. package/src/metrics/__tests__/metrics.test.ts +0 -205
  855. package/src/metrics/index.ts +0 -13
  856. package/src/metrics/metrics.ts +0 -151
  857. package/src/metrics/types.ts +0 -63
  858. package/src/roles/__tests__/config-loader.test.ts +0 -540
  859. package/src/roles/builtin/coordinator.ts +0 -75
  860. package/src/roles/builtin/generic.ts +0 -39
  861. package/src/roles/builtin/index.ts +0 -51
  862. package/src/roles/builtin/integrator.ts +0 -62
  863. package/src/roles/builtin/monitor.ts +0 -65
  864. package/src/roles/builtin/worker.ts +0 -134
  865. package/src/roles/capabilities.ts +0 -257
  866. package/src/roles/config-loader.ts +0 -405
  867. package/src/roles/index.ts +0 -141
  868. package/src/roles/registry.ts +0 -713
  869. package/src/roles/types.ts +0 -344
  870. package/src/store/index.ts +0 -8
  871. package/src/store/types/agents.ts +0 -69
  872. package/src/store/types/events.ts +0 -91
  873. package/src/store/types/index.ts +0 -9
  874. package/src/store/types/messages.ts +0 -32
  875. package/src/store/types/primitives.ts +0 -9
  876. package/src/store/types/tasks.ts +0 -124
  877. package/src/teams/__tests__/team-manager-v2.test.ts +0 -425
  878. package/src/teams/__tests__/team-runtime-v2.test.ts +0 -402
  879. package/src/teams/index.ts +0 -29
  880. package/src/teams/seed-defaults.ts +0 -83
  881. package/src/teams/team-loader.ts +0 -476
  882. package/src/teams/team-manager-v2.ts +0 -343
  883. package/src/teams/team-runtime-v2.ts +0 -943
  884. package/src/teams/types.ts +0 -276
  885. package/src/trigger/__tests__/cron-service.test.ts +0 -548
  886. package/src/trigger/__tests__/scheduler.test.ts +0 -371
  887. package/src/trigger/__tests__/system-event-queue.test.ts +0 -147
  888. package/src/trigger/__tests__/trigger-system-v2.test.ts +0 -257
  889. package/src/trigger/__tests__/wake-manager.test.ts +0 -356
  890. package/src/trigger/__tests__/webhook-handler.test.ts +0 -567
  891. package/src/trigger/index.ts +0 -110
  892. package/src/trigger/queue/index.ts +0 -21
  893. package/src/trigger/queue/system-event-queue.ts +0 -232
  894. package/src/trigger/queue/types.ts +0 -149
  895. package/src/trigger/sources/cron/cron-service.ts +0 -499
  896. package/src/trigger/sources/cron/index.ts +0 -41
  897. package/src/trigger/sources/cron/scheduler.ts +0 -344
  898. package/src/trigger/sources/cron/types.ts +0 -333
  899. package/src/trigger/sources/index.ts +0 -10
  900. package/src/trigger/sources/webhook/index.ts +0 -25
  901. package/src/trigger/sources/webhook/types.ts +0 -205
  902. package/src/trigger/sources/webhook/webhook-handler.ts +0 -410
  903. package/src/trigger/strategies/ai-router.ts +0 -170
  904. package/src/trigger/trigger-system-v2.ts +0 -536
  905. package/src/trigger/types.ts +0 -228
  906. package/src/trigger/wake/index.ts +0 -22
  907. package/src/trigger/wake/types.ts +0 -162
  908. package/src/trigger/wake/wake-manager.ts +0 -390
  909. package/src/workspace/__tests__/git-cascade-adapter.test.ts +0 -563
  910. package/src/workspace/__tests__/land-dispatch.test.ts +0 -214
  911. package/src/workspace/__tests__/self-driving-yaml.test.ts +0 -122
  912. package/src/workspace/__tests__/shared-worktree-refcount.test.ts +0 -154
  913. package/src/workspace/__tests__/standalone-mode.test.ts +0 -118
  914. package/src/workspace/__tests__/workspace-manager-v3.test.ts +0 -245
  915. package/src/workspace/__tests__/yaml-schema.test.ts +0 -210
  916. package/src/workspace/config.ts +0 -165
  917. package/src/workspace/git-cascade-adapter.ts +0 -1213
  918. package/src/workspace/index.ts +0 -110
  919. package/src/workspace/landing/__tests__/strategies.test.ts +0 -184
  920. package/src/workspace/landing/direct-push.ts +0 -91
  921. package/src/workspace/landing/index.ts +0 -40
  922. package/src/workspace/landing/merge-to-parent.ts +0 -229
  923. package/src/workspace/landing/optimistic-push.ts +0 -36
  924. package/src/workspace/landing/queue-to-branch.ts +0 -108
  925. package/src/workspace/merge-queue/__tests__/conflict-resolution-git.e2e.test.ts +0 -641
  926. package/src/workspace/merge-queue/__tests__/conflict-resolution.test.ts +0 -707
  927. package/src/workspace/merge-queue/__tests__/merge-queue-concurrent.test.ts +0 -628
  928. package/src/workspace/merge-queue/__tests__/merge-queue-edge-cases.test.ts +0 -1217
  929. package/src/workspace/merge-queue/__tests__/merge-queue.test.ts +0 -506
  930. package/src/workspace/merge-queue/__tests__/real-git-operations.e2e.test.ts +0 -556
  931. package/src/workspace/merge-queue/__tests__/resolver-flow.test.ts +0 -472
  932. package/src/workspace/merge-queue/index.ts +0 -38
  933. package/src/workspace/merge-queue/merge-queue.ts +0 -585
  934. package/src/workspace/merge-queue/schema.ts +0 -98
  935. package/src/workspace/merge-queue/types.ts +0 -316
  936. package/src/workspace/pool/__tests__/worktree-pool.integration.test.ts +0 -1281
  937. package/src/workspace/pool/__tests__/worktree-pool.test.ts +0 -590
  938. package/src/workspace/pool/index.ts +0 -26
  939. package/src/workspace/pool/types.ts +0 -276
  940. package/src/workspace/pool/worktree-pool.ts +0 -659
  941. package/src/workspace/recovery/__tests__/auto-resolve-integration.test.ts +0 -127
  942. package/src/workspace/recovery/__tests__/spawn-resolver.test.ts +0 -139
  943. package/src/workspace/recovery/__tests__/strategies.test.ts +0 -145
  944. package/src/workspace/recovery/abandon.ts +0 -51
  945. package/src/workspace/recovery/auto-resolve.ts +0 -119
  946. package/src/workspace/recovery/defer.ts +0 -23
  947. package/src/workspace/recovery/escalate.ts +0 -30
  948. package/src/workspace/recovery/index.ts +0 -58
  949. package/src/workspace/recovery/spawn-resolver.ts +0 -152
  950. package/src/workspace/recovery/types.ts +0 -54
  951. package/src/workspace/strategies/index.ts +0 -18
  952. package/src/workspace/strategies/optimistic.ts +0 -139
  953. package/src/workspace/strategies/queue.ts +0 -81
  954. package/src/workspace/strategies/registry.ts +0 -89
  955. package/src/workspace/strategies/trunk.ts +0 -123
  956. package/src/workspace/strategies/types.ts +0 -145
  957. package/src/workspace/topology/__tests__/yaml-driven.test.ts +0 -345
  958. package/src/workspace/topology/index.ts +0 -18
  959. package/src/workspace/topology/no-workspace.ts +0 -39
  960. package/src/workspace/topology/types.ts +0 -116
  961. package/src/workspace/topology/yaml-driven.ts +0 -316
  962. package/src/workspace/types-v3.ts +0 -162
  963. package/src/workspace/types.ts +0 -541
  964. package/src/workspace/workspace-manager.ts +0 -1577
  965. package/src/workspace/yaml-schema.ts +0 -216
  966. package/test_fixtures/README.md +0 -425
  967. package/test_fixtures/fixtures/behaviors/coordinators.ts +0 -196
  968. package/test_fixtures/fixtures/behaviors/index.ts +0 -62
  969. package/test_fixtures/fixtures/behaviors/integrators.ts +0 -143
  970. package/test_fixtures/fixtures/behaviors/monitors.ts +0 -199
  971. package/test_fixtures/fixtures/behaviors/workers.ts +0 -348
  972. package/test_fixtures/fixtures/index.ts +0 -7
  973. package/test_fixtures/fixtures/projects/index.ts +0 -23
  974. package/test_fixtures/fixtures/projects/project-with-specs.ts +0 -44
  975. package/test_fixtures/fixtures/projects/typescript-project.ts +0 -200
  976. package/test_fixtures/fixtures/repos/index.ts +0 -6
  977. package/test_fixtures/fixtures/repos/temp-repo-factory.ts +0 -299
  978. package/test_fixtures/fixtures/repos/types.ts +0 -174
  979. package/test_fixtures/harness/assertions/harness-assertions.ts +0 -752
  980. package/test_fixtures/harness/assertions/index.ts +0 -8
  981. package/test_fixtures/harness/index.ts +0 -15
  982. package/test_fixtures/harness/simulator/agent-simulator.ts +0 -768
  983. package/test_fixtures/harness/simulator/behavior-executor.ts +0 -580
  984. package/test_fixtures/harness/simulator/index.ts +0 -14
  985. package/test_fixtures/harness/simulator/types.ts +0 -459
  986. package/test_fixtures/harness/test-harness.ts +0 -770
  987. package/test_fixtures/harness/timing/event-stepper.ts +0 -344
  988. package/test_fixtures/harness/timing/index.ts +0 -8
  989. package/tsconfig.json +0 -21
  990. package/vitest.config.ts +0 -30
  991. package/vitest.e2e.config.ts +0 -28
  992. package/vitest.setup.ts +0 -12
@@ -1,860 +0,0 @@
1
- # Team Templates
2
-
3
- Detailed design for the team template system — the modular layer that enables loading different agent team structures on top of macro-agent's role-agnostic core.
4
-
5
- ## Problem
6
-
7
- macro-agent provides powerful primitives: roles with capabilities, workspace isolation, message routing, lifecycle management. But composing these into a working multi-agent team requires knowing which roles to define, how they interact, what prompts they need, and which integration/task patterns to use.
8
-
9
- Today, this composition is implicit — you spawn a coordinator, it spawns workers, the integrator processes the merge queue. There's one interaction pattern hardcoded across the system.
10
-
11
- Different workflows need different team shapes:
12
- - **Structured development**: Coordinator decomposes tasks, pushes to workers, integrator gates merges (current model)
13
- - **Self-driving**: Planners continuously discover work, workers pull tasks, trunk-based integration, judge evaluates quality
14
- - **Code review**: Author agents write code, reviewer agents evaluate, gatekeeper merges approved changes
15
- - **Migration**: Scanner identifies work, transformer agents apply changes in parallel, validator confirms correctness
16
-
17
- Team templates make these compositions **declarative and loadable** without modifying macro-agent core.
18
-
19
- ---
20
-
21
- ## File Structure
22
-
23
- A team template is a directory. The structure is designed to be interoperable with other multi-agent systems — the core topology and role structure uses a generic schema, while macro-agent specific configuration lives in clearly namespaced extension fields.
24
-
25
- ```
26
- .multiagent/teams/<team-name>/
27
- ├── team.yaml # Manifest: topology, communication, modes
28
- ├── roles/ # Role definitions
29
- │ ├── <role-name>.yaml
30
- │ └── ...
31
- ├── prompts/ # Static role prompt files
32
- │ ├── <role-name>.md
33
- │ └── ...
34
- └── tools/ # Additional MCP servers / tool configs
35
- ├── mcp-servers.json # Additional MCP servers to mount per role
36
- └── ...
37
- ```
38
-
39
- ### Interoperability
40
-
41
- The manifest schema separates **generic multi-agent concepts** from **macro-agent specifics**:
42
-
43
- ```yaml
44
- # Generic multi-agent fields (portable across systems)
45
- name: self-driving
46
- description: "Autonomous codebase development"
47
- version: 1
48
- roles: [...]
49
- topology: { ... }
50
- communication: { ... }
51
-
52
- # macro-agent specific extensions (namespaced)
53
- macro_agent:
54
- integration:
55
- strategy: trunk
56
- config: { ... }
57
- task_assignment:
58
- mode: pull
59
- pull: { ... }
60
- lifecycle: { ... }
61
- observability: { ... }
62
- ```
63
-
64
- The `topology`, `roles`, and `communication` sections are generic enough to describe any multi-agent team. The `macro_agent` section contains implementation-specific configuration that another system would ignore (or define its own equivalent).
65
-
66
- Similarly, role definitions separate generic fields from extensions:
67
-
68
- ```yaml
69
- # Generic
70
- name: planner
71
- extends: coordinator
72
- description: "..."
73
- capabilities: [...]
74
-
75
- # macro-agent specific
76
- macro_agent:
77
- workspace: { ... }
78
- lifecycle: { ... }
79
- protocol: { ... }
80
- ```
81
-
82
- This means the same team template directory could be consumed by different orchestrators — each reading the generic topology and applying their own runtime semantics.
83
-
84
- ---
85
-
86
- ## Manifest: team.yaml
87
-
88
- ```yaml
89
- name: self-driving
90
- description: "Autonomous codebase development with continuous planning"
91
- version: 1
92
-
93
- # ─────────────────────────────────────────────────────────────
94
- # Roles
95
- # ─────────────────────────────────────────────────────────────
96
- # References role files in roles/ directory or built-in roles.
97
- roles:
98
- - planner
99
- - grinder
100
- - judge
101
-
102
- # ─────────────────────────────────────────────────────────────
103
- # Topology
104
- # ─────────────────────────────────────────────────────────────
105
- # Defines the agent spawn graph.
106
- topology:
107
- # The initial agent spawned when the team starts
108
- root:
109
- role: planner
110
- prompt: prompts/planner.md # Static prompt file
111
- config:
112
- model: sonnet
113
-
114
- # Agents spawned alongside root (peers, not children)
115
- companions:
116
- - role: judge
117
- prompt: prompts/judge.md
118
- config:
119
- model: haiku
120
-
121
- # Which roles can spawn which other roles.
122
- # Overrides the default capability-based spawn checks.
123
- spawn_rules:
124
- planner: [grinder, planner]
125
- judge: []
126
- grinder: []
127
-
128
- # ─────────────────────────────────────────────────────────────
129
- # Communication
130
- # ─────────────────────────────────────────────────────────────
131
- # Detailed below in the Communication Topology section.
132
- communication:
133
- channels:
134
- task_updates:
135
- description: "Task lifecycle events"
136
- signals: [TASK_CREATED, TASK_COMPLETED, TASK_FAILED]
137
- work_coordination:
138
- description: "Work assignment and completion"
139
- signals: [WORK_ASSIGNED, WORKER_DONE, MERGE_REQUEST]
140
- health:
141
- description: "System health monitoring"
142
- signals: [HEALTH_CHECK, METRIC_SNAPSHOT, GREEN_SNAPSHOT]
143
-
144
- subscriptions:
145
- planner:
146
- - channel: task_updates
147
- - channel: work_coordination
148
- signals: [WORKER_DONE]
149
- - channel: health
150
- signals: [METRIC_SNAPSHOT]
151
- judge:
152
- - channel: task_updates
153
- signals: [TASK_FAILED]
154
- - channel: work_coordination
155
- signals: [WORKER_DONE]
156
- - channel: health
157
- grinder:
158
- - channel: work_coordination
159
- signals: [WORK_ASSIGNED]
160
-
161
- emissions:
162
- planner: [TASK_CREATED, WORK_ASSIGNED, PLANNING_COMPLETE]
163
- judge: [HEALTH_CHECK, GREEN_SNAPSHOT, FIXUP_CREATED]
164
- grinder: [WORKER_DONE]
165
-
166
- # How roles communicate with each other (see Communication Topology section)
167
- routing:
168
- # Status flows upward by default (subtree subscriptions)
169
- status: upstream
170
-
171
- # Explicit peer connections (non-hierarchical)
172
- peers:
173
- - from: judge
174
- to: planner
175
- via: direct # Direct agent-to-agent messaging
176
- signals: [FIXUP_CREATED, GREEN_SNAPSHOT]
177
- - from: planner
178
- to: judge
179
- via: direct
180
- signals: [CONVERGENCE_CHECK]
181
-
182
- # ─────────────────────────────────────────────────────────────
183
- # macro-agent specific extensions
184
- # ─────────────────────────────────────────────────────────────
185
- macro_agent:
186
- task_assignment:
187
- mode: pull
188
- pull:
189
- idle_timeout_s: 300
190
- claim_retry_delay_ms: 2000
191
- max_concurrent_per_agent: 1
192
-
193
- integration:
194
- strategy: trunk
195
- config:
196
- max_retries: 3
197
- conflict_action: abandon
198
-
199
- lifecycle:
200
- continuations:
201
- enabled: true
202
- max_history_messages: 50
203
- checkpoint_interval: round_trip
204
- scaling:
205
- min_workers: 3
206
- max_workers: 20
207
- scale_on: task_queue_depth
208
- idle_drain: true
209
-
210
- observability:
211
- metrics_window_s: 3600
212
- snapshot_interval_s: 300
213
- ```
214
-
215
- ---
216
-
217
- ## Communication Topology
218
-
219
- This is the most architecturally significant part of the team template. The communication section declares *how agents talk to each other* — which is what distinguishes one team shape from another.
220
-
221
- ### The Problem Communication Topology Solves
222
-
223
- macro-agent's MessageRouter is powerful but low-level. It supports seven channel types (`agent`, `task`, `lineage`, `subtree`, `topic`, `broadcast`, `role`) and MAP addresses (direct, scope, role, hierarchical, federated). An agent can technically send a message to anyone via any mechanism.
224
-
225
- But a well-functioning team needs **structured communication** — not a free-for-all. The planner shouldn't be interrupted by every grinder's debug output. The judge shouldn't broadcast to workers directly. Workers shouldn't message each other about unrelated tasks.
226
-
227
- The communication topology declares the **intended** communication patterns. The TeamRuntime translates these into the right subscriptions, address restrictions, and routing rules.
228
-
229
- ### Three Layers of Communication
230
-
231
- macro-agent communication already operates at three layers. The team template configures each:
232
-
233
- #### Layer 1: Status Flow (Automatic, Hierarchical)
234
-
235
- Status events (`started`, `checkpoint`, `completed`, `failed`, `blocked`) flow automatically from children to parents via subtree subscriptions. This is already implemented — `setupDefaultSubscriptions` subscribes parents to children's subtree.
236
-
237
- ```yaml
238
- communication:
239
- routing:
240
- status: upstream # Default: status flows up the spawn tree
241
- ```
242
-
243
- In most teams, this is sufficient — a planner spawns grinders, and automatically receives their status updates. No additional configuration needed.
244
-
245
- **But** the self-driving team has a non-hierarchical topology: the judge is a companion (peer of the planner), not a child. It still needs to see worker status. This is where explicit subscriptions come in.
246
-
247
- #### Layer 2: Signal Channels (Topic-Based Pub/Sub)
248
-
249
- Signals are named events that agents publish and subscribe to. They map directly to macro-agent's `topic` channel type and the existing `protocol.subscriptions` / `protocol.canEmit` in role definitions.
250
-
251
- The team manifest groups signals into **named channels** for clarity:
252
-
253
- ```yaml
254
- communication:
255
- channels:
256
- task_updates:
257
- signals: [TASK_CREATED, TASK_COMPLETED, TASK_FAILED]
258
- work_coordination:
259
- signals: [WORK_ASSIGNED, WORKER_DONE, MERGE_REQUEST]
260
- health:
261
- signals: [HEALTH_CHECK, METRIC_SNAPSHOT, GREEN_SNAPSHOT]
262
- ```
263
-
264
- Each role subscribes to channels (or specific signals within a channel):
265
-
266
- ```yaml
267
- subscriptions:
268
- planner:
269
- - channel: task_updates # All signals in channel
270
- - channel: work_coordination
271
- signals: [WORKER_DONE] # Specific signal only
272
- - channel: health
273
- signals: [METRIC_SNAPSHOT]
274
- judge:
275
- - channel: task_updates
276
- signals: [TASK_FAILED] # Only failures
277
- - channel: health # All health signals
278
- grinder:
279
- - channel: work_coordination
280
- signals: [WORK_ASSIGNED]
281
- ```
282
-
283
- And declares what it can emit:
284
-
285
- ```yaml
286
- emissions:
287
- planner: [TASK_CREATED, WORK_ASSIGNED]
288
- judge: [HEALTH_CHECK, GREEN_SNAPSHOT, FIXUP_CREATED]
289
- grinder: [WORKER_DONE]
290
- ```
291
-
292
- **How this maps to macro-agent primitives**:
293
-
294
- When the TeamRuntime initializes, for each agent spawned with role `planner`:
295
-
296
- ```typescript
297
- // For each channel subscription:
298
- // channel: task_updates → subscribe to topic "task_updates"
299
- messageRouter.subscribe(agentId, { type: "topic", target: "task_updates" });
300
-
301
- // For signal-filtered subscriptions, the filtering happens at read time:
302
- // The agent receives all messages on the channel topic,
303
- // but the signal filter is applied when getMessages() is called
304
- // (or encoded in the subscription metadata for routing-level filtering)
305
- ```
306
-
307
- When an agent emits a signal (e.g., `WORKER_DONE`), the emission is routed:
308
-
309
- ```typescript
310
- // emitStatus with signal details → routes to topic subscribers
311
- messageRouter.emitStatus({
312
- from: { agent_id: grinderId },
313
- status_type: "completed",
314
- summary: "Task done",
315
- details: { signal: "WORKER_DONE", taskId, ... }
316
- });
317
- // This reaches all agents subscribed to the topic containing WORKER_DONE
318
- ```
319
-
320
- **The channel abstraction is purely organizational** — it groups related signals under a name for readability. Under the hood, each channel maps to a topic subscription. The signals within a channel can be used for filtering.
321
-
322
- #### Layer 3: Direct Messaging (Peer-to-Peer)
323
-
324
- Some communication doesn't fit the pub/sub model. The judge needs to tell the planner about a specific fixup. The planner needs to ask the judge to run an evaluation. These are directed, point-to-point messages.
325
-
326
- ```yaml
327
- communication:
328
- routing:
329
- peers:
330
- - from: judge
331
- to: planner
332
- via: direct
333
- signals: [FIXUP_CREATED, GREEN_SNAPSHOT]
334
- - from: planner
335
- to: judge
336
- via: direct
337
- signals: [CONVERGENCE_CHECK]
338
- ```
339
-
340
- **How this maps to macro-agent primitives**:
341
-
342
- Peer connections use MAP's `role` addressing. When the judge sends `FIXUP_CREATED`:
343
-
344
- ```typescript
345
- // The judge sends to the planner role (resolved to specific agent IDs)
346
- messageRouter.sendToAddress({
347
- from: judgeAgentId,
348
- to: { role: "planner" }, // RoleAddress — resolved to planner agent(s)
349
- content: JSON.stringify({ signal: "FIXUP_CREATED", taskId, ... }),
350
- options: { priority: "high" }
351
- });
352
- ```
353
-
354
- The `via: direct` means use MAP agent/role addressing (not topic pub/sub). The `via` field can be:
355
- - `direct` — MAP `{ role: "target_role" }` or `{ agent: id }` addressing
356
- - `topic` — publish to a shared topic (same as channel subscriptions)
357
- - `scope` — MAP `{ scope: "scope_name" }` addressing (explicit scope membership)
358
-
359
- **Why this matters for the self-driving team**: The judge and planner are peers (not parent-child). Without explicit peer routing, the judge has no way to reach the planner. The peer connection declares this path and the TeamRuntime sets up the necessary subscriptions/address resolution.
360
-
361
- ### Communication Topology Enforcement
362
-
363
- The team template doesn't just *suggest* communication patterns — it can *enforce* them. The `emissions` field restricts what signals a role can emit (maps to `protocol.canEmit` in the role definition). If a grinder tries to emit `HEALTH_CHECK`, it's blocked.
364
-
365
- ```yaml
366
- emissions:
367
- grinder: [WORKER_DONE] # Grinders can ONLY emit WORKER_DONE
368
- ```
369
-
370
- Similarly, the `subscriptions` field restricts what a role receives. The combination of emission restrictions + subscription filters means agents can only communicate through declared paths.
371
-
372
- **Enforcement levels** (configured per team):
373
-
374
- ```yaml
375
- communication:
376
- enforcement: strict # strict | permissive | audit
377
- ```
378
-
379
- - `strict` — Agents can only emit declared signals, only receive subscribed channels. Violations are blocked.
380
- - `permissive` — All communication allowed, but undeclared patterns are logged as warnings.
381
- - `audit` — All communication allowed, undeclared patterns recorded for analysis.
382
-
383
- Default is `permissive` — teams work without declaring every signal, but you get visibility into undeclared communication for iterative refinement.
384
-
385
- ### Addressing Summary
386
-
387
- How team template communication concepts map to macro-agent's existing addressing:
388
-
389
- | Team Concept | MAP Address Type | Channel Type | Notes |
390
- |---|---|---|---|
391
- | Status flow (upstream) | Automatic via subtree | `subtree` | Already implemented by `setupDefaultSubscriptions` |
392
- | Channel subscription | `{ scope: "channel_name" }` | `topic` | Agent subscribes to topic matching channel name |
393
- | Signal emission | `emitStatus()` with signal details | `topic` routing | Details carry signal name for filtering |
394
- | Peer direct message | `{ role: "target_role" }` | `role` | Resolved to agent IDs at send time |
395
- | Broadcast to role | `{ role: "grinder" }` | `role` | Fan-out to all agents with that role |
396
- | Hierarchical (parent) | `{ parent: true }` | `lineage` | Resolved relative to sender |
397
- | Hierarchical (children) | `{ children: true }` | `subtree` | Resolved relative to sender |
398
- | Broadcast to all | `{ broadcast: true }` | `broadcast` | All active agents |
399
-
400
- ### Example: Communication Flow in Self-Driving Team
401
-
402
- ```
403
- Planner Judge Grinder (x N)
404
- │ │ │
405
- │ ── TASK_CREATED ──────▷ │ (via task_updates topic) │
406
- │ │ │
407
- │ ── WORK_ASSIGNED ─────────────────────────────────▷ │ (via work_coordination topic)
408
- │ │ │
409
- │ │ ◁── WORKER_DONE ── │
410
- │ ◁── WORKER_DONE ──────────────────│ (both subscribed)
411
- │ │ │
412
- │ │── FIXUP_CREATED ──▷│ │ (peer direct)
413
- │ ◁── FIXUP_CREATED ─────│ │
414
- │ │ │
415
- │ ── CONVERGENCE_CHECK ──▷│ │ (peer direct)
416
- │ │ │
417
- │ │── GREEN_SNAPSHOT ──▷ (health topic)
418
- │ ◁── GREEN_SNAPSHOT ─────│ (planner subscribes to health.METRIC_SNAPSHOT)
419
- ```
420
-
421
- Key observations:
422
- - Grinders emit WORKER_DONE to the `work_coordination` topic — both planner and judge receive it
423
- - Judge sends FIXUP_CREATED directly to planner via role addressing (peer connection)
424
- - Planner sends CONVERGENCE_CHECK directly to judge (peer connection)
425
- - Status flows upstream automatically (grinder → planner via subtree subscription)
426
- - Judge receives TASK_FAILED from `task_updates` topic but ignores TASK_CREATED
427
-
428
- ---
429
-
430
- ## Role Definitions
431
-
432
- Roles in a team template extend macro-agent's `RoleDefinition`. The generic fields are portable; macro-agent specifics live under `macro_agent:`.
433
-
434
- ```yaml
435
- # roles/planner.yaml
436
- name: planner
437
- extends: coordinator
438
- display_name: "Planner"
439
- description: "Continuously explores codebase and creates tasks"
440
-
441
- # Capability composition (generic)
442
- capabilities:
443
- add:
444
- - task.create
445
- - task.update
446
- - task.close
447
- - task.claim
448
- remove:
449
- - agent.spawn.integrator
450
- - agent.spawn.monitor
451
-
452
- # Prompt (static file, no template rendering)
453
- prompt: prompts/planner.md
454
-
455
- # macro-agent specific enforcement
456
- macro_agent:
457
- workspace:
458
- type: own
459
- branch_pattern: "planner/{agent-id}"
460
- cleanup_on_terminate: true
461
- lifecycle:
462
- type: daemon
463
- cascade_terminate: true
464
- self_cleanup: true
465
- ```
466
-
467
- ### Capability Composition
468
-
469
- Roles can compose capabilities in two ways:
470
-
471
- **1. Full replacement**:
472
- ```yaml
473
- capabilities:
474
- - file.read
475
- - file.write
476
- - task.create
477
- - lifecycle.done
478
- ```
479
-
480
- **2. Additive/subtractive** (relative to parent via `extends`):
481
- ```yaml
482
- extends: worker
483
- capabilities:
484
- add:
485
- - task.claim
486
- - git.push
487
- remove:
488
- - agent.spawn.worker
489
- ```
490
-
491
- The final capability set is: `(parent_capabilities + added) - removed`
492
-
493
- ---
494
-
495
- ## Prompts
496
-
497
- Prompts are **static markdown files** in `prompts/`. No template rendering — they are included as-is in the system prompt.
498
-
499
- The system prompt assembler combines prompts from multiple sources:
500
-
501
- ```
502
- 1. Base sections (identity, agent ID, task, lineage) ← system-prompt.ts (always)
503
- 2. Role prompt (prompts/<role>.md) ← team template (if provided)
504
- OR role.systemPrompt field ← role definition fallback
505
- OR generated role guidance ← system-prompt.ts default
506
- 3. Interaction pattern guidance ← derived from macro_agent config
507
- 4. Tool listing ← filtered by capabilities
508
- 5. Communication guidelines ← system-prompt.ts (always)
509
- ```
510
-
511
- The role prompt file is the only part the team template author writes. It's static and self-contained — it describes what the role does, how it should think, what conventions to follow. The system injects the dynamic context (agent ID, task, available tools, interaction mode) around it.
512
-
513
- ### Interaction Pattern Injection
514
-
515
- When `macro_agent.task_assignment.mode: pull` is set, the assembler injects a small operational section after the role prompt:
516
-
517
- ```
518
- ## Task Claiming
519
-
520
- You operate in PULL mode. After completing a task:
521
- 1. Call done() with your results
522
- 2. Call claim_task() to get your next task
523
- 3. If no tasks available, wait briefly and retry
524
- 4. After extended idle, call done() to exit gracefully
525
-
526
- Claim and execute independently — do not wait for instructions.
527
- ```
528
-
529
- Similarly for trunk integration, session continuations, etc. These injected sections are small and operational. They don't overlap with the role prompt (which is about domain expertise and strategy).
530
-
531
- ---
532
-
533
- ## Tools and MCP Servers
534
-
535
- For tools beyond macro-agent's built-in MCP tools, the team template can declare additional MCP servers to mount per role. This uses Claude Code's native MCP server configuration format.
536
-
537
- ```json
538
- // tools/mcp-servers.json
539
- {
540
- "planner": {
541
- "servers": [
542
- {
543
- "name": "project-knowledge",
544
- "command": "npx",
545
- "args": ["@org/project-knowledge-mcp"],
546
- "env": {
547
- "PROJECT_ROOT": "${MACRO_AGENT_CWD}"
548
- }
549
- }
550
- ]
551
- },
552
- "judge": {
553
- "servers": [
554
- {
555
- "name": "ci-status",
556
- "command": "npx",
557
- "args": ["@org/ci-status-mcp"],
558
- "env": {
559
- "CI_TOKEN": "${CI_TOKEN}"
560
- }
561
- }
562
- ]
563
- }
564
- }
565
- ```
566
-
567
- This is already supported by `AgentSpawnConfig.config.mcpServers` — the TeamRuntime just passes these through when spawning agents of that role.
568
-
569
- Future iterations may support Claude Code's native skill/slash-command system for defining reusable tool+prompt bundles per role. For now, additional capabilities are expressed as MCP servers.
570
-
571
- ---
572
-
573
- ## Team Loading and Runtime
574
-
575
- ### TeamLoader
576
-
577
- Reads and validates the template directory:
578
-
579
- ```
580
- TeamLoader.load(teamName, basePath?)
581
- 1. Resolve: .multiagent/teams/<teamName>/
582
- 2. Parse team.yaml, validate schema
583
- 3. For each role in manifest:
584
- a. Load roles/<role>.yaml if present
585
- b. Resolve extends chain against RoleRegistry
586
- c. Compute final capabilities (parent + add - remove)
587
- d. Validate enforcement sections
588
- 4. Load prompt files from prompts/
589
- 5. Load tools/mcp-servers.json if present
590
- 6. Return TeamManifest (fully resolved)
591
- ```
592
-
593
- ### TeamRuntime
594
-
595
- Wires the loaded template into the running system:
596
-
597
- ```
598
- TeamRuntime.initialize(manifest, services)
599
- 1. Register roles into RoleRegistry (team layer)
600
- 2. Set up communication topology:
601
- a. Register named channels as topics
602
- b. Configure per-role subscription templates
603
- (applied when agents of that role are spawned)
604
- c. Set up peer routing rules
605
- d. Configure enforcement level
606
- 3. Compose system prompts:
607
- a. Load static prompt files
608
- b. Prepare interaction pattern injection sections
609
- 4. Select IntegrationStrategy from registry
610
- 5. Configure TaskBackend mode (push/pull)
611
- 6. Store active team state for context propagation
612
- ```
613
-
614
- ### Agent Spawn with Team Context
615
-
616
- When an agent is spawned within a team, the TeamRuntime intercepts the spawn and applies team configuration:
617
-
618
- ```
619
- TeamRuntime.onAgentSpawn(role, spawnOptions)
620
- 1. Look up role in team manifest
621
- 2. Apply communication topology:
622
- a. Add topic subscriptions from manifest channels
623
- b. Register peer routes (if this role has peer connections)
624
- c. Subscribe to role channel (for role-addressed messages)
625
- 3. Assemble system prompt:
626
- a. Base sections (identity, task)
627
- b. Role prompt file (static)
628
- c. Interaction pattern sections (auto-injected)
629
- d. Tool listing (capability-filtered)
630
- e. Communication guidelines
631
- 4. Add MCP servers from tools/mcp-servers.json (if any for this role)
632
- 5. Set team environment variables:
633
- MACRO_TEAM_NAME, MACRO_INTEGRATION_STRATEGY, MACRO_TASK_MODE
634
- 6. Return enriched spawn options
635
- ```
636
-
637
- ### Team Bootstrap
638
-
639
- After initialization, spawns the starting agents:
640
-
641
- ```
642
- TeamRuntime.bootstrap()
643
- 1. Spawn root agent per topology.root
644
- 2. Spawn each companion per topology.companions
645
- 3. Emit TEAM_STARTED event
646
- 4. If scaling.min_workers > 0:
647
- Spawn initial worker pool
648
- ```
649
-
650
- ---
651
-
652
- ## Example: Self-Driving Team
653
-
654
- ### roles/planner.yaml
655
-
656
- ```yaml
657
- name: planner
658
- extends: coordinator
659
- display_name: "Planner"
660
- description: "Continuously explores the codebase, creates and prioritizes tasks"
661
-
662
- capabilities:
663
- add: [task.claim]
664
- remove: [agent.spawn.integrator, agent.spawn.monitor]
665
-
666
- prompt: prompts/planner.md
667
-
668
- macro_agent:
669
- lifecycle:
670
- type: daemon
671
- cascade_terminate: true
672
- ```
673
-
674
- ### roles/grinder.yaml
675
-
676
- ```yaml
677
- name: grinder
678
- extends: worker
679
- display_name: "Grinder"
680
- description: "Claims and executes tasks autonomously"
681
-
682
- capabilities:
683
- add: [task.claim, git.push]
684
-
685
- prompt: prompts/grinder.md
686
-
687
- macro_agent:
688
- lifecycle:
689
- type: ephemeral
690
- task_bound: false
691
- max_duration_ms: 3600000
692
- self_cleanup: true
693
- ```
694
-
695
- ### roles/judge.yaml
696
-
697
- ```yaml
698
- name: judge
699
- extends: monitor
700
- display_name: "Judge"
701
- description: "Periodically evaluates codebase health and creates fixup tasks"
702
-
703
- capabilities:
704
- add: [exec.build, exec.test, exec.lint, task.create, task.update, git.branch.create, git.push]
705
-
706
- prompt: prompts/judge.md
707
-
708
- macro_agent:
709
- workspace:
710
- type: own
711
- branch_pattern: "judge/{agent-id}"
712
- cleanup_on_terminate: true
713
- lifecycle:
714
- type: event-driven
715
- parent_bound: false
716
- ```
717
-
718
- ### prompts/planner.md
719
-
720
- ```markdown
721
- # Planner
722
-
723
- You are the Planner. Your job is to continuously explore the codebase,
724
- understand the current state, and create well-defined tasks for workers.
725
-
726
- ## How You Work
727
-
728
- 1. **Explore**: Read the codebase to understand architecture, patterns, and gaps
729
- 2. **Plan**: Break the objective into independent, parallelizable tasks
730
- 3. **Create**: Use create_task to add tasks to the pool with clear descriptions and tags
731
- 4. **Monitor**: Watch for completed/failed tasks and adjust the plan
732
- 5. **Repeat**: Planning is continuous — as work completes, create the next batch
733
-
734
- ## Planning Guidelines
735
-
736
- - Each task should be completable in 5-30 minutes by a single worker
737
- - Tag tasks with subsystem and type for filtered claiming
738
- - Set dependencies (blockers) when ordering matters
739
- - Prefer many small tasks over few large ones — parallelism is the goal
740
- - Include enough context for a worker to start without re-exploring
741
-
742
- ## Constraints
743
-
744
- - Do NOT instruct on things the model already knows (coding, testing, etc.)
745
- - DO specify things specific to this codebase (conventions, build system, deploy pipeline)
746
- - Constraints are more effective than instructions: "No TODOs, no partial implementations"
747
-
748
- ## Sub-Planners
749
-
750
- For large subsystems (>10 tasks), spawn a sub-planner:
751
- - spawn_agent({ role: "planner", task: "Plan the [subsystem] changes" })
752
- - Sub-planners create tasks in the shared pool
753
- - You maintain the high-level view
754
- ```
755
-
756
- ### prompts/judge.md
757
-
758
- ```markdown
759
- # Judge
760
-
761
- You periodically evaluate the health of the codebase and take corrective action.
762
-
763
- ## Evaluation Cycle
764
-
765
- Every time you activate:
766
- 1. Run the build — check compilation
767
- 2. Run the test suite — check correctness
768
- 3. Run the linter — check code quality
769
- 4. If all pass: snapshot to green branch, emit GREEN_SNAPSHOT
770
- 5. If any fail: create fixup tasks with tag "fixup" and priority "critical"
771
-
772
- ## Green Branch
773
-
774
- Maintain a clean snapshot at `green/latest`:
775
- - Only update when build + tests + lint all pass
776
- - This is the team's release candidate at any point in time
777
- - Workers may be on a broken trunk — that's expected
778
-
779
- ## Creating Fixup Tasks
780
-
781
- When you find failures:
782
- - Create one task per distinct issue (don't bundle)
783
- - Include the exact error output in the task description
784
- - Tag with: ["fixup", "<subsystem>"]
785
- - Set priority: critical
786
- - Reference the failing file and test
787
- ```
788
-
789
- ---
790
-
791
- ## Example: Structured Team (Backward Compatibility)
792
-
793
- The existing coordinator/integrator/worker pattern expressed as a team template:
794
-
795
- ```yaml
796
- name: structured
797
- description: "Traditional structured development"
798
- version: 1
799
-
800
- roles:
801
- - coordinator
802
- - integrator
803
- - worker
804
- - monitor
805
-
806
- topology:
807
- root:
808
- role: coordinator
809
- spawn_rules:
810
- coordinator: [worker, integrator, monitor]
811
- integrator: [worker]
812
- worker: []
813
- monitor: []
814
-
815
- communication:
816
- channels:
817
- work:
818
- signals: [WORK_ASSIGNED, WORKER_DONE, MERGE_REQUEST, MERGE_COMPLETE]
819
- health:
820
- signals: [HEALTH_CHECK, STALE_AGENT]
821
- subscriptions:
822
- coordinator:
823
- - channel: work
824
- - channel: health
825
- integrator:
826
- - channel: work
827
- signals: [MERGE_REQUEST, WORKER_DONE]
828
- worker:
829
- - channel: work
830
- signals: [WORK_ASSIGNED]
831
- monitor:
832
- - channel: health
833
-
834
- macro_agent:
835
- task_assignment:
836
- mode: push
837
- integration:
838
- strategy: queue
839
- lifecycle:
840
- continuations:
841
- enabled: false
842
- scaling:
843
- scale_on: manual
844
- ```
845
-
846
- No custom roles, no custom prompts — just built-in roles wired together. This demonstrates that team templates are a superset of the existing behavior.
847
-
848
- ---
849
-
850
- ## Open Questions
851
-
852
- 1. **Channel-level vs signal-level subscription granularity** — Is subscribing to a channel with signal filters the right granularity? Or should every signal be an independent topic? Channel grouping is cleaner for authoring but requires filtering at receive time. Signal-per-topic is cleaner at the routing layer but verbose in the manifest.
853
-
854
- 2. **Enforcement of emissions** — Should emission enforcement be at the routing layer (block the emit) or the audit layer (log but allow)? Strict enforcement could break agents that need to emit undeclared signals during error handling. Starting with `permissive` default and letting teams opt into `strict` seems right.
855
-
856
- 3. **Peer discovery for companions** — Companions are spawned as peers (no parent-child relationship). How do they discover each other? Options: (a) both subscribe to a shared team scope, (b) the bootstrap process shares agent IDs via environment variables, (c) role-based addressing (`{ role: "judge" }`) resolves to companion agents. Option (c) is cleanest — it's already supported by the router.
857
-
858
- 4. **Cross-team communication** — If multiple teams run simultaneously (e.g., a "frontend" team and a "backend" team), can they communicate? This maps to MAP's federated addressing but needs team-scoped routing rules. Deferred — single-team focus for now.
859
-
860
- 5. **Skill system evolution** — The current design uses static prompts + MCP servers for tool configuration. A future iteration could adopt Claude Code's native skill system (slash commands, tool bundles) for more structured reusable behaviors. The prompt file slot in role definitions is designed to be replaceable by a richer skill reference.