@desplega.ai/agent-swarm 1.160.0 → 1.162.0
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 +4 -3
- package/dist/{acp-adapter-2mjwcsfh.js → acp-adapter-74m73ae9.js} +163 -49
- package/dist/{actions-e43rxskr.js → actions-4sr14gnt.js} +42 -38
- package/dist/{anthropic-messages-5qx80j9k.js → anthropic-messages-8xxrzky9.js} +22 -26
- package/dist/{app-mc7xfagn.js → app-pt68fbwp.js} +17 -14
- package/dist/{artifact-3v5t9jtg.js → artifact-fey7dvj9.js} +3 -2
- package/dist/{assistant-sedkzv3b.js → assistant-cv3jytks.js} +43 -39
- package/dist/{azure-openai-responses-nfb21z9a.js → azure-openai-responses-f5cqsyj8.js} +15 -10
- package/dist/{boot-reembed-m3656j2n.js → boot-reembed-4ht4gqth.js} +17 -14
- package/dist/{boot-reembed-cqz9swn5.js → boot-reembed-nxpcvpj9.js} +16 -13
- package/dist/{boot-scrub-logs-xbxf5d7w.js → boot-scrub-logs-k93kyw8k.js} +13 -10
- package/dist/boot-seeds-1skcrs0e.js +32 -0
- package/dist/{claude-adapter-dc6289mc.js → claude-adapter-r5g0tzge.js} +39 -30
- package/dist/{claude-managed-adapter-naaw51me.js → claude-managed-adapter-yxkfxg8j.js} +6 -5
- package/dist/{claude-managed-setup-eacvchx0.js → claude-managed-setup-pkyrgshb.js} +27 -27
- package/dist/{claude-sdk-session-bqp2xvym.js → claude-sdk-session-jxyxnrwd.js} +8041 -7910
- package/dist/{cli-4derpgyk.js → cli-2hhfhfq5.js} +6 -1
- package/dist/{cli-rykfmgwg.js → cli-2x0e561b.js} +1 -1
- package/dist/{cli-tzx2ke1v.js → cli-2zy95vhm.js} +137 -64
- package/dist/{cli-0x01kwrd.js → cli-4cwxn7gp.js} +47 -186
- package/dist/{cli-xjcywfsf.js → cli-4dcpaefp.js} +12 -11
- package/dist/{cli-v7fn5gms.js → cli-4x0csdjq.js} +164 -76
- package/dist/{cli-12tszpk9.js → cli-5bcd7sfy.js} +91 -29
- package/dist/{cli-jz4w45qt.js → cli-5k6k8ta3.js} +190 -50
- package/dist/{cli-tpq83z89.js → cli-5xhpb3kv.js} +20 -19
- package/dist/{cli-r1mxd1xh.js → cli-7af8yhav.js} +6 -179
- package/dist/{cli-jajnsm8q.js → cli-7tre70zp.js} +18160 -31345
- package/dist/{cli-447dt1h3.js → cli-8ev9xqnx.js} +218 -25
- package/dist/cli-bsky8g7w.js +449 -0
- package/dist/{cli-0z2v4nhw.js → cli-cat6h73s.js} +1 -1
- package/dist/{cli-25fcq4b4.js → cli-cebmgwsc.js} +15 -11
- package/dist/{cli-shkxm1vn.js → cli-cvatsam7.js} +189 -13
- package/dist/{cli-2658f6at.js → cli-cvk6yzw5.js} +6 -8
- package/dist/cli-dbmwby6a.js +9 -0
- package/dist/{cli-ptr8h7kp.js → cli-eg0b3p0k.js} +5 -218
- package/dist/cli-f9w1semm.js +413 -0
- package/dist/{cli-523679eh.js → cli-g739zqzt.js} +6 -5
- package/dist/{cli-dv6cdjs2.js → cli-gd4favx9.js} +28 -7
- package/dist/{cli-c8a36vcc.js → cli-gpqpmns7.js} +2 -2
- package/dist/{cli-5nbmpy8w.js → cli-hb5c2x5y.js} +1 -1
- package/dist/{cli-741yb0xx.js → cli-hmsw1gpy.js} +55 -169
- package/dist/{cli-qydf22qq.js → cli-jf7wmv1r.js} +2562 -735
- package/dist/{cli-mfe5btp9.js → cli-jxs2ygaw.js} +317 -121
- package/dist/{cli-kmcpfwn2.js → cli-jyy6pm2f.js} +19 -3
- package/dist/cli-kdkwd3yr.js +615 -0
- package/dist/{cli-6cs6wzxt.js → cli-kh04eqwe.js} +2 -2
- package/dist/{cli-9hsgwz4w.js → cli-kp42yek0.js} +1309 -391
- package/dist/cli-ma3zvh39.js +10404 -0
- package/dist/{cli-ybgv4kw2.js → cli-mbssg1xv.js} +9 -2
- package/dist/{cli-jsp14b6c.js → cli-mzfth0bp.js} +38 -1
- package/dist/{cli-r2ap2czm.js → cli-nexqx4ve.js} +6 -0
- package/dist/{cli-f8gy6r2r.js → cli-nq7yqw7b.js} +19 -8
- package/dist/{cli-10nhj6xq.js → cli-nt8hecg9.js} +34 -33
- package/dist/cli-p0r8sxj5.js +303 -0
- package/dist/{cli-58e8yr0d.js → cli-pkd6s2wy.js} +4 -2
- package/dist/{cli-a8dvhzrt.js → cli-q24re23n.js} +7 -5
- package/dist/cli-qjjvzwzd.js +222 -0
- package/dist/cli-qrgt5bqf.js +189 -0
- package/dist/{cli-et8m9xsv.js → cli-rfjw9jw2.js} +22 -10
- package/dist/{cli-7e398j1h.js → cli-rj0gqwwp.js} +3 -3
- package/dist/{cli-btfv8y88.js → cli-rnyzn44p.js} +2 -2
- package/dist/{cli-d5czme6m.js → cli-s3hwpt9v.js} +4754 -4945
- package/dist/{cli-0jwe9034.js → cli-sptrj5f5.js} +3 -3
- package/dist/{cli-0q3avq3s.js → cli-sqvfa090.js} +19 -11
- package/dist/{cli-azhgzetg.js → cli-swfmp1fx.js} +27 -27
- package/dist/{cli-jyk0ynw2.js → cli-t845n9xk.js} +23 -10
- package/dist/{cli-zpep9q5e.js → cli-tcen9p5w.js} +20 -15
- package/dist/{cli-74h9hscv.js → cli-tre4bdgq.js} +1 -1
- package/dist/{cli-pm1rst0h.js → cli-twrh04ap.js} +30 -15
- package/dist/{cli-phsaj4xq.js → cli-v0pvvhfq.js} +1 -1
- package/dist/{cli-ydmcgve1.js → cli-vc9bp061.js} +5 -5
- package/dist/{cli-g2whhdrf.js → cli-vxe6qa4h.js} +1 -1
- package/dist/{cli-vctdqs5h.js → cli-vy3ed88x.js} +15 -2
- package/dist/{cli-br0qdrnp.js → cli-vyqs9ya8.js} +18 -18
- package/dist/{cli-cpvsaqsw.js → cli-w0bwte75.js} +8 -5
- package/dist/cli-wbvnn6tk.js +861 -0
- package/dist/{cli-r94z9p1z.js → cli-wgbezhw2.js} +3 -0
- package/dist/{cli-evvtk35y.js → cli-wjgs5wxe.js} +7 -7
- package/dist/cli-wxkkd0e0.js +33 -0
- package/dist/{cli-0wgxmwf6.js → cli-xk79303e.js} +20 -7
- package/dist/{cli-ktmyrtpn.js → cli-xqpk3rp7.js} +33 -10
- package/dist/{cli-ygwm91nt.js → cli-yy6dew39.js} +1 -1
- package/dist/cli-zp38xvtm.js +9487 -0
- package/dist/{cli-tfky2838.js → cli-zvhd3f64.js} +4 -4
- package/dist/{cli-jayjpjmb.js → cli-zxqx25nz.js} +66 -23
- package/dist/cli.js +40 -32
- package/dist/{cloudflare-workers-ai-system-one-k6fbxw9d.js → cloudflare-workers-ai-system-one-k8ddqjkq.js} +8 -6
- package/dist/{codex-adapter-nmxcatww.js → codex-adapter-esvmnhn7.js} +24 -23
- package/dist/{codex-hook-20me6byw.js → codex-hook-m73jmqgx.js} +19 -3
- package/dist/{codex-login-w6fz4xbz.js → codex-login-cf7mzsgg.js} +2 -2
- package/dist/{codex-session-runner-90aa80ev.js → codex-session-runner-ban9excr.js} +24 -23
- package/dist/{commands-8wcq1kn7.js → commands-75413p2n.js} +13 -10
- package/dist/{db-j40kc4se.js → db-7f5pecwg.js} +17 -10
- package/dist/{dispatcher-4zqy768d.js → dispatcher-fh9at8nz.js} +41 -37
- package/dist/dsh-adapter-wpze65d4.js +24 -0
- package/dist/{e2b-ez07znam.js → e2b-gjgdjp91.js} +12 -9
- package/dist/easter-egg-3d-3w5c2n4c.js +1057 -0
- package/dist/{execute-6e7qeyk4.js → execute-f50wg9nh.js} +203 -49
- package/dist/{google-generative-ai-k6n5nbpp.js → google-generative-ai-jxxpnegy.js} +2 -2
- package/dist/{google-vertex-44xxtcvp.js → google-vertex-x7q1angm.js} +5 -5
- package/dist/{handlers-kjdce1w5.js → handlers-w13787bb.js} +44 -40
- package/dist/{hook-r2t4bqfg.js → hook-46g1jrvx.js} +34 -20
- package/dist/{hook-czx13n12.js → hook-4tpts2ry.js} +25 -21
- package/dist/{http-3bbb19be.js → http-19pzbfrt.js} +1440 -283
- package/dist/{index-668me3f0.js → index-8fd4dm4h.js} +42 -38
- package/dist/{index-fg0dsp6c.js → index-dqmp15bq.js} +41 -37
- package/dist/{index-kkv84jq9.js → index-qb4q1y3e.js} +41 -37
- package/dist/index-s75wc4wd.js +33 -0
- package/dist/{index-zg7vp46x.js → index-scptvdxg.js} +64 -38
- package/dist/{keepalive-yra8dy57.js → keepalive-xa5ts9cd.js} +15 -12
- package/dist/{lead-va0pad2c.js → lead-qp4xkvjq.js} +59 -54
- package/dist/{maintenance-hqewtmyg.js → maintenance-rm5885hm.js} +17 -14
- package/dist/{mistral-conversations-pc3ntnxt.js → mistral-conversations-rw7fbt22.js} +4 -4
- package/dist/{node-a5e00qhp.js → node-8zkdq42h.js} +834 -833
- package/dist/node-f0ykebbv.js +2107 -0
- package/dist/node-wyamey5r.js +19 -0
- package/dist/{oauth-refresh-sweep-7rdt1m9n.js → oauth-refresh-sweep-1csdfebf.js} +14 -11
- package/dist/{onboard-j6ms6d0x.js → onboard-r6b78cs4.js} +10 -10
- package/dist/{openai-codex-responses-bbancrr0.js → openai-codex-responses-efvrgrq3.js} +4 -4
- package/dist/{openai-completions-jpaj5g2b.js → openai-completions-bbbrrz4z.js} +12 -8
- package/dist/{openai-responses-200k1wx4.js → openai-responses-9jjyrcm1.js} +15 -10
- package/dist/{opencode-adapter-89rabkw2.js → opencode-adapter-kb3g6pkf.js} +12 -9
- package/dist/{otel-impl-a792rjz0.js → otel-impl-0y9knpky.js} +6 -6
- package/dist/{pi-mono-adapter-g7qzvr3v.js → pi-mono-adapter-z6s1bme2.js} +128 -37
- package/dist/{pricing-refresh-wx0tp7cb.js → pricing-refresh-mth26tgp.js} +15 -12
- package/dist/{rbac-roles-8tzawacv.js → rbac-roles-kwntb23q.js} +17 -12
- package/dist/rbac-roles-vpk4ebm8.js +45 -0
- package/dist/{registry-v5wytg0s.js → registry-km6t1jd2.js} +1 -1
- package/dist/{render-v2-mm7zswb8.js → render-v2-hcm7h00y.js} +17 -14
- package/dist/{runtime-zyssgse0.js → runtime-vfjsfsc5.js} +5 -4
- package/dist/{setup-8y70ys6t.js → setup-hbyzd65h.js} +2 -2
- package/dist/{virtual-modules-6nmk7h3n.js → virtual-modules-9bv7ry91.js} +9 -7
- package/dist/{work-objects-fg6xkb0n.js → work-objects-m09sxnhe.js} +44 -40
- package/dist/{worker-wmwhxsph.js → worker-0h35rvk4.js} +59 -54
- package/dist/{x-n3e0v3xa.js → x-f1gt1pz3.js} +2 -2
- package/openapi.json +699 -26
- package/package.json +19 -11
- package/src/azure-devops/api.ts +121 -0
- package/src/azure-devops/auth.ts +78 -0
- package/src/azure-devops/handlers.ts +413 -0
- package/src/azure-devops/index.ts +27 -0
- package/src/azure-devops/templates.ts +108 -0
- package/src/azure-devops/types.ts +90 -0
- package/src/be/api-drain.ts +184 -0
- package/src/be/db/tasks/read.ts +32 -7
- package/src/be/db/tasks/write.ts +21 -4
- package/src/be/db-client.ts +11 -2
- package/src/be/db-retention.ts +95 -32
- package/src/be/db.ts +44 -19
- package/src/be/memory/constants.ts +16 -0
- package/src/be/memory/graph-expansion.ts +8 -1
- package/src/be/memory/index-content.ts +20 -1
- package/src/be/memory/key-guard.ts +93 -0
- package/src/be/memory/key-paths.ts +103 -0
- package/src/be/memory/link-resolver.ts +29 -3
- package/src/be/memory/providers/sqlite-store.ts +152 -45
- package/src/be/memory/raters/llm-summarizer.ts +10 -4
- package/src/be/memory/raters/llm.ts +15 -5
- package/src/be/memory/raters/store.ts +6 -3
- package/src/be/memory/raters/types.ts +11 -0
- package/src/be/memory/reranker.ts +38 -7
- package/src/be/memory/types.ts +12 -1
- package/src/be/migrations/190_memory_rating_model.sql +7 -0
- package/src/be/migrations/191_context_versions_previous_index.sql +8 -0
- package/src/be/migrations/192_favorites_agent_fs_path.sql +36 -0
- package/src/be/onboarding.ts +7 -1
- package/src/be/pricing-normalize.ts +4 -2
- package/src/be/scripts/typecheck.ts +4 -3
- package/src/be/seed-pricing.ts +16 -0
- package/src/be/seed-prompt-templates.ts +1 -0
- package/src/be/swarm-config-guard.ts +46 -17
- package/src/be/task-citations.ts +11 -5
- package/src/be/users.ts +3 -0
- package/src/cli.tsx +3 -2
- package/src/comb/agent-fs.ts +39 -0
- package/src/comb/config.ts +37 -0
- package/src/comb/markers.ts +37 -0
- package/src/comb/review-batch.ts +486 -0
- package/src/comb/templates.ts +88 -0
- package/src/commands/claude-managed-setup.ts +33 -31
- package/src/commands/context-preamble.ts +4 -1
- package/src/commands/hook.ts +2 -1
- package/src/commands/provider-credentials.ts +28 -15
- package/src/commands/runner.ts +458 -110
- package/src/commands/templates.ts +10 -0
- package/src/e2b/env.ts +2 -0
- package/src/extensions/catalog.generated.json +17 -0
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/fs/agent-fs-provider.ts +106 -2
- package/src/github/handlers.ts +10 -74
- package/src/github/reactions.ts +119 -138
- package/src/github/task-reactions.ts +34 -11
- package/src/heartbeat/heartbeat.ts +4 -0
- package/src/hooks/codex-hook.ts +25 -1
- package/src/hooks/hook.ts +14 -1
- package/src/hooks/pr-body-guard.ts +983 -0
- package/src/http/agents.ts +1 -1
- package/src/http/all-routes.ts +1 -0
- package/src/http/assets.ts +5 -17
- package/src/http/comb.ts +131 -0
- package/src/http/core.ts +14 -1
- package/src/http/extensions.ts +51 -27
- package/src/http/fs.ts +9 -17
- package/src/http/index.ts +27 -9
- package/src/http/mcp-user.ts +8 -13
- package/src/http/mcp.ts +19 -12
- package/src/http/memory.ts +80 -14
- package/src/http/onboarding.ts +21 -2
- package/src/http/poll.ts +30 -3
- package/src/http/realtime.ts +62 -0
- package/src/http/request-principal.ts +22 -0
- package/src/http/session-data.ts +6 -4
- package/src/http/stats.ts +1 -0
- package/src/http/status.ts +34 -2
- package/src/http/tasks.ts +17 -3
- package/src/http/users.ts +1 -1
- package/src/http/webhooks.ts +120 -2
- package/src/kv-reserved-namespaces.ts +10 -5
- package/src/providers/claude-adapter.ts +84 -16
- package/src/providers/claude-managed-adapter.ts +29 -2
- package/src/providers/codex-adapter.ts +1 -1
- package/src/providers/codex-skill-resolver.ts +6 -0
- package/src/providers/dsh-adapter.ts +204 -7
- package/src/providers/opencode-adapter.ts +24 -3
- package/src/providers/pi-mono-adapter.ts +154 -5
- package/src/providers/pi-mono-extension.ts +1 -1
- package/src/providers/pricing-sources.md +5 -1
- package/src/providers/reasoning-effort.ts +10 -2
- package/src/providers/types.ts +1 -1
- package/src/rbac/legacy-policy.ts +3 -0
- package/src/rbac/permissions.ts +14 -0
- package/src/realtime/auth.ts +63 -1
- package/src/realtime/tickets.ts +52 -0
- package/src/realtime/transport.ts +51 -22
- package/src/scripts-runtime/types/stdlib.d.ts +13 -5
- package/src/scripts-runtime/types/swarm-extension.d.ts +7 -3
- package/src/scripts-runtime/types/swarm-sdk.d.ts +13 -5
- package/src/tasks/context-key.ts +38 -1
- package/src/telemetry-context.ts +175 -0
- package/src/telemetry-contract/EVENTS.md +81 -0
- package/src/telemetry-contract/SOURCE.json +9 -0
- package/src/telemetry-contract/catalog.json +1335 -0
- package/src/telemetry-contract/index.ts +60 -0
- package/src/telemetry-contract/types.gen.ts +1971 -0
- package/src/telemetry-identity.ts +129 -0
- package/src/telemetry-snapshot.ts +211 -0
- package/src/telemetry-trigger.ts +125 -0
- package/src/telemetry-types.typetest.ts +40 -0
- package/src/telemetry.ts +271 -67
- package/src/tests/api-drain-e2e.test.ts +249 -0
- package/src/tests/api-drain-worker-e2e.test.ts +216 -0
- package/src/tests/api-drain.test.ts +351 -0
- package/src/tests/azure-devops-auth.test.ts +100 -0
- package/src/tests/azure-devops-handlers.test.ts +324 -0
- package/src/tests/azure-devops-webhook-malformed.test.ts +96 -0
- package/src/tests/claude-default-route.test.ts +260 -0
- package/src/tests/claude-managed-adapter.test.ts +47 -0
- package/src/tests/claude-managed-setup.test.ts +48 -0
- package/src/tests/claude-prompt-body-once.test.ts +117 -0
- package/src/tests/claude-routes-e2e.test.ts +316 -0
- package/src/tests/comb-config-guard.test.ts +38 -0
- package/src/tests/comb-links.test.ts +162 -0
- package/src/tests/comb-markers.test.ts +68 -0
- package/src/tests/comb-review-batch.test.ts +770 -0
- package/src/tests/comb-status.test.ts +152 -0
- package/src/tests/context-versions-retention.test.ts +314 -0
- package/src/tests/core-auth.test.ts +7 -0
- package/src/tests/db-retention.test.ts +14 -14
- 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/docs-index-footprint.test.js +3 -3
- package/src/tests/dsh-adapter.test.ts +134 -2
- package/src/tests/dsh-usage.test.ts +153 -0
- package/src/tests/extensions-catalog.test.ts +1 -0
- package/src/tests/extensions-example-deploy-awareness.test.ts +301 -0
- package/src/tests/extensions-http.test.ts +137 -10
- package/src/tests/extensions-mcp-tools.test.ts +28 -0
- package/src/tests/favorites-agent-fs-path.test.ts +226 -0
- package/src/tests/fetch-resolved-env.test.ts +24 -0
- package/src/tests/fixtures/azure-devops/pull-request-commented.json +129 -0
- package/src/tests/fixtures/azure-devops/pull-request-created.json +88 -0
- package/src/tests/fixtures/fake-claude-routes.ts +229 -0
- package/src/tests/github-handlers-reactions.test.ts +486 -0
- package/src/tests/github-reactions.test.ts +280 -0
- package/src/tests/harness-cli-version.test.ts +62 -0
- package/src/tests/http-api-integration.test.ts +21 -0
- package/src/tests/http-task-write-ownership.test.ts +24 -1
- package/src/tests/internal-ai/complete-structured.test.ts +94 -0
- package/src/tests/internal-ai/credentials.test.ts +22 -0
- package/src/tests/internal-ai/models.test.ts +36 -2
- package/src/tests/internal-ai/schema-parity.test.ts +25 -1
- package/src/tests/internal-ai/summarize-session.test.ts +23 -7
- package/src/tests/mcp-user-route.test.ts +133 -0
- package/src/tests/memory-key-paths.test.ts +1055 -0
- package/src/tests/memory-link-resolver.test.ts +34 -0
- package/src/tests/memory-rate-endpoint.test.ts +66 -0
- package/src/tests/memory-rater-llm-summarizer.test.ts +2 -1
- package/src/tests/memory-rater-llm.test.ts +73 -0
- package/src/tests/memory-rater-store.test.ts +31 -0
- package/src/tests/memory-reranker.test.ts +40 -0
- package/src/tests/onboarding.test.ts +108 -0
- package/src/tests/opencode-adapter.test.ts +57 -0
- package/src/tests/opencode-plugin.test.ts +4 -0
- package/src/tests/pi-codemode.test.ts +82 -4
- package/src/tests/pi-mono-adapter.test.ts +265 -2
- package/src/tests/pr-body-leaks.test.ts +789 -0
- package/src/tests/preload.ts +14 -0
- package/src/tests/provider-registration.test.ts +0 -2
- package/src/tests/providers/pi-cost.test.ts +190 -4
- package/src/tests/rbac-engine.test.ts +25 -1
- package/src/tests/realtime-room-auth.test.ts +104 -1
- package/src/tests/realtime-tickets.test.ts +74 -0
- package/src/tests/realtime-transport.test.ts +131 -4
- package/src/tests/runner-api-drain.test.ts +301 -0
- package/src/tests/runner-fallback-output.test.ts +61 -0
- package/src/tests/runner-fenced-json-output.test.ts +178 -0
- package/src/tests/runner-slot-reconcile.test.ts +199 -0
- package/src/tests/script-connections.test.ts +6 -0
- package/src/tests/send-task-requested-by.test.ts +133 -15
- package/src/tests/session-costs-recompute-all-providers.test.ts +23 -0
- package/src/tests/task-lifecycle-telemetry.test.ts +8 -3
- package/src/tests/task-reactions.test.ts +29 -6
- package/src/tests/telemetry-context.test.ts +314 -0
- package/src/tests/telemetry-init.test.ts +51 -19
- package/src/tests/telemetry-snapshot.test.ts +229 -0
- package/src/tests/telemetry-trigger.test.ts +200 -0
- package/src/tests/template-registry-helpers.ts +1 -0
- package/src/tests/vcs-azure-devops.test.ts +73 -0
- package/src/tests/webhooks-task-blocked.test.ts +23 -0
- package/src/tests/workflow-agent-task-retry.test.ts +363 -0
- package/src/tests/workflow-definition-telemetry.test.ts +4 -4
- package/src/tests/workflow-llm.test.ts +14 -0
- package/src/tools/context-diff.ts +20 -0
- package/src/tools/extension-install.ts +27 -16
- package/src/tools/memory-edit.ts +47 -3
- package/src/tools/memory-search.ts +13 -1
- package/src/tools/memory-store.ts +55 -3
- package/src/tools/poll-task.ts +20 -1
- package/src/tools/send-task.ts +9 -1
- package/src/tools/task-action.ts +11 -0
- package/src/types.ts +45 -8
- package/src/utils/api-drain.ts +24 -0
- package/src/utils/constants.ts +57 -16
- package/src/utils/credentials.test.ts +31 -1
- package/src/utils/credentials.ts +20 -9
- package/src/utils/dsh-usage.ts +53 -0
- package/src/utils/harness-cli-version.ts +6 -4
- package/src/utils/internal-ai/complete-structured.ts +26 -3
- package/src/utils/internal-ai/credentials.ts +23 -9
- package/src/utils/internal-ai/index.ts +8 -1
- package/src/utils/internal-ai/models.ts +34 -8
- package/src/utils/internal-ai/summarize-session.ts +22 -8
- package/src/utils/pr-body-leaks.ts +172 -0
- package/src/utils/secret-scrubber.ts +8 -0
- package/src/utils/task-attachment-links.ts +14 -8
- package/src/vcs/azure-devops.ts +80 -0
- package/src/vcs/index.ts +5 -1
- package/src/vcs/types.ts +2 -2
- package/src/workflows/recovery.ts +26 -1
- package/src/workflows/resume.ts +31 -4
- package/src/workflows/task-step-routing.ts +75 -2
- package/templates/community/open-prompt-showreel/PLAYBOOK.md +336 -0
- package/templates/community/open-prompt-showreel/README.md +33 -0
- package/templates/community/open-prompt-showreel/example/tla-races/facts.ts +145 -0
- package/templates/community/open-prompt-showreel/example/tla-races/facts.v3.json +140 -0
- package/templates/community/open-prompt-showreel/example/tla-races/music.mist-city.json +8 -0
- package/templates/community/open-prompt-showreel/example/tla-races/reel.html +805 -0
- package/templates/community/open-prompt-showreel/example/tla-races/smoke.sh +48 -0
- package/templates/community/open-prompt-showreel/lead-prompt.md +89 -0
- package/templates/community/open-prompt-showreel/setup.sh +167 -0
- package/templates/community/open-prompt-showreel/skills/motion-design-replication/SKILL.md +85 -0
- package/templates/community/open-prompt-showreel/skills/motion-design-video-analysis/SKILL.md +115 -0
- package/templates/community/open-prompt-showreel/skills/open-prompt-showreel/SKILL.md +147 -0
- package/templates/community/open-prompt-showreel/skills/video-generation/SKILL.md +195 -0
- package/templates/community/open-prompt-showreel/tools/fetch-music.sh +65 -0
- package/templates/community/open-prompt-showreel/tools/music-analyze.py +69 -0
- package/templates/community/open-prompt-showreel/tools/music-current.sh +34 -0
- package/templates/community/open-prompt-showreel/tools/music-cut.sh +36 -0
- package/templates/community/open-prompt-showreel/tools/music-refine.py +39 -0
- package/templates/community/open-prompt-showreel/tools/render.mjs +157 -0
- package/templates/community/open-prompt-showreel/tools/sheet.sh +44 -0
- package/templates/community/open-prompt-showreel/tools/web-compress.sh +17 -0
- package/templates/community/open-prompt-showreel/tools/x-reencode.sh +21 -0
- package/templates/extensions/README.md +1 -0
- package/templates/extensions/deploy-awareness/README.md +28 -0
- package/templates/extensions/deploy-awareness/hooks.ts +152 -0
- package/templates/extensions/deploy-awareness/manifest.json +8 -0
- package/templates/skills/memory/config.json +2 -2
- package/templates/skills/memory/content.md +59 -5
- package/templates/skills/swarm-extensions/config.json +1 -1
- package/templates/skills/swarm-extensions/content.md +28 -5
- package/tsconfig.json +3 -0
- package/dist/boot-seeds-gsetbs5y.js +0 -28
- package/dist/cli-j490egb5.js +0 -5632
- package/dist/cli-tjf4cn8z.js +0 -9119
- package/dist/cli-tmqt7dpj.js +0 -572
- package/dist/dsh-adapter-mpnzgztj.js +0 -19
- package/dist/index-7aj368tw.js +0 -30
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildModelsDevSeedRows,
|
|
3
3
|
loadModelsDevCache
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-vy3ed88x.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogEntry,
|
|
7
7
|
getActivePricingRow,
|
|
8
8
|
getDbClient,
|
|
9
9
|
init_db,
|
|
10
10
|
insertPricingRow
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-jf7wmv1r.js";
|
|
12
12
|
import {
|
|
13
13
|
init_runtime_model_catalog,
|
|
14
14
|
setRuntimeModelCatalog
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-jyy6pm2f.js";
|
|
16
16
|
import {
|
|
17
17
|
init_secret_scrubber,
|
|
18
18
|
scrubSecrets
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-nexqx4ve.js";
|
|
20
20
|
|
|
21
21
|
// src/be/pricing-refresh.ts
|
|
22
22
|
init_secret_scrubber();
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runStopHookSessionSummarySubprocess
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-nq7yqw7b.js";
|
|
4
4
|
import {
|
|
5
5
|
buildOtelTraceparentEnv,
|
|
6
6
|
isHarnessOtelEnabled
|
|
7
7
|
} from "./cli-q2j38vre.js";
|
|
8
|
-
import {
|
|
9
|
-
fetchInstalledMcpServers
|
|
10
|
-
} from "./cli-tng3131n.js";
|
|
11
8
|
import {
|
|
12
9
|
CTX_MODE_NUDGE_EVERY
|
|
13
10
|
} from "./cli-zm7njwzd.js";
|
|
11
|
+
import {
|
|
12
|
+
resolveSlashSkillPrompt
|
|
13
|
+
} from "./cli-wgbezhw2.js";
|
|
14
14
|
import {
|
|
15
15
|
CONTEXT_FORMULA,
|
|
16
16
|
clampContextPercent,
|
|
17
17
|
computeContextUsedUnified,
|
|
18
18
|
getContextWindowSize
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-tre4bdgq.js";
|
|
20
|
+
import {
|
|
21
|
+
fetchInstalledMcpServers
|
|
22
|
+
} from "./cli-tng3131n.js";
|
|
20
23
|
import {
|
|
21
24
|
isClaudeBridgeEffective,
|
|
22
25
|
resolveClaudeTransport
|
|
@@ -29,7 +32,7 @@ import {
|
|
|
29
32
|
} from "./cli-2pdaysab.js";
|
|
30
33
|
import {
|
|
31
34
|
applyReasoningEffort
|
|
32
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-2hhfhfq5.js";
|
|
33
36
|
import {
|
|
34
37
|
swarmRuntimeInstanceId
|
|
35
38
|
} from "./cli-re8z5p8p.js";
|
|
@@ -39,13 +42,20 @@ import {
|
|
|
39
42
|
terminateProcessGroup
|
|
40
43
|
} from "./cli-y89t4nca.js";
|
|
41
44
|
import {
|
|
45
|
+
CLAUDE_CREDENTIALS_HINT,
|
|
42
46
|
init_credentials,
|
|
43
47
|
validateClaudeCredentials
|
|
44
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-xk79303e.js";
|
|
49
|
+
import {
|
|
50
|
+
deriveDefaultRoute,
|
|
51
|
+
init_src,
|
|
52
|
+
routeCredentialStatus,
|
|
53
|
+
routeUnsetEnv
|
|
54
|
+
} from "./cli-f9w1semm.js";
|
|
45
55
|
import {
|
|
46
56
|
init_secret_scrubber,
|
|
47
57
|
scrubSecrets
|
|
48
|
-
} from "./cli-
|
|
58
|
+
} from "./cli-nexqx4ve.js";
|
|
49
59
|
import {
|
|
50
60
|
require_src
|
|
51
61
|
} from "./cli-knd276ed.js";
|
|
@@ -55,6 +65,7 @@ import {
|
|
|
55
65
|
} from "./cli-bc05qbss.js";
|
|
56
66
|
|
|
57
67
|
// src/providers/claude-adapter.ts
|
|
68
|
+
init_src();
|
|
58
69
|
var import_api = __toESM(require_src(), 1);
|
|
59
70
|
import { readFile, unlink, writeFile } from "node:fs/promises";
|
|
60
71
|
import { homedir } from "node:os";
|
|
@@ -219,14 +230,31 @@ function normalizeClaudeMessage(json, state) {
|
|
|
219
230
|
|
|
220
231
|
// src/providers/claude-adapter.ts
|
|
221
232
|
function checkClaudeCredentials(env) {
|
|
222
|
-
|
|
223
|
-
|
|
233
|
+
const route = deriveDefaultRoute("claude", env);
|
|
234
|
+
if (!route) {
|
|
235
|
+
return {
|
|
236
|
+
ready: false,
|
|
237
|
+
missing: ["CLAUDE_CODE_OAUTH_TOKEN", "ANTHROPIC_API_KEY"],
|
|
238
|
+
hint: CLAUDE_CREDENTIALS_HINT
|
|
239
|
+
};
|
|
224
240
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
missing: [
|
|
228
|
-
|
|
229
|
-
|
|
241
|
+
const status = routeCredentialStatus(route, env);
|
|
242
|
+
if (status.ready)
|
|
243
|
+
return { ready: true, missing: [], satisfiedBy: "env" };
|
|
244
|
+
return { ready: false, missing: status.missing, hint: status.hint };
|
|
245
|
+
}
|
|
246
|
+
function withClaudeRouteEnv(env) {
|
|
247
|
+
const route = deriveDefaultRoute("claude", env);
|
|
248
|
+
if (!route)
|
|
249
|
+
return env;
|
|
250
|
+
const firstParty = route.provider === "anthropic";
|
|
251
|
+
const unset = routeUnsetEnv("claude", route).filter((key) => firstParty ? env[key] : env[key] !== "");
|
|
252
|
+
if (unset.length === 0)
|
|
253
|
+
return env;
|
|
254
|
+
const next = { ...env };
|
|
255
|
+
for (const key of unset)
|
|
256
|
+
next[key] = "";
|
|
257
|
+
return next;
|
|
230
258
|
}
|
|
231
259
|
function getTaskFilePath(key) {
|
|
232
260
|
return `/tmp/agent-swarm-task-${key}.json`;
|
|
@@ -450,7 +478,7 @@ function buildClaudeCodeRuntimeEnv(_sourceEnv) {
|
|
|
450
478
|
};
|
|
451
479
|
}
|
|
452
480
|
function buildClaudeSessionEnvironment(config, model, taskFilePath) {
|
|
453
|
-
const sourceEnv = { ...config.env || process.env };
|
|
481
|
+
const sourceEnv = { ...withClaudeRouteEnv(config.env || process.env) };
|
|
454
482
|
delete sourceEnv.AGENT_SWARM_CLAUDE_OAUTH_TOKEN;
|
|
455
483
|
const reasoningApplication = applyReasoningEffort("claude", model, config.reasoningEffort);
|
|
456
484
|
return {
|
|
@@ -481,8 +509,7 @@ async function runClaudeSessionSummary(config, transcript, runSummary) {
|
|
|
481
509
|
agentId: config.agentId,
|
|
482
510
|
transcript: text,
|
|
483
511
|
env: {
|
|
484
|
-
...process.env,
|
|
485
|
-
...config.env,
|
|
512
|
+
...withClaudeRouteEnv({ ...process.env, ...config.env }),
|
|
486
513
|
AGENT_SWARM_TASK_ID: config.taskId,
|
|
487
514
|
MCP_BASE_URL: config.apiUrl,
|
|
488
515
|
AGENT_SWARM_API_KEY: config.apiKey
|
|
@@ -495,6 +522,18 @@ async function runClaudeSessionSummary(config, transcript, runSummary) {
|
|
|
495
522
|
function getSystemPromptFilePath(taskId) {
|
|
496
523
|
return `/tmp/agent-swarm-system-prompt-${taskId}.txt`;
|
|
497
524
|
}
|
|
525
|
+
async function resolveClaudePrompt(prompt, home) {
|
|
526
|
+
const resolved = await resolveSlashSkillPrompt(prompt, {
|
|
527
|
+
providerLabel: "claude",
|
|
528
|
+
skillsDir: join(home, ".claude", "skills"),
|
|
529
|
+
stripFrontmatter: true,
|
|
530
|
+
emit: (event) => {
|
|
531
|
+
if (event.type === "raw_stderr")
|
|
532
|
+
console.warn(event.content.trimEnd());
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
return resolved.startsWith("-") ? prompt : resolved;
|
|
536
|
+
}
|
|
498
537
|
|
|
499
538
|
class ClaudeSession {
|
|
500
539
|
config;
|
|
@@ -818,7 +857,11 @@ class ClaudeAdapter {
|
|
|
818
857
|
console.warn("[claude-adapter] resumeSessionId ignored — native resume is disabled by deprecation plan");
|
|
819
858
|
}
|
|
820
859
|
const model = config.model || "opus";
|
|
821
|
-
const sourceEnv = config.env || process.env;
|
|
860
|
+
const sourceEnv = withClaudeRouteEnv(config.env || process.env);
|
|
861
|
+
const sessionConfig = {
|
|
862
|
+
...config,
|
|
863
|
+
prompt: await resolveClaudePrompt(config.prompt, process.env.HOME ?? homedir())
|
|
864
|
+
};
|
|
822
865
|
const transport = resolveClaudeTransport(sourceEnv);
|
|
823
866
|
const credType = validateClaudeCredentials(sourceEnv);
|
|
824
867
|
console.log(`\x1B[2m[claude]\x1B[0m Using credential: ${credType}`);
|
|
@@ -831,7 +874,7 @@ class ClaudeAdapter {
|
|
|
831
874
|
if (transport === "sdk" && isClaudeBridgeEffective(sourceEnv)) {
|
|
832
875
|
throw new Error("CLAUDE_TRANSPORT=sdk cannot run with an effective Claude Bridge configuration. Select CLI transport or disable the bridge.");
|
|
833
876
|
}
|
|
834
|
-
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-
|
|
877
|
+
const claudeSdk = transport === "sdk" ? await import("./claude-sdk-session-jxyxnrwd.js") : undefined;
|
|
835
878
|
claudeSdk?.validateClaudeSdkAdditionalArgs([
|
|
836
879
|
...claudeBinaryArgv.slice(1),
|
|
837
880
|
...config.additionalArgs ?? []
|
|
@@ -915,7 +958,7 @@ ${stderr}`.trim();
|
|
|
915
958
|
}
|
|
916
959
|
if (transport === "sdk") {
|
|
917
960
|
return claudeSdk.createClaudeSdkSession({
|
|
918
|
-
config,
|
|
961
|
+
config: sessionConfig,
|
|
919
962
|
model,
|
|
920
963
|
taskFilePath,
|
|
921
964
|
taskFileKey,
|
|
@@ -928,7 +971,7 @@ ${stderr}`.trim();
|
|
|
928
971
|
runSessionSummary: this.runSessionSummary
|
|
929
972
|
});
|
|
930
973
|
}
|
|
931
|
-
return new ClaudeSession(
|
|
974
|
+
return new ClaudeSession(sessionConfig, model, taskFilePath, taskFileKey, sessionMcpConfig, effectiveClaudeBinaryArgv, systemPromptFile, harnessVariant, harnessVariantMeta, queueSteeringSupported, this.runSessionSummary);
|
|
932
975
|
}
|
|
933
976
|
async canResume(_sessionId) {
|
|
934
977
|
return true;
|
|
@@ -938,4 +981,4 @@ ${stderr}`.trim();
|
|
|
938
981
|
}
|
|
939
982
|
}
|
|
940
983
|
|
|
941
|
-
export { normalizeClaudeMessage, checkClaudeCredentials, getTaskFilePath, cleanupTaskFile, parseClaudeBinary, resolveClaudeQueueSteeringOverride, resolveClaudeBinary, parseClaudeBridgeEnabled, resolveClaudeBridgeEnabled, resolveClaudeBinaryArgv, preseedClaudeTrustDialog, mergeMcpConfig, createSessionMcpConfig, buildClaudeCodeOtelEnv, buildClaudeCodeRuntimeEnv, buildClaudeSessionEnvironment, runClaudeSessionSummary, getSystemPromptFilePath, ClaudeAdapter };
|
|
984
|
+
export { normalizeClaudeMessage, checkClaudeCredentials, withClaudeRouteEnv, getTaskFilePath, cleanupTaskFile, parseClaudeBinary, resolveClaudeQueueSteeringOverride, resolveClaudeBinary, parseClaudeBridgeEnabled, resolveClaudeBridgeEnabled, resolveClaudeBinaryArgv, preseedClaudeTrustDialog, mergeMcpConfig, createSessionMcpConfig, buildClaudeCodeOtelEnv, buildClaudeCodeRuntimeEnv, buildClaudeSessionEnvironment, runClaudeSessionSummary, getSystemPromptFilePath, resolveClaudePrompt, ClaudeAdapter };
|
package/dist/cli.js
CHANGED
|
@@ -13,20 +13,20 @@ import"./cli-0xqde53b.js";
|
|
|
13
13
|
import"./cli-pqetb83f.js";
|
|
14
14
|
import {
|
|
15
15
|
bedrockProviderModule
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-rfjw9jw2.js";
|
|
17
17
|
import"./cli-yn0a417a.js";
|
|
18
18
|
import"./cli-cgj4hc12.js";
|
|
19
19
|
import"./cli-txgcknmy.js";
|
|
20
20
|
import"./cli-6map995v.js";
|
|
21
|
-
import"./cli-
|
|
21
|
+
import"./cli-mbssg1xv.js";
|
|
22
22
|
import"./cli-y2apkfe2.js";
|
|
23
23
|
import"./cli-7kyk9jr3.js";
|
|
24
24
|
import {
|
|
25
25
|
setBedrockProviderModule
|
|
26
26
|
} from "./cli-13hw4z91.js";
|
|
27
|
+
import"./cli-ykk5jaax.js";
|
|
27
28
|
import"./cli-btbzvq95.js";
|
|
28
29
|
import"./cli-1m2e086m.js";
|
|
29
|
-
import"./cli-ykk5jaax.js";
|
|
30
30
|
import"./cli-bzr0ftht.js";
|
|
31
31
|
import"./cli-bd957dgb.js";
|
|
32
32
|
import {
|
|
@@ -58,7 +58,7 @@ var import_react = __toESM(require_react(), 1);
|
|
|
58
58
|
// package.json
|
|
59
59
|
var package_default = {
|
|
60
60
|
name: "@desplega.ai/agent-swarm",
|
|
61
|
-
version: "1.
|
|
61
|
+
version: "1.162.0",
|
|
62
62
|
description: "agent-swarm.dev — an open-source operating system for AI work: a lead agent breaks goals into tasks, routes them to specialized workers such as Claude Code or Codex, runs each worker in an isolated container, and preserves shared memory, tools, schedules, and review gates so delegated work compounds across sessions.",
|
|
63
63
|
keywords: [
|
|
64
64
|
"agent-swarm.dev",
|
|
@@ -140,6 +140,13 @@ var package_default = {
|
|
|
140
140
|
"check:ai-toolbox-skills": "bun scripts/sync-ai-toolbox-skills.ts --check",
|
|
141
141
|
"check:skill-sources": "bun scripts/check-skill-sources.ts",
|
|
142
142
|
"check:operator-skill": "bun scripts/check-operator-skill.ts",
|
|
143
|
+
"sync:telemetry-contract": "bun scripts/sync-telemetry-contract.ts",
|
|
144
|
+
"check:telemetry-contract": "bun scripts/sync-telemetry-contract.ts --check",
|
|
145
|
+
"build:telemetry-docs": "bun scripts/gen-telemetry-docs.ts",
|
|
146
|
+
"check:telemetry-docs": "bun scripts/gen-telemetry-docs.ts --check",
|
|
147
|
+
"build:claude-mod": "bun scripts/build-claude-mod.ts",
|
|
148
|
+
"check:claude-mod": "bun scripts/build-claude-mod.ts --check",
|
|
149
|
+
"test:claude-mod": "bash scripts/test-claude-mod.sh",
|
|
143
150
|
"build:script-types": "bun scripts/bundle-script-types.ts",
|
|
144
151
|
"build:extension-types": "bun scripts/bundle-extension-types.ts",
|
|
145
152
|
"build:extension-schema": "bun scripts/build-extension-manifest-schema.ts",
|
|
@@ -162,7 +169,7 @@ var package_default = {
|
|
|
162
169
|
"tsc:check": "bun tsc --noEmit",
|
|
163
170
|
"check:db-boundary": "bash scripts/check-db-boundary.sh",
|
|
164
171
|
"check:test-spawn-sync": "bash scripts/check-test-spawn-sync.sh",
|
|
165
|
-
"check:dep-graph": "depcruise src plugin/opencode-plugins --config .dependency-cruiser.cjs",
|
|
172
|
+
"check:dep-graph": "depcruise src plugin/opencode-plugins packages/model-routing --config .dependency-cruiser.cjs",
|
|
166
173
|
"check:api-key-boundary": "bash scripts/check-api-key-boundary.sh",
|
|
167
174
|
"check:vendored-openapi": "bun scripts/check-vendored-openapi.ts",
|
|
168
175
|
"check:rbac-coverage": "bun scripts/check-rbac-coverage.ts",
|
|
@@ -194,8 +201,8 @@ var package_default = {
|
|
|
194
201
|
"start:portless": "portless api.swarm bun --expose-gc src/http.ts",
|
|
195
202
|
inspector: "bunx @modelcontextprotocol/inspector --transport stdio bun src/stdio.ts",
|
|
196
203
|
"inspector:http": "bunx @modelcontextprotocol/inspector --transport http https://api.swarm.localhost:1355/mcp",
|
|
197
|
-
lint: "biome check src apps/evals packages/ui-e2e",
|
|
198
|
-
"lint:fix": "biome check --write src apps/evals packages/ui-e2e",
|
|
204
|
+
lint: "biome check src apps/evals packages/ui-e2e packages/model-routing",
|
|
205
|
+
"lint:fix": "biome check --write src apps/evals packages/ui-e2e packages/model-routing",
|
|
199
206
|
format: "biome format --write src",
|
|
200
207
|
"build:binary": "bun build ./src/cli.tsx ./src/providers/pi-binary-root/src/extensions/codemode/worker.ts --root ./src/providers/pi-binary-root --compile --bytecode --format=esm --compile-exec-argv='--expose-gc' --target=bun-linux-x64 --outfile ./dist/agent-swarm",
|
|
201
208
|
"build:binary:arm64": "bun build ./src/cli.tsx ./src/providers/pi-binary-root/src/extensions/codemode/worker.ts --root ./src/providers/pi-binary-root --compile --bytecode --format=esm --compile-exec-argv='--expose-gc' --target=bun-linux-arm64 --outfile ./dist/agent-swarm",
|
|
@@ -228,6 +235,7 @@ var package_default = {
|
|
|
228
235
|
"@biomejs/biome": "^2.3.10",
|
|
229
236
|
"@desplega.ai/slack-mock": "^0.4.0",
|
|
230
237
|
"@desplega/model-catalog": "workspace:*",
|
|
238
|
+
"@desplega/model-routing": "workspace:*",
|
|
231
239
|
"@faker-js/faker": "^10.4.0",
|
|
232
240
|
"@opencode-ai/plugin": "1.18.34",
|
|
233
241
|
"@types/bun": "latest",
|
|
@@ -244,21 +252,21 @@ var package_default = {
|
|
|
244
252
|
bun: ">=1.3.12"
|
|
245
253
|
},
|
|
246
254
|
dependencies: {
|
|
247
|
-
"@agentclientprotocol/sdk": "1.
|
|
255
|
+
"@agentclientprotocol/sdk": "1.7.0",
|
|
248
256
|
"@ai-sdk/openai": "^3.0.41",
|
|
249
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
250
|
-
"@anthropic-ai/sdk": "^0.
|
|
257
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.289",
|
|
258
|
+
"@anthropic-ai/sdk": "^0.131.0",
|
|
251
259
|
"@asteasolutions/zod-to-openapi": "^8.0.0",
|
|
252
260
|
"@aws-sdk/client-bedrock": "3.1048.0",
|
|
253
261
|
"@desplega.ai/business-use": "^0.4.2",
|
|
254
262
|
"@desplega.ai/localtunnel": "^2.2.0",
|
|
255
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
256
|
-
"@earendil-works/pi-ai": "^0.
|
|
257
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
263
|
+
"@earendil-works/pi-agent-core": "^1.0.2",
|
|
264
|
+
"@earendil-works/pi-ai": "^1.0.2",
|
|
265
|
+
"@earendil-works/pi-coding-agent": "^1.0.2",
|
|
258
266
|
"@inkjs/ui": "^2.0.0",
|
|
259
267
|
"@linear/sdk": "^77.0.0",
|
|
260
268
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
261
|
-
"@openai/codex": "0.
|
|
269
|
+
"@openai/codex": "0.160.0",
|
|
262
270
|
"@opencode-ai/sdk": "^1.18.34",
|
|
263
271
|
"@openfort/openfort-node": "^0.9.1",
|
|
264
272
|
"@opentelemetry/api": "^1.9.1",
|
|
@@ -559,7 +567,7 @@ Used internally by the agent-swarm hooks system.`,
|
|
|
559
567
|
},
|
|
560
568
|
"codex-hook": {
|
|
561
569
|
usage: `${binName} codex-hook`,
|
|
562
|
-
description: `Handle Codex CLI hook events from stdin (steering delivery).
|
|
570
|
+
description: `Handle Codex CLI hook events from stdin (steering delivery, PR body leak guard).
|
|
563
571
|
Used internally by the codex hooks registered in the worker image.`,
|
|
564
572
|
options: " -h, --help Show this help",
|
|
565
573
|
examples: ` ${binName} codex-hook`
|
|
@@ -753,7 +761,7 @@ function McpServer({ port, apiKey, dbPath }) {
|
|
|
753
761
|
if (dbPath) {
|
|
754
762
|
process.env.DATABASE_PATH = dbPath;
|
|
755
763
|
}
|
|
756
|
-
import("./http-
|
|
764
|
+
import("./http-19pzbfrt.js").then(() => {
|
|
757
765
|
setStatus("running");
|
|
758
766
|
}).catch((err) => {
|
|
759
767
|
setStatus("error");
|
|
@@ -839,7 +847,7 @@ function WorkerRunner({
|
|
|
839
847
|
}) {
|
|
840
848
|
const { exit } = use_app_default();
|
|
841
849
|
import_react.useEffect(() => {
|
|
842
|
-
import("./worker-
|
|
850
|
+
import("./worker-0h35rvk4.js").then(({ runWorker }) => runWorker({
|
|
843
851
|
prompt: prompt || undefined,
|
|
844
852
|
yolo,
|
|
845
853
|
systemPrompt: systemPrompt || undefined,
|
|
@@ -856,7 +864,7 @@ function WorkerRunner({
|
|
|
856
864
|
function LeadRunner({ prompt, yolo, systemPrompt, systemPromptFile, additionalArgs }) {
|
|
857
865
|
const { exit } = use_app_default();
|
|
858
866
|
import_react.useEffect(() => {
|
|
859
|
-
import("./lead-
|
|
867
|
+
import("./lead-qp4xkvjq.js").then(({ runLead }) => runLead({
|
|
860
868
|
prompt: prompt || undefined,
|
|
861
869
|
yolo,
|
|
862
870
|
systemPrompt: systemPrompt || undefined,
|
|
@@ -896,8 +904,8 @@ function LazyComponent({
|
|
|
896
904
|
}
|
|
897
905
|
return import_react.createElement(Component, props);
|
|
898
906
|
}
|
|
899
|
-
var loadOnboard = () => import("./onboard-
|
|
900
|
-
var loadConnect = () => import("./setup-
|
|
907
|
+
var loadOnboard = () => import("./onboard-r6b78cs4.js").then(({ Onboard }) => Onboard);
|
|
908
|
+
var loadConnect = () => import("./setup-hbyzd65h.js").then(({ Setup }) => Setup);
|
|
901
909
|
function UnknownCommand({ command }) {
|
|
902
910
|
const { exit } = use_app_default();
|
|
903
911
|
import_react.useEffect(() => {
|
|
@@ -1027,19 +1035,19 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
1027
1035
|
}
|
|
1028
1036
|
process.exit(0);
|
|
1029
1037
|
} else if (args.command === "hook") {
|
|
1030
|
-
const { runHook } = await import("./hook-
|
|
1038
|
+
const { runHook } = await import("./hook-4tpts2ry.js");
|
|
1031
1039
|
await runHook();
|
|
1032
1040
|
} else if (args.command === "codex-hook") {
|
|
1033
|
-
const { handleCodexHook } = await import("./codex-hook-
|
|
1041
|
+
const { handleCodexHook } = await import("./codex-hook-m73jmqgx.js");
|
|
1034
1042
|
await handleCodexHook();
|
|
1035
|
-
process.exit(0);
|
|
1043
|
+
process.exit(process.exitCode ?? 0);
|
|
1036
1044
|
} else if (args.command === "session-summary-stdin") {
|
|
1037
|
-
const { runSessionSummaryFromStdin } = await import("./hook-
|
|
1045
|
+
const { runSessionSummaryFromStdin } = await import("./hook-46g1jrvx.js");
|
|
1038
1046
|
await runSessionSummaryFromStdin();
|
|
1039
1047
|
process.exit(process.exitCode ?? 0);
|
|
1040
1048
|
} else if (args.command === "artifact") {
|
|
1041
1049
|
const artifactArgs = process.argv.slice(process.argv.indexOf("artifact") + 1);
|
|
1042
|
-
const { runArtifact } = await import("./artifact-
|
|
1050
|
+
const { runArtifact } = await import("./artifact-fey7dvj9.js");
|
|
1043
1051
|
await runArtifact(artifactArgs[0] || "help", {
|
|
1044
1052
|
additionalArgs: artifactArgs.slice(1),
|
|
1045
1053
|
port: args.port,
|
|
@@ -1047,7 +1055,7 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
1047
1055
|
});
|
|
1048
1056
|
} else if (args.command === "x") {
|
|
1049
1057
|
const xArgs = process.argv.slice(process.argv.indexOf("x") + 1);
|
|
1050
|
-
const { runXCommand } = await import("./x-
|
|
1058
|
+
const { runXCommand } = await import("./x-f1gt1pz3.js");
|
|
1051
1059
|
await runXCommand(xArgs);
|
|
1052
1060
|
} else if (args.command === "scripts") {
|
|
1053
1061
|
const scriptsArgs = process.argv.slice(process.argv.indexOf("scripts") + 1);
|
|
@@ -1055,7 +1063,7 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
1055
1063
|
printHelp("scripts");
|
|
1056
1064
|
process.exit(scriptsArgs[0] === "reembed" || args.showHelp ? 0 : 1);
|
|
1057
1065
|
}
|
|
1058
|
-
const { runScriptsMaintenanceCommand } = await import("./maintenance-
|
|
1066
|
+
const { runScriptsMaintenanceCommand } = await import("./maintenance-rm5885hm.js");
|
|
1059
1067
|
await runScriptsMaintenanceCommand(scriptsArgs);
|
|
1060
1068
|
console.log("Scripts re-embedded.");
|
|
1061
1069
|
} else if (args.command === "rbac") {
|
|
@@ -1065,21 +1073,21 @@ ${binName} docs \u2014 v${package_default.version}
|
|
|
1065
1073
|
printHelp("rbac");
|
|
1066
1074
|
process.exit(args.showHelp ? 0 : 1);
|
|
1067
1075
|
}
|
|
1068
|
-
const { runRbacCliCommand } = await import("./rbac-roles-
|
|
1076
|
+
const { runRbacCliCommand } = await import("./rbac-roles-kwntb23q.js");
|
|
1069
1077
|
await runRbacCliCommand(rbacArgs);
|
|
1070
1078
|
} else if (args.command === "codex-login") {
|
|
1071
|
-
const { runCodexLogin } = await import("./codex-login-
|
|
1079
|
+
const { runCodexLogin } = await import("./codex-login-cf7mzsgg.js");
|
|
1072
1080
|
const codexLoginArgs = process.argv.slice(process.argv.indexOf("codex-login") + 1);
|
|
1073
1081
|
await runCodexLogin(codexLoginArgs);
|
|
1074
1082
|
} else if (args.command === "codex-session-runner") {
|
|
1075
|
-
const { runCodexSessionRunner } = await import("./codex-session-runner-
|
|
1083
|
+
const { runCodexSessionRunner } = await import("./codex-session-runner-ban9excr.js");
|
|
1076
1084
|
await runCodexSessionRunner();
|
|
1077
1085
|
} else if (args.command === "claude-managed-setup") {
|
|
1078
|
-
const { runClaudeManagedSetup } = await import("./claude-managed-setup-
|
|
1086
|
+
const { runClaudeManagedSetup } = await import("./claude-managed-setup-pkyrgshb.js");
|
|
1079
1087
|
const setupArgs = process.argv.slice(process.argv.indexOf("claude-managed-setup") + 1);
|
|
1080
1088
|
await runClaudeManagedSetup(setupArgs);
|
|
1081
1089
|
} else if (args.command === "e2b") {
|
|
1082
|
-
const { runE2BCommand } = await import("./e2b-
|
|
1090
|
+
const { runE2BCommand } = await import("./e2b-gjgdjp91.js");
|
|
1083
1091
|
const e2bArgs = process.argv.slice(process.argv.indexOf("e2b") + 1);
|
|
1084
1092
|
await runE2BCommand(e2bArgs);
|
|
1085
1093
|
} else {
|
|
@@ -29,15 +29,17 @@ var transport = {
|
|
|
29
29
|
throw new Error(`${LABEL} returned an unexpected response`);
|
|
30
30
|
if (body.success === false)
|
|
31
31
|
throw new Error(cloudflareErrorMessage(body.errors));
|
|
32
|
-
const
|
|
33
|
-
if (!isRecord(
|
|
32
|
+
const result = body.result;
|
|
33
|
+
if (!isRecord(result))
|
|
34
34
|
throw new Error(`${LABEL} returned an unexpected response`);
|
|
35
|
-
if (
|
|
36
|
-
|
|
35
|
+
if ("answers" in result)
|
|
36
|
+
return result;
|
|
37
|
+
if (result.state !== "Completed") {
|
|
38
|
+
throw new Error(`${LABEL} run did not complete (state: ${String(result.state)})`);
|
|
37
39
|
}
|
|
38
|
-
if (!isRecord(
|
|
40
|
+
if (!isRecord(result.result))
|
|
39
41
|
throw new Error(`${LABEL} returned an unexpected response`);
|
|
40
|
-
return
|
|
42
|
+
return result.result;
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
45
|
var classify = (model, context, options) => classifySystemOne(transport, model, context, options);
|
|
@@ -7,44 +7,45 @@ import {
|
|
|
7
7
|
createInProcessCodexSession,
|
|
8
8
|
resolveCodexAuthMode,
|
|
9
9
|
resolveCodexRunnerArgv
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-vyqs9ya8.js";
|
|
11
11
|
import"./cli-hsxj0yar.js";
|
|
12
|
-
import"./cli-r94z9p1z.js";
|
|
13
12
|
import"./cli-gt4hxb8p.js";
|
|
14
13
|
import"./cli-q2j38vre.js";
|
|
15
|
-
import"./cli-xjcywfsf.js";
|
|
16
|
-
import"./cli-hp1n6zq3.js";
|
|
17
14
|
import"./cli-zm7njwzd.js";
|
|
18
|
-
import"./cli-
|
|
15
|
+
import"./cli-wgbezhw2.js";
|
|
16
|
+
import"./cli-tre4bdgq.js";
|
|
17
|
+
import"./cli-4dcpaefp.js";
|
|
18
|
+
import"./cli-hp1n6zq3.js";
|
|
19
19
|
import"./cli-2pdaysab.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
20
|
+
import"./cli-2hhfhfq5.js";
|
|
21
|
+
import"./cli-w0bwte75.js";
|
|
22
22
|
import"./cli-re8z5p8p.js";
|
|
23
|
-
import"./cli-y89t4nca.js";
|
|
24
23
|
import"./cli-f14fvzag.js";
|
|
25
|
-
import"./cli-
|
|
26
|
-
import"./cli-
|
|
24
|
+
import"./cli-y89t4nca.js";
|
|
25
|
+
import"./cli-5bcd7sfy.js";
|
|
26
|
+
import"./cli-yy6dew39.js";
|
|
27
27
|
import"./cli-3dpj7atn.js";
|
|
28
|
-
import"./cli-
|
|
28
|
+
import"./cli-2x0e561b.js";
|
|
29
|
+
import"./cli-nt8hecg9.js";
|
|
29
30
|
import"./cli-rb9m6rpe.js";
|
|
30
|
-
import"./cli-rykfmgwg.js";
|
|
31
31
|
import"./cli-bsakbbkm.js";
|
|
32
32
|
import"./cli-trc24wk2.js";
|
|
33
|
-
import"./cli-ktmyrtpn.js";
|
|
34
|
-
import"./cli-dv6cdjs2.js";
|
|
35
|
-
import"./cli-1a2j50m0.js";
|
|
36
|
-
import"./cli-ywybs5as.js";
|
|
37
|
-
import"./cli-ej6gbxfb.js";
|
|
38
|
-
import"./cli-kmcpfwn2.js";
|
|
39
|
-
import"./cli-sd0mxa3c.js";
|
|
40
|
-
import"./cli-w5e1d1vv.js";
|
|
41
|
-
import"./cli-0q3avq3s.js";
|
|
42
|
-
import"./cli-r2ap2czm.js";
|
|
43
33
|
import"./cli-13hw4z91.js";
|
|
34
|
+
import"./cli-ykk5jaax.js";
|
|
44
35
|
import"./cli-btbzvq95.js";
|
|
45
36
|
import"./cli-1m2e086m.js";
|
|
46
|
-
import"./cli-ykk5jaax.js";
|
|
47
37
|
import"./cli-bzr0ftht.js";
|
|
38
|
+
import"./cli-xqpk3rp7.js";
|
|
39
|
+
import"./cli-ywybs5as.js";
|
|
40
|
+
import"./cli-gd4favx9.js";
|
|
41
|
+
import"./cli-1a2j50m0.js";
|
|
42
|
+
import"./cli-f9w1semm.js";
|
|
43
|
+
import"./cli-ej6gbxfb.js";
|
|
44
|
+
import"./cli-jyy6pm2f.js";
|
|
45
|
+
import"./cli-sd0mxa3c.js";
|
|
46
|
+
import"./cli-w5e1d1vv.js";
|
|
47
|
+
import"./cli-sqvfa090.js";
|
|
48
|
+
import"./cli-nexqx4ve.js";
|
|
48
49
|
import"./cli-knd276ed.js";
|
|
49
50
|
import"./cli-bc05qbss.js";
|
|
50
51
|
export {
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import {
|
|
3
3
|
renderSteeringDelivery
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-pkd6s2wy.js";
|
|
5
|
+
import {
|
|
6
|
+
guardGhPrBody
|
|
7
|
+
} from "./cli-wbvnn6tk.js";
|
|
5
8
|
import {
|
|
6
9
|
getApiKey
|
|
7
10
|
} from "./cli-f14fvzag.js";
|
|
8
11
|
import {
|
|
9
12
|
init_steering_enabled,
|
|
10
13
|
isSteeringEnabled
|
|
11
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-eg0b3p0k.js";
|
|
12
15
|
import {
|
|
13
16
|
getMcpBaseUrl,
|
|
14
17
|
init_constants
|
|
15
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-gd4favx9.js";
|
|
19
|
+
import"./cli-qjjvzwzd.js";
|
|
16
20
|
import"./cli-ej6gbxfb.js";
|
|
17
21
|
import"./cli-bc05qbss.js";
|
|
18
22
|
|
|
@@ -90,6 +94,11 @@ ${additionalContext}`
|
|
|
90
94
|
hookSpecificOutput: { hookEventName: event, additionalContext }
|
|
91
95
|
};
|
|
92
96
|
}
|
|
97
|
+
async function codexPreToolUseBlock(msg, deps) {
|
|
98
|
+
if (msg.hook_event_name !== "PreToolUse")
|
|
99
|
+
return null;
|
|
100
|
+
return guardGhPrBody(msg.tool_input, msg.cwd ?? process.cwd(), deps);
|
|
101
|
+
}
|
|
93
102
|
async function handleCodexHook() {
|
|
94
103
|
let msg;
|
|
95
104
|
try {
|
|
@@ -97,6 +106,12 @@ async function handleCodexHook() {
|
|
|
97
106
|
} catch {
|
|
98
107
|
return;
|
|
99
108
|
}
|
|
109
|
+
const block = await codexPreToolUseBlock(msg);
|
|
110
|
+
if (block) {
|
|
111
|
+
console.error(block);
|
|
112
|
+
process.exitCode = 2;
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
100
115
|
try {
|
|
101
116
|
const output = await handleCodexHookEvent(msg, resolveCodexHookConfig());
|
|
102
117
|
if (output)
|
|
@@ -104,6 +119,7 @@ async function handleCodexHook() {
|
|
|
104
119
|
} catch {}
|
|
105
120
|
}
|
|
106
121
|
export {
|
|
122
|
+
codexPreToolUseBlock,
|
|
107
123
|
collectDeliverableSteering,
|
|
108
124
|
handleCodexHook,
|
|
109
125
|
handleCodexHookEvent,
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
loadAllCodexOAuthSlots,
|
|
8
8
|
loginCodexOAuth,
|
|
9
9
|
storeCodexOAuth
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-yy6dew39.js";
|
|
11
11
|
import"./cli-1a2j50m0.js";
|
|
12
|
-
import"./cli-
|
|
12
|
+
import"./cli-nexqx4ve.js";
|
|
13
13
|
import {
|
|
14
14
|
__require
|
|
15
15
|
} from "./cli-bc05qbss.js";
|