claude-code-swarm 0.3.7 → 0.3.8

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 (1357) hide show
  1. package/.claude/settings.json +1 -0
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/CLAUDE.md +44 -1
  5. package/package.json +4 -1
  6. package/scripts/bootstrap-bg.mjs +31 -0
  7. package/scripts/bootstrap.mjs +30 -4
  8. package/scripts/dev-link.mjs +179 -0
  9. package/scripts/map-hook.mjs +30 -44
  10. package/scripts/map-sidecar.mjs +156 -27
  11. package/src/__tests__/bootstrap.test.mjs +227 -237
  12. package/src/__tests__/config.test.mjs +275 -1
  13. package/src/__tests__/e2e-reconnection.test.mjs +537 -0
  14. package/src/__tests__/helpers.mjs +6 -0
  15. package/src/__tests__/index.test.mjs +4 -0
  16. package/src/__tests__/log.test.mjs +510 -0
  17. package/src/__tests__/map-connection.test.mjs +7 -0
  18. package/src/__tests__/paths.test.mjs +1 -1
  19. package/src/bootstrap.mjs +129 -94
  20. package/src/config.mjs +36 -9
  21. package/src/index.mjs +4 -0
  22. package/src/log.mjs +152 -0
  23. package/src/map-connection.mjs +40 -9
  24. package/src/mesh-connection.mjs +8 -12
  25. package/src/opentasks-client.mjs +5 -2
  26. package/src/paths.mjs +11 -8
  27. package/src/roles.mjs +4 -3
  28. package/src/sessionlog.mjs +38 -2
  29. package/src/sidecar-client.mjs +13 -2
  30. package/src/sidecar-server.mjs +16 -26
  31. package/src/skilltree-client.mjs +4 -1
  32. package/src/swarmkit-resolver.mjs +17 -1
  33. package/src/template.mjs +4 -1
  34. package/vitest.config.mjs +4 -0
  35. package/references/agent-inbox/CLAUDE.md +0 -151
  36. package/references/agent-inbox/README.md +0 -238
  37. package/references/agent-inbox/docs/CLAUDE-CODE-SWARM-PROPOSAL.md +0 -137
  38. package/references/agent-inbox/docs/DESIGN.md +0 -1156
  39. package/references/agent-inbox/hooks/inbox-hook.mjs +0 -119
  40. package/references/agent-inbox/hooks/register-hook.mjs +0 -69
  41. package/references/agent-inbox/package-lock.json +0 -3347
  42. package/references/agent-inbox/package.json +0 -58
  43. package/references/agent-inbox/rules/agent-inbox.md +0 -78
  44. package/references/agent-inbox/src/federation/address.ts +0 -61
  45. package/references/agent-inbox/src/federation/connection-manager.ts +0 -573
  46. package/references/agent-inbox/src/federation/delivery-queue.ts +0 -222
  47. package/references/agent-inbox/src/federation/index.ts +0 -6
  48. package/references/agent-inbox/src/federation/routing-engine.ts +0 -188
  49. package/references/agent-inbox/src/federation/trust.ts +0 -71
  50. package/references/agent-inbox/src/index.ts +0 -404
  51. package/references/agent-inbox/src/ipc/ipc-server.ts +0 -265
  52. package/references/agent-inbox/src/jsonrpc/mail-server.ts +0 -382
  53. package/references/agent-inbox/src/map/map-client.ts +0 -414
  54. package/references/agent-inbox/src/mcp/mcp-proxy.ts +0 -326
  55. package/references/agent-inbox/src/mcp/mcp-server.ts +0 -272
  56. package/references/agent-inbox/src/mesh/delivery-bridge.ts +0 -110
  57. package/references/agent-inbox/src/mesh/mesh-connector.ts +0 -41
  58. package/references/agent-inbox/src/mesh/mesh-transport.ts +0 -157
  59. package/references/agent-inbox/src/mesh/type-mapper.ts +0 -239
  60. package/references/agent-inbox/src/push/notifier.ts +0 -233
  61. package/references/agent-inbox/src/registry/warm-registry.ts +0 -255
  62. package/references/agent-inbox/src/router/message-router.ts +0 -175
  63. package/references/agent-inbox/src/storage/interface.ts +0 -48
  64. package/references/agent-inbox/src/storage/memory.ts +0 -145
  65. package/references/agent-inbox/src/storage/sqlite.ts +0 -671
  66. package/references/agent-inbox/src/traceability/traceability.ts +0 -183
  67. package/references/agent-inbox/src/types.ts +0 -329
  68. package/references/agent-inbox/test/federation/address.test.ts +0 -101
  69. package/references/agent-inbox/test/federation/connection-manager.test.ts +0 -546
  70. package/references/agent-inbox/test/federation/delivery-queue.test.ts +0 -159
  71. package/references/agent-inbox/test/federation/integration.test.ts +0 -857
  72. package/references/agent-inbox/test/federation/routing-engine.test.ts +0 -117
  73. package/references/agent-inbox/test/federation/sdk-integration.test.ts +0 -744
  74. package/references/agent-inbox/test/federation/trust.test.ts +0 -89
  75. package/references/agent-inbox/test/ipc-jsonrpc.test.ts +0 -113
  76. package/references/agent-inbox/test/ipc-new-commands.test.ts +0 -200
  77. package/references/agent-inbox/test/ipc-server.test.ts +0 -197
  78. package/references/agent-inbox/test/mail-server.test.ts +0 -285
  79. package/references/agent-inbox/test/map-client.test.ts +0 -408
  80. package/references/agent-inbox/test/mcp-proxy.test.ts +0 -191
  81. package/references/agent-inbox/test/mesh/delivery-bridge.test.ts +0 -178
  82. package/references/agent-inbox/test/mesh/e2e-mesh.test.ts +0 -527
  83. package/references/agent-inbox/test/mesh/e2e-real-meshpeer.test.ts +0 -629
  84. package/references/agent-inbox/test/mesh/federation-mesh.test.ts +0 -269
  85. package/references/agent-inbox/test/mesh/mesh-connector.test.ts +0 -66
  86. package/references/agent-inbox/test/mesh/mesh-transport.test.ts +0 -191
  87. package/references/agent-inbox/test/mesh/meshpeer-integration.test.ts +0 -442
  88. package/references/agent-inbox/test/mesh/mock-mesh.ts +0 -125
  89. package/references/agent-inbox/test/mesh/mock-meshpeer.ts +0 -266
  90. package/references/agent-inbox/test/mesh/type-mapper.test.ts +0 -226
  91. package/references/agent-inbox/test/message-router.test.ts +0 -184
  92. package/references/agent-inbox/test/push-notifier.test.ts +0 -139
  93. package/references/agent-inbox/test/registry/warm-registry.test.ts +0 -171
  94. package/references/agent-inbox/test/sqlite-prefix.test.ts +0 -192
  95. package/references/agent-inbox/test/sqlite-storage.test.ts +0 -243
  96. package/references/agent-inbox/test/storage.test.ts +0 -196
  97. package/references/agent-inbox/test/traceability.test.ts +0 -123
  98. package/references/agent-inbox/test/wake.test.ts +0 -330
  99. package/references/agent-inbox/tsconfig.json +0 -20
  100. package/references/agent-inbox/tsup.config.ts +0 -10
  101. package/references/agent-inbox/vitest.config.ts +0 -8
  102. package/references/minimem/.claude/settings.json +0 -7
  103. package/references/minimem/.sudocode/issues.jsonl +0 -18
  104. package/references/minimem/.sudocode/specs.jsonl +0 -1
  105. package/references/minimem/CLAUDE.md +0 -329
  106. package/references/minimem/README.md +0 -565
  107. package/references/minimem/claude-plugin/.claude-plugin/plugin.json +0 -10
  108. package/references/minimem/claude-plugin/.mcp.json +0 -7
  109. package/references/minimem/claude-plugin/README.md +0 -158
  110. package/references/minimem/claude-plugin/commands/recall.md +0 -47
  111. package/references/minimem/claude-plugin/commands/remember.md +0 -41
  112. package/references/minimem/claude-plugin/hooks/__tests__/hooks.test.ts +0 -272
  113. package/references/minimem/claude-plugin/hooks/hooks.json +0 -27
  114. package/references/minimem/claude-plugin/hooks/session-end.sh +0 -86
  115. package/references/minimem/claude-plugin/hooks/session-start.sh +0 -85
  116. package/references/minimem/claude-plugin/skills/memory/SKILL.md +0 -108
  117. package/references/minimem/media/banner.png +0 -0
  118. package/references/minimem/package-lock.json +0 -5373
  119. package/references/minimem/package.json +0 -76
  120. package/references/minimem/scripts/postbuild.js +0 -49
  121. package/references/minimem/src/__tests__/edge-cases.test.ts +0 -371
  122. package/references/minimem/src/__tests__/errors.test.ts +0 -265
  123. package/references/minimem/src/__tests__/helpers.ts +0 -199
  124. package/references/minimem/src/__tests__/internal.test.ts +0 -407
  125. package/references/minimem/src/__tests__/knowledge-frontmatter.test.ts +0 -148
  126. package/references/minimem/src/__tests__/knowledge.test.ts +0 -148
  127. package/references/minimem/src/__tests__/minimem.integration.test.ts +0 -1127
  128. package/references/minimem/src/__tests__/session.test.ts +0 -190
  129. package/references/minimem/src/cli/__tests__/commands.test.ts +0 -760
  130. package/references/minimem/src/cli/__tests__/contained-layout.test.ts +0 -286
  131. package/references/minimem/src/cli/commands/__tests__/conflicts.test.ts +0 -141
  132. package/references/minimem/src/cli/commands/append.ts +0 -76
  133. package/references/minimem/src/cli/commands/config.ts +0 -262
  134. package/references/minimem/src/cli/commands/conflicts.ts +0 -415
  135. package/references/minimem/src/cli/commands/daemon.ts +0 -169
  136. package/references/minimem/src/cli/commands/index.ts +0 -12
  137. package/references/minimem/src/cli/commands/init.ts +0 -166
  138. package/references/minimem/src/cli/commands/mcp.ts +0 -221
  139. package/references/minimem/src/cli/commands/push-pull.ts +0 -213
  140. package/references/minimem/src/cli/commands/search.ts +0 -223
  141. package/references/minimem/src/cli/commands/status.ts +0 -84
  142. package/references/minimem/src/cli/commands/store.ts +0 -189
  143. package/references/minimem/src/cli/commands/sync-init.ts +0 -290
  144. package/references/minimem/src/cli/commands/sync.ts +0 -70
  145. package/references/minimem/src/cli/commands/upsert.ts +0 -197
  146. package/references/minimem/src/cli/config.ts +0 -611
  147. package/references/minimem/src/cli/index.ts +0 -299
  148. package/references/minimem/src/cli/shared.ts +0 -189
  149. package/references/minimem/src/cli/sync/__tests__/central.test.ts +0 -152
  150. package/references/minimem/src/cli/sync/__tests__/conflicts.test.ts +0 -209
  151. package/references/minimem/src/cli/sync/__tests__/daemon.test.ts +0 -118
  152. package/references/minimem/src/cli/sync/__tests__/detection.test.ts +0 -207
  153. package/references/minimem/src/cli/sync/__tests__/integration.test.ts +0 -476
  154. package/references/minimem/src/cli/sync/__tests__/registry.test.ts +0 -363
  155. package/references/minimem/src/cli/sync/__tests__/state.test.ts +0 -255
  156. package/references/minimem/src/cli/sync/__tests__/validation.test.ts +0 -193
  157. package/references/minimem/src/cli/sync/__tests__/watcher.test.ts +0 -178
  158. package/references/minimem/src/cli/sync/central.ts +0 -292
  159. package/references/minimem/src/cli/sync/conflicts.ts +0 -205
  160. package/references/minimem/src/cli/sync/daemon.ts +0 -407
  161. package/references/minimem/src/cli/sync/detection.ts +0 -138
  162. package/references/minimem/src/cli/sync/index.ts +0 -107
  163. package/references/minimem/src/cli/sync/operations.ts +0 -373
  164. package/references/minimem/src/cli/sync/registry.ts +0 -279
  165. package/references/minimem/src/cli/sync/state.ts +0 -358
  166. package/references/minimem/src/cli/sync/validation.ts +0 -206
  167. package/references/minimem/src/cli/sync/watcher.ts +0 -237
  168. package/references/minimem/src/cli/version.ts +0 -34
  169. package/references/minimem/src/core/index.ts +0 -9
  170. package/references/minimem/src/core/indexer.ts +0 -628
  171. package/references/minimem/src/core/searcher.ts +0 -221
  172. package/references/minimem/src/db/schema.ts +0 -183
  173. package/references/minimem/src/db/sqlite-vec.ts +0 -24
  174. package/references/minimem/src/embeddings/__tests__/embeddings.test.ts +0 -431
  175. package/references/minimem/src/embeddings/batch-gemini.ts +0 -392
  176. package/references/minimem/src/embeddings/batch-openai.ts +0 -409
  177. package/references/minimem/src/embeddings/embeddings.ts +0 -434
  178. package/references/minimem/src/index.ts +0 -132
  179. package/references/minimem/src/internal.ts +0 -299
  180. package/references/minimem/src/minimem.ts +0 -1291
  181. package/references/minimem/src/search/__tests__/hybrid.test.ts +0 -247
  182. package/references/minimem/src/search/graph.ts +0 -234
  183. package/references/minimem/src/search/hybrid.ts +0 -151
  184. package/references/minimem/src/search/search.ts +0 -256
  185. package/references/minimem/src/server/__tests__/mcp.test.ts +0 -347
  186. package/references/minimem/src/server/__tests__/tools.test.ts +0 -364
  187. package/references/minimem/src/server/mcp.ts +0 -326
  188. package/references/minimem/src/server/tools.ts +0 -720
  189. package/references/minimem/src/session.ts +0 -460
  190. package/references/minimem/src/store/__tests__/manifest.test.ts +0 -177
  191. package/references/minimem/src/store/__tests__/materialize.test.ts +0 -52
  192. package/references/minimem/src/store/__tests__/store-graph.test.ts +0 -228
  193. package/references/minimem/src/store/index.ts +0 -27
  194. package/references/minimem/src/store/manifest.ts +0 -203
  195. package/references/minimem/src/store/materialize.ts +0 -185
  196. package/references/minimem/src/store/store-graph.ts +0 -252
  197. package/references/minimem/tsconfig.json +0 -19
  198. package/references/minimem/tsup.config.ts +0 -26
  199. package/references/minimem/vitest.config.ts +0 -29
  200. package/references/multi-agent-protocol/.sudocode/issues.jsonl +0 -120
  201. package/references/multi-agent-protocol/.sudocode/specs.jsonl +0 -15
  202. package/references/multi-agent-protocol/LICENSE +0 -21
  203. package/references/multi-agent-protocol/README.md +0 -113
  204. package/references/multi-agent-protocol/docs/00-design-specification.md +0 -496
  205. package/references/multi-agent-protocol/docs/01-open-questions.md +0 -1050
  206. package/references/multi-agent-protocol/docs/02-wire-protocol.md +0 -296
  207. package/references/multi-agent-protocol/docs/03-streaming-semantics.md +0 -252
  208. package/references/multi-agent-protocol/docs/04-error-handling.md +0 -231
  209. package/references/multi-agent-protocol/docs/05-connection-model.md +0 -244
  210. package/references/multi-agent-protocol/docs/06-visibility-permissions.md +0 -243
  211. package/references/multi-agent-protocol/docs/07-federation.md +0 -335
  212. package/references/multi-agent-protocol/docs/08-macro-agent-migration.md +0 -253
  213. package/references/multi-agent-protocol/docs/09-authentication.md +0 -748
  214. package/references/multi-agent-protocol/docs/10-environment-awareness.md +0 -242
  215. package/references/multi-agent-protocol/docs/10-mail-protocol.md +0 -553
  216. package/references/multi-agent-protocol/docs/11-anp-inspired-improvements.md +0 -1079
  217. package/references/multi-agent-protocol/docs/11-trajectory-protocol.md +0 -292
  218. package/references/multi-agent-protocol/docs/12-anp-implementation-plan.md +0 -641
  219. package/references/multi-agent-protocol/docs/agent-iam-integration.md +0 -877
  220. package/references/multi-agent-protocol/docs/agentic-mesh-integration-draft.md +0 -459
  221. package/references/multi-agent-protocol/docs/git-transport-draft.md +0 -251
  222. package/references/multi-agent-protocol/docs-site/Gemfile +0 -22
  223. package/references/multi-agent-protocol/docs-site/README.md +0 -82
  224. package/references/multi-agent-protocol/docs-site/_config.yml +0 -91
  225. package/references/multi-agent-protocol/docs-site/_includes/head_custom.html +0 -20
  226. package/references/multi-agent-protocol/docs-site/_sass/color_schemes/map.scss +0 -42
  227. package/references/multi-agent-protocol/docs-site/_sass/custom/custom.scss +0 -34
  228. package/references/multi-agent-protocol/docs-site/examples/full-integration.md +0 -510
  229. package/references/multi-agent-protocol/docs-site/examples/index.md +0 -138
  230. package/references/multi-agent-protocol/docs-site/examples/simple-chat.md +0 -282
  231. package/references/multi-agent-protocol/docs-site/examples/task-queue.md +0 -399
  232. package/references/multi-agent-protocol/docs-site/getting-started/index.md +0 -98
  233. package/references/multi-agent-protocol/docs-site/getting-started/installation.md +0 -219
  234. package/references/multi-agent-protocol/docs-site/getting-started/overview.md +0 -172
  235. package/references/multi-agent-protocol/docs-site/getting-started/quickstart.md +0 -237
  236. package/references/multi-agent-protocol/docs-site/index.md +0 -136
  237. package/references/multi-agent-protocol/docs-site/protocol/authentication.md +0 -391
  238. package/references/multi-agent-protocol/docs-site/protocol/connection-model.md +0 -376
  239. package/references/multi-agent-protocol/docs-site/protocol/design.md +0 -284
  240. package/references/multi-agent-protocol/docs-site/protocol/error-handling.md +0 -312
  241. package/references/multi-agent-protocol/docs-site/protocol/federation.md +0 -449
  242. package/references/multi-agent-protocol/docs-site/protocol/index.md +0 -129
  243. package/references/multi-agent-protocol/docs-site/protocol/permissions.md +0 -398
  244. package/references/multi-agent-protocol/docs-site/protocol/streaming.md +0 -353
  245. package/references/multi-agent-protocol/docs-site/protocol/wire-protocol.md +0 -369
  246. package/references/multi-agent-protocol/docs-site/sdk/api/agent.md +0 -357
  247. package/references/multi-agent-protocol/docs-site/sdk/api/client.md +0 -380
  248. package/references/multi-agent-protocol/docs-site/sdk/api/index.md +0 -62
  249. package/references/multi-agent-protocol/docs-site/sdk/api/server.md +0 -453
  250. package/references/multi-agent-protocol/docs-site/sdk/api/types.md +0 -468
  251. package/references/multi-agent-protocol/docs-site/sdk/guides/agent.md +0 -375
  252. package/references/multi-agent-protocol/docs-site/sdk/guides/authentication.md +0 -405
  253. package/references/multi-agent-protocol/docs-site/sdk/guides/client.md +0 -352
  254. package/references/multi-agent-protocol/docs-site/sdk/guides/index.md +0 -89
  255. package/references/multi-agent-protocol/docs-site/sdk/guides/server.md +0 -360
  256. package/references/multi-agent-protocol/docs-site/sdk/guides/testing.md +0 -446
  257. package/references/multi-agent-protocol/docs-site/sdk/guides/transports.md +0 -363
  258. package/references/multi-agent-protocol/docs-site/sdk/index.md +0 -206
  259. package/references/multi-agent-protocol/package-lock.json +0 -4230
  260. package/references/multi-agent-protocol/package.json +0 -56
  261. package/references/multi-agent-protocol/schema/meta.json +0 -584
  262. package/references/multi-agent-protocol/schema/schema.json +0 -3067
  263. package/references/openhive/.claude/settings.json +0 -6
  264. package/references/openhive/.dockerignore +0 -54
  265. package/references/openhive/.github/workflows/docker.yml +0 -52
  266. package/references/openhive/.sudocode/issues.jsonl +0 -24
  267. package/references/openhive/.sudocode/specs.jsonl +0 -4
  268. package/references/openhive/CLAUDE.md +0 -88
  269. package/references/openhive/Dockerfile +0 -105
  270. package/references/openhive/README.md +0 -745
  271. package/references/openhive/bin/openhive.js +0 -6
  272. package/references/openhive/cloudbuild.yaml +0 -80
  273. package/references/openhive/deploy/cloud-run.sh +0 -106
  274. package/references/openhive/deploy/openhive.env.example +0 -80
  275. package/references/openhive/deploy/openhive.service +0 -91
  276. package/references/openhive/docker-compose.yml +0 -67
  277. package/references/openhive/docker-entrypoint.sh +0 -117
  278. package/references/openhive/docs/API_MIGRATION.md +0 -176
  279. package/references/openhive/docs/DEPLOYMENT.md +0 -847
  280. package/references/openhive/docs/DESIGN_v1.md +0 -489
  281. package/references/openhive/docs/DESIGN_v2.md +0 -564
  282. package/references/openhive/docs/HEADSCALE_HOSTING_SPEC.md +0 -513
  283. package/references/openhive/docs/HIVE_SYNC_DESIGN.md +0 -2362
  284. package/references/openhive/docs/HIVE_SYNC_IMPLEMENTATION_PLAN.md +0 -1169
  285. package/references/openhive/docs/HOSTING.md +0 -601
  286. package/references/openhive/docs/IMPLEMENTATION_PLAN.md +0 -428
  287. package/references/openhive/docs/LOCAL_SETUP.md +0 -506
  288. package/references/openhive/docs/MACRO_AGENT_ATLAS_EXTENSION.md +0 -351
  289. package/references/openhive/docs/MEMORY_BANK_SYNC_SPEC.md +0 -909
  290. package/references/openhive/docs/PLAN_v1.md +0 -471
  291. package/references/openhive/docs/PLAN_v2.md +0 -623
  292. package/references/openhive/docs/WEBSOCKET.md +0 -267
  293. package/references/openhive/docs/openswarm-bootstrap-token-spec.md +0 -240
  294. package/references/openhive/ecosystem.config.cjs +0 -76
  295. package/references/openhive/fly.toml +0 -63
  296. package/references/openhive/package-lock.json +0 -17640
  297. package/references/openhive/package.json +0 -128
  298. package/references/openhive/packages/openhive-types/package-lock.json +0 -1473
  299. package/references/openhive/packages/openhive-types/package.json +0 -42
  300. package/references/openhive/packages/openhive-types/src/index.ts +0 -36
  301. package/references/openhive/packages/openhive-types/src/map-coordination.ts +0 -92
  302. package/references/openhive/packages/openhive-types/src/map-session-sync.ts +0 -50
  303. package/references/openhive/packages/openhive-types/src/map-sync.ts +0 -68
  304. package/references/openhive/packages/openhive-types/tsconfig.json +0 -15
  305. package/references/openhive/packages/openhive-types/tsconfig.tsbuildinfo +0 -1
  306. package/references/openhive/packages/openhive-types/tsup.config.ts +0 -12
  307. package/references/openhive/railway.json +0 -13
  308. package/references/openhive/railway.toml +0 -24
  309. package/references/openhive/render.yaml +0 -51
  310. package/references/openhive/src/__tests__/auth.test.ts +0 -148
  311. package/references/openhive/src/__tests__/bridge/credentials.test.ts +0 -65
  312. package/references/openhive/src/__tests__/bridge/dal.test.ts +0 -279
  313. package/references/openhive/src/__tests__/bridge/inbound.test.ts +0 -349
  314. package/references/openhive/src/__tests__/bridge/manager.test.ts +0 -419
  315. package/references/openhive/src/__tests__/bridge/mentions.test.ts +0 -83
  316. package/references/openhive/src/__tests__/bridge/outbound.test.ts +0 -209
  317. package/references/openhive/src/__tests__/bridge/slack-adapter.test.ts +0 -276
  318. package/references/openhive/src/__tests__/cli.test.ts +0 -342
  319. package/references/openhive/src/__tests__/config.test.ts +0 -205
  320. package/references/openhive/src/__tests__/coordination/coordination.test.ts +0 -1072
  321. package/references/openhive/src/__tests__/coordination/cross-instance.test.ts +0 -540
  322. package/references/openhive/src/__tests__/coordination/e2e.test.ts +0 -780
  323. package/references/openhive/src/__tests__/data-dir.test.ts +0 -332
  324. package/references/openhive/src/__tests__/db.test.ts +0 -258
  325. package/references/openhive/src/__tests__/discovery.test.ts +0 -288
  326. package/references/openhive/src/__tests__/events/dal.test.ts +0 -371
  327. package/references/openhive/src/__tests__/events/dispatch.test.ts +0 -202
  328. package/references/openhive/src/__tests__/events/e2e.test.ts +0 -528
  329. package/references/openhive/src/__tests__/events/normalizers.test.ts +0 -263
  330. package/references/openhive/src/__tests__/events/router.test.ts +0 -314
  331. package/references/openhive/src/__tests__/events/routes.test.ts +0 -407
  332. package/references/openhive/src/__tests__/follows.test.ts +0 -328
  333. package/references/openhive/src/__tests__/helpers/test-dirs.ts +0 -44
  334. package/references/openhive/src/__tests__/ingest-keys.test.ts +0 -925
  335. package/references/openhive/src/__tests__/map/sync-client-content.test.ts +0 -288
  336. package/references/openhive/src/__tests__/map/sync-client.test.ts +0 -500
  337. package/references/openhive/src/__tests__/map/sync-listener.test.ts +0 -504
  338. package/references/openhive/src/__tests__/middleware/hostname-guard.test.ts +0 -73
  339. package/references/openhive/src/__tests__/migrations.test.ts +0 -260
  340. package/references/openhive/src/__tests__/opentasks/client.test.ts +0 -497
  341. package/references/openhive/src/__tests__/opentasks/discovery.test.ts +0 -283
  342. package/references/openhive/src/__tests__/opentasks/e2e.test.ts +0 -767
  343. package/references/openhive/src/__tests__/routes/agents.test.ts +0 -417
  344. package/references/openhive/src/__tests__/routes/opentasks-content.test.ts +0 -493
  345. package/references/openhive/src/__tests__/routes/resource-content.test.ts +0 -1741
  346. package/references/openhive/src/__tests__/sessions/adapters.test.ts +0 -524
  347. package/references/openhive/src/__tests__/sessions/routes.test.ts +0 -1053
  348. package/references/openhive/src/__tests__/sessions/storage.test.ts +0 -545
  349. package/references/openhive/src/__tests__/sessions/trajectory-checkpoints.test.ts +0 -349
  350. package/references/openhive/src/__tests__/sessions/trajectory-routes.test.ts +0 -290
  351. package/references/openhive/src/__tests__/swarm/config.test.ts +0 -125
  352. package/references/openhive/src/__tests__/swarm/credentials.test.ts +0 -254
  353. package/references/openhive/src/__tests__/swarm/dal.test.ts +0 -290
  354. package/references/openhive/src/__tests__/swarm/e2e.test.ts +0 -827
  355. package/references/openhive/src/__tests__/swarm/fixtures/exit-immediately.js +0 -3
  356. package/references/openhive/src/__tests__/swarm/fixtures/map-server.js +0 -147
  357. package/references/openhive/src/__tests__/swarm/fixtures/sleep-server.js +0 -52
  358. package/references/openhive/src/__tests__/swarm/local-provider.test.ts +0 -279
  359. package/references/openhive/src/__tests__/swarm/manager.test.ts +0 -305
  360. package/references/openhive/src/__tests__/swarm/routes.test.ts +0 -396
  361. package/references/openhive/src/__tests__/swarm/workspace.test.ts +0 -257
  362. package/references/openhive/src/__tests__/swarmhub/client.test.ts +0 -324
  363. package/references/openhive/src/__tests__/swarmhub/config.test.ts +0 -213
  364. package/references/openhive/src/__tests__/swarmhub/connector.test.ts +0 -581
  365. package/references/openhive/src/__tests__/swarmhub/routes.test.ts +0 -639
  366. package/references/openhive/src/__tests__/swarmhub/slack-client.test.ts +0 -164
  367. package/references/openhive/src/__tests__/swarmhub/slack-connector.test.ts +0 -164
  368. package/references/openhive/src/__tests__/swarmhub/slack-routes.test.ts +0 -373
  369. package/references/openhive/src/__tests__/swarmhub/webhook-handler.test.ts +0 -295
  370. package/references/openhive/src/__tests__/sync/resource-sync.test.ts +0 -1418
  371. package/references/openhive/src/__tests__/sync/sync.test.ts +0 -800
  372. package/references/openhive/src/api/index.ts +0 -65
  373. package/references/openhive/src/api/middleware/auth.ts +0 -227
  374. package/references/openhive/src/api/middleware/hostname-guard.ts +0 -38
  375. package/references/openhive/src/api/routes/admin.ts +0 -366
  376. package/references/openhive/src/api/routes/agents.ts +0 -223
  377. package/references/openhive/src/api/routes/auth.ts +0 -164
  378. package/references/openhive/src/api/routes/bridges.ts +0 -384
  379. package/references/openhive/src/api/routes/comments.ts +0 -294
  380. package/references/openhive/src/api/routes/coordination.ts +0 -312
  381. package/references/openhive/src/api/routes/events.ts +0 -158
  382. package/references/openhive/src/api/routes/federation.ts +0 -367
  383. package/references/openhive/src/api/routes/feed.ts +0 -212
  384. package/references/openhive/src/api/routes/hives.ts +0 -264
  385. package/references/openhive/src/api/routes/map.ts +0 -674
  386. package/references/openhive/src/api/routes/memory-banks.ts +0 -971
  387. package/references/openhive/src/api/routes/posts.ts +0 -342
  388. package/references/openhive/src/api/routes/resource-content.ts +0 -727
  389. package/references/openhive/src/api/routes/resources.ts +0 -1013
  390. package/references/openhive/src/api/routes/search.ts +0 -45
  391. package/references/openhive/src/api/routes/sessions.ts +0 -1187
  392. package/references/openhive/src/api/routes/swarm-hosting.ts +0 -313
  393. package/references/openhive/src/api/routes/sync-protocol.ts +0 -168
  394. package/references/openhive/src/api/routes/sync.ts +0 -279
  395. package/references/openhive/src/api/routes/uploads.ts +0 -174
  396. package/references/openhive/src/api/routes/webhooks.ts +0 -603
  397. package/references/openhive/src/api/schemas/agents.ts +0 -26
  398. package/references/openhive/src/api/schemas/comments.ts +0 -22
  399. package/references/openhive/src/api/schemas/hives.ts +0 -33
  400. package/references/openhive/src/api/schemas/posts.ts +0 -37
  401. package/references/openhive/src/api/schemas/sync.ts +0 -56
  402. package/references/openhive/src/auth/index.ts +0 -2
  403. package/references/openhive/src/auth/jwks.ts +0 -58
  404. package/references/openhive/src/bridge/adapters/slack.ts +0 -306
  405. package/references/openhive/src/bridge/credentials.ts +0 -72
  406. package/references/openhive/src/bridge/inbound.ts +0 -288
  407. package/references/openhive/src/bridge/index.ts +0 -42
  408. package/references/openhive/src/bridge/manager.ts +0 -425
  409. package/references/openhive/src/bridge/mentions.ts +0 -42
  410. package/references/openhive/src/bridge/outbound.ts +0 -103
  411. package/references/openhive/src/bridge/schema.ts +0 -82
  412. package/references/openhive/src/bridge/types.ts +0 -238
  413. package/references/openhive/src/cli/network.ts +0 -480
  414. package/references/openhive/src/cli.ts +0 -620
  415. package/references/openhive/src/config.ts +0 -611
  416. package/references/openhive/src/coordination/index.ts +0 -43
  417. package/references/openhive/src/coordination/listener.ts +0 -92
  418. package/references/openhive/src/coordination/schema.ts +0 -79
  419. package/references/openhive/src/coordination/service.ts +0 -233
  420. package/references/openhive/src/coordination/types.ts +0 -177
  421. package/references/openhive/src/data-dir.ts +0 -105
  422. package/references/openhive/src/db/adapters/index.ts +0 -21
  423. package/references/openhive/src/db/adapters/postgres.ts +0 -310
  424. package/references/openhive/src/db/adapters/sqlite.ts +0 -56
  425. package/references/openhive/src/db/adapters/types.ts +0 -65
  426. package/references/openhive/src/db/dal/agents.ts +0 -430
  427. package/references/openhive/src/db/dal/bridge.ts +0 -336
  428. package/references/openhive/src/db/dal/comments.ts +0 -213
  429. package/references/openhive/src/db/dal/coordination.ts +0 -361
  430. package/references/openhive/src/db/dal/events.ts +0 -381
  431. package/references/openhive/src/db/dal/follows.ts +0 -96
  432. package/references/openhive/src/db/dal/hives.ts +0 -198
  433. package/references/openhive/src/db/dal/ingest-keys.ts +0 -176
  434. package/references/openhive/src/db/dal/instances.ts +0 -196
  435. package/references/openhive/src/db/dal/invites.ts +0 -123
  436. package/references/openhive/src/db/dal/map.ts +0 -750
  437. package/references/openhive/src/db/dal/posts.ts +0 -274
  438. package/references/openhive/src/db/dal/remote-agents.ts +0 -56
  439. package/references/openhive/src/db/dal/search.ts +0 -238
  440. package/references/openhive/src/db/dal/sync-events.ts +0 -160
  441. package/references/openhive/src/db/dal/sync-groups.ts +0 -100
  442. package/references/openhive/src/db/dal/sync-peer-configs.ts +0 -216
  443. package/references/openhive/src/db/dal/sync-peers.ts +0 -145
  444. package/references/openhive/src/db/dal/syncable-resources.ts +0 -888
  445. package/references/openhive/src/db/dal/trajectory-checkpoints.ts +0 -291
  446. package/references/openhive/src/db/dal/uploads.ts +0 -124
  447. package/references/openhive/src/db/dal/votes.ts +0 -124
  448. package/references/openhive/src/db/index.ts +0 -293
  449. package/references/openhive/src/db/providers/index.ts +0 -75
  450. package/references/openhive/src/db/providers/postgres.ts +0 -529
  451. package/references/openhive/src/db/providers/sqlite.ts +0 -1383
  452. package/references/openhive/src/db/providers/turso.ts +0 -1360
  453. package/references/openhive/src/db/providers/types.ts +0 -516
  454. package/references/openhive/src/db/schema.ts +0 -641
  455. package/references/openhive/src/discovery/index.ts +0 -403
  456. package/references/openhive/src/events/dispatch.ts +0 -106
  457. package/references/openhive/src/events/index.ts +0 -17
  458. package/references/openhive/src/events/normalizers/github.ts +0 -133
  459. package/references/openhive/src/events/normalizers/index.ts +0 -62
  460. package/references/openhive/src/events/normalizers/slack.ts +0 -50
  461. package/references/openhive/src/events/router.ts +0 -156
  462. package/references/openhive/src/events/schema.ts +0 -66
  463. package/references/openhive/src/events/types.ts +0 -130
  464. package/references/openhive/src/federation/index.ts +0 -1
  465. package/references/openhive/src/federation/service.ts +0 -776
  466. package/references/openhive/src/headscale/client.ts +0 -256
  467. package/references/openhive/src/headscale/config.ts +0 -212
  468. package/references/openhive/src/headscale/index.ts +0 -23
  469. package/references/openhive/src/headscale/manager.ts +0 -249
  470. package/references/openhive/src/headscale/sync.ts +0 -272
  471. package/references/openhive/src/headscale/types.ts +0 -231
  472. package/references/openhive/src/index.ts +0 -225
  473. package/references/openhive/src/map/client-entry.ts +0 -26
  474. package/references/openhive/src/map/index.ts +0 -76
  475. package/references/openhive/src/map/schema.ts +0 -119
  476. package/references/openhive/src/map/service.ts +0 -323
  477. package/references/openhive/src/map/sync-client.ts +0 -696
  478. package/references/openhive/src/map/sync-listener.ts +0 -409
  479. package/references/openhive/src/map/types.ts +0 -290
  480. package/references/openhive/src/network/factory.ts +0 -118
  481. package/references/openhive/src/network/headscale-provider.ts +0 -437
  482. package/references/openhive/src/network/index.ts +0 -43
  483. package/references/openhive/src/network/tailscale-client.ts +0 -289
  484. package/references/openhive/src/network/tailscale-provider.ts +0 -287
  485. package/references/openhive/src/network/types.ts +0 -178
  486. package/references/openhive/src/opentasks-client/client.ts +0 -374
  487. package/references/openhive/src/opentasks-client/index.ts +0 -7
  488. package/references/openhive/src/realtime/index.ts +0 -282
  489. package/references/openhive/src/server.ts +0 -1069
  490. package/references/openhive/src/services/email.ts +0 -177
  491. package/references/openhive/src/services/sitemap.ts +0 -135
  492. package/references/openhive/src/sessions/adapters/claude.ts +0 -466
  493. package/references/openhive/src/sessions/adapters/codex.ts +0 -265
  494. package/references/openhive/src/sessions/adapters/index.ts +0 -263
  495. package/references/openhive/src/sessions/adapters/raw.ts +0 -144
  496. package/references/openhive/src/sessions/adapters/types.ts +0 -83
  497. package/references/openhive/src/sessions/index.ts +0 -50
  498. package/references/openhive/src/sessions/storage/adapters/gcs.ts +0 -277
  499. package/references/openhive/src/sessions/storage/adapters/local.ts +0 -240
  500. package/references/openhive/src/sessions/storage/adapters/s3.ts +0 -321
  501. package/references/openhive/src/sessions/storage/index.ts +0 -231
  502. package/references/openhive/src/sessions/storage/types.ts +0 -189
  503. package/references/openhive/src/sessions/types.ts +0 -415
  504. package/references/openhive/src/shared/types/index.ts +0 -45
  505. package/references/openhive/src/shared/types/map-coordination.ts +0 -92
  506. package/references/openhive/src/shared/types/map-session-sync.ts +0 -170
  507. package/references/openhive/src/shared/types/map-sync.ts +0 -68
  508. package/references/openhive/src/skill.ts +0 -203
  509. package/references/openhive/src/storage/adapters/local.ts +0 -169
  510. package/references/openhive/src/storage/adapters/s3.ts +0 -195
  511. package/references/openhive/src/storage/index.ts +0 -64
  512. package/references/openhive/src/storage/types.ts +0 -69
  513. package/references/openhive/src/swarm/credentials.ts +0 -98
  514. package/references/openhive/src/swarm/dal.ts +0 -206
  515. package/references/openhive/src/swarm/index.ts +0 -28
  516. package/references/openhive/src/swarm/manager.ts +0 -917
  517. package/references/openhive/src/swarm/providers/local.ts +0 -338
  518. package/references/openhive/src/swarm/providers/sandboxed-local.ts +0 -478
  519. package/references/openhive/src/swarm/providers/workspace.ts +0 -52
  520. package/references/openhive/src/swarm/schema.ts +0 -43
  521. package/references/openhive/src/swarm/types.ts +0 -333
  522. package/references/openhive/src/swarmhub/client.ts +0 -279
  523. package/references/openhive/src/swarmhub/connector.ts +0 -463
  524. package/references/openhive/src/swarmhub/index.ts +0 -43
  525. package/references/openhive/src/swarmhub/routes.ts +0 -296
  526. package/references/openhive/src/swarmhub/types.ts +0 -213
  527. package/references/openhive/src/swarmhub/webhook-handler.ts +0 -126
  528. package/references/openhive/src/sync/compaction.ts +0 -193
  529. package/references/openhive/src/sync/coordination-hooks.ts +0 -154
  530. package/references/openhive/src/sync/crypto.ts +0 -79
  531. package/references/openhive/src/sync/gossip.ts +0 -136
  532. package/references/openhive/src/sync/hooks.ts +0 -202
  533. package/references/openhive/src/sync/materializer-repo.ts +0 -256
  534. package/references/openhive/src/sync/materializer.ts +0 -682
  535. package/references/openhive/src/sync/middleware.ts +0 -140
  536. package/references/openhive/src/sync/peer-resolver.ts +0 -157
  537. package/references/openhive/src/sync/resource-hooks.ts +0 -161
  538. package/references/openhive/src/sync/schema.ts +0 -158
  539. package/references/openhive/src/sync/service.ts +0 -990
  540. package/references/openhive/src/sync/types.ts +0 -369
  541. package/references/openhive/src/terminal/index.ts +0 -4
  542. package/references/openhive/src/terminal/pty-manager.ts +0 -337
  543. package/references/openhive/src/terminal/resolve-tui.ts +0 -44
  544. package/references/openhive/src/terminal/terminal-ws.ts +0 -251
  545. package/references/openhive/src/types.ts +0 -442
  546. package/references/openhive/src/utils/git-remote.ts +0 -329
  547. package/references/openhive/src/web/App.tsx +0 -77
  548. package/references/openhive/src/web/__tests__/components/dashboard/RecentActivity.test.tsx +0 -77
  549. package/references/openhive/src/web/__tests__/components/dashboard/StatsOverview.test.tsx +0 -62
  550. package/references/openhive/src/web/__tests__/components/dashboard/SwarmStatusSummary.test.tsx +0 -122
  551. package/references/openhive/src/web/__tests__/components/dashboard/SyncResourcesStatus.test.tsx +0 -104
  552. package/references/openhive/src/web/__tests__/components/layout/Sidebar.test.tsx +0 -110
  553. package/references/openhive/src/web/__tests__/components/swarm/StatusBadges.test.tsx +0 -65
  554. package/references/openhive/src/web/__tests__/components/terminal/query-responses.test.ts +0 -143
  555. package/references/openhive/src/web/__tests__/components/terminal/terminal-mouse.test.ts +0 -509
  556. package/references/openhive/src/web/__tests__/hooks/useEventsApi.test.ts +0 -378
  557. package/references/openhive/src/web/__tests__/pages/Dashboard.test.tsx +0 -57
  558. package/references/openhive/src/web/__tests__/pages/Events.test.tsx +0 -886
  559. package/references/openhive/src/web/__tests__/pages/Explore.test.tsx +0 -63
  560. package/references/openhive/src/web/__tests__/routing.test.tsx +0 -79
  561. package/references/openhive/src/web/__tests__/setup.ts +0 -37
  562. package/references/openhive/src/web/__tests__/stores/dashboard.test.ts +0 -49
  563. package/references/openhive/src/web/components/common/AgentBadge.tsx +0 -58
  564. package/references/openhive/src/web/components/common/Avatar.tsx +0 -78
  565. package/references/openhive/src/web/components/common/ErrorBoundary.tsx +0 -76
  566. package/references/openhive/src/web/components/common/Highlight.tsx +0 -79
  567. package/references/openhive/src/web/components/common/ImageUpload.tsx +0 -209
  568. package/references/openhive/src/web/components/common/LoadingSpinner.tsx +0 -37
  569. package/references/openhive/src/web/components/common/Logo.tsx +0 -21
  570. package/references/openhive/src/web/components/common/Markdown.tsx +0 -53
  571. package/references/openhive/src/web/components/common/ProtectedRoute.tsx +0 -18
  572. package/references/openhive/src/web/components/common/ThemeToggle.tsx +0 -38
  573. package/references/openhive/src/web/components/common/TimeAgo.tsx +0 -17
  574. package/references/openhive/src/web/components/common/Toast.tsx +0 -70
  575. package/references/openhive/src/web/components/common/VoteButtons.tsx +0 -100
  576. package/references/openhive/src/web/components/dashboard/RecentActivity.tsx +0 -100
  577. package/references/openhive/src/web/components/dashboard/StatsOverview.tsx +0 -40
  578. package/references/openhive/src/web/components/dashboard/SwarmStatusSummary.tsx +0 -89
  579. package/references/openhive/src/web/components/dashboard/SyncResourcesStatus.tsx +0 -81
  580. package/references/openhive/src/web/components/feed/FeedControls.tsx +0 -38
  581. package/references/openhive/src/web/components/feed/NewPostsIndicator.tsx +0 -75
  582. package/references/openhive/src/web/components/feed/PostCard.tsx +0 -129
  583. package/references/openhive/src/web/components/feed/PostList.tsx +0 -83
  584. package/references/openhive/src/web/components/layout/Footer.tsx +0 -5
  585. package/references/openhive/src/web/components/layout/Layout.tsx +0 -29
  586. package/references/openhive/src/web/components/layout/Sidebar.tsx +0 -348
  587. package/references/openhive/src/web/components/post/CommentForm.tsx +0 -59
  588. package/references/openhive/src/web/components/post/CommentTree.tsx +0 -145
  589. package/references/openhive/src/web/components/resources/MemoryBrowser.tsx +0 -208
  590. package/references/openhive/src/web/components/resources/OpenTasksSummary.tsx +0 -138
  591. package/references/openhive/src/web/components/resources/SkillBrowser.tsx +0 -284
  592. package/references/openhive/src/web/components/swarm/StatusBadges.tsx +0 -56
  593. package/references/openhive/src/web/components/terminal/TerminalPanel.tsx +0 -485
  594. package/references/openhive/src/web/components/terminal/index.ts +0 -2
  595. package/references/openhive/src/web/components/terminal/query-responses.ts +0 -70
  596. package/references/openhive/src/web/components/terminal/terminal-mouse.ts +0 -222
  597. package/references/openhive/src/web/hooks/useApi.ts +0 -740
  598. package/references/openhive/src/web/hooks/useDocumentTitle.ts +0 -49
  599. package/references/openhive/src/web/hooks/useInfiniteScroll.ts +0 -58
  600. package/references/openhive/src/web/hooks/useRealtimeUpdates.ts +0 -154
  601. package/references/openhive/src/web/hooks/useWebSocket.ts +0 -225
  602. package/references/openhive/src/web/index.html +0 -73
  603. package/references/openhive/src/web/lib/api.ts +0 -518
  604. package/references/openhive/src/web/main.tsx +0 -32
  605. package/references/openhive/src/web/pages/About.tsx +0 -131
  606. package/references/openhive/src/web/pages/Agent.tsx +0 -130
  607. package/references/openhive/src/web/pages/Agents.tsx +0 -69
  608. package/references/openhive/src/web/pages/AuthCallback.tsx +0 -75
  609. package/references/openhive/src/web/pages/Dashboard.tsx +0 -41
  610. package/references/openhive/src/web/pages/Events.tsx +0 -1025
  611. package/references/openhive/src/web/pages/Explore.tsx +0 -43
  612. package/references/openhive/src/web/pages/Hive.tsx +0 -134
  613. package/references/openhive/src/web/pages/Hives.tsx +0 -64
  614. package/references/openhive/src/web/pages/Home.tsx +0 -43
  615. package/references/openhive/src/web/pages/Login.tsx +0 -122
  616. package/references/openhive/src/web/pages/Post.tsx +0 -216
  617. package/references/openhive/src/web/pages/ResourceDetail.tsx +0 -426
  618. package/references/openhive/src/web/pages/Resources.tsx +0 -276
  619. package/references/openhive/src/web/pages/Search.tsx +0 -234
  620. package/references/openhive/src/web/pages/SessionDetail.tsx +0 -703
  621. package/references/openhive/src/web/pages/Sessions.tsx +0 -129
  622. package/references/openhive/src/web/pages/Settings.tsx +0 -826
  623. package/references/openhive/src/web/pages/SwarmCraft.tsx +0 -16
  624. package/references/openhive/src/web/pages/Swarms.tsx +0 -981
  625. package/references/openhive/src/web/pages/Terminal.tsx +0 -69
  626. package/references/openhive/src/web/postcss.config.js +0 -5
  627. package/references/openhive/src/web/public/favicon.svg +0 -11
  628. package/references/openhive/src/web/public/manifest.json +0 -21
  629. package/references/openhive/src/web/stores/auth.ts +0 -207
  630. package/references/openhive/src/web/stores/dashboard.ts +0 -23
  631. package/references/openhive/src/web/stores/realtime.ts +0 -90
  632. package/references/openhive/src/web/stores/theme.ts +0 -70
  633. package/references/openhive/src/web/stores/toast.ts +0 -63
  634. package/references/openhive/src/web/styles/globals.css +0 -503
  635. package/references/openhive/src/web/sw.ts +0 -228
  636. package/references/openhive/src/web/utils/serviceWorker.ts +0 -86
  637. package/references/openhive/src/web/vite.config.ts +0 -81
  638. package/references/openhive/tsconfig.json +0 -32
  639. package/references/openhive/tsup.config.ts +0 -17
  640. package/references/openhive/vitest.config.ts +0 -30
  641. package/references/openhive/vitest.web.config.ts +0 -20
  642. package/references/opentasks/.claude/settings.json +0 -6
  643. package/references/opentasks/.claude-plugin/plugin.json +0 -20
  644. package/references/opentasks/.lintstagedrc.json +0 -4
  645. package/references/opentasks/.prettierignore +0 -4
  646. package/references/opentasks/.prettierrc.json +0 -11
  647. package/references/opentasks/.sudocode/issues.jsonl +0 -89
  648. package/references/opentasks/.sudocode/specs.jsonl +0 -24
  649. package/references/opentasks/README.md +0 -401
  650. package/references/opentasks/docs/ARCHITECTURE.md +0 -841
  651. package/references/opentasks/docs/DESIGN.md +0 -689
  652. package/references/opentasks/docs/INTERFACE.md +0 -670
  653. package/references/opentasks/docs/PERSISTENCE.md +0 -1638
  654. package/references/opentasks/docs/PROVIDERS.md +0 -1412
  655. package/references/opentasks/docs/SCHEMA.md +0 -815
  656. package/references/opentasks/docs/TESTING.md +0 -1081
  657. package/references/opentasks/eslint.config.js +0 -58
  658. package/references/opentasks/package-lock.json +0 -4348
  659. package/references/opentasks/package.json +0 -81
  660. package/references/opentasks/skills/opentasks/SKILL.md +0 -139
  661. package/references/opentasks/skills/opentasks/dependency-management.md +0 -119
  662. package/references/opentasks/skills/opentasks/feedback-and-review.md +0 -100
  663. package/references/opentasks/skills/opentasks/linking-external-data.md +0 -103
  664. package/references/opentasks/skills/opentasks/spec-to-implementation.md +0 -98
  665. package/references/opentasks/src/__tests__/cli-tools.test.ts +0 -800
  666. package/references/opentasks/src/__tests__/cli.test.ts +0 -97
  667. package/references/opentasks/src/__tests__/p1-p3-gaps.test.ts +0 -635
  668. package/references/opentasks/src/cli.ts +0 -929
  669. package/references/opentasks/src/client/__tests__/client-crud.test.ts +0 -546
  670. package/references/opentasks/src/client/__tests__/client.test.ts +0 -658
  671. package/references/opentasks/src/client/__tests__/socket-discovery.test.ts +0 -122
  672. package/references/opentasks/src/client/client.ts +0 -560
  673. package/references/opentasks/src/client/index.ts +0 -32
  674. package/references/opentasks/src/config/__tests__/defaults.test.ts +0 -66
  675. package/references/opentasks/src/config/__tests__/env.test.ts +0 -155
  676. package/references/opentasks/src/config/__tests__/index.test.ts +0 -148
  677. package/references/opentasks/src/config/__tests__/loader.test.ts +0 -173
  678. package/references/opentasks/src/config/__tests__/merge.test.ts +0 -121
  679. package/references/opentasks/src/config/__tests__/schema.test.ts +0 -446
  680. package/references/opentasks/src/config/defaults.ts +0 -18
  681. package/references/opentasks/src/config/env.ts +0 -170
  682. package/references/opentasks/src/config/errors.ts +0 -33
  683. package/references/opentasks/src/config/index.ts +0 -63
  684. package/references/opentasks/src/config/loader.ts +0 -90
  685. package/references/opentasks/src/config/merge.ts +0 -64
  686. package/references/opentasks/src/config/schema.ts +0 -767
  687. package/references/opentasks/src/core/__tests__/conditional-redirects.test.ts +0 -116
  688. package/references/opentasks/src/core/__tests__/connections.test.ts +0 -194
  689. package/references/opentasks/src/core/__tests__/hash.test.ts +0 -161
  690. package/references/opentasks/src/core/__tests__/id.test.ts +0 -175
  691. package/references/opentasks/src/core/__tests__/init.test.ts +0 -115
  692. package/references/opentasks/src/core/__tests__/location.test.ts +0 -94
  693. package/references/opentasks/src/core/__tests__/merge-driver.test.ts +0 -300
  694. package/references/opentasks/src/core/__tests__/redirects.test.ts +0 -169
  695. package/references/opentasks/src/core/__tests__/resolve-location-target.test.ts +0 -468
  696. package/references/opentasks/src/core/__tests__/uri.test.ts +0 -228
  697. package/references/opentasks/src/core/__tests__/worktree.test.ts +0 -160
  698. package/references/opentasks/src/core/conditional-redirects.ts +0 -100
  699. package/references/opentasks/src/core/connections.ts +0 -217
  700. package/references/opentasks/src/core/discover.ts +0 -195
  701. package/references/opentasks/src/core/hash.ts +0 -74
  702. package/references/opentasks/src/core/id.ts +0 -174
  703. package/references/opentasks/src/core/index.ts +0 -108
  704. package/references/opentasks/src/core/init.ts +0 -66
  705. package/references/opentasks/src/core/location.ts +0 -139
  706. package/references/opentasks/src/core/merge-driver.ts +0 -280
  707. package/references/opentasks/src/core/redirects.ts +0 -182
  708. package/references/opentasks/src/core/uri.ts +0 -270
  709. package/references/opentasks/src/core/worktree.ts +0 -504
  710. package/references/opentasks/src/daemon/__tests__/e2e-live-agent.test.ts +0 -344
  711. package/references/opentasks/src/daemon/__tests__/e2e-session-pipeline.test.ts +0 -447
  712. package/references/opentasks/src/daemon/__tests__/e2e-watch.test.ts +0 -279
  713. package/references/opentasks/src/daemon/__tests__/entire-linker.test.ts +0 -1074
  714. package/references/opentasks/src/daemon/__tests__/entire-watcher.test.ts +0 -659
  715. package/references/opentasks/src/daemon/__tests__/flush.test.ts +0 -306
  716. package/references/opentasks/src/daemon/__tests__/integration.test.ts +0 -338
  717. package/references/opentasks/src/daemon/__tests__/ipc.test.ts +0 -406
  718. package/references/opentasks/src/daemon/__tests__/lifecycle.test.ts +0 -378
  719. package/references/opentasks/src/daemon/__tests__/lock.test.ts +0 -240
  720. package/references/opentasks/src/daemon/__tests__/methods/graph.test.ts +0 -372
  721. package/references/opentasks/src/daemon/__tests__/methods/provider.test.ts +0 -238
  722. package/references/opentasks/src/daemon/__tests__/methods/tools.test.ts +0 -690
  723. package/references/opentasks/src/daemon/__tests__/multi-location.test.ts +0 -945
  724. package/references/opentasks/src/daemon/__tests__/registry.test.ts +0 -268
  725. package/references/opentasks/src/daemon/__tests__/watcher.test.ts +0 -329
  726. package/references/opentasks/src/daemon/entire-linker.ts +0 -615
  727. package/references/opentasks/src/daemon/entire-watcher.ts +0 -415
  728. package/references/opentasks/src/daemon/factory.ts +0 -133
  729. package/references/opentasks/src/daemon/flush.ts +0 -168
  730. package/references/opentasks/src/daemon/index.ts +0 -120
  731. package/references/opentasks/src/daemon/ipc.ts +0 -491
  732. package/references/opentasks/src/daemon/lifecycle.ts +0 -1106
  733. package/references/opentasks/src/daemon/location-state.ts +0 -481
  734. package/references/opentasks/src/daemon/lock.ts +0 -168
  735. package/references/opentasks/src/daemon/methods/__tests__/graph.test.ts +0 -359
  736. package/references/opentasks/src/daemon/methods/__tests__/provider.test.ts +0 -227
  737. package/references/opentasks/src/daemon/methods/__tests__/tools.test.ts +0 -360
  738. package/references/opentasks/src/daemon/methods/__tests__/watch.test.ts +0 -656
  739. package/references/opentasks/src/daemon/methods/archive.ts +0 -193
  740. package/references/opentasks/src/daemon/methods/graph.ts +0 -274
  741. package/references/opentasks/src/daemon/methods/lifecycle.ts +0 -112
  742. package/references/opentasks/src/daemon/methods/location.ts +0 -118
  743. package/references/opentasks/src/daemon/methods/provider.ts +0 -159
  744. package/references/opentasks/src/daemon/methods/tools.ts +0 -221
  745. package/references/opentasks/src/daemon/methods/watch.ts +0 -206
  746. package/references/opentasks/src/daemon/registry.ts +0 -244
  747. package/references/opentasks/src/daemon/types.ts +0 -163
  748. package/references/opentasks/src/daemon/watcher.ts +0 -248
  749. package/references/opentasks/src/entire/__tests__/agent-registry.test.ts +0 -127
  750. package/references/opentasks/src/entire/__tests__/claude-generator.test.ts +0 -49
  751. package/references/opentasks/src/entire/__tests__/commit-msg.test.ts +0 -89
  752. package/references/opentasks/src/entire/__tests__/cursor-agent.test.ts +0 -224
  753. package/references/opentasks/src/entire/__tests__/flush-sentinel.test.ts +0 -93
  754. package/references/opentasks/src/entire/__tests__/gemini-agent.test.ts +0 -375
  755. package/references/opentasks/src/entire/__tests__/git-hooks.test.ts +0 -85
  756. package/references/opentasks/src/entire/__tests__/hook-managers.test.ts +0 -128
  757. package/references/opentasks/src/entire/__tests__/opencode-agent.test.ts +0 -329
  758. package/references/opentasks/src/entire/__tests__/redaction.test.ts +0 -143
  759. package/references/opentasks/src/entire/__tests__/session-store.test.ts +0 -83
  760. package/references/opentasks/src/entire/__tests__/summarize.test.ts +0 -346
  761. package/references/opentasks/src/entire/__tests__/transcript-timestamp.test.ts +0 -127
  762. package/references/opentasks/src/entire/__tests__/types.test.ts +0 -112
  763. package/references/opentasks/src/entire/__tests__/utils.test.ts +0 -296
  764. package/references/opentasks/src/entire/__tests__/validation.test.ts +0 -103
  765. package/references/opentasks/src/entire/__tests__/worktree.test.ts +0 -66
  766. package/references/opentasks/src/entire/agent/registry.ts +0 -143
  767. package/references/opentasks/src/entire/agent/session-types.ts +0 -117
  768. package/references/opentasks/src/entire/agent/types.ts +0 -217
  769. package/references/opentasks/src/entire/commands/clean.ts +0 -134
  770. package/references/opentasks/src/entire/commands/disable.ts +0 -85
  771. package/references/opentasks/src/entire/commands/doctor.ts +0 -152
  772. package/references/opentasks/src/entire/commands/enable.ts +0 -149
  773. package/references/opentasks/src/entire/commands/explain.ts +0 -271
  774. package/references/opentasks/src/entire/commands/reset.ts +0 -105
  775. package/references/opentasks/src/entire/commands/resume.ts +0 -194
  776. package/references/opentasks/src/entire/commands/rewind.ts +0 -204
  777. package/references/opentasks/src/entire/commands/status.ts +0 -150
  778. package/references/opentasks/src/entire/config.ts +0 -153
  779. package/references/opentasks/src/entire/git-operations.ts +0 -485
  780. package/references/opentasks/src/entire/hooks/git-hooks.ts +0 -171
  781. package/references/opentasks/src/entire/hooks/lifecycle.ts +0 -224
  782. package/references/opentasks/src/entire/index.ts +0 -644
  783. package/references/opentasks/src/entire/security/redaction.ts +0 -263
  784. package/references/opentasks/src/entire/session/state-machine.ts +0 -463
  785. package/references/opentasks/src/entire/store/checkpoint-store.ts +0 -489
  786. package/references/opentasks/src/entire/store/native-store.ts +0 -178
  787. package/references/opentasks/src/entire/store/provider-types.ts +0 -99
  788. package/references/opentasks/src/entire/store/session-store.ts +0 -233
  789. package/references/opentasks/src/entire/strategy/attribution.ts +0 -300
  790. package/references/opentasks/src/entire/strategy/common.ts +0 -222
  791. package/references/opentasks/src/entire/strategy/content-overlap.ts +0 -242
  792. package/references/opentasks/src/entire/strategy/manual-commit.ts +0 -1008
  793. package/references/opentasks/src/entire/strategy/types.ts +0 -285
  794. package/references/opentasks/src/entire/summarize/claude-generator.ts +0 -119
  795. package/references/opentasks/src/entire/summarize/summarize.ts +0 -432
  796. package/references/opentasks/src/entire/types.ts +0 -408
  797. package/references/opentasks/src/entire/utils/chunk-files.ts +0 -49
  798. package/references/opentasks/src/entire/utils/commit-message.ts +0 -65
  799. package/references/opentasks/src/entire/utils/detect-agent.ts +0 -36
  800. package/references/opentasks/src/entire/utils/hook-managers.ts +0 -118
  801. package/references/opentasks/src/entire/utils/ide-tags.ts +0 -32
  802. package/references/opentasks/src/entire/utils/paths.ts +0 -59
  803. package/references/opentasks/src/entire/utils/preview-rewind.ts +0 -86
  804. package/references/opentasks/src/entire/utils/rewind-conflict.ts +0 -121
  805. package/references/opentasks/src/entire/utils/shadow-branch.ts +0 -113
  806. package/references/opentasks/src/entire/utils/string-utils.ts +0 -46
  807. package/references/opentasks/src/entire/utils/todo-extract.ts +0 -193
  808. package/references/opentasks/src/entire/utils/trailers.ts +0 -190
  809. package/references/opentasks/src/entire/utils/transcript-parse.ts +0 -177
  810. package/references/opentasks/src/entire/utils/transcript-timestamp.ts +0 -61
  811. package/references/opentasks/src/entire/utils/tree-ops.ts +0 -227
  812. package/references/opentasks/src/entire/utils/tty.ts +0 -72
  813. package/references/opentasks/src/entire/utils/validation.ts +0 -67
  814. package/references/opentasks/src/entire/utils/worktree.ts +0 -58
  815. package/references/opentasks/src/graph/EdgeTypeRegistry.ts +0 -330
  816. package/references/opentasks/src/graph/FederatedGraph.ts +0 -796
  817. package/references/opentasks/src/graph/GraphologyAdapter.ts +0 -374
  818. package/references/opentasks/src/graph/HydratingFederatedGraph.ts +0 -533
  819. package/references/opentasks/src/graph/__tests__/EdgeTypeRegistry.test.ts +0 -263
  820. package/references/opentasks/src/graph/__tests__/FederatedGraph.test.ts +0 -821
  821. package/references/opentasks/src/graph/__tests__/GraphologyAdapter.test.ts +0 -408
  822. package/references/opentasks/src/graph/__tests__/HydratingFederatedGraph.test.ts +0 -735
  823. package/references/opentasks/src/graph/__tests__/debounce.test.ts +0 -276
  824. package/references/opentasks/src/graph/__tests__/e2e-store-roundtrip.test.ts +0 -349
  825. package/references/opentasks/src/graph/__tests__/edge-cases.test.ts +0 -595
  826. package/references/opentasks/src/graph/__tests__/expansion.test.ts +0 -304
  827. package/references/opentasks/src/graph/__tests__/git-graph-syncer.test.ts +0 -572
  828. package/references/opentasks/src/graph/__tests__/provider-store.test.ts +0 -1091
  829. package/references/opentasks/src/graph/__tests__/query.test.ts +0 -991
  830. package/references/opentasks/src/graph/__tests__/store.test.ts +0 -998
  831. package/references/opentasks/src/graph/__tests__/sync.test.ts +0 -178
  832. package/references/opentasks/src/graph/__tests__/validation.test.ts +0 -657
  833. package/references/opentasks/src/graph/coordination.ts +0 -454
  834. package/references/opentasks/src/graph/debounce.ts +0 -154
  835. package/references/opentasks/src/graph/expansion.ts +0 -364
  836. package/references/opentasks/src/graph/git-graph-syncer.ts +0 -321
  837. package/references/opentasks/src/graph/history.ts +0 -438
  838. package/references/opentasks/src/graph/index.ts +0 -145
  839. package/references/opentasks/src/graph/provider-store.ts +0 -1077
  840. package/references/opentasks/src/graph/query.ts +0 -651
  841. package/references/opentasks/src/graph/store.ts +0 -861
  842. package/references/opentasks/src/graph/sync.ts +0 -116
  843. package/references/opentasks/src/graph/types.ts +0 -420
  844. package/references/opentasks/src/graph/validation.ts +0 -520
  845. package/references/opentasks/src/index.ts +0 -270
  846. package/references/opentasks/src/materialization/CLAUDE.md +0 -88
  847. package/references/opentasks/src/materialization/README.md +0 -187
  848. package/references/opentasks/src/materialization/__tests__/archive-methods.test.ts +0 -194
  849. package/references/opentasks/src/materialization/__tests__/archiver.test.ts +0 -528
  850. package/references/opentasks/src/materialization/__tests__/config.test.ts +0 -123
  851. package/references/opentasks/src/materialization/__tests__/git-remote-store.test.ts +0 -533
  852. package/references/opentasks/src/materialization/__tests__/graph-id.test.ts +0 -82
  853. package/references/opentasks/src/materialization/__tests__/http-remote-store.test.ts +0 -263
  854. package/references/opentasks/src/materialization/__tests__/materialize-before-archive.test.ts +0 -246
  855. package/references/opentasks/src/materialization/__tests__/remote-store-factory.test.ts +0 -152
  856. package/references/opentasks/src/materialization/__tests__/snapshot.test.ts +0 -209
  857. package/references/opentasks/src/materialization/archiver.ts +0 -318
  858. package/references/opentasks/src/materialization/git-archive-store.ts +0 -568
  859. package/references/opentasks/src/materialization/git-remote-store.ts +0 -551
  860. package/references/opentasks/src/materialization/graph-id.ts +0 -173
  861. package/references/opentasks/src/materialization/http-remote-store.ts +0 -190
  862. package/references/opentasks/src/materialization/index.ts +0 -62
  863. package/references/opentasks/src/materialization/remote-store-factory.ts +0 -55
  864. package/references/opentasks/src/materialization/snapshot.ts +0 -230
  865. package/references/opentasks/src/materialization/types.ts +0 -410
  866. package/references/opentasks/src/providers/__tests__/beads.test.ts +0 -752
  867. package/references/opentasks/src/providers/__tests__/claude-tasks.test.ts +0 -485
  868. package/references/opentasks/src/providers/__tests__/entire-e2e.test.ts +0 -692
  869. package/references/opentasks/src/providers/__tests__/entire-sessionlog-e2e.test.ts +0 -1113
  870. package/references/opentasks/src/providers/__tests__/entire.test.ts +0 -1016
  871. package/references/opentasks/src/providers/__tests__/from-config.test.ts +0 -183
  872. package/references/opentasks/src/providers/__tests__/global.test.ts +0 -515
  873. package/references/opentasks/src/providers/__tests__/materialization.test.ts +0 -567
  874. package/references/opentasks/src/providers/__tests__/native.test.ts +0 -693
  875. package/references/opentasks/src/providers/__tests__/registry.test.ts +0 -232
  876. package/references/opentasks/src/providers/beads.ts +0 -1155
  877. package/references/opentasks/src/providers/claude-tasks.ts +0 -402
  878. package/references/opentasks/src/providers/entire.ts +0 -608
  879. package/references/opentasks/src/providers/from-config.ts +0 -210
  880. package/references/opentasks/src/providers/global.ts +0 -460
  881. package/references/opentasks/src/providers/index.ts +0 -147
  882. package/references/opentasks/src/providers/location.ts +0 -237
  883. package/references/opentasks/src/providers/materialization.ts +0 -346
  884. package/references/opentasks/src/providers/native.ts +0 -725
  885. package/references/opentasks/src/providers/registry.ts +0 -114
  886. package/references/opentasks/src/providers/sudocode.ts +0 -1292
  887. package/references/opentasks/src/providers/sync.ts +0 -485
  888. package/references/opentasks/src/providers/traits/RelationshipQueryable.ts +0 -169
  889. package/references/opentasks/src/providers/traits/TaskManageable.ts +0 -211
  890. package/references/opentasks/src/providers/traits/Watchable.ts +0 -260
  891. package/references/opentasks/src/providers/traits/__tests__/RelationshipQueryable.test.ts +0 -217
  892. package/references/opentasks/src/providers/traits/__tests__/TaskManageable.test.ts +0 -241
  893. package/references/opentasks/src/providers/traits/index.ts +0 -42
  894. package/references/opentasks/src/providers/types.ts +0 -439
  895. package/references/opentasks/src/schema/__tests__/validation.test.ts +0 -283
  896. package/references/opentasks/src/schema/base.ts +0 -88
  897. package/references/opentasks/src/schema/edges.ts +0 -78
  898. package/references/opentasks/src/schema/index.ts +0 -37
  899. package/references/opentasks/src/schema/nodes.ts +0 -119
  900. package/references/opentasks/src/schema/storage.ts +0 -130
  901. package/references/opentasks/src/schema/validation.ts +0 -209
  902. package/references/opentasks/src/storage/__tests__/atomic-write.test.ts +0 -227
  903. package/references/opentasks/src/storage/__tests__/file-lock.test.ts +0 -120
  904. package/references/opentasks/src/storage/__tests__/jsonl.test.ts +0 -267
  905. package/references/opentasks/src/storage/__tests__/locked-writer.test.ts +0 -134
  906. package/references/opentasks/src/storage/__tests__/sqlite.test.ts +0 -572
  907. package/references/opentasks/src/storage/atomic-write.ts +0 -86
  908. package/references/opentasks/src/storage/file-lock.ts +0 -215
  909. package/references/opentasks/src/storage/index.ts +0 -24
  910. package/references/opentasks/src/storage/interface.ts +0 -289
  911. package/references/opentasks/src/storage/jsonl.ts +0 -264
  912. package/references/opentasks/src/storage/locked-writer.ts +0 -140
  913. package/references/opentasks/src/storage/sqlite-schema.ts +0 -177
  914. package/references/opentasks/src/storage/sqlite.ts +0 -791
  915. package/references/opentasks/src/tools/__tests__/annotate.test.ts +0 -381
  916. package/references/opentasks/src/tools/__tests__/link.test.ts +0 -299
  917. package/references/opentasks/src/tools/__tests__/query.test.ts +0 -350
  918. package/references/opentasks/src/tools/__tests__/task.test.ts +0 -218
  919. package/references/opentasks/src/tools/annotate.ts +0 -277
  920. package/references/opentasks/src/tools/index.ts +0 -57
  921. package/references/opentasks/src/tools/link.ts +0 -163
  922. package/references/opentasks/src/tools/query.ts +0 -468
  923. package/references/opentasks/src/tools/task.ts +0 -213
  924. package/references/opentasks/src/tools/types.ts +0 -451
  925. package/references/opentasks/src/tracking/__tests__/claude-tool-categorizer.test.ts +0 -223
  926. package/references/opentasks/src/tracking/__tests__/transcript-extractor.test.ts +0 -262
  927. package/references/opentasks/src/tracking/claude-tool-categorizer.ts +0 -155
  928. package/references/opentasks/src/tracking/index.ts +0 -32
  929. package/references/opentasks/src/tracking/skill-tracker.ts +0 -322
  930. package/references/opentasks/src/tracking/transcript-extractor.ts +0 -225
  931. package/references/opentasks/tests/e2e/helpers/assertions.ts +0 -211
  932. package/references/opentasks/tests/e2e/helpers/beads-helpers.ts +0 -487
  933. package/references/opentasks/tests/e2e/helpers/fixtures.ts +0 -236
  934. package/references/opentasks/tests/e2e/helpers/index.ts +0 -122
  935. package/references/opentasks/tests/e2e/helpers/sudocode-helpers.ts +0 -341
  936. package/references/opentasks/tests/e2e/helpers/system-setup.ts +0 -504
  937. package/references/opentasks/tests/e2e/helpers/test-agent.ts +0 -504
  938. package/references/opentasks/tests/e2e/infrastructure.e2e.test.ts +0 -521
  939. package/references/opentasks/tests/e2e/skill-tracking.e2e.test.ts +0 -625
  940. package/references/opentasks/tests/e2e/workflows/feedback-loop.e2e.test.ts +0 -279
  941. package/references/opentasks/tests/e2e/workflows/multi-agent.e2e.test.ts +0 -304
  942. package/references/opentasks/tests/e2e/workflows/provider-sync/background-sync.e2e.test.ts +0 -292
  943. package/references/opentasks/tests/e2e/workflows/provider-sync/beads-provider-compat.e2e.test.ts +0 -249
  944. package/references/opentasks/tests/e2e/workflows/provider-sync/cross-provider-edges.e2e.test.ts +0 -407
  945. package/references/opentasks/tests/e2e/workflows/provider-sync/federated-ready.e2e.test.ts +0 -504
  946. package/references/opentasks/tests/e2e/workflows/provider-sync/hydration.e2e.test.ts +0 -340
  947. package/references/opentasks/tests/e2e/workflows/provider-sync/materialization.e2e.test.ts +0 -370
  948. package/references/opentasks/tests/e2e/workflows/provider-sync/sudocode-provider-compat.e2e.test.ts +0 -683
  949. package/references/opentasks/tests/e2e/workflows/provider-sync/watchable-beads.e2e.test.ts +0 -573
  950. package/references/opentasks/tests/e2e/workflows/spec-driven.e2e.test.ts +0 -244
  951. package/references/opentasks/tests/e2e/worktree-location.e2e.test.ts +0 -699
  952. package/references/opentasks/tests/integration/daemon/helpers.ts +0 -147
  953. package/references/opentasks/tests/integration/daemon/ipc.integration.test.ts +0 -343
  954. package/references/opentasks/tests/integration/daemon/lifecycle.integration.test.ts +0 -407
  955. package/references/opentasks/tests/integration/graph/federated-graph.integration.test.ts +0 -660
  956. package/references/opentasks/tests/integration/helpers/flags.ts +0 -28
  957. package/references/opentasks/tests/integration/helpers/index.ts +0 -47
  958. package/references/opentasks/tests/integration/helpers/process.ts +0 -133
  959. package/references/opentasks/tests/integration/helpers/temp.ts +0 -105
  960. package/references/opentasks/tests/integration/helpers/wait.ts +0 -133
  961. package/references/opentasks/tests/integration/helpers.test.ts +0 -120
  962. package/references/opentasks/tests/integration/providers/beads-task-manageable.integration.test.ts +0 -450
  963. package/references/opentasks/tests/integration/providers/beads.integration.test.ts +0 -388
  964. package/references/opentasks/tests/integration/providers/native-task-manageable.integration.test.ts +0 -667
  965. package/references/opentasks/tests/integration/providers/sudocode-task-manageable.integration.test.ts +0 -406
  966. package/references/opentasks/tests/integration/providers/sudocode.integration.test.ts +0 -342
  967. package/references/opentasks/tests/integration/storage/jsonl-durability.integration.test.ts +0 -390
  968. package/references/opentasks/tests/integration/storage/sqlite-durability.integration.test.ts +0 -527
  969. package/references/opentasks/tests/integration/worktree/redirect-location-resolution.integration.test.ts +0 -578
  970. package/references/opentasks/tests/integration/worktree/worktree-flow.integration.test.ts +0 -656
  971. package/references/opentasks/tsconfig.json +0 -18
  972. package/references/opentasks/vitest.config.ts +0 -27
  973. package/references/opentasks/vitest.e2e.config.ts +0 -35
  974. package/references/opentasks/vitest.integration.config.ts +0 -19
  975. package/references/openteams/.claude/settings.json +0 -6
  976. package/references/openteams/CLAUDE.md +0 -98
  977. package/references/openteams/README.md +0 -508
  978. package/references/openteams/SKILL.md +0 -198
  979. package/references/openteams/design.md +0 -250
  980. package/references/openteams/docs/visual-editor-design.md +0 -1225
  981. package/references/openteams/editor/index.html +0 -15
  982. package/references/openteams/editor/package.json +0 -39
  983. package/references/openteams/editor/src/App.tsx +0 -48
  984. package/references/openteams/editor/src/components/canvas/Canvas.tsx +0 -131
  985. package/references/openteams/editor/src/components/canvas/QuickAddMenu.tsx +0 -134
  986. package/references/openteams/editor/src/components/edges/PeerRouteEdge.tsx +0 -82
  987. package/references/openteams/editor/src/components/edges/SignalFlowEdge.tsx +0 -77
  988. package/references/openteams/editor/src/components/edges/SpawnEdge.tsx +0 -54
  989. package/references/openteams/editor/src/components/inspector/ChannelInspector.tsx +0 -158
  990. package/references/openteams/editor/src/components/inspector/EdgeInspector.tsx +0 -168
  991. package/references/openteams/editor/src/components/inspector/Inspector.tsx +0 -46
  992. package/references/openteams/editor/src/components/inspector/RoleInspector.tsx +0 -508
  993. package/references/openteams/editor/src/components/inspector/TeamInspector.tsx +0 -126
  994. package/references/openteams/editor/src/components/nodes/ChannelNode.tsx +0 -103
  995. package/references/openteams/editor/src/components/nodes/RoleNode.tsx +0 -157
  996. package/references/openteams/editor/src/components/nodes/node-styles.ts +0 -101
  997. package/references/openteams/editor/src/components/sidebar/Sidebar.tsx +0 -227
  998. package/references/openteams/editor/src/components/toolbar/ExportModal.tsx +0 -110
  999. package/references/openteams/editor/src/components/toolbar/ImportModal.tsx +0 -139
  1000. package/references/openteams/editor/src/components/toolbar/Toolbar.tsx +0 -190
  1001. package/references/openteams/editor/src/hooks/use-autosave.ts +0 -126
  1002. package/references/openteams/editor/src/hooks/use-keyboard.ts +0 -106
  1003. package/references/openteams/editor/src/hooks/use-validation.ts +0 -45
  1004. package/references/openteams/editor/src/index.css +0 -245
  1005. package/references/openteams/editor/src/lib/auto-layout.ts +0 -51
  1006. package/references/openteams/editor/src/lib/bundled-templates.ts +0 -42
  1007. package/references/openteams/editor/src/lib/compiler.ts +0 -75
  1008. package/references/openteams/editor/src/lib/load-template.ts +0 -103
  1009. package/references/openteams/editor/src/lib/rebuild-edges.ts +0 -104
  1010. package/references/openteams/editor/src/lib/serializer.ts +0 -408
  1011. package/references/openteams/editor/src/lib/signal-catalog.ts +0 -50
  1012. package/references/openteams/editor/src/lib/validator.ts +0 -172
  1013. package/references/openteams/editor/src/main.tsx +0 -10
  1014. package/references/openteams/editor/src/stores/canvas-store.ts +0 -80
  1015. package/references/openteams/editor/src/stores/config-store.ts +0 -243
  1016. package/references/openteams/editor/src/stores/history-store.ts +0 -143
  1017. package/references/openteams/editor/src/stores/theme-store.ts +0 -66
  1018. package/references/openteams/editor/src/stores/ui-store.ts +0 -46
  1019. package/references/openteams/editor/src/stores/validation-store.ts +0 -27
  1020. package/references/openteams/editor/src/types/editor.ts +0 -74
  1021. package/references/openteams/editor/src/vite-env.d.ts +0 -1
  1022. package/references/openteams/editor/tests/compiler.test.ts +0 -151
  1023. package/references/openteams/editor/tests/e2e-add-remove.test.ts +0 -386
  1024. package/references/openteams/editor/tests/e2e-components.test.tsx +0 -424
  1025. package/references/openteams/editor/tests/e2e-export-roundtrip.test.ts +0 -299
  1026. package/references/openteams/editor/tests/e2e-template-load.test.ts +0 -204
  1027. package/references/openteams/editor/tests/e2e-ui-store.test.ts +0 -126
  1028. package/references/openteams/editor/tests/e2e-undo-redo.test.ts +0 -203
  1029. package/references/openteams/editor/tests/e2e-validation.test.ts +0 -307
  1030. package/references/openteams/editor/tests/serializer.test.ts +0 -142
  1031. package/references/openteams/editor/tests/setup.ts +0 -52
  1032. package/references/openteams/editor/tests/validator.test.ts +0 -92
  1033. package/references/openteams/editor/tsconfig.json +0 -21
  1034. package/references/openteams/editor/tsconfig.tsbuildinfo +0 -1
  1035. package/references/openteams/editor/vite.config.ts +0 -28
  1036. package/references/openteams/examples/bmad-method/prompts/analyst/ROLE.md +0 -16
  1037. package/references/openteams/examples/bmad-method/prompts/analyst/SOUL.md +0 -5
  1038. package/references/openteams/examples/bmad-method/prompts/architect/ROLE.md +0 -24
  1039. package/references/openteams/examples/bmad-method/prompts/architect/SOUL.md +0 -5
  1040. package/references/openteams/examples/bmad-method/prompts/developer/ROLE.md +0 -25
  1041. package/references/openteams/examples/bmad-method/prompts/developer/SOUL.md +0 -5
  1042. package/references/openteams/examples/bmad-method/prompts/master/ROLE.md +0 -21
  1043. package/references/openteams/examples/bmad-method/prompts/master/SOUL.md +0 -5
  1044. package/references/openteams/examples/bmad-method/prompts/pm/ROLE.md +0 -20
  1045. package/references/openteams/examples/bmad-method/prompts/pm/SOUL.md +0 -5
  1046. package/references/openteams/examples/bmad-method/prompts/qa/ROLE.md +0 -17
  1047. package/references/openteams/examples/bmad-method/prompts/qa/SOUL.md +0 -5
  1048. package/references/openteams/examples/bmad-method/prompts/quick-flow-dev/ROLE.md +0 -23
  1049. package/references/openteams/examples/bmad-method/prompts/quick-flow-dev/SOUL.md +0 -5
  1050. package/references/openteams/examples/bmad-method/prompts/scrum-master/ROLE.md +0 -27
  1051. package/references/openteams/examples/bmad-method/prompts/scrum-master/SOUL.md +0 -5
  1052. package/references/openteams/examples/bmad-method/prompts/tech-writer/ROLE.md +0 -21
  1053. package/references/openteams/examples/bmad-method/prompts/tech-writer/SOUL.md +0 -5
  1054. package/references/openteams/examples/bmad-method/prompts/ux-designer/ROLE.md +0 -16
  1055. package/references/openteams/examples/bmad-method/prompts/ux-designer/SOUL.md +0 -5
  1056. package/references/openteams/examples/bmad-method/roles/analyst.yaml +0 -9
  1057. package/references/openteams/examples/bmad-method/roles/architect.yaml +0 -9
  1058. package/references/openteams/examples/bmad-method/roles/developer.yaml +0 -8
  1059. package/references/openteams/examples/bmad-method/roles/master.yaml +0 -8
  1060. package/references/openteams/examples/bmad-method/roles/pm.yaml +0 -9
  1061. package/references/openteams/examples/bmad-method/roles/qa.yaml +0 -8
  1062. package/references/openteams/examples/bmad-method/roles/quick-flow-dev.yaml +0 -8
  1063. package/references/openteams/examples/bmad-method/roles/scrum-master.yaml +0 -9
  1064. package/references/openteams/examples/bmad-method/roles/tech-writer.yaml +0 -8
  1065. package/references/openteams/examples/bmad-method/roles/ux-designer.yaml +0 -8
  1066. package/references/openteams/examples/bmad-method/team.yaml +0 -161
  1067. package/references/openteams/examples/bug-fix-pipeline/roles/fixer.yaml +0 -9
  1068. package/references/openteams/examples/bug-fix-pipeline/roles/investigator.yaml +0 -8
  1069. package/references/openteams/examples/bug-fix-pipeline/roles/pr-creator.yaml +0 -6
  1070. package/references/openteams/examples/bug-fix-pipeline/roles/triager.yaml +0 -7
  1071. package/references/openteams/examples/bug-fix-pipeline/roles/verifier.yaml +0 -8
  1072. package/references/openteams/examples/bug-fix-pipeline/team.yaml +0 -88
  1073. package/references/openteams/examples/codebase-migration/roles/assessor.yaml +0 -7
  1074. package/references/openteams/examples/codebase-migration/roles/migrator.yaml +0 -9
  1075. package/references/openteams/examples/codebase-migration/roles/planner.yaml +0 -5
  1076. package/references/openteams/examples/codebase-migration/roles/test-extractor.yaml +0 -9
  1077. package/references/openteams/examples/codebase-migration/roles/validator.yaml +0 -7
  1078. package/references/openteams/examples/codebase-migration/team.yaml +0 -81
  1079. package/references/openteams/examples/docs-sync/roles/adr-writer.yaml +0 -7
  1080. package/references/openteams/examples/docs-sync/roles/api-doc-writer.yaml +0 -7
  1081. package/references/openteams/examples/docs-sync/roles/change-detector.yaml +0 -7
  1082. package/references/openteams/examples/docs-sync/roles/doc-reviewer.yaml +0 -7
  1083. package/references/openteams/examples/docs-sync/roles/guide-writer.yaml +0 -7
  1084. package/references/openteams/examples/docs-sync/team.yaml +0 -84
  1085. package/references/openteams/examples/gsd/prompts/codebase-mapper/ROLE.md +0 -17
  1086. package/references/openteams/examples/gsd/prompts/codebase-mapper/SOUL.md +0 -5
  1087. package/references/openteams/examples/gsd/prompts/debugger/ROLE.md +0 -25
  1088. package/references/openteams/examples/gsd/prompts/debugger/SOUL.md +0 -5
  1089. package/references/openteams/examples/gsd/prompts/executor/ROLE.md +0 -34
  1090. package/references/openteams/examples/gsd/prompts/executor/SOUL.md +0 -5
  1091. package/references/openteams/examples/gsd/prompts/integration-checker/ROLE.md +0 -18
  1092. package/references/openteams/examples/gsd/prompts/integration-checker/SOUL.md +0 -3
  1093. package/references/openteams/examples/gsd/prompts/orchestrator/ROLE.md +0 -42
  1094. package/references/openteams/examples/gsd/prompts/orchestrator/SOUL.md +0 -5
  1095. package/references/openteams/examples/gsd/prompts/phase-researcher/ROLE.md +0 -15
  1096. package/references/openteams/examples/gsd/prompts/phase-researcher/SOUL.md +0 -3
  1097. package/references/openteams/examples/gsd/prompts/plan-checker/ROLE.md +0 -17
  1098. package/references/openteams/examples/gsd/prompts/plan-checker/SOUL.md +0 -3
  1099. package/references/openteams/examples/gsd/prompts/planner/ROLE.md +0 -28
  1100. package/references/openteams/examples/gsd/prompts/planner/SOUL.md +0 -5
  1101. package/references/openteams/examples/gsd/prompts/project-researcher/ROLE.md +0 -16
  1102. package/references/openteams/examples/gsd/prompts/project-researcher/SOUL.md +0 -3
  1103. package/references/openteams/examples/gsd/prompts/research-synthesizer/ROLE.md +0 -13
  1104. package/references/openteams/examples/gsd/prompts/research-synthesizer/SOUL.md +0 -3
  1105. package/references/openteams/examples/gsd/prompts/roadmapper/ROLE.md +0 -14
  1106. package/references/openteams/examples/gsd/prompts/roadmapper/SOUL.md +0 -3
  1107. package/references/openteams/examples/gsd/prompts/verifier/ROLE.md +0 -19
  1108. package/references/openteams/examples/gsd/prompts/verifier/SOUL.md +0 -5
  1109. package/references/openteams/examples/gsd/roles/codebase-mapper.yaml +0 -8
  1110. package/references/openteams/examples/gsd/roles/debugger.yaml +0 -8
  1111. package/references/openteams/examples/gsd/roles/executor.yaml +0 -8
  1112. package/references/openteams/examples/gsd/roles/integration-checker.yaml +0 -8
  1113. package/references/openteams/examples/gsd/roles/orchestrator.yaml +0 -9
  1114. package/references/openteams/examples/gsd/roles/phase-researcher.yaml +0 -7
  1115. package/references/openteams/examples/gsd/roles/plan-checker.yaml +0 -8
  1116. package/references/openteams/examples/gsd/roles/planner.yaml +0 -8
  1117. package/references/openteams/examples/gsd/roles/project-researcher.yaml +0 -8
  1118. package/references/openteams/examples/gsd/roles/research-synthesizer.yaml +0 -7
  1119. package/references/openteams/examples/gsd/roles/roadmapper.yaml +0 -7
  1120. package/references/openteams/examples/gsd/roles/verifier.yaml +0 -8
  1121. package/references/openteams/examples/gsd/team.yaml +0 -154
  1122. package/references/openteams/examples/incident-response/roles/communicator.yaml +0 -5
  1123. package/references/openteams/examples/incident-response/roles/fix-proposer.yaml +0 -7
  1124. package/references/openteams/examples/incident-response/roles/incident-triager.yaml +0 -8
  1125. package/references/openteams/examples/incident-response/roles/investigator.yaml +0 -8
  1126. package/references/openteams/examples/incident-response/team.yaml +0 -68
  1127. package/references/openteams/examples/pr-review-checks/roles/code-reviewer.yaml +0 -7
  1128. package/references/openteams/examples/pr-review-checks/roles/security-scanner.yaml +0 -6
  1129. package/references/openteams/examples/pr-review-checks/roles/summarizer.yaml +0 -6
  1130. package/references/openteams/examples/pr-review-checks/roles/test-checker.yaml +0 -8
  1131. package/references/openteams/examples/pr-review-checks/team.yaml +0 -64
  1132. package/references/openteams/examples/security-audit/roles/code-analyzer.yaml +0 -6
  1133. package/references/openteams/examples/security-audit/roles/dep-scanner.yaml +0 -7
  1134. package/references/openteams/examples/security-audit/roles/fixer.yaml +0 -9
  1135. package/references/openteams/examples/security-audit/roles/pr-creator.yaml +0 -6
  1136. package/references/openteams/examples/security-audit/roles/prioritizer.yaml +0 -6
  1137. package/references/openteams/examples/security-audit/roles/secrets-scanner.yaml +0 -6
  1138. package/references/openteams/examples/security-audit/roles/verifier.yaml +0 -8
  1139. package/references/openteams/examples/security-audit/team.yaml +0 -102
  1140. package/references/openteams/media/banner.png +0 -0
  1141. package/references/openteams/media/editor.png +0 -0
  1142. package/references/openteams/package-lock.json +0 -4804
  1143. package/references/openteams/package.json +0 -58
  1144. package/references/openteams/schema/role.schema.json +0 -147
  1145. package/references/openteams/schema/team.schema.json +0 -311
  1146. package/references/openteams/src/cli/editor.ts +0 -170
  1147. package/references/openteams/src/cli/generate.test.ts +0 -191
  1148. package/references/openteams/src/cli/generate.ts +0 -242
  1149. package/references/openteams/src/cli/prompt-utils.ts +0 -42
  1150. package/references/openteams/src/cli/template.test.ts +0 -365
  1151. package/references/openteams/src/cli/template.ts +0 -205
  1152. package/references/openteams/src/cli.ts +0 -22
  1153. package/references/openteams/src/generators/agent-prompt-generator.test.ts +0 -426
  1154. package/references/openteams/src/generators/agent-prompt-generator.ts +0 -556
  1155. package/references/openteams/src/generators/package-generator.test.ts +0 -129
  1156. package/references/openteams/src/generators/package-generator.ts +0 -110
  1157. package/references/openteams/src/generators/skill-generator.test.ts +0 -274
  1158. package/references/openteams/src/generators/skill-generator.ts +0 -394
  1159. package/references/openteams/src/index.ts +0 -84
  1160. package/references/openteams/src/template/builtins.test.ts +0 -74
  1161. package/references/openteams/src/template/builtins.ts +0 -108
  1162. package/references/openteams/src/template/install-service.test.ts +0 -452
  1163. package/references/openteams/src/template/install-service.ts +0 -332
  1164. package/references/openteams/src/template/loader.test.ts +0 -1696
  1165. package/references/openteams/src/template/loader.ts +0 -804
  1166. package/references/openteams/src/template/resolver.test.ts +0 -304
  1167. package/references/openteams/src/template/resolver.ts +0 -251
  1168. package/references/openteams/src/template/types.ts +0 -229
  1169. package/references/openteams/tsconfig.cjs.json +0 -7
  1170. package/references/openteams/tsconfig.esm.json +0 -8
  1171. package/references/openteams/tsconfig.json +0 -16
  1172. package/references/openteams/vitest.config.ts +0 -9
  1173. package/references/sessionlog/.husky/pre-commit +0 -1
  1174. package/references/sessionlog/.lintstagedrc.json +0 -4
  1175. package/references/sessionlog/.prettierignore +0 -4
  1176. package/references/sessionlog/.prettierrc.json +0 -11
  1177. package/references/sessionlog/LICENSE +0 -21
  1178. package/references/sessionlog/README.md +0 -453
  1179. package/references/sessionlog/eslint.config.js +0 -58
  1180. package/references/sessionlog/package-lock.json +0 -3672
  1181. package/references/sessionlog/package.json +0 -65
  1182. package/references/sessionlog/src/__tests__/agent-hooks.test.ts +0 -570
  1183. package/references/sessionlog/src/__tests__/agent-registry.test.ts +0 -127
  1184. package/references/sessionlog/src/__tests__/claude-code-hooks.test.ts +0 -225
  1185. package/references/sessionlog/src/__tests__/claude-generator.test.ts +0 -46
  1186. package/references/sessionlog/src/__tests__/commit-msg.test.ts +0 -86
  1187. package/references/sessionlog/src/__tests__/cursor-agent.test.ts +0 -224
  1188. package/references/sessionlog/src/__tests__/e2e-live.test.ts +0 -890
  1189. package/references/sessionlog/src/__tests__/event-log.test.ts +0 -183
  1190. package/references/sessionlog/src/__tests__/flush-sentinel.test.ts +0 -105
  1191. package/references/sessionlog/src/__tests__/gemini-agent.test.ts +0 -375
  1192. package/references/sessionlog/src/__tests__/git-hooks.test.ts +0 -78
  1193. package/references/sessionlog/src/__tests__/hook-managers.test.ts +0 -121
  1194. package/references/sessionlog/src/__tests__/lifecycle-tasks.test.ts +0 -759
  1195. package/references/sessionlog/src/__tests__/opencode-agent.test.ts +0 -338
  1196. package/references/sessionlog/src/__tests__/redaction.test.ts +0 -136
  1197. package/references/sessionlog/src/__tests__/session-repo.test.ts +0 -353
  1198. package/references/sessionlog/src/__tests__/session-store.test.ts +0 -166
  1199. package/references/sessionlog/src/__tests__/setup-ccweb.test.ts +0 -466
  1200. package/references/sessionlog/src/__tests__/skill-live.test.ts +0 -461
  1201. package/references/sessionlog/src/__tests__/summarize.test.ts +0 -348
  1202. package/references/sessionlog/src/__tests__/task-plan-e2e.test.ts +0 -610
  1203. package/references/sessionlog/src/__tests__/task-plan-live.test.ts +0 -632
  1204. package/references/sessionlog/src/__tests__/transcript-timestamp.test.ts +0 -121
  1205. package/references/sessionlog/src/__tests__/types.test.ts +0 -166
  1206. package/references/sessionlog/src/__tests__/utils.test.ts +0 -333
  1207. package/references/sessionlog/src/__tests__/validation.test.ts +0 -103
  1208. package/references/sessionlog/src/__tests__/worktree.test.ts +0 -57
  1209. package/references/sessionlog/src/agent/registry.ts +0 -143
  1210. package/references/sessionlog/src/agent/session-types.ts +0 -113
  1211. package/references/sessionlog/src/agent/types.ts +0 -220
  1212. package/references/sessionlog/src/cli.ts +0 -597
  1213. package/references/sessionlog/src/commands/clean.ts +0 -133
  1214. package/references/sessionlog/src/commands/disable.ts +0 -84
  1215. package/references/sessionlog/src/commands/doctor.ts +0 -145
  1216. package/references/sessionlog/src/commands/enable.ts +0 -202
  1217. package/references/sessionlog/src/commands/explain.ts +0 -261
  1218. package/references/sessionlog/src/commands/reset.ts +0 -105
  1219. package/references/sessionlog/src/commands/resume.ts +0 -180
  1220. package/references/sessionlog/src/commands/rewind.ts +0 -195
  1221. package/references/sessionlog/src/commands/setup-ccweb.ts +0 -275
  1222. package/references/sessionlog/src/commands/status.ts +0 -172
  1223. package/references/sessionlog/src/config.ts +0 -165
  1224. package/references/sessionlog/src/events/event-log.ts +0 -126
  1225. package/references/sessionlog/src/git-operations.ts +0 -558
  1226. package/references/sessionlog/src/hooks/git-hooks.ts +0 -165
  1227. package/references/sessionlog/src/hooks/lifecycle.ts +0 -391
  1228. package/references/sessionlog/src/index.ts +0 -650
  1229. package/references/sessionlog/src/security/redaction.ts +0 -283
  1230. package/references/sessionlog/src/session/state-machine.ts +0 -452
  1231. package/references/sessionlog/src/store/checkpoint-store.ts +0 -509
  1232. package/references/sessionlog/src/store/native-store.ts +0 -173
  1233. package/references/sessionlog/src/store/provider-types.ts +0 -99
  1234. package/references/sessionlog/src/store/session-store.ts +0 -266
  1235. package/references/sessionlog/src/strategy/attribution.ts +0 -296
  1236. package/references/sessionlog/src/strategy/common.ts +0 -207
  1237. package/references/sessionlog/src/strategy/content-overlap.ts +0 -228
  1238. package/references/sessionlog/src/strategy/manual-commit.ts +0 -988
  1239. package/references/sessionlog/src/strategy/types.ts +0 -279
  1240. package/references/sessionlog/src/summarize/claude-generator.ts +0 -115
  1241. package/references/sessionlog/src/summarize/summarize.ts +0 -432
  1242. package/references/sessionlog/src/types.ts +0 -508
  1243. package/references/sessionlog/src/utils/chunk-files.ts +0 -49
  1244. package/references/sessionlog/src/utils/commit-message.ts +0 -65
  1245. package/references/sessionlog/src/utils/detect-agent.ts +0 -36
  1246. package/references/sessionlog/src/utils/hook-managers.ts +0 -125
  1247. package/references/sessionlog/src/utils/ide-tags.ts +0 -32
  1248. package/references/sessionlog/src/utils/paths.ts +0 -79
  1249. package/references/sessionlog/src/utils/preview-rewind.ts +0 -80
  1250. package/references/sessionlog/src/utils/rewind-conflict.ts +0 -121
  1251. package/references/sessionlog/src/utils/shadow-branch.ts +0 -109
  1252. package/references/sessionlog/src/utils/string-utils.ts +0 -46
  1253. package/references/sessionlog/src/utils/todo-extract.ts +0 -188
  1254. package/references/sessionlog/src/utils/trailers.ts +0 -187
  1255. package/references/sessionlog/src/utils/transcript-parse.ts +0 -177
  1256. package/references/sessionlog/src/utils/transcript-timestamp.ts +0 -59
  1257. package/references/sessionlog/src/utils/tree-ops.ts +0 -219
  1258. package/references/sessionlog/src/utils/tty.ts +0 -72
  1259. package/references/sessionlog/src/utils/validation.ts +0 -65
  1260. package/references/sessionlog/src/utils/worktree.ts +0 -58
  1261. package/references/sessionlog/src/wire-types.ts +0 -59
  1262. package/references/sessionlog/templates/setup-env.sh +0 -153
  1263. package/references/sessionlog/tsconfig.json +0 -18
  1264. package/references/sessionlog/vitest.config.ts +0 -12
  1265. package/references/skill-tree/.claude/settings.json +0 -6
  1266. package/references/skill-tree/.sudocode/issues.jsonl +0 -19
  1267. package/references/skill-tree/.sudocode/specs.jsonl +0 -3
  1268. package/references/skill-tree/CLAUDE.md +0 -132
  1269. package/references/skill-tree/README.md +0 -396
  1270. package/references/skill-tree/docs/GAPS_v1.md +0 -221
  1271. package/references/skill-tree/docs/INTEGRATION_PLAN.md +0 -467
  1272. package/references/skill-tree/docs/TODOS.md +0 -91
  1273. package/references/skill-tree/docs/anthropic_skill_guide.md +0 -1364
  1274. package/references/skill-tree/docs/design/federated-skill-trees.md +0 -524
  1275. package/references/skill-tree/docs/design/multi-agent-sync.md +0 -759
  1276. package/references/skill-tree/docs/scraper/BRAINSTORM.md +0 -583
  1277. package/references/skill-tree/docs/scraper/POC_PLAN.md +0 -420
  1278. package/references/skill-tree/docs/scraper/README.md +0 -170
  1279. package/references/skill-tree/examples/basic-usage.ts +0 -157
  1280. package/references/skill-tree/package-lock.json +0 -1852
  1281. package/references/skill-tree/package.json +0 -66
  1282. package/references/skill-tree/plan.md +0 -78
  1283. package/references/skill-tree/scraper/README.md +0 -123
  1284. package/references/skill-tree/scraper/docs/DESIGN.md +0 -683
  1285. package/references/skill-tree/scraper/docs/PLAN.md +0 -336
  1286. package/references/skill-tree/scraper/drizzle.config.ts +0 -10
  1287. package/references/skill-tree/scraper/package-lock.json +0 -6329
  1288. package/references/skill-tree/scraper/package.json +0 -68
  1289. package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-description.md +0 -7
  1290. package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-name.md +0 -7
  1291. package/references/skill-tree/scraper/test/fixtures/minimal-skill/SKILL.md +0 -27
  1292. package/references/skill-tree/scraper/test/fixtures/skill-json/SKILL.json +0 -21
  1293. package/references/skill-tree/scraper/test/fixtures/skill-with-meta/SKILL.md +0 -54
  1294. package/references/skill-tree/scraper/test/fixtures/skill-with-meta/_meta.json +0 -24
  1295. package/references/skill-tree/scraper/test/fixtures/valid-skill/SKILL.md +0 -93
  1296. package/references/skill-tree/scraper/test/fixtures/valid-skill/_meta.json +0 -22
  1297. package/references/skill-tree/scraper/tsup.config.ts +0 -14
  1298. package/references/skill-tree/scraper/vitest.config.ts +0 -17
  1299. package/references/skill-tree/scripts/convert-to-vitest.ts +0 -166
  1300. package/references/skill-tree/skills/skill-writer/SKILL.md +0 -339
  1301. package/references/skill-tree/skills/skill-writer/references/examples.md +0 -326
  1302. package/references/skill-tree/skills/skill-writer/references/patterns.md +0 -210
  1303. package/references/skill-tree/skills/skill-writer/references/quality-checklist.md +0 -123
  1304. package/references/skill-tree/test/run-all.ts +0 -106
  1305. package/references/skill-tree/test/utils.ts +0 -128
  1306. package/references/skill-tree/vitest.config.ts +0 -16
  1307. package/references/swarmkit/LICENSE +0 -21
  1308. package/references/swarmkit/README.md +0 -130
  1309. package/references/swarmkit/docs/design.md +0 -453
  1310. package/references/swarmkit/docs/package-setup-reference.md +0 -519
  1311. package/references/swarmkit/package-lock.json +0 -1938
  1312. package/references/swarmkit/package.json +0 -43
  1313. package/references/swarmkit/src/cli.ts +0 -41
  1314. package/references/swarmkit/src/commands/add.ts +0 -126
  1315. package/references/swarmkit/src/commands/doctor.ts +0 -117
  1316. package/references/swarmkit/src/commands/hive.ts +0 -279
  1317. package/references/swarmkit/src/commands/init/phases/configure.ts +0 -74
  1318. package/references/swarmkit/src/commands/init/phases/global-setup.ts +0 -104
  1319. package/references/swarmkit/src/commands/init/phases/packages.ts +0 -44
  1320. package/references/swarmkit/src/commands/init/phases/project.ts +0 -81
  1321. package/references/swarmkit/src/commands/init/phases/use-case.ts +0 -47
  1322. package/references/swarmkit/src/commands/init/state.test.ts +0 -23
  1323. package/references/swarmkit/src/commands/init/state.ts +0 -22
  1324. package/references/swarmkit/src/commands/init/wizard.ts +0 -160
  1325. package/references/swarmkit/src/commands/init.ts +0 -17
  1326. package/references/swarmkit/src/commands/login.ts +0 -106
  1327. package/references/swarmkit/src/commands/logout.ts +0 -22
  1328. package/references/swarmkit/src/commands/remove.ts +0 -72
  1329. package/references/swarmkit/src/commands/status.ts +0 -101
  1330. package/references/swarmkit/src/commands/update.ts +0 -62
  1331. package/references/swarmkit/src/commands/whoami.ts +0 -41
  1332. package/references/swarmkit/src/config/global.test.ts +0 -258
  1333. package/references/swarmkit/src/config/global.ts +0 -141
  1334. package/references/swarmkit/src/config/keys.test.ts +0 -109
  1335. package/references/swarmkit/src/config/keys.ts +0 -49
  1336. package/references/swarmkit/src/doctor/checks.test.ts +0 -366
  1337. package/references/swarmkit/src/doctor/checks.ts +0 -292
  1338. package/references/swarmkit/src/doctor/types.ts +0 -33
  1339. package/references/swarmkit/src/hub/auth-flow.test.ts +0 -127
  1340. package/references/swarmkit/src/hub/auth-flow.ts +0 -144
  1341. package/references/swarmkit/src/hub/client.test.ts +0 -224
  1342. package/references/swarmkit/src/hub/client.ts +0 -185
  1343. package/references/swarmkit/src/hub/credentials.test.ts +0 -132
  1344. package/references/swarmkit/src/hub/credentials.ts +0 -51
  1345. package/references/swarmkit/src/index.ts +0 -116
  1346. package/references/swarmkit/src/packages/installer.test.ts +0 -365
  1347. package/references/swarmkit/src/packages/installer.ts +0 -206
  1348. package/references/swarmkit/src/packages/plugin.test.ts +0 -141
  1349. package/references/swarmkit/src/packages/plugin.ts +0 -46
  1350. package/references/swarmkit/src/packages/registry.test.ts +0 -235
  1351. package/references/swarmkit/src/packages/registry.ts +0 -209
  1352. package/references/swarmkit/src/packages/setup.test.ts +0 -1395
  1353. package/references/swarmkit/src/packages/setup.ts +0 -671
  1354. package/references/swarmkit/src/utils/ui.test.ts +0 -115
  1355. package/references/swarmkit/src/utils/ui.ts +0 -62
  1356. package/references/swarmkit/tsconfig.json +0 -17
  1357. package/references/swarmkit/vitest.config.ts +0 -9
@@ -1,1156 +0,0 @@
1
- # Agent Inbox: MAP-Native Agent Message Router
2
-
3
- ## Problem Statement
4
-
5
- Multi-agent coding workflows (like [claude-code-swarm](https://github.com/alexngai/claude-code-swarm)) need structured inter-agent messaging that works across process and federation boundaries. Today, agents within a swarm coordinate via native team primitives (SendMessage, TaskCreate) for in-process communication, and use MAP sidecars for external observability. But there's a gap:
6
-
7
- 1. **Cross-process messaging** — Agents in different Claude Code sessions (different repos, different machines) can't message each other. The MAP sidecar broadcasts events but doesn't provide structured inbox/routing.
8
-
9
- 2. **Structured message handling** — MAP provides transport (WebSocket, scopes, send/receive), but doesn't define inbox semantics, message threading, read tracking, or delivery guarantees. Agents need more than raw message passing.
10
-
11
- 3. **Federation** — Different swarm instances, potentially on different networks, need to exchange messages with identity resolution and trust.
12
-
13
- **Agent Inbox** fills this gap: a MAP-native message router that provides structured inbox/outbox semantics on top of MAP's transport and identity primitives. It connects to MAP servers (like the one in agentic-mesh or claude-code-swarm's sidecar) and adds the routing, threading, and delivery layer that agents need for real coordination.
14
-
15
- ---
16
-
17
- ## Design Goals
18
-
19
- 1. **MAP-native**: Built on MAP's agent identity, scoping, and messaging primitives — not a parallel system
20
- 2. **Federation-first**: Cross-process and cross-instance messaging is the primary use case, not an afterthought
21
- 3. **Structured messaging**: Inboxes, threading, read tracking, delivery confirmation — beyond raw MAP send/receive
22
- 4. **Agent-friendly interface**: MCP tools that any coding agent can call naturally
23
- 5. **Traceability via MAP conventions**: Conversations, turns, and threads follow MAP's mail spec for observability
24
- 6. **Progressive complexity**: Simple send/receive works immediately; threading, conversations, and federation are opt-in
25
-
26
- ---
27
-
28
- ## Architecture Overview
29
-
30
- Agent Inbox and the MAP sidecar are **independent services**, each with its own MAP connection and its own responsibilities. The **plugin layer** (`map-events.mjs` in claude-code-swarm) acts as the router — dispatching lifecycle commands to the sidecar and messaging commands to Agent Inbox. No event bus is needed.
31
-
32
- ```
33
- ┌─────────────────────────────────────────────────────────────────────────────┐
34
- │ Local System (one machine) │
35
- │ │
36
- │ ┌───────────────────────────────────────────────────────────────────────┐ │
37
- │ │ Claude Code Session │ │
38
- │ │ │ │
39
- │ │ Hooks (SessionStart, PreToolUse, PostToolUse, etc.) │ │
40
- │ │ │ │ │
41
- │ │ └─ Plugin (map-hook.mjs / map-events.mjs) │ │
42
- │ │ │ │ │
43
- │ │ ├─ spawn/done/state/trajectory ──► sendToSidecar() │ │
44
- │ │ │ │ │
45
- │ │ └─ send/emit (messaging) ────────► sendToInbox() │ │
46
- │ └───────────┬──────────────────────────────────────┬────────────────────┘ │
47
- │ │ │ │
48
- │ ┌──────────▼──────────┐ ┌──────────▼──────────────┐ │
49
- │ │ MAP Sidecar │ │ Agent Inbox │ │
50
- │ │ │ │ │ │
51
- │ │ Receives from │ │ Receives from │ │
52
- │ │ plugin: │ │ plugin: │ │
53
- │ │ spawn/done/state │ │ send (messaging) │ │
54
- │ │ trajectory │ │ agent notifications │ │
55
- │ │ ping │ │ (spawn/done events) │ │
56
- │ │ │ │ │ │
57
- │ │ Owns: │ │ Owns: │ │
58
- │ │ Hook IPC (UNIX) │ │ Inbox/outbox mgmt │ │
59
- │ │ Agent lifecycle │ │ Message routing │ │
60
- │ │ Trajectory sync │ │ Threading │ │
61
- │ │ Process mgmt │ │ Delivery tracking │ │
62
- │ │ │ │ Traceability │ │
63
- │ │ │ │ Federation │ │
64
- │ │ │ │ MCP tools interface │ │
65
- │ │ │ │ MAP JSON-RPC │ │
66
- │ └──────────┬───────────┘ └──────────┬───────────────┘ │
67
- │ │ │ │
68
- │ MAP Connection MAP Connection(s) │
69
- │ (local server) (local + remote) │
70
- │ │ │ │
71
- └──────────────┼─────────────────────────────────────────┼─────────────────────┘
72
- │ │
73
- ┌──────▼──────┐ ┌─────────────▼─────────────┐
74
- │ MAP Server │ │ MAP Server(s) │
75
- │ (local) │ │ (local + remote/federated)│
76
- └─────────────┘ └───────────────────────────┘
77
- ```
78
-
79
- ### Plugin-as-Router Pattern
80
-
81
- The claude-code-swarm plugin (`map-events.mjs`) already dispatches commands by type. Today, all commands go to the sidecar. With Agent Inbox, the plugin gains a second dispatch target:
82
-
83
- ```
84
- Hooks → Plugin (map-hook.mjs / map-events.mjs)
85
-
86
- ├─ spawn/done/state/trajectory → sendToSidecar() → Sidecar → MAP (lifecycle)
87
-
88
- └─ send/emit (messaging) ──────→ sendToInbox() → Agent Inbox → MAP (messaging)
89
- ```
90
-
91
- The plugin also notifies Agent Inbox about agent lifecycle events (spawn/done) so it can maintain its agent registry. This is a lightweight notification — not a bus subscription — just a `sendToInbox({ action: "notify", event: ... })` alongside the existing `sendToSidecar()` call.
92
-
93
- ```typescript
94
- // In map-events.mjs — sendCommand() gains a second dispatch path
95
-
96
- export async function sendCommand(config, command, sessionId) {
97
- const sPaths = sessionPaths(sessionId);
98
-
99
- if (command.action === "send" || command.action === "emit") {
100
- // Messaging commands → Agent Inbox
101
- const sent = await sendToInbox(command, inboxSocketPath(sessionId));
102
- if (!sent) {
103
- // Fall back to sidecar (existing behavior)
104
- await sendToSidecar(command, sPaths.socketPath);
105
- }
106
- return;
107
- }
108
-
109
- // Lifecycle commands → Sidecar (existing behavior)
110
- const sent = await sendToSidecar(command, sPaths.socketPath);
111
- if (!sent) {
112
- const recovered = await ensureSidecar(config, sessionId);
113
- if (recovered) {
114
- await sendToSidecar(command, sPaths.socketPath);
115
- } else if (command.action === "emit") {
116
- await fireAndForget(config, command.event);
117
- }
118
- }
119
-
120
- // Also notify Agent Inbox about lifecycle events (for registry)
121
- if (command.action === "spawn" || command.action === "done") {
122
- await sendToInbox(
123
- { action: "notify", event: { type: `agent.${command.action}`, ...command } },
124
- inboxSocketPath(sessionId)
125
- );
126
- }
127
- }
128
- ```
129
-
130
- ### Why Two MAP Connections? Concern-Based Split
131
-
132
- The sidecar and Agent Inbox each maintain their own MAP connection(s) because the **nature of their traffic is fundamentally different**:
133
-
134
- **Sidecar's MAP connection — lifecycle & observability:**
135
- - `conn.spawn()` / `conn.done()` — agent registration/unregistration
136
- - `conn.updateState()` — idle/active state changes
137
- - `conn.send({ scope }, payload)` — broadcast task lifecycle events (`task.dispatched`, `task.completed`, `task.sync`)
138
- - `conn.callExtension("trajectory/checkpoint")` — trajectory reporting
139
- - These are **fire-and-forget observability events**. If they fail, the swarm keeps working. The sidecar already has fallback logic for this (fire-and-forget via ephemeral connections).
140
-
141
- **Agent Inbox's MAP connection(s) — messaging & mail:**
142
- - `conn.send(target, message)` — routed message delivery to specific agents
143
- - Receiving incoming messages addressed to local agents
144
- - MAP `mail/*` operations (conversations, turns, threads)
145
- - Federation connections to remote MAP servers
146
- - These are **structured communications that need tracking**. Delivery matters. Messages are stored, threaded, and tracked.
147
-
148
- | | Sidecar traffic | Agent Inbox traffic |
149
- |---|---|---|
150
- | **Pattern** | Broadcast / fire-and-forget | Targeted / tracked delivery |
151
- | **Failure mode** | Silently drop | Queue and retry |
152
- | **Recipients** | Scope (all observers) | Specific agent(s) |
153
- | **Persistence** | Ephemeral | Stored in inbox |
154
- | **Threading** | None | Conversations, reply chains |
155
- | **Federation** | No | Yes (remote MAP servers) |
156
-
157
- Two connections to the same local MAP server is fine — they're doing different things. Agent Inbox additionally connects to **remote** MAP servers for federation, which the sidecar has no involvement in.
158
-
159
- ### MAP Connection Ownership Summary
160
-
161
- ```
162
- Sidecar MAP connection: Agent Inbox MAP connection(s):
163
- conn.spawn() conn.send(target, message) ← message delivery
164
- conn.done() conn.onMessage() ← message receiving
165
- conn.updateState() mail/* operations
166
- conn.send({ scope }, event) Federation to remote servers
167
- conn.callExtension(trajectory)
168
- ```
169
-
170
- ### Standalone Mode
171
-
172
- Agent Inbox also works **without a sidecar** — for non-swarm use cases, direct MCP tool usage, or testing. It has its own MAP connection and its own MCP tools interface. The sidecar is an integration point for Claude Code hooks, not a dependency.
173
-
174
- ### How Agent Inbox Learns About Agents
175
-
176
- Without an event bus, Agent Inbox needs another way to know which agents exist. Two complementary mechanisms:
177
-
178
- 1. **Plugin notifications**: The plugin sends lightweight `notify` commands to Agent Inbox on `spawn`/`done` events. Agent Inbox updates its agent registry.
179
-
180
- 2. **MAP server query** (startup hydration): On startup, Agent Inbox can query the MAP server for currently registered agents to hydrate its registry. This handles the case where Agent Inbox starts after agents are already spawned.
181
-
182
- 3. **Auto-registration**: Agents are automatically registered on their first `check_inbox` call or via the `SessionStart` hook (`hooks/register-hook.mjs`), which is the primary path for non-swarm use cases.
183
-
184
- ```typescript
185
- // Agent Inbox command handler for lifecycle notifications from the plugin
186
- case "notify":
187
- if (command.event.type === "agent.spawn") {
188
- await storage.putAgent({
189
- agent_id: command.event.agent.agentId,
190
- display_name: command.event.agent.name,
191
- scope: command.event.agent.scopes?.[0],
192
- status: "active",
193
- metadata: command.event.agent.metadata,
194
- registered_at: new Date().toISOString(),
195
- last_active_at: new Date().toISOString(),
196
- });
197
- } else if (command.event.type === "agent.done") {
198
- const agent = await storage.getAgent(command.event.agentId);
199
- if (agent) {
200
- agent.status = "offline";
201
- await storage.putAgent(agent);
202
- }
203
- }
204
- break;
205
- ```
206
-
207
- ### How Agent Inbox Processes Messages
208
-
209
- ```typescript
210
- // Agent Inbox receives messaging commands from the plugin via UNIX socket
211
- case "send":
212
- // 1. Create a Message record with tracking metadata
213
- const message = await storage.putMessage({
214
- id: ulid(),
215
- scope: command.scope || defaultScope,
216
- sender_id: command.from || sidecarAgentId,
217
- recipients: resolveRecipients(command.to),
218
- content: normalizeContent(command.payload),
219
- thread_tag: command.threadTag,
220
- in_reply_to: command.inReplyTo,
221
- created_at: new Date().toISOString(),
222
- });
223
-
224
- // 2. Route to recipients via Agent Inbox's OWN MAP connection
225
- for (const recipient of message.recipients) {
226
- if (isLocal(recipient.agent_id)) {
227
- await mapConn.send(recipient.agent_id, {
228
- messageId: message.id,
229
- from: message.sender_id,
230
- content: message.content,
231
- threadTag: message.thread_tag,
232
- conversationId: message.conversation_id,
233
- });
234
- recipient.delivered_at = new Date().toISOString();
235
- } else {
236
- // Remote delivery via federated MAP connection
237
- await federatedConn.send(recipient.agent_id, message);
238
- }
239
- }
240
-
241
- // 3. Record in traceability layer
242
- traceability.recordTurn(message);
243
- break;
244
-
245
- // Agent Inbox also receives messages on its MAP connection (from other agents/servers)
246
- mapConn.onMessage(async (msg) => {
247
- // Store in recipient's inbox
248
- const message = await storage.putMessage(normalizeIncoming(msg));
249
-
250
- // Write to the local inbox.jsonl for Claude's context injection
251
- writeToInbox({
252
- from: message.sender_id,
253
- payload: message.content,
254
- timestamp: message.created_at,
255
- messageId: message.id,
256
- conversationId: message.conversation_id,
257
- }, inboxPath);
258
-
259
- // Record in traceability
260
- traceability.recordTurn(message);
261
- });
262
- ```
263
-
264
- ---
265
-
266
- ## Relationship to MAP
267
-
268
- Agent Inbox is **not** a MAP server. It's a MAP **client** that connects to one or more MAP servers and provides higher-level messaging semantics.
269
-
270
- ```
271
- MAP Server = transport + identity + scoping + raw send/receive
272
- Agent Inbox = inbox routing + threading + delivery + traceability
273
- ```
274
-
275
- | Concern | Handled by MAP Server | Handled by Agent Inbox |
276
- |---------|----------------------|----------------------|
277
- | Agent identity & registration | Yes (spawn, agentId) | Uses MAP's identity primitives |
278
- | Scoping / namespaces | Yes (scopes) | Maps scopes to workspaces |
279
- | Raw message send/receive | Yes (conn.send) | Wraps with inbox/routing semantics |
280
- | Message threading | No | Yes (thread_tag, in_reply_to, conversations) |
281
- | Inbox / read tracking | No | Yes (per-agent inbox, read_at, ack_at) |
282
- | Delivery confirmation | No | Yes (delivered_at, read receipts) |
283
- | Cross-server routing | No (single server) | Yes (connected to multiple MAP servers) |
284
- | Traceability (mail/*) | Partial (events) | Full (conversations, turns, threads, replay) |
285
- | Message persistence | No (ephemeral) | Yes (in-memory or SQLite) |
286
-
287
- ### MAP Identity Primitives
288
-
289
- Agent Inbox uses MAP's agent identity system rather than inventing its own:
290
-
291
- - **agentId**: MAP's unique agent identifier — used as the primary identity
292
- - **Scopes**: MAP's namespace mechanism — used as workspace equivalent
293
- - **spawn/unregister**: MAP's agent lifecycle — Agent Inbox observes these
294
- - **Display names**: Optional memorable names layered on top of MAP agentIds for human readability
295
-
296
- Identity persistence is left to the connecting client. A client can reconnect with the same `agentId` to reclaim its inbox, or register fresh. Agent Inbox doesn't force a persistence model.
297
-
298
- ---
299
-
300
- ## Data Model
301
-
302
- ### Messaging Entities
303
-
304
- ```
305
- ┌──────────────────────────────────────────────────────────────────┐
306
- │ Agent │
307
- │ agent_id: string ← MAP agentId │
308
- │ display_name?: string (memorable, e.g. "GreenCastle") │
309
- │ program?: string (e.g. "claude-code", "codex") │
310
- │ model?: string (e.g. "claude-opus-4-6") │
311
- │ scope: string ← MAP scope (workspace equiv) │
312
- │ status: active | idle | offline │
313
- │ metadata: Record<string, unknown> │
314
- │ registered_at: timestamp │
315
- │ last_active_at: timestamp │
316
- └──────────────────────────────────────────────────────────────────┘
317
-
318
- ┌──────────────────────────────────────────────────────────────────┐
319
- │ Message │
320
- │ id: string (ulid) │
321
- │ scope: string ← MAP scope │
322
- │ sender_id: string ← MAP agentId │
323
- │ recipients: Recipient[] │
324
- │ subject?: string │
325
- │ content: MessageContent (see Message Format below) │
326
- │ thread_tag?: string (user-defined grouping) │
327
- │ in_reply_to?: string (message id) │
328
- │ importance: low | normal | high | urgent │
329
- │ metadata: Record<string, unknown> │
330
- │ created_at: timestamp │
331
- └──────────────────────────────────────────────────────────────────┘
332
-
333
- ┌──────────────────────────────────────────────────────────────────┐
334
- │ Recipient │
335
- │ agent_id: string ← MAP agentId │
336
- │ kind: to | cc | bcc │
337
- │ delivered_at?: timestamp │
338
- │ read_at?: timestamp │
339
- │ ack_at?: timestamp │
340
- └──────────────────────────────────────────────────────────────────┘
341
- ```
342
-
343
- ### Traceability Entities (MAP mail conventions)
344
-
345
- These follow MAP's mail specification. Agent Inbox auto-creates and maintains them from messaging events, following MAP convention: a message with a `conversationId` is added to that conversation; without one, the server groups by thread context or auto-creates.
346
-
347
- ```
348
- ┌──────────────────────────────────────────────────────────────────┐
349
- │ Conversation │
350
- │ id: string ("conv-{ulid}") ← MAP mail format │
351
- │ scope: string ← MAP scope │
352
- │ subject?: string │
353
- │ status: active | completed | archived │
354
- │ participants: Participant[] │
355
- │ metadata: Record<string, unknown> │
356
- │ created_at: timestamp │
357
- │ updated_at: timestamp │
358
- └──────────────────────────────────────────────────────────────────┘
359
-
360
- ┌──────────────────────────────────────────────────────────────────┐
361
- │ Turn │
362
- │ id: string ("turn-{ulid}") ← MAP mail format │
363
- │ conversation_id: string │
364
- │ participant_id: string ← MAP agentId │
365
- │ source_message_id?: string ← links to Message │
366
- │ content_type: text | data | event | reference | x-* │
367
- │ content: TurnContent │
368
- │ thread_id?: string │
369
- │ in_reply_to?: string (turn id) │
370
- │ created_at: timestamp │
371
- └──────────────────────────────────────────────────────────────────┘
372
-
373
- ┌──────────────────────────────────────────────────────────────────┐
374
- │ Thread │
375
- │ id: string ("thread-{ulid}") ← MAP mail format │
376
- │ conversation_id: string │
377
- │ root_turn_id: string │
378
- │ parent_thread_id?: string │
379
- │ subject?: string │
380
- │ created_at: timestamp │
381
- └──────────────────────────────────────────────────────────────────┘
382
- ```
383
-
384
- ### How the Layers Connect
385
-
386
- | Messaging Event | Traceability Record |
387
- |-----------------|---------------------|
388
- | Message sent with `conversationId` | Turn added to that Conversation |
389
- | Message sent with `thread_tag`, no `conversationId` | Turn added to Conversation auto-created for that thread_tag + scope |
390
- | Message sent with neither | Turn added to a catch-all Conversation for that scope |
391
- | Reply (message with `in_reply_to`) | Turn with `in_reply_to` in same Thread (auto-created from reply chain) |
392
- | Agent registers (observed via MAP) | Participant added to scope's active Conversations |
393
-
394
- The traceability layer **derives** its state from messaging events. It follows MAP's convention: if a message includes a `conversationId`, it's placed there; otherwise the server groups intelligently.
395
-
396
- ---
397
-
398
- ## Message Format
399
-
400
- Messages use a **structured content model** inspired by MAP's content types, with a convenient plain-text shorthand for simple cases.
401
-
402
- ### Content Structure
403
-
404
- ```typescript
405
- type MessageContent =
406
- | { type: "text"; text: string } // Markdown text
407
- | { type: "data"; schema?: string; data: unknown } // Structured data (JSON)
408
- | { type: "event"; event: string; data?: unknown } // Lifecycle/coordination event
409
- | { type: "reference"; uri: string; label?: string } // Reference to external resource
410
- | { type: string; [key: string]: unknown } // Extension types (x-*)
411
- ```
412
-
413
- ### MCP Tool Shorthand
414
-
415
- When agents use MCP tools, they can pass a plain markdown string as the body. The service layer wraps it:
416
-
417
- ```
418
- Agent calls: send_message(body="Here's the API contract...")
419
- Stored as: { type: "text", text: "Here's the API contract..." }
420
- ```
421
-
422
- For structured payloads (task assignments, status updates, etc.), agents can pass the full content object:
423
-
424
- ```
425
- Agent calls: send_message(content={ type: "data", schema: "task-assignment", data: { task: "...", assignee: "..." } })
426
- Stored as-is
427
- ```
428
-
429
- ### Extension Content Types
430
-
431
- For coordination-specific payloads, use `x-*` prefixed types:
432
-
433
- | Type | Use Case | Example |
434
- |------|----------|---------|
435
- | `x-task-dispatched` | Task delegation | `{ type: "x-task-dispatched", task: "...", assignee: "..." }` |
436
- | `x-task-completed` | Task completion | `{ type: "x-task-completed", task: "...", summary: "..." }` |
437
- | `x-status-update` | Agent status change | `{ type: "x-status-update", status: "idle", reason: "..." }` |
438
-
439
- This aligns with claude-code-swarm's existing payload types (`task.dispatched`, `task.completed`, `task.sync`) — Agent Inbox just structures them as typed content.
440
-
441
- ### Conversation Threading
442
-
443
- Threading works at two levels:
444
-
445
- 1. **thread_tag** (lightweight): A user-defined string (e.g., `"auth-sprint-1"`) that groups messages. The traceability layer auto-creates a Conversation for each unique thread_tag + scope combination. Agents just tag messages; the server handles the rest.
446
-
447
- 2. **in_reply_to** (structural): A message references another message's ID, creating a reply chain. The traceability layer auto-creates Threads within a Conversation from reply chains. Multiple reply chains in the same Conversation become separate Threads.
448
-
449
- 3. **Explicit conversations**: Agents can also create conversations directly via `mail/create` and reference the `conversationId` in messages, giving full control when needed.
450
-
451
- ---
452
-
453
- ## Messaging Patterns
454
-
455
- ### 1. Local Messaging (same MAP server / same scope)
456
-
457
- Agents connected through the same MAP server, in the same scope.
458
-
459
- ```
460
- AgentA → send_message(to="AgentB", body="...")
461
- → Agent Inbox routes locally (both in same scope on same MAP server)
462
- → Message appears in AgentB's inbox
463
- AgentB → check_inbox() → sees message
464
- AgentB → reply(in_reply_to=msg_id, body="...")
465
- ```
466
-
467
- This is the claude-code-swarm intra-team case. Today the sidecar broadcasts via `conn.send({ scope }, payload)`. With Agent Inbox, messages are routed to specific recipients with inbox tracking.
468
-
469
- ### 2. Cross-Scope Messaging (same MAP server, different scopes)
470
-
471
- Agents in different scopes (workspaces/teams) on the same MAP server.
472
-
473
- ```
474
- AgentA (scope: "frontend") → send_message(
475
- to="AgentB",
476
- to_scope="backend",
477
- body="..."
478
- )
479
- ```
480
-
481
- Agent Inbox resolves the target agent in the target scope and routes via the shared MAP server.
482
-
483
- ### 3. Cross-Server Messaging (federation)
484
-
485
- Agents on different MAP servers — different machines, different networks. Uses MAP's native `federation/connect` and `federation/route` protocol.
486
-
487
- ```
488
- AgentA (system: "frontend-team") → send_message(
489
- to="AgentC@backend-team",
490
- body="..."
491
- )
492
- ```
493
-
494
- Agent Inbox parses the `@backend-team` address, resolves it to the federation peer link, and forwards via `federation/route`. The remote Agent Inbox receives, stores, and delivers to AgentC.
495
-
496
- **Via hub (typical deployment):**
497
- ```
498
- ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐
499
- │ MAP Server │ │ Agent Inbox │ federation/route │ Central Hub │ │ │
500
- │ (frontend) │◄────►│ (gateway) │◄───────────────────►│ Agent Inbox │ │ │
501
- │ │ │ │ │ (router) │ │ │
502
- │ AgentA ─────┼─────►│ resolve @ │────────────────────►│ relay ──────┼─────►│ Agent │
503
- │ AgentB │ │ backend-team│ │ │ │ Inbox │
504
- └─────────────┘ └──────────────┘ └──────┬───────┘ │ (gateway) │
505
- │ │ │
506
- │ │ ──► AgentC │
507
- │ │ AgentD │
508
- ┌──────▼──────┐ └──────┬──────┘
509
- │ MAP Server │◄────────────┘
510
- │ (backend) │
511
- └─────────────┘
512
- ```
513
-
514
- **Direct peer (alternative):**
515
- ```
516
- ┌─────────────┐ ┌──────────────┐ federation/connect ┌──────────────┐ ┌─────────────┐
517
- │ MAP Server │ │ Agent Inbox │◄───────────────────►│ Agent Inbox │ │ MAP Server │
518
- │ (frontend) │◄────►│ (gateway) │ federation/route │ (gateway) │◄────►│ (backend) │
519
- │ │ │ │ │ │ │ │
520
- │ AgentA ─────┼─────►│ route ──────┼────────────────────►│ deliver ────┼─────►│ ──► AgentC │
521
- └─────────────┘ └──────────────┘ └──────────────┘ └─────────────┘
522
- ```
523
-
524
- ---
525
-
526
- ## MCP Tools Interface
527
-
528
- ### Agent-Facing Tools
529
-
530
- The MCP interface is intentionally minimal — 4 tools that cover all common agent messaging needs:
531
-
532
- | Tool | Description |
533
- |------|-------------|
534
- | `send_message` | Send a message to one or more agents. Supports replies (`inReplyTo`), threading (`threadTag`), and federated addressing (`agent@system`). |
535
- | `check_inbox` | Fetch unread messages for an agent. Auto-registers the agent on first call. Auto-marks messages as read. |
536
- | `read_thread` | Read all messages in a thread by `threadTag`. |
537
- | `list_agents` | List agents registered locally and optionally from federated peers. |
538
-
539
- Previously-separate tools were consolidated: `reply` is now `send_message` with `inReplyTo`, `register_agent` is handled automatically by `check_inbox`, and `acknowledge` happens implicitly on read. Conversation management tools (start_conversation, get_conversation, etc.) were removed from the agent-facing MCP interface — the traceability layer handles them internally, and they remain accessible via the MAP JSON-RPC interface for dashboards and debugging tools.
540
-
541
- ---
542
-
543
- ## MAP JSON-RPC Interface
544
-
545
- A JSON-RPC 2.0 endpoint implementing MAP's `mail/*` methods for traceability clients (dashboards, debuggers, audit tools).
546
-
547
- Methods:
548
- - `mail/create`, `mail/get`, `mail/list`, `mail/close`
549
- - `mail/join`, `mail/leave`, `mail/invite`
550
- - `mail/turn`, `mail/turns/list`
551
- - `mail/thread/create`, `mail/thread/list`
552
- - `mail/summary`, `mail/replay`
553
- - `map/subscribe` with event filtering
554
-
555
- This interface reads from the traceability layer. It can also write (e.g., a MAP client adding a turn), which flows back as a message to the target agent's inbox.
556
-
557
- ---
558
-
559
- ## claude-code-swarm Integration
560
-
561
- ### Current Architecture
562
-
563
- ```
564
- Claude Code Session
565
-
566
- ├─ Native team primitives (SendMessage, TaskCreate) ← in-process coordination
567
-
568
- └─ Hooks (lifecycle events)
569
-
570
- └─ UNIX Socket IPC
571
-
572
- └─ MAP Sidecar
573
-
574
- ├─ conn.spawn() / conn.send() / conn.updateState() ← MAP SDK
575
-
576
- └─ WebSocket ──► MAP Server
577
-
578
- └─ broadcasts to scope
579
- ```
580
-
581
- **Key sidecar commands**: `spawn`, `done`, `state`, `emit` (broadcast to scope), `send` (to target), `trajectory-checkpoint`, `ping`
582
-
583
- **Message injection**: Incoming MAP messages → `inbox.jsonl` → UserPromptSubmit hook → injected into agent context as markdown
584
-
585
- ### Proposed Architecture (plugin-as-router)
586
-
587
- The plugin layer (`map-events.mjs`) gains a second dispatch target. Lifecycle commands continue going to the sidecar. Messaging commands go to Agent Inbox. The plugin also sends lightweight lifecycle notifications to Agent Inbox so it can maintain its agent registry.
588
-
589
- ```
590
- Claude Code Session
591
-
592
- ├─ Native team primitives ← unchanged
593
-
594
- └─ Hooks
595
-
596
- └─ Plugin (map-hook.mjs / map-events.mjs)
597
-
598
- ├─ spawn/done/state/trajectory
599
- │ │
600
- │ ├─► Sidecar → MAP Server (lifecycle, via sidecar's own conn)
601
- │ │
602
- │ └─► Agent Inbox (notify: agent.spawn / agent.done)
603
- │ └─► updates agent registry
604
-
605
- └─ send/emit (messaging)
606
-
607
- ├─► Agent Inbox (primary)
608
- │ │
609
- │ ├─► store in inbox, track delivery
610
- │ ├─► route via its own MAP connection
611
- │ └─► write to inbox.jsonl for context injection
612
-
613
- └─► Sidecar (fallback, if Agent Inbox unavailable)
614
- └─► direct MAP send (existing behavior)
615
- ```
616
-
617
- ### What Changes in claude-code-swarm
618
-
619
- **map-events.mjs** — the routing layer:
620
-
621
- 1. `sendCommand()` gains routing logic: messaging commands (`send`, `emit`) go to Agent Inbox first, with fallback to sidecar
622
- 2. `spawn`/`done` commands send a lightweight notification to Agent Inbox alongside the existing sidecar dispatch
623
- 3. New `sendToInbox()` function (same UNIX socket IPC pattern as `sendToSidecar()`)
624
-
625
- ```typescript
626
- // New: Agent Inbox UNIX socket client (same pattern as sidecar-client.mjs)
627
- export function sendToInbox(command, socketPath) {
628
- return new Promise((resolve) => {
629
- const client = net.createConnection(socketPath, () => {
630
- client.write(JSON.stringify(command) + "\n");
631
- client.end();
632
- resolve(true);
633
- });
634
- client.on("error", () => resolve(false));
635
- setTimeout(() => { client.destroy(); resolve(false); }, 500);
636
- });
637
- }
638
- ```
639
-
640
- **sidecar-server.mjs** — minimal changes:
641
-
642
- 1. The `send` command handler becomes a fallback path (only used when Agent Inbox is unavailable)
643
- 2. No bus client needed — the plugin handles routing
644
-
645
- **inbox.mjs** — minor change:
646
-
647
- 1. `writeToInbox()` now receives richer data from Agent Inbox (message ID, conversation ID)
648
- 2. `formatInboxAsMarkdown()` can display threading context
649
-
650
- **map-connection.mjs** — `connectToMAP()`'s `onMessage` handler becomes a fallback only. When Agent Inbox is active, incoming messages are received by Agent Inbox on its own MAP connection, stored, and written to `inbox.jsonl` directly.
651
-
652
- ### What Stays the Same
653
-
654
- - Hook architecture (SessionStart, PreToolUse, PostToolUse, etc.)
655
- - UNIX socket IPC protocol (NDJSON over UNIX socket)
656
- - Native team primitives for in-process coordination
657
- - Sidecar process lifecycle (startup, stale cleanup, auto-terminate)
658
- - UserPromptSubmit injection pattern
659
- - Fire-and-forget fallback for broadcast-only operations
660
-
661
- ### Graceful Degradation
662
-
663
- Agent Inbox is an enhancement, not a hard dependency. If it's unavailable, the plugin falls back to the sidecar for everything — the existing behavior:
664
-
665
- ```typescript
666
- // In map-events.mjs — sendCommand() with graceful fallback
667
- export async function sendCommand(config, command, sessionId) {
668
- if (command.action === "send" || command.action === "emit") {
669
- // Try Agent Inbox first
670
- const sent = await sendToInbox(command, inboxSocketPath(sessionId));
671
- if (sent) return;
672
- // Fall through to sidecar (existing behavior)
673
- }
674
-
675
- // Lifecycle commands → sidecar, or messaging fallback
676
- const sPaths = sessionPaths(sessionId);
677
- const sent = await sendToSidecar(command, sPaths.socketPath);
678
- if (!sent) {
679
- const recovered = await ensureSidecar(config, sessionId);
680
- if (recovered) {
681
- await sendToSidecar(command, sPaths.socketPath);
682
- } else if (command.action === "emit") {
683
- await fireAndForget(config, command.event);
684
- }
685
- }
686
-
687
- // Notify Agent Inbox about lifecycle events (best-effort)
688
- if (command.action === "spawn" || command.action === "done") {
689
- sendToInbox(
690
- { action: "notify", event: { type: `agent.${command.action}`, ...command } },
691
- inboxSocketPath(sessionId)
692
- ).catch(() => {}); // fire-and-forget notification
693
- }
694
- }
695
- ```
696
-
697
- ### Multi-Session Support
698
-
699
- Multiple Claude Code sessions can run simultaneously, each with its own sidecar. All sessions' plugins dispatch messaging commands to the **same** Agent Inbox instance:
700
-
701
- ```
702
- Session 1 Plugin ──┐
703
- ├──► Agent Inbox (shared)
704
- Session 2 Plugin ──┘
705
-
706
- Agent Inbox routes messages to the right agent regardless of which
707
- session originated them. The messageId + recipient agentId determine
708
- routing, not the session.
709
- ```
710
-
711
- Each session's sidecar remains independent — handling only its own lifecycle events.
712
-
713
- ---
714
-
715
- ## Technology Stack
716
-
717
- | Component | Choice | Rationale |
718
- |-----------|--------|-----------|
719
- | Language | TypeScript | Same as claude-code-swarm and agentic-mesh; direct integration |
720
- | MAP Client | `@multi-agent-protocol/sdk` | Same SDK used by claude-code-swarm's sidecar |
721
- | MCP Server | `@modelcontextprotocol/sdk` | Standard MCP server for agent-facing tools |
722
- | Storage (default) | In-memory (Map/Array) | Zero-config, good for development and testing |
723
- | Storage (optional) | SQLite via `better-sqlite3` | Persistence, full-text search |
724
- | ID Generation | ULID | Sortable, unique, MAP convention |
725
- | IPC | UNIX socket (NDJSON) | Same protocol as sidecar; proven pattern |
726
- | Internal events | Node.js EventEmitter | In-process pub/sub for internal components |
727
-
728
- ---
729
-
730
- ## Storage Layer
731
-
732
- ### Interface
733
-
734
- ```typescript
735
- interface Storage {
736
- // Agents
737
- getAgent(agentId: string): Agent | undefined;
738
- putAgent(agent: Agent): void;
739
- listAgents(scope: string): Agent[];
740
-
741
- // Messages
742
- getMessage(id: string): Message | undefined;
743
- putMessage(message: Message): void;
744
- getInbox(agentId: string, opts?: { unreadOnly?: boolean }): Message[];
745
- getThread(threadTag: string, scope: string): Message[];
746
- searchMessages(query: string, scope: string): Message[];
747
-
748
- // Conversations (traceability)
749
- getConversation(id: string): Conversation | undefined;
750
- putConversation(conversation: Conversation): void;
751
- listConversations(scope: string): Conversation[];
752
- addTurn(turn: Turn): void;
753
- getTurns(conversationId: string): Turn[];
754
- }
755
- ```
756
-
757
- ### Implementations
758
-
759
- 1. **InMemoryStorage** (default): Maps and arrays. Fast, zero-config. Data lost on restart. Good for development, testing, and ephemeral swarm sessions.
760
-
761
- 2. **SQLiteStorage** (optional): Persistent storage with indexes and full-text search (FTS5). For long-running inbox instances or when message history matters.
762
-
763
- Both implement the same `Storage` interface — swap via configuration.
764
-
765
- ---
766
-
767
- ## Federation Model
768
-
769
- Federation is the primary use case. Agent Inbox acts as a **gateway agent** in MAP's federation model — connecting to MAP servers and peer Agent Inbox instances to route messages across system boundaries. Federation uses MAP's native `federation/connect` and `federation/route` protocol rather than inventing a parallel system.
770
-
771
- ### MAP Federation Primitives
772
-
773
- Agent Inbox builds on MAP's existing federation spec:
774
-
775
- | MAP Federation Concept | Agent Inbox Role |
776
- |---|---|
777
- | Gateway agent | Agent Inbox instance (with routing logic) |
778
- | `federation/connect` | Connection Manager establishing peer links with auth + exposure |
779
- | `federation/route` / `federation/send` | Message Router forwarding to remote systems |
780
- | `MAPFederationExposure` | Trust policy controlling what agents are visible remotely |
781
- | `systemId` | Unique identity for each Agent Inbox instance |
782
- | `{ system, agent }` address | Federated addressing for cross-system routing |
783
-
784
- ### System ID — Tiered Resolution
785
-
786
- Each Agent Inbox instance needs a stable `systemId` for federation. Resolved in order of precedence:
787
-
788
- ```typescript
789
- function resolveSystemId(config: InboxConfig, mapSystemInfo?: SystemInfo): string {
790
- if (config.systemId) return config.systemId; // 1. Explicit config (INBOX_SYSTEM_ID)
791
- if (mapSystemInfo?.name) return mapSystemInfo.name; // 2. Derived from MAP server's systemInfo.name
792
- return `inbox-${randomId(4)}`; // 3. Auto-generated fallback
793
- }
794
- ```
795
-
796
- The MAP server's `map/connect` response includes `systemInfo?: { name?: string; version?: string }` which can provide the system identity when no explicit config is set.
797
-
798
- **Stability considerations:**
799
- - **Hub/federation mode**: Should require or strongly recommend explicit `systemId` — peers reference it in their config
800
- - **Local/standalone mode**: Auto-generated is fine since no one addresses it remotely
801
- - **Derived mode**: Stable as long as the MAP server's `systemInfo.name` is stable
802
- - **Persistence**: The resolved ID is persisted on first run so auto-generated IDs survive restarts
803
-
804
- ### Agent Registry — Warm Model
805
-
806
- Agents are ephemeral (spun up/down frequently) but should be resilient to brief disconnections. The registry uses a **warm model** with TTL and grace period:
807
-
808
- ```
809
- Agent connects → status: "active" (routable, fully live)
810
- Agent disconnects → status: "away" (still routable for grace period, messages queued)
811
- Grace period expires → status: "expired" (not routable, retained for audit)
812
- Explicitly removed → deleted from registry
813
- ```
814
-
815
- **Configurable knobs:**
816
-
817
- ```typescript
818
- interface AgentRegistryConfig {
819
- gracePeriodMs: number; // Time after disconnect before away → expired (default: 60000)
820
- retainExpiredMs: number; // How long to keep expired entries for audit (default: 3600000)
821
- requeueOnReconnect: boolean; // Flush queued messages when agent reconnects (default: true)
822
- }
823
- ```
824
-
825
- **Federation implications** — when a peer asks "do you have agent-X?":
826
- - **"active"** → route immediately
827
- - **"away"** → accept the message, queue it, agent will likely reconnect
828
- - **"expired" / unknown** → reject with "not found" error
829
-
830
- Ephemerality is about **routability, not identity**. An agent's ID persists in the registry after disconnect — it just stops being a valid routing target after the grace period.
831
-
832
- **Self-registration**: Agents are auto-registered on their first `check_inbox` call, or via MAP spawn events or the `SessionStart` hook. First-wins on ID conflicts — if an ID is already taken by an active/away agent, the registration is rejected.
833
-
834
- ### Addressing
835
-
836
- **String shorthand** (used in MCP tools):
837
- ```
838
- agent-id → local resolution only
839
- agent-id@system-id → federated: route to specific system
840
- @system-id → broadcast to all exposed agents on that system (or scope)
841
- ```
842
-
843
- **Structured form** (used internally and in MAP federation messages):
844
- ```typescript
845
- interface FederatedAddress {
846
- system?: string; // target system ID
847
- agent?: string; // target agent ID
848
- scope?: string; // optional scope qualifier
849
- }
850
- ```
851
-
852
- **Resolution order:**
853
- 1. **No `@`** → `"AgentB"` → find in local registry (same scope, then all scopes)
854
- 2. **With `@`** → `"AgentB@backend-team"` → look up `backend-team` in connection manager, forward via `federation/route`
855
- 3. **Explicit scope** → `"AgentB"` + `to_scope="backend"` → find in specified scope (local or remote)
856
-
857
- **Server connection mapping**: MAP server connections are identified by URL (`ws://host:port`). For federation, system aliases map to URLs via configuration:
858
-
859
- ```typescript
860
- interface FederationPeerConfig {
861
- systemId: string; // human-friendly alias: "backend-team"
862
- url: string; // MAP server URL: "ws://10.0.1.5:3001"
863
- auth?: FederationAuth; // authentication for federation/connect
864
- exposure?: ExposurePolicy; // what we expose to this peer
865
- }
866
- ```
867
-
868
- ### Connection Manager
869
-
870
- ```typescript
871
- interface ConnectionManager {
872
- // Connect to a MAP server (local or remote)
873
- connect(serverUrl: string, opts: ConnectionOpts): Promise<MAPConnection>;
874
-
875
- // Establish federation with a peer (uses MAP federation/connect)
876
- federate(peer: FederationPeerConfig): Promise<FederationLink>;
877
-
878
- // Route a message to the right connection
879
- route(message: Message): Promise<DeliveryResult>;
880
-
881
- // Resolve an agent address to a connection + agentId
882
- resolve(address: string | FederatedAddress): ResolvedTarget | undefined;
883
-
884
- // List all connections (MAP servers + federation peers)
885
- connections(): ConnectionInfo[];
886
-
887
- // List all federation peers
888
- peers(): FederationPeer[];
889
- }
890
-
891
- interface FederationLink {
892
- peerId: string; // remote system ID
893
- sessionId: string; // federation session
894
- status: 'connected' | 'disconnected' | 'authenticating';
895
- exposure: ExposurePolicy; // what the remote exposes to us
896
- }
897
- ```
898
-
899
- ### Federation Topology
900
-
901
- Both hub and direct-peer topologies are supported — same code, different configuration.
902
-
903
- **Hub topology** (typical deployment — central router between swarms):
904
-
905
- ```
906
- ┌─────────────┐ ┌──────────────┐ ┌──────────────────┐
907
- │ Agent Team A │──────│ Agent Inbox │──────│ Central Hub │
908
- │ (MAP Server) │ │ (gateway) │ │ Agent Inbox │
909
- └─────────────┘ └──────────────┘ │ (router only, │
910
- │ no local agents)│
911
- ┌─────────────┐ ┌──────────────┐ │ │
912
- │ Agent Team B │──────│ Agent Inbox │──────│ │
913
- │ (MAP Server) │ │ (gateway) │ └──────────────────┘
914
- └─────────────┘ └──────────────┘
915
- ```
916
-
917
- Each team's Agent Inbox connects to its local MAP server and federates with the central hub. The hub has no local agents — it just routes between peers via `federation/route`.
918
-
919
- **Direct peer topology** (teams connect directly):
920
-
921
- ```
922
- ┌─────────────┐ ┌──────────────┐ federation/connect ┌──────────────┐ ┌─────────────┐
923
- │ Agent Team A │──────│ Agent Inbox │◄────────────────────►│ Agent Inbox │──────│ Agent Team B │
924
- │ (MAP Server) │ │ (gateway) │ │ (gateway) │ │ (MAP Server) │
925
- └─────────────┘ └──────────────┘ └──────────────┘ └─────────────┘
926
- ```
927
-
928
- Same Agent Inbox code. The difference is only in the federation peer config:
929
- - **Hub mode**: Each edge inbox has one peer (the hub). The hub has N peers (the edges).
930
- - **Peer mode**: Each inbox federates directly with the others it needs to talk to.
931
-
932
- The addressing format `agent-id@system-id` works identically in both topologies — the connection manager resolves `system-id` to whichever peer holds that system, whether it's a direct link or a hub that will relay.
933
-
934
- ### Routing Engine
935
-
936
- The routing engine determines how to deliver messages to agents on unknown or disconnected peers. Strategy is configurable:
937
-
938
- ```typescript
939
- interface FederationRoutingConfig {
940
- strategy: 'table' | 'broadcast' | 'hierarchical';
941
-
942
- // For 'table' strategy (default)
943
- tableTTL?: number; // how long routing entries live in ms (default: 300000)
944
- refreshOnMiss?: boolean; // re-query peers on cache miss before failing (default: true)
945
-
946
- // For 'broadcast' strategy
947
- broadcastTimeout?: number; // ms to wait for first responder (default: 5000)
948
-
949
- // For 'hierarchical' strategy
950
- upstream?: string[]; // system IDs of upstream hubs to delegate to
951
- }
952
- ```
953
-
954
- | Strategy | Behavior | Best for |
955
- |---|---|---|
956
- | **`table`** | Maintain in-memory routing table from `federation/connect` exposure data. Route to known agents. On miss, optionally query peers. | Default — fast, predictable |
957
- | **`broadcast`** | Forward to all connected peers, first responder wins. | Small clusters, highly dynamic agents |
958
- | **`hierarchical`** | Check local table first, then delegate to upstream hub(s) if unknown. | Multi-tier topologies |
959
-
960
- **Routing table population**: When `federation/connect` completes, the peer's exposure policy advertises available agents/scopes. The gateway stores this as an in-memory routing table:
961
-
962
- ```
963
- routing table (in-memory, short-lived):
964
- "agent-alpha" → peer "backend-team" (last seen: 2s ago, status: active)
965
- "agent-beta" → peer "backend-team" (last seen: 2s ago, status: active)
966
- "agent-gamma" → peer "ml-team" (last seen: 15s ago, status: away)
967
- ```
968
-
969
- Entries expire after `tableTTL`. Refreshed passively (peer sends updated exposure) or actively (on-miss query or periodic poll). Short-lived agents naturally age out.
970
-
971
- ### Delivery Queue
972
-
973
- Messages to offline or unreachable peers are queued for later delivery. All parameters are configurable:
974
-
975
- ```typescript
976
- interface DeliveryQueueConfig {
977
- persistence: 'memory' | 'sqlite'; // where to buffer (default: 'memory')
978
- maxTTL: number; // max age before dropping in ms (default: 86400000 / 24h)
979
- maxQueueSize: number; // max messages per destination (default: 10000)
980
- retryStrategy: 'exponential' | 'fixed'; // retry pattern (default: 'exponential')
981
- retryBaseInterval: number; // base retry interval in ms (default: 1000)
982
- retryMaxAttempts: number; // max retries, 0 = unlimited until TTL (default: 0)
983
- flushOnReconnect: boolean; // drain queue when connection restored (default: true)
984
- overflow: 'drop-oldest' | 'drop-newest' | 'reject-new'; // when queue is full (default: 'drop-oldest')
985
- }
986
- ```
987
-
988
- Follows MAP's federation failure handling spec: configurable queue duration, size, and overflow policy.
989
-
990
- ### Trust Policies
991
-
992
- Trust policies control federation access. All layers are supported; complexity can be deferred by starting with allow-list only and stubbing the rest.
993
-
994
- ```typescript
995
- interface FederationTrustPolicy {
996
- // Layer 1: Server allow-list (implemented first)
997
- allowedServers: string[]; // system IDs or URLs allowed to connect
998
-
999
- // Layer 2: Scope-based permissions (stub initially)
1000
- scopePermissions: Record<string, string[]>; // local scope → allowed remote scopes
1001
-
1002
- // Layer 3: Token-based auth (stub initially)
1003
- requireAuth: boolean; // require tokens for cross-server delivery
1004
- authMethod?: 'bearer' | 'api-key' | 'mtls' | 'did:wba'; // MAP-supported auth methods
1005
- authTokens?: Record<string, string>; // system ID → token
1006
- }
1007
- ```
1008
-
1009
- **Exposure control** follows MAP's `MAPFederationExposure` model:
1010
- - **`none`**: No agents visible to this peer
1011
- - **`gateway`**: Only the gateway agent (Agent Inbox itself) is visible — peers must address messages explicitly
1012
- - **`tagged`**: Only agents with specific tags/scopes are visible
1013
- - **`all`**: All registered agents are visible to this peer
1014
-
1015
- ### Cross-Server Conversation Ownership
1016
-
1017
- Each side maintains its own view. When Agent Inbox A forwards a message to Agent Inbox B:
1018
-
1019
- 1. A stores the outbound message in its local storage
1020
- 2. B receives it via `federation/route` and stores it in its own local storage
1021
- 3. Each side tracks `in_reply_to` chains, threads, and conversations independently
1022
- 4. No sync protocol or CRDT needed
1023
-
1024
- Trade-off: no global "conversation view" across servers. Each system sees its own perspective. This is acceptable for agent-to-agent messaging and avoids sync complexity.
1025
-
1026
- ---
1027
-
1028
- ## Implementation Plan
1029
-
1030
- ### Phase 1: Core Messaging + Single MAP Connection
1031
-
1032
- - TypeScript project setup
1033
- - Storage interface + InMemoryStorage
1034
- - Agent registry (backed by MAP identity)
1035
- - Message send/receive/reply with inbox tracking
1036
- - Thread tags (user-defined grouping)
1037
- - Single MAP server connection
1038
- - UNIX socket IPC server (same NDJSON protocol as sidecar)
1039
- - MCP tools: `send_message`, `check_inbox`, `read_thread`, `list_agents`
1040
- - Internal EventEmitter for component coordination
1041
- - Basic traceability (auto-create conversations from thread_tags)
1042
-
1043
- ### Phase 2: Traceability + MAP Mail
1044
-
1045
- - Full traceability layer: conversations, turns, threads
1046
- - MAP JSON-RPC endpoint (`mail/*` methods)
1047
- - MAP mail auto-grouping (conversationId, thread_tag fallback, catch-all)
1048
- - `map/subscribe` for real-time event streaming
1049
- - SQLiteStorage implementation
1050
- - Full-text search
1051
-
1052
- ### Phase 3: Federation + Multi-Server
1053
-
1054
- **3a: Core Federation Infrastructure**
1055
- - System ID tiered resolution (config → MAP systemInfo → auto-generated)
1056
- - Agent registry warm model (active/away/expired with configurable grace period)
1057
- - Federated addressing: `agent-id@system-id` string shorthand + `{ system, agent, scope }` structured form
1058
- - Self-registration with first-wins ID conflict resolution
1059
- - Connection Manager: connect to multiple MAP servers + federation peers
1060
- - Implement MAP `federation/connect` handshake (auth, exposure exchange)
1061
- - Implement MAP `federation/route` / `federation/send` for cross-system messaging
1062
-
1063
- **3b: Routing + Delivery**
1064
- - Routing engine with configurable strategy (`table` / `broadcast` / `hierarchical`)
1065
- - In-memory routing table populated from federation exposure data (with TTL)
1066
- - Delivery queue for offline peers (configurable persistence, TTL, overflow, retry)
1067
- - Flush-on-reconnect for queued messages
1068
- - Cross-server conversation ownership: each side maintains its own view
1069
-
1070
- **3c: Topology + Trust**
1071
- - Hub topology support (central router Agent Inbox with no local agents)
1072
- - Direct peer topology support (Agent Inbox ↔ Agent Inbox federation)
1073
- - Trust policies: server allow-list (implemented), scope permissions + token auth (stubbed)
1074
- - Exposure control following MAP's model (`none` / `gateway` / `tagged` / `all`)
1075
-
1076
- **Deferred: agentic-mesh integration** — kept in plans as optional transport layer, but not in Phase 3 scope
1077
-
1078
- ---
1079
-
1080
- ## Key Design Decisions
1081
-
1082
- ### 1. Plugin-as-router (no event bus)
1083
-
1084
- The claude-code-swarm plugin (`map-events.mjs`) already dispatches commands by type. Rather than introducing a separate event bus for sidecar ↔ Agent Inbox coordination, the plugin routes directly: lifecycle commands to the sidecar, messaging commands to Agent Inbox. This eliminates an entire infrastructure layer (bus socket, pub/sub protocol, subscription management, bus lifecycle) while achieving the same routing outcome. Agent Inbox learns about agent lifecycle via lightweight notifications from the plugin, not bus subscriptions.
1085
-
1086
- ### 2. Concern-based MAP connection split
1087
-
1088
- The sidecar and Agent Inbox each own their MAP connection(s) for their respective domains. The sidecar's connection handles lifecycle and observability (spawn, state, trajectory) — fire-and-forget traffic. Agent Inbox's connection(s) handle messaging and mail — tracked, routed delivery. This avoids routing unrelated traffic through either system. Agent Inbox also works standalone without a sidecar.
1089
-
1090
- ### 3. MAP-native, not a parallel system
1091
-
1092
- Agent Inbox builds on MAP rather than reimplementing transport and identity. MAP servers handle the "pipe" — Agent Inbox adds inbox semantics, threading, and routing on top.
1093
-
1094
- ### 4. Federation as primary concern
1095
-
1096
- Cross-process and cross-server messaging is the reason Agent Inbox exists. Local in-process coordination (SendMessage, TaskCreate) already works in claude-code-swarm. Agent Inbox adds the cross-boundary layer.
1097
-
1098
- ### 5. Graceful degradation
1099
-
1100
- The plugin falls back to the sidecar for messaging if Agent Inbox is unavailable. Agent Inbox is an enhancement, not a hard dependency. This preserves the sidecar's existing reliability guarantees.
1101
-
1102
- ### 6. Structured content with plain-text shorthand
1103
-
1104
- Messages store structured content (typed with schema), but MCP tools accept plain markdown for convenience. The service layer wraps simple text; agents can pass full structured content when they need machine-readable payloads.
1105
-
1106
- ### 7. Traceability follows MAP mail conventions
1107
-
1108
- Conversations, turns, and threads are created automatically from messaging events following MAP's conventions. Agents can also create them explicitly. The traceability layer observes and records — it never blocks messaging.
1109
-
1110
- ### 8. Identity delegated to MAP + client
1111
-
1112
- Agent Inbox uses MAP's `agentId` as the primary identity. Persistence is the client's responsibility — reconnect with the same ID to reclaim your inbox, or don't. The inbox doesn't enforce a persistence model.
1113
-
1114
- ### 9. Storage is pluggable
1115
-
1116
- In-memory for development and ephemeral sessions. SQLite for persistence. Same interface, swap via config.
1117
-
1118
- ### 10. TypeScript for ecosystem alignment
1119
-
1120
- Same language as claude-code-swarm, agentic-mesh, and the MAP SDK. Direct integration without language bridges or sidecars.
1121
-
1122
- ---
1123
-
1124
- ## Open Questions
1125
-
1126
- ### Resolved
1127
-
1128
- 1. ~~**Sidecar integration depth**~~: **Resolved — plugin-as-router.** The plugin layer dispatches lifecycle commands to the sidecar and messaging commands to Agent Inbox. No event bus needed. The sidecar owns lifecycle; Agent Inbox owns messaging. See Architecture Overview.
1129
-
1130
- 2. ~~**File reservations**~~: **Deferred — not in scope.** File reservation support removed from current design.
1131
-
1132
- 3. ~~**REST/SSE interface**~~: **Dropped.** Only MCP Tools + MAP JSON-RPC interfaces.
1133
-
1134
- 4. ~~**Identity model**~~: **Resolved — use MAP identity primitives.** `agentId` + scopes. Persistence left to clients.
1135
-
1136
- 5. ~~**Traceability auto-grouping**~~: **Resolved — follow MAP conventions.** Messages with `conversationId` go there; without, server groups by `thread_tag`/reply chain; catch-all for untagged.
1137
-
1138
- 6. ~~**Event deduplication**~~: **Resolved — concern-based split eliminates the problem.** The sidecar handles lifecycle via its MAP connection; Agent Inbox handles messaging via its own MAP connection. No duplicate paths since each system only touches its own concern.
1139
-
1140
- 7. ~~**Event bus architecture**~~: **Resolved — eliminated.** The plugin already routes by command type, making a dedicated bus unnecessary. Agent Inbox learns about agents via plugin notifications and MAP server queries.
1141
-
1142
- ### Open
1143
-
1144
- 1. **MCP notification support**: Can we push new messages to agents, or must they poll with `check_inbox`? For now, poll-only for agents; real-time for MAP JSON-RPC clients via `map/subscribe`.
1145
-
1146
- 2. **MAP server dependency**: Should Agent Inbox run without a MAP server (embedded mode for testing/dev), or always require at least one?
1147
-
1148
- 3. ~~**Cross-server conversation ownership**~~: **Resolved — each side maintains its own view.** When a message crosses federation boundaries, both the sending and receiving Agent Inbox instances store their own copy. Each side tracks threads, conversations, and reply chains independently. No sync protocol needed.
1149
-
1150
- 4. **Message format evolution**: Should `x-*` extension content types be registered/discoverable, or purely convention-based?
1151
-
1152
- 5. **Startup ordering**: If the plugin sends a messaging command before Agent Inbox is ready, it falls back to the sidecar. Should Agent Inbox replay missed messages from the MAP server on startup?
1153
-
1154
- 6. **Transitive federation routing**: If system A is federated with hub H, and system B is also federated with H, can A send to B through H? The hierarchical routing strategy supports this, but the trust implications need further thought.
1155
-
1156
- 7. **Federation discovery**: MAP spec mentions `.well-known` discovery and `did:wba` for domain-anchored identity. Should Agent Inbox support automatic peer discovery, or require explicit configuration? For now, explicit config only.