@desplega.ai/agent-swarm 2.4.4 → 2.5.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 -2
- package/dist/{acp-adapter-thq04adh.js → acp-adapter-11gp67nr.js} +8 -6
- package/dist/{actions-j6ywh6x5.js → actions-8p2kze8j.js} +24 -22
- package/dist/{amp-adapter-k8b5xmj8.js → amp-adapter-z4qvhacj.js} +2 -2
- package/dist/{anthropic-messages-g6pqmqk4.js → anthropic-messages-txs190dd.js} +17 -20
- package/dist/{app-rb7vc02s.js → app-0qp0a2gk.js} +3 -3
- package/dist/{assistant-ftta1zjf.js → assistant-jedd3ktm.js} +27 -25
- package/dist/{azure-openai-responses-9dbmj346.js → azure-openai-responses-9kfwhmn7.js} +18 -13
- package/dist/{boot-reembed-xns7h5h9.js → boot-reembed-4xwq5tg0.js} +1 -1
- package/dist/{boot-reembed-srp6v6af.js → boot-reembed-n4wq5dd2.js} +1 -1
- package/dist/{boot-scrub-sweep-3qqrh2mz.js → boot-scrub-sweep-69h90xcq.js} +4 -4
- package/dist/{boot-seeds-9ks8hce7.js → boot-seeds-3vn0m9sg.js} +4 -4
- package/dist/{claude-adapter-k5ksyres.js → claude-adapter-221mvad5.js} +8 -6
- package/dist/{claude-managed-adapter-h2y889ge.js → claude-managed-adapter-gt6pa35d.js} +2 -2
- package/dist/{claude-managed-setup-n5a5eqks.js → claude-managed-setup-c3hp36ph.js} +4 -4
- package/dist/{claude-sdk-session-2j3j4kwn.js → claude-sdk-session-8thjsk5e.js} +9729 -9628
- package/dist/{cli-b9fcxxev.js → cli-007cnhm1.js} +50 -4
- package/dist/{cli-j4rqdf2n.js → cli-03vpq45j.js} +2 -2
- package/dist/{cli-amyhm3gj.js → cli-0y6f0ckq.js} +1 -1
- package/dist/{cli-4dg55wsk.js → cli-0z3vjrpm.js} +1 -1
- package/dist/{cli-pccfmtb5.js → cli-179xcyky.js} +11 -11
- package/dist/{cli-3r8samv3.js → cli-1f0gp9vz.js} +3 -2
- package/dist/{cli-hj3debgw.js → cli-1pr672hz.js} +3 -3
- package/dist/{cli-0bqteszy.js → cli-2nf3b08t.js} +328 -25
- package/dist/{cli-t7cyef5g.js → cli-36j4jnk3.js} +4 -4
- package/dist/{cli-er83cjbn.js → cli-3qv8naq8.js} +527 -231
- package/dist/cli-3zwye9sn.js +1193 -0
- package/dist/{cli-60cgh1rv.js → cli-459fk97x.js} +7 -7
- package/dist/{cli-xj0re5tm.js → cli-4w24f7z3.js} +1 -1
- package/dist/{cli-v3yr2gbg.js → cli-5kzk3472.js} +2198 -968
- package/dist/{cli-h7gc0b4r.js → cli-5m84zd2k.js} +55 -18
- package/dist/{cli-w6nadkh4.js → cli-5rvg1ddk.js} +5 -5
- package/dist/{cli-dvkmp9bt.js → cli-6ctwrf1z.js} +20 -10
- package/dist/{cli-9qtjfd60.js → cli-6rg2jn2y.js} +3 -2
- package/dist/{cli-2v045xyf.js → cli-7bwtc6yx.js} +3 -3
- package/dist/{cli-3cgngyd8.js → cli-7g40g8hq.js} +35 -17
- package/dist/{cli-q6r7t299.js → cli-92mqenkc.js} +2379 -154
- package/dist/{cli-cynvc9fj.js → cli-9ce2xw98.js} +8 -8
- package/dist/{cli-gqvh8d8a.js → cli-bgdtv62r.js} +36 -22
- package/dist/{cli-wxbn3yfx.js → cli-cz5nmdxt.js} +2 -2
- package/dist/{cli-wt645v7q.js → cli-dabehxhp.js} +1 -1
- package/dist/{cli-vfha21c9.js → cli-e5bxnjps.js} +2 -2
- package/dist/{cli-p20r8w42.js → cli-fcc5qe3f.js} +763 -268
- package/dist/{cli-1ephgwnq.js → cli-fes51ya2.js} +3 -3
- package/dist/{cli-1d70crsy.js → cli-ftmq4nvk.js} +2 -2
- package/dist/{cli-qkhc5aqy.js → cli-fy1jyyym.js} +13 -13
- package/dist/{cli-s95dknxh.js → cli-g1cw7xtt.js} +1 -1
- package/dist/{cli-qje9k2nh.js → cli-g9ypd5en.js} +12 -2
- package/dist/{cli-74c1wpm0.js → cli-gpv60278.js} +1 -1
- package/dist/{cli-pemywhfq.js → cli-ha9rmwgq.js} +2 -1
- package/dist/{cli-bnz0r3kc.js → cli-j1eghqfm.js} +5 -5
- package/dist/{cli-2zqpkvtt.js → cli-jpxsrxcb.js} +1 -1
- package/dist/{cli-ejs3m1sx.js → cli-kxpfx2xr.js} +1 -1
- package/dist/{cli-37yb7307.js → cli-mbfj11fq.js} +1 -1
- package/dist/{cli-pnp2j5zg.js → cli-mmhj8vd7.js} +2 -2
- package/dist/{cli-xf234ws8.js → cli-n4c8e3s5.js} +2 -0
- package/dist/{cli-a0kcty51.js → cli-n6kmqngw.js} +2 -2
- package/dist/{cli-te6b5wvg.js → cli-nnvjb17s.js} +3 -3
- package/dist/{cli-1dmcq2eh.js → cli-nzfnt2gs.js} +1 -1
- package/dist/{cli-625tb7aq.js → cli-p859hcc8.js} +2 -2
- package/dist/{cli-smvcw9z5.js → cli-pasyvjmm.js} +1 -1
- package/dist/cli-pkaqk57w.js +128 -0
- package/dist/{cli-8nyhf7za.js → cli-qqzmjxkf.js} +129 -105
- package/dist/{cli-zrwpctp4.js → cli-r25qpaxt.js} +161 -63
- package/dist/{cli-nc35pxb7.js → cli-rh5smt8t.js} +19 -4
- package/dist/{cli-qwkcwjdn.js → cli-rycdaj0a.js} +1 -1
- package/dist/{cli-esxerzg7.js → cli-s4sntwt4.js} +2 -2
- package/dist/{cli-b8k7epj1.js → cli-segs7hx9.js} +8 -8
- package/dist/{cli-36ckw0wx.js → cli-stxdrqs2.js} +2 -2
- package/dist/{cli-vdm20wej.js → cli-sy8f9705.js} +4 -4
- package/dist/{cli-1m17dc9d.js → cli-ta8bd7th.js} +2 -2
- package/dist/{cli-2y91wnbh.js → cli-we0ra057.js} +222 -10
- package/dist/{cli-55qmbp6z.js → cli-x21dqn18.js} +5 -5
- package/dist/{cli-dqb4n629.js → cli-x6vf4sad.js} +11 -11
- package/dist/{cli-d2mb5s8a.js → cli-x77gen2p.js} +680 -440
- package/dist/{cli-vq97g1jq.js → cli-xawhpgc9.js} +95 -195
- package/dist/{cli-82d3nkc3.js → cli-xd4eqtr2.js} +2 -2
- package/dist/{cli-9fhkkpj5.js → cli-xt768r5m.js} +2 -2
- package/dist/{cli-zrk6jxv8.js → cli-y4x8ww6s.js} +2 -2
- package/dist/{cli-xc27fwzg.js → cli-y9jvxfhk.js} +3 -3
- package/dist/{cli-44159k28.js → cli-z63a269p.js} +2 -2
- package/dist/{cli-sm8rses9.js → cli-zfdp01hn.js} +8 -5
- package/dist/cli.js +31 -29
- package/dist/{cloudflare-workers-ai-system-one-ch2wxfcp.js → cloudflare-workers-ai-system-one-43v9qkjk.js} +7 -2
- package/dist/{codex-adapter-968xwfy7.js → codex-adapter-tcg1q3jk.js} +6 -4
- package/dist/{codex-login-m819c41r.js → codex-login-rn7c5gxt.js} +1 -1
- package/dist/{codex-session-runner-ht4z99fa.js → codex-session-runner-xfx4wd9x.js} +7 -5
- package/dist/{commands-pcymaeg9.js → commands-ew83nj70.js} +2 -2
- package/dist/{controller-fpjyk46r.js → controller-gnq1k1mf.js} +4 -4
- package/dist/{controllers-connect-mwzx1fh6.js → controllers-connect-tw1dan9r.js} +26 -24
- package/dist/{cursor-adapter-cp4s2e2f.js → cursor-adapter-yq5xgfcg.js} +1 -1
- package/dist/{db-xsjg9jqq.js → db-7gbc53fd.js} +14 -2
- package/dist/{db-sgd12bt9.js → db-t86xrnes.js} +3 -3
- package/dist/{devin-adapter-zgqadvnm.js → devin-adapter-4ycy4vrf.js} +1 -1
- package/dist/{dispatcher-x0jfw2c9.js → dispatcher-64bdyhps.js} +23 -21
- package/dist/{docker-fkgtr75t.js → docker-nfy2gc8t.js} +2 -2
- package/dist/{dsh-adapter-jrq7ma7h.js → dsh-adapter-tvhc4k2d.js} +1 -1
- package/dist/{e2b-16d6ch39.js → e2b-9gkdhm3c.js} +2 -2
- package/dist/{e2b-zn0b4w5w.js → e2b-cjtf8k1z.js} +2 -2
- package/dist/{easter-egg-3d-5cgynaja.js → easter-egg-3d-e4qv8dxj.js} +1 -1
- package/dist/{event-bus-9vpk8gmq.js → event-bus-3z78ep5n.js} +1 -1
- package/dist/{execute-t4e6m3rw.js → execute-0xpz8950.js} +85 -23
- package/dist/{external-channel-8njj4h3b.js → external-channel-e9nw24zv.js} +2 -2
- package/dist/{google-generative-ai-bmq8gkf3.js → google-generative-ai-mk9vcpe1.js} +15 -15
- package/dist/{google-vertex-b1rvp52s.js → google-vertex-q580kz8k.js} +20 -20
- package/dist/{grok-adapter-kkr97v2f.js → grok-adapter-v82srhrx.js} +9 -7
- package/dist/handlers-c9ajzhbn.js +41 -0
- package/dist/{heartbeat-wd03zhn0.js → heartbeat-2vqs1319.js} +26 -24
- package/dist/{hook-xzj2ts2p.js → hook-01nk13wx.js} +7 -5
- package/dist/{hook-f0vghj42.js → hook-jzpheegg.js} +9 -7
- package/dist/{http-4hwxv62p.js → http-fc1k6ec8.js} +859 -252
- package/dist/index-07ef7nkm.js +42 -0
- package/dist/{index-g6tbb6ve.js → index-31ceyf42.js} +1 -1
- package/dist/index-7yts8n9s.js +43 -0
- package/dist/{index-c4ykd0f1.js → index-dr94zbnh.js} +13348 -11611
- package/dist/index-q3t40ryv.js +46 -0
- package/dist/{index-ww2vznkp.js → index-sepja052.js} +1 -1
- package/dist/{index-97q4xn03.js → index-zdycv3ja.js} +135 -79
- package/dist/{index-g216q6jr.js → index-zsyx51ap.js} +1 -4
- package/dist/{keepalive-hrh7xnr9.js → keepalive-5nh2rhmr.js} +4 -4
- package/dist/lead-aayq64jn.js +79 -0
- package/dist/{llama-cpp-classify-vv43gswy.js → llama-cpp-classify-ee7vmd7q.js} +4 -1
- package/dist/{maintenance-e8wnwnqx.js → maintenance-hjhzdt3k.js} +1 -1
- package/dist/{mistral-conversations-1medfwv7.js → mistral-conversations-sd0xf1tn.js} +13 -13
- package/dist/{node-3v3f08f7.js → node-jzjj7r9x.js} +10 -9
- package/dist/{oauth-refresh-sweep-zm0yj4sj.js → oauth-refresh-sweep-y3n1knmd.js} +3 -3
- package/dist/{onboard-dtwcq603.js → onboard-1zq3m7db.js} +2 -2
- package/dist/{openai-codex-responses-de9pvs4d.js → openai-codex-responses-79s8xnbh.js} +29 -23
- package/dist/{openai-completions-mtqge3nf.js → openai-completions-tdbyts0x.js} +21 -20
- package/dist/{openai-decisions-ygk4kkxd.js → openai-decisions-bqhnjyfz.js} +2 -1
- package/dist/{openai-responses-dkyng71g.js → openai-responses-dm3t5vqp.js} +26 -17
- package/dist/{opencode-adapter-x4tqzhkh.js → opencode-adapter-e56086m1.js} +7 -5
- package/dist/{openrouter-images-wvv7camj.js → openrouter-images-ssttr1y4.js} +6 -3
- package/dist/{otel-impl-w3fbhpn0.js → otel-impl-h9yyza47.js} +2 -2
- package/dist/{pi-messages-nhh1pkz2.js → pi-messages-3nf8bq1a.js} +6 -4
- package/dist/{pi-mono-adapter-mcfkn9vf.js → pi-mono-adapter-tzps8f38.js} +9 -37
- package/dist/{pricing-refresh-j38dehfs.js → pricing-refresh-nevhat8h.js} +3 -3
- package/dist/{rbac-roles-ae8yttq4.js → rbac-roles-4y6ngvzq.js} +1 -1
- package/dist/{rbac-roles-ejxx9b35.js → rbac-roles-exbg8xb6.js} +2 -2
- package/dist/{registry-rxw10xzg.js → registry-ajhexe44.js} +1 -1
- package/dist/{render-v2-n16n0phe.js → render-v2-cfsh13z3.js} +3 -3
- package/dist/{resume-z0fgjc38.js → resume-5s2t0dbs.js} +10 -8
- package/dist/{runtime-xe3aqy4x.js → runtime-bt5pkpm1.js} +1 -1
- package/dist/{session-access-cv3mq6mc.js → session-access-dnbyp3cn.js} +6 -4
- package/dist/{setup-mafhj3yt.js → setup-1wj1y77j.js} +1 -1
- package/dist/{typesafe-system-one-2hgpayzy.js → typesafe-system-one-bre38hvs.js} +4 -2
- package/dist/{virtual-modules-4r3zkc20.js → virtual-modules-mnfbh5mr.js} +8 -2
- package/dist/{work-objects-8b86mgjp.js → work-objects-7mg6216g.js} +26 -24
- package/dist/worker-nwb789mg.js +79 -0
- package/dist/{x-y45mthwn.js → x-pbpezr0s.js} +2 -2
- package/openapi.json +793 -6
- package/package.json +11 -11
- package/src/apps/catalog.generated.json +206 -4
- package/src/apps/page-validator.ts +13 -1
- package/src/assets/key.ts +17 -0
- package/src/azure-devops/handlers.ts +1 -1
- package/src/be/chunking.ts +42 -9
- package/src/be/db/approvals.ts +18 -0
- package/src/be/db/session-moves.ts +164 -0
- package/src/be/db/session-tree.ts +384 -0
- package/src/be/db/tasks/draft-text.ts +15 -0
- package/src/be/db/tasks/read.ts +54 -5
- package/src/be/db/workflow-runs.ts +96 -0
- package/src/be/db.ts +85 -237
- package/src/be/memory/index-content.ts +36 -17
- package/src/be/memory/providers/openai-embedding.ts +115 -61
- package/src/be/memory/providers/sqlite-store.ts +69 -23
- package/src/be/memory/reranker.ts +31 -1
- package/src/be/memory/search-candidates.ts +47 -0
- package/src/be/memory/types.ts +14 -0
- package/src/be/onboarding.ts +3 -0
- package/src/be/scripts/typecheck.ts +2 -0
- package/src/be/seed-scripts/catalog/heartbeat-jev-gate.ts +106 -54
- package/src/be/seed-scripts/index.ts +2 -2
- package/src/be/skill-sync.ts +43 -2
- package/src/be/swarm-config-guard.ts +25 -1
- package/src/be/task-attachment-store.ts +30 -0
- package/src/bitbucket/api.ts +81 -0
- package/src/bitbucket/auth.ts +64 -0
- package/src/bitbucket/handlers.ts +434 -0
- package/src/bitbucket/index.ts +28 -0
- package/src/bitbucket/templates.ts +134 -0
- package/src/bitbucket/types.ts +65 -0
- package/src/commands/runner.ts +55 -3
- package/src/e2b/env.ts +1 -0
- package/src/extensions/catalog.generated.json +4 -4
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/extensions/contract.ts +9 -2
- package/src/extensions/post-bridge.ts +1 -0
- package/src/fs/provider.ts +13 -1
- package/src/github/handlers.ts +6 -6
- package/src/gitlab/handlers.ts +5 -5
- package/src/heartbeat/heartbeat.ts +31 -11
- package/src/http/assets.ts +14 -2
- package/src/http/core.ts +12 -0
- package/src/http/fs.ts +54 -34
- package/src/http/index.ts +4 -0
- package/src/http/mcp-body.ts +37 -0
- package/src/http/mcp-user.ts +3 -5
- package/src/http/mcp.ts +6 -7
- package/src/http/memory.ts +26 -15
- package/src/http/onboarding.ts +1 -0
- package/src/http/page-proxy.ts +61 -5
- package/src/http/pages-public.ts +27 -44
- package/src/http/pages.ts +4 -4
- package/src/http/script-runs.ts +2 -0
- package/src/http/sessions.ts +366 -12
- package/src/http/skills.ts +48 -1
- package/src/http/tasks.ts +1 -1
- package/src/http/users.ts +13 -1
- package/src/http/webhooks.ts +141 -0
- package/src/integrations/chat-sdk/adapters.ts +24 -4
- package/src/integrations/chat-sdk/attachments.ts +90 -12
- package/src/integrations/chat-sdk/facts.ts +138 -0
- package/src/integrations/chat-sdk/inbound.ts +156 -8
- package/src/integrations/chat-sdk/limits.ts +24 -0
- package/src/integrations/chat-sdk/outbound-files.ts +186 -0
- package/src/integrations/chat-sdk/outbound.ts +272 -5
- package/src/integrations/chat-sdk/relay.ts +4 -1
- package/src/integrations/chat-sdk/router.ts +28 -2
- package/src/integrations/chat-sdk/steering.ts +9 -0
- package/src/integrations/chat-sdk/templates.ts +14 -0
- package/src/integrations/chat-sdk/thread-buffer.ts +4 -0
- package/src/mcp-limits.ts +20 -0
- package/src/pages/browser-sdk.ts +8 -3
- package/src/pages/feedback-overlay.ts +1 -1
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +106 -119
- package/src/providers/codex-agents-md.ts +35 -229
- package/src/providers/cursor-adapter.ts +1 -1
- package/src/providers/pi-mono-adapter.ts +5 -53
- package/src/realtime/transport.ts +1 -2
- package/src/script-workflows/workflow-ctx.ts +1 -0
- package/src/scripts-runtime/types/stdlib.d.ts +2 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +14 -4
- package/src/scripts-runtime/types/swarm-sdk.d.ts +2 -0
- package/src/server-user.ts +2 -0
- package/src/server.ts +2 -0
- package/src/slack/assistant.ts +2 -2
- package/src/slack/files.ts +2 -0
- package/src/slack/handlers.test.ts +158 -0
- package/src/slack/handlers.ts +23 -32
- package/src/slack/inbound-files.ts +39 -6
- package/src/slack/thread-buffer.ts +2 -1
- package/src/tasks/context-key.ts +61 -1
- package/src/tasks/task-terminal-effects.ts +21 -17
- package/src/tests/apps-card-grid.test.ts +197 -0
- package/src/tests/apps-catalog-additions.test.ts +120 -0
- package/src/tests/apps-tree.test.ts +129 -0
- package/src/tests/bitbucket-auth.test.ts +156 -0
- package/src/tests/bitbucket-handlers.test.ts +425 -0
- package/src/tests/bitbucket-webhook.test.ts +220 -0
- package/src/tests/chat-sdk-attachments-reply.test.ts +52 -0
- package/src/tests/chat-sdk-config.test.ts +11 -0
- package/src/tests/chat-sdk-facts.test.ts +23 -0
- package/src/tests/chat-sdk-inbound.test.ts +597 -4
- package/src/tests/chat-sdk-outbound-files.test.ts +652 -0
- package/src/tests/chat-sdk-telegram-markdown.test.ts +92 -0
- package/src/tests/codex-adapter.test.ts +167 -242
- package/src/tests/config-api-only-keys.test.ts +9 -0
- package/src/tests/context-key.test.ts +50 -0
- package/src/tests/core-auth.test.ts +5 -0
- package/src/tests/cors-allowlist.test.ts +1 -1
- package/src/tests/db-task-read-contract.test.ts +7 -0
- package/src/tests/db-task-write-contract.test.ts +6 -0
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/extensions-example-slack-reply-gate.test.ts +262 -91
- package/src/tests/fixtures/bitbucket/pullrequest-comment-created-inline.json +174 -0
- package/src/tests/fixtures/bitbucket/pullrequest-comment-created.json +170 -0
- package/src/tests/fixtures/bitbucket/pullrequest-created-mention.json +132 -0
- package/src/tests/fixtures/bitbucket/pullrequest-created-reviewer.json +140 -0
- package/src/tests/fixtures/bitbucket/pullrequest-fulfilled.json +134 -0
- package/src/tests/fixtures/bitbucket/pullrequest-rejected.json +133 -0
- package/src/tests/generate-mcp-docs.test.ts +101 -0
- package/src/tests/gitlab-handlers.test.ts +3 -3
- package/src/tests/gitlab-vcs-db.test.ts +4 -4
- package/src/tests/heartbeat-checklist.test.ts +33 -0
- package/src/tests/heartbeat-jev-gate-credentials.test.ts +44 -0
- package/src/tests/heartbeat-jev-gate.test.ts +242 -1
- package/src/tests/integration-disable-flags.test.ts +36 -0
- package/src/tests/kv-page-proxy.test.ts +91 -5
- package/src/tests/launch-password-rejection.test.ts +2 -2
- package/src/tests/mcp-input-caps.test.ts +294 -0
- package/src/tests/mcp-tools.test.ts +1 -1
- package/src/tests/memory-chunked-search-starvation.test.ts +200 -0
- package/src/tests/memory-embedding-input-cap.test.ts +114 -0
- package/src/tests/memory.test.ts +14 -0
- package/src/tests/onboarding.test.ts +12 -0
- package/src/tests/page-guest-session.test.ts +19 -8
- package/src/tests/page-proxy-authed.test.ts +1 -1
- package/src/tests/page-proxy.test.ts +17 -10
- package/src/tests/page-session.test.ts +102 -1
- package/src/tests/pages-authed-mode.test.ts +82 -12
- package/src/tests/pages-password-mode.test.ts +5 -5
- package/src/tests/pi-codemode.test.ts +8 -2
- package/src/tests/preload-env.test.ts +57 -0
- package/src/tests/preload.ts +21 -0
- package/src/tests/prompt-template-remaining.test.ts +38 -0
- package/src/tests/realtime-transport.test.ts +13 -7
- package/src/tests/run-root-coverage.test.ts +39 -0
- package/src/tests/runner-bitbucket-vcs.test.ts +191 -0
- package/src/tests/runner-skills-refresh.test.ts +58 -0
- package/src/tests/script-runs-http.test.ts +84 -0
- package/src/tests/scripts-http.test.ts +10 -1
- package/src/tests/secret-scrubber.test.ts +15 -0
- package/src/tests/sessions-move.test.ts +576 -0
- package/src/tests/sessions-tree.test.ts +493 -0
- package/src/tests/skill-files-http.test.ts +50 -0
- package/src/tests/skills-bundle.test.ts +99 -0
- package/src/tests/swarm-config-export-to-env.test.ts +23 -3
- package/src/tests/task-audio-transcription.test.ts +299 -0
- package/src/tests/task-completion-memory-chunking.test.ts +434 -0
- package/src/tests/task-terminal-secret-scrub.test.ts +6 -1
- package/src/tests/transcription.test.ts +299 -0
- package/src/tests/vcs-bitbucket.test.ts +91 -0
- package/src/tests/vcs-provider-isolation.test.ts +123 -0
- package/src/tests/vcs-provider.test.ts +16 -1
- package/src/tests/vcs-tracking.test.ts +3 -3
- package/src/tests/workflow-foreach-bodies.test.ts +637 -0
- package/src/tests/workflow-foreach-concurrency.test.ts +342 -0
- package/src/tests/workflow-foreach-retry.test.ts +537 -0
- package/src/tests/workflow-foreach.test.ts +44 -23
- package/src/tests/workflow-step-claims.test.ts +6 -6
- package/src/tests/workflow-system-one-decision-providers.test.ts +98 -1
- package/src/tests/workflow-system-one-decision.test.ts +2 -1
- package/src/tests/workflow-tla-races.test.ts +2 -2
- package/src/tools/chat-access.ts +10 -0
- package/src/tools/chat-post.ts +31 -11
- package/src/tools/chat-reply.ts +32 -10
- package/src/tools/memory-search.ts +3 -1
- package/src/tools/script-delete.ts +1 -1
- package/src/tools/system-one-decide.ts +17 -4
- package/src/tools/workflows/create-workflow.ts +5 -3
- package/src/types.ts +9 -2
- package/src/utils/config-env-export.ts +4 -1
- package/src/utils/page-session.ts +133 -20
- package/src/utils/secret-scrubber.ts +4 -0
- package/src/utils/skills-refresh.ts +83 -43
- package/src/utils/transcription.ts +246 -0
- package/src/vcs/bitbucket.ts +58 -0
- package/src/vcs/index.ts +2 -0
- package/src/vcs/types.ts +2 -2
- package/src/workflows/approval-resolution.ts +4 -1
- package/src/workflows/checkpoint.ts +9 -1
- package/src/workflows/constants.ts +3 -0
- package/src/workflows/definition.ts +48 -17
- package/src/workflows/engine.ts +25 -15
- package/src/workflows/executors/foreach.ts +45 -99
- package/src/workflows/executors/system-one-decision.ts +28 -7
- package/src/workflows/executors/system-one-providers.ts +39 -4
- package/src/workflows/foreach-body.ts +146 -0
- package/src/workflows/foreach-driver.ts +552 -0
- package/src/workflows/foreach-join.ts +206 -7
- package/src/workflows/node-timeout.ts +21 -0
- package/src/workflows/recovery.ts +68 -3
- package/src/workflows/resume.ts +221 -43
- package/src/workflows/retry-poller.ts +39 -24
- package/src/workflows/step-input.ts +59 -0
- package/src/workflows/task-step-routing.ts +114 -56
- package/templates/extensions/slack-reply-gate/README.md +24 -22
- package/templates/extensions/slack-reply-gate/hooks.ts +146 -95
- package/templates/extensions/slack-reply-gate/manifest.json +2 -2
- package/templates/skills/apps/SKILL.md +28 -6
- package/templates/skills/apps/content.md +28 -6
- package/templates/skills/chat-sdk/content.md +6 -2
- package/templates/skills/code-quality/content.md +2 -1
- package/templates/skills/heartbeat-runbook/content.md +5 -5
- package/templates/skills/pages/content.md +6 -4
- package/templates/skills/slack-interaction/content.md +5 -0
- package/templates/skills/swarm-scripts/SKILL.md +2 -2
- package/templates/skills/swarm-scripts/content.md +2 -2
- package/templates/skills/work-on-task/SKILL.md +1 -1
- package/templates/skills/work-on-task/content.md +1 -1
- package/dist/cli-51y09c6p.js +0 -2657
- package/dist/cli-yw91rnmw.js +0 -13
- package/dist/handlers-0pvee9nw.js +0 -39
- package/dist/index-gdh8jrdm.js +0 -43
- package/dist/index-hg0x2cdv.js +0 -40
- package/dist/index-thm0y6a8.js +0 -41
- package/dist/lead-ee8vazz2.js +0 -77
- package/dist/worker-16s75hm5.js +0 -77
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
isEmptyObj,
|
|
25
25
|
isObj,
|
|
26
26
|
validatePositiveInteger,
|
|
27
|
+
CREDENTIAL_OPTIONS,
|
|
27
28
|
safeJSON,
|
|
28
29
|
checkNever,
|
|
29
30
|
concatBytes,
|
|
@@ -43,7 +44,7 @@ import {
|
|
|
43
44
|
ToolError,
|
|
44
45
|
checkMemorySyncInterval,
|
|
45
46
|
promiseWithResolvers
|
|
46
|
-
} from "./cli-
|
|
47
|
+
} from "./cli-6rg2jn2y.js";
|
|
47
48
|
import {
|
|
48
49
|
require_src
|
|
49
50
|
} from "./cli-dv97kdzv.js";
|
|
@@ -70,7 +71,7 @@ var sleep = (ms, signal) => new Promise((resolve) => {
|
|
|
70
71
|
});
|
|
71
72
|
|
|
72
73
|
// node_modules/@anthropic-ai/sdk/version.mjs
|
|
73
|
-
var VERSION = "
|
|
74
|
+
var VERSION = "1.1.0";
|
|
74
75
|
|
|
75
76
|
// node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs
|
|
76
77
|
var isRunningInBrowser = () => {
|
|
@@ -412,16 +413,19 @@ var Stream = /* @__PURE__ */ (() => {
|
|
|
412
413
|
let done = false;
|
|
413
414
|
try {
|
|
414
415
|
for await (const sse of _iterSSEMessages(response, controller)) {
|
|
415
|
-
if (sse.event === "
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
logger.error(`From chunk:`, sse.raw);
|
|
421
|
-
throw e;
|
|
422
|
-
}
|
|
416
|
+
if (sse.event === "ping") {
|
|
417
|
+
continue;
|
|
418
|
+
}
|
|
419
|
+
if (sse.event === null) {
|
|
420
|
+
continue;
|
|
423
421
|
}
|
|
424
|
-
if (sse.event === "
|
|
422
|
+
if (sse.event === "error") {
|
|
423
|
+
const body = safeJSON(sse.data) ?? sse.data;
|
|
424
|
+
const type = body?.error?.type;
|
|
425
|
+
throw new APIError(undefined, body, undefined, response.headers, type);
|
|
426
|
+
} else {
|
|
427
|
+
if (!sse.data)
|
|
428
|
+
continue;
|
|
425
429
|
try {
|
|
426
430
|
yield JSON.parse(sse.data);
|
|
427
431
|
} catch (e) {
|
|
@@ -430,14 +434,6 @@ var Stream = /* @__PURE__ */ (() => {
|
|
|
430
434
|
throw e;
|
|
431
435
|
}
|
|
432
436
|
}
|
|
433
|
-
if (sse.event === "ping") {
|
|
434
|
-
continue;
|
|
435
|
-
}
|
|
436
|
-
if (sse.event === "error") {
|
|
437
|
-
const body = safeJSON(sse.data) ?? sse.data;
|
|
438
|
-
const type = body?.error?.type;
|
|
439
|
-
throw new APIError(undefined, body, undefined, response.headers, type);
|
|
440
|
-
}
|
|
441
437
|
}
|
|
442
438
|
done = true;
|
|
443
439
|
} catch (e) {
|
|
@@ -1545,9 +1541,6 @@ var ATTR_GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
|
|
|
1545
1541
|
var ATTR_GEN_AI_REQUEST_REASONING_LEVEL = "gen_ai.request.reasoning.level";
|
|
1546
1542
|
var ATTR_GEN_AI_REQUEST_STOP_SEQUENCES = "gen_ai.request.stop_sequences";
|
|
1547
1543
|
var ATTR_GEN_AI_REQUEST_STREAM = "gen_ai.request.stream";
|
|
1548
|
-
var ATTR_GEN_AI_REQUEST_TEMPERATURE = "gen_ai.request.temperature";
|
|
1549
|
-
var ATTR_GEN_AI_REQUEST_TOP_K = "gen_ai.request.top_k";
|
|
1550
|
-
var ATTR_GEN_AI_REQUEST_TOP_P = "gen_ai.request.top_p";
|
|
1551
1544
|
var ATTR_GEN_AI_RESPONSE_ID = "gen_ai.response.id";
|
|
1552
1545
|
var ATTR_GEN_AI_RESPONSE_MODEL = "gen_ai.response.model";
|
|
1553
1546
|
var ATTR_GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK = "gen_ai.response.time_to_first_chunk";
|
|
@@ -1925,15 +1918,6 @@ function messagesCreateSpanSettings(client, body, headers) {
|
|
|
1925
1918
|
attributes[ATTR_ANTHROPIC_BETA] = betas;
|
|
1926
1919
|
}
|
|
1927
1920
|
attributes[ATTR_GEN_AI_REQUEST_MAX_TOKENS] = body.max_tokens;
|
|
1928
|
-
if (body.temperature != null) {
|
|
1929
|
-
attributes[ATTR_GEN_AI_REQUEST_TEMPERATURE] = body.temperature;
|
|
1930
|
-
}
|
|
1931
|
-
if (body.top_p != null) {
|
|
1932
|
-
attributes[ATTR_GEN_AI_REQUEST_TOP_P] = body.top_p;
|
|
1933
|
-
}
|
|
1934
|
-
if (body.top_k != null) {
|
|
1935
|
-
attributes[ATTR_GEN_AI_REQUEST_TOP_K] = body.top_k;
|
|
1936
|
-
}
|
|
1937
1921
|
if (body.stream === true) {
|
|
1938
1922
|
attributes[ATTR_GEN_AI_REQUEST_STREAM] = true;
|
|
1939
1923
|
}
|
|
@@ -2372,28 +2356,14 @@ var loadConfigWithSource = async (profile) => {
|
|
|
2372
2356
|
if (rootConfigPath === null) {
|
|
2373
2357
|
return null;
|
|
2374
2358
|
}
|
|
2375
|
-
const
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
}
|
|
2379
|
-
validateProfileName(profileName);
|
|
2380
|
-
const { fs, path } = await import("./node-hjn5n1yp.js");
|
|
2381
|
-
const configPath = path.join(rootConfigPath, "configs", `${profileName}.json`);
|
|
2382
|
-
let configRaw;
|
|
2383
|
-
try {
|
|
2384
|
-
configRaw = await fs.promises.readFile(configPath, "utf-8");
|
|
2385
|
-
} catch (err) {
|
|
2386
|
-
if (err?.code !== "ENOENT") {
|
|
2387
|
-
throw new Error(`failed to read config file ${configPath}: ${err}`);
|
|
2388
|
-
}
|
|
2389
|
-
configRaw = null;
|
|
2390
|
-
}
|
|
2391
|
-
if (configRaw === null) {
|
|
2359
|
+
const namedInEnv = profile == null && readEnv("ANTHROPIC_PROFILE") != null;
|
|
2360
|
+
let fromEnv = null;
|
|
2361
|
+
if (profile == null && !namedInEnv) {
|
|
2392
2362
|
const organizationId = readEnv("ANTHROPIC_ORGANIZATION_ID");
|
|
2393
2363
|
const identityTokenFile = readEnv("ANTHROPIC_IDENTITY_TOKEN_FILE");
|
|
2394
2364
|
const federationRuleId = readEnv("ANTHROPIC_FEDERATION_RULE_ID");
|
|
2395
2365
|
if (federationRuleId && organizationId) {
|
|
2396
|
-
|
|
2366
|
+
fromEnv = {
|
|
2397
2367
|
fromFile: false,
|
|
2398
2368
|
config: {
|
|
2399
2369
|
organization_id: organizationId,
|
|
@@ -2408,9 +2378,30 @@ var loadConfigWithSource = async (profile) => {
|
|
|
2408
2378
|
}
|
|
2409
2379
|
}
|
|
2410
2380
|
};
|
|
2381
|
+
if (identityTokenFile || readEnv("ANTHROPIC_IDENTITY_TOKEN")) {
|
|
2382
|
+
return fromEnv;
|
|
2383
|
+
}
|
|
2411
2384
|
}
|
|
2385
|
+
}
|
|
2386
|
+
const profileName = profile ?? await getActiveProfileName();
|
|
2387
|
+
if (profileName === null) {
|
|
2412
2388
|
return null;
|
|
2413
2389
|
}
|
|
2390
|
+
validateProfileName(profileName);
|
|
2391
|
+
const { fs, path } = await import("./node-hjn5n1yp.js");
|
|
2392
|
+
const configPath = path.join(rootConfigPath, "configs", `${profileName}.json`);
|
|
2393
|
+
let configRaw;
|
|
2394
|
+
try {
|
|
2395
|
+
configRaw = await fs.promises.readFile(configPath, "utf-8");
|
|
2396
|
+
} catch (err) {
|
|
2397
|
+
if (err?.code !== "ENOENT") {
|
|
2398
|
+
throw new Error(`failed to read config file ${configPath}: ${err}`);
|
|
2399
|
+
}
|
|
2400
|
+
if (namedInEnv) {
|
|
2401
|
+
throw new AnthropicError(`ANTHROPIC_PROFILE names the profile "${profileName}", but ${configPath} does not exist. Set ANTHROPIC_PROFILE to a profile that exists, or unset it.`, { cause: err });
|
|
2402
|
+
}
|
|
2403
|
+
return fromEnv;
|
|
2404
|
+
}
|
|
2414
2405
|
let config;
|
|
2415
2406
|
try {
|
|
2416
2407
|
config = JSON.parse(configRaw);
|
|
@@ -3295,6 +3286,38 @@ class BidirectionalPageCursor extends AbstractPage {
|
|
|
3295
3286
|
}
|
|
3296
3287
|
}
|
|
3297
3288
|
|
|
3289
|
+
class ReportPageCursor extends AbstractPage {
|
|
3290
|
+
constructor(client, response, body, options) {
|
|
3291
|
+
super(client, response, body, options);
|
|
3292
|
+
this.data = body.data || [];
|
|
3293
|
+
this.next_page = body.next_page || null;
|
|
3294
|
+
this.has_more = body.has_more || false;
|
|
3295
|
+
this.data_refreshed_at = body.data_refreshed_at || null;
|
|
3296
|
+
}
|
|
3297
|
+
getPaginatedItems() {
|
|
3298
|
+
return this.data ?? [];
|
|
3299
|
+
}
|
|
3300
|
+
hasNextPage() {
|
|
3301
|
+
if (this.has_more === false) {
|
|
3302
|
+
return false;
|
|
3303
|
+
}
|
|
3304
|
+
return this.nextPageRequestOptions() != null;
|
|
3305
|
+
}
|
|
3306
|
+
nextPageRequestOptions() {
|
|
3307
|
+
const cursor = this.next_page;
|
|
3308
|
+
if (!cursor) {
|
|
3309
|
+
return null;
|
|
3310
|
+
}
|
|
3311
|
+
return {
|
|
3312
|
+
...this.options,
|
|
3313
|
+
query: {
|
|
3314
|
+
...maybeObj(this.options.query),
|
|
3315
|
+
page: cursor
|
|
3316
|
+
}
|
|
3317
|
+
};
|
|
3318
|
+
}
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3298
3321
|
// node_modules/@anthropic-ai/sdk/internal/to-file.mjs
|
|
3299
3322
|
var isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function";
|
|
3300
3323
|
var isFileLike = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value);
|
|
@@ -4983,98 +5006,6 @@ class Models extends APIResource {
|
|
|
4983
5006
|
}
|
|
4984
5007
|
}
|
|
4985
5008
|
|
|
4986
|
-
// node_modules/@anthropic-ai/sdk/resources/beta/user-profiles.mjs
|
|
4987
|
-
class UserProfiles extends APIResource {
|
|
4988
|
-
create(params, options) {
|
|
4989
|
-
const { betas, workspace_id, ...body } = params;
|
|
4990
|
-
return this._client.post("/v1/user_profiles?beta=true", {
|
|
4991
|
-
body,
|
|
4992
|
-
...options,
|
|
4993
|
-
headers: buildHeaders([
|
|
4994
|
-
{
|
|
4995
|
-
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
4996
|
-
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
4997
|
-
},
|
|
4998
|
-
options?.headers
|
|
4999
|
-
]),
|
|
5000
|
-
__span: startApiCallSpan(this._client, "anthropic.user_profiles.create", options, {
|
|
5001
|
-
route: "/v1/user_profiles",
|
|
5002
|
-
createdIDAttribute: "anthropic.user_profile.id"
|
|
5003
|
-
})
|
|
5004
|
-
});
|
|
5005
|
-
}
|
|
5006
|
-
retrieve(userProfileID, params = {}, options) {
|
|
5007
|
-
const { betas, workspace_id } = params ?? {};
|
|
5008
|
-
return this._client.get(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
5009
|
-
...options,
|
|
5010
|
-
headers: buildHeaders([
|
|
5011
|
-
{
|
|
5012
|
-
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
5013
|
-
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
5014
|
-
},
|
|
5015
|
-
options?.headers
|
|
5016
|
-
]),
|
|
5017
|
-
__span: startApiCallSpan(this._client, "anthropic.user_profiles.retrieve", options, {
|
|
5018
|
-
route: "/v1/user_profiles/{user_profile_id}",
|
|
5019
|
-
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
5020
|
-
})
|
|
5021
|
-
});
|
|
5022
|
-
}
|
|
5023
|
-
update(userProfileID, params, options) {
|
|
5024
|
-
const { betas, workspace_id, ...body } = params;
|
|
5025
|
-
return this._client.post(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
5026
|
-
body,
|
|
5027
|
-
...options,
|
|
5028
|
-
headers: buildHeaders([
|
|
5029
|
-
{
|
|
5030
|
-
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
5031
|
-
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
5032
|
-
},
|
|
5033
|
-
options?.headers
|
|
5034
|
-
]),
|
|
5035
|
-
__span: startApiCallSpan(this._client, "anthropic.user_profiles.update", options, {
|
|
5036
|
-
route: "/v1/user_profiles/{user_profile_id}",
|
|
5037
|
-
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
5038
|
-
})
|
|
5039
|
-
});
|
|
5040
|
-
}
|
|
5041
|
-
list(params = {}, options) {
|
|
5042
|
-
const { betas, workspace_id, ...query } = params ?? {};
|
|
5043
|
-
return this._client.getAPIList("/v1/user_profiles?beta=true", PageCursor, {
|
|
5044
|
-
query,
|
|
5045
|
-
...options,
|
|
5046
|
-
headers: buildHeaders([
|
|
5047
|
-
{
|
|
5048
|
-
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
5049
|
-
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
5050
|
-
},
|
|
5051
|
-
options?.headers
|
|
5052
|
-
]),
|
|
5053
|
-
__span: startApiCallSpan(this._client, "anthropic.user_profiles.list", options, {
|
|
5054
|
-
route: "/v1/user_profiles",
|
|
5055
|
-
queryParams: ["limit", "order", "order_by", "page"]
|
|
5056
|
-
})
|
|
5057
|
-
});
|
|
5058
|
-
}
|
|
5059
|
-
createEnrollmentURL(userProfileID, params = {}, options) {
|
|
5060
|
-
const { betas, workspace_id } = params ?? {};
|
|
5061
|
-
return this._client.post(path`/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
5062
|
-
...options,
|
|
5063
|
-
headers: buildHeaders([
|
|
5064
|
-
{
|
|
5065
|
-
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
5066
|
-
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
5067
|
-
},
|
|
5068
|
-
options?.headers
|
|
5069
|
-
]),
|
|
5070
|
-
__span: startApiCallSpan(this._client, "anthropic.user_profiles.create_enrollment_url", options, {
|
|
5071
|
-
route: "/v1/user_profiles/{user_profile_id}/enrollment_url",
|
|
5072
|
-
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
5073
|
-
})
|
|
5074
|
-
});
|
|
5075
|
-
}
|
|
5076
|
-
}
|
|
5077
|
-
|
|
5078
5009
|
// node_modules/@anthropic-ai/sdk/resources/beta/webhooks.mjs
|
|
5079
5010
|
var import_standardwebhooks = __toESM(require_dist3(), 1);
|
|
5080
5011
|
|
|
@@ -5252,11 +5183,12 @@ function copyClientForHelper(client, { authToken, helper }) {
|
|
|
5252
5183
|
parentDefaults,
|
|
5253
5184
|
{ [STAINLESS_HELPER_HEADER]: helper }
|
|
5254
5185
|
]);
|
|
5186
|
+
defaultHeaders.values.delete("x-api-key");
|
|
5187
|
+
defaultHeaders.values.delete("authorization");
|
|
5188
|
+
defaultHeaders.nulls.delete("authorization");
|
|
5255
5189
|
return client.withOptions({
|
|
5256
|
-
apiKey: null,
|
|
5257
5190
|
authToken,
|
|
5258
5191
|
baseURL: client.baseURL,
|
|
5259
|
-
credentials: undefined,
|
|
5260
5192
|
defaultHeaders
|
|
5261
5193
|
});
|
|
5262
5194
|
}
|
|
@@ -6227,7 +6159,7 @@ var EnvironmentWorker = /* @__PURE__ */ (() => {
|
|
|
6227
6159
|
const ctrl = new AbortController;
|
|
6228
6160
|
const detachExternal = linkAbort(externalSignal, ctrl);
|
|
6229
6161
|
const lease = new Lease(ctrl);
|
|
6230
|
-
const agentToolset = await import("./node-
|
|
6162
|
+
const agentToolset = await import("./node-jzjj7r9x.js");
|
|
6231
6163
|
let leaseTtlMs;
|
|
6232
6164
|
let runner;
|
|
6233
6165
|
const heartbeatPromise = heartbeatLoop(sessionClient, work, lease, log, this.requestOptions, (ttlMs) => {
|
|
@@ -8239,6 +8171,97 @@ class Users extends APIResource {
|
|
|
8239
8171
|
}
|
|
8240
8172
|
}
|
|
8241
8173
|
|
|
8174
|
+
// node_modules/@anthropic-ai/sdk/resources/beta/organization/webhooks.mjs
|
|
8175
|
+
class Webhooks2 extends APIResource {
|
|
8176
|
+
create(params, options) {
|
|
8177
|
+
const { betas, ...body } = params;
|
|
8178
|
+
return this._client.post("/v1/organizations/webhooks?beta=true", {
|
|
8179
|
+
body,
|
|
8180
|
+
...options,
|
|
8181
|
+
headers: buildHeaders([
|
|
8182
|
+
{ "anthropic-beta": [...betas ?? [], "webhooks-2026-10-07"].toString() },
|
|
8183
|
+
options?.headers
|
|
8184
|
+
]),
|
|
8185
|
+
__span: startApiCallSpan(this._client, "anthropic.organization.webhooks.create", options, {
|
|
8186
|
+
route: "/v1/organizations/webhooks",
|
|
8187
|
+
createdIDAttribute: "anthropic.organization.webhook.id"
|
|
8188
|
+
})
|
|
8189
|
+
});
|
|
8190
|
+
}
|
|
8191
|
+
retrieve(webhookEndpointID, params = {}, options) {
|
|
8192
|
+
const { betas } = params ?? {};
|
|
8193
|
+
return this._client.get(path`/v1/organizations/webhooks/${webhookEndpointID}?beta=true`, {
|
|
8194
|
+
...options,
|
|
8195
|
+
headers: buildHeaders([
|
|
8196
|
+
{ "anthropic-beta": [...betas ?? [], "webhooks-2026-10-07"].toString() },
|
|
8197
|
+
options?.headers
|
|
8198
|
+
]),
|
|
8199
|
+
__span: startApiCallSpan(this._client, "anthropic.organization.webhooks.retrieve", options, {
|
|
8200
|
+
route: "/v1/organizations/webhooks/{webhook_endpoint_id}",
|
|
8201
|
+
attributes: { "anthropic.organization.webhook.id": webhookEndpointID }
|
|
8202
|
+
})
|
|
8203
|
+
});
|
|
8204
|
+
}
|
|
8205
|
+
update(webhookEndpointID, params, options) {
|
|
8206
|
+
const { betas, ...body } = params;
|
|
8207
|
+
return this._client.post(path`/v1/organizations/webhooks/${webhookEndpointID}?beta=true`, {
|
|
8208
|
+
body,
|
|
8209
|
+
...options,
|
|
8210
|
+
headers: buildHeaders([
|
|
8211
|
+
{ "anthropic-beta": [...betas ?? [], "webhooks-2026-10-07"].toString() },
|
|
8212
|
+
options?.headers
|
|
8213
|
+
]),
|
|
8214
|
+
__span: startApiCallSpan(this._client, "anthropic.organization.webhooks.update", options, {
|
|
8215
|
+
route: "/v1/organizations/webhooks/{webhook_endpoint_id}",
|
|
8216
|
+
attributes: { "anthropic.organization.webhook.id": webhookEndpointID }
|
|
8217
|
+
})
|
|
8218
|
+
});
|
|
8219
|
+
}
|
|
8220
|
+
list(params = {}, options) {
|
|
8221
|
+
const { betas, ...query } = params ?? {};
|
|
8222
|
+
return this._client.getAPIList("/v1/organizations/webhooks?beta=true", Page, {
|
|
8223
|
+
query,
|
|
8224
|
+
...options,
|
|
8225
|
+
headers: buildHeaders([
|
|
8226
|
+
{ "anthropic-beta": [...betas ?? [], "webhooks-2026-10-07"].toString() },
|
|
8227
|
+
options?.headers
|
|
8228
|
+
]),
|
|
8229
|
+
__span: startApiCallSpan(this._client, "anthropic.organization.webhooks.list", options, {
|
|
8230
|
+
route: "/v1/organizations/webhooks",
|
|
8231
|
+
queryParams: ["after_id", "before_id", "limit", "order"]
|
|
8232
|
+
})
|
|
8233
|
+
});
|
|
8234
|
+
}
|
|
8235
|
+
delete(webhookEndpointID, params = {}, options) {
|
|
8236
|
+
const { betas } = params ?? {};
|
|
8237
|
+
return this._client.delete(path`/v1/organizations/webhooks/${webhookEndpointID}?beta=true`, {
|
|
8238
|
+
...options,
|
|
8239
|
+
headers: buildHeaders([
|
|
8240
|
+
{ "anthropic-beta": [...betas ?? [], "webhooks-2026-10-07"].toString() },
|
|
8241
|
+
options?.headers
|
|
8242
|
+
]),
|
|
8243
|
+
__span: startApiCallSpan(this._client, "anthropic.organization.webhooks.delete", options, {
|
|
8244
|
+
route: "/v1/organizations/webhooks/{webhook_endpoint_id}",
|
|
8245
|
+
attributes: { "anthropic.organization.webhook.id": webhookEndpointID }
|
|
8246
|
+
})
|
|
8247
|
+
});
|
|
8248
|
+
}
|
|
8249
|
+
regenerateSigningSecret(webhookEndpointID, params = {}, options) {
|
|
8250
|
+
const { betas } = params ?? {};
|
|
8251
|
+
return this._client.post(path`/v1/organizations/webhooks/${webhookEndpointID}/regenerate_signing_secret?beta=true`, {
|
|
8252
|
+
...options,
|
|
8253
|
+
headers: buildHeaders([
|
|
8254
|
+
{ "anthropic-beta": [...betas ?? [], "webhooks-2026-10-07"].toString() },
|
|
8255
|
+
options?.headers
|
|
8256
|
+
]),
|
|
8257
|
+
__span: startApiCallSpan(this._client, "anthropic.organization.webhooks.regenerate_signing_secret", options, {
|
|
8258
|
+
route: "/v1/organizations/webhooks/{webhook_endpoint_id}/regenerate_signing_secret",
|
|
8259
|
+
attributes: { "anthropic.organization.webhook.id": webhookEndpointID }
|
|
8260
|
+
})
|
|
8261
|
+
});
|
|
8262
|
+
}
|
|
8263
|
+
}
|
|
8264
|
+
|
|
8242
8265
|
// node_modules/@anthropic-ai/sdk/resources/beta/organization/analytics/artifacts.mjs
|
|
8243
8266
|
class Artifacts extends APIResource {
|
|
8244
8267
|
list(query, options) {
|
|
@@ -8281,7 +8304,7 @@ class Connectors extends APIResource {
|
|
|
8281
8304
|
// node_modules/@anthropic-ai/sdk/resources/beta/organization/analytics/cost-report.mjs
|
|
8282
8305
|
class CostReport extends APIResource {
|
|
8283
8306
|
list(query, options) {
|
|
8284
|
-
return this._client.getAPIList("/v1/organizations/analytics/cost_report?beta=true",
|
|
8307
|
+
return this._client.getAPIList("/v1/organizations/analytics/cost_report?beta=true", ReportPageCursor, {
|
|
8285
8308
|
query,
|
|
8286
8309
|
...options,
|
|
8287
8310
|
__span: startApiCallSpan(this._client, "anthropic.organization.analytics.cost_report.list", options, {
|
|
@@ -8376,7 +8399,7 @@ class Summaries extends APIResource {
|
|
|
8376
8399
|
// node_modules/@anthropic-ai/sdk/resources/beta/organization/analytics/usage-report.mjs
|
|
8377
8400
|
class UsageReport extends APIResource {
|
|
8378
8401
|
list(query, options) {
|
|
8379
|
-
return this._client.getAPIList("/v1/organizations/analytics/usage_report?beta=true",
|
|
8402
|
+
return this._client.getAPIList("/v1/organizations/analytics/usage_report?beta=true", ReportPageCursor, {
|
|
8380
8403
|
query,
|
|
8381
8404
|
...options,
|
|
8382
8405
|
__span: startApiCallSpan(this._client, "anthropic.organization.analytics.usage_report.list", options, {
|
|
@@ -8407,7 +8430,7 @@ class UsageReport extends APIResource {
|
|
|
8407
8430
|
// node_modules/@anthropic-ai/sdk/resources/beta/organization/analytics/user-cost-report.mjs
|
|
8408
8431
|
class UserCostReport extends APIResource {
|
|
8409
8432
|
list(query, options) {
|
|
8410
|
-
return this._client.getAPIList("/v1/organizations/analytics/user_cost_report?beta=true",
|
|
8433
|
+
return this._client.getAPIList("/v1/organizations/analytics/user_cost_report?beta=true", ReportPageCursor, {
|
|
8411
8434
|
query,
|
|
8412
8435
|
...options,
|
|
8413
8436
|
__span: startApiCallSpan(this._client, "anthropic.organization.analytics.user_cost_report.list", options, {
|
|
@@ -8441,7 +8464,7 @@ class UserCostReport extends APIResource {
|
|
|
8441
8464
|
// node_modules/@anthropic-ai/sdk/resources/beta/organization/analytics/user-usage-report.mjs
|
|
8442
8465
|
class UserUsageReport extends APIResource {
|
|
8443
8466
|
list(query, options) {
|
|
8444
|
-
return this._client.getAPIList("/v1/organizations/analytics/user_usage_report?beta=true",
|
|
8467
|
+
return this._client.getAPIList("/v1/organizations/analytics/user_usage_report?beta=true", ReportPageCursor, {
|
|
8445
8468
|
query,
|
|
8446
8469
|
...options,
|
|
8447
8470
|
__span: startApiCallSpan(this._client, "anthropic.organization.analytics.user_usage_report.list", options, {
|
|
@@ -9438,7 +9461,7 @@ var SpendLimits = /* @__PURE__ */ (() => {
|
|
|
9438
9461
|
]),
|
|
9439
9462
|
__span: startApiCallSpan(this._client, "anthropic.organization.spend_limits.list", options, {
|
|
9440
9463
|
route: "/v1/organizations/spend_limits",
|
|
9441
|
-
queryParams: ["limit", "page", "scope_type"]
|
|
9464
|
+
queryParams: ["limit", "page", "scope_type", "workspace_id"]
|
|
9442
9465
|
})
|
|
9443
9466
|
});
|
|
9444
9467
|
}
|
|
@@ -9694,6 +9717,20 @@ class Members2 extends APIResource {
|
|
|
9694
9717
|
|
|
9695
9718
|
// node_modules/@anthropic-ai/sdk/resources/beta/organization/workspaces/rate-limits.mjs
|
|
9696
9719
|
class RateLimits2 extends APIResource {
|
|
9720
|
+
update(rateLimitID, params, options) {
|
|
9721
|
+
const { workspace_id, ...body } = params;
|
|
9722
|
+
return this._client.post(path`/v1/organizations/workspaces/${workspace_id}/rate_limits/${rateLimitID}?beta=true`, {
|
|
9723
|
+
body,
|
|
9724
|
+
...options,
|
|
9725
|
+
__span: startApiCallSpan(this._client, "anthropic.organization.workspaces.rate_limits.update", options, {
|
|
9726
|
+
route: "/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}",
|
|
9727
|
+
attributes: {
|
|
9728
|
+
"anthropic.organization.workspace.id": workspace_id,
|
|
9729
|
+
"anthropic.organization.workspace.rate_limit.id": rateLimitID
|
|
9730
|
+
}
|
|
9731
|
+
})
|
|
9732
|
+
});
|
|
9733
|
+
}
|
|
9697
9734
|
list(workspaceID, query = {}, options) {
|
|
9698
9735
|
return this._client.getAPIList(path`/v1/organizations/workspaces/${workspaceID}/rate_limits?beta=true`, PageCursor, {
|
|
9699
9736
|
query,
|
|
@@ -9886,6 +9923,7 @@ var Organization = /* @__PURE__ */ (() => {
|
|
|
9886
9923
|
this.plugins = new Plugins2(this._client);
|
|
9887
9924
|
this.pluginMarketplaces = new PluginMarketplaces(this._client);
|
|
9888
9925
|
this.telemetryDestinations = new TelemetryDestinations(this._client);
|
|
9926
|
+
this.webhooks = new Webhooks2(this._client);
|
|
9889
9927
|
}
|
|
9890
9928
|
retrieve(options) {
|
|
9891
9929
|
return this._client.get("/v1/organizations/me?beta=true", {
|
|
@@ -9912,6 +9950,7 @@ var Organization = /* @__PURE__ */ (() => {
|
|
|
9912
9950
|
Organization.Plugins = Plugins2;
|
|
9913
9951
|
Organization.PluginMarketplaces = PluginMarketplaces;
|
|
9914
9952
|
Organization.TelemetryDestinations = TelemetryDestinations;
|
|
9953
|
+
Organization.Webhooks = Webhooks2;
|
|
9915
9954
|
return Organization;
|
|
9916
9955
|
})();
|
|
9917
9956
|
|
|
@@ -10709,6 +10748,145 @@ var Tunnels = /* @__PURE__ */ (() => {
|
|
|
10709
10748
|
return Tunnels;
|
|
10710
10749
|
})();
|
|
10711
10750
|
|
|
10751
|
+
// node_modules/@anthropic-ai/sdk/resources/beta/user-profiles/action-urls.mjs
|
|
10752
|
+
class ActionURLs extends APIResource {
|
|
10753
|
+
create(userProfileID, params, options) {
|
|
10754
|
+
const { betas, workspace_id, ...body } = params;
|
|
10755
|
+
return this._client.post(path`/v1/user_profiles/${userProfileID}/action_urls?beta=true`, {
|
|
10756
|
+
body,
|
|
10757
|
+
...options,
|
|
10758
|
+
headers: buildHeaders([
|
|
10759
|
+
{
|
|
10760
|
+
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
10761
|
+
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
10762
|
+
},
|
|
10763
|
+
options?.headers
|
|
10764
|
+
]),
|
|
10765
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.action_urls.create", options, {
|
|
10766
|
+
route: "/v1/user_profiles/{user_profile_id}/action_urls",
|
|
10767
|
+
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
10768
|
+
})
|
|
10769
|
+
});
|
|
10770
|
+
}
|
|
10771
|
+
}
|
|
10772
|
+
|
|
10773
|
+
// node_modules/@anthropic-ai/sdk/resources/beta/user-profiles/user-profiles.mjs
|
|
10774
|
+
var UserProfiles = /* @__PURE__ */ (() => {
|
|
10775
|
+
class UserProfiles extends APIResource {
|
|
10776
|
+
constructor() {
|
|
10777
|
+
super(...arguments);
|
|
10778
|
+
this.actionURLs = new ActionURLs(this._client);
|
|
10779
|
+
}
|
|
10780
|
+
create(params, options) {
|
|
10781
|
+
const { betas, workspace_id, ...body } = params;
|
|
10782
|
+
return this._client.post("/v1/user_profiles?beta=true", {
|
|
10783
|
+
body,
|
|
10784
|
+
...options,
|
|
10785
|
+
headers: buildHeaders([
|
|
10786
|
+
{
|
|
10787
|
+
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
10788
|
+
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
10789
|
+
},
|
|
10790
|
+
options?.headers
|
|
10791
|
+
]),
|
|
10792
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.create", options, {
|
|
10793
|
+
route: "/v1/user_profiles",
|
|
10794
|
+
createdIDAttribute: "anthropic.user_profile.id"
|
|
10795
|
+
})
|
|
10796
|
+
});
|
|
10797
|
+
}
|
|
10798
|
+
retrieve(userProfileID, params = {}, options) {
|
|
10799
|
+
const { betas, workspace_id } = params ?? {};
|
|
10800
|
+
return this._client.get(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
10801
|
+
...options,
|
|
10802
|
+
headers: buildHeaders([
|
|
10803
|
+
{
|
|
10804
|
+
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
10805
|
+
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
10806
|
+
},
|
|
10807
|
+
options?.headers
|
|
10808
|
+
]),
|
|
10809
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.retrieve", options, {
|
|
10810
|
+
route: "/v1/user_profiles/{user_profile_id}",
|
|
10811
|
+
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
10812
|
+
})
|
|
10813
|
+
});
|
|
10814
|
+
}
|
|
10815
|
+
update(userProfileID, params, options) {
|
|
10816
|
+
const { betas, workspace_id, ...body } = params;
|
|
10817
|
+
return this._client.post(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
10818
|
+
body,
|
|
10819
|
+
...options,
|
|
10820
|
+
headers: buildHeaders([
|
|
10821
|
+
{
|
|
10822
|
+
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
10823
|
+
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
10824
|
+
},
|
|
10825
|
+
options?.headers
|
|
10826
|
+
]),
|
|
10827
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.update", options, {
|
|
10828
|
+
route: "/v1/user_profiles/{user_profile_id}",
|
|
10829
|
+
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
10830
|
+
})
|
|
10831
|
+
});
|
|
10832
|
+
}
|
|
10833
|
+
list(params = {}, options) {
|
|
10834
|
+
const { betas, workspace_id, ...query } = params ?? {};
|
|
10835
|
+
return this._client.getAPIList("/v1/user_profiles?beta=true", PageCursor, {
|
|
10836
|
+
query,
|
|
10837
|
+
...options,
|
|
10838
|
+
headers: buildHeaders([
|
|
10839
|
+
{
|
|
10840
|
+
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
10841
|
+
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
10842
|
+
},
|
|
10843
|
+
options?.headers
|
|
10844
|
+
]),
|
|
10845
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.list", options, {
|
|
10846
|
+
route: "/v1/user_profiles",
|
|
10847
|
+
queryParams: ["limit", "order", "order_by", "page"]
|
|
10848
|
+
})
|
|
10849
|
+
});
|
|
10850
|
+
}
|
|
10851
|
+
delete(userProfileID, params = {}, options) {
|
|
10852
|
+
const { betas, workspace_id } = params ?? {};
|
|
10853
|
+
return this._client.delete(path`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
10854
|
+
...options,
|
|
10855
|
+
headers: buildHeaders([
|
|
10856
|
+
{
|
|
10857
|
+
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
10858
|
+
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
10859
|
+
},
|
|
10860
|
+
options?.headers
|
|
10861
|
+
]),
|
|
10862
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.delete", options, {
|
|
10863
|
+
route: "/v1/user_profiles/{user_profile_id}",
|
|
10864
|
+
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
10865
|
+
})
|
|
10866
|
+
});
|
|
10867
|
+
}
|
|
10868
|
+
createEnrollmentURL(userProfileID, params = {}, options) {
|
|
10869
|
+
const { betas, workspace_id } = params ?? {};
|
|
10870
|
+
return this._client.post(path`/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
10871
|
+
...options,
|
|
10872
|
+
headers: buildHeaders([
|
|
10873
|
+
{
|
|
10874
|
+
"anthropic-beta": [...betas ?? [], "user-profiles-2026-08-18"].toString(),
|
|
10875
|
+
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
10876
|
+
},
|
|
10877
|
+
options?.headers
|
|
10878
|
+
]),
|
|
10879
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.create_enrollment_url", options, {
|
|
10880
|
+
route: "/v1/user_profiles/{user_profile_id}/enrollment_url",
|
|
10881
|
+
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
10882
|
+
})
|
|
10883
|
+
});
|
|
10884
|
+
}
|
|
10885
|
+
}
|
|
10886
|
+
UserProfiles.ActionURLs = ActionURLs;
|
|
10887
|
+
return UserProfiles;
|
|
10888
|
+
})();
|
|
10889
|
+
|
|
10712
10890
|
// node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs
|
|
10713
10891
|
class Credentials extends APIResource {
|
|
10714
10892
|
create(vaultID, params, options) {
|
|
@@ -11125,7 +11303,6 @@ var BetaToolRunner2 = /* @__PURE__ */ (() => {
|
|
|
11125
11303
|
_BetaToolRunner_toolOverrides.set(this, new Map);
|
|
11126
11304
|
_BetaToolRunner_pendingToolChanges.set(this, []);
|
|
11127
11305
|
rejectCompactionParam(params);
|
|
11128
|
-
rejectCompactionControl(params);
|
|
11129
11306
|
rejectRunToolsEagerlyWithoutStream(params);
|
|
11130
11307
|
__classPrivateFieldSet(this, _BetaToolRunner_state, {
|
|
11131
11308
|
params: {
|
|
@@ -11432,7 +11609,7 @@ var BetaToolRunner2 = /* @__PURE__ */ (() => {
|
|
|
11432
11609
|
}, _BetaToolRunner_availableToolNames = function _BetaToolRunner_availableToolNames() {
|
|
11433
11610
|
const available = new Set(__classPrivateFieldGet(this, _BetaToolRunner_instances, "m", _BetaToolRunner_runnableTools).call(this).keys());
|
|
11434
11611
|
for (const message of [...__classPrivateFieldGet(this, _BetaToolRunner_state, "f").params.messages, __classPrivateFieldGet(this, _BetaToolRunner_instances, "m", _BetaToolRunner_pendingToolChangesMessage).call(this)]) {
|
|
11435
|
-
if (
|
|
11612
|
+
if (!Array.isArray(message.content)) {
|
|
11436
11613
|
continue;
|
|
11437
11614
|
}
|
|
11438
11615
|
for (const block of message.content) {
|
|
@@ -11497,11 +11674,6 @@ function rejectCompactionParam(params) {
|
|
|
11497
11674
|
throw new AnthropicError("`compaction` cannot be set on a tool runner: every request in the loop would compact again. " + "Call `runner.compactBeforeNextTurn()` when the conversation should be compacted instead.");
|
|
11498
11675
|
}
|
|
11499
11676
|
}
|
|
11500
|
-
function rejectCompactionControl(params) {
|
|
11501
|
-
if ("compactionControl" in params && params.compactionControl != null) {
|
|
11502
|
-
throw new AnthropicError("`compactionControl` has been removed from the tool runner. Use server-side compaction instead: " + "call `runner.compactBeforeNextTurn()` when the conversation should be compacted.");
|
|
11503
|
-
}
|
|
11504
|
-
}
|
|
11505
11677
|
function rejectRunToolsEagerlyWithoutStream(params) {
|
|
11506
11678
|
if (params.runToolsEagerly && !params.stream) {
|
|
11507
11679
|
throw new TypeError("`runToolsEagerly: true` needs `stream: true` in the tool runner's params, because a reply that " + "isn't streamed arrives whole.");
|
|
@@ -11539,7 +11711,7 @@ function toolDefinition(tool) {
|
|
|
11539
11711
|
}
|
|
11540
11712
|
function withToolDefinitions(messages) {
|
|
11541
11713
|
return messages.map((message) => {
|
|
11542
|
-
if (message.role !== "system" ||
|
|
11714
|
+
if (message.role !== "system" || !Array.isArray(message.content)) {
|
|
11543
11715
|
return message;
|
|
11544
11716
|
}
|
|
11545
11717
|
const content = message.content.map((block) => block.type === "tool_addition" && block.tool.type === "tool_definition" ? { ...block, tool: { ...block.tool, definition: toolDefinition(block.tool.definition) } } : block);
|
|
@@ -11878,28 +12050,6 @@ var Beta = /* @__PURE__ */ (() => {
|
|
|
11878
12050
|
Beta.Organization = Organization;
|
|
11879
12051
|
return Beta;
|
|
11880
12052
|
})();
|
|
11881
|
-
// node_modules/@anthropic-ai/sdk/resources/completions.mjs
|
|
11882
|
-
class Completions extends APIResource {
|
|
11883
|
-
create(params, options) {
|
|
11884
|
-
const { betas, workspace_id, ...body } = params;
|
|
11885
|
-
return this._client.post("/v1/complete", {
|
|
11886
|
-
body,
|
|
11887
|
-
timeout: this._client._options.timeout ?? 600000,
|
|
11888
|
-
...options,
|
|
11889
|
-
headers: buildHeaders([
|
|
11890
|
-
{
|
|
11891
|
-
...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : undefined,
|
|
11892
|
-
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
11893
|
-
},
|
|
11894
|
-
options?.headers
|
|
11895
|
-
]),
|
|
11896
|
-
stream: params.stream ?? false,
|
|
11897
|
-
__span: startApiCallSpan(this._client, "anthropic.completions.create", options, {
|
|
11898
|
-
route: "/v1/complete"
|
|
11899
|
-
})
|
|
11900
|
-
});
|
|
11901
|
-
}
|
|
11902
|
-
}
|
|
11903
12053
|
// node_modules/@anthropic-ai/sdk/resources/files.mjs
|
|
11904
12054
|
class Files2 extends APIResource {
|
|
11905
12055
|
list(params = {}, options) {
|
|
@@ -11983,14 +12133,11 @@ class Files2 extends APIResource {
|
|
|
11983
12133
|
// node_modules/@anthropic-ai/sdk/resources/models.mjs
|
|
11984
12134
|
class Models2 extends APIResource {
|
|
11985
12135
|
retrieve(modelID, params = {}, options) {
|
|
11986
|
-
const {
|
|
12136
|
+
const { workspace_id } = params ?? {};
|
|
11987
12137
|
return this._client.get(path`/v1/models/${modelID}`, {
|
|
11988
12138
|
...options,
|
|
11989
12139
|
headers: buildHeaders([
|
|
11990
|
-
{
|
|
11991
|
-
...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : undefined,
|
|
11992
|
-
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
11993
|
-
},
|
|
12140
|
+
{ ...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined },
|
|
11994
12141
|
options?.headers
|
|
11995
12142
|
]),
|
|
11996
12143
|
__span: startApiCallSpan(this._client, "anthropic.models.retrieve", options, {
|
|
@@ -12000,15 +12147,12 @@ class Models2 extends APIResource {
|
|
|
12000
12147
|
});
|
|
12001
12148
|
}
|
|
12002
12149
|
list(params = {}, options) {
|
|
12003
|
-
const {
|
|
12150
|
+
const { workspace_id, ...query } = params ?? {};
|
|
12004
12151
|
return this._client.getAPIList("/v1/models", Page, {
|
|
12005
12152
|
query,
|
|
12006
12153
|
...options,
|
|
12007
12154
|
headers: buildHeaders([
|
|
12008
|
-
{
|
|
12009
|
-
...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : undefined,
|
|
12010
|
-
...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined
|
|
12011
|
-
},
|
|
12155
|
+
{ ...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined },
|
|
12012
12156
|
options?.headers
|
|
12013
12157
|
]),
|
|
12014
12158
|
__span: startApiCallSpan(this._client, "anthropic.models.list", options, {
|
|
@@ -12566,6 +12710,20 @@ class Members3 extends APIResource {
|
|
|
12566
12710
|
|
|
12567
12711
|
// node_modules/@anthropic-ai/sdk/resources/organization/workspaces/rate-limits.mjs
|
|
12568
12712
|
class RateLimits4 extends APIResource {
|
|
12713
|
+
update(rateLimitID, params, options) {
|
|
12714
|
+
const { workspace_id, ...body } = params;
|
|
12715
|
+
return this._client.post(path`/v1/organizations/workspaces/${workspace_id}/rate_limits/${rateLimitID}`, {
|
|
12716
|
+
body,
|
|
12717
|
+
...options,
|
|
12718
|
+
__span: startApiCallSpan(this._client, "anthropic.organization.workspaces.rate_limits.update", options, {
|
|
12719
|
+
route: "/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}",
|
|
12720
|
+
attributes: {
|
|
12721
|
+
"anthropic.organization.workspace.id": workspace_id,
|
|
12722
|
+
"anthropic.organization.workspace.rate_limit.id": rateLimitID
|
|
12723
|
+
}
|
|
12724
|
+
})
|
|
12725
|
+
});
|
|
12726
|
+
}
|
|
12569
12727
|
list(workspaceID, query = {}, options) {
|
|
12570
12728
|
return this._client.getAPIList(path`/v1/organizations/workspaces/${workspaceID}/rate_limits`, PageCursor, {
|
|
12571
12729
|
query,
|
|
@@ -12878,14 +13036,117 @@ var Skills3 = /* @__PURE__ */ (() => {
|
|
|
12878
13036
|
Skills.Versions = Versions4;
|
|
12879
13037
|
return Skills;
|
|
12880
13038
|
})();
|
|
13039
|
+
// node_modules/@anthropic-ai/sdk/resources/user-profiles/action-urls.mjs
|
|
13040
|
+
class ActionURLs2 extends APIResource {
|
|
13041
|
+
create(userProfileID, params, options) {
|
|
13042
|
+
const { workspace_id, ...body } = params;
|
|
13043
|
+
return this._client.post(path`/v1/user_profiles/${userProfileID}/action_urls`, {
|
|
13044
|
+
body,
|
|
13045
|
+
...options,
|
|
13046
|
+
headers: buildHeaders([
|
|
13047
|
+
{ ...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined },
|
|
13048
|
+
options?.headers
|
|
13049
|
+
]),
|
|
13050
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.action_urls.create", options, {
|
|
13051
|
+
route: "/v1/user_profiles/{user_profile_id}/action_urls",
|
|
13052
|
+
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
13053
|
+
})
|
|
13054
|
+
});
|
|
13055
|
+
}
|
|
13056
|
+
}
|
|
13057
|
+
|
|
13058
|
+
// node_modules/@anthropic-ai/sdk/resources/user-profiles/user-profiles.mjs
|
|
13059
|
+
var UserProfiles2 = /* @__PURE__ */ (() => {
|
|
13060
|
+
class UserProfiles extends APIResource {
|
|
13061
|
+
constructor() {
|
|
13062
|
+
super(...arguments);
|
|
13063
|
+
this.actionURLs = new ActionURLs2(this._client);
|
|
13064
|
+
}
|
|
13065
|
+
create(params, options) {
|
|
13066
|
+
const { workspace_id, ...body } = params;
|
|
13067
|
+
return this._client.post("/v1/user_profiles", {
|
|
13068
|
+
body,
|
|
13069
|
+
...options,
|
|
13070
|
+
headers: buildHeaders([
|
|
13071
|
+
{ ...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined },
|
|
13072
|
+
options?.headers
|
|
13073
|
+
]),
|
|
13074
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.create", options, {
|
|
13075
|
+
route: "/v1/user_profiles",
|
|
13076
|
+
createdIDAttribute: "anthropic.user_profile.id"
|
|
13077
|
+
})
|
|
13078
|
+
});
|
|
13079
|
+
}
|
|
13080
|
+
retrieve(userProfileID, params = {}, options) {
|
|
13081
|
+
const { workspace_id } = params ?? {};
|
|
13082
|
+
return this._client.get(path`/v1/user_profiles/${userProfileID}`, {
|
|
13083
|
+
...options,
|
|
13084
|
+
headers: buildHeaders([
|
|
13085
|
+
{ ...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined },
|
|
13086
|
+
options?.headers
|
|
13087
|
+
]),
|
|
13088
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.retrieve", options, {
|
|
13089
|
+
route: "/v1/user_profiles/{user_profile_id}",
|
|
13090
|
+
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
13091
|
+
})
|
|
13092
|
+
});
|
|
13093
|
+
}
|
|
13094
|
+
update(userProfileID, params, options) {
|
|
13095
|
+
const { workspace_id, ...body } = params;
|
|
13096
|
+
return this._client.post(path`/v1/user_profiles/${userProfileID}`, {
|
|
13097
|
+
body,
|
|
13098
|
+
...options,
|
|
13099
|
+
headers: buildHeaders([
|
|
13100
|
+
{ ...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined },
|
|
13101
|
+
options?.headers
|
|
13102
|
+
]),
|
|
13103
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.update", options, {
|
|
13104
|
+
route: "/v1/user_profiles/{user_profile_id}",
|
|
13105
|
+
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
13106
|
+
})
|
|
13107
|
+
});
|
|
13108
|
+
}
|
|
13109
|
+
list(params = {}, options) {
|
|
13110
|
+
const { workspace_id, ...query } = params ?? {};
|
|
13111
|
+
return this._client.getAPIList("/v1/user_profiles", PageCursor, {
|
|
13112
|
+
query,
|
|
13113
|
+
...options,
|
|
13114
|
+
headers: buildHeaders([
|
|
13115
|
+
{ ...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined },
|
|
13116
|
+
options?.headers
|
|
13117
|
+
]),
|
|
13118
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.list", options, {
|
|
13119
|
+
route: "/v1/user_profiles",
|
|
13120
|
+
queryParams: ["enforcement_status", "limit", "order", "order_by", "page"]
|
|
13121
|
+
})
|
|
13122
|
+
});
|
|
13123
|
+
}
|
|
13124
|
+
delete(userProfileID, params = {}, options) {
|
|
13125
|
+
const { workspace_id } = params ?? {};
|
|
13126
|
+
return this._client.delete(path`/v1/user_profiles/${userProfileID}`, {
|
|
13127
|
+
...options,
|
|
13128
|
+
headers: buildHeaders([
|
|
13129
|
+
{ ...workspace_id != null ? { "anthropic-workspace-id": workspace_id } : undefined },
|
|
13130
|
+
options?.headers
|
|
13131
|
+
]),
|
|
13132
|
+
__span: startApiCallSpan(this._client, "anthropic.user_profiles.delete", options, {
|
|
13133
|
+
route: "/v1/user_profiles/{user_profile_id}",
|
|
13134
|
+
attributes: { "anthropic.user_profile.id": userProfileID }
|
|
13135
|
+
})
|
|
13136
|
+
});
|
|
13137
|
+
}
|
|
13138
|
+
}
|
|
13139
|
+
UserProfiles.ActionURLs = ActionURLs2;
|
|
13140
|
+
return UserProfiles;
|
|
13141
|
+
})();
|
|
12881
13142
|
// node_modules/@anthropic-ai/sdk/client.mjs
|
|
12882
13143
|
var _BaseAnthropic_instances;
|
|
12883
13144
|
var _a;
|
|
12884
13145
|
var _BaseAnthropic_encoder;
|
|
13146
|
+
var _BaseAnthropic_apiKeyFunction;
|
|
12885
13147
|
var _BaseAnthropic_openTelemetry;
|
|
12886
13148
|
var _BaseAnthropic_baseURLOverridden;
|
|
12887
|
-
var
|
|
12888
|
-
var AI_PROMPT = "\\n\\nAssistant:";
|
|
13149
|
+
var warnedOfKeyAndTokenInEnv = false;
|
|
12889
13150
|
var BaseAnthropic = /* @__PURE__ */ (() => {
|
|
12890
13151
|
|
|
12891
13152
|
class BaseAnthropic {
|
|
@@ -12902,20 +13163,24 @@ var BaseAnthropic = /* @__PURE__ */ (() => {
|
|
|
12902
13163
|
_BaseAnthropic_instances.add(this);
|
|
12903
13164
|
this._requestAuthFlags = new WeakMap;
|
|
12904
13165
|
_BaseAnthropic_encoder.set(this, undefined);
|
|
13166
|
+
_BaseAnthropic_apiKeyFunction.set(this, undefined);
|
|
12905
13167
|
_BaseAnthropic_openTelemetry.set(this, undefined);
|
|
12906
13168
|
this._genAIProviderName = "anthropic";
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
}
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
13169
|
+
const given = { apiKey, authToken, ...opts };
|
|
13170
|
+
const passed = CREDENTIAL_OPTIONS.filter((name) => given[name] != null);
|
|
13171
|
+
if (passed.length > 1) {
|
|
13172
|
+
const list = (names) => names.map((name) => `\`${name}\``).join(", ");
|
|
13173
|
+
throw new TypeError(`Pass at most one of ${list(CREDENTIAL_OPTIONS)}. Received ${list(passed)}.`);
|
|
13174
|
+
}
|
|
13175
|
+
const [passedName] = passed;
|
|
13176
|
+
const env = passedName != null ? null : {
|
|
13177
|
+
apiKey: apiKey === undefined ? readEnv("ANTHROPIC_API_KEY") : undefined,
|
|
13178
|
+
authToken: authToken === undefined ? readEnv("ANTHROPIC_AUTH_TOKEN") : undefined
|
|
13179
|
+
};
|
|
13180
|
+
const credential = passedName != null ? { type: passedName, value: given[passedName] } : env?.apiKey != null ? { type: "apiKey", value: env.apiKey } : env?.authToken != null ? { type: "authToken", value: env.authToken } : { type: "defaultChain" };
|
|
12916
13181
|
const options = {
|
|
12917
|
-
apiKey,
|
|
12918
|
-
authToken,
|
|
13182
|
+
apiKey: credential.type === "apiKey" ? credential.value : null,
|
|
13183
|
+
authToken: credential.type === "authToken" ? credential.value : null,
|
|
12919
13184
|
webhookKey,
|
|
12920
13185
|
...opts,
|
|
12921
13186
|
baseURL: baseURL || `https://api.anthropic.com`
|
|
@@ -12936,6 +13201,10 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
12936
13201
|
this.logger = options.logger ?? console;
|
|
12937
13202
|
this.logLevel = defaultLogLevel;
|
|
12938
13203
|
this.logLevel = parseLogLevel(options.logLevel, "ClientOptions.logLevel", loggerFor(this)) ?? parseLogLevel(readEnv("ANTHROPIC_LOG"), "process.env['ANTHROPIC_LOG']", loggerFor(this)) ?? defaultLogLevel;
|
|
13204
|
+
if (env?.apiKey != null && env.authToken != null && !warnedOfKeyAndTokenInEnv) {
|
|
13205
|
+
warnedOfKeyAndTokenInEnv = true;
|
|
13206
|
+
loggerFor(this).warn("Anthropic: ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN are both set. Using ANTHROPIC_API_KEY.");
|
|
13207
|
+
}
|
|
12939
13208
|
this.fetchOptions = options.fetchOptions;
|
|
12940
13209
|
this.maxRetries = validatePositiveInteger("maxRetries", options.maxRetries ?? 2);
|
|
12941
13210
|
const scope = this._instrumentationScope();
|
|
@@ -12961,8 +13230,9 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
12961
13230
|
delete options.__auth;
|
|
12962
13231
|
delete options.__baseURLIsExplicit;
|
|
12963
13232
|
this._options = options;
|
|
12964
|
-
this.apiKey = typeof apiKey === "string" ? apiKey : null;
|
|
12965
|
-
this.
|
|
13233
|
+
this.apiKey = typeof options.apiKey === "string" ? options.apiKey : null;
|
|
13234
|
+
__classPrivateFieldSet(this, _BaseAnthropic_apiKeyFunction, typeof options.apiKey === "function" ? options.apiKey : null, "f");
|
|
13235
|
+
this.authToken = options.authToken ?? null;
|
|
12966
13236
|
this.webhookKey = webhookKey;
|
|
12967
13237
|
if (inherited) {
|
|
12968
13238
|
this._authState = inherited;
|
|
@@ -12971,22 +13241,32 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
12971
13241
|
}
|
|
12972
13242
|
} else {
|
|
12973
13243
|
this._authState = { provider: null, tokenCache: null, resolution: null, error: null, extraHeaders: {} };
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
13244
|
+
switch (credential.type) {
|
|
13245
|
+
case "apiKey":
|
|
13246
|
+
case "authToken":
|
|
13247
|
+
break;
|
|
13248
|
+
case "credentials":
|
|
13249
|
+
this._authState.provider = credential.value;
|
|
13250
|
+
this._authState.tokenCache = this._makeTokenCache(credential.value);
|
|
13251
|
+
break;
|
|
13252
|
+
case "config": {
|
|
13253
|
+
const result = resolveCredentialsFromConfig(credential.value, this._credentialResolverOptions());
|
|
12981
13254
|
this._authState.provider = result.provider;
|
|
12982
13255
|
this._authState.tokenCache = this._makeTokenCache(result.provider);
|
|
12983
13256
|
this._authState.extraHeaders = result.extraHeaders;
|
|
12984
13257
|
this._applyCredentialBaseURL(result.baseURL);
|
|
12985
|
-
|
|
12986
|
-
this._authState.resolution = this._resolveDefaultCredentials(options.profile);
|
|
12987
|
-
} else if (this._shouldResolveDefaultCredentials()) {
|
|
12988
|
-
this._authState.resolution = this._resolveDefaultCredentials();
|
|
13258
|
+
break;
|
|
12989
13259
|
}
|
|
13260
|
+
case "profile":
|
|
13261
|
+
this._authState.resolution = this._resolveDefaultCredentials(credential.value);
|
|
13262
|
+
break;
|
|
13263
|
+
case "defaultChain":
|
|
13264
|
+
if (this._shouldResolveDefaultCredentials()) {
|
|
13265
|
+
this._authState.resolution = this._resolveDefaultCredentials();
|
|
13266
|
+
}
|
|
13267
|
+
break;
|
|
13268
|
+
default:
|
|
13269
|
+
checkNever(credential);
|
|
12990
13270
|
}
|
|
12991
13271
|
}
|
|
12992
13272
|
}
|
|
@@ -13024,8 +13304,13 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
13024
13304
|
});
|
|
13025
13305
|
}
|
|
13026
13306
|
withOptions(options) {
|
|
13027
|
-
|
|
13028
|
-
const
|
|
13307
|
+
options = { ...options };
|
|
13308
|
+
for (const name of CREDENTIAL_OPTIONS) {
|
|
13309
|
+
if (options[name] === undefined)
|
|
13310
|
+
delete options[name];
|
|
13311
|
+
}
|
|
13312
|
+
const overridesAuth = CREDENTIAL_OPTIONS.some((name) => (name in options));
|
|
13313
|
+
const replacesCredential = CREDENTIAL_OPTIONS.some((name) => options[name] != null);
|
|
13029
13314
|
const internal = {
|
|
13030
13315
|
...this._options,
|
|
13031
13316
|
...this._baseURLIsExplicit ? { baseURL: this.baseURL } : {},
|
|
@@ -13036,11 +13321,10 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
13036
13321
|
fetch: this.fetch,
|
|
13037
13322
|
fetchOptions: this.fetchOptions,
|
|
13038
13323
|
middleware: this.middleware,
|
|
13039
|
-
apiKey: this.apiKey,
|
|
13324
|
+
apiKey: this.apiKey ?? __classPrivateFieldGet(this, _BaseAnthropic_apiKeyFunction, "f"),
|
|
13040
13325
|
authToken: this.authToken,
|
|
13041
13326
|
webhookKey: this.webhookKey,
|
|
13042
|
-
|
|
13043
|
-
...overridesStructuredAuth ? { credentials: undefined, config: undefined, profile: undefined } : {},
|
|
13327
|
+
...replacesCredential ? Object.fromEntries(CREDENTIAL_OPTIONS.map((name) => [name, null])) : {},
|
|
13044
13328
|
...options,
|
|
13045
13329
|
openTelemetry: options.openTelemetry ?? __classPrivateFieldGet(this, _BaseAnthropic_openTelemetry, "f"),
|
|
13046
13330
|
__auth: overridesAuth ? undefined : this._authState,
|
|
@@ -13078,10 +13362,10 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
13078
13362
|
if (this._authState.tokenCache || this._authState.resolution) {
|
|
13079
13363
|
return;
|
|
13080
13364
|
}
|
|
13081
|
-
if (this.apiKey && values.get("
|
|
13365
|
+
if (this.apiKey && values.get("authorization")) {
|
|
13082
13366
|
return;
|
|
13083
13367
|
}
|
|
13084
|
-
if (nulls.has("
|
|
13368
|
+
if (nulls.has("authorization")) {
|
|
13085
13369
|
return;
|
|
13086
13370
|
}
|
|
13087
13371
|
if (this.authToken && values.get("authorization")) {
|
|
@@ -13090,7 +13374,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
13090
13374
|
if (nulls.has("authorization")) {
|
|
13091
13375
|
return;
|
|
13092
13376
|
}
|
|
13093
|
-
throw new Error('Could not resolve authentication method. Expected one of apiKey, authToken, credentials, config, or profile to be set. Or for
|
|
13377
|
+
throw new Error('Could not resolve authentication method. Expected one of apiKey, authToken, credentials, config, or profile to be set. Or for the "Authorization" header to be explicitly omitted');
|
|
13094
13378
|
}
|
|
13095
13379
|
_authFlags(opts) {
|
|
13096
13380
|
let flags = this._requestAuthFlags.get(opts);
|
|
@@ -13107,18 +13391,32 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
13107
13391
|
if (this._authState.error) {
|
|
13108
13392
|
return;
|
|
13109
13393
|
}
|
|
13394
|
+
if (__classPrivateFieldGet(this, _BaseAnthropic_apiKeyFunction, "f") && this.apiKey == null) {
|
|
13395
|
+
let apiKey;
|
|
13396
|
+
try {
|
|
13397
|
+
apiKey = await __classPrivateFieldGet(this, _BaseAnthropic_apiKeyFunction, "f").call(this);
|
|
13398
|
+
} catch (err) {
|
|
13399
|
+
throw new AnthropicError(`The \`apiKey\` function failed: ${castToError(err).message}`, {
|
|
13400
|
+
cause: err
|
|
13401
|
+
});
|
|
13402
|
+
}
|
|
13403
|
+
if (!apiKey) {
|
|
13404
|
+
throw new AnthropicError(`The \`apiKey\` function must return a non-empty string. It returned ${JSON.stringify(apiKey)}.`);
|
|
13405
|
+
}
|
|
13406
|
+
return buildHeaders([{ Authorization: `Bearer ${apiKey}` }]);
|
|
13407
|
+
}
|
|
13110
13408
|
if (this._authState.tokenCache && this.apiKey == null) {
|
|
13111
13409
|
const token = await this._authState.tokenCache.getToken();
|
|
13112
13410
|
this._authFlags(opts).usedTokenCache = true;
|
|
13113
13411
|
return buildHeaders([{ Authorization: `Bearer ${token}` }]);
|
|
13114
13412
|
}
|
|
13115
|
-
return buildHeaders([await this.
|
|
13413
|
+
return buildHeaders([await this.bearerAuth(opts), await this.apiKeyAuth(opts)]);
|
|
13116
13414
|
}
|
|
13117
13415
|
async apiKeyAuth(opts) {
|
|
13118
13416
|
if (this.apiKey == null) {
|
|
13119
13417
|
return;
|
|
13120
13418
|
}
|
|
13121
|
-
return buildHeaders([{
|
|
13419
|
+
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
|
|
13122
13420
|
}
|
|
13123
13421
|
async bearerAuth(opts) {
|
|
13124
13422
|
if (this.authToken == null) {
|
|
@@ -13507,7 +13805,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
13507
13805
|
"X-Stainless-Timeout": String(Math.trunc(timeout / 1000)),
|
|
13508
13806
|
...getPlatformHeaders(),
|
|
13509
13807
|
...this._options.dangerouslyAllowBrowser ? { "anthropic-dangerous-direct-browser-access": "true" } : undefined,
|
|
13510
|
-
"anthropic-version": "
|
|
13808
|
+
"anthropic-version": "2026-10-21"
|
|
13511
13809
|
},
|
|
13512
13810
|
await this.authHeaders(options),
|
|
13513
13811
|
this._options.defaultHeaders,
|
|
@@ -13545,7 +13843,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
13545
13843
|
return typeof body === "object" && body !== null && ((Symbol.asyncIterator in body) || (Symbol.iterator in body) && ("next" in body) && typeof body.next === "function");
|
|
13546
13844
|
}
|
|
13547
13845
|
}
|
|
13548
|
-
_a = BaseAnthropic, _BaseAnthropic_encoder = new WeakMap, _BaseAnthropic_openTelemetry = new WeakMap, _BaseAnthropic_instances = new WeakSet, _BaseAnthropic_baseURLOverridden = function _BaseAnthropic_baseURLOverridden() {
|
|
13846
|
+
_a = BaseAnthropic, _BaseAnthropic_encoder = new WeakMap, _BaseAnthropic_apiKeyFunction = new WeakMap, _BaseAnthropic_openTelemetry = new WeakMap, _BaseAnthropic_instances = new WeakSet, _BaseAnthropic_baseURLOverridden = function _BaseAnthropic_baseURLOverridden() {
|
|
13549
13847
|
return this.baseURL !== "https://api.anthropic.com";
|
|
13550
13848
|
};
|
|
13551
13849
|
BaseAnthropic.Anthropic = _a;
|
|
@@ -13564,8 +13862,6 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
13564
13862
|
BaseAnthropic.PermissionDeniedError = PermissionDeniedError;
|
|
13565
13863
|
BaseAnthropic.UnprocessableEntityError = UnprocessableEntityError;
|
|
13566
13864
|
BaseAnthropic.toFile = toFile;
|
|
13567
|
-
BaseAnthropic.HUMAN_PROMPT = HUMAN_PROMPT;
|
|
13568
|
-
BaseAnthropic.AI_PROMPT = AI_PROMPT;
|
|
13569
13865
|
return BaseAnthropic;
|
|
13570
13866
|
})();
|
|
13571
13867
|
var Anthropic = /* @__PURE__ */ (() => {
|
|
@@ -13573,20 +13869,20 @@ var Anthropic = /* @__PURE__ */ (() => {
|
|
|
13573
13869
|
class Anthropic extends BaseAnthropic {
|
|
13574
13870
|
constructor() {
|
|
13575
13871
|
super(...arguments);
|
|
13576
|
-
this.completions = new Completions(this);
|
|
13577
13872
|
this.messages = new Messages(this);
|
|
13578
13873
|
this.models = new Models2(this);
|
|
13579
13874
|
this.files = new Files2(this);
|
|
13580
13875
|
this.skills = new Skills3(this);
|
|
13876
|
+
this.userProfiles = new UserProfiles2(this);
|
|
13581
13877
|
this.organization = new Organization2(this);
|
|
13582
13878
|
this.beta = new Beta(this);
|
|
13583
13879
|
}
|
|
13584
13880
|
}
|
|
13585
|
-
Anthropic.Completions = Completions;
|
|
13586
13881
|
Anthropic.Messages = Messages;
|
|
13587
13882
|
Anthropic.Models = Models2;
|
|
13588
13883
|
Anthropic.Files = Files2;
|
|
13589
13884
|
Anthropic.Skills = Skills3;
|
|
13885
|
+
Anthropic.UserProfiles = UserProfiles2;
|
|
13590
13886
|
Anthropic.Organization = Organization2;
|
|
13591
13887
|
Anthropic.Beta = Beta;
|
|
13592
13888
|
return Anthropic;
|