@desplega.ai/agent-swarm 2.7.7 → 2.7.9

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 (401) hide show
  1. package/dist/acp-adapter-dn4gdsgr.js +16 -0
  2. package/dist/{actions-3tt153af.js → actions-g563mbn2.js} +19 -19
  3. package/dist/{amp-adapter-njpts0yr.js → amp-adapter-q61w05eb.js} +3 -3
  4. package/dist/{anthropic-messages-xey2skwx.js → anthropic-messages-jkva0zps.js} +68 -78
  5. package/dist/{app-nky4378f.js → app-a66ssc4k.js} +3 -3
  6. package/dist/{assistant-jnb669pa.js → assistant-p477rjwj.js} +22 -22
  7. package/dist/{azure-openai-responses-26t7j9ra.js → azure-openai-responses-wgtqkbr3.js} +5 -10
  8. package/dist/boot-args-schema-h4qj462e.js +89 -0
  9. package/dist/{boot-reembed-9mgvaztt.js → boot-reembed-n1ehfbsw.js} +1 -1
  10. package/dist/{boot-reembed-qs2djdej.js → boot-reembed-qw4mc0pt.js} +1 -1
  11. package/dist/{boot-scrub-sweep-yjpdj7s1.js → boot-scrub-sweep-9w9jp4sm.js} +4 -4
  12. package/dist/{boot-seeds-5cm6ambd.js → boot-seeds-qdaf3sdy.js} +5 -4
  13. package/dist/{boxd-nv507va8.js → boxd-qbkxy6ap.js} +1 -1
  14. package/dist/{claude-adapter-fn287zmm.js → claude-adapter-348p5hx9.js} +8 -8
  15. package/dist/{claude-managed-adapter-dvs2xw5n.js → claude-managed-adapter-h74d06yz.js} +4 -4
  16. package/dist/{claude-managed-setup-wtdz2mj2.js → claude-managed-setup-7787fxtp.js} +5 -5
  17. package/dist/{claude-sdk-session-x91kqyhm.js → claude-sdk-session-hbszbt8a.js} +7901 -7718
  18. package/dist/{cli-cb2a8pna.js → cli-09kmfkmq.js} +4 -6
  19. package/dist/{cli-m0da8j35.js → cli-0whpms1z.js} +15 -10
  20. package/dist/{cli-5zx699j9.js → cli-12xyjhws.js} +29 -12
  21. package/dist/{cli-snpj5zbj.js → cli-1z4qggfe.js} +9 -36
  22. package/dist/{cli-e0kmphd6.js → cli-21159vea.js} +35 -12
  23. package/dist/{cli-s0qnd4wv.js → cli-28fq781p.js} +1 -1
  24. package/dist/{cli-qh4d4tvk.js → cli-2a8py3sx.js} +6 -6
  25. package/dist/{cli-adeegh7d.js → cli-2ccpqyyf.js} +412 -116
  26. package/dist/{cli-1p89xny0.js → cli-2r0jcc3k.js} +1 -1
  27. package/dist/{cli-rvtm68yy.js → cli-2xv18ywz.js} +2 -2
  28. package/dist/{cli-5xaqj21p.js → cli-3kd08rej.js} +1 -1
  29. package/dist/{cli-1c6tzt8g.js → cli-3tqcamp6.js} +13 -13
  30. package/dist/{cli-ae7mrdf9.js → cli-3vjhs18n.js} +4 -6
  31. package/dist/{cli-vfym7wmz.js → cli-3xcwp3z8.js} +10 -12
  32. package/dist/{cli-az48n0nr.js → cli-4caa1x7d.js} +67 -64
  33. package/dist/{cli-5jnhv72d.js → cli-4t0fmf3z.js} +30 -7
  34. package/dist/{cli-5b456bpf.js → cli-530hkwdy.js} +7 -9
  35. package/dist/{cli-pz4rk021.js → cli-54vrpgm0.js} +1 -1
  36. package/dist/{cli-ddaanqkd.js → cli-587857ys.js} +7 -7
  37. package/dist/{cli-r9jqcehk.js → cli-5mpy301f.js} +38 -2
  38. package/dist/{cli-cppkf404.js → cli-605nn699.js} +80 -43
  39. package/dist/{cli-6pfd54vx.js → cli-650zv9q9.js} +10 -10
  40. package/dist/cli-6pzk82fd.js +778 -0
  41. package/dist/{cli-gz6q4eve.js → cli-715t1gx6.js} +9 -9
  42. package/dist/{cli-08bmz9z9.js → cli-9aezs55w.js} +10 -12
  43. package/dist/{cli-tgrv9cjx.js → cli-9r5gtwjr.js} +3 -3
  44. package/dist/{cli-pc6n7fre.js → cli-a0657jmf.js} +2 -2
  45. package/dist/{cli-pjctyea3.js → cli-agyaeef4.js} +3 -3
  46. package/dist/cli-b932gexn.js +5266 -0
  47. package/dist/{cli-e46hg0xw.js → cli-bc779n4v.js} +3 -3
  48. package/dist/{cli-jtjtabxe.js → cli-btc9cb4c.js} +78 -5
  49. package/dist/{cli-caj33vcq.js → cli-btf6fw39.js} +5 -5
  50. package/dist/{cli-q3tkegby.js → cli-cseh6f8w.js} +5 -5
  51. package/dist/{cli-n6bv12jn.js → cli-cvs2r2vq.js} +23 -14
  52. package/dist/{cli-tfyyvzx6.js → cli-cyn9v8zr.js} +17 -2
  53. package/dist/{cli-a22h291q.js → cli-d6521kb5.js} +1 -1
  54. package/dist/{cli-1b7btd38.js → cli-d84byzn8.js} +869 -5
  55. package/dist/{cli-wx3rhnm0.js → cli-eddnyg3t.js} +1 -1
  56. package/dist/{cli-nmzhp1b5.js → cli-ejkvvqbe.js} +55 -46
  57. package/dist/{cli-ftyxyspd.js → cli-eqtfgfr6.js} +1 -1
  58. package/dist/{cli-mthwvjre.js → cli-f2zenhja.js} +1 -1
  59. package/dist/{cli-ws19768n.js → cli-fayav105.js} +624 -227
  60. package/dist/{cli-ferkkrg9.js → cli-fjggej24.js} +2 -2
  61. package/dist/{cli-g7s47cc5.js → cli-fsgttth8.js} +123 -102
  62. package/dist/{cli-8305gbq0.js → cli-gce09r66.js} +5 -5
  63. package/dist/{cli-mkk9rnzz.js → cli-gxy8y1dt.js} +51 -4
  64. package/dist/{cli-fyt2g4wd.js → cli-hae9j8sv.js} +288 -76
  65. package/dist/{cli-agfm16v9.js → cli-hg42n3hx.js} +12 -12
  66. package/dist/{cli-qghe0h66.js → cli-hwprv9e4.js} +8 -10
  67. package/dist/{cli-yndmfxb3.js → cli-hxpyc9sn.js} +3 -3
  68. package/dist/{cli-72v799xn.js → cli-jfx48xrj.js} +10 -12
  69. package/dist/{cli-dhar9qay.js → cli-jrp1dt73.js} +2 -2
  70. package/dist/{cli-98rw5dt5.js → cli-jrzkw01m.js} +2 -2
  71. package/dist/{cli-ayayvfg4.js → cli-k70e3x9e.js} +24 -20
  72. package/dist/{cli-583frbyr.js → cli-kchjb7qy.js} +1 -1
  73. package/dist/{cli-cm5yqn35.js → cli-kf3pxxdg.js} +1 -0
  74. package/dist/{cli-fmjd0t1y.js → cli-m0cy2vyf.js} +2 -2
  75. package/dist/{cli-4zsenjhy.js → cli-m5akxq8q.js} +16 -3
  76. package/dist/{cli-73jzwksr.js → cli-m88rpzkh.js} +6 -3
  77. package/dist/{cli-95jzxcp3.js → cli-mnrkgg60.js} +4 -4
  78. package/dist/{cli-p82cnnjq.js → cli-ms5m5r1y.js} +1 -1
  79. package/dist/{cli-fy6x31ps.js → cli-n5yexkdg.js} +1 -0
  80. package/dist/{cli-wk5yrfwd.js → cli-neyag5p6.js} +191 -85
  81. package/dist/cli-p0m0p34z.js +9321 -0
  82. package/dist/{cli-yyj3j5m4.js → cli-p17970qv.js} +8 -10
  83. package/dist/{cli-6vcp76qk.js → cli-p74md7t8.js} +42 -23
  84. package/dist/{cli-rjcbm574.js → cli-pr0eze3x.js} +2 -2
  85. package/dist/{cli-35rsp8ye.js → cli-qkdmz8c8.js} +1 -1
  86. package/dist/{cli-rtt8g4v9.js → cli-qmd3mse0.js} +2 -2
  87. package/dist/{cli-je518txm.js → cli-qzt90yze.js} +20 -20
  88. package/dist/cli-rkc97c6a.js +39 -0
  89. package/dist/{cli-75gkpjvw.js → cli-rvhdmjvt.js} +8 -12
  90. package/dist/{cli-6g0hb4cp.js → cli-rwymrnaz.js} +18608 -9089
  91. package/dist/{cli-3fg0bdcv.js → cli-serm8zrx.js} +6 -6
  92. package/dist/{cli-g08zdaec.js → cli-sgs5k6yd.js} +1 -1
  93. package/dist/{cli-afkqkrtw.js → cli-sya22y84.js} +21 -9
  94. package/dist/{cli-318r69gq.js → cli-t73cas91.js} +440 -9
  95. package/dist/{cli-e5bzrn01.js → cli-tqq0hspb.js} +2 -2
  96. package/dist/{cli-pq73h5mz.js → cli-v3cf1ts9.js} +3 -3
  97. package/dist/{cli-bfv7vdg6.js → cli-varqt4d1.js} +28 -16
  98. package/dist/{cli-k899ehvh.js → cli-vxh6acp7.js} +6 -6
  99. package/dist/{cli-g83s9ewh.js → cli-xfjrc279.js} +1 -1
  100. package/dist/{cli-k1nje3v3.js → cli-xk879m3k.js} +129 -115
  101. package/dist/{cli-7cx2m6t2.js → cli-y5rbvxhc.js} +2 -2
  102. package/dist/{cli-8sckt74b.js → cli-y8nbefpb.js} +41 -19
  103. package/dist/{cli-81p9jd57.js → cli-yab6sh8p.js} +9 -3
  104. package/dist/{cli-srye3vdt.js → cli-ybjdc978.js} +1 -1
  105. package/dist/{cli-k5671be5.js → cli-zcfpsfzf.js} +5 -5
  106. package/dist/{cli-vf078p3e.js → cli-zfqg6fzn.js} +1 -1
  107. package/dist/{cli-k8196sh2.js → cli-zgv8gxgs.js} +9 -8
  108. package/dist/cli.js +34 -52
  109. package/dist/{cloudflare-workers-ai-system-one-ef2a980q.js → cloudflare-workers-ai-system-one-9y1zx3pt.js} +2 -2
  110. package/dist/{codex-adapter-cf2yxe9m.js → codex-adapter-ysq6bzha.js} +7 -7
  111. package/dist/{codex-hook-a0c6g6t6.js → codex-hook-fac6175r.js} +1 -1
  112. package/dist/{codex-login-y0pmff1c.js → codex-login-bcda78ge.js} +2 -2
  113. package/dist/{codex-session-runner-6vfzdgbd.js → codex-session-runner-qakzfx93.js} +8 -8
  114. package/dist/{commands-t3mfy7vn.js → commands-rs7hkv9r.js} +3 -3
  115. package/dist/{controller-q7xrbaz0.js → controller-r5x9bg6e.js} +4 -4
  116. package/dist/{controllers-connect-c6nm70kg.js → controllers-connect-498hrxvk.js} +24 -24
  117. package/dist/{cursor-adapter-ftd81ga8.js → cursor-adapter-d46qszer.js} +2 -2
  118. package/dist/{db-vemtpmcc.js → db-pm96nhdb.js} +6 -2
  119. package/dist/{db-dk572x25.js → db-s13dqhr6.js} +3 -3
  120. package/dist/{devin-adapter-r9phbnc9.js → devin-adapter-z46ep5ph.js} +1 -1
  121. package/dist/{dispatcher-kh7ecxh9.js → dispatcher-j3h81t7m.js} +18 -18
  122. package/dist/{docker-c1a3gqmf.js → docker-866qpzt9.js} +2 -2
  123. package/dist/{dsh-adapter-v8628r89.js → dsh-adapter-rw0d5rc4.js} +2 -2
  124. package/dist/{e2b-fr12yccx.js → e2b-jkwfhbcv.js} +2 -2
  125. package/dist/{e2b-x6ywzak3.js → e2b-s16txnpx.js} +2 -3
  126. package/dist/{easter-egg-3d-nenw4x63.js → easter-egg-3d-qtgfxgze.js} +1 -1
  127. package/dist/{embedding-space-0jepb239.js → embedding-space-xh8p4q4x.js} +6 -6
  128. package/dist/{embeddings-xxt49yxg.js → embeddings-wp745m91.js} +1 -1
  129. package/dist/{event-bus-g0ka3pbw.js → event-bus-e66gh7cc.js} +1 -1
  130. package/dist/{execute-1mhw6e4x.js → execute-2fzb9z74.js} +1 -1
  131. package/dist/{external-channel-55v12e60.js → external-channel-ys21h3sy.js} +2 -2
  132. package/dist/fx-adapter-vz0b9z3g.js +19 -0
  133. package/dist/{google-generative-ai-v94hr7h0.js → google-generative-ai-ytpgncx9.js} +7 -12
  134. package/dist/{google-vertex-g7vr6cf8.js → google-vertex-tqhze5j7.js} +7 -12
  135. package/dist/grok-adapter-spea7zkj.js +19 -0
  136. package/dist/handlers-crckt5dq.js +32 -0
  137. package/dist/{heartbeat-k42svnr0.js → heartbeat-8phn1kdq.js} +21 -21
  138. package/dist/{hook-6nphweh0.js → hook-amcj4s10.js} +16 -11
  139. package/dist/{hook-114m7hap.js → hook-bc6n49qn.js} +5 -5
  140. package/dist/{http-r8cc4wz7.js → http-7374brv5.js} +854 -332
  141. package/dist/index-4x08sjtk.js +30 -0
  142. package/dist/{index-6cxzwfen.js → index-5a9jtqde.js} +26 -26
  143. package/dist/index-8ybffts4.js +37 -0
  144. package/dist/{index-nh3wyqdt.js → index-c9y31ytf.js} +16 -16
  145. package/dist/{index-h39zbx67.js → index-hsad2t3r.js} +31 -31
  146. package/dist/index-nfy4kkg5.js +33 -0
  147. package/dist/{index-e3s8wmxy.js → index-p4hjwbvw.js} +1 -1
  148. package/dist/{index-k7fj52d3.js → index-q5cmtbz5.js} +6 -6
  149. package/dist/{index-fpk4bcd9.js → index-w4m9z29z.js} +1 -1
  150. package/dist/{keepalive-x060nt9p.js → keepalive-wy29kbrg.js} +4 -4
  151. package/dist/lead-zdqxsvjn.js +71 -0
  152. package/dist/{llama-cpp-classify-s5c47rwh.js → llama-cpp-classify-nfgswa1m.js} +2 -2
  153. package/dist/{maintenance-2xxfexhf.js → maintenance-h2ds9w6c.js} +1 -1
  154. package/dist/{mistral-conversations-3gjpdb4b.js → mistral-conversations-a45tx39a.js} +29 -51
  155. package/dist/{oauth-refresh-sweep-fckc4ar5.js → oauth-refresh-sweep-q7mtbyp3.js} +3 -3
  156. package/dist/{onboard-zc48j237.js → onboard-vw8r2fdw.js} +68 -16
  157. package/dist/{openai-codex-responses-8pbxq9h5.js → openai-codex-responses-k9gapdze.js} +7 -11
  158. package/dist/{openai-completions-rm00s912.js → openai-completions-xd579js7.js} +50 -58
  159. package/dist/{openai-decisions-8v957r2r.js → openai-decisions-q3hh60wr.js} +2 -2
  160. package/dist/{openai-responses-agxpf96k.js → openai-responses-4d5dx3c7.js} +5 -10
  161. package/dist/{opencode-adapter-r690h1cr.js → opencode-adapter-mtb0953j.js} +6 -6
  162. package/dist/{openrouter-images-3ecegv0d.js → openrouter-images-xr9gme9x.js} +4 -3
  163. package/dist/{otel-impl-r5xbh81q.js → otel-impl-j42czw3r.js} +2 -2
  164. package/dist/{pi-messages-pchtw4he.js → pi-messages-hjbv8v10.js} +28 -12
  165. package/dist/{pi-mono-adapter-c7v8sdec.js → pi-mono-adapter-zk8pg9jr.js} +30 -27
  166. package/dist/{pricing-refresh-3pmre11v.js → pricing-refresh-x7nhv23d.js} +3 -3
  167. package/dist/{rbac-roles-3vbshwsb.js → rbac-roles-9044425x.js} +16 -2
  168. package/dist/rbac-roles-bzvee6cf.js +37 -0
  169. package/dist/{render-v2-pxykkbab.js → render-v2-t7bn4skz.js} +3 -3
  170. package/dist/{resume-adda0bwy.js → resume-x94gemep.js} +7 -7
  171. package/dist/{runtime-fnbm7stk.js → runtime-breq6fmv.js} +1 -1
  172. package/dist/{session-access-2fvamrdc.js → session-access-q7dmqjvt.js} +7 -5
  173. package/dist/{session-source-backfill-08xvv0sm.js → session-source-backfill-440ysamr.js} +3 -3
  174. package/dist/{setup-1aqmvmh1.js → setup-07n4727s.js} +1 -1
  175. package/dist/{typesafe-system-one-0bmqcxfg.js → typesafe-system-one-f2en2knd.js} +2 -2
  176. package/dist/virtual-modules-z5h6mcyf.js +362 -0
  177. package/dist/{work-objects-9s0yrm5j.js → work-objects-pnq5y534.js} +21 -21
  178. package/dist/{worker-follow-up-3q78fqmr.js → worker-follow-up-7z1gfkr8.js} +18 -18
  179. package/dist/worker-y62rvvq3.js +71 -0
  180. package/dist/{x-vmmye1kb.js → x-2fyrt5pp.js} +2 -2
  181. package/openapi.json +1268 -276
  182. package/package.json +10 -10
  183. package/src/apps/catalog.generated.json +299 -82
  184. package/src/apps/page-validator.ts +115 -2
  185. package/src/be/connector-codes.ts +21 -6
  186. package/src/be/db/model-profiles.ts +1 -1
  187. package/src/be/db/session-tree.ts +9 -5
  188. package/src/be/db/session-visibility.ts +25 -9
  189. package/src/be/db/tasks/read.ts +33 -6
  190. package/src/be/db/tasks/write.ts +77 -7
  191. package/src/be/db-queries/tracker.ts +4 -2
  192. package/src/be/db.ts +53 -19
  193. package/src/be/improvements.ts +416 -0
  194. package/src/be/migrations/271_subscription_usage_model.sql +30 -0
  195. package/src/be/migrations/274_improvements.sql +27 -0
  196. package/src/be/migrations/275_task_dispatched_by.sql +8 -0
  197. package/src/be/model-validation.ts +19 -1
  198. package/src/be/rbac-roles.ts +144 -1
  199. package/src/be/runtime-pools/routing.ts +1 -1
  200. package/src/be/scripts/boot-args-schema.ts +95 -0
  201. package/src/be/scripts/extract-schema.ts +15 -10
  202. package/src/be/seed-scripts/catalog/boot-triage.inline.ts +1 -1
  203. package/src/be/seed-scripts/catalog/boot-triage.ts +1 -1
  204. package/src/be/seed-scripts/catalog/get-child-outputs.ts +1 -1
  205. package/src/be/seed-scripts/catalog/wait-for-task.ts +1 -1
  206. package/src/be/swarm-config-guard.ts +8 -0
  207. package/src/be/users.ts +64 -5
  208. package/src/cli.tsx +5 -25
  209. package/src/commands/claude-managed-setup.ts +1 -1
  210. package/src/commands/codex-login.ts +1 -1
  211. package/src/commands/e2b.ts +0 -1
  212. package/src/commands/onboard/agent-fs-version.ts +1 -1
  213. package/src/commands/onboard/compose-generator.ts +0 -1
  214. package/src/commands/onboard/dashboard-url.ts +31 -0
  215. package/src/commands/onboard/steps/generate.tsx +17 -1
  216. package/src/commands/onboard/steps/post-dashboard.tsx +9 -3
  217. package/src/commands/onboard.tsx +19 -6
  218. package/src/commands/runner.ts +143 -105
  219. package/src/extensions/contract-types.generated.ts +1 -1
  220. package/src/hooks/hook.ts +13 -5
  221. package/src/http/agents.ts +7 -1
  222. package/src/http/all-routes.ts +1 -0
  223. package/src/http/approval-requests.ts +32 -50
  224. package/src/http/auth.ts +5 -4
  225. package/src/http/codex-oauth-accounts.ts +31 -23
  226. package/src/http/codex-oauth-device.ts +3 -3
  227. package/src/http/codex-oauth-keep-warm.ts +1 -1
  228. package/src/http/improvements.ts +317 -0
  229. package/src/http/index.ts +10 -0
  230. package/src/http/mcp-oauth.ts +6 -0
  231. package/src/http/mcp-servers.ts +8 -0
  232. package/src/http/models-catalog.ts +1 -1
  233. package/src/http/operator-actor.ts +2 -1
  234. package/src/http/pages-public.ts +38 -1
  235. package/src/http/person-responder.ts +66 -0
  236. package/src/http/poll.ts +3 -4
  237. package/src/http/prompt-templates.ts +1 -1
  238. package/src/http/schedules.ts +4 -0
  239. package/src/http/script-runs.ts +6 -1
  240. package/src/http/session-access.ts +61 -6
  241. package/src/http/sessions.ts +67 -9
  242. package/src/http/tasks.ts +53 -9
  243. package/src/http/user-roles.ts +11 -2
  244. package/src/http/users.ts +224 -105
  245. package/src/http/utils.ts +2 -1
  246. package/src/http/workflows.ts +11 -7
  247. package/src/prompts/session-templates.ts +1 -0
  248. package/src/providers/acp-targets.ts +1 -1
  249. package/src/providers/amp-adapter.ts +1 -1
  250. package/src/providers/codex-adapter.ts +17 -3
  251. package/src/providers/codex-models.ts +4 -3
  252. package/src/providers/codex-oauth/auth-json.ts +14 -18
  253. package/src/providers/codex-oauth/device.ts +49 -15
  254. package/src/providers/codex-oauth/flow.ts +2 -1
  255. package/src/providers/codex-oauth/storage.ts +2 -2
  256. package/src/providers/pi-mono-adapter.ts +8 -0
  257. package/src/providers/pricing-sources.md +16 -1
  258. package/src/providers/swarm-events-shared.ts +15 -2
  259. package/src/rbac/legacy-policy.ts +3 -0
  260. package/src/rbac/permissions.ts +15 -0
  261. package/src/scheduler/deferred-task-waits.ts +9 -4
  262. package/src/scripts-runtime/extract-args-schema.ts +3 -1
  263. package/src/scripts-runtime/swarm-sdk.ts +1 -1
  264. package/src/scripts-runtime/types/swarm-extension.d.ts +31 -28
  265. package/src/server-user.ts +1 -1
  266. package/src/server.ts +2 -0
  267. package/src/slack/ack.ts +68 -26
  268. package/src/slack/blocks.ts +1 -0
  269. package/src/slack/reaction-shortcode.ts +8 -2
  270. package/src/slack/render-v2.ts +72 -20
  271. package/src/slack/task-output.ts +4 -1
  272. package/src/slack/thread-buffer.ts +2 -2
  273. package/src/tasks/task-skip.ts +28 -0
  274. package/src/tasks/terminal-result-guard.ts +3 -2
  275. package/src/telemetry.ts +28 -1
  276. package/src/tests/agentmail-inbox-mapping.test.ts +73 -0
  277. package/src/tests/api-drain-worker-e2e.test.ts +69 -2
  278. package/src/tests/approval-requests.test.ts +58 -0
  279. package/src/tests/apps-catalog-drift.test.ts +35 -0
  280. package/src/tests/apps-catalog-table.test.ts +203 -0
  281. package/src/tests/apps-element-assembly.test.ts +28 -0
  282. package/src/tests/apps-smart-links.test.ts +151 -0
  283. package/src/tests/apps-table-filters-migration.test.ts +96 -0
  284. package/src/tests/apps-table-selection-migration.test.ts +95 -0
  285. package/src/tests/chatgpt-subscription-session-bench.test.ts +2 -2
  286. package/src/tests/claude-managed-setup.test.ts +36 -0
  287. package/src/tests/claude-worker-parity.test.ts +2 -2
  288. package/src/tests/codex-adapter.test.ts +32 -2
  289. package/src/tests/codex-login.test.ts +2 -2
  290. package/src/tests/codex-oauth-accounts.test.ts +48 -12
  291. package/src/tests/codex-oauth-credential-info.test.ts +77 -1
  292. package/src/tests/codex-oauth-device.test.ts +61 -1
  293. package/src/tests/codex-oauth-keep-warm.test.ts +2 -2
  294. package/src/tests/codex-oauth.test.ts +25 -4
  295. package/src/tests/codex-pool.test.ts +2 -2
  296. package/src/tests/codex-swarm-events.test.ts +43 -1
  297. package/src/tests/context-window.test.ts +14 -0
  298. package/src/tests/db-queries-tracker.test.ts +2 -1
  299. package/src/tests/db-task-read-contract.test.ts +3 -0
  300. package/src/tests/db-task-write-contract.test.ts +3 -0
  301. package/src/tests/deferred-task-wake.test.ts +7 -2
  302. package/src/tests/deploy-one-box.test.ts +39 -1
  303. package/src/tests/docs-index-footprint.test.js +3 -3
  304. package/src/tests/e2e-coverage-contract.test.ts +235 -0
  305. package/src/tests/empty-output-schema.test.ts +160 -0
  306. package/src/tests/env-flag.test.ts +1 -0
  307. package/src/tests/explicit-model-validation.test.ts +14 -0
  308. package/src/tests/fixtures/onboard/content.compose.yml.txt +0 -4
  309. package/src/tests/fixtures/onboard/dev.compose.yml.txt +0 -3
  310. package/src/tests/fixtures/onboard/full-all.compose.yml.txt +0 -11
  311. package/src/tests/fixtures/onboard/full.compose.yml.txt +0 -11
  312. package/src/tests/fixtures/onboard/research.compose.yml.txt +0 -3
  313. package/src/tests/fixtures/onboard/solo.compose.yml.txt +0 -1
  314. package/src/tests/fixtures/prs-app-definition.json.txt +784 -0
  315. package/src/tests/fixtures/prs-filters-migration.patch.json.txt +318 -0
  316. package/src/tests/fixtures/prs-selection-migration.patch.json.txt +373 -0
  317. package/src/tests/fixtures/runner-identity-refresh.ts +3 -0
  318. package/src/tests/fixtures/runner-legacy-resume-prompt.ts +3 -0
  319. package/src/tests/fixtures/runner-task-start-reads.ts +140 -0
  320. package/src/tests/hook-ping-me-order.test.ts +85 -0
  321. package/src/tests/http-api-integration.test.ts +2 -2
  322. package/src/tests/http-users.test.ts +63 -0
  323. package/src/tests/improvements-payload.test.ts +200 -0
  324. package/src/tests/improvements-route.test.ts +419 -0
  325. package/src/tests/install-sh-setup-url.test.ts +190 -0
  326. package/src/tests/mcp-input-caps.test.ts +4 -3
  327. package/src/tests/merge-gate-detect-changes.test.ts +22 -0
  328. package/src/tests/onboard-dashboard-output.test.ts +109 -0
  329. package/src/tests/onboard-dashboard-url.test.ts +83 -0
  330. package/src/tests/operator-granted-credentials.test.ts +561 -0
  331. package/src/tests/operator-granted-role-wire.test.ts +222 -0
  332. package/src/tests/pages-authed-mode.test.ts +13 -2
  333. package/src/tests/pi-mono-adapter.test.ts +39 -4
  334. package/src/tests/rbac-engine.test.ts +3 -0
  335. package/src/tests/runner-context-usage.test.ts +118 -0
  336. package/src/tests/runner-legacy-options.test.ts +55 -0
  337. package/src/tests/runner-slot-reconcile.test.ts +38 -0
  338. package/src/tests/runner-task-start-reads.test.ts +58 -0
  339. package/src/tests/script-connections.test.ts +2 -0
  340. package/src/tests/script-executor-quickjs.test.ts +2 -0
  341. package/src/tests/script-runs-http.test.ts +57 -0
  342. package/src/tests/scripts-boot-args-schema.test.ts +181 -0
  343. package/src/tests/scripts-runtime.test.ts +24 -0
  344. package/src/tests/sdk-store-progress-skipped.test.ts +155 -0
  345. package/src/tests/send-task-dispatched-by.test.ts +129 -0
  346. package/src/tests/session-costs-model-key-normalize.test.ts +59 -0
  347. package/src/tests/session-dispatched-tasks.test.ts +115 -0
  348. package/src/tests/session-sharing.test.ts +402 -3
  349. package/src/tests/slack-file-tools-attachments.test.ts +95 -3
  350. package/src/tests/slack-reaction-config.test.ts +40 -0
  351. package/src/tests/slack-render-v2.test.ts +120 -0
  352. package/src/tests/slack-skip-reaction.test.ts +203 -0
  353. package/src/tests/store-progress-skipped.test.ts +159 -0
  354. package/src/tests/submit-improvement-tool.test.ts +82 -0
  355. package/src/tests/subscription-usage-migration.test.ts +57 -0
  356. package/src/tests/swarm-config-reserved-keys.test.ts +3 -0
  357. package/src/tests/telemetry-endpoint-override.test.ts +27 -0
  358. package/src/tests/tool-annotations.test.ts +1 -1
  359. package/src/tests/trigger-claiming.test.ts +2 -0
  360. package/src/tests/workflow-system-one-extraction.test.ts +29 -0
  361. package/src/tools/create-channel.ts +1 -1
  362. package/src/tools/defer-task.ts +1 -1
  363. package/src/tools/manage-user.ts +88 -58
  364. package/src/tools/register-agentmail-inbox.ts +5 -0
  365. package/src/tools/repos/update-repo.ts +1 -1
  366. package/src/tools/request-human-input.ts +1 -1
  367. package/src/tools/send-task.ts +4 -1
  368. package/src/tools/slack-read.ts +61 -33
  369. package/src/tools/store-progress.ts +39 -8
  370. package/src/tools/submit-improvement.ts +68 -0
  371. package/src/tools/tool-config.ts +3 -0
  372. package/src/tools/tracker/tracker-unlink.ts +2 -1
  373. package/src/tools/workflows/retry-workflow-run.ts +3 -0
  374. package/src/types.ts +16 -2
  375. package/src/utils/context-window.ts +6 -1
  376. package/src/utils/output-schema.ts +23 -0
  377. package/src/utils/request-auth-context.ts +6 -1
  378. package/src/workflows/executors/system-one-providers.ts +25 -6
  379. package/src/workflows/recovery.ts +8 -4
  380. package/src/workflows/resume.ts +19 -0
  381. package/templates/skills/apps/SKILL.md +22 -11
  382. package/templates/skills/apps/content.md +22 -11
  383. package/templates/skills/swarm-scripts/SKILL.md +1 -1
  384. package/templates/skills/swarm-scripts/content.md +1 -1
  385. package/templates/skills/work-on-task/SKILL.md +1 -1
  386. package/templates/skills/work-on-task/content.md +1 -1
  387. package/dist/acp-adapter-7b4vk3h5.js +0 -16
  388. package/dist/cli-5c4hjzne.js +0 -873
  389. package/dist/cli-excnnjg2.js +0 -20222
  390. package/dist/cli-pc5znp64.js +0 -364
  391. package/dist/cli-vz22fyqv.js +0 -428
  392. package/dist/fx-adapter-bs8wqrk5.js +0 -19
  393. package/dist/grok-adapter-gpjqmkcq.js +0 -19
  394. package/dist/handlers-zxmp1ta4.js +0 -32
  395. package/dist/index-a8phxqnk.js +0 -37
  396. package/dist/index-k6h00t4c.js +0 -30
  397. package/dist/index-xrz7te8h.js +0 -33
  398. package/dist/lead-956sd2yc.js +0 -71
  399. package/dist/rbac-roles-910mmkgz.js +0 -26
  400. package/dist/virtual-modules-d2pjk9j1.js +0 -59
  401. package/dist/worker-y15hy08h.js +0 -71
@@ -494,7 +494,7 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
494
494
  | `Card` | none | `title`, `description`; has the `default` child slot. |
495
495
  | `Heading` | `text` | `level: "h1", "h2", or "h3"`. |
496
496
  | `Text` | `content` | `tone: "default" or "muted"`. |
497
- | `Markdown` | `content` | Rendered Markdown for help, instructions, and rich prose; no children. |
497
+ | `Markdown` | `content` | Rendered Markdown for help, instructions, and rich prose; no children. A link to a GitHub PR, issue, commit or repo, a dashboard task, agent, session or app, or an agent-fs file renders as a chip (icon plus short label), like agent output in a session; `[text](url)` keeps its text. |
498
498
  | `SearchInput` | `id` | `placeholder`, `label`, `shortcut` (one key, usually `"/"`: shows a keycap and focuses the field); writes debounced text to `/ui/<id>/value`; no children. |
499
499
  | `Select` | `id`, `options` | `options` are strings or `{ value, label?, icon?, hint? }`; `placeholder`, `label`, `clearable`, `searchable` (type to filter; on by default past 8 options), `searchPlaceholder`, `multiple`, `defaultValue` (seeds `/ui/<id>/value` once, before any interaction; a one-entry array with `multiple`); writes a string or null to `/ui/<id>/value`, or with `multiple` a string array (empty = nothing picked); no children. |
500
500
  | `NumberInput` | `id` | `label`, `placeholder`, `min`, `max`; a text field with a decimal keyboard that writes the parsed number to `/ui/<id>/value` on every change (no debounce), or null when the field is empty; non-numeric text (a bare `-` mid-edit, letters) leaves the stored value untouched; `min`/`max` clamp the stored value and the visible text snaps to it when the field loses focus; no children. |
@@ -512,7 +512,7 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
512
512
  | `Spinner` | none | `variant: "ring", "ellipsis", or "bars"` (default: the dashboard spinner), `size: "sm" or "md"`, `label` (visible text and accessible name). |
513
513
  | `AvatarStack` | `users` | `users` are display names (initials avatars); `max` (default 4) before a `+N` count. Hover lists every name. |
514
514
  | `Section` | `title` | `description`, `collapsible`, `defaultOpen` (default true); has the `default` child slot. |
515
- | `Table` | `columns` | `data`, `loading`, `error`, `emptyMessage`, `emptyState`, `rowActions`, `onRowClick`, `selectedId`, `rowId`, `mobile`, `mobileFields`, `search`, `filters`; see below. |
515
+ | `Table` | `columns` | `data`, `loading`, `refreshing`, `error`, `emptyMessage`, `emptyState`, `rowActions`, `id`, `selectable`, `bulkActions`, `filterable`, `clearState`, `onRetry`, `onRowClick`, `selectedId`, `rowId`, `mobile`, `mobileFields`, `search`, `filters`; see below. |
516
516
  | `Form` | `id`, `fields`, `onSubmit` | `title`, `submitLabel`; see below. |
517
517
  | `Drawer` | `param` | `title`, `description`, `side: "right" or "left"`, `size: "sm", "md" (default), "lg", or "xl"` (about 480/660/900/1010px at 1440px; grows with the viewport up to 640/960/1280/1600px; full width on phones), `actions` (sticky footer buttons; see below); has the `default` child slot. |
518
518
  | `DetailList` | `fields` | `data`, `emptyMessage`, `columns: 1 or 2`, `loading` (bind `/queries/<name>/loading` for skeleton fields while loading); renders one record without edit controls; see below for field kinds. |
@@ -524,14 +524,25 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
524
524
 
525
525
  Table details:
526
526
 
527
- - `columns[]`: `{ key, label?, kind?, tones?: {value: badgeTone}, width?: number, pinned?: "left" or "right", align?: "start" or "end", truncate?: "end" or "middle", icon?, tooltip?: "<row field>", max?: number, format?: "<template>", onChange?: chain }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge`, `status`, `user`, `agent`, `relative`, `duration`, `progress`, `copy`, `switch`, `link`, or `json`; `string` and `enum` render as text, and `json` renders a truncated single-line `JSON.stringify` preview. Pin id/actions columns so they survive horizontal scroll on narrow viewports.
527
+ - `columns[]`: `{ key, label?, kind?, tones?: {value: badgeTone}, width?: number, pinned?: "left" or "right", align?: "start" or "end", truncate?: "end" or "middle", icon?, tooltip?: "<row field>", hint?: string, popover?: { title?, fields, trigger? }, href?: "<row field>", linkLabel?: "<template>", max?: number, format?: "<template>", onChange?: chain, filter?: "values" or "text" or false, muted?: string[] }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge`, `status`, `user`, `agent`, `relative`, `duration`, `progress`, `copy`, `switch`, `checkbox`, `link`, or `json`; `string` and `enum` render as text, and `json` renders a truncated single-line `JSON.stringify` preview. Pin id/actions columns so they survive horizontal scroll on narrow viewports.
528
528
  - `status`: lifecycle values (`pending`, `in_progress`, `running`, `completed`, `failed`, `cancelled`, `paused`, `reviewing`, ...) render the dashboard status chip with its icon; other values use `tones` like `badge`.
529
- - `user` / `agent`: avatar plus name. `relative` (and `date`): smart time, exact time on hover. `duration`: milliseconds as `1m 23s`. `progress`: a bar against `max` (default 100). `copy`: the value plus a copy button. `link`: an http(s) URL opening in a new tab (other values render as text).
530
- - `switch`: a toggle. `onChange` runs with `$row` = the row with this column already set to the new value, e.g. `[{ "action": "app.mutate", "params": { "model": "m", "op": "update", "rowId": { "$row": "id" }, "values": { "enabled": { "$row": "enabled" } } } }]`. Without `onChange` the switch is read-only.
531
- - Numbers, durations and progress right-align by default. `truncate: "middle"` keeps both ends of ids and paths. `icon` shows in the header; `tooltip` names a row field shown on hover.
529
+ - `user` / `agent`: avatar plus name. `relative` (and `date`): smart time, exact time on hover. `duration`: milliseconds as `1m 23s`. `progress`: a bar against `max` (default 100). `copy`: the value plus a copy button. `link`: a smart link (see Smart links, tooltips and popovers below); any other http(s) URL opens in a new tab and other values render as text.
530
+ - `switch` / `checkbox`: a toggle or a checkbox bound to a boolean column. `onChange` runs with `$row` = the row with this column already set to the new value, e.g. `[{ "action": "app.mutate", "params": { "model": "m", "op": "update", "rowId": { "$row": "id" }, "values": { "enabled": { "$row": "enabled" } } } }]`. Without `onChange` the control is read-only. Each toggle is a model write, so to pick rows for a bulk action use `selectable` (below), not a boolean column.
531
+ - Numbers, durations and progress right-align by default. `truncate: "middle"` keeps both ends of ids and paths. `icon` shows in the header; `tooltip` names a row field shown in a styled tooltip on the cell (when the cell is plain text that gets cut off, the tooltip shows its full text without any config).
532
532
  - `format`: a `{{field}}` template that combines several row fields into one cell, e.g. `"{{name}} ({{status}})"`. Placeholder names match `[\w.]+` (letters, digits, `_` and `.`; no hyphens or spaces). Each placeholder reads that row field as-is (a dotted name such as `{{owner.name}}` is a literal column name, not a nested path); a missing or null field becomes an empty string and an object or array becomes a JSON preview cut to 120 characters. The whole cell is capped at 500 characters. A templated column ignores `kind`, shows the same text in the phone list, and sorts by the composed text. `search` and `filters` still read the column's `key`.
533
+ - `muted: ["none", "no"]`: those cell values (matched case-insensitively) render as a quiet `—` instead of a pill or text, for columns that are mostly `none` / `no`. The value stays in the data, in the filter list, as a hover title and for screen readers; the phone list leaves it out. Not applied to `switch` / `checkbox` cells.
534
+ - `selectable` + `id`: a leading pinned checkbox column. The header checkbox selects every row left after `search` / `filters` (checked, unchecked or indeterminate; clicking it again clears those rows), and shift-click selects a range in the order shown. The selection is client state at `{ "$state": "/ui/<id>/selected" }`, an array of row ids (the `rowId` field, default `id`, as strings). It is never a model write and is not shared with other viewers. `id` is a literal like `SearchInput.id`, and the validator requires it with `selectable` or `bulkActions`. Selected rows that disappear from the data drop out of the selection.
535
+ - `bulkActions[]`: `{ label, variant?, icon?, confirm?, actions }`, the `rowActions` shape without `placement`; a non-empty list implies `selectable`. A bar under the table shows `N selected`, the buttons and Clear while the selection is non-empty. Chains have no `$row`; pass the ids with `{ "$state": "/ui/<id>/selected" }`, e.g. `{ "action": "app.action", "params": { "name": "enqueue", "input": { "prs": { "$state": "/ui/prTable/selected" } } } }`. Confirm rules match `rowActions`; the dialog always adds the selection size (`Applies to 3 selected rows.`). The selection is locked while the chain runs. It clears (only the rows the chain acted on) once every step succeeded, waiting for a task-backed `app.action` to finish; a failed `app.mutate` or a failed task stops the chain and keeps the selection for a retry.
536
+ - `filterable: true` + `id`: built-in column filters. Each filterable column gets a filter button in its header: `badge`, `status`, `enum`, `boolean`, `user` and `agent` columns open a checkbox list of the distinct values with row counts (the counts follow the other active filters, so a second tick shows what it adds); a column with no kind (or `text` / `string`) opens a contains-text field; numbers, dates, links and `format` columns get none. `columns[].filter` overrides per column: `"values"` or `"text"` (works without `filterable`, and is how a `format` column opts in), or `false` to opt out. Active filters show as removable pills above the table with Clear all. The state is client state at `{ "$state": "/ui/<id>/filters" }`, an object with one entry per column (`/ui/<id>/filters/<column>`): a string array for a list, a string for text; other elements can read it. It composes with `search` and `filters`: a row must pass all three. Below 768px the header menus become one Filters button above the card list. `id` is required (the validator checks it).
537
+ - `clearState`: state paths the Table's Clear filters button and the pills' Clear all also reset, e.g. `["/ui/prSearch/value"]` for the `SearchInput` feeding `search`. Only `/ui/<id>/...` paths of controls on the page. Without it, those controls keep their value and the no-match state only offers Clear filters for the built-in filters.
538
+ - Loading and errors: the first load (no rows yet) shows a skeleton shaped like the table, with its header labels. `loading` (`/queries/<name>/loading`) is the first load only. Bind `refreshing` to `{ "$state": "/queries/<name>/fetching" }` (true during any fetch, including the 5s poll and `app.refresh`) and a refetch with rows showing runs a slim bar along the top edge, on phones too, and never dims, covers or blanks a row. A failed query shows the error callout with a Retry button; `onRetry` is the chain it runs (default `[{ "action": "app.refresh" }]`, which re-runs every query on the page). With rows already loaded the callout sits above the stale rows; with none, it is the whole state (no empty message). A search or filter that hides every row shows "No rows match" with a Clear filters button; with header filters the table stays in place (header and open filter input included) and the button sits under it.
539
+ - Smart links, tooltips and popovers (Table, DetailList, CardGrid, Markdown):
540
+ - A `link` cell (Table `kind: "link"`, DetailList and CardGrid `kind: "link"`) shows a chip with an icon and a short label when its value is a GitHub PR, issue, commit or repo URL (`agent-swarm#2605`, `agent-swarm@a1b2c3d`, `owner/repo`), the GitHub shorthand `owner/repo#N` or `owner/repo@sha`, a dashboard task, agent, session, app, page or workflow URL (shown by its name once the dashboard knows it, else `Task 1f6feea0`), or an agent-fs file. GitHub links open in a new tab; dashboard links stay in the app. Any other http(s) URL is a plain external link, and any other value is text. Only `github.com` links are GitHub links.
541
+ - `href: "<row field>"` (Table column, DetailList or CardGrid field) takes the URL from another row field, so a cell can show one field and link with another: `{ "key": "number", "label": "PR", "format": "{{repo}}#{{number}}", "href": "url" }` shows `agent-swarm#2605` as a PR chip. With `href` the cell's own text (or `format`) is the label. `linkLabel: "<template>"` (same `{{field}}` rules as `format`) sets the label instead, e.g. `"Lead review"` on a `kind: "link"` column.
542
+ - `hint: "<text>"` on a column adds a header tooltip. A header cut off by the column width also shows its full label in the tooltip, with no config.
543
+ - `popover: { title?: "<template>", fields: [...], trigger?: "hover" | "click" }` on a Table column opens a popover from the cell that lists up to 12 fields of the row, in the DetailList field shape (`{ key, label?, kind?, tones?, href?, linkLabel? }`, any DetailList kind). It opens on hover or keyboard focus by default and lets the pointer move into it; `trigger: "click"` toggles it from the cell; on a cell with its own controls (link, copy, switch) it opens from a separate Details button beside the content. In the phone list, link columns render as chips under the row and each popover column gets a Details button that opens on tap. Use it for detail that does not fit a column, such as a merge reason or CI status. `key` and `href` must name model columns.
533
544
  - `onRowClick`: action chain with `$row` / `$rowIndex`, run when a row is clicked (or Enter on a focused cell). Pair it with `app.navigate` that sets a Drawer param, and bind `selectedId` to `{ "$state": "/route/params/<param>" }` so the open row stays highlighted. `rowId` names the id field (default `id`).
534
- - Phones (below 768px): the table renders as a card list. `mobileFields: { title, subtitle?, meta?: string or string[], status? }` picks the columns; by default the first text column is the title and the first `status`/`badge` column the chip. `mobile: "scroll"` keeps the grid; it is the default when the table has `rowActions` but no `onRowClick`.
545
+ - Phones (below 768px): the table renders as a card list. `mobileFields: { title, subtitle?, meta?: string or string[], status? }` picks the columns; by default the first text column is the title and the first `status`/`badge` column the chip. `mobile: "scroll"` keeps the grid; it is the default when the table has `rowActions` but no `onRowClick`. With `selectable`, each phone card gets a checkbox beside it and a Select all row sits above the list. An editable `checkbox` / `switch` column (one with `onChange`) becomes a real control beside the card, not a line of text.
535
546
  - `emptyState: { icon?, title, body? }` replaces the plain empty message. A search or filter that hides every row shows its own "No rows match" state.
536
547
  - `pagination`: boolean; defaults to auto-enabling past 200 rows (set `false` to force one scroll region). `density: "compact"` tightens row height for dense readouts.
537
548
  - `rowActions[]`: `{ label, variant?, icon?, placement?: "inline" or "menu", confirm?, actions }`. `placement: "menu"` moves the action into the row's More menu. Variants add `destructive-outline` to the Button variants. `destructive` and `destructive-outline` confirm by default; customize with `{ "title": ..., "description": ..., "confirmLabel": ... }`, or use a bare `confirm` string as the dialog description (use `confirm: false` only for a reversible action).
@@ -573,7 +584,7 @@ Drawer details:
573
584
 
574
585
  DetailList details:
575
586
 
576
- - `fields[]`: `{ key, label?, kind?, tones? }`. Kinds reuse Table formatting (`text`, `string`, `number`, `boolean`, `date`, `badge`, `enum`) and the Table cell renderers (`status`: lifecycle chip or `tones` pill; `user`: avatar plus name; `relative`: smart time, exact on hover; `copy`: value plus copy button), and add `code` for a monospace block and `json` for a collapsible JSON tree (objects, or a string holding JSON). Bind `data` to one record, commonly `/queries/<detailQuery>/data/0`.
587
+ - `fields[]`: `{ key, label?, kind?, tones? }`. Kinds reuse Table formatting (`text`, `string`, `number`, `boolean`, `date`, `badge`, `enum`) and the Table cell renderers (`status`: lifecycle chip or `tones` pill; `user`: avatar plus name; `relative`: smart time, exact on hover; `copy`: value plus copy button; `link`: a smart link from the value, or from the row field named by `href`, with `linkLabel` as an optional label template), and add `code` for a monospace block and `json` for a collapsible JSON tree (objects, or a string holding JSON). Bind `data` to one record, commonly `/queries/<detailQuery>/data/0`.
577
588
 
578
589
  Motion details:
579
590
 
@@ -583,7 +594,7 @@ CardGrid details — the visual counterpart to Table for record browsers (projec
583
594
 
584
595
  - `titleKey` (required) picks the row field shown as the card title (an object value shows a JSON preview; titles are capped at 500 characters).
585
596
  - `imageKey` (optional) picks a row field holding an absolute http(s) image URL and adds an image tile to every card. When it is set, a non-URL value, a missing value, or a failed load shows a placeholder tile. Omit it for text-only cards with no tile.
586
- - `fields[]`: `{ key, kind?, tones? }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge` (with `tones`), or `json` (no `label`, no `format`). A field with no `kind` whose value is an object renders like `json`. They render as an unlabeled `·`-joined meta line under the title, e.g. a `date` field for "created" and a `text` field for the author.
597
+ - `fields[]`: `{ key, kind?, tones?, href?, linkLabel? }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge` (with `tones`), `link` (a smart link, with `href` / `linkLabel`), or `json` (no `label`, no `format`). A field with no `kind` whose value is an object renders like `json`. They render as an unlabeled `·`-joined meta line under the title, e.g. a `date` field for "created" and a `text` field for the author.
587
598
  - `columns`: same responsive shorthand as `Grid.columns` (default `{ "base": 1, "sm": 2, "md": 3 }`).
588
599
  - `onClick`: an action chain with `$row` / `$rowIndex`, run when a card is clicked or activated with Enter or Space. Commonly `app.navigate` into a detail page, the CardGrid equivalent of Table's `onRowClick`.
589
600
  - Bind `data` / `loading` / `error` to a named query like Table. Loading shows skeleton cards, an error shows a callout, and no rows shows `emptyMessage`.
@@ -601,7 +612,7 @@ Use `Stack` as the primary page and section layout; `Container` is the legacy tw
601
612
 
602
613
  `Split` and `Tabs` children are positional. For Split, `children[0]` is the first pane, `children[1]` is the second, and extra children append inside the second pane. Below `collapseBelow`, panes stack; `reverse` changes only that narrow-layout stacking order. For Tabs, `children[i]` is the body for `tabs[i]`; keep both arrays in the same order and with the same count. Inactive tab children stay mounted but hidden, so Tables keep polling. Use `Divider` to separate sections and `Markdown` for richer explanatory content.
603
614
 
604
- SearchInput, Select, NumberInput, Chips, and Tree are client-side controls: each needs a literal `id` and writes state under `/ui/<id>/value` (Tree writes the clicked node key); Tabs writes its active key to `/ui/<id>/tab`. Bind those values into a Table's `search` and `filters` props. This filters already-polled rows locally; it does not alter or re-run the named query.
615
+ SearchInput, Select, NumberInput, Chips, and Tree are client-side controls: each needs a literal `id` and writes state under `/ui/<id>/value` (Tree writes the clicked node key; a `selectable` Table writes its selected row ids to `/ui/<id>/selected`); Tabs writes its active key to `/ui/<id>/tab`. Bind those values into a Table's `search` and `filters` props. This filters already-polled rows locally; it does not alter or re-run the named query.
605
616
 
606
617
  ```json
607
618
  {
@@ -657,7 +668,7 @@ Valid `$state` roots are:
657
668
 
658
669
  `/route` is mirrored as `{ page, params }`. Only declared params appear. Values are coerced by their declared kind: `number` becomes a number when possible; boolean strings `true`/`1` become true; failed number coercion remains the raw string.
659
670
 
660
- Only inside action-chain `params` (`on.<event>`, `Table.rowActions[].actions`, or `Form.onSubmit`) these scoped sentinels are valid, recursively inside objects and arrays:
671
+ Only inside action-chain `params` (`on.<event>`, `Table.rowActions[].actions`, `Table.bulkActions[].actions`, or `Form.onSubmit`) these scoped sentinels are valid, recursively inside objects and arrays:
661
672
 
662
673
  | Sentinel | Resolves to |
663
674
  |---|---|
@@ -489,7 +489,7 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
489
489
  | `Card` | none | `title`, `description`; has the `default` child slot. |
490
490
  | `Heading` | `text` | `level: "h1", "h2", or "h3"`. |
491
491
  | `Text` | `content` | `tone: "default" or "muted"`. |
492
- | `Markdown` | `content` | Rendered Markdown for help, instructions, and rich prose; no children. |
492
+ | `Markdown` | `content` | Rendered Markdown for help, instructions, and rich prose; no children. A link to a GitHub PR, issue, commit or repo, a dashboard task, agent, session or app, or an agent-fs file renders as a chip (icon plus short label), like agent output in a session; `[text](url)` keeps its text. |
493
493
  | `SearchInput` | `id` | `placeholder`, `label`, `shortcut` (one key, usually `"/"`: shows a keycap and focuses the field); writes debounced text to `/ui/<id>/value`; no children. |
494
494
  | `Select` | `id`, `options` | `options` are strings or `{ value, label?, icon?, hint? }`; `placeholder`, `label`, `clearable`, `searchable` (type to filter; on by default past 8 options), `searchPlaceholder`, `multiple`, `defaultValue` (seeds `/ui/<id>/value` once, before any interaction; a one-entry array with `multiple`); writes a string or null to `/ui/<id>/value`, or with `multiple` a string array (empty = nothing picked); no children. |
495
495
  | `NumberInput` | `id` | `label`, `placeholder`, `min`, `max`; a text field with a decimal keyboard that writes the parsed number to `/ui/<id>/value` on every change (no debounce), or null when the field is empty; non-numeric text (a bare `-` mid-edit, letters) leaves the stored value untouched; `min`/`max` clamp the stored value and the visible text snaps to it when the field loses focus; no children. |
@@ -507,7 +507,7 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
507
507
  | `Spinner` | none | `variant: "ring", "ellipsis", or "bars"` (default: the dashboard spinner), `size: "sm" or "md"`, `label` (visible text and accessible name). |
508
508
  | `AvatarStack` | `users` | `users` are display names (initials avatars); `max` (default 4) before a `+N` count. Hover lists every name. |
509
509
  | `Section` | `title` | `description`, `collapsible`, `defaultOpen` (default true); has the `default` child slot. |
510
- | `Table` | `columns` | `data`, `loading`, `error`, `emptyMessage`, `emptyState`, `rowActions`, `onRowClick`, `selectedId`, `rowId`, `mobile`, `mobileFields`, `search`, `filters`; see below. |
510
+ | `Table` | `columns` | `data`, `loading`, `refreshing`, `error`, `emptyMessage`, `emptyState`, `rowActions`, `id`, `selectable`, `bulkActions`, `filterable`, `clearState`, `onRetry`, `onRowClick`, `selectedId`, `rowId`, `mobile`, `mobileFields`, `search`, `filters`; see below. |
511
511
  | `Form` | `id`, `fields`, `onSubmit` | `title`, `submitLabel`; see below. |
512
512
  | `Drawer` | `param` | `title`, `description`, `side: "right" or "left"`, `size: "sm", "md" (default), "lg", or "xl"` (about 480/660/900/1010px at 1440px; grows with the viewport up to 640/960/1280/1600px; full width on phones), `actions` (sticky footer buttons; see below); has the `default` child slot. |
513
513
  | `DetailList` | `fields` | `data`, `emptyMessage`, `columns: 1 or 2`, `loading` (bind `/queries/<name>/loading` for skeleton fields while loading); renders one record without edit controls; see below for field kinds. |
@@ -519,14 +519,25 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
519
519
 
520
520
  Table details:
521
521
 
522
- - `columns[]`: `{ key, label?, kind?, tones?: {value: badgeTone}, width?: number, pinned?: "left" or "right", align?: "start" or "end", truncate?: "end" or "middle", icon?, tooltip?: "<row field>", max?: number, format?: "<template>", onChange?: chain }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge`, `status`, `user`, `agent`, `relative`, `duration`, `progress`, `copy`, `switch`, `link`, or `json`; `string` and `enum` render as text, and `json` renders a truncated single-line `JSON.stringify` preview. Pin id/actions columns so they survive horizontal scroll on narrow viewports.
522
+ - `columns[]`: `{ key, label?, kind?, tones?: {value: badgeTone}, width?: number, pinned?: "left" or "right", align?: "start" or "end", truncate?: "end" or "middle", icon?, tooltip?: "<row field>", hint?: string, popover?: { title?, fields, trigger? }, href?: "<row field>", linkLabel?: "<template>", max?: number, format?: "<template>", onChange?: chain, filter?: "values" or "text" or false, muted?: string[] }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge`, `status`, `user`, `agent`, `relative`, `duration`, `progress`, `copy`, `switch`, `checkbox`, `link`, or `json`; `string` and `enum` render as text, and `json` renders a truncated single-line `JSON.stringify` preview. Pin id/actions columns so they survive horizontal scroll on narrow viewports.
523
523
  - `status`: lifecycle values (`pending`, `in_progress`, `running`, `completed`, `failed`, `cancelled`, `paused`, `reviewing`, ...) render the dashboard status chip with its icon; other values use `tones` like `badge`.
524
- - `user` / `agent`: avatar plus name. `relative` (and `date`): smart time, exact time on hover. `duration`: milliseconds as `1m 23s`. `progress`: a bar against `max` (default 100). `copy`: the value plus a copy button. `link`: an http(s) URL opening in a new tab (other values render as text).
525
- - `switch`: a toggle. `onChange` runs with `$row` = the row with this column already set to the new value, e.g. `[{ "action": "app.mutate", "params": { "model": "m", "op": "update", "rowId": { "$row": "id" }, "values": { "enabled": { "$row": "enabled" } } } }]`. Without `onChange` the switch is read-only.
526
- - Numbers, durations and progress right-align by default. `truncate: "middle"` keeps both ends of ids and paths. `icon` shows in the header; `tooltip` names a row field shown on hover.
524
+ - `user` / `agent`: avatar plus name. `relative` (and `date`): smart time, exact time on hover. `duration`: milliseconds as `1m 23s`. `progress`: a bar against `max` (default 100). `copy`: the value plus a copy button. `link`: a smart link (see Smart links, tooltips and popovers below); any other http(s) URL opens in a new tab and other values render as text.
525
+ - `switch` / `checkbox`: a toggle or a checkbox bound to a boolean column. `onChange` runs with `$row` = the row with this column already set to the new value, e.g. `[{ "action": "app.mutate", "params": { "model": "m", "op": "update", "rowId": { "$row": "id" }, "values": { "enabled": { "$row": "enabled" } } } }]`. Without `onChange` the control is read-only. Each toggle is a model write, so to pick rows for a bulk action use `selectable` (below), not a boolean column.
526
+ - Numbers, durations and progress right-align by default. `truncate: "middle"` keeps both ends of ids and paths. `icon` shows in the header; `tooltip` names a row field shown in a styled tooltip on the cell (when the cell is plain text that gets cut off, the tooltip shows its full text without any config).
527
527
  - `format`: a `{{field}}` template that combines several row fields into one cell, e.g. `"{{name}} ({{status}})"`. Placeholder names match `[\w.]+` (letters, digits, `_` and `.`; no hyphens or spaces). Each placeholder reads that row field as-is (a dotted name such as `{{owner.name}}` is a literal column name, not a nested path); a missing or null field becomes an empty string and an object or array becomes a JSON preview cut to 120 characters. The whole cell is capped at 500 characters. A templated column ignores `kind`, shows the same text in the phone list, and sorts by the composed text. `search` and `filters` still read the column's `key`.
528
+ - `muted: ["none", "no"]`: those cell values (matched case-insensitively) render as a quiet `—` instead of a pill or text, for columns that are mostly `none` / `no`. The value stays in the data, in the filter list, as a hover title and for screen readers; the phone list leaves it out. Not applied to `switch` / `checkbox` cells.
529
+ - `selectable` + `id`: a leading pinned checkbox column. The header checkbox selects every row left after `search` / `filters` (checked, unchecked or indeterminate; clicking it again clears those rows), and shift-click selects a range in the order shown. The selection is client state at `{ "$state": "/ui/<id>/selected" }`, an array of row ids (the `rowId` field, default `id`, as strings). It is never a model write and is not shared with other viewers. `id` is a literal like `SearchInput.id`, and the validator requires it with `selectable` or `bulkActions`. Selected rows that disappear from the data drop out of the selection.
530
+ - `bulkActions[]`: `{ label, variant?, icon?, confirm?, actions }`, the `rowActions` shape without `placement`; a non-empty list implies `selectable`. A bar under the table shows `N selected`, the buttons and Clear while the selection is non-empty. Chains have no `$row`; pass the ids with `{ "$state": "/ui/<id>/selected" }`, e.g. `{ "action": "app.action", "params": { "name": "enqueue", "input": { "prs": { "$state": "/ui/prTable/selected" } } } }`. Confirm rules match `rowActions`; the dialog always adds the selection size (`Applies to 3 selected rows.`). The selection is locked while the chain runs. It clears (only the rows the chain acted on) once every step succeeded, waiting for a task-backed `app.action` to finish; a failed `app.mutate` or a failed task stops the chain and keeps the selection for a retry.
531
+ - `filterable: true` + `id`: built-in column filters. Each filterable column gets a filter button in its header: `badge`, `status`, `enum`, `boolean`, `user` and `agent` columns open a checkbox list of the distinct values with row counts (the counts follow the other active filters, so a second tick shows what it adds); a column with no kind (or `text` / `string`) opens a contains-text field; numbers, dates, links and `format` columns get none. `columns[].filter` overrides per column: `"values"` or `"text"` (works without `filterable`, and is how a `format` column opts in), or `false` to opt out. Active filters show as removable pills above the table with Clear all. The state is client state at `{ "$state": "/ui/<id>/filters" }`, an object with one entry per column (`/ui/<id>/filters/<column>`): a string array for a list, a string for text; other elements can read it. It composes with `search` and `filters`: a row must pass all three. Below 768px the header menus become one Filters button above the card list. `id` is required (the validator checks it).
532
+ - `clearState`: state paths the Table's Clear filters button and the pills' Clear all also reset, e.g. `["/ui/prSearch/value"]` for the `SearchInput` feeding `search`. Only `/ui/<id>/...` paths of controls on the page. Without it, those controls keep their value and the no-match state only offers Clear filters for the built-in filters.
533
+ - Loading and errors: the first load (no rows yet) shows a skeleton shaped like the table, with its header labels. `loading` (`/queries/<name>/loading`) is the first load only. Bind `refreshing` to `{ "$state": "/queries/<name>/fetching" }` (true during any fetch, including the 5s poll and `app.refresh`) and a refetch with rows showing runs a slim bar along the top edge, on phones too, and never dims, covers or blanks a row. A failed query shows the error callout with a Retry button; `onRetry` is the chain it runs (default `[{ "action": "app.refresh" }]`, which re-runs every query on the page). With rows already loaded the callout sits above the stale rows; with none, it is the whole state (no empty message). A search or filter that hides every row shows "No rows match" with a Clear filters button; with header filters the table stays in place (header and open filter input included) and the button sits under it.
534
+ - Smart links, tooltips and popovers (Table, DetailList, CardGrid, Markdown):
535
+ - A `link` cell (Table `kind: "link"`, DetailList and CardGrid `kind: "link"`) shows a chip with an icon and a short label when its value is a GitHub PR, issue, commit or repo URL (`agent-swarm#2605`, `agent-swarm@a1b2c3d`, `owner/repo`), the GitHub shorthand `owner/repo#N` or `owner/repo@sha`, a dashboard task, agent, session, app, page or workflow URL (shown by its name once the dashboard knows it, else `Task 1f6feea0`), or an agent-fs file. GitHub links open in a new tab; dashboard links stay in the app. Any other http(s) URL is a plain external link, and any other value is text. Only `github.com` links are GitHub links.
536
+ - `href: "<row field>"` (Table column, DetailList or CardGrid field) takes the URL from another row field, so a cell can show one field and link with another: `{ "key": "number", "label": "PR", "format": "{{repo}}#{{number}}", "href": "url" }` shows `agent-swarm#2605` as a PR chip. With `href` the cell's own text (or `format`) is the label. `linkLabel: "<template>"` (same `{{field}}` rules as `format`) sets the label instead, e.g. `"Lead review"` on a `kind: "link"` column.
537
+ - `hint: "<text>"` on a column adds a header tooltip. A header cut off by the column width also shows its full label in the tooltip, with no config.
538
+ - `popover: { title?: "<template>", fields: [...], trigger?: "hover" | "click" }` on a Table column opens a popover from the cell that lists up to 12 fields of the row, in the DetailList field shape (`{ key, label?, kind?, tones?, href?, linkLabel? }`, any DetailList kind). It opens on hover or keyboard focus by default and lets the pointer move into it; `trigger: "click"` toggles it from the cell; on a cell with its own controls (link, copy, switch) it opens from a separate Details button beside the content. In the phone list, link columns render as chips under the row and each popover column gets a Details button that opens on tap. Use it for detail that does not fit a column, such as a merge reason or CI status. `key` and `href` must name model columns.
528
539
  - `onRowClick`: action chain with `$row` / `$rowIndex`, run when a row is clicked (or Enter on a focused cell). Pair it with `app.navigate` that sets a Drawer param, and bind `selectedId` to `{ "$state": "/route/params/<param>" }` so the open row stays highlighted. `rowId` names the id field (default `id`).
529
- - Phones (below 768px): the table renders as a card list. `mobileFields: { title, subtitle?, meta?: string or string[], status? }` picks the columns; by default the first text column is the title and the first `status`/`badge` column the chip. `mobile: "scroll"` keeps the grid; it is the default when the table has `rowActions` but no `onRowClick`.
540
+ - Phones (below 768px): the table renders as a card list. `mobileFields: { title, subtitle?, meta?: string or string[], status? }` picks the columns; by default the first text column is the title and the first `status`/`badge` column the chip. `mobile: "scroll"` keeps the grid; it is the default when the table has `rowActions` but no `onRowClick`. With `selectable`, each phone card gets a checkbox beside it and a Select all row sits above the list. An editable `checkbox` / `switch` column (one with `onChange`) becomes a real control beside the card, not a line of text.
530
541
  - `emptyState: { icon?, title, body? }` replaces the plain empty message. A search or filter that hides every row shows its own "No rows match" state.
531
542
  - `pagination`: boolean; defaults to auto-enabling past 200 rows (set `false` to force one scroll region). `density: "compact"` tightens row height for dense readouts.
532
543
  - `rowActions[]`: `{ label, variant?, icon?, placement?: "inline" or "menu", confirm?, actions }`. `placement: "menu"` moves the action into the row's More menu. Variants add `destructive-outline` to the Button variants. `destructive` and `destructive-outline` confirm by default; customize with `{ "title": ..., "description": ..., "confirmLabel": ... }`, or use a bare `confirm` string as the dialog description (use `confirm: false` only for a reversible action).
@@ -568,7 +579,7 @@ Drawer details:
568
579
 
569
580
  DetailList details:
570
581
 
571
- - `fields[]`: `{ key, label?, kind?, tones? }`. Kinds reuse Table formatting (`text`, `string`, `number`, `boolean`, `date`, `badge`, `enum`) and the Table cell renderers (`status`: lifecycle chip or `tones` pill; `user`: avatar plus name; `relative`: smart time, exact on hover; `copy`: value plus copy button), and add `code` for a monospace block and `json` for a collapsible JSON tree (objects, or a string holding JSON). Bind `data` to one record, commonly `/queries/<detailQuery>/data/0`.
582
+ - `fields[]`: `{ key, label?, kind?, tones? }`. Kinds reuse Table formatting (`text`, `string`, `number`, `boolean`, `date`, `badge`, `enum`) and the Table cell renderers (`status`: lifecycle chip or `tones` pill; `user`: avatar plus name; `relative`: smart time, exact on hover; `copy`: value plus copy button; `link`: a smart link from the value, or from the row field named by `href`, with `linkLabel` as an optional label template), and add `code` for a monospace block and `json` for a collapsible JSON tree (objects, or a string holding JSON). Bind `data` to one record, commonly `/queries/<detailQuery>/data/0`.
572
583
 
573
584
  Motion details:
574
585
 
@@ -578,7 +589,7 @@ CardGrid details — the visual counterpart to Table for record browsers (projec
578
589
 
579
590
  - `titleKey` (required) picks the row field shown as the card title (an object value shows a JSON preview; titles are capped at 500 characters).
580
591
  - `imageKey` (optional) picks a row field holding an absolute http(s) image URL and adds an image tile to every card. When it is set, a non-URL value, a missing value, or a failed load shows a placeholder tile. Omit it for text-only cards with no tile.
581
- - `fields[]`: `{ key, kind?, tones? }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge` (with `tones`), or `json` (no `label`, no `format`). A field with no `kind` whose value is an object renders like `json`. They render as an unlabeled `·`-joined meta line under the title, e.g. a `date` field for "created" and a `text` field for the author.
592
+ - `fields[]`: `{ key, kind?, tones?, href?, linkLabel? }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge` (with `tones`), `link` (a smart link, with `href` / `linkLabel`), or `json` (no `label`, no `format`). A field with no `kind` whose value is an object renders like `json`. They render as an unlabeled `·`-joined meta line under the title, e.g. a `date` field for "created" and a `text` field for the author.
582
593
  - `columns`: same responsive shorthand as `Grid.columns` (default `{ "base": 1, "sm": 2, "md": 3 }`).
583
594
  - `onClick`: an action chain with `$row` / `$rowIndex`, run when a card is clicked or activated with Enter or Space. Commonly `app.navigate` into a detail page, the CardGrid equivalent of Table's `onRowClick`.
584
595
  - Bind `data` / `loading` / `error` to a named query like Table. Loading shows skeleton cards, an error shows a callout, and no rows shows `emptyMessage`.
@@ -596,7 +607,7 @@ Use `Stack` as the primary page and section layout; `Container` is the legacy tw
596
607
 
597
608
  `Split` and `Tabs` children are positional. For Split, `children[0]` is the first pane, `children[1]` is the second, and extra children append inside the second pane. Below `collapseBelow`, panes stack; `reverse` changes only that narrow-layout stacking order. For Tabs, `children[i]` is the body for `tabs[i]`; keep both arrays in the same order and with the same count. Inactive tab children stay mounted but hidden, so Tables keep polling. Use `Divider` to separate sections and `Markdown` for richer explanatory content.
598
609
 
599
- SearchInput, Select, NumberInput, Chips, and Tree are client-side controls: each needs a literal `id` and writes state under `/ui/<id>/value` (Tree writes the clicked node key); Tabs writes its active key to `/ui/<id>/tab`. Bind those values into a Table's `search` and `filters` props. This filters already-polled rows locally; it does not alter or re-run the named query.
610
+ SearchInput, Select, NumberInput, Chips, and Tree are client-side controls: each needs a literal `id` and writes state under `/ui/<id>/value` (Tree writes the clicked node key; a `selectable` Table writes its selected row ids to `/ui/<id>/selected`); Tabs writes its active key to `/ui/<id>/tab`. Bind those values into a Table's `search` and `filters` props. This filters already-polled rows locally; it does not alter or re-run the named query.
600
611
 
601
612
  ```json
602
613
  {
@@ -652,7 +663,7 @@ Valid `$state` roots are:
652
663
 
653
664
  `/route` is mirrored as `{ page, params }`. Only declared params appear. Values are coerced by their declared kind: `number` becomes a number when possible; boolean strings `true`/`1` become true; failed number coercion remains the raw string.
654
665
 
655
- Only inside action-chain `params` (`on.<event>`, `Table.rowActions[].actions`, or `Form.onSubmit`) these scoped sentinels are valid, recursively inside objects and arrays:
666
+ Only inside action-chain `params` (`on.<event>`, `Table.rowActions[].actions`, `Table.bulkActions[].actions`, or `Form.onSubmit`) these scoped sentinels are valid, recursively inside objects and arrays:
656
667
 
657
668
  | Sentinel | Resolves to |
658
669
  |---|---|
@@ -71,7 +71,7 @@ export default async function (args: z.infer<typeof argsSchema>, ctx: ScriptCont
71
71
  - Inline source through `script-run` runs without a typecheck. `script-upsert` typechecks before it saves. Import `ScriptContext` from `"swarm-sdk"` in inline code too, so promotion to a named script works.
72
72
  - SDK methods return `Promise<unknown>`. Responses are usually wrapped: read `res?.data ?? res`. Exception: `app_query` with a literal `appId` and `query` returns rows typed from the app's columns.
73
73
  - `agentId` is propagated through the `X-Agent-ID` header, so SDK calls run as you. `taskId` is not ambient: pass it in `args` when the script calls `task_storeProgress`.
74
- - A script invoked from a workflow node may run under a workflow identity.
74
+ - A script invoked from a workflow node may run under a workflow identity. The node may also supply arguments the script needs: when you run that script directly, pass the same arguments the node maps. A script without a strict `argsSchema` then fails deeper in, often as a not-found or resource error instead of a validation error.
75
75
  - Return compact structured data. Raw logs, full HTML, big JSON arrays, and file contents stay inside the script.
76
76
  - Limits: about 30 s wall clock (up to 5 minutes where the tool exposes it), 1 MB stdout. Never sleep or loop past about 25 s. Chain `wait-for-task` calls instead. The cap also applies to a script called through `ctx.step.swarmScript`; the step's `timeoutMs` does not extend it. A long LLM call, such as a 2,000-word draft, goes in a `ctx.step.rawLlm` step inside `launch-script-run`, never in a called script. A `targetType: "script"` schedule gets 60 s; a manual `script-run` gets 30 s, so a candidate that finishes well under 30 s by hand has margin on the schedule. A nested `ctx.swarm.script_run` gets its own 30 s but runs inside its caller's remaining time: run slow children as sibling calls from the outer script, not deeper in the chain.
77
77
 
@@ -66,7 +66,7 @@ export default async function (args: z.infer<typeof argsSchema>, ctx: ScriptCont
66
66
  - Inline source through `script-run` runs without a typecheck. `script-upsert` typechecks before it saves. Import `ScriptContext` from `"swarm-sdk"` in inline code too, so promotion to a named script works.
67
67
  - SDK methods return `Promise<unknown>`. Responses are usually wrapped: read `res?.data ?? res`. Exception: `app_query` with a literal `appId` and `query` returns rows typed from the app's columns.
68
68
  - `agentId` is propagated through the `X-Agent-ID` header, so SDK calls run as you. `taskId` is not ambient: pass it in `args` when the script calls `task_storeProgress`.
69
- - A script invoked from a workflow node may run under a workflow identity.
69
+ - A script invoked from a workflow node may run under a workflow identity. The node may also supply arguments the script needs: when you run that script directly, pass the same arguments the node maps. A script without a strict `argsSchema` then fails deeper in, often as a not-found or resource error instead of a validation error.
70
70
  - Return compact structured data. Raw logs, full HTML, big JSON arrays, and file contents stay inside the script.
71
71
  - Limits: about 30 s wall clock (up to 5 minutes where the tool exposes it), 1 MB stdout. Never sleep or loop past about 25 s. Chain `wait-for-task` calls instead. The cap also applies to a script called through `ctx.step.swarmScript`; the step's `timeoutMs` does not extend it. A long LLM call, such as a 2,000-word draft, goes in a `ctx.step.rawLlm` step inside `launch-script-run`, never in a called script. A `targetType: "script"` schedule gets 60 s; a manual `script-run` gets 30 s, so a candidate that finishes well under 30 s by hand has margin on the schedule. A nested `ctx.swarm.script_run` gets its own 30 s but runs inside its caller's remaining time: run slow children as sibling calls from the outer script, not deeper in the chain.
72
72
 
@@ -13,7 +13,7 @@ When the task names a skill (`researching`, `planning`, `implementing`), use it.
13
13
 
14
14
  Finish the task with one of the four endings in your operating contract: `completed`, `defer-task`, `request-human-input`, or `failed`. Then stop.
15
15
 
16
- Resuming (a resume task, or work cut by a graceful shutdown): read the parent's last progress line, then re-read live state once (PR state and head SHA, branch, `git status`) before new work. Re-run controls only if the head moved. Never redo a pushed commit or open a second PR for the same branch. Store a progress line with branch, PR number and head SHA each time you push. A document task has no branch: its live state is the brief's agent-fs output path and the task attachments. Run `agent-fs ls` on that path, download any partial and extend it. Then list the task's local work directory: a shutdown can leave the newest draft only there, or leave cache files half-written. Parse every cache file, delete the ones that fail, and re-run only the stages whose output is missing. Never re-run collection steps that already produced artifacts. A render task (video, image, generated page) has no branch either: its live state is the local project directory plus the brief's agent-fs output. List both; timestamps are hints only. Before reusing an output, verify that it exists, is complete and valid, and corresponds to the current sources and render settings (for example, using recorded input/settings hashes). Download remote output and verify its bytes and provenance; agent-fs listing dates alone do not establish freshness. Re-render missing, invalid, incomplete or stale output. Hand over the live app link `${AGENT_FS_LIVE_URL}/file/~/<org>/<drive>/<path>` by default. Use a share link only when the requester asked for one or the reader has no agent-fs login: then reuse a usable one, and create a missing one or replace an expired, revoked or view-exhausted one without re-rendering a valid unchanged output. A task that covers several PRs re-reads every PR in scope (state, mergedAt, head SHA), not only the first: a PR that merged during the shutdown takes no more pushes. If your task's `model` differs from the parent's, say so in the output, because the result's provenance changed.
16
+ Resuming (a resume task, or work cut by a graceful shutdown): read the parent's last progress line, then re-read live state once (PR state and head SHA, branch, `git status`) before new work. Re-run controls only if the head moved. Never redo a pushed commit or open a second PR for the same branch. Store a progress line with branch, PR number and head SHA each time you push. A document task has no branch: its live state is the brief's agent-fs output path and the task attachments. Read the parent task's output and any agent-fs draft path it names before rewriting. Run `agent-fs ls` on that path, download any partial and extend it; a superseded parent with empty output and no draft means a rebuild, not an extension. Then list the task's local work directory: a shutdown can leave the newest draft only there, or leave cache files half-written. Parse every cache file, delete the ones that fail, and re-run only the stages whose output is missing. Never re-run collection steps that already produced artifacts. A render task (video, image, generated page) has no branch either: its live state is the local project directory plus the brief's agent-fs output. List both; timestamps are hints only. Before reusing an output, verify that it exists, is complete and valid, and corresponds to the current sources and render settings (for example, using recorded input/settings hashes). Download remote output and verify its bytes and provenance; agent-fs listing dates alone do not establish freshness. Re-render missing, invalid, incomplete or stale output. Hand over the live app link `${AGENT_FS_LIVE_URL}/file/~/<org>/<drive>/<path>` by default. Use a share link only when the requester asked for one or the reader has no agent-fs login: then reuse a usable one, and create a missing one or replace an expired, revoked or view-exhausted one without re-rendering a valid unchanged output. A task that covers several PRs re-reads every PR in scope (state, mergedAt, head SHA), not only the first: a PR that merged during the shutdown takes no more pushes. If your task's `model` differs from the parent's, say so in the output, because the result's provenance changed.
17
17
 
18
18
  Write times in replies, outputs and defer notes in the requester's timezone when the Requester Profile names one, never raw UTC.
19
19
 
@@ -8,7 +8,7 @@ When the task names a skill (`researching`, `planning`, `implementing`), use it.
8
8
 
9
9
  Finish the task with one of the four endings in your operating contract: `completed`, `defer-task`, `request-human-input`, or `failed`. Then stop.
10
10
 
11
- Resuming (a resume task, or work cut by a graceful shutdown): read the parent's last progress line, then re-read live state once (PR state and head SHA, branch, `git status`) before new work. Re-run controls only if the head moved. Never redo a pushed commit or open a second PR for the same branch. Store a progress line with branch, PR number and head SHA each time you push. A document task has no branch: its live state is the brief's agent-fs output path and the task attachments. Run `agent-fs ls` on that path, download any partial and extend it. Then list the task's local work directory: a shutdown can leave the newest draft only there, or leave cache files half-written. Parse every cache file, delete the ones that fail, and re-run only the stages whose output is missing. Never re-run collection steps that already produced artifacts. A render task (video, image, generated page) has no branch either: its live state is the local project directory plus the brief's agent-fs output. List both; timestamps are hints only. Before reusing an output, verify that it exists, is complete and valid, and corresponds to the current sources and render settings (for example, using recorded input/settings hashes). Download remote output and verify its bytes and provenance; agent-fs listing dates alone do not establish freshness. Re-render missing, invalid, incomplete or stale output. Hand over the live app link `${AGENT_FS_LIVE_URL}/file/~/<org>/<drive>/<path>` by default. Use a share link only when the requester asked for one or the reader has no agent-fs login: then reuse a usable one, and create a missing one or replace an expired, revoked or view-exhausted one without re-rendering a valid unchanged output. A task that covers several PRs re-reads every PR in scope (state, mergedAt, head SHA), not only the first: a PR that merged during the shutdown takes no more pushes. If your task's `model` differs from the parent's, say so in the output, because the result's provenance changed.
11
+ Resuming (a resume task, or work cut by a graceful shutdown): read the parent's last progress line, then re-read live state once (PR state and head SHA, branch, `git status`) before new work. Re-run controls only if the head moved. Never redo a pushed commit or open a second PR for the same branch. Store a progress line with branch, PR number and head SHA each time you push. A document task has no branch: its live state is the brief's agent-fs output path and the task attachments. Read the parent task's output and any agent-fs draft path it names before rewriting. Run `agent-fs ls` on that path, download any partial and extend it; a superseded parent with empty output and no draft means a rebuild, not an extension. Then list the task's local work directory: a shutdown can leave the newest draft only there, or leave cache files half-written. Parse every cache file, delete the ones that fail, and re-run only the stages whose output is missing. Never re-run collection steps that already produced artifacts. A render task (video, image, generated page) has no branch either: its live state is the local project directory plus the brief's agent-fs output. List both; timestamps are hints only. Before reusing an output, verify that it exists, is complete and valid, and corresponds to the current sources and render settings (for example, using recorded input/settings hashes). Download remote output and verify its bytes and provenance; agent-fs listing dates alone do not establish freshness. Re-render missing, invalid, incomplete or stale output. Hand over the live app link `${AGENT_FS_LIVE_URL}/file/~/<org>/<drive>/<path>` by default. Use a share link only when the requester asked for one or the reader has no agent-fs login: then reuse a usable one, and create a missing one or replace an expired, revoked or view-exhausted one without re-rendering a valid unchanged output. A task that covers several PRs re-reads every PR in scope (state, mergedAt, head SHA), not only the first: a PR that merged during the shutdown takes no more pushes. If your task's `model` differs from the parent's, say so in the output, because the result's provenance changed.
12
12
 
13
13
  Write times in replies, outputs and defer notes in the requester's timezone when the Requester Profile names one, never raw UTC.
14
14
 
@@ -1,16 +0,0 @@
1
- import {
2
- ACPAdapter2
3
- } from "./cli-fyt2g4wd.js";
4
- import"./cli-72v799xn.js";
5
- import"./cli-8305gbq0.js";
6
- import"./cli-a22h291q.js";
7
- import"./cli-4bd1rck6.js";
8
- import"./cli-jc1g9ndz.js";
9
- import"./cli-qghe0h66.js";
10
- import"./cli-0726awxw.js";
11
- import"./cli-dhar9qay.js";
12
- import"./cli-vz22fyqv.js";
13
- import"./cli-98rw5dt5.js";
14
- export {
15
- ACPAdapter2 as ACPAdapter
16
- };