@desplega.ai/agent-swarm 2.14.0 → 2.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-adapter-q1vz4hh2.js +17 -0
- package/dist/{acp-targets-23exz4z4.js → acp-targets-d44eerh4.js} +10 -10
- package/dist/{actions-zcr25x27.js → actions-z4k4bvss.js} +28 -28
- package/dist/{agent-fs-provision-7fa9e12e.js → agent-fs-provision-aan1cgpx.js} +4 -4
- package/dist/{amp-adapter-s7ytmv6b.js → amp-adapter-wac3py0p.js} +3 -3
- package/dist/{anthropic-messages-vdd1zmha.js → anthropic-messages-njt2r5m4.js} +28 -27
- package/dist/{app-5d3sz1hy.js → app-wax6qz5e.js} +10 -10
- package/dist/{approval-notifications-7qgkzkzx.js → approval-notifications-6fvkhnma.js} +11 -11
- package/dist/{assistant-p2yvhc3j.js → assistant-e8fe08zx.js} +29 -29
- package/dist/{azure-openai-responses-jeaas6x0.js → azure-openai-responses-6ewf9rwp.js} +6 -6
- package/dist/{boot-args-schema-ry6cb0p7.js → boot-args-schema-rv97cmnt.js} +1 -1
- package/dist/{boot-reembed-c9643ms3.js → boot-reembed-bcn7frk9.js} +1 -1
- package/dist/{boot-reembed-2hkm3vz2.js → boot-reembed-xakrdy6y.js} +1 -1
- package/dist/{boot-scrub-sweep-3ycxr51t.js → boot-scrub-sweep-20t8akhf.js} +2 -2
- package/dist/{boot-seeds-2hzvvzg0.js → boot-seeds-48rr6r29.js} +4 -4
- package/dist/{boxd-9py3x0jb.js → boxd-tjpxwecx.js} +3 -3
- package/dist/{claude-adapter-dnkww93e.js → claude-adapter-0wzwntrj.js} +12 -13
- package/dist/{claude-managed-adapter-yk0cr5x6.js → claude-managed-adapter-4xcgt46w.js} +4 -4
- package/dist/{claude-managed-setup-4byxpp47.js → claude-managed-setup-91cyktw7.js} +7 -7
- package/dist/{claude-sdk-session-4wf3dbvs.js → claude-sdk-session-ngj4dce5.js} +11144 -12464
- package/dist/{cli-gcyws2bp.js → cli-021hrewp.js} +2 -2
- package/dist/{cli-wvgg7r4j.js → cli-08gfvs58.js} +2 -2
- package/dist/{cli-2zjxake1.js → cli-0kyjrbaa.js} +4 -4
- package/dist/{cli-rp1n2xpd.js → cli-0nvqg1hb.js} +1 -1
- package/dist/{cli-vxmmttmt.js → cli-0nz04gqv.js} +50 -50
- package/dist/{cli-vr4eyq6p.js → cli-0rrft7s3.js} +538 -410
- package/dist/{cli-mw1tmn3x.js → cli-1d9q7qrn.js} +7 -7
- package/dist/{cli-84xn7bgz.js → cli-1t5vhrpv.js} +1 -1
- package/dist/{cli-hzhv7yac.js → cli-1zbj28py.js} +1 -1
- package/dist/{cli-z8t4485r.js → cli-2ja7eadd.js} +2 -2
- package/dist/{cli-r04ve9xw.js → cli-2r62jy9s.js} +1 -1
- package/dist/{cli-9fwznq4p.js → cli-3ffzr65w.js} +7 -7
- package/dist/{cli-2ckwgs7q.js → cli-3kdgm393.js} +5 -5
- package/dist/{cli-jwnac23b.js → cli-3vc518cw.js} +1 -1
- package/dist/{cli-6p8p2e6r.js → cli-5188hq0a.js} +1286 -31
- package/dist/{cli-zcghfsdg.js → cli-53gt8wfv.js} +1 -1
- package/dist/{cli-930zbczq.js → cli-5njmmmer.js} +3 -3
- package/dist/{cli-dw9rtjm3.js → cli-5rw7nt99.js} +3061 -727
- package/dist/{cli-6c61yjwy.js → cli-5xx353cy.js} +7554 -1534
- package/dist/{cli-2ap1the6.js → cli-65k149j5.js} +2 -2
- package/dist/{cli-v41kn3cd.js → cli-6prwz0zn.js} +4427 -5566
- package/dist/{cli-yd7e590v.js → cli-6zpn5hmp.js} +12 -12
- package/dist/{cli-ty3gha1p.js → cli-7b9bwrfg.js} +2 -2
- package/dist/{cli-2414h5r9.js → cli-7dpdq7yh.js} +11428 -1914
- package/dist/{cli-r9d2tya0.js → cli-7qkbab03.js} +5 -5
- package/dist/{cli-7ca8hczj.js → cli-7svwhw1a.js} +1 -1
- package/dist/cli-7wwewkf4.js +37 -0
- package/dist/{cli-ejnhs815.js → cli-83hynhes.js} +17 -13
- package/dist/{cli-rs1rzwp4.js → cli-8crn0510.js} +1 -1
- package/dist/{cli-f2rwt43y.js → cli-8ee7xt75.js} +13 -13
- package/dist/{cli-9j47sgzy.js → cli-8ef94zm2.js} +2 -2
- package/dist/{cli-9fvk9mv8.js → cli-8gr1bg9t.js} +1 -1
- package/dist/{cli-b0m3bg0f.js → cli-9j1qcs0b.js} +1 -1
- package/dist/{cli-ad00h1st.js → cli-9mvfvggt.js} +7 -7
- package/dist/{cli-xh5fpmg8.js → cli-9txap41q.js} +101 -18
- package/dist/{cli-24wervhz.js → cli-aktk3qt6.js} +3 -3
- package/dist/{cli-6ajyhxh7.js → cli-an8bpy60.js} +2 -2
- package/dist/{cli-meydjstb.js → cli-azptj8xe.js} +5591 -69
- package/dist/cli-c0rt16vk.js +15 -0
- package/dist/{cli-w4bvtxet.js → cli-c6vhcknq.js} +7 -7
- package/dist/{cli-2savn6mm.js → cli-cczffwak.js} +7 -7
- package/dist/{cli-ze1ndjs4.js → cli-cgmka83w.js} +3 -3
- package/dist/{cli-kc7vd07m.js → cli-d13qgcct.js} +3699 -1733
- package/dist/{cli-k3facve0.js → cli-d5nvy1jy.js} +1 -1
- package/dist/{cli-edxfzgah.js → cli-dev6f0px.js} +4 -4
- package/dist/{cli-0e914dp9.js → cli-dzhht0vq.js} +3 -3
- package/dist/{cli-m0ea8ggd.js → cli-e13kbyq0.js} +2 -2
- package/dist/{cli-73rmgm45.js → cli-e2k0ej0d.js} +2 -2
- package/dist/cli-ek8b88kv.js +9740 -0
- package/dist/{cli-0k7ppk9k.js → cli-ertcjw6z.js} +281 -46
- package/dist/{cli-qrwjk4xy.js → cli-f3ta4e67.js} +5 -5
- package/dist/{cli-1nfabrt4.js → cli-f4xv7s0t.js} +7 -7
- package/dist/{cli-phe2vcw5.js → cli-fdam1t9b.js} +171 -104
- package/dist/{cli-gc6b94tj.js → cli-fe8he9cy.js} +2 -2
- package/dist/{cli-spfz393q.js → cli-feh37wgs.js} +598 -219
- package/dist/{cli-ebqx630g.js → cli-fjzjtqna.js} +35 -18
- package/dist/{cli-37p61fcg.js → cli-fs9t2m2k.js} +18 -20
- package/dist/{cli-7w1fs01q.js → cli-g03x26q6.js} +2 -2
- package/dist/{cli-879txsac.js → cli-gnkzh8ed.js} +4 -4
- package/dist/{cli-v4z5v3jd.js → cli-gy0r7gb8.js} +514 -337
- package/dist/{cli-s4pccby1.js → cli-h0edykd1.js} +1 -1
- package/dist/{cli-pq0kv31y.js → cli-h364asjc.js} +9 -9
- package/dist/{cli-69szn7w7.js → cli-h3xcfp4c.js} +93 -54
- package/dist/{cli-jcnc5ret.js → cli-h8k5801a.js} +73 -27
- package/dist/{cli-6yy4fepf.js → cli-h96yp7xv.js} +4 -4
- package/dist/{cli-q5n3deaf.js → cli-hab0bvrh.js} +1 -1
- package/dist/{cli-g6a696c0.js → cli-j3wqt73b.js} +4 -4
- package/dist/{cli-wym6rxgt.js → cli-jfgaz10x.js} +10 -15
- package/dist/{cli-shyhb4t5.js → cli-jrhvywah.js} +53 -52
- package/dist/{cli-qkbevqer.js → cli-jrxt5j0n.js} +3 -3
- package/dist/{cli-7b7rxz22.js → cli-jw7n9pct.js} +5 -2
- package/dist/{cli-8vbxjzk0.js → cli-k9kfck3s.js} +3 -3
- package/dist/{cli-yjb3cddd.js → cli-kkwq5b12.js} +1 -1
- package/dist/{cli-39t9d248.js → cli-kz8rar0g.js} +1 -1
- package/dist/{cli-rzbsh6bw.js → cli-n15fhd43.js} +1 -1
- package/dist/{cli-1jx0srjt.js → cli-nc842kc9.js} +1921 -80
- package/dist/{cli-9j1t3kf6.js → cli-nmj4phcg.js} +2 -2
- package/dist/{cli-t9pzz2eq.js → cli-ntmjzyte.js} +4 -1
- package/dist/{cli-adzmmcvf.js → cli-praaw1wh.js} +2 -2
- package/dist/{cli-f9g96z28.js → cli-q44p4869.js} +11 -11
- package/dist/{cli-fww016hh.js → cli-q58qt9dw.js} +1711 -7287
- package/dist/{cli-njvpngc6.js → cli-qqz5z36e.js} +3 -3
- package/dist/{cli-096aftq6.js → cli-r7rpy2xz.js} +7 -7
- package/dist/cli-rcqgr0hs.js +30 -0
- package/dist/{cli-ph95yejc.js → cli-rjc464jg.js} +2 -2
- package/dist/{cli-md4tn21h.js → cli-rw3m83j4.js} +40 -26
- package/dist/cli-rwcj6wt3.js +1291 -0
- package/dist/{cli-srq69pn1.js → cli-ryn4y478.js} +1 -1
- package/dist/{cli-jgq9xptq.js → cli-s48k2rzx.js} +4 -4
- package/dist/{cli-cbg0j1yt.js → cli-s90wcbk9.js} +3 -3
- package/dist/{cli-2ayk9gn8.js → cli-svcy72s5.js} +2 -2
- package/dist/{cli-4dyzzkfb.js → cli-swtwbg85.js} +944 -170
- package/dist/{cli-mv8ft7b0.js → cli-t1bqpzgz.js} +3 -3
- package/dist/{cli-tc165vrb.js → cli-t5jbjq61.js} +4 -3
- package/dist/{cli-enavhq6r.js → cli-tbrjvrrg.js} +1 -1
- package/dist/{cli-mz7ycqn8.js → cli-td2h8zej.js} +6 -6
- package/dist/{cli-9t7syepg.js → cli-ttatvwn6.js} +1 -1
- package/dist/{cli-ayxxkk3p.js → cli-txxcf9s1.js} +8 -8
- package/dist/{cli-q4z9s6zs.js → cli-v7az4d1g.js} +2 -2
- package/dist/cli-vqt44168.js +14 -0
- package/dist/{cli-q457ga28.js → cli-vs9h3vw2.js} +14 -14
- package/dist/{cli-snxhtehz.js → cli-w2fg8kjc.js} +7 -8
- package/dist/{cli-wd7b5hgc.js → cli-w81s97bn.js} +1 -1
- package/dist/{cli-bqfx72e6.js → cli-wkzrknpt.js} +1 -1
- package/dist/{cli-cg1q8ymp.js → cli-wqpvfq2m.js} +1 -1
- package/dist/{cli-kg63yp1r.js → cli-wz7qj1jy.js} +19 -19
- package/dist/{cli-3wsabyt0.js → cli-x5t54ytt.js} +2 -2
- package/dist/{cli-r495stwd.js → cli-xd6ntv7x.js} +2 -2
- package/dist/{cli-wvbaq052.js → cli-xphbv66z.js} +10 -3
- package/dist/{cli-a49frv85.js → cli-xxgqn93n.js} +3753 -1186
- package/dist/{cli-91amj3md.js → cli-z209g721.js} +111 -87
- package/dist/{cli-3mhdmcd4.js → cli-z5andw8k.js} +1 -1
- package/dist/{cli-7g5qj2ca.js → cli-zcb64xzv.js} +1 -1
- package/dist/{cli-0h6m6z5g.js → cli-zr2sc5tr.js} +1 -1
- package/dist/{cli-krk8y8c7.js → cli-zrm0610v.js} +1833 -518
- package/dist/cli.js +73 -73
- package/dist/{cloudflare-workers-ai-system-one-w3m0fbf8.js → cloudflare-workers-ai-system-one-kb0tq22h.js} +2 -2
- package/dist/{codex-adapter-eq61radw.js → codex-adapter-0c1ynrmt.js} +9 -9
- package/dist/{codex-hook-8nmepvz6.js → codex-hook-w5nmtrn2.js} +2 -2
- package/dist/{codex-login-vbd9707w.js → codex-login-67qarfcg.js} +1 -1
- package/dist/{codex-session-runner-rfx355h4.js → codex-session-runner-z4t9z7yy.js} +10 -10
- package/dist/{commands-d1z0sx62.js → commands-h0jxqdhk.js} +3 -3
- package/dist/{controller-9hz6d8x3.js → controller-4ygy66hv.js} +4 -4
- package/dist/{controllers-connect-tz07d2xr.js → controllers-connect-ynbvv8pv.js} +28 -28
- package/dist/core-mj9fzrcm.js +41 -0
- package/dist/{cursor-adapter-ef22ze3j.js → cursor-adapter-9e4d6658.js} +2 -2
- package/dist/{db-gd81d68c.js → db-bg0hxjq1.js} +3 -3
- package/dist/{db-vrckks6q.js → db-q12gmpns.js} +2 -2
- package/dist/{devin-adapter-kdt6a2bh.js → devin-adapter-tn1twrha.js} +1 -1
- package/dist/{devtools-qxfgbsqz.js → devtools-t8my9az6.js} +1 -1
- package/dist/{dispatcher-76as8w2t.js → dispatcher-v5dbfscq.js} +24 -24
- package/dist/{docker-51ta7jsh.js → docker-6007r2fj.js} +2 -2
- package/dist/{dsh-adapter-ypfvcdyz.js → dsh-adapter-z3fneea1.js} +2 -2
- package/dist/{e2b-05kn3kpq.js → e2b-k3kb8b52.js} +4 -4
- package/dist/{e2b-dm9r8hpy.js → e2b-p269awh6.js} +5 -5
- package/dist/{easter-egg-3d-sg21j15g.js → easter-egg-3d-y49v5z90.js} +1 -1
- package/dist/{embedding-space-zsdw37bb.js → embedding-space-mjt5ksq0.js} +5 -5
- package/dist/{embeddings-p4e3e1m6.js → embeddings-td9hgnc5.js} +1 -1
- package/dist/emscripten-module-Q67P5WYC-3sde6cre.js +2458 -0
- package/dist/{event-bus-tvf2grf4.js → event-bus-pawddp92.js} +1 -1
- package/dist/{execute-nztd0af0.js → execute-z8nc8bba.js} +1 -1
- package/dist/{external-channel-717yzn4d.js → external-channel-pjenc2ag.js} +2 -2
- package/dist/ffi-cbfmmtqk.js +85 -0
- package/dist/fx-adapter-pjeztp0n.js +20 -0
- package/dist/getMachineId-bsd-hjs2tbdp.js +36 -0
- package/dist/getMachineId-darwin-kzbvr8s3.js +40 -0
- package/dist/getMachineId-linux-embmcq2c.js +26 -0
- package/dist/getMachineId-unsupported-jvznc6d4.js +20 -0
- package/dist/getMachineId-win-qr8z0b13.js +36 -0
- package/dist/{google-generative-ai-sw77egmr.js → google-generative-ai-tf3w7557.js} +11 -16
- package/dist/{google-vertex-rrw93g8h.js → google-vertex-9pj87bd8.js} +15 -17
- package/dist/grok-adapter-davbhx8t.js +20 -0
- package/dist/handlers-rf130hnp.js +39 -0
- package/dist/heartbeat-9hmvqxk0.js +49 -0
- package/dist/hook-0b1jqs2t.js +21 -0
- package/dist/{hook-ctz0xmp3.js → hook-1n0sjv8p.js} +10 -11
- package/dist/{http-zregegrx.js → http-vykejyjx.js} +432 -170
- package/dist/{index-7dgxveck.js → index-07d66kdm.js} +3 -3
- package/dist/index-0hgjxqz8.js +10584 -0
- package/dist/{index-rz8ve510.js → index-0nt39qwy.js} +2 -2
- package/dist/{index-ym9fgxad.js → index-2xbxq71g.js} +2 -2
- package/dist/{index-42jq9yy3.js → index-3j8hffkb.js} +12327 -7450
- package/dist/index-8w09aggw.js +43 -0
- package/dist/{index-5kx15d19.js → index-b3wy4jzs.js} +1 -1
- package/dist/{index-kzdqn3dd.js → index-dt9vr7tb.js} +3143 -760
- package/dist/{index-maddg9ys.js → index-ezfas4jj.js} +5858 -15337
- package/dist/index-g2jntx15.js +38 -0
- package/dist/{index-x9qf8dg7.js → index-j6sqtb83.js} +105 -75
- package/dist/{index-m6g8q65g.js → index-na0tczq0.js} +9268 -10220
- package/dist/{index-whysn1wf.js → index-p9dkwhwe.js} +1 -1
- package/dist/{index-126v2d0t.js → index-pe2etczf.js} +6 -2918
- package/dist/{index-mtnbhe12.js → index-q60mhcpd.js} +23631 -19921
- package/dist/index-qffex5k4.js +41 -0
- package/dist/index-qrp11tp9.js +4 -0
- package/dist/{index-kdmkfjt7.js → index-ryyrg0d8.js} +3426 -2333
- package/dist/{index-t17p395x.js → index-sf06w57a.js} +13 -13
- package/dist/{index-evay0xyk.js → index-vybnwd5v.js} +1 -1
- package/dist/{index-fdym6ryb.js → index-wsf1f5pe.js} +28 -28
- package/dist/{k8s-ejkk0aw7.js → k8s-mr1r12th.js} +2 -2
- package/dist/{keepalive-zdqay870.js → keepalive-86z0tzzf.js} +4 -4
- package/dist/lead-edmwagkn.js +81 -0
- package/dist/{llama-cpp-classify-yvb8vh7w.js → llama-cpp-classify-wd7htn1x.js} +2 -2
- package/dist/{maintenance-t5ndg11m.js → maintenance-19h6tfwz.js} +1 -1
- package/dist/{mistral-conversations-w4bncwbt.js → mistral-conversations-txjmc64f.js} +7 -7
- package/dist/module-ES6BEMUI-44w9s1dx.js +1210 -0
- package/dist/{multipart-parser-xevcstye.js → multipart-parser-xqbgwrav.js} +1 -1
- package/dist/{node-0as4n1ef.js → node-q4628t0b.js} +1 -1
- package/dist/{oauth-refresh-sweep-y9zyd7t6.js → oauth-refresh-sweep-6nmyrv32.js} +3 -3
- package/dist/{object-webhooks-mkca91s0.js → object-webhooks-2kynmdf8.js} +7 -7
- package/dist/{onboard-ss995244.js → onboard-zbpm96mn.js} +7 -7
- package/dist/{openai-codex-responses-70g39cgz.js → openai-codex-responses-6ckhys6r.js} +35 -29
- package/dist/{openai-completions-cv3hp4h5.js → openai-completions-c9dsq9jh.js} +15 -15
- package/dist/{openai-decisions-fyq1p9f9.js → openai-decisions-9vzvv10c.js} +2 -2
- package/dist/{openai-responses-trsvnks6.js → openai-responses-bhfmt9sa.js} +6 -6
- package/dist/{opencode-adapter-mwpz0278.js → opencode-adapter-fyqcbdra.js} +8 -8
- package/dist/{openrouter-images-0jj12a2q.js → openrouter-images-hkk5p580.js} +3 -3
- package/dist/otel-impl-txa20w1h.js +11178 -0
- package/dist/{pending-2sxh1t6j.js → pending-4rxawq8y.js} +25 -25
- package/dist/{pi-messages-zk3g4esn.js → pi-messages-py3f96p7.js} +5 -5
- package/dist/{pi-mono-adapter-sfb7zy43.js → pi-mono-adapter-rnsed1xa.js} +24 -27
- package/dist/{pricing-refresh-h79bg4cf.js → pricing-refresh-4314hwtw.js} +2 -2
- package/dist/{rbac-roles-ckq0czp4.js → rbac-roles-fztcm8ky.js} +2 -2
- package/dist/{rbac-roles-jg2e260w.js → rbac-roles-msqt7a3k.js} +3 -3
- package/dist/{render-v2-ymbshmn0.js → render-v2-w49wtecg.js} +10 -10
- package/dist/{resume-jdhnt4jk.js → resume-gwgtp4m3.js} +13 -13
- package/dist/{runtime-y28jhhnf.js → runtime-kkebz8yq.js} +1 -1
- package/dist/{session-access-k4ta5hvp.js → session-access-kjb19m2w.js} +5 -5
- package/dist/{session-source-backfill-528j4s8j.js → session-source-backfill-805p4wqr.js} +3 -3
- package/dist/{setup-d6pj82fr.js → setup-q8y168c8.js} +3 -3
- package/dist/thread-buffer-yqbffd0t.js +40 -0
- package/dist/{token-util-pjgekqxr.js → token-util-hnzceyn9.js} +1 -1
- package/dist/{token-pgr2w4s3.js → token-xnc02n6w.js} +21 -14
- package/dist/{tree-visibility-kjxv3nxk.js → tree-visibility-qj323994.js} +2 -2
- package/dist/{typesafe-system-one-qkvkgrcz.js → typesafe-system-one-avrdb4zm.js} +2 -2
- package/dist/{user-merge-jobs-rabbncf6.js → user-merge-jobs-qfp40f2s.js} +3 -3
- package/dist/{virtual-modules-22k51txd.js → virtual-modules-nzxegw0a.js} +7 -7
- package/dist/{work-objects-xtjbar3r.js → work-objects-hs089w60.js} +26 -26
- package/dist/{worker-follow-up-fg48vk6d.js → worker-follow-up-zwgg20sr.js} +24 -24
- package/dist/worker-kg4g7rnx.js +81 -0
- package/dist/{x-vfsqypht.js → x-k29vmskt.js} +2 -2
- package/openapi.json +59 -3
- package/package.json +53 -52
- package/plugin/commands/create-pr.md +5 -2
- package/plugin/pi-skills/create-pr/SKILL.md +5 -2
- package/src/apps/sync.ts +7 -2
- package/src/be/db/model-profiles.ts +103 -12
- package/src/be/db/tasks/read.ts +5 -0
- package/src/be/db/workflow-runs.ts +12 -8
- package/src/be/db.ts +18 -5
- package/src/be/migrations/367_workflow_run_principal.sql +5 -0
- package/src/be/model-group-resolution.ts +134 -0
- package/src/be/model-tier-resolution.ts +120 -17
- package/src/be/model-validation.ts +9 -1
- package/src/be/runtime-pools/routing.ts +22 -8
- package/src/be/scripts/extract-schema.ts +7 -0
- package/src/be/swarm-config-guard.ts +20 -7
- package/src/be/task-auto-title-listener.ts +2 -2
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/extensions/post-bridge.ts +27 -28
- package/src/http/active-sessions.ts +7 -0
- package/src/http/agents.ts +7 -0
- package/src/http/api-keys.ts +7 -0
- package/src/http/approval-requests.ts +4 -0
- package/src/http/budgets.ts +2 -0
- package/src/http/codex-oauth-keep-warm.ts +6 -2
- package/src/http/config.ts +1 -0
- package/src/http/context.ts +4 -0
- package/src/http/db-query.ts +11 -2
- package/src/http/events.ts +2 -0
- package/src/http/fs.ts +1 -0
- package/src/http/integrations.ts +4 -0
- package/src/http/mcp-bridge.ts +1 -0
- package/src/http/memory.ts +3 -0
- package/src/http/metrics.ts +16 -0
- package/src/http/oauth-locks.ts +8 -0
- package/src/http/operator-actor.ts +3 -8
- package/src/http/page-proxy.ts +16 -0
- package/src/http/pages.ts +9 -0
- package/src/http/poll.ts +21 -1
- package/src/http/pricing.ts +2 -0
- package/src/http/prompt-templates.ts +34 -0
- package/src/http/repos.ts +3 -1
- package/src/http/schedules.ts +33 -3
- package/src/http/script-runs.ts +24 -0
- package/src/http/scripts.ts +1 -0
- package/src/http/session-data.ts +2 -0
- package/src/http/status.ts +1 -0
- package/src/http/tasks.ts +28 -1
- package/src/http/trackers/jira.ts +2 -0
- package/src/http/trackers/linear.ts +4 -0
- package/src/http/users.ts +18 -0
- package/src/http/webhooks.ts +12 -0
- package/src/http/workflow-events.ts +26 -6
- package/src/http/workflows.ts +40 -0
- package/src/http/x.ts +4 -0
- package/src/linear/app.ts +3 -2
- package/src/linear/client.ts +5 -1
- package/src/linear/host.ts +40 -0
- package/src/linear/oauth.ts +3 -2
- package/src/linear/sync.ts +4 -3
- package/src/otel-impl.ts +8 -5
- package/src/prompts/base-prompt.ts +10 -6
- package/src/prompts/session-templates.ts +3 -3
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +11 -9
- package/src/providers/cursor-adapter.ts +1 -1
- package/src/rbac/legacy-policy.ts +2 -0
- package/src/rbac/permissions.ts +5 -0
- package/src/realtime/browser.generated.txt +1 -1
- package/src/scheduler/schedule-task.ts +1 -0
- package/src/scripts-runtime/quickjs-compat.ts +44 -10
- package/src/scripts-runtime/types/swarm-extension.d.ts +2 -0
- package/src/slack/config.ts +4 -0
- package/src/slack/render-v2.ts +52 -24
- package/src/slack/responses.ts +2 -1
- package/src/slack/reviewed-deliverables.ts +251 -0
- package/src/tasks/follow-up-gate.ts +142 -38
- package/src/tasks/worker-follow-up.ts +126 -37
- package/src/tests/amp-adapter.test.ts +57 -9
- package/src/tests/base-prompt.test.ts +36 -2
- package/src/tests/check-pr-body.test.ts +408 -93
- package/src/tests/compose-dev-object-store.test.ts +13 -0
- package/src/tests/compose-example-object-store.test.ts +67 -0
- package/src/tests/db-query.test.ts +8 -4
- package/src/tests/db-retention-defaults.test.ts +28 -3
- package/src/tests/e2b-dispatch.test.ts +7 -1
- package/src/tests/entrypoint-repo-autoclone-args.test.ts +10 -0
- package/src/tests/follow-up-gate-shadow.test.ts +268 -10
- package/src/tests/linear-outbound-sync.test.ts +59 -25
- package/src/tests/operator-actor-keyless.test.ts +103 -0
- package/src/tests/otel-event-loop-and-logs.test.ts +1 -1
- package/src/tests/profile-tier-alias.test.ts +9 -3
- package/src/tests/quickjs-compat.test.ts +40 -4
- package/src/tests/rbac-route-verbs-e2e.test.ts +142 -0
- package/src/tests/runner-repo-clone-args.test.ts +15 -6
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/slack-render-v2.test.ts +52 -8
- package/src/tests/workflow-definition-pinning.test.ts +2 -0
- package/src/tests/workflow-hitl-routing.test.ts +67 -5
- package/src/tests/workflow-replay.test.ts +13 -1
- package/src/tests/workflow-system-one-extraction.test.ts +21 -0
- package/src/tests/workflow-wait-filter.test.ts +7 -7
- package/src/tests/worktree-reaper.test.ts +15 -4
- package/src/tests/x402-client.test.ts +82 -0
- package/src/tools/memory-rate.ts +2 -2
- package/src/tools/prompt-templates/delete.ts +22 -1
- package/src/tools/prompt-templates/set.ts +15 -1
- package/src/tools/schedules/create-schedule.ts +20 -3
- package/src/tools/schedules/patch-schedule.ts +30 -4
- package/src/tools/schedules/update-schedule.ts +30 -4
- package/src/tools/send-task.ts +17 -3
- package/src/tools/slack-post.ts +7 -2
- package/src/tools/slack-reply.ts +6 -2
- package/src/tools/task-action.ts +16 -3
- package/src/tools/utils.ts +1 -1
- package/src/types.ts +10 -0
- package/src/utils/amp-models.ts +20 -4
- package/src/utils/constants.ts +5 -4
- package/src/utils/secret-scrubber.ts +6 -4
- package/src/utils/task-citations.ts +11 -0
- package/src/workflows/engine.ts +41 -8
- package/src/workflows/executors/agent-task.ts +13 -2
- package/src/workflows/executors/code-match.ts +11 -31
- package/src/workflows/executors/script.ts +13 -0
- package/src/workflows/executors/sub-workflow.ts +5 -7
- package/src/workflows/executors/swarm-script.ts +4 -5
- package/src/workflows/executors/system-one-extraction.ts +9 -6
- package/src/workflows/executors/wait.ts +1 -1
- package/src/workflows/foreach-driver.ts +5 -1
- package/src/workflows/model-validation.ts +13 -1
- package/src/workflows/predicate-sandbox.ts +171 -0
- package/src/workflows/resume.ts +21 -4
- package/src/workflows/retry-poller.ts +1 -1
- package/src/workflows/run-principal.ts +51 -0
- package/src/workflows/wait-filter.ts +14 -192
- package/src/x402/client.ts +38 -17
- package/templates/skills/code-quality/content.md +1 -1
- package/templates/skills/heartbeat-runbook/content.md +1 -0
- package/templates/skills/pages/content.md +36 -12
- package/templates/skills/slack-interaction/content.md +4 -0
- package/templates/skills/swarm-docs/content.md +47 -41
- package/templates/skills/swarm-scripts/SKILL.md +1 -1
- package/templates/skills/swarm-scripts/content.md +1 -1
- package/dist/acp-adapter-99n6z9ky.js +0 -17
- package/dist/cli-5ss6qqt9.js +0 -45
- package/dist/cli-dzzh58sy.js +0 -6996
- package/dist/cli-e8trbfx1.js +0 -15
- package/dist/cli-j9ccfveb.js +0 -1849
- package/dist/cli-mna6pmfx.js +0 -1485
- package/dist/cli-r8ddn0hf.js +0 -25583
- package/dist/core-dynsv289.js +0 -41
- package/dist/fx-adapter-9k0hptnz.js +0 -20
- package/dist/getMachineId-bsd-637a7rbk.js +0 -36
- package/dist/getMachineId-darwin-9vytrcnn.js +0 -36
- package/dist/getMachineId-linux-mkzsvyyz.js +0 -29
- package/dist/getMachineId-unsupported-4cfs2n11.js +0 -19
- package/dist/getMachineId-win-154s3qma.js +0 -38
- package/dist/grok-adapter-skdj2pce.js +0 -20
- package/dist/handlers-5btjqkz6.js +0 -39
- package/dist/heartbeat-vfb1gy84.js +0 -49
- package/dist/hook-eh52p7yd.js +0 -22
- package/dist/index-7w8p6em0.js +0 -41
- package/dist/index-t56y945n.js +0 -4
- package/dist/index-vfemrwwk.js +0 -10002
- package/dist/index-vz4semsx.js +0 -38
- package/dist/index-y3s0xp2v.js +0 -43
- package/dist/lead-6cscw8a5.js +0 -82
- package/dist/otel-impl-6n6vva3x.js +0 -28205
- package/dist/thread-buffer-9w6x5zec.js +0 -40
- package/dist/worker-g4aj93dt.js +0 -82
package/src/http/workflows.ts
CHANGED
|
@@ -199,6 +199,10 @@ const createWorkflowRoute = route({
|
|
|
199
199
|
409: { description: "Idempotency-Key was already used for a different request" },
|
|
200
200
|
410: { description: "The workflow created under this Idempotency-Key was deleted" },
|
|
201
201
|
},
|
|
202
|
+
rbac: {
|
|
203
|
+
ungated:
|
|
204
|
+
"workflow definitions: open to agents like the workflow tools; no verb covers them, so user roles need admin",
|
|
205
|
+
},
|
|
202
206
|
});
|
|
203
207
|
|
|
204
208
|
const getWorkflowRoute = route({
|
|
@@ -255,6 +259,10 @@ const updateWorkflowRoute = route({
|
|
|
255
259
|
403: { description: "Env var or secret input requires config.read.secrets" },
|
|
256
260
|
404: { description: "Workflow not found" },
|
|
257
261
|
},
|
|
262
|
+
rbac: {
|
|
263
|
+
ungated:
|
|
264
|
+
"workflow definitions: open to agents like the workflow tools; no verb covers them, so user roles need admin",
|
|
265
|
+
},
|
|
258
266
|
});
|
|
259
267
|
|
|
260
268
|
const patchWorkflowRoute = route({
|
|
@@ -274,6 +282,10 @@ const patchWorkflowRoute = route({
|
|
|
274
282
|
403: { description: "Stored env var or secret input requires config.read.secrets" },
|
|
275
283
|
404: { description: "Workflow not found" },
|
|
276
284
|
},
|
|
285
|
+
rbac: {
|
|
286
|
+
ungated:
|
|
287
|
+
"workflow definitions: open to agents like the workflow tools; no verb covers them, so user roles need admin",
|
|
288
|
+
},
|
|
277
289
|
});
|
|
278
290
|
|
|
279
291
|
const patchWorkflowNodeRoute = route({
|
|
@@ -293,6 +305,10 @@ const patchWorkflowNodeRoute = route({
|
|
|
293
305
|
403: { description: "Stored env var or secret input requires config.read.secrets" },
|
|
294
306
|
404: { description: "Workflow or node not found" },
|
|
295
307
|
},
|
|
308
|
+
rbac: {
|
|
309
|
+
ungated:
|
|
310
|
+
"workflow definitions: open to agents like the workflow tools; no verb covers them, so user roles need admin",
|
|
311
|
+
},
|
|
296
312
|
});
|
|
297
313
|
|
|
298
314
|
const deleteWorkflowRoute = route({
|
|
@@ -306,6 +322,10 @@ const deleteWorkflowRoute = route({
|
|
|
306
322
|
204: { description: "Workflow deleted" },
|
|
307
323
|
404: { description: "Workflow not found" },
|
|
308
324
|
},
|
|
325
|
+
rbac: {
|
|
326
|
+
ungated:
|
|
327
|
+
"workflow definitions: open to agents like the workflow tools; no verb covers them, so user roles need admin",
|
|
328
|
+
},
|
|
309
329
|
});
|
|
310
330
|
|
|
311
331
|
const triggerWorkflowRoute = route({
|
|
@@ -338,6 +358,10 @@ const triggerWorkflowRoute = route({
|
|
|
338
358
|
409: { description: "Idempotency-Key was already used for a different request" },
|
|
339
359
|
410: { description: "The workflow triggered under this Idempotency-Key was deleted" },
|
|
340
360
|
},
|
|
361
|
+
rbac: {
|
|
362
|
+
ungated:
|
|
363
|
+
"workflow runs: open to agents like the workflow tools; no verb covers them, so user roles need admin",
|
|
364
|
+
},
|
|
341
365
|
});
|
|
342
366
|
|
|
343
367
|
const validateTriggerRoute = route({
|
|
@@ -355,6 +379,10 @@ const validateTriggerRoute = route({
|
|
|
355
379
|
400: { description: "Payload failed validation; body matches the TriggerSchemaError contract" },
|
|
356
380
|
404: { description: "Workflow not found" },
|
|
357
381
|
},
|
|
382
|
+
rbac: {
|
|
383
|
+
ungated:
|
|
384
|
+
"workflow runs: open to agents like the workflow tools; no verb covers them, so user roles need admin",
|
|
385
|
+
},
|
|
358
386
|
});
|
|
359
387
|
|
|
360
388
|
const listWorkflowRunsRoute = route({
|
|
@@ -441,6 +469,10 @@ const retryWorkflowRunRoute = route({
|
|
|
441
469
|
400: { description: "Cannot retry" },
|
|
442
470
|
404: { description: "Run not found" },
|
|
443
471
|
},
|
|
472
|
+
rbac: {
|
|
473
|
+
ungated:
|
|
474
|
+
"workflow runs: open to agents like the workflow tools; no verb covers them, so user roles need admin",
|
|
475
|
+
},
|
|
444
476
|
});
|
|
445
477
|
|
|
446
478
|
const cancelWorkflowRunRoute = route({
|
|
@@ -456,6 +488,10 @@ const cancelWorkflowRunRoute = route({
|
|
|
456
488
|
400: { description: "Cannot cancel" },
|
|
457
489
|
},
|
|
458
490
|
auth: { apiKey: true },
|
|
491
|
+
rbac: {
|
|
492
|
+
ungated:
|
|
493
|
+
"workflow runs: open to agents like the workflow tools; no verb covers them, so user roles need admin",
|
|
494
|
+
},
|
|
459
495
|
});
|
|
460
496
|
|
|
461
497
|
const listExecutorTypesRoute = route({
|
|
@@ -517,6 +553,10 @@ const webhookTriggerRoute = route({
|
|
|
517
553
|
401: { description: "Invalid signature" },
|
|
518
554
|
404: { description: "Workflow not found" },
|
|
519
555
|
},
|
|
556
|
+
rbac: {
|
|
557
|
+
ungated:
|
|
558
|
+
"inbound workflow webhook: the workflow's webhook secret is the credential, no bearer principal",
|
|
559
|
+
},
|
|
520
560
|
});
|
|
521
561
|
|
|
522
562
|
// ─── Version History Route Definitions ────────────────────────────────────────
|
package/src/http/x.ts
CHANGED
|
@@ -102,6 +102,10 @@ const scriptApiRoute = route({
|
|
|
102
102
|
},
|
|
103
103
|
501: { description: "workspace-rw scripts are not supported" },
|
|
104
104
|
},
|
|
105
|
+
rbac: {
|
|
106
|
+
ungated:
|
|
107
|
+
"external script endpoint: its per-endpoint bearer is the credential; script.api.* gates who exposes it",
|
|
108
|
+
},
|
|
105
109
|
});
|
|
106
110
|
|
|
107
111
|
function extractBearer(req: IncomingMessage): string | null {
|
package/src/linear/app.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { onAuthorizationRefreshed } from "../oauth/ensure-token";
|
|
|
3
3
|
import { getPublicMcpBaseUrl } from "../utils/constants";
|
|
4
4
|
import { isEnvFlagEnabled } from "../utils/env-flag";
|
|
5
5
|
import { resetLinearClient } from "./client";
|
|
6
|
+
import { linearApiUrl, linearWebUrl } from "./host";
|
|
6
7
|
import { initLinearOutboundSync, teardownLinearOutboundSync } from "./outbound";
|
|
7
8
|
|
|
8
9
|
let initialized = false;
|
|
@@ -61,8 +62,8 @@ export async function initLinear(): Promise<boolean> {
|
|
|
61
62
|
await upsertOAuthApp("linear", {
|
|
62
63
|
clientId,
|
|
63
64
|
clientSecret,
|
|
64
|
-
authorizeUrl: "
|
|
65
|
-
tokenUrl: "
|
|
65
|
+
authorizeUrl: linearWebUrl("/oauth/authorize"),
|
|
66
|
+
tokenUrl: linearApiUrl("/oauth/token"),
|
|
66
67
|
redirectUri,
|
|
67
68
|
scopes: "read,write,issues:create,comments:create,app:assignable,app:mentionable",
|
|
68
69
|
// Linear requires comma-separated scopes in the authorize URL (RFC default
|
package/src/linear/client.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LinearClient } from "@linear/sdk";
|
|
2
2
|
import { getOAuthTokens } from "../be/db-queries/oauth";
|
|
3
|
+
import { linearApiUrl } from "./host";
|
|
3
4
|
|
|
4
5
|
let linearClient: LinearClient | null = null;
|
|
5
6
|
|
|
@@ -8,7 +9,10 @@ export async function getLinearClient(): Promise<LinearClient | null> {
|
|
|
8
9
|
if (!tokens) return null;
|
|
9
10
|
|
|
10
11
|
if (!linearClient) {
|
|
11
|
-
linearClient = new LinearClient({
|
|
12
|
+
linearClient = new LinearClient({
|
|
13
|
+
accessToken: tokens.accessToken,
|
|
14
|
+
apiUrl: linearApiUrl("/graphql"),
|
|
15
|
+
});
|
|
12
16
|
}
|
|
13
17
|
return linearClient;
|
|
14
18
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear host resolver: the web base (OAuth consent page) and the API base (GraphQL,
|
|
3
|
+
* OAuth token and revoke).
|
|
4
|
+
*
|
|
5
|
+
* `LINEAR_URL` (default https://linear.app) and `LINEAR_API_URL` (default
|
|
6
|
+
* https://api.linear.app) exist so the black-box E2E suite can point the integration at a
|
|
7
|
+
* local Linear emulator. Both are deployment-env only (reserved in swarm-config-guard):
|
|
8
|
+
* the API base receives the OAuth client secret and every access token.
|
|
9
|
+
*
|
|
10
|
+
* Env is read on every call (no cache) so a restart with new env takes effect.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const DEFAULT_WEB_URL = "https://linear.app";
|
|
14
|
+
const DEFAULT_API_URL = "https://api.linear.app";
|
|
15
|
+
|
|
16
|
+
function base(name: "LINEAR_URL" | "LINEAR_API_URL", fallback: string): string {
|
|
17
|
+
const raw = process.env[name]?.trim();
|
|
18
|
+
if (!raw) return fallback;
|
|
19
|
+
try {
|
|
20
|
+
const url = new URL(raw);
|
|
21
|
+
if ((url.protocol === "https:" || url.protocol === "http:") && !url.username && !url.password) {
|
|
22
|
+
return raw.replace(/\/+$/, "");
|
|
23
|
+
}
|
|
24
|
+
} catch {}
|
|
25
|
+
// The raw value is never echoed: a mistyped URL can carry a token.
|
|
26
|
+
console.warn(
|
|
27
|
+
`[Linear] ${name} is not a valid http(s) URL without credentials; using ${fallback}`,
|
|
28
|
+
);
|
|
29
|
+
return fallback;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** `path` starts with `/`, e.g. `linearApiUrl("/graphql")`. */
|
|
33
|
+
export function linearApiUrl(path: string): string {
|
|
34
|
+
return `${base("LINEAR_API_URL", DEFAULT_API_URL)}${path}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** `path` starts with `/`, e.g. `linearWebUrl("/oauth/authorize")`. */
|
|
38
|
+
export function linearWebUrl(path: string): string {
|
|
39
|
+
return `${base("LINEAR_URL", DEFAULT_WEB_URL)}${path}`;
|
|
40
|
+
}
|
package/src/linear/oauth.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { upsertKv } from "../be/db";
|
|
|
2
2
|
import { getOAuthApp } from "../be/db-queries/oauth";
|
|
3
3
|
import { oauthAppRowToProviderConfig } from "../oauth/ensure-token";
|
|
4
4
|
import { buildAuthorizationUrl, type OAuthProviderConfig } from "../oauth/wrapper";
|
|
5
|
+
import { linearApiUrl } from "./host";
|
|
5
6
|
|
|
6
7
|
/** kv namespace for the Linear bot's appUserId (Q21.C). Keyed by workspace ID. */
|
|
7
8
|
const APP_USER_ID_NAMESPACE = "integration:linear:bot-app-user-id";
|
|
@@ -47,7 +48,7 @@ export async function getLinearAuthorizationUrl(
|
|
|
47
48
|
*/
|
|
48
49
|
export async function captureLinearAppUserId(accessToken: string): Promise<void> {
|
|
49
50
|
const query = `query { viewer { id organization { id } } }`;
|
|
50
|
-
const res = await fetch("
|
|
51
|
+
const res = await fetch(linearApiUrl("/graphql"), {
|
|
51
52
|
method: "POST",
|
|
52
53
|
headers: {
|
|
53
54
|
"Content-Type": "application/json",
|
|
@@ -89,7 +90,7 @@ export async function captureLinearAppUserId(accessToken: string): Promise<void>
|
|
|
89
90
|
*/
|
|
90
91
|
export async function revokeLinearToken(accessToken: string): Promise<boolean> {
|
|
91
92
|
try {
|
|
92
|
-
const res = await fetch("
|
|
93
|
+
const res = await fetch(linearApiUrl("/oauth/revoke"), {
|
|
93
94
|
method: "POST",
|
|
94
95
|
headers: { Authorization: `Bearer ${accessToken}` },
|
|
95
96
|
});
|
package/src/linear/sync.ts
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
type LinearGateInput,
|
|
28
28
|
shouldCreateTaskFromLinearEvent,
|
|
29
29
|
} from "./gate";
|
|
30
|
+
import { linearApiUrl } from "./host";
|
|
30
31
|
// Side-effect import: registers all Linear event templates in the in-memory registry
|
|
31
32
|
import "./templates";
|
|
32
33
|
|
|
@@ -78,7 +79,7 @@ async function postAgentActivity(
|
|
|
78
79
|
content,
|
|
79
80
|
};
|
|
80
81
|
|
|
81
|
-
const res = await fetch("
|
|
82
|
+
const res = await fetch(linearApiUrl("/graphql"), {
|
|
82
83
|
method: "POST",
|
|
83
84
|
headers: {
|
|
84
85
|
"Content-Type": "application/json",
|
|
@@ -124,7 +125,7 @@ async function updateAgentSession(
|
|
|
124
125
|
return false;
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
const res = await fetch("
|
|
128
|
+
const res = await fetch(linearApiUrl("/graphql"), {
|
|
128
129
|
method: "POST",
|
|
129
130
|
headers: {
|
|
130
131
|
"Content-Type": "application/json",
|
|
@@ -309,7 +310,7 @@ export async function _fetchIssueGatingInfo(issueId: string): Promise<LinearGate
|
|
|
309
310
|
);
|
|
310
311
|
return { stateType: null, labelNames: [] };
|
|
311
312
|
}
|
|
312
|
-
const res = await fetch("
|
|
313
|
+
const res = await fetch(linearApiUrl("/graphql"), {
|
|
313
314
|
method: "POST",
|
|
314
315
|
headers: {
|
|
315
316
|
"Content-Type": "application/json",
|
package/src/otel-impl.ts
CHANGED
|
@@ -6,17 +6,18 @@ import {
|
|
|
6
6
|
context,
|
|
7
7
|
type Gauge,
|
|
8
8
|
type Histogram,
|
|
9
|
+
logs,
|
|
9
10
|
type Meter,
|
|
10
11
|
metrics,
|
|
11
12
|
propagation,
|
|
12
13
|
ROOT_CONTEXT,
|
|
14
|
+
SeverityNumber,
|
|
13
15
|
type Span,
|
|
14
16
|
SpanKind,
|
|
15
17
|
SpanStatusCode,
|
|
16
18
|
type Tracer,
|
|
17
19
|
trace,
|
|
18
20
|
} from "@opentelemetry/api";
|
|
19
|
-
import { logs, SeverityNumber } from "@opentelemetry/api-logs";
|
|
20
21
|
import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
|
|
21
22
|
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
|
22
23
|
import {
|
|
@@ -204,10 +205,12 @@ export async function boot(serviceRole: string, options: BootOptions = {}): Prom
|
|
|
204
205
|
// the same resource (service.name, agentswarm.service.role, etc.). Temporality
|
|
205
206
|
// is intentionally NOT hardcoded — operators should set
|
|
206
207
|
// OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta for Datadog.
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
metricReaders: [
|
|
209
|
+
new PeriodicExportingMetricReader({
|
|
210
|
+
exporter: new OTLPMetricExporter(),
|
|
211
|
+
exportIntervalMillis: 60_000,
|
|
212
|
+
}),
|
|
213
|
+
],
|
|
211
214
|
});
|
|
212
215
|
|
|
213
216
|
sdk.start();
|
|
@@ -78,6 +78,9 @@ function claudeMdSourcePath(provider: string): string {
|
|
|
78
78
|
return provider === "claude" ? "~/.claude/CLAUDE.md" : "/workspace/CLAUDE.md";
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
/** Public guide for the per-repo merge policy and the swarm auto-merger. */
|
|
82
|
+
const REPO_MERGE_POLICY_DOCS_URL = "https://docs.agent-swarm.dev/docs/guides/repo-merge-policy";
|
|
83
|
+
|
|
81
84
|
/** Providers that get the repo CLAUDE.md inlined until native loading is verified. */
|
|
82
85
|
const REPO_CLAUDE_MD_INLINE_PROVIDERS: ReadonlySet<string> = new Set(["opencode"]);
|
|
83
86
|
|
|
@@ -583,15 +586,16 @@ function renderToolsAndSkillsVars(input: {
|
|
|
583
586
|
};
|
|
584
587
|
}
|
|
585
588
|
|
|
586
|
-
/**
|
|
589
|
+
/**
|
|
590
|
+
* The mergePolicy record's swarm auto-merge line, or "" when the repo has no record.
|
|
591
|
+
* It points at the live record and the guide instead of printing the threshold,
|
|
592
|
+
* classes or risky paths: those are tunable and a prompt copy goes stale.
|
|
593
|
+
*/
|
|
587
594
|
function renderSwarmAutoMerge(policy: RepoMergePolicy | undefined): string {
|
|
588
595
|
const auto = policy?.autoMerge;
|
|
589
596
|
if (!auto) return "";
|
|
590
597
|
if (!auto.enabled) return "\n- Swarm auto-merge: off";
|
|
591
|
-
|
|
592
|
-
if (auto.classes.length > 0) parts.push(`classes: ${auto.classes.join(", ")}`);
|
|
593
|
-
if (auto.riskyPaths.length > 0) parts.push(`never for paths: ${auto.riskyPaths.join(", ")}`);
|
|
594
|
-
return `\n- ${parts.join("; ")}`;
|
|
598
|
+
return `\n- Swarm auto-merge: on. The swarm auto-merger merges PRs that pass its scoring. The live threshold, classes and risky paths are in this repo's \`mergePolicy.autoMerge\` (\`get-repos\`); process: ${REPO_MERGE_POLICY_DOCS_URL}`;
|
|
595
599
|
}
|
|
596
600
|
|
|
597
601
|
/**
|
|
@@ -661,7 +665,7 @@ async function renderRepositoryVars(
|
|
|
661
665
|
section += `If ANY check fails, fix the issue before pushing. Do NOT push code with failing checks.\nDo NOT use \`--no-verify\` or any flag that bypasses git hooks.\n\n`;
|
|
662
666
|
}
|
|
663
667
|
const mergePolicy = await resolveTemplateAsync("system.agent.repository.merge_policy", {
|
|
664
|
-
agents_may_merge: agentsMayMerge(g) ? "
|
|
668
|
+
agents_may_merge: agentsMayMerge(g) ? "allowed" : "not allowed (default)",
|
|
665
669
|
swarm_auto_merge: renderSwarmAutoMerge(g.mergePolicy),
|
|
666
670
|
merge_checks:
|
|
667
671
|
g.mergeChecks.length > 0
|
|
@@ -620,17 +620,17 @@ registerTemplate({
|
|
|
620
620
|
eventType: "system.agent.repository.merge_policy",
|
|
621
621
|
header: "",
|
|
622
622
|
defaultBody: `**Merge Policy:**
|
|
623
|
-
-
|
|
623
|
+
- Agent hand-merge: {{agents_may_merge}}{{swarm_auto_merge}}{{merge_checks}}`,
|
|
624
624
|
variables: [
|
|
625
625
|
{
|
|
626
626
|
name: "agents_may_merge",
|
|
627
627
|
description:
|
|
628
|
-
"'
|
|
628
|
+
"Whether an agent may merge a PR itself, 'allowed' or 'not allowed (default)': the repo's mergePolicy.agentsMayMerge, else its allowMerge guideline. Separate from swarm auto-merge.",
|
|
629
629
|
},
|
|
630
630
|
{
|
|
631
631
|
name: "swarm_auto_merge",
|
|
632
632
|
description:
|
|
633
|
-
"
|
|
633
|
+
"The swarm auto-merge line for the repo's mergePolicy record: on or off, plus a pointer to the live record and the merge-policy guide (no threshold, it changes). Empty when the repo has no record.",
|
|
634
634
|
},
|
|
635
635
|
{
|
|
636
636
|
name: "merge_checks",
|
|
@@ -480,7 +480,7 @@ const qwenTargetProfile: AcpTargetProfile = {
|
|
|
480
480
|
* Kiro CLI reads its prompt from a Kiro agent config, not from a flag or an
|
|
481
481
|
* env var, so the swarm system prompt is not injected (as with OpenCode).
|
|
482
482
|
* Kiro advertises no ACP config options (checked on 2.29.1), so the model
|
|
483
|
-
* rides on argv as `--model`, which `kiro-cli acp` still accepts in 3.
|
|
483
|
+
* rides on argv as `--model`, which `kiro-cli acp` still accepts in 3.5.0.
|
|
484
484
|
*/
|
|
485
485
|
const kiroTargetProfile: AcpTargetProfile = {
|
|
486
486
|
target: "kiro",
|
|
@@ -4,6 +4,8 @@ import { tmpdir } from "node:os";
|
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { contextBoundNoteThreshold, createContextBoundNote } from "../hooks/context-bound-note";
|
|
6
6
|
import {
|
|
7
|
+
AMP_MODE_EFFORTS,
|
|
8
|
+
AMP_MODE_MODELS,
|
|
7
9
|
type AmpMode,
|
|
8
10
|
type AmpModelSelection,
|
|
9
11
|
ampBillsCacheWrites,
|
|
@@ -45,7 +47,7 @@ import type {
|
|
|
45
47
|
* default; the image installs exactly this version and the per-task settings
|
|
46
48
|
* set `amp.updates.mode: "disabled"`. Bump it deliberately, with a live run.
|
|
47
49
|
*/
|
|
48
|
-
export const AMP_PACKAGE = "@ampcode/cli@0.0.
|
|
50
|
+
export const AMP_PACKAGE = "@ampcode/cli@0.0.1795176040-g0dd132";
|
|
49
51
|
|
|
50
52
|
/** MCP server name. Amp exposes its tools as `agent_swarm` / `store_progress` (dashes become underscores). */
|
|
51
53
|
const AMP_MCP_SERVER_NAME = "agent-swarm";
|
|
@@ -84,9 +86,9 @@ function ampEffort(level: ReasoningEffort): string {
|
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
/**
|
|
87
|
-
* The per-task plugin: one agent mode
|
|
88
|
-
* swarm system prompt as `instructions`,
|
|
89
|
-
* effort. Amp has no system-prompt flag, so this is the supported route (live
|
|
89
|
+
* The per-task plugin: one agent mode on the pinned model (else the model of
|
|
90
|
+
* the selected mode) that appends the swarm system prompt as `instructions`,
|
|
91
|
+
* with an optional effort. Amp rejects `extends` and built-in agents here. Amp has no system-prompt flag, so this is the supported route (live
|
|
90
92
|
* verified: the instructions reach the model). The values are a JSON literal,
|
|
91
93
|
* never code, so a prompt cannot break out of the string.
|
|
92
94
|
*
|
|
@@ -103,10 +105,11 @@ export function buildAmpPlugin(options: {
|
|
|
103
105
|
steeringInbox?: string;
|
|
104
106
|
}): string {
|
|
105
107
|
const config = JSON.stringify({
|
|
106
|
-
baseMode: options.baseMode,
|
|
107
108
|
instructions: options.instructions,
|
|
108
|
-
model: options.pin ??
|
|
109
|
-
reasoningEffort:
|
|
109
|
+
model: options.pin ?? AMP_MODE_MODELS[options.baseMode],
|
|
110
|
+
reasoningEffort:
|
|
111
|
+
options.reasoningEffort ??
|
|
112
|
+
(options.pin ? null : (AMP_MODE_EFFORTS[options.baseMode] ?? null)),
|
|
110
113
|
steeringInbox: options.steeringInbox ?? null,
|
|
111
114
|
});
|
|
112
115
|
return `// @amp-agent-mode key=${AMP_PLUGIN_MODE_KEY} label=Agent Swarm
|
|
@@ -181,9 +184,8 @@ export default function (amp: any) {
|
|
|
181
184
|
key: ${JSON.stringify(AMP_PLUGIN_MODE_KEY)},
|
|
182
185
|
label: "Agent Swarm",
|
|
183
186
|
agent: amp.createAgent({
|
|
184
|
-
|
|
187
|
+
model: CONFIG.model,
|
|
185
188
|
...(CONFIG.instructions ? { instructions: CONFIG.instructions } : {}),
|
|
186
|
-
...(CONFIG.model ? { model: CONFIG.model } : {}),
|
|
187
189
|
...(CONFIG.reasoningEffort ? { reasoningEffort: CONFIG.reasoningEffort } : {}),
|
|
188
190
|
display: { label: "Agent Swarm" },
|
|
189
191
|
}).definition,
|
|
@@ -35,7 +35,7 @@ import type {
|
|
|
35
35
|
} from "./types";
|
|
36
36
|
|
|
37
37
|
/** Pinned in package.json and Dockerfile.worker; bump all three together. */
|
|
38
|
-
export const CURSOR_SDK_VERSION = "1.4.
|
|
38
|
+
export const CURSOR_SDK_VERSION = "1.4.2";
|
|
39
39
|
|
|
40
40
|
/** MCP server name; Cursor reports its tools as `mcp` calls with this `providerIdentifier`. */
|
|
41
41
|
const CURSOR_MCP_SERVER_NAME = "agent-swarm";
|
|
@@ -357,6 +357,8 @@ export const LEGACY_POLICY = {
|
|
|
357
357
|
"design-system.write": anyAuthenticated,
|
|
358
358
|
// Opening a page is a read. Writes from the page session keep their own verbs.
|
|
359
359
|
"page.launch": anyAuthenticated,
|
|
360
|
+
// Global and repo overrides reach every agent's prompts, the lead's included.
|
|
361
|
+
"prompt-template.write": humanOrLeadOrResourceOwner,
|
|
360
362
|
// Humans only: agents edit objects with the board-* and sheet-* tools as themselves.
|
|
361
363
|
"objects.read": operatorOrUser,
|
|
362
364
|
"objects.write": operatorOrUser,
|
package/src/rbac/permissions.ts
CHANGED
|
@@ -387,6 +387,11 @@ export const PERMISSIONS = {
|
|
|
387
387
|
description: "Open a public or authed page: mint its page-session cookie.",
|
|
388
388
|
namespace: "page",
|
|
389
389
|
},
|
|
390
|
+
"prompt-template.write": {
|
|
391
|
+
description:
|
|
392
|
+
"Create, change, reset or delete a prompt template override: any as lead, operator, or user; an agent-scope override only for the caller's own agent.",
|
|
393
|
+
namespace: "prompt-template",
|
|
394
|
+
},
|
|
390
395
|
"objects.read": {
|
|
391
396
|
description:
|
|
392
397
|
"Read a board or sheet on the swarm's shared agent-fs drive through the object routes.",
|