@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.
- package/dist/acp-adapter-dn4gdsgr.js +16 -0
- package/dist/{actions-3tt153af.js → actions-g563mbn2.js} +19 -19
- package/dist/{amp-adapter-njpts0yr.js → amp-adapter-q61w05eb.js} +3 -3
- package/dist/{anthropic-messages-xey2skwx.js → anthropic-messages-jkva0zps.js} +68 -78
- package/dist/{app-nky4378f.js → app-a66ssc4k.js} +3 -3
- package/dist/{assistant-jnb669pa.js → assistant-p477rjwj.js} +22 -22
- package/dist/{azure-openai-responses-26t7j9ra.js → azure-openai-responses-wgtqkbr3.js} +5 -10
- package/dist/boot-args-schema-h4qj462e.js +89 -0
- package/dist/{boot-reembed-9mgvaztt.js → boot-reembed-n1ehfbsw.js} +1 -1
- package/dist/{boot-reembed-qs2djdej.js → boot-reembed-qw4mc0pt.js} +1 -1
- package/dist/{boot-scrub-sweep-yjpdj7s1.js → boot-scrub-sweep-9w9jp4sm.js} +4 -4
- package/dist/{boot-seeds-5cm6ambd.js → boot-seeds-qdaf3sdy.js} +5 -4
- package/dist/{boxd-nv507va8.js → boxd-qbkxy6ap.js} +1 -1
- package/dist/{claude-adapter-fn287zmm.js → claude-adapter-348p5hx9.js} +8 -8
- package/dist/{claude-managed-adapter-dvs2xw5n.js → claude-managed-adapter-h74d06yz.js} +4 -4
- package/dist/{claude-managed-setup-wtdz2mj2.js → claude-managed-setup-7787fxtp.js} +5 -5
- package/dist/{claude-sdk-session-x91kqyhm.js → claude-sdk-session-hbszbt8a.js} +7901 -7718
- package/dist/{cli-cb2a8pna.js → cli-09kmfkmq.js} +4 -6
- package/dist/{cli-m0da8j35.js → cli-0whpms1z.js} +15 -10
- package/dist/{cli-5zx699j9.js → cli-12xyjhws.js} +29 -12
- package/dist/{cli-snpj5zbj.js → cli-1z4qggfe.js} +9 -36
- package/dist/{cli-e0kmphd6.js → cli-21159vea.js} +35 -12
- package/dist/{cli-s0qnd4wv.js → cli-28fq781p.js} +1 -1
- package/dist/{cli-qh4d4tvk.js → cli-2a8py3sx.js} +6 -6
- package/dist/{cli-adeegh7d.js → cli-2ccpqyyf.js} +412 -116
- package/dist/{cli-1p89xny0.js → cli-2r0jcc3k.js} +1 -1
- package/dist/{cli-rvtm68yy.js → cli-2xv18ywz.js} +2 -2
- package/dist/{cli-5xaqj21p.js → cli-3kd08rej.js} +1 -1
- package/dist/{cli-1c6tzt8g.js → cli-3tqcamp6.js} +13 -13
- package/dist/{cli-ae7mrdf9.js → cli-3vjhs18n.js} +4 -6
- package/dist/{cli-vfym7wmz.js → cli-3xcwp3z8.js} +10 -12
- package/dist/{cli-az48n0nr.js → cli-4caa1x7d.js} +67 -64
- package/dist/{cli-5jnhv72d.js → cli-4t0fmf3z.js} +30 -7
- package/dist/{cli-5b456bpf.js → cli-530hkwdy.js} +7 -9
- package/dist/{cli-pz4rk021.js → cli-54vrpgm0.js} +1 -1
- package/dist/{cli-ddaanqkd.js → cli-587857ys.js} +7 -7
- package/dist/{cli-r9jqcehk.js → cli-5mpy301f.js} +38 -2
- package/dist/{cli-cppkf404.js → cli-605nn699.js} +80 -43
- package/dist/{cli-6pfd54vx.js → cli-650zv9q9.js} +10 -10
- package/dist/cli-6pzk82fd.js +778 -0
- package/dist/{cli-gz6q4eve.js → cli-715t1gx6.js} +9 -9
- package/dist/{cli-08bmz9z9.js → cli-9aezs55w.js} +10 -12
- package/dist/{cli-tgrv9cjx.js → cli-9r5gtwjr.js} +3 -3
- package/dist/{cli-pc6n7fre.js → cli-a0657jmf.js} +2 -2
- package/dist/{cli-pjctyea3.js → cli-agyaeef4.js} +3 -3
- package/dist/cli-b932gexn.js +5266 -0
- package/dist/{cli-e46hg0xw.js → cli-bc779n4v.js} +3 -3
- package/dist/{cli-jtjtabxe.js → cli-btc9cb4c.js} +78 -5
- package/dist/{cli-caj33vcq.js → cli-btf6fw39.js} +5 -5
- package/dist/{cli-q3tkegby.js → cli-cseh6f8w.js} +5 -5
- package/dist/{cli-n6bv12jn.js → cli-cvs2r2vq.js} +23 -14
- package/dist/{cli-tfyyvzx6.js → cli-cyn9v8zr.js} +17 -2
- package/dist/{cli-a22h291q.js → cli-d6521kb5.js} +1 -1
- package/dist/{cli-1b7btd38.js → cli-d84byzn8.js} +869 -5
- package/dist/{cli-wx3rhnm0.js → cli-eddnyg3t.js} +1 -1
- package/dist/{cli-nmzhp1b5.js → cli-ejkvvqbe.js} +55 -46
- package/dist/{cli-ftyxyspd.js → cli-eqtfgfr6.js} +1 -1
- package/dist/{cli-mthwvjre.js → cli-f2zenhja.js} +1 -1
- package/dist/{cli-ws19768n.js → cli-fayav105.js} +624 -227
- package/dist/{cli-ferkkrg9.js → cli-fjggej24.js} +2 -2
- package/dist/{cli-g7s47cc5.js → cli-fsgttth8.js} +123 -102
- package/dist/{cli-8305gbq0.js → cli-gce09r66.js} +5 -5
- package/dist/{cli-mkk9rnzz.js → cli-gxy8y1dt.js} +51 -4
- package/dist/{cli-fyt2g4wd.js → cli-hae9j8sv.js} +288 -76
- package/dist/{cli-agfm16v9.js → cli-hg42n3hx.js} +12 -12
- package/dist/{cli-qghe0h66.js → cli-hwprv9e4.js} +8 -10
- package/dist/{cli-yndmfxb3.js → cli-hxpyc9sn.js} +3 -3
- package/dist/{cli-72v799xn.js → cli-jfx48xrj.js} +10 -12
- package/dist/{cli-dhar9qay.js → cli-jrp1dt73.js} +2 -2
- package/dist/{cli-98rw5dt5.js → cli-jrzkw01m.js} +2 -2
- package/dist/{cli-ayayvfg4.js → cli-k70e3x9e.js} +24 -20
- package/dist/{cli-583frbyr.js → cli-kchjb7qy.js} +1 -1
- package/dist/{cli-cm5yqn35.js → cli-kf3pxxdg.js} +1 -0
- package/dist/{cli-fmjd0t1y.js → cli-m0cy2vyf.js} +2 -2
- package/dist/{cli-4zsenjhy.js → cli-m5akxq8q.js} +16 -3
- package/dist/{cli-73jzwksr.js → cli-m88rpzkh.js} +6 -3
- package/dist/{cli-95jzxcp3.js → cli-mnrkgg60.js} +4 -4
- package/dist/{cli-p82cnnjq.js → cli-ms5m5r1y.js} +1 -1
- package/dist/{cli-fy6x31ps.js → cli-n5yexkdg.js} +1 -0
- package/dist/{cli-wk5yrfwd.js → cli-neyag5p6.js} +191 -85
- package/dist/cli-p0m0p34z.js +9321 -0
- package/dist/{cli-yyj3j5m4.js → cli-p17970qv.js} +8 -10
- package/dist/{cli-6vcp76qk.js → cli-p74md7t8.js} +42 -23
- package/dist/{cli-rjcbm574.js → cli-pr0eze3x.js} +2 -2
- package/dist/{cli-35rsp8ye.js → cli-qkdmz8c8.js} +1 -1
- package/dist/{cli-rtt8g4v9.js → cli-qmd3mse0.js} +2 -2
- package/dist/{cli-je518txm.js → cli-qzt90yze.js} +20 -20
- package/dist/cli-rkc97c6a.js +39 -0
- package/dist/{cli-75gkpjvw.js → cli-rvhdmjvt.js} +8 -12
- package/dist/{cli-6g0hb4cp.js → cli-rwymrnaz.js} +18608 -9089
- package/dist/{cli-3fg0bdcv.js → cli-serm8zrx.js} +6 -6
- package/dist/{cli-g08zdaec.js → cli-sgs5k6yd.js} +1 -1
- package/dist/{cli-afkqkrtw.js → cli-sya22y84.js} +21 -9
- package/dist/{cli-318r69gq.js → cli-t73cas91.js} +440 -9
- package/dist/{cli-e5bzrn01.js → cli-tqq0hspb.js} +2 -2
- package/dist/{cli-pq73h5mz.js → cli-v3cf1ts9.js} +3 -3
- package/dist/{cli-bfv7vdg6.js → cli-varqt4d1.js} +28 -16
- package/dist/{cli-k899ehvh.js → cli-vxh6acp7.js} +6 -6
- package/dist/{cli-g83s9ewh.js → cli-xfjrc279.js} +1 -1
- package/dist/{cli-k1nje3v3.js → cli-xk879m3k.js} +129 -115
- package/dist/{cli-7cx2m6t2.js → cli-y5rbvxhc.js} +2 -2
- package/dist/{cli-8sckt74b.js → cli-y8nbefpb.js} +41 -19
- package/dist/{cli-81p9jd57.js → cli-yab6sh8p.js} +9 -3
- package/dist/{cli-srye3vdt.js → cli-ybjdc978.js} +1 -1
- package/dist/{cli-k5671be5.js → cli-zcfpsfzf.js} +5 -5
- package/dist/{cli-vf078p3e.js → cli-zfqg6fzn.js} +1 -1
- package/dist/{cli-k8196sh2.js → cli-zgv8gxgs.js} +9 -8
- package/dist/cli.js +34 -52
- package/dist/{cloudflare-workers-ai-system-one-ef2a980q.js → cloudflare-workers-ai-system-one-9y1zx3pt.js} +2 -2
- package/dist/{codex-adapter-cf2yxe9m.js → codex-adapter-ysq6bzha.js} +7 -7
- package/dist/{codex-hook-a0c6g6t6.js → codex-hook-fac6175r.js} +1 -1
- package/dist/{codex-login-y0pmff1c.js → codex-login-bcda78ge.js} +2 -2
- package/dist/{codex-session-runner-6vfzdgbd.js → codex-session-runner-qakzfx93.js} +8 -8
- package/dist/{commands-t3mfy7vn.js → commands-rs7hkv9r.js} +3 -3
- package/dist/{controller-q7xrbaz0.js → controller-r5x9bg6e.js} +4 -4
- package/dist/{controllers-connect-c6nm70kg.js → controllers-connect-498hrxvk.js} +24 -24
- package/dist/{cursor-adapter-ftd81ga8.js → cursor-adapter-d46qszer.js} +2 -2
- package/dist/{db-vemtpmcc.js → db-pm96nhdb.js} +6 -2
- package/dist/{db-dk572x25.js → db-s13dqhr6.js} +3 -3
- package/dist/{devin-adapter-r9phbnc9.js → devin-adapter-z46ep5ph.js} +1 -1
- package/dist/{dispatcher-kh7ecxh9.js → dispatcher-j3h81t7m.js} +18 -18
- package/dist/{docker-c1a3gqmf.js → docker-866qpzt9.js} +2 -2
- package/dist/{dsh-adapter-v8628r89.js → dsh-adapter-rw0d5rc4.js} +2 -2
- package/dist/{e2b-fr12yccx.js → e2b-jkwfhbcv.js} +2 -2
- package/dist/{e2b-x6ywzak3.js → e2b-s16txnpx.js} +2 -3
- package/dist/{easter-egg-3d-nenw4x63.js → easter-egg-3d-qtgfxgze.js} +1 -1
- package/dist/{embedding-space-0jepb239.js → embedding-space-xh8p4q4x.js} +6 -6
- package/dist/{embeddings-xxt49yxg.js → embeddings-wp745m91.js} +1 -1
- package/dist/{event-bus-g0ka3pbw.js → event-bus-e66gh7cc.js} +1 -1
- package/dist/{execute-1mhw6e4x.js → execute-2fzb9z74.js} +1 -1
- package/dist/{external-channel-55v12e60.js → external-channel-ys21h3sy.js} +2 -2
- package/dist/fx-adapter-vz0b9z3g.js +19 -0
- package/dist/{google-generative-ai-v94hr7h0.js → google-generative-ai-ytpgncx9.js} +7 -12
- package/dist/{google-vertex-g7vr6cf8.js → google-vertex-tqhze5j7.js} +7 -12
- package/dist/grok-adapter-spea7zkj.js +19 -0
- package/dist/handlers-crckt5dq.js +32 -0
- package/dist/{heartbeat-k42svnr0.js → heartbeat-8phn1kdq.js} +21 -21
- package/dist/{hook-6nphweh0.js → hook-amcj4s10.js} +16 -11
- package/dist/{hook-114m7hap.js → hook-bc6n49qn.js} +5 -5
- package/dist/{http-r8cc4wz7.js → http-7374brv5.js} +854 -332
- package/dist/index-4x08sjtk.js +30 -0
- package/dist/{index-6cxzwfen.js → index-5a9jtqde.js} +26 -26
- package/dist/index-8ybffts4.js +37 -0
- package/dist/{index-nh3wyqdt.js → index-c9y31ytf.js} +16 -16
- package/dist/{index-h39zbx67.js → index-hsad2t3r.js} +31 -31
- package/dist/index-nfy4kkg5.js +33 -0
- package/dist/{index-e3s8wmxy.js → index-p4hjwbvw.js} +1 -1
- package/dist/{index-k7fj52d3.js → index-q5cmtbz5.js} +6 -6
- package/dist/{index-fpk4bcd9.js → index-w4m9z29z.js} +1 -1
- package/dist/{keepalive-x060nt9p.js → keepalive-wy29kbrg.js} +4 -4
- package/dist/lead-zdqxsvjn.js +71 -0
- package/dist/{llama-cpp-classify-s5c47rwh.js → llama-cpp-classify-nfgswa1m.js} +2 -2
- package/dist/{maintenance-2xxfexhf.js → maintenance-h2ds9w6c.js} +1 -1
- package/dist/{mistral-conversations-3gjpdb4b.js → mistral-conversations-a45tx39a.js} +29 -51
- package/dist/{oauth-refresh-sweep-fckc4ar5.js → oauth-refresh-sweep-q7mtbyp3.js} +3 -3
- package/dist/{onboard-zc48j237.js → onboard-vw8r2fdw.js} +68 -16
- package/dist/{openai-codex-responses-8pbxq9h5.js → openai-codex-responses-k9gapdze.js} +7 -11
- package/dist/{openai-completions-rm00s912.js → openai-completions-xd579js7.js} +50 -58
- package/dist/{openai-decisions-8v957r2r.js → openai-decisions-q3hh60wr.js} +2 -2
- package/dist/{openai-responses-agxpf96k.js → openai-responses-4d5dx3c7.js} +5 -10
- package/dist/{opencode-adapter-r690h1cr.js → opencode-adapter-mtb0953j.js} +6 -6
- package/dist/{openrouter-images-3ecegv0d.js → openrouter-images-xr9gme9x.js} +4 -3
- package/dist/{otel-impl-r5xbh81q.js → otel-impl-j42czw3r.js} +2 -2
- package/dist/{pi-messages-pchtw4he.js → pi-messages-hjbv8v10.js} +28 -12
- package/dist/{pi-mono-adapter-c7v8sdec.js → pi-mono-adapter-zk8pg9jr.js} +30 -27
- package/dist/{pricing-refresh-3pmre11v.js → pricing-refresh-x7nhv23d.js} +3 -3
- package/dist/{rbac-roles-3vbshwsb.js → rbac-roles-9044425x.js} +16 -2
- package/dist/rbac-roles-bzvee6cf.js +37 -0
- package/dist/{render-v2-pxykkbab.js → render-v2-t7bn4skz.js} +3 -3
- package/dist/{resume-adda0bwy.js → resume-x94gemep.js} +7 -7
- package/dist/{runtime-fnbm7stk.js → runtime-breq6fmv.js} +1 -1
- package/dist/{session-access-2fvamrdc.js → session-access-q7dmqjvt.js} +7 -5
- package/dist/{session-source-backfill-08xvv0sm.js → session-source-backfill-440ysamr.js} +3 -3
- package/dist/{setup-1aqmvmh1.js → setup-07n4727s.js} +1 -1
- package/dist/{typesafe-system-one-0bmqcxfg.js → typesafe-system-one-f2en2knd.js} +2 -2
- package/dist/virtual-modules-z5h6mcyf.js +362 -0
- package/dist/{work-objects-9s0yrm5j.js → work-objects-pnq5y534.js} +21 -21
- package/dist/{worker-follow-up-3q78fqmr.js → worker-follow-up-7z1gfkr8.js} +18 -18
- package/dist/worker-y62rvvq3.js +71 -0
- package/dist/{x-vmmye1kb.js → x-2fyrt5pp.js} +2 -2
- package/openapi.json +1268 -276
- package/package.json +10 -10
- package/src/apps/catalog.generated.json +299 -82
- package/src/apps/page-validator.ts +115 -2
- package/src/be/connector-codes.ts +21 -6
- package/src/be/db/model-profiles.ts +1 -1
- package/src/be/db/session-tree.ts +9 -5
- package/src/be/db/session-visibility.ts +25 -9
- package/src/be/db/tasks/read.ts +33 -6
- package/src/be/db/tasks/write.ts +77 -7
- package/src/be/db-queries/tracker.ts +4 -2
- package/src/be/db.ts +53 -19
- package/src/be/improvements.ts +416 -0
- package/src/be/migrations/271_subscription_usage_model.sql +30 -0
- package/src/be/migrations/274_improvements.sql +27 -0
- package/src/be/migrations/275_task_dispatched_by.sql +8 -0
- package/src/be/model-validation.ts +19 -1
- package/src/be/rbac-roles.ts +144 -1
- package/src/be/runtime-pools/routing.ts +1 -1
- package/src/be/scripts/boot-args-schema.ts +95 -0
- package/src/be/scripts/extract-schema.ts +15 -10
- package/src/be/seed-scripts/catalog/boot-triage.inline.ts +1 -1
- package/src/be/seed-scripts/catalog/boot-triage.ts +1 -1
- package/src/be/seed-scripts/catalog/get-child-outputs.ts +1 -1
- package/src/be/seed-scripts/catalog/wait-for-task.ts +1 -1
- package/src/be/swarm-config-guard.ts +8 -0
- package/src/be/users.ts +64 -5
- package/src/cli.tsx +5 -25
- package/src/commands/claude-managed-setup.ts +1 -1
- package/src/commands/codex-login.ts +1 -1
- package/src/commands/e2b.ts +0 -1
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/onboard/compose-generator.ts +0 -1
- package/src/commands/onboard/dashboard-url.ts +31 -0
- package/src/commands/onboard/steps/generate.tsx +17 -1
- package/src/commands/onboard/steps/post-dashboard.tsx +9 -3
- package/src/commands/onboard.tsx +19 -6
- package/src/commands/runner.ts +143 -105
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/hooks/hook.ts +13 -5
- package/src/http/agents.ts +7 -1
- package/src/http/all-routes.ts +1 -0
- package/src/http/approval-requests.ts +32 -50
- package/src/http/auth.ts +5 -4
- package/src/http/codex-oauth-accounts.ts +31 -23
- package/src/http/codex-oauth-device.ts +3 -3
- package/src/http/codex-oauth-keep-warm.ts +1 -1
- package/src/http/improvements.ts +317 -0
- package/src/http/index.ts +10 -0
- package/src/http/mcp-oauth.ts +6 -0
- package/src/http/mcp-servers.ts +8 -0
- package/src/http/models-catalog.ts +1 -1
- package/src/http/operator-actor.ts +2 -1
- package/src/http/pages-public.ts +38 -1
- package/src/http/person-responder.ts +66 -0
- package/src/http/poll.ts +3 -4
- package/src/http/prompt-templates.ts +1 -1
- package/src/http/schedules.ts +4 -0
- package/src/http/script-runs.ts +6 -1
- package/src/http/session-access.ts +61 -6
- package/src/http/sessions.ts +67 -9
- package/src/http/tasks.ts +53 -9
- package/src/http/user-roles.ts +11 -2
- package/src/http/users.ts +224 -105
- package/src/http/utils.ts +2 -1
- package/src/http/workflows.ts +11 -7
- package/src/prompts/session-templates.ts +1 -0
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +17 -3
- package/src/providers/codex-models.ts +4 -3
- package/src/providers/codex-oauth/auth-json.ts +14 -18
- package/src/providers/codex-oauth/device.ts +49 -15
- package/src/providers/codex-oauth/flow.ts +2 -1
- package/src/providers/codex-oauth/storage.ts +2 -2
- package/src/providers/pi-mono-adapter.ts +8 -0
- package/src/providers/pricing-sources.md +16 -1
- package/src/providers/swarm-events-shared.ts +15 -2
- package/src/rbac/legacy-policy.ts +3 -0
- package/src/rbac/permissions.ts +15 -0
- package/src/scheduler/deferred-task-waits.ts +9 -4
- package/src/scripts-runtime/extract-args-schema.ts +3 -1
- package/src/scripts-runtime/swarm-sdk.ts +1 -1
- package/src/scripts-runtime/types/swarm-extension.d.ts +31 -28
- package/src/server-user.ts +1 -1
- package/src/server.ts +2 -0
- package/src/slack/ack.ts +68 -26
- package/src/slack/blocks.ts +1 -0
- package/src/slack/reaction-shortcode.ts +8 -2
- package/src/slack/render-v2.ts +72 -20
- package/src/slack/task-output.ts +4 -1
- package/src/slack/thread-buffer.ts +2 -2
- package/src/tasks/task-skip.ts +28 -0
- package/src/tasks/terminal-result-guard.ts +3 -2
- package/src/telemetry.ts +28 -1
- package/src/tests/agentmail-inbox-mapping.test.ts +73 -0
- package/src/tests/api-drain-worker-e2e.test.ts +69 -2
- package/src/tests/approval-requests.test.ts +58 -0
- package/src/tests/apps-catalog-drift.test.ts +35 -0
- package/src/tests/apps-catalog-table.test.ts +203 -0
- package/src/tests/apps-element-assembly.test.ts +28 -0
- package/src/tests/apps-smart-links.test.ts +151 -0
- package/src/tests/apps-table-filters-migration.test.ts +96 -0
- package/src/tests/apps-table-selection-migration.test.ts +95 -0
- package/src/tests/chatgpt-subscription-session-bench.test.ts +2 -2
- package/src/tests/claude-managed-setup.test.ts +36 -0
- package/src/tests/claude-worker-parity.test.ts +2 -2
- package/src/tests/codex-adapter.test.ts +32 -2
- package/src/tests/codex-login.test.ts +2 -2
- package/src/tests/codex-oauth-accounts.test.ts +48 -12
- package/src/tests/codex-oauth-credential-info.test.ts +77 -1
- package/src/tests/codex-oauth-device.test.ts +61 -1
- package/src/tests/codex-oauth-keep-warm.test.ts +2 -2
- package/src/tests/codex-oauth.test.ts +25 -4
- package/src/tests/codex-pool.test.ts +2 -2
- package/src/tests/codex-swarm-events.test.ts +43 -1
- package/src/tests/context-window.test.ts +14 -0
- package/src/tests/db-queries-tracker.test.ts +2 -1
- package/src/tests/db-task-read-contract.test.ts +3 -0
- package/src/tests/db-task-write-contract.test.ts +3 -0
- package/src/tests/deferred-task-wake.test.ts +7 -2
- package/src/tests/deploy-one-box.test.ts +39 -1
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/e2e-coverage-contract.test.ts +235 -0
- package/src/tests/empty-output-schema.test.ts +160 -0
- package/src/tests/env-flag.test.ts +1 -0
- package/src/tests/explicit-model-validation.test.ts +14 -0
- package/src/tests/fixtures/onboard/content.compose.yml.txt +0 -4
- package/src/tests/fixtures/onboard/dev.compose.yml.txt +0 -3
- package/src/tests/fixtures/onboard/full-all.compose.yml.txt +0 -11
- package/src/tests/fixtures/onboard/full.compose.yml.txt +0 -11
- package/src/tests/fixtures/onboard/research.compose.yml.txt +0 -3
- package/src/tests/fixtures/onboard/solo.compose.yml.txt +0 -1
- package/src/tests/fixtures/prs-app-definition.json.txt +784 -0
- package/src/tests/fixtures/prs-filters-migration.patch.json.txt +318 -0
- package/src/tests/fixtures/prs-selection-migration.patch.json.txt +373 -0
- package/src/tests/fixtures/runner-identity-refresh.ts +3 -0
- package/src/tests/fixtures/runner-legacy-resume-prompt.ts +3 -0
- package/src/tests/fixtures/runner-task-start-reads.ts +140 -0
- package/src/tests/hook-ping-me-order.test.ts +85 -0
- package/src/tests/http-api-integration.test.ts +2 -2
- package/src/tests/http-users.test.ts +63 -0
- package/src/tests/improvements-payload.test.ts +200 -0
- package/src/tests/improvements-route.test.ts +419 -0
- package/src/tests/install-sh-setup-url.test.ts +190 -0
- package/src/tests/mcp-input-caps.test.ts +4 -3
- package/src/tests/merge-gate-detect-changes.test.ts +22 -0
- package/src/tests/onboard-dashboard-output.test.ts +109 -0
- package/src/tests/onboard-dashboard-url.test.ts +83 -0
- package/src/tests/operator-granted-credentials.test.ts +561 -0
- package/src/tests/operator-granted-role-wire.test.ts +222 -0
- package/src/tests/pages-authed-mode.test.ts +13 -2
- package/src/tests/pi-mono-adapter.test.ts +39 -4
- package/src/tests/rbac-engine.test.ts +3 -0
- package/src/tests/runner-context-usage.test.ts +118 -0
- package/src/tests/runner-legacy-options.test.ts +55 -0
- package/src/tests/runner-slot-reconcile.test.ts +38 -0
- package/src/tests/runner-task-start-reads.test.ts +58 -0
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/script-executor-quickjs.test.ts +2 -0
- package/src/tests/script-runs-http.test.ts +57 -0
- package/src/tests/scripts-boot-args-schema.test.ts +181 -0
- package/src/tests/scripts-runtime.test.ts +24 -0
- package/src/tests/sdk-store-progress-skipped.test.ts +155 -0
- package/src/tests/send-task-dispatched-by.test.ts +129 -0
- package/src/tests/session-costs-model-key-normalize.test.ts +59 -0
- package/src/tests/session-dispatched-tasks.test.ts +115 -0
- package/src/tests/session-sharing.test.ts +402 -3
- package/src/tests/slack-file-tools-attachments.test.ts +95 -3
- package/src/tests/slack-reaction-config.test.ts +40 -0
- package/src/tests/slack-render-v2.test.ts +120 -0
- package/src/tests/slack-skip-reaction.test.ts +203 -0
- package/src/tests/store-progress-skipped.test.ts +159 -0
- package/src/tests/submit-improvement-tool.test.ts +82 -0
- package/src/tests/subscription-usage-migration.test.ts +57 -0
- package/src/tests/swarm-config-reserved-keys.test.ts +3 -0
- package/src/tests/telemetry-endpoint-override.test.ts +27 -0
- package/src/tests/tool-annotations.test.ts +1 -1
- package/src/tests/trigger-claiming.test.ts +2 -0
- package/src/tests/workflow-system-one-extraction.test.ts +29 -0
- package/src/tools/create-channel.ts +1 -1
- package/src/tools/defer-task.ts +1 -1
- package/src/tools/manage-user.ts +88 -58
- package/src/tools/register-agentmail-inbox.ts +5 -0
- package/src/tools/repos/update-repo.ts +1 -1
- package/src/tools/request-human-input.ts +1 -1
- package/src/tools/send-task.ts +4 -1
- package/src/tools/slack-read.ts +61 -33
- package/src/tools/store-progress.ts +39 -8
- package/src/tools/submit-improvement.ts +68 -0
- package/src/tools/tool-config.ts +3 -0
- package/src/tools/tracker/tracker-unlink.ts +2 -1
- package/src/tools/workflows/retry-workflow-run.ts +3 -0
- package/src/types.ts +16 -2
- package/src/utils/context-window.ts +6 -1
- package/src/utils/output-schema.ts +23 -0
- package/src/utils/request-auth-context.ts +6 -1
- package/src/workflows/executors/system-one-providers.ts +25 -6
- package/src/workflows/recovery.ts +8 -4
- package/src/workflows/resume.ts +19 -0
- package/templates/skills/apps/SKILL.md +22 -11
- package/templates/skills/apps/content.md +22 -11
- package/templates/skills/swarm-scripts/SKILL.md +1 -1
- package/templates/skills/swarm-scripts/content.md +1 -1
- package/templates/skills/work-on-task/SKILL.md +1 -1
- package/templates/skills/work-on-task/content.md +1 -1
- package/dist/acp-adapter-7b4vk3h5.js +0 -16
- package/dist/cli-5c4hjzne.js +0 -873
- package/dist/cli-excnnjg2.js +0 -20222
- package/dist/cli-pc5znp64.js +0 -364
- package/dist/cli-vz22fyqv.js +0 -428
- package/dist/fx-adapter-bs8wqrk5.js +0 -19
- package/dist/grok-adapter-gpjqmkcq.js +0 -19
- package/dist/handlers-zxmp1ta4.js +0 -32
- package/dist/index-a8phxqnk.js +0 -37
- package/dist/index-k6h00t4c.js +0 -30
- package/dist/index-xrz7te8h.js +0 -33
- package/dist/lead-956sd2yc.js +0 -71
- package/dist/rbac-roles-910mmkgz.js +0 -26
- package/dist/virtual-modules-d2pjk9j1.js +0 -59
- package/dist/worker-y15hy08h.js +0 -71
|
@@ -11,29 +11,30 @@ import {
|
|
|
11
11
|
init_active_sessions,
|
|
12
12
|
getSteeringMessageById2,
|
|
13
13
|
init_db4
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-neyag5p6.js";
|
|
15
15
|
import {
|
|
16
|
+
userHoldsExplicitVerb2,
|
|
16
17
|
getUserGrant2,
|
|
17
18
|
init_rbac_roles
|
|
18
|
-
} from "./cli-
|
|
19
|
-
import {
|
|
20
|
-
findUserById,
|
|
21
|
-
findUserByExternalId,
|
|
22
|
-
init_users
|
|
23
|
-
} from "./cli-5jnhv72d.js";
|
|
19
|
+
} from "./cli-btc9cb4c.js";
|
|
24
20
|
import {
|
|
25
21
|
isRbacEnabled,
|
|
26
22
|
can,
|
|
27
23
|
init_rbac
|
|
28
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-cyn9v8zr.js";
|
|
25
|
+
import {
|
|
26
|
+
findUserById,
|
|
27
|
+
findUserByExternalId,
|
|
28
|
+
init_users
|
|
29
|
+
} from "./cli-4t0fmf3z.js";
|
|
29
30
|
import {
|
|
30
31
|
init_zod
|
|
31
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-zcfpsfzf.js";
|
|
32
33
|
import {
|
|
33
34
|
ZodError,
|
|
34
35
|
string2,
|
|
35
36
|
object2
|
|
36
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-hg42n3hx.js";
|
|
37
38
|
import {
|
|
38
39
|
isEnvFlagEnabled,
|
|
39
40
|
init_env_flag
|
|
@@ -45,7 +46,7 @@ import {
|
|
|
45
46
|
import {
|
|
46
47
|
scrubSecrets,
|
|
47
48
|
init_secret_scrubber
|
|
48
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-d84byzn8.js";
|
|
49
50
|
import {
|
|
50
51
|
__esm
|
|
51
52
|
} from "./cli-242037k3.js";
|
|
@@ -129,7 +130,7 @@ function setCorsHeaders(req, res) {
|
|
|
129
130
|
res.setHeader("Access-Control-Allow-Credentials", "true");
|
|
130
131
|
const reqHeaders = req.headers["access-control-request-headers"];
|
|
131
132
|
const askedHeaders = Array.isArray(reqHeaders) ? reqHeaders.join(", ") : reqHeaders;
|
|
132
|
-
res.setHeader("Access-Control-Allow-Headers", askedHeaders ?? "Authorization, Content-Type, X-Agent-ID, X-Requested-With, X-Swarm-User-Id");
|
|
133
|
+
res.setHeader("Access-Control-Allow-Headers", askedHeaders ?? "Authorization, Content-Type, X-Agent-ID, X-Requested-With, X-Swarm-User-Id, X-Swarm-Session-Scope");
|
|
133
134
|
res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, PATCH, DELETE, OPTIONS");
|
|
134
135
|
res.setHeader("Access-Control-Expose-Headers", "Content-Type, Content-Length, ETag, Location");
|
|
135
136
|
} else {
|
|
@@ -499,7 +500,7 @@ function route(def) {
|
|
|
499
500
|
try {
|
|
500
501
|
const rawBody = def.body ? await parseBody(req, def.maxBodyBytes) : undefined;
|
|
501
502
|
if (def.session && "bodyTaskIds" in def.session) {
|
|
502
|
-
const { bodySessionDenial } = await import("./session-access-
|
|
503
|
+
const { bodySessionDenial } = await import("./session-access-q7dmqjvt.js");
|
|
503
504
|
const denial = await bodySessionDenial(req, def.session.bodyTaskIds(rawBody));
|
|
504
505
|
if (denial) {
|
|
505
506
|
jsonError(res, denial, 403);
|
|
@@ -766,7 +767,22 @@ var init_favorite_owner = __esm(() => {
|
|
|
766
767
|
});
|
|
767
768
|
|
|
768
769
|
// src/http/session-access.ts
|
|
769
|
-
|
|
770
|
+
function requestsAllUsersScope(req) {
|
|
771
|
+
const raw = req.headers[SESSION_SCOPE_HEADER];
|
|
772
|
+
return (Array.isArray(raw) ? raw[0] : raw)?.trim().toLowerCase() === "all";
|
|
773
|
+
}
|
|
774
|
+
async function canReadAllSessions(userId) {
|
|
775
|
+
return userHoldsExplicitVerb2(userId, "session.read.all");
|
|
776
|
+
}
|
|
777
|
+
async function resolveSessionActor2(req, myAgentId, opts = {}) {
|
|
778
|
+
const actor = await resolveBaseSessionActor(req, myAgentId);
|
|
779
|
+
if (actor.kind !== "user" || !actor.userId)
|
|
780
|
+
return actor;
|
|
781
|
+
if (!opts.allUsers && !requestsAllUsersScope(req))
|
|
782
|
+
return actor;
|
|
783
|
+
return await canReadAllSessions(actor.userId) ? { ...actor, readAll: true } : actor;
|
|
784
|
+
}
|
|
785
|
+
async function resolveBaseSessionActor(req, myAgentId) {
|
|
770
786
|
const auth = getRequestAuth(req);
|
|
771
787
|
const userId = authUserId(auth);
|
|
772
788
|
if (userId)
|
|
@@ -782,15 +798,20 @@ async function resolveSessionActor2(req, myAgentId) {
|
|
|
782
798
|
}
|
|
783
799
|
return BYPASS;
|
|
784
800
|
}
|
|
801
|
+
function withReadAll2(actor, access) {
|
|
802
|
+
return actor.kind === "user" && actor.readAll && access === "none" ? "read" : access;
|
|
803
|
+
}
|
|
785
804
|
async function sessionAccessFor2(actor, taskId) {
|
|
786
|
-
|
|
805
|
+
if (actor.kind === "bypass")
|
|
806
|
+
return "owner";
|
|
807
|
+
return withReadAll2(actor, await sessionAccess(actor.userId, taskId));
|
|
787
808
|
}
|
|
788
809
|
async function canReadSession2(req, myAgentId, taskId) {
|
|
789
810
|
const access = await sessionAccessFor2(await resolveSessionActor2(req, myAgentId), taskId);
|
|
790
811
|
return hasSessionAccess(access, "read");
|
|
791
812
|
}
|
|
792
813
|
function readableByFor2(actor) {
|
|
793
|
-
return actor.kind === "user" ? { userId: actor.userId } : undefined;
|
|
814
|
+
return actor.kind === "user" && !actor.readAll ? { userId: actor.userId } : undefined;
|
|
794
815
|
}
|
|
795
816
|
async function hasSessionWrite2(req, myAgentId, taskId) {
|
|
796
817
|
const access = await sessionAccessFor2(await resolveSessionActor2(req, myAgentId), taskId);
|
|
@@ -838,7 +859,8 @@ async function denialFor(actor, taskId, needed) {
|
|
|
838
859
|
const root = await getSessionRoot(taskId);
|
|
839
860
|
if (!root)
|
|
840
861
|
return null;
|
|
841
|
-
|
|
862
|
+
const access = withReadAll2(actor, await sessionAccessForRoot(actor.userId, root));
|
|
863
|
+
if (hasSessionAccess(access, needed))
|
|
842
864
|
return null;
|
|
843
865
|
return needed === "read" ? SESSION_READ_DENIED2 : SESSION_WRITE_DENIED2;
|
|
844
866
|
}
|
|
@@ -905,7 +927,7 @@ async function userAgentIdentityDenial2(req, def, pathSegments) {
|
|
|
905
927
|
}
|
|
906
928
|
return USER_AGENT_HEADER_DENIED;
|
|
907
929
|
}
|
|
908
|
-
var BYPASS, SESSION_READ_DENIED2 = "You don't have access to this session. Ask the owner to share it.", SESSION_WRITE_DENIED2 = "You can't write in this session. Ask the owner to share it with edit access.", NOT_YOUR_TASK_DENIED2 = "You can only change tasks you requested, or sessions shared with you to edit.", SESSION_AGENT_WIDE_DENIED = "This changes sessions across a whole agent. Only the agent or the operator can call it.", USER_AGENT_HEADER_DENIED = "A user token cannot act as an agent. Drop X-Agent-ID, or call with the agent's own credential.";
|
|
930
|
+
var BYPASS, SESSION_SCOPE_HEADER = "x-swarm-session-scope", SESSION_READ_DENIED2 = "You don't have access to this session. Ask the owner to share it.", SESSION_WRITE_DENIED2 = "You can't write in this session. Ask the owner to share it with edit access.", NOT_YOUR_TASK_DENIED2 = "You can only change tasks you requested, or sessions shared with you to edit.", SESSION_AGENT_WIDE_DENIED = "This changes sessions across a whole agent. Only the agent or the operator can call it.", USER_AGENT_HEADER_DENIED = "A user token cannot act as an agent. Drop X-Agent-ID, or call with the agent's own credential.";
|
|
909
931
|
var init_session_access = __esm(() => {
|
|
910
932
|
init_db4();
|
|
911
933
|
init_active_sessions();
|
|
@@ -920,4 +942,4 @@ var init_session_access = __esm(() => {
|
|
|
920
942
|
BYPASS = { kind: "bypass" };
|
|
921
943
|
});
|
|
922
944
|
|
|
923
|
-
export { duplicateGuardedQueryKey, warnIfCorsAllowsAnyOrigin, isOriginAllowedForCredentials, allowedCredentialRedirect, setCorsHeaders, parseQueryParams, getPathSegments, wireHttpSpanLifecycle, redactShareTokenInPath, safeRequestUrlForLog, agentWithCapacity, RequestBodyTooLargeError, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, writeUnhandledError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, init_utils2, hasSessionAccess, getSessionRoot, sessionAccessForRoot, listActiveSessionShares, toSessionSharesState, setSessionShares, init_session_shares, resolveTaskAuditUserId, resolveHttpAuditUserId, init_audit_user, dashboardUserIdHeader, resolveHttpFavoriteOwner, init_favorite_owner, resolveSessionActor2, sessionAccessFor2, SESSION_READ_DENIED2, canReadSession2, readableByFor2, SESSION_WRITE_DENIED2, hasSessionWrite2, NOT_YOUR_TASK_DENIED2, deniesNonOwnerTaskWrite2, denyParentAttach2, pathSessionDenial2, bodySessionDenial2, userAgentIdentityDenial2, init_session_access, runtimeInstanceHeader, bodyTask, bodyListTask, routeRegistry, isPublicRoute, findRoute, describeRequestRoute, route, init_route_def };
|
|
945
|
+
export { duplicateGuardedQueryKey, warnIfCorsAllowsAnyOrigin, isOriginAllowedForCredentials, allowedCredentialRedirect, setCorsHeaders, parseQueryParams, getPathSegments, wireHttpSpanLifecycle, redactShareTokenInPath, safeRequestUrlForLog, agentWithCapacity, RequestBodyTooLargeError, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, writeUnhandledError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, init_utils2, hasSessionAccess, getSessionRoot, getSessionRoots, sessionAccessForRoot, listActiveSessionShares, toSessionSharesState, setSessionShares, init_session_shares, resolveTaskAuditUserId, resolveHttpAuditUserId, init_audit_user, dashboardUserIdHeader, resolveHttpFavoriteOwner, init_favorite_owner, resolveSessionActor2, withReadAll2, sessionAccessFor2, SESSION_READ_DENIED2, canReadSession2, readableByFor2, SESSION_WRITE_DENIED2, hasSessionWrite2, NOT_YOUR_TASK_DENIED2, deniesNonOwnerTaskWrite2, denyParentAttach2, pathSessionDenial2, bodySessionDenial2, userAgentIdentityDenial2, init_session_access, runtimeInstanceHeader, bodyTask, bodyListTask, routeRegistry, isPublicRoute, findRoute, describeRequestRoute, route, init_route_def };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ownedSlice,
|
|
3
|
+
init_text
|
|
4
|
+
} from "./cli-5mpy301f.js";
|
|
1
5
|
import {
|
|
2
6
|
__esm
|
|
3
7
|
} from "./cli-242037k3.js";
|
|
@@ -72,7 +76,7 @@ function formatProviderError(norm, prefix) {
|
|
|
72
76
|
function truncateErrorText(text, maxChars) {
|
|
73
77
|
if (text.length <= maxChars)
|
|
74
78
|
return text;
|
|
75
|
-
return `${text
|
|
79
|
+
return `${ownedSlice(text, 0, maxChars)}... [truncated ${text.length - maxChars} chars]`;
|
|
76
80
|
}
|
|
77
81
|
function safeJsonStringify(value) {
|
|
78
82
|
try {
|
|
@@ -83,6 +87,8 @@ function safeJsonStringify(value) {
|
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
89
|
var MAX_PROVIDER_ERROR_BODY_CHARS = 4000;
|
|
86
|
-
var init_error_body = () => {
|
|
90
|
+
var init_error_body = __esm(() => {
|
|
91
|
+
init_text();
|
|
92
|
+
});
|
|
87
93
|
|
|
88
|
-
export { normalizeProviderError, formatProviderError, init_error_body };
|
|
94
|
+
export { normalizeProviderError, formatProviderError, truncateErrorText, init_error_body };
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
ZodNumber,
|
|
138
138
|
number2,
|
|
139
139
|
ZodNumberFormat,
|
|
140
|
-
|
|
140
|
+
int2,
|
|
141
141
|
float32,
|
|
142
142
|
float64,
|
|
143
143
|
int32,
|
|
@@ -173,7 +173,7 @@ import {
|
|
|
173
173
|
strictObject2,
|
|
174
174
|
looseObject,
|
|
175
175
|
ZodUnion,
|
|
176
|
-
|
|
176
|
+
union3,
|
|
177
177
|
ZodXor,
|
|
178
178
|
xor,
|
|
179
179
|
ZodDiscriminatedUnion,
|
|
@@ -258,7 +258,7 @@ import {
|
|
|
258
258
|
exports_coerce,
|
|
259
259
|
exports_external,
|
|
260
260
|
init_external
|
|
261
|
-
} from "./cli-
|
|
261
|
+
} from "./cli-hg42n3hx.js";
|
|
262
262
|
import {
|
|
263
263
|
__export,
|
|
264
264
|
__esm
|
|
@@ -415,7 +415,7 @@ __export(exports_zod, {
|
|
|
415
415
|
includes: () => _includes,
|
|
416
416
|
input: () => input,
|
|
417
417
|
instanceof: () => _instanceof,
|
|
418
|
-
int: () =>
|
|
418
|
+
int: () => int2,
|
|
419
419
|
int32: () => int32,
|
|
420
420
|
int64: () => int64,
|
|
421
421
|
intersection: () => intersection,
|
|
@@ -511,7 +511,7 @@ __export(exports_zod, {
|
|
|
511
511
|
uint64: () => uint64,
|
|
512
512
|
ulid: () => ulid,
|
|
513
513
|
undefined: () => _undefined,
|
|
514
|
-
union: () =>
|
|
514
|
+
union: () => union3,
|
|
515
515
|
unknown: () => unknown,
|
|
516
516
|
uppercase: () => _uppercase,
|
|
517
517
|
url: () => url,
|
|
@@ -11,9 +11,10 @@ import {
|
|
|
11
11
|
init_steering2,
|
|
12
12
|
createLogEntry2,
|
|
13
13
|
init_db4
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-neyag5p6.js";
|
|
15
15
|
import {
|
|
16
16
|
ackSlackMessage,
|
|
17
|
+
skipSlackMessageReaction,
|
|
17
18
|
init_ack,
|
|
18
19
|
buildBufferFlushBlocks,
|
|
19
20
|
init_blocks,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
init_watcher,
|
|
28
29
|
getSlackApp2,
|
|
29
30
|
init_app3
|
|
30
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-605nn699.js";
|
|
31
32
|
import {
|
|
32
33
|
TaskCreationBlockedError,
|
|
33
34
|
init_errors2,
|
|
@@ -41,20 +42,20 @@ import {
|
|
|
41
42
|
init_message_text,
|
|
42
43
|
createAdditiveBuffer,
|
|
43
44
|
init_additive_buffer
|
|
44
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-fayav105.js";
|
|
45
46
|
import {
|
|
46
47
|
resolveSlackUserId,
|
|
47
48
|
rewriteSlackMentions,
|
|
48
49
|
init_enrich
|
|
49
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-v3cf1ts9.js";
|
|
50
51
|
import {
|
|
51
52
|
isSlackThreadLeft,
|
|
52
53
|
init_left_threads
|
|
53
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-sgs5k6yd.js";
|
|
54
55
|
import {
|
|
55
56
|
findUserByExternalId,
|
|
56
57
|
init_users
|
|
57
|
-
} from "./cli-
|
|
58
|
+
} from "./cli-4t0fmf3z.js";
|
|
58
59
|
import {
|
|
59
60
|
isSteeringEnabled2,
|
|
60
61
|
init_steering_enabled
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
62
63
|
import {
|
|
63
64
|
scrubSecrets,
|
|
64
65
|
init_secret_scrubber
|
|
65
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-d84byzn8.js";
|
|
66
67
|
import {
|
|
67
68
|
__esm,
|
|
68
69
|
__using,
|
|
@@ -353,7 +354,7 @@ ${description}` : description;
|
|
|
353
354
|
throw error;
|
|
354
355
|
console.info("[Slack] pre.task.create blocked:", error.extension.name, scrubSecrets(error.reason));
|
|
355
356
|
if (app) {
|
|
356
|
-
await
|
|
357
|
+
await skipSlackMessageReaction(app.client, channelId, items.at(-1).ts);
|
|
357
358
|
}
|
|
358
359
|
return;
|
|
359
360
|
}
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @bun
|
|
3
3
|
import {
|
|
4
4
|
bedrockProviderModule
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-fsgttth8.js";
|
|
6
6
|
import {
|
|
7
7
|
require_react_development,
|
|
8
8
|
Box_default,
|
|
@@ -16,11 +16,11 @@ import"./cli-v41kn3cd.js";
|
|
|
16
16
|
import {
|
|
17
17
|
setBedrockProviderModule,
|
|
18
18
|
init_bedrock_converse_stream_lazy
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-54vrpgm0.js";
|
|
20
20
|
import {
|
|
21
21
|
scrubSecrets,
|
|
22
22
|
init_secret_scrubber
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-d84byzn8.js";
|
|
24
24
|
import {
|
|
25
25
|
__toESM,
|
|
26
26
|
__commonJS
|
|
@@ -50,7 +50,7 @@ var import_react = __toESM(require_react(), 1);
|
|
|
50
50
|
// package.json
|
|
51
51
|
var package_default = {
|
|
52
52
|
name: "@desplega.ai/agent-swarm",
|
|
53
|
-
version: "2.7.
|
|
53
|
+
version: "2.7.9",
|
|
54
54
|
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.",
|
|
55
55
|
keywords: [
|
|
56
56
|
"agent-swarm.dev",
|
|
@@ -156,6 +156,8 @@ var package_default = {
|
|
|
156
156
|
"mono:dev": "turbo run dev",
|
|
157
157
|
"test:root": "bash scripts/run-bun-tests.sh",
|
|
158
158
|
e2e: "bun scripts/e2e/run.ts",
|
|
159
|
+
"e2e:strict": "bun scripts/e2e/run.ts --strict",
|
|
160
|
+
"e2e:bench": "bun scripts/e2e/bench.ts",
|
|
159
161
|
"e2e:ui": "bun packages/ui-e2e/boot/run.ts",
|
|
160
162
|
"e2e:ui:tsc": "bun tsc --noEmit -p packages/ui-e2e/tsconfig.json && bun tsc --noEmit -p packages/ui-e2e/tsconfig.boot.json",
|
|
161
163
|
"e2e:visuals": "bun scripts/e2e/visuals.ts",
|
|
@@ -190,9 +192,7 @@ var package_default = {
|
|
|
190
192
|
claude: "bun src/cli.tsx claude",
|
|
191
193
|
"claude:headless": "bun src/cli.tsx claude --headless",
|
|
192
194
|
worker: "bun src/cli.tsx worker",
|
|
193
|
-
"worker:yolo": "bun src/cli.tsx worker --yolo",
|
|
194
195
|
lead: "bun src/cli.tsx lead",
|
|
195
|
-
"lead:yolo": "bun src/cli.tsx lead --yolo",
|
|
196
196
|
dev: "bun --hot src/stdio.ts",
|
|
197
197
|
"dev:http": "NODE_ENV=development portless api.swarm bun --hot src/http.ts",
|
|
198
198
|
start: "bun src/stdio.ts",
|
|
@@ -252,10 +252,10 @@ var package_default = {
|
|
|
252
252
|
bun: ">=1.3.12"
|
|
253
253
|
},
|
|
254
254
|
dependencies: {
|
|
255
|
-
"@agentclientprotocol/sdk": "2.
|
|
255
|
+
"@agentclientprotocol/sdk": "2.4.0",
|
|
256
256
|
"@ai-sdk/openai": "^3.0.41",
|
|
257
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
258
|
-
"@anthropic-ai/sdk": "^1.
|
|
257
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.317",
|
|
258
|
+
"@anthropic-ai/sdk": "^1.4.0",
|
|
259
259
|
"@asteasolutions/zod-to-openapi": "^8.0.0",
|
|
260
260
|
"@aws-sdk/client-bedrock": "3.1048.0",
|
|
261
261
|
"@boxd-sh/sdk": "0.2.20",
|
|
@@ -264,11 +264,11 @@ var package_default = {
|
|
|
264
264
|
"@chat-adapter/teams": "4.41.1",
|
|
265
265
|
"@chat-adapter/telegram": "4.41.1",
|
|
266
266
|
"@cursor/sdk": "1.2.0",
|
|
267
|
-
"@desplega.ai/agent-fs-just-bash": "0.18.
|
|
267
|
+
"@desplega.ai/agent-fs-just-bash": "0.18.15",
|
|
268
268
|
"@desplega.ai/business-use": "^0.4.2",
|
|
269
|
-
"@earendil-works/pi-agent-core": "^1.
|
|
270
|
-
"@earendil-works/pi-ai": "^1.
|
|
271
|
-
"@earendil-works/pi-coding-agent": "^1.
|
|
269
|
+
"@earendil-works/pi-agent-core": "^1.5.0",
|
|
270
|
+
"@earendil-works/pi-ai": "^1.5.0",
|
|
271
|
+
"@earendil-works/pi-coding-agent": "^1.5.0",
|
|
272
272
|
"@inkjs/ui": "^2.0.0",
|
|
273
273
|
"@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
|
|
274
274
|
"@linear/sdk": "^77.0.0",
|
|
@@ -381,7 +381,6 @@ function parseArgs(args) {
|
|
|
381
381
|
let dryRun = false;
|
|
382
382
|
let restore = false;
|
|
383
383
|
let yes = false;
|
|
384
|
-
let yolo = false;
|
|
385
384
|
let systemPrompt = "";
|
|
386
385
|
let systemPromptFile = "";
|
|
387
386
|
let additionalArgs = [];
|
|
@@ -415,8 +414,6 @@ function parseArgs(args) {
|
|
|
415
414
|
restore = true;
|
|
416
415
|
} else if (arg === "-y" || arg === "--yes") {
|
|
417
416
|
yes = true;
|
|
418
|
-
} else if (arg === "--yolo") {
|
|
419
|
-
yolo = true;
|
|
420
417
|
} else if (arg === "--system-prompt") {
|
|
421
418
|
systemPrompt = mainArgs[i + 1] || systemPrompt;
|
|
422
419
|
i++;
|
|
@@ -469,7 +466,6 @@ function parseArgs(args) {
|
|
|
469
466
|
dryRun,
|
|
470
467
|
restore,
|
|
471
468
|
yes,
|
|
472
|
-
yolo,
|
|
473
469
|
systemPrompt,
|
|
474
470
|
systemPromptFile,
|
|
475
471
|
additionalArgs,
|
|
@@ -584,7 +580,6 @@ Auto-reads AGENT_SWARM_API_KEY (or legacy API_KEY) from .env if present.`,
|
|
|
584
580
|
description: "Run Claude in headless loop mode as a worker agent.",
|
|
585
581
|
options: [
|
|
586
582
|
" -m, --msg <prompt> Custom prompt (default: /agent-swarm:start-worker)",
|
|
587
|
-
" --yolo Continue on errors instead of stopping",
|
|
588
583
|
" --system-prompt <text> Custom system prompt (appended to Claude)",
|
|
589
584
|
" --system-prompt-file <path> Read system prompt from file",
|
|
590
585
|
" -- <args...> Additional arguments to pass to Claude CLI",
|
|
@@ -593,7 +588,6 @@ Auto-reads AGENT_SWARM_API_KEY (or legacy API_KEY) from .env if present.`,
|
|
|
593
588
|
`),
|
|
594
589
|
examples: [
|
|
595
590
|
` ${binName} worker`,
|
|
596
|
-
` ${binName} worker --yolo`,
|
|
597
591
|
` ${binName} worker -m "Custom prompt"`,
|
|
598
592
|
` ${binName} worker --system-prompt "You are a Python specialist"`
|
|
599
593
|
].join(`
|
|
@@ -605,14 +599,13 @@ Auto-reads AGENT_SWARM_API_KEY (or legacy API_KEY) from .env if present.`,
|
|
|
605
599
|
Same options as worker.`,
|
|
606
600
|
options: [
|
|
607
601
|
" -m, --msg <prompt> Custom prompt",
|
|
608
|
-
" --yolo Continue on errors instead of stopping",
|
|
609
602
|
" --system-prompt <text> Custom system prompt",
|
|
610
603
|
" --system-prompt-file <path> Read system prompt from file",
|
|
611
604
|
" -- <args...> Additional arguments to pass to Claude CLI",
|
|
612
605
|
" -h, --help Show this help"
|
|
613
606
|
].join(`
|
|
614
607
|
`),
|
|
615
|
-
examples: [` ${binName} lead
|
|
608
|
+
examples: [` ${binName} lead`].join(`
|
|
616
609
|
`)
|
|
617
610
|
},
|
|
618
611
|
docs: {
|
|
@@ -844,7 +837,7 @@ function McpServer({ port, apiKey, dbPath }) {
|
|
|
844
837
|
if (dbPath) {
|
|
845
838
|
process.env.DATABASE_PATH = dbPath;
|
|
846
839
|
}
|
|
847
|
-
import("./http-
|
|
840
|
+
import("./http-7374brv5.js").then(() => {
|
|
848
841
|
setStatus("running");
|
|
849
842
|
}).catch((err) => {
|
|
850
843
|
setStatus("error");
|
|
@@ -921,19 +914,12 @@ function ClaudeRunner({ msg, headless, additionalArgs }) {
|
|
|
921
914
|
}, [msg, headless, additionalArgs, exit]);
|
|
922
915
|
return null;
|
|
923
916
|
}
|
|
924
|
-
function WorkerRunner({
|
|
925
|
-
prompt,
|
|
926
|
-
yolo,
|
|
927
|
-
systemPrompt,
|
|
928
|
-
systemPromptFile,
|
|
929
|
-
additionalArgs
|
|
930
|
-
}) {
|
|
917
|
+
function WorkerRunner({ prompt, systemPrompt, systemPromptFile, additionalArgs }) {
|
|
931
918
|
const { exit } = use_app_default();
|
|
932
919
|
import_react.useEffect(() => {
|
|
933
920
|
installConsoleScrub();
|
|
934
|
-
import("./worker-
|
|
921
|
+
import("./worker-y62rvvq3.js").then(({ runWorker }) => runWorker({
|
|
935
922
|
prompt: prompt || undefined,
|
|
936
|
-
yolo,
|
|
937
923
|
systemPrompt: systemPrompt || undefined,
|
|
938
924
|
systemPromptFile: systemPromptFile || undefined,
|
|
939
925
|
additionalArgs,
|
|
@@ -942,16 +928,15 @@ function WorkerRunner({
|
|
|
942
928
|
console.error("[error] Worker encountered an error:", err);
|
|
943
929
|
exit(err);
|
|
944
930
|
});
|
|
945
|
-
}, [prompt,
|
|
931
|
+
}, [prompt, systemPrompt, systemPromptFile, additionalArgs, exit]);
|
|
946
932
|
return null;
|
|
947
933
|
}
|
|
948
|
-
function LeadRunner({ prompt,
|
|
934
|
+
function LeadRunner({ prompt, systemPrompt, systemPromptFile, additionalArgs }) {
|
|
949
935
|
const { exit } = use_app_default();
|
|
950
936
|
import_react.useEffect(() => {
|
|
951
937
|
installConsoleScrub();
|
|
952
|
-
import("./lead-
|
|
938
|
+
import("./lead-zdqxsvjn.js").then(({ runLead }) => runLead({
|
|
953
939
|
prompt: prompt || undefined,
|
|
954
|
-
yolo,
|
|
955
940
|
systemPrompt: systemPrompt || undefined,
|
|
956
941
|
systemPromptFile: systemPromptFile || undefined,
|
|
957
942
|
additionalArgs,
|
|
@@ -960,7 +945,7 @@ function LeadRunner({ prompt, yolo, systemPrompt, systemPromptFile, additionalAr
|
|
|
960
945
|
console.error("[error] Lead encountered an error:", err);
|
|
961
946
|
exit(err);
|
|
962
947
|
});
|
|
963
|
-
}, [prompt,
|
|
948
|
+
}, [prompt, systemPrompt, systemPromptFile, additionalArgs, exit]);
|
|
964
949
|
return null;
|
|
965
950
|
}
|
|
966
951
|
function LazyComponent({
|
|
@@ -989,8 +974,8 @@ function LazyComponent({
|
|
|
989
974
|
}
|
|
990
975
|
return import_react.createElement(Component, props);
|
|
991
976
|
}
|
|
992
|
-
var loadOnboard = () => import("./onboard-
|
|
993
|
-
var loadConnect = () => import("./setup-
|
|
977
|
+
var loadOnboard = () => import("./onboard-vw8r2fdw.js").then(({ Onboard }) => Onboard);
|
|
978
|
+
var loadConnect = () => import("./setup-07n4727s.js").then(({ Setup }) => Setup);
|
|
994
979
|
function UnknownCommand({ command }) {
|
|
995
980
|
const { exit } = use_app_default();
|
|
996
981
|
import_react.useEffect(() => {
|
|
@@ -1028,7 +1013,6 @@ function App({ args }) {
|
|
|
1028
1013
|
dryRun,
|
|
1029
1014
|
restore,
|
|
1030
1015
|
yes,
|
|
1031
|
-
yolo,
|
|
1032
1016
|
systemPrompt,
|
|
1033
1017
|
systemPromptFile,
|
|
1034
1018
|
additionalArgs,
|
|
@@ -1072,7 +1056,6 @@ function App({ args }) {
|
|
|
1072
1056
|
case "worker":
|
|
1073
1057
|
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(WorkerRunner, {
|
|
1074
1058
|
prompt: msg,
|
|
1075
|
-
yolo,
|
|
1076
1059
|
systemPrompt,
|
|
1077
1060
|
systemPromptFile,
|
|
1078
1061
|
additionalArgs
|
|
@@ -1080,7 +1063,6 @@ function App({ args }) {
|
|
|
1080
1063
|
case "lead":
|
|
1081
1064
|
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(LeadRunner, {
|
|
1082
1065
|
prompt: msg,
|
|
1083
|
-
yolo,
|
|
1084
1066
|
systemPrompt,
|
|
1085
1067
|
systemPromptFile,
|
|
1086
1068
|
additionalArgs
|
|
@@ -1122,19 +1104,19 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
1122
1104
|
}
|
|
1123
1105
|
process.exit(0);
|
|
1124
1106
|
} else if (args.command === "hook") {
|
|
1125
|
-
const { runHook } = await import("./hook-
|
|
1107
|
+
const { runHook } = await import("./hook-bc6n49qn.js");
|
|
1126
1108
|
await runHook();
|
|
1127
1109
|
} else if (args.command === "codex-hook") {
|
|
1128
|
-
const { handleCodexHook } = await import("./codex-hook-
|
|
1110
|
+
const { handleCodexHook } = await import("./codex-hook-fac6175r.js");
|
|
1129
1111
|
await handleCodexHook();
|
|
1130
1112
|
process.exit(process.exitCode ?? 0);
|
|
1131
1113
|
} else if (args.command === "session-summary-stdin") {
|
|
1132
|
-
const { runSessionSummaryFromStdin } = await import("./hook-
|
|
1114
|
+
const { runSessionSummaryFromStdin } = await import("./hook-amcj4s10.js");
|
|
1133
1115
|
await runSessionSummaryFromStdin();
|
|
1134
1116
|
process.exit(process.exitCode ?? 0);
|
|
1135
1117
|
} else if (args.command === "x") {
|
|
1136
1118
|
const xArgs = process.argv.slice(process.argv.indexOf("x") + 1);
|
|
1137
|
-
const { runXCommand } = await import("./x-
|
|
1119
|
+
const { runXCommand } = await import("./x-2fyrt5pp.js");
|
|
1138
1120
|
await runXCommand(xArgs);
|
|
1139
1121
|
} else if (args.command === "scripts") {
|
|
1140
1122
|
const scriptsArgs = process.argv.slice(process.argv.indexOf("scripts") + 1);
|
|
@@ -1142,7 +1124,7 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
1142
1124
|
printHelp("scripts");
|
|
1143
1125
|
process.exit(scriptsArgs[0] === "reembed" || args.showHelp ? 0 : 1);
|
|
1144
1126
|
}
|
|
1145
|
-
const { runScriptsMaintenanceCommand } = await import("./maintenance-
|
|
1127
|
+
const { runScriptsMaintenanceCommand } = await import("./maintenance-h2ds9w6c.js");
|
|
1146
1128
|
await runScriptsMaintenanceCommand(scriptsArgs);
|
|
1147
1129
|
console.log("Scripts re-embedded.");
|
|
1148
1130
|
} else if (args.command === "rbac") {
|
|
@@ -1152,17 +1134,17 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
1152
1134
|
printHelp("rbac");
|
|
1153
1135
|
process.exit(args.showHelp ? 0 : 1);
|
|
1154
1136
|
}
|
|
1155
|
-
const { runRbacCliCommand } = await import("./rbac-roles-
|
|
1137
|
+
const { runRbacCliCommand } = await import("./rbac-roles-9044425x.js");
|
|
1156
1138
|
await runRbacCliCommand(rbacArgs);
|
|
1157
1139
|
} else if (args.command === "codex-login") {
|
|
1158
|
-
const { runCodexLogin } = await import("./codex-login-
|
|
1140
|
+
const { runCodexLogin } = await import("./codex-login-bcda78ge.js");
|
|
1159
1141
|
const codexLoginArgs = process.argv.slice(process.argv.indexOf("codex-login") + 1);
|
|
1160
1142
|
await runCodexLogin(codexLoginArgs);
|
|
1161
1143
|
} else if (args.command === "codex-session-runner") {
|
|
1162
|
-
const { runCodexSessionRunner } = await import("./codex-session-runner-
|
|
1144
|
+
const { runCodexSessionRunner } = await import("./codex-session-runner-qakzfx93.js");
|
|
1163
1145
|
await runCodexSessionRunner();
|
|
1164
1146
|
} else if (args.command === "claude-managed-setup") {
|
|
1165
|
-
const { runClaudeManagedSetup } = await import("./claude-managed-setup-
|
|
1147
|
+
const { runClaudeManagedSetup } = await import("./claude-managed-setup-7787fxtp.js");
|
|
1166
1148
|
const setupArgs = process.argv.slice(process.argv.indexOf("claude-managed-setup") + 1);
|
|
1167
1149
|
await runClaudeManagedSetup(setupArgs);
|
|
1168
1150
|
} else if (args.command === "worker-token") {
|
|
@@ -1170,11 +1152,11 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
1170
1152
|
const tokenArgs = process.argv.slice(process.argv.indexOf("worker-token") + 1);
|
|
1171
1153
|
process.exit(await runWorkerToken(tokenArgs));
|
|
1172
1154
|
} else if (args.command === "e2b") {
|
|
1173
|
-
const { runE2BCommand } = await import("./e2b-
|
|
1155
|
+
const { runE2BCommand } = await import("./e2b-s16txnpx.js");
|
|
1174
1156
|
const e2bArgs = process.argv.slice(process.argv.indexOf("e2b") + 1);
|
|
1175
1157
|
await runE2BCommand(e2bArgs);
|
|
1176
1158
|
} else if (args.command === "controller") {
|
|
1177
|
-
const { runController } = await import("./controller-
|
|
1159
|
+
const { runController } = await import("./controller-r5x9bg6e.js");
|
|
1178
1160
|
await runController(process.argv.slice(process.argv.indexOf("controller") + 1));
|
|
1179
1161
|
} else {
|
|
1180
1162
|
render_default(/* @__PURE__ */ jsx_dev_runtime.jsxDEV(App, {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
classifySystemOne,
|
|
3
3
|
init_system_one_shared
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-fjggej24.js";
|
|
5
5
|
import {
|
|
6
6
|
isRecord,
|
|
7
7
|
init_classifier_shared
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-m0cy2vyf.js";
|
|
9
9
|
import {
|
|
10
10
|
__esm
|
|
11
11
|
} from "./cli-242037k3.js";
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
checkCodexCredentials2,
|
|
3
3
|
createInProcessCodexSession2,
|
|
4
4
|
CodexAdapter2
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-
|
|
5
|
+
} from "./cli-k70e3x9e.js";
|
|
6
|
+
import"./cli-m5akxq8q.js";
|
|
7
7
|
import"./cli-kr5tjjtz.js";
|
|
8
8
|
import"./cli-98rwmcyc.js";
|
|
9
9
|
import"./cli-4bd1rck6.js";
|
|
10
10
|
import"./cli-jc1g9ndz.js";
|
|
11
|
-
import"./cli-
|
|
11
|
+
import"./cli-hwprv9e4.js";
|
|
12
12
|
import"./cli-0726awxw.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
13
|
+
import"./cli-jrp1dt73.js";
|
|
14
|
+
import"./cli-f2zenhja.js";
|
|
15
|
+
import"./cli-b932gexn.js";
|
|
16
|
+
import"./cli-jrzkw01m.js";
|
|
17
17
|
export {
|
|
18
18
|
CodexAdapter2 as CodexAdapter,
|
|
19
19
|
checkCodexCredentials2 as checkCodexCredentials,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
loadAllCodexOAuthSlots,
|
|
9
9
|
storeCodexOAuth,
|
|
10
10
|
init_storage
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-rvhdmjvt.js";
|
|
12
12
|
import {
|
|
13
13
|
getApiKey,
|
|
14
14
|
init_api_key
|
|
@@ -269,7 +269,7 @@ OAuth flow completed successfully!`);
|
|
|
269
269
|
Storing credentials in swarm API config store...`);
|
|
270
270
|
await store(apiUrl, apiKey, creds, slot);
|
|
271
271
|
log(`Credentials stored successfully in slot ${slot}!`);
|
|
272
|
-
const keySuffix = deriveCodexKeySuffix(creds.access, creds.accountId);
|
|
272
|
+
const keySuffix = deriveCodexKeySuffix(creds.access, creds.accountId, slot);
|
|
273
273
|
try {
|
|
274
274
|
if (typeof authFence !== "number")
|
|
275
275
|
throw authFence;
|