@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
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getWorkflow,
|
|
13
13
|
isExtensionAgent,
|
|
14
14
|
} from "@/be/db";
|
|
15
|
-
import { modelProfileRefError, taskProfileError } from "@/be/db/model-profiles";
|
|
15
|
+
import { modelGroupRefError, modelProfileRefError, taskProfileError } from "@/be/db/model-profiles";
|
|
16
16
|
import { explicitModelErrorForAgent } from "@/be/model-validation";
|
|
17
17
|
import { getScript } from "@/be/scripts/db";
|
|
18
18
|
import { calculateNextRun } from "@/scheduler";
|
|
@@ -118,7 +118,7 @@ export const createScheduleInputSchema = z.object({
|
|
|
118
118
|
"Concrete model override for tasks created by this schedule. Interpreted by each assignee's harness/provider and does not switch providers. Prefer `profile` for a named harness + model + effort. The model must run on the assignee's harness (an Anthropic model on a Claude agent, an OpenAI model on a Codex agent); a mismatch is rejected.",
|
|
119
119
|
),
|
|
120
120
|
modelTier: ModelTierSchema.optional().describe(
|
|
121
|
-
"Deprecated: pass profile \"<harness>-<tier>\"
|
|
121
|
+
"Deprecated: pass modelGroup \"<tier>\" (the tier's group) or profile \"<harness>-<tier>\" (same model) instead. Portable model tier for tasks created by this schedule: 'smol', 'regular', 'smart', or 'ultra'. Resolved at claim time through the model group named after the tier, else the seeded <harness>-<tier> profile of each assignee's harness.",
|
|
122
122
|
),
|
|
123
123
|
profile: z
|
|
124
124
|
.string()
|
|
@@ -128,6 +128,14 @@ export const createScheduleInputSchema = z.object({
|
|
|
128
128
|
.describe(
|
|
129
129
|
"Model profile name for tasks created by this schedule (see list-model-profiles): a named harness + model + effort, applied when each task is claimed. Must run on the target agent. Exclusive with model and modelTier.",
|
|
130
130
|
),
|
|
131
|
+
modelGroup: z
|
|
132
|
+
.string()
|
|
133
|
+
.trim()
|
|
134
|
+
.min(1)
|
|
135
|
+
.optional()
|
|
136
|
+
.describe(
|
|
137
|
+
"Model group name for tasks created by this schedule (GET /api/model-groups): an ordered list of profiles that may span harnesses. Each fired task runs the first member that runs on the claiming agent and hops to the next one on a provider error. With a target agent, one member must run there. Exclusive with model, modelTier and profile.",
|
|
138
|
+
),
|
|
131
139
|
allowCustomModel: z
|
|
132
140
|
.boolean()
|
|
133
141
|
.optional()
|
|
@@ -157,6 +165,7 @@ const scheduleDataShape = {
|
|
|
157
165
|
model: z.string().optional(),
|
|
158
166
|
modelTier: ModelTierSchema.optional(),
|
|
159
167
|
profile: z.string().optional(),
|
|
168
|
+
modelGroup: z.string().optional(),
|
|
160
169
|
scheduleType: z.string().optional(),
|
|
161
170
|
targetType: ScheduledTaskTargetTypeSchema.optional(),
|
|
162
171
|
workflowId: z.string().optional(),
|
|
@@ -206,6 +215,7 @@ export const registerCreateScheduleTool = (server: McpServer) => {
|
|
|
206
215
|
model,
|
|
207
216
|
modelTier,
|
|
208
217
|
profile,
|
|
218
|
+
modelGroup,
|
|
209
219
|
allowCustomModel,
|
|
210
220
|
},
|
|
211
221
|
requestInfo,
|
|
@@ -306,6 +316,7 @@ export const registerCreateScheduleTool = (server: McpServer) => {
|
|
|
306
316
|
profile,
|
|
307
317
|
model,
|
|
308
318
|
modelTier,
|
|
319
|
+
modelGroup,
|
|
309
320
|
agentId: targetAgentId,
|
|
310
321
|
});
|
|
311
322
|
if (profileError) return toolErr(profileError);
|
|
@@ -358,6 +369,7 @@ export const registerCreateScheduleTool = (server: McpServer) => {
|
|
|
358
369
|
model: normalizedModel.model,
|
|
359
370
|
modelTier: normalizedModel.modelTier,
|
|
360
371
|
profile,
|
|
372
|
+
modelGroup,
|
|
361
373
|
scheduleType: scheduleType ?? "recurring",
|
|
362
374
|
createdBy,
|
|
363
375
|
});
|
|
@@ -389,7 +401,12 @@ export const registerCreateScheduleTool = (server: McpServer) => {
|
|
|
389
401
|
},
|
|
390
402
|
);
|
|
391
403
|
} catch (error) {
|
|
392
|
-
// The profile was deleted between taskProfileError and the insert.
|
|
404
|
+
// The profile or group was deleted between taskProfileError and the insert.
|
|
405
|
+
if (modelGroupRefError(error)) {
|
|
406
|
+
return toolErr(`Unknown model group "${modelGroup}".`, {
|
|
407
|
+
data: { yourAgentId: requestInfo.agentId },
|
|
408
|
+
});
|
|
409
|
+
}
|
|
393
410
|
if (modelProfileRefError(error) === "missing") {
|
|
394
411
|
return toolErr(`Unknown model profile "${profile}".`, {
|
|
395
412
|
data: { yourAgentId: requestInfo.agentId },
|
|
@@ -12,7 +12,11 @@ import {
|
|
|
12
12
|
isExtensionAgent,
|
|
13
13
|
updateScheduledTask,
|
|
14
14
|
} from "@/be/db";
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
modelGroupRefError,
|
|
17
|
+
modelProfileRefError,
|
|
18
|
+
scheduleProfileUpdate,
|
|
19
|
+
} from "@/be/db/model-profiles";
|
|
16
20
|
import { explicitModelErrorForAgent } from "@/be/model-validation";
|
|
17
21
|
import {
|
|
18
22
|
changesScheduleTarget,
|
|
@@ -89,7 +93,7 @@ export const patchScheduleInputSchema = z.object({
|
|
|
89
93
|
modelTier: ModelTierSchema.nullable()
|
|
90
94
|
.optional()
|
|
91
95
|
.describe(
|
|
92
|
-
'Deprecated: pass profile "<harness>-<tier>"
|
|
96
|
+
'Deprecated: pass modelGroup "<tier>" (the group of that tier) or profile "<harness>-<tier>" (same model) instead. Portable model tier for tasks created by this schedule, resolved at claim time through the model group named after the tier, else the seeded <harness>-<tier> profile. Set to null to clear.',
|
|
93
97
|
),
|
|
94
98
|
profile: z
|
|
95
99
|
.string()
|
|
@@ -100,6 +104,15 @@ export const patchScheduleInputSchema = z.object({
|
|
|
100
104
|
.describe(
|
|
101
105
|
"Model profile name for tasks created by this schedule (see list-model-profiles). Must run on the target agent. Exclusive with model and modelTier: setting a profile clears them, and setting either clears the profile. Set to null to clear.",
|
|
102
106
|
),
|
|
107
|
+
modelGroup: z
|
|
108
|
+
.string()
|
|
109
|
+
.trim()
|
|
110
|
+
.min(1)
|
|
111
|
+
.nullable()
|
|
112
|
+
.optional()
|
|
113
|
+
.describe(
|
|
114
|
+
"Model group name for tasks created by this schedule (GET /api/model-groups): an ordered list of profiles that may span harnesses. Each fired task runs the first member that runs on the claiming agent and hops to the next one on a provider error. With a target agent, one member must run there. Exclusive with model, modelTier and profile: setting a group clears them, and setting any of them clears the group. Set to null to clear.",
|
|
115
|
+
),
|
|
103
116
|
allowCustomModel: z
|
|
104
117
|
.boolean()
|
|
105
118
|
.optional()
|
|
@@ -129,6 +142,7 @@ const scheduleDataShape = {
|
|
|
129
142
|
model: z.string().optional(),
|
|
130
143
|
modelTier: ModelTierSchema.optional(),
|
|
131
144
|
profile: z.string().optional(),
|
|
145
|
+
modelGroup: z.string().optional(),
|
|
132
146
|
scheduleType: z.string().optional(),
|
|
133
147
|
targetType: ScheduledTaskTargetTypeSchema.optional(),
|
|
134
148
|
workflowId: z.string().optional(),
|
|
@@ -176,6 +190,7 @@ export const registerPatchScheduleTool = (server: McpServer) => {
|
|
|
176
190
|
model,
|
|
177
191
|
modelTier,
|
|
178
192
|
profile,
|
|
193
|
+
modelGroup,
|
|
179
194
|
allowCustomModel,
|
|
180
195
|
},
|
|
181
196
|
requestInfo,
|
|
@@ -327,6 +342,7 @@ export const registerPatchScheduleTool = (server: McpServer) => {
|
|
|
327
342
|
targetAgentId !== undefined && targetAgentId !== schedule.targetAgentId;
|
|
328
343
|
const profileUpdate = await scheduleProfileUpdate(schedule, {
|
|
329
344
|
profile,
|
|
345
|
+
modelGroup,
|
|
330
346
|
model,
|
|
331
347
|
modelTier,
|
|
332
348
|
targetAgentId,
|
|
@@ -347,7 +363,12 @@ export const registerPatchScheduleTool = (server: McpServer) => {
|
|
|
347
363
|
if (modelTier !== undefined || normalizedModel.modelTier) {
|
|
348
364
|
updateData.modelTier = normalizedModel.modelTier ?? null;
|
|
349
365
|
}
|
|
350
|
-
} else if (
|
|
366
|
+
} else if (
|
|
367
|
+
agentChanged &&
|
|
368
|
+
schedule.model &&
|
|
369
|
+
!profileUpdate.fields.profile &&
|
|
370
|
+
!profileUpdate.fields.modelGroup
|
|
371
|
+
) {
|
|
351
372
|
// Harness only: the stored id already passed the catalog check when it was written.
|
|
352
373
|
const modelError = await explicitModelErrorForAgent({
|
|
353
374
|
model: schedule.model,
|
|
@@ -438,7 +459,12 @@ export const registerPatchScheduleTool = (server: McpServer) => {
|
|
|
438
459
|
},
|
|
439
460
|
);
|
|
440
461
|
} catch (error) {
|
|
441
|
-
// The profile was deleted between scheduleProfileUpdate and the write.
|
|
462
|
+
// The profile or group was deleted between scheduleProfileUpdate and the write.
|
|
463
|
+
if (modelGroupRefError(error)) {
|
|
464
|
+
return toolErr(`Unknown model group "${modelGroup}".`, {
|
|
465
|
+
data: { yourAgentId: requestInfo.agentId },
|
|
466
|
+
});
|
|
467
|
+
}
|
|
442
468
|
if (modelProfileRefError(error) === "missing") {
|
|
443
469
|
return toolErr(`Unknown model profile "${profile}".`, {
|
|
444
470
|
data: { yourAgentId: requestInfo.agentId },
|
|
@@ -12,7 +12,11 @@ import {
|
|
|
12
12
|
isExtensionAgent,
|
|
13
13
|
updateScheduledTask,
|
|
14
14
|
} from "@/be/db";
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
modelGroupRefError,
|
|
17
|
+
modelProfileRefError,
|
|
18
|
+
scheduleProfileUpdate,
|
|
19
|
+
} from "@/be/db/model-profiles";
|
|
16
20
|
import { explicitModelErrorForAgent } from "@/be/model-validation";
|
|
17
21
|
import {
|
|
18
22
|
changesScheduleTarget,
|
|
@@ -89,7 +93,7 @@ export const updateScheduleInputSchema = z.object({
|
|
|
89
93
|
modelTier: ModelTierSchema.nullable()
|
|
90
94
|
.optional()
|
|
91
95
|
.describe(
|
|
92
|
-
'Deprecated: pass profile "<harness>-<tier>"
|
|
96
|
+
'Deprecated: pass modelGroup "<tier>" (the group of that tier) or profile "<harness>-<tier>" (same model) instead. Portable model tier for tasks created by this schedule, resolved at claim time through the model group named after the tier, else the seeded <harness>-<tier> profile. Set to null to clear.',
|
|
93
97
|
),
|
|
94
98
|
profile: z
|
|
95
99
|
.string()
|
|
@@ -100,6 +104,15 @@ export const updateScheduleInputSchema = z.object({
|
|
|
100
104
|
.describe(
|
|
101
105
|
"Model profile name for tasks created by this schedule (see list-model-profiles). Must run on the target agent. Exclusive with model and modelTier: setting a profile clears them, and setting either clears the profile. Set to null to clear.",
|
|
102
106
|
),
|
|
107
|
+
modelGroup: z
|
|
108
|
+
.string()
|
|
109
|
+
.trim()
|
|
110
|
+
.min(1)
|
|
111
|
+
.nullable()
|
|
112
|
+
.optional()
|
|
113
|
+
.describe(
|
|
114
|
+
"Model group name for tasks created by this schedule (GET /api/model-groups): an ordered list of profiles that may span harnesses. Each fired task runs the first member that runs on the claiming agent and hops to the next one on a provider error. With a target agent, one member must run there. Exclusive with model, modelTier and profile: setting a group clears them, and setting any of them clears the group. Set to null to clear.",
|
|
115
|
+
),
|
|
103
116
|
allowCustomModel: z
|
|
104
117
|
.boolean()
|
|
105
118
|
.optional()
|
|
@@ -129,6 +142,7 @@ const scheduleDataShape = {
|
|
|
129
142
|
model: z.string().optional(),
|
|
130
143
|
modelTier: ModelTierSchema.optional(),
|
|
131
144
|
profile: z.string().optional(),
|
|
145
|
+
modelGroup: z.string().optional(),
|
|
132
146
|
scheduleType: z.string().optional(),
|
|
133
147
|
targetType: ScheduledTaskTargetTypeSchema.optional(),
|
|
134
148
|
workflowId: z.string().optional(),
|
|
@@ -176,6 +190,7 @@ export const registerUpdateScheduleTool = (server: McpServer) => {
|
|
|
176
190
|
model,
|
|
177
191
|
modelTier,
|
|
178
192
|
profile,
|
|
193
|
+
modelGroup,
|
|
179
194
|
allowCustomModel,
|
|
180
195
|
},
|
|
181
196
|
requestInfo,
|
|
@@ -327,6 +342,7 @@ export const registerUpdateScheduleTool = (server: McpServer) => {
|
|
|
327
342
|
targetAgentId !== undefined && targetAgentId !== schedule.targetAgentId;
|
|
328
343
|
const profileUpdate = await scheduleProfileUpdate(schedule, {
|
|
329
344
|
profile,
|
|
345
|
+
modelGroup,
|
|
330
346
|
model,
|
|
331
347
|
modelTier,
|
|
332
348
|
targetAgentId,
|
|
@@ -347,7 +363,12 @@ export const registerUpdateScheduleTool = (server: McpServer) => {
|
|
|
347
363
|
if (modelTier !== undefined || normalizedModel.modelTier) {
|
|
348
364
|
updateData.modelTier = normalizedModel.modelTier ?? null;
|
|
349
365
|
}
|
|
350
|
-
} else if (
|
|
366
|
+
} else if (
|
|
367
|
+
agentChanged &&
|
|
368
|
+
schedule.model &&
|
|
369
|
+
!profileUpdate.fields.profile &&
|
|
370
|
+
!profileUpdate.fields.modelGroup
|
|
371
|
+
) {
|
|
351
372
|
// Harness only: the stored id already passed the catalog check when it was written.
|
|
352
373
|
const modelError = await explicitModelErrorForAgent({
|
|
353
374
|
model: schedule.model,
|
|
@@ -438,7 +459,12 @@ export const registerUpdateScheduleTool = (server: McpServer) => {
|
|
|
438
459
|
},
|
|
439
460
|
);
|
|
440
461
|
} catch (error) {
|
|
441
|
-
// The profile was deleted between scheduleProfileUpdate and the write.
|
|
462
|
+
// The profile or group was deleted between scheduleProfileUpdate and the write.
|
|
463
|
+
if (modelGroupRefError(error)) {
|
|
464
|
+
return toolErr(`Unknown model group "${modelGroup}".`, {
|
|
465
|
+
data: { yourAgentId: requestInfo.agentId },
|
|
466
|
+
});
|
|
467
|
+
}
|
|
442
468
|
if (modelProfileRefError(error) === "missing") {
|
|
443
469
|
return toolErr(`Unknown model profile "${profile}".`, {
|
|
444
470
|
data: { yourAgentId: requestInfo.agentId },
|
package/src/tools/send-task.ts
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isExtensionAgent,
|
|
17
17
|
isLinearTrackerContextKey,
|
|
18
18
|
} from "@/be/db";
|
|
19
|
-
import { modelProfileRefError, taskProfileError } from "@/be/db/model-profiles";
|
|
19
|
+
import { modelGroupRefError, modelProfileRefError, taskProfileError } from "@/be/db/model-profiles";
|
|
20
20
|
import { repointTrackerSyncBySwarmId } from "@/be/db-queries/tracker";
|
|
21
21
|
import { explicitModelErrorForAgent } from "@/be/model-validation";
|
|
22
22
|
import { applyPreTaskCreate } from "@/extensions/apply-task-create";
|
|
@@ -144,7 +144,7 @@ export const sendTaskInputSchema = z
|
|
|
144
144
|
"Concrete model override for this task, interpreted by the assignee's harness/provider. This does not switch providers. Prefer `profile` for a named harness + model + effort. The model must run on the assignee's harness (an Anthropic model on a Claude agent, an OpenAI model on a Codex agent); a mismatch is rejected.",
|
|
145
145
|
),
|
|
146
146
|
modelTier: ModelTierSchema.optional().describe(
|
|
147
|
-
"Deprecated: pass profile \"<harness>-<tier>\"
|
|
147
|
+
"Deprecated: pass modelGroup \"<tier>\" (the tier's group) or profile \"<harness>-<tier>\" (same model) instead. Portable model tier for this task: 'smol', 'regular', 'smart', or 'ultra'. Resolved at claim time through the model group named after the tier, else the seeded <harness>-<tier> profile of the assignee's harness. Legacy model shortnames map as haiku→smol, sonnet→regular, opus→smart, fable→ultra.",
|
|
148
148
|
),
|
|
149
149
|
allowCustomModel: z
|
|
150
150
|
.boolean()
|
|
@@ -163,6 +163,14 @@ export const sendTaskInputSchema = z
|
|
|
163
163
|
.describe(
|
|
164
164
|
"Model profile name (see list-model-profiles): a named harness + model + effort, applied when the task is claimed. Must run on the assignee's harness. Exclusive with model and modelTier. A set `effort` still wins over the profile's.",
|
|
165
165
|
),
|
|
166
|
+
modelGroup: z
|
|
167
|
+
.string()
|
|
168
|
+
.trim()
|
|
169
|
+
.min(1)
|
|
170
|
+
.optional()
|
|
171
|
+
.describe(
|
|
172
|
+
"Model group name (GET /api/model-groups): an ordered list of profiles that may span harnesses. The claiming agent runs the first member on its harness that passes the profile check, and a provider error hops to the next one. With agentId, one member must run on that agent. A pool task waits for an agent where a member runs. Exclusive with model, modelTier and profile.",
|
|
173
|
+
),
|
|
166
174
|
allowDuplicate: z
|
|
167
175
|
.boolean()
|
|
168
176
|
.default(false)
|
|
@@ -302,6 +310,7 @@ export async function sendTaskHandler(
|
|
|
302
310
|
allowCustomModel,
|
|
303
311
|
effort,
|
|
304
312
|
profile,
|
|
313
|
+
modelGroup,
|
|
305
314
|
allowDuplicate,
|
|
306
315
|
allowRedelegation,
|
|
307
316
|
slackChannelId,
|
|
@@ -501,6 +510,7 @@ export async function sendTaskHandler(
|
|
|
501
510
|
profile,
|
|
502
511
|
model: normalizedModel.model,
|
|
503
512
|
modelTier: normalizedModel.modelTier,
|
|
513
|
+
modelGroup,
|
|
504
514
|
agentId: effectiveAgentId,
|
|
505
515
|
// createTaskExtended fills an unset repo from the parent; judge that repo's config.
|
|
506
516
|
vcsRepo: effectiveVcsRepo || effectiveParentTask?.vcsRepo,
|
|
@@ -544,6 +554,7 @@ export async function sendTaskHandler(
|
|
|
544
554
|
modelTier: normalizedModel.modelTier,
|
|
545
555
|
effort,
|
|
546
556
|
profile,
|
|
557
|
+
modelGroup,
|
|
547
558
|
slackChannelId,
|
|
548
559
|
slackThreadTs,
|
|
549
560
|
slackUserId,
|
|
@@ -758,7 +769,10 @@ export async function sendTaskHandler(
|
|
|
758
769
|
};
|
|
759
770
|
});
|
|
760
771
|
const result = await created.catch((error: unknown) => {
|
|
761
|
-
// The profile was deleted between taskProfileError and the insert.
|
|
772
|
+
// The profile or group was deleted between taskProfileError and the insert.
|
|
773
|
+
if (modelGroupRefError(error)) {
|
|
774
|
+
return { success: false, message: `Unknown model group "${modelGroup}".`, task: undefined };
|
|
775
|
+
}
|
|
762
776
|
if (modelProfileRefError(error) !== "missing") throw error;
|
|
763
777
|
return { success: false, message: `Unknown model profile "${profile}".`, task: undefined };
|
|
764
778
|
});
|
package/src/tools/slack-post.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { can } from "@/rbac";
|
|
|
17
17
|
import { getSlackApp } from "@/slack/app";
|
|
18
18
|
import { buildMrkdwnSectionBlocks, findReservedActionId, getTaskLink } from "@/slack/blocks";
|
|
19
19
|
import { withAutoJoin } from "@/slack/channel-join";
|
|
20
|
+
import { isSlackReplyFooterEnabled } from "@/slack/config";
|
|
20
21
|
import { resolveSlackConversationId } from "@/slack/dm";
|
|
21
22
|
import { externalChannelToolError, getChannelBlockReason } from "@/slack/external-channel";
|
|
22
23
|
import { getAgentDisplayName, getAgentSlackIcon, markdownToSlack } from "@/slack/responses";
|
|
@@ -132,12 +133,16 @@ export const registerSlackPostTool = (server: McpServer) => {
|
|
|
132
133
|
? await getTaskById(requestInfo.sourceTaskId)
|
|
133
134
|
: undefined;
|
|
134
135
|
const contextKey = sourceTask?.contextKey;
|
|
135
|
-
const tree = threadTs ? await getSlackTreeMessageByThread(channelId, threadTs) : null;
|
|
136
136
|
const messageBlocks: Record<string, unknown>[] = [
|
|
137
137
|
...(cardSlack && slackMessage ? buildMrkdwnSectionBlocks(slackMessage) : []),
|
|
138
138
|
...(cardSlack?.blocks ?? blocks ?? buildMrkdwnSectionBlocks(slackMessage)),
|
|
139
139
|
];
|
|
140
|
-
if (
|
|
140
|
+
if (
|
|
141
|
+
sourceTask &&
|
|
142
|
+
threadTs &&
|
|
143
|
+
isSlackReplyFooterEnabled() &&
|
|
144
|
+
(await getSlackTreeMessageByThread(channelId, threadTs))
|
|
145
|
+
) {
|
|
141
146
|
if (messageBlocks.length >= 50) {
|
|
142
147
|
return toolErr("At most 49 blocks are allowed when a provenance footer is added.");
|
|
143
148
|
}
|
package/src/tools/slack-reply.ts
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
getTaskUrl,
|
|
26
26
|
} from "@/slack/blocks";
|
|
27
27
|
import { withAutoJoin } from "@/slack/channel-join";
|
|
28
|
+
import { isSlackReplyFooterEnabled } from "@/slack/config";
|
|
28
29
|
import { externalChannelToolError, getChannelBlockReason } from "@/slack/external-channel";
|
|
29
30
|
import { getAgentDisplayName, getAgentSlackIcon, markdownToSlack } from "@/slack/responses";
|
|
30
31
|
import { createToolRegistrar, swarmToolOutputSchema, toolErr, toolOk } from "@/tools/utils";
|
|
@@ -174,7 +175,6 @@ export const registerSlackReplyTool = (server: McpServer) => {
|
|
|
174
175
|
),
|
|
175
176
|
);
|
|
176
177
|
|
|
177
|
-
const tree = await getSlackTreeMessageByThread(slackChannelId, slackThreadTs);
|
|
178
178
|
const messageBlocks: Record<string, unknown>[] = [
|
|
179
179
|
...(cardSlack && slackMessage ? buildMrkdwnSectionBlocks(slackMessage) : []),
|
|
180
180
|
...(renderedBlocks ?? buildMrkdwnSectionBlocks(slackMessage)),
|
|
@@ -195,7 +195,11 @@ export const registerSlackReplyTool = (server: McpServer) => {
|
|
|
195
195
|
}
|
|
196
196
|
if (messageBlocks.length > 50)
|
|
197
197
|
return toolErr("At most 50 blocks are allowed including citation sources.");
|
|
198
|
-
if (
|
|
198
|
+
if (
|
|
199
|
+
taskId &&
|
|
200
|
+
isSlackReplyFooterEnabled() &&
|
|
201
|
+
(await getSlackTreeMessageByThread(slackChannelId, slackThreadTs))
|
|
202
|
+
) {
|
|
199
203
|
if (messageBlocks.length >= 50) {
|
|
200
204
|
return toolErr("At most 49 blocks are allowed when a provenance footer is added.");
|
|
201
205
|
}
|
package/src/tools/task-action.ts
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
releaseTask,
|
|
29
29
|
updateTaskClaudeSessionId,
|
|
30
30
|
} from "@/be/db";
|
|
31
|
-
import { modelProfileRefError, taskProfileError } from "@/be/db/model-profiles";
|
|
31
|
+
import { modelGroupRefError, modelProfileRefError, taskProfileError } from "@/be/db/model-profiles";
|
|
32
32
|
import { explicitModelErrorForAgent } from "@/be/model-validation";
|
|
33
33
|
import { touchRuntimeInstance } from "@/be/multi-runtime";
|
|
34
34
|
import { applyPreTaskCreate } from "@/extensions/apply-task-create";
|
|
@@ -102,7 +102,7 @@ export const taskActionInputSchema = z.object({
|
|
|
102
102
|
"Concrete model override for the created task, interpreted by the claiming worker's harness/provider. This does not switch providers. Only used with 'create' action. The model must run on the assignee's harness (an Anthropic model on a Claude agent, an OpenAI model on a Codex agent); a mismatch is rejected.",
|
|
103
103
|
),
|
|
104
104
|
modelTier: ModelTierSchema.optional().describe(
|
|
105
|
-
"Deprecated: pass profile \"<harness>-<tier>\"
|
|
105
|
+
"Deprecated: pass modelGroup \"<tier>\" (the tier's group) or profile \"<harness>-<tier>\" (same model) instead. Portable model tier for the created task: 'smol', 'regular', 'smart', or 'ultra'. Resolved when a worker claims the task, through the model group named after the tier, else the seeded <harness>-<tier> profile of its harness. Only used with 'create' action.",
|
|
106
106
|
),
|
|
107
107
|
allowCustomModel: z
|
|
108
108
|
.boolean()
|
|
@@ -121,6 +121,14 @@ export const taskActionInputSchema = z.object({
|
|
|
121
121
|
.describe(
|
|
122
122
|
"Model profile name for the created pool task (see list-model-profiles); only workers on its harness claim it. Exclusive with model and modelTier. Only used with 'create' action.",
|
|
123
123
|
),
|
|
124
|
+
modelGroup: z
|
|
125
|
+
.string()
|
|
126
|
+
.trim()
|
|
127
|
+
.min(1)
|
|
128
|
+
.optional()
|
|
129
|
+
.describe(
|
|
130
|
+
"Model group name for the created pool task (GET /api/model-groups); only workers where a member runs claim it, and each runs its first passing member. Exclusive with model, modelTier and profile. Only used with 'create' action.",
|
|
131
|
+
),
|
|
124
132
|
requiredCapabilities: z
|
|
125
133
|
.array(z.string())
|
|
126
134
|
.optional()
|
|
@@ -314,6 +322,7 @@ export async function taskActionHandler(
|
|
|
314
322
|
profile: input.profile,
|
|
315
323
|
model: normalizedModel.model,
|
|
316
324
|
modelTier: normalizedModel.modelTier,
|
|
325
|
+
modelGroup: input.modelGroup,
|
|
317
326
|
});
|
|
318
327
|
if (profileError) return taskActionResult({ success: false, message: profileError }, agentId);
|
|
319
328
|
try {
|
|
@@ -345,6 +354,7 @@ export async function taskActionHandler(
|
|
|
345
354
|
modelTier: normalizedModel.modelTier,
|
|
346
355
|
effort: input.effort,
|
|
347
356
|
profile: input.profile,
|
|
357
|
+
modelGroup: input.modelGroup,
|
|
348
358
|
routingAffinity:
|
|
349
359
|
leadOnly || requiredCapabilities?.length
|
|
350
360
|
? { leadOnly, capabilities: requiredCapabilities ?? [] }
|
|
@@ -669,7 +679,10 @@ export async function taskActionHandler(
|
|
|
669
679
|
}
|
|
670
680
|
});
|
|
671
681
|
const result = await transacted.catch((error: unknown): TaskActionResult => {
|
|
672
|
-
// A create whose profile was deleted between taskProfileError and the insert.
|
|
682
|
+
// A create whose profile or group was deleted between taskProfileError and the insert.
|
|
683
|
+
if (modelGroupRefError(error)) {
|
|
684
|
+
return { success: false, message: `Unknown model group "${input.modelGroup}".` };
|
|
685
|
+
}
|
|
673
686
|
if (modelProfileRefError(error) !== "missing") throw error;
|
|
674
687
|
return { success: false, message: `Unknown model profile "${input.profile}".` };
|
|
675
688
|
});
|
package/src/tools/utils.ts
CHANGED
|
@@ -391,7 +391,7 @@ const modelTierDeprecatedNudge = (r: SwarmToolResult): string | undefined => {
|
|
|
391
391
|
typeof note.suggestedProfile === "string"
|
|
392
392
|
? note.suggestedProfile
|
|
393
393
|
: `<harness>-${String(note.tier)}`;
|
|
394
|
-
return `modelTier is deprecated: pass profile "${profile}" (same model).`;
|
|
394
|
+
return `modelTier is deprecated: pass modelGroup "${String(note.tier)}" (the tier's group) or profile "${profile}" (same model).`;
|
|
395
395
|
};
|
|
396
396
|
|
|
397
397
|
/**
|
package/src/types.ts
CHANGED
|
@@ -1002,6 +1002,10 @@ export const AgentTaskSchema = z
|
|
|
1002
1002
|
// the agent's default). Unset when no profile applied.
|
|
1003
1003
|
profile: z.string().optional(),
|
|
1004
1004
|
resolvedProfile: z.string().optional(),
|
|
1005
|
+
// Model group (runbooks/model-tiers.md § Model groups): the creator's ask.
|
|
1006
|
+
// Claim runs the first member that passes on the claiming agent; a
|
|
1007
|
+
// fallback hop's resume also sets `profile` to the member it picked.
|
|
1008
|
+
modelGroup: z.string().optional(),
|
|
1005
1009
|
// Provider-error fallback hops so far, oldest first; carried by every
|
|
1006
1010
|
// resume of the same work. Unset when the work never hopped.
|
|
1007
1011
|
fallbackHops: z.array(FallbackHopSchema).optional(),
|
|
@@ -1141,6 +1145,7 @@ export const CreateTaskOptionsSchema = z.object({
|
|
|
1141
1145
|
modelTier: ModelTierSchema.optional(),
|
|
1142
1146
|
effort: ReasoningEffortSchema.optional(),
|
|
1143
1147
|
profile: z.string().optional(),
|
|
1148
|
+
modelGroup: z.string().optional(),
|
|
1144
1149
|
/** Internal: the fallback hops a resume carries over (`createResumeFollowUp`). */
|
|
1145
1150
|
fallbackHops: z.array(FallbackHopSchema).optional(),
|
|
1146
1151
|
scheduleId: z.string().optional(),
|
|
@@ -2068,6 +2073,8 @@ export const AgentLogEventTypeSchema = z.enum([
|
|
|
2068
2073
|
"task_dispatch_rejected_affinity",
|
|
2069
2074
|
"task_authorization_rejected",
|
|
2070
2075
|
"task_recovery_authorization",
|
|
2076
|
+
// Claim ran a model group's member; metadata lists the members it skipped
|
|
2077
|
+
"task_model_group_resolved",
|
|
2071
2078
|
// Reboot sweep moved a never-started dependent from the swept task to its retry
|
|
2072
2079
|
"task_dependency_repointed",
|
|
2073
2080
|
"task_released",
|
|
@@ -2355,6 +2362,8 @@ export const ScheduledTaskSchema = z
|
|
|
2355
2362
|
modelTier: ModelTierSchema.optional(),
|
|
2356
2363
|
/** Model profile copied onto every fired task; exclusive with model/modelTier. */
|
|
2357
2364
|
profile: z.string().optional(),
|
|
2365
|
+
/** Model group copied onto every fired task; exclusive with model/modelTier/profile. */
|
|
2366
|
+
modelGroup: z.string().optional(),
|
|
2358
2367
|
scheduleType: z.enum(["recurring", "one_time"]).default("recurring"),
|
|
2359
2368
|
targetType: ScheduledTaskTargetTypeSchema.default("agent-task"),
|
|
2360
2369
|
workflowId: z.uuid().optional(),
|
|
@@ -3604,6 +3613,7 @@ export type AgentTaskSummary = Pick<
|
|
|
3604
3613
|
| "resolvedEffort"
|
|
3605
3614
|
| "profile"
|
|
3606
3615
|
| "resolvedProfile"
|
|
3616
|
+
| "modelGroup"
|
|
3607
3617
|
| "provider"
|
|
3608
3618
|
| "requestedByUserId"
|
|
3609
3619
|
| "progress"
|
package/src/utils/amp-models.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Model strings the `amp` harness accepts. Pure, so the API server can validate
|
|
3
3
|
* a task or agent `model` without importing the worker-side adapter.
|
|
4
4
|
*
|
|
5
|
-
* Amp has no model flag.
|
|
6
|
-
*
|
|
5
|
+
* Amp has no model flag. The per-task plugin agent runs a `provider/model`:
|
|
6
|
+
* the pin, else the model of the selected mode (AMP_MODE_MODELS).
|
|
7
7
|
*/
|
|
8
8
|
import { DEFAULT_MODEL_TIER_MAP } from "../types";
|
|
9
9
|
|
|
@@ -31,7 +31,23 @@ export function ampBillsCacheWrites(model: string): boolean {
|
|
|
31
31
|
return /^(anthropic\/)?claude/i.test(model);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* The plugin agent's model for each mode. Amp's CLI (live on 0.0.1795060840)
|
|
36
|
+
* requires a plugin agent to name a `provider/model` (`extends` throws, and a plugin
|
|
37
|
+
* mode cannot wrap a built-in mode), so a mode runs the model Amp ran for it
|
|
38
|
+
* (the AMP_ESTIMATE_MODELS measurement), with that model's own prompt and tools.
|
|
39
|
+
*/
|
|
40
|
+
export const AMP_MODE_MODELS: Readonly<Record<AmpMode, string>> = {
|
|
41
|
+
low: "zhipuai/glm-5.3-flash",
|
|
42
|
+
medium: "anthropic/claude-opus-5-5",
|
|
43
|
+
high: "openai/gpt-6-astra",
|
|
44
|
+
ultra: "anthropic/claude-fable-5-1",
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** Amp's plugin agents default to `medium` effort, which GLM-5.3 Flash rejects (low, high, max). */
|
|
48
|
+
export const AMP_MODE_EFFORTS: Readonly<Partial<Record<AmpMode, string>>> = { low: "low" };
|
|
49
|
+
|
|
50
|
+
/** The mode a pinned model is reported and cost-estimated under. */
|
|
35
51
|
export const AMP_PIN_BASE_MODE: AmpMode = "medium";
|
|
36
52
|
|
|
37
53
|
/** `provider/model`, the form Amp's plugin agents take (`openai/gpt-5-nano`). */
|
|
@@ -40,7 +56,7 @@ const AMP_PIN_RE = /^[a-z0-9][a-z0-9._-]*\/[A-Za-z0-9][A-Za-z0-9._:/-]*$/;
|
|
|
40
56
|
export interface AmpModelSelection {
|
|
41
57
|
/** The model string as stored on the task: a mode or `provider/model`. */
|
|
42
58
|
model: string;
|
|
43
|
-
/** The built-in mode
|
|
59
|
+
/** The built-in mode the session is reported under; without a pin, its model runs. */
|
|
44
60
|
baseMode: AmpMode;
|
|
45
61
|
/** The pinned `provider/model`, when the task named a concrete model. */
|
|
46
62
|
pin?: string;
|
package/src/utils/constants.ts
CHANGED
|
@@ -86,10 +86,11 @@ export function setApiLoopbackBaseUrl(url: string): void {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
* Base URL that scripts, the script tools
|
|
90
|
-
* to call this API. Order: the
|
|
91
|
-
* server's loopback URL once it
|
|
92
|
-
* keeps these calls off the public
|
|
89
|
+
* Base URL that scripts, the script tools, script workflow subprocesses and any
|
|
90
|
+
* other API-side code use to call this API with its own key. Order: the
|
|
91
|
+
* `SCRIPT_API_BASE_URL` deployment env, then this server's loopback URL once it
|
|
92
|
+
* listens, then {@link getMcpBaseUrl}. Loopback keeps these calls off the public
|
|
93
|
+
* proxy that `MCP_BASE_URL` often names, and off a stored `MCP_BASE_URL` row.
|
|
93
94
|
* Never use it for URLs that leave this host.
|
|
94
95
|
*/
|
|
95
96
|
export function getScriptApiBaseUrl(): string {
|
|
@@ -1580,9 +1580,11 @@ export function scrubObject<T>(
|
|
|
1580
1580
|
seen = new WeakSet<object>(),
|
|
1581
1581
|
// Rows of one result repeat the same keys: scrub each distinct key once per call.
|
|
1582
1582
|
keyCache = new Map<string, string>(),
|
|
1583
|
+
// A hot caller passes `createSweepScrubber()` to skip rules a text cannot trigger.
|
|
1584
|
+
scrub: (text: string) => string = scrubSecrets,
|
|
1583
1585
|
): T {
|
|
1584
1586
|
if (value === null || value === undefined) return value;
|
|
1585
|
-
if (typeof value === "string") return
|
|
1587
|
+
if (typeof value === "string") return scrub(value) as T;
|
|
1586
1588
|
if (typeof value !== "object") return value;
|
|
1587
1589
|
|
|
1588
1590
|
if (seen.has(value)) {
|
|
@@ -1591,7 +1593,7 @@ export function scrubObject<T>(
|
|
|
1591
1593
|
seen.add(value);
|
|
1592
1594
|
|
|
1593
1595
|
if (Array.isArray(value)) {
|
|
1594
|
-
return value.map((item) => scrubObject(item, seen, keyCache)) as T;
|
|
1596
|
+
return value.map((item) => scrubObject(item, seen, keyCache, scrub)) as T;
|
|
1595
1597
|
}
|
|
1596
1598
|
|
|
1597
1599
|
// Keys are scrubbed too: a map keyed by a token leaks it as a key. Two keys
|
|
@@ -1603,7 +1605,7 @@ export function scrubObject<T>(
|
|
|
1603
1605
|
for (const [key, child] of Object.entries(value as Record<string, unknown>)) {
|
|
1604
1606
|
let scrubbed = keyCache.get(key);
|
|
1605
1607
|
if (scrubbed === undefined) {
|
|
1606
|
-
scrubbed =
|
|
1608
|
+
scrubbed = scrub(key);
|
|
1607
1609
|
keyCache.set(key, scrubbed);
|
|
1608
1610
|
}
|
|
1609
1611
|
let outKey = scrubbed;
|
|
@@ -1613,7 +1615,7 @@ export function scrubObject<T>(
|
|
|
1613
1615
|
n++;
|
|
1614
1616
|
nextSuffix.set(scrubbed, n + 1);
|
|
1615
1617
|
}
|
|
1616
|
-
out[outKey] = scrubObject(child, seen, keyCache);
|
|
1618
|
+
out[outKey] = scrubObject(child, seen, keyCache, scrub);
|
|
1617
1619
|
}
|
|
1618
1620
|
return out as T;
|
|
1619
1621
|
}
|
|
@@ -129,6 +129,17 @@ function citationMarker(
|
|
|
129
129
|
return format === "slack" ? `<${destination}|[${index}]>` : `[[${index}]](${destination})`;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
/** The http(s) links of the citations that render, in index order. */
|
|
133
|
+
export function taskCitationUrls(citations: readonly TaskCitation[]): string[] {
|
|
134
|
+
return citations
|
|
135
|
+
.filter(isRenderableCitation)
|
|
136
|
+
.sort((a, b) => a.index - b.index)
|
|
137
|
+
.flatMap((citation) => {
|
|
138
|
+
const url = citation.resolvedUrl ? citationHttpUrl(citation.resolvedUrl) : null;
|
|
139
|
+
return url ? [url] : [];
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
132
143
|
export interface TaskCitationSourceGroup {
|
|
133
144
|
heading: "Sources" | "General sources";
|
|
134
145
|
/** One rendered `[N] label` entry per citation, in index order. */
|