@desplega.ai/agent-swarm 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/README.md +1 -0
  2. package/dist/{acp-adapter-k0vwfyvn.js → acp-adapter-kedstxx6.js} +6 -6
  3. package/dist/{actions-w4pnb8vz.js → actions-vget6r1k.js} +18 -16
  4. package/dist/{amp-adapter-0cmxb2t5.js → amp-adapter-xeb5mktv.js} +2 -2
  5. package/dist/{app-zneem7g9.js → app-mqap8t8m.js} +3 -3
  6. package/dist/{assistant-wbzd2rnr.js → assistant-h0gv97mv.js} +20 -18
  7. package/dist/{boot-reembed-4kx69j3g.js → boot-reembed-qr8a894z.js} +1 -1
  8. package/dist/{boot-reembed-db0wwgy1.js → boot-reembed-rj85jjhw.js} +1 -1
  9. package/dist/{boot-scrub-sweep-tfv4d3mm.js → boot-scrub-sweep-eyfvn6v9.js} +3 -3
  10. package/dist/{boot-seeds-w2hmkxn5.js → boot-seeds-xs9a8dx1.js} +4 -4
  11. package/dist/{claude-adapter-5qrc2paq.js → claude-adapter-bm23cye7.js} +5 -5
  12. package/dist/{claude-managed-adapter-n7ahjyx6.js → claude-managed-adapter-1mwrsm9d.js} +2 -2
  13. package/dist/{claude-managed-setup-7ra32em4.js → claude-managed-setup-gkfgks4j.js} +1 -1
  14. package/dist/{claude-sdk-session-cd02gc76.js → claude-sdk-session-apb4ypz3.js} +5 -5
  15. package/dist/cli-02vhhssk.js +848 -0
  16. package/dist/{cli-4ync7m60.js → cli-0ebey9hg.js} +1 -1
  17. package/dist/{cli-665j3feb.js → cli-0xk505e8.js} +1 -1
  18. package/dist/{cli-8c1m9mhy.js → cli-1cevz46c.js} +5 -5
  19. package/dist/{cli-gzvb3d4a.js → cli-1jx0srjt.js} +3 -3
  20. package/dist/{cli-zj4d6afs.js → cli-1pa3rz69.js} +21 -6
  21. package/dist/{cli-vmbakbq0.js → cli-2rwet3r7.js} +1 -1
  22. package/dist/{cli-azs9bhc5.js → cli-3wjs22x3.js} +2 -2
  23. package/dist/{cli-tba8fxf9.js → cli-4fhyq711.js} +45 -36
  24. package/dist/{cli-ak4c12mh.js → cli-5ff2sjyt.js} +1 -1
  25. package/dist/{cli-6q7pyd3k.js → cli-5s5hx57y.js} +5 -3
  26. package/dist/{cli-h23mr2s6.js → cli-6ftrrwm1.js} +9 -371
  27. package/dist/{cli-9ac0mkg5.js → cli-8b9wvjps.js} +1 -1
  28. package/dist/cli-8cxkw1f5.js +382 -0
  29. package/dist/{cli-xhgtay7w.js → cli-8rwvksbc.js} +2 -2
  30. package/dist/{cli-e09hj50q.js → cli-8wkb09q5.js} +11 -11
  31. package/dist/{cli-ksrphveb.js → cli-a1esmmee.js} +14 -2
  32. package/dist/{cli-xnp2vkx7.js → cli-avmqhatn.js} +7 -7
  33. package/dist/{cli-xx13gqf3.js → cli-b80a1100.js} +1 -1
  34. package/dist/{cli-z1hh99j0.js → cli-bfc3k1x5.js} +3 -3
  35. package/dist/{cli-0k9rcwfy.js → cli-bhwa8rzc.js} +33 -15
  36. package/dist/{cli-8cvvytad.js → cli-bn26xbcs.js} +2 -2
  37. package/dist/{cli-k28p6xh7.js → cli-c8fwpgqb.js} +1 -1
  38. package/dist/{cli-rc3r0bnh.js → cli-ccn0eybf.js} +1 -1
  39. package/dist/{cli-9td5ss65.js → cli-dsgj3e7a.js} +2 -2
  40. package/dist/{cli-jrk8mj0t.js → cli-ecshf504.js} +2 -2
  41. package/dist/{cli-raejy0mp.js → cli-eqgfs202.js} +1 -1
  42. package/dist/{cli-ppapy34w.js → cli-f3nx1h8z.js} +2 -2
  43. package/dist/{cli-c9vrwcpb.js → cli-ffbrkh1r.js} +74 -35
  44. package/dist/{cli-mnry16kh.js → cli-kk2r80n5.js} +4 -4
  45. package/dist/{cli-c0dpzwnx.js → cli-kz116kvw.js} +3 -3
  46. package/dist/{cli-e5y285rg.js → cli-mvg2hf8p.js} +4 -4
  47. package/dist/{cli-2jm992rm.js → cli-mz1ezzzh.js} +2 -2
  48. package/dist/{cli-dw0njd9q.js → cli-nme7wery.js} +6 -6
  49. package/dist/{cli-mvsfbbgq.js → cli-nrrg0fvy.js} +18 -4
  50. package/dist/{cli-8jtrekpy.js → cli-p1m2b6gc.js} +7 -7
  51. package/dist/{cli-4c7k75rq.js → cli-rg7ntypm.js} +378 -84
  52. package/dist/{cli-z3dk189k.js → cli-rsd7ga7v.js} +10 -8
  53. package/dist/{cli-etvn5ej2.js → cli-sppc0cmw.js} +1 -1
  54. package/dist/{cli-8w65vwee.js → cli-tg9ksbn8.js} +1 -1
  55. package/dist/{cli-th8krqbf.js → cli-tgvpmnwz.js} +2 -2
  56. package/dist/{cli-hwc4a9xm.js → cli-tj4j2ts4.js} +6 -6
  57. package/dist/{cli-jhhb2v9n.js → cli-ttaz6c7m.js} +2 -2
  58. package/dist/{cli-w7z94e6c.js → cli-tx00c0h6.js} +4 -2
  59. package/dist/{cli-4g629sgr.js → cli-wrv09v7q.js} +20 -1
  60. package/dist/{cli-cby329ny.js → cli-wyrr38xm.js} +2 -2
  61. package/dist/{cli-5ks6x36q.js → cli-x1p5dhq2.js} +3 -3
  62. package/dist/{cli-bddxamg7.js → cli-x719j3vs.js} +220 -629
  63. package/dist/{cli-ztcxv5nv.js → cli-xfe63zx3.js} +1 -1
  64. package/dist/{cli-q6gw45wj.js → cli-ywyrffff.js} +1 -1
  65. package/dist/{cli-p46xdr1m.js → cli-zvze9rbm.js} +1 -1
  66. package/dist/cli.js +15 -15
  67. package/dist/{codex-adapter-m0fx3v3s.js → codex-adapter-pp2gq8gr.js} +3 -3
  68. package/dist/{codex-hook-x6tm6y5m.js → codex-hook-qwzccd64.js} +1 -1
  69. package/dist/{codex-session-runner-j9m2gfyy.js → codex-session-runner-0vzn09t8.js} +3 -3
  70. package/dist/{commands-ktnqwrv4.js → commands-psqhkttb.js} +2 -2
  71. package/dist/{controller-nex2he8v.js → controller-t20vz2k8.js} +2 -2
  72. package/dist/{controllers-connect-6yhwqv9v.js → controllers-connect-gkxmqw9d.js} +24 -20
  73. package/dist/{cursor-adapter-02s5ekva.js → cursor-adapter-3v542qe5.js} +1 -1
  74. package/dist/{db-jvr86v7f.js → db-2xbyenjr.js} +2 -2
  75. package/dist/{db-19tw9r5s.js → db-nc1rd869.js} +3 -2
  76. package/dist/{dispatcher-d3mnsg2y.js → dispatcher-ewceb8ts.js} +17 -15
  77. package/dist/{dsh-adapter-63rvej88.js → dsh-adapter-75xwh78t.js} +1 -1
  78. package/dist/{easter-egg-3d-6hg2r942.js → easter-egg-3d-xsc47jwf.js} +1 -1
  79. package/dist/{execute-bcqc69a5.js → execute-gzmw1mnw.js} +1 -1
  80. package/dist/{external-channel-44cwer32.js → external-channel-a5dsmxn4.js} +2 -2
  81. package/dist/{google-generative-ai-phpmwxvg.js → google-generative-ai-bmq8gkf3.js} +1 -1
  82. package/dist/{google-vertex-es9ybgdy.js → google-vertex-b1rvp52s.js} +1 -1
  83. package/dist/{grok-adapter-ysp907f6.js → grok-adapter-vj88xr23.js} +7 -7
  84. package/dist/handlers-zbs90bny.js +39 -0
  85. package/dist/{heartbeat-2etacsqq.js → heartbeat-t2m9r3wa.js} +20 -18
  86. package/dist/{hook-mzxxs5n2.js → hook-8femx1bg.js} +4 -4
  87. package/dist/{hook-3kvmax6d.js → hook-xa677f8r.js} +5 -5
  88. package/dist/{http-fn978m0g.js → http-xpmmq028.js} +940 -269
  89. package/dist/{index-e4tsa1h7.js → index-8pwc1jc8.js} +17 -15
  90. package/dist/{index-w2wr89xd.js → index-cdzyfrsp.js} +1 -1
  91. package/dist/{index-1r8hw4vd.js → index-dg2tmj99.js} +17 -15
  92. package/dist/index-nxa6me0q.js +41 -0
  93. package/dist/{index-039x2sag.js → index-s7ckdajq.js} +42 -14
  94. package/dist/{index-wgsw9xcz.js → index-syztqdt6.js} +1 -1
  95. package/dist/{index-x0q2a4f9.js → index-ysd45kgc.js} +1 -1
  96. package/dist/{index-g909y089.js → index-zgvqzjsw.js} +8 -8
  97. package/dist/{keepalive-d4nzs76x.js → keepalive-3nr4st3r.js} +3 -3
  98. package/dist/{lead-8h5n9k5f.js → lead-td8h2sfn.js} +33 -31
  99. package/dist/{maintenance-ea6jfw42.js → maintenance-verwpe2c.js} +1 -1
  100. package/dist/{oauth-refresh-sweep-3f25djq3.js → oauth-refresh-sweep-9q2t0y3q.js} +2 -2
  101. package/dist/{onboard-pvk7hdb2.js → onboard-aytqedmq.js} +2 -2
  102. package/dist/{opencode-adapter-eeesgfqk.js → opencode-adapter-f4hryjny.js} +4 -4
  103. package/dist/{otel-impl-qb7nhgdp.js → otel-impl-hckw4wt1.js} +1 -1
  104. package/dist/{pi-mono-adapter-zasp3ze3.js → pi-mono-adapter-hxby0ce1.js} +6 -6
  105. package/dist/{pricing-refresh-6ehwkcmp.js → pricing-refresh-5nvme3sm.js} +3 -3
  106. package/dist/{rbac-roles-km0f9cmm.js → rbac-roles-pd8c26m1.js} +5 -3
  107. package/dist/{rbac-roles-9648nh00.js → rbac-roles-vbpy21mg.js} +2 -2
  108. package/dist/{render-v2-xkze1wef.js → render-v2-7nqgvk2q.js} +3 -3
  109. package/dist/{resume-tq0bbvt5.js → resume-b6djcj3c.js} +6 -6
  110. package/dist/{runtime-ar8310ba.js → runtime-txrxc9za.js} +1 -1
  111. package/dist/session-access-fc3f9y12.js +25 -0
  112. package/dist/{setup-rnrazxvd.js → setup-n39szm6b.js} +1 -1
  113. package/dist/{virtual-modules-wzk6jf3a.js → virtual-modules-wyp2k6z3.js} +2 -2
  114. package/dist/{work-objects-e75q2rqs.js → work-objects-jem2fre0.js} +20 -18
  115. package/dist/{worker-4ww4hjef.js → worker-wr6xgfr2.js} +33 -31
  116. package/openapi.json +1011 -115
  117. package/package.json +2 -2
  118. package/src/apps/action-caller.ts +6 -0
  119. package/src/apps/script-types.ts +16 -3
  120. package/src/be/asset-key-audit.ts +4 -13
  121. package/src/be/db/active-sessions.ts +5 -0
  122. package/src/be/db/session-visibility.ts +29 -0
  123. package/src/be/db/tasks/read.ts +61 -3
  124. package/src/be/db/tasks/write.ts +15 -6
  125. package/src/be/db.ts +149 -66
  126. package/src/be/events.ts +11 -0
  127. package/src/be/migrations/227_inbox_item_state_last_read_at.sql +1 -0
  128. package/src/be/migrations/230_session_shares.sql +23 -0
  129. package/src/be/rbac-roles.ts +2 -0
  130. package/src/be/seed-scripts/catalog/heartbeat-jev-gate.ts +22 -4
  131. package/src/be/session-shares.ts +244 -0
  132. package/src/be/swarm-config-guard.ts +23 -2
  133. package/src/commands/runner.ts +11 -0
  134. package/src/heartbeat/heartbeat.ts +25 -7
  135. package/src/http/active-sessions.ts +13 -2
  136. package/src/http/agents.ts +10 -3
  137. package/src/http/all-routes.ts +1 -0
  138. package/src/http/api-keys.ts +3 -1
  139. package/src/http/approval-requests.ts +2 -1
  140. package/src/http/apps.ts +36 -11
  141. package/src/http/assets.ts +26 -4
  142. package/src/http/config.ts +3 -0
  143. package/src/http/context.ts +2 -0
  144. package/src/http/core.ts +39 -2
  145. package/src/http/events.ts +6 -2
  146. package/src/http/favorite-owner.ts +1 -1
  147. package/src/http/fs.ts +38 -3
  148. package/src/http/inbox-state.ts +58 -8
  149. package/src/http/index.ts +3 -1
  150. package/src/http/memory.ts +3 -1
  151. package/src/http/ranking.ts +367 -0
  152. package/src/http/realtime.ts +26 -21
  153. package/src/http/route-def.ts +77 -11
  154. package/src/http/script-runs.ts +2 -1
  155. package/src/http/scripts.ts +8 -0
  156. package/src/http/session-access.ts +179 -0
  157. package/src/http/session-data.ts +10 -2
  158. package/src/http/sessions.ts +212 -12
  159. package/src/http/stats.ts +7 -3
  160. package/src/http/tasks.ts +83 -7
  161. package/src/http/used-by.ts +11 -3
  162. package/src/kv-reserved-namespaces.ts +1 -0
  163. package/src/prompts/session-templates.ts +3 -1
  164. package/src/providers/amp-adapter.ts +1 -1
  165. package/src/ranking/telemetry-ranking.ts +147 -0
  166. package/src/ranking/usage.ts +57 -0
  167. package/src/rbac/admission.ts +22 -7
  168. package/src/rbac/legacy-policy.ts +2 -0
  169. package/src/rbac/permissions.ts +9 -0
  170. package/src/realtime/auth.ts +69 -0
  171. package/src/realtime/tickets.ts +4 -1
  172. package/src/realtime/transport.ts +77 -9
  173. package/src/slack/blocks.ts +18 -0
  174. package/src/slack/dm.ts +29 -0
  175. package/src/telemetry-contract/EVENTS.md +3 -0
  176. package/src/telemetry-contract/SOURCE.json +37 -4
  177. package/src/telemetry-contract/catalog.json +69 -0
  178. package/src/telemetry-contract/ranking/fixtures/expected.json +30 -0
  179. package/src/telemetry-contract/ranking/fixtures/invalid/bad-category.json +11 -0
  180. package/src/telemetry-contract/ranking/fixtures/invalid/bad-claim.json +11 -0
  181. package/src/telemetry-contract/ranking/fixtures/invalid/blank-description.json +11 -0
  182. package/src/telemetry-contract/ranking/fixtures/invalid/blank-name.json +11 -0
  183. package/src/telemetry-contract/ranking/fixtures/invalid/description-too-long.json +11 -0
  184. package/src/telemetry-contract/ranking/fixtures/invalid/domain-uppercase.json +11 -0
  185. package/src/telemetry-contract/ranking/fixtures/invalid/domain-with-scheme.json +11 -0
  186. package/src/telemetry-contract/ranking/fixtures/invalid/domain-with-www.json +11 -0
  187. package/src/telemetry-contract/ranking/fixtures/invalid/http-source-url.json +11 -0
  188. package/src/telemetry-contract/ranking/fixtures/invalid/missing-description.json +10 -0
  189. package/src/telemetry-contract/ranking/fixtures/invalid/missing-version.json +10 -0
  190. package/src/telemetry-contract/ranking/fixtures/invalid/name-not-string.json +11 -0
  191. package/src/telemetry-contract/ranking/fixtures/invalid/name-too-long.json +11 -0
  192. package/src/telemetry-contract/ranking/fixtures/invalid/not-object.json +1 -0
  193. package/src/telemetry-contract/ranking/fixtures/invalid/null.json +1 -0
  194. package/src/telemetry-contract/ranking/fixtures/invalid/other-with-subcategory.json +11 -0
  195. package/src/telemetry-contract/ranking/fixtures/invalid/oversize.json +1 -0
  196. package/src/telemetry-contract/ranking/fixtures/invalid/short-claim.json +11 -0
  197. package/src/telemetry-contract/ranking/fixtures/invalid/subcategory-other-category.json +11 -0
  198. package/src/telemetry-contract/ranking/fixtures/invalid/trailing-data.json +1 -0
  199. package/src/telemetry-contract/ranking/fixtures/invalid/unknown-field.json +12 -0
  200. package/src/telemetry-contract/ranking/fixtures/invalid/unsupported-version.json +11 -0
  201. package/src/telemetry-contract/ranking/fixtures/invalid/updated-at-not-date.json +11 -0
  202. package/src/telemetry-contract/ranking/fixtures/invalid/updated-at-offset.json +11 -0
  203. package/src/telemetry-contract/ranking/fixtures/invalid/wrong-case-field.json +11 -0
  204. package/src/telemetry-contract/ranking/fixtures/valid/category-without-subcategory.json +11 -0
  205. package/src/telemetry-contract/ranking/fixtures/valid/full.json +11 -0
  206. package/src/telemetry-contract/ranking/fixtures/valid/minimal.json +11 -0
  207. package/src/telemetry-contract/ranking/fixtures/valid/padded-text.json +11 -0
  208. package/src/telemetry-contract/ranking/fixtures/valid/unicode-name.json +11 -0
  209. package/src/telemetry-contract/ranking/listing.v1.schema.json +61 -0
  210. package/src/telemetry-contract/ranking/taxonomy.json +8 -0
  211. package/src/telemetry-contract/ranking-taxonomy.gen.ts +11 -0
  212. package/src/telemetry-contract/types.gen.ts +708 -1
  213. package/src/telemetry.ts +26 -2
  214. package/src/tests/apps-rbac.test.ts +189 -2
  215. package/src/tests/apps-script-types.test.ts +16 -3
  216. package/src/tests/asset-key-api.test.ts +128 -0
  217. package/src/tests/asset-key-invariants.test.ts +179 -3
  218. package/src/tests/asset-key-migration.test.ts +35 -0
  219. package/src/tests/check-pr-body.test.ts +23 -0
  220. package/src/tests/check-ranking-entry.test.ts +146 -0
  221. package/src/tests/db-extraction-contract.test.ts +1 -0
  222. package/src/tests/db-task-read-contract.test.ts +1 -0
  223. package/src/tests/docs-index-footprint.test.js +2 -2
  224. package/src/tests/heartbeat-checklist.test.ts +88 -0
  225. package/src/tests/heartbeat-jev-gate.test.ts +394 -10
  226. package/src/tests/inbox-state.test.ts +167 -0
  227. package/src/tests/kv-tool.test.ts +15 -0
  228. package/src/tests/org-identity.test.ts +44 -0
  229. package/src/tests/ranking-listing.test.ts +112 -0
  230. package/src/tests/ranking-route.test.ts +319 -0
  231. package/src/tests/ranking-usage.test.ts +50 -0
  232. package/src/tests/rbac-admission-e2e.test.ts +8 -0
  233. package/src/tests/rbac-admission.test.ts +38 -0
  234. package/src/tests/rbac-charact-http.test.ts +4 -3
  235. package/src/tests/rbac-engine.test.ts +2 -0
  236. package/src/tests/rbac-roles.test.ts +2 -0
  237. package/src/tests/realtime-room-surfaces.test.ts +3 -1
  238. package/src/tests/realtime-session-join-race.test.ts +142 -0
  239. package/src/tests/realtime-tickets.test.ts +24 -17
  240. package/src/tests/realtime-transport.test.ts +91 -0
  241. package/src/tests/script-connections.test.ts +2 -0
  242. package/src/tests/session-route-posture.test.ts +639 -0
  243. package/src/tests/session-sharing-routes.test.ts +282 -0
  244. package/src/tests/session-sharing.test.ts +526 -0
  245. package/src/tests/sessions-detail-batch.test.ts +7 -1
  246. package/src/tests/slack-tool-blocks.test.ts +101 -0
  247. package/src/tests/slack-update.test.ts +55 -0
  248. package/src/tests/slack-user-dm.test.ts +177 -0
  249. package/src/tests/used-by-route.test.ts +10 -0
  250. package/src/tools/slack-post.ts +18 -12
  251. package/src/tools/slack-read.ts +13 -1
  252. package/src/tools/slack-reply.ts +7 -10
  253. package/src/tools/slack-start-thread.ts +18 -11
  254. package/src/tools/slack-update.ts +2 -9
  255. package/src/types.ts +37 -0
  256. package/src/utils/org-identity.ts +33 -0
  257. package/templates/skills/apps/SKILL.md +17 -0
  258. package/templates/skills/apps/content.md +17 -0
  259. package/templates/skills/code-quality/content.md +2 -2
  260. package/templates/skills/pages/content.md +4 -0
  261. package/templates/skills/swarm-scripts/SKILL.md +6 -0
  262. package/templates/skills/swarm-scripts/content.md +6 -0
  263. package/dist/handlers-t5pbabwf.js +0 -37
  264. package/dist/index-qyjbb7br.js +0 -39
  265. package/dist/{cli-n5mrsg0f.js → cli-60cgh1rv.js} +3 -3
  266. /package/dist/{cli-j0v75y13.js → cli-y83zk5sb.js} +0 -0
package/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Agent Swarm API",
5
- "version": "2.2.0",
5
+ "version": "2.4.0",
6
6
  "description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
7
7
  },
8
8
  "servers": [
@@ -2295,6 +2295,9 @@
2295
2295
  "readAt": {
2296
2296
  "type": "string"
2297
2297
  },
2298
+ "lastReadAt": {
2299
+ "type": "string"
2300
+ },
2298
2301
  "createdAt": {
2299
2302
  "type": "string"
2300
2303
  },
@@ -3942,6 +3945,67 @@
3942
3945
  "cacheWriteTokens"
3943
3946
  ]
3944
3947
  },
3948
+ "SessionOwner": {
3949
+ "type": [
3950
+ "object",
3951
+ "null"
3952
+ ],
3953
+ "properties": {
3954
+ "id": {
3955
+ "type": "string"
3956
+ },
3957
+ "name": {
3958
+ "type": "string"
3959
+ }
3960
+ },
3961
+ "required": [
3962
+ "id",
3963
+ "name"
3964
+ ]
3965
+ },
3966
+ "SessionShares": {
3967
+ "type": "object",
3968
+ "properties": {
3969
+ "everyone": {
3970
+ "type": "string",
3971
+ "enum": [
3972
+ "none",
3973
+ "read",
3974
+ "write"
3975
+ ]
3976
+ },
3977
+ "users": {
3978
+ "type": "array",
3979
+ "items": {
3980
+ "type": "object",
3981
+ "properties": {
3982
+ "userId": {
3983
+ "type": "string"
3984
+ },
3985
+ "access": {
3986
+ "type": "string",
3987
+ "enum": [
3988
+ "read",
3989
+ "write"
3990
+ ]
3991
+ },
3992
+ "createdAt": {
3993
+ "type": "string"
3994
+ }
3995
+ },
3996
+ "required": [
3997
+ "userId",
3998
+ "access",
3999
+ "createdAt"
4000
+ ]
4001
+ }
4002
+ }
4003
+ },
4004
+ "required": [
4005
+ "everyone",
4006
+ "users"
4007
+ ]
4008
+ },
3945
4009
  "Skill": {
3946
4010
  "type": "object",
3947
4011
  "properties": {
@@ -14653,6 +14717,12 @@
14653
14717
  "minLength": 1,
14654
14718
  "maxLength": 255,
14655
14719
  "description": "Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form."
14720
+ },
14721
+ "movedTaskIds": {
14722
+ "type": "array",
14723
+ "items": {
14724
+ "type": "string"
14725
+ }
14656
14726
  }
14657
14727
  },
14658
14728
  "required": [
@@ -14777,6 +14847,12 @@
14777
14847
  "minLength": 1,
14778
14848
  "maxLength": 255,
14779
14849
  "description": "Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form."
14850
+ },
14851
+ "movedTaskIds": {
14852
+ "type": "array",
14853
+ "items": {
14854
+ "type": "string"
14855
+ }
14780
14856
  }
14781
14857
  },
14782
14858
  "required": [
@@ -14882,6 +14958,10 @@
14882
14958
  "minLength": 1,
14883
14959
  "maxLength": 255,
14884
14960
  "description": "Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form."
14961
+ },
14962
+ "cascade": {
14963
+ "type": "boolean",
14964
+ "description": "For tasks only, also move every descendant task recursively through parentTaskId."
14885
14965
  }
14886
14966
  },
14887
14967
  "required": [
@@ -14919,6 +14999,12 @@
14919
14999
  "minLength": 1,
14920
15000
  "maxLength": 255,
14921
15001
  "description": "Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form."
15002
+ },
15003
+ "movedTaskIds": {
15004
+ "type": "array",
15005
+ "items": {
15006
+ "type": "string"
15007
+ }
14922
15008
  }
14923
15009
  },
14924
15010
  "required": [
@@ -15247,6 +15333,541 @@
15247
15333
  }
15248
15334
  }
15249
15335
  },
15336
+ "/api/used-by": {
15337
+ "post": {
15338
+ "summary": "Grant or revoke the 'used by' logo consent",
15339
+ "description": "Records whether agent-swarm.dev may show this organization's logo as a company that uses Agent Swarm. Sends the organization name and website to the telemetry proxy, where a person approves each logo by hand. An explicit admin action, so it is not gated by the telemetry opt-out.",
15340
+ "tags": [
15341
+ "Telemetry"
15342
+ ],
15343
+ "security": [
15344
+ {
15345
+ "bearerAuth": []
15346
+ }
15347
+ ],
15348
+ "requestBody": {
15349
+ "content": {
15350
+ "application/json": {
15351
+ "schema": {
15352
+ "type": "object",
15353
+ "properties": {
15354
+ "granted": {
15355
+ "type": "boolean"
15356
+ }
15357
+ },
15358
+ "required": [
15359
+ "granted"
15360
+ ]
15361
+ }
15362
+ }
15363
+ }
15364
+ },
15365
+ "responses": {
15366
+ "200": {
15367
+ "description": "Consent recorded",
15368
+ "content": {
15369
+ "application/json": {
15370
+ "schema": {
15371
+ "type": "object",
15372
+ "properties": {
15373
+ "granted": {
15374
+ "type": "boolean"
15375
+ },
15376
+ "changedAt": {
15377
+ "type": "string"
15378
+ }
15379
+ },
15380
+ "required": [
15381
+ "granted",
15382
+ "changedAt"
15383
+ ]
15384
+ }
15385
+ }
15386
+ }
15387
+ },
15388
+ "400": {
15389
+ "description": "Organization name or website is not set (a revoke falls back to the identity of the last grant)",
15390
+ "content": {
15391
+ "application/json": {
15392
+ "schema": {
15393
+ "$ref": "#/components/schemas/ErrorResponse"
15394
+ }
15395
+ }
15396
+ }
15397
+ },
15398
+ "401": {
15399
+ "description": "Unauthorized",
15400
+ "content": {
15401
+ "application/json": {
15402
+ "schema": {
15403
+ "$ref": "#/components/schemas/ErrorResponse"
15404
+ }
15405
+ }
15406
+ }
15407
+ },
15408
+ "403": {
15409
+ "description": "Only a config admin can change the consent",
15410
+ "content": {
15411
+ "application/json": {
15412
+ "schema": {
15413
+ "$ref": "#/components/schemas/ErrorResponse"
15414
+ }
15415
+ }
15416
+ }
15417
+ },
15418
+ "502": {
15419
+ "description": "The telemetry proxy did not accept the consent",
15420
+ "content": {
15421
+ "application/json": {
15422
+ "schema": {
15423
+ "$ref": "#/components/schemas/ErrorResponse"
15424
+ }
15425
+ }
15426
+ }
15427
+ }
15428
+ }
15429
+ }
15430
+ },
15431
+ "/api/ranking": {
15432
+ "get": {
15433
+ "summary": "Public ranking state",
15434
+ "description": "Whether this install can join the public agent-swarm.dev ranking (telemetry on, organization name and website set), whether it is opted in, and its stored listing. The listing carries the private ranking claim, so only a config admin can read it.",
15435
+ "tags": [
15436
+ "Telemetry"
15437
+ ],
15438
+ "security": [
15439
+ {
15440
+ "bearerAuth": []
15441
+ }
15442
+ ],
15443
+ "responses": {
15444
+ "200": {
15445
+ "description": "Ranking state",
15446
+ "content": {
15447
+ "application/json": {
15448
+ "schema": {
15449
+ "type": "object",
15450
+ "properties": {
15451
+ "eligible": {
15452
+ "type": "boolean"
15453
+ },
15454
+ "missing": {
15455
+ "type": "array",
15456
+ "items": {
15457
+ "type": "string",
15458
+ "enum": [
15459
+ "SWARM_ORG_NAME",
15460
+ "SWARM_ORG_WEBSITE"
15461
+ ]
15462
+ }
15463
+ },
15464
+ "telemetryOn": {
15465
+ "type": "boolean"
15466
+ },
15467
+ "enabled": {
15468
+ "type": "boolean"
15469
+ },
15470
+ "name": {
15471
+ "type": [
15472
+ "string",
15473
+ "null"
15474
+ ]
15475
+ },
15476
+ "domain": {
15477
+ "type": [
15478
+ "string",
15479
+ "null"
15480
+ ]
15481
+ },
15482
+ "listing": {
15483
+ "type": [
15484
+ "object",
15485
+ "null"
15486
+ ],
15487
+ "properties": {
15488
+ "v": {
15489
+ "type": "number",
15490
+ "enum": [
15491
+ 1
15492
+ ]
15493
+ },
15494
+ "claim": {
15495
+ "type": "string"
15496
+ },
15497
+ "name": {
15498
+ "type": "string"
15499
+ },
15500
+ "domain": {
15501
+ "type": "string"
15502
+ },
15503
+ "category": {
15504
+ "type": "string",
15505
+ "enum": [
15506
+ "engineering",
15507
+ "product",
15508
+ "marketing",
15509
+ "support",
15510
+ "operations",
15511
+ "other"
15512
+ ]
15513
+ },
15514
+ "subcategory": {
15515
+ "type": [
15516
+ "string",
15517
+ "null"
15518
+ ]
15519
+ },
15520
+ "description": {
15521
+ "type": [
15522
+ "string",
15523
+ "null"
15524
+ ]
15525
+ },
15526
+ "sourceCodeUrl": {
15527
+ "type": [
15528
+ "string",
15529
+ "null"
15530
+ ]
15531
+ },
15532
+ "updatedAt": {
15533
+ "type": "string"
15534
+ }
15535
+ },
15536
+ "required": [
15537
+ "v",
15538
+ "claim",
15539
+ "name",
15540
+ "domain",
15541
+ "category",
15542
+ "subcategory",
15543
+ "description",
15544
+ "sourceCodeUrl",
15545
+ "updatedAt"
15546
+ ]
15547
+ },
15548
+ "listingMatchesDomain": {
15549
+ "type": "boolean"
15550
+ },
15551
+ "fileJson": {
15552
+ "type": [
15553
+ "string",
15554
+ "null"
15555
+ ]
15556
+ },
15557
+ "prUrl": {
15558
+ "type": [
15559
+ "string",
15560
+ "null"
15561
+ ]
15562
+ },
15563
+ "verifyUrl": {
15564
+ "type": [
15565
+ "string",
15566
+ "null"
15567
+ ]
15568
+ }
15569
+ },
15570
+ "required": [
15571
+ "eligible",
15572
+ "missing",
15573
+ "telemetryOn",
15574
+ "enabled",
15575
+ "name",
15576
+ "domain",
15577
+ "listing",
15578
+ "listingMatchesDomain",
15579
+ "fileJson",
15580
+ "prUrl",
15581
+ "verifyUrl"
15582
+ ]
15583
+ }
15584
+ }
15585
+ }
15586
+ },
15587
+ "401": {
15588
+ "description": "Unauthorized",
15589
+ "content": {
15590
+ "application/json": {
15591
+ "schema": {
15592
+ "$ref": "#/components/schemas/ErrorResponse"
15593
+ }
15594
+ }
15595
+ }
15596
+ },
15597
+ "403": {
15598
+ "description": "Only a config admin can read the ranking state",
15599
+ "content": {
15600
+ "application/json": {
15601
+ "schema": {
15602
+ "$ref": "#/components/schemas/ErrorResponse"
15603
+ }
15604
+ }
15605
+ }
15606
+ }
15607
+ }
15608
+ }
15609
+ },
15610
+ "/api/ranking/opt-in": {
15611
+ "post": {
15612
+ "summary": "Opt this install into the public ranking",
15613
+ "description": "Builds the telemetry_ranking listing from the organization name and website plus the chosen category, stores it, turns PUBLIC_RANKING_ENABLED on and sends ranking.opted_in. The install is ranked only after a ranking PR with the returned file is merged into desplega-ai/agent-swarm.",
15614
+ "tags": [
15615
+ "Telemetry"
15616
+ ],
15617
+ "security": [
15618
+ {
15619
+ "bearerAuth": []
15620
+ }
15621
+ ],
15622
+ "requestBody": {
15623
+ "content": {
15624
+ "application/json": {
15625
+ "schema": {
15626
+ "type": "object",
15627
+ "properties": {
15628
+ "category": {
15629
+ "type": "string",
15630
+ "enum": [
15631
+ "engineering",
15632
+ "product",
15633
+ "marketing",
15634
+ "support",
15635
+ "operations",
15636
+ "other"
15637
+ ]
15638
+ },
15639
+ "subcategory": {
15640
+ "type": [
15641
+ "string",
15642
+ "null"
15643
+ ]
15644
+ },
15645
+ "description": {
15646
+ "type": [
15647
+ "string",
15648
+ "null"
15649
+ ]
15650
+ },
15651
+ "sourceCodeUrl": {
15652
+ "type": [
15653
+ "string",
15654
+ "null"
15655
+ ]
15656
+ }
15657
+ },
15658
+ "required": [
15659
+ "category"
15660
+ ]
15661
+ }
15662
+ }
15663
+ }
15664
+ },
15665
+ "responses": {
15666
+ "200": {
15667
+ "description": "Opted in",
15668
+ "content": {
15669
+ "application/json": {
15670
+ "schema": {
15671
+ "type": "object",
15672
+ "properties": {
15673
+ "domain": {
15674
+ "type": "string"
15675
+ },
15676
+ "claim": {
15677
+ "type": "string"
15678
+ },
15679
+ "listing": {
15680
+ "type": "object",
15681
+ "properties": {
15682
+ "v": {
15683
+ "type": "number",
15684
+ "enum": [
15685
+ 1
15686
+ ]
15687
+ },
15688
+ "claim": {
15689
+ "type": "string"
15690
+ },
15691
+ "name": {
15692
+ "type": "string"
15693
+ },
15694
+ "domain": {
15695
+ "type": "string"
15696
+ },
15697
+ "category": {
15698
+ "type": "string",
15699
+ "enum": [
15700
+ "engineering",
15701
+ "product",
15702
+ "marketing",
15703
+ "support",
15704
+ "operations",
15705
+ "other"
15706
+ ]
15707
+ },
15708
+ "subcategory": {
15709
+ "type": [
15710
+ "string",
15711
+ "null"
15712
+ ]
15713
+ },
15714
+ "description": {
15715
+ "type": [
15716
+ "string",
15717
+ "null"
15718
+ ]
15719
+ },
15720
+ "sourceCodeUrl": {
15721
+ "type": [
15722
+ "string",
15723
+ "null"
15724
+ ]
15725
+ },
15726
+ "updatedAt": {
15727
+ "type": "string"
15728
+ }
15729
+ },
15730
+ "required": [
15731
+ "v",
15732
+ "claim",
15733
+ "name",
15734
+ "domain",
15735
+ "category",
15736
+ "subcategory",
15737
+ "description",
15738
+ "sourceCodeUrl",
15739
+ "updatedAt"
15740
+ ]
15741
+ },
15742
+ "fileJson": {
15743
+ "type": "string"
15744
+ },
15745
+ "prUrl": {
15746
+ "type": "string"
15747
+ },
15748
+ "verifyUrl": {
15749
+ "type": "string"
15750
+ }
15751
+ },
15752
+ "required": [
15753
+ "domain",
15754
+ "claim",
15755
+ "listing",
15756
+ "fileJson",
15757
+ "prUrl",
15758
+ "verifyUrl"
15759
+ ]
15760
+ }
15761
+ }
15762
+ }
15763
+ },
15764
+ "400": {
15765
+ "description": "A listing field is invalid",
15766
+ "content": {
15767
+ "application/json": {
15768
+ "schema": {
15769
+ "$ref": "#/components/schemas/ErrorResponse"
15770
+ }
15771
+ }
15772
+ }
15773
+ },
15774
+ "401": {
15775
+ "description": "Unauthorized",
15776
+ "content": {
15777
+ "application/json": {
15778
+ "schema": {
15779
+ "$ref": "#/components/schemas/ErrorResponse"
15780
+ }
15781
+ }
15782
+ }
15783
+ },
15784
+ "403": {
15785
+ "description": "Only a config admin can opt in",
15786
+ "content": {
15787
+ "application/json": {
15788
+ "schema": {
15789
+ "$ref": "#/components/schemas/ErrorResponse"
15790
+ }
15791
+ }
15792
+ }
15793
+ },
15794
+ "409": {
15795
+ "description": "telemetry_off: telemetry is off or the install has no ID. org_identity_missing: the organization name or website is not set (`missing` lists which).",
15796
+ "content": {
15797
+ "application/json": {
15798
+ "schema": {
15799
+ "$ref": "#/components/schemas/ErrorResponse"
15800
+ }
15801
+ }
15802
+ }
15803
+ }
15804
+ }
15805
+ }
15806
+ },
15807
+ "/api/ranking/opt-out": {
15808
+ "post": {
15809
+ "summary": "Leave the public ranking",
15810
+ "description": "Turns PUBLIC_RANKING_ENABLED off and sends ranking.opted_out, so workers stop sending ranking.usage. Returns the GitHub page that deletes the ranking entry.",
15811
+ "tags": [
15812
+ "Telemetry"
15813
+ ],
15814
+ "security": [
15815
+ {
15816
+ "bearerAuth": []
15817
+ }
15818
+ ],
15819
+ "responses": {
15820
+ "200": {
15821
+ "description": "Opted out",
15822
+ "content": {
15823
+ "application/json": {
15824
+ "schema": {
15825
+ "type": "object",
15826
+ "properties": {
15827
+ "enabled": {
15828
+ "type": "boolean",
15829
+ "enum": [
15830
+ false
15831
+ ]
15832
+ },
15833
+ "leaveUrl": {
15834
+ "type": [
15835
+ "string",
15836
+ "null"
15837
+ ]
15838
+ }
15839
+ },
15840
+ "required": [
15841
+ "enabled",
15842
+ "leaveUrl"
15843
+ ]
15844
+ }
15845
+ }
15846
+ }
15847
+ },
15848
+ "401": {
15849
+ "description": "Unauthorized",
15850
+ "content": {
15851
+ "application/json": {
15852
+ "schema": {
15853
+ "$ref": "#/components/schemas/ErrorResponse"
15854
+ }
15855
+ }
15856
+ }
15857
+ },
15858
+ "403": {
15859
+ "description": "Only a config admin can opt out",
15860
+ "content": {
15861
+ "application/json": {
15862
+ "schema": {
15863
+ "$ref": "#/components/schemas/ErrorResponse"
15864
+ }
15865
+ }
15866
+ }
15867
+ }
15868
+ }
15869
+ }
15870
+ },
15250
15871
  "/api/config/resolved": {
15251
15872
  "get": {
15252
15873
  "summary": "Get resolved config (merged global + agent + repo scopes)",
@@ -20766,9 +21387,6 @@
20766
21387
  "schema": {
20767
21388
  "type": "object",
20768
21389
  "properties": {
20769
- "userId": {
20770
- "type": "string"
20771
- },
20772
21390
  "itemType": {
20773
21391
  "type": "string",
20774
21392
  "enum": [
@@ -20800,13 +21418,24 @@
20800
21418
  "readAt": {
20801
21419
  "type": "string",
20802
21420
  "format": "date-time"
21421
+ },
21422
+ "lastReadAt": {
21423
+ "type": [
21424
+ "string",
21425
+ "null"
21426
+ ],
21427
+ "format": "date-time",
21428
+ "description": "Omit to preserve the read cursor, send null to clear it, or send a timestamp to set it, including an earlier time."
21429
+ },
21430
+ "userId": {
21431
+ "type": "string"
20803
21432
  }
20804
21433
  },
20805
21434
  "required": [
20806
- "userId",
20807
21435
  "itemType",
20808
21436
  "itemId",
20809
- "status"
21437
+ "status",
21438
+ "userId"
20810
21439
  ]
20811
21440
  }
20812
21441
  }
@@ -20854,6 +21483,135 @@
20854
21483
  }
20855
21484
  }
20856
21485
  },
21486
+ "/api/inbox-state/bulk": {
21487
+ "patch": {
21488
+ "summary": "Upsert inbox-item state in one transaction",
21489
+ "tags": [
21490
+ "Inbox State"
21491
+ ],
21492
+ "security": [
21493
+ {
21494
+ "bearerAuth": []
21495
+ }
21496
+ ],
21497
+ "requestBody": {
21498
+ "content": {
21499
+ "application/json": {
21500
+ "schema": {
21501
+ "type": "object",
21502
+ "properties": {
21503
+ "userId": {
21504
+ "type": "string"
21505
+ },
21506
+ "items": {
21507
+ "type": "array",
21508
+ "items": {
21509
+ "type": "object",
21510
+ "properties": {
21511
+ "itemType": {
21512
+ "type": "string",
21513
+ "enum": [
21514
+ "approval",
21515
+ "credential_missing",
21516
+ "broken_task",
21517
+ "to_read",
21518
+ "to_start_template",
21519
+ "notification"
21520
+ ]
21521
+ },
21522
+ "itemId": {
21523
+ "type": "string",
21524
+ "minLength": 1
21525
+ },
21526
+ "status": {
21527
+ "type": "string",
21528
+ "enum": [
21529
+ "open",
21530
+ "snoozed",
21531
+ "dismissed",
21532
+ "done"
21533
+ ]
21534
+ },
21535
+ "snoozeUntil": {
21536
+ "type": "string",
21537
+ "format": "date-time"
21538
+ },
21539
+ "readAt": {
21540
+ "type": "string",
21541
+ "format": "date-time"
21542
+ },
21543
+ "lastReadAt": {
21544
+ "type": [
21545
+ "string",
21546
+ "null"
21547
+ ],
21548
+ "format": "date-time",
21549
+ "description": "Omit to preserve the read cursor, send null to clear it, or send a timestamp to set it, including an earlier time."
21550
+ }
21551
+ },
21552
+ "required": [
21553
+ "itemType",
21554
+ "itemId",
21555
+ "status"
21556
+ ]
21557
+ },
21558
+ "minItems": 1,
21559
+ "maxItems": 200
21560
+ }
21561
+ },
21562
+ "required": [
21563
+ "userId",
21564
+ "items"
21565
+ ]
21566
+ }
21567
+ }
21568
+ }
21569
+ },
21570
+ "responses": {
21571
+ "200": {
21572
+ "description": "Upserted inbox state rows in request order",
21573
+ "content": {
21574
+ "application/json": {
21575
+ "schema": {
21576
+ "type": "object",
21577
+ "properties": {
21578
+ "items": {
21579
+ "type": "array",
21580
+ "items": {
21581
+ "$ref": "#/components/schemas/InboxItemState"
21582
+ }
21583
+ }
21584
+ },
21585
+ "required": [
21586
+ "items"
21587
+ ]
21588
+ }
21589
+ }
21590
+ }
21591
+ },
21592
+ "400": {
21593
+ "description": "Validation error",
21594
+ "content": {
21595
+ "application/json": {
21596
+ "schema": {
21597
+ "$ref": "#/components/schemas/ErrorResponse"
21598
+ }
21599
+ }
21600
+ }
21601
+ },
21602
+ "401": {
21603
+ "description": "Unauthorized",
21604
+ "content": {
21605
+ "application/json": {
21606
+ "schema": {
21607
+ "$ref": "#/components/schemas/ErrorResponse"
21608
+ }
21609
+ }
21610
+ }
21611
+ }
21612
+ }
21613
+ }
21614
+ },
20857
21615
  "/api/integrations/claude-managed/test": {
20858
21616
  "post": {
20859
21617
  "summary": "Test the claude-managed integration: resolves ANTHROPIC_API_KEY + MANAGED_AGENT_ID from swarm_config and calls beta.agents.retrieve.",
@@ -30451,7 +31209,7 @@
30451
31209
  "/api/tasks": {
30452
31210
  "get": {
30453
31211
  "summary": "List tasks with filters",
30454
- "description": "Returns tasks with the full `task` text replaced by a bounded `taskPreview` and completion/integration blobs dropped by default — list views only need the preview. Pass `fields=full` to restore the full `AgentTask`, or `fields=timeline` for the narrow shape the dashboard timeline draws. Fetch a single task in full via `GET /api/tasks/{id}`. `total` (the filtered row count, ignoring limit/offset) is computed only with `includeTotal=true`.",
31212
+ "description": "Returns tasks with the full `task` text replaced by a bounded `taskPreview` and completion/integration blobs dropped by default — list views only need the preview. Pass `fields=full` to restore the full `AgentTask`, or `fields=timeline` for the narrow shape the dashboard timeline draws. Every shape gives a user caller only tasks of sessions they can read. Fetch a single task in full via `GET /api/tasks/{id}`. `total` (the filtered row count, ignoring limit/offset) is computed only with `includeTotal=true`.",
30455
31213
  "tags": [
30456
31214
  "Tasks"
30457
31215
  ],
@@ -32131,6 +32889,16 @@
32131
32889
  }
32132
32890
  }
32133
32891
  },
32892
+ "403": {
32893
+ "description": "A user caller cannot read the task's session",
32894
+ "content": {
32895
+ "application/json": {
32896
+ "schema": {
32897
+ "$ref": "#/components/schemas/ErrorResponse"
32898
+ }
32899
+ }
32900
+ }
32901
+ },
32134
32902
  "404": {
32135
32903
  "description": "Task not found",
32136
32904
  "content": {
@@ -36227,6 +36995,7 @@
36227
36995
  "/api/realtime/ticket": {
36228
36996
  "post": {
36229
36997
  "summary": "Issue a one-shot dashboard realtime ticket",
36998
+ "description": "The ticket authorizes one dashboard socket for presence rooms: Comb drives (`comb.presence`) and sessions (`session.presence`). An operator-key tab's picked user (`X-Swarm-User-Id`) rides on the ticket so session presence can check that user's access.",
36230
36999
  "tags": [
36231
37000
  "Rooms"
36232
37001
  ],
@@ -36259,17 +37028,7 @@
36259
37028
  }
36260
37029
  },
36261
37030
  "403": {
36262
- "description": "Comb presence is not allowed",
36263
- "content": {
36264
- "application/json": {
36265
- "schema": {
36266
- "$ref": "#/components/schemas/ErrorResponse"
36267
- }
36268
- }
36269
- }
36270
- },
36271
- "404": {
36272
- "description": "Comb is not enabled",
37031
+ "description": "Presence is not allowed",
36273
37032
  "content": {
36274
37033
  "application/json": {
36275
37034
  "schema": {
@@ -46972,6 +47731,18 @@
46972
47731
  "required": false,
46973
47732
  "name": "fields",
46974
47733
  "in": "query"
47734
+ },
47735
+ {
47736
+ "schema": {
47737
+ "type": "string",
47738
+ "enum": [
47739
+ "mine",
47740
+ "shared"
47741
+ ]
47742
+ },
47743
+ "required": false,
47744
+ "name": "scope",
47745
+ "in": "query"
46975
47746
  }
46976
47747
  ],
46977
47748
  "responses": {
@@ -47263,7 +48034,7 @@
47263
48034
  ],
47264
48035
  "responses": {
47265
48036
  "200": {
47266
- "description": "Root task + chain (ordered by createdAt)",
48037
+ "description": "Root task + chain (ordered by createdAt), plus the caller's `access` and the session `owner`",
47267
48038
  "content": {
47268
48039
  "application/json": {
47269
48040
  "schema": {
@@ -47461,11 +48232,24 @@
47461
48232
  }
47462
48233
  ]
47463
48234
  }
48235
+ },
48236
+ "access": {
48237
+ "type": "string",
48238
+ "enum": [
48239
+ "owner",
48240
+ "write",
48241
+ "read"
48242
+ ]
48243
+ },
48244
+ "owner": {
48245
+ "$ref": "#/components/schemas/SessionOwner"
47464
48246
  }
47465
48247
  },
47466
48248
  "required": [
47467
48249
  "root",
47468
- "chain"
48250
+ "chain",
48251
+ "access",
48252
+ "owner"
47469
48253
  ]
47470
48254
  }
47471
48255
  }
@@ -47481,6 +48265,16 @@
47481
48265
  }
47482
48266
  }
47483
48267
  },
48268
+ "403": {
48269
+ "description": "The caller has no access to this session",
48270
+ "content": {
48271
+ "application/json": {
48272
+ "schema": {
48273
+ "$ref": "#/components/schemas/ErrorResponse"
48274
+ }
48275
+ }
48276
+ }
48277
+ },
47484
48278
  "404": {
47485
48279
  "description": "Root task not found",
47486
48280
  "content": {
@@ -47494,6 +48288,203 @@
47494
48288
  }
47495
48289
  }
47496
48290
  },
48291
+ "/api/sessions/{rootTaskId}/shares": {
48292
+ "get": {
48293
+ "summary": "List a session's active shares",
48294
+ "description": "Active shares only. `everyone` is the access every user has; `users` are per-person shares. A session with no shares is private to its owner.",
48295
+ "tags": [
48296
+ "Sessions"
48297
+ ],
48298
+ "security": [
48299
+ {
48300
+ "bearerAuth": []
48301
+ }
48302
+ ],
48303
+ "parameters": [
48304
+ {
48305
+ "schema": {
48306
+ "type": "string"
48307
+ },
48308
+ "required": true,
48309
+ "name": "rootTaskId",
48310
+ "in": "path"
48311
+ }
48312
+ ],
48313
+ "responses": {
48314
+ "200": {
48315
+ "description": "Active shares",
48316
+ "content": {
48317
+ "application/json": {
48318
+ "schema": {
48319
+ "$ref": "#/components/schemas/SessionShares"
48320
+ }
48321
+ }
48322
+ }
48323
+ },
48324
+ "401": {
48325
+ "description": "Unauthorized",
48326
+ "content": {
48327
+ "application/json": {
48328
+ "schema": {
48329
+ "$ref": "#/components/schemas/ErrorResponse"
48330
+ }
48331
+ }
48332
+ }
48333
+ },
48334
+ "403": {
48335
+ "description": "The caller has no access to this session",
48336
+ "content": {
48337
+ "application/json": {
48338
+ "schema": {
48339
+ "$ref": "#/components/schemas/ErrorResponse"
48340
+ }
48341
+ }
48342
+ }
48343
+ },
48344
+ "404": {
48345
+ "description": "Root task not found",
48346
+ "content": {
48347
+ "application/json": {
48348
+ "schema": {
48349
+ "$ref": "#/components/schemas/ErrorResponse"
48350
+ }
48351
+ }
48352
+ }
48353
+ }
48354
+ }
48355
+ },
48356
+ "put": {
48357
+ "summary": "Set who can view or edit a session",
48358
+ "description": "Owner only. The body is the full desired state: users left out lose access. Changed targets have their active share revoked and a new one inserted in one transaction; shares are never deleted.",
48359
+ "tags": [
48360
+ "Sessions"
48361
+ ],
48362
+ "security": [
48363
+ {
48364
+ "bearerAuth": []
48365
+ }
48366
+ ],
48367
+ "parameters": [
48368
+ {
48369
+ "schema": {
48370
+ "type": "string"
48371
+ },
48372
+ "required": true,
48373
+ "name": "rootTaskId",
48374
+ "in": "path"
48375
+ }
48376
+ ],
48377
+ "requestBody": {
48378
+ "content": {
48379
+ "application/json": {
48380
+ "schema": {
48381
+ "type": "object",
48382
+ "properties": {
48383
+ "everyone": {
48384
+ "type": "string",
48385
+ "enum": [
48386
+ "none",
48387
+ "read",
48388
+ "write"
48389
+ ]
48390
+ },
48391
+ "users": {
48392
+ "type": "array",
48393
+ "items": {
48394
+ "type": "object",
48395
+ "properties": {
48396
+ "userId": {
48397
+ "type": "string",
48398
+ "minLength": 1
48399
+ },
48400
+ "access": {
48401
+ "type": "string",
48402
+ "enum": [
48403
+ "read",
48404
+ "write"
48405
+ ]
48406
+ }
48407
+ },
48408
+ "required": [
48409
+ "userId",
48410
+ "access"
48411
+ ]
48412
+ },
48413
+ "maxItems": 500
48414
+ }
48415
+ },
48416
+ "required": [
48417
+ "everyone",
48418
+ "users"
48419
+ ]
48420
+ }
48421
+ }
48422
+ }
48423
+ },
48424
+ "responses": {
48425
+ "200": {
48426
+ "description": "Active shares after the change",
48427
+ "content": {
48428
+ "application/json": {
48429
+ "schema": {
48430
+ "$ref": "#/components/schemas/SessionShares"
48431
+ }
48432
+ }
48433
+ }
48434
+ },
48435
+ "400": {
48436
+ "description": "Validation error or unknown user",
48437
+ "content": {
48438
+ "application/json": {
48439
+ "schema": {
48440
+ "$ref": "#/components/schemas/ErrorResponse"
48441
+ }
48442
+ }
48443
+ }
48444
+ },
48445
+ "401": {
48446
+ "description": "Unauthorized",
48447
+ "content": {
48448
+ "application/json": {
48449
+ "schema": {
48450
+ "$ref": "#/components/schemas/ErrorResponse"
48451
+ }
48452
+ }
48453
+ }
48454
+ },
48455
+ "403": {
48456
+ "description": "Only the session owner can share it",
48457
+ "content": {
48458
+ "application/json": {
48459
+ "schema": {
48460
+ "$ref": "#/components/schemas/ErrorResponse"
48461
+ }
48462
+ }
48463
+ }
48464
+ },
48465
+ "404": {
48466
+ "description": "Root task not found",
48467
+ "content": {
48468
+ "application/json": {
48469
+ "schema": {
48470
+ "$ref": "#/components/schemas/ErrorResponse"
48471
+ }
48472
+ }
48473
+ }
48474
+ },
48475
+ "409": {
48476
+ "description": "The session has no owner, so it is already open to everyone",
48477
+ "content": {
48478
+ "application/json": {
48479
+ "schema": {
48480
+ "$ref": "#/components/schemas/ErrorResponse"
48481
+ }
48482
+ }
48483
+ }
48484
+ }
48485
+ }
48486
+ }
48487
+ },
47497
48488
  "/api/skills": {
47498
48489
  "get": {
47499
48490
  "summary": "List skills with optional filters",
@@ -54329,101 +55320,6 @@
54329
55320
  }
54330
55321
  }
54331
55322
  },
54332
- "/api/used-by": {
54333
- "post": {
54334
- "summary": "Grant or revoke the 'used by' logo consent",
54335
- "description": "Records whether agent-swarm.dev may show this organization's logo as a company that uses Agent Swarm. Sends the organization name and website to the telemetry proxy, where a person approves each logo by hand. An explicit admin action, so it is not gated by the telemetry opt-out.",
54336
- "tags": [
54337
- "Telemetry"
54338
- ],
54339
- "security": [
54340
- {
54341
- "bearerAuth": []
54342
- }
54343
- ],
54344
- "requestBody": {
54345
- "content": {
54346
- "application/json": {
54347
- "schema": {
54348
- "type": "object",
54349
- "properties": {
54350
- "granted": {
54351
- "type": "boolean"
54352
- }
54353
- },
54354
- "required": [
54355
- "granted"
54356
- ]
54357
- }
54358
- }
54359
- }
54360
- },
54361
- "responses": {
54362
- "200": {
54363
- "description": "Consent recorded",
54364
- "content": {
54365
- "application/json": {
54366
- "schema": {
54367
- "type": "object",
54368
- "properties": {
54369
- "granted": {
54370
- "type": "boolean"
54371
- },
54372
- "changedAt": {
54373
- "type": "string"
54374
- }
54375
- },
54376
- "required": [
54377
- "granted",
54378
- "changedAt"
54379
- ]
54380
- }
54381
- }
54382
- }
54383
- },
54384
- "400": {
54385
- "description": "Organization name or website is not set (a revoke falls back to the identity of the last grant)",
54386
- "content": {
54387
- "application/json": {
54388
- "schema": {
54389
- "$ref": "#/components/schemas/ErrorResponse"
54390
- }
54391
- }
54392
- }
54393
- },
54394
- "401": {
54395
- "description": "Unauthorized",
54396
- "content": {
54397
- "application/json": {
54398
- "schema": {
54399
- "$ref": "#/components/schemas/ErrorResponse"
54400
- }
54401
- }
54402
- }
54403
- },
54404
- "403": {
54405
- "description": "Only a config admin can change the consent",
54406
- "content": {
54407
- "application/json": {
54408
- "schema": {
54409
- "$ref": "#/components/schemas/ErrorResponse"
54410
- }
54411
- }
54412
- }
54413
- },
54414
- "502": {
54415
- "description": "The telemetry proxy did not accept the consent",
54416
- "content": {
54417
- "application/json": {
54418
- "schema": {
54419
- "$ref": "#/components/schemas/ErrorResponse"
54420
- }
54421
- }
54422
- }
54423
- }
54424
- }
54425
- }
54426
- },
54427
55323
  "/api/fleet-benchmark": {
54428
55324
  "get": {
54429
55325
  "summary": "Compare this swarm with similar swarms",