@desplega.ai/agent-swarm 2.13.3 → 2.13.5
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-tbt61zkm.js +17 -0
- package/dist/{acp-targets-k8xs4tj8.js → acp-targets-w8dbs4nr.js} +10 -10
- package/dist/{actions-pg5fxjer.js → actions-8zrcbjrx.js} +237 -27
- package/dist/{agent-fs-provision-vbk3fppw.js → agent-fs-provision-cbt2ttds.js} +4 -4
- package/dist/{amp-adapter-adbhxsz9.js → amp-adapter-8x6zp8w4.js} +3 -3
- package/dist/{anthropic-messages-88b7s3n9.js → anthropic-messages-vdd1zmha.js} +10 -10
- package/dist/{app-b267ggx1.js → app-zfa9dwjw.js} +7 -7
- package/dist/{approval-notifications-evc1a9z5.js → approval-notifications-rv92zmza.js} +8 -8
- package/dist/{assistant-wgz2ab84.js → assistant-q7s7rm1q.js} +25 -25
- package/dist/{boot-args-schema-6tpk28j4.js → boot-args-schema-g27kpzr1.js} +1 -1
- package/dist/{boot-reembed-r1zyvefv.js → boot-reembed-1mjs52nt.js} +1 -1
- package/dist/{boot-reembed-ankp369c.js → boot-reembed-m62dpdkg.js} +1 -1
- package/dist/{boot-scrub-sweep-cgb6r5bd.js → boot-scrub-sweep-ss1vcamw.js} +2 -2
- package/dist/{boot-seeds-bjceqg7b.js → boot-seeds-hwnvgbb3.js} +4 -4
- package/dist/{boxd-hr8rsxzq.js → boxd-y0szhp0g.js} +2 -2
- package/dist/{claude-adapter-knztdnff.js → claude-adapter-0rjmbhjk.js} +9 -9
- package/dist/{claude-managed-adapter-qwejzqkk.js → claude-managed-adapter-6k032agg.js} +4 -4
- package/dist/{claude-managed-setup-0vgz4d1j.js → claude-managed-setup-6czvve8q.js} +5 -5
- package/dist/{claude-sdk-session-c3g6dv0g.js → claude-sdk-session-pr0znb81.js} +12671 -11885
- package/dist/{cli-2v4xxnx2.js → cli-0h8skzss.js} +1 -1
- package/dist/{cli-7fa6yv98.js → cli-0qt3epg4.js} +7 -7
- package/dist/{cli-aytna2fm.js → cli-19d6v8er.js} +7 -7
- package/dist/{cli-8m6gqnf1.js → cli-1jq2em7b.js} +4 -4
- package/dist/{cli-fp65jdp2.js → cli-1kvcsd2f.js} +219 -155
- package/dist/{cli-8fj8yfmk.js → cli-2vp0z049.js} +1 -1
- package/dist/{cli-61p7ty8d.js → cli-2wzkvfgm.js} +3 -3
- package/dist/{cli-tjf1bh1v.js → cli-34fygf87.js} +6 -4
- package/dist/{cli-czeh7x13.js → cli-3860pmrq.js} +4 -4
- package/dist/{cli-dq30fq3q.js → cli-3vw6dd4g.js} +2 -2
- package/dist/{cli-4dyhzhpx.js → cli-4gaf3tx5.js} +1 -1
- package/dist/{cli-3mf04tkh.js → cli-4vynxtrb.js} +1 -1
- package/dist/{cli-hpxcfvdm.js → cli-55h8m1x3.js} +10 -7
- package/dist/{cli-hxj888w3.js → cli-5n9w2xzx.js} +2 -2
- package/dist/{cli-50whymxq.js → cli-5tq15aa7.js} +2 -2
- package/dist/{cli-8sayvj48.js → cli-5web09sb.js} +3 -3
- package/dist/{cli-gc715jrc.js → cli-69zzpjgh.js} +1 -1
- package/dist/{cli-vgh5adn9.js → cli-6msnpj1z.js} +8 -8
- package/dist/{cli-f8rcvf2x.js → cli-7r9tvk8v.js} +76 -3
- package/dist/{cli-fbmgpt72.js → cli-7ypg8hka.js} +3 -3
- package/dist/{cli-xc8m5cjn.js → cli-887vhew6.js} +3 -3
- package/dist/{cli-q8aq48v1.js → cli-8b4rpnwj.js} +1 -1
- package/dist/{cli-pzsedyb0.js → cli-8pd1t17c.js} +14 -14
- package/dist/{cli-je587f74.js → cli-94gx6ze9.js} +1 -1
- package/dist/{cli-h9d3sdnc.js → cli-94mxerrp.js} +1 -1
- package/dist/{cli-ef590376.js → cli-9n6g14vs.js} +3 -3
- package/dist/{cli-80d5g0fa.js → cli-abby987g.js} +3 -3
- package/dist/{cli-grk77aen.js → cli-avax5mp9.js} +2 -2
- package/dist/{cli-hd2a204w.js → cli-b42yfn17.js} +14 -14
- package/dist/{cli-gkjw33x5.js → cli-b9ygp1kz.js} +2 -2
- package/dist/{cli-bh53ppqm.js → cli-bvamr9g0.js} +4 -4
- package/dist/{cli-ka4tqjzd.js → cli-ced4azn1.js} +15 -12
- package/dist/{cli-v1v49t36.js → cli-cmbb2t8a.js} +3 -3
- package/dist/{cli-hhb8kbwd.js → cli-cp163xga.js} +31 -16
- package/dist/{cli-55fqpd9q.js → cli-ebpq3c5z.js} +8 -8
- package/dist/{cli-9gmkw6xn.js → cli-ehg90jd1.js} +128 -48
- package/dist/{cli-jg5txpm6.js → cli-emdfd8fh.js} +75 -1
- package/dist/{cli-gxqwm3k3.js → cli-evy3egte.js} +104 -10
- package/dist/{cli-a21cwm89.js → cli-ewk3sg68.js} +3 -3
- package/dist/{cli-syqcny89.js → cli-f7b9nyvk.js} +9 -9
- package/dist/{cli-268b3dgn.js → cli-f9xw9pr4.js} +5 -5
- package/dist/{cli-61fzwtjk.js → cli-ffn0a515.js} +9 -9
- package/dist/{cli-ya1cj689.js → cli-fw67mnyc.js} +1 -1
- package/dist/{cli-dqgnbnxs.js → cli-grbngev5.js} +6 -1
- package/dist/{cli-sy2ge2ye.js → cli-hd5bm1e1.js} +4 -4
- package/dist/{cli-rfejbpe1.js → cli-htb5bpz2.js} +1 -1
- package/dist/{cli-w24741sm.js → cli-j69pzrrz.js} +7 -7
- package/dist/{cli-g4dhd3pr.js → cli-jdq3jmny.js} +6 -23
- package/dist/{cli-hv3820ez.js → cli-k0nebh10.js} +1 -1
- package/dist/{cli-d2epqm0y.js → cli-kezzteka.js} +1 -1
- package/dist/{cli-h0ewec3d.js → cli-kr0jpw9c.js} +1 -1
- package/dist/{cli-t25rq8mg.js → cli-ks06cd0n.js} +40 -11
- package/dist/{cli-1gnf5c7x.js → cli-kwj3131p.js} +1 -1
- package/dist/{cli-wtffytm8.js → cli-m8f4379k.js} +3 -3
- package/dist/{cli-43dsqhcp.js → cli-n79j1vxc.js} +4 -4
- package/dist/{cli-b768ek79.js → cli-nrt048ys.js} +1 -0
- package/dist/{cli-h3drhntp.js → cli-pedm2kht.js} +2 -2
- package/dist/{cli-eds5xnsz.js → cli-phmy14hb.js} +2 -2
- package/dist/{cli-7kv5d674.js → cli-prz1p3ft.js} +5 -5
- package/dist/{cli-nbawx3s0.js → cli-q1h041y8.js} +6 -6
- package/dist/{cli-cah298e5.js → cli-q41qar56.js} +104 -119
- package/dist/{cli-kwm1bek7.js → cli-qmx8bnt4.js} +2 -2
- package/dist/{cli-1wew39p0.js → cli-qrvk9nka.js} +28 -19
- package/dist/{cli-v8rpjrnx.js → cli-r3dxpmyt.js} +1 -1
- package/dist/{cli-0j4qmc80.js → cli-ryem5cfq.js} +8 -8
- package/dist/{cli-8pnawt98.js → cli-s8dhq7rj.js} +5 -5
- package/dist/{cli-zkbz8m2q.js → cli-sejvnjvw.js} +3 -2
- package/dist/{cli-at67kvnp.js → cli-srktrbby.js} +1 -1
- package/dist/{cli-wsnradtk.js → cli-srre41gb.js} +2 -2
- package/dist/{cli-r6xnchva.js → cli-t0n9svkb.js} +7 -7
- package/dist/{cli-y0q92v4r.js → cli-t879ww0y.js} +2 -2
- package/dist/{cli-eetzmsy5.js → cli-t9pzz2eq.js} +2 -2
- package/dist/{cli-xwsm6xkr.js → cli-tgc1kgg3.js} +1 -1
- package/dist/{cli-dw43pnzp.js → cli-tt7dkwjj.js} +7 -7
- package/dist/{cli-y754psdt.js → cli-tvyt8w6n.js} +5 -5
- package/dist/cli-v09eza21.js +1907 -0
- package/dist/{cli-mgr3gatr.js → cli-vbge4rsp.js} +4 -4
- package/dist/{cli-ppf9ap9n.js → cli-vcpyttcw.js} +1 -1
- package/dist/{cli-1606qw3n.js → cli-wzecestt.js} +1100 -432
- package/dist/{cli-5basv0e7.js → cli-x2adbg4j.js} +71 -9
- package/dist/{cli-vx9acp12.js → cli-ybte1fqc.js} +1 -1
- package/dist/{cli-vdfngx2g.js → cli-ywy8yz6t.js} +2 -2
- package/dist/{cli-cpkxh68d.js → cli-z1vam71h.js} +2 -2
- package/dist/{cli-djwt4mtn.js → cli-z3x7h79n.js} +15 -9
- package/dist/cli-z40t85ms.js +27 -0
- package/dist/{cli-ea367bdn.js → cli-zbbtp02a.js} +104 -27
- package/dist/{cli-88np9va3.js → cli-zntvmqmm.js} +2 -2
- package/dist/{cli-snwz16eg.js → cli-zxa1vmx7.js} +2 -2
- package/dist/{cli-50wa8k4h.js → cli-zy9bb22b.js} +1 -2
- package/dist/{cli-e4gx499y.js → cli-zzq96q57.js} +273 -106
- package/dist/cli.js +21 -21
- package/dist/{codex-adapter-493vb8cv.js → codex-adapter-bn7eaxk5.js} +8 -8
- package/dist/{codex-hook-ej8hn6z5.js → codex-hook-nnmezjg9.js} +3 -3
- package/dist/{codex-login-ven5cz5j.js → codex-login-ktfg1cxk.js} +1 -1
- package/dist/{codex-session-runner-ps5m4z1g.js → codex-session-runner-j1e9hffc.js} +9 -9
- package/dist/{commands-shktk0b8.js → commands-amhpafrr.js} +3 -3
- package/dist/{controller-wn3vd217.js → controller-tw7g10j2.js} +4 -4
- package/dist/{controllers-connect-yft057ws.js → controllers-connect-2ssqz7f4.js} +25 -25
- package/dist/core-bwp98v4w.js +42 -0
- package/dist/{cursor-adapter-8fpm4dng.js → cursor-adapter-d6knjmwa.js} +2 -2
- package/dist/{db-0ezhdhz5.js → db-fd6xxm77.js} +3 -3
- package/dist/{db-84pz2w5c.js → db-sc59379z.js} +2 -2
- package/dist/{devin-adapter-fs90ab4v.js → devin-adapter-3bp6rape.js} +1 -1
- package/dist/{dispatcher-h2rz69f6.js → dispatcher-a2gdqz8c.js} +22 -22
- package/dist/{docker-1h33jvh9.js → docker-a59g3ebm.js} +2 -2
- package/dist/{dsh-adapter-g9yqv09y.js → dsh-adapter-43ygwqn7.js} +2 -2
- package/dist/{e2b-jnk0yeva.js → e2b-cn7cvjqy.js} +3 -3
- package/dist/{e2b-y7e5kmzf.js → e2b-qnxyfea6.js} +3 -3
- package/dist/{easter-egg-3d-m41ad78v.js → easter-egg-3d-a0pphy71.js} +1 -1
- package/dist/{embedding-space-yam9zwzj.js → embedding-space-qepzrach.js} +6 -6
- package/dist/{embeddings-g2be0y8q.js → embeddings-d7vr881x.js} +1 -1
- package/dist/{event-bus-08t2b4y2.js → event-bus-7gbsr0g4.js} +1 -1
- package/dist/{execute-hhdejgzf.js → execute-6afts2bn.js} +1 -1
- package/dist/{external-channel-kjt2yzfj.js → external-channel-881zq1x4.js} +2 -2
- package/dist/fx-adapter-cr2hq17y.js +20 -0
- package/dist/grok-adapter-ayddnbsc.js +20 -0
- package/dist/handlers-7ghs84x2.js +41 -0
- package/dist/{heartbeat-2e5jdexj.js → heartbeat-4c022m6a.js} +25 -25
- package/dist/{hook-acg9saz7.js → hook-4k84x499.js} +6 -6
- package/dist/{hook-34s8cmgn.js → hook-a7eh6zty.js} +9 -9
- package/dist/{http-ra2zr2f8.js → http-6aw5wanc.js} +456 -1864
- package/dist/{index-mbpxhc4w.js → index-126v2d0t.js} +1 -4
- package/dist/index-dtt0d634.js +44 -0
- package/dist/index-hmszyqkk.js +42 -0
- package/dist/index-j6rm1rtn.js +39 -0
- package/dist/{index-9q42cr54.js → index-rwwhsmjg.js} +1 -1
- package/dist/{index-93bw5wds.js → index-xhad0n8m.js} +1 -1
- package/dist/{index-2z1z7qx6.js → index-yq9hhhhy.js} +26 -26
- package/dist/{index-9r4j0a60.js → index-z2g9469g.js} +410 -27
- package/dist/{k8s-8326q0rq.js → k8s-36gfn847.js} +2 -2
- package/dist/{keepalive-vjnnqbkm.js → keepalive-zhbmztqw.js} +5 -5
- package/dist/lead-g2j4q39z.js +83 -0
- package/dist/{maintenance-px2g599e.js → maintenance-rsp0591h.js} +1 -1
- package/dist/{node-2wfcey7d.js → node-0as4n1ef.js} +3 -3
- package/dist/{node-zd6shky9.js → node-dhxbt01p.js} +3 -3
- package/dist/{node-z67yjre7.js → node-rxte5hc6.js} +290 -70
- package/dist/{node-hjn5n1yp.js → node-t0ct2zpw.js} +3 -5
- package/dist/{oauth-refresh-sweep-nkykf09m.js → oauth-refresh-sweep-w3cqmxq7.js} +4 -4
- package/dist/{object-webhooks-gt9xnq21.js → object-webhooks-331hay92.js} +7 -7
- package/dist/{onboard-1f134p65.js → onboard-n2w80m2n.js} +7 -7
- package/dist/{opencode-adapter-94976yab.js → opencode-adapter-z98127cz.js} +8 -8
- package/dist/{otel-impl-5d4p2fqs.js → otel-impl-xsk35tvf.js} +2 -2
- package/dist/{pending-vkk0vx6n.js → pending-2e6trkxd.js} +23 -23
- package/dist/{pi-mono-adapter-cyzdv5er.js → pi-mono-adapter-wh6yndtm.js} +13 -13
- package/dist/{pricing-refresh-jtmjwss9.js → pricing-refresh-9355dj1t.js} +2 -2
- package/dist/{rbac-roles-yd1fgpsn.js → rbac-roles-58y3m912.js} +3 -3
- package/dist/{rbac-roles-1fvmdyeb.js → rbac-roles-8eajw4s6.js} +6 -4
- package/dist/{render-v2-kb5s3vx4.js → render-v2-7gskkmd4.js} +7 -7
- package/dist/{resume-z1vs44n5.js → resume-0drnmpja.js} +10 -10
- package/dist/{runtime-gk6ct7r7.js → runtime-d2tcmqte.js} +1 -1
- package/dist/{session-access-nz6nre4d.js → session-access-0ztys6bd.js} +5 -5
- package/dist/{session-source-backfill-wb60zjkd.js → session-source-backfill-cdm5s046.js} +3 -3
- package/dist/{setup-2x8g8j4s.js → setup-pqwb9tcc.js} +1 -1
- package/dist/thread-buffer-epx3san4.js +42 -0
- package/dist/{tree-visibility-ts3z30kw.js → tree-visibility-rwz67mje.js} +2 -2
- package/dist/{user-merge-jobs-zetg26e0.js → user-merge-jobs-mxrhamwt.js} +3 -3
- package/dist/{virtual-modules-674fka8x.js → virtual-modules-71y1gsmg.js} +3 -3
- package/dist/{work-objects-w52yyjxm.js → work-objects-3k4ykt9j.js} +25 -25
- package/dist/worker-09gqn9xy.js +83 -0
- package/dist/{worker-follow-up-dyfxyjbj.js → worker-follow-up-y0h64xpr.js} +22 -22
- package/dist/{x-asbrnafg.js → x-d27jj7z7.js} +2 -2
- package/openapi.json +861 -33
- package/package.json +4 -4
- package/src/apps/sync.ts +20 -5
- package/src/azure-devops/boards-sync.ts +1 -1
- 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/slack-trees.ts +12 -1
- package/src/be/db/tasks/read.ts +25 -1
- package/src/be/db/tasks/write.ts +47 -12
- package/src/be/db/users/avatar.ts +12 -0
- package/src/be/db-retention.ts +1 -1
- package/src/be/db.ts +149 -67
- package/src/be/design-system.ts +63 -0
- package/src/be/migrations/342_script_run_sources.sql +20 -0
- package/src/be/migrations/344_user_avatar.sql +4 -0
- package/src/be/migrations/345_task_status_kind.sql +6 -0
- package/src/be/migrations/runner.ts +8 -0
- package/src/be/migrations/script-run-sources.ts +51 -0
- package/src/be/primitives/object-embed.ts +2 -2
- package/src/be/primitives/objects.ts +2 -2
- package/src/be/rbac-roles.ts +2 -0
- package/src/be/runtime-pools/supervisor.ts +1 -0
- package/src/be/scripts/typecheck.ts +5 -3
- 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 +25 -1
- package/src/bitbucket/handlers.ts +1 -1
- package/src/commands/credential-outcome-report.ts +96 -0
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/runner.ts +49 -3
- package/src/event-waits/github.ts +39 -6
- package/src/event-waits/index.ts +4 -2
- package/src/event-waits/types.ts +10 -3
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/github/app.ts +177 -13
- package/src/github/handlers.ts +7 -2
- package/src/github/pull-request-state.ts +100 -11
- package/src/gitlab/handlers.ts +2 -2
- package/src/heartbeat/heartbeat.ts +24 -5
- package/src/http/all-routes.ts +1 -0
- package/src/http/api-keys.ts +26 -0
- package/src/http/approval-chat-answer.ts +99 -0
- package/src/http/approval-requests.ts +280 -225
- package/src/http/asset-key-write.ts +45 -0
- package/src/http/assets.ts +4 -3
- package/src/http/design-system.ts +103 -0
- package/src/http/github-token.ts +27 -6
- package/src/http/index.ts +10 -6
- package/src/http/pages-public.ts +25 -10
- package/src/http/pages.ts +21 -10
- package/src/http/person-responder.ts +28 -0
- package/src/http/schedules.ts +6 -6
- package/src/http/sessions.ts +7 -2
- package/src/http/tasks.ts +23 -5
- package/src/http/users.ts +5 -0
- package/src/http/webhooks.ts +19 -1
- package/src/http/workflows.ts +5 -10
- package/src/integrations/chat-sdk/adapters.ts +33 -3
- package/src/integrations/chat-sdk/commands.ts +3 -1
- 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/jira/sync.ts +1 -1
- package/src/kv-reserved-namespaces.ts +5 -0
- package/src/linear/sync.ts +5 -3
- package/src/pages/page-head.ts +11 -1
- package/src/prompts/session-templates.ts +1 -0
- package/src/providers/acp-targets.ts +2 -2
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/claude-adapter.ts +5 -0
- package/src/providers/claude-sdk-session.ts +5 -0
- package/src/providers/dsh-adapter.ts +48 -13
- package/src/providers/runtime-dependencies.ts +1 -1
- package/src/rbac/legacy-policy.ts +4 -0
- package/src/rbac/permissions.ts +8 -0
- package/src/scheduler/deferred-task-waits.ts +74 -13
- 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 +20 -24
- package/src/scripts-runtime/types/stdlib.d.ts +12 -2
- package/src/scripts-runtime/types/swarm-extension.d.ts +19 -2
- package/src/scripts-runtime/types/swarm-sdk.d.ts +12 -2
- package/src/server.ts +2 -0
- package/src/slack/actions.ts +4 -1
- package/src/slack/approval-actions.ts +148 -0
- package/src/slack/approval-buttons.ts +28 -0
- package/src/slack/render-v2.ts +148 -7
- package/src/tests/api-drain-worker-e2e.test.ts +0 -2
- package/src/tests/approval-auto-cancellation-migration.test.ts +8 -19
- package/src/tests/approval-card-resolution.test.ts +2 -17
- package/src/tests/approval-requests-notifications.test.ts +41 -27
- package/src/tests/approval-requests.test.ts +137 -369
- package/src/tests/apps-sync-engine.test.ts +5 -3
- package/src/tests/apps-table-filters-migration.test.ts +44 -25
- package/src/tests/bitbucket-handlers.test.ts +2 -0
- package/src/tests/chat-sdk-commands.test.ts +1 -0
- package/src/tests/chat-sdk-mentions.test.ts +183 -0
- package/src/tests/claude-adapter.test.ts +35 -0
- package/src/tests/codex-adapter.test.ts +3 -92
- package/src/tests/codex-gpt6-release.test.ts +0 -9
- package/src/tests/codex-oauth-credential-info.test.ts +35 -18
- package/src/tests/codex-oauth.test.ts +0 -6
- package/src/tests/codex-pool.test.ts +5 -214
- package/src/tests/codex-rate-limit-parse.test.ts +0 -7
- package/src/tests/codex-swarm-events.test.ts +11 -54
- package/src/tests/create-page-tool.test.ts +5 -0
- package/src/tests/db-client-busy-retry.test.ts +49 -16
- package/src/tests/defer-task.test.ts +1 -0
- package/src/tests/dsh-adapter.test.ts +53 -1
- package/src/tests/e2e-shards.test.ts +9 -9
- package/src/tests/enabled-tools.test.ts +0 -2
- package/src/tests/fixtures/base-prompt-baseline.json +6 -6
- package/src/tests/fixtures/compiled-source-schema-boot.ts +24 -0
- package/src/tests/fixtures/secret-corpus.ts +43 -1
- package/src/tests/github-app-worker-auth-helper.test.ts +147 -1
- package/src/tests/gitlab-handlers.test.ts +2 -0
- package/src/tests/heartbeat-jev-gate.test.ts +9 -241
- package/src/tests/heartbeat-reroute-decision.test.ts +2 -0
- package/src/tests/heartbeat-stall-thresholds.test.ts +174 -0
- package/src/tests/heartbeat-supersede-resume.test.ts +2 -0
- package/src/tests/heartbeat.test.ts +1 -0
- package/src/tests/jira-adf.test.ts +42 -2
- package/src/tests/key-usage-selection.test.ts +302 -0
- package/src/tests/memory-e2e.test.ts +34 -103
- package/src/tests/memory-key-paths.test.ts +5 -0
- package/src/tests/memory-rater-llm.test.ts +33 -149
- package/src/tests/memory-store.test.ts +24 -125
- package/src/tests/memory.test.ts +31 -100
- package/src/tests/merge-gate-detect-changes.test.ts +314 -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/otel-service-name.test.ts +0 -9
- package/src/tests/otel-session-cost-metrics.test.ts +1 -38
- package/src/tests/pool-session-logs.test.ts +8 -42
- package/src/tests/pre-push-affected-tests.test.ts +106 -0
- package/src/tests/prompt-template-session.test.ts +3 -0
- 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-api-drain.test.ts +2 -17
- package/src/tests/runner-terminal-window-report.test.ts +132 -0
- package/src/tests/runtime-e2b-pools.test.ts +7 -1
- package/src/tests/runtime-supervisor-failures.test.ts +1 -0
- package/src/tests/sandboxed-process.test.ts +26 -21
- package/src/tests/schedule-http-triage-tools.test.ts +12 -9
- package/src/tests/schedule-target-type.test.ts +4 -1
- package/src/tests/scheduled-tasks.test.ts +14 -51
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/script-executor-conformance.test.ts +4 -48
- package/src/tests/script-executor-quickjs-pool.test.ts +9 -7
- package/src/tests/script-native-startup.test.ts +21 -25
- 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 +38 -2
- 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/session-logs.test.ts +1 -260
- package/src/tests/slack-render-v2.test.ts +5 -148
- package/src/tests/system-one-hosts-ui-mirror.test.ts +1 -0
- package/src/tests/task-cascade-fail.test.ts +1 -0
- package/src/tests/task-supersede-resume.test.ts +1 -0
- package/src/tests/test-proc.ts +5 -2
- package/src/tests/vcs-azure-devops.test.ts +10 -0
- package/src/tests/vcs-provider.test.ts +8 -0
- package/src/tests/window-stream-reporter.test.ts +122 -0
- package/src/tests/workflow-agent-task-retry.test.ts +1 -3
- package/src/tests/workflow-cascade-cancel.test.ts +1 -0
- package/src/tests/workflow-retry-v2.test.ts +34 -43
- package/src/tests/workflow-retry-validation.test.ts +8 -48
- package/src/tests/worktree-reaper.test.ts +2 -2
- package/src/themes/design-system.ts +163 -0
- package/src/themes/page-theme.ts +28 -19
- package/src/tools/cancel-task.ts +2 -2
- package/src/tools/chat-post.ts +7 -3
- package/src/tools/create-page.ts +3 -0
- package/src/tools/defer-task.ts +7 -2
- package/src/tools/design-system.ts +102 -0
- package/src/tools/get-task-details.ts +8 -4
- package/src/tools/get-tasks.ts +13 -2
- package/src/tools/manage-user.ts +9 -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/store-progress.ts +5 -3
- 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 +158 -0
- package/src/utils/constants.ts +12 -0
- package/src/utils/credentials.ts +42 -5
- package/src/utils/error-tracker.ts +6 -0
- package/src/utils/key-usage.ts +114 -0
- package/src/utils/sandboxed-process.ts +1 -0
- 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/src/workflows/resume.ts +5 -2
- package/templates/skills/apps/SKILL.md +2 -0
- package/templates/skills/apps/content.md +2 -0
- package/templates/skills/boards-and-sheets/content.md +4 -2
- package/templates/skills/pages/content.md +41 -8
- package/templates/skills/swarm-docs/content.md +6 -0
- package/templates/skills/swarm-scripts/SKILL.md +1 -0
- package/templates/skills/swarm-scripts/content.md +1 -0
- package/templates/skills/workflow-iterate/content.md +1 -1
- package/dist/acp-adapter-t2q6nsqv.js +0 -17
- package/dist/cli-kh973792.js +0 -98
- package/dist/core-nheayfgm.js +0 -42
- package/dist/fx-adapter-8g7xsp8q.js +0 -20
- package/dist/grok-adapter-ztk2zkz1.js +0 -20
- package/dist/handlers-9ywssz71.js +0 -41
- package/dist/index-6mgbdtv1.js +0 -44
- package/dist/index-hqdsn2t2.js +0 -39
- package/dist/index-st231bqv.js +0 -40
- package/dist/lead-mk0xkth2.js +0 -82
- package/dist/thread-buffer-d50rqpev.js +0 -42
- package/dist/worker-662x1vse.js +0 -82
- package/src/tests/apps-table-selection-migration.test.ts +0 -95
- package/src/tests/extensions-example-heartbeat-remediate.test.ts +0 -69
- package/src/tests/extensions-example-rewrite-and-suppress.test.ts +0 -70
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
providerForModel,
|
|
6
6
|
providerForKeyVar,
|
|
7
7
|
init_src2
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-1kvcsd2f.js";
|
|
9
9
|
import {
|
|
10
10
|
__esm
|
|
11
11
|
} from "./cli-242037k3.js";
|
|
@@ -607,6 +607,57 @@ var init_model_rate_limit_windows = __esm(() => {
|
|
|
607
607
|
KEY_WIDE_WINDOWS = ["five_hour", "seven_day", "overage"];
|
|
608
608
|
});
|
|
609
609
|
|
|
610
|
+
// src/utils/key-usage.ts
|
|
611
|
+
function credentialSelectionStrategy(value) {
|
|
612
|
+
return value?.trim().toLowerCase() === "pace" ? "pace" : "usage";
|
|
613
|
+
}
|
|
614
|
+
function keyUsageFromWindows(windows, nowMs) {
|
|
615
|
+
let usage = 0;
|
|
616
|
+
for (const name of KEY_USAGE_WINDOWS) {
|
|
617
|
+
const window = windows?.[name];
|
|
618
|
+
if (!window || typeof window.utilization !== "number" || !Number.isFinite(window.utilization))
|
|
619
|
+
continue;
|
|
620
|
+
if (typeof window.resetsAt === "number" && window.resetsAt * 1000 <= nowMs)
|
|
621
|
+
continue;
|
|
622
|
+
usage = Math.max(usage, window.utilization);
|
|
623
|
+
}
|
|
624
|
+
return usage;
|
|
625
|
+
}
|
|
626
|
+
function keyPaceFromWindows(windows, nowMs, modelFamily) {
|
|
627
|
+
const modelWindow = modelFamily ? windowForModelFamily(modelFamily) : undefined;
|
|
628
|
+
let pace;
|
|
629
|
+
for (const name of [...KEY_USAGE_WINDOWS, ...modelWindow ? [modelWindow] : []]) {
|
|
630
|
+
const window = windows?.[name];
|
|
631
|
+
if (!window || typeof window.utilization !== "number" || !Number.isFinite(window.utilization))
|
|
632
|
+
continue;
|
|
633
|
+
if (typeof window.resetsAt !== "number" || window.resetsAt * 1000 <= nowMs)
|
|
634
|
+
continue;
|
|
635
|
+
const durationMs = (window.durationMins ?? (name === "five_hour" ? 300 : 10080)) * 60000;
|
|
636
|
+
const elapsed = Math.min(1, Math.max(0, 1 - (window.resetsAt * 1000 - nowMs) / durationMs));
|
|
637
|
+
pace = Math.max(pace ?? Number.NEGATIVE_INFINITY, window.utilization - elapsed);
|
|
638
|
+
}
|
|
639
|
+
return pace;
|
|
640
|
+
}
|
|
641
|
+
function pickLowestUsage(indices, usageByIndex, sessionsByIndex, random = Math.random, band = KEY_USAGE_BAND) {
|
|
642
|
+
if (indices.length === 0)
|
|
643
|
+
return;
|
|
644
|
+
const entryAt = (values, i) => {
|
|
645
|
+
const value = values?.[i];
|
|
646
|
+
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
647
|
+
};
|
|
648
|
+
const lowest = Math.min(...indices.map((i) => entryAt(usageByIndex, i)));
|
|
649
|
+
const inBand = indices.filter((i) => entryAt(usageByIndex, i) <= lowest + band + 0.000000001);
|
|
650
|
+
const fewest = Math.min(...inBand.map((i) => entryAt(sessionsByIndex, i)));
|
|
651
|
+
const best = inBand.filter((i) => entryAt(sessionsByIndex, i) === fewest);
|
|
652
|
+
return best[Math.floor(random() * best.length)];
|
|
653
|
+
}
|
|
654
|
+
var KEY_USAGE_WINDOWS, CREDENTIAL_SELECTION_STRATEGIES, KEY_USAGE_BAND = 0.1;
|
|
655
|
+
var init_key_usage = __esm(() => {
|
|
656
|
+
init_model_rate_limit_windows();
|
|
657
|
+
KEY_USAGE_WINDOWS = ["five_hour", "seven_day"];
|
|
658
|
+
CREDENTIAL_SELECTION_STRATEGIES = ["pace", "usage"];
|
|
659
|
+
});
|
|
660
|
+
|
|
610
661
|
// src/utils/credentials.ts
|
|
611
662
|
import { existsSync } from "node:fs";
|
|
612
663
|
function normalizeProviderKeyAliases(env) {
|
|
@@ -685,7 +736,7 @@ function isJsonObject(value) {
|
|
|
685
736
|
function splitCredentialPool(value) {
|
|
686
737
|
return isJsonObject(value) ? [value.trim()] : value.split(",").map((s) => s.trim()).filter(Boolean);
|
|
687
738
|
}
|
|
688
|
-
function selectCredential(value, availableIndices, keyType = "ANTHROPIC_API_KEY", allowedIndices) {
|
|
739
|
+
function selectCredential(value, availableIndices, keyType = "ANTHROPIC_API_KEY", allowedIndices, usageByIndex, sessionsByIndex) {
|
|
689
740
|
const credentials = splitCredentialPool(value);
|
|
690
741
|
if (credentials.length <= 1) {
|
|
691
742
|
const selected = value.trim();
|
|
@@ -707,7 +758,7 @@ function selectCredential(value, availableIndices, keyType = "ANTHROPIC_API_KEY"
|
|
|
707
758
|
if (availableIndices && availableIndices.length > 0) {
|
|
708
759
|
const validIndices = availableIndices.filter((i) => i >= 0 && i < credentials.length && (!drawFrom || drawFrom.includes(i)));
|
|
709
760
|
if (validIndices.length > 0) {
|
|
710
|
-
index = validIndices
|
|
761
|
+
index = pickLowestUsage(validIndices, usageByIndex, sessionsByIndex);
|
|
711
762
|
} else {
|
|
712
763
|
index = pickAny();
|
|
713
764
|
isRateLimitFallback = true;
|
|
@@ -774,7 +825,11 @@ async function fetchAvailableIndices(env, apiUrl, apiKey, poolVars = CREDENTIAL_
|
|
|
774
825
|
modelBlockedIndices: data.modelBlockedIndices,
|
|
775
826
|
earliestModelResetAt: data.earliestModelResetAt,
|
|
776
827
|
seatBlockedIndices: data.seatBlockedIndices,
|
|
777
|
-
spendCappedIndices: data.spendCappedIndices
|
|
828
|
+
spendCappedIndices: data.spendCappedIndices,
|
|
829
|
+
keyUsage: data.keyUsage,
|
|
830
|
+
keyPace: data.keyPace,
|
|
831
|
+
selectionStrategy: data.selectionStrategy,
|
|
832
|
+
activeSessions: data.activeSessions
|
|
778
833
|
};
|
|
779
834
|
if (data.availableIndices.length < totalKeys) {
|
|
780
835
|
console.log(`[credentials] ${envVar}: ${data.availableIndices.length}/${totalKeys} keys available (${totalKeys - data.availableIndices.length} unavailable)`);
|
|
@@ -849,13 +904,19 @@ async function resolveCredentialPools(env, opts) {
|
|
|
849
904
|
});
|
|
850
905
|
}
|
|
851
906
|
}
|
|
907
|
+
const strategy = info?.keyPace && info.selectionStrategy === "pace" ? "pace" : "usage";
|
|
908
|
+
const usage = strategy === "pace" ? info?.keyPace : info?.keyUsage;
|
|
909
|
+
const sessions = info?.activeSessions;
|
|
852
910
|
const result = seatFallbackIndices ? {
|
|
853
|
-
...selectCredential(val, seatFallbackIndices, envVar, allowedIdx),
|
|
911
|
+
...selectCredential(val, seatFallbackIndices, envVar, allowedIdx, usage, sessions),
|
|
912
|
+
isRateLimitFallback: true
|
|
913
|
+
} : uncapped?.length ? {
|
|
914
|
+
...selectCredential(val, uncapped, envVar, allowedIdx, usage, sessions),
|
|
854
915
|
isRateLimitFallback: true
|
|
855
|
-
} :
|
|
916
|
+
} : selectCredential(val, available, envVar, allowedIdx, usage, sessions);
|
|
856
917
|
env[envVar] = result.selected;
|
|
857
918
|
const availInfo = available ? ` (${available.length} available of ${result.total})` : "";
|
|
858
|
-
console.log(`[credentials] Selected ${envVar} credential ${result.index + 1}/${result.total}${availInfo} [...${result.keySuffix}]${info?.rejectedIndices?.length ? ` (${info.rejectedIndices.length} rejected)` : ""}`);
|
|
919
|
+
console.log(`[credentials] Selected ${envVar} credential ${result.index + 1}/${result.total}${availInfo} [...${result.keySuffix}]${info?.keyUsage ? ` usage ${pct(info.keyUsage[result.index])}%` : ""}${info?.keyPace ? ` pace ${signedPct(info.keyPace[result.index])}%` : ""}${info ? ` strategy ${strategy}` : ""}${info?.rejectedIndices?.length ? ` (${info.rejectedIndices.length} rejected)` : ""}`);
|
|
859
920
|
selections.push({
|
|
860
921
|
...result,
|
|
861
922
|
modelBlockedIndices: info?.modelBlockedIndices,
|
|
@@ -866,10 +927,11 @@ async function resolveCredentialPools(env, opts) {
|
|
|
866
927
|
}
|
|
867
928
|
return selections;
|
|
868
929
|
}
|
|
869
|
-
var CREDENTIAL_POOL_VARS, PROVIDER_CREDENTIAL_VARS, SLASH_MODEL_PROVIDERS, MODEL_LABELS, ModelWindowExhaustedError, KeySpendCapError, CredentialAllowlistError, CLAUDE_CREDENTIALS_HINT = "Set CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY, or route Claude Code through a gateway (ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY), Microsoft Foundry (CLAUDE_CODE_USE_FOUNDRY), Amazon Bedrock (CLAUDE_CODE_USE_BEDROCK), or Google Vertex AI (CLAUDE_CODE_USE_VERTEX).", CLAUDE_CREDENTIAL_TYPE_BY_PROVIDER
|
|
930
|
+
var CREDENTIAL_POOL_VARS, PROVIDER_CREDENTIAL_VARS, SLASH_MODEL_PROVIDERS, MODEL_LABELS, ModelWindowExhaustedError, KeySpendCapError, CredentialAllowlistError, CLAUDE_CREDENTIALS_HINT = "Set CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY, or route Claude Code through a gateway (ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY), Microsoft Foundry (CLAUDE_CODE_USE_FOUNDRY), Amazon Bedrock (CLAUDE_CODE_USE_BEDROCK), or Google Vertex AI (CLAUDE_CODE_USE_VERTEX).", CLAUDE_CREDENTIAL_TYPE_BY_PROVIDER, pct = (value) => Math.round((value ?? 0) * 100), signedPct = (value) => `${pct(value) > 0 ? "+" : ""}${pct(value)}`;
|
|
870
931
|
var init_credentials2 = __esm(() => {
|
|
871
932
|
init_src2();
|
|
872
933
|
init_src();
|
|
934
|
+
init_key_usage();
|
|
873
935
|
init_model_rate_limit_windows();
|
|
874
936
|
CREDENTIAL_POOL_VARS = [
|
|
875
937
|
"CLAUDE_CODE_OAUTH_TOKEN",
|
|
@@ -952,4 +1014,4 @@ var init_credentials2 = __esm(() => {
|
|
|
952
1014
|
};
|
|
953
1015
|
});
|
|
954
1016
|
|
|
955
|
-
export {
|
|
1017
|
+
export { MODEL_SCOPED_WINDOWS, KEY_WIDE_WINDOWS, modelFamilyOf, windowForModelFamily, isModelScopedWindow, parseModelLimitMessage, parseCreditsRequiredMessage, activeModelBlock, activeModelBlocks, init_model_rate_limit_windows, CREDENTIAL_SELECTION_STRATEGIES, credentialSelectionStrategy, keyUsageFromWindows, keyPaceFromWindows, init_key_usage, getRouteProvider, createScopedFetch, routeCredentialStatus, validateRoute, isFirstPartyAnthropicUrl, CODEX_GATEWAY_API_KEY, deriveDefaultRoute, routeUnsetEnv, init_src, CREDENTIAL_POOL_VARS, normalizeProviderKeyAliases, PROVIDER_CREDENTIAL_VARS, getModelAwareCredentialVars, deriveProviderFromKeyType, ModelWindowExhaustedError, KeySpendCapError, CredentialAllowlistError, keySuffix, splitCredentialPool, selectCredential, CLAUDE_CREDENTIALS_HINT, validateClaudeCredentials, openAICompatibleKeyLabels, validateOpencodeCredentials, resolveCredentialPools, init_credentials2 };
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
runtimeCatalogSection,
|
|
3
3
|
runtimeCatalogModel,
|
|
4
4
|
init_runtime_model_catalog
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-8b4rpnwj.js";
|
|
6
6
|
import {
|
|
7
7
|
CHATGPT_SUBSCRIPTION_PROVIDER,
|
|
8
8
|
dshCatalogRef,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
reasoningLevelsFor,
|
|
13
13
|
claudeCatalogModelId,
|
|
14
14
|
init_src2
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-1kvcsd2f.js";
|
|
16
16
|
|
|
17
17
|
// src/providers/reasoning-effort.ts
|
|
18
18
|
init_src2();
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
runtimeCatalogSection,
|
|
3
3
|
runtimeCatalogModel,
|
|
4
4
|
init_runtime_model_catalog
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-8b4rpnwj.js";
|
|
6
6
|
import {
|
|
7
7
|
chatgptSubscriptionModelId,
|
|
8
8
|
buildClaudeShortnameMap,
|
|
9
9
|
init_src2
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-1kvcsd2f.js";
|
|
11
11
|
import {
|
|
12
12
|
__esm
|
|
13
13
|
} from "./cli-242037k3.js";
|
|
@@ -2,23 +2,24 @@ import {
|
|
|
2
2
|
contextStatePath,
|
|
3
3
|
contextBoundNoteMarkerPath,
|
|
4
4
|
recordContextState
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-zntvmqmm.js";
|
|
6
6
|
import {
|
|
7
7
|
runStopHookSessionSummarySubprocess
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-6msnpj1z.js";
|
|
9
9
|
import {
|
|
10
|
+
RATE_LIMIT_WINDOWS_EVENT,
|
|
10
11
|
redactRateLimitEventLine,
|
|
11
12
|
SessionErrorTracker,
|
|
12
13
|
trackErrorFromJson,
|
|
13
14
|
parseStderrForErrors
|
|
14
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-sejvnjvw.js";
|
|
15
16
|
import {
|
|
16
17
|
isHarnessOtelEnabled,
|
|
17
18
|
buildOtelTraceparentEnv
|
|
18
19
|
} from "./cli-snxhtehz.js";
|
|
19
20
|
import {
|
|
20
21
|
applyReasoningEffort
|
|
21
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-ywy8yz6t.js";
|
|
22
23
|
import {
|
|
23
24
|
fetchInstalledMcpServers
|
|
24
25
|
} from "./cli-5y2fvw4z.js";
|
|
@@ -28,7 +29,7 @@ import {
|
|
|
28
29
|
computeContextUsedUnified,
|
|
29
30
|
clampContextPercent,
|
|
30
31
|
init_context_window
|
|
31
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-z1vam71h.js";
|
|
32
33
|
import {
|
|
33
34
|
resolveSlashSkillPrompt
|
|
34
35
|
} from "./cli-5j88qqa8.js";
|
|
@@ -49,7 +50,7 @@ import {
|
|
|
49
50
|
import {
|
|
50
51
|
withFileLock,
|
|
51
52
|
init_file_lock
|
|
52
|
-
} from "./cli-
|
|
53
|
+
} from "./cli-19d6v8er.js";
|
|
53
54
|
import {
|
|
54
55
|
routeCredentialStatus,
|
|
55
56
|
deriveDefaultRoute,
|
|
@@ -58,7 +59,7 @@ import {
|
|
|
58
59
|
CLAUDE_CREDENTIALS_HINT,
|
|
59
60
|
validateClaudeCredentials,
|
|
60
61
|
init_credentials2
|
|
61
|
-
} from "./cli-
|
|
62
|
+
} from "./cli-x2adbg4j.js";
|
|
62
63
|
import {
|
|
63
64
|
getOpenRouterAttributionHeaders,
|
|
64
65
|
init_openrouter_base_url
|
|
@@ -70,7 +71,7 @@ import {
|
|
|
70
71
|
import {
|
|
71
72
|
scrubSecrets,
|
|
72
73
|
init_secret_scrubber
|
|
73
|
-
} from "./cli-
|
|
74
|
+
} from "./cli-1kvcsd2f.js";
|
|
74
75
|
import {
|
|
75
76
|
require_src4
|
|
76
77
|
} from "./cli-mna6pmfx.js";
|
|
@@ -1278,6 +1279,11 @@ ${scrubSecrets(stderrOutput)}`);
|
|
|
1278
1279
|
for (const event of normalized.events)
|
|
1279
1280
|
this.emit(event);
|
|
1280
1281
|
trackErrorFromJson(json, this.errorTracker);
|
|
1282
|
+
if (json.type === "rate_limit_event") {
|
|
1283
|
+
const windows = this.errorTracker.getRateLimitWindows();
|
|
1284
|
+
if (windows)
|
|
1285
|
+
this.emit({ type: "custom", name: RATE_LIMIT_WINDOWS_EVENT, data: windows });
|
|
1286
|
+
}
|
|
1281
1287
|
} catch {}
|
|
1282
1288
|
}
|
|
1283
1289
|
get sessionId() {
|
|
@@ -1340,7 +1346,7 @@ class ClaudeAdapter2 {
|
|
|
1340
1346
|
if (transport === "sdk" && isClaudeBridgeEffective(sourceEnv)) {
|
|
1341
1347
|
throw new Error("CLAUDE_TRANSPORT=sdk cannot run with an effective Claude Bridge configuration. Select CLI transport or disable the bridge.");
|
|
1342
1348
|
}
|
|
1343
|
-
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-
|
|
1349
|
+
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-pr0znb81.js") : undefined;
|
|
1344
1350
|
claudeSdk?.validateClaudeSdkAdditionalArgs([
|
|
1345
1351
|
...claudeBinaryArgv.slice(1),
|
|
1346
1352
|
...config.additionalArgs ?? []
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeOrgWebsite,
|
|
3
|
+
init_org_website
|
|
4
|
+
} from "./cli-zzq96q57.js";
|
|
5
|
+
import {
|
|
6
|
+
__esm
|
|
7
|
+
} from "./cli-242037k3.js";
|
|
8
|
+
|
|
9
|
+
// src/utils/org-identity.ts
|
|
10
|
+
function orgIdentityStatus(src) {
|
|
11
|
+
const name = src.SWARM_ORG_NAME?.trim() || null;
|
|
12
|
+
const website = normalizeOrgWebsite(src.SWARM_ORG_WEBSITE) || null;
|
|
13
|
+
const missing = [];
|
|
14
|
+
if (!name || PLACEHOLDER_NAMES.has(name.toLowerCase()))
|
|
15
|
+
missing.push("SWARM_ORG_NAME");
|
|
16
|
+
if (!website)
|
|
17
|
+
missing.push("SWARM_ORG_WEBSITE");
|
|
18
|
+
return { name, website, missing, ok: missing.length === 0 };
|
|
19
|
+
}
|
|
20
|
+
var ORG_IDENTITY_KEYS, PLACEHOLDER_NAMES;
|
|
21
|
+
var init_org_identity = __esm(() => {
|
|
22
|
+
init_org_website();
|
|
23
|
+
ORG_IDENTITY_KEYS = ["SWARM_ORG_NAME", "SWARM_ORG_WEBSITE"];
|
|
24
|
+
PLACEHOLDER_NAMES = new Set(["swarm", "your swarm"]);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { ORG_IDENTITY_KEYS, orgIdentityStatus, init_org_identity };
|
|
@@ -64,12 +64,12 @@ import {
|
|
|
64
64
|
claimKv2,
|
|
65
65
|
deleteKv2,
|
|
66
66
|
init_db4
|
|
67
|
-
} from "./cli-
|
|
67
|
+
} from "./cli-zzq96q57.js";
|
|
68
68
|
import {
|
|
69
69
|
getChannelExternality2,
|
|
70
70
|
getChannelBlockReason2,
|
|
71
71
|
init_external_channel
|
|
72
|
-
} from "./cli-
|
|
72
|
+
} from "./cli-5n9w2xzx.js";
|
|
73
73
|
import {
|
|
74
74
|
isSlackTaskTreeEnabled2,
|
|
75
75
|
invalidateSlackTreeOperations2,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
assertSlackTreeCurrent2,
|
|
81
81
|
canPresentSlackTree2,
|
|
82
82
|
init_tree_visibility
|
|
83
|
-
} from "./cli-
|
|
83
|
+
} from "./cli-4gaf3tx5.js";
|
|
84
84
|
import {
|
|
85
85
|
require_dist6,
|
|
86
86
|
require_is_electron,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
import {
|
|
97
97
|
workflowEventBus2,
|
|
98
98
|
init_event_bus
|
|
99
|
-
} from "./cli-
|
|
99
|
+
} from "./cli-ybte1fqc.js";
|
|
100
100
|
import {
|
|
101
101
|
require_jsonwebtoken,
|
|
102
102
|
require_dist9,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
import {
|
|
111
111
|
getSessionRoot,
|
|
112
112
|
init_session_shares
|
|
113
|
-
} from "./cli-
|
|
113
|
+
} from "./cli-kwj3131p.js";
|
|
114
114
|
import {
|
|
115
115
|
require_p_retry
|
|
116
116
|
} from "./cli-952zgdwp.js";
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
findUserById,
|
|
119
119
|
getUserIdentities,
|
|
120
120
|
init_users
|
|
121
|
-
} from "./cli-
|
|
121
|
+
} from "./cli-avax5mp9.js";
|
|
122
122
|
import {
|
|
123
123
|
getGitHubLinkConfig,
|
|
124
124
|
init_github_host
|
|
@@ -126,15 +126,15 @@ import {
|
|
|
126
126
|
import {
|
|
127
127
|
taskAttachmentDisplayUrl,
|
|
128
128
|
init_task_attachment_links
|
|
129
|
-
} from "./cli-
|
|
129
|
+
} from "./cli-19d6v8er.js";
|
|
130
130
|
import {
|
|
131
131
|
getSlackConfiguration,
|
|
132
|
-
|
|
133
|
-
} from "./cli-
|
|
132
|
+
init_config5
|
|
133
|
+
} from "./cli-t9pzz2eq.js";
|
|
134
134
|
import {
|
|
135
135
|
isTerminalTaskStatus,
|
|
136
136
|
init_types5
|
|
137
|
-
} from "./cli-
|
|
137
|
+
} from "./cli-7r9tvk8v.js";
|
|
138
138
|
import {
|
|
139
139
|
init_zod
|
|
140
140
|
} from "./cli-96234j5w.js";
|
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
import {
|
|
159
159
|
getAppUrl,
|
|
160
160
|
init_constants3
|
|
161
|
-
} from "./cli-
|
|
161
|
+
} from "./cli-grbngev5.js";
|
|
162
162
|
import {
|
|
163
163
|
isEnvFlagEnabled,
|
|
164
164
|
init_env_flag
|
|
@@ -171,7 +171,7 @@ import {
|
|
|
171
171
|
scrubSecrets,
|
|
172
172
|
scrubObject,
|
|
173
173
|
init_secret_scrubber
|
|
174
|
-
} from "./cli-
|
|
174
|
+
} from "./cli-1kvcsd2f.js";
|
|
175
175
|
import {
|
|
176
176
|
__toESM,
|
|
177
177
|
__commonJS,
|
|
@@ -11986,7 +11986,7 @@ var init_inbound_dispatch = __esm(() => {
|
|
|
11986
11986
|
init_crypto();
|
|
11987
11987
|
init_slack_inbound();
|
|
11988
11988
|
init_secret_scrubber();
|
|
11989
|
-
|
|
11989
|
+
init_config5();
|
|
11990
11990
|
init_workspace_guard();
|
|
11991
11991
|
import_bolt3 = __toESM(require_dist5(), 1);
|
|
11992
11992
|
deliveryStorage = new AsyncLocalStorage;
|
|
@@ -12411,7 +12411,7 @@ async function initOtel(serviceRole = process.env.AGENT_ROLE || "api") {
|
|
|
12411
12411
|
return;
|
|
12412
12412
|
initialized = true;
|
|
12413
12413
|
try {
|
|
12414
|
-
const impl = await import("./otel-impl-
|
|
12414
|
+
const impl = await import("./otel-impl-xsk35tvf.js");
|
|
12415
12415
|
await impl.boot(serviceRole, {
|
|
12416
12416
|
exportConsoleLogs: serviceRole === "api" && isApiLogExportEnabled()
|
|
12417
12417
|
});
|
|
@@ -17289,6 +17289,67 @@ async function childOutcomeContent(task, slackReplySent) {
|
|
|
17289
17289
|
async function isSlackContinuation(task) {
|
|
17290
17290
|
return task.source === "schedule" && task.taskType === "deferred" && !!task.slackChannelId && !!task.slackThreadTs && !!task.agentId && !!(await getAgentById2(task.agentId))?.isLead;
|
|
17291
17291
|
}
|
|
17292
|
+
async function hasSlackAskAncestor(task, threadTasks) {
|
|
17293
|
+
const byId = new Map(threadTasks.map((candidate) => [candidate.id, candidate]));
|
|
17294
|
+
const seen = new Set([task.id]);
|
|
17295
|
+
let parentId = task.parentTaskId;
|
|
17296
|
+
while (parentId && !seen.has(parentId) && seen.size <= SLACK_ANCESTOR_WALK_LIMIT) {
|
|
17297
|
+
seen.add(parentId);
|
|
17298
|
+
const parent = byId.get(parentId) ?? await getTaskById2(parentId);
|
|
17299
|
+
if (!parent)
|
|
17300
|
+
return false;
|
|
17301
|
+
if (parent.source === "slack")
|
|
17302
|
+
return true;
|
|
17303
|
+
parentId = parent.parentTaskId;
|
|
17304
|
+
}
|
|
17305
|
+
return false;
|
|
17306
|
+
}
|
|
17307
|
+
async function classifyLeadFollowUp(task, threadTasks) {
|
|
17308
|
+
if (task.source !== "system" || !SLACK_LEAD_FOLLOW_UP_TYPES.has(task.taskType ?? "") || !task.slackChannelId || !task.slackThreadTs || !task.agentId || !(await getAgentById2(task.agentId))?.isLead) {
|
|
17309
|
+
return "none";
|
|
17310
|
+
}
|
|
17311
|
+
return await hasSlackAskAncestor(task, threadTasks) ? "eligible" : "orphan";
|
|
17312
|
+
}
|
|
17313
|
+
async function settleLeadFollowUpWithoutCard(task, reason) {
|
|
17314
|
+
if (!task.slackChannelId || !task.slackThreadTs)
|
|
17315
|
+
return;
|
|
17316
|
+
const card = await getSlackOutcomeMessage2(task.id);
|
|
17317
|
+
if (card && !isPendingSlackMessage2(card))
|
|
17318
|
+
return;
|
|
17319
|
+
await reserveSlackMessage2({
|
|
17320
|
+
contextKey: task.contextKey ?? slackContextKey({ channelId: task.slackChannelId, threadTs: task.slackThreadTs }),
|
|
17321
|
+
channelId: task.slackChannelId,
|
|
17322
|
+
threadTs: task.slackThreadTs,
|
|
17323
|
+
kind: "outcome",
|
|
17324
|
+
taskId: task.id
|
|
17325
|
+
});
|
|
17326
|
+
await abandonSlackOutcomeDelivery2(task.id, reason);
|
|
17327
|
+
}
|
|
17328
|
+
async function mayPostLeadFollowUpCard(task, threadTasks, ownerAskId, delegationActivatedAt) {
|
|
17329
|
+
if (task.source !== "system" || !SLACK_LEAD_FOLLOW_UP_TYPES.has(task.taskType ?? "")) {
|
|
17330
|
+
return true;
|
|
17331
|
+
}
|
|
17332
|
+
if ((await getTaskById2(task.id))?.slackReplySent ?? task.slackReplySent) {
|
|
17333
|
+
if (await getSlackOutcomeMessage2(task.id)) {
|
|
17334
|
+
await settleLeadFollowUpWithoutCard(task, "slack_reply_sent: Lead follow-up not posted");
|
|
17335
|
+
}
|
|
17336
|
+
return false;
|
|
17337
|
+
}
|
|
17338
|
+
const askId = ownerAskId.get(task.id);
|
|
17339
|
+
const ownerAsk = askId ? threadTasks.find((candidate) => candidate.id === askId) : undefined;
|
|
17340
|
+
if (delegationActivatedAt !== null && ownerAsk && ownerAsk.createdAt >= delegationActivatedAt && isChildCardCandidate(task, delegationActivatedAt)) {
|
|
17341
|
+
return false;
|
|
17342
|
+
}
|
|
17343
|
+
const app = getSlackApp2();
|
|
17344
|
+
if (!app || !task.slackChannelId || !task.slackThreadTs)
|
|
17345
|
+
return false;
|
|
17346
|
+
const externality = await getChannelExternality2(app.client, task.slackChannelId);
|
|
17347
|
+
if (externality === "external") {
|
|
17348
|
+
await settleLeadFollowUpWithoutCard(task, "external_channel: Lead follow-up not posted");
|
|
17349
|
+
return false;
|
|
17350
|
+
}
|
|
17351
|
+
return externality === "internal";
|
|
17352
|
+
}
|
|
17292
17353
|
function isChildCardCandidate(task, delegationActivatedAt) {
|
|
17293
17354
|
return task.source !== "slack" && !(task.source === "schedule" && task.taskType === "deferred") && !!task.slackChannelId && !!task.slackThreadTs && (task.status === "completed" || task.status === "failed") && task.taskType !== "follow-up" && task.taskType !== "reroute-decision" && task.createdAt >= delegationActivatedAt;
|
|
17294
17355
|
}
|
|
@@ -17304,8 +17365,14 @@ async function slackDelegationOwnsChildCard2(task) {
|
|
|
17304
17365
|
const ownerAsk = tasks.find((ask) => ask.source === "slack" && buildAskClosure(ask, tasks).some((member) => member.id === task.id));
|
|
17305
17366
|
return !!ownerAsk && ownerAsk.createdAt >= delegationActivatedAt;
|
|
17306
17367
|
}
|
|
17307
|
-
async function taskNeedsDirectOutcome(task, activatedAt) {
|
|
17308
|
-
|
|
17368
|
+
async function taskNeedsDirectOutcome(task, activatedAt, leadFollowUp) {
|
|
17369
|
+
if (task.createdAt < activatedAt)
|
|
17370
|
+
return false;
|
|
17371
|
+
if (task.source === "slack")
|
|
17372
|
+
return isAskOutcomeStatus(task.status);
|
|
17373
|
+
if (!isOutcomeStatus(task.status))
|
|
17374
|
+
return false;
|
|
17375
|
+
return leadFollowUp === "eligible" || await isSlackContinuation(task);
|
|
17309
17376
|
}
|
|
17310
17377
|
async function conclusionResultsLines(closure) {
|
|
17311
17378
|
const lines = [];
|
|
@@ -17879,13 +17946,21 @@ async function processSlackThread(thread, {
|
|
|
17879
17946
|
for (const task of tasks) {
|
|
17880
17947
|
if (!isSlackRenderV2Enabled2())
|
|
17881
17948
|
return "stop";
|
|
17882
|
-
|
|
17949
|
+
const leadFollowUp = isOutcomeStatus(task.status) ? await classifyLeadFollowUp(task, tasks) : "none";
|
|
17950
|
+
if (leadFollowUp === "orphan" && isOutcomeStatus(task.status) && !task.slackReplySent && task.createdAt >= activatedAt && !endedBefore(task, outcomeWindow.finishedAfter)) {
|
|
17951
|
+
await settleLeadFollowUpWithoutCard(task, "no_slack_ask: Lead follow-up not posted");
|
|
17952
|
+
continue;
|
|
17953
|
+
}
|
|
17954
|
+
if (!await taskNeedsDirectOutcome(task, activatedAt, leadFollowUp))
|
|
17883
17955
|
continue;
|
|
17884
17956
|
const card = await getSlackOutcomeMessage2(task.id);
|
|
17885
17957
|
if (card && isSettledSlackMessage2(card))
|
|
17886
17958
|
continue;
|
|
17887
17959
|
if (await isAnsweredByDeferralCard(task, tasks))
|
|
17888
17960
|
continue;
|
|
17961
|
+
if ((!card || isPendingSlackMessage2(card)) && !await mayPostLeadFollowUpCard(task, tasks, ownerAskId, delegationActivatedAt)) {
|
|
17962
|
+
continue;
|
|
17963
|
+
}
|
|
17889
17964
|
const deferByClosure = task.source === "slack" && delegationEnabled && delegationActivatedAt !== null && task.createdAt >= delegationActivatedAt;
|
|
17890
17965
|
if (!deferByClosure) {
|
|
17891
17966
|
if (!card && await isSlackContinuation(task) && await isWakeAnsweredByReply(task)) {
|
|
@@ -18098,7 +18173,7 @@ async function renderDirtyThreads() {
|
|
|
18098
18173
|
if (touched.wakeTouched)
|
|
18099
18174
|
await refreshResolvedDeferralCards();
|
|
18100
18175
|
}
|
|
18101
|
-
var TREE_UPDATE_DEBOUNCE_MS = 500, TREE_UPDATE_MIN_INTERVAL_MS = 3000, MAX_SLACK_RETRIES = 3, MAX_RETRY_DELAY_MS = 30000, MAX_TITLE_LENGTH = 72, MAX_OUTCOME_MARKDOWN_LENGTH = 12000, MAX_TREE_NODE_LINE_LENGTH = 1000, MAX_TREE_PREFIX_LENGTH = 120, MAX_TREE_PROGRESS_LENGTH = 60, CHILD_CARDS_PER_TICK = 3, CHILD_CARDS_PER_ASK = 10, CONCLUSION_DIGEST_LENGTH = 300, TREE_INDENT, FIGURE_SPACE = " ", SLACK_RENDER_METADATA_EVENT = "agent_swarm_render_v2", treeCreationPromises, pendingTreeUpdates, treeUpdateTails, lastTreeText, lastTreeUpdateAt, cachedTeamId, OUTCOME_DELIVERY_MAX_ATTEMPTS = 5, OUTCOME_DELIVERY_BASE_DELAY_MS = 30000, OUTCOME_DELIVERY_MAX_DELAY_MS, outcomeDeliveryNextAttemptAt, outcomeReservedWithoutAttempt, ensureSlackThreadTree, LINE_START_BLOCK, UI_SPEC_BLOCK_REJECTION_CODES, TRANSIENT_SLACK_ERROR_CODES, DEFERRAL_REFRESH_MAX_ATTEMPTS = 5, deferralRefreshAttempts, SLACK_RENDER_TASK_EVENTS, DIRTY_FLUSH_DEBOUNCE_MS = 500, DIRTY_REVISIT_MS = 3000, dirtyTaskIds, dirtyThreads, renderInFlight = null, renderEventsSubscribed = false, dirtyFlushTimer = null, dirtyFlushAt = 0;
|
|
18176
|
+
var TREE_UPDATE_DEBOUNCE_MS = 500, TREE_UPDATE_MIN_INTERVAL_MS = 3000, MAX_SLACK_RETRIES = 3, MAX_RETRY_DELAY_MS = 30000, MAX_TITLE_LENGTH = 72, MAX_OUTCOME_MARKDOWN_LENGTH = 12000, MAX_TREE_NODE_LINE_LENGTH = 1000, MAX_TREE_PREFIX_LENGTH = 120, MAX_TREE_PROGRESS_LENGTH = 60, CHILD_CARDS_PER_TICK = 3, CHILD_CARDS_PER_ASK = 10, CONCLUSION_DIGEST_LENGTH = 300, TREE_INDENT, FIGURE_SPACE = " ", SLACK_RENDER_METADATA_EVENT = "agent_swarm_render_v2", treeCreationPromises, pendingTreeUpdates, treeUpdateTails, lastTreeText, lastTreeUpdateAt, cachedTeamId, OUTCOME_DELIVERY_MAX_ATTEMPTS = 5, OUTCOME_DELIVERY_BASE_DELAY_MS = 30000, OUTCOME_DELIVERY_MAX_DELAY_MS, outcomeDeliveryNextAttemptAt, outcomeReservedWithoutAttempt, ensureSlackThreadTree, LINE_START_BLOCK, SLACK_LEAD_FOLLOW_UP_TYPES, SLACK_ANCESTOR_WALK_LIMIT = 50, UI_SPEC_BLOCK_REJECTION_CODES, TRANSIENT_SLACK_ERROR_CODES, DEFERRAL_REFRESH_MAX_ATTEMPTS = 5, deferralRefreshAttempts, SLACK_RENDER_TASK_EVENTS, DIRTY_FLUSH_DEBOUNCE_MS = 500, DIRTY_REVISIT_MS = 3000, dirtyTaskIds, dirtyThreads, renderInFlight = null, renderEventsSubscribed = false, dirtyFlushTimer = null, dirtyFlushAt = 0;
|
|
18102
18177
|
var init_render_v2 = __esm(() => {
|
|
18103
18178
|
init_db4();
|
|
18104
18179
|
init_slack_trees();
|
|
@@ -18117,6 +18192,7 @@ var init_render_v2 = __esm(() => {
|
|
|
18117
18192
|
init_app4();
|
|
18118
18193
|
init_blocks();
|
|
18119
18194
|
init_closure();
|
|
18195
|
+
init_external_channel();
|
|
18120
18196
|
init_reaction_shortcode();
|
|
18121
18197
|
init_responses();
|
|
18122
18198
|
init_session_status();
|
|
@@ -18139,6 +18215,7 @@ var init_render_v2 = __esm(() => {
|
|
|
18139
18215
|
outcomeReservedWithoutAttempt = new Set;
|
|
18140
18216
|
ensureSlackThreadTree = ensureSlackThreadPresentation2;
|
|
18141
18217
|
LINE_START_BLOCK = /^(?:`{3}|~{3}|[-*+]\s|\d+[.)]\s|>|#{1,6}\s|\||(?:-{3,}|\*{3,}|_{3,})[ \t]*(?:\r?\n|$)|(?: {4}|\t))/;
|
|
18218
|
+
SLACK_LEAD_FOLLOW_UP_TYPES = new Set(["follow-up", "resume"]);
|
|
18142
18219
|
UI_SPEC_BLOCK_REJECTION_CODES = new Set([
|
|
18143
18220
|
"invalid_blocks",
|
|
18144
18221
|
"invalid_blocks_format",
|
|
@@ -19111,17 +19188,17 @@ async function initSlackApp2() {
|
|
|
19111
19188
|
created.use(slackInboundOutcomeMiddleware(config.mode === "http" ? "http" : "socket"));
|
|
19112
19189
|
if (config.mode === "http")
|
|
19113
19190
|
created.use(ignoreSelfAsIgnored);
|
|
19114
|
-
const { registerMessageHandler } = await import("./handlers-
|
|
19115
|
-
const { registerCommandHandler } = await import("./commands-
|
|
19116
|
-
const { registerActionHandlers } = await import("./actions-
|
|
19117
|
-
const { registerWorkObjectHandlers } = await import("./work-objects-
|
|
19191
|
+
const { registerMessageHandler } = await import("./handlers-7ghs84x2.js");
|
|
19192
|
+
const { registerCommandHandler } = await import("./commands-amhpafrr.js");
|
|
19193
|
+
const { registerActionHandlers } = await import("./actions-8zrcbjrx.js");
|
|
19194
|
+
const { registerWorkObjectHandlers } = await import("./work-objects-3k4ykt9j.js");
|
|
19118
19195
|
registerMessageHandler(created);
|
|
19119
19196
|
registerCommandHandler(created);
|
|
19120
19197
|
registerActionHandlers(created);
|
|
19121
19198
|
registerWorkObjectHandlers(created);
|
|
19122
|
-
const { createAssistant } = await import("./assistant-
|
|
19199
|
+
const { createAssistant } = await import("./assistant-q7s7rm1q.js");
|
|
19123
19200
|
created.assistant(createAssistant());
|
|
19124
|
-
const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-
|
|
19201
|
+
const { isBlockExternalEnabled, scanExternalChannelsOnBoot } = await import("./external-channel-881zq1x4.js");
|
|
19125
19202
|
if (isBlockExternalEnabled()) {
|
|
19126
19203
|
scanExternalChannelsOnBoot(created.client).catch((error) => {
|
|
19127
19204
|
console.error("[Slack] External channel boot scan failed:", error);
|
|
@@ -19149,7 +19226,7 @@ async function startSlackApp2() {
|
|
|
19149
19226
|
startRetryAttempt = 0;
|
|
19150
19227
|
if (!httpReceiver)
|
|
19151
19228
|
startSocketWatchdog();
|
|
19152
|
-
const { isSlackRenderV2Enabled } = await import("./render-v2-
|
|
19229
|
+
const { isSlackRenderV2Enabled } = await import("./render-v2-7gskkmd4.js");
|
|
19153
19230
|
if (isSlackRenderV2Enabled())
|
|
19154
19231
|
await ensureSlackRenderV2Activation2();
|
|
19155
19232
|
await recoverSlackInboundAfterRestart();
|
|
@@ -19165,7 +19242,7 @@ async function startSlackApp2() {
|
|
|
19165
19242
|
} else {
|
|
19166
19243
|
console.log("[Slack] Bot connected via Socket Mode");
|
|
19167
19244
|
}
|
|
19168
|
-
const { restoreBufferedSlackMessages } = await import("./thread-buffer-
|
|
19245
|
+
const { restoreBufferedSlackMessages } = await import("./thread-buffer-epx3san4.js");
|
|
19169
19246
|
await restoreBufferedSlackMessages().catch((error) => {
|
|
19170
19247
|
console.error("[Slack] Failed to restore buffered thread messages:", error);
|
|
19171
19248
|
});
|
|
@@ -19279,7 +19356,7 @@ var init_app4 = __esm(() => {
|
|
|
19279
19356
|
init_db4();
|
|
19280
19357
|
init_node_env();
|
|
19281
19358
|
init_secret_scrubber();
|
|
19282
|
-
|
|
19359
|
+
init_config5();
|
|
19283
19360
|
init_connection_state();
|
|
19284
19361
|
init_egress_scrub();
|
|
19285
19362
|
init_external_channel_egress();
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
getKnownContextWindowSize,
|
|
3
3
|
clampContextPercent,
|
|
4
4
|
init_context_window
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-z1vam71h.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveTemplateFromCode,
|
|
8
8
|
resolveTemplateAsync,
|
|
9
9
|
init_resolver,
|
|
10
10
|
init_session_templates
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-nrt048ys.js";
|
|
12
12
|
|
|
13
13
|
// src/hooks/context-bound-note.ts
|
|
14
14
|
import { renameSync, writeFileSync } from "node:fs";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getSwarmConfigs2,
|
|
4
4
|
getResolvedConfig2,
|
|
5
5
|
init_db4
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-zzq96q57.js";
|
|
7
7
|
import {
|
|
8
8
|
AgentFsProvider,
|
|
9
9
|
init_agent_fs_provider
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
registerVolatileSecret,
|
|
13
13
|
init_secret_scrubber
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-1kvcsd2f.js";
|
|
15
15
|
import {
|
|
16
16
|
__esm
|
|
17
17
|
} from "./cli-242037k3.js";
|
|
@@ -4,5 +4,4 @@ import * as crypto2 from "node:crypto";
|
|
|
4
4
|
import * as fs2 from "node:fs";
|
|
5
5
|
import * as path2 from "node:path";
|
|
6
6
|
import * as stream2 from "node:stream";
|
|
7
|
-
|
|
8
|
-
export { child_process2, crypto2, fs2, path2, stream2, util2 };
|
|
7
|
+
export { child_process2, crypto2, fs2, path2, stream2 };
|