@desplega.ai/agent-swarm 2.7.7 → 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-3tt153af.js → actions-g563mbn2.js} +19 -19
- package/dist/{amp-adapter-njpts0yr.js → amp-adapter-q61w05eb.js} +3 -3
- package/dist/{anthropic-messages-xey2skwx.js → anthropic-messages-jkva0zps.js} +68 -78
- package/dist/{app-nky4378f.js → app-a66ssc4k.js} +3 -3
- package/dist/{assistant-jnb669pa.js → assistant-p477rjwj.js} +22 -22
- package/dist/{azure-openai-responses-26t7j9ra.js → azure-openai-responses-wgtqkbr3.js} +5 -10
- package/dist/boot-args-schema-h4qj462e.js +89 -0
- package/dist/{boot-reembed-9mgvaztt.js → boot-reembed-n1ehfbsw.js} +1 -1
- package/dist/{boot-reembed-qs2djdej.js → boot-reembed-qw4mc0pt.js} +1 -1
- package/dist/{boot-scrub-sweep-yjpdj7s1.js → boot-scrub-sweep-9w9jp4sm.js} +4 -4
- package/dist/{boot-seeds-5cm6ambd.js → boot-seeds-qdaf3sdy.js} +5 -4
- package/dist/{boxd-nv507va8.js → boxd-qbkxy6ap.js} +1 -1
- package/dist/{claude-adapter-fn287zmm.js → claude-adapter-348p5hx9.js} +8 -8
- package/dist/{claude-managed-adapter-dvs2xw5n.js → claude-managed-adapter-h74d06yz.js} +4 -4
- package/dist/{claude-managed-setup-wtdz2mj2.js → claude-managed-setup-7787fxtp.js} +5 -5
- package/dist/{claude-sdk-session-x91kqyhm.js → claude-sdk-session-hbszbt8a.js} +7901 -7718
- package/dist/{cli-cb2a8pna.js → cli-09kmfkmq.js} +4 -6
- package/dist/{cli-m0da8j35.js → cli-0whpms1z.js} +15 -10
- package/dist/{cli-5zx699j9.js → cli-12xyjhws.js} +29 -12
- package/dist/{cli-snpj5zbj.js → cli-1z4qggfe.js} +9 -36
- package/dist/{cli-e0kmphd6.js → cli-21159vea.js} +35 -12
- package/dist/{cli-s0qnd4wv.js → cli-28fq781p.js} +1 -1
- package/dist/{cli-qh4d4tvk.js → cli-2a8py3sx.js} +6 -6
- package/dist/{cli-adeegh7d.js → cli-2ccpqyyf.js} +412 -116
- 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-1c6tzt8g.js → cli-3tqcamp6.js} +13 -13
- package/dist/{cli-ae7mrdf9.js → cli-3vjhs18n.js} +4 -6
- package/dist/{cli-vfym7wmz.js → cli-3xcwp3z8.js} +10 -12
- package/dist/{cli-az48n0nr.js → cli-4caa1x7d.js} +67 -64
- package/dist/{cli-5jnhv72d.js → cli-4t0fmf3z.js} +30 -7
- package/dist/{cli-5b456bpf.js → cli-530hkwdy.js} +7 -9
- package/dist/{cli-pz4rk021.js → cli-54vrpgm0.js} +1 -1
- package/dist/{cli-ddaanqkd.js → cli-587857ys.js} +7 -7
- package/dist/{cli-r9jqcehk.js → cli-5mpy301f.js} +38 -2
- package/dist/{cli-cppkf404.js → cli-605nn699.js} +80 -43
- package/dist/{cli-6pfd54vx.js → cli-650zv9q9.js} +10 -10
- package/dist/cli-6pzk82fd.js +778 -0
- package/dist/{cli-gz6q4eve.js → cli-715t1gx6.js} +9 -9
- package/dist/{cli-08bmz9z9.js → cli-9aezs55w.js} +10 -12
- package/dist/{cli-tgrv9cjx.js → cli-9r5gtwjr.js} +3 -3
- package/dist/{cli-pc6n7fre.js → cli-a0657jmf.js} +2 -2
- package/dist/{cli-pjctyea3.js → cli-agyaeef4.js} +3 -3
- package/dist/cli-b932gexn.js +5266 -0
- package/dist/{cli-e46hg0xw.js → cli-bc779n4v.js} +3 -3
- package/dist/{cli-jtjtabxe.js → cli-btc9cb4c.js} +78 -5
- package/dist/{cli-caj33vcq.js → cli-btf6fw39.js} +5 -5
- package/dist/{cli-q3tkegby.js → cli-cseh6f8w.js} +5 -5
- package/dist/{cli-n6bv12jn.js → cli-cvs2r2vq.js} +23 -14
- package/dist/{cli-tfyyvzx6.js → cli-cyn9v8zr.js} +17 -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-nmzhp1b5.js → cli-ejkvvqbe.js} +55 -46
- package/dist/{cli-ftyxyspd.js → cli-eqtfgfr6.js} +1 -1
- package/dist/{cli-mthwvjre.js → cli-f2zenhja.js} +1 -1
- package/dist/{cli-ws19768n.js → cli-fayav105.js} +624 -227
- package/dist/{cli-ferkkrg9.js → cli-fjggej24.js} +2 -2
- package/dist/{cli-g7s47cc5.js → cli-fsgttth8.js} +123 -102
- package/dist/{cli-8305gbq0.js → cli-gce09r66.js} +5 -5
- package/dist/{cli-mkk9rnzz.js → cli-gxy8y1dt.js} +51 -4
- package/dist/{cli-fyt2g4wd.js → cli-hae9j8sv.js} +288 -76
- package/dist/{cli-agfm16v9.js → cli-hg42n3hx.js} +12 -12
- package/dist/{cli-qghe0h66.js → cli-hwprv9e4.js} +8 -10
- package/dist/{cli-yndmfxb3.js → cli-hxpyc9sn.js} +3 -3
- package/dist/{cli-72v799xn.js → cli-jfx48xrj.js} +10 -12
- package/dist/{cli-dhar9qay.js → cli-jrp1dt73.js} +2 -2
- package/dist/{cli-98rw5dt5.js → cli-jrzkw01m.js} +2 -2
- package/dist/{cli-ayayvfg4.js → cli-k70e3x9e.js} +24 -20
- package/dist/{cli-583frbyr.js → cli-kchjb7qy.js} +1 -1
- package/dist/{cli-cm5yqn35.js → cli-kf3pxxdg.js} +1 -0
- package/dist/{cli-fmjd0t1y.js → cli-m0cy2vyf.js} +2 -2
- package/dist/{cli-4zsenjhy.js → cli-m5akxq8q.js} +16 -3
- package/dist/{cli-73jzwksr.js → cli-m88rpzkh.js} +6 -3
- package/dist/{cli-95jzxcp3.js → cli-mnrkgg60.js} +4 -4
- package/dist/{cli-p82cnnjq.js → cli-ms5m5r1y.js} +1 -1
- package/dist/{cli-fy6x31ps.js → cli-n5yexkdg.js} +1 -0
- package/dist/{cli-wk5yrfwd.js → cli-neyag5p6.js} +191 -85
- package/dist/cli-p0m0p34z.js +9321 -0
- package/dist/{cli-yyj3j5m4.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-35rsp8ye.js → cli-qkdmz8c8.js} +1 -1
- package/dist/{cli-rtt8g4v9.js → cli-qmd3mse0.js} +2 -2
- package/dist/{cli-je518txm.js → cli-qzt90yze.js} +20 -20
- package/dist/cli-rkc97c6a.js +39 -0
- package/dist/{cli-75gkpjvw.js → cli-rvhdmjvt.js} +8 -12
- package/dist/{cli-6g0hb4cp.js → cli-rwymrnaz.js} +18608 -9089
- package/dist/{cli-3fg0bdcv.js → cli-serm8zrx.js} +6 -6
- package/dist/{cli-g08zdaec.js → cli-sgs5k6yd.js} +1 -1
- package/dist/{cli-afkqkrtw.js → cli-sya22y84.js} +21 -9
- package/dist/{cli-318r69gq.js → cli-t73cas91.js} +440 -9
- package/dist/{cli-e5bzrn01.js → cli-tqq0hspb.js} +2 -2
- package/dist/{cli-pq73h5mz.js → cli-v3cf1ts9.js} +3 -3
- package/dist/{cli-bfv7vdg6.js → cli-varqt4d1.js} +28 -16
- package/dist/{cli-k899ehvh.js → cli-vxh6acp7.js} +6 -6
- package/dist/{cli-g83s9ewh.js → cli-xfjrc279.js} +1 -1
- package/dist/{cli-k1nje3v3.js → cli-xk879m3k.js} +129 -115
- package/dist/{cli-7cx2m6t2.js → cli-y5rbvxhc.js} +2 -2
- package/dist/{cli-8sckt74b.js → cli-y8nbefpb.js} +41 -19
- 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-k8196sh2.js → cli-zgv8gxgs.js} +9 -8
- package/dist/cli.js +34 -52
- package/dist/{cloudflare-workers-ai-system-one-ef2a980q.js → cloudflare-workers-ai-system-one-9y1zx3pt.js} +2 -2
- package/dist/{codex-adapter-cf2yxe9m.js → codex-adapter-ysq6bzha.js} +7 -7
- package/dist/{codex-hook-a0c6g6t6.js → codex-hook-fac6175r.js} +1 -1
- package/dist/{codex-login-y0pmff1c.js → codex-login-bcda78ge.js} +2 -2
- package/dist/{codex-session-runner-6vfzdgbd.js → codex-session-runner-qakzfx93.js} +8 -8
- package/dist/{commands-t3mfy7vn.js → commands-rs7hkv9r.js} +3 -3
- package/dist/{controller-q7xrbaz0.js → controller-r5x9bg6e.js} +4 -4
- package/dist/{controllers-connect-c6nm70kg.js → controllers-connect-498hrxvk.js} +24 -24
- package/dist/{cursor-adapter-ftd81ga8.js → cursor-adapter-d46qszer.js} +2 -2
- package/dist/{db-vemtpmcc.js → db-pm96nhdb.js} +6 -2
- package/dist/{db-dk572x25.js → db-s13dqhr6.js} +3 -3
- package/dist/{devin-adapter-r9phbnc9.js → devin-adapter-z46ep5ph.js} +1 -1
- package/dist/{dispatcher-kh7ecxh9.js → dispatcher-j3h81t7m.js} +18 -18
- package/dist/{docker-c1a3gqmf.js → docker-866qpzt9.js} +2 -2
- package/dist/{dsh-adapter-v8628r89.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-nenw4x63.js → easter-egg-3d-qtgfxgze.js} +1 -1
- package/dist/{embedding-space-0jepb239.js → embedding-space-xh8p4q4x.js} +6 -6
- package/dist/{embeddings-xxt49yxg.js → embeddings-wp745m91.js} +1 -1
- package/dist/{event-bus-g0ka3pbw.js → event-bus-e66gh7cc.js} +1 -1
- package/dist/{execute-1mhw6e4x.js → execute-2fzb9z74.js} +1 -1
- package/dist/{external-channel-55v12e60.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-k42svnr0.js → heartbeat-8phn1kdq.js} +21 -21
- package/dist/{hook-6nphweh0.js → hook-amcj4s10.js} +16 -11
- package/dist/{hook-114m7hap.js → hook-bc6n49qn.js} +5 -5
- package/dist/{http-r8cc4wz7.js → http-7374brv5.js} +854 -332
- 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-nh3wyqdt.js → index-c9y31ytf.js} +16 -16
- package/dist/{index-h39zbx67.js → index-hsad2t3r.js} +31 -31
- package/dist/index-nfy4kkg5.js +33 -0
- package/dist/{index-e3s8wmxy.js → index-p4hjwbvw.js} +1 -1
- package/dist/{index-k7fj52d3.js → index-q5cmtbz5.js} +6 -6
- package/dist/{index-fpk4bcd9.js → index-w4m9z29z.js} +1 -1
- package/dist/{keepalive-x060nt9p.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-2xxfexhf.js → maintenance-h2ds9w6c.js} +1 -1
- package/dist/{mistral-conversations-3gjpdb4b.js → mistral-conversations-a45tx39a.js} +29 -51
- package/dist/{oauth-refresh-sweep-fckc4ar5.js → oauth-refresh-sweep-q7mtbyp3.js} +3 -3
- package/dist/{onboard-zc48j237.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-r690h1cr.js → opencode-adapter-mtb0953j.js} +6 -6
- package/dist/{openrouter-images-3ecegv0d.js → openrouter-images-xr9gme9x.js} +4 -3
- package/dist/{otel-impl-r5xbh81q.js → otel-impl-j42czw3r.js} +2 -2
- package/dist/{pi-messages-pchtw4he.js → pi-messages-hjbv8v10.js} +28 -12
- package/dist/{pi-mono-adapter-c7v8sdec.js → pi-mono-adapter-zk8pg9jr.js} +30 -27
- package/dist/{pricing-refresh-3pmre11v.js → pricing-refresh-x7nhv23d.js} +3 -3
- package/dist/{rbac-roles-3vbshwsb.js → rbac-roles-9044425x.js} +16 -2
- package/dist/rbac-roles-bzvee6cf.js +37 -0
- package/dist/{render-v2-pxykkbab.js → render-v2-t7bn4skz.js} +3 -3
- package/dist/{resume-adda0bwy.js → resume-x94gemep.js} +7 -7
- package/dist/{runtime-fnbm7stk.js → runtime-breq6fmv.js} +1 -1
- package/dist/{session-access-2fvamrdc.js → session-access-q7dmqjvt.js} +7 -5
- package/dist/{session-source-backfill-08xvv0sm.js → session-source-backfill-440ysamr.js} +3 -3
- package/dist/{setup-1aqmvmh1.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-9s0yrm5j.js → work-objects-pnq5y534.js} +21 -21
- package/dist/{worker-follow-up-3q78fqmr.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 +1268 -276
- package/package.json +10 -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/model-profiles.ts +1 -1
- package/src/be/db/session-tree.ts +9 -5
- package/src/be/db/session-visibility.ts +25 -9
- package/src/be/db/tasks/read.ts +33 -6
- package/src/be/db/tasks/write.ts +77 -7
- package/src/be/db-queries/tracker.ts +4 -2
- package/src/be/db.ts +53 -19
- package/src/be/improvements.ts +416 -0
- package/src/be/migrations/271_subscription_usage_model.sql +30 -0
- package/src/be/migrations/274_improvements.sql +27 -0
- package/src/be/migrations/275_task_dispatched_by.sql +8 -0
- package/src/be/model-validation.ts +19 -1
- package/src/be/rbac-roles.ts +144 -1
- package/src/be/runtime-pools/routing.ts +1 -1
- package/src/be/scripts/boot-args-schema.ts +95 -0
- package/src/be/scripts/extract-schema.ts +15 -10
- package/src/be/seed-scripts/catalog/boot-triage.inline.ts +1 -1
- package/src/be/seed-scripts/catalog/boot-triage.ts +1 -1
- package/src/be/seed-scripts/catalog/get-child-outputs.ts +1 -1
- package/src/be/seed-scripts/catalog/wait-for-task.ts +1 -1
- package/src/be/swarm-config-guard.ts +8 -0
- package/src/be/users.ts +64 -5
- package/src/cli.tsx +5 -25
- package/src/commands/claude-managed-setup.ts +1 -1
- 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 +143 -105
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/hooks/hook.ts +13 -5
- package/src/http/agents.ts +7 -1
- package/src/http/all-routes.ts +1 -0
- package/src/http/approval-requests.ts +32 -50
- package/src/http/auth.ts +5 -4
- package/src/http/codex-oauth-accounts.ts +31 -23
- package/src/http/codex-oauth-device.ts +3 -3
- package/src/http/codex-oauth-keep-warm.ts +1 -1
- package/src/http/improvements.ts +317 -0
- package/src/http/index.ts +10 -0
- package/src/http/mcp-oauth.ts +6 -0
- package/src/http/mcp-servers.ts +8 -0
- package/src/http/models-catalog.ts +1 -1
- package/src/http/operator-actor.ts +2 -1
- package/src/http/pages-public.ts +38 -1
- package/src/http/person-responder.ts +66 -0
- package/src/http/poll.ts +3 -4
- package/src/http/prompt-templates.ts +1 -1
- package/src/http/schedules.ts +4 -0
- package/src/http/script-runs.ts +6 -1
- package/src/http/session-access.ts +61 -6
- package/src/http/sessions.ts +67 -9
- package/src/http/tasks.ts +53 -9
- package/src/http/user-roles.ts +11 -2
- package/src/http/users.ts +224 -105
- package/src/http/utils.ts +2 -1
- package/src/http/workflows.ts +11 -7
- package/src/prompts/session-templates.ts +1 -0
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +17 -3
- package/src/providers/codex-models.ts +4 -3
- package/src/providers/codex-oauth/auth-json.ts +14 -18
- package/src/providers/codex-oauth/device.ts +49 -15
- package/src/providers/codex-oauth/flow.ts +2 -1
- package/src/providers/codex-oauth/storage.ts +2 -2
- package/src/providers/pi-mono-adapter.ts +8 -0
- package/src/providers/pricing-sources.md +16 -1
- package/src/providers/swarm-events-shared.ts +15 -2
- package/src/rbac/legacy-policy.ts +3 -0
- package/src/rbac/permissions.ts +15 -0
- package/src/scheduler/deferred-task-waits.ts +9 -4
- package/src/scripts-runtime/extract-args-schema.ts +3 -1
- package/src/scripts-runtime/swarm-sdk.ts +1 -1
- package/src/scripts-runtime/types/swarm-extension.d.ts +31 -28
- package/src/server-user.ts +1 -1
- package/src/server.ts +2 -0
- package/src/slack/ack.ts +68 -26
- package/src/slack/blocks.ts +1 -0
- package/src/slack/reaction-shortcode.ts +8 -2
- package/src/slack/render-v2.ts +72 -20
- package/src/slack/task-output.ts +4 -1
- package/src/slack/thread-buffer.ts +2 -2
- package/src/tasks/task-skip.ts +28 -0
- package/src/tasks/terminal-result-guard.ts +3 -2
- package/src/telemetry.ts +28 -1
- package/src/tests/agentmail-inbox-mapping.test.ts +73 -0
- package/src/tests/api-drain-worker-e2e.test.ts +69 -2
- package/src/tests/approval-requests.test.ts +58 -0
- 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-managed-setup.test.ts +36 -0
- package/src/tests/claude-worker-parity.test.ts +2 -2
- package/src/tests/codex-adapter.test.ts +32 -2
- 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 +61 -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/codex-swarm-events.test.ts +43 -1
- package/src/tests/context-window.test.ts +14 -0
- package/src/tests/db-queries-tracker.test.ts +2 -1
- package/src/tests/db-task-read-contract.test.ts +3 -0
- package/src/tests/db-task-write-contract.test.ts +3 -0
- package/src/tests/deferred-task-wake.test.ts +7 -2
- package/src/tests/deploy-one-box.test.ts +39 -1
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/e2e-coverage-contract.test.ts +235 -0
- package/src/tests/empty-output-schema.test.ts +160 -0
- package/src/tests/env-flag.test.ts +1 -0
- package/src/tests/explicit-model-validation.test.ts +14 -0
- 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/http-api-integration.test.ts +2 -2
- package/src/tests/http-users.test.ts +63 -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/mcp-input-caps.test.ts +4 -3
- package/src/tests/merge-gate-detect-changes.test.ts +22 -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/pages-authed-mode.test.ts +13 -2
- package/src/tests/pi-mono-adapter.test.ts +39 -4
- package/src/tests/rbac-engine.test.ts +3 -0
- package/src/tests/runner-context-usage.test.ts +118 -0
- 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/script-connections.test.ts +2 -0
- package/src/tests/script-executor-quickjs.test.ts +2 -0
- package/src/tests/script-runs-http.test.ts +57 -0
- package/src/tests/scripts-boot-args-schema.test.ts +181 -0
- package/src/tests/scripts-runtime.test.ts +24 -0
- package/src/tests/sdk-store-progress-skipped.test.ts +155 -0
- package/src/tests/send-task-dispatched-by.test.ts +129 -0
- package/src/tests/session-costs-model-key-normalize.test.ts +59 -0
- package/src/tests/session-dispatched-tasks.test.ts +115 -0
- package/src/tests/session-sharing.test.ts +402 -3
- package/src/tests/slack-file-tools-attachments.test.ts +95 -3
- package/src/tests/slack-reaction-config.test.ts +40 -0
- package/src/tests/slack-render-v2.test.ts +120 -0
- package/src/tests/slack-skip-reaction.test.ts +203 -0
- package/src/tests/store-progress-skipped.test.ts +159 -0
- package/src/tests/submit-improvement-tool.test.ts +82 -0
- package/src/tests/subscription-usage-migration.test.ts +57 -0
- package/src/tests/swarm-config-reserved-keys.test.ts +3 -0
- package/src/tests/telemetry-endpoint-override.test.ts +27 -0
- package/src/tests/tool-annotations.test.ts +1 -1
- package/src/tests/trigger-claiming.test.ts +2 -0
- package/src/tests/workflow-system-one-extraction.test.ts +29 -0
- package/src/tools/create-channel.ts +1 -1
- package/src/tools/defer-task.ts +1 -1
- package/src/tools/manage-user.ts +88 -58
- package/src/tools/register-agentmail-inbox.ts +5 -0
- package/src/tools/repos/update-repo.ts +1 -1
- package/src/tools/request-human-input.ts +1 -1
- package/src/tools/send-task.ts +4 -1
- package/src/tools/slack-read.ts +61 -33
- package/src/tools/store-progress.ts +39 -8
- package/src/tools/submit-improvement.ts +68 -0
- package/src/tools/tool-config.ts +3 -0
- package/src/tools/tracker/tracker-unlink.ts +2 -1
- package/src/tools/workflows/retry-workflow-run.ts +3 -0
- package/src/types.ts +16 -2
- package/src/utils/context-window.ts +6 -1
- package/src/utils/output-schema.ts +23 -0
- package/src/utils/request-auth-context.ts +6 -1
- package/src/workflows/executors/system-one-providers.ts +25 -6
- package/src/workflows/recovery.ts +8 -4
- package/src/workflows/resume.ts +19 -0
- 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-7b4vk3h5.js +0 -16
- package/dist/cli-5c4hjzne.js +0 -873
- package/dist/cli-excnnjg2.js +0 -20222
- package/dist/cli-pc5znp64.js +0 -364
- package/dist/cli-vz22fyqv.js +0 -428
- package/dist/fx-adapter-bs8wqrk5.js +0 -19
- package/dist/grok-adapter-gpjqmkcq.js +0 -19
- package/dist/handlers-zxmp1ta4.js +0 -32
- package/dist/index-a8phxqnk.js +0 -37
- package/dist/index-k6h00t4c.js +0 -30
- package/dist/index-xrz7te8h.js +0 -33
- package/dist/lead-956sd2yc.js +0 -71
- package/dist/rbac-roles-910mmkgz.js +0 -26
- package/dist/virtual-modules-d2pjk9j1.js +0 -59
- package/dist/worker-y15hy08h.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
|
-
} from "./cli-
|
|
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,23 +113,25 @@ 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,
|
|
126
128
|
init_config_secrets,
|
|
129
|
+
isEffectiveOutputSchema,
|
|
130
|
+
init_output_schema,
|
|
127
131
|
vcsRepoName,
|
|
128
132
|
vcsRepoUrlMatches,
|
|
129
|
-
init_vcs_repo_match
|
|
130
|
-
|
|
131
|
-
init_api_drain2
|
|
132
|
-
} from "./cli-wk5yrfwd.js";
|
|
133
|
+
init_vcs_repo_match
|
|
134
|
+
} from "./cli-neyag5p6.js";
|
|
133
135
|
import {
|
|
134
136
|
parseWorkerModelTierOverrides,
|
|
135
137
|
resolveTaskModelSelection,
|
|
@@ -137,7 +139,7 @@ import {
|
|
|
137
139
|
ProviderNameSchema,
|
|
138
140
|
WorkerNudgeSchema,
|
|
139
141
|
init_types4
|
|
140
|
-
} from "./cli-
|
|
142
|
+
} from "./cli-cvs2r2vq.js";
|
|
141
143
|
import {
|
|
142
144
|
isCodexAuthFailureReason,
|
|
143
145
|
init_codex_auth_failure
|
|
@@ -158,6 +160,7 @@ import {
|
|
|
158
160
|
buildContextPreamble,
|
|
159
161
|
buildResumeContextPreamble,
|
|
160
162
|
init_context_preamble,
|
|
163
|
+
fetchProfileSyncRejectionBanner,
|
|
161
164
|
prependProfileSyncRejectionBanner,
|
|
162
165
|
writeIdentityBaselines,
|
|
163
166
|
bootIdentityBaselines,
|
|
@@ -166,7 +169,7 @@ import {
|
|
|
166
169
|
resolveClaudeMdPath,
|
|
167
170
|
syncProfileFilesToServer,
|
|
168
171
|
init_profile_sync
|
|
169
|
-
} from "./cli-
|
|
172
|
+
} from "./cli-9r5gtwjr.js";
|
|
170
173
|
import {
|
|
171
174
|
isSteeringEnabled2,
|
|
172
175
|
init_steering_enabled
|
|
@@ -187,19 +190,19 @@ import {
|
|
|
187
190
|
CLAUDE_CREDENTIALS_HINT,
|
|
188
191
|
resolveCredentialPools,
|
|
189
192
|
init_credentials2
|
|
190
|
-
} from "./cli-
|
|
193
|
+
} from "./cli-xfjrc279.js";
|
|
191
194
|
import {
|
|
192
195
|
interpolate,
|
|
193
196
|
init_template2,
|
|
194
197
|
configureHttpResolver,
|
|
195
198
|
resolveTemplateAsync,
|
|
196
199
|
init_resolver
|
|
197
|
-
} from "./cli-
|
|
200
|
+
} from "./cli-kf3pxxdg.js";
|
|
198
201
|
import {
|
|
199
202
|
runtimeHarnessSections,
|
|
200
203
|
refreshRuntimeModelCatalog,
|
|
201
204
|
init_runtime_model_catalog
|
|
202
|
-
} from "./cli-
|
|
205
|
+
} from "./cli-2r0jcc3k.js";
|
|
203
206
|
import {
|
|
204
207
|
getMcpBaseUrl,
|
|
205
208
|
init_constants3
|
|
@@ -212,12 +215,6 @@ import {
|
|
|
212
215
|
getApiKey,
|
|
213
216
|
init_api_key
|
|
214
217
|
} from "./cli-pax9q4ff.js";
|
|
215
|
-
import {
|
|
216
|
-
scrubSecrets,
|
|
217
|
-
registerEnvSecrets,
|
|
218
|
-
registerSensitiveKeyName,
|
|
219
|
-
init_secret_scrubber
|
|
220
|
-
} from "./cli-1b7btd38.js";
|
|
221
218
|
import {
|
|
222
219
|
isChatgptSubscriptionModel,
|
|
223
220
|
harnessModelMismatch,
|
|
@@ -226,8 +223,12 @@ import {
|
|
|
226
223
|
providerBaseUrl,
|
|
227
224
|
openAICompatibleProvider,
|
|
228
225
|
providerKeyFromEnv,
|
|
229
|
-
init_src2
|
|
230
|
-
|
|
226
|
+
init_src2,
|
|
227
|
+
scrubSecrets,
|
|
228
|
+
registerEnvSecrets,
|
|
229
|
+
registerSensitiveKeyName,
|
|
230
|
+
init_secret_scrubber
|
|
231
|
+
} from "./cli-d84byzn8.js";
|
|
231
232
|
|
|
232
233
|
// src/commands/runner.ts
|
|
233
234
|
init_src2();
|
|
@@ -269,51 +270,51 @@ init_storage();
|
|
|
269
270
|
async function createProviderAdapter(provider) {
|
|
270
271
|
switch (provider) {
|
|
271
272
|
case "claude": {
|
|
272
|
-
const { ClaudeAdapter } = await import("./claude-adapter-
|
|
273
|
+
const { ClaudeAdapter } = await import("./claude-adapter-348p5hx9.js");
|
|
273
274
|
return new ClaudeAdapter;
|
|
274
275
|
}
|
|
275
276
|
case "pi": {
|
|
276
|
-
const { PiMonoAdapter } = await import("./pi-mono-adapter-
|
|
277
|
+
const { PiMonoAdapter } = await import("./pi-mono-adapter-zk8pg9jr.js");
|
|
277
278
|
return new PiMonoAdapter;
|
|
278
279
|
}
|
|
279
280
|
case "codex": {
|
|
280
|
-
const { CodexAdapter } = await import("./codex-adapter-
|
|
281
|
+
const { CodexAdapter } = await import("./codex-adapter-ysq6bzha.js");
|
|
281
282
|
return new CodexAdapter;
|
|
282
283
|
}
|
|
283
284
|
case "claude-managed": {
|
|
284
|
-
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-
|
|
285
|
+
const { ClaudeManagedAdapter } = await import("./claude-managed-adapter-h74d06yz.js");
|
|
285
286
|
return new ClaudeManagedAdapter;
|
|
286
287
|
}
|
|
287
288
|
case "devin": {
|
|
288
|
-
const { DevinAdapter } = await import("./devin-adapter-
|
|
289
|
+
const { DevinAdapter } = await import("./devin-adapter-z46ep5ph.js");
|
|
289
290
|
return new DevinAdapter;
|
|
290
291
|
}
|
|
291
292
|
case "opencode": {
|
|
292
|
-
const { OpencodeAdapter } = await import("./opencode-adapter-
|
|
293
|
+
const { OpencodeAdapter } = await import("./opencode-adapter-mtb0953j.js");
|
|
293
294
|
return new OpencodeAdapter;
|
|
294
295
|
}
|
|
295
296
|
case "dsh": {
|
|
296
|
-
const { DshAdapter } = await import("./dsh-adapter-
|
|
297
|
+
const { DshAdapter } = await import("./dsh-adapter-rw0d5rc4.js");
|
|
297
298
|
return new DshAdapter;
|
|
298
299
|
}
|
|
299
300
|
case "amp": {
|
|
300
|
-
const { AmpAdapter } = await import("./amp-adapter-
|
|
301
|
+
const { AmpAdapter } = await import("./amp-adapter-q61w05eb.js");
|
|
301
302
|
return new AmpAdapter;
|
|
302
303
|
}
|
|
303
304
|
case "cursor": {
|
|
304
|
-
const { CursorAdapter } = await import("./cursor-adapter-
|
|
305
|
+
const { CursorAdapter } = await import("./cursor-adapter-d46qszer.js");
|
|
305
306
|
return new CursorAdapter;
|
|
306
307
|
}
|
|
307
308
|
case "grok": {
|
|
308
|
-
const { GrokAdapter } = await import("./grok-adapter-
|
|
309
|
+
const { GrokAdapter } = await import("./grok-adapter-spea7zkj.js");
|
|
309
310
|
return new GrokAdapter;
|
|
310
311
|
}
|
|
311
312
|
case "fx": {
|
|
312
|
-
const { FxAdapter } = await import("./fx-adapter-
|
|
313
|
+
const { FxAdapter } = await import("./fx-adapter-vz0b9z3g.js");
|
|
313
314
|
return new FxAdapter;
|
|
314
315
|
}
|
|
315
316
|
case "acp": {
|
|
316
|
-
const { ACPAdapter } = await import("./acp-adapter-
|
|
317
|
+
const { ACPAdapter } = await import("./acp-adapter-dn4gdsgr.js");
|
|
317
318
|
return new ACPAdapter;
|
|
318
319
|
}
|
|
319
320
|
default:
|
|
@@ -636,6 +637,9 @@ function resolveHarnessProvider(resolvedEnv, fallbackEnv = process.env) {
|
|
|
636
637
|
return parsed.data;
|
|
637
638
|
}
|
|
638
639
|
|
|
640
|
+
// src/commands/runner.ts
|
|
641
|
+
init_output_schema();
|
|
642
|
+
|
|
639
643
|
// src/utils/pretty-print.ts
|
|
640
644
|
var colors = {
|
|
641
645
|
reset: "\x1B[0m",
|
|
@@ -1310,7 +1314,7 @@ var CREDENTIAL_PROVIDER_CHECKERS = {
|
|
|
1310
1314
|
devin: (env) => checkDevinCredentials2(env),
|
|
1311
1315
|
opencode: (env, opts) => checkOpencodeCredentials2(env, opts),
|
|
1312
1316
|
pi: async (env, opts) => {
|
|
1313
|
-
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-
|
|
1317
|
+
const { checkPiMonoCredentials, listPiOpencodeGoModelIds } = await import("./pi-mono-adapter-zk8pg9jr.js");
|
|
1314
1318
|
return {
|
|
1315
1319
|
...await checkPiMonoCredentials(env, opts),
|
|
1316
1320
|
opencodeGoModels: listPiOpencodeGoModelIds()
|
|
@@ -1589,7 +1593,7 @@ async function validateProviderCredentials(provider, env = process.env, presence
|
|
|
1589
1593
|
latency_ms: Date.now() - startedAt
|
|
1590
1594
|
};
|
|
1591
1595
|
}
|
|
1592
|
-
const { liveTestCursorKey } = await import("./cursor-adapter-
|
|
1596
|
+
const { liveTestCursorKey } = await import("./cursor-adapter-d46qszer.js");
|
|
1593
1597
|
return checkEachKey("CURSOR_API_KEY", apiKey, async (member) => {
|
|
1594
1598
|
const start = Date.now();
|
|
1595
1599
|
const result = await liveTestCursorKey(member);
|
|
@@ -2366,8 +2370,10 @@ async function ensureRepoForTask(repoConfig, role, isFirstKickoff = false) {
|
|
|
2366
2370
|
warning = await refreshExistingRepoForTask({ name, clonePath, defaultBranch }, role, isFirstKickoff);
|
|
2367
2371
|
}
|
|
2368
2372
|
await installRepoHooksForTask(repoConfig, role);
|
|
2369
|
-
const claudeMd = await
|
|
2370
|
-
|
|
2373
|
+
const [claudeMd, autoStashes] = await Promise.all([
|
|
2374
|
+
readClaudeMd(clonePath, role),
|
|
2375
|
+
listSwarmAutostashes(clonePath, role)
|
|
2376
|
+
]);
|
|
2371
2377
|
return { clonePath, claudeMd, warning, autoStashes };
|
|
2372
2378
|
} catch (err) {
|
|
2373
2379
|
const errorMsg = scrubSecrets(err.message);
|
|
@@ -2750,6 +2756,7 @@ var SWARM_TOOL_LABELS = {
|
|
|
2750
2756
|
"read-messages": "\uD83D\uDCAC Reading messages",
|
|
2751
2757
|
"request-human-input": "\uD83D\uDE4B Requesting human input",
|
|
2752
2758
|
"cancel-approval-request": "\uD83D\uDEAB Cancelling approval request",
|
|
2759
|
+
"submit-improvement": "\uD83D\uDCA1 Drafting improvement",
|
|
2753
2760
|
"cancel-task": "\uD83D\uDEAB Cancelling task",
|
|
2754
2761
|
"db-query": "\uD83D\uDDC3️ Querying database",
|
|
2755
2762
|
"inject-learning": "\uD83E\uDDE0 Storing learning",
|
|
@@ -2939,7 +2946,7 @@ async function handleStructuredOutputFallback(config, taskId, adapterType, provi
|
|
|
2939
2946
|
if (!taskRes.ok)
|
|
2940
2947
|
return { kind: "fetch-error", error: `HTTP ${taskRes.status}` };
|
|
2941
2948
|
const taskData = await taskRes.json();
|
|
2942
|
-
if (!taskData.outputSchema) {
|
|
2949
|
+
if (!isEffectiveOutputSchema(taskData.outputSchema)) {
|
|
2943
2950
|
const lastProgressLog = (taskData.logs ?? []).filter((l) => l.eventType === "task_progress").sort((a, b) => (b.createdAt ?? "").localeCompare(a.createdAt ?? ""))[0];
|
|
2944
2951
|
const lastProgress = lastProgressLog?.newValue ?? taskData.progress;
|
|
2945
2952
|
return { kind: "no-schema", lastProgress: lastProgress || undefined };
|
|
@@ -2997,7 +3004,7 @@ async function validateProviderOutputIfNeeded(config, taskId, providerOutput) {
|
|
|
2997
3004
|
return { ok: true };
|
|
2998
3005
|
}
|
|
2999
3006
|
const taskData = await taskRes.json();
|
|
3000
|
-
if (!taskData.outputSchema
|
|
3007
|
+
if (!isEffectiveOutputSchema(taskData.outputSchema)) {
|
|
3001
3008
|
return { ok: true };
|
|
3002
3009
|
}
|
|
3003
3010
|
let firstValidationErrors;
|
|
@@ -3187,20 +3194,22 @@ async function resolveCodexOAuthCredentialInfo(apiUrl, apiKey, opts = {}) {
|
|
|
3187
3194
|
try {
|
|
3188
3195
|
const slots = await loadAllCodexOAuthSlots(apiUrl, apiKey);
|
|
3189
3196
|
if (slots.length > 0) {
|
|
3197
|
+
const allSlotIndices = slots.map((s) => s.slot);
|
|
3198
|
+
const totalKeys = Math.max(...allSlotIndices) + 1;
|
|
3190
3199
|
let availableIndices;
|
|
3191
3200
|
let authFailureFence;
|
|
3192
3201
|
try {
|
|
3193
|
-
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}` } });
|
|
3194
3203
|
if (resp.ok) {
|
|
3195
3204
|
const data = await resp.json();
|
|
3196
3205
|
availableIndices = data.availableIndices;
|
|
3197
3206
|
authFailureFence = data.authFailureFence;
|
|
3198
|
-
|
|
3199
|
-
|
|
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)`);
|
|
3200
3210
|
}
|
|
3201
3211
|
}
|
|
3202
3212
|
} catch {}
|
|
3203
|
-
const allSlotIndices = slots.map((s) => s.slot);
|
|
3204
3213
|
let selectedSlot;
|
|
3205
3214
|
if (availableIndices && availableIndices.length > 0) {
|
|
3206
3215
|
const eligible = allSlotIndices.filter((i) => availableIndices.includes(i));
|
|
@@ -4095,7 +4104,7 @@ async function pollForTriggerOnce(opts) {
|
|
|
4095
4104
|
async function buildTaskOutputInstructions(outputSchema, hasMcp) {
|
|
4096
4105
|
if (!hasMcp)
|
|
4097
4106
|
return "";
|
|
4098
|
-
const result = outputSchema
|
|
4107
|
+
const result = isEffectiveOutputSchema(outputSchema) ? await resolveTemplateAsync("task.output.schema", {
|
|
4099
4108
|
schema: JSON.stringify(outputSchema, null, 2)
|
|
4100
4109
|
}) : await resolveTemplateAsync("task.output.generic", {});
|
|
4101
4110
|
return result.text;
|
|
@@ -4404,7 +4413,7 @@ function implicitCloseActiveToolSpans(activeToolSpans, now = Date.now()) {
|
|
|
4404
4413
|
}
|
|
4405
4414
|
return closed;
|
|
4406
4415
|
}
|
|
4407
|
-
async function spawnProviderProcess(adapter, opts, logDir
|
|
4416
|
+
async function spawnProviderProcess(adapter, opts, logDir) {
|
|
4408
4417
|
const realTaskId = opts.taskId;
|
|
4409
4418
|
const effectiveTaskId = realTaskId || crypto.randomUUID();
|
|
4410
4419
|
const sessionRepo = opts.vcsRepo ? await fetchRepoConfig(opts.apiUrl, opts.apiKey, opts.vcsRepo, true) : null;
|
|
@@ -4614,6 +4623,7 @@ async function spawnProviderProcess(adapter, opts, logDir, isYolo) {
|
|
|
4614
4623
|
const lastCostHolder = {};
|
|
4615
4624
|
let lastContextPostTime = 0;
|
|
4616
4625
|
const CONTEXT_THROTTLE_MS = 30000;
|
|
4626
|
+
let latestContextWindow;
|
|
4617
4627
|
let cumulativeProgressOutputTokens = 0;
|
|
4618
4628
|
function bufferSessionLogLine(content) {
|
|
4619
4629
|
if (!shouldStream)
|
|
@@ -4806,6 +4816,9 @@ async function spawnProviderProcess(adapter, opts, logDir, isYolo) {
|
|
|
4806
4816
|
});
|
|
4807
4817
|
break;
|
|
4808
4818
|
case "context_usage": {
|
|
4819
|
+
if (event.contextTotalTokens != null && Number.isFinite(event.contextTotalTokens) && event.contextTotalTokens > 0) {
|
|
4820
|
+
latestContextWindow = event.contextTotalTokens;
|
|
4821
|
+
}
|
|
4809
4822
|
const now2 = Date.now();
|
|
4810
4823
|
if (now2 - lastContextPostTime >= CONTEXT_THROTTLE_MS) {
|
|
4811
4824
|
lastContextPostTime = now2;
|
|
@@ -4832,6 +4845,9 @@ async function spawnProviderProcess(adapter, opts, logDir, isYolo) {
|
|
|
4832
4845
|
break;
|
|
4833
4846
|
}
|
|
4834
4847
|
case "compaction": {
|
|
4848
|
+
if (Number.isFinite(event.contextTotalTokens) && event.contextTotalTokens > 0) {
|
|
4849
|
+
latestContextWindow = event.contextTotalTokens;
|
|
4850
|
+
}
|
|
4835
4851
|
telemetry.compaction("triggered", {
|
|
4836
4852
|
compactTrigger: event.compactTrigger,
|
|
4837
4853
|
preCompactTokens: event.preCompactTokens,
|
|
@@ -4921,11 +4937,7 @@ async function spawnProviderProcess(adapter, opts, logDir, isYolo) {
|
|
|
4921
4937
|
const existingErrors = await errorsFileRef.exists() ? await errorsFileRef.text() : "";
|
|
4922
4938
|
await Bun.write(errorsFile, `${existingErrors}${JSON.stringify(errorLog)}
|
|
4923
4939
|
`);
|
|
4924
|
-
|
|
4925
|
-
console.error(`[${opts.role}] Task ${effectiveTaskId.slice(0, 8)} exited with code ${result.exitCode}.`);
|
|
4926
|
-
} else {
|
|
4927
|
-
console.warn(`[${opts.role}] Task ${effectiveTaskId.slice(0, 8)} exited with code ${result.exitCode}. YOLO mode - continuing...`);
|
|
4928
|
-
}
|
|
4940
|
+
console.error(`[${opts.role}] Task ${effectiveTaskId.slice(0, 8)} exited with code ${result.exitCode}. Continuing to poll for work.`);
|
|
4929
4941
|
}
|
|
4930
4942
|
result.cost ??= lastCostHolder.value;
|
|
4931
4943
|
if (result.cost) {
|
|
@@ -4973,7 +4985,7 @@ async function spawnProviderProcess(adapter, opts, logDir, isYolo) {
|
|
|
4973
4985
|
sessionId: opts.runnerSessionId,
|
|
4974
4986
|
cumulativeInputTokens: result.cost.inputTokens ?? 0,
|
|
4975
4987
|
cumulativeOutputTokens: result.cost.outputTokens ?? 0,
|
|
4976
|
-
contextTotalTokens: getContextWindowSize(result.cost.model || "default")
|
|
4988
|
+
contextTotalTokens: getContextWindowSize(result.cost.model || "default", latestContextWindow)
|
|
4977
4989
|
})
|
|
4978
4990
|
}).catch(() => {});
|
|
4979
4991
|
}
|
|
@@ -5113,9 +5125,9 @@ async function handOffTasksForApiDrain(state, role, apiConfig) {
|
|
|
5113
5125
|
async function reconcileActiveTasks(state, role, opts) {
|
|
5114
5126
|
const now = opts.now ?? Date.now;
|
|
5115
5127
|
const graceMs = opts.abortGraceMs ?? ABORT_SETTLE_GRACE_MS;
|
|
5116
|
-
|
|
5128
|
+
const reconcileOne = async (taskId, task) => {
|
|
5117
5129
|
if (task.result !== null)
|
|
5118
|
-
|
|
5130
|
+
return;
|
|
5119
5131
|
if (!opts.cancelledSignaled.has(taskId) && (!opts.cancelTaskIds || opts.cancelTaskIds.has(taskId))) {
|
|
5120
5132
|
try {
|
|
5121
5133
|
if (await opts.isCancelled(taskId)) {
|
|
@@ -5147,7 +5159,8 @@ async function reconcileActiveTasks(state, role, opts) {
|
|
|
5147
5159
|
failureReason: "runner exited without result: provider session did not settle after abort"
|
|
5148
5160
|
};
|
|
5149
5161
|
}
|
|
5150
|
-
}
|
|
5162
|
+
};
|
|
5163
|
+
await Promise.all(Array.from(state.activeTasks, ([taskId, task]) => reconcileOne(taskId, task)));
|
|
5151
5164
|
}
|
|
5152
5165
|
async function fetchTaskCancelled(apiUrl, apiKey, agentId, taskId) {
|
|
5153
5166
|
const resp = await fetch(`${apiUrl}/cancelled-tasks?taskId=${encodeURIComponent(taskId)}`, {
|
|
@@ -5437,7 +5450,6 @@ async function runAgent(config, opts) {
|
|
|
5437
5450
|
const logDir = `${baseLogDir}/${sessionId}`;
|
|
5438
5451
|
await mkdir(logDir, { recursive: true });
|
|
5439
5452
|
const prompt = opts.prompt || defaultPrompt;
|
|
5440
|
-
const isYolo = opts.yolo || process.env.YOLO === "true";
|
|
5441
5453
|
const agentId = process.env.AGENT_ID || "unknown";
|
|
5442
5454
|
const apiUrl = getMcpBaseUrl();
|
|
5443
5455
|
const swarmUrl = process.env.SWARM_URL || "localhost";
|
|
@@ -5575,7 +5587,6 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
5575
5587
|
console.log(`[${role}] Agent ID: ${agentId}`);
|
|
5576
5588
|
console.log(`[${role}] Session ID: ${sessionId}`);
|
|
5577
5589
|
console.log(`[${role}] Log directory: ${logDir}`);
|
|
5578
|
-
console.log(`[${role}] YOLO mode: ${isYolo ? "enabled" : "disabled"}`);
|
|
5579
5590
|
console.log(`[${role}] Prompt: ${prompt}`);
|
|
5580
5591
|
console.log(`[${role}] API URL: ${apiUrl}`);
|
|
5581
5592
|
console.log(`[${role}] Swarm URL: ${apiUrl}`);
|
|
@@ -6133,8 +6144,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6133
6144
|
timestamp: new Date().toISOString(),
|
|
6134
6145
|
prompt: resumePrompt,
|
|
6135
6146
|
trigger: "task_resumed",
|
|
6136
|
-
resumedTaskId: task.id
|
|
6137
|
-
yolo: isYolo
|
|
6147
|
+
resumedTaskId: task.id
|
|
6138
6148
|
};
|
|
6139
6149
|
await Bun.write(logFile, `${JSON.stringify(metadata)}
|
|
6140
6150
|
`);
|
|
@@ -6211,7 +6221,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6211
6221
|
vcsRepo: task.vcsRepo,
|
|
6212
6222
|
contextKey: task.contextKey,
|
|
6213
6223
|
localBlocks: state.modelWindowBlocks
|
|
6214
|
-
}, logDir
|
|
6224
|
+
}, logDir);
|
|
6215
6225
|
} catch (spawnErr) {
|
|
6216
6226
|
const errMsg = spawnErr instanceof Error ? spawnErr.message : String(spawnErr);
|
|
6217
6227
|
console.error(`[${role}] Failed to spawn process for resumed task ${task.id.slice(0, 8)}: ${errMsg}`);
|
|
@@ -6383,36 +6393,44 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6383
6393
|
});
|
|
6384
6394
|
}
|
|
6385
6395
|
let triggerPrompt = await buildPromptForTrigger(trigger, prompt, adapter.formatCommand.bind(adapter), { hasMcp: adapter.traits.hasMcp });
|
|
6386
|
-
|
|
6387
|
-
const task = trigger.task && typeof trigger.task === "object" && "task" in trigger.task ? trigger.task : null;
|
|
6388
|
-
if (task?.task) {
|
|
6389
|
-
const memoryContext = await fetchRelevantMemories(apiUrl, apiKey, agentId, task.task, task.id, task.contextKey);
|
|
6390
|
-
if (memoryContext) {
|
|
6391
|
-
triggerPrompt += memoryContext;
|
|
6392
|
-
console.log(`[${role}] Injected relevant memories into task prompt`);
|
|
6393
|
-
}
|
|
6394
|
-
}
|
|
6395
|
-
}
|
|
6396
|
+
const memoryTask = (trigger.type === "task_assigned" || trigger.type === "task_offered") && trigger.task && typeof trigger.task === "object" && "task" in trigger.task ? trigger.task : null;
|
|
6396
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
|
+
}
|
|
6397
6422
|
if (taskObj?.parentTaskId && apiUrl) {
|
|
6398
|
-
const isResumeTask = taskObj.taskType === "resume";
|
|
6399
|
-
const contextPreamble = isResumeTask ? await buildResumeContextPreamble(apiUrl, apiKey, taskObj.parentTaskId) : await buildContextPreamble(apiUrl, apiKey, taskObj.parentTaskId);
|
|
6400
6423
|
if (contextPreamble) {
|
|
6401
6424
|
triggerPrompt = prependContextPreamble(triggerPrompt, contextPreamble);
|
|
6402
6425
|
console.log(`[${role}] Injected ${isResumeTask ? "resume" : "context"} preamble for ${isResumeTask ? "resume" : "follow-up"} task (parent: ${taskObj.parentTaskId.slice(0, 8)})`);
|
|
6403
6426
|
}
|
|
6404
6427
|
}
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
claudeMdPath: resolveClaudeMdPath([state.harnessProvider])
|
|
6408
|
-
});
|
|
6409
|
-
triggerPrompt = triggerWithSyncWarning.prompt;
|
|
6410
|
-
if (triggerWithSyncWarning.injected) {
|
|
6428
|
+
if (profileSyncBanner) {
|
|
6429
|
+
triggerPrompt = prependContextPreamble(triggerPrompt, profileSyncBanner);
|
|
6411
6430
|
console.warn(`[${role}] Injected persisted profile sync rejection warning`);
|
|
6412
6431
|
}
|
|
6413
6432
|
let resumeSessionId;
|
|
6414
6433
|
if (taskObj?.parentTaskId) {
|
|
6415
|
-
const parentSession = await fetchProviderSessionInfo(apiUrl, apiKey, taskObj.parentTaskId);
|
|
6416
6434
|
if (parentSession?.sessionId) {
|
|
6417
6435
|
const resumeResolution = resolveResumeSession(state.harnessProvider, [
|
|
6418
6436
|
{
|
|
@@ -6436,16 +6454,13 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6436
6454
|
const taskSlackThreadTs = trigger.task?.slackThreadTs;
|
|
6437
6455
|
const taskSlackContext = taskSlackChannelId ? { channelId: taskSlackChannelId, threadTs: taskSlackThreadTs } : undefined;
|
|
6438
6456
|
let currentRepoContext;
|
|
6439
|
-
const taskVcsRepo = trigger.task?.vcsRepo;
|
|
6440
6457
|
if (taskVcsRepo && apiUrl) {
|
|
6441
|
-
const repoConfig = await fetchRepoConfig(apiUrl, apiKey, taskVcsRepo);
|
|
6442
6458
|
const effectiveConfig = repoConfig ?? {
|
|
6443
6459
|
url: taskVcsRepo,
|
|
6444
6460
|
name: taskVcsRepo.split("/").pop() || taskVcsRepo,
|
|
6445
6461
|
clonePath: `/workspace/personal/repos/${taskVcsRepo.split("/").pop() || taskVcsRepo}`,
|
|
6446
6462
|
defaultBranch: "main"
|
|
6447
6463
|
};
|
|
6448
|
-
const isFirstKickoff = await isFirstKickoffTask(taskObj, (parentTaskId) => fetchTaskStatus(apiUrl, apiKey, parentTaskId));
|
|
6449
6464
|
const repoResult = await ensureRepoForTask(effectiveConfig, role, isFirstKickoff);
|
|
6450
6465
|
currentRepoContext = {
|
|
6451
6466
|
...repoResult,
|
|
@@ -6481,22 +6496,22 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6481
6496
|
triggerPrompt += " You can still access any path on the filesystem — this is just your starting directory.";
|
|
6482
6497
|
}
|
|
6483
6498
|
const cwdWarning = missingTaskDirWarning(taskDir, effectiveCwd);
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
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)`);
|
|
6490
6514
|
}
|
|
6491
|
-
const identityResult = await refreshIdentityIfChanged({ apiUrl, apiKey, agentId, role }, {
|
|
6492
|
-
soulMd: agentSoulMd,
|
|
6493
|
-
identityMd: agentIdentityMd,
|
|
6494
|
-
toolsMd: agentToolsMd,
|
|
6495
|
-
claudeMd: agentClaudeMd,
|
|
6496
|
-
heartbeatMd: agentHeartbeatMd,
|
|
6497
|
-
name: agentProfileName,
|
|
6498
|
-
description: agentDescription
|
|
6499
|
-
});
|
|
6500
6515
|
if (identityResult.changed) {
|
|
6501
6516
|
agentSoulMd = identityResult.fields.soulMd;
|
|
6502
6517
|
agentIdentityMd = identityResult.fields.identityMd;
|
|
@@ -6543,8 +6558,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6543
6558
|
iteration,
|
|
6544
6559
|
timestamp: new Date().toISOString(),
|
|
6545
6560
|
prompt: triggerPrompt,
|
|
6546
|
-
trigger: trigger.type
|
|
6547
|
-
yolo: isYolo
|
|
6561
|
+
trigger: trigger.type
|
|
6548
6562
|
};
|
|
6549
6563
|
await Bun.write(logFile, `${JSON.stringify(metadata)}
|
|
6550
6564
|
`);
|
|
@@ -6585,7 +6599,7 @@ ${additionalSystemPrompt}` : basePrompt;
|
|
|
6585
6599
|
vcsRepo: taskVcsRepo,
|
|
6586
6600
|
contextKey: taskContextKey,
|
|
6587
6601
|
localBlocks: state.modelWindowBlocks
|
|
6588
|
-
}, logDir
|
|
6602
|
+
}, logDir);
|
|
6589
6603
|
} catch (spawnErr) {
|
|
6590
6604
|
const errMsg = spawnErr instanceof Error ? spawnErr.message : String(spawnErr);
|
|
6591
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";
|