@desplega.ai/agent-swarm 2.13.2 → 2.13.4
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-mr4temec.js +17 -0
- package/dist/{acp-targets-mz8c5dnt.js → acp-targets-zrk9k0n7.js} +10 -10
- package/dist/{actions-5ft3qp5a.js → actions-acqqj9jn.js} +236 -26
- package/dist/{agent-fs-provision-6fgz7wvz.js → agent-fs-provision-zmaykqnd.js} +4 -4
- package/dist/{amp-adapter-nthn8ezm.js → amp-adapter-a7ts8tmw.js} +3 -3
- package/dist/{app-535m78qw.js → app-tmwa442h.js} +7 -7
- package/dist/{approval-notifications-dewbk403.js → approval-notifications-6psaaaye.js} +8 -8
- package/dist/{assistant-39zyabv2.js → assistant-564v6emv.js} +25 -25
- package/dist/{boot-args-schema-bqv5bf77.js → boot-args-schema-n099e0f2.js} +1 -1
- package/dist/{boot-reembed-fas7z3zn.js → boot-reembed-chx66qfk.js} +1 -1
- package/dist/{boot-reembed-157c0gcz.js → boot-reembed-epvg4fp9.js} +1 -1
- package/dist/{boot-scrub-sweep-tmec0be2.js → boot-scrub-sweep-dhkfp0a7.js} +2 -2
- package/dist/{boot-seeds-32zm50x2.js → boot-seeds-m74fc07r.js} +4 -4
- package/dist/{boxd-hr8rsxzq.js → boxd-451q55ys.js} +1 -1
- package/dist/{claude-adapter-gwq7x2nj.js → claude-adapter-hw63yj3j.js} +12 -9
- package/dist/{claude-managed-adapter-rkvw6fvq.js → claude-managed-adapter-z5s7fx6p.js} +3 -3
- package/dist/{claude-managed-setup-0vgz4d1j.js → claude-managed-setup-wee1762m.js} +3 -3
- package/dist/{claude-sdk-session-5wbwxy8c.js → claude-sdk-session-cktyqkpk.js} +27 -13
- package/dist/{cli-d528acsw.js → cli-0fgvnb0x.js} +7 -7
- package/dist/{cli-2v4xxnx2.js → cli-0h8skzss.js} +1 -1
- package/dist/{cli-jkkcm72j.js → cli-0p76my9q.js} +31 -16
- package/dist/{cli-fp65jdp2.js → cli-1kvcsd2f.js} +219 -155
- package/dist/{cli-gc7jkf4a.js → cli-1vmhnncj.js} +3 -3
- package/dist/{cli-tceqvv6h.js → cli-29h5239w.js} +5 -5
- package/dist/cli-2ap1the6.js +11 -0
- package/dist/{cli-8fj8yfmk.js → cli-2vp0z049.js} +1 -1
- package/dist/{cli-ewb028rs.js → cli-3bxrrh53.js} +4 -4
- package/dist/{cli-nvqq3232.js → cli-3tzmh38q.js} +9 -9
- package/dist/{cli-0xwb7zpt.js → cli-3xqad83h.js} +2 -2
- package/dist/{cli-0f7n3td3.js → cli-3zrwrnz7.js} +1 -1
- package/dist/{cli-2wde56gv.js → cli-404am6f3.js} +7 -7
- package/dist/{cli-r4fphq38.js → cli-49aq3cyn.js} +4 -4
- package/dist/{cli-8qvte9hn.js → cli-4fpa0zns.js} +3 -3
- package/dist/{cli-x5yb8zc8.js → cli-4pbwg7sn.js} +2 -2
- package/dist/{cli-s08zsqva.js → cli-4q2c8rxw.js} +76 -10
- package/dist/{cli-3mf04tkh.js → cli-4vynxtrb.js} +1 -1
- package/dist/{cli-tbdw3f92.js → cli-5ashycw3.js} +3 -3
- package/dist/{cli-c9bwawf9.js → cli-5rgm8p39.js} +3 -3
- package/dist/{cli-g0b3ma7r.js → cli-5rxsb3wq.js} +6 -6
- package/dist/{cli-a6rzw649.js → cli-60dwk8tx.js} +3 -3
- package/dist/{cli-xhkek467.js → cli-7by7vp6m.js} +30 -4
- package/dist/{cli-62fjschk.js → cli-7g3fg4gf.js} +7 -7
- package/dist/{cli-ka13xx6b.js → cli-7gbff32z.js} +2 -2
- package/dist/{cli-q8aq48v1.js → cli-8b4rpnwj.js} +1 -1
- package/dist/{cli-1f48qdnb.js → cli-8cas2xvp.js} +3 -3
- package/dist/{cli-dnvmwsvc.js → cli-904wk98s.js} +799 -371
- package/dist/{cli-m1wddksc.js → cli-93n305hm.js} +2 -2
- package/dist/{cli-31vt7baf.js → cli-944w9wb4.js} +21 -17
- package/dist/{cli-je587f74.js → cli-94gx6ze9.js} +1 -1
- package/dist/{cli-fcwrd7bh.js → cli-9ah37a8a.js} +6 -6
- package/dist/{cli-rfejbpe1.js → cli-akm6y2a8.js} +1 -1
- package/dist/{cli-f8rcvf2x.js → cli-azj9t1f9.js} +37 -2
- package/dist/{cli-mwxez0pz.js → cli-b768ek79.js} +1 -1
- package/dist/{cli-cmgdptmx.js → cli-bv4vvnmg.js} +31 -7
- package/dist/{cli-1gevjrc1.js → cli-bzcwwebm.js} +1 -1
- package/dist/{cli-sjk85d7v.js → cli-cq4am6vg.js} +3 -3
- package/dist/{cli-f1sdh8ca.js → cli-d5pc8ep0.js} +103 -9
- package/dist/{cli-7m6bbtab.js → cli-ea7nz50q.js} +12 -12
- package/dist/{cli-zkbz8m2q.js → cli-fkpnx3vf.js} +1 -1
- package/dist/{cli-ya1cj689.js → cli-fw67mnyc.js} +1 -1
- package/dist/{cli-5basv0e7.js → cli-gkv0r2hq.js} +1 -1
- package/dist/{cli-nkfv398a.js → cli-gse7bp3z.js} +12 -10
- package/dist/{cli-4djg31jh.js → cli-gtj12v95.js} +1 -1
- package/dist/{cli-qn79645p.js → cli-h9d3sdnc.js} +1 -1
- package/dist/{cli-tgmate57.js → cli-hdhpdrka.js} +6 -23
- package/dist/{cli-fgm2mad9.js → cli-hhtbandk.js} +2 -2
- package/dist/cli-hyqksecw.js +1907 -0
- package/dist/{cli-t25rq8mg.js → cli-ja450998.js} +40 -11
- package/dist/{cli-43dsqhcp.js → cli-jbrc98qb.js} +4 -4
- package/dist/{cli-82j36f2m.js → cli-jjzxsk47.js} +9 -3
- package/dist/{cli-xerdrnqs.js → cli-jyhbvdga.js} +3 -3
- package/dist/{cli-t9nxq30h.js → cli-jzerrzgc.js} +8 -8
- package/dist/{cli-hv3820ez.js → cli-k0nebh10.js} +1 -1
- package/dist/{cli-s6fhqbz1.js → cli-ka48vpev.js} +6 -6
- package/dist/{cli-d2epqm0y.js → cli-kezzteka.js} +1 -1
- package/dist/{cli-getrvmtx.js → cli-kj84fqxz.js} +2 -2
- package/dist/{cli-h0ewec3d.js → cli-kr0jpw9c.js} +1 -1
- package/dist/{cli-gq6qhmrr.js → cli-m1sns1da.js} +3 -3
- package/dist/{cli-bp2rt28p.js → cli-n1kjs58m.js} +5 -5
- package/dist/{cli-rvhaahfv.js → cli-nc4pbwmp.js} +9 -9
- package/dist/{cli-d0jb2qnt.js → cli-p3knvk62.js} +74 -47
- package/dist/{cli-50whymxq.js → cli-p436yrzp.js} +2 -2
- package/dist/{cli-cs26ed89.js → cli-phdzn699.js} +8 -8
- package/dist/{cli-b0kqw55g.js → cli-pz1dp12c.js} +1 -1
- package/dist/{cli-8a4qg44m.js → cli-pz1nq5xm.js} +6 -6
- package/dist/{cli-e87fg3en.js → cli-qzz6tz8s.js} +1 -1
- package/dist/{cli-69eq6gdk.js → cli-rmgvwcmy.js} +38 -29
- package/dist/{cli-5k1hvycs.js → cli-rv3y60bt.js} +4 -4
- package/dist/cli-s33bzmk0.js +27 -0
- package/dist/{cli-at67kvnp.js → cli-srktrbby.js} +1 -1
- package/dist/{cli-6rmryz03.js → cli-t0jmkcah.js} +14 -14
- package/dist/{cli-eetzmsy5.js → cli-t9pzz2eq.js} +2 -2
- package/dist/{cli-wdtqkqnq.js → cli-tr19nyn9.js} +4 -4
- package/dist/{cli-erh1rgh4.js → cli-ts5yv7dn.js} +165 -88
- package/dist/{cli-zqy28rwx.js → cli-tsc3pdfd.js} +4 -4
- package/dist/{cli-x7aqhxj5.js → cli-tzw1jr2t.js} +2 -2
- package/dist/{cli-n14r8h4n.js → cli-x2cem5vy.js} +6 -4
- package/dist/{cli-vx9acp12.js → cli-ybte1fqc.js} +1 -1
- package/dist/{cli-xysy1g8x.js → cli-ysv0k1we.js} +2 -2
- package/dist/{cli-vdfngx2g.js → cli-ywy8yz6t.js} +2 -2
- package/dist/{cli-cpkxh68d.js → cli-z1vam71h.js} +2 -2
- package/dist/{cli-zm6bkx3e.js → cli-zexwhj3f.js} +3 -3
- package/dist/{cli-j2ybkdk2.js → cli-zhwjdhjr.js} +2 -2
- package/dist/{cli-gedf48yw.js → cli-zjdhrzm0.js} +8 -8
- package/dist/cli.js +20 -20
- package/dist/{codex-adapter-x25xfbnh.js → codex-adapter-2fs2c0n6.js} +8 -8
- package/dist/{codex-hook-c0nvm30r.js → codex-hook-jxjv6dy5.js} +10 -3
- package/dist/{codex-login-ven5cz5j.js → codex-login-ktfg1cxk.js} +1 -1
- package/dist/{codex-session-runner-kn5xnrvp.js → codex-session-runner-r55tmx4c.js} +9 -9
- package/dist/{commands-8n59gxmy.js → commands-0mxdy9x8.js} +3 -3
- package/dist/{controller-wn3vd217.js → controller-g3vkfhr4.js} +4 -4
- package/dist/{controllers-connect-09gvkrhc.js → controllers-connect-4wdmncqt.js} +25 -25
- package/dist/core-gsvj5f3z.js +42 -0
- package/dist/{cursor-adapter-w1681kp1.js → cursor-adapter-t9qb96q2.js} +2 -2
- package/dist/{db-e71keqxk.js → db-487vvyv9.js} +3 -3
- package/dist/{db-spg81qtr.js → db-76p7w3gr.js} +2 -2
- package/dist/{devin-adapter-fs90ab4v.js → devin-adapter-3bp6rape.js} +1 -1
- package/dist/{dispatcher-fr4vawwb.js → dispatcher-64rp6w67.js} +22 -22
- package/dist/{docker-1h33jvh9.js → docker-a59g3ebm.js} +2 -2
- package/dist/{dsh-adapter-g9yqv09y.js → dsh-adapter-8abzqk5c.js} +2 -2
- package/dist/{e2b-y7e5kmzf.js → e2b-3ykbe805.js} +2 -2
- package/dist/{e2b-jnk0yeva.js → e2b-dc8f6ctq.js} +2 -2
- package/dist/{easter-egg-3d-ac9tv9a6.js → easter-egg-3d-jrrwyf55.js} +1 -1
- package/dist/{embedding-space-an77f45k.js → embedding-space-001hhhpk.js} +6 -6
- package/dist/{embeddings-jkrehejr.js → embeddings-esj19cnw.js} +1 -1
- package/dist/{event-bus-08t2b4y2.js → event-bus-7gbsr0g4.js} +1 -1
- package/dist/{execute-3mys4nta.js → execute-301hkxqg.js} +1 -1
- package/dist/{external-channel-s6zxpts9.js → external-channel-w10e2j05.js} +2 -2
- package/dist/fx-adapter-4sjrbdne.js +20 -0
- package/dist/grok-adapter-3a0ezfee.js +20 -0
- package/dist/handlers-ef3k11hb.js +41 -0
- package/dist/{heartbeat-jjpb44e5.js → heartbeat-tbrj7vhq.js} +25 -25
- package/dist/hook-3am1sq68.js +22 -0
- package/dist/{hook-y6n23zzj.js → hook-tx917rqw.js} +11 -8
- package/dist/{http-8c6y008s.js → http-3rmemtqy.js} +340 -1841
- package/dist/{index-mbpxhc4w.js → index-126v2d0t.js} +1 -4
- package/dist/{index-xcw7hjt5.js → index-2jw11t8s.js} +26 -26
- package/dist/{index-p2f5xg64.js → index-3j803vnb.js} +36259 -34299
- package/dist/{index-we3nd2t0.js → index-aetfyx6p.js} +1 -1
- package/dist/index-e6bq0exk.js +42 -0
- package/dist/{index-0vthtbc2.js → index-gfnq66t1.js} +231 -25
- package/dist/index-hf2k1vge.js +39 -0
- package/dist/{index-6h3r0vpe.js → index-s7xtvc0f.js} +1 -1
- package/dist/index-taxmejj3.js +44 -0
- package/dist/{k8s-8326q0rq.js → k8s-36gfn847.js} +2 -2
- package/dist/{keepalive-7e9r5dvp.js → keepalive-9px3t7qj.js} +5 -5
- package/dist/lead-5vt6f174.js +83 -0
- package/dist/{maintenance-d3erjvcg.js → maintenance-vwqjwst6.js} +1 -1
- package/dist/{oauth-refresh-sweep-0qh70988.js → oauth-refresh-sweep-yqry3wn4.js} +4 -4
- package/dist/{object-webhooks-ac7v2q5p.js → object-webhooks-8s1wtths.js} +7 -7
- package/dist/{onboard-5yphtken.js → onboard-hb8czx0p.js} +7 -7
- package/dist/{opencode-adapter-0xvyba4m.js → opencode-adapter-djd6m6dk.js} +8 -8
- package/dist/{otel-impl-svqp691q.js → otel-impl-2ymwyczz.js} +2 -2
- package/dist/{pending-bn4xe5br.js → pending-nxavtvx7.js} +23 -23
- package/dist/{pi-mono-adapter-763s8a3w.js → pi-mono-adapter-d2cpmcy4.js} +13 -13
- package/dist/{pricing-refresh-kfc215mf.js → pricing-refresh-1yz8jkqv.js} +2 -2
- package/dist/{rbac-roles-6r4h2ghj.js → rbac-roles-7s6m31xw.js} +6 -4
- package/dist/{rbac-roles-3bznvkpt.js → rbac-roles-dbpx0x9v.js} +3 -3
- package/dist/{render-v2-f3qedbpy.js → render-v2-7y20rjrn.js} +7 -7
- package/dist/{resume-vcag4ann.js → resume-wz546x47.js} +10 -10
- package/dist/{runtime-x0s55z2t.js → runtime-cb5bd9tz.js} +1 -1
- package/dist/{session-access-nwzve8q2.js → session-access-4vcft8kq.js} +5 -5
- package/dist/{session-source-backfill-jpqfzmgz.js → session-source-backfill-57b50tpw.js} +3 -3
- package/dist/{setup-d2smwaem.js → setup-e1tevjyj.js} +1 -1
- package/dist/thread-buffer-686pa1p1.js +42 -0
- package/dist/{tree-visibility-dwzc8en0.js → tree-visibility-07wf1nct.js} +2 -2
- package/dist/{user-merge-jobs-4ce7kma2.js → user-merge-jobs-n20qpv6s.js} +3 -3
- package/dist/{virtual-modules-78a6yw71.js → virtual-modules-6fxmn1yv.js} +3 -3
- package/dist/{work-objects-m0w1e7q8.js → work-objects-eg7y48pe.js} +25 -25
- package/dist/worker-4vp616ms.js +83 -0
- package/dist/{worker-follow-up-e3t6f895.js → worker-follow-up-jnvnnf2b.js} +22 -22
- package/dist/{x-asbrnafg.js → x-d27jj7z7.js} +2 -2
- package/openapi.json +478 -28
- package/package.json +3 -3
- package/src/be/db/approvals.ts +2 -0
- package/src/be/db/runtime.ts +5 -0
- package/src/be/db/script-run-sources.ts +17 -0
- package/src/be/db-retention.ts +1 -1
- package/src/be/db.ts +71 -62
- package/src/be/design-system.ts +63 -0
- package/src/be/migrations/342_script_run_sources.sql +20 -0
- package/src/be/migrations/runner.ts +8 -0
- package/src/be/migrations/script-run-sources.ts +51 -0
- package/src/be/rbac-roles.ts +2 -0
- package/src/be/scripts/typecheck.ts +4 -2
- package/src/be/seed-scripts/catalog/design-system-seed.ts +158 -0
- package/src/be/seed-scripts/index.ts +9 -0
- package/src/be/swarm-config-guard.ts +21 -1
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/runner.ts +62 -6
- package/src/heartbeat/heartbeat.ts +18 -4
- package/src/hooks/codex-hook.ts +15 -4
- package/src/hooks/hook.ts +7 -0
- package/src/http/all-routes.ts +1 -0
- package/src/http/approval-chat-answer.ts +99 -0
- package/src/http/approval-requests.ts +280 -225
- package/src/http/design-system.ts +103 -0
- package/src/http/index.ts +10 -6
- package/src/http/pages-public.ts +25 -10
- package/src/http/pages.ts +17 -0
- package/src/http/person-responder.ts +28 -0
- package/src/http/session-cost-recompute.ts +3 -1
- package/src/http/session-data.ts +3 -0
- package/src/integrations/chat-sdk/adapters.ts +33 -3
- package/src/integrations/chat-sdk/inbound.ts +6 -18
- package/src/integrations/chat-sdk/mentions.ts +188 -0
- package/src/integrations/chat-sdk/outbound.ts +20 -3
- package/src/integrations/chat-sdk/router.ts +8 -0
- package/src/integrations/chat-sdk/telegram-thread.ts +12 -0
- package/src/jira/adf.ts +35 -9
- package/src/kv-reserved-namespaces.ts +5 -0
- package/src/pages/page-head.ts +11 -1
- package/src/prompts/base-prompt.ts +1 -1
- package/src/prompts/session-templates.ts +1 -1
- package/src/providers/acp-targets.ts +2 -2
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/claude-adapter.ts +21 -1
- package/src/providers/claude-sdk-session.ts +22 -3
- package/src/providers/claude-session-events.ts +76 -1
- package/src/providers/cursor-adapter.ts +1 -1
- package/src/providers/dsh-adapter.ts +48 -13
- package/src/providers/fx-adapter.ts +2 -2
- package/src/providers/pricing-sources.md +3 -0
- package/src/providers/types.ts +13 -0
- package/src/rbac/legacy-policy.ts +4 -0
- package/src/rbac/permissions.ts +8 -0
- package/src/scheduler/index.ts +1 -0
- package/src/scheduler/scheduler.test.ts +32 -1
- package/src/scheduler/scheduler.ts +24 -1
- package/src/script-workflows/executor.ts +6 -0
- package/src/script-workflows/supervisor.ts +2 -1
- package/src/scripts-runtime/sdk-allowlist.ts +2 -0
- package/src/scripts-runtime/swarm-sdk.ts +12 -23
- package/src/scripts-runtime/types/stdlib.d.ts +4 -1
- package/src/scripts-runtime/types/swarm-sdk.d.ts +4 -1
- package/src/server.ts +2 -0
- package/src/slack/actions.ts +3 -0
- package/src/slack/approval-actions.ts +148 -0
- package/src/slack/approval-buttons.ts +28 -0
- package/src/slack/render-v2.ts +27 -7
- package/src/tests/base-prompt.test.ts +6 -2
- package/src/tests/chat-sdk-mentions.test.ts +183 -0
- package/src/tests/claude-adapter.test.ts +115 -0
- package/src/tests/create-page-tool.test.ts +5 -0
- package/src/tests/dsh-adapter.test.ts +53 -1
- package/src/tests/fixtures/compiled-source-schema-boot.ts +24 -0
- package/src/tests/fixtures/fx/acp-updates-recorded.jsonl +1 -1
- package/src/tests/fixtures/secret-corpus.ts +43 -1
- package/src/tests/heartbeat-stall-thresholds.test.ts +174 -0
- package/src/tests/internal-ai/complete-structured.test.ts +105 -0
- package/src/tests/internal-ai/credentials.test.ts +149 -0
- package/src/tests/internal-ai/task-title.test.ts +78 -0
- package/src/tests/jira-adf.test.ts +42 -2
- package/src/tests/mcp-input-caps.test.ts +16 -11
- package/src/tests/merge-gate-detect-changes.test.ts +208 -16
- package/src/tests/migration-342-script-run-sources.test.ts +196 -0
- package/src/tests/migration-bunfs-compat.test.ts +129 -9
- package/src/tests/rbac-e2e-helpers.test.ts +10 -4
- package/src/tests/rbac-e2e-helpers.ts +13 -4
- package/src/tests/rbac-roles.test.ts +2 -0
- package/src/tests/runner-slot-reconcile.test.ts +102 -0
- package/src/tests/runtime-e2b-pools.test.ts +7 -1
- package/src/tests/schedule-target-type.test.ts +4 -1
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/script-runs-retention.test.ts +43 -16
- package/src/tests/script-workflows-runtime-e2e.test.ts +56 -22
- package/src/tests/scripts-http.test.ts +9 -3
- package/src/tests/sdk-allowlist.test.ts +26 -13
- package/src/tests/sdk-store-progress-skipped.test.ts +12 -5
- package/src/tests/secret-rules.test.ts +34 -0
- package/src/tests/secret-scrub-gate.test.ts +7 -0
- package/src/tests/secret-scrubber.test.ts +62 -2
- package/src/tests/seed-scripts.test.ts +2 -2
- package/src/tests/slack-render-v2.test.ts +85 -0
- package/src/tests/system-one-hosts-ui-mirror.test.ts +1 -0
- package/src/tests/vcs-azure-devops.test.ts +10 -0
- package/src/tests/vcs-provider.test.ts +8 -0
- package/src/themes/design-system.ts +163 -0
- package/src/themes/page-theme.ts +28 -19
- package/src/tools/chat-post.ts +7 -3
- package/src/tools/create-page.ts +3 -0
- package/src/tools/design-system.ts +102 -0
- package/src/tools/mcp-servers/mcp-server-get.ts +1 -1
- package/src/tools/mcp-servers/mcp-server-list.ts +1 -1
- package/src/tools/register-chat-channel.ts +11 -2
- package/src/tools/skills/skill-get-file.ts +1 -1
- package/src/tools/skills/skill-get.ts +1 -1
- package/src/tools/skills/skill-list.ts +1 -1
- package/src/tools/skills/skill-search.ts +1 -1
- package/src/tools/utils.ts +49 -4
- package/src/tools/workflows/get-workflow-run.ts +1 -1
- package/src/tools/workflows/get-workflow.ts +1 -1
- package/src/tools/workflows/list-workflow-runs.ts +1 -1
- package/src/tools/workflows/list-workflows.ts +1 -1
- package/src/types.ts +67 -1
- package/src/utils/internal-ai/complete-structured.ts +36 -5
- package/src/utils/internal-ai/credentials.ts +78 -2
- package/src/utils/internal-ai/models.ts +37 -1
- package/src/utils/internal-ai/task-title.ts +31 -1
- package/src/utils/secret-rules.generated.ts +149 -149
- package/src/utils/secret-scrubber.ts +111 -5
- package/src/vcs/azure-devops.ts +22 -1
- package/src/vcs/index.ts +3 -1
- package/src/workflows/approval-inline.ts +122 -0
- package/src/workflows/approval-notifications.ts +7 -2
- package/src/workflows/engine.ts +6 -5
- package/src/workflows/executors/agent-task.ts +14 -0
- package/src/workflows/executors/system-one-providers.ts +23 -0
- package/templates/skills/pages/content.md +34 -8
- package/templates/skills/swarm-docs/content.md +13 -0
- package/templates/skills/workflow-iterate/content.md +1 -1
- package/dist/acp-adapter-x1qqgzwx.js +0 -17
- package/dist/cli-n46d87mj.js +0 -98
- package/dist/core-2b8bv6ny.js +0 -42
- package/dist/fx-adapter-4yet1c4f.js +0 -20
- package/dist/grok-adapter-8ge6tw7m.js +0 -20
- package/dist/handlers-0r9evrdj.js +0 -41
- package/dist/hook-68gbs87k.js +0 -19
- package/dist/index-1v23363p.js +0 -39
- package/dist/index-30qw6vyw.js +0 -44
- package/dist/index-6bm3w6cn.js +0 -40
- package/dist/lead-3jpc7kcr.js +0 -79
- package/dist/thread-buffer-8fc703jc.js +0 -42
- package/dist/worker-3p2vq107.js +0 -79
|
@@ -56,8 +56,12 @@ import { GITLEAKS_RULES } from "./secret-rules.generated";
|
|
|
56
56
|
* URL-decoded and URL-encoded forms.
|
|
57
57
|
* v14 = pass 1 also matches a known value URL-encoded as stored, so a value
|
|
58
58
|
* with a literal `%` is redacted in its `%25` form.
|
|
59
|
+
* v15 = gitleaks rules also end on `.`, `,`, `:`, `)`, `]`, `}`, `>`, `|`,
|
|
60
|
+
* `/`, `&`, `?` and `#`; pass 2 adds Stripe webhook, Groq, Tavily,
|
|
61
|
+
* LangSmith, CircleCI, Google `AQ.`, HubSpot, New Relic and Sentry DSN
|
|
62
|
+
* shapes; pass 4 redacts a PEM private key cut off before its END line.
|
|
59
63
|
*/
|
|
60
|
-
export const SCRUBBER_RULES_VERSION =
|
|
64
|
+
export const SCRUBBER_RULES_VERSION = 15;
|
|
61
65
|
|
|
62
66
|
/** Env-var names that are always considered secrets, even without suffix hints. */
|
|
63
67
|
const SENSITIVE_KEY_EXACT = new Set<string>([
|
|
@@ -479,6 +483,17 @@ const URL_USERINFO_RE =
|
|
|
479
483
|
const PEM_RE =
|
|
480
484
|
/(-----BEGIN [A-Z0-9 ]{0,32}PRIVATE KEY(?: BLOCK)?-----)((?:(?!-----)[\s\S]){1,16384})(-----END [A-Z0-9 ]{0,32}PRIVATE KEY(?: BLOCK)?-----)/g;
|
|
481
485
|
const PEM_MARKER = "[REDACTED:private_key]";
|
|
486
|
+
/**
|
|
487
|
+
* A PEM private key cut off before its END line (`head`, an output cap, a
|
|
488
|
+
* truncated JSON string such as a GCP service-account `private_key`). The body
|
|
489
|
+
* is base64 runs of 16+ characters split by whitespace or `\n` escapes (raw or
|
|
490
|
+
* escaped again); prose after the cut is shorter, so it survives. Runs after
|
|
491
|
+
* `PEM_RE`, so a complete block keeps its END armor, and the marker after
|
|
492
|
+
* BEGIN stops a second match. Each run needs a separator before the next, so
|
|
493
|
+
* the walk is linear.
|
|
494
|
+
*/
|
|
495
|
+
const PEM_TRUNCATED_RE =
|
|
496
|
+
/(-----BEGIN [A-Z0-9 ]{0,32}PRIVATE KEY(?: BLOCK)?-----)(?:\s|\\+[nr])*[A-Za-z0-9+/=]{16,}(?:(?:\s|\\+[nr])+[A-Za-z0-9+/=]{16,})*/g;
|
|
482
497
|
|
|
483
498
|
/**
|
|
484
499
|
* Pass 4: credentials identified by their context (a sensitive JSON/YAML
|
|
@@ -492,6 +507,7 @@ function scrubKeyContext(text: string): string {
|
|
|
492
507
|
out = out.replace(PEM_RE, (match, begin: string, body: string, end: string) =>
|
|
493
508
|
body === PEM_MARKER ? match : `${begin}${PEM_MARKER}${end}`,
|
|
494
509
|
);
|
|
510
|
+
out = out.replace(PEM_TRUNCATED_RE, (_match, begin: string) => `${begin}${PEM_MARKER}`);
|
|
495
511
|
}
|
|
496
512
|
if (/authorization|x-api-key/i.test(out)) {
|
|
497
513
|
out = out.replace(AUTH_HEADER_RE, redactHeader).replace(API_KEY_HEADER_RE, redactHeader);
|
|
@@ -715,6 +731,67 @@ const TOKEN_REGEXES: ReadonlyArray<{ name: string; lits: string[]; re: RegExp }>
|
|
|
715
731
|
"g",
|
|
716
732
|
),
|
|
717
733
|
},
|
|
734
|
+
// Shapes below follow svn-arv/redacted's engine.yml (MIT): none of them has
|
|
735
|
+
// a gitleaks rule, or its gitleaks rule needs the vendor name nearby.
|
|
736
|
+
// Stripe webhook signing secrets
|
|
737
|
+
{
|
|
738
|
+
name: "stripe_webhook_secret",
|
|
739
|
+
lits: ["whsec_"],
|
|
740
|
+
re: new RegExp(String.raw`${TB}whsec_[A-Za-z0-9]{24,}\b`, "g"),
|
|
741
|
+
},
|
|
742
|
+
// Groq API keys
|
|
743
|
+
{
|
|
744
|
+
name: "groq_key",
|
|
745
|
+
lits: ["gsk_"],
|
|
746
|
+
re: new RegExp(String.raw`${TB}gsk_[A-Za-z0-9]{40,}\b`, "g"),
|
|
747
|
+
},
|
|
748
|
+
// Tavily API keys (`tvly-` and `tvly-dev-`)
|
|
749
|
+
{
|
|
750
|
+
name: "tavily_key",
|
|
751
|
+
lits: ["tvly-"],
|
|
752
|
+
re: new RegExp(String.raw`${TB}tvly-(?:dev-)?[A-Za-z0-9]{24,}\b`, "g"),
|
|
753
|
+
},
|
|
754
|
+
// LangSmith personal tokens and service keys
|
|
755
|
+
{
|
|
756
|
+
name: "langsmith_key",
|
|
757
|
+
lits: ["lsv2_pt_", "lsv2_sk_"],
|
|
758
|
+
re: new RegExp(String.raw`${TB}lsv2_(?:pt|sk)_[A-Za-z0-9]{24,}_[A-Za-z0-9]{8,}\b`, "g"),
|
|
759
|
+
},
|
|
760
|
+
// CircleCI personal API tokens
|
|
761
|
+
{
|
|
762
|
+
name: "circleci_token",
|
|
763
|
+
lits: ["CCIPAT_"],
|
|
764
|
+
re: new RegExp(String.raw`${TB}CCIPAT_[A-Za-z0-9_]{20,}\b`, "g"),
|
|
765
|
+
},
|
|
766
|
+
// Google API keys in the newer `AQ.` form (Gemini); the dot defeats the generic rules.
|
|
767
|
+
{
|
|
768
|
+
name: "google_api_key_v2",
|
|
769
|
+
lits: ["AQ."],
|
|
770
|
+
re: new RegExp(String.raw`${TB}AQ\.[A-Za-z0-9_-]{40,}(?!\w)`, "g"),
|
|
771
|
+
},
|
|
772
|
+
// HubSpot private-app tokens: pat-<region>-<uuid>. gitleaks only matches near "hubspot".
|
|
773
|
+
{
|
|
774
|
+
name: "hubspot_key",
|
|
775
|
+
lits: ["pat-"],
|
|
776
|
+
re: new RegExp(
|
|
777
|
+
String.raw`${TB}pat-[a-z0-9]{2,3}-[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}(?!\w)`,
|
|
778
|
+
"g",
|
|
779
|
+
),
|
|
780
|
+
},
|
|
781
|
+
// New Relic user API keys. gitleaks only matches near "newrelic".
|
|
782
|
+
{
|
|
783
|
+
name: "newrelic_key",
|
|
784
|
+
lits: ["NRAK-"],
|
|
785
|
+
re: new RegExp(String.raw`${TB}NRAK-[A-Za-z0-9]{20,}\b`, "g"),
|
|
786
|
+
},
|
|
787
|
+
// Sentry DSNs: the public key and the ingest host go, the scheme and the
|
|
788
|
+
// project id stay. The key is semi-public (it ships in browser bundles), but
|
|
789
|
+
// it lets anyone post events to the project.
|
|
790
|
+
{
|
|
791
|
+
name: "sentry_dsn",
|
|
792
|
+
lits: ["sentry.io"],
|
|
793
|
+
re: /(?<=:\/\/)[a-f0-9]{32}@[a-z0-9-]{1,63}\.ingest\.(?:[a-z]{2,8}\.)?sentry\.io(?=\/\d)/g,
|
|
794
|
+
},
|
|
718
795
|
];
|
|
719
796
|
|
|
720
797
|
/**
|
|
@@ -1206,8 +1283,14 @@ function scrubWithMatcher(text: string, matcher: KnownValueMatcher): ScrubbedTex
|
|
|
1206
1283
|
// Pass 2: structural patterns (catches secrets we never saw in env, e.g.
|
|
1207
1284
|
// a token pasted into a tool_result by the operator or fetched from a
|
|
1208
1285
|
// third-party API during a task).
|
|
1286
|
+
// A rule runs only when one of its literals occurs: every match holds one,
|
|
1287
|
+
// in the regex's own case unless it is case-insensitive (the corpus test
|
|
1288
|
+
// checks both), so a skipped rule could not have matched.
|
|
1209
1289
|
const vendorSpans: VendorSpanCache = { spans: null };
|
|
1210
|
-
for (const { name, re } of TOKEN_REGEXES)
|
|
1290
|
+
for (const { name, re, lits } of TOKEN_REGEXES) {
|
|
1291
|
+
if (!re.ignoreCase && !lits.some((lit) => out.includes(lit))) continue;
|
|
1292
|
+
out = applyTokenRegex(out, name, re, vendorSpans);
|
|
1293
|
+
}
|
|
1211
1294
|
|
|
1212
1295
|
// Passes 3 and 4: values of sensitive `KEY=value` assignments (env dumps,
|
|
1213
1296
|
// .env files, shell traces), including ones too short for pass 1, and
|
|
@@ -1437,6 +1520,7 @@ export function scrubberRulesFingerprint(): string {
|
|
|
1437
1520
|
CURL_USER_RE,
|
|
1438
1521
|
URL_USERINFO_RE,
|
|
1439
1522
|
PEM_RE,
|
|
1523
|
+
PEM_TRUNCATED_RE,
|
|
1440
1524
|
].map((re) => re.source),
|
|
1441
1525
|
]),
|
|
1442
1526
|
);
|
|
@@ -1491,7 +1575,12 @@ export function findSecretsIn(text: string): SecretFindings {
|
|
|
1491
1575
|
return { knownValues: [...knownValues].sort(), gitleaksRules: [...gitleaksRules].sort() };
|
|
1492
1576
|
}
|
|
1493
1577
|
|
|
1494
|
-
export function scrubObject<T>(
|
|
1578
|
+
export function scrubObject<T>(
|
|
1579
|
+
value: T,
|
|
1580
|
+
seen = new WeakSet<object>(),
|
|
1581
|
+
// Rows of one result repeat the same keys: scrub each distinct key once per call.
|
|
1582
|
+
keyCache = new Map<string, string>(),
|
|
1583
|
+
): T {
|
|
1495
1584
|
if (value === null || value === undefined) return value;
|
|
1496
1585
|
if (typeof value === "string") return scrubSecrets(value) as T;
|
|
1497
1586
|
if (typeof value !== "object") return value;
|
|
@@ -1502,12 +1591,29 @@ export function scrubObject<T>(value: T, seen = new WeakSet<object>()): T {
|
|
|
1502
1591
|
seen.add(value);
|
|
1503
1592
|
|
|
1504
1593
|
if (Array.isArray(value)) {
|
|
1505
|
-
return value.map((item) => scrubObject(item, seen)) as T;
|
|
1594
|
+
return value.map((item) => scrubObject(item, seen, keyCache)) as T;
|
|
1506
1595
|
}
|
|
1507
1596
|
|
|
1597
|
+
// Keys are scrubbed too: a map keyed by a token leaks it as a key. Two keys
|
|
1598
|
+
// can redact to the same marker, so a clash gets a `#<n>` suffix instead of
|
|
1599
|
+
// overwriting the earlier entry. `nextSuffix` remembers the next free `n`
|
|
1600
|
+
// per marker, so N colliding keys cost O(N) probes, not O(N^2).
|
|
1508
1601
|
const out: Record<string, unknown> = {};
|
|
1602
|
+
const nextSuffix = new Map<string, number>();
|
|
1509
1603
|
for (const [key, child] of Object.entries(value as Record<string, unknown>)) {
|
|
1510
|
-
|
|
1604
|
+
let scrubbed = keyCache.get(key);
|
|
1605
|
+
if (scrubbed === undefined) {
|
|
1606
|
+
scrubbed = scrubSecrets(key);
|
|
1607
|
+
keyCache.set(key, scrubbed);
|
|
1608
|
+
}
|
|
1609
|
+
let outKey = scrubbed;
|
|
1610
|
+
if (Object.hasOwn(out, outKey)) {
|
|
1611
|
+
let n = nextSuffix.get(scrubbed) ?? 2;
|
|
1612
|
+
for (outKey = `${scrubbed}#${n}`; Object.hasOwn(out, outKey); outKey = `${scrubbed}#${n}`)
|
|
1613
|
+
n++;
|
|
1614
|
+
nextSuffix.set(scrubbed, n + 1);
|
|
1615
|
+
}
|
|
1616
|
+
out[outKey] = scrubObject(child, seen, keyCache);
|
|
1511
1617
|
}
|
|
1512
1618
|
return out as T;
|
|
1513
1619
|
}
|
package/src/vcs/azure-devops.ts
CHANGED
|
@@ -3,8 +3,29 @@
|
|
|
3
3
|
* the worker (no DB imports).
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* True when the URL's host is Azure Repos: `dev.azure.com`,
|
|
8
|
+
* `ssh.dev.azure.com`, or a legacy `*.visualstudio.com` host. Only the host
|
|
9
|
+
* counts, so a `dev.azure.com` path segment on another host is not Azure.
|
|
10
|
+
*/
|
|
6
11
|
export function isAzureDevOpsUrl(url: string): boolean {
|
|
7
|
-
|
|
12
|
+
const trimmed = url.trim();
|
|
13
|
+
// SCP-style SSH: user@host:path
|
|
14
|
+
const scp = trimmed.match(/^[^@/\s:]+@([^:/\s]+):/);
|
|
15
|
+
if (scp) return isAzureDevOpsHost(scp[1] as string);
|
|
16
|
+
try {
|
|
17
|
+
return isAzureDevOpsHost(new URL(trimmed).hostname);
|
|
18
|
+
} catch {
|
|
19
|
+
// Scheme-less `dev.azure.com/org/project`
|
|
20
|
+
return /^(?:ssh\.)?dev\.azure\.com(\/|$)|^[\w.-]+\.visualstudio\.com(\/|$)/i.test(trimmed);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function isAzureDevOpsHost(hostname: string): boolean {
|
|
25
|
+
const host = hostname.toLowerCase();
|
|
26
|
+
return (
|
|
27
|
+
host === "dev.azure.com" || host === "ssh.dev.azure.com" || host.endsWith(".visualstudio.com")
|
|
28
|
+
);
|
|
8
29
|
}
|
|
9
30
|
|
|
10
31
|
/**
|
package/src/vcs/index.ts
CHANGED
|
@@ -29,6 +29,8 @@ export function detectVcsProvider(url: string): VcsProvider | null {
|
|
|
29
29
|
?.toLowerCase();
|
|
30
30
|
}
|
|
31
31
|
if (hostname?.startsWith("gitlab.")) return "gitlab";
|
|
32
|
-
|
|
32
|
+
// Host only: a `github.com` path segment on another host is not GitHub.
|
|
33
|
+
if (hostname === "github.com" || hostname === "www.github.com") return "github";
|
|
34
|
+
if (/^[\w.-]+\/[\w.-]+$/.test(url)) return "github";
|
|
33
35
|
return null;
|
|
34
36
|
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which approval requests a chat button can answer, and the answer a button
|
|
3
|
+
* maps to. Chat cards (Slack, Chat SDK) share this so every channel offers the
|
|
4
|
+
* same choices and stores the same response the dashboard would.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export interface ApprovalQuestionLike {
|
|
8
|
+
id?: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
multiline?: boolean;
|
|
12
|
+
options?: ReadonlyArray<{ value: string; label: string }>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface InlineApprovalQuestion {
|
|
16
|
+
id: string;
|
|
17
|
+
type: "approval" | "boolean" | "single-select" | "text";
|
|
18
|
+
label: string;
|
|
19
|
+
options: ReadonlyArray<{ value: string; label: string }>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Single-select questions with more options than this go to the dashboard. */
|
|
23
|
+
export const INLINE_MAX_OPTIONS = 5;
|
|
24
|
+
|
|
25
|
+
/** Longest one-line text answer a chat modal accepts. */
|
|
26
|
+
export const INLINE_TEXT_MAX_LENGTH = 500;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The one question a chat button can answer, or null when the request needs
|
|
30
|
+
* the dashboard: several questions, multi-select, config, multiline text, or a
|
|
31
|
+
* single-select with no options or more than `INLINE_MAX_OPTIONS`.
|
|
32
|
+
*/
|
|
33
|
+
export function inlineApprovalQuestion(
|
|
34
|
+
questions: ReadonlyArray<ApprovalQuestionLike> | null | undefined,
|
|
35
|
+
): InlineApprovalQuestion | null {
|
|
36
|
+
// shortcut: one question per inline card; several simple questions could share one Slack modal later.
|
|
37
|
+
if (!questions || questions.length !== 1) return null;
|
|
38
|
+
const [q] = questions;
|
|
39
|
+
if (!q?.id) return null;
|
|
40
|
+
const base = { id: q.id, label: q.label ?? "", options: q.options ?? [] };
|
|
41
|
+
switch (q.type) {
|
|
42
|
+
case "approval":
|
|
43
|
+
case "boolean":
|
|
44
|
+
return { ...base, type: q.type };
|
|
45
|
+
case "single-select":
|
|
46
|
+
return base.options.length > 0 && base.options.length <= INLINE_MAX_OPTIONS
|
|
47
|
+
? { ...base, type: q.type }
|
|
48
|
+
: null;
|
|
49
|
+
case "text":
|
|
50
|
+
return q.multiline ? null : { ...base, type: q.type };
|
|
51
|
+
default:
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* A button's choice: `y` / `n` for approval and boolean questions, the option
|
|
58
|
+
* index for single-select, `t` for text. Short on purpose: Telegram callback
|
|
59
|
+
* data is capped at 64 bytes.
|
|
60
|
+
*/
|
|
61
|
+
export interface InlineChoice {
|
|
62
|
+
/** Label and style of the button. */
|
|
63
|
+
label: string;
|
|
64
|
+
choice: string;
|
|
65
|
+
style?: "primary" | "danger";
|
|
66
|
+
/** The button collects text first (Deny reason, text answer) where the channel has modals. */
|
|
67
|
+
needsText?: "optional" | "required";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function inlineApprovalChoices(question: InlineApprovalQuestion): InlineChoice[] {
|
|
71
|
+
switch (question.type) {
|
|
72
|
+
case "approval":
|
|
73
|
+
return [
|
|
74
|
+
{ label: "Approve", choice: "y", style: "primary" },
|
|
75
|
+
{ label: "Deny", choice: "n", style: "danger", needsText: "optional" },
|
|
76
|
+
];
|
|
77
|
+
case "boolean":
|
|
78
|
+
return [
|
|
79
|
+
{ label: "Yes", choice: "y" },
|
|
80
|
+
{ label: "No", choice: "n" },
|
|
81
|
+
];
|
|
82
|
+
case "single-select":
|
|
83
|
+
return question.options.map((option, index) => ({
|
|
84
|
+
label: option.label || option.value,
|
|
85
|
+
choice: String(index),
|
|
86
|
+
}));
|
|
87
|
+
case "text":
|
|
88
|
+
return [{ label: "Answer", choice: "t", needsText: "required" }];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The respond-route `responses` for a choice, or null for a choice this
|
|
94
|
+
* question does not offer (a forged or stale button).
|
|
95
|
+
*/
|
|
96
|
+
export function inlineApprovalResponses(
|
|
97
|
+
question: InlineApprovalQuestion,
|
|
98
|
+
choice: string,
|
|
99
|
+
text?: string,
|
|
100
|
+
): Record<string, unknown> | null {
|
|
101
|
+
const trimmed = (text ?? "").trim().slice(0, INLINE_TEXT_MAX_LENGTH);
|
|
102
|
+
let answer: unknown;
|
|
103
|
+
switch (question.type) {
|
|
104
|
+
case "approval":
|
|
105
|
+
if (choice === "y") answer = { approved: true };
|
|
106
|
+
else if (choice === "n")
|
|
107
|
+
answer = trimmed ? { approved: false, comment: trimmed } : { approved: false };
|
|
108
|
+
break;
|
|
109
|
+
case "boolean":
|
|
110
|
+
if (choice === "y" || choice === "n") answer = choice === "y";
|
|
111
|
+
break;
|
|
112
|
+
case "single-select": {
|
|
113
|
+
const option = /^\d+$/.test(choice) ? question.options[Number(choice)] : undefined;
|
|
114
|
+
answer = option?.value;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
case "text":
|
|
118
|
+
if (choice === "t" && trimmed) answer = trimmed;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
return answer === undefined ? null : { [question.id]: answer };
|
|
122
|
+
}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
import { approvalCancellationNotificationKey } from "../be/db/approvals";
|
|
16
16
|
import { resolveTemplate } from "../prompts/resolver";
|
|
17
17
|
import { getSlackApp } from "../slack/app";
|
|
18
|
+
import { buildApprovalAnswerButtons } from "../slack/approval-buttons";
|
|
18
19
|
import { isSlackUserId, resolveSlackConversationId } from "../slack/dm";
|
|
19
20
|
import {
|
|
20
21
|
externalChannelToolError,
|
|
@@ -24,6 +25,7 @@ import {
|
|
|
24
25
|
import { TERMINAL_TASK_STATUSES } from "../types";
|
|
25
26
|
import { getAppUrl } from "../utils/constants";
|
|
26
27
|
import { scrubSecrets } from "../utils/secret-scrubber";
|
|
28
|
+
import type { ApprovalQuestionLike } from "./approval-inline";
|
|
27
29
|
|
|
28
30
|
/** Slack Block Kit caps a section block's text at 3000 characters. */
|
|
29
31
|
const SLACK_SECTION_TEXT_LIMIT = 3000;
|
|
@@ -80,7 +82,7 @@ export interface ApprovalNotificationChannel {
|
|
|
80
82
|
export interface ApprovalNotificationsInput {
|
|
81
83
|
requestId: string;
|
|
82
84
|
title: string;
|
|
83
|
-
questions: ReadonlyArray<
|
|
85
|
+
questions: ReadonlyArray<ApprovalQuestionLike>;
|
|
84
86
|
timeoutSeconds?: number;
|
|
85
87
|
notifications: ReadonlyArray<ApprovalNotificationChannel>;
|
|
86
88
|
}
|
|
@@ -142,6 +144,7 @@ export async function dispatchApprovalNotifications(
|
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
const questionsText = buildSlackQuestionsSummary(questions);
|
|
147
|
+
const answerButtons = buildApprovalAnswerButtons(requestId, questions);
|
|
145
148
|
|
|
146
149
|
// The deadline is a caption under the button, not part of the ask.
|
|
147
150
|
const timeoutCaption =
|
|
@@ -177,11 +180,13 @@ export async function dispatchApprovalNotifications(
|
|
|
177
180
|
{
|
|
178
181
|
type: "actions",
|
|
179
182
|
elements: [
|
|
183
|
+
...answerButtons,
|
|
180
184
|
{
|
|
181
185
|
type: "button",
|
|
182
186
|
text: { type: "plain_text", text: "Review & Respond" },
|
|
183
187
|
url: approvalUrl,
|
|
184
|
-
|
|
188
|
+
// With inline buttons, Approve is the primary action.
|
|
189
|
+
...(answerButtons.length === 0 ? { style: "primary" } : {}),
|
|
185
190
|
},
|
|
186
191
|
],
|
|
187
192
|
},
|
package/src/workflows/engine.ts
CHANGED
|
@@ -910,11 +910,12 @@ async function executeStep(
|
|
|
910
910
|
if (current && (current.status !== "running" || executingSteps.has(current.id))) {
|
|
911
911
|
return { current };
|
|
912
912
|
}
|
|
913
|
-
// An orphaned `sub-workflow` row is this same invocation:
|
|
914
|
-
// current predecessor completions, so it is not a new loop
|
|
915
|
-
// Re-enter it under its step id, key and retry count, so the
|
|
916
|
-
// reconnects to the child it already started
|
|
917
|
-
|
|
913
|
+
// An orphaned `sub-workflow` or `agent-task` row is this same invocation:
|
|
914
|
+
// it covers the current predecessor completions, so it is not a new loop
|
|
915
|
+
// iteration. Re-enter it under its step id, key and retry count, so the
|
|
916
|
+
// executor reconnects to the child run or task it already started (a
|
|
917
|
+
// crash between the insert and the step parking) instead of a second one.
|
|
918
|
+
if (current && (node.type === "sub-workflow" || node.type === "agent-task")) {
|
|
918
919
|
claimedStepId = current.id;
|
|
919
920
|
executingSteps.add(current.id);
|
|
920
921
|
return {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
RoutingReasonSchema,
|
|
13
13
|
splitLegacyModelAlias,
|
|
14
14
|
} from "../../types";
|
|
15
|
+
import { getNodeEnv } from "../../utils/node-env";
|
|
15
16
|
import type { ExecutorResult } from "./base";
|
|
16
17
|
import { BaseExecutor } from "./base";
|
|
17
18
|
|
|
@@ -166,6 +167,7 @@ export class AgentTaskExecutor extends BaseExecutor<
|
|
|
166
167
|
if (modelProfileRefError(error) !== "missing") throw error;
|
|
167
168
|
return { status: "failed", error: `Unknown model profile "${config.profile}".` };
|
|
168
169
|
}
|
|
170
|
+
crashAfterTaskInsertForTest(preCreate.description);
|
|
169
171
|
|
|
170
172
|
// 4. Return async result — engine will pause the workflow
|
|
171
173
|
return {
|
|
@@ -176,3 +178,15 @@ export class AgentTaskExecutor extends BaseExecutor<
|
|
|
176
178
|
} as ExecutorResult<AgentTaskOutput>;
|
|
177
179
|
}
|
|
178
180
|
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Test-only crash point: kill the API between the task insert and the step
|
|
184
|
+
* parking, the window a real crash can hit. Fires only under NODE_ENV=test
|
|
185
|
+
* for a task whose text contains E2E_CRASH_AFTER_WORKFLOW_TASK_INSERT. The
|
|
186
|
+
* e2e scenario workflow-agent-task-crash-window sets it for one restart.
|
|
187
|
+
*/
|
|
188
|
+
function crashAfterTaskInsertForTest(description: string): void {
|
|
189
|
+
if (getNodeEnv() !== "test") return;
|
|
190
|
+
const marker = process.env.E2E_CRASH_AFTER_WORKFLOW_TASK_INSERT;
|
|
191
|
+
if (marker && description.includes(marker)) process.kill(process.pid, "SIGKILL");
|
|
192
|
+
}
|
|
@@ -73,6 +73,11 @@ interface SystemOneServiceBase {
|
|
|
73
73
|
readonly defaultModel?: string;
|
|
74
74
|
/** When set, the only model ids the node may use (checked at save and at run). */
|
|
75
75
|
readonly allowedModels?: readonly string[];
|
|
76
|
+
/**
|
|
77
|
+
* Other model ids verified on this host, listed in the dashboard and docs. Not
|
|
78
|
+
* enforced: a host without `allowedModels` sends any id as written.
|
|
79
|
+
*/
|
|
80
|
+
readonly knownModels?: readonly string[];
|
|
76
81
|
}
|
|
77
82
|
|
|
78
83
|
export interface SystemOneDecideService extends SystemOneServiceBase {
|
|
@@ -151,6 +156,22 @@ async function readFirstGlobalConfig(
|
|
|
151
156
|
return undefined;
|
|
152
157
|
}
|
|
153
158
|
|
|
159
|
+
/** OpenRouter decision models besides Jev (`GET /api/v1/models?output_modalities=decisions`). */
|
|
160
|
+
const OPENROUTER_DECISION_MODELS = [
|
|
161
|
+
"~perplexity/pplx-decider-latest",
|
|
162
|
+
"~perplexity/pplx-decider-flash-latest",
|
|
163
|
+
"perplexity/pplx-decider-v1.3:free",
|
|
164
|
+
"perplexity/pplx-decider-flash-v1.3:free",
|
|
165
|
+
"liquid/d1.1",
|
|
166
|
+
"liquid/d1-ultra",
|
|
167
|
+
"google/gemini-decision-1",
|
|
168
|
+
"morph/reflex",
|
|
169
|
+
"baseten/joey-1",
|
|
170
|
+
"baseten/elephant-1",
|
|
171
|
+
"baseten/mammoth-1",
|
|
172
|
+
"respan/span-02",
|
|
173
|
+
] as const;
|
|
174
|
+
|
|
154
175
|
/** Every Workers AI model is reached at the same account-scoped route; only the model differs. */
|
|
155
176
|
const CLOUDFLARE_ENDPOINT: SystemOneBuiltEndpoint = {
|
|
156
177
|
configKey: CLOUDFLARE_ACCOUNT_KEY,
|
|
@@ -216,6 +237,8 @@ export const SYSTEM_ONE_HOSTS = {
|
|
|
216
237
|
decide: {
|
|
217
238
|
endpoint: "https://openrouter.ai/api/alpha/decisions",
|
|
218
239
|
defaultModel: "~typesafe/jev-latest",
|
|
240
|
+
// Decision models of other makers on the same route and wire, live-probed 2026-11-16.
|
|
241
|
+
knownModels: OPENROUTER_DECISION_MODELS,
|
|
219
242
|
confidenceField: "confidence",
|
|
220
243
|
},
|
|
221
244
|
},
|
|
@@ -362,12 +362,38 @@ color literals.
|
|
|
362
362
|
The API picks the preset of a designVersion 2 page in this order:
|
|
363
363
|
|
|
364
364
|
1. The page's `theme`, when it is set.
|
|
365
|
-
2. The
|
|
366
|
-
3.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
`
|
|
365
|
+
2. The org design system's base preset, when the org has one (see below).
|
|
366
|
+
3. The viewer's dashboard preset, when the page opens inside the dashboard.
|
|
367
|
+
4. `hive`.
|
|
368
|
+
|
|
369
|
+
Then the org design system tokens apply on top of the preset, and the page's
|
|
370
|
+
`themeTokens` on top of those. A page with its own `theme` ignores the org
|
|
371
|
+
design system completely: its tokens, fonts and mode lock. The mode (light or
|
|
372
|
+
dark) comes from the viewer unless the design system locks it.
|
|
373
|
+
`create_page`, `POST /api/pages`, and `PUT /api/pages/:id` accept both fields.
|
|
374
|
+
|
|
375
|
+
### The org design system: ask once
|
|
376
|
+
|
|
377
|
+
One design system per org restyles every page without a `theme`. Read it with
|
|
378
|
+
`design-system-get`. Its `status` is `none`, `declined`, `active` or `invalid`.
|
|
379
|
+
|
|
380
|
+
When `create_page` says the org has no design system yet, ship the page as it
|
|
381
|
+
is and ask the requester once, in the same reply that hands over the page:
|
|
382
|
+
"Want every page in your brand? Send a site URL, a preset name or a CSS
|
|
383
|
+
variable block." Then:
|
|
384
|
+
|
|
385
|
+
1. Run the `design-system-seed` script with one of `url`, `preset` or `css`
|
|
386
|
+
(plus `logo` and `mode` if they gave them). It publishes a preview page and
|
|
387
|
+
saves nothing.
|
|
388
|
+
2. Send the preview link. Save only after the requester says yes: run the
|
|
389
|
+
script again with `save: true`, or call `design-system-set` with its
|
|
390
|
+
`saveInput`.
|
|
391
|
+
3. If they say no, call `design-system-set` with `status: "declined"`. Nobody
|
|
392
|
+
asks again.
|
|
393
|
+
|
|
394
|
+
Never set the design system without the requester's yes, and never ask when
|
|
395
|
+
the status is `declined` or `active`. The `design-system` KV namespace is
|
|
396
|
+
reserved: write it only through `design-system-set` or `PUT /api/design-system`.
|
|
371
397
|
|
|
372
398
|
### `theme`: a preset id
|
|
373
399
|
|
|
@@ -465,8 +491,8 @@ To use another font, load it from Google Fonts in your page `<head>`. Then set
|
|
|
465
491
|
|
|
466
492
|
## Dark mode
|
|
467
493
|
|
|
468
|
-
Inside the dashboard, a designVersion 2 page follows the viewer's mode
|
|
469
|
-
mode, the injected head adds the `dark` class to `<html>`, and the tokens
|
|
494
|
+
Inside the dashboard, a designVersion 2 page follows the viewer's mode, unless
|
|
495
|
+
the org design system locks `mode` to `light` or `dark`. In dark mode, the injected head adds the `dark` class to `<html>`, and the tokens
|
|
470
496
|
switch to their dark values. A page built on tokens needs no extra dark-mode
|
|
471
497
|
code.
|
|
472
498
|
|
|
@@ -65,19 +65,31 @@ Fetch the page as markdown: `curl -fsSL https://docs.agent-swarm.dev/llms.mdx/do
|
|
|
65
65
|
- [Small tech team operating model](https://docs.agent-swarm.dev/docs/guides/small-tech-team-operating-model). Reference.
|
|
66
66
|
- [Customer renewal review](https://docs.agent-swarm.dev/docs/guides/customer-renewal-review). Reference.
|
|
67
67
|
- [Customer commitment tracking](https://docs.agent-swarm.dev/docs/guides/customer-commitment-tracking). Reference.
|
|
68
|
+
- [Reviewing a potential customer service-level breach with AI agents](https://docs.agent-swarm.dev/docs/guides/service-level-breach-review). Reference.
|
|
68
69
|
- [Reviewing supplier invoice and purchase order discrepancies with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-invoice-discrepancy-review). Reference.
|
|
70
|
+
- [Reviewing purchase order and supplier confirmation differences with AI agents](https://docs.agent-swarm.dev/docs/guides/supplier-order-confirmation-review). Reference.
|
|
69
71
|
- [Reviewing marketplace partner payout discrepancies with AI agents](https://docs.agent-swarm.dev/docs/guides/marketplace-payout-exception-review). Reference.
|
|
70
72
|
- [Preparing marketplace moderation appeals for human review with AI agents](https://docs.agent-swarm.dev/docs/guides/marketplace-moderation-appeals). Reference.
|
|
71
73
|
- [Reviewing customer billing disputes with AI agents](https://docs.agent-swarm.dev/docs/guides/customer-billing-dispute-review). Reference.
|
|
74
|
+
- [Preparing unmatched bank transactions for finance review with AI agents](https://docs.agent-swarm.dev/docs/guides/agent-assisted-bank-reconciliation-review). Reference.
|
|
72
75
|
- [Reviewing a proposed customer pricing change with AI agents](https://docs.agent-swarm.dev/docs/guides/customer-pricing-change-review). Reference.
|
|
73
76
|
- [Escalating a customer support issue to engineering with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-support-escalation-handoff). Reference.
|
|
74
77
|
- [Reviewing inconsistent product listings across sales channels with AI agents](https://docs.agent-swarm.dev/docs/guides/marketplace-catalog-discrepancy-review). Reference.
|
|
78
|
+
- [Investigating a stale partner data feed with AI agents](https://docs.agent-swarm.dev/docs/guides/partner-data-feed-freshness-review). Reference.
|
|
79
|
+
- [Reviewing marketplace partner launch readiness with AI agents](https://docs.agent-swarm.dev/docs/guides/partner-onboarding-readiness). Reference.
|
|
80
|
+
- [Preparing a digital asset license review for a human rights owner with AI agents](https://docs.agent-swarm.dev/docs/guides/digital-content-license-rights-review). Reference.
|
|
75
81
|
- [Handing off inventory discrepancies from operations to purchasing with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-inventory-exception-handoff). Reference.
|
|
76
82
|
- [Handing off unresolved operational work between shifts with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-operations-shift-handoff). Reference.
|
|
77
83
|
- [Preparing a disputed product return for a human decision with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-returns-exception-handoff). Reference.
|
|
78
84
|
- [Reviewing a supplier's security evidence before onboarding with AI agents](https://docs.agent-swarm.dev/docs/guides/supplier-security-evidence-review). Reference.
|
|
79
85
|
- [Coordinating a customer data access request across support, privacy and engineering with AI agents](https://docs.agent-swarm.dev/docs/guides/privacy-data-request-handoff). Reference.
|
|
86
|
+
- [Coordinating a guest accessibility request between guest support and property operations with AI agents](https://docs.agent-swarm.dev/docs/guides/guest-accessibility-request-handoff). Reference.
|
|
80
87
|
- [Reviewing supplier performance across delivery, quality and service records with AI agents](https://docs.agent-swarm.dev/docs/guides/supplier-performance-review). Reference.
|
|
88
|
+
- [Reviewing a supplier ingredient specification change with AI agents](https://docs.agent-swarm.dev/docs/guides/food-supplier-ingredient-change-review). Reference.
|
|
89
|
+
- [Preparing a bid or no-bid review for an incoming RFP with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-rfp-bid-qualification). Reference.
|
|
90
|
+
- [Preparing contractor credential expiry checks for human review with AI agents](https://docs.agent-swarm.dev/docs/guides/contractor-license-expiry-review). Reference.
|
|
91
|
+
- [Coordinating a departing employee's access review across HR and IT with AI agents](https://docs.agent-swarm.dev/docs/guides/employee-offboarding-access-review). Reference.
|
|
92
|
+
- [Briefing sales and leadership on competitor changes with AI agents](https://docs.agent-swarm.dev/docs/guides/competitor-change-brief). Reference.
|
|
81
93
|
- [Deployment Guide](https://docs.agent-swarm.dev/docs/guides/deployment). When: Someone wants to run Agent Swarm on their own server with Docker Compose.
|
|
82
94
|
- [One-click deploy](https://docs.agent-swarm.dev/docs/guides/one-click-deploy). When: Someone has no server yet and wants Agent Swarm running in the cloud with HTTPS.
|
|
83
95
|
- [Kubernetes and Helm](https://docs.agent-swarm.dev/docs/guides/kubernetes). When: Someone wants to install Agent Swarm on Kubernetes.
|
|
@@ -131,6 +143,7 @@ Fetch the page as markdown: `curl -fsSL https://docs.agent-swarm.dev/llms.mdx/do
|
|
|
131
143
|
- [boxd runtime provider](https://docs.agent-swarm.dev/docs/guides/boxd-runtime-provider). Reference.
|
|
132
144
|
- [Coordinating delivery delay investigations between operations and support with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-delivery-delay-handoff). Reference.
|
|
133
145
|
- [Preparing a service capacity planning brief with AI agents](https://docs.agent-swarm.dev/docs/guides/ai-service-capacity-planning). Reference.
|
|
146
|
+
- [Preparing a property maintenance request for human triage with AI agents](https://docs.agent-swarm.dev/docs/guides/maintenance-work-order-triage). Reference.
|
|
134
147
|
- [Reviewing customer help content for conflicts with AI agents](https://docs.agent-swarm.dev/docs/guides/support-knowledge-conflict-review). Reference.
|
|
135
148
|
|
|
136
149
|
## Other docs
|
|
@@ -165,7 +165,7 @@ Afterwards, a `warnings` entry on `create-workflow` or a patch tool means the ke
|
|
|
165
165
|
}
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
- `provider` is optional. Set it when the requester explicitly selects a provider, using the same literal verified by the ping. Omit it only when inheriting configuration to follow `SYSTEM_ONE_DEFAULT_PROVIDER` at run time (global config row, then environment, then `typesafe`). An explicit provider is `typesafe`, `openrouter`, `laya`, `openai`, or `cloudflare`, and must be a literal, not a `{{token}}`. `model` is that provider's own id (`jev-1.13.0` on `typesafe`, `typesafe/jev-1.13` on `openrouter`, a checkpoint name such as `multilingual` on `laya`); `gpt-6-luna` on `openai`, `clef` (default) or `clef-flash` on `cloudflare`, which accepts no other id; leave it unset for the provider's default. `laya` has no default and sends no `model`, because it silently ignores one it does not know: leave it unset unless you mean a specific checkpoint. Every provider returns the same output; `openai` gets a translated request, and an OpenAI refusal of any question fails the step. `cloudflare` takes at most 64 questions. There is no fallback between them. Never use OpenRouter's `typesafe/jev-router`, which is a chat router that hands the request to another model.
|
|
168
|
+
- `provider` is optional. Set it when the requester explicitly selects a provider, using the same literal verified by the ping. Omit it only when inheriting configuration to follow `SYSTEM_ONE_DEFAULT_PROVIDER` at run time (global config row, then environment, then `typesafe`). An explicit provider is `typesafe`, `openrouter`, `laya`, `openai`, or `cloudflare`, and must be a literal, not a `{{token}}`. `model` is that provider's own id (`jev-1.13.0` on `typesafe`, `typesafe/jev-1.13` on `openrouter`, a checkpoint name such as `multilingual` on `laya`; another maker's decision model on `openrouter`, such as `~perplexity/pplx-decider-latest` or `google/gemini-decision-1`); `gpt-6-luna` on `openai`, `clef` (default) or `clef-flash` on `cloudflare`, which accepts no other id; leave it unset for the provider's default. `laya` has no default and sends no `model`, because it silently ignores one it does not know: leave it unset unless you mean a specific checkpoint. Every provider returns the same output; `openai` gets a translated request, and an OpenAI refusal of any question fails the step. `cloudflare` takes at most 64 questions. There is no fallback between them. Never use OpenRouter's `typesafe/jev-router`, which is a chat router that hands the request to another model.
|
|
169
169
|
- `state` is required: text, a string array, or a JSON object. An exact `{{token}}` keeps the upstream JSON type. Every question in one call shares the state and cannot see the other answers, so a dependent judgment needs its own node.
|
|
170
170
|
- Each question is `noul` (probability that a claim is true; optional `criteria: { true, false }`), `choice` (2 to 255 options; `criteria: { option: description }`), or `score` (2 to 10 ordered levels; `criteria: [level, ...]`).
|
|
171
171
|
- `returns` repeats every question id and its type. A mismatch is rejected when the workflow is saved.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ACPAdapter2
|
|
3
|
-
} from "./cli-1f48qdnb.js";
|
|
4
|
-
import"./cli-d528acsw.js";
|
|
5
|
-
import"./cli-rvhaahfv.js";
|
|
6
|
-
import"./cli-bp2rt28p.js";
|
|
7
|
-
import"./cli-zm6bkx3e.js";
|
|
8
|
-
import"./cli-hv3820ez.js";
|
|
9
|
-
import"./cli-2v4xxnx2.js";
|
|
10
|
-
import"./cli-gq6qhmrr.js";
|
|
11
|
-
import"./cli-0726awxw.js";
|
|
12
|
-
import"./cli-0xwb7zpt.js";
|
|
13
|
-
import"./cli-cmgdptmx.js";
|
|
14
|
-
import"./cli-vdfngx2g.js";
|
|
15
|
-
export {
|
|
16
|
-
ACPAdapter2 as ACPAdapter
|
|
17
|
-
};
|