@desplega.ai/agent-swarm 2.7.4 → 2.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/README.md +1 -1
  2. package/dist/acp-adapter-bp91d37f.js +15 -0
  3. package/dist/{actions-gfrr9vb7.js → actions-yj0eeaqh.js} +19 -18
  4. package/dist/{amp-adapter-0s58gm46.js → amp-adapter-4pg9h34q.js} +3 -3
  5. package/dist/{app-stvq692g.js → app-909e97cr.js} +3 -3
  6. package/dist/{assistant-5s37fr9n.js → assistant-qdyb5fyy.js} +32 -23
  7. package/dist/{boot-reembed-yzy1841n.js → boot-reembed-fk0s9z18.js} +1 -1
  8. package/dist/{boot-reembed-cv82gz7y.js → boot-reembed-gs1rzrnh.js} +1 -1
  9. package/dist/{boot-scrub-sweep-8k4q95ap.js → boot-scrub-sweep-4qfd4kfx.js} +4 -4
  10. package/dist/{boot-seeds-ftt9htah.js → boot-seeds-yr00k13d.js} +4 -4
  11. package/dist/{boxd-515v1t8z.js → boxd-vdmfssd9.js} +5 -5
  12. package/dist/{claude-adapter-t00wrzeh.js → claude-adapter-qta1f1xn.js} +7 -7
  13. package/dist/{claude-managed-adapter-g6vmjccb.js → claude-managed-adapter-dvs2xw5n.js} +2 -2
  14. package/dist/{claude-managed-setup-afpa82f7.js → claude-managed-setup-sc6j4dm0.js} +3 -3
  15. package/dist/{claude-sdk-session-vj0c2azx.js → claude-sdk-session-zgrz6yvc.js} +9175 -9076
  16. package/dist/{cli-gjr2y2xk.js → cli-0agcv1v5.js} +4 -1
  17. package/dist/{cli-edmm9d9y.js → cli-0at8w34w.js} +7 -7
  18. package/dist/{cli-a81qevyg.js → cli-0qatpy8q.js} +20 -36
  19. package/dist/{cli-bcz074zx.js → cli-0yv5z2pg.js} +1 -1
  20. package/dist/{cli-a4btqqft.js → cli-1b7btd38.js} +1 -1
  21. package/dist/{cli-a2jw6ee5.js → cli-1p89xny0.js} +1 -1
  22. package/dist/{cli-v726afdm.js → cli-2pnswgh8.js} +1 -1
  23. package/dist/{cli-jkt52mgt.js → cli-386tyxxg.js} +2 -2
  24. package/dist/{cli-az0bpf8p.js → cli-3ypk9vk1.js} +3 -3
  25. package/dist/{cli-wk9md5px.js → cli-436532ck.js} +4 -4
  26. package/dist/{cli-7n5sbw0z.js → cli-4necwtsv.js} +5 -5
  27. package/dist/cli-54t00gt8.js +151 -0
  28. package/dist/{cli-655xm9ms.js → cli-583frbyr.js} +1 -1
  29. package/dist/{cli-4r12t6w6.js → cli-5c4hjzne.js} +101 -4
  30. package/dist/{cli-hf6zt5m6.js → cli-69szn7w7.js} +17 -1
  31. package/dist/{cli-rtk9g7av.js → cli-73jzwksr.js} +6 -2
  32. package/dist/{cli-jg0nfda6.js → cli-75gkpjvw.js} +52 -21
  33. package/dist/{cli-wcmnan2g.js → cli-89knwags.js} +5 -5
  34. package/dist/{cli-pwyevs29.js → cli-8bc1w0tw.js} +22 -21
  35. package/dist/{cli-t282jgab.js → cli-8snvgs5r.js} +41 -16
  36. package/dist/{cli-vqgnyh76.js → cli-98rw5dt5.js} +15 -3
  37. package/dist/{cli-9cctx1tn.js → cli-a22h291q.js} +1 -1
  38. package/dist/{cli-ycm6180s.js → cli-a7v854rf.js} +5 -3
  39. package/dist/{cli-98pke4vk.js → cli-ae7mrdf9.js} +2 -2
  40. package/dist/{cli-je8yeyc5.js → cli-bjb3z51z.js} +5 -5
  41. package/dist/{cli-mc97xy2s.js → cli-c60vetmm.js} +16 -4
  42. package/dist/{cli-j4kw3rsx.js → cli-cm5yqn35.js} +18 -0
  43. package/dist/{cli-wndv9p7g.js → cli-decfb6v8.js} +6 -6
  44. package/dist/{cli-h55y2bjc.js → cli-dhar9qay.js} +2 -2
  45. package/dist/{cli-8yy525ad.js → cli-drr5v6av.js} +2 -2
  46. package/dist/{cli-5gr1g711.js → cli-dxae2yg7.js} +2 -2
  47. package/dist/{cli-pe09p6dv.js → cli-e3r2neck.js} +8 -7
  48. package/dist/{cli-13jvmew3.js → cli-ekwks2vs.js} +7 -7
  49. package/dist/{cli-jg4p5t36.js → cli-es6va8jk.js} +121 -51
  50. package/dist/{cli-j4kt1mpb.js → cli-faxe6thg.js} +3 -3
  51. package/dist/{cli-tzrpv5sc.js → cli-ftyxyspd.js} +1 -1
  52. package/dist/cli-fw2w0kva.js +47 -0
  53. package/dist/{cli-2dfbv8qr.js → cli-fy6x31ps.js} +1 -0
  54. package/dist/{cli-aq58fk5m.js → cli-g83s9ewh.js} +7 -1
  55. package/dist/cli-gdhpcbhf.js +55 -0
  56. package/dist/{cli-82jg7fp9.js → cli-he5nxaa8.js} +1 -1
  57. package/dist/{cli-8veytvbh.js → cli-he9wchme.js} +1 -1
  58. package/dist/{cli-k76tgq03.js → cli-hgaazk69.js} +2 -2
  59. package/dist/{cli-d2pzqej1.js → cli-hr2e2fft.js} +741 -7
  60. package/dist/{cli-dae4sbgy.js → cli-jm2vfpfd.js} +2 -2
  61. package/dist/{cli-1s1dqn1j.js → cli-k2gzwsj2.js} +297 -140
  62. package/dist/{cli-b1afgtj3.js → cli-kqdg1bsb.js} +3 -3
  63. package/dist/cli-m2z8jagn.js +12078 -0
  64. package/dist/{cli-mvckssyq.js → cli-m48g6p95.js} +5 -5
  65. package/dist/{cli-bwty35gx.js → cli-mthwvjre.js} +1 -1
  66. package/dist/{cli-41z8xwj0.js → cli-nhrvpaj7.js} +34 -8
  67. package/dist/{cli-ahd90bwt.js → cli-nwj0ee2w.js} +6 -6
  68. package/dist/{cli-kvtc7aez.js → cli-p5gp8pcx.js} +44 -14
  69. package/dist/{cli-avgcz4ra.js → cli-pd7vagab.js} +436 -171
  70. package/dist/{cli-zn15c46z.js → cli-q0k1w5zd.js} +1 -1
  71. package/dist/{cli-bq2pcphn.js → cli-rmmmrjkd.js} +1 -1
  72. package/dist/{cli-2qpvmmkw.js → cli-s0qnd4wv.js} +1 -1
  73. package/dist/{cli-kg8hchyg.js → cli-sa02jsqt.js} +1 -1
  74. package/dist/{cli-1yekbyqm.js → cli-shpbx5ee.js} +283 -82
  75. package/dist/{cli-9y354g3j.js → cli-srye3vdt.js} +1 -1
  76. package/dist/{cli-byqfbnjw.js → cli-svj5090z.js} +9 -9
  77. package/dist/{cli-gcbdjt47.js → cli-vfym7wmz.js} +6 -6
  78. package/dist/{cli-v1yw3wha.js → cli-vvpx3gsx.js} +4 -4
  79. package/dist/{cli-a1fhj4n9.js → cli-w6dt9ged.js} +2 -2
  80. package/dist/{cli-1gm8jcyr.js → cli-waqbxg08.js} +5232 -68
  81. package/dist/{cli-5hjced2v.js → cli-wp9sp1qb.js} +6 -6
  82. package/dist/{cli-eny54typ.js → cli-wx3rhnm0.js} +1 -1
  83. package/dist/{cli-s0exq74r.js → cli-xbbndvjy.js} +3 -3
  84. package/dist/{cli-f255yaqn.js → cli-xds5f77d.js} +3 -3
  85. package/dist/{cli-0sbkss7h.js → cli-xnqgpshy.js} +2 -2
  86. package/dist/{cli-0fgr1w9b.js → cli-xnrwazav.js} +20 -3
  87. package/dist/{cli-gf5hbmdr.js → cli-yjdgea32.js} +3 -3
  88. package/dist/{cli-cq1pf336.js → cli-yn4kxs06.js} +124 -11
  89. package/dist/{cli-224epwwf.js → cli-yx4kfngt.js} +3 -3
  90. package/dist/{cli-eqx6k993.js → cli-yy3rhsdw.js} +47 -13
  91. package/dist/{cli-36g23z21.js → cli-zbbwez0r.js} +4 -4
  92. package/dist/{cli-ktmvb20s.js → cli-zm72anhg.js} +12 -12
  93. package/dist/cli.js +26 -25
  94. package/dist/{codex-adapter-g0gctw29.js → codex-adapter-ayd1fb6h.js} +5 -5
  95. package/dist/{codex-hook-vrzz2xhr.js → codex-hook-9efm2x1m.js} +1 -1
  96. package/dist/{codex-login-0gg46ygn.js → codex-login-y0pmff1c.js} +1 -1
  97. package/dist/{codex-session-runner-dr2cxe1c.js → codex-session-runner-jesa32xc.js} +6 -6
  98. package/dist/{commands-1p07cvff.js → commands-hanewgf2.js} +9 -3
  99. package/dist/{controller-z0s7sv6r.js → controller-dt1n3c1q.js} +9 -4
  100. package/dist/{controllers-connect-x9kvvhyk.js → controllers-connect-xx8x64n5.js} +22 -21
  101. package/dist/{cursor-adapter-m5b98pvk.js → cursor-adapter-9s4dwwdw.js} +2 -2
  102. package/dist/{db-capk2raj.js → db-3vttcbv4.js} +3 -3
  103. package/dist/{db-rsh04kh3.js → db-9dv0g1ab.js} +12 -4
  104. package/dist/{devin-adapter-yxm87fe9.js → devin-adapter-r9phbnc9.js} +1 -1
  105. package/dist/{devtools-82fzqra8.js → devtools-qxfgbsqz.js} +1 -1
  106. package/dist/{dispatcher-304q6fwa.js → dispatcher-tx9hd1sv.js} +18 -17
  107. package/dist/{docker-7rxt0rry.js → docker-c1a3gqmf.js} +91 -24
  108. package/dist/{dsh-adapter-btewem0y.js → dsh-adapter-007y4ejs.js} +2 -2
  109. package/dist/{e2b-renc0k8q.js → e2b-a19d28rz.js} +4 -4
  110. package/dist/{e2b-7fc9b9bd.js → e2b-we6hs6q5.js} +6 -6
  111. package/dist/{easter-egg-3d-fm1p3n4d.js → easter-egg-3d-rgbrqb8s.js} +1 -1
  112. package/dist/{embedding-space-s68v49ct.js → embedding-space-ny1e2940.js} +6 -6
  113. package/dist/{embeddings-4ms3604w.js → embeddings-2t386t13.js} +1 -1
  114. package/dist/{event-bus-dfjx2qdh.js → event-bus-g0ka3pbw.js} +1 -1
  115. package/dist/{execute-mcdgccjs.js → execute-pksh0ceh.js} +1 -1
  116. package/dist/{external-channel-9dxwfztn.js → external-channel-phgmhmd7.js} +2 -2
  117. package/dist/fx-adapter-fy8rr921.js +18 -0
  118. package/dist/{google-generative-ai-yvmdxyxa.js → google-generative-ai-8y3m3k4b.js} +1 -1
  119. package/dist/{google-vertex-jrtdh9gs.js → google-vertex-w3v98n7b.js} +1 -1
  120. package/dist/{grok-adapter-05ecv4h0.js → grok-adapter-q0abvpaj.js} +8 -8
  121. package/dist/handlers-by3sfxyx.js +32 -0
  122. package/dist/{heartbeat-3n94heh3.js → heartbeat-kadyek8p.js} +21 -20
  123. package/dist/{hook-aadrn69x.js → hook-5zs3msf6.js} +6 -6
  124. package/dist/{hook-zxwje86c.js → hook-9k551xnj.js} +4 -4
  125. package/dist/{http-xzxk9mst.js → http-mhz9vw1f.js} +272 -103
  126. package/dist/index-4f2pvxae.js +37 -0
  127. package/dist/index-98gz7tmp.js +30 -0
  128. package/dist/{index-5rk6rfzr.js → index-fvzke5kx.js} +1 -1
  129. package/dist/index-k08z2cak.js +33 -0
  130. package/dist/{index-yqhz88yy.js → index-pxn30mse.js} +8 -8
  131. package/dist/{index-d34f6r87.js → index-q361cg2f.js} +1 -1
  132. package/dist/{index-9j4zwcht.js → index-rvr00sg7.js} +168 -675
  133. package/dist/{index-qeb82z37.js → index-vdygbq10.js} +1 -1
  134. package/dist/{keepalive-w4aakbyk.js → keepalive-w56f32cg.js} +4 -4
  135. package/dist/lead-enq35nqp.js +70 -0
  136. package/dist/{maintenance-hbptpk6p.js → maintenance-7mdgxcea.js} +1 -1
  137. package/dist/{oauth-refresh-sweep-217semrv.js → oauth-refresh-sweep-29txy9vk.js} +3 -3
  138. package/dist/{onboard-vz2s5df3.js → onboard-kpsrkarj.js} +5 -5
  139. package/dist/{opencode-adapter-gtfd7d7v.js → opencode-adapter-j25vm3rr.js} +5 -5
  140. package/dist/{otel-impl-aefave37.js → otel-impl-6kkct7a8.js} +2 -2
  141. package/dist/{pi-mono-adapter-f8h5yseh.js → pi-mono-adapter-exhkzhn2.js} +117 -23
  142. package/dist/{pricing-refresh-m1yhh9ya.js → pricing-refresh-n2x7jh6k.js} +3 -3
  143. package/dist/{rbac-roles-rrw8twdz.js → rbac-roles-81ypx6es.js} +1 -1
  144. package/dist/{rbac-roles-svj72cdf.js → rbac-roles-b5htkjby.js} +2 -2
  145. package/dist/{render-v2-amwbnfxh.js → render-v2-qn6jmpk4.js} +3 -3
  146. package/dist/{resume-9cd6wf6z.js → resume-wd30wx23.js} +7 -7
  147. package/dist/{runtime-fp4vrx7m.js → runtime-4hsg7h60.js} +1 -1
  148. package/dist/{session-access-21t6yjyg.js → session-access-5qvfevhk.js} +4 -4
  149. package/dist/{session-source-backfill-pxbzcsc6.js → session-source-backfill-n1czavbr.js} +3 -3
  150. package/dist/{setup-4592tqz4.js → setup-dnb56qy5.js} +3 -3
  151. package/dist/{virtual-modules-gzfnpmnz.js → virtual-modules-76xxv9fs.js} +2 -2
  152. package/dist/{work-objects-t9tcf174.js → work-objects-4n21tfkm.js} +21 -20
  153. package/dist/{worker-follow-up-q32jh4yk.js → worker-follow-up-77hvzxww.js} +18 -17
  154. package/dist/worker-gg1576j3.js +70 -0
  155. package/dist/{x-b6wxntdt.js → x-vmmye1kb.js} +2 -2
  156. package/openapi.json +189 -32
  157. package/package.json +8 -7
  158. package/src/be/db/script-runs.ts +23 -0
  159. package/src/be/db/session-summaries.ts +8 -2
  160. package/src/be/db/session-tree.ts +174 -61
  161. package/src/be/db/session-visibility.ts +5 -4
  162. package/src/be/db/tasks/read.ts +122 -3
  163. package/src/be/db-client.ts +8 -5
  164. package/src/be/db.ts +23 -8
  165. package/src/be/memory/providers/sqlite-store.ts +49 -12
  166. package/src/be/migrations/259_session_summaries_open_tasks.sql +111 -0
  167. package/src/be/migrations/260_runtime_pool_cache.sql +20 -0
  168. package/src/be/migrations/262_session_visibility_indexes.sql +18 -0
  169. package/src/be/migrations/263_task_list_filter_index.sql +11 -0
  170. package/src/be/migrations/264_slack_thread_cover_index.sql +9 -0
  171. package/src/be/migrations/266_script_runs_source_task.sql +11 -0
  172. package/src/be/model-validation.ts +5 -1
  173. package/src/be/pricing-normalize.ts +7 -2
  174. package/src/be/runtime-pools/cache-cleanup.ts +109 -0
  175. package/src/be/runtime-pools/db.ts +65 -6
  176. package/src/be/runtime-pools/remote-controller.ts +5 -0
  177. package/src/be/runtime-pools/supervisor.ts +33 -2
  178. package/src/be/scripts/typecheck.ts +23 -0
  179. package/src/be/seed/schedules-seeder.ts +135 -9
  180. package/src/be/seed/workflows-seeder.ts +65 -1
  181. package/src/be/seed-pricing.ts +23 -0
  182. package/src/be/seed-scripts/catalog/task-failure-audit.ts +5 -1
  183. package/src/be/steering.ts +50 -3
  184. package/src/be/swarm-config-guard.ts +1 -0
  185. package/src/commands/controller.ts +4 -0
  186. package/src/commands/entrypoint-api-readiness.ts +74 -0
  187. package/src/commands/provider-credentials.ts +29 -2
  188. package/src/commands/runner.ts +86 -5
  189. package/src/extensions/contract-types.generated.ts +1 -1
  190. package/src/extensions/contract.ts +27 -1
  191. package/src/extensions/dispatcher.ts +4 -0
  192. package/src/http/agents.ts +1 -0
  193. package/src/http/index.ts +1 -1
  194. package/src/http/list-total-cache.ts +14 -7
  195. package/src/http/mcp-bridge.ts +4 -0
  196. package/src/http/memory.ts +38 -9
  197. package/src/http/script-runs.ts +174 -5
  198. package/src/http/status.ts +10 -2
  199. package/src/http/tasks.ts +4 -2
  200. package/src/integrations/chat-sdk/inbound.ts +15 -5
  201. package/src/integrations/chat-sdk/steering.ts +3 -1
  202. package/src/kv-reserved-namespaces.ts +2 -0
  203. package/src/prompts/base-prompt.ts +4 -1
  204. package/src/prompts/session-templates.ts +26 -0
  205. package/src/providers/acp-adapter.ts +190 -26
  206. package/src/providers/acp-targets.ts +306 -6
  207. package/src/providers/amp-adapter.ts +1 -1
  208. package/src/providers/codex-adapter.ts +9 -44
  209. package/src/providers/codex-oauth/flow.ts +24 -3
  210. package/src/providers/codex-oauth/storage.ts +56 -17
  211. package/src/providers/codex-oauth/subscription.ts +67 -0
  212. package/src/providers/fx-adapter.ts +211 -0
  213. package/src/providers/index.ts +5 -1
  214. package/src/providers/mcp-loopback-proxy.ts +94 -0
  215. package/src/providers/pi-mono-adapter.ts +98 -13
  216. package/src/providers/pricing-sources.md +8 -0
  217. package/src/providers/reasoning-effort.ts +17 -1
  218. package/src/providers/types.ts +2 -1
  219. package/src/runtime-providers/controller-protocol.ts +14 -1
  220. package/src/runtime-providers/controller.ts +5 -0
  221. package/src/runtime-providers/docker.ts +108 -23
  222. package/src/runtime-providers/types.ts +16 -0
  223. package/src/scheduler/scheduler.ts +36 -3
  224. package/src/script-workflows/workflow-ctx.ts +8 -0
  225. package/src/scripts-runtime/sdk-allowlist.ts +1 -0
  226. package/src/scripts-runtime/types/stdlib.d.ts +27 -0
  227. package/src/scripts-runtime/types/swarm-extension.d.ts +33 -0
  228. package/src/scripts-runtime/types/swarm-sdk.d.ts +27 -0
  229. package/src/server-user.ts +1 -0
  230. package/src/server.ts +7 -0
  231. package/src/slack/assistant.ts +17 -1
  232. package/src/slack/commands.ts +5 -1
  233. package/src/slack/handlers.ts +53 -5
  234. package/src/slack/left-threads.ts +88 -0
  235. package/src/slack/steering.ts +3 -0
  236. package/src/slack/thread-buffer.ts +40 -16
  237. package/src/tasks/follow-up-redelegation-guard.ts +155 -0
  238. package/src/tests/acp-adapter.test.ts +79 -0
  239. package/src/tests/base-prompt.test.ts +12 -0
  240. package/src/tests/chat-sdk-inbound.test.ts +30 -0
  241. package/src/tests/chatgpt-subscription-model-groups.test.ts +62 -0
  242. package/src/tests/chatgpt-subscription-pi.test.ts +170 -0
  243. package/src/tests/chatgpt-subscription-session-bench.test.ts +198 -0
  244. package/src/tests/claude-artifacts-read-script.test.ts +209 -0
  245. package/src/tests/codex-oauth-credential-info.test.ts +40 -0
  246. package/src/tests/codex-oauth-refresh-egress.test.ts +194 -0
  247. package/src/tests/context-window.test.ts +7 -0
  248. package/src/tests/db-client.test.ts +21 -0
  249. package/src/tests/db-task-read-contract.test.ts +8 -2
  250. package/src/tests/db-task-write-contract.test.ts +5 -1
  251. package/src/tests/entrypoint-api-readiness.test.ts +416 -210
  252. package/src/tests/explicit-model-validation.test.ts +113 -8
  253. package/src/tests/extensions-run-context.test.ts +11 -0
  254. package/src/tests/extensions-steering.test.ts +353 -0
  255. package/src/tests/extensions-validate.test.ts +5 -0
  256. package/src/tests/fixtures/extensions/steering-policy/hooks.ts +39 -0
  257. package/src/tests/fixtures/extensions/steering-policy/manifest.json +7 -0
  258. package/src/tests/fixtures/fake-fx.ts +167 -0
  259. package/src/tests/fixtures/fx/acp-responses-recorded.json +157 -0
  260. package/src/tests/fixtures/fx/acp-updates-recorded.jsonl +15 -0
  261. package/src/tests/follow-up-redelivery-guard.test.ts +432 -202
  262. package/src/tests/fx-adapter.test.ts +771 -0
  263. package/src/tests/grok-adapter.test.ts +36 -0
  264. package/src/tests/list-total-cache.test.ts +27 -2
  265. package/src/tests/mcp-loopback-proxy.test.ts +193 -0
  266. package/src/tests/memory-fts-populate.test.ts +11 -9
  267. package/src/tests/memory-retrieval-purge.test.ts +80 -0
  268. package/src/tests/migration-260-runtime-pool-cache.test.ts +118 -0
  269. package/src/tests/model-tier-resolution.test.ts +3 -3
  270. package/src/tests/pricing-refresh.test.ts +5 -5
  271. package/src/tests/prompt-template-session.test.ts +5 -3
  272. package/src/tests/provider-registration.test.ts +2 -1
  273. package/src/tests/query-audit-plans.test.ts +30 -2
  274. package/src/tests/runtime-cache-cleanup.test.ts +367 -0
  275. package/src/tests/runtime-e2b-pools.test.ts +41 -0
  276. package/src/tests/runtime-pools-db.test.ts +98 -0
  277. package/src/tests/runtime-pools-http.test.ts +29 -0
  278. package/src/tests/runtime-providers-docker.test.ts +253 -0
  279. package/src/tests/runtime-remote-controller.test.ts +66 -2
  280. package/src/tests/runtime-supervisor.test.ts +66 -2
  281. package/src/tests/script-connections.test.ts +13 -0
  282. package/src/tests/script-runs-http.test.ts +684 -2
  283. package/src/tests/seed-model-profiles.test.ts +2 -2
  284. package/src/tests/seed-schedules.test.ts +138 -0
  285. package/src/tests/seed-scripts.test.ts +26 -0
  286. package/src/tests/session-cost-recompute-unit.test.ts +39 -0
  287. package/src/tests/session-costs-golden.test.ts +26 -0
  288. package/src/tests/session-summaries-plans.test.ts +120 -0
  289. package/src/tests/session-summaries.test.ts +72 -12
  290. package/src/tests/sessions-tree.test.ts +11 -3
  291. package/src/tests/slack-leave-thread.test.ts +571 -0
  292. package/src/tests/slack-render-v2-query-plans.test.ts +24 -2
  293. package/src/tests/status.test.ts +11 -0
  294. package/src/tests/tasks-readable-row.test.ts +155 -0
  295. package/src/tests/tool-annotations.test.ts +2 -1
  296. package/src/tests/workflow-engine-v2.test.ts +42 -0
  297. package/src/tests/workflow-script-principal.test.ts +207 -7
  298. package/src/tools/send-task.ts +35 -47
  299. package/src/tools/slack-leave-thread.ts +104 -0
  300. package/src/tools/steer-task.ts +3 -2
  301. package/src/tools/task-dedup.ts +45 -21
  302. package/src/tools/tool-config.ts +2 -1
  303. package/src/types.ts +57 -0
  304. package/src/utils/codex-auth-failure.ts +30 -0
  305. package/src/utils/context-window.ts +4 -1
  306. package/src/utils/credentials.ts +7 -0
  307. package/src/utils/fx-models.ts +43 -0
  308. package/src/workflows/cooldown.ts +3 -2
  309. package/src/workflows/engine.ts +24 -9
  310. package/templates/schedules/dreaming-daily/config.json +1 -1
  311. package/templates/schedules/dreaming-daily/content.md +6 -14
  312. package/templates/skills/composio-google-docs/content.md +10 -0
  313. package/templates/skills/script-workflows/content.md +19 -1
  314. package/templates/skills/swarm-docs/content.md +2 -0
  315. package/templates/skills/swarm-scripts/SKILL.md +2 -0
  316. package/templates/skills/swarm-scripts/content.md +2 -0
  317. package/templates/workflows/dreaming/content.md +5 -1
  318. package/dist/acp-adapter-96dc64m2.js +0 -15
  319. package/dist/cli-dznrgaep.js +0 -30
  320. package/dist/cli-w3hcrxht.js +0 -6985
  321. package/dist/handlers-jg7v74ty.js +0 -31
  322. package/dist/index-8c1zbz59.js +0 -29
  323. package/dist/index-8k8tmfxd.js +0 -32
  324. package/dist/index-hq617xdj.js +0 -36
  325. package/dist/lead-567kw7x3.js +0 -68
  326. package/dist/worker-fjdqra6q.js +0 -68
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.4",
5
+ "version": "2.7.6",
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": [
@@ -472,7 +472,8 @@
472
472
  "dsh",
473
473
  "amp",
474
474
  "cursor",
475
- "grok"
475
+ "grok",
476
+ "fx"
476
477
  ]
477
478
  },
478
479
  "providerMeta": {
@@ -546,7 +547,8 @@
546
547
  "dsh",
547
548
  "amp",
548
549
  "cursor",
549
- "grok"
550
+ "grok",
551
+ "fx"
550
552
  ]
551
553
  },
552
554
  "capabilities": {
@@ -742,6 +744,7 @@
742
744
  "amp",
743
745
  "cursor",
744
746
  "grok",
747
+ "fx",
745
748
  null
746
749
  ],
747
750
  "default": null
@@ -1177,7 +1180,8 @@
1177
1180
  "dsh",
1178
1181
  "amp",
1179
1182
  "cursor",
1180
- "grok"
1183
+ "grok",
1184
+ "fx"
1181
1185
  ]
1182
1186
  },
1183
1187
  "harnessProvider": {
@@ -1197,6 +1201,7 @@
1197
1201
  "amp",
1198
1202
  "cursor",
1199
1203
  "grok",
1204
+ "fx",
1200
1205
  null
1201
1206
  ]
1202
1207
  },
@@ -3569,7 +3574,8 @@
3569
3574
  "dsh",
3570
3575
  "amp",
3571
3576
  "cursor",
3572
- "grok"
3577
+ "grok",
3578
+ "fx"
3573
3579
  ]
3574
3580
  },
3575
3581
  "model": {
@@ -3804,6 +3810,9 @@
3804
3810
  },
3805
3811
  "requestedByUserId": {
3806
3812
  "type": "string"
3813
+ },
3814
+ "sourceTaskId": {
3815
+ "type": "string"
3807
3816
  }
3808
3817
  },
3809
3818
  "required": [
@@ -5175,6 +5184,13 @@
5175
5184
  "seconds": {
5176
5185
  "type": "number",
5177
5186
  "minimum": 0
5187
+ },
5188
+ "from": {
5189
+ "type": "string",
5190
+ "enum": [
5191
+ "finish",
5192
+ "start"
5193
+ ]
5178
5194
  }
5179
5195
  }
5180
5196
  },
@@ -5932,6 +5948,13 @@
5932
5948
  "seconds": {
5933
5949
  "type": "number",
5934
5950
  "minimum": 0
5951
+ },
5952
+ "from": {
5953
+ "type": "string",
5954
+ "enum": [
5955
+ "finish",
5956
+ "start"
5957
+ ]
5935
5958
  }
5936
5959
  }
5937
5960
  },
@@ -6104,6 +6127,23 @@
6104
6127
  "default": null,
6105
6128
  "additionalProperties": false
6106
6129
  },
6130
+ "cache": {
6131
+ "type": [
6132
+ "object",
6133
+ "null"
6134
+ ],
6135
+ "properties": {
6136
+ "mountPath": {
6137
+ "type": "string",
6138
+ "minLength": 2
6139
+ }
6140
+ },
6141
+ "default": null,
6142
+ "required": [
6143
+ "mountPath"
6144
+ ],
6145
+ "additionalProperties": false
6146
+ },
6107
6147
  "ttlSec": {
6108
6148
  "type": [
6109
6149
  "integer",
@@ -10617,7 +10657,8 @@
10617
10657
  "dsh",
10618
10658
  "amp",
10619
10659
  "cursor",
10620
- "grok"
10660
+ "grok",
10661
+ "fx"
10621
10662
  ]
10622
10663
  },
10623
10664
  "harness_provider": {
@@ -10633,7 +10674,8 @@
10633
10674
  "dsh",
10634
10675
  "amp",
10635
10676
  "cursor",
10636
- "grok"
10677
+ "grok",
10678
+ "fx"
10637
10679
  ]
10638
10680
  },
10639
10681
  "runtimeInstanceId": {
@@ -10967,7 +11009,8 @@
10967
11009
  "dsh",
10968
11010
  "amp",
10969
11011
  "cursor",
10970
- "grok"
11012
+ "grok",
11013
+ "fx"
10971
11014
  ]
10972
11015
  }
10973
11016
  },
@@ -11186,7 +11229,8 @@
11186
11229
  "dsh",
11187
11230
  "amp",
11188
11231
  "cursor",
11189
- "grok"
11232
+ "grok",
11233
+ "fx"
11190
11234
  ]
11191
11235
  },
11192
11236
  "model": {
@@ -12366,6 +12410,7 @@
12366
12410
  "amp",
12367
12411
  "cursor",
12368
12412
  "grok",
12413
+ "fx",
12369
12414
  null
12370
12415
  ]
12371
12416
  },
@@ -12386,6 +12431,7 @@
12386
12431
  "amp",
12387
12432
  "cursor",
12388
12433
  "grok",
12434
+ "fx",
12389
12435
  null
12390
12436
  ]
12391
12437
  },
@@ -12508,6 +12554,7 @@
12508
12554
  "amp",
12509
12555
  "cursor",
12510
12556
  "grok",
12557
+ "fx",
12511
12558
  null
12512
12559
  ]
12513
12560
  },
@@ -12528,6 +12575,7 @@
12528
12575
  "amp",
12529
12576
  "cursor",
12530
12577
  "grok",
12578
+ "fx",
12531
12579
  null
12532
12580
  ]
12533
12581
  },
@@ -28026,7 +28074,8 @@
28026
28074
  "dsh",
28027
28075
  "amp",
28028
28076
  "cursor",
28029
- "grok"
28077
+ "grok",
28078
+ "fx"
28030
28079
  ]
28031
28080
  },
28032
28081
  "required": false,
@@ -28066,7 +28115,8 @@
28066
28115
  "dsh",
28067
28116
  "amp",
28068
28117
  "cursor",
28069
- "grok"
28118
+ "grok",
28119
+ "fx"
28070
28120
  ]
28071
28121
  },
28072
28122
  "model": {
@@ -28167,7 +28217,8 @@
28167
28217
  "dsh",
28168
28218
  "amp",
28169
28219
  "cursor",
28170
- "grok"
28220
+ "grok",
28221
+ "fx"
28171
28222
  ]
28172
28223
  },
28173
28224
  "model": {
@@ -28237,7 +28288,8 @@
28237
28288
  "dsh",
28238
28289
  "amp",
28239
28290
  "cursor",
28240
- "grok"
28291
+ "grok",
28292
+ "fx"
28241
28293
  ]
28242
28294
  },
28243
28295
  "model": {
@@ -28377,7 +28429,8 @@
28377
28429
  "dsh",
28378
28430
  "amp",
28379
28431
  "cursor",
28380
- "grok"
28432
+ "grok",
28433
+ "fx"
28381
28434
  ]
28382
28435
  },
28383
28436
  "model": {
@@ -28536,7 +28589,8 @@
28536
28589
  "dsh",
28537
28590
  "amp",
28538
28591
  "cursor",
28539
- "grok"
28592
+ "grok",
28593
+ "fx"
28540
28594
  ]
28541
28595
  },
28542
28596
  "model": {
@@ -28876,7 +28930,8 @@
28876
28930
  "dsh",
28877
28931
  "amp",
28878
28932
  "cursor",
28879
- "grok"
28933
+ "grok",
28934
+ "fx"
28880
28935
  ]
28881
28936
  },
28882
28937
  "tier": {
@@ -30769,6 +30824,12 @@
30769
30824
  "string",
30770
30825
  "null"
30771
30826
  ]
30827
+ },
30828
+ "dashboard_url": {
30829
+ "type": [
30830
+ "string",
30831
+ "null"
30832
+ ]
30772
30833
  }
30773
30834
  },
30774
30835
  "required": [
@@ -30832,7 +30893,8 @@
30832
30893
  "dsh",
30833
30894
  "amp",
30834
30895
  "cursor",
30835
- "grok"
30896
+ "grok",
30897
+ "fx"
30836
30898
  ]
30837
30899
  },
30838
30900
  "providers": {
@@ -30853,7 +30915,8 @@
30853
30915
  "dsh",
30854
30916
  "amp",
30855
30917
  "cursor",
30856
- "grok"
30918
+ "grok",
30919
+ "fx"
30857
30920
  ]
30858
30921
  },
30859
30922
  "state": {
@@ -31225,7 +31288,8 @@
31225
31288
  "dsh",
31226
31289
  "amp",
31227
31290
  "cursor",
31228
- "grok"
31291
+ "grok",
31292
+ "fx"
31229
31293
  ]
31230
31294
  }
31231
31295
  },
@@ -31873,7 +31937,8 @@
31873
31937
  "dsh",
31874
31938
  "amp",
31875
31939
  "cursor",
31876
- "grok"
31940
+ "grok",
31941
+ "fx"
31877
31942
  ]
31878
31943
  },
31879
31944
  "state": {
@@ -33032,7 +33097,8 @@
33032
33097
  "dsh",
33033
33098
  "amp",
33034
33099
  "cursor",
33035
- "grok"
33100
+ "grok",
33101
+ "fx"
33036
33102
  ]
33037
33103
  },
33038
33104
  "state": {
@@ -34224,7 +34290,8 @@
34224
34290
  "dsh",
34225
34291
  "amp",
34226
34292
  "cursor",
34227
- "grok"
34293
+ "grok",
34294
+ "fx"
34228
34295
  ]
34229
34296
  },
34230
34297
  "requestedByUserId": {
@@ -34718,7 +34785,8 @@
34718
34785
  "dsh",
34719
34786
  "amp",
34720
34787
  "cursor",
34721
- "grok"
34788
+ "grok",
34789
+ "fx"
34722
34790
  ]
34723
34791
  },
34724
34792
  "model": {
@@ -35793,7 +35861,8 @@
35793
35861
  "dsh",
35794
35862
  "amp",
35795
35863
  "cursor",
35796
- "grok"
35864
+ "grok",
35865
+ "fx"
35797
35866
  ]
35798
35867
  },
35799
35868
  "requestedByUserId": {
@@ -36014,7 +36083,8 @@
36014
36083
  "dsh",
36015
36084
  "amp",
36016
36085
  "cursor",
36017
- "grok"
36086
+ "grok",
36087
+ "fx"
36018
36088
  ]
36019
36089
  }
36020
36090
  },
@@ -39201,7 +39271,8 @@
39201
39271
  "dsh",
39202
39272
  "amp",
39203
39273
  "cursor",
39204
- "grok"
39274
+ "grok",
39275
+ "fx"
39205
39276
  ]
39206
39277
  },
39207
39278
  "required": true,
@@ -39286,7 +39357,8 @@
39286
39357
  "dsh",
39287
39358
  "amp",
39288
39359
  "cursor",
39289
- "grok"
39360
+ "grok",
39361
+ "fx"
39290
39362
  ]
39291
39363
  },
39292
39364
  "required": true,
@@ -39404,7 +39476,8 @@
39404
39476
  "dsh",
39405
39477
  "amp",
39406
39478
  "cursor",
39407
- "grok"
39479
+ "grok",
39480
+ "fx"
39408
39481
  ]
39409
39482
  },
39410
39483
  "required": true,
@@ -39490,7 +39563,8 @@
39490
39563
  "dsh",
39491
39564
  "amp",
39492
39565
  "cursor",
39493
- "grok"
39566
+ "grok",
39567
+ "fx"
39494
39568
  ]
39495
39569
  },
39496
39570
  "required": true,
@@ -49214,6 +49288,9 @@
49214
49288
  "outputSchema": {
49215
49289
  "type": "object",
49216
49290
  "additionalProperties": {}
49291
+ },
49292
+ "allowRedelegation": {
49293
+ "type": "boolean"
49217
49294
  }
49218
49295
  },
49219
49296
  "required": [
@@ -49285,6 +49362,16 @@
49285
49362
  }
49286
49363
  }
49287
49364
  },
49365
+ "403": {
49366
+ "description": "Script run belongs to another agent, or the run's agent may not create a child task under parentTaskId",
49367
+ "content": {
49368
+ "application/json": {
49369
+ "schema": {
49370
+ "$ref": "#/components/schemas/ErrorResponse"
49371
+ }
49372
+ }
49373
+ }
49374
+ },
49288
49375
  "404": {
49289
49376
  "description": "Script run not found",
49290
49377
  "content": {
@@ -49294,6 +49381,26 @@
49294
49381
  }
49295
49382
  }
49296
49383
  }
49384
+ },
49385
+ "409": {
49386
+ "description": "Agent task failed, was cancelled, or was superseded",
49387
+ "content": {
49388
+ "application/json": {
49389
+ "schema": {
49390
+ "$ref": "#/components/schemas/ErrorResponse"
49391
+ }
49392
+ }
49393
+ }
49394
+ },
49395
+ "422": {
49396
+ "description": "Blocked by the follow-up re-delegation guard",
49397
+ "content": {
49398
+ "application/json": {
49399
+ "schema": {
49400
+ "$ref": "#/components/schemas/ErrorResponse"
49401
+ }
49402
+ }
49403
+ }
49297
49404
  }
49298
49405
  }
49299
49406
  }
@@ -49912,7 +50019,8 @@
49912
50019
  "dsh",
49913
50020
  "amp",
49914
50021
  "cursor",
49915
- "grok"
50022
+ "grok",
50023
+ "fx"
49916
50024
  ]
49917
50025
  },
49918
50026
  "createdAt": {
@@ -51284,7 +51392,8 @@
51284
51392
  "dsh",
51285
51393
  "amp",
51286
51394
  "cursor",
51287
- "grok"
51395
+ "grok",
51396
+ "fx"
51288
51397
  ]
51289
51398
  },
51290
51399
  "requestedByUserId": {
@@ -64013,6 +64122,13 @@
64013
64122
  "seconds": {
64014
64123
  "type": "number",
64015
64124
  "minimum": 0
64125
+ },
64126
+ "from": {
64127
+ "type": "string",
64128
+ "enum": [
64129
+ "finish",
64130
+ "start"
64131
+ ]
64016
64132
  }
64017
64133
  }
64018
64134
  },
@@ -64430,6 +64546,13 @@
64430
64546
  "seconds": {
64431
64547
  "type": "number",
64432
64548
  "minimum": 0
64549
+ },
64550
+ "from": {
64551
+ "type": "string",
64552
+ "enum": [
64553
+ "finish",
64554
+ "start"
64555
+ ]
64433
64556
  }
64434
64557
  }
64435
64558
  },
@@ -66072,6 +66195,23 @@
66072
66195
  "default": null,
66073
66196
  "additionalProperties": false
66074
66197
  },
66198
+ "cache": {
66199
+ "type": [
66200
+ "object",
66201
+ "null"
66202
+ ],
66203
+ "properties": {
66204
+ "mountPath": {
66205
+ "type": "string",
66206
+ "minLength": 2
66207
+ }
66208
+ },
66209
+ "default": null,
66210
+ "required": [
66211
+ "mountPath"
66212
+ ],
66213
+ "additionalProperties": false
66214
+ },
66075
66215
  "ttlSec": {
66076
66216
  "type": [
66077
66217
  "integer",
@@ -66354,6 +66494,22 @@
66354
66494
  },
66355
66495
  "additionalProperties": false
66356
66496
  },
66497
+ "cache": {
66498
+ "type": [
66499
+ "object",
66500
+ "null"
66501
+ ],
66502
+ "properties": {
66503
+ "mountPath": {
66504
+ "type": "string",
66505
+ "minLength": 2
66506
+ }
66507
+ },
66508
+ "required": [
66509
+ "mountPath"
66510
+ ],
66511
+ "additionalProperties": false
66512
+ },
66357
66513
  "ttlSec": {
66358
66514
  "type": [
66359
66515
  "integer",
@@ -66657,7 +66813,8 @@
66657
66813
  "dsh",
66658
66814
  "amp",
66659
66815
  "cursor",
66660
- "grok"
66816
+ "grok",
66817
+ "fx"
66661
66818
  ]
66662
66819
  },
66663
66820
  "maxTasks": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desplega.ai/agent-swarm",
3
- "version": "2.7.4",
3
+ "version": "2.7.6",
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",
@@ -62,6 +62,7 @@
62
62
  "packages/*"
63
63
  ],
64
64
  "overrides": {
65
+ "@slack/socket-mode": "^2.0.7",
65
66
  "react": "19.2.3",
66
67
  "react-dom": "19.2.3"
67
68
  },
@@ -178,12 +179,12 @@
178
179
  },
179
180
  "devDependencies": {
180
181
  "@biomejs/biome": "^2.3.10",
181
- "@desplega.ai/slack-mock": "^0.4.1",
182
+ "@desplega.ai/slack-mock": "^0.5.0",
182
183
  "@desplega/model-catalog": "workspace:*",
183
184
  "@desplega/model-routing": "workspace:*",
184
185
  "@faker-js/faker": "^10.4.0",
185
- "@opencode/plugin": "2.2.1",
186
- "@opencode/sdk": "2.2.1",
186
+ "@opencode/plugin": "2.2.3",
187
+ "@opencode/sdk": "2.2.3",
187
188
  "@oxlint/plugins": "1.78.0",
188
189
  "@types/bun": "latest",
189
190
  "dependency-cruiser": "^18.0.0",
@@ -201,9 +202,9 @@
201
202
  "bun": ">=1.3.12"
202
203
  },
203
204
  "dependencies": {
204
- "@agentclientprotocol/sdk": "2.1.0",
205
+ "@agentclientprotocol/sdk": "2.2.0",
205
206
  "@ai-sdk/openai": "^3.0.41",
206
- "@anthropic-ai/claude-agent-sdk": "0.3.312",
207
+ "@anthropic-ai/claude-agent-sdk": "0.3.314",
207
208
  "@anthropic-ai/sdk": "^1.3.0",
208
209
  "@asteasolutions/zod-to-openapi": "^8.0.0",
209
210
  "@aws-sdk/client-bedrock": "3.1048.0",
@@ -222,7 +223,7 @@
222
223
  "@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
223
224
  "@linear/sdk": "^77.0.0",
224
225
  "@modelcontextprotocol/sdk": "1.32.1",
225
- "@openai/codex": "0.165.0",
226
+ "@openai/codex": "0.166.0",
226
227
  "@openfort/openfort-node": "^0.9.1",
227
228
  "@opentelemetry/api": "^1.9.1",
228
229
  "@opentelemetry/api-logs": "^0.218.0",
@@ -13,3 +13,26 @@ export async function getScriptRunExecutionArgs(id: string): Promise<unknown> {
13
13
  );
14
14
  return row ? openSealedJson(row.args) : undefined;
15
15
  }
16
+
17
+ /** A durable run's follow-up re-delegation guard decision (see migration 266). */
18
+ export type ScriptRunFollowUpGuard = "passed" | "same-work" | "loop-cap";
19
+
20
+ export async function getScriptRunFollowUpGuard(
21
+ runId: string,
22
+ ): Promise<ScriptRunFollowUpGuard | null> {
23
+ const row = await getDbClient().get<{ followUpGuard: ScriptRunFollowUpGuard | null }>(
24
+ "SELECT followUpGuard FROM script_runs WHERE id = ?",
25
+ [runId],
26
+ );
27
+ return row?.followUpGuard ?? null;
28
+ }
29
+
30
+ export async function setScriptRunFollowUpGuard(
31
+ runId: string,
32
+ decision: ScriptRunFollowUpGuard,
33
+ ): Promise<void> {
34
+ await getDbClient().run("UPDATE script_runs SET followUpGuard = ? WHERE id = ?", [
35
+ decision,
36
+ runId,
37
+ ]);
38
+ }
@@ -1,3 +1,4 @@
1
+ import { TERMINAL_TASK_STATUSES } from "../../types";
1
2
  import { getDbClient } from "./runtime";
2
3
 
3
4
  /**
@@ -37,18 +38,20 @@ export interface SessionSummaryDrift {
37
38
  | "lastActivityAt"
38
39
  | "latestStatus"
39
40
  | "pendingApproval"
41
+ | "openTasks"
40
42
  | "lastHumanAt"
41
43
  | "member";
42
44
  expected: string | number | null;
43
45
  stored: string | number | null;
44
46
  }
45
47
 
48
+ const OPEN_TASK_SQL = `t.status NOT IN (${TERMINAL_TASK_STATUSES.map((s) => `'${s}'`).join(", ")})`;
46
49
  const HUMAN_TASK_SQL = `t.requestedByUserId IS NOT NULL AND t.requestedByUserIdInherited = 0
47
50
  AND COALESCE(t.source, '') NOT IN ('mcp', 'system', 'schedule', 'workflow')`;
48
51
 
49
52
  /**
50
53
  * Read-only drift check: compares the stored summaries and members with a
51
- * fresh chain walk (the rule `sessionSummaryQuery` applies today). Returns one
54
+ * fresh chain walk (the rule `legacySessionSummaryQuery` applies). Returns one
52
55
  * row per mismatch, so an empty result means the tables are exact. With
53
56
  * `since`, only roots whose chain activity is at or after it are compared.
54
57
  * `latestStatus` is skipped when two chain tasks tie on the newest
@@ -64,7 +67,7 @@ export function sessionSummaryDriftQuery(since: string | null = null): {
64
67
  UNION ALL SELECT c.root_id, t.id FROM chain c JOIN agent_tasks t ON t.parentTaskId = c.id
65
68
  ), walked AS (
66
69
  SELECT c.root_id, COUNT(*) AS chainCount, t.status AS latestStatus,
67
- MAX(t.lastUpdatedAt) AS lastActivityAt
70
+ MAX(t.lastUpdatedAt) AS lastActivityAt, SUM(${OPEN_TASK_SQL}) AS openTasks
68
71
  FROM chain c JOIN agent_tasks t ON t.id = c.id GROUP BY c.root_id
69
72
  ), expected AS (
70
73
  SELECT w.*,
@@ -98,6 +101,9 @@ export function sessionSummaryDriftQuery(since: string | null = null): {
98
101
  UNION ALL SELECT e.root_id, 'pendingApproval', e.pendingApproval, s.pendingApprovalCount > 0
99
102
  FROM expected e JOIN session_summaries s ON s.rootId = e.root_id
100
103
  WHERE (s.pendingApprovalCount > 0) IS NOT e.pendingApproval
104
+ UNION ALL SELECT e.root_id, 'openTasks', e.openTasks, s.openTaskCount
105
+ FROM expected e JOIN session_summaries s ON s.rootId = e.root_id
106
+ WHERE s.openTaskCount IS NOT e.openTasks
101
107
  UNION ALL SELECT e.root_id, 'lastHumanAt', e.lastHumanAt, s.lastHumanAt
102
108
  FROM expected e JOIN session_summaries s ON s.rootId = e.root_id
103
109
  WHERE s.lastHumanAt IS NOT e.lastHumanAt