@desplega.ai/agent-swarm 2.5.1 → 2.5.2

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 (155) hide show
  1. package/dist/{acp-adapter-7g6bpwbk.js → acp-adapter-csh0zz3b.js} +1 -1
  2. package/dist/{actions-w8xd014k.js → actions-6xx079d1.js} +17 -17
  3. package/dist/{amp-adapter-z4qvhacj.js → amp-adapter-8n6f0hz8.js} +2 -2
  4. package/dist/{app-nndcvftq.js → app-ft6r6v23.js} +3 -3
  5. package/dist/{assistant-hjmqyscx.js → assistant-vt2cyfzd.js} +18 -18
  6. package/dist/{boot-reembed-r8rhf9h8.js → boot-reembed-r3e808ky.js} +1 -1
  7. package/dist/{boot-reembed-vwcj2y5d.js → boot-reembed-tgrfy27t.js} +1 -1
  8. package/dist/{boot-scrub-sweep-fr9q36ne.js → boot-scrub-sweep-masdwxkm.js} +2 -2
  9. package/dist/{boot-seeds-9jqwnegq.js → boot-seeds-0n82qc7q.js} +4 -4
  10. package/dist/{claude-adapter-2f8b85df.js → claude-adapter-s7j47k06.js} +2 -2
  11. package/dist/{claude-managed-setup-c3hp36ph.js → claude-managed-setup-3hzrgrnk.js} +1 -1
  12. package/dist/{claude-sdk-session-05kat8rv.js → claude-sdk-session-0zrdzyx2.js} +6905 -6855
  13. package/dist/{cli-mz2ygeyq.js → cli-0vgy5wfw.js} +2 -2
  14. package/dist/{cli-eym3jg7w.js → cli-14v1sxxy.js} +6 -6
  15. package/dist/{cli-e9btqw4y.js → cli-15xd0j7w.js} +18 -13
  16. package/dist/{cli-v2g93k4v.js → cli-3e9vs93g.js} +4 -4
  17. package/dist/{cli-1dp1zj04.js → cli-4qkg9968.js} +3 -3
  18. package/dist/{cli-ba8ne1es.js → cli-4rvr7zfx.js} +10 -0
  19. package/dist/{cli-rngde2jv.js → cli-6y43v79h.js} +1 -1
  20. package/dist/{cli-z63a269p.js → cli-7ccf7akh.js} +1 -1
  21. package/dist/{cli-z2dv25mf.js → cli-86zpfje5.js} +116 -5
  22. package/dist/{cli-fes51ya2.js → cli-aaqnqpyw.js} +2 -2
  23. package/dist/{cli-qfm6my86.js → cli-b1tv22wr.js} +1 -1
  24. package/dist/{cli-xc65x52q.js → cli-b63d08rs.js} +1 -1
  25. package/dist/{cli-gwcf52gz.js → cli-b6tnjdvx.js} +11 -7
  26. package/dist/{cli-9mm5ade4.js → cli-bpbcpd8b.js} +1 -1
  27. package/dist/{cli-qfjm4gvt.js → cli-cf63dnxj.js} +2 -2
  28. package/dist/{cli-q9pzwxvk.js → cli-csh8fnbg.js} +82 -16
  29. package/dist/{cli-0jy85zz4.js → cli-cyfgxnvb.js} +7 -7
  30. package/dist/{cli-y3zyaee5.js → cli-d172svcw.js} +5 -5
  31. package/dist/{cli-mq7kg1b1.js → cli-e91vshb1.js} +41 -6
  32. package/dist/{cli-cah5detr.js → cli-edtm741g.js} +5 -5
  33. package/dist/{cli-ajqhxtnz.js → cli-f3pfn4x3.js} +1 -1
  34. package/dist/{cli-hadv0725.js → cli-f55b6ky0.js} +1 -1
  35. package/dist/{cli-r9fy0ddc.js → cli-fgn7yg5r.js} +1 -1
  36. package/dist/{cli-kcsd1ez8.js → cli-h5d22pfs.js} +249 -68
  37. package/dist/{cli-2wba1ac9.js → cli-ha22h0eg.js} +20 -20
  38. package/dist/{cli-pyy4c9ch.js → cli-j3dwd4kz.js} +173 -134
  39. package/dist/{cli-j1eghqfm.js → cli-jmcjbjkt.js} +1 -1
  40. package/dist/{cli-22rmcjkg.js → cli-kcnwn85g.js} +4 -3
  41. package/dist/{cli-rh5smt8t.js → cli-mntxtkhn.js} +12 -2
  42. package/dist/{cli-2jg61wab.js → cli-n2918sed.js} +9 -9
  43. package/dist/{cli-3ee5z0q0.js → cli-qrjv7t18.js} +1 -1
  44. package/dist/{cli-sn1vbtg2.js → cli-vaxw3bg0.js} +3 -3
  45. package/dist/{cli-cwyafhw1.js → cli-wadzapwb.js} +1 -1
  46. package/dist/{cli-jpxsrxcb.js → cli-xw9q173h.js} +1 -1
  47. package/dist/{cli-znvq0k3t.js → cli-xzge46sj.js} +2 -2
  48. package/dist/{cli-nj12tn2c.js → cli-y3dzwyy3.js} +3 -3
  49. package/dist/{cli-xd4eqtr2.js → cli-ydg6ep51.js} +1 -1
  50. package/dist/cli.js +16 -15
  51. package/dist/{codex-adapter-p4ptwar5.js → codex-adapter-brh2tcxr.js} +1 -1
  52. package/dist/{codex-session-runner-964c7dnk.js → codex-session-runner-0dnj21qs.js} +1 -1
  53. package/dist/{commands-mbvhbrcy.js → commands-1cnvseqx.js} +2 -2
  54. package/dist/{controller-gnq1k1mf.js → controller-kc7s9xhn.js} +2 -2
  55. package/dist/{controllers-connect-6dkm71tg.js → controllers-connect-jzx7t4bn.js} +18 -18
  56. package/dist/{cursor-adapter-yq5xgfcg.js → cursor-adapter-qpwp5sfg.js} +1 -1
  57. package/dist/{db-af9y8nkf.js → db-4vq88jkc.js} +3 -3
  58. package/dist/{db-88wcymxt.js → db-v5ytg5pw.js} +1 -1
  59. package/dist/{dispatcher-606ydx5v.js → dispatcher-trtcrqae.js} +16 -16
  60. package/dist/{dsh-adapter-tvhc4k2d.js → dsh-adapter-f20xwn1z.js} +1 -1
  61. package/dist/{external-channel-y8q5z8z2.js → external-channel-n9bymc2n.js} +2 -2
  62. package/dist/{grok-adapter-39aha52t.js → grok-adapter-4kpmmnr6.js} +2 -2
  63. package/dist/{handlers-rk9dqech.js → handlers-ptsraqa8.js} +19 -19
  64. package/dist/{heartbeat-jfe9zfjr.js → heartbeat-60qtxtjf.js} +19 -19
  65. package/dist/{hook-ffevzed1.js → hook-ngtvh729.js} +1 -1
  66. package/dist/{hook-b1mez1m8.js → hook-rbktcstg.js} +1 -1
  67. package/dist/{http-d5b44f1r.js → http-z8xy72gp.js} +334 -86
  68. package/dist/{index-nq8hhv28.js → index-06qkmcx6.js} +10 -9
  69. package/dist/{index-d2qeem97.js → index-1cscynkb.js} +16 -16
  70. package/dist/{index-5en23s5z.js → index-a9nsavhx.js} +1 -1
  71. package/dist/{index-4q3vj1yr.js → index-r70q0xjx.js} +16 -16
  72. package/dist/{index-mj46rk9k.js → index-s193j5fh.js} +19 -19
  73. package/dist/{keepalive-wsby1btq.js → keepalive-a9srcphj.js} +3 -3
  74. package/dist/{lead-paa141j6.js → lead-3devneqy.js} +26 -26
  75. package/dist/{maintenance-vnshcyv9.js → maintenance-0er16h2y.js} +1 -1
  76. package/dist/{oauth-refresh-sweep-d6sqn5np.js → oauth-refresh-sweep-b65jcyw2.js} +2 -2
  77. package/dist/{onboard-nr4xhpzy.js → onboard-wqywz5py.js} +2 -2
  78. package/dist/{otel-impl-ytn9wyv9.js → otel-impl-vk32s884.js} +1 -1
  79. package/dist/{pricing-refresh-pva04zee.js → pricing-refresh-t27anv4z.js} +3 -3
  80. package/dist/rbac-roles-452665y0.js +26 -0
  81. package/dist/{rbac-roles-7rc1q3g4.js → rbac-roles-bmcgsxjn.js} +12 -2
  82. package/dist/{render-v2-pyfsg9zk.js → render-v2-0ttsk2j4.js} +3 -3
  83. package/dist/{resume-phj8xhqr.js → resume-a26kvr41.js} +5 -5
  84. package/dist/{session-access-jzx2z9h5.js → session-access-dgh9nkwk.js} +4 -4
  85. package/dist/{setup-rfg0f0sg.js → setup-9vc9qahm.js} +1 -1
  86. package/dist/{work-objects-44z2yjg8.js → work-objects-vn8nkxwn.js} +19 -19
  87. package/dist/{worker-zsfqzxhm.js → worker-1x1h8vnm.js} +26 -26
  88. package/openapi.json +463 -3
  89. package/package.json +4 -3
  90. package/src/be/db/session-tree.ts +89 -2
  91. package/src/be/db/session-visibility.ts +31 -0
  92. package/src/be/db/tasks/read.ts +18 -5
  93. package/src/be/db.ts +2 -0
  94. package/src/be/migrations/233_script_run_session_tokens.sql +8 -0
  95. package/src/be/migrations/235_chat_relay_defer.sql +86 -0
  96. package/src/be/migrations/237_session_inbox_cleanup.sql +75 -0
  97. package/src/be/rbac-roles.ts +138 -0
  98. package/src/be/scripts/run-credential.ts +64 -0
  99. package/src/be/scripts/run-saved.ts +3 -2
  100. package/src/be/users.ts +28 -4
  101. package/src/http/all-routes.ts +1 -0
  102. package/src/http/approval-requests.ts +46 -6
  103. package/src/http/index.ts +2 -0
  104. package/src/http/schedules.ts +26 -0
  105. package/src/http/scripts.ts +2 -2
  106. package/src/http/sessions.ts +93 -2
  107. package/src/http/user-roles.ts +173 -0
  108. package/src/http/users.ts +9 -0
  109. package/src/http/x.ts +2 -2
  110. package/src/integrations/chat-sdk/commands.ts +14 -1
  111. package/src/integrations/chat-sdk/inbound.ts +40 -5
  112. package/src/integrations/chat-sdk/outbound.ts +35 -10
  113. package/src/integrations/chat-sdk/reactions.ts +107 -0
  114. package/src/integrations/chat-sdk/relay.ts +75 -7
  115. package/src/integrations/chat-sdk/thread-buffer.ts +2 -0
  116. package/src/integrations/reaction-events.ts +20 -0
  117. package/src/providers/amp-adapter.ts +1 -1
  118. package/src/rbac/legacy-policy.ts +3 -0
  119. package/src/rbac/permissions.ts +8 -0
  120. package/src/scheduler/schedule-task.ts +44 -3
  121. package/src/scheduler/scheduler.ts +4 -4
  122. package/src/scripts-runtime/loader.ts +8 -1
  123. package/src/slack/ack.ts +2 -1
  124. package/src/slack/reaction-shortcode.ts +4 -7
  125. package/src/tasks/worker-follow-up.ts +30 -0
  126. package/src/tests/approval-requests-notifications.test.ts +189 -0
  127. package/src/tests/chat-sdk-commands.test.ts +12 -0
  128. package/src/tests/chat-sdk-inbound.test.ts +163 -9
  129. package/src/tests/chat-sdk-outbound-files.test.ts +9 -2
  130. package/src/tests/chat-sdk-relay.test.ts +361 -10
  131. package/src/tests/chat-sdk-tools.test.ts +104 -0
  132. package/src/tests/docs-index-footprint.test.js +3 -3
  133. package/src/tests/http-users.test.ts +38 -0
  134. package/src/tests/migration-237-session-inbox-cleanup.test.ts +136 -0
  135. package/src/tests/rbac-engine.test.ts +2 -0
  136. package/src/tests/rbac-roles.test.ts +10 -0
  137. package/src/tests/schedule-http-triage-tools.test.ts +44 -0
  138. package/src/tests/script-api-credential.test.ts +173 -0
  139. package/src/tests/script-connections.test.ts +4 -0
  140. package/src/tests/script-run-config-scope.test.ts +120 -0
  141. package/src/tests/script-run-token.test.ts +75 -0
  142. package/src/tests/scripts-http.test.ts +19 -0
  143. package/src/tests/sessions-tree.test.ts +242 -0
  144. package/src/tests/user-roles-http.test.ts +204 -0
  145. package/src/tests/workflow-hitl-dynamic-questions.test.ts +1 -1
  146. package/src/tools/chat-reply.ts +2 -0
  147. package/src/tools/schedules/patch-schedule.ts +18 -0
  148. package/src/tools/schedules/update-schedule.ts +18 -0
  149. package/src/types.ts +16 -0
  150. package/src/workflows/approval-notifications.ts +214 -0
  151. package/src/workflows/executors/human-in-the-loop.ts +11 -172
  152. package/src/workflows/executors/swarm-script.ts +2 -2
  153. package/templates/schedules/weekly-harness-upgrade-check/content.md +1 -1
  154. package/templates/skills/code-quality/content.md +1 -1
  155. package/dist/rbac-roles-ff1ffmec.js +0 -12
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.5.1",
5
+ "version": "2.5.2",
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": [
@@ -4581,6 +4581,65 @@
4581
4581
  "createdAt"
4582
4582
  ]
4583
4583
  },
4584
+ "RbacRole": {
4585
+ "type": "object",
4586
+ "properties": {
4587
+ "id": {
4588
+ "type": "string"
4589
+ },
4590
+ "name": {
4591
+ "type": "string"
4592
+ },
4593
+ "description": {
4594
+ "type": [
4595
+ "string",
4596
+ "null"
4597
+ ]
4598
+ },
4599
+ "isBuiltin": {
4600
+ "type": "boolean"
4601
+ },
4602
+ "grantsAll": {
4603
+ "type": "boolean"
4604
+ },
4605
+ "primary": {
4606
+ "type": "boolean"
4607
+ },
4608
+ "verbs": {
4609
+ "type": "array",
4610
+ "items": {
4611
+ "type": "string"
4612
+ }
4613
+ }
4614
+ },
4615
+ "required": [
4616
+ "id",
4617
+ "name",
4618
+ "description",
4619
+ "isBuiltin",
4620
+ "grantsAll",
4621
+ "primary",
4622
+ "verbs"
4623
+ ]
4624
+ },
4625
+ "UserRbacRoles": {
4626
+ "type": "object",
4627
+ "properties": {
4628
+ "userId": {
4629
+ "type": "string"
4630
+ },
4631
+ "roles": {
4632
+ "type": "array",
4633
+ "items": {
4634
+ "$ref": "#/components/schemas/RbacRole"
4635
+ }
4636
+ }
4637
+ },
4638
+ "required": [
4639
+ "userId",
4640
+ "roles"
4641
+ ]
4642
+ },
4584
4643
  "User": {
4585
4644
  "type": "object",
4586
4645
  "properties": {
@@ -12446,7 +12505,8 @@
12446
12505
  "channel",
12447
12506
  "target"
12448
12507
  ]
12449
- }
12508
+ },
12509
+ "description": "Where to announce the request. A Slack target (channel or user ID) gets a card with the title, the questions and a link to the dashboard page that answers it. Slack targets need a lead agent caller (403 otherwise). Email is not supported yet and is skipped."
12450
12510
  }
12451
12511
  },
12452
12512
  "required": [
@@ -12796,6 +12856,16 @@
12796
12856
  }
12797
12857
  }
12798
12858
  }
12859
+ },
12860
+ "403": {
12861
+ "description": "Slack notifications require a lead agent",
12862
+ "content": {
12863
+ "application/json": {
12864
+ "schema": {
12865
+ "$ref": "#/components/schemas/ErrorResponse"
12866
+ }
12867
+ }
12868
+ }
12799
12869
  }
12800
12870
  }
12801
12871
  },
@@ -40022,6 +40092,16 @@
40022
40092
  }
40023
40093
  }
40024
40094
  },
40095
+ "403": {
40096
+ "description": "Deferral owned by another agent",
40097
+ "content": {
40098
+ "application/json": {
40099
+ "schema": {
40100
+ "$ref": "#/components/schemas/ErrorResponse"
40101
+ }
40102
+ }
40103
+ }
40104
+ },
40025
40105
  "404": {
40026
40106
  "description": "Schedule not found",
40027
40107
  "content": {
@@ -40416,6 +40496,16 @@
40416
40496
  }
40417
40497
  }
40418
40498
  },
40499
+ "403": {
40500
+ "description": "Deferral owned by another agent",
40501
+ "content": {
40502
+ "application/json": {
40503
+ "schema": {
40504
+ "$ref": "#/components/schemas/ErrorResponse"
40505
+ }
40506
+ }
40507
+ }
40508
+ },
40419
40509
  "404": {
40420
40510
  "description": "Schedule not found",
40421
40511
  "content": {
@@ -48513,6 +48603,30 @@
48513
48603
  "description": "mine: owned sessions. shared: sessions shared with me. tree: Sessions that GET /api/session-tree counts: mine plus shared with me, no ownerless roots. A bypass actor sees every root with tree scope.",
48514
48604
  "name": "scope",
48515
48605
  "in": "query"
48606
+ },
48607
+ {
48608
+ "schema": {
48609
+ "type": "string",
48610
+ "enum": [
48611
+ "mine",
48612
+ "all"
48613
+ ],
48614
+ "description": "Sessions v2 view, for a user viewer with tree scope. mine (default): roots the user started from a human channel (not workflow, schedule, or system) plus sessions shared with the user. all: every tree session. Lists only: access is unchanged."
48615
+ },
48616
+ "required": false,
48617
+ "description": "Sessions v2 view, for a user viewer with tree scope. mine (default): roots the user started from a human channel (not workflow, schedule, or system) plus sessions shared with the user. all: every tree session. Lists only: access is unchanged.",
48618
+ "name": "show",
48619
+ "in": "query"
48620
+ },
48621
+ {
48622
+ "schema": {
48623
+ "type": "string",
48624
+ "description": "Comma-separated root sources to leave out (the sessions v2 source filter), e.g. `slack,chat`."
48625
+ },
48626
+ "required": false,
48627
+ "description": "Comma-separated root sources to leave out (the sessions v2 source filter), e.g. `slack,chat`.",
48628
+ "name": "hideSource",
48629
+ "in": "query"
48516
48630
  }
48517
48631
  ],
48518
48632
  "responses": {
@@ -48876,6 +48990,32 @@
48876
48990
  "bearerAuth": []
48877
48991
  }
48878
48992
  ],
48993
+ "parameters": [
48994
+ {
48995
+ "schema": {
48996
+ "type": "string",
48997
+ "enum": [
48998
+ "mine",
48999
+ "all"
49000
+ ],
49001
+ "description": "Sessions v2 view, for a user viewer with tree scope. mine (default): roots the user started from a human channel (not workflow, schedule, or system) plus sessions shared with the user. all: every tree session. Lists only: access is unchanged."
49002
+ },
49003
+ "required": false,
49004
+ "description": "Sessions v2 view, for a user viewer with tree scope. mine (default): roots the user started from a human channel (not workflow, schedule, or system) plus sessions shared with the user. all: every tree session. Lists only: access is unchanged.",
49005
+ "name": "show",
49006
+ "in": "query"
49007
+ },
49008
+ {
49009
+ "schema": {
49010
+ "type": "string",
49011
+ "description": "Comma-separated root sources to leave out (the sessions v2 source filter), e.g. `slack,chat`."
49012
+ },
49013
+ "required": false,
49014
+ "description": "Comma-separated root sources to leave out (the sessions v2 source filter), e.g. `slack,chat`.",
49015
+ "name": "hideSource",
49016
+ "in": "query"
49017
+ }
49018
+ ],
48879
49019
  "responses": {
48880
49020
  "200": {
48881
49021
  "description": "Visible groups and section counts",
@@ -49009,6 +49149,25 @@
49009
49149
  "running",
49010
49150
  "needsYou"
49011
49151
  ]
49152
+ },
49153
+ "sources": {
49154
+ "type": "array",
49155
+ "items": {
49156
+ "type": "object",
49157
+ "properties": {
49158
+ "source": {
49159
+ "type": "string"
49160
+ },
49161
+ "total": {
49162
+ "type": "integer"
49163
+ }
49164
+ },
49165
+ "required": [
49166
+ "source",
49167
+ "total"
49168
+ ]
49169
+ },
49170
+ "description": "Each root source in this view with its session count, hidden sources included."
49012
49171
  }
49013
49172
  },
49014
49173
  "required": [
@@ -49016,7 +49175,8 @@
49016
49175
  "inbox",
49017
49176
  "later",
49018
49177
  "done",
49019
- "noGroup"
49178
+ "noGroup",
49179
+ "sources"
49020
49180
  ]
49021
49181
  }
49022
49182
  }
@@ -49035,6 +49195,113 @@
49035
49195
  }
49036
49196
  }
49037
49197
  },
49198
+ "/api/session-triage": {
49199
+ "post": {
49200
+ "summary": "Triage every session of one sidebar list",
49201
+ "description": "The bulk bar's 'Select all N': Done, back to the Inbox, read, or unread for every session that one sessions v2 list shows the caller (the `GET /api/sessions?scope=tree` filters). Needs a picked user.",
49202
+ "tags": [
49203
+ "Sessions"
49204
+ ],
49205
+ "security": [
49206
+ {
49207
+ "bearerAuth": []
49208
+ }
49209
+ ],
49210
+ "requestBody": {
49211
+ "content": {
49212
+ "application/json": {
49213
+ "schema": {
49214
+ "type": "object",
49215
+ "properties": {
49216
+ "action": {
49217
+ "type": "string",
49218
+ "enum": [
49219
+ "done",
49220
+ "inbox",
49221
+ "read",
49222
+ "unread"
49223
+ ]
49224
+ },
49225
+ "triage": {
49226
+ "type": "string",
49227
+ "enum": [
49228
+ "inbox",
49229
+ "later",
49230
+ "done"
49231
+ ]
49232
+ },
49233
+ "noGroup": {
49234
+ "type": "boolean"
49235
+ },
49236
+ "groupKey": {
49237
+ "type": "string"
49238
+ },
49239
+ "show": {
49240
+ "type": "string",
49241
+ "enum": [
49242
+ "mine",
49243
+ "all"
49244
+ ],
49245
+ "description": "Sessions v2 view, for a user viewer with tree scope. mine (default): roots the user started from a human channel (not workflow, schedule, or system) plus sessions shared with the user. all: every tree session. Lists only: access is unchanged."
49246
+ },
49247
+ "hideSource": {
49248
+ "type": "array",
49249
+ "items": {
49250
+ "type": "string",
49251
+ "minLength": 1
49252
+ },
49253
+ "maxItems": 32
49254
+ }
49255
+ },
49256
+ "required": [
49257
+ "action"
49258
+ ]
49259
+ }
49260
+ }
49261
+ }
49262
+ },
49263
+ "responses": {
49264
+ "200": {
49265
+ "description": "The number of sessions written",
49266
+ "content": {
49267
+ "application/json": {
49268
+ "schema": {
49269
+ "type": "object",
49270
+ "properties": {
49271
+ "updated": {
49272
+ "type": "integer"
49273
+ }
49274
+ },
49275
+ "required": [
49276
+ "updated"
49277
+ ]
49278
+ }
49279
+ }
49280
+ }
49281
+ },
49282
+ "400": {
49283
+ "description": "Validation error, or no picked user",
49284
+ "content": {
49285
+ "application/json": {
49286
+ "schema": {
49287
+ "$ref": "#/components/schemas/ErrorResponse"
49288
+ }
49289
+ }
49290
+ }
49291
+ },
49292
+ "401": {
49293
+ "description": "Unauthorized",
49294
+ "content": {
49295
+ "application/json": {
49296
+ "schema": {
49297
+ "$ref": "#/components/schemas/ErrorResponse"
49298
+ }
49299
+ }
49300
+ }
49301
+ }
49302
+ }
49303
+ }
49304
+ },
49038
49305
  "/api/session-moves": {
49039
49306
  "post": {
49040
49307
  "summary": "Move sessions into a group or reset their keys",
@@ -56909,6 +57176,189 @@
56909
57176
  }
56910
57177
  }
56911
57178
  },
57179
+ "/api/rbac/roles": {
57180
+ "get": {
57181
+ "operationId": "rbac_listRoles",
57182
+ "summary": "List RBAC roles with their verbs",
57183
+ "tags": [
57184
+ "Users"
57185
+ ],
57186
+ "security": [
57187
+ {
57188
+ "bearerAuth": []
57189
+ }
57190
+ ],
57191
+ "responses": {
57192
+ "200": {
57193
+ "description": "Role catalog",
57194
+ "content": {
57195
+ "application/json": {
57196
+ "schema": {
57197
+ "type": "object",
57198
+ "properties": {
57199
+ "roles": {
57200
+ "type": "array",
57201
+ "items": {
57202
+ "$ref": "#/components/schemas/RbacRole"
57203
+ }
57204
+ }
57205
+ },
57206
+ "required": [
57207
+ "roles"
57208
+ ]
57209
+ }
57210
+ }
57211
+ }
57212
+ }
57213
+ }
57214
+ }
57215
+ },
57216
+ "/api/users/{id}/roles": {
57217
+ "get": {
57218
+ "operationId": "users_getRbacRoles",
57219
+ "summary": "Get a user's RBAC roles",
57220
+ "tags": [
57221
+ "Users"
57222
+ ],
57223
+ "security": [
57224
+ {
57225
+ "bearerAuth": []
57226
+ }
57227
+ ],
57228
+ "parameters": [
57229
+ {
57230
+ "schema": {
57231
+ "type": "string",
57232
+ "minLength": 1
57233
+ },
57234
+ "required": true,
57235
+ "name": "id",
57236
+ "in": "path"
57237
+ }
57238
+ ],
57239
+ "responses": {
57240
+ "200": {
57241
+ "description": "The user's roles",
57242
+ "content": {
57243
+ "application/json": {
57244
+ "schema": {
57245
+ "$ref": "#/components/schemas/UserRbacRoles"
57246
+ }
57247
+ }
57248
+ }
57249
+ },
57250
+ "404": {
57251
+ "description": "User not found",
57252
+ "content": {
57253
+ "application/json": {
57254
+ "schema": {
57255
+ "$ref": "#/components/schemas/ErrorResponse"
57256
+ }
57257
+ }
57258
+ }
57259
+ }
57260
+ }
57261
+ },
57262
+ "put": {
57263
+ "operationId": "users_setRbacRoles",
57264
+ "summary": "Set a user's RBAC roles",
57265
+ "description": "Replaces the user's roles. The set holds exactly one of admin, requester, viewer plus any extra roles. Demoting a user below admin removes the ability to answer approval requests, even when the user is listed as an approver. Fails with 409 when it would leave no active admin.",
57266
+ "tags": [
57267
+ "Users"
57268
+ ],
57269
+ "security": [
57270
+ {
57271
+ "bearerAuth": []
57272
+ }
57273
+ ],
57274
+ "parameters": [
57275
+ {
57276
+ "schema": {
57277
+ "type": "string",
57278
+ "minLength": 1
57279
+ },
57280
+ "required": true,
57281
+ "name": "id",
57282
+ "in": "path"
57283
+ }
57284
+ ],
57285
+ "requestBody": {
57286
+ "content": {
57287
+ "application/json": {
57288
+ "schema": {
57289
+ "type": "object",
57290
+ "properties": {
57291
+ "roles": {
57292
+ "type": "array",
57293
+ "items": {
57294
+ "type": "string",
57295
+ "minLength": 1
57296
+ },
57297
+ "minItems": 1
57298
+ }
57299
+ },
57300
+ "required": [
57301
+ "roles"
57302
+ ],
57303
+ "additionalProperties": false
57304
+ }
57305
+ }
57306
+ }
57307
+ },
57308
+ "responses": {
57309
+ "200": {
57310
+ "description": "The user's roles after the change",
57311
+ "content": {
57312
+ "application/json": {
57313
+ "schema": {
57314
+ "$ref": "#/components/schemas/UserRbacRoles"
57315
+ }
57316
+ }
57317
+ }
57318
+ },
57319
+ "400": {
57320
+ "description": "Invalid role set",
57321
+ "content": {
57322
+ "application/json": {
57323
+ "schema": {
57324
+ "$ref": "#/components/schemas/ErrorResponse"
57325
+ }
57326
+ }
57327
+ }
57328
+ },
57329
+ "403": {
57330
+ "description": "Not allowed to change roles",
57331
+ "content": {
57332
+ "application/json": {
57333
+ "schema": {
57334
+ "$ref": "#/components/schemas/ErrorResponse"
57335
+ }
57336
+ }
57337
+ }
57338
+ },
57339
+ "404": {
57340
+ "description": "User not found",
57341
+ "content": {
57342
+ "application/json": {
57343
+ "schema": {
57344
+ "$ref": "#/components/schemas/ErrorResponse"
57345
+ }
57346
+ }
57347
+ }
57348
+ },
57349
+ "409": {
57350
+ "description": "Would leave no active admin",
57351
+ "content": {
57352
+ "application/json": {
57353
+ "schema": {
57354
+ "$ref": "#/components/schemas/ErrorResponse"
57355
+ }
57356
+ }
57357
+ }
57358
+ }
57359
+ }
57360
+ }
57361
+ },
56912
57362
  "/api/whoami": {
56913
57363
  "get": {
56914
57364
  "summary": "Resolve the authenticated principal behind the presented bearer",
@@ -59068,6 +59518,16 @@
59068
59518
  }
59069
59519
  }
59070
59520
  }
59521
+ },
59522
+ "409": {
59523
+ "description": "Source is the last active admin (last_admin)",
59524
+ "content": {
59525
+ "application/json": {
59526
+ "schema": {
59527
+ "$ref": "#/components/schemas/ErrorResponse"
59528
+ }
59529
+ }
59530
+ }
59071
59531
  }
59072
59532
  }
59073
59533
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desplega.ai/agent-swarm",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
5
5
  "keywords": [
6
6
  "agent-swarm.dev",
@@ -113,6 +113,7 @@
113
113
  "tsc:check": "bun check",
114
114
  "tsc:check:tsc": "bun tsc --noEmit",
115
115
  "check:db-boundary": "bash scripts/check-db-boundary.sh",
116
+ "check:codex-default-model": "bash scripts/check-codex-default-model.sh",
116
117
  "check:test-spawn-sync": "bash scripts/check-test-spawn-sync.sh",
117
118
  "check:dep-graph": "depcruise src packages/model-routing --config .dependency-cruiser.cjs",
118
119
  "check:api-key-boundary": "bash scripts/check-api-key-boundary.sh",
@@ -200,7 +201,7 @@
200
201
  "dependencies": {
201
202
  "@agentclientprotocol/sdk": "2.0.1",
202
203
  "@ai-sdk/openai": "^3.0.41",
203
- "@anthropic-ai/claude-agent-sdk": "0.3.308",
204
+ "@anthropic-ai/claude-agent-sdk": "0.3.309",
204
205
  "@anthropic-ai/sdk": "^1.1.0",
205
206
  "@asteasolutions/zod-to-openapi": "^8.0.0",
206
207
  "@aws-sdk/client-bedrock": "3.1048.0",
@@ -218,7 +219,7 @@
218
219
  "@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
219
220
  "@linear/sdk": "^77.0.0",
220
221
  "@modelcontextprotocol/sdk": "1.32.1",
221
- "@openai/codex": "0.163.0",
222
+ "@openai/codex": "0.164.0",
222
223
  "@openfort/openfort-node": "^0.9.1",
223
224
  "@opentelemetry/api": "^1.9.1",
224
225
  "@opentelemetry/api-logs": "^0.218.0",