@desplega.ai/agent-swarm 2.7.8 → 2.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-adapter-dn4gdsgr.js +16 -0
- package/dist/{actions-4m1ct4nh.js → actions-g563mbn2.js} +19 -19
- package/dist/{amp-adapter-txqh7eqj.js → amp-adapter-q61w05eb.js} +3 -3
- package/dist/{anthropic-messages-xey2skwx.js → anthropic-messages-jkva0zps.js} +68 -78
- package/dist/{app-e00m45gn.js → app-a66ssc4k.js} +3 -3
- package/dist/{assistant-gd08kr9e.js → assistant-p477rjwj.js} +21 -21
- package/dist/{azure-openai-responses-26t7j9ra.js → azure-openai-responses-wgtqkbr3.js} +5 -10
- package/dist/{boot-args-schema-tjrkpbvm.js → boot-args-schema-h4qj462e.js} +1 -1
- package/dist/{boot-reembed-21hbck22.js → boot-reembed-n1ehfbsw.js} +1 -1
- package/dist/{boot-reembed-mdxd3wgp.js → boot-reembed-qw4mc0pt.js} +1 -1
- package/dist/{boot-scrub-sweep-qy0zr9t2.js → boot-scrub-sweep-9w9jp4sm.js} +4 -4
- package/dist/{boot-seeds-n46eaxdv.js → boot-seeds-qdaf3sdy.js} +5 -4
- package/dist/{boxd-nv507va8.js → boxd-qbkxy6ap.js} +1 -1
- package/dist/{claude-adapter-j37w2eds.js → claude-adapter-348p5hx9.js} +8 -8
- package/dist/{claude-managed-adapter-8jvcma9a.js → claude-managed-adapter-h74d06yz.js} +4 -4
- package/dist/{claude-managed-setup-rzkjmgc1.js → claude-managed-setup-7787fxtp.js} +4 -4
- package/dist/{claude-sdk-session-4k7w73t0.js → claude-sdk-session-hbszbt8a.js} +7901 -7718
- package/dist/{cli-sq4n7af4.js → cli-09kmfkmq.js} +4 -6
- package/dist/{cli-p3vsj0d3.js → cli-0whpms1z.js} +15 -10
- package/dist/{cli-4t50yq3j.js → cli-12xyjhws.js} +29 -12
- package/dist/{cli-snpj5zbj.js → cli-1z4qggfe.js} +9 -36
- package/dist/{cli-bb0mmdk8.js → cli-21159vea.js} +35 -12
- package/dist/{cli-s0qnd4wv.js → cli-28fq781p.js} +1 -1
- package/dist/{cli-rjknb2ae.js → cli-2a8py3sx.js} +6 -6
- package/dist/{cli-tpksw2nr.js → cli-2ccpqyyf.js} +397 -105
- package/dist/{cli-1p89xny0.js → cli-2r0jcc3k.js} +1 -1
- package/dist/{cli-rvtm68yy.js → cli-2xv18ywz.js} +2 -2
- package/dist/{cli-5xaqj21p.js → cli-3kd08rej.js} +1 -1
- package/dist/{cli-bbw9wj9m.js → cli-3tqcamp6.js} +12 -12
- package/dist/{cli-ae7mrdf9.js → cli-3vjhs18n.js} +4 -6
- package/dist/{cli-ssnjfg5p.js → cli-3xcwp3z8.js} +8 -10
- package/dist/{cli-az48n0nr.js → cli-4caa1x7d.js} +67 -64
- package/dist/{cli-269q28a1.js → cli-4t0fmf3z.js} +27 -6
- package/dist/{cli-1cxrbkk6.js → cli-530hkwdy.js} +7 -9
- package/dist/{cli-pz4rk021.js → cli-54vrpgm0.js} +1 -1
- package/dist/{cli-eyg1pa00.js → cli-587857ys.js} +7 -7
- package/dist/{cli-r9jqcehk.js → cli-5mpy301f.js} +38 -2
- package/dist/{cli-xq9r2wtt.js → cli-605nn699.js} +47 -34
- package/dist/{cli-msg9m2ny.js → cli-650zv9q9.js} +8 -10
- package/dist/cli-6pzk82fd.js +778 -0
- package/dist/{cli-84rj785g.js → cli-715t1gx6.js} +9 -9
- package/dist/{cli-btfsp3mv.js → cli-9aezs55w.js} +9 -11
- package/dist/{cli-dq8x79v8.js → cli-9r5gtwjr.js} +2 -2
- package/dist/{cli-jdv6ypxs.js → cli-a0657jmf.js} +2 -2
- package/dist/{cli-bshb7jas.js → cli-agyaeef4.js} +3 -3
- package/dist/cli-b932gexn.js +5266 -0
- package/dist/{cli-gvx71kqv.js → cli-bc779n4v.js} +3 -3
- package/dist/{cli-z1srzaf6.js → cli-btc9cb4c.js} +70 -5
- package/dist/{cli-s4ss5g59.js → cli-btf6fw39.js} +5 -5
- package/dist/{cli-fzachfnf.js → cli-cseh6f8w.js} +5 -5
- package/dist/{cli-5j0m12ns.js → cli-cvs2r2vq.js} +13 -11
- package/dist/{cli-njwac61j.js → cli-cyn9v8zr.js} +12 -2
- package/dist/{cli-a22h291q.js → cli-d6521kb5.js} +1 -1
- package/dist/{cli-1b7btd38.js → cli-d84byzn8.js} +869 -5
- package/dist/{cli-wx3rhnm0.js → cli-eddnyg3t.js} +1 -1
- package/dist/{cli-7axf41jq.js → cli-ejkvvqbe.js} +40 -42
- package/dist/{cli-mthwvjre.js → cli-f2zenhja.js} +1 -1
- package/dist/{cli-8sdejs1f.js → cli-fayav105.js} +538 -205
- package/dist/{cli-ferkkrg9.js → cli-fjggej24.js} +2 -2
- package/dist/{cli-g7s47cc5.js → cli-fsgttth8.js} +123 -102
- package/dist/{cli-9m8hdawy.js → cli-gce09r66.js} +4 -4
- package/dist/{cli-mkk9rnzz.js → cli-gxy8y1dt.js} +51 -4
- package/dist/{cli-85gzce7b.js → cli-hae9j8sv.js} +287 -75
- package/dist/{cli-agfm16v9.js → cli-hg42n3hx.js} +12 -12
- package/dist/{cli-8rpcng8j.js → cli-hwprv9e4.js} +8 -10
- package/dist/{cli-yndmfxb3.js → cli-hxpyc9sn.js} +3 -3
- package/dist/{cli-ppjxh6ah.js → cli-jfx48xrj.js} +10 -12
- package/dist/{cli-5ja3b75e.js → cli-jrp1dt73.js} +1 -1
- package/dist/{cli-98rw5dt5.js → cli-jrzkw01m.js} +2 -2
- package/dist/{cli-ga786dzg.js → cli-k70e3x9e.js} +18 -17
- package/dist/{cli-583frbyr.js → cli-kchjb7qy.js} +1 -1
- package/dist/{cli-fmjd0t1y.js → cli-m0cy2vyf.js} +2 -2
- package/dist/{cli-c0kqky8y.js → cli-m5akxq8q.js} +1 -1
- package/dist/{cli-ycscb2ar.js → cli-m88rpzkh.js} +2 -2
- package/dist/{cli-m0hmeqma.js → cli-mnrkgg60.js} +4 -4
- package/dist/{cli-yqefz277.js → cli-ms5m5r1y.js} +1 -1
- package/dist/{cli-fy6x31ps.js → cli-n5yexkdg.js} +1 -0
- package/dist/{cli-w4xnbm46.js → cli-neyag5p6.js} +53 -39
- package/dist/cli-p0m0p34z.js +9321 -0
- package/dist/{cli-gazw7kpa.js → cli-p17970qv.js} +8 -10
- package/dist/{cli-6vcp76qk.js → cli-p74md7t8.js} +42 -23
- package/dist/{cli-rjcbm574.js → cli-pr0eze3x.js} +2 -2
- package/dist/{cli-3e4snnzf.js → cli-qkdmz8c8.js} +1 -1
- package/dist/{cli-0ykgn1h5.js → cli-qmd3mse0.js} +2 -2
- package/dist/{cli-t60ajbbp.js → cli-qzt90yze.js} +20 -20
- package/dist/cli-rkc97c6a.js +39 -0
- package/dist/{cli-qd57hhhh.js → cli-rvhdmjvt.js} +6 -10
- package/dist/{cli-kyr67fgx.js → cli-rwymrnaz.js} +18608 -9089
- package/dist/{cli-8h0ayw8c.js → cli-serm8zrx.js} +6 -6
- package/dist/{cli-66ww7fer.js → cli-sgs5k6yd.js} +1 -1
- package/dist/{cli-nbsf8yvn.js → cli-sya22y84.js} +9 -9
- package/dist/{cli-318r69gq.js → cli-t73cas91.js} +440 -9
- package/dist/{cli-zkky4t5g.js → cli-tqq0hspb.js} +2 -2
- package/dist/{cli-z75yxkjh.js → cli-v3cf1ts9.js} +3 -3
- package/dist/{cli-xr8908my.js → cli-varqt4d1.js} +26 -14
- package/dist/{cli-q4ebh7h7.js → cli-vxh6acp7.js} +6 -6
- package/dist/{cli-g83s9ewh.js → cli-xfjrc279.js} +1 -1
- package/dist/{cli-32m9eda8.js → cli-xk879m3k.js} +111 -109
- package/dist/{cli-7cx2m6t2.js → cli-y5rbvxhc.js} +2 -2
- package/dist/{cli-fyhr5h4s.js → cli-y8nbefpb.js} +13 -13
- package/dist/{cli-81p9jd57.js → cli-yab6sh8p.js} +9 -3
- package/dist/{cli-srye3vdt.js → cli-ybjdc978.js} +1 -1
- package/dist/{cli-k5671be5.js → cli-zcfpsfzf.js} +5 -5
- package/dist/{cli-vf078p3e.js → cli-zfqg6fzn.js} +1 -1
- package/dist/{cli-wemma3jd.js → cli-zgv8gxgs.js} +7 -7
- package/dist/cli.js +31 -51
- package/dist/{cloudflare-workers-ai-system-one-ef2a980q.js → cloudflare-workers-ai-system-one-9y1zx3pt.js} +2 -2
- package/dist/{codex-adapter-88z6psm4.js → codex-adapter-ysq6bzha.js} +7 -7
- package/dist/{codex-login-74wa4hmq.js → codex-login-bcda78ge.js} +2 -2
- package/dist/{codex-session-runner-zwbcwzvx.js → codex-session-runner-qakzfx93.js} +8 -8
- package/dist/{commands-7amxs716.js → commands-rs7hkv9r.js} +3 -3
- package/dist/{controller-5rkkc37m.js → controller-r5x9bg6e.js} +4 -4
- package/dist/{controllers-connect-m7d4vxxb.js → controllers-connect-498hrxvk.js} +24 -24
- package/dist/{cursor-adapter-x1q18693.js → cursor-adapter-d46qszer.js} +2 -2
- package/dist/{db-athc68zt.js → db-pm96nhdb.js} +4 -2
- package/dist/{db-h2fsfve3.js → db-s13dqhr6.js} +3 -3
- package/dist/{devin-adapter-r9phbnc9.js → devin-adapter-z46ep5ph.js} +1 -1
- package/dist/{dispatcher-b1yz2bnn.js → dispatcher-j3h81t7m.js} +18 -18
- package/dist/{docker-c1a3gqmf.js → docker-866qpzt9.js} +2 -2
- package/dist/{dsh-adapter-e33bkxq9.js → dsh-adapter-rw0d5rc4.js} +2 -2
- package/dist/{e2b-fr12yccx.js → e2b-jkwfhbcv.js} +2 -2
- package/dist/{e2b-x6ywzak3.js → e2b-s16txnpx.js} +2 -3
- package/dist/{easter-egg-3d-pv5qnzc8.js → easter-egg-3d-qtgfxgze.js} +1 -1
- package/dist/{embedding-space-b4txbwrk.js → embedding-space-xh8p4q4x.js} +6 -6
- package/dist/{embeddings-m6zn6tad.js → embeddings-wp745m91.js} +1 -1
- package/dist/{event-bus-g0ka3pbw.js → event-bus-e66gh7cc.js} +1 -1
- package/dist/{execute-68nwny8m.js → execute-2fzb9z74.js} +1 -1
- package/dist/{external-channel-gkckmhzh.js → external-channel-ys21h3sy.js} +2 -2
- package/dist/fx-adapter-vz0b9z3g.js +19 -0
- package/dist/{google-generative-ai-v94hr7h0.js → google-generative-ai-ytpgncx9.js} +7 -12
- package/dist/{google-vertex-g7vr6cf8.js → google-vertex-tqhze5j7.js} +7 -12
- package/dist/grok-adapter-spea7zkj.js +19 -0
- package/dist/handlers-crckt5dq.js +32 -0
- package/dist/{heartbeat-6c2y3267.js → heartbeat-8phn1kdq.js} +21 -21
- package/dist/{hook-q5fv0jy2.js → hook-amcj4s10.js} +16 -11
- package/dist/{hook-w0q2wcrv.js → hook-bc6n49qn.js} +5 -5
- package/dist/{http-bxat8dg3.js → http-7374brv5.js} +642 -260
- package/dist/index-4x08sjtk.js +30 -0
- package/dist/{index-6cxzwfen.js → index-5a9jtqde.js} +26 -26
- package/dist/index-8ybffts4.js +37 -0
- package/dist/{index-bxrexmfy.js → index-c9y31ytf.js} +13 -13
- package/dist/{index-h39zbx67.js → index-hsad2t3r.js} +31 -31
- package/dist/index-nfy4kkg5.js +33 -0
- package/dist/{index-cqhqpgrv.js → index-p4hjwbvw.js} +1 -1
- package/dist/{index-k7fj52d3.js → index-q5cmtbz5.js} +6 -6
- package/dist/{index-fm0czesf.js → index-w4m9z29z.js} +1 -1
- package/dist/{keepalive-qnt21cv0.js → keepalive-wy29kbrg.js} +4 -4
- package/dist/lead-zdqxsvjn.js +71 -0
- package/dist/{llama-cpp-classify-s5c47rwh.js → llama-cpp-classify-nfgswa1m.js} +2 -2
- package/dist/{maintenance-btdr68y4.js → maintenance-h2ds9w6c.js} +1 -1
- package/dist/{mistral-conversations-3gjpdb4b.js → mistral-conversations-a45tx39a.js} +29 -51
- package/dist/{oauth-refresh-sweep-vczabeh4.js → oauth-refresh-sweep-q7mtbyp3.js} +3 -3
- package/dist/{onboard-k33ezyq8.js → onboard-vw8r2fdw.js} +68 -16
- package/dist/{openai-codex-responses-8pbxq9h5.js → openai-codex-responses-k9gapdze.js} +7 -11
- package/dist/{openai-completions-rm00s912.js → openai-completions-xd579js7.js} +50 -58
- package/dist/{openai-decisions-8v957r2r.js → openai-decisions-q3hh60wr.js} +2 -2
- package/dist/{openai-responses-agxpf96k.js → openai-responses-4d5dx3c7.js} +5 -10
- package/dist/{opencode-adapter-3dst2ka7.js → opencode-adapter-mtb0953j.js} +6 -6
- package/dist/{openrouter-images-3ecegv0d.js → openrouter-images-xr9gme9x.js} +4 -3
- package/dist/{otel-impl-13am7a65.js → otel-impl-j42czw3r.js} +2 -2
- package/dist/{pi-messages-pchtw4he.js → pi-messages-hjbv8v10.js} +28 -12
- package/dist/{pi-mono-adapter-c53de1gd.js → pi-mono-adapter-zk8pg9jr.js} +23 -26
- package/dist/{pricing-refresh-9fcbnq3f.js → pricing-refresh-x7nhv23d.js} +3 -3
- package/dist/{rbac-roles-gw0p9h3j.js → rbac-roles-9044425x.js} +16 -2
- package/dist/{rbac-roles-66j5h4y5.js → rbac-roles-bzvee6cf.js} +12 -3
- package/dist/{render-v2-fg8bmdn4.js → render-v2-t7bn4skz.js} +3 -3
- package/dist/{resume-1c8kr3nh.js → resume-x94gemep.js} +7 -7
- package/dist/{runtime-tzf9j7tc.js → runtime-breq6fmv.js} +1 -1
- package/dist/{session-access-d0atq10j.js → session-access-q7dmqjvt.js} +4 -4
- package/dist/{session-source-backfill-0vscqmsa.js → session-source-backfill-440ysamr.js} +3 -3
- package/dist/{setup-tvfa7rwe.js → setup-07n4727s.js} +1 -1
- package/dist/{typesafe-system-one-0bmqcxfg.js → typesafe-system-one-f2en2knd.js} +2 -2
- package/dist/virtual-modules-z5h6mcyf.js +362 -0
- package/dist/{work-objects-ks71xqeb.js → work-objects-pnq5y534.js} +21 -21
- package/dist/{worker-follow-up-bfx0h9hg.js → worker-follow-up-7z1gfkr8.js} +18 -18
- package/dist/worker-y62rvvq3.js +71 -0
- package/dist/{x-vmmye1kb.js → x-2fyrt5pp.js} +2 -2
- package/openapi.json +1169 -257
- package/package.json +8 -10
- package/src/apps/catalog.generated.json +299 -82
- package/src/apps/page-validator.ts +115 -2
- package/src/be/connector-codes.ts +21 -6
- package/src/be/db/tasks/read.ts +22 -0
- package/src/be/db.ts +4 -2
- package/src/be/improvements.ts +416 -0
- package/src/be/migrations/274_improvements.sql +27 -0
- package/src/be/migrations/275_task_dispatched_by.sql +8 -0
- package/src/be/rbac-roles.ts +123 -1
- package/src/be/swarm-config-guard.ts +1 -0
- package/src/be/users.ts +58 -1
- package/src/cli.tsx +5 -25
- package/src/commands/codex-login.ts +1 -1
- package/src/commands/e2b.ts +0 -1
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/onboard/compose-generator.ts +0 -1
- package/src/commands/onboard/dashboard-url.ts +31 -0
- package/src/commands/onboard/steps/generate.tsx +17 -1
- package/src/commands/onboard/steps/post-dashboard.tsx +9 -3
- package/src/commands/onboard.tsx +19 -6
- package/src/commands/runner.ts +117 -96
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/hooks/hook.ts +13 -5
- package/src/http/all-routes.ts +1 -0
- package/src/http/approval-requests.ts +2 -44
- package/src/http/auth.ts +5 -4
- package/src/http/codex-oauth-accounts.ts +31 -23
- package/src/http/codex-oauth-device.ts +1 -1
- package/src/http/codex-oauth-keep-warm.ts +1 -1
- package/src/http/improvements.ts +317 -0
- package/src/http/index.ts +2 -0
- package/src/http/operator-actor.ts +2 -1
- package/src/http/person-responder.ts +66 -0
- package/src/http/sessions.ts +49 -7
- package/src/http/tasks.ts +1 -1
- package/src/http/user-roles.ts +11 -2
- package/src/http/users.ts +194 -104
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +8 -1
- package/src/providers/codex-models.ts +4 -3
- package/src/providers/codex-oauth/auth-json.ts +14 -18
- package/src/providers/codex-oauth/storage.ts +2 -2
- package/src/rbac/legacy-policy.ts +2 -0
- package/src/rbac/permissions.ts +10 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +2 -0
- package/src/server.ts +2 -0
- package/src/slack/ack.ts +20 -14
- package/src/slack/render-v2.ts +42 -17
- package/src/tests/api-drain-worker-e2e.test.ts +69 -2
- package/src/tests/apps-catalog-drift.test.ts +35 -0
- package/src/tests/apps-catalog-table.test.ts +203 -0
- package/src/tests/apps-element-assembly.test.ts +28 -0
- package/src/tests/apps-smart-links.test.ts +151 -0
- package/src/tests/apps-table-filters-migration.test.ts +96 -0
- package/src/tests/apps-table-selection-migration.test.ts +95 -0
- package/src/tests/chatgpt-subscription-session-bench.test.ts +2 -2
- package/src/tests/claude-worker-parity.test.ts +2 -2
- package/src/tests/codex-adapter.test.ts +30 -0
- package/src/tests/codex-login.test.ts +2 -2
- package/src/tests/codex-oauth-accounts.test.ts +48 -12
- package/src/tests/codex-oauth-credential-info.test.ts +77 -1
- package/src/tests/codex-oauth-device.test.ts +1 -1
- package/src/tests/codex-oauth-keep-warm.test.ts +2 -2
- package/src/tests/codex-oauth.test.ts +25 -4
- package/src/tests/codex-pool.test.ts +2 -2
- package/src/tests/db-task-read-contract.test.ts +2 -0
- package/src/tests/db-task-write-contract.test.ts +1 -0
- package/src/tests/deploy-one-box.test.ts +39 -1
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/fixtures/onboard/content.compose.yml.txt +0 -4
- package/src/tests/fixtures/onboard/dev.compose.yml.txt +0 -3
- package/src/tests/fixtures/onboard/full-all.compose.yml.txt +0 -11
- package/src/tests/fixtures/onboard/full.compose.yml.txt +0 -11
- package/src/tests/fixtures/onboard/research.compose.yml.txt +0 -3
- package/src/tests/fixtures/onboard/solo.compose.yml.txt +0 -1
- package/src/tests/fixtures/prs-app-definition.json.txt +784 -0
- package/src/tests/fixtures/prs-filters-migration.patch.json.txt +318 -0
- package/src/tests/fixtures/prs-selection-migration.patch.json.txt +373 -0
- package/src/tests/fixtures/runner-identity-refresh.ts +3 -0
- package/src/tests/fixtures/runner-legacy-resume-prompt.ts +3 -0
- package/src/tests/fixtures/runner-task-start-reads.ts +140 -0
- package/src/tests/hook-ping-me-order.test.ts +85 -0
- package/src/tests/improvements-payload.test.ts +200 -0
- package/src/tests/improvements-route.test.ts +419 -0
- package/src/tests/install-sh-setup-url.test.ts +190 -0
- package/src/tests/onboard-dashboard-output.test.ts +109 -0
- package/src/tests/onboard-dashboard-url.test.ts +83 -0
- package/src/tests/operator-granted-credentials.test.ts +561 -0
- package/src/tests/operator-granted-role-wire.test.ts +222 -0
- package/src/tests/rbac-engine.test.ts +2 -0
- package/src/tests/runner-context-usage.test.ts +0 -1
- package/src/tests/runner-legacy-options.test.ts +55 -0
- package/src/tests/runner-slot-reconcile.test.ts +38 -0
- package/src/tests/runner-task-start-reads.test.ts +58 -0
- package/src/tests/send-task-dispatched-by.test.ts +129 -0
- package/src/tests/session-dispatched-tasks.test.ts +115 -0
- package/src/tests/session-sharing.test.ts +198 -9
- package/src/tests/slack-file-tools-attachments.test.ts +95 -3
- package/src/tests/slack-reaction-config.test.ts +39 -0
- package/src/tests/slack-render-v2.test.ts +47 -0
- package/src/tests/submit-improvement-tool.test.ts +82 -0
- package/src/tests/tool-annotations.test.ts +1 -1
- package/src/tools/manage-user.ts +88 -58
- package/src/tools/send-task.ts +3 -0
- package/src/tools/slack-read.ts +61 -33
- package/src/tools/submit-improvement.ts +68 -0
- package/src/tools/tool-config.ts +3 -0
- package/src/types.ts +5 -0
- package/src/utils/request-auth-context.ts +6 -1
- package/templates/skills/apps/SKILL.md +22 -11
- package/templates/skills/apps/content.md +22 -11
- package/templates/skills/swarm-scripts/SKILL.md +1 -1
- package/templates/skills/swarm-scripts/content.md +1 -1
- package/templates/skills/work-on-task/SKILL.md +1 -1
- package/templates/skills/work-on-task/content.md +1 -1
- package/dist/acp-adapter-vg5hqkvj.js +0 -16
- package/dist/cli-5c4hjzne.js +0 -873
- package/dist/cli-ae0dnfee.js +0 -20222
- package/dist/cli-nn3ysbqk.js +0 -428
- package/dist/cli-pc5znp64.js +0 -364
- package/dist/fx-adapter-m5jbgd5q.js +0 -19
- package/dist/grok-adapter-csvv7sac.js +0 -19
- package/dist/handlers-8x5gfbzx.js +0 -32
- package/dist/index-hpfte8jd.js +0 -33
- package/dist/index-ncf7yb5s.js +0 -30
- package/dist/index-vte6dyeh.js +0 -37
- package/dist/lead-4bvftzm6.js +0 -71
- package/dist/virtual-modules-efxcp740.js +0 -59
- package/dist/worker-e7v2bvm9.js +0 -71
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
checkDeepSeekApiKey,
|
|
12
12
|
checkOpenAICompatibleProvider,
|
|
13
13
|
writeSkillsToFilesystem
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-p17970qv.js";
|
|
15
15
|
import {
|
|
16
16
|
renderSteeringDelivery
|
|
17
17
|
} from "./cli-eqtfgfr6.js";
|
|
18
18
|
import {
|
|
19
19
|
effectiveReasoningEffort
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-jrzkw01m.js";
|
|
21
21
|
import {
|
|
22
22
|
isSkillLoaderCall,
|
|
23
23
|
skillFromToolArgs,
|
|
@@ -30,43 +30,43 @@ import {
|
|
|
30
30
|
CODEX_CREDITS_EXHAUSTED_COOLDOWN_MS,
|
|
31
31
|
resolveCodexCreditsExhaustedCooldownMs,
|
|
32
32
|
parseRateLimitResetTime
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-f2zenhja.js";
|
|
34
34
|
import {
|
|
35
35
|
ACP_TARGET_IDS,
|
|
36
36
|
isAcpTarget
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-d6521kb5.js";
|
|
38
38
|
import {
|
|
39
39
|
checkAmpCredentials2,
|
|
40
40
|
liveTestAmpCredentials2
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-vxh6acp7.js";
|
|
42
42
|
import {
|
|
43
43
|
checkClaudeCredentials2
|
|
44
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-715t1gx6.js";
|
|
45
45
|
import {
|
|
46
46
|
checkClaudeManagedCredentials2
|
|
47
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-3xcwp3z8.js";
|
|
48
48
|
import {
|
|
49
49
|
codexUserHome,
|
|
50
50
|
checkCodexCredentials2
|
|
51
|
-
} from "./cli-
|
|
51
|
+
} from "./cli-k70e3x9e.js";
|
|
52
52
|
import {
|
|
53
53
|
checkCursorCredentials2
|
|
54
|
-
} from "./cli-
|
|
54
|
+
} from "./cli-9aezs55w.js";
|
|
55
55
|
import {
|
|
56
56
|
checkDevinCredentials2
|
|
57
|
-
} from "./cli-
|
|
57
|
+
} from "./cli-ybjdc978.js";
|
|
58
58
|
import {
|
|
59
59
|
checkDshCredentials2
|
|
60
|
-
} from "./cli-
|
|
60
|
+
} from "./cli-mnrkgg60.js";
|
|
61
61
|
import {
|
|
62
62
|
checkOpencodeCredentials2
|
|
63
|
-
} from "./cli-
|
|
63
|
+
} from "./cli-jfx48xrj.js";
|
|
64
64
|
import {
|
|
65
65
|
checkFxCredentials2
|
|
66
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-bc779n4v.js";
|
|
67
67
|
import {
|
|
68
68
|
checkGrokCredentials2
|
|
69
|
-
} from "./cli-
|
|
69
|
+
} from "./cli-09kmfkmq.js";
|
|
70
70
|
import {
|
|
71
71
|
CODEX_OAUTH_POOL_SLOTS_ENV,
|
|
72
72
|
isCodexOAuthConfigKey,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
import {
|
|
77
77
|
getContextWindowSize,
|
|
78
78
|
init_context_window
|
|
79
|
-
} from "./cli-
|
|
79
|
+
} from "./cli-m88rpzkh.js";
|
|
80
80
|
import {
|
|
81
81
|
resumedTaskModelSelection,
|
|
82
82
|
init_model_pin,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
init_azure_devops,
|
|
87
87
|
resolveScriptsOnlyMode,
|
|
88
88
|
init_scripts_only_mode
|
|
89
|
-
} from "./cli-
|
|
89
|
+
} from "./cli-fayav105.js";
|
|
90
90
|
import {
|
|
91
91
|
terminateRegisteredProcessGroups,
|
|
92
92
|
init_process_group
|
|
@@ -94,14 +94,14 @@ import {
|
|
|
94
94
|
import {
|
|
95
95
|
validateJsonSchema,
|
|
96
96
|
init_json_schema_validator
|
|
97
|
-
} from "./cli-
|
|
97
|
+
} from "./cli-ejkvvqbe.js";
|
|
98
98
|
import {
|
|
99
99
|
authJsonToCredentialSelection,
|
|
100
100
|
credentialsToAuthJson,
|
|
101
101
|
init_auth_json,
|
|
102
102
|
loadAllCodexOAuthSlots,
|
|
103
103
|
init_storage
|
|
104
|
-
} from "./cli-
|
|
104
|
+
} from "./cli-rvhdmjvt.js";
|
|
105
105
|
import {
|
|
106
106
|
isPollTracingEnabled,
|
|
107
107
|
initOtel,
|
|
@@ -113,13 +113,15 @@ import {
|
|
|
113
113
|
initialize,
|
|
114
114
|
ensure,
|
|
115
115
|
init_business_use
|
|
116
|
-
} from "./cli-
|
|
116
|
+
} from "./cli-605nn699.js";
|
|
117
117
|
import {
|
|
118
118
|
mapTriggerSurface,
|
|
119
119
|
init_telemetry_context,
|
|
120
120
|
initTelemetry,
|
|
121
121
|
telemetry,
|
|
122
122
|
init_telemetry,
|
|
123
|
+
isApiDrainingResponse,
|
|
124
|
+
init_api_drain2,
|
|
123
125
|
isEnvExportRestrictedKey,
|
|
124
126
|
init_config_env_export,
|
|
125
127
|
MASKED_SECRET_VALUE,
|
|
@@ -128,10 +130,8 @@ import {
|
|
|
128
130
|
init_output_schema,
|
|
129
131
|
vcsRepoName,
|
|
130
132
|
vcsRepoUrlMatches,
|
|
131
|
-
init_vcs_repo_match
|
|
132
|
-
|
|
133
|
-
init_api_drain2
|
|
134
|
-
} from "./cli-w4xnbm46.js";
|
|
133
|
+
init_vcs_repo_match
|
|
134
|
+
} from "./cli-neyag5p6.js";
|
|
135
135
|
import {
|
|
136
136
|
parseWorkerModelTierOverrides,
|
|
137
137
|
resolveTaskModelSelection,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
ProviderNameSchema,
|
|
140
140
|
WorkerNudgeSchema,
|
|
141
141
|
init_types4
|
|
142
|
-
} from "./cli-
|
|
142
|
+
} from "./cli-cvs2r2vq.js";
|
|
143
143
|
import {
|
|
144
144
|
isCodexAuthFailureReason,
|
|
145
145
|
init_codex_auth_failure
|
|
@@ -160,6 +160,7 @@ import {
|
|
|
160
160
|
buildContextPreamble,
|
|
161
161
|
buildResumeContextPreamble,
|
|
162
162
|
init_context_preamble,
|
|
163
|
+
fetchProfileSyncRejectionBanner,
|
|
163
164
|
prependProfileSyncRejectionBanner,
|
|
164
165
|
writeIdentityBaselines,
|
|
165
166
|
bootIdentityBaselines,
|
|
@@ -168,7 +169,7 @@ import {
|
|
|
168
169
|
resolveClaudeMdPath,
|
|
169
170
|
syncProfileFilesToServer,
|
|
170
171
|
init_profile_sync
|
|
171
|
-
} from "./cli-
|
|
172
|
+
} from "./cli-9r5gtwjr.js";
|
|
172
173
|
import {
|
|
173
174
|
isSteeringEnabled2,
|
|
174
175
|
init_steering_enabled
|
|
@@ -189,7 +190,7 @@ import {
|
|
|
189
190
|
CLAUDE_CREDENTIALS_HINT,
|
|
190
191
|
resolveCredentialPools,
|
|
191
192
|
init_credentials2
|
|
192
|
-
} from "./cli-
|
|
193
|
+
} from "./cli-xfjrc279.js";
|
|
193
194
|
import {
|
|
194
195
|
interpolate,
|
|
195
196
|
init_template2,
|
|
@@ -201,7 +202,7 @@ import {
|
|
|
201
202
|
runtimeHarnessSections,
|
|
202
203
|
refreshRuntimeModelCatalog,
|
|
203
204
|
init_runtime_model_catalog
|
|
204
|
-
} from "./cli-
|
|
205
|
+
} from "./cli-2r0jcc3k.js";
|
|
205
206
|
import {
|
|
206
207
|
getMcpBaseUrl,
|
|
207
208
|
init_constants3
|
|
@@ -214,12 +215,6 @@ import {
|
|
|
214
215
|
getApiKey,
|
|
215
216
|
init_api_key
|
|
216
217
|
} from "./cli-pax9q4ff.js";
|
|
217
|
-
import {
|
|
218
|
-
scrubSecrets,
|
|
219
|
-
registerEnvSecrets,
|
|
220
|
-
registerSensitiveKeyName,
|
|
221
|
-
init_secret_scrubber
|
|
222
|
-
} from "./cli-1b7btd38.js";
|
|
223
218
|
import {
|
|
224
219
|
isChatgptSubscriptionModel,
|
|
225
220
|
harnessModelMismatch,
|
|
@@ -228,8 +223,12 @@ import {
|
|
|
228
223
|
providerBaseUrl,
|
|
229
224
|
openAICompatibleProvider,
|
|
230
225
|
providerKeyFromEnv,
|
|
231
|
-
init_src2
|
|
232
|
-
|
|
226
|
+
init_src2,
|
|
227
|
+
scrubSecrets,
|
|
228
|
+
registerEnvSecrets,
|
|
229
|
+
registerSensitiveKeyName,
|
|
230
|
+
init_secret_scrubber
|
|
231
|
+
} from "./cli-d84byzn8.js";
|
|
233
232
|
|
|
234
233
|
// src/commands/runner.ts
|
|
235
234
|
init_src2();
|
|
@@ -271,51 +270,51 @@ init_storage();
|
|
|
271
270
|
async function createProviderAdapter(provider) {
|
|
272
271
|
switch (provider) {
|
|
273
272
|
case "claude": {
|
|
274
|
-
const { ClaudeAdapter } = await import("./claude-adapter-
|
|
273
|
+
const { ClaudeAdapter } = await import("./claude-adapter-348p5hx9.js");
|
|
275
274
|
return new ClaudeAdapter;
|
|
276
275
|
}
|
|
277
276
|
case "pi": {
|
|
278
|
-
const { PiMonoAdapter } = await import("./pi-mono-adapter-
|
|
277
|
+
const { PiMonoAdapter } = await import("./pi-mono-adapter-zk8pg9jr.js");
|
|
279
278
|
return new PiMonoAdapter;
|
|
280
279
|
}
|
|
281
280
|
case "codex": {
|
|
282
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
281
|
+
const { CodexAdapter } = await import("./codex-adapter-ysq6bzha.js");
|
|
283
282
|
return new CodexAdapter;
|
|
284
283
|
}
|
|
285
284
|
case "claude-managed": {
|
|
286
|
-
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-
|
|
285
|
+
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-h74d06yz.js");
|
|
287
286
|
return new ClaudeManagedAdapter;
|
|
288
287
|
}
|
|
289
288
|
case "devin": {
|
|
290
|
-
const { DevinAdapter } = await import("./devin-adapter-
|
|
289
|
+
const { DevinAdapter } = await import("./devin-adapter-z46ep5ph.js");
|
|
291
290
|
return new DevinAdapter;
|
|
292
291
|
}
|
|
293
292
|
case "opencode": {
|
|
294
|
-
const { OpencodeAdapter } = await import("./opencode-adapter-
|
|
293
|
+
const { OpencodeAdapter } = await import("./opencode-adapter-mtb0953j.js");
|
|
295
294
|
return new OpencodeAdapter;
|
|
296
295
|
}
|
|
297
296
|
case "dsh": {
|
|
298
|
-
const { DshAdapter } = await import("./dsh-adapter-
|
|
297
|
+
const { DshAdapter } = await import("./dsh-adapter-rw0d5rc4.js");
|
|
299
298
|
return new DshAdapter;
|
|
300
299
|
}
|
|
301
300
|
case "amp": {
|
|
302
|
-
const { AmpAdapter } = await import("./amp-adapter-
|
|
301
|
+
const { AmpAdapter } = await import("./amp-adapter-q61w05eb.js");
|
|
303
302
|
return new AmpAdapter;
|
|
304
303
|
}
|
|
305
304
|
case "cursor": {
|
|
306
|
-
const { CursorAdapter } = await import("./cursor-adapter-
|
|
305
|
+
const { CursorAdapter } = await import("./cursor-adapter-d46qszer.js");
|
|
307
306
|
return new CursorAdapter;
|
|
308
307
|
}
|
|
309
308
|
case "grok": {
|
|
310
|
-
const { GrokAdapter } = await import("./grok-adapter-
|
|
309
|
+
const { GrokAdapter } = await import("./grok-adapter-spea7zkj.js");
|
|
311
310
|
return new GrokAdapter;
|
|
312
311
|
}
|
|
313
312
|
case "fx": {
|
|
314
|
-
const { FxAdapter } = await import("./fx-adapter-
|
|
313
|
+
const { FxAdapter } = await import("./fx-adapter-vz0b9z3g.js");
|
|
315
314
|
return new FxAdapter;
|
|
316
315
|
}
|
|
317
316
|
case "acp": {
|
|
318
|
-
const { ACPAdapter } = await import("./acp-adapter-
|
|
317
|
+
const { ACPAdapter } = await import("./acp-adapter-dn4gdsgr.js");
|
|
319
318
|
return new ACPAdapter;
|
|
320
319
|
}
|
|
321
320
|
default:
|
|
@@ -1315,7 +1314,7 @@ var CREDENTIAL_PROVIDER_CHECKERS = {
|
|
|
1315
1314
|
devin: (env) => checkDevinCredentials2(env),
|
|
1316
1315
|
opencode: (env, opts) => checkOpencodeCredentials2(env, opts),
|
|
1317
1316
|
pi: async (env, opts) => {
|
|
1318
|
-
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-
|
|
1317
|
+
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-zk8pg9jr.js");
|
|
1319
1318
|
return {
|
|
1320
1319
|
...await checkPiMonoCredentials(env, opts),
|
|
1321
1320
|
opencodeGoModels: listPiOpencodeGoModelIds()
|
|
@@ -1594,7 +1593,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
|
|
|
1594
1593
|
latency_ms: Date.now() - startedAt
|
|
1595
1594
|
};
|
|
1596
1595
|
}
|
|
1597
|
-
const { liveTestCursorKey } = await import("./cursor-adapter-
|
|
1596
|
+
const { liveTestCursorKey } = await import("./cursor-adapter-d46qszer.js");
|
|
1598
1597
|
return checkEachKey("CURSOR_API_KEY", apiKey, async (member) => {
|
|
1599
1598
|
const start = Date.now();
|
|
1600
1599
|
const result = await liveTestCursorKey(member);
|
|
@@ -2371,8 +2370,10 @@ async function ensureRepoForTask(repoConfig, role, isFirstKickoff = false) {
|
|
|
2371
2370
|
warning = await refreshExistingRepoForTask({ name, clonePath, defaultBranch }, role, isFirstKickoff);
|
|
2372
2371
|
}
|
|
2373
2372
|
await installRepoHooksForTask(repoConfig, role);
|
|
2374
|
-
const claudeMd = await
|
|
2375
|
-
|
|
2373
|
+
const [claudeMd, autoStashes] = await Promise.all([
|
|
2374
|
+
readClaudeMd(clonePath, role),
|
|
2375
|
+
listSwarmAutostashes(clonePath, role)
|
|
2376
|
+
]);
|
|
2376
2377
|
return { clonePath, claudeMd, warning, autoStashes };
|
|
2377
2378
|
} catch (err) {
|
|
2378
2379
|
const errorMsg = scrubSecrets(err.message);
|
|
@@ -2755,6 +2756,7 @@ var SWARM_TOOL_LABELS = {
|
|
|
2755
2756
|
"read-messages": "\uD83D\uDCAC Reading messages",
|
|
2756
2757
|
"request-human-input": "\uD83D\uDE4B Requesting human input",
|
|
2757
2758
|
"cancel-approval-request": "\uD83D\uDEAB Cancelling approval request",
|
|
2759
|
+
"submit-improvement": "\uD83D\uDCA1 Drafting improvement",
|
|
2758
2760
|
"cancel-task": "\uD83D\uDEAB Cancelling task",
|
|
2759
2761
|
"db-query": "\uD83D\uDDC3️ Querying database",
|
|
2760
2762
|
"inject-learning": "\uD83E\uDDE0 Storing learning",
|
|
@@ -3192,20 +3194,22 @@ async function resolveCodexOAuthCredentialInfo(apiUrl, apiKey, opts = {}) {
|
|
|
3192
3194
|
try {
|
|
3193
3195
|
const slots = await loadAllCodexOAuthSlots(apiUrl, apiKey);
|
|
3194
3196
|
if (slots.length > 0) {
|
|
3197
|
+
const allSlotIndices = slots.map((s) => s.slot);
|
|
3198
|
+
const totalKeys = Math.max(...allSlotIndices) + 1;
|
|
3195
3199
|
let availableIndices;
|
|
3196
3200
|
let authFailureFence;
|
|
3197
3201
|
try {
|
|
3198
|
-
const resp = await fetch(`${apiUrl}/api/keys/available?keyType=CODEX_OAUTH&totalKeys=${
|
|
3202
|
+
const resp = await fetch(`${apiUrl}/api/keys/available?keyType=CODEX_OAUTH&totalKeys=${totalKeys}`, { headers: { Authorization: `Bearer ${apiKey}` } });
|
|
3199
3203
|
if (resp.ok) {
|
|
3200
3204
|
const data = await resp.json();
|
|
3201
3205
|
availableIndices = data.availableIndices;
|
|
3202
3206
|
authFailureFence = data.authFailureFence;
|
|
3203
|
-
|
|
3204
|
-
|
|
3207
|
+
const availableSlots = allSlotIndices.filter((i) => availableIndices.includes(i)).length;
|
|
3208
|
+
if (availableSlots < slots.length) {
|
|
3209
|
+
console.log(`[credentials] CODEX_OAUTH: ${availableSlots}/${slots.length} slots available (${slots.length - availableSlots} rate-limited)`);
|
|
3205
3210
|
}
|
|
3206
3211
|
}
|
|
3207
3212
|
} catch {}
|
|
3208
|
-
const allSlotIndices = slots.map((s) => s.slot);
|
|
3209
3213
|
let selectedSlot;
|
|
3210
3214
|
if (availableIndices && availableIndices.length > 0) {
|
|
3211
3215
|
const eligible = allSlotIndices.filter((i) => availableIndices.includes(i));
|
|
@@ -4409,7 +4413,7 @@ function implicitCloseActiveToolSpans(activeToolSpans, now = Date.now()) {
|
|
|
4409
4413
|
}
|
|
4410
4414
|
return closed;
|
|
4411
4415
|
}
|
|
4412
|
-
async function spawnProviderProcess(adapter, opts, logDir
|
|
4416
|
+
async function spawnProviderProcess(adapter, opts, logDir) {
|
|
4413
4417
|
const realTaskId = opts.taskId;
|
|
4414
4418
|
const effectiveTaskId = realTaskId || crypto.randomUUID();
|
|
4415
4419
|
const sessionRepo = opts.vcsRepo ? await fetchRepoConfig(opts.apiUrl, opts.apiKey, opts.vcsRepo, true) : null;
|
|
@@ -4933,11 +4937,7 @@ async function spawnProviderProcess(adapter, opts, logDir, isYolo) {
|
|
|
4933
4937
|
const existingErrors = await errorsFileRef.exists() ? await errorsFileRef.text() : "";
|
|
4934
4938
|
await Bun.write(errorsFile, `${existingErrors}${JSON.stringify(errorLog)}
|
|
4935
4939
|
`);
|
|
4936
|
-
|
|
4937
|
-
console.error(`[${opts.role}] Task ${effectiveTaskId.slice(0, 8)} exited with code ${result.exitCode}.`);
|
|
4938
|
-
} else {
|
|
4939
|
-
console.warn(`[${opts.role}] Task ${effectiveTaskId.slice(0, 8)} exited with code ${result.exitCode}. YOLO mode - continuing...`);
|
|
4940
|
-
}
|
|
4940
|
+
console.error(`[${opts.role}] Task ${effectiveTaskId.slice(0, 8)} exited with code ${result.exitCode}. Continuing to poll for work.`);
|
|
4941
4941
|
}
|
|
4942
4942
|
result.cost ??= lastCostHolder.value;
|
|
4943
4943
|
if (result.cost) {
|
|
@@ -5125,9 +5125,9 @@ async function handOffTasksForApiDrain(state, role, apiConfig) {
|
|
|
5125
5125
|
async function reconcileActiveTasks(state, role, opts) {
|
|
5126
5126
|
const now = opts.now ?? Date.now;
|
|
5127
5127
|
const graceMs = opts.abortGraceMs ?? ABORT_SETTLE_GRACE_MS;
|
|
5128
|
-
|
|
5128
|
+
const reconcileOne = async (taskId, task) => {
|
|
5129
5129
|
if (task.result !== null)
|
|
5130
|
-
|
|
5130
|
+
return;
|
|
5131
5131
|
if (!opts.cancelledSignaled.has(taskId) && (!opts.cancelTaskIds || opts.cancelTaskIds.has(taskId))) {
|
|
5132
5132
|
try {
|
|
5133
5133
|
if (await opts.isCancelled(taskId)) {
|
|
@@ -5159,7 +5159,8 @@ async function reconcileActiveTasks(state, role, opts) {
|
|
|
5159
5159
|
failureReason: "runner exited without result: provider session did not settle after abort"
|
|
5160
5160
|
};
|
|
5161
5161
|
}
|
|
5162
|
-
}
|
|
5162
|
+
};
|
|
5163
|
+
await Promise.all(Array.from(state.activeTasks, ([taskId, task]) => reconcileOne(taskId, task)));
|
|
5163
5164
|
}
|
|
5164
5165
|
async function fetchTaskCancelled(apiUrl, apiKey, agentId, taskId) {
|
|
5165
5166
|
const resp = await fetch(`${apiUrl}/cancelled-tasks?taskId=${encodeURIComponent(taskId)}`, {
|
|
@@ -5449,7 +5450,6 @@ async function runAgent(config, opts) {
|
|
|
5449
5450
|
const logDir = `${baseLogDir}/${sessionId}`;
|
|
5450
5451
|
await mkdir(logDir, { recursive: true });
|
|
5451
5452
|
const prompt = opts.prompt || defaultPrompt;
|
|
5452
|
-
const isYolo = opts.yolo || process.env.YOLO === "true";
|
|
5453
5453
|
const agentId = process.env.AGENT_ID || "unknown";
|
|
5454
5454
|
const apiUrl = getMcpBaseUrl();
|
|
5455
5455
|
const swarmUrl = process.env.SWARM_URL || "localhost";
|
|
@@ -5587,7 +5587,6 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
5587
5587
|
console.log(`[${role}] Agent ID: ${agentId}`);
|
|
5588
5588
|
console.log(`[${role}] Session ID: ${sessionId}`);
|
|
5589
5589
|
console.log(`[${role}] Log directory: ${logDir}`);
|
|
5590
|
-
console.log(`[${role}] YOLO mode: ${isYolo ? "enabled" : "disabled"}`);
|
|
5591
5590
|
console.log(`[${role}] Prompt: ${prompt}`);
|
|
5592
5591
|
console.log(`[${role}] API URL: ${apiUrl}`);
|
|
5593
5592
|
console.log(`[${role}] Swarm URL: ${apiUrl}`);
|
|
@@ -6145,8 +6144,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6145
6144
|
timestamp: new Date().toISOString(),
|
|
6146
6145
|
prompt: resumePrompt,
|
|
6147
6146
|
trigger: "task_resumed",
|
|
6148
|
-
resumedTaskId: task.id
|
|
6149
|
-
yolo: isYolo
|
|
6147
|
+
resumedTaskId: task.id
|
|
6150
6148
|
};
|
|
6151
6149
|
await Bun.write(logFile, `${JSON.stringify(metadata)}
|
|
6152
6150
|
`);
|
|
@@ -6223,7 +6221,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6223
6221
|
vcsRepo: task.vcsRepo,
|
|
6224
6222
|
contextKey: task.contextKey,
|
|
6225
6223
|
localBlocks: state.modelWindowBlocks
|
|
6226
|
-
}, logDir
|
|
6224
|
+
}, logDir);
|
|
6227
6225
|
} catch (spawnErr) {
|
|
6228
6226
|
const errMsg = spawnErr instanceof Error ? spawnErr.message : String(spawnErr);
|
|
6229
6227
|
console.error(`[${role}] Failed to spawn process for resumed task ${task.id.slice(0, 8)}: ${errMsg}`);
|
|
@@ -6395,36 +6393,44 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6395
6393
|
});
|
|
6396
6394
|
}
|
|
6397
6395
|
let triggerPrompt = await buildPromptForTrigger(trigger, prompt, adapter.formatCommand.bind(adapter), { hasMcp: adapter.traits.hasMcp });
|
|
6398
|
-
|
|
6399
|
-
const task = trigger.task && typeof trigger.task === "object" && "task" in trigger.task ? trigger.task : null;
|
|
6400
|
-
if (task?.task) {
|
|
6401
|
-
const memoryContext = await fetchRelevantMemories(apiUrl, apiKey, agentId, task.task, task.id, task.contextKey);
|
|
6402
|
-
if (memoryContext) {
|
|
6403
|
-
triggerPrompt += memoryContext;
|
|
6404
|
-
console.log(`[${role}] Injected relevant memories into task prompt`);
|
|
6405
|
-
}
|
|
6406
|
-
}
|
|
6407
|
-
}
|
|
6396
|
+
const memoryTask = (trigger.type === "task_assigned" || trigger.type === "task_offered") && trigger.task && typeof trigger.task === "object" && "task" in trigger.task ? trigger.task : null;
|
|
6408
6397
|
const taskObj = trigger.task;
|
|
6398
|
+
const isResumeTask = taskObj?.taskType === "resume";
|
|
6399
|
+
const taskVcsRepo = trigger.task?.vcsRepo;
|
|
6400
|
+
const [
|
|
6401
|
+
memoryContext,
|
|
6402
|
+
contextPreamble,
|
|
6403
|
+
profileSyncBanner,
|
|
6404
|
+
parentSession,
|
|
6405
|
+
repoConfig,
|
|
6406
|
+
isFirstKickoff
|
|
6407
|
+
] = await Promise.all([
|
|
6408
|
+
memoryTask?.task ? fetchRelevantMemories(apiUrl, apiKey, agentId, memoryTask.task, memoryTask.id, memoryTask.contextKey) : null,
|
|
6409
|
+
taskObj?.parentTaskId && apiUrl ? isResumeTask ? buildResumeContextPreamble(apiUrl, apiKey, taskObj.parentTaskId) : buildContextPreamble(apiUrl, apiKey, taskObj.parentTaskId) : null,
|
|
6410
|
+
fetchProfileSyncRejectionBanner({
|
|
6411
|
+
...apiConfig,
|
|
6412
|
+
claudeMdPath: resolveClaudeMdPath([state.harnessProvider])
|
|
6413
|
+
}),
|
|
6414
|
+
taskObj?.parentTaskId ? fetchProviderSessionInfo(apiUrl, apiKey, taskObj.parentTaskId) : null,
|
|
6415
|
+
taskVcsRepo && apiUrl ? fetchRepoConfig(apiUrl, apiKey, taskVcsRepo) : null,
|
|
6416
|
+
taskVcsRepo && apiUrl ? isFirstKickoffTask(taskObj, (parentTaskId) => fetchTaskStatus(apiUrl, apiKey, parentTaskId)) : false
|
|
6417
|
+
]);
|
|
6418
|
+
if (memoryContext) {
|
|
6419
|
+
triggerPrompt += memoryContext;
|
|
6420
|
+
console.log(`[${role}] Injected relevant memories into task prompt`);
|
|
6421
|
+
}
|
|
6409
6422
|
if (taskObj?.parentTaskId && apiUrl) {
|
|
6410
|
-
const isResumeTask = taskObj.taskType === "resume";
|
|
6411
|
-
const contextPreamble = isResumeTask ? await buildResumeContextPreamble(apiUrl, apiKey, taskObj.parentTaskId) : await buildContextPreamble(apiUrl, apiKey, taskObj.parentTaskId);
|
|
6412
6423
|
if (contextPreamble) {
|
|
6413
6424
|
triggerPrompt = prependContextPreamble(triggerPrompt, contextPreamble);
|
|
6414
6425
|
console.log(`[${role}] Injected ${isResumeTask ? "resume" : "context"} preamble for ${isResumeTask ? "resume" : "follow-up"} task (parent: ${taskObj.parentTaskId.slice(0, 8)})`);
|
|
6415
6426
|
}
|
|
6416
6427
|
}
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
claudeMdPath: resolveClaudeMdPath([state.harnessProvider])
|
|
6420
|
-
});
|
|
6421
|
-
triggerPrompt = triggerWithSyncWarning.prompt;
|
|
6422
|
-
if (triggerWithSyncWarning.injected) {
|
|
6428
|
+
if (profileSyncBanner) {
|
|
6429
|
+
triggerPrompt = prependContextPreamble(triggerPrompt, profileSyncBanner);
|
|
6423
6430
|
console.warn(`[${role}] Injected persisted profile sync rejection warning`);
|
|
6424
6431
|
}
|
|
6425
6432
|
let resumeSessionId;
|
|
6426
6433
|
if (taskObj?.parentTaskId) {
|
|
6427
|
-
const parentSession = await fetchProviderSessionInfo(apiUrl, apiKey, taskObj.parentTaskId);
|
|
6428
6434
|
if (parentSession?.sessionId) {
|
|
6429
6435
|
const resumeResolution = resolveResumeSession(state.harnessProvider, [
|
|
6430
6436
|
{
|
|
@@ -6448,16 +6454,13 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6448
6454
|
const taskSlackThreadTs = trigger.task?.slackThreadTs;
|
|
6449
6455
|
const taskSlackContext = taskSlackChannelId ? { channelId: taskSlackChannelId, threadTs: taskSlackThreadTs } : undefined;
|
|
6450
6456
|
let currentRepoContext;
|
|
6451
|
-
const taskVcsRepo = trigger.task?.vcsRepo;
|
|
6452
6457
|
if (taskVcsRepo && apiUrl) {
|
|
6453
|
-
const repoConfig = await fetchRepoConfig(apiUrl, apiKey, taskVcsRepo);
|
|
6454
6458
|
const effectiveConfig = repoConfig ?? {
|
|
6455
6459
|
url: taskVcsRepo,
|
|
6456
6460
|
name: taskVcsRepo.split("/").pop() || taskVcsRepo,
|
|
6457
6461
|
clonePath: `/workspace/personal/repos/${taskVcsRepo.split("/").pop() || taskVcsRepo}`,
|
|
6458
6462
|
defaultBranch: "main"
|
|
6459
6463
|
};
|
|
6460
|
-
const isFirstKickoff = await isFirstKickoffTask(taskObj, (parentTaskId) => fetchTaskStatus(apiUrl, apiKey, parentTaskId));
|
|
6461
6464
|
const repoResult = await ensureRepoForTask(effectiveConfig, role, isFirstKickoff);
|
|
6462
6465
|
currentRepoContext = {
|
|
6463
6466
|
...repoResult,
|
|
@@ -6493,22 +6496,22 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6493
6496
|
triggerPrompt += " You can still access any path on the filesystem — this is just your starting directory.";
|
|
6494
6497
|
}
|
|
6495
6498
|
const cwdWarning = missingTaskDirWarning(taskDir, effectiveCwd);
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6499
|
+
const [skillResult, identityResult] = await Promise.all([
|
|
6500
|
+
state.harnessProvider !== "claude-managed" ? refreshSkillsIfChanged({ apiUrl, swarmUrl, apiKey, agentId, role }, lastSkillHash) : null,
|
|
6501
|
+
refreshIdentityIfChanged({ apiUrl, apiKey, agentId, role }, {
|
|
6502
|
+
soulMd: agentSoulMd,
|
|
6503
|
+
identityMd: agentIdentityMd,
|
|
6504
|
+
toolsMd: agentToolsMd,
|
|
6505
|
+
claudeMd: agentClaudeMd,
|
|
6506
|
+
heartbeatMd: agentHeartbeatMd,
|
|
6507
|
+
name: agentProfileName,
|
|
6508
|
+
description: agentDescription
|
|
6509
|
+
})
|
|
6510
|
+
]);
|
|
6511
|
+
if (skillResult?.changed && skillResult.summary) {
|
|
6512
|
+
agentSkillsSummary = skillResult.summary;
|
|
6513
|
+
console.log(`[${role}] Skills changed — refreshing system prompt (${agentSkillsSummary.length} skills)`);
|
|
6502
6514
|
}
|
|
6503
|
-
const identityResult = await refreshIdentityIfChanged({ apiUrl, apiKey, agentId, role }, {
|
|
6504
|
-
soulMd: agentSoulMd,
|
|
6505
|
-
identityMd: agentIdentityMd,
|
|
6506
|
-
toolsMd: agentToolsMd,
|
|
6507
|
-
claudeMd: agentClaudeMd,
|
|
6508
|
-
heartbeatMd: agentHeartbeatMd,
|
|
6509
|
-
name: agentProfileName,
|
|
6510
|
-
description: agentDescription
|
|
6511
|
-
});
|
|
6512
6515
|
if (identityResult.changed) {
|
|
6513
6516
|
agentSoulMd = identityResult.fields.soulMd;
|
|
6514
6517
|
agentIdentityMd = identityResult.fields.identityMd;
|
|
@@ -6555,8 +6558,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6555
6558
|
iteration,
|
|
6556
6559
|
timestamp: new Date().toISOString(),
|
|
6557
6560
|
prompt: triggerPrompt,
|
|
6558
|
-
trigger: trigger.type
|
|
6559
|
-
yolo: isYolo
|
|
6561
|
+
trigger: trigger.type
|
|
6560
6562
|
};
|
|
6561
6563
|
await Bun.write(logFile, `${JSON.stringify(metadata)}
|
|
6562
6564
|
`);
|
|
@@ -6597,7 +6599,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6597
6599
|
vcsRepo: taskVcsRepo,
|
|
6598
6600
|
contextKey: taskContextKey,
|
|
6599
6601
|
localBlocks: state.modelWindowBlocks
|
|
6600
|
-
}, logDir
|
|
6602
|
+
}, logDir);
|
|
6601
6603
|
} catch (spawnErr) {
|
|
6602
6604
|
const errMsg = spawnErr instanceof Error ? spawnErr.message : String(spawnErr);
|
|
6603
6605
|
console.error(`[${role}] Failed to spawn process for task ${trigger.taskId?.slice(0, 8) || "unknown"}: ${errMsg}`);
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./cli-ytyvpye5.js";
|
|
5
5
|
import {
|
|
6
6
|
init_v4
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-3kd08rej.js";
|
|
8
8
|
import {
|
|
9
9
|
toJSONSchema,
|
|
10
10
|
safeParseAsync2
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-hg42n3hx.js";
|
|
12
12
|
import {
|
|
13
13
|
__esm
|
|
14
14
|
} from "./cli-242037k3.js";
|
|
@@ -11,30 +11,30 @@ import {
|
|
|
11
11
|
init_active_sessions,
|
|
12
12
|
getSteeringMessageById2,
|
|
13
13
|
init_db4
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-neyag5p6.js";
|
|
15
15
|
import {
|
|
16
16
|
userHoldsExplicitVerb2,
|
|
17
17
|
getUserGrant2,
|
|
18
18
|
init_rbac_roles
|
|
19
|
-
} from "./cli-
|
|
20
|
-
import {
|
|
21
|
-
findUserById,
|
|
22
|
-
findUserByExternalId,
|
|
23
|
-
init_users
|
|
24
|
-
} from "./cli-269q28a1.js";
|
|
19
|
+
} from "./cli-btc9cb4c.js";
|
|
25
20
|
import {
|
|
26
21
|
isRbacEnabled,
|
|
27
22
|
can,
|
|
28
23
|
init_rbac
|
|
29
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-cyn9v8zr.js";
|
|
25
|
+
import {
|
|
26
|
+
findUserById,
|
|
27
|
+
findUserByExternalId,
|
|
28
|
+
init_users
|
|
29
|
+
} from "./cli-4t0fmf3z.js";
|
|
30
30
|
import {
|
|
31
31
|
init_zod
|
|
32
|
-
} from "./cli-
|
|
32
|
+
} from "./cli-zcfpsfzf.js";
|
|
33
33
|
import {
|
|
34
34
|
ZodError,
|
|
35
35
|
string2,
|
|
36
36
|
object2
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-hg42n3hx.js";
|
|
38
38
|
import {
|
|
39
39
|
isEnvFlagEnabled,
|
|
40
40
|
init_env_flag
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
import {
|
|
47
47
|
scrubSecrets,
|
|
48
48
|
init_secret_scrubber
|
|
49
|
-
} from "./cli-
|
|
49
|
+
} from "./cli-d84byzn8.js";
|
|
50
50
|
import {
|
|
51
51
|
__esm
|
|
52
52
|
} from "./cli-242037k3.js";
|
|
@@ -500,7 +500,7 @@ function route(def) {
|
|
|
500
500
|
try {
|
|
501
501
|
const rawBody = def.body ? await parseBody(req, def.maxBodyBytes) : undefined;
|
|
502
502
|
if (def.session && "bodyTaskIds" in def.session) {
|
|
503
|
-
const { bodySessionDenial } = await import("./session-access-
|
|
503
|
+
const { bodySessionDenial } = await import("./session-access-q7dmqjvt.js");
|
|
504
504
|
const denial = await bodySessionDenial(req, def.session.bodyTaskIds(rawBody));
|
|
505
505
|
if (denial) {
|
|
506
506
|
jsonError(res, denial, 403);
|
|
@@ -942,4 +942,4 @@ var init_session_access = __esm(() => {
|
|
|
942
942
|
BYPASS = { kind: "bypass" };
|
|
943
943
|
});
|
|
944
944
|
|
|
945
|
-
export { duplicateGuardedQueryKey, warnIfCorsAllowsAnyOrigin, isOriginAllowedForCredentials, allowedCredentialRedirect, setCorsHeaders, parseQueryParams, getPathSegments, wireHttpSpanLifecycle, redactShareTokenInPath, safeRequestUrlForLog, agentWithCapacity, RequestBodyTooLargeError, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, writeUnhandledError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, init_utils2, hasSessionAccess, getSessionRoot, sessionAccessForRoot, listActiveSessionShares, toSessionSharesState, setSessionShares, init_session_shares, resolveTaskAuditUserId, resolveHttpAuditUserId, init_audit_user, dashboardUserIdHeader, resolveHttpFavoriteOwner, init_favorite_owner, resolveSessionActor2, withReadAll2, sessionAccessFor2, SESSION_READ_DENIED2, canReadSession2, readableByFor2, SESSION_WRITE_DENIED2, hasSessionWrite2, NOT_YOUR_TASK_DENIED2, deniesNonOwnerTaskWrite2, denyParentAttach2, pathSessionDenial2, bodySessionDenial2, userAgentIdentityDenial2, init_session_access, runtimeInstanceHeader, bodyTask, bodyListTask, routeRegistry, isPublicRoute, findRoute, describeRequestRoute, route, init_route_def };
|
|
945
|
+
export { duplicateGuardedQueryKey, warnIfCorsAllowsAnyOrigin, isOriginAllowedForCredentials, allowedCredentialRedirect, setCorsHeaders, parseQueryParams, getPathSegments, wireHttpSpanLifecycle, redactShareTokenInPath, safeRequestUrlForLog, agentWithCapacity, RequestBodyTooLargeError, parseBody, BODY_TOO_LARGE, enforceContentLengthCap, json, jsonError, writeUnhandledError, triggerSchemaErrorResponse, deriveApiBaseUrl, httpServerSemconvAttributes, init_utils2, hasSessionAccess, getSessionRoot, getSessionRoots, sessionAccessForRoot, listActiveSessionShares, toSessionSharesState, setSessionShares, init_session_shares, resolveTaskAuditUserId, resolveHttpAuditUserId, init_audit_user, dashboardUserIdHeader, resolveHttpFavoriteOwner, init_favorite_owner, resolveSessionActor2, withReadAll2, sessionAccessFor2, SESSION_READ_DENIED2, canReadSession2, readableByFor2, SESSION_WRITE_DENIED2, hasSessionWrite2, NOT_YOUR_TASK_DENIED2, deniesNonOwnerTaskWrite2, denyParentAttach2, pathSessionDenial2, bodySessionDenial2, userAgentIdentityDenial2, init_session_access, runtimeInstanceHeader, bodyTask, bodyListTask, routeRegistry, isPublicRoute, findRoute, describeRequestRoute, route, init_route_def };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ownedSlice,
|
|
3
|
+
init_text
|
|
4
|
+
} from "./cli-5mpy301f.js";
|
|
1
5
|
import {
|
|
2
6
|
__esm
|
|
3
7
|
} from "./cli-242037k3.js";
|
|
@@ -72,7 +76,7 @@ function formatProviderError(norm, prefix) {
|
|
|
72
76
|
function truncateErrorText(text, maxChars) {
|
|
73
77
|
if (text.length <= maxChars)
|
|
74
78
|
return text;
|
|
75
|
-
return `${text
|
|
79
|
+
return `${ownedSlice(text, 0, maxChars)}... [truncated ${text.length - maxChars} chars]`;
|
|
76
80
|
}
|
|
77
81
|
function safeJsonStringify(value) {
|
|
78
82
|
try {
|
|
@@ -83,6 +87,8 @@ function safeJsonStringify(value) {
|
|
|
83
87
|
}
|
|
84
88
|
}
|
|
85
89
|
var MAX_PROVIDER_ERROR_BODY_CHARS = 4000;
|
|
86
|
-
var init_error_body = () => {
|
|
90
|
+
var init_error_body = __esm(() => {
|
|
91
|
+
init_text();
|
|
92
|
+
});
|
|
87
93
|
|
|
88
|
-
export { normalizeProviderError, formatProviderError, init_error_body };
|
|
94
|
+
export { normalizeProviderError, formatProviderError, truncateErrorText, init_error_body };
|