@desplega.ai/agent-swarm 2.7.4 → 2.7.6
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/README.md +1 -1
- package/dist/acp-adapter-bp91d37f.js +15 -0
- package/dist/{actions-gfrr9vb7.js → actions-yj0eeaqh.js} +19 -18
- package/dist/{amp-adapter-0s58gm46.js → amp-adapter-4pg9h34q.js} +3 -3
- package/dist/{app-stvq692g.js → app-909e97cr.js} +3 -3
- package/dist/{assistant-5s37fr9n.js → assistant-qdyb5fyy.js} +32 -23
- package/dist/{boot-reembed-yzy1841n.js → boot-reembed-fk0s9z18.js} +1 -1
- package/dist/{boot-reembed-cv82gz7y.js → boot-reembed-gs1rzrnh.js} +1 -1
- package/dist/{boot-scrub-sweep-8k4q95ap.js → boot-scrub-sweep-4qfd4kfx.js} +4 -4
- package/dist/{boot-seeds-ftt9htah.js → boot-seeds-yr00k13d.js} +4 -4
- package/dist/{boxd-515v1t8z.js → boxd-vdmfssd9.js} +5 -5
- package/dist/{claude-adapter-t00wrzeh.js → claude-adapter-qta1f1xn.js} +7 -7
- package/dist/{claude-managed-adapter-g6vmjccb.js → claude-managed-adapter-dvs2xw5n.js} +2 -2
- package/dist/{claude-managed-setup-afpa82f7.js → claude-managed-setup-sc6j4dm0.js} +3 -3
- package/dist/{claude-sdk-session-vj0c2azx.js → claude-sdk-session-zgrz6yvc.js} +9175 -9076
- package/dist/{cli-gjr2y2xk.js → cli-0agcv1v5.js} +4 -1
- package/dist/{cli-edmm9d9y.js → cli-0at8w34w.js} +7 -7
- package/dist/{cli-a81qevyg.js → cli-0qatpy8q.js} +20 -36
- package/dist/{cli-bcz074zx.js → cli-0yv5z2pg.js} +1 -1
- package/dist/{cli-a4btqqft.js → cli-1b7btd38.js} +1 -1
- package/dist/{cli-a2jw6ee5.js → cli-1p89xny0.js} +1 -1
- package/dist/{cli-v726afdm.js → cli-2pnswgh8.js} +1 -1
- package/dist/{cli-jkt52mgt.js → cli-386tyxxg.js} +2 -2
- package/dist/{cli-az0bpf8p.js → cli-3ypk9vk1.js} +3 -3
- package/dist/{cli-wk9md5px.js → cli-436532ck.js} +4 -4
- package/dist/{cli-7n5sbw0z.js → cli-4necwtsv.js} +5 -5
- package/dist/cli-54t00gt8.js +151 -0
- package/dist/{cli-655xm9ms.js → cli-583frbyr.js} +1 -1
- package/dist/{cli-4r12t6w6.js → cli-5c4hjzne.js} +101 -4
- package/dist/{cli-hf6zt5m6.js → cli-69szn7w7.js} +17 -1
- package/dist/{cli-rtk9g7av.js → cli-73jzwksr.js} +6 -2
- package/dist/{cli-jg0nfda6.js → cli-75gkpjvw.js} +52 -21
- package/dist/{cli-wcmnan2g.js → cli-89knwags.js} +5 -5
- package/dist/{cli-pwyevs29.js → cli-8bc1w0tw.js} +22 -21
- package/dist/{cli-t282jgab.js → cli-8snvgs5r.js} +41 -16
- package/dist/{cli-vqgnyh76.js → cli-98rw5dt5.js} +15 -3
- package/dist/{cli-9cctx1tn.js → cli-a22h291q.js} +1 -1
- package/dist/{cli-ycm6180s.js → cli-a7v854rf.js} +5 -3
- package/dist/{cli-98pke4vk.js → cli-ae7mrdf9.js} +2 -2
- package/dist/{cli-je8yeyc5.js → cli-bjb3z51z.js} +5 -5
- package/dist/{cli-mc97xy2s.js → cli-c60vetmm.js} +16 -4
- package/dist/{cli-j4kw3rsx.js → cli-cm5yqn35.js} +18 -0
- package/dist/{cli-wndv9p7g.js → cli-decfb6v8.js} +6 -6
- package/dist/{cli-h55y2bjc.js → cli-dhar9qay.js} +2 -2
- package/dist/{cli-8yy525ad.js → cli-drr5v6av.js} +2 -2
- package/dist/{cli-5gr1g711.js → cli-dxae2yg7.js} +2 -2
- package/dist/{cli-pe09p6dv.js → cli-e3r2neck.js} +8 -7
- package/dist/{cli-13jvmew3.js → cli-ekwks2vs.js} +7 -7
- package/dist/{cli-jg4p5t36.js → cli-es6va8jk.js} +121 -51
- package/dist/{cli-j4kt1mpb.js → cli-faxe6thg.js} +3 -3
- package/dist/{cli-tzrpv5sc.js → cli-ftyxyspd.js} +1 -1
- package/dist/cli-fw2w0kva.js +47 -0
- package/dist/{cli-2dfbv8qr.js → cli-fy6x31ps.js} +1 -0
- package/dist/{cli-aq58fk5m.js → cli-g83s9ewh.js} +7 -1
- package/dist/cli-gdhpcbhf.js +55 -0
- package/dist/{cli-82jg7fp9.js → cli-he5nxaa8.js} +1 -1
- package/dist/{cli-8veytvbh.js → cli-he9wchme.js} +1 -1
- package/dist/{cli-k76tgq03.js → cli-hgaazk69.js} +2 -2
- package/dist/{cli-d2pzqej1.js → cli-hr2e2fft.js} +741 -7
- package/dist/{cli-dae4sbgy.js → cli-jm2vfpfd.js} +2 -2
- package/dist/{cli-1s1dqn1j.js → cli-k2gzwsj2.js} +297 -140
- package/dist/{cli-b1afgtj3.js → cli-kqdg1bsb.js} +3 -3
- package/dist/cli-m2z8jagn.js +12078 -0
- package/dist/{cli-mvckssyq.js → cli-m48g6p95.js} +5 -5
- package/dist/{cli-bwty35gx.js → cli-mthwvjre.js} +1 -1
- package/dist/{cli-41z8xwj0.js → cli-nhrvpaj7.js} +34 -8
- package/dist/{cli-ahd90bwt.js → cli-nwj0ee2w.js} +6 -6
- package/dist/{cli-kvtc7aez.js → cli-p5gp8pcx.js} +44 -14
- package/dist/{cli-avgcz4ra.js → cli-pd7vagab.js} +436 -171
- package/dist/{cli-zn15c46z.js → cli-q0k1w5zd.js} +1 -1
- package/dist/{cli-bq2pcphn.js → cli-rmmmrjkd.js} +1 -1
- package/dist/{cli-2qpvmmkw.js → cli-s0qnd4wv.js} +1 -1
- package/dist/{cli-kg8hchyg.js → cli-sa02jsqt.js} +1 -1
- package/dist/{cli-1yekbyqm.js → cli-shpbx5ee.js} +283 -82
- package/dist/{cli-9y354g3j.js → cli-srye3vdt.js} +1 -1
- package/dist/{cli-byqfbnjw.js → cli-svj5090z.js} +9 -9
- package/dist/{cli-gcbdjt47.js → cli-vfym7wmz.js} +6 -6
- package/dist/{cli-v1yw3wha.js → cli-vvpx3gsx.js} +4 -4
- package/dist/{cli-a1fhj4n9.js → cli-w6dt9ged.js} +2 -2
- package/dist/{cli-1gm8jcyr.js → cli-waqbxg08.js} +5232 -68
- package/dist/{cli-5hjced2v.js → cli-wp9sp1qb.js} +6 -6
- package/dist/{cli-eny54typ.js → cli-wx3rhnm0.js} +1 -1
- package/dist/{cli-s0exq74r.js → cli-xbbndvjy.js} +3 -3
- package/dist/{cli-f255yaqn.js → cli-xds5f77d.js} +3 -3
- package/dist/{cli-0sbkss7h.js → cli-xnqgpshy.js} +2 -2
- package/dist/{cli-0fgr1w9b.js → cli-xnrwazav.js} +20 -3
- package/dist/{cli-gf5hbmdr.js → cli-yjdgea32.js} +3 -3
- package/dist/{cli-cq1pf336.js → cli-yn4kxs06.js} +124 -11
- package/dist/{cli-224epwwf.js → cli-yx4kfngt.js} +3 -3
- package/dist/{cli-eqx6k993.js → cli-yy3rhsdw.js} +47 -13
- package/dist/{cli-36g23z21.js → cli-zbbwez0r.js} +4 -4
- package/dist/{cli-ktmvb20s.js → cli-zm72anhg.js} +12 -12
- package/dist/cli.js +26 -25
- package/dist/{codex-adapter-g0gctw29.js → codex-adapter-ayd1fb6h.js} +5 -5
- package/dist/{codex-hook-vrzz2xhr.js → codex-hook-9efm2x1m.js} +1 -1
- package/dist/{codex-login-0gg46ygn.js → codex-login-y0pmff1c.js} +1 -1
- package/dist/{codex-session-runner-dr2cxe1c.js → codex-session-runner-jesa32xc.js} +6 -6
- package/dist/{commands-1p07cvff.js → commands-hanewgf2.js} +9 -3
- package/dist/{controller-z0s7sv6r.js → controller-dt1n3c1q.js} +9 -4
- package/dist/{controllers-connect-x9kvvhyk.js → controllers-connect-xx8x64n5.js} +22 -21
- package/dist/{cursor-adapter-m5b98pvk.js → cursor-adapter-9s4dwwdw.js} +2 -2
- package/dist/{db-capk2raj.js → db-3vttcbv4.js} +3 -3
- package/dist/{db-rsh04kh3.js → db-9dv0g1ab.js} +12 -4
- package/dist/{devin-adapter-yxm87fe9.js → devin-adapter-r9phbnc9.js} +1 -1
- package/dist/{devtools-82fzqra8.js → devtools-qxfgbsqz.js} +1 -1
- package/dist/{dispatcher-304q6fwa.js → dispatcher-tx9hd1sv.js} +18 -17
- package/dist/{docker-7rxt0rry.js → docker-c1a3gqmf.js} +91 -24
- package/dist/{dsh-adapter-btewem0y.js → dsh-adapter-007y4ejs.js} +2 -2
- package/dist/{e2b-renc0k8q.js → e2b-a19d28rz.js} +4 -4
- package/dist/{e2b-7fc9b9bd.js → e2b-we6hs6q5.js} +6 -6
- package/dist/{easter-egg-3d-fm1p3n4d.js → easter-egg-3d-rgbrqb8s.js} +1 -1
- package/dist/{embedding-space-s68v49ct.js → embedding-space-ny1e2940.js} +6 -6
- package/dist/{embeddings-4ms3604w.js → embeddings-2t386t13.js} +1 -1
- package/dist/{event-bus-dfjx2qdh.js → event-bus-g0ka3pbw.js} +1 -1
- package/dist/{execute-mcdgccjs.js → execute-pksh0ceh.js} +1 -1
- package/dist/{external-channel-9dxwfztn.js → external-channel-phgmhmd7.js} +2 -2
- package/dist/fx-adapter-fy8rr921.js +18 -0
- package/dist/{google-generative-ai-yvmdxyxa.js → google-generative-ai-8y3m3k4b.js} +1 -1
- package/dist/{google-vertex-jrtdh9gs.js → google-vertex-w3v98n7b.js} +1 -1
- package/dist/{grok-adapter-05ecv4h0.js → grok-adapter-q0abvpaj.js} +8 -8
- package/dist/handlers-by3sfxyx.js +32 -0
- package/dist/{heartbeat-3n94heh3.js → heartbeat-kadyek8p.js} +21 -20
- package/dist/{hook-aadrn69x.js → hook-5zs3msf6.js} +6 -6
- package/dist/{hook-zxwje86c.js → hook-9k551xnj.js} +4 -4
- package/dist/{http-xzxk9mst.js → http-mhz9vw1f.js} +272 -103
- package/dist/index-4f2pvxae.js +37 -0
- package/dist/index-98gz7tmp.js +30 -0
- package/dist/{index-5rk6rfzr.js → index-fvzke5kx.js} +1 -1
- package/dist/index-k08z2cak.js +33 -0
- package/dist/{index-yqhz88yy.js → index-pxn30mse.js} +8 -8
- package/dist/{index-d34f6r87.js → index-q361cg2f.js} +1 -1
- package/dist/{index-9j4zwcht.js → index-rvr00sg7.js} +168 -675
- package/dist/{index-qeb82z37.js → index-vdygbq10.js} +1 -1
- package/dist/{keepalive-w4aakbyk.js → keepalive-w56f32cg.js} +4 -4
- package/dist/lead-enq35nqp.js +70 -0
- package/dist/{maintenance-hbptpk6p.js → maintenance-7mdgxcea.js} +1 -1
- package/dist/{oauth-refresh-sweep-217semrv.js → oauth-refresh-sweep-29txy9vk.js} +3 -3
- package/dist/{onboard-vz2s5df3.js → onboard-kpsrkarj.js} +5 -5
- package/dist/{opencode-adapter-gtfd7d7v.js → opencode-adapter-j25vm3rr.js} +5 -5
- package/dist/{otel-impl-aefave37.js → otel-impl-6kkct7a8.js} +2 -2
- package/dist/{pi-mono-adapter-f8h5yseh.js → pi-mono-adapter-exhkzhn2.js} +117 -23
- package/dist/{pricing-refresh-m1yhh9ya.js → pricing-refresh-n2x7jh6k.js} +3 -3
- package/dist/{rbac-roles-rrw8twdz.js → rbac-roles-81ypx6es.js} +1 -1
- package/dist/{rbac-roles-svj72cdf.js → rbac-roles-b5htkjby.js} +2 -2
- package/dist/{render-v2-amwbnfxh.js → render-v2-qn6jmpk4.js} +3 -3
- package/dist/{resume-9cd6wf6z.js → resume-wd30wx23.js} +7 -7
- package/dist/{runtime-fp4vrx7m.js → runtime-4hsg7h60.js} +1 -1
- package/dist/{session-access-21t6yjyg.js → session-access-5qvfevhk.js} +4 -4
- package/dist/{session-source-backfill-pxbzcsc6.js → session-source-backfill-n1czavbr.js} +3 -3
- package/dist/{setup-4592tqz4.js → setup-dnb56qy5.js} +3 -3
- package/dist/{virtual-modules-gzfnpmnz.js → virtual-modules-76xxv9fs.js} +2 -2
- package/dist/{work-objects-t9tcf174.js → work-objects-4n21tfkm.js} +21 -20
- package/dist/{worker-follow-up-q32jh4yk.js → worker-follow-up-77hvzxww.js} +18 -17
- package/dist/worker-gg1576j3.js +70 -0
- package/dist/{x-b6wxntdt.js → x-vmmye1kb.js} +2 -2
- package/openapi.json +189 -32
- package/package.json +8 -7
- package/src/be/db/script-runs.ts +23 -0
- package/src/be/db/session-summaries.ts +8 -2
- package/src/be/db/session-tree.ts +174 -61
- package/src/be/db/session-visibility.ts +5 -4
- package/src/be/db/tasks/read.ts +122 -3
- package/src/be/db-client.ts +8 -5
- package/src/be/db.ts +23 -8
- package/src/be/memory/providers/sqlite-store.ts +49 -12
- package/src/be/migrations/259_session_summaries_open_tasks.sql +111 -0
- package/src/be/migrations/260_runtime_pool_cache.sql +20 -0
- package/src/be/migrations/262_session_visibility_indexes.sql +18 -0
- package/src/be/migrations/263_task_list_filter_index.sql +11 -0
- package/src/be/migrations/264_slack_thread_cover_index.sql +9 -0
- package/src/be/migrations/266_script_runs_source_task.sql +11 -0
- package/src/be/model-validation.ts +5 -1
- package/src/be/pricing-normalize.ts +7 -2
- package/src/be/runtime-pools/cache-cleanup.ts +109 -0
- package/src/be/runtime-pools/db.ts +65 -6
- package/src/be/runtime-pools/remote-controller.ts +5 -0
- package/src/be/runtime-pools/supervisor.ts +33 -2
- package/src/be/scripts/typecheck.ts +23 -0
- package/src/be/seed/schedules-seeder.ts +135 -9
- package/src/be/seed/workflows-seeder.ts +65 -1
- package/src/be/seed-pricing.ts +23 -0
- package/src/be/seed-scripts/catalog/task-failure-audit.ts +5 -1
- package/src/be/steering.ts +50 -3
- package/src/be/swarm-config-guard.ts +1 -0
- package/src/commands/controller.ts +4 -0
- package/src/commands/entrypoint-api-readiness.ts +74 -0
- package/src/commands/provider-credentials.ts +29 -2
- package/src/commands/runner.ts +86 -5
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/extensions/contract.ts +27 -1
- package/src/extensions/dispatcher.ts +4 -0
- package/src/http/agents.ts +1 -0
- package/src/http/index.ts +1 -1
- package/src/http/list-total-cache.ts +14 -7
- package/src/http/mcp-bridge.ts +4 -0
- package/src/http/memory.ts +38 -9
- package/src/http/script-runs.ts +174 -5
- package/src/http/status.ts +10 -2
- package/src/http/tasks.ts +4 -2
- package/src/integrations/chat-sdk/inbound.ts +15 -5
- package/src/integrations/chat-sdk/steering.ts +3 -1
- package/src/kv-reserved-namespaces.ts +2 -0
- package/src/prompts/base-prompt.ts +4 -1
- package/src/prompts/session-templates.ts +26 -0
- package/src/providers/acp-adapter.ts +190 -26
- package/src/providers/acp-targets.ts +306 -6
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +9 -44
- package/src/providers/codex-oauth/flow.ts +24 -3
- package/src/providers/codex-oauth/storage.ts +56 -17
- package/src/providers/codex-oauth/subscription.ts +67 -0
- package/src/providers/fx-adapter.ts +211 -0
- package/src/providers/index.ts +5 -1
- package/src/providers/mcp-loopback-proxy.ts +94 -0
- package/src/providers/pi-mono-adapter.ts +98 -13
- package/src/providers/pricing-sources.md +8 -0
- package/src/providers/reasoning-effort.ts +17 -1
- package/src/providers/types.ts +2 -1
- package/src/runtime-providers/controller-protocol.ts +14 -1
- package/src/runtime-providers/controller.ts +5 -0
- package/src/runtime-providers/docker.ts +108 -23
- package/src/runtime-providers/types.ts +16 -0
- package/src/scheduler/scheduler.ts +36 -3
- package/src/script-workflows/workflow-ctx.ts +8 -0
- package/src/scripts-runtime/sdk-allowlist.ts +1 -0
- package/src/scripts-runtime/types/stdlib.d.ts +27 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +33 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +27 -0
- package/src/server-user.ts +1 -0
- package/src/server.ts +7 -0
- package/src/slack/assistant.ts +17 -1
- package/src/slack/commands.ts +5 -1
- package/src/slack/handlers.ts +53 -5
- package/src/slack/left-threads.ts +88 -0
- package/src/slack/steering.ts +3 -0
- package/src/slack/thread-buffer.ts +40 -16
- package/src/tasks/follow-up-redelegation-guard.ts +155 -0
- package/src/tests/acp-adapter.test.ts +79 -0
- package/src/tests/base-prompt.test.ts +12 -0
- package/src/tests/chat-sdk-inbound.test.ts +30 -0
- package/src/tests/chatgpt-subscription-model-groups.test.ts +62 -0
- package/src/tests/chatgpt-subscription-pi.test.ts +170 -0
- package/src/tests/chatgpt-subscription-session-bench.test.ts +198 -0
- package/src/tests/claude-artifacts-read-script.test.ts +209 -0
- package/src/tests/codex-oauth-credential-info.test.ts +40 -0
- package/src/tests/codex-oauth-refresh-egress.test.ts +194 -0
- package/src/tests/context-window.test.ts +7 -0
- package/src/tests/db-client.test.ts +21 -0
- package/src/tests/db-task-read-contract.test.ts +8 -2
- package/src/tests/db-task-write-contract.test.ts +5 -1
- package/src/tests/entrypoint-api-readiness.test.ts +416 -210
- package/src/tests/explicit-model-validation.test.ts +113 -8
- package/src/tests/extensions-run-context.test.ts +11 -0
- package/src/tests/extensions-steering.test.ts +353 -0
- package/src/tests/extensions-validate.test.ts +5 -0
- package/src/tests/fixtures/extensions/steering-policy/hooks.ts +39 -0
- package/src/tests/fixtures/extensions/steering-policy/manifest.json +7 -0
- package/src/tests/fixtures/fake-fx.ts +167 -0
- package/src/tests/fixtures/fx/acp-responses-recorded.json +157 -0
- package/src/tests/fixtures/fx/acp-updates-recorded.jsonl +15 -0
- package/src/tests/follow-up-redelivery-guard.test.ts +432 -202
- package/src/tests/fx-adapter.test.ts +771 -0
- package/src/tests/grok-adapter.test.ts +36 -0
- package/src/tests/list-total-cache.test.ts +27 -2
- package/src/tests/mcp-loopback-proxy.test.ts +193 -0
- package/src/tests/memory-fts-populate.test.ts +11 -9
- package/src/tests/memory-retrieval-purge.test.ts +80 -0
- package/src/tests/migration-260-runtime-pool-cache.test.ts +118 -0
- package/src/tests/model-tier-resolution.test.ts +3 -3
- package/src/tests/pricing-refresh.test.ts +5 -5
- package/src/tests/prompt-template-session.test.ts +5 -3
- package/src/tests/provider-registration.test.ts +2 -1
- package/src/tests/query-audit-plans.test.ts +30 -2
- package/src/tests/runtime-cache-cleanup.test.ts +367 -0
- package/src/tests/runtime-e2b-pools.test.ts +41 -0
- package/src/tests/runtime-pools-db.test.ts +98 -0
- package/src/tests/runtime-pools-http.test.ts +29 -0
- package/src/tests/runtime-providers-docker.test.ts +253 -0
- package/src/tests/runtime-remote-controller.test.ts +66 -2
- package/src/tests/runtime-supervisor.test.ts +66 -2
- package/src/tests/script-connections.test.ts +13 -0
- package/src/tests/script-runs-http.test.ts +684 -2
- package/src/tests/seed-model-profiles.test.ts +2 -2
- package/src/tests/seed-schedules.test.ts +138 -0
- package/src/tests/seed-scripts.test.ts +26 -0
- package/src/tests/session-cost-recompute-unit.test.ts +39 -0
- package/src/tests/session-costs-golden.test.ts +26 -0
- package/src/tests/session-summaries-plans.test.ts +120 -0
- package/src/tests/session-summaries.test.ts +72 -12
- package/src/tests/sessions-tree.test.ts +11 -3
- package/src/tests/slack-leave-thread.test.ts +571 -0
- package/src/tests/slack-render-v2-query-plans.test.ts +24 -2
- package/src/tests/status.test.ts +11 -0
- package/src/tests/tasks-readable-row.test.ts +155 -0
- package/src/tests/tool-annotations.test.ts +2 -1
- package/src/tests/workflow-engine-v2.test.ts +42 -0
- package/src/tests/workflow-script-principal.test.ts +207 -7
- package/src/tools/send-task.ts +35 -47
- package/src/tools/slack-leave-thread.ts +104 -0
- package/src/tools/steer-task.ts +3 -2
- package/src/tools/task-dedup.ts +45 -21
- package/src/tools/tool-config.ts +2 -1
- package/src/types.ts +57 -0
- package/src/utils/codex-auth-failure.ts +30 -0
- package/src/utils/context-window.ts +4 -1
- package/src/utils/credentials.ts +7 -0
- package/src/utils/fx-models.ts +43 -0
- package/src/workflows/cooldown.ts +3 -2
- package/src/workflows/engine.ts +24 -9
- package/templates/schedules/dreaming-daily/config.json +1 -1
- package/templates/schedules/dreaming-daily/content.md +6 -14
- package/templates/skills/composio-google-docs/content.md +10 -0
- package/templates/skills/script-workflows/content.md +19 -1
- package/templates/skills/swarm-docs/content.md +2 -0
- package/templates/skills/swarm-scripts/SKILL.md +2 -0
- package/templates/skills/swarm-scripts/content.md +2 -0
- package/templates/workflows/dreaming/content.md +5 -1
- package/dist/acp-adapter-96dc64m2.js +0 -15
- package/dist/cli-dznrgaep.js +0 -30
- package/dist/cli-w3hcrxht.js +0 -6985
- package/dist/handlers-jg7v74ty.js +0 -31
- package/dist/index-8c1zbz59.js +0 -29
- package/dist/index-8k8tmfxd.js +0 -32
- package/dist/index-hq617xdj.js +0 -36
- package/dist/lead-567kw7x3.js +0 -68
- package/dist/worker-fjdqra6q.js +0 -68
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listKeepAliveAuthorizations,
|
|
3
3
|
init_oauth
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-k2gzwsj2.js";
|
|
5
5
|
import {
|
|
6
6
|
ensureAuthorizationTokenOrThrow,
|
|
7
7
|
init_ensure_token
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-xnqgpshy.js";
|
|
9
9
|
import {
|
|
10
10
|
scrubSecrets,
|
|
11
11
|
init_secret_scrubber
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-1b7btd38.js";
|
|
13
13
|
|
|
14
14
|
// src/oauth/keepalive.ts
|
|
15
15
|
init_oauth();
|
|
@@ -59,7 +59,7 @@ async function notifySlack(text) {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
try {
|
|
62
|
-
const { getSlackApp } = await import("./app-
|
|
62
|
+
const { getSlackApp } = await import("./app-909e97cr.js");
|
|
63
63
|
const app = getSlackApp();
|
|
64
64
|
if (!app) {
|
|
65
65
|
console.warn("[OAuth Keepalive] Slack not available, cannot send notification");
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import"./cli-k2gzwsj2.js";
|
|
2
|
+
import"./cli-rmmmrjkd.js";
|
|
3
|
+
import"./cli-zbbwez0r.js";
|
|
4
|
+
import"./cli-89knwags.js";
|
|
5
|
+
import"./cli-wx3rhnm0.js";
|
|
6
|
+
import"./cli-w6dt9ged.js";
|
|
7
|
+
import"./cli-waqbxg08.js";
|
|
8
|
+
import"./cli-m48g6p95.js";
|
|
9
|
+
import {
|
|
10
|
+
getEnabledCapabilities,
|
|
11
|
+
init_server
|
|
12
|
+
} from "./cli-shpbx5ee.js";
|
|
13
|
+
import"./cli-3xj33nrx.js";
|
|
14
|
+
import"./cli-yn4kxs06.js";
|
|
15
|
+
import"./cli-4necwtsv.js";
|
|
16
|
+
import"./cli-bjb3z51z.js";
|
|
17
|
+
import"./cli-ftyxyspd.js";
|
|
18
|
+
import {
|
|
19
|
+
runAgent
|
|
20
|
+
} from "./cli-es6va8jk.js";
|
|
21
|
+
import"./cli-98rw5dt5.js";
|
|
22
|
+
import"./cli-77cd6gy8.js";
|
|
23
|
+
import"./cli-mthwvjre.js";
|
|
24
|
+
import"./cli-a22h291q.js";
|
|
25
|
+
import"./cli-dhar9qay.js";
|
|
26
|
+
import"./cli-jc1g9ndz.js";
|
|
27
|
+
import"./cli-nwj0ee2w.js";
|
|
28
|
+
import"./cli-jm2vfpfd.js";
|
|
29
|
+
import"./cli-faxe6thg.js";
|
|
30
|
+
import"./cli-d82btycs.js";
|
|
31
|
+
import"./cli-0726awxw.js";
|
|
32
|
+
import"./cli-decfb6v8.js";
|
|
33
|
+
import"./cli-svj5090z.js";
|
|
34
|
+
import"./cli-4bd1rck6.js";
|
|
35
|
+
import"./cli-98rwmcyc.js";
|
|
36
|
+
import"./cli-318r69gq.js";
|
|
37
|
+
import"./cli-vfym7wmz.js";
|
|
38
|
+
import"./cli-kr5tjjtz.js";
|
|
39
|
+
import"./cli-0qatpy8q.js";
|
|
40
|
+
import"./cli-wp9sp1qb.js";
|
|
41
|
+
import"./cli-srye3vdt.js";
|
|
42
|
+
import"./cli-vvpx3gsx.js";
|
|
43
|
+
import"./cli-pd7vagab.js";
|
|
44
|
+
import"./cli-yx4kfngt.js";
|
|
45
|
+
import"./cli-ekwks2vs.js";
|
|
46
|
+
import"./cli-54t00gt8.js";
|
|
47
|
+
import"./cli-3ypk9vk1.js";
|
|
48
|
+
import"./cli-4zsenjhy.js";
|
|
49
|
+
import"./cli-c60vetmm.js";
|
|
50
|
+
import"./cli-hr2e2fft.js";
|
|
51
|
+
import"./cli-xnqgpshy.js";
|
|
52
|
+
import"./cli-8bc1w0tw.js";
|
|
53
|
+
import"./cli-gdhpcbhf.js";
|
|
54
|
+
import"./cli-hgaazk69.js";
|
|
55
|
+
import"./cli-drr5v6av.js";
|
|
56
|
+
|
|
57
|
+
// src/commands/lead.ts
|
|
58
|
+
init_server();
|
|
59
|
+
var leadConfig = {
|
|
60
|
+
role: "lead",
|
|
61
|
+
defaultPrompt: "/start-leader",
|
|
62
|
+
metadataType: "lead_metadata",
|
|
63
|
+
capabilities: getEnabledCapabilities()
|
|
64
|
+
};
|
|
65
|
+
async function runLead(opts) {
|
|
66
|
+
return runAgent(leadConfig, opts);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
runLead
|
|
70
|
+
};
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
getAuthorizationById,
|
|
3
3
|
listAuthorizationSweepRows,
|
|
4
4
|
init_oauth
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-k2gzwsj2.js";
|
|
6
6
|
import {
|
|
7
7
|
forceRefreshAuthorizationOrThrow,
|
|
8
8
|
init_ensure_token
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-xnqgpshy.js";
|
|
10
10
|
import {
|
|
11
11
|
isEnvFlagEnabled,
|
|
12
12
|
init_env_flag
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
scrubSecrets,
|
|
16
16
|
init_secret_scrubber
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-1b7btd38.js";
|
|
18
18
|
|
|
19
19
|
// src/be/oauth-refresh-sweep.ts
|
|
20
20
|
init_ensure_token();
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
Select,
|
|
8
8
|
Spinner,
|
|
9
9
|
TextInput
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-he5nxaa8.js";
|
|
11
11
|
import {
|
|
12
12
|
require_jsx_dev_runtime
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-sa02jsqt.js";
|
|
14
14
|
import {
|
|
15
15
|
SERVER_NAME,
|
|
16
16
|
createDefaultSettingsLocal,
|
|
17
17
|
createDefaultMcpJson,
|
|
18
18
|
createHooksConfig
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-0yv5z2pg.js";
|
|
20
20
|
import {
|
|
21
21
|
getSlackConfiguration,
|
|
22
22
|
isSlackConfigured,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
init_package,
|
|
27
27
|
package_default
|
|
28
|
-
} from "./cli-
|
|
28
|
+
} from "./cli-e3r2neck.js";
|
|
29
29
|
import {
|
|
30
30
|
getApiKey,
|
|
31
31
|
init_api_key
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
openAICompatibleProviders,
|
|
35
35
|
providerKeyVars,
|
|
36
36
|
init_src2
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-5c4hjzne.js";
|
|
38
38
|
import {
|
|
39
39
|
__toESM
|
|
40
40
|
} from "./cli-242037k3.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
applyOpenRouterBaseUrlOverride2,
|
|
4
4
|
buildOpenAICompatibleProviderBlock2,
|
|
5
5
|
OpencodeAdapter2
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-ekwks2vs.js";
|
|
7
|
+
import"./cli-yx4kfngt.js";
|
|
8
8
|
import"./cli-4bd1rck6.js";
|
|
9
9
|
import"./cli-jc1g9ndz.js";
|
|
10
|
-
import"./cli-
|
|
10
|
+
import"./cli-faxe6thg.js";
|
|
11
11
|
import"./cli-0726awxw.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
12
|
+
import"./cli-dhar9qay.js";
|
|
13
|
+
import"./cli-98rw5dt5.js";
|
|
14
14
|
export {
|
|
15
15
|
OpencodeAdapter2 as OpencodeAdapter,
|
|
16
16
|
applyOpenRouterBaseUrlOverride2 as applyOpenRouterBaseUrlOverride,
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
init_package,
|
|
19
19
|
package_default
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-e3r2neck.js";
|
|
21
21
|
import {
|
|
22
22
|
scrubSecrets,
|
|
23
23
|
init_secret_scrubber
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-1b7btd38.js";
|
|
25
25
|
import {
|
|
26
26
|
__toESM,
|
|
27
27
|
__commonJS,
|
|
@@ -11,25 +11,28 @@ import {
|
|
|
11
11
|
createCodemodeExtension,
|
|
12
12
|
createMcpExtension,
|
|
13
13
|
createToolSearchExtension
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-0at8w34w.js";
|
|
15
15
|
import {
|
|
16
16
|
contextBoundNoteThreshold,
|
|
17
17
|
createContextBoundNote
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-dhar9qay.js";
|
|
19
19
|
import {
|
|
20
20
|
readPkgVersion
|
|
21
21
|
} from "./cli-kr5tjjtz.js";
|
|
22
22
|
import"./cli-0726awxw.js";
|
|
23
23
|
import {
|
|
24
24
|
createSwarmHooksExtension
|
|
25
|
-
} from "./cli-
|
|
26
|
-
import"./cli-
|
|
25
|
+
} from "./cli-yx4kfngt.js";
|
|
26
|
+
import"./cli-faxe6thg.js";
|
|
27
27
|
import {
|
|
28
28
|
applyReasoningEffort
|
|
29
|
-
} from "./cli-
|
|
29
|
+
} from "./cli-98rw5dt5.js";
|
|
30
30
|
import {
|
|
31
31
|
piPromptSkillName
|
|
32
32
|
} from "./cli-77cd6gy8.js";
|
|
33
|
+
import {
|
|
34
|
+
hasCodexOAuthPoolSlots
|
|
35
|
+
} from "./cli-j4bwnpkm.js";
|
|
33
36
|
import {
|
|
34
37
|
fetchInstalledMcpServers
|
|
35
38
|
} from "./cli-bst1vp7e.js";
|
|
@@ -40,21 +43,34 @@ import {
|
|
|
40
43
|
import {
|
|
41
44
|
Unsafe,
|
|
42
45
|
init_build,
|
|
46
|
+
init_dist5,
|
|
43
47
|
getBuiltinModel,
|
|
44
48
|
getBuiltinModels,
|
|
45
49
|
init_all
|
|
46
|
-
} from "./cli-
|
|
50
|
+
} from "./cli-436532ck.js";
|
|
51
|
+
import {
|
|
52
|
+
buildPoolRevalidationFailureReason,
|
|
53
|
+
getValidCodexOAuth,
|
|
54
|
+
init_storage
|
|
55
|
+
} from "./cli-75gkpjvw.js";
|
|
47
56
|
import {
|
|
48
57
|
swarmRuntimeInstanceId,
|
|
49
58
|
init_multi_runtime2
|
|
50
59
|
} from "./cli-mdb054w3.js";
|
|
60
|
+
import {
|
|
61
|
+
InMemoryCredentialStore
|
|
62
|
+
} from "./cli-1h3wcpbw.js";
|
|
51
63
|
import {
|
|
52
64
|
CORE_TOOLS,
|
|
53
65
|
init_tool_config
|
|
54
|
-
} from "./cli-
|
|
66
|
+
} from "./cli-fy6x31ps.js";
|
|
67
|
+
import {
|
|
68
|
+
isCodexRejectedAccessError,
|
|
69
|
+
init_codex_auth_failure
|
|
70
|
+
} from "./cli-fw2w0kva.js";
|
|
55
71
|
import {
|
|
56
72
|
init_templates4
|
|
57
|
-
} from "./cli-
|
|
73
|
+
} from "./cli-2pnswgh8.js";
|
|
58
74
|
import {
|
|
59
75
|
DEFAULT_OPENROUTER_BASE_URL,
|
|
60
76
|
getOpenRouterBaseUrl,
|
|
@@ -63,11 +79,11 @@ import {
|
|
|
63
79
|
import {
|
|
64
80
|
resolveTemplateAsync,
|
|
65
81
|
init_resolver
|
|
66
|
-
} from "./cli-
|
|
82
|
+
} from "./cli-cm5yqn35.js";
|
|
67
83
|
import {
|
|
68
84
|
snapshotCatalogRows,
|
|
69
85
|
init_runtime_model_catalog
|
|
70
|
-
} from "./cli-
|
|
86
|
+
} from "./cli-1p89xny0.js";
|
|
71
87
|
import {
|
|
72
88
|
parseEnvFlag,
|
|
73
89
|
init_env_flag
|
|
@@ -75,10 +91,13 @@ import {
|
|
|
75
91
|
import {
|
|
76
92
|
scrubSecrets,
|
|
77
93
|
scrubObject,
|
|
94
|
+
registerVolatileSecret,
|
|
78
95
|
registerEnvSecrets,
|
|
79
96
|
init_secret_scrubber
|
|
80
|
-
} from "./cli-
|
|
97
|
+
} from "./cli-1b7btd38.js";
|
|
81
98
|
import {
|
|
99
|
+
CHATGPT_SUBSCRIPTION_PROVIDER,
|
|
100
|
+
chatgptSubscriptionModelId,
|
|
82
101
|
openAICompatibleProviders,
|
|
83
102
|
providerKeyVars,
|
|
84
103
|
openAICompatibleKeyVars,
|
|
@@ -89,13 +108,14 @@ import {
|
|
|
89
108
|
providerKeyFromEnv,
|
|
90
109
|
providerHarnessModels,
|
|
91
110
|
init_src2
|
|
92
|
-
} from "./cli-
|
|
111
|
+
} from "./cli-5c4hjzne.js";
|
|
93
112
|
import {
|
|
94
113
|
__toESM
|
|
95
114
|
} from "./cli-242037k3.js";
|
|
96
115
|
|
|
97
116
|
// src/providers/pi-mono-adapter.ts
|
|
98
117
|
init_src2();
|
|
118
|
+
init_dist5();
|
|
99
119
|
init_all();
|
|
100
120
|
import {
|
|
101
121
|
existsSync,
|
|
@@ -180,6 +200,38 @@ init_openrouter_base_url();
|
|
|
180
200
|
init_runtime_model_catalog();
|
|
181
201
|
init_secret_scrubber();
|
|
182
202
|
|
|
203
|
+
// src/providers/codex-oauth/subscription.ts
|
|
204
|
+
init_src2();
|
|
205
|
+
init_codex_auth_failure();
|
|
206
|
+
init_secret_scrubber();
|
|
207
|
+
init_storage();
|
|
208
|
+
async function loadChatgptSubscriptionCredential(config, deps = {}) {
|
|
209
|
+
const slot = config.codexSlot;
|
|
210
|
+
if (slot === undefined || !config.apiUrl || !config.apiKey) {
|
|
211
|
+
throw new Error(`[auth-error] Model "${config.model}" runs on the ChatGPT subscription pool, but no codex_oauth pool slot is configured. Run codex-login to add one, or pick a model with its own API key.`);
|
|
212
|
+
}
|
|
213
|
+
const getValid = deps.getValid ?? getValidCodexOAuth;
|
|
214
|
+
let creds;
|
|
215
|
+
try {
|
|
216
|
+
creds = await getValid(config.apiUrl, config.apiKey, slot);
|
|
217
|
+
} catch (err) {
|
|
218
|
+
throw new Error(buildPoolRevalidationFailureReason(err, slot));
|
|
219
|
+
}
|
|
220
|
+
if (!creds) {
|
|
221
|
+
throw new Error(`[auth-error] Codex pool slot ${slot} revalidation failed: no credentials found in config store — the slot may have just been quarantined; re-run codex-login for this slot if this persists.`);
|
|
222
|
+
}
|
|
223
|
+
registerVolatileSecret(creds.access, "CODEX_OAUTH_ACCESS_TOKEN");
|
|
224
|
+
return { ...creds, refresh: "" };
|
|
225
|
+
}
|
|
226
|
+
function chatgptSubscriptionAuthFailure(raw, config) {
|
|
227
|
+
const slot = config.codexSlot;
|
|
228
|
+
if (slot === undefined || !chatgptSubscriptionModelId(config.model))
|
|
229
|
+
return;
|
|
230
|
+
if (!isCodexRejectedAccessError(raw))
|
|
231
|
+
return;
|
|
232
|
+
return `[auth-error] Codex pool slot ${slot} authentication failed — re-run agent-swarm codex-login --slot ${slot}. Original error: ${raw}`;
|
|
233
|
+
}
|
|
234
|
+
|
|
183
235
|
// src/providers/pi-mono-mcp-client.ts
|
|
184
236
|
init_http_client();
|
|
185
237
|
|
|
@@ -289,6 +341,15 @@ async function checkPiMonoCredentials(env, opts = {}) {
|
|
|
289
341
|
};
|
|
290
342
|
}
|
|
291
343
|
}
|
|
344
|
+
if (chatgptSubscriptionModelId(env.MODEL_OVERRIDE)) {
|
|
345
|
+
if (hasCodexOAuthPoolSlots(env))
|
|
346
|
+
return { ready: true, missing: [], satisfiedBy: "env" };
|
|
347
|
+
return {
|
|
348
|
+
ready: false,
|
|
349
|
+
missing: ["CODEX_OAUTH"],
|
|
350
|
+
hint: `MODEL_OVERRIDE=${env.MODEL_OVERRIDE} runs on the ChatGPT subscription pool; add a codex_oauth slot (codex-login) or pick a model with its own API key.`
|
|
351
|
+
};
|
|
352
|
+
}
|
|
292
353
|
const homeDir = opts.homeDir ?? env.HOME ?? "/root";
|
|
293
354
|
const fsProbe = opts.fs?.existsSync ?? existsSync;
|
|
294
355
|
const authFile = `${homeDir}/.pi/agent/auth.json`;
|
|
@@ -307,7 +368,7 @@ async function checkPiMonoCredentials(env, opts = {}) {
|
|
|
307
368
|
hint: `MODEL_OVERRIDE=${env.MODEL_OVERRIDE} requires one of ${keyList}; or run \`pi auth login\` to create ${authFile}.`
|
|
308
369
|
};
|
|
309
370
|
}
|
|
310
|
-
if (env.ANTHROPIC_API_KEY || env.OPENROUTER_API_KEY || env.OPENAI_API_KEY || openAICompatibleKeyVars().some((k) => env[k])) {
|
|
371
|
+
if (env.ANTHROPIC_API_KEY || env.OPENROUTER_API_KEY || env.OPENAI_API_KEY || openAICompatibleKeyVars().some((k) => env[k]) || hasCodexOAuthPoolSlots(env)) {
|
|
311
372
|
return { ready: true, missing: [], satisfiedBy: "env" };
|
|
312
373
|
}
|
|
313
374
|
return {
|
|
@@ -378,8 +439,11 @@ var PI_RUNTIME_API_KEYS = [
|
|
|
378
439
|
["OPENCODE_API_KEY", "opencode-go"],
|
|
379
440
|
...openAICompatibleProviders().flatMap((p) => [...p.aliasEnvVars, p.envVar].map((name) => [name, p.id]))
|
|
380
441
|
];
|
|
381
|
-
async function createPiRuntimeAuth(env = process.env, modelsPath) {
|
|
382
|
-
const modelRuntime = await ModelRuntime.create(
|
|
442
|
+
async function createPiRuntimeAuth(env = process.env, modelsPath, subscription) {
|
|
443
|
+
const modelRuntime = await ModelRuntime.create({
|
|
444
|
+
...modelsPath ? { modelsPath, modelsStorePath: join(getAgentDir(), "models-store.json") } : {},
|
|
445
|
+
...subscription ? { credentials: await subscriptionCredentialStore(subscription) } : {}
|
|
446
|
+
});
|
|
383
447
|
for (const [envKey, provider] of PI_RUNTIME_API_KEYS) {
|
|
384
448
|
const apiKey = env[envKey];
|
|
385
449
|
if (apiKey) {
|
|
@@ -388,6 +452,17 @@ async function createPiRuntimeAuth(env = process.env, modelsPath) {
|
|
|
388
452
|
}
|
|
389
453
|
return modelRuntime;
|
|
390
454
|
}
|
|
455
|
+
async function subscriptionCredentialStore(creds) {
|
|
456
|
+
const store = new InMemoryCredentialStore;
|
|
457
|
+
await store.modify(CHATGPT_SUBSCRIPTION_PROVIDER, async () => ({
|
|
458
|
+
type: "oauth",
|
|
459
|
+
access: creds.access,
|
|
460
|
+
refresh: "",
|
|
461
|
+
expires: creds.expires,
|
|
462
|
+
accountId: creds.accountId
|
|
463
|
+
}));
|
|
464
|
+
return store;
|
|
465
|
+
}
|
|
391
466
|
var OPENROUTER_OVERRIDE_MARKER = ".agent-swarm-openrouter-override.json";
|
|
392
467
|
async function readJsonFile(path) {
|
|
393
468
|
try {
|
|
@@ -509,6 +584,9 @@ function resolveModel(modelStr, env = process.env, modelRuntime) {
|
|
|
509
584
|
function resolveModelInner(modelStr, env, modelRuntime) {
|
|
510
585
|
if (!modelStr)
|
|
511
586
|
return;
|
|
587
|
+
const subscriptionId = chatgptSubscriptionModelId(modelStr);
|
|
588
|
+
if (subscriptionId)
|
|
589
|
+
return resolveSubscriptionModel(subscriptionId, modelRuntime);
|
|
512
590
|
const lower = modelStr.toLowerCase();
|
|
513
591
|
const isAnthropicShortname = lower === "opus" || lower === "sonnet" || lower === "haiku" || lower === "fable";
|
|
514
592
|
if (isAnthropicShortname && !envHasAnthropicCred(env) && env.OPENROUTER_API_KEY) {
|
|
@@ -554,6 +632,14 @@ function resolveModelInner(modelStr, env, modelRuntime) {
|
|
|
554
632
|
}
|
|
555
633
|
return;
|
|
556
634
|
}
|
|
635
|
+
function resolveSubscriptionModel(modelId, modelRuntime) {
|
|
636
|
+
const provider = CHATGPT_SUBSCRIPTION_PROVIDER;
|
|
637
|
+
const known = getBuiltinModel(provider, modelId) ?? modelRuntime?.getModel(provider, modelId);
|
|
638
|
+
if (known)
|
|
639
|
+
return known;
|
|
640
|
+
const template = getBuiltinModels(provider)[0];
|
|
641
|
+
return template ? { ...template, id: modelId, name: modelId } : undefined;
|
|
642
|
+
}
|
|
557
643
|
function createAgentsMdSymlink(cwd) {
|
|
558
644
|
const claudeMd = join(cwd, "CLAUDE.md");
|
|
559
645
|
const agentsMd = join(cwd, "AGENTS.md");
|
|
@@ -861,6 +947,13 @@ class PiMonoSession {
|
|
|
861
947
|
}
|
|
862
948
|
}
|
|
863
949
|
}
|
|
950
|
+
classifyFailure(raw) {
|
|
951
|
+
const aws = classifyAwsSdkError(raw);
|
|
952
|
+
if (aws)
|
|
953
|
+
return aws;
|
|
954
|
+
const auth = chatgptSubscriptionAuthFailure(raw, this.config);
|
|
955
|
+
return auth ? { message: auth, category: "authentication_failed" } : undefined;
|
|
956
|
+
}
|
|
864
957
|
async runSession() {
|
|
865
958
|
try {
|
|
866
959
|
const onPromptSkill = this.config.onPromptSkill;
|
|
@@ -877,7 +970,7 @@ class PiMonoSession {
|
|
|
877
970
|
const stats = this.agentSession.getSessionStats();
|
|
878
971
|
const cost = this.buildCostData(stats);
|
|
879
972
|
if (this.terminalError) {
|
|
880
|
-
const classification =
|
|
973
|
+
const classification = this.classifyFailure(this.terminalError);
|
|
881
974
|
const message = scrubSecrets(classification?.message ?? this.terminalError);
|
|
882
975
|
const category = classification?.category;
|
|
883
976
|
this.emit({ type: "error", message, category });
|
|
@@ -924,12 +1017,12 @@ class PiMonoSession {
|
|
|
924
1017
|
appliedReasoningEffort: this.appliedReasoningEffort
|
|
925
1018
|
};
|
|
926
1019
|
}
|
|
927
|
-
const
|
|
928
|
-
if (
|
|
1020
|
+
const classifiedError = this.classifyFailure(errorMessage);
|
|
1021
|
+
if (classifiedError) {
|
|
929
1022
|
this.emit({
|
|
930
1023
|
type: "error",
|
|
931
|
-
message:
|
|
932
|
-
category:
|
|
1024
|
+
message: classifiedError.message,
|
|
1025
|
+
category: classifiedError.category
|
|
933
1026
|
});
|
|
934
1027
|
}
|
|
935
1028
|
this.emit({ type: "raw_stderr", content: `[pi-mono] Error: ${errorMessage}
|
|
@@ -940,8 +1033,8 @@ class PiMonoSession {
|
|
|
940
1033
|
sessionId: this._sessionId,
|
|
941
1034
|
cost,
|
|
942
1035
|
isError: true,
|
|
943
|
-
errorCategory:
|
|
944
|
-
failureReason: scrubSecrets(
|
|
1036
|
+
errorCategory: classifiedError?.category,
|
|
1037
|
+
failureReason: scrubSecrets(classifiedError?.message ?? errorMessage),
|
|
945
1038
|
appliedReasoningEffort: this.appliedReasoningEffort
|
|
946
1039
|
};
|
|
947
1040
|
} finally {
|
|
@@ -1327,7 +1420,8 @@ class PiMonoAdapter {
|
|
|
1327
1420
|
}
|
|
1328
1421
|
async createSessionWithModels(config, sessionEnv, sessionModels, setup) {
|
|
1329
1422
|
const { createdSymlink, customTools, deferTools, piMcpServers } = setup;
|
|
1330
|
-
const
|
|
1423
|
+
const subscription = chatgptSubscriptionModelId(config.model) ? await loadChatgptSubscriptionCredential(config) : undefined;
|
|
1424
|
+
const modelRuntime = await createPiRuntimeAuth(sessionEnv, sessionModels.modelsPath, subscription);
|
|
1331
1425
|
const resolvedModel = resolveModel(config.model, sessionEnv, modelRuntime);
|
|
1332
1426
|
const model = resolvedModel ? modelRuntime.getModel(resolvedModel.provider, resolvedModel.id) ?? resolvedModel : resolvedModel;
|
|
1333
1427
|
const swarmExtension = createSwarmHooksExtension({
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
requestModelCatalogRefresh2,
|
|
3
3
|
startPricingRefreshLoop2,
|
|
4
4
|
init_pricing_refresh
|
|
5
|
-
} from "./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
5
|
+
} from "./cli-89knwags.js";
|
|
6
|
+
import"./cli-c60vetmm.js";
|
|
7
|
+
import"./cli-k2gzwsj2.js";
|
|
8
8
|
init_pricing_refresh();
|
|
9
9
|
|
|
10
10
|
export {
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
slackErrorCode2,
|
|
6
6
|
processSlackRenderV22,
|
|
7
7
|
init_render_v2
|
|
8
|
-
} from "./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
8
|
+
} from "./cli-waqbxg08.js";
|
|
9
|
+
import"./cli-w6dt9ged.js";
|
|
10
|
+
import"./cli-k2gzwsj2.js";
|
|
11
11
|
init_render_v2();
|
|
12
12
|
|
|
13
13
|
export {
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
initWaitBusSubscriptions2,
|
|
12
12
|
subscribeWaitToBus2,
|
|
13
13
|
init_resume
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
14
|
+
} from "./cli-m48g6p95.js";
|
|
15
|
+
import"./cli-8bc1w0tw.js";
|
|
16
|
+
import"./cli-waqbxg08.js";
|
|
17
|
+
import"./cli-w6dt9ged.js";
|
|
18
|
+
import"./cli-drr5v6av.js";
|
|
19
|
+
import"./cli-k2gzwsj2.js";
|
|
20
|
+
import"./cli-wx3rhnm0.js";
|
|
21
21
|
init_resume();
|
|
22
22
|
|
|
23
23
|
export {
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
bodySessionDenial2,
|
|
14
14
|
userAgentIdentityDenial2,
|
|
15
15
|
init_session_access
|
|
16
|
-
} from "./cli-
|
|
17
|
-
import"./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
16
|
+
} from "./cli-4necwtsv.js";
|
|
17
|
+
import"./cli-drr5v6av.js";
|
|
18
|
+
import"./cli-rmmmrjkd.js";
|
|
19
|
+
import"./cli-k2gzwsj2.js";
|
|
20
20
|
init_session_access();
|
|
21
21
|
|
|
22
22
|
export {
|
|
@@ -7,16 +7,16 @@ import {
|
|
|
7
7
|
moveTaskChainKeyInTx2,
|
|
8
8
|
init_session_moves,
|
|
9
9
|
init_db4
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-k2gzwsj2.js";
|
|
11
11
|
import {
|
|
12
12
|
normalizeAssetKey,
|
|
13
13
|
defaultAssetKey,
|
|
14
14
|
init_key
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-nhrvpaj7.js";
|
|
16
16
|
import {
|
|
17
17
|
scrubSecrets,
|
|
18
18
|
init_secret_scrubber
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-1b7btd38.js";
|
|
20
20
|
|
|
21
21
|
// src/be/session-source-backfill.ts
|
|
22
22
|
init_key();
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
use_app_default,
|
|
7
7
|
Spinner,
|
|
8
8
|
TextInput
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-he5nxaa8.js";
|
|
10
10
|
import {
|
|
11
11
|
require_jsx_dev_runtime
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-sa02jsqt.js";
|
|
13
13
|
import {
|
|
14
14
|
SERVER_NAME,
|
|
15
15
|
createDefaultSettingsLocal,
|
|
16
16
|
createDefaultMcpJson,
|
|
17
17
|
createHooksConfig
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-0yv5z2pg.js";
|
|
19
19
|
import {
|
|
20
20
|
getApiKey,
|
|
21
21
|
init_api_key
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
exports_dist,
|
|
3
3
|
exports_dist2,
|
|
4
4
|
exports_dist3
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-0at8w34w.js";
|
|
6
6
|
import {
|
|
7
7
|
exports_build,
|
|
8
8
|
init_build,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
init_all,
|
|
15
15
|
exports_compat,
|
|
16
16
|
init_compat
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-436532ck.js";
|
|
18
18
|
import {
|
|
19
19
|
exports_models,
|
|
20
20
|
init_models2
|