@desplega.ai/agent-swarm 2.7.0 → 2.7.1

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 (236) hide show
  1. package/dist/{acp-adapter-ma1js5n7.js → acp-adapter-8dn5tq56.js} +6 -6
  2. package/dist/{actions-1vhmtvg9.js → actions-3r6gw7dy.js} +18 -18
  3. package/dist/{amp-adapter-sxqqvmdk.js → amp-adapter-wjtq413p.js} +3 -3
  4. package/dist/{anthropic-messages-txs190dd.js → anthropic-messages-n4cby1rz.js} +4 -4
  5. package/dist/{app-mwx1d5a9.js → app-d53yhykk.js} +3 -3
  6. package/dist/{assistant-yx1p6g82.js → assistant-ksrawj3k.js} +20 -20
  7. package/dist/{boot-reembed-7h78vmvv.js → boot-reembed-fxfw17m2.js} +10 -3
  8. package/dist/{boot-reembed-5h37a2c2.js → boot-reembed-k5y5xbj0.js} +15 -8
  9. package/dist/{boot-scrub-sweep-8mawd4gw.js → boot-scrub-sweep-se41j9fd.js} +3 -3
  10. package/dist/{boot-seeds-ca84dhnn.js → boot-seeds-r3kwwv8b.js} +4 -4
  11. package/dist/{claude-adapter-wqt4hfkq.js → claude-adapter-ahmyf231.js} +7 -7
  12. package/dist/{claude-managed-adapter-6fjqtr2z.js → claude-managed-adapter-5knamegc.js} +3 -3
  13. package/dist/{claude-managed-setup-rqv98sea.js → claude-managed-setup-mdc7dy6b.js} +2 -2
  14. package/dist/{claude-sdk-session-f29f3b2x.js → claude-sdk-session-n5wen9zk.js} +8728 -8599
  15. package/dist/{cli-m5e802r7.js → cli-0dqtv2jg.js} +2 -2
  16. package/dist/{cli-e1595bgx.js → cli-0tww7dnz.js} +2 -2
  17. package/dist/{cli-2y7v133v.js → cli-0w4e4v58.js} +7 -7
  18. package/dist/{cli-d20qvpr2.js → cli-2sjm3t4r.js} +1 -1
  19. package/dist/{cli-gf2850q7.js → cli-3cywb44q.js} +18 -1
  20. package/dist/{cli-8wkb09q5.js → cli-3k9jej0c.js} +2 -2
  21. package/dist/{cli-twctnkng.js → cli-3v2cyqb8.js} +3 -3
  22. package/dist/{cli-he9gbdx0.js → cli-5qt9vzmq.js} +39 -20
  23. package/dist/{cli-a6ds2epe.js → cli-5rp1w4cr.js} +1 -1
  24. package/dist/{cli-6srv653c.js → cli-6vwjsetx.js} +4 -4
  25. package/dist/{cli-1hhbzkbb.js → cli-6w2yrrc0.js} +8 -8
  26. package/dist/{cli-f12mr20z.js → cli-75tdydgv.js} +1 -1
  27. package/dist/{cli-j3y0x2n4.js → cli-8feswf2v.js} +43 -33
  28. package/dist/{cli-07q03xm2.js → cli-8wd3mbyj.js} +1 -1
  29. package/dist/{cli-ymjpkxgn.js → cli-9csfthbw.js} +8 -6
  30. package/dist/{cli-f1e0ptjj.js → cli-b41p764a.js} +21 -2
  31. package/dist/{cli-kv7sbc2c.js → cli-c1t533hh.js} +3 -3
  32. package/dist/{cli-54sj64fc.js → cli-c28jxpcv.js} +1 -1
  33. package/dist/{cli-8mbc9za9.js → cli-cb50g9cd.js} +1 -1
  34. package/dist/{cli-c668vvcf.js → cli-d8gaphtr.js} +1 -1
  35. package/dist/{cli-86ehn4s5.js → cli-dgtfysne.js} +2 -2
  36. package/dist/{cli-sjctjr48.js → cli-dscnhn18.js} +1 -1
  37. package/dist/{cli-j0ppywdr.js → cli-dv11pgpv.js} +12 -12
  38. package/dist/{cli-1m9x8dr5.js → cli-ekptgk2m.js} +5 -5
  39. package/dist/{cli-9gsm2rzp.js → cli-f3mzy662.js} +17 -17
  40. package/dist/{cli-s0mgx214.js → cli-fk7k8s9x.js} +2 -2
  41. package/dist/{cli-vbhgkw9h.js → cli-h3e7bhvn.js} +3 -3
  42. package/dist/{cli-yd2nreqw.js → cli-hkxqdmnb.js} +2 -2
  43. package/dist/{cli-8wmj18cz.js → cli-hpkvgdad.js} +7 -4
  44. package/dist/{cli-wqr7cea4.js → cli-hq2v4rr5.js} +37 -9
  45. package/dist/{cli-sgqm2582.js → cli-k1zb7raw.js} +5 -5
  46. package/dist/{cli-4rvr7zfx.js → cli-k4awgvzm.js} +5 -0
  47. package/dist/{cli-ay40dnj3.js → cli-k7d3hvya.js} +2 -2
  48. package/dist/{cli-j9bpmykh.js → cli-kbtdftbw.js} +5 -5
  49. package/dist/{cli-x37r7qwf.js → cli-kj69b9tw.js} +25 -5
  50. package/dist/{cli-gsfk58nw.js → cli-kk9jy4nm.js} +1 -1
  51. package/dist/{cli-39aet655.js → cli-m52t4cta.js} +1 -1
  52. package/dist/{cli-h5jeg46p.js → cli-mdadewqp.js} +5 -5
  53. package/dist/{cli-a89zdqz9.js → cli-nf6k60sn.js} +1 -1
  54. package/dist/{cli-v6shg7na.js → cli-nzdf09js.js} +1 -1
  55. package/dist/{cli-rr7zx19j.js → cli-prcyzecg.js} +12 -12
  56. package/dist/{cli-6a9qfa8b.js → cli-pzafyqtk.js} +118 -48
  57. package/dist/{cli-48gxjmcz.js → cli-qvaa1gjp.js} +87 -24
  58. package/dist/{cli-qj442fws.js → cli-rg4b2g6j.js} +1 -1
  59. package/dist/{cli-aypd09nf.js → cli-rm66vqdz.js} +1 -1
  60. package/dist/{cli-9pshx6rd.js → cli-s504c3w7.js} +1 -1
  61. package/dist/{cli-ptfq202x.js → cli-swkx9jm2.js} +3 -3
  62. package/dist/{cli-m30k9777.js → cli-thsaq4pd.js} +16 -16
  63. package/dist/{cli-60sty27p.js → cli-twjnyvs8.js} +2 -2
  64. package/dist/{cli-rd5m70gj.js → cli-typdpe8g.js} +4 -4
  65. package/dist/{cli-yxbsmx56.js → cli-vg8pwmsd.js} +6 -6
  66. package/dist/{cli-s09j9vp5.js → cli-vhpckzvp.js} +1 -1
  67. package/dist/{cli-dv97kdzv.js → cli-wdxgsdz5.js} +2 -2
  68. package/dist/{cli-7a6p4e65.js → cli-wtjg6je3.js} +1 -1
  69. package/dist/{cli-b3yzyc57.js → cli-x3cngb1h.js} +44 -12
  70. package/dist/{cli-6mgdba42.js → cli-xbz6mcg4.js} +2 -2
  71. package/dist/{cli-2pvzmas1.js → cli-y4tdxsqb.js} +3 -3
  72. package/dist/{cli-f4dbh7a5.js → cli-yqrsp3ny.js} +7 -7
  73. package/dist/cli.js +27 -19
  74. package/dist/{codex-adapter-zk59x2zh.js → codex-adapter-7wepzq15.js} +5 -5
  75. package/dist/{codex-hook-xyjhvxwd.js → codex-hook-pbdh4xhx.js} +2 -2
  76. package/dist/{codex-session-runner-kh6s4j3n.js → codex-session-runner-02sb49e4.js} +5 -5
  77. package/dist/{commands-68et1qv2.js → commands-3rcspxct.js} +2 -2
  78. package/dist/{controller-fyrbnzg4.js → controller-8ar4avd6.js} +3 -3
  79. package/dist/{controllers-connect-nep9h2xv.js → controllers-connect-ajvh9h0v.js} +19 -19
  80. package/dist/{cursor-adapter-yss3pg7t.js → cursor-adapter-gd0sa7bh.js} +1 -1
  81. package/dist/{db-28gjyvxj.js → db-dv9j7ts5.js} +2 -2
  82. package/dist/{db-8ftwvzba.js → db-z26vgdvj.js} +3 -3
  83. package/dist/{dispatcher-hayexmkr.js → dispatcher-8m0htjq8.js} +17 -17
  84. package/dist/{dsh-adapter-46wawff9.js → dsh-adapter-y8gyk130.js} +1 -1
  85. package/dist/{e2b-fn3zacvt.js → e2b-74vg9b7e.js} +1 -1
  86. package/dist/{e2b-222hsajc.js → e2b-jyay8wzn.js} +1 -1
  87. package/dist/{easter-egg-3d-8d1e0h4m.js → easter-egg-3d-28f880xx.js} +1 -1
  88. package/dist/{execute-cjrfxfnm.js → execute-9seb79vh.js} +1 -1
  89. package/dist/{external-channel-xbmxcg09.js → external-channel-smz7jyth.js} +2 -2
  90. package/dist/{getMachineId-bsd-brn0xym3.js → getMachineId-bsd-whfre6gr.js} +3 -3
  91. package/dist/{getMachineId-darwin-t339sfxm.js → getMachineId-darwin-5zjynb19.js} +3 -3
  92. package/dist/{getMachineId-linux-5eq95d8b.js → getMachineId-linux-8mksrrsq.js} +3 -3
  93. package/dist/{getMachineId-unsupported-qavrtc7j.js → getMachineId-unsupported-fxtqsdt2.js} +3 -3
  94. package/dist/{getMachineId-win-q7fe1wx7.js → getMachineId-win-nzfmz857.js} +3 -3
  95. package/dist/{grok-adapter-ag4wks2a.js → grok-adapter-z0nnvtbn.js} +7 -7
  96. package/dist/handlers-pspryh6g.js +41 -0
  97. package/dist/{heartbeat-psfvcgwp.js → heartbeat-f928aqyp.js} +20 -20
  98. package/dist/{hook-cyq4mryn.js → hook-d7c605r4.js} +7 -7
  99. package/dist/{hook-8pz04697.js → hook-q9hv5xf9.js} +5 -5
  100. package/dist/{http-haj1nd6k.js → http-q6j4k989.js} +934 -180
  101. package/dist/{index-z5h22pes.js → index-5nb266jr.js} +17 -17
  102. package/dist/{index-ysd45kgc.js → index-8fxt5eah.js} +10 -10
  103. package/dist/{index-zgvqzjsw.js → index-cekzwhez.js} +5 -5
  104. package/dist/{index-zyq8ct52.js → index-ch0c1xff.js} +17 -17
  105. package/dist/{index-syvhnvtw.js → index-ebnjhxh1.js} +1 -1
  106. package/dist/{index-y1ajx04a.js → index-ed8dy8rn.js} +20 -20
  107. package/dist/{index-jwt2bj6f.js → index-ejqdkkqx.js} +11 -10
  108. package/dist/{index-dr94zbnh.js → index-farm1zsn.js} +32661 -29443
  109. package/dist/{index-q52f47pe.js → index-yn1yxg85.js} +1 -1
  110. package/dist/{keepalive-xdvsamvj.js → keepalive-zzc3hks1.js} +3 -3
  111. package/dist/{lead-hqg57kdp.js → lead-c0pjcaw4.js} +36 -36
  112. package/dist/{maintenance-4y2xzh3a.js → maintenance-kqsxzpzx.js} +1 -1
  113. package/dist/{oauth-refresh-sweep-jd4r7zbs.js → oauth-refresh-sweep-7qt0g55z.js} +2 -2
  114. package/dist/{onboard-18447q9q.js → onboard-k7x13fqg.js} +118 -5
  115. package/dist/{opencode-adapter-26b2frdf.js → opencode-adapter-tqvrtter.js} +5 -5
  116. package/dist/{otel-impl-f9tgr8yw.js → otel-impl-sqkf6k3b.js} +97 -97
  117. package/dist/{pi-mono-adapter-qn6qbga1.js → pi-mono-adapter-m2qnafxm.js} +63 -9
  118. package/dist/{pricing-refresh-dw2tgb53.js → pricing-refresh-wkpwhgvs.js} +3 -3
  119. package/dist/{rbac-roles-s4nwj2m3.js → rbac-roles-dpn0c0wj.js} +7 -4
  120. package/dist/{rbac-roles-aygm2760.js → rbac-roles-wk7xd6a6.js} +2 -2
  121. package/dist/{render-v2-yfvdfr0x.js → render-v2-ex2m4g2k.js} +3 -3
  122. package/dist/{resume-1bmvjbf3.js → resume-725g9b0b.js} +7 -7
  123. package/dist/{runtime-f7tpzedy.js → runtime-kajas15g.js} +1 -1
  124. package/dist/{session-access-r5garej6.js → session-access-0j2ezjje.js} +8 -4
  125. package/dist/{session-source-backfill-424wzv0r.js → session-source-backfill-62202awe.js} +2 -2
  126. package/dist/{setup-8tygvxkq.js → setup-9sj11ax6.js} +1 -1
  127. package/dist/{virtual-modules-xsw323b3.js → virtual-modules-c6fcq6zr.js} +2 -2
  128. package/dist/{work-objects-ggnghpgf.js → work-objects-0y07495y.js} +20 -20
  129. package/dist/{worker-sqjd1nqf.js → worker-d4q9sqbc.js} +36 -36
  130. package/openapi.json +1070 -9
  131. package/package.json +3 -3
  132. package/src/be/connector-codes.ts +65 -22
  133. package/src/be/memory/boot-reembed.ts +4 -1
  134. package/src/be/memory/constants.ts +6 -0
  135. package/src/be/memory/embedding-recovery.ts +48 -0
  136. package/src/be/memory/index-content.ts +5 -2
  137. package/src/be/memory/providers/openai-embedding.ts +65 -14
  138. package/src/be/memory/task-learning.ts +110 -8
  139. package/src/be/memory/types.ts +13 -2
  140. package/src/be/migrations/246_connector_code_kind.sql +11 -0
  141. package/src/be/onboarding.ts +125 -15
  142. package/src/be/rbac-roles.ts +4 -1
  143. package/src/be/scripts/embeddings.ts +2 -2
  144. package/src/be/seed/agent-fs-provision.ts +75 -14
  145. package/src/be/swarm-config-guard.ts +3 -0
  146. package/src/cli.tsx +9 -0
  147. package/src/comb/config.ts +6 -1
  148. package/src/commands/onboard/agent-fs-version.ts +5 -0
  149. package/src/commands/onboard/compose-generator.ts +112 -1
  150. package/src/commands/onboard/env-generator.ts +9 -0
  151. package/src/commands/onboard/tei-image.ts +12 -0
  152. package/src/commands/onboard/types.ts +7 -0
  153. package/src/commands/onboard.tsx +11 -1
  154. package/src/commands/runner.ts +14 -1
  155. package/src/http/agentfs-proxy.ts +369 -0
  156. package/src/http/all-routes.ts +1 -0
  157. package/src/http/codex-oauth-device.ts +8 -1
  158. package/src/http/fs.ts +64 -10
  159. package/src/http/inbox-state.ts +27 -1
  160. package/src/http/index.ts +4 -1
  161. package/src/http/memory.ts +7 -4
  162. package/src/http/onboarding.ts +139 -11
  163. package/src/http/session-access.ts +24 -0
  164. package/src/http/sessions.ts +10 -6
  165. package/src/http/tasks.ts +85 -11
  166. package/src/http/telemetry-ui.ts +1 -1
  167. package/src/http/user-roles.ts +4 -1
  168. package/src/http/users.ts +272 -3
  169. package/src/http/utils.ts +22 -3
  170. package/src/prompts/base-prompt.ts +24 -9
  171. package/src/prompts/session-templates.ts +26 -2
  172. package/src/providers/amp-adapter.ts +1 -1
  173. package/src/providers/codex-adapter.ts +6 -1
  174. package/src/providers/cursor-adapter.ts +1 -1
  175. package/src/providers/pi-mono-adapter.ts +58 -3
  176. package/src/rbac/legacy-policy.ts +1 -0
  177. package/src/rbac/permissions.ts +4 -0
  178. package/src/tests/agent-fs-provision-seeder.test.ts +261 -92
  179. package/src/tests/agentfs-proxy.test.ts +1106 -0
  180. package/src/tests/base-prompt.test.ts +69 -2
  181. package/src/tests/codex-adapter.test.ts +46 -8
  182. package/src/tests/codex-oauth-device.test.ts +12 -1
  183. package/src/tests/comb-config-guard.test.ts +20 -0
  184. package/src/tests/comb-links.test.ts +79 -1
  185. package/src/tests/comb-status.test.ts +44 -0
  186. package/src/tests/docs-index-footprint.test.js +3 -3
  187. package/src/tests/fixtures/onboard/baseline-states.ts +68 -0
  188. package/src/tests/fixtures/onboard/content.compose.yml.txt +190 -0
  189. package/src/tests/fixtures/onboard/content.env.txt +29 -0
  190. package/src/tests/fixtures/onboard/dev.compose.yml.txt +155 -0
  191. package/src/tests/fixtures/onboard/dev.env.txt +28 -0
  192. package/src/tests/fixtures/onboard/full-all.compose.yml.txt +582 -0
  193. package/src/tests/fixtures/onboard/full-all.env.txt +59 -0
  194. package/src/tests/fixtures/onboard/full.compose.yml.txt +435 -0
  195. package/src/tests/fixtures/onboard/full.env.txt +36 -0
  196. package/src/tests/fixtures/onboard/research.compose.yml.txt +155 -0
  197. package/src/tests/fixtures/onboard/research.env.txt +28 -0
  198. package/src/tests/fixtures/onboard/solo.compose.yml.txt +85 -0
  199. package/src/tests/fixtures/onboard/solo.env.txt +26 -0
  200. package/src/tests/http-log-scrubbing.test.ts +34 -1
  201. package/src/tests/http-task-write-ownership.test.ts +5 -1
  202. package/src/tests/invites-http.test.ts +464 -0
  203. package/src/tests/memory-embedding-input-cap.test.ts +122 -1
  204. package/src/tests/memory-embedding-recovery.test.ts +137 -0
  205. package/src/tests/onboard-compose.test.ts +142 -0
  206. package/src/tests/onboard-env.test.ts +24 -0
  207. package/src/tests/onboard-non-interactive.test.ts +29 -0
  208. package/src/tests/onboard-tei-image.test.ts +36 -0
  209. package/src/tests/onboarding.test.ts +451 -4
  210. package/src/tests/openai-embedding-provider.test.ts +105 -2
  211. package/src/tests/pi-mono-session-cost-on-abort.test.ts +270 -0
  212. package/src/tests/preload-env.test.ts +4 -0
  213. package/src/tests/preload.ts +4 -0
  214. package/src/tests/prompt-template-session.test.ts +19 -3
  215. package/src/tests/rbac-admission-e2e.test.ts +22 -6
  216. package/src/tests/rbac-admission.test.ts +342 -4
  217. package/src/tests/rbac-engine.test.ts +1 -0
  218. package/src/tests/rbac-roles.test.ts +9 -1
  219. package/src/tests/send-task-requester-gate.test.ts +64 -3
  220. package/src/tests/sessions-move.test.ts +39 -1
  221. package/src/tests/store-progress-learning.test.ts +95 -2
  222. package/src/tests/whoami-route.test.ts +41 -0
  223. package/src/tools/inject-learning.ts +1 -1
  224. package/src/tools/memory-edit.ts +1 -1
  225. package/src/tools/memory-search.ts +1 -1
  226. package/src/tools/store-progress.ts +5 -1
  227. package/src/tools/utils.ts +12 -1
  228. package/src/utils/constants.ts +39 -0
  229. package/src/utils/task-attachment-links.ts +15 -3
  230. package/templates/skills/swarm-docs/content.md +1 -1
  231. package/dist/handlers-tzmevqb5.js +0 -41
  232. package/dist/{azure-openai-responses-9kfwhmn7.js → azure-openai-responses-43asa23s.js} +0 -0
  233. package/dist/{node-vxx896fa.js → node-t28cc56b.js} +0 -0
  234. package/dist/{openai-codex-responses-79s8xnbh.js → openai-codex-responses-jhr3sjtm.js} +3 -3
  235. package/dist/{openai-completions-tdbyts0x.js → openai-completions-gs6yn37k.js} +3 -3
  236. /package/dist/{openai-responses-dm3t5vqp.js → openai-responses-jqm9vwwk.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.7.0",
5
+ "version": "2.7.1",
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": [
@@ -22435,7 +22435,7 @@
22435
22435
  "/api/fs/members/invite": {
22436
22436
  "post": {
22437
22437
  "summary": "Invite an external member into the agent-fs shared org",
22438
- "description": "The API server performs the invite with its own bootstrap credentials (which are API-only and never served over HTTP), provisioning the shared org/drive first when needed. Intended for the cloud control plane's Connect-to-Drive flow. No keys are returned; the invitee obtains their own key via agent-fs registration.",
22438
+ "description": "The API server performs the invite with its own bootstrap credentials (which are API-only and never served over HTTP), provisioning the shared org/drive first when needed. Intended for the cloud control plane's Connect-to-Drive flow. An email with an agent-fs account is added directly (status added). An email without one gets a pending invite (status pending) with an acceptUrl when agent-fs returns one; agent-fs sends no email, so the caller must hand the link to the invitee. No keys are returned; the invitee obtains their own key via agent-fs registration.",
22439
22439
  "tags": [
22440
22440
  "FS"
22441
22441
  ],
@@ -22473,7 +22473,7 @@
22473
22473
  },
22474
22474
  "responses": {
22475
22475
  "200": {
22476
- "description": "Invite state ({ orgId, invited })",
22476
+ "description": "Invite state ({ orgId, invited, status, acceptUrl? })",
22477
22477
  "content": {
22478
22478
  "application/json": {
22479
22479
  "schema": {
@@ -22483,12 +22483,35 @@
22483
22483
  "type": "string"
22484
22484
  },
22485
22485
  "invited": {
22486
- "type": "boolean"
22486
+ "type": "boolean",
22487
+ "description": "False only when the email already holds the requested role."
22488
+ },
22489
+ "status": {
22490
+ "type": "string",
22491
+ "enum": [
22492
+ "already_member",
22493
+ "added",
22494
+ "pending"
22495
+ ],
22496
+ "description": "already_member: no change. added: an existing agent-fs account joined the org. pending: the email has no account, so agent-fs created an invite the person must accept."
22497
+ },
22498
+ "inviteId": {
22499
+ "type": "string",
22500
+ "description": "Pending invite id (status pending)."
22501
+ },
22502
+ "expiresAt": {
22503
+ "type": "string",
22504
+ "description": "ISO time the accept link expires (status pending)."
22505
+ },
22506
+ "acceptUrl": {
22507
+ "type": "string",
22508
+ "description": "Link the invitee opens to accept (status pending). agent-fs sends no email, so hand it to the person. Absent when agent-fs has no app URL configured."
22487
22509
  }
22488
22510
  },
22489
22511
  "required": [
22490
22512
  "orgId",
22491
- "invited"
22513
+ "invited",
22514
+ "status"
22492
22515
  ]
22493
22516
  }
22494
22517
  }
@@ -22504,6 +22527,16 @@
22504
22527
  }
22505
22528
  }
22506
22529
  },
22530
+ "403": {
22531
+ "description": "A non-admin user token named an email other than its own",
22532
+ "content": {
22533
+ "application/json": {
22534
+ "schema": {
22535
+ "$ref": "#/components/schemas/ErrorResponse"
22536
+ }
22537
+ }
22538
+ }
22539
+ },
22507
22540
  "500": {
22508
22541
  "description": "Provisioning or invite failed",
22509
22542
  "content": {
@@ -23236,6 +23269,16 @@
23236
23269
  }
23237
23270
  }
23238
23271
  }
23272
+ },
23273
+ "403": {
23274
+ "description": "A non-admin user token wrote another user's state",
23275
+ "content": {
23276
+ "application/json": {
23277
+ "schema": {
23278
+ "$ref": "#/components/schemas/ErrorResponse"
23279
+ }
23280
+ }
23281
+ }
23239
23282
  }
23240
23283
  }
23241
23284
  }
@@ -23365,6 +23408,16 @@
23365
23408
  }
23366
23409
  }
23367
23410
  }
23411
+ },
23412
+ "403": {
23413
+ "description": "A non-admin user token wrote another user's state",
23414
+ "content": {
23415
+ "application/json": {
23416
+ "schema": {
23417
+ "$ref": "#/components/schemas/ErrorResponse"
23418
+ }
23419
+ }
23420
+ }
23368
23421
  }
23369
23422
  }
23370
23423
  }
@@ -31109,6 +31162,7 @@
31109
31162
  "agents",
31110
31163
  "memory",
31111
31164
  "integrations",
31165
+ "files",
31112
31166
  "first_task"
31113
31167
  ]
31114
31168
  },
@@ -31496,6 +31550,62 @@
31496
31550
  "errorClass"
31497
31551
  ]
31498
31552
  },
31553
+ "files": {
31554
+ "type": "object",
31555
+ "properties": {
31556
+ "status": {
31557
+ "type": "string",
31558
+ "enum": [
31559
+ "todo",
31560
+ "done",
31561
+ "skipped",
31562
+ "failed"
31563
+ ]
31564
+ },
31565
+ "at": {
31566
+ "type": [
31567
+ "string",
31568
+ "null"
31569
+ ],
31570
+ "format": "date-time"
31571
+ },
31572
+ "method": {
31573
+ "type": [
31574
+ "string",
31575
+ "null"
31576
+ ],
31577
+ "enum": [
31578
+ "created",
31579
+ "connected",
31580
+ null
31581
+ ]
31582
+ },
31583
+ "errorClass": {
31584
+ "type": [
31585
+ "string",
31586
+ "null"
31587
+ ],
31588
+ "enum": [
31589
+ "auth",
31590
+ "network",
31591
+ "timeout",
31592
+ "dimension",
31593
+ "model",
31594
+ "endpoint",
31595
+ "not_enabled",
31596
+ "expired",
31597
+ "unknown",
31598
+ null
31599
+ ]
31600
+ }
31601
+ },
31602
+ "required": [
31603
+ "status",
31604
+ "at",
31605
+ "method",
31606
+ "errorClass"
31607
+ ]
31608
+ },
31499
31609
  "first_task": {
31500
31610
  "type": "object",
31501
31611
  "properties": {
@@ -31560,6 +31670,7 @@
31560
31670
  "agents",
31561
31671
  "memory",
31562
31672
  "integrations",
31673
+ "files",
31563
31674
  "first_task"
31564
31675
  ]
31565
31676
  }
@@ -31648,11 +31759,53 @@
31648
31759
  "dimensions": {
31649
31760
  "type": "integer",
31650
31761
  "exclusiveMinimum": 0
31762
+ },
31763
+ "model": {
31764
+ "type": [
31765
+ "string",
31766
+ "null"
31767
+ ]
31768
+ },
31769
+ "local": {
31770
+ "type": "boolean"
31771
+ },
31772
+ "provider": {
31773
+ "type": [
31774
+ "string",
31775
+ "null"
31776
+ ],
31777
+ "enum": [
31778
+ "local",
31779
+ "openai",
31780
+ "openrouter",
31781
+ "vercel",
31782
+ "azure",
31783
+ "custom",
31784
+ null
31785
+ ]
31786
+ },
31787
+ "localDefault": {
31788
+ "type": [
31789
+ "object",
31790
+ "null"
31791
+ ],
31792
+ "properties": {
31793
+ "model": {
31794
+ "type": "string"
31795
+ }
31796
+ },
31797
+ "required": [
31798
+ "model"
31799
+ ]
31651
31800
  }
31652
31801
  },
31653
31802
  "required": [
31654
31803
  "configured",
31655
- "dimensions"
31804
+ "dimensions",
31805
+ "model",
31806
+ "local",
31807
+ "provider",
31808
+ "localDefault"
31656
31809
  ]
31657
31810
  },
31658
31811
  "integrations": {
@@ -31720,6 +31873,17 @@
31720
31873
  "id",
31721
31874
  "status"
31722
31875
  ]
31876
+ },
31877
+ "files": {
31878
+ "type": "object",
31879
+ "properties": {
31880
+ "enabled": {
31881
+ "type": "boolean"
31882
+ }
31883
+ },
31884
+ "required": [
31885
+ "enabled"
31886
+ ]
31723
31887
  }
31724
31888
  },
31725
31889
  "required": [
@@ -31727,7 +31891,8 @@
31727
31891
  "embeddings",
31728
31892
  "integrations",
31729
31893
  "agents",
31730
- "firstTask"
31894
+ "firstTask",
31895
+ "files"
31731
31896
  ]
31732
31897
  }
31733
31898
  },
@@ -31774,6 +31939,7 @@
31774
31939
  "agents",
31775
31940
  "memory",
31776
31941
  "integrations",
31942
+ "files",
31777
31943
  "first_task"
31778
31944
  ]
31779
31945
  }
@@ -31945,6 +32111,36 @@
31945
32111
  ],
31946
32112
  "additionalProperties": false
31947
32113
  },
32114
+ {
32115
+ "type": "object",
32116
+ "properties": {
32117
+ "action": {
32118
+ "type": "string",
32119
+ "enum": [
32120
+ "complete"
32121
+ ]
32122
+ },
32123
+ "step": {
32124
+ "type": "string",
32125
+ "enum": [
32126
+ "files"
32127
+ ]
32128
+ },
32129
+ "method": {
32130
+ "type": "string",
32131
+ "enum": [
32132
+ "created",
32133
+ "connected"
32134
+ ]
32135
+ }
32136
+ },
32137
+ "required": [
32138
+ "action",
32139
+ "step",
32140
+ "method"
32141
+ ],
32142
+ "additionalProperties": false
32143
+ },
31948
32144
  {
31949
32145
  "type": "object",
31950
32146
  "properties": {
@@ -31962,6 +32158,7 @@
31962
32158
  "agents",
31963
32159
  "memory",
31964
32160
  "integrations",
32161
+ "files",
31965
32162
  "first_task"
31966
32163
  ]
31967
32164
  }
@@ -31990,6 +32187,7 @@
31990
32187
  "agents",
31991
32188
  "memory",
31992
32189
  "integrations",
32190
+ "files",
31993
32191
  "first_task"
31994
32192
  ]
31995
32193
  },
@@ -32123,6 +32321,7 @@
32123
32321
  "agents",
32124
32322
  "memory",
32125
32323
  "integrations",
32324
+ "files",
32126
32325
  "first_task"
32127
32326
  ]
32128
32327
  },
@@ -32510,6 +32709,62 @@
32510
32709
  "errorClass"
32511
32710
  ]
32512
32711
  },
32712
+ "files": {
32713
+ "type": "object",
32714
+ "properties": {
32715
+ "status": {
32716
+ "type": "string",
32717
+ "enum": [
32718
+ "todo",
32719
+ "done",
32720
+ "skipped",
32721
+ "failed"
32722
+ ]
32723
+ },
32724
+ "at": {
32725
+ "type": [
32726
+ "string",
32727
+ "null"
32728
+ ],
32729
+ "format": "date-time"
32730
+ },
32731
+ "method": {
32732
+ "type": [
32733
+ "string",
32734
+ "null"
32735
+ ],
32736
+ "enum": [
32737
+ "created",
32738
+ "connected",
32739
+ null
32740
+ ]
32741
+ },
32742
+ "errorClass": {
32743
+ "type": [
32744
+ "string",
32745
+ "null"
32746
+ ],
32747
+ "enum": [
32748
+ "auth",
32749
+ "network",
32750
+ "timeout",
32751
+ "dimension",
32752
+ "model",
32753
+ "endpoint",
32754
+ "not_enabled",
32755
+ "expired",
32756
+ "unknown",
32757
+ null
32758
+ ]
32759
+ }
32760
+ },
32761
+ "required": [
32762
+ "status",
32763
+ "at",
32764
+ "method",
32765
+ "errorClass"
32766
+ ]
32767
+ },
32513
32768
  "first_task": {
32514
32769
  "type": "object",
32515
32770
  "properties": {
@@ -32574,6 +32829,7 @@
32574
32829
  "agents",
32575
32830
  "memory",
32576
32831
  "integrations",
32832
+ "files",
32577
32833
  "first_task"
32578
32834
  ]
32579
32835
  }
@@ -32662,11 +32918,53 @@
32662
32918
  "dimensions": {
32663
32919
  "type": "integer",
32664
32920
  "exclusiveMinimum": 0
32921
+ },
32922
+ "model": {
32923
+ "type": [
32924
+ "string",
32925
+ "null"
32926
+ ]
32927
+ },
32928
+ "local": {
32929
+ "type": "boolean"
32930
+ },
32931
+ "provider": {
32932
+ "type": [
32933
+ "string",
32934
+ "null"
32935
+ ],
32936
+ "enum": [
32937
+ "local",
32938
+ "openai",
32939
+ "openrouter",
32940
+ "vercel",
32941
+ "azure",
32942
+ "custom",
32943
+ null
32944
+ ]
32945
+ },
32946
+ "localDefault": {
32947
+ "type": [
32948
+ "object",
32949
+ "null"
32950
+ ],
32951
+ "properties": {
32952
+ "model": {
32953
+ "type": "string"
32954
+ }
32955
+ },
32956
+ "required": [
32957
+ "model"
32958
+ ]
32665
32959
  }
32666
32960
  },
32667
32961
  "required": [
32668
32962
  "configured",
32669
- "dimensions"
32963
+ "dimensions",
32964
+ "model",
32965
+ "local",
32966
+ "provider",
32967
+ "localDefault"
32670
32968
  ]
32671
32969
  },
32672
32970
  "integrations": {
@@ -32734,6 +33032,17 @@
32734
33032
  "id",
32735
33033
  "status"
32736
33034
  ]
33035
+ },
33036
+ "files": {
33037
+ "type": "object",
33038
+ "properties": {
33039
+ "enabled": {
33040
+ "type": "boolean"
33041
+ }
33042
+ },
33043
+ "required": [
33044
+ "enabled"
33045
+ ]
32737
33046
  }
32738
33047
  },
32739
33048
  "required": [
@@ -32741,7 +33050,8 @@
32741
33050
  "embeddings",
32742
33051
  "integrations",
32743
33052
  "agents",
32744
- "firstTask"
33053
+ "firstTask",
33054
+ "files"
32745
33055
  ]
32746
33056
  }
32747
33057
  },
@@ -32822,6 +33132,9 @@
32822
33132
  "OPENAI_API_KEY",
32823
33133
  "OPENROUTER_API_KEY"
32824
33134
  ]
33135
+ },
33136
+ "restoreDefault": {
33137
+ "type": "boolean"
32825
33138
  }
32826
33139
  },
32827
33140
  "required": [
@@ -33007,6 +33320,379 @@
33007
33320
  }
33008
33321
  }
33009
33322
  },
33323
+ "/agentfs/{path}": {
33324
+ "get": {
33325
+ "summary": "Streaming pass-through proxy to agent-fs (enabled by AGENT_FS_PROXY)",
33326
+ "tags": [
33327
+ "Comb"
33328
+ ],
33329
+ "responses": {
33330
+ "200": {
33331
+ "description": "Upstream agent-fs response, streamed verbatim"
33332
+ },
33333
+ "401": {
33334
+ "description": "Returned by agent-fs when credentials are missing or invalid, or by the swarm when POST /agentfs/auth/register has no swarm credential",
33335
+ "content": {
33336
+ "application/json": {
33337
+ "schema": {
33338
+ "$ref": "#/components/schemas/ErrorResponse"
33339
+ }
33340
+ }
33341
+ }
33342
+ },
33343
+ "403": {
33344
+ "description": "POST /agentfs/auth/register with a user token for an email that is not the user's",
33345
+ "content": {
33346
+ "application/json": {
33347
+ "schema": {
33348
+ "$ref": "#/components/schemas/ErrorResponse"
33349
+ }
33350
+ }
33351
+ }
33352
+ },
33353
+ "413": {
33354
+ "description": "POST /agentfs/auth/register body over 16 KB",
33355
+ "content": {
33356
+ "application/json": {
33357
+ "schema": {
33358
+ "$ref": "#/components/schemas/ErrorResponse"
33359
+ }
33360
+ }
33361
+ }
33362
+ },
33363
+ "429": {
33364
+ "description": "Too many registrations from this IP (POST /agentfs/auth/register)",
33365
+ "content": {
33366
+ "application/json": {
33367
+ "schema": {
33368
+ "$ref": "#/components/schemas/ErrorResponse"
33369
+ }
33370
+ }
33371
+ }
33372
+ },
33373
+ "502": {
33374
+ "description": "agent-fs is unreachable",
33375
+ "content": {
33376
+ "application/json": {
33377
+ "schema": {
33378
+ "$ref": "#/components/schemas/ErrorResponse"
33379
+ }
33380
+ }
33381
+ }
33382
+ }
33383
+ }
33384
+ },
33385
+ "post": {
33386
+ "summary": "Streaming pass-through proxy to agent-fs (enabled by AGENT_FS_PROXY)",
33387
+ "tags": [
33388
+ "Comb"
33389
+ ],
33390
+ "responses": {
33391
+ "200": {
33392
+ "description": "Upstream agent-fs response, streamed verbatim"
33393
+ },
33394
+ "401": {
33395
+ "description": "Returned by agent-fs when credentials are missing or invalid, or by the swarm when POST /agentfs/auth/register has no swarm credential",
33396
+ "content": {
33397
+ "application/json": {
33398
+ "schema": {
33399
+ "$ref": "#/components/schemas/ErrorResponse"
33400
+ }
33401
+ }
33402
+ }
33403
+ },
33404
+ "403": {
33405
+ "description": "POST /agentfs/auth/register with a user token for an email that is not the user's",
33406
+ "content": {
33407
+ "application/json": {
33408
+ "schema": {
33409
+ "$ref": "#/components/schemas/ErrorResponse"
33410
+ }
33411
+ }
33412
+ }
33413
+ },
33414
+ "413": {
33415
+ "description": "POST /agentfs/auth/register body over 16 KB",
33416
+ "content": {
33417
+ "application/json": {
33418
+ "schema": {
33419
+ "$ref": "#/components/schemas/ErrorResponse"
33420
+ }
33421
+ }
33422
+ }
33423
+ },
33424
+ "429": {
33425
+ "description": "Too many registrations from this IP (POST /agentfs/auth/register)",
33426
+ "content": {
33427
+ "application/json": {
33428
+ "schema": {
33429
+ "$ref": "#/components/schemas/ErrorResponse"
33430
+ }
33431
+ }
33432
+ }
33433
+ },
33434
+ "502": {
33435
+ "description": "agent-fs is unreachable",
33436
+ "content": {
33437
+ "application/json": {
33438
+ "schema": {
33439
+ "$ref": "#/components/schemas/ErrorResponse"
33440
+ }
33441
+ }
33442
+ }
33443
+ }
33444
+ }
33445
+ },
33446
+ "put": {
33447
+ "summary": "Streaming pass-through proxy to agent-fs (enabled by AGENT_FS_PROXY)",
33448
+ "tags": [
33449
+ "Comb"
33450
+ ],
33451
+ "responses": {
33452
+ "200": {
33453
+ "description": "Upstream agent-fs response, streamed verbatim"
33454
+ },
33455
+ "401": {
33456
+ "description": "Returned by agent-fs when credentials are missing or invalid, or by the swarm when POST /agentfs/auth/register has no swarm credential",
33457
+ "content": {
33458
+ "application/json": {
33459
+ "schema": {
33460
+ "$ref": "#/components/schemas/ErrorResponse"
33461
+ }
33462
+ }
33463
+ }
33464
+ },
33465
+ "403": {
33466
+ "description": "POST /agentfs/auth/register with a user token for an email that is not the user's",
33467
+ "content": {
33468
+ "application/json": {
33469
+ "schema": {
33470
+ "$ref": "#/components/schemas/ErrorResponse"
33471
+ }
33472
+ }
33473
+ }
33474
+ },
33475
+ "413": {
33476
+ "description": "POST /agentfs/auth/register body over 16 KB",
33477
+ "content": {
33478
+ "application/json": {
33479
+ "schema": {
33480
+ "$ref": "#/components/schemas/ErrorResponse"
33481
+ }
33482
+ }
33483
+ }
33484
+ },
33485
+ "429": {
33486
+ "description": "Too many registrations from this IP (POST /agentfs/auth/register)",
33487
+ "content": {
33488
+ "application/json": {
33489
+ "schema": {
33490
+ "$ref": "#/components/schemas/ErrorResponse"
33491
+ }
33492
+ }
33493
+ }
33494
+ },
33495
+ "502": {
33496
+ "description": "agent-fs is unreachable",
33497
+ "content": {
33498
+ "application/json": {
33499
+ "schema": {
33500
+ "$ref": "#/components/schemas/ErrorResponse"
33501
+ }
33502
+ }
33503
+ }
33504
+ }
33505
+ }
33506
+ },
33507
+ "delete": {
33508
+ "summary": "Streaming pass-through proxy to agent-fs (enabled by AGENT_FS_PROXY)",
33509
+ "tags": [
33510
+ "Comb"
33511
+ ],
33512
+ "responses": {
33513
+ "200": {
33514
+ "description": "Upstream agent-fs response, streamed verbatim"
33515
+ },
33516
+ "401": {
33517
+ "description": "Returned by agent-fs when credentials are missing or invalid, or by the swarm when POST /agentfs/auth/register has no swarm credential",
33518
+ "content": {
33519
+ "application/json": {
33520
+ "schema": {
33521
+ "$ref": "#/components/schemas/ErrorResponse"
33522
+ }
33523
+ }
33524
+ }
33525
+ },
33526
+ "403": {
33527
+ "description": "POST /agentfs/auth/register with a user token for an email that is not the user's",
33528
+ "content": {
33529
+ "application/json": {
33530
+ "schema": {
33531
+ "$ref": "#/components/schemas/ErrorResponse"
33532
+ }
33533
+ }
33534
+ }
33535
+ },
33536
+ "413": {
33537
+ "description": "POST /agentfs/auth/register body over 16 KB",
33538
+ "content": {
33539
+ "application/json": {
33540
+ "schema": {
33541
+ "$ref": "#/components/schemas/ErrorResponse"
33542
+ }
33543
+ }
33544
+ }
33545
+ },
33546
+ "429": {
33547
+ "description": "Too many registrations from this IP (POST /agentfs/auth/register)",
33548
+ "content": {
33549
+ "application/json": {
33550
+ "schema": {
33551
+ "$ref": "#/components/schemas/ErrorResponse"
33552
+ }
33553
+ }
33554
+ }
33555
+ },
33556
+ "502": {
33557
+ "description": "agent-fs is unreachable",
33558
+ "content": {
33559
+ "application/json": {
33560
+ "schema": {
33561
+ "$ref": "#/components/schemas/ErrorResponse"
33562
+ }
33563
+ }
33564
+ }
33565
+ }
33566
+ }
33567
+ },
33568
+ "patch": {
33569
+ "summary": "Streaming pass-through proxy to agent-fs (enabled by AGENT_FS_PROXY)",
33570
+ "tags": [
33571
+ "Comb"
33572
+ ],
33573
+ "responses": {
33574
+ "200": {
33575
+ "description": "Upstream agent-fs response, streamed verbatim"
33576
+ },
33577
+ "401": {
33578
+ "description": "Returned by agent-fs when credentials are missing or invalid, or by the swarm when POST /agentfs/auth/register has no swarm credential",
33579
+ "content": {
33580
+ "application/json": {
33581
+ "schema": {
33582
+ "$ref": "#/components/schemas/ErrorResponse"
33583
+ }
33584
+ }
33585
+ }
33586
+ },
33587
+ "403": {
33588
+ "description": "POST /agentfs/auth/register with a user token for an email that is not the user's",
33589
+ "content": {
33590
+ "application/json": {
33591
+ "schema": {
33592
+ "$ref": "#/components/schemas/ErrorResponse"
33593
+ }
33594
+ }
33595
+ }
33596
+ },
33597
+ "413": {
33598
+ "description": "POST /agentfs/auth/register body over 16 KB",
33599
+ "content": {
33600
+ "application/json": {
33601
+ "schema": {
33602
+ "$ref": "#/components/schemas/ErrorResponse"
33603
+ }
33604
+ }
33605
+ }
33606
+ },
33607
+ "429": {
33608
+ "description": "Too many registrations from this IP (POST /agentfs/auth/register)",
33609
+ "content": {
33610
+ "application/json": {
33611
+ "schema": {
33612
+ "$ref": "#/components/schemas/ErrorResponse"
33613
+ }
33614
+ }
33615
+ }
33616
+ },
33617
+ "502": {
33618
+ "description": "agent-fs is unreachable",
33619
+ "content": {
33620
+ "application/json": {
33621
+ "schema": {
33622
+ "$ref": "#/components/schemas/ErrorResponse"
33623
+ }
33624
+ }
33625
+ }
33626
+ }
33627
+ }
33628
+ }
33629
+ },
33630
+ "/share/{path}": {
33631
+ "get": {
33632
+ "summary": "Public agent-fs share page, served through the API (enabled by AGENT_FS_PROXY)",
33633
+ "tags": [
33634
+ "Comb"
33635
+ ],
33636
+ "responses": {
33637
+ "200": {
33638
+ "description": "agent-fs /share response, streamed verbatim"
33639
+ },
33640
+ "404": {
33641
+ "description": "Unknown or expired link (from agent-fs), or the proxy is off",
33642
+ "content": {
33643
+ "application/json": {
33644
+ "schema": {
33645
+ "$ref": "#/components/schemas/ErrorResponse"
33646
+ }
33647
+ }
33648
+ }
33649
+ },
33650
+ "502": {
33651
+ "description": "agent-fs is unreachable",
33652
+ "content": {
33653
+ "application/json": {
33654
+ "schema": {
33655
+ "$ref": "#/components/schemas/ErrorResponse"
33656
+ }
33657
+ }
33658
+ }
33659
+ }
33660
+ }
33661
+ }
33662
+ },
33663
+ "/site/{path}": {
33664
+ "get": {
33665
+ "summary": "Public agent-fs site page, served through the API (enabled by AGENT_FS_PROXY)",
33666
+ "tags": [
33667
+ "Comb"
33668
+ ],
33669
+ "responses": {
33670
+ "200": {
33671
+ "description": "agent-fs /site response, streamed verbatim"
33672
+ },
33673
+ "404": {
33674
+ "description": "Unknown or expired link (from agent-fs), or the proxy is off",
33675
+ "content": {
33676
+ "application/json": {
33677
+ "schema": {
33678
+ "$ref": "#/components/schemas/ErrorResponse"
33679
+ }
33680
+ }
33681
+ }
33682
+ },
33683
+ "502": {
33684
+ "description": "agent-fs is unreachable",
33685
+ "content": {
33686
+ "application/json": {
33687
+ "schema": {
33688
+ "$ref": "#/components/schemas/ErrorResponse"
33689
+ }
33690
+ }
33691
+ }
33692
+ }
33693
+ }
33694
+ }
33695
+ },
33010
33696
  "/api/tasks": {
33011
33697
  "get": {
33012
33698
  "summary": "List tasks with filters",
@@ -59166,6 +59852,31 @@
59166
59852
  "type": "null"
59167
59853
  }
59168
59854
  ]
59855
+ },
59856
+ "grants": {
59857
+ "type": "object",
59858
+ "properties": {
59859
+ "grantsAll": {
59860
+ "type": "boolean"
59861
+ },
59862
+ "verbs": {
59863
+ "type": "array",
59864
+ "items": {
59865
+ "type": "string"
59866
+ }
59867
+ },
59868
+ "roles": {
59869
+ "type": "array",
59870
+ "items": {
59871
+ "type": "string"
59872
+ }
59873
+ }
59874
+ },
59875
+ "required": [
59876
+ "grantsAll",
59877
+ "verbs",
59878
+ "roles"
59879
+ ]
59169
59880
  }
59170
59881
  },
59171
59882
  "required": [
@@ -61046,6 +61757,356 @@
61046
61757
  }
61047
61758
  }
61048
61759
  },
61760
+ "/api/invites": {
61761
+ "post": {
61762
+ "summary": "Invite a teammate with a one-time API link",
61763
+ "description": "Creates an invited user with the given role (requester by default) and returns a 7-day single-use API link. The API redirects to the current APP_URL dashboard with the code in the URL fragment. The browser exchanges the code at POST /api/invites/exchange for a personal MCP token. Re-inviting an invited user replaces the role and link. Active or suspended users return 409 user_exists. No email is sent.",
61764
+ "tags": [
61765
+ "Users"
61766
+ ],
61767
+ "security": [
61768
+ {
61769
+ "bearerAuth": []
61770
+ }
61771
+ ],
61772
+ "requestBody": {
61773
+ "content": {
61774
+ "application/json": {
61775
+ "schema": {
61776
+ "type": "object",
61777
+ "properties": {
61778
+ "email": {
61779
+ "type": "string",
61780
+ "format": "email"
61781
+ },
61782
+ "name": {
61783
+ "type": "string",
61784
+ "minLength": 1,
61785
+ "maxLength": 200
61786
+ },
61787
+ "role": {
61788
+ "type": "string",
61789
+ "enum": [
61790
+ "requester",
61791
+ "viewer",
61792
+ "admin"
61793
+ ],
61794
+ "default": "requester"
61795
+ }
61796
+ },
61797
+ "required": [
61798
+ "email"
61799
+ ]
61800
+ }
61801
+ }
61802
+ }
61803
+ },
61804
+ "responses": {
61805
+ "201": {
61806
+ "description": "The invited user, API link, dashboard URL, expiry and API reachability",
61807
+ "content": {
61808
+ "application/json": {
61809
+ "schema": {
61810
+ "type": "object",
61811
+ "properties": {
61812
+ "user": {
61813
+ "anyOf": [
61814
+ {
61815
+ "allOf": [
61816
+ {
61817
+ "$ref": "#/components/schemas/User"
61818
+ },
61819
+ {
61820
+ "type": "object",
61821
+ "properties": {
61822
+ "identities": {
61823
+ "type": "array",
61824
+ "items": {
61825
+ "type": "object",
61826
+ "properties": {
61827
+ "kind": {
61828
+ "type": "string"
61829
+ },
61830
+ "externalId": {
61831
+ "type": "string"
61832
+ }
61833
+ },
61834
+ "required": [
61835
+ "kind",
61836
+ "externalId"
61837
+ ]
61838
+ }
61839
+ },
61840
+ "tokens": {
61841
+ "type": "array",
61842
+ "items": {
61843
+ "type": "object",
61844
+ "properties": {
61845
+ "id": {
61846
+ "type": "string"
61847
+ },
61848
+ "userId": {
61849
+ "type": "string"
61850
+ },
61851
+ "label": {
61852
+ "type": [
61853
+ "string",
61854
+ "null"
61855
+ ]
61856
+ },
61857
+ "tokenPreview": {
61858
+ "type": "string"
61859
+ },
61860
+ "createdAt": {
61861
+ "type": "string"
61862
+ },
61863
+ "lastUsedAt": {
61864
+ "type": [
61865
+ "string",
61866
+ "null"
61867
+ ]
61868
+ },
61869
+ "revokedAt": {
61870
+ "type": [
61871
+ "string",
61872
+ "null"
61873
+ ]
61874
+ }
61875
+ },
61876
+ "required": [
61877
+ "id",
61878
+ "userId",
61879
+ "label",
61880
+ "tokenPreview",
61881
+ "createdAt",
61882
+ "lastUsedAt",
61883
+ "revokedAt"
61884
+ ]
61885
+ }
61886
+ },
61887
+ "recentEvents": {
61888
+ "type": "array",
61889
+ "items": {
61890
+ "type": "object",
61891
+ "properties": {
61892
+ "id": {
61893
+ "type": "string"
61894
+ },
61895
+ "userId": {
61896
+ "type": "string"
61897
+ },
61898
+ "eventType": {
61899
+ "type": "string"
61900
+ },
61901
+ "actor": {
61902
+ "type": "string"
61903
+ },
61904
+ "before": {},
61905
+ "after": {},
61906
+ "createdAt": {
61907
+ "type": "string"
61908
+ }
61909
+ },
61910
+ "required": [
61911
+ "id",
61912
+ "userId",
61913
+ "eventType",
61914
+ "actor",
61915
+ "createdAt"
61916
+ ]
61917
+ }
61918
+ }
61919
+ },
61920
+ "required": [
61921
+ "identities",
61922
+ "tokens",
61923
+ "recentEvents"
61924
+ ]
61925
+ }
61926
+ ]
61927
+ },
61928
+ {
61929
+ "type": "null"
61930
+ }
61931
+ ]
61932
+ },
61933
+ "inviteUrl": {
61934
+ "type": "string"
61935
+ },
61936
+ "appUrl": {
61937
+ "type": "string"
61938
+ },
61939
+ "expiresAt": {
61940
+ "type": "string"
61941
+ },
61942
+ "apiReachable": {
61943
+ "type": "string",
61944
+ "enum": [
61945
+ "public",
61946
+ "local"
61947
+ ]
61948
+ }
61949
+ },
61950
+ "required": [
61951
+ "user",
61952
+ "inviteUrl",
61953
+ "appUrl",
61954
+ "expiresAt",
61955
+ "apiReachable"
61956
+ ]
61957
+ }
61958
+ }
61959
+ }
61960
+ },
61961
+ "401": {
61962
+ "description": "Unauthorized",
61963
+ "content": {
61964
+ "application/json": {
61965
+ "schema": {
61966
+ "$ref": "#/components/schemas/ErrorResponse"
61967
+ }
61968
+ }
61969
+ }
61970
+ },
61971
+ "403": {
61972
+ "description": "Not allowed to manage roles",
61973
+ "content": {
61974
+ "application/json": {
61975
+ "schema": {
61976
+ "$ref": "#/components/schemas/ErrorResponse"
61977
+ }
61978
+ }
61979
+ }
61980
+ },
61981
+ "409": {
61982
+ "description": "The email belongs to an active or suspended user",
61983
+ "content": {
61984
+ "application/json": {
61985
+ "schema": {
61986
+ "$ref": "#/components/schemas/ErrorResponse"
61987
+ }
61988
+ }
61989
+ }
61990
+ }
61991
+ }
61992
+ }
61993
+ },
61994
+ "/invite/{code}": {
61995
+ "get": {
61996
+ "summary": "Open an invite in the configured dashboard",
61997
+ "description": "Redirects to the current APP_URL dashboard with the code in the URL fragment. Does not validate or consume the invite.",
61998
+ "tags": [
61999
+ "Users"
62000
+ ],
62001
+ "parameters": [
62002
+ {
62003
+ "schema": {
62004
+ "type": "string"
62005
+ },
62006
+ "required": true,
62007
+ "name": "code",
62008
+ "in": "path"
62009
+ }
62010
+ ],
62011
+ "responses": {
62012
+ "302": {
62013
+ "description": "Redirect to the dashboard"
62014
+ },
62015
+ "404": {
62016
+ "description": "Malformed code (code_invalid)",
62017
+ "content": {
62018
+ "application/json": {
62019
+ "schema": {
62020
+ "$ref": "#/components/schemas/ErrorResponse"
62021
+ }
62022
+ }
62023
+ }
62024
+ }
62025
+ }
62026
+ }
62027
+ },
62028
+ "/api/invites/exchange": {
62029
+ "post": {
62030
+ "summary": "Exchange an invite code for the invited user's MCP token",
62031
+ "description": "Unauthenticated: the single-use invite code is the credential. Rate limited per IP. Activates the invited user. Unknown, expired, used and connector codes, and codes for users who are no longer invited, all return 404 code_invalid.",
62032
+ "tags": [
62033
+ "Users"
62034
+ ],
62035
+ "requestBody": {
62036
+ "content": {
62037
+ "application/json": {
62038
+ "schema": {
62039
+ "type": "object",
62040
+ "properties": {
62041
+ "code": {
62042
+ "type": "string",
62043
+ "minLength": 1,
62044
+ "maxLength": 256
62045
+ }
62046
+ },
62047
+ "required": [
62048
+ "code"
62049
+ ]
62050
+ }
62051
+ }
62052
+ }
62053
+ },
62054
+ "responses": {
62055
+ "200": {
62056
+ "description": "Minted MCP token for the invited user",
62057
+ "content": {
62058
+ "application/json": {
62059
+ "schema": {
62060
+ "type": "object",
62061
+ "properties": {
62062
+ "token": {
62063
+ "type": "string"
62064
+ },
62065
+ "userId": {
62066
+ "type": "string"
62067
+ }
62068
+ },
62069
+ "required": [
62070
+ "token",
62071
+ "userId"
62072
+ ]
62073
+ }
62074
+ }
62075
+ }
62076
+ },
62077
+ "404": {
62078
+ "description": "Code unknown, malformed, expired, already used or not an invite",
62079
+ "content": {
62080
+ "application/json": {
62081
+ "schema": {
62082
+ "$ref": "#/components/schemas/ErrorResponse"
62083
+ }
62084
+ }
62085
+ }
62086
+ },
62087
+ "413": {
62088
+ "description": "Request body too large",
62089
+ "content": {
62090
+ "application/json": {
62091
+ "schema": {
62092
+ "$ref": "#/components/schemas/ErrorResponse"
62093
+ }
62094
+ }
62095
+ }
62096
+ },
62097
+ "429": {
62098
+ "description": "Rate limited",
62099
+ "content": {
62100
+ "application/json": {
62101
+ "schema": {
62102
+ "$ref": "#/components/schemas/ErrorResponse"
62103
+ }
62104
+ }
62105
+ }
62106
+ }
62107
+ }
62108
+ }
62109
+ },
61049
62110
  "/api/connector/discovery": {
61050
62111
  "get": {
61051
62112
  "summary": "Public origins the agent-swarm.dev connector needs to find this swarm's dashboard",