@claudiolabs/claudin 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AgentTool-0.6.2-he5a0dam.mjs +1 -0
- package/dist/chunks/App-0.6.2-81hq55t1.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.6.2-08hjmc7a.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-0.6.2-0r37ejyw.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-0.6.2-k5q2wq69.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.6.2-q2vnf20c.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.2-nsje6vp4.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.6.2-0td2rsrs.mjs +1 -0
- package/dist/chunks/DiffDialog-0.6.2-6yg14gsy.mjs +3 -0
- package/dist/chunks/Doctor-0.6.2-3wbjtm02.mjs +1 -0
- package/dist/chunks/Grove-0.6.2-baqbhjjj.mjs +1 -0
- package/dist/chunks/ITermBackend-0.6.2-zmtwee85.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-0.6.2-yxzmem78.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.6.2-fp9sq2qx.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.6.2-yvf4s2y6.mjs +1 -0
- package/dist/chunks/Onboarding-0.6.2-y1rgs60d.mjs +1 -0
- package/dist/chunks/ProviderManager-0.6.2-cp0pxj1c.mjs +1 -0
- package/dist/chunks/REPL-0.6.2-ab1c9240.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.6.2-sc3b5r7q.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-0.6.2-8sv3ddk7.mjs +1 -0
- package/dist/chunks/TeleportProgress-0.6.2-wa2hgv37.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.6.2-a3a7fv1a.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.6.2-2n1ktp6n.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.6.2-qbc4yk54.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.6.2-384g3ky4.mjs +1 -0
- package/dist/chunks/TrustDialog-0.6.2-egpnc3w1.mjs +1 -0
- package/dist/chunks/activeProvider-0.6.2-w0ja3pnw.mjs +1 -0
- package/dist/chunks/add-dir-0.6.2-srcrq97m.mjs +1 -0
- package/dist/chunks/agents-0.6.2-pwkawpda.mjs +110 -0
- package/dist/chunks/agents-0.6.2-v40vzjvy.mjs +3 -0
- package/dist/chunks/api-0.6.2-r9z30232.mjs +1 -0
- package/dist/chunks/asciicast-0.6.2-dtanhyb8.mjs +1 -0
- package/dist/chunks/assistant-0.6.2-29e26n3s.mjs +1 -0
- package/dist/chunks/auth-0.6.2-azq9yv0m.mjs +1 -0
- package/dist/chunks/auth-0.6.2-ndpcgcx5.mjs +1 -0
- package/dist/chunks/autoMode-0.6.2-w921k0xq.mjs +48 -0
- package/dist/chunks/autoUpdater-0.6.2-gwvkqpt8.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-0.6.2-7p2jxjem.mjs +1 -0
- package/dist/chunks/branch-0.6.2-tx9vvnkh.mjs +4 -0
- package/dist/chunks/bridgePointer-0.6.2-vm11xngr.mjs +1 -0
- package/dist/chunks/btw-0.6.2-s76cg2fz.mjs +1 -0
- package/dist/chunks/buddy-0.6.2-0ck2kabw.mjs +3 -0
- package/dist/chunks/cacache-0.6.2-c87f0fw9.mjs +1 -0
- package/dist/chunks/cache-probe-0.6.2-nhq6d99v.mjs +21 -0
- package/dist/chunks/cacheStats-0.6.2-wjqpder6.mjs +4 -0
- package/dist/chunks/caches-0.6.2-ckpe4m10.mjs +1 -0
- package/dist/chunks/claudeDesktop-0.6.2-9xry3zxj.mjs +1 -0
- package/dist/chunks/claudemd-0.6.2-eevm7pz1.mjs +1 -0
- package/dist/chunks/clear-0.6.2-301n503a.mjs +1 -0
- package/dist/chunks/clearTerminal-0.6.2-qgg50hxe.mjs +1 -0
- package/dist/chunks/cli-0.6.2-0cpmb5wg.mjs +42 -0
- package/dist/chunks/cli-0.6.2-0f9sh5z8.mjs +4 -0
- package/dist/chunks/cli-0.6.2-0p39svq8.mjs +2 -0
- package/dist/chunks/cli-0.6.2-1acc8mpr.mjs +2 -0
- package/dist/chunks/cli-0.6.2-1ahapm20.mjs +2 -0
- package/dist/chunks/cli-0.6.2-1b9hx344.mjs +2 -0
- package/dist/chunks/cli-0.6.2-1g0gmdck.mjs +2 -0
- package/dist/chunks/cli-0.6.2-1hrabb68.mjs +3 -0
- package/dist/chunks/cli-0.6.2-1wj8sm5y.mjs +9 -0
- package/dist/chunks/cli-0.6.2-1y907j57.mjs +2 -0
- package/dist/chunks/cli-0.6.2-22zkw0rp.mjs +2 -0
- package/dist/chunks/cli-0.6.2-26qywcgz.mjs +2 -0
- package/dist/chunks/cli-0.6.2-2aj7wfhk.mjs +2 -0
- package/dist/chunks/cli-0.6.2-2ewwghbe.mjs +3 -0
- package/dist/chunks/cli-0.6.2-2jg2f49s.mjs +2 -0
- package/dist/chunks/cli-0.6.2-2z19ppek.mjs +15 -0
- package/dist/chunks/cli-0.6.2-334vw6ys.mjs +2 -0
- package/dist/chunks/cli-0.6.2-3mpd0wjn.mjs +2 -0
- package/dist/chunks/cli-0.6.2-3r8vgmhb.mjs +2 -0
- package/dist/chunks/cli-0.6.2-3rgtxc9f.mjs +2 -0
- package/dist/chunks/cli-0.6.2-40pc2aj2.mjs +2 -0
- package/dist/chunks/cli-0.6.2-42d88f3r.mjs +2 -0
- package/dist/chunks/cli-0.6.2-43f0sknv.mjs +2 -0
- package/dist/chunks/cli-0.6.2-43qjtqa5.mjs +2 -0
- package/dist/chunks/cli-0.6.2-4a5t390f.mjs +2 -0
- package/dist/chunks/cli-0.6.2-4drhcx9k.mjs +15 -0
- package/dist/chunks/cli-0.6.2-4kcvb5en.mjs +2 -0
- package/dist/chunks/cli-0.6.2-4ke2trrq.mjs +39 -0
- package/dist/chunks/cli-0.6.2-4p9wa0p6.mjs +5323 -0
- package/dist/chunks/cli-0.6.2-4py7r63v.mjs +2 -0
- package/dist/chunks/cli-0.6.2-4r69ge5f.mjs +59 -0
- package/dist/chunks/cli-0.6.2-5d05m4xc.mjs +2 -0
- package/dist/chunks/cli-0.6.2-5jempndm.mjs +133 -0
- package/dist/chunks/cli-0.6.2-657fbmws.mjs +2 -0
- package/dist/chunks/cli-0.6.2-6bacgc39.mjs +3 -0
- package/dist/chunks/cli-0.6.2-6g0t3j91.mjs +5 -0
- package/dist/chunks/cli-0.6.2-6g8yfn0m.mjs +2 -0
- package/dist/chunks/cli-0.6.2-6kn7z0zj.mjs +3 -0
- package/dist/chunks/cli-0.6.2-6wk99hh1.mjs +3 -0
- package/dist/chunks/cli-0.6.2-73vnf2t2.mjs +4 -0
- package/dist/chunks/cli-0.6.2-74x1d5s0.mjs +2 -0
- package/dist/chunks/cli-0.6.2-7egesyh9.mjs +4 -0
- package/dist/chunks/cli-0.6.2-7rmm482v.mjs +12 -0
- package/dist/chunks/cli-0.6.2-7rmymgpp.mjs +2 -0
- package/dist/chunks/cli-0.6.2-7z82z1hp.mjs +25 -0
- package/dist/chunks/cli-0.6.2-83ennmm8.mjs +21 -0
- package/dist/chunks/cli-0.6.2-8ka8msyf.mjs +2 -0
- package/dist/chunks/cli-0.6.2-8ksqzwe8.mjs +5 -0
- package/dist/chunks/cli-0.6.2-8v8sktjd.mjs +10 -0
- package/dist/chunks/cli-0.6.2-8y3j75c7.mjs +2 -0
- package/dist/chunks/cli-0.6.2-974c5e67.mjs +9 -0
- package/dist/chunks/cli-0.6.2-9j01vvqt.mjs +2 -0
- package/dist/chunks/cli-0.6.2-9mwrq250.mjs +3 -0
- package/dist/chunks/cli-0.6.2-9n2g6k9w.mjs +2 -0
- package/dist/chunks/cli-0.6.2-9n9cpja7.mjs +2 -0
- package/dist/chunks/cli-0.6.2-9qtj477e.mjs +2 -0
- package/dist/chunks/cli-0.6.2-9w9nmx9s.mjs +2 -0
- package/dist/chunks/cli-0.6.2-9ybnhjj8.mjs +4 -0
- package/dist/chunks/cli-0.6.2-a8atyp18.mjs +2 -0
- package/dist/chunks/cli-0.6.2-ahaj5z3h.mjs +2 -0
- package/dist/chunks/cli-0.6.2-aq30pg47.mjs +2 -0
- package/dist/chunks/cli-0.6.2-aqxemf9h.mjs +6 -0
- package/dist/chunks/cli-0.6.2-b34y2qb7.mjs +2 -0
- package/dist/chunks/cli-0.6.2-b88e6p6d.mjs +2 -0
- package/dist/chunks/cli-0.6.2-b8r77v7s.mjs +2 -0
- package/dist/chunks/cli-0.6.2-bkff60ff.mjs +2 -0
- package/dist/chunks/cli-0.6.2-br678d1b.mjs +8 -0
- package/dist/chunks/cli-0.6.2-bvyhf16r.mjs +2 -0
- package/dist/chunks/cli-0.6.2-c05pfwbs.mjs +2 -0
- package/dist/chunks/cli-0.6.2-c3h0j3ad.mjs +2 -0
- package/dist/chunks/cli-0.6.2-c8bf5gfw.mjs +4 -0
- package/dist/chunks/cli-0.6.2-c9adbzc9.mjs +2 -0
- package/dist/chunks/cli-0.6.2-cvr4dbfz.mjs +2 -0
- package/dist/chunks/cli-0.6.2-d3evezft.mjs +1 -0
- package/dist/chunks/cli-0.6.2-d3y2w089.mjs +2 -0
- package/dist/chunks/cli-0.6.2-d3ykxc81.mjs +2 -0
- package/dist/chunks/cli-0.6.2-dbw96fj0.mjs +12 -0
- package/dist/chunks/cli-0.6.2-dr4gmq77.mjs +2 -0
- package/dist/chunks/cli-0.6.2-drm9vdbc.mjs +2 -0
- package/dist/chunks/cli-0.6.2-dv8abe56.mjs +7 -0
- package/dist/chunks/cli-0.6.2-dx6qfese.mjs +2 -0
- package/dist/chunks/cli-0.6.2-dy4zwces.mjs +2 -0
- package/dist/chunks/cli-0.6.2-e0x7vgkh.mjs +2 -0
- package/dist/chunks/cli-0.6.2-e26khw0m.mjs +6 -0
- package/dist/chunks/cli-0.6.2-e66qz53g.mjs +2 -0
- package/dist/chunks/cli-0.6.2-ea8z1e2e.mjs +16 -0
- package/dist/chunks/cli-0.6.2-erkq6kmj.mjs +45 -0
- package/dist/chunks/cli-0.6.2-ezn7w7ae.mjs +5 -0
- package/dist/chunks/cli-0.6.2-f8wbscq8.mjs +2 -0
- package/dist/chunks/cli-0.6.2-ffwsaj8h.mjs +2 -0
- package/dist/chunks/cli-0.6.2-fm1d3kkg.mjs +2 -0
- package/dist/chunks/cli-0.6.2-g1m1mc2w.mjs +2 -0
- package/dist/chunks/cli-0.6.2-g5akhdzk.mjs +2 -0
- package/dist/chunks/cli-0.6.2-g6c6hjc6.mjs +6 -0
- package/dist/chunks/cli-0.6.2-gjc0cfpe.mjs +2 -0
- package/dist/chunks/cli-0.6.2-gjcarfd4.mjs +2 -0
- package/dist/chunks/cli-0.6.2-gqbd9ax6.mjs +2 -0
- package/dist/chunks/cli-0.6.2-grf75vb7.mjs +2 -0
- package/dist/chunks/cli-0.6.2-h18w4nmy.mjs +2 -0
- package/dist/chunks/cli-0.6.2-h72p44ws.mjs +24 -0
- package/dist/chunks/cli-0.6.2-ha8qy3b0.mjs +2 -0
- package/dist/chunks/cli-0.6.2-hhjx89cr.mjs +193 -0
- package/dist/chunks/cli-0.6.2-hhyenxhe.mjs +2 -0
- package/dist/chunks/cli-0.6.2-hp1pwe62.mjs +2 -0
- package/dist/chunks/cli-0.6.2-hqmcear6.mjs +2 -0
- package/dist/chunks/cli-0.6.2-hs0y8na1.mjs +34 -0
- package/dist/chunks/cli-0.6.2-j05kmd43.mjs +2 -0
- package/dist/chunks/cli-0.6.2-j1nazgzc.mjs +2 -0
- package/dist/chunks/cli-0.6.2-jgh80hr1.mjs +2 -0
- package/dist/chunks/cli-0.6.2-jrb4f391.mjs +15 -0
- package/dist/chunks/cli-0.6.2-jrpted0b.mjs +2 -0
- package/dist/chunks/cli-0.6.2-jv7awz9n.mjs +2 -0
- package/dist/chunks/cli-0.6.2-k56bbmdp.mjs +2 -0
- package/dist/chunks/cli-0.6.2-k9v931hm.mjs +2 -0
- package/dist/chunks/cli-0.6.2-kbz4gdv0.mjs +2 -0
- package/dist/chunks/cli-0.6.2-kcf9h23h.mjs +2 -0
- package/dist/chunks/cli-0.6.2-kk5rmpf2.mjs +4 -0
- package/dist/chunks/cli-0.6.2-ky1drj50.mjs +2 -0
- package/dist/chunks/cli-0.6.2-mabejxsw.mjs +4 -0
- package/dist/chunks/cli-0.6.2-majp93c4.mjs +2 -0
- package/dist/chunks/cli-0.6.2-mqcsy5k1.mjs +2 -0
- package/dist/chunks/cli-0.6.2-n4v3wxhj.mjs +3 -0
- package/dist/chunks/cli-0.6.2-n9610c8k.mjs +2 -0
- package/dist/chunks/cli-0.6.2-ntj0k6z8.mjs +2 -0
- package/dist/chunks/cli-0.6.2-nw08h6z2.mjs +2 -0
- package/dist/chunks/cli-0.6.2-nwzye174.mjs +2 -0
- package/dist/chunks/cli-0.6.2-p0jszyht.mjs +3 -0
- package/dist/chunks/cli-0.6.2-p6w7n0bx.mjs +58 -0
- package/dist/chunks/cli-0.6.2-ptm65j7w.mjs +2 -0
- package/dist/chunks/cli-0.6.2-q45wdma3.mjs +3 -0
- package/dist/chunks/cli-0.6.2-q4pmjk86.mjs +2 -0
- package/dist/chunks/cli-0.6.2-qa6qbf36.mjs +2 -0
- package/dist/chunks/cli-0.6.2-qec7nrgw.mjs +2 -0
- package/dist/chunks/cli-0.6.2-qezxrvkk.mjs +2 -0
- package/dist/chunks/cli-0.6.2-qkzrj9jv.mjs +2 -0
- package/dist/chunks/cli-0.6.2-qpnzszt1.mjs +2 -0
- package/dist/chunks/cli-0.6.2-r4p904h3.mjs +67 -0
- package/dist/chunks/cli-0.6.2-r7j7h4hj.mjs +2 -0
- package/dist/chunks/cli-0.6.2-rde30n8x.mjs +2 -0
- package/dist/chunks/cli-0.6.2-rdfwysaf.mjs +2 -0
- package/dist/chunks/cli-0.6.2-red287ya.mjs +2 -0
- package/dist/chunks/cli-0.6.2-rjqa4vcn.mjs +2 -0
- package/dist/chunks/cli-0.6.2-rkp36r0y.mjs +2 -0
- package/dist/chunks/cli-0.6.2-rpxhzchp.mjs +17 -0
- package/dist/chunks/cli-0.6.2-rsw5s54e.mjs +24 -0
- package/dist/chunks/cli-0.6.2-s3xefpk2.mjs +2 -0
- package/dist/chunks/cli-0.6.2-s73x3nqc.mjs +2 -0
- package/dist/chunks/cli-0.6.2-sb3gjggk.mjs +2 -0
- package/dist/chunks/cli-0.6.2-sbjpxvg6.mjs +2 -0
- package/dist/chunks/cli-0.6.2-sbvnj6xm.mjs +2 -0
- package/dist/chunks/cli-0.6.2-sr4xyjmx.mjs +133 -0
- package/dist/chunks/cli-0.6.2-st7jwd3e.mjs +2 -0
- package/dist/chunks/cli-0.6.2-t038jmme.mjs +3 -0
- package/dist/chunks/cli-0.6.2-t3e59m32.mjs +2 -0
- package/dist/chunks/cli-0.6.2-t74yr8e7.mjs +2 -0
- package/dist/chunks/cli-0.6.2-t8yezjtz.mjs +2 -0
- package/dist/chunks/cli-0.6.2-tbbfz84c.mjs +2 -0
- package/dist/chunks/cli-0.6.2-tqq6q5x7.mjs +2 -0
- package/dist/chunks/cli-0.6.2-tqt8xgww.mjs +50 -0
- package/dist/chunks/cli-0.6.2-v1hjbt4b.mjs +20 -0
- package/dist/chunks/cli-0.6.2-v9brbf1x.mjs +2 -0
- package/dist/chunks/cli-0.6.2-vfdaj8xa.mjs +2 -0
- package/dist/chunks/cli-0.6.2-vg43sy4j.mjs +2 -0
- package/dist/chunks/cli-0.6.2-vqas2mhg.mjs +2 -0
- package/dist/chunks/cli-0.6.2-vqt5hqzr.mjs +2 -0
- package/dist/chunks/cli-0.6.2-vrv3r8v9.mjs +18 -0
- package/dist/chunks/cli-0.6.2-vys7e4x0.mjs +2 -0
- package/dist/chunks/cli-0.6.2-w0nwtgnn.mjs +3 -0
- package/dist/chunks/cli-0.6.2-w9trxbjc.mjs +2 -0
- package/dist/chunks/cli-0.6.2-wbg54yyk.mjs +2 -0
- package/dist/chunks/cli-0.6.2-wdtqrg29.mjs +12 -0
- package/dist/chunks/cli-0.6.2-wryj4wnr.mjs +2 -0
- package/dist/chunks/cli-0.6.2-x7zpbnzj.mjs +2 -0
- package/dist/chunks/cli-0.6.2-xnn1c5kd.mjs +18 -0
- package/dist/chunks/cli-0.6.2-y8g2xkqa.mjs +2 -0
- package/dist/chunks/cli-0.6.2-yep449sd.mjs +17 -0
- package/dist/chunks/cli-0.6.2-yjbsdf10.mjs +2 -0
- package/dist/chunks/cli-0.6.2-ymnp9sv9.mjs +2 -0
- package/dist/chunks/cli-0.6.2-ynamhrtk.mjs +4 -0
- package/dist/chunks/cli-0.6.2-yysvdabq.mjs +2 -0
- package/dist/chunks/cli-0.6.2-z00mtdgp.mjs +4 -0
- package/dist/chunks/cli-0.6.2-z1njvrn7.mjs +3 -0
- package/dist/chunks/cli-0.6.2-z2ftrcke.mjs +4 -0
- package/dist/chunks/cli-0.6.2-z3vr6hxb.mjs +2 -0
- package/dist/chunks/cli-0.6.2-z9kadqm6.mjs +18 -0
- package/dist/chunks/cli-0.6.2-zaahyems.mjs +2 -0
- package/dist/chunks/cli-0.6.2-zftyh47j.mjs +2 -0
- package/dist/chunks/cli-0.6.2-zqj8dk7m.mjs +2 -0
- package/dist/chunks/cli-0.6.2-zs4qp487.mjs +2 -0
- package/dist/chunks/client-0.6.2-8b0s065m.mjs +1 -0
- package/dist/chunks/color-0.6.2-jza3jez4.mjs +1 -0
- package/dist/chunks/compact-0.6.2-2jy7t4f4.mjs +3 -0
- package/dist/chunks/config-0.6.2-qjwjrd75.mjs +1 -0
- package/dist/chunks/config-0.6.2-xac3sjb7.mjs +1 -0
- package/dist/chunks/constants-0.6.2-gwzfwz81.mjs +1 -0
- package/dist/chunks/context-0.6.2-w965073f.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.6.2-fcjaexgs.mjs +1 -0
- package/dist/chunks/conversation-0.6.2-19c4vdvz.mjs +1 -0
- package/dist/chunks/copilotHeaders-0.6.2-pad0tejv.mjs +1 -0
- package/dist/chunks/copy-0.6.2-p4jw9gbt.mjs +9 -0
- package/dist/chunks/cost-0.6.2-vhwgeqym.mjs +1 -0
- package/dist/chunks/createSSHSession-0.6.2-j2yf2qm6.mjs +1 -0
- package/dist/chunks/createSession-0.6.2-axgp009k.mjs +1 -0
- package/dist/chunks/debug-0.6.2-g2n0fqva.mjs +1 -0
- package/dist/chunks/defaultActionDeps-0.6.2-28650cn6.mjs +1365 -0
- package/dist/chunks/desktop-0.6.2-g4c5xzgr.mjs +1 -0
- package/dist/chunks/detectRepository-0.6.2-d1chqsq7.mjs +1 -0
- package/dist/chunks/detection-0.6.2-rtsr38x3.mjs +1 -0
- package/dist/chunks/diff-0.6.2-md180qh9.mjs +1 -0
- package/dist/chunks/doctor-0.6.2-g7yz0erc.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-0.6.2-a82fkq4t.mjs +1 -0
- package/dist/chunks/earlyInput-0.6.2-7j71psy0.mjs +1 -0
- package/dist/chunks/effort-0.6.2-n6mb1qca.mjs +10 -0
- package/dist/chunks/envUtils-0.6.2-cgk2t66d.mjs +1 -0
- package/dist/chunks/environmentSelection-0.6.2-jxz6pef4.mjs +1 -0
- package/dist/chunks/environments-0.6.2-fe197syt.mjs +1 -0
- package/dist/chunks/errors-0.6.2-qwc8na5z.mjs +1 -0
- package/dist/chunks/exampleCommands-0.6.2-ts5qp1zd.mjs +1 -0
- package/dist/chunks/exit-0.6.2-ejt9v4r5.mjs +1 -0
- package/dist/chunks/export-0.6.2-7xzrp9f7.mjs +2 -0
- package/dist/chunks/extra-usage-0.6.2-4xbsq144.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.6.2-dbw7cdb9.mjs +1 -0
- package/dist/chunks/fast-0.6.2-trs3hdhf.mjs +1 -0
- package/dist/chunks/feedback-0.6.2-ssmy63tw.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-0.6.2-8h0fye4z.mjs +1 -0
- package/dist/chunks/git-0.6.2-nt9s7t3d.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.6.2-24hacezm.mjs +1 -0
- package/dist/chunks/goal-0.6.2-y7sqebpb.mjs +4 -0
- package/dist/chunks/grove-0.6.2-a2wgccag.mjs +1 -0
- package/dist/chunks/growthbook-0.6.2-0rhkaa7d.mjs +1 -0
- package/dist/chunks/headless-0.6.2-mqs7zsvy.mjs +2 -0
- package/dist/chunks/heapdump-0.6.2-4n8atcks.mjs +6 -0
- package/dist/chunks/help-0.6.2-c49svpae.mjs +1 -0
- package/dist/chunks/hookChains-0.6.2-44ps20xa.mjs +3 -0
- package/dist/chunks/hooks-0.6.2-27hpvpxf.mjs +1 -0
- package/dist/chunks/hooks-0.6.2-7ze1m2wq.mjs +79 -0
- package/dist/chunks/ide-0.6.2-4v9fdhr6.mjs +3 -0
- package/dist/chunks/image-processor-napi-0.6.2-a92myehv.mjs +1 -0
- package/dist/chunks/index-0.6.2-1kk3erm5.mjs +9 -0
- package/dist/chunks/index-0.6.2-21nak3ad.mjs +1 -0
- package/dist/chunks/index-0.6.2-2vns8v9p.mjs +1 -0
- package/dist/chunks/index-0.6.2-2wg5fkyq.mjs +1 -0
- package/dist/chunks/index-0.6.2-3g92ew8z.mjs +1 -0
- package/dist/chunks/index-0.6.2-4wsxzfzg.mjs +1 -0
- package/dist/chunks/index-0.6.2-88m8k4cp.mjs +1 -0
- package/dist/chunks/index-0.6.2-93bh3w93.mjs +1 -0
- package/dist/chunks/index-0.6.2-9e0qz384.mjs +1 -0
- package/dist/chunks/index-0.6.2-emm65q8h.mjs +17 -0
- package/dist/chunks/index-0.6.2-ff57yvh3.mjs +1 -0
- package/dist/chunks/index-0.6.2-g6xy97jv.mjs +1 -0
- package/dist/chunks/index-0.6.2-h37g7n0s.mjs +9 -0
- package/dist/chunks/index-0.6.2-h8jkf613.mjs +5 -0
- package/dist/chunks/index-0.6.2-jcsv5kp3.mjs +1 -0
- package/dist/chunks/index-0.6.2-jw83xhc8.mjs +2 -0
- package/dist/chunks/index-0.6.2-mehn31e3.mjs +30 -0
- package/dist/chunks/index-0.6.2-naw1d8mg.mjs +2 -0
- package/dist/chunks/index-0.6.2-qjs3rrrc.mjs +1 -0
- package/dist/chunks/index-0.6.2-qn0re7sj.mjs +1 -0
- package/dist/chunks/index-0.6.2-tftj6wdh.mjs +1 -0
- package/dist/chunks/index-0.6.2-ww1qy3cg.mjs +1 -0
- package/dist/chunks/init-0.6.2-47k2caay.mjs +1 -0
- package/dist/chunks/initReplBridge-0.6.2-sn29sxg9.mjs +1 -0
- package/dist/chunks/ink-0.6.2-dhg7s7qq.mjs +1 -0
- package/dist/chunks/insights-0.6.2-st861yg4.mjs +870 -0
- package/dist/chunks/install-0.6.2-webkhwz9.mjs +1 -0
- package/dist/chunks/install-github-app-0.6.2-dyf38saf.mjs +149 -0
- package/dist/chunks/install-slack-app-0.6.2-mkhq39jq.mjs +1 -0
- package/dist/chunks/instrumentation-0.6.2-8enws6w1.mjs +1 -0
- package/dist/chunks/interactiveHelpers-0.6.2-h3c63932.mjs +1 -0
- package/dist/chunks/keybindings-0.6.2-b4h5gr36.mjs +2 -0
- package/dist/chunks/knowledge-0.6.2-r7wzchg7.mjs +2 -0
- package/dist/chunks/latestVersionCache-0.6.2-29wtfvgy.mjs +1 -0
- package/dist/chunks/loadAgentsDir-0.6.2-6tmzy9fs.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.6.2-1qx97351.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.6.2-c4wpqz2j.mjs +1 -0
- package/dist/chunks/log-0.6.2-h02k5q0p.mjs +1 -0
- package/dist/chunks/main-0.6.2-51xvrsbq.mjs +1 -0
- package/dist/chunks/managedEnv-0.6.2-ma1dx63x.mjs +1 -0
- package/dist/chunks/mcp-0.6.2-j3m0e0bk.mjs +17 -0
- package/dist/chunks/mcp-0.6.2-n8yv335k.mjs +4 -0
- package/dist/chunks/mcp-0.6.2-zebf4vwt.mjs +1 -0
- package/dist/chunks/mcpb-0.6.2-egn2wk5t.mjs +1 -0
- package/dist/chunks/memory-0.6.2-vy2ka09s.mjs +3 -0
- package/dist/chunks/mobile-0.6.2-s8f6z7dq.mjs +2 -0
- package/dist/chunks/model-0.6.2-49f9g2vz.mjs +2 -0
- package/dist/chunks/model-0.6.2-pcd5ta0c.mjs +1 -0
- package/dist/chunks/node-0.6.2-40bknjza.mjs +12 -0
- package/dist/chunks/oauth-0.6.2-newhjxdv.mjs +1 -0
- package/dist/chunks/openaiShim-0.6.2-rjs9w27t.mjs +14 -0
- package/dist/chunks/output-style-0.6.2-n76v4e26.mjs +1 -0
- package/dist/chunks/package-D6422PQU-0.6.2-cymw10eg.mjs +1 -0
- package/dist/chunks/parseConnectUrl-0.6.2-qy2dp99f.mjs +1 -0
- package/dist/chunks/parser-0.6.2-xgg5gh3g.mjs +1 -0
- package/dist/chunks/passes-0.6.2-kadygcw6.mjs +1 -0
- package/dist/chunks/permissions-0.6.2-hv22h5gm.mjs +3 -0
- package/dist/chunks/plan-0.6.2-hzbsezab.mjs +1 -0
- package/dist/chunks/plist-0.6.2-hkq2x0x5.mjs +1 -0
- package/dist/chunks/plugin-0.6.2-pr48413e.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.6.2-zfb8qack.mjs +1 -0
- package/dist/chunks/plugins-0.6.2-hx8jrngg.mjs +9 -0
- package/dist/chunks/preActionHook-0.6.2-pac7p55h.mjs +2 -0
- package/dist/chunks/print-0.6.2-ng7p0m66.mjs +57 -0
- package/dist/chunks/privacy-settings-0.6.2-awj1k33j.mjs +1 -0
- package/dist/chunks/process-0.6.2-7k26fk4b.mjs +1 -0
- package/dist/chunks/processBashCommand-0.6.2-379q2wr4.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.6.2-7zk4c0n0.mjs +9 -0
- package/dist/chunks/prompt-0.6.2-c2vevj59.mjs +1 -0
- package/dist/chunks/prompt-0.6.2-szkc5jgm.mjs +1 -0
- package/dist/chunks/prompts-0.6.2-s8z9fmgq.mjs +1 -0
- package/dist/chunks/protocolHandler-0.6.2-wc5pcv21.mjs +13 -0
- package/dist/chunks/provider-0.6.2-nbcrfwt5.mjs +2 -0
- package/dist/chunks/providerProfiles-0.6.2-r9j184kz.mjs +1 -0
- package/dist/chunks/providerValidation-0.6.2-4h7yr0x2.mjs +6 -0
- package/dist/chunks/rate-limit-options-0.6.2-dbvvmtas.mjs +1 -0
- package/dist/chunks/registerSubcommands-0.6.2-w8y8efwa.mjs +34 -0
- package/dist/chunks/registry-0.6.2-8xcdw66w.mjs +1 -0
- package/dist/chunks/release-notes-0.6.2-xtnhsjps.mjs +5 -0
- package/dist/chunks/reload-plugins-0.6.2-hhgdgy2j.mjs +2 -0
- package/dist/chunks/remote-env-0.6.2-9tdvzj0q.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.6.2-y9spfxbw.mjs +1 -0
- package/dist/chunks/remoteSession-0.6.2-pb3185rt.mjs +1 -0
- package/dist/chunks/rename-0.6.2-z5pwd75p.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.6.2-epcyvrf1.mjs +1 -0
- package/dist/chunks/replLauncher-0.6.2-yk4q9w0s.mjs +1 -0
- package/dist/chunks/resume-0.6.2-wwmdq5gh.mjs +2 -0
- package/dist/chunks/rewind-0.6.2-keb5hdgr.mjs +1 -0
- package/dist/chunks/rootOptions-0.6.2-hprbxscd.mjs +1 -0
- package/dist/chunks/sandbox-adapter-0.6.2-4ntc8ewv.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.6.2-5zdhe1qf.mjs +1 -0
- package/dist/chunks/session-0.6.2-k41jbqwf.mjs +2 -0
- package/dist/chunks/sessionDiscovery-0.6.2-x9rwtkey.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-0.6.2-0ska7d2r.mjs +1 -0
- package/dist/chunks/sessionStorage-0.6.2-0brgsadt.mjs +1 -0
- package/dist/chunks/settings-0.6.2-cgwa4c0s.mjs +1 -0
- package/dist/chunks/setup-0.6.2-vqm3xhrr.mjs +5 -0
- package/dist/chunks/sinks-0.6.2-p6ftcdrs.mjs +1 -0
- package/dist/chunks/skills-0.6.2-87j1kdxj.mjs +1 -0
- package/dist/chunks/startupProfiler-0.6.2-173hw815.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-0.6.2-4364mejf.mjs +1 -0
- package/dist/chunks/state-0.6.2-nymhw7ey.mjs +1 -0
- package/dist/chunks/stats-0.6.2-skm9nakv.mjs +6 -0
- package/dist/chunks/status-0.6.2-wfm0ahb8.mjs +1 -0
- package/dist/chunks/stickers-0.6.2-nze85ck5.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.6.2-vktss3j3.mjs +1 -0
- package/dist/chunks/tasks-0.6.2-hfy99qn9.mjs +1 -0
- package/dist/chunks/teamHelpers-0.6.2-ep254ybc.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.6.2-ecyswt3z.mjs +1 -0
- package/dist/chunks/teleport-0.6.2-ve5pmdye.mjs +1 -0
- package/dist/chunks/terminalSetup-0.6.2-wxnysmg4.mjs +1 -0
- package/dist/chunks/theme-0.6.2-r6cak2qv.mjs +1 -0
- package/dist/chunks/thinkback-0.6.2-9svbgrtq.mjs +1 -0
- package/dist/chunks/thinkback-play-0.6.2-22rfv6x5.mjs +1 -0
- package/dist/chunks/toolPool-0.6.2-znz9vm50.mjs +1 -0
- package/dist/chunks/toolSearch-0.6.2-nsf80s0q.mjs +1 -0
- package/dist/chunks/tools-0.6.2-wcxfbgtv.mjs +1 -0
- package/dist/chunks/trustedDevice-0.6.2-ab0ftpnm.mjs +1 -0
- package/dist/chunks/turndown.cjs-0.6.2-g0zf33kq.mjs +69 -0
- package/dist/chunks/ultrareviewCommand-0.6.2-8c0jzztb.mjs +4 -0
- package/dist/chunks/update-0.6.2-p8edrwg4.mjs +86 -0
- package/dist/chunks/upgrade-0.6.2-wkscvr1z.mjs +1 -0
- package/dist/chunks/upstreamproxy-0.6.2-0bdt5gtr.mjs +14 -0
- package/dist/chunks/url-handler-napi-0.6.2-rgywhzs5.mjs +1 -0
- package/dist/chunks/usage-0.6.2-mkckbqy2.mjs +1 -0
- package/dist/chunks/util-0.6.2-yet75ms4.mjs +1 -0
- package/dist/chunks/utils-0.6.2-pedaa5s8.mjs +1 -0
- package/dist/chunks/vim-0.6.2-m8vm39s8.mjs +1 -0
- package/dist/chunks/watcher-0.6.2-apxj1t3y.mjs +1 -0
- package/dist/chunks/wiki-0.6.2-wztzwvgx.mjs +132 -0
- package/dist/chunks/worktree-0.6.2-jvbqmswq.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.6.2-bq8z3zp7.mjs +1 -0
- package/dist/chunks/wrapper-0.6.2-wwg8e756.mjs +7 -0
- package/dist/claudin-vscode.vsix +0 -0
- package/dist/cli.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunks/AgentTool-0.6.0-8f3qtrj8.mjs +0 -1
- package/dist/chunks/App-0.6.0-9n7fg3v4.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.6.0-egkvq84f.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-0.6.0-30jea1bv.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.6.0-3kcrm51e.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.6.0-ynatyfe7.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.6.0-bfvx8vyr.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.6.0-ta5bxsqc.mjs +0 -1
- package/dist/chunks/DiffDialog-0.6.0-cw7k3rhz.mjs +0 -3
- package/dist/chunks/Doctor-0.6.0-w85vn7cp.mjs +0 -1
- package/dist/chunks/Grove-0.6.0-8pzwxvxy.mjs +0 -1
- package/dist/chunks/ITermBackend-0.6.0-ccznb0th.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.6.0-0za8mmqc.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.6.0-mvr8g3r7.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.6.0-8r6844g6.mjs +0 -1
- package/dist/chunks/Onboarding-0.6.0-s775c4cr.mjs +0 -1
- package/dist/chunks/ProviderManager-0.6.0-xgf5m2wn.mjs +0 -1
- package/dist/chunks/REPL-0.6.0-z46m261k.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.6.0-4njrwnw3.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-0.6.0-1aanznj9.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.6.0-ddvkc0ya.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.6.0-r86b0jdg.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.6.0-m20qbr0e.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.6.0-qb88j55p.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.6.0-v8recgw0.mjs +0 -1
- package/dist/chunks/TrustDialog-0.6.0-tdfv8cqs.mjs +0 -1
- package/dist/chunks/activeProvider-0.6.0-ajzxc1d4.mjs +0 -1
- package/dist/chunks/add-dir-0.6.0-e8scpyaj.mjs +0 -1
- package/dist/chunks/agents-0.6.0-69xm47ft.mjs +0 -3
- package/dist/chunks/agents-0.6.0-8m3ze781.mjs +0 -110
- package/dist/chunks/api-0.6.0-3cymw2a4.mjs +0 -1
- package/dist/chunks/asciicast-0.6.0-mz8jmcqs.mjs +0 -1
- package/dist/chunks/assistant-0.6.0-qf4d0nt8.mjs +0 -1
- package/dist/chunks/auth-0.6.0-6j97pezz.mjs +0 -1
- package/dist/chunks/auth-0.6.0-hkthtnfk.mjs +0 -1
- package/dist/chunks/autoMode-0.6.0-82td4ejn.mjs +0 -48
- package/dist/chunks/autoUpdater-0.6.0-4rrgwmxf.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.6.0-j2hd827a.mjs +0 -1
- package/dist/chunks/branch-0.6.0-rnjgfgek.mjs +0 -4
- package/dist/chunks/bridgePointer-0.6.0-4pp7berq.mjs +0 -1
- package/dist/chunks/btw-0.6.0-9pm632qb.mjs +0 -1
- package/dist/chunks/buddy-0.6.0-zyreaya9.mjs +0 -3
- package/dist/chunks/cacache-0.6.0-mhcyz322.mjs +0 -1
- package/dist/chunks/cache-probe-0.6.0-2m2g30sy.mjs +0 -21
- package/dist/chunks/cacheStats-0.6.0-mzcbqxz0.mjs +0 -4
- package/dist/chunks/caches-0.6.0-x8ev20m0.mjs +0 -1
- package/dist/chunks/claudeDesktop-0.6.0-66prcdq2.mjs +0 -1
- package/dist/chunks/claudemd-0.6.0-t41nj06r.mjs +0 -1
- package/dist/chunks/clear-0.6.0-g494jnyj.mjs +0 -1
- package/dist/chunks/clearTerminal-0.6.0-3d2y2snk.mjs +0 -1
- package/dist/chunks/cli-0.6.0-0ck8d1xf.mjs +0 -3
- package/dist/chunks/cli-0.6.0-0kx1hnqt.mjs +0 -2
- package/dist/chunks/cli-0.6.0-0p3mkd59.mjs +0 -2
- package/dist/chunks/cli-0.6.0-0yb835ch.mjs +0 -2
- package/dist/chunks/cli-0.6.0-1b6rqyjf.mjs +0 -2
- package/dist/chunks/cli-0.6.0-1bpa9gj3.mjs +0 -2
- package/dist/chunks/cli-0.6.0-1bzempk2.mjs +0 -12
- package/dist/chunks/cli-0.6.0-1cfghz45.mjs +0 -20
- package/dist/chunks/cli-0.6.0-1d77dayv.mjs +0 -2
- package/dist/chunks/cli-0.6.0-1hxw8522.mjs +0 -2
- package/dist/chunks/cli-0.6.0-1jem05z7.mjs +0 -45
- package/dist/chunks/cli-0.6.0-1zce7bz0.mjs +0 -17
- package/dist/chunks/cli-0.6.0-27pnyd8x.mjs +0 -2
- package/dist/chunks/cli-0.6.0-295jdx7b.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2age3kgh.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2bbdcxda.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2c7skznf.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2gsntzzv.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2h139nq7.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2k2xxr4j.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2kvggf16.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2m8k6622.mjs +0 -18
- package/dist/chunks/cli-0.6.0-2m9w0jtx.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2qtnp6rz.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2z14r3n7.mjs +0 -2
- package/dist/chunks/cli-0.6.0-2ztxr2t5.mjs +0 -2
- package/dist/chunks/cli-0.6.0-32mypc03.mjs +0 -4
- package/dist/chunks/cli-0.6.0-363zfcx9.mjs +0 -2
- package/dist/chunks/cli-0.6.0-3jwfajtd.mjs +0 -2
- package/dist/chunks/cli-0.6.0-3kbabt72.mjs +0 -2
- package/dist/chunks/cli-0.6.0-3kxxj2zn.mjs +0 -2
- package/dist/chunks/cli-0.6.0-3m7j40bv.mjs +0 -2
- package/dist/chunks/cli-0.6.0-3ns7jd71.mjs +0 -2
- package/dist/chunks/cli-0.6.0-3qpvyrpf.mjs +0 -16
- package/dist/chunks/cli-0.6.0-3sdh6b3v.mjs +0 -2
- package/dist/chunks/cli-0.6.0-3wr1g3r3.mjs +0 -2
- package/dist/chunks/cli-0.6.0-4fzxnfth.mjs +0 -2
- package/dist/chunks/cli-0.6.0-4ks8fpx1.mjs +0 -2
- package/dist/chunks/cli-0.6.0-592v9jcz.mjs +0 -2
- package/dist/chunks/cli-0.6.0-59hncecf.mjs +0 -17
- package/dist/chunks/cli-0.6.0-5bjsew2k.mjs +0 -2
- package/dist/chunks/cli-0.6.0-5m6h57jc.mjs +0 -18
- package/dist/chunks/cli-0.6.0-5zykg2fc.mjs +0 -2
- package/dist/chunks/cli-0.6.0-60ma2ekn.mjs +0 -2
- package/dist/chunks/cli-0.6.0-60q6k4k3.mjs +0 -3
- package/dist/chunks/cli-0.6.0-6tdctbcr.mjs +0 -2
- package/dist/chunks/cli-0.6.0-6w72esaf.mjs +0 -3
- package/dist/chunks/cli-0.6.0-76c1zq6n.mjs +0 -2
- package/dist/chunks/cli-0.6.0-7m760mbp.mjs +0 -2
- package/dist/chunks/cli-0.6.0-7qw68ehh.mjs +0 -2
- package/dist/chunks/cli-0.6.0-7qwx1xwm.mjs +0 -2
- package/dist/chunks/cli-0.6.0-7s0k6nw0.mjs +0 -12
- package/dist/chunks/cli-0.6.0-7shwamwq.mjs +0 -4
- package/dist/chunks/cli-0.6.0-855c2tef.mjs +0 -2
- package/dist/chunks/cli-0.6.0-8kh9rbvn.mjs +0 -2
- package/dist/chunks/cli-0.6.0-8meqksnp.mjs +0 -9
- package/dist/chunks/cli-0.6.0-8xf2xpy3.mjs +0 -3
- package/dist/chunks/cli-0.6.0-8zczwtyv.mjs +0 -2
- package/dist/chunks/cli-0.6.0-91exkfnc.mjs +0 -2
- package/dist/chunks/cli-0.6.0-97d3zsj0.mjs +0 -2
- package/dist/chunks/cli-0.6.0-9faq31pe.mjs +0 -4
- package/dist/chunks/cli-0.6.0-9gnppzfq.mjs +0 -133
- package/dist/chunks/cli-0.6.0-9qdj830c.mjs +0 -4
- package/dist/chunks/cli-0.6.0-9rq760gd.mjs +0 -2
- package/dist/chunks/cli-0.6.0-9rxskyst.mjs +0 -5
- package/dist/chunks/cli-0.6.0-a21pffqx.mjs +0 -2
- package/dist/chunks/cli-0.6.0-a62vvs4t.mjs +0 -2
- package/dist/chunks/cli-0.6.0-a7h4zkhn.mjs +0 -15
- package/dist/chunks/cli-0.6.0-aqestr3c.mjs +0 -193
- package/dist/chunks/cli-0.6.0-awtw1t27.mjs +0 -2
- package/dist/chunks/cli-0.6.0-b6tgentw.mjs +0 -2
- package/dist/chunks/cli-0.6.0-bca4nx7y.mjs +0 -4
- package/dist/chunks/cli-0.6.0-bg7yq5wg.mjs +0 -2
- package/dist/chunks/cli-0.6.0-bjyadvf4.mjs +0 -2
- package/dist/chunks/cli-0.6.0-c1a6kyzf.mjs +0 -2
- package/dist/chunks/cli-0.6.0-c1hzx5ft.mjs +0 -2
- package/dist/chunks/cli-0.6.0-c6nqbf3d.mjs +0 -3
- package/dist/chunks/cli-0.6.0-caxz9dgf.mjs +0 -2
- package/dist/chunks/cli-0.6.0-d3wk9en8.mjs +0 -2
- package/dist/chunks/cli-0.6.0-d4v4gc51.mjs +0 -2
- package/dist/chunks/cli-0.6.0-da98vnek.mjs +0 -3
- package/dist/chunks/cli-0.6.0-db9z8rd6.mjs +0 -2
- package/dist/chunks/cli-0.6.0-dsrnkn8r.mjs +0 -2
- package/dist/chunks/cli-0.6.0-dsykmkkh.mjs +0 -2
- package/dist/chunks/cli-0.6.0-dxwdyaw3.mjs +0 -2
- package/dist/chunks/cli-0.6.0-e05hymmk.mjs +0 -2
- package/dist/chunks/cli-0.6.0-e8a59m32.mjs +0 -2
- package/dist/chunks/cli-0.6.0-f7y1nm61.mjs +0 -4
- package/dist/chunks/cli-0.6.0-f8va1ddb.mjs +0 -2
- package/dist/chunks/cli-0.6.0-fdfhshmm.mjs +0 -3
- package/dist/chunks/cli-0.6.0-fg2kp9t9.mjs +0 -2
- package/dist/chunks/cli-0.6.0-fx65e0yv.mjs +0 -2
- package/dist/chunks/cli-0.6.0-fzxv7yps.mjs +0 -2
- package/dist/chunks/cli-0.6.0-g60zf7ra.mjs +0 -2
- package/dist/chunks/cli-0.6.0-g61jvwe5.mjs +0 -2
- package/dist/chunks/cli-0.6.0-g7exm24t.mjs +0 -3
- package/dist/chunks/cli-0.6.0-gaakjhm0.mjs +0 -2
- package/dist/chunks/cli-0.6.0-gassmthg.mjs +0 -2
- package/dist/chunks/cli-0.6.0-gec8yt9j.mjs +0 -2
- package/dist/chunks/cli-0.6.0-gjcmv34x.mjs +0 -4
- package/dist/chunks/cli-0.6.0-gw1zy408.mjs +0 -2
- package/dist/chunks/cli-0.6.0-h0z5ygw4.mjs +0 -2
- package/dist/chunks/cli-0.6.0-h88zf9sp.mjs +0 -2
- package/dist/chunks/cli-0.6.0-hchy51xn.mjs +0 -15
- package/dist/chunks/cli-0.6.0-hf8fw0bb.mjs +0 -2
- package/dist/chunks/cli-0.6.0-hms5fdyd.mjs +0 -2
- package/dist/chunks/cli-0.6.0-hraw3dez.mjs +0 -2
- package/dist/chunks/cli-0.6.0-hwes2c0w.mjs +0 -6
- package/dist/chunks/cli-0.6.0-hxhwjzmm.mjs +0 -34
- package/dist/chunks/cli-0.6.0-j4gvgd8r.mjs +0 -7
- package/dist/chunks/cli-0.6.0-j5r9tdmt.mjs +0 -50
- package/dist/chunks/cli-0.6.0-jb17xpd5.mjs +0 -2
- package/dist/chunks/cli-0.6.0-jfft7zdk.mjs +0 -67
- package/dist/chunks/cli-0.6.0-jpsf0t8a.mjs +0 -9
- package/dist/chunks/cli-0.6.0-js1fe4hv.mjs +0 -2
- package/dist/chunks/cli-0.6.0-k8qnaskd.mjs +0 -8
- package/dist/chunks/cli-0.6.0-kr9jt2p9.mjs +0 -6
- package/dist/chunks/cli-0.6.0-kvv5zw54.mjs +0 -5
- package/dist/chunks/cli-0.6.0-m47zataq.mjs +0 -2
- package/dist/chunks/cli-0.6.0-mkca0jw4.mjs +0 -2
- package/dist/chunks/cli-0.6.0-mmmmpmp3.mjs +0 -2
- package/dist/chunks/cli-0.6.0-mmp6g96h.mjs +0 -2
- package/dist/chunks/cli-0.6.0-mqdfskgd.mjs +0 -2
- package/dist/chunks/cli-0.6.0-mvv5jvw3.mjs +0 -2
- package/dist/chunks/cli-0.6.0-ndxtcmnz.mjs +0 -2
- package/dist/chunks/cli-0.6.0-npjb4qxf.mjs +0 -3
- package/dist/chunks/cli-0.6.0-npxj2hv4.mjs +0 -2
- package/dist/chunks/cli-0.6.0-nxpvznpz.mjs +0 -4
- package/dist/chunks/cli-0.6.0-nzqrvkwj.mjs +0 -58
- package/dist/chunks/cli-0.6.0-p3kytvrk.mjs +0 -42
- package/dist/chunks/cli-0.6.0-pbegwent.mjs +0 -2
- package/dist/chunks/cli-0.6.0-pk4x582t.mjs +0 -2
- package/dist/chunks/cli-0.6.0-pp6kfka3.mjs +0 -2
- package/dist/chunks/cli-0.6.0-pvkfx5f1.mjs +0 -2
- package/dist/chunks/cli-0.6.0-q63ry2jk.mjs +0 -2
- package/dist/chunks/cli-0.6.0-qnby905t.mjs +0 -2
- package/dist/chunks/cli-0.6.0-qzs04ar5.mjs +0 -6
- package/dist/chunks/cli-0.6.0-r3kd85yw.mjs +0 -2
- package/dist/chunks/cli-0.6.0-r5tyrw7e.mjs +0 -59
- package/dist/chunks/cli-0.6.0-r8g9yjbx.mjs +0 -4
- package/dist/chunks/cli-0.6.0-rrp10514.mjs +0 -2
- package/dist/chunks/cli-0.6.0-rvcpxnfv.mjs +0 -2
- package/dist/chunks/cli-0.6.0-rys3h8aw.mjs +0 -2
- package/dist/chunks/cli-0.6.0-rytp9dva.mjs +0 -2
- package/dist/chunks/cli-0.6.0-s2w74466.mjs +0 -15
- package/dist/chunks/cli-0.6.0-s36ckgp3.mjs +0 -2
- package/dist/chunks/cli-0.6.0-s4fa0ekw.mjs +0 -2
- package/dist/chunks/cli-0.6.0-s56fh7wm.mjs +0 -2
- package/dist/chunks/cli-0.6.0-s6hbyqbv.mjs +0 -2
- package/dist/chunks/cli-0.6.0-s7b70a0c.mjs +0 -2
- package/dist/chunks/cli-0.6.0-sa2mtczk.mjs +0 -2
- package/dist/chunks/cli-0.6.0-sd76f2sk.mjs +0 -21
- package/dist/chunks/cli-0.6.0-sh2rvpbt.mjs +0 -2
- package/dist/chunks/cli-0.6.0-ssdst17p.mjs +0 -2
- package/dist/chunks/cli-0.6.0-szxjcmcn.mjs +0 -2
- package/dist/chunks/cli-0.6.0-t2arqp0e.mjs +0 -12
- package/dist/chunks/cli-0.6.0-t91jvdfm.mjs +0 -2
- package/dist/chunks/cli-0.6.0-t93n2gev.mjs +0 -3
- package/dist/chunks/cli-0.6.0-tbe2ca49.mjs +0 -3
- package/dist/chunks/cli-0.6.0-tgc46p2a.mjs +0 -2
- package/dist/chunks/cli-0.6.0-tmwp0q7v.mjs +0 -2
- package/dist/chunks/cli-0.6.0-ttys4ffq.mjs +0 -2
- package/dist/chunks/cli-0.6.0-tz34279s.mjs +0 -3
- package/dist/chunks/cli-0.6.0-v56hqc26.mjs +0 -25
- package/dist/chunks/cli-0.6.0-v7kten40.mjs +0 -2
- package/dist/chunks/cli-0.6.0-v92kj5pr.mjs +0 -2
- package/dist/chunks/cli-0.6.0-vcvchaan.mjs +0 -2
- package/dist/chunks/cli-0.6.0-vj1q5vmq.mjs +0 -5321
- package/dist/chunks/cli-0.6.0-vrp1zbfc.mjs +0 -4
- package/dist/chunks/cli-0.6.0-vy5a76pk.mjs +0 -18
- package/dist/chunks/cli-0.6.0-vzmjmj1n.mjs +0 -133
- package/dist/chunks/cli-0.6.0-wcqzr1n7.mjs +0 -10
- package/dist/chunks/cli-0.6.0-wmt6ytdx.mjs +0 -2
- package/dist/chunks/cli-0.6.0-wnrwh53h.mjs +0 -2
- package/dist/chunks/cli-0.6.0-wz6en1nw.mjs +0 -39
- package/dist/chunks/cli-0.6.0-x7c5eyt4.mjs +0 -2
- package/dist/chunks/cli-0.6.0-xczg4s5m.mjs +0 -2
- package/dist/chunks/cli-0.6.0-xg7esvcf.mjs +0 -2
- package/dist/chunks/cli-0.6.0-xp74d7yz.mjs +0 -1
- package/dist/chunks/cli-0.6.0-xyv90m2s.mjs +0 -2
- package/dist/chunks/cli-0.6.0-xzvyqs4f.mjs +0 -24
- package/dist/chunks/cli-0.6.0-y4g2dppt.mjs +0 -2
- package/dist/chunks/cli-0.6.0-ycj7gxxz.mjs +0 -2
- package/dist/chunks/cli-0.6.0-yryz4xm4.mjs +0 -2
- package/dist/chunks/cli-0.6.0-zabvyppx.mjs +0 -2
- package/dist/chunks/cli-0.6.0-zngss8r1.mjs +0 -2
- package/dist/chunks/cli-0.6.0-zr99z1nr.mjs +0 -5
- package/dist/chunks/cli-0.6.0-zxckyy4s.mjs +0 -2
- package/dist/chunks/cli-0.6.0-zz1dfz4t.mjs +0 -24
- package/dist/chunks/client-0.6.0-djg9p1rh.mjs +0 -1
- package/dist/chunks/color-0.6.0-hpk7e2x9.mjs +0 -1
- package/dist/chunks/compact-0.6.0-gtvx4hy7.mjs +0 -3
- package/dist/chunks/config-0.6.0-f4jc8hpt.mjs +0 -1
- package/dist/chunks/config-0.6.0-jpx4jvj2.mjs +0 -1
- package/dist/chunks/constants-0.6.0-qe49df42.mjs +0 -1
- package/dist/chunks/context-0.6.0-t33461h9.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.6.0-vh1s30rr.mjs +0 -1
- package/dist/chunks/conversation-0.6.0-apb71k2e.mjs +0 -1
- package/dist/chunks/copilotHeaders-0.6.0-2apz8tq4.mjs +0 -1
- package/dist/chunks/copy-0.6.0-yfzmdd0z.mjs +0 -9
- package/dist/chunks/cost-0.6.0-qrhnvqtm.mjs +0 -1
- package/dist/chunks/createSSHSession-0.6.0-2p1n5srr.mjs +0 -1
- package/dist/chunks/createSession-0.6.0-pcy6a299.mjs +0 -1
- package/dist/chunks/debug-0.6.0-39p8tt4j.mjs +0 -1
- package/dist/chunks/defaultActionDeps-0.6.0-8bzdvszj.mjs +0 -1365
- package/dist/chunks/desktop-0.6.0-vxzr6474.mjs +0 -1
- package/dist/chunks/detectRepository-0.6.0-wvjpx2rr.mjs +0 -1
- package/dist/chunks/detection-0.6.0-8thkktsw.mjs +0 -1
- package/dist/chunks/diff-0.6.0-g8kn9exw.mjs +0 -1
- package/dist/chunks/doctor-0.6.0-dxy0j0g4.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-0.6.0-aa892edk.mjs +0 -1
- package/dist/chunks/earlyInput-0.6.0-gj3dyt0d.mjs +0 -1
- package/dist/chunks/effort-0.6.0-g5xfz2eg.mjs +0 -10
- package/dist/chunks/envUtils-0.6.0-tf4st484.mjs +0 -1
- package/dist/chunks/environmentSelection-0.6.0-r5ar2987.mjs +0 -1
- package/dist/chunks/environments-0.6.0-gec3hdz5.mjs +0 -1
- package/dist/chunks/errors-0.6.0-mf51mpgf.mjs +0 -1
- package/dist/chunks/exampleCommands-0.6.0-qg1e4vxh.mjs +0 -1
- package/dist/chunks/exit-0.6.0-xys34kqe.mjs +0 -1
- package/dist/chunks/export-0.6.0-135ccc8z.mjs +0 -2
- package/dist/chunks/extra-usage-0.6.0-aqn3jh3x.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.6.0-yw91pfe0.mjs +0 -1
- package/dist/chunks/fast-0.6.0-gw4rymz7.mjs +0 -1
- package/dist/chunks/feedback-0.6.0-j898w96j.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-0.6.0-t26jt3ej.mjs +0 -1
- package/dist/chunks/git-0.6.0-1rjgfq8r.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.6.0-ek8depe7.mjs +0 -1
- package/dist/chunks/goal-0.6.0-wdmxdemz.mjs +0 -4
- package/dist/chunks/grove-0.6.0-bge298jb.mjs +0 -1
- package/dist/chunks/growthbook-0.6.0-vkrtxrkt.mjs +0 -1
- package/dist/chunks/headless-0.6.0-kw28r6p5.mjs +0 -2
- package/dist/chunks/heapdump-0.6.0-5130r1vc.mjs +0 -6
- package/dist/chunks/help-0.6.0-krmgwd6p.mjs +0 -1
- package/dist/chunks/hookChains-0.6.0-esxa7jav.mjs +0 -3
- package/dist/chunks/hooks-0.6.0-652920vq.mjs +0 -79
- package/dist/chunks/hooks-0.6.0-tgtx7vah.mjs +0 -1
- package/dist/chunks/ide-0.6.0-j84km85e.mjs +0 -3
- package/dist/chunks/image-processor-napi-0.6.0-tyyms96b.mjs +0 -1
- package/dist/chunks/index-0.6.0-1c8mc7c5.mjs +0 -1
- package/dist/chunks/index-0.6.0-33tqx1q0.mjs +0 -1
- package/dist/chunks/index-0.6.0-4cjwvzjk.mjs +0 -2
- package/dist/chunks/index-0.6.0-8r6qtdvj.mjs +0 -2
- package/dist/chunks/index-0.6.0-9br46rw2.mjs +0 -1
- package/dist/chunks/index-0.6.0-apr64dfb.mjs +0 -1
- package/dist/chunks/index-0.6.0-e79va7fg.mjs +0 -9
- package/dist/chunks/index-0.6.0-f35c7dte.mjs +0 -1
- package/dist/chunks/index-0.6.0-fsb9nqdb.mjs +0 -1
- package/dist/chunks/index-0.6.0-gxd56xhn.mjs +0 -1
- package/dist/chunks/index-0.6.0-kbwkgp90.mjs +0 -5
- package/dist/chunks/index-0.6.0-mhvzn9h5.mjs +0 -1
- package/dist/chunks/index-0.6.0-mxm4er0h.mjs +0 -1
- package/dist/chunks/index-0.6.0-nny5a3rt.mjs +0 -30
- package/dist/chunks/index-0.6.0-nst006cq.mjs +0 -17
- package/dist/chunks/index-0.6.0-rv4pntam.mjs +0 -1
- package/dist/chunks/index-0.6.0-scwzrsg7.mjs +0 -1
- package/dist/chunks/index-0.6.0-w2djrw2s.mjs +0 -9
- package/dist/chunks/index-0.6.0-wb1ws1yr.mjs +0 -1
- package/dist/chunks/index-0.6.0-wjesenkh.mjs +0 -1
- package/dist/chunks/index-0.6.0-y9ppfz99.mjs +0 -1
- package/dist/chunks/index-0.6.0-zem7h5vp.mjs +0 -1
- package/dist/chunks/init-0.6.0-1770vy5g.mjs +0 -1
- package/dist/chunks/initReplBridge-0.6.0-z9198t8c.mjs +0 -1
- package/dist/chunks/ink-0.6.0-qwcph42h.mjs +0 -1
- package/dist/chunks/insights-0.6.0-cw0cadtm.mjs +0 -870
- package/dist/chunks/install-0.6.0-26gqe0fd.mjs +0 -1
- package/dist/chunks/install-github-app-0.6.0-afraccwz.mjs +0 -149
- package/dist/chunks/install-slack-app-0.6.0-ddv0a41d.mjs +0 -1
- package/dist/chunks/instrumentation-0.6.0-2rcak0p8.mjs +0 -1
- package/dist/chunks/interactiveHelpers-0.6.0-jxbk6fey.mjs +0 -1
- package/dist/chunks/keybindings-0.6.0-5ytp6650.mjs +0 -2
- package/dist/chunks/knowledge-0.6.0-ew766111.mjs +0 -2
- package/dist/chunks/latestVersionCache-0.6.0-yy47behr.mjs +0 -1
- package/dist/chunks/loadAgentsDir-0.6.0-80k2aj05.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.6.0-vhh7gzzn.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.6.0-ztp923sq.mjs +0 -1
- package/dist/chunks/log-0.6.0-9tz5q7ps.mjs +0 -1
- package/dist/chunks/main-0.6.0-rzx5483p.mjs +0 -1
- package/dist/chunks/managedEnv-0.6.0-vr46tva8.mjs +0 -1
- package/dist/chunks/mcp-0.6.0-0w7zg3p3.mjs +0 -4
- package/dist/chunks/mcp-0.6.0-6h57nk7y.mjs +0 -1
- package/dist/chunks/mcp-0.6.0-r1061w3f.mjs +0 -17
- package/dist/chunks/mcpb-0.6.0-9ka233fc.mjs +0 -1
- package/dist/chunks/memory-0.6.0-wzcpareq.mjs +0 -3
- package/dist/chunks/mobile-0.6.0-wfnegsdg.mjs +0 -2
- package/dist/chunks/model-0.6.0-2ncemzh6.mjs +0 -1
- package/dist/chunks/model-0.6.0-tefdsge4.mjs +0 -2
- package/dist/chunks/node-0.6.0-x0ve6mnc.mjs +0 -12
- package/dist/chunks/oauth-0.6.0-dqw6k0tz.mjs +0 -1
- package/dist/chunks/openaiShim-0.6.0-22t2dr2z.mjs +0 -14
- package/dist/chunks/output-style-0.6.0-6kqm6df4.mjs +0 -1
- package/dist/chunks/package-D6422PQU-0.6.0-vx7g6m15.mjs +0 -1
- package/dist/chunks/parseConnectUrl-0.6.0-fzb9qfec.mjs +0 -1
- package/dist/chunks/parser-0.6.0-y80gn3tg.mjs +0 -1
- package/dist/chunks/passes-0.6.0-0gxeeegv.mjs +0 -1
- package/dist/chunks/permissions-0.6.0-hke4pdcc.mjs +0 -3
- package/dist/chunks/plan-0.6.0-v60h02ep.mjs +0 -1
- package/dist/chunks/plist-0.6.0-bz14nbfw.mjs +0 -1
- package/dist/chunks/plugin-0.6.0-43b045ac.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.6.0-rxgqz1f8.mjs +0 -1
- package/dist/chunks/plugins-0.6.0-c4zsb658.mjs +0 -9
- package/dist/chunks/preActionHook-0.6.0-bxna1trm.mjs +0 -2
- package/dist/chunks/print-0.6.0-09j4e2ec.mjs +0 -57
- package/dist/chunks/privacy-settings-0.6.0-yhesee0k.mjs +0 -1
- package/dist/chunks/process-0.6.0-194s5ayw.mjs +0 -1
- package/dist/chunks/processBashCommand-0.6.0-pfp2pv9w.mjs +0 -1
- package/dist/chunks/processSlashCommand-0.6.0-7xzbb466.mjs +0 -9
- package/dist/chunks/prompt-0.6.0-g86dhhk0.mjs +0 -1
- package/dist/chunks/prompt-0.6.0-zaxw8ms6.mjs +0 -1
- package/dist/chunks/prompts-0.6.0-dk1vzsz0.mjs +0 -1
- package/dist/chunks/protocolHandler-0.6.0-54sm9br3.mjs +0 -13
- package/dist/chunks/provider-0.6.0-f3hjdgnv.mjs +0 -2
- package/dist/chunks/providerProfiles-0.6.0-bxp22mqt.mjs +0 -1
- package/dist/chunks/providerValidation-0.6.0-pvwdjqw3.mjs +0 -6
- package/dist/chunks/rate-limit-options-0.6.0-y2qv27ms.mjs +0 -1
- package/dist/chunks/registerSubcommands-0.6.0-dh1kmqw1.mjs +0 -34
- package/dist/chunks/registry-0.6.0-6zvdx4fa.mjs +0 -1
- package/dist/chunks/release-notes-0.6.0-6p8nx2xc.mjs +0 -5
- package/dist/chunks/reload-plugins-0.6.0-570gszfw.mjs +0 -2
- package/dist/chunks/remote-env-0.6.0-sjemeetj.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-0.6.0-ab80z440.mjs +0 -1
- package/dist/chunks/remoteSession-0.6.0-d07620cv.mjs +0 -1
- package/dist/chunks/rename-0.6.0-nyqpebf6.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.6.0-pvrxskrc.mjs +0 -1
- package/dist/chunks/replLauncher-0.6.0-1ng5ajaz.mjs +0 -1
- package/dist/chunks/resume-0.6.0-0gcmk4pd.mjs +0 -2
- package/dist/chunks/rewind-0.6.0-ktbtm3a9.mjs +0 -1
- package/dist/chunks/rootOptions-0.6.0-3y0nvcgg.mjs +0 -1
- package/dist/chunks/sandbox-adapter-0.6.0-n03pbpa8.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.6.0-r6ap16jq.mjs +0 -1
- package/dist/chunks/session-0.6.0-8wj8t5kq.mjs +0 -2
- package/dist/chunks/sessionDiscovery-0.6.0-ggm4y3jm.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-0.6.0-zzn2r4we.mjs +0 -1
- package/dist/chunks/sessionStorage-0.6.0-dqq9e9s8.mjs +0 -1
- package/dist/chunks/settings-0.6.0-ap4tqn54.mjs +0 -1
- package/dist/chunks/setup-0.6.0-mgbyyc71.mjs +0 -5
- package/dist/chunks/sinks-0.6.0-5ekfd4ya.mjs +0 -1
- package/dist/chunks/skills-0.6.0-78btd7cr.mjs +0 -1
- package/dist/chunks/startupProfiler-0.6.0-a2shb6dh.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-0.6.0-3ygq5msd.mjs +0 -1
- package/dist/chunks/state-0.6.0-m6bsf1b6.mjs +0 -1
- package/dist/chunks/stats-0.6.0-w163rgvd.mjs +0 -6
- package/dist/chunks/status-0.6.0-ce1p1nbt.mjs +0 -1
- package/dist/chunks/stickers-0.6.0-j9h7rsnm.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.6.0-ep7ha98p.mjs +0 -1
- package/dist/chunks/tasks-0.6.0-2qdk98p6.mjs +0 -1
- package/dist/chunks/teamHelpers-0.6.0-z26tek6c.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.6.0-ydtqht2v.mjs +0 -1
- package/dist/chunks/teleport-0.6.0-sq90w2z1.mjs +0 -1
- package/dist/chunks/terminalSetup-0.6.0-nj633zgj.mjs +0 -1
- package/dist/chunks/theme-0.6.0-gbx1fx14.mjs +0 -1
- package/dist/chunks/thinkback-0.6.0-g650qsc0.mjs +0 -1
- package/dist/chunks/thinkback-play-0.6.0-x83b68dn.mjs +0 -1
- package/dist/chunks/toolPool-0.6.0-p2sms7a9.mjs +0 -1
- package/dist/chunks/toolSearch-0.6.0-wyps3eqc.mjs +0 -1
- package/dist/chunks/tools-0.6.0-xk9wgy5h.mjs +0 -1
- package/dist/chunks/trustedDevice-0.6.0-rgqjeqzg.mjs +0 -1
- package/dist/chunks/turndown.cjs-0.6.0-dsdamyph.mjs +0 -69
- package/dist/chunks/ultrareviewCommand-0.6.0-x19p2w4a.mjs +0 -4
- package/dist/chunks/update-0.6.0-ryw1h5dw.mjs +0 -86
- package/dist/chunks/upgrade-0.6.0-gwrpq422.mjs +0 -1
- package/dist/chunks/upstreamproxy-0.6.0-99efcy5e.mjs +0 -14
- package/dist/chunks/url-handler-napi-0.6.0-k1qxf5y3.mjs +0 -1
- package/dist/chunks/usage-0.6.0-9gygvtnp.mjs +0 -1
- package/dist/chunks/util-0.6.0-pnf3vdnn.mjs +0 -1
- package/dist/chunks/utils-0.6.0-pf338f8r.mjs +0 -1
- package/dist/chunks/vim-0.6.0-xr4692km.mjs +0 -1
- package/dist/chunks/watcher-0.6.0-cypcv0dz.mjs +0 -1
- package/dist/chunks/wiki-0.6.0-hj8m2rct.mjs +0 -132
- package/dist/chunks/worktree-0.6.0-gkckfba3.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.6.0-rrpspmv9.mjs +0 -1
- package/dist/chunks/wrapper-0.6.0-hdrsg1aw.mjs +0 -7
- /package/dist/chunks/{cli-0.6.0-ktf52b8k.mjs → cli-0.6.2-1e5p6hw6.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.0-td7dsace.mjs → cli-0.6.2-3eaaj6e5.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.0-hcx40dgf.mjs → cli-0.6.2-7p1ykg1m.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.0-djm9knfa.mjs → cli-0.6.2-adegz2m3.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.0-6hak6gny.mjs → cli-0.6.2-hb4fz4pd.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.0-9zx9qdaq.mjs → cli-0.6.2-hkgnx8g7.mjs} +0 -0
- /package/dist/chunks/{cli-0.6.0-2hnyx7jy.mjs → cli-0.6.2-qk6j042k.mjs} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import{dpa as H9,fpa as Y$,hpa as M,ipa as JZ}from"./cli-0.6.2-3rgtxc9f.mjs";function w(Z,$,X,J,z){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!z)throw TypeError("Private accessor was defined without a setter");if(typeof $==="function"?Z!==$||!z:!$.has(Z))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?z.call(Z,X):z?z.value=X:$.set(Z,X),X}function K(Z,$,X,J){if(X==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof $==="function"?Z!==$||!J:!$.has(Z))throw TypeError("Cannot read private member from an object whose class did not declare it");return X==="m"?J:X==="a"?J.call(Z):J?J.value:$.get(Z)}var XZ=()=>{};function BZ(Z){return typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name==="AbortError"||("message"in Z)&&String(Z.message).includes("FetchRequestCanceledException"))}var R0=(Z)=>{if(Z instanceof Error)return Z;if(typeof Z==="object"&&Z!==null){try{if(Object.prototype.toString.call(Z)==="[object Error]"){let $=Error(Z.message,Z.cause?{cause:Z.cause}:{});if(Z.stack)$.stack=Z.stack;if(Z.cause&&!$.cause)$.cause=Z.cause;if(Z.name)$.name=Z.name;return $}}catch{}try{return Error(JSON.stringify(Z))}catch{}}return Error(Z)};var Z0=()=>{};var H,v,t,vZ,P0,I0,k0,y0,f0,b0,h0,g0,_0;var u=M(()=>{Z0();H=class H extends Error{};v=class v extends H{constructor(Z,$,X,J,z){super(`${v.makeMessage(Z,$,X)}`);this.status=Z,this.headers=J,this.requestID=J?.get("request-id"),this.error=$,this.type=z??null}static makeMessage(Z,$,X){let J=$?.message?typeof $.message==="string"?$.message:JSON.stringify($.message):$?JSON.stringify($):X;if(Z&&J)return`${Z} ${J}`;if(Z)return`${Z} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate(Z,$,X,J){if(!Z||!J)return new vZ({message:X,cause:R0($)});let z=$,Y=z?.error?.type;if(Z===400)return new I0(Z,z,X,J,Y);if(Z===401)return new k0(Z,z,X,J,Y);if(Z===403)return new y0(Z,z,X,J,Y);if(Z===404)return new f0(Z,z,X,J,Y);if(Z===409)return new b0(Z,z,X,J,Y);if(Z===422)return new h0(Z,z,X,J,Y);if(Z===429)return new g0(Z,z,X,J,Y);if(Z>=500)return new _0(Z,z,X,J,Y);return new v(Z,z,X,J,Y)}};t=class t extends v{constructor({message:Z}={}){super(void 0,void 0,Z||"Request was aborted.",void 0)}};vZ=class vZ extends v{constructor({message:Z,cause:$}){super(void 0,void 0,Z||"Connection error.",void 0);if($)this.cause=$}};P0=class P0 extends vZ{constructor({message:Z}={}){super({message:Z??"Request timed out."})}};I0=class I0 extends v{};k0=class k0 extends v{};y0=class y0 extends v{};f0=class f0 extends v{};b0=class b0 extends v{};h0=class h0 extends v{};g0=class g0 extends v{};_0=class _0 extends v{}});var SZ;var v0=M(()=>{SZ=class SZ extends Error{constructor(Z){let $=typeof Z==="string"?Z:Z.map((X)=>{if(X.type==="text")return X.text;return`[${X.type}]`}).join(" ");super($);this.name="ToolError",this.content=Z}}});function g$(){let Z,$;return{promise:new Promise((J,z)=>{Z=J,$=z}),resolve:Z,reject:$}}var T1=()=>{};var $0=function(){let{crypto:Z}=globalThis;if(Z?.randomUUID)return $0=Z.randomUUID.bind(Z),Z.randomUUID();let $=new Uint8Array(1),X=Z?()=>Z.getRandomValues($)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^X()&15>>+J/4).toString(16))};var g8=()=>{};function _8(Z){if(typeof Z!=="object")return{};return Z??{}}function v$(Z){if(!Z)return!0;for(let $ in Z)return!1;return!0}function A1(Z,$){return Object.prototype.hasOwnProperty.call(Z,$)}var P6,D1=(Z)=>{return P6.test(Z)},s=(Z)=>(s=Array.isArray,s(Z)),_$,L1=(Z,$)=>{if(typeof $!=="number"||!Number.isInteger($))throw new H(`${Z} must be an integer`);if($<0)throw new H(`${Z} must be a positive integer`);return $},v8=(Z)=>{try{return JSON.parse(Z)}catch($){return}};var CZ=M(()=>{u();P6=/^[a-z][a-z0-9+.-]*:/i,_$=s});var qZ=(Z,$)=>new Promise((X)=>{if($?.aborted)return X();let J=()=>{clearTimeout(z),X()},z=setTimeout(()=>{$?.removeEventListener("abort",J),X()},Z);$?.addEventListener("abort",J,{once:!0})});var X0=()=>{};var NZ="0.100.1";var m0=()=>{};function I6(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}function y6(){if(typeof navigator>"u"||!navigator)return null;let Z=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:$,pattern:X}of Z){let J=X.exec(navigator.userAgent);if(J){let z=J[1]||0,Y=J[2]||0,V=J[3]||0;return{browser:$,version:`${z}.${Y}.${V}`}}}return null}var R1=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"},k6=()=>{let Z=I6();if(Z==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":NZ,"X-Stainless-OS":j1(Deno.build.os),"X-Stainless-Arch":S1(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":NZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(Z==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":NZ,"X-Stainless-OS":j1(globalThis.process.platform??"unknown"),"X-Stainless-Arch":S1(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let $=y6();if($)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":NZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${$.browser}`,"X-Stainless-Runtime-Version":$.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":NZ,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}},S1=(Z)=>{if(Z==="x32")return"x32";if(Z==="x86_64"||Z==="x64")return"x64";if(Z==="arm")return"arm";if(Z==="aarch64"||Z==="arm64")return"arm64";if(Z)return`other:${Z}`;return"unknown"},j1=(Z)=>{if(Z=Z.toLowerCase(),Z.includes("ios"))return"iOS";if(Z==="android")return"Android";if(Z==="darwin")return"MacOS";if(Z==="win32")return"Windows";if(Z==="freebsd")return"FreeBSD";if(Z==="openbsd")return"OpenBSD";if(Z==="linux")return"Linux";if(Z)return`Other:${Z}`;return"Unknown"},E1,c0=()=>{return E1??(E1=k6())};var m8=M(()=>{m0()});function P1(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function m$(...Z){let $=globalThis.ReadableStream;if(typeof $>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new $(...Z)}function c8(Z){let $=Symbol.asyncIterator in Z?Z[Symbol.asyncIterator]():Z[Symbol.iterator]();return m$({start(){},async pull(X){let{done:J,value:z}=await $.next();if(J)X.close();else X.enqueue(z)},async cancel(){await $.return?.()}})}function u0(Z){if(Z[Symbol.asyncIterator])return Z;let $=Z.getReader();return{async next(){try{let X=await $.read();if(X?.done)$.releaseLock();return X}catch(X){throw $.releaseLock(),X}},async return(){let X=$.cancel();return $.releaseLock(),await X,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function I1(Z){if(Z===null||typeof Z!=="object")return;if(Z[Symbol.asyncIterator]){await Z[Symbol.asyncIterator]().return?.();return}let $=Z.getReader(),X=$.cancel();$.releaseLock(),await X}var J0=()=>{};var k1=({headers:Z,body:$})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify($)}};var y1=()=>{};var c$="RFC3986",u$=(Z)=>String(Z),d$,f1="RFC1738";var p$=M(()=>{d$={RFC1738:(Z)=>String(Z).replace(/%20/g,"+"),RFC3986:u$}});function h1(Z){if(!Z||typeof Z!=="object")return!1;return!!(Z.constructor&&Z.constructor.isBuffer&&Z.constructor.isBuffer(Z))}function i$(Z,$){if(s(Z)){let X=[];for(let J=0;J<Z.length;J+=1)X.push($(Z[J]));return X}return $(Z)}var u8=(Z,$)=>(u8=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),u8(Z,$)),xZ,l$=1024,b1=(Z,$,X,J,z)=>{if(Z.length===0)return Z;let Y=Z;if(typeof Z==="symbol")Y=Symbol.prototype.toString.call(Z);else if(typeof Z!=="string")Y=String(Z);if(X==="iso-8859-1")return escape(Y).replace(/%u[0-9a-f]{4}/gi,function(Q){return"%26%23"+parseInt(Q.slice(2),16)+"%3B"});let V="";for(let Q=0;Q<Y.length;Q+=l$){let W=Y.length>=l$?Y.slice(Q,Q+l$):Y,O=[];for(let x=0;x<W.length;++x){let U=W.charCodeAt(x);if(U===45||U===46||U===95||U===126||U>=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||z===f1&&(U===40||U===41)){O[O.length]=W.charAt(x);continue}if(U<128){O[O.length]=xZ[U];continue}if(U<2048){O[O.length]=xZ[192|U>>6]+xZ[128|U&63];continue}if(U<55296||U>=57344){O[O.length]=xZ[224|U>>12]+xZ[128|U>>6&63]+xZ[128|U&63];continue}x+=1,U=65536+((U&1023)<<10|W.charCodeAt(x)&1023),O[O.length]=xZ[240|U>>18]+xZ[128|U>>12&63]+xZ[128|U>>6&63]+xZ[128|U&63]}V+=O.join("")}return V};var g1=M(()=>{p$();CZ();xZ=(()=>{let Z=[];for(let $=0;$<256;++$)Z.push("%"+(($<16?"0":"")+$.toString(16)).toUpperCase());return Z})()});function h6(Z){return typeof Z==="string"||typeof Z==="number"||typeof Z==="boolean"||typeof Z==="symbol"||typeof Z==="bigint"}function c1(Z,$,X,J,z,Y,V,Q,W,O,x,U,N,C,B,L,D,A){let F=Z,h=A,y=0,P=!1;while((h=h.get(n$))!==void 0&&!P){let c=h.get(Z);if(y+=1,typeof c<"u")if(c===y)throw RangeError("Cyclic object value");else P=!0;if(typeof h.get(n$)>"u")y=0}if(typeof O==="function")F=O($,F);else if(F instanceof Date)F=N?.(F);else if(X==="comma"&&s(F))F=i$(F,function(c){if(c instanceof Date)return N?.(c);return c});if(F===null){if(Y)return W&&!L?W($,i.encoder,D,"key",C):$;F=""}if(h6(F)||h1(F)){if(W){let c=L?$:W($,i.encoder,D,"key",C);return[B?.(c)+"="+B?.(W(F,i.encoder,D,"value",C))]}return[B?.($)+"="+B?.(String(F))]}let l=[];if(typeof F>"u")return l;let b;if(X==="comma"&&s(F)){if(L&&W)F=i$(F,W);b=[{value:F.length>0?F.join(",")||null:void 0}]}else if(s(O))b=O;else{let c=Object.keys(F);b=x?c.sort(x):c}let d=Q?String($).replace(/\./g,"%2E"):String($),g=J&&s(F)&&F.length===1?d+"[]":d;if(z&&s(F)&&F.length===0)return g+"[]";for(let c=0;c<b.length;++c){let GZ=b[c],_Z=typeof GZ==="object"&&typeof GZ.value<"u"?GZ.value:F[GZ];if(V&&_Z===null)continue;let h$=U&&Q?GZ.replace(/\./g,"%2E"):GZ,E6=s(F)?typeof X==="function"?X(g,h$):g:g+(U?"."+h$:"["+h$+"]");A.set(Z,y);let F1=new WeakMap;F1.set(n$,A),m1(l,c1(_Z,E6,X,J,z,Y,V,Q,X==="comma"&&L&&s(F)?null:W,O,x,U,N,C,B,L,D,F1))}return l}function g6(Z=i){if(typeof Z.allowEmptyArrays<"u"&&typeof Z.allowEmptyArrays!=="boolean")throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof Z.encodeDotInKeys<"u"&&typeof Z.encodeDotInKeys!=="boolean")throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(Z.encoder!==null&&typeof Z.encoder<"u"&&typeof Z.encoder!=="function")throw TypeError("Encoder has to be a function.");let $=Z.charset||i.charset;if(typeof Z.charset<"u"&&Z.charset!=="utf-8"&&Z.charset!=="iso-8859-1")throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let X=c$;if(typeof Z.format<"u"){if(!u8(d$,Z.format))throw TypeError("Unknown format option provided.");X=Z.format}let J=d$[X],z=i.filter;if(typeof Z.filter==="function"||s(Z.filter))z=Z.filter;let Y;if(Z.arrayFormat&&Z.arrayFormat in v1)Y=Z.arrayFormat;else if("indices"in Z)Y=Z.indices?"indices":"repeat";else Y=i.arrayFormat;if("commaRoundTrip"in Z&&typeof Z.commaRoundTrip!=="boolean")throw TypeError("`commaRoundTrip` must be a boolean, or absent");let V=typeof Z.allowDots>"u"?!!Z.encodeDotInKeys===!0?!0:i.allowDots:!!Z.allowDots;return{addQueryPrefix:typeof Z.addQueryPrefix==="boolean"?Z.addQueryPrefix:i.addQueryPrefix,allowDots:V,allowEmptyArrays:typeof Z.allowEmptyArrays==="boolean"?!!Z.allowEmptyArrays:i.allowEmptyArrays,arrayFormat:Y,charset:$,charsetSentinel:typeof Z.charsetSentinel==="boolean"?Z.charsetSentinel:i.charsetSentinel,commaRoundTrip:!!Z.commaRoundTrip,delimiter:typeof Z.delimiter>"u"?i.delimiter:Z.delimiter,encode:typeof Z.encode==="boolean"?Z.encode:i.encode,encodeDotInKeys:typeof Z.encodeDotInKeys==="boolean"?Z.encodeDotInKeys:i.encodeDotInKeys,encoder:typeof Z.encoder==="function"?Z.encoder:i.encoder,encodeValuesOnly:typeof Z.encodeValuesOnly==="boolean"?Z.encodeValuesOnly:i.encodeValuesOnly,filter:z,format:X,formatter:J,serializeDate:typeof Z.serializeDate==="function"?Z.serializeDate:i.serializeDate,skipNulls:typeof Z.skipNulls==="boolean"?Z.skipNulls:i.skipNulls,sort:typeof Z.sort==="function"?Z.sort:null,strictNullHandling:typeof Z.strictNullHandling==="boolean"?Z.strictNullHandling:i.strictNullHandling}}function u1(Z,$={}){let X=Z,J=g6($),z,Y;if(typeof J.filter==="function")Y=J.filter,X=Y("",X);else if(s(J.filter))Y=J.filter,z=Y;let V=[];if(typeof X!=="object"||X===null)return"";let Q=v1[J.arrayFormat],W=Q==="comma"&&J.commaRoundTrip;if(!z)z=Object.keys(X);if(J.sort)z.sort(J.sort);let O=new WeakMap;for(let N=0;N<z.length;++N){let C=z[N];if(J.skipNulls&&X[C]===null)continue;m1(V,c1(X[C],C,Q,W,J.allowEmptyArrays,J.strictNullHandling,J.skipNulls,J.encodeDotInKeys,J.encode?J.encoder:null,J.filter,J.sort,J.allowDots,J.serializeDate,J.format,J.formatter,J.encodeValuesOnly,J.charset,O))}let x=V.join(J.delimiter),U=J.addQueryPrefix===!0?"?":"";if(J.charsetSentinel)if(J.charset==="iso-8859-1")U+="utf8=%26%2310003%3B&";else U+="utf8=%E2%9C%93&";return x.length>0?U+x:""}var v1,m1=function(Z,$){Array.prototype.push.apply(Z,s($)?$:[$])},_1,i,n$;var d1=M(()=>{g1();p$();CZ();v1={brackets(Z){return String(Z)+"[]"},comma:"comma",indices(Z,$){return String(Z)+"["+$+"]"},repeat(Z){return String(Z)}},i={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:b1,encodeValuesOnly:!1,format:c$,formatter:u$,indices:!1,serializeDate(Z){return(_1??(_1=Function.prototype.call.bind(Date.prototype.toISOString)))(Z)},skipNulls:!1,strictNullHandling:!1};n$={}});function p1(Z){return u1(Z,{arrayFormat:"brackets"})}var a$=M(()=>{d1()});function p8(Z){if(!Z)return;let $;try{$=new URL(Z)}catch(J){throw new R(`Invalid token endpoint base URL "${Z}": ${J}`)}if($.protocol==="https:")return;let X=$.hostname.toLowerCase().replace(/^\[|\]$/g,"");if($.protocol==="http:"&&(X==="localhost"||X==="127.0.0.1"||X==="::1"))return;throw new R(`Refusing to send credential over non-https token endpoint "${Z}"`)}async function l8(Z,$){let X=await m6(Z),J;try{J=JSON.parse(X)}catch{throw new R(`Token endpoint returned non-JSON response (status ${Z.status})`,Z.status,ZZ(X),$)}if(!J.access_token)throw new R(`Token endpoint response missing access_token: ${JSON.stringify(ZZ(J))}`,Z.status,ZZ(J),$);if(J.token_type&&J.token_type.toLowerCase()!=="bearer")throw new R(`Token endpoint response: unsupported token_type "${J.token_type}" (want Bearer)`,Z.status,ZZ(J),$);return J}function ZZ(Z){if(Z==null)return Z;if(typeof Z==="string"){let $;try{$=JSON.parse(Z)}catch{if(Z.length<=r$)return Z;return Z.slice(0,r$)+`... <${Z.length-r$} more chars>`}return JSON.stringify(ZZ($))}if(typeof Z==="object"&&!Array.isArray(Z)){let $={};for(let[X,J]of Object.entries(Z))if(v6.has(X))$[X]=J;return $}return null}async function i8(Z,$=(X)=>console.warn(`anthropic-sdk: ${X}`)){if(typeof process>"u"||process.platform==="win32")return;let X=await import("node:fs"),J=Z,z;try{J=await X.promises.realpath(Z),z=await X.promises.stat(J)}catch{return}let Y=z.mode&511;if(Y&18)throw new R(`Credentials file at ${J} is group/world-writable (mode 0o${Y.toString(8)}); this allows other local users to plant tokens. Run \`chmod 600 ${J}\`.`);if(Y&36)throw new R(`Credentials file at ${J} is group/world-readable (mode 0o${Y.toString(8)}); run \`chmod 600 ${J}\` before retrying.`);if(typeof process.getuid==="function"&&z.uid!==process.getuid())$(`credentials file at ${J} is owned by uid ${z.uid} (current process uid ${process.getuid()}); verify this is intentional.`)}async function n8(Z,$){let X=await import("node:fs"),z=(await import("node:path")).dirname(Z);await X.promises.mkdir(z,{recursive:!0,mode:448});let Y=`${Z}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{let V=await X.promises.open(Y,"w",384);try{await V.writeFile(JSON.stringify($,null,2)),await V.sync()}finally{await V.close()}await X.promises.rename(Y,Z)}catch(V){throw await X.promises.unlink(Y).catch(()=>{}),V}try{let V=await X.promises.open(z,"r");try{await V.sync()}finally{await V.close()}}catch{}}async function m6(Z){if(!Z.body)return"";let $=Z.body.getReader(),X=[],J=0;for(;;){let{done:Y,value:V}=await $.read();if(Y)break;if(J+V.length>l1){let Q=l1-J;if(Q>0)X.push(V.subarray(0,Q));await $.cancel();break}X.push(V),J+=V.length}let z;if(X.length===1)z=X[0];else{z=new Uint8Array(X.reduce((V,Q)=>V+Q.length,0));let Y=0;for(let V of X)z.set(V,Y),Y+=V.length}return new TextDecoder("utf-8").decode(z)}var i1="urn:ietf:params:oauth:grant-type:jwt-bearer",n1="refresh_token",d8="/v1/oauth/token",mZ="oauth-2025-04-20",a1="oidc-federation-2026-04-01",r1=120,z0=30,o1=5,l1=1048576,r$=2000,v6,R;var Y0=M(()=>{u();v6=new Set(["error","error_description","error_uri"]);R=class R extends H{constructor(Z,$=null,X=null,J=null){super(Z);this.statusCode=$,this.body=X,this.requestId=J}}});function OZ(){return Math.floor(Date.now()/1000)}var d0=()=>{};class o${constructor(Z,$){this.cached=null,this.pendingRefresh=null,this.nextForce=!1,this.lastAdvisoryError=0,this.provider=Z,this.onAdvisoryRefreshError=$}async getToken(){let Z=this.nextForce;this.nextForce=!1;let $=this.cached;if(Z||$==null)return(await this.refresh(Z)).token;if($.expiresAt==null)return $.token;let X=$.expiresAt-OZ();if(X>r1)return $.token;if(X>z0)return this.backgroundRefresh(),$.token;return(await this.refresh()).token}invalidate(){this.cached=null,this.nextForce=!0}refresh(Z=!1){if(this.pendingRefresh&&!Z)return this.pendingRefresh;return this.doRefresh(Z)}backgroundRefresh(){if(this.pendingRefresh)return;if(OZ()-this.lastAdvisoryError<o1)return;this.doRefresh().catch((Z)=>{this.lastAdvisoryError=OZ(),this.onAdvisoryRefreshError?.(Z)})}doRefresh(Z=!1){return this.pendingRefresh=this.provider(Z?{forceRefresh:!0}:void 0).then(($)=>{return this.cached=$,this.pendingRefresh=null,$},($)=>{throw this.pendingRefresh=null,$}),this.pendingRefresh}}var t1=M(()=>{Y0();d0()});var S=(Z)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[Z]?.trim()||void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(Z)?.trim()||void 0;return};var p0=()=>{};function Z4(Z){let $=0;for(let z of Z)$+=z.length;let X=new Uint8Array($),J=0;for(let z of Z)X.set(z,J),J+=z.length;return X}function K0(Z){let $;return(s1??($=new globalThis.TextEncoder,s1=$.encode.bind($)))(Z)}function t$(Z){let $;return(e1??($=new globalThis.TextDecoder,e1=$.decode.bind($)))(Z)}var s1,e1;var a8=()=>{};var $4=M(()=>{u();a8()});function l0(){}function r8(Z,$,X){if(!$||o8[Z]>o8[X])return l0;else return $[Z].bind($)}function k(Z){let $=Z.logger,X=Z.logLevel??"off";if(!$)return c6;let J=X4.get($);if(J&&J[0]===X)return J[1];let z={error:r8("error",$,X),warn:r8("warn",$,X),info:r8("info",$,X),debug:r8("debug",$,X)};return X4.set($,[X,z]),z}var o8,s$=(Z,$,X)=>{if(!Z)return;if(A1(o8,Z))return Z;k(X).warn(`${$} was set to ${JSON.stringify(Z)}, expected one of ${JSON.stringify(Object.keys(o8))}`);return},c6,X4,FZ=(Z)=>{if(Z.options)Z.options={...Z.options},delete Z.options.headers;if(Z.headers)Z.headers=Object.fromEntries((Z.headers instanceof Headers?[...Z.headers]:Object.entries(Z.headers)).map(([$,X])=>[$,$.toLowerCase()==="authorization"||$.toLowerCase()==="api-key"||$.toLowerCase()==="x-api-key"||$.toLowerCase()==="cookie"||$.toLowerCase()==="set-cookie"?"***":X]));if("retryOfRequestLogID"in Z){if(Z.retryOfRequestLogID)Z.retryOf=Z.retryOfRequestLogID;delete Z.retryOfRequestLogID}return Z};var jZ=M(()=>{CZ();o8={off:0,error:200,warn:300,info:400,debug:500};c6={error:l0,warn:l0,info:l0,debug:l0},X4=new WeakMap});var J4=M(()=>{CZ();$4();p0();jZ();g8();X0();a$()});function z4(Z){if(!Z)throw Error("profile name is empty");if(Z==="."||Z==="..")throw Error(`profile name "${Z}" is not allowed`);if(Z.includes("/")||Z.includes("\\"))throw Error(`profile name "${Z}" must not contain path separators`);if(!u6.test(Z))throw Error(`profile name "${Z}" contains disallowed characters (allowed: letters, digits, '_', '.', '-')`)}var t8="1.0",u6,Y4=async(Z)=>{var $,X;let J=await e$();if(J===null)return null;let z=Z??await Q4();if(z===null)return null;z4(z);let Y=await import("node:fs"),Q=(await import("node:path")).join(J,"configs",`${z}.json`),W;try{W=await Y.promises.readFile(Q,"utf-8")}catch(U){if(U?.code!=="ENOENT")throw Error(`failed to read config file ${Q}: ${U}`);W=null}if(W===null){let U=S("ANTHROPIC_ORGANIZATION_ID"),N=S("ANTHROPIC_IDENTITY_TOKEN_FILE"),C=S("ANTHROPIC_FEDERATION_RULE_ID");if(C&&U)return{fromFile:!1,config:{organization_id:U,workspace_id:S("ANTHROPIC_WORKSPACE_ID"),base_url:S("ANTHROPIC_BASE_URL"),authentication:{type:"oidc_federation",federation_rule_id:C,service_account_id:S("ANTHROPIC_SERVICE_ACCOUNT_ID"),identity_token:N?{source:"file",path:N}:void 0,scope:S("ANTHROPIC_SCOPE")}}};return null}let O;try{O=JSON.parse(W)}catch(U){throw Error(`failed to parse config file ${Q}: ${U}`)}if(!O.authentication)throw Error(`config file ${Q} is missing "authentication"`);let x=O.authentication.type;if(x!=="oidc_federation"&&x!=="user_oauth")throw Error(`authentication.type "${x}" is not a known authentication type`);if(O.organization_id??(O.organization_id=S("ANTHROPIC_ORGANIZATION_ID")),O.workspace_id??(O.workspace_id=S("ANTHROPIC_WORKSPACE_ID")),O.base_url??(O.base_url=S("ANTHROPIC_BASE_URL")),($=O.authentication).scope??($.scope=S("ANTHROPIC_SCOPE")),O.authentication.type==="oidc_federation"){if(!O.authentication.identity_token){let U=S("ANTHROPIC_IDENTITY_TOKEN_FILE");if(U)O.authentication.identity_token={source:"file",path:U}}if(!O.authentication.federation_rule_id)O.authentication.federation_rule_id=S("ANTHROPIC_FEDERATION_RULE_ID")??"";(X=O.authentication).service_account_id??(X.service_account_id=S("ANTHROPIC_SERVICE_ACCOUNT_ID"))}return{config:O,fromFile:!0}},K4=async(Z,$)=>{if(Z?.authentication.credentials_path)return Z.authentication.credentials_path;let X=await e$();if(!X)return null;let J=$??await Q4();if(!J)return null;return z4(J),(await import("node:path")).join(X,"credentials",`${J}.json`)},e$=async()=>{if(!d6())return null;let Z=await import("node:path"),$=S("ANTHROPIC_CONFIG_DIR");if($)return $;if(c0()["X-Stainless-OS"]==="Windows"){let Y=S("APPDATA");if(Y)return Z.join(Y,"Anthropic");let V=S("USERPROFILE");if(V)return Z.join(V,"AppData","Roaming","Anthropic");return null}let J=S("XDG_CONFIG_HOME");if(J)return Z.join(J,"anthropic");let z=S("HOME");if(z)return Z.join(z,".config","anthropic");return null},d6=()=>{let Z=c0()["X-Stainless-Runtime"];return Z==="node"||Z==="deno"},Q4=async()=>{let Z=await e$();if(!Z)return null;let $=S("ANTHROPIC_PROFILE");if($)return $;let X=await import("node:fs"),z=(await import("node:path")).join(Z,"active_config");try{return(await X.promises.readFile(z,"utf-8")).trim()||"default"}catch(Y){if(Y?.code!=="ENOENT")throw Error(`failed to read ${z}: ${Y}`);return"default"}};var ZX=M(()=>{m8();J4();u6=/^[A-Za-z0-9_.-]+$/});function $X(Z){if(!Z)throw new H("Identity token file path is empty");return async()=>{let $=await import("node:fs"),X;try{X=await $.promises.readFile(Z,"utf-8")}catch(z){throw new H(`Failed to read identity token file at ${Z}: ${z}`)}let J=X.trim();if(!J)throw new H(`Identity token file at ${Z} is empty`);return J}}function V4(Z){if(!Z)throw new H("Identity token value is empty");return()=>Z}var G4=M(()=>{u()});function N4(Z){return async()=>{p8(Z.baseURL);let $=await Z.identityTokenProvider();if($.length>16384)throw new R(`Identity token is ${Math.ceil($.length/1024)} KiB, exceeds the 16 KiB assertion limit`);let X={grant_type:i1,assertion:$,federation_rule_id:Z.federationRuleId,organization_id:Z.organizationId};if(Z.serviceAccountId)X.service_account_id=Z.serviceAccountId;if(Z.workspaceId)X.workspace_id=Z.workspaceId;let J=`${Z.baseURL}${d8}`,z;try{z=await Z.fetch(J,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":`${mZ},${a1}`,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${NZ} oidcFederationProvider`},body:JSON.stringify(X)})}catch(W){throw new R(`Failed to reach token endpoint ${J}: ${W}`)}let Y=z.headers.get("Request-Id");if(!z.ok){let W=await z.text().catch(()=>""),O=ZZ(W),x="";if(z.status===401)x=` Ensure your federation rule matches your identity token. ${Z.workspaceId?"":"If your federation rule is scoped to multiple workspaces, set the ANTHROPIC_WORKSPACE_ID environment variable, the 'workspace_id' config key, or the `workspaceId` option. "}View your authentication events in the Workload identity page of Claude Console for more details.`;throw new R(`Token exchange failed with status ${z.status}${Y?` (request-id ${Y})`:""}: ${O}${x}`,z.status,O,Y)}let V=await l8(z,Y),Q=Number(V.expires_in);if(!Number.isFinite(Q))throw new R(`Token endpoint response missing required fields: ${JSON.stringify(ZZ(V))}`,z.status,ZZ(V),Y);return{token:V.access_token,expiresAt:OZ()+Q}}}var U4=M(()=>{Y0();d0();m0()});function W4(Z){return async($)=>{let X=await import("node:fs");await i8(Z.credentialsPath,Z.onSafetyWarning);let J;try{J=await X.promises.readFile(Z.credentialsPath,"utf-8")}catch(D){throw new R(`Credentials file not found at ${Z.credentialsPath}: ${D}`)}let z;try{z=JSON.parse(J)}catch(D){throw new R(`Credentials file at ${Z.credentialsPath} is not valid JSON: ${D}`)}let Y=z.access_token;if(!Y)throw new R(`Credentials file at ${Z.credentialsPath} must include 'access_token'`);let V=z.expires_at;if(!$?.forceRefresh&&(V==null||OZ()<V-z0))return{token:Y,expiresAt:V??null};let Q=z.refresh_token;if(!Z.clientId||!Q)throw new R(`Access token at ${Z.credentialsPath} has expired and no refresh is available (client_id ${Z.clientId?"set":"empty"}, refresh_token ${Q?"set":"empty"})`);p8(Z.baseURL);let W={grant_type:n1,refresh_token:Q,client_id:Z.clientId},O=`${Z.baseURL}${d8}`,x;try{x=await Z.fetch(O,{method:"POST",headers:{"Content-Type":"application/json","anthropic-beta":mZ,"User-Agent":Z.userAgent||`anthropic-sdk-typescript/${NZ} userOAuthProvider`},body:JSON.stringify(W)})}catch(D){throw new R(`User OAuth refresh failed to reach token endpoint: ${D}`)}let U=x.headers.get("Request-Id");if(!x.ok){let D=await x.text().catch(()=>"");throw new R(`User OAuth refresh failed (HTTP ${x.status}): ${ZZ(D)}`,x.status,ZZ(D),U)}let N=await l8(x,U),C=Number(N.expires_in);if(!Number.isFinite(C))throw new R(`User OAuth refresh response missing or invalid expires_in: ${JSON.stringify(ZZ(N))}`,x.status,ZZ(N),U);let B=OZ()+C,L=N.refresh_token||Q;return await n8(Z.credentialsPath,{...z,version:t8,type:"oauth_token",access_token:N.access_token,expires_at:B,refresh_token:L}),{token:N.access_token,expiresAt:B}}}var w4=M(()=>{ZX();Y0();d0();m0()});function XX(Z,$){let X=Z.authentication.credentials_path??null,J=(Z.base_url||$.baseURL).replace(/\/+$/,""),z=p6(Z,X,J,$),Y={};if(Z.workspace_id&&Z.authentication.type==="user_oauth")Y["anthropic-workspace-id"]=Z.workspace_id;return{provider:z,extraHeaders:Y,baseURL:Z.base_url||void 0}}async function q4(Z,$){let X=await Y4($);if(!X)return null;let{config:J,fromFile:z}=X,Y=J.authentication.credentials_path||!z?J:{...J,authentication:{...J.authentication,credentials_path:await K4(J,$)??void 0}};return XX(Y,Z)}function p6(Z,$,X,J){switch(Z.authentication.type){case"oidc_federation":{let z=Z.authentication,Y=l6(z);if(!Y)throw new R("oidc_federation config requires an identity token (set authentication.identity_token, ANTHROPIC_IDENTITY_TOKEN_FILE, or ANTHROPIC_IDENTITY_TOKEN)");if(!z.federation_rule_id)throw new R("oidc_federation config requires 'federation_rule_id'. Set it in authentication.federation_rule_id in your profile, or via ANTHROPIC_FEDERATION_RULE_ID (profile takes precedence).");if(!Z.organization_id)throw new R("oidc_federation config requires organization_id (set ANTHROPIC_ORGANIZATION_ID or config.organization_id)");let V=N4({identityTokenProvider:Y,federationRuleId:z.federation_rule_id,organizationId:Z.organization_id,serviceAccountId:z.service_account_id,workspaceId:Z.workspace_id,baseURL:X,fetch:J.fetch,userAgent:J.userAgent});if($)return i6(V,$,J.onCacheWriteError,J.onSafetyWarning);return V}case"user_oauth":{if(!$)throw new R("user_oauth config requires authentication.credentials_path (or load via a profile so it defaults to <config_dir>/credentials/<profile>.json)");return W4({credentialsPath:$,clientId:Z.authentication.client_id,baseURL:X,fetch:J.fetch,userAgent:J.userAgent,onSafetyWarning:J.onSafetyWarning})}default:{let z=Z.authentication.type;throw new R(`authentication.type "${z}" is not a known authentication type`)}}}function l6(Z){if(Z.identity_token){let J=Z.identity_token.source;if(J!=="file")throw new R(`identity_token.source "${J}" is not supported by this SDK version (only "file")`);if(!Z.identity_token.path)throw new R('identity_token.source "file" requires a non-empty path');return $X(Z.identity_token.path)}let $=S("ANTHROPIC_IDENTITY_TOKEN_FILE");if($)return $X($);let X=S("ANTHROPIC_IDENTITY_TOKEN");if(X)return V4(X);return null}function i6(Z,$,X,J){return async(z)=>{let Y=await import("node:fs");await i8($,J);let V;try{let W=await Y.promises.readFile($,"utf-8");V=JSON.parse(W);let O=V?.access_token;if(O&&!z?.forceRefresh){let x=V?.expires_at;if(x==null||OZ()<x-z0)return{token:O,expiresAt:x??null}}}catch(W){if(W?.code!=="ENOENT"&&!(W instanceof SyntaxError))X?.(W)}let Q=await Z(z);try{await n8($,{...V??{},version:t8,type:"oauth_token",access_token:Q.token,expires_at:Q.expiresAt})}catch(W){X?.(W)}return Q}}var O4=M(()=>{p0();ZX();Y0();d0();G4();U4();w4()});class EZ{constructor(){zZ.set(this,void 0),YZ.set(this,void 0),w(this,zZ,new Uint8Array,"f"),w(this,YZ,null,"f")}decode(Z){if(Z==null)return[];let $=Z instanceof ArrayBuffer?new Uint8Array(Z):typeof Z==="string"?K0(Z):Z;w(this,zZ,Z4([K(this,zZ,"f"),$]),"f");let X=[],J;while((J=n6(K(this,zZ,"f"),K(this,YZ,"f")))!=null){if(J.carriage&&K(this,YZ,"f")==null){w(this,YZ,J.index,"f");continue}if(K(this,YZ,"f")!=null&&(J.index!==K(this,YZ,"f")+1||J.carriage)){X.push(t$(K(this,zZ,"f").subarray(0,K(this,YZ,"f")-1))),w(this,zZ,K(this,zZ,"f").subarray(K(this,YZ,"f")),"f"),w(this,YZ,null,"f");continue}let z=K(this,YZ,"f")!==null?J.preceding-1:J.preceding,Y=t$(K(this,zZ,"f").subarray(0,z));X.push(Y),w(this,zZ,K(this,zZ,"f").subarray(J.index),"f"),w(this,YZ,null,"f")}return X}flush(){if(!K(this,zZ,"f").length)return[];return this.decode(`
|
|
2
|
+
`)}}function n6(Z,$){for(let z=$??0;z<Z.length;z++){if(Z[z]===10)return{preceding:z,index:z+1,carriage:!1};if(Z[z]===13)return{preceding:z,index:z+1,carriage:!0}}return null}function M4(Z){for(let J=0;J<Z.length-1;J++){if(Z[J]===10&&Z[J+1]===10)return J+2;if(Z[J]===13&&Z[J+1]===13)return J+2;if(Z[J]===13&&Z[J+1]===10&&J+3<Z.length&&Z[J+2]===13&&Z[J+3]===10)return J+4}return-1}var zZ,YZ;var JX=M(()=>{XZ();a8();zZ=new WeakMap,YZ=new WeakMap;EZ.NEWLINE_CHARS=new Set([`
|
|
3
|
+
`,"\r"]);EZ.NEWLINE_REGEXP=/\r\n|[\n\r]/g});async function*a6(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new H("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new H("Attempted to iterate over a response with no body")}let X=new C4,J=new EZ,z=u0(Z.body);for await(let Y of r6(z))for(let V of J.decode(Y)){let Q=X.decode(V);if(Q)yield Q}for(let Y of J.flush()){let V=X.decode(Y);if(V)yield V}}async function*r6(Z){let $=new Uint8Array;for await(let X of Z){if(X==null)continue;let J=X instanceof ArrayBuffer?new Uint8Array(X):typeof X==="string"?K0(X):X,z=new Uint8Array($.length+J.length);z.set($),z.set(J,$.length),$=z;let Y;while((Y=M4($))!==-1)yield $.slice(0,Y),$=$.slice(Y)}if($.length>0)yield $}class C4{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(Z){if(Z.endsWith("\r"))Z=Z.substring(0,Z.length-1);if(!Z){if(!this.event&&!this.data.length)return null;let z={event:this.event,data:this.data.join(`
|
|
4
|
+
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],z}if(this.chunks.push(Z),Z.startsWith(":"))return null;let[$,X,J]=o6(Z,":");if(J.startsWith(" "))J=J.substring(1);if($==="event")this.event=J;else if($==="data")this.data.push(J);return null}}function o6(Z,$){let X=Z.indexOf($);if(X!==-1)return[Z.substring(0,X),$,Z.substring(X+$.length)];return[Z,"",""]}var i0,KZ;var zX=M(()=>{XZ();u();J0();JX();J0();Z0();CZ();a8();jZ();u();KZ=class KZ{constructor(Z,$,X){this.iterator=Z,i0.set(this,void 0),this.controller=$,w(this,i0,X,"f")}static fromSSEResponse(Z,$,X){let J=!1,z=X?k(X):console;async function*Y(){if(J)throw new H("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let Q of a6(Z,$)){if(Q.event==="completion")try{yield JSON.parse(Q.data)}catch(W){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),W}if(Q.event==="message_start"||Q.event==="message_delta"||Q.event==="message_stop"||Q.event==="content_block_start"||Q.event==="content_block_delta"||Q.event==="content_block_stop"||Q.event==="message"||Q.event==="user.message"||Q.event==="user.interrupt"||Q.event==="user.tool_confirmation"||Q.event==="user.custom_tool_result"||Q.event==="user.tool_result"||Q.event==="agent.message"||Q.event==="agent.thinking"||Q.event==="agent.tool_use"||Q.event==="agent.tool_result"||Q.event==="agent.mcp_tool_use"||Q.event==="agent.mcp_tool_result"||Q.event==="agent.custom_tool_use"||Q.event==="agent.thread_context_compacted"||Q.event==="session.status_running"||Q.event==="session.status_idle"||Q.event==="session.status_rescheduled"||Q.event==="session.status_terminated"||Q.event==="session.error"||Q.event==="session.deleted"||Q.event==="session.updated"||Q.event==="span.model_request_start"||Q.event==="span.model_request_end"||Q.event==="span.outcome_evaluation_start"||Q.event==="span.outcome_evaluation_ongoing"||Q.event==="span.outcome_evaluation_end"||Q.event==="user.define_outcome"||Q.event==="agent.thread_message_received"||Q.event==="agent.thread_message_sent"||Q.event==="agent.session_thread_message_received"||Q.event==="agent.session_thread_message_sent"||Q.event==="session.thread_created"||Q.event==="session.thread_status_created"||Q.event==="session.thread_status_running"||Q.event==="session.thread_status_idle"||Q.event==="session.thread_status_rescheduled"||Q.event==="session.thread_status_terminated")try{yield JSON.parse(Q.data)}catch(W){throw z.error("Could not parse message into JSON:",Q.data),z.error("From chunk:",Q.raw),W}if(Q.event==="ping")continue;if(Q.event==="error"){let W=v8(Q.data)??Q.data,O=W?.error?.type;throw new v(void 0,W,void 0,Z.headers,O)}}V=!0}catch(Q){if(BZ(Q))return;throw Q}finally{if(!V)$.abort()}}return new KZ(Y,$,X)}static fromReadableStream(Z,$,X){let J=!1;async function*z(){let V=new EZ,Q=u0(Z);for await(let W of Q)for(let O of V.decode(W))yield O;for(let W of V.flush())yield W}async function*Y(){if(J)throw new H("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let V=!1;try{for await(let Q of z()){if(V)continue;if(Q)yield JSON.parse(Q)}V=!0}catch(Q){if(BZ(Q))return;throw Q}finally{if(!V)$.abort()}}return new KZ(Y,$,X)}[(i0=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let Z=[],$=[],X=this.iterator(),J=(z)=>{return{next:()=>{if(z.length===0){let Y=X.next();Z.push(Y),$.push(Y)}return z.shift()}}};return[new KZ(()=>J(Z),this.controller,K(this,i0,"f")),new KZ(()=>J($),this.controller,K(this,i0,"f"))]}toReadableStream(){let Z=this,$;return m$({async start(){$=Z[Symbol.asyncIterator]()},async pull(X){try{let{value:J,done:z}=await $.next();if(z)return X.close();let Y=K0(JSON.stringify(J)+`
|
|
5
|
+
`);X.enqueue(Y)}catch(J){X.error(J)}},async cancel(){await $.return?.()}})}}});async function s8(Z,$){let{response:X,requestLogID:J,retryOfRequestLogID:z,startTime:Y}=$,V=await(async()=>{if($.options.stream){if(k(Z).debug("response",X.status,X.url,X.headers,X.body),$.options.__streamClass)return $.options.__streamClass.fromSSEResponse(X,$.controller);return KZ.fromSSEResponse(X,$.controller)}if(X.status===204)return null;if($.options.__binaryResponse)return X;let W=X.headers.get("content-type")?.split(";")[0]?.trim();if(W?.includes("application/json")||W?.endsWith("+json")){if(X.headers.get("content-length")==="0")return;let N=await X.json();return YX(N,X)}return await X.text()})();return k(Z).debug(`[${J}] response parsed`,FZ({retryOfRequestLogID:z,url:X.url,status:X.status,body:V,durationMs:Date.now()-Y})),V}function YX(Z,$){if(!Z||typeof Z!=="object"||Array.isArray(Z))return Z;return Object.defineProperty(Z,"_request_id",{value:$.headers.get("request-id"),enumerable:!1})}var KX=M(()=>{zX();jZ()});var n0,cZ;var e8=M(()=>{XZ();KX();cZ=class cZ extends Promise{constructor(Z,$,X=s8){super((J)=>{J(null)});this.responsePromise=$,this.parseResponse=X,n0.set(this,void 0),w(this,n0,Z,"f")}_thenUnwrap(Z){return new cZ(K(this,n0,"f"),this.responsePromise,async($,X)=>YX(Z(await this.parseResponse($,X),X),X.response))}asResponse(){return this.responsePromise.then((Z)=>Z.response)}async withResponse(){let[Z,$]=await Promise.all([this.parse(),this.asResponse()]);return{data:Z,response:$,request_id:$.headers.get("request-id")}}parse(){if(!this.parsedPromise)this.parsedPromise=this.responsePromise.then((Z)=>this.parseResponse(K(this,n0,"f"),Z));return this.parsedPromise}then(Z,$){return this.parse().then(Z,$)}catch(Z){return this.parse().catch(Z)}finally(Z){return this.parse().finally(Z)}};n0=new WeakMap});var Z$,QX,$$,MZ,j;var f=M(()=>{XZ();u();KX();e8();CZ();QX=class QX{constructor(Z,$,X,J){Z$.set(this,void 0),w(this,Z$,Z,"f"),this.options=J,this.response=$,this.body=X}hasNextPage(){if(!this.getPaginatedItems().length)return!1;return this.nextPageRequestOptions()!=null}async getNextPage(){let Z=this.nextPageRequestOptions();if(!Z)throw new H("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await K(this,Z$,"f").requestAPIList(this.constructor,Z)}async*iterPages(){let Z=this;yield Z;while(Z.hasNextPage())Z=await Z.getNextPage(),yield Z}async*[(Z$=new WeakMap,Symbol.asyncIterator)](){for await(let Z of this.iterPages())for(let $ of Z.getPaginatedItems())yield $}};$$=class $$ extends cZ{constructor(Z,$,X){super(Z,$,async(J,z)=>new X(J,z.response,await s8(J,z),z.options))}async*[Symbol.asyncIterator](){let Z=await this;for await(let $ of Z)yield $}};MZ=class MZ extends QX{constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.has_more=X.has_more||!1,this.first_id=X.first_id||null,this.last_id=X.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){if(this.has_more===!1)return!1;return super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let $=this.first_id;if(!$)return null;return{...this.options,query:{..._8(this.options.query),before_id:$}}}let Z=this.last_id;if(!Z)return null;return{...this.options,query:{..._8(this.options.query),after_id:Z}}}};j=class j extends QX{constructor(Z,$,X,J){super(Z,$,X,J);this.data=X.data||[],this.next_page=X.next_page||null}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){let Z=this.next_page;if(!Z)return null;return{...this.options,query:{..._8(this.options.query),page:Z}}}}});function uZ(Z,$,X){return GX(),new File(Z,$??"unknown_file",X)}function a0(Z,$){let X=typeof Z==="object"&&Z!==null&&(("name"in Z)&&Z.name&&String(Z.name)||("url"in Z)&&Z.url&&String(Z.url)||("filename"in Z)&&Z.filename&&String(Z.filename)||("path"in Z)&&Z.path&&String(Z.path))||"";return $?X.split(/[\\/]/).pop()||void 0:X}function s6(Z){let $=typeof Z==="function"?Z:Z.fetch,X=x4.get($);if(X)return X;let J=(async()=>{try{let z="Response"in $?$.Response:(await $("data:,")).constructor,Y=new FormData;if(Y.toString()===await new z(Y).text())return!1;return!0}catch{return!0}})();return x4.set($,J),J}var GX=()=>{if(typeof File>"u"){let{process:Z}=globalThis,$=typeof Z?.versions?.node==="string"&&parseInt(Z.versions.node.split("."))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+($?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}},NX=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z[Symbol.asyncIterator]==="function",Q0=async(Z,$,X=!0)=>{return{...Z,body:await e6(Z.body,$,X)}},x4,e6=async(Z,$,X=!0)=>{if(!await s6($))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let J=new FormData;return await Promise.all(Object.entries(Z||{}).map(([z,Y])=>VX(J,z,Y,X))),J},Z9=(Z)=>Z instanceof Blob&&("name"in Z),VX=async(Z,$,X,J)=>{if(X===void 0)return;if(X==null)throw TypeError(`Received null for "${$}"; to pass null in FormData, you must use the string 'null'`);if(typeof X==="string"||typeof X==="number"||typeof X==="boolean")Z.append($,String(X));else if(X instanceof Response){let z={},Y=X.headers.get("Content-Type");if(Y)z={type:Y};Z.append($,uZ([await X.blob()],a0(X,J),z))}else if(NX(X))Z.append($,uZ([await new Response(c8(X)).blob()],a0(X,J)));else if(Z9(X))Z.append($,uZ([X],a0(X,J),{type:X.type}));else if(Array.isArray(X))await Promise.all(X.map((z)=>VX(Z,$+"[]",z,J)));else if(typeof X==="object")await Promise.all(Object.entries(X).map(([z,Y])=>VX(Z,`${$}[${z}]`,Y,J)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${X} instead`)};var V0=M(()=>{J0();x4=new WeakMap});async function X$(Z,$,X){if(GX(),Z=await Z,$||($=a0(Z,!0)),$9(Z)){if(Z instanceof File&&$==null&&X==null)return Z;return uZ([await Z.arrayBuffer()],$??Z.name,{type:Z.type,lastModified:Z.lastModified,...X})}if(X9(Z)){let z=await Z.blob();return $||($=new URL(Z.url).pathname.split(/[\\/]/).pop()),uZ(await UX(z),$,X)}let J=await UX(Z);if(!X?.type){let z=J.find((Y)=>typeof Y==="object"&&("type"in Y)&&Y.type);if(typeof z==="string")X={...X,type:z}}return uZ(J,$,X)}async function UX(Z){let $=[];if(typeof Z==="string"||ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer)$.push(Z);else if(H4(Z))$.push(Z instanceof Blob?Z:await Z.arrayBuffer());else if(NX(Z))for await(let X of Z)$.push(...await UX(X));else{let X=Z?.constructor?.name;throw Error(`Unexpected data type: ${typeof Z}${X?`; constructor: ${X}`:""}${J9(Z)}`)}return $}function J9(Z){if(typeof Z!=="object"||Z===null)return"";return`; props: [${Object.getOwnPropertyNames(Z).map((X)=>`"${X}"`).join(", ")}]`}var H4=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.size==="number"&&typeof Z.type==="string"&&typeof Z.text==="function"&&typeof Z.slice==="function"&&typeof Z.arrayBuffer==="function",$9=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.name==="string"&&typeof Z.lastModified==="number"&&H4(Z),X9=(Z)=>Z!=null&&typeof Z==="object"&&typeof Z.url==="string"&&typeof Z.blob==="function";var B4=M(()=>{V0();V0()});var WX=M(()=>{B4()});var F4=()=>{};class T{constructor(Z){this._client=Z}}var I=()=>{};function*Y9(Z){if(!Z)return;if(T4 in Z){let{values:J,nulls:z}=Z;yield*J.entries();for(let Y of z)yield[Y,null];return}let $=!1,X;if(Z instanceof Headers)X=Z.entries();else if(_$(Z))X=Z;else $=!0,X=Object.entries(Z??{});for(let J of X){let z=J[0];if(typeof z!=="string")throw TypeError("expected header name to be a string");let Y=_$(J[1])?J[1]:[J[1]],V=!1;for(let Q of Y){if(Q===void 0)continue;if($&&!V)V=!0,yield[z,null];yield[z,Q]}}}var T4,G=(Z)=>{let $=new Headers,X=new Set;for(let J of Z){let z=new Set;for(let[Y,V]of Y9(J)){let Q=Y.toLowerCase();if(!z.has(Q))$.delete(Y),z.add(Q);if(V===null)$.delete(Y),X.add(Q);else $.append(Y,V),X.delete(Q)}}return{[T4]:!0,values:$,nulls:X}};var E=M(()=>{CZ();T4=Symbol.for("brand.privateNullableHeaders")});function J$(Z){return typeof Z==="object"&&Z!==null&&r0 in Z}function wX(Z,$){let X=new Set;if(Z){for(let J of Z)if(J$(J))X.add(J[r0])}if($)for(let J of $){if(J$(J))X.add(J[r0]);if(Array.isArray(J.content)){for(let z of J.content)if(J$(z))X.add(z[r0])}}return Array.from(X)}function z$(Z,$){let X=wX(Z,$);if(X.length===0)return{};return{"x-stainless-helper":X.join(", ")}}function D4(Z){if(J$(Z))return{"x-stainless-helper":Z[r0]};return{}}var r0;var o0=M(()=>{r0=Symbol("anthropic.sdk.stainlessHelper")});function L4(Z){return Z.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var A4,K9=(Z=L4)=>function(X,...J){if(X.length===1)return X[0];let z=!1,Y=[],V=X.reduce((x,U,N)=>{if(/[?#]/.test(U))z=!0;let C=J[N],B=(z?encodeURIComponent:Z)(""+C);if(N!==J.length&&(C==null||typeof C==="object"&&C.toString===Object.getPrototypeOf(Object.getPrototypeOf(C.hasOwnProperty??A4)??A4)?.toString))B=C+"",Y.push({start:x.length+U.length,length:B.length,error:`Value of type ${Object.prototype.toString.call(C).slice(8,-1)} is not a valid path parameter`});return x+U+(N===J.length?"":B)},""),Q=V.split(/[?#]/,1)[0],W=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,O;while((O=W.exec(Q))!==null)Y.push({start:O.index,length:O[0].length,error:`Value "${O[0]}" can't be safely passed as a path parameter`});if(Y.sort((x,U)=>x.start-U.start),Y.length>0){let x=0,U=Y.reduce((N,C)=>{let B=" ".repeat(C.start-x),L="^".repeat(C.length);return x=C.start+C.length,N+B+L},"");throw new H(`Path parameters result in path with invalid segments:
|
|
6
|
+
${Y.map((N)=>N.error).join(`
|
|
7
|
+
`)}
|
|
8
|
+
${V}
|
|
9
|
+
${U}`)}return V},q;var _=M(()=>{u();A4=Object.freeze(Object.create(null)),q=K9(L4)});var t0;var qX=M(()=>{I();f();E();o0();V0();_();t0=class t0 extends T{list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/files?beta=true",MZ,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/files/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString()},X?.headers])})}download(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/files/${Z}/content?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},X?.headers]),__binaryResponse:!0})}retrieveMetadata(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/files/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"files-api-2025-04-14"].toString()},X?.headers])})}upload(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/files?beta=true",Q0({body:J,...$,headers:G([{"anthropic-beta":[...X??[],"files-api-2025-04-14"].toString()},D4(J.file),$?.headers])},this._client))}}});var s0;var OX=M(()=>{I();f();E();_();s0=class s0 extends T{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/models/${Z}?beta=true`,{...X,headers:G([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models?beta=true",MZ,{query:J,...$,headers:G([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var e0;var MX=M(()=>{I();f();E();_();e0=class e0 extends T{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/user_profiles?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"user-profiles-2026-03-24"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/user_profiles/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/user_profiles/${Z}?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/user_profiles?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"user-profiles-2026-03-24"].toString()},$?.headers])})}createEnrollmentURL(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/user_profiles/${Z}/enrollment_url?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"user-profiles-2026-03-24"].toString()},X?.headers])})}}});var R4=Y$((j4)=>{Object.defineProperty(j4,"__esModule",{value:!0});j4.timingSafeEqual=void 0;function S4(Z,$=""){if(!Z)throw Error($)}function N9(Z,$){if(Z.byteLength!==$.byteLength)return!1;if(!(Z instanceof DataView))Z=new DataView(ArrayBuffer.isView(Z)?Z.buffer:Z);if(!($ instanceof DataView))$=new DataView(ArrayBuffer.isView($)?$.buffer:$);S4(Z instanceof DataView),S4($ instanceof DataView);let X=Z.byteLength,J=0,z=-1;while(++z<X)J|=Z.getUint8(z)^$.getUint8(z);return J===0}j4.timingSafeEqual=N9});var k4=Y$((QZ)=>{var U9=QZ&&QZ.__extends||function(){var Z=function($,X){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,z){J.__proto__=z}||function(J,z){for(var Y in z)if(z.hasOwnProperty(Y))J[Y]=z[Y]},Z($,X)};return function($,X){Z($,X);function J(){this.constructor=$}$.prototype=X===null?Object.create(X):(J.prototype=X.prototype,new J)}}();Object.defineProperty(QZ,"__esModule",{value:!0});var p=256,CX=function(){function Z($){if($===void 0)$="=";this._paddingCharacter=$}return Z.prototype.encodedLength=function($){if(!this._paddingCharacter)return($*8+5)/6|0;return($+2)/3*4|0},Z.prototype.encode=function($){var X="",J=0;for(;J<$.length-2;J+=3){var z=$[J]<<16|$[J+1]<<8|$[J+2];X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),X+=this._encodeByte(z>>>6&63),X+=this._encodeByte(z>>>0&63)}var Y=$.length-J;if(Y>0){var z=$[J]<<16|(Y===2?$[J+1]<<8:0);if(X+=this._encodeByte(z>>>18&63),X+=this._encodeByte(z>>>12&63),Y===2)X+=this._encodeByte(z>>>6&63);else X+=this._paddingCharacter||"";X+=this._paddingCharacter||""}return X},Z.prototype.maxDecodedLength=function($){if(!this._paddingCharacter)return($*6+7)/8|0;return $/4*3|0},Z.prototype.decodedLength=function($){return this.maxDecodedLength($.length-this._getPaddingLength($))},Z.prototype.decode=function($){if($.length===0)return new Uint8Array(0);var X=this._getPaddingLength($),J=$.length-X,z=new Uint8Array(this.maxDecodedLength(J)),Y=0,V=0,Q=0,W=0,O=0,x=0,U=0;for(;V<J-4;V+=4)W=this._decodeChar($.charCodeAt(V+0)),O=this._decodeChar($.charCodeAt(V+1)),x=this._decodeChar($.charCodeAt(V+2)),U=this._decodeChar($.charCodeAt(V+3)),z[Y++]=W<<2|O>>>4,z[Y++]=O<<4|x>>>2,z[Y++]=x<<6|U,Q|=W&p,Q|=O&p,Q|=x&p,Q|=U&p;if(V<J-1)W=this._decodeChar($.charCodeAt(V)),O=this._decodeChar($.charCodeAt(V+1)),z[Y++]=W<<2|O>>>4,Q|=W&p,Q|=O&p;if(V<J-2)x=this._decodeChar($.charCodeAt(V+2)),z[Y++]=O<<4|x>>>2,Q|=x&p;if(V<J-3)U=this._decodeChar($.charCodeAt(V+3)),z[Y++]=x<<6|U,Q|=U&p;if(Q!==0)throw Error("Base64Coder: incorrect characters for decoding");return z},Z.prototype._encodeByte=function($){var X=$;return X+=65,X+=25-$>>>8&6,X+=51-$>>>8&-75,X+=61-$>>>8&-15,X+=62-$>>>8&3,String.fromCharCode(X)},Z.prototype._decodeChar=function($){var X=p;return X+=(42-$&$-44)>>>8&-p+$-43+62,X+=(46-$&$-48)>>>8&-p+$-47+63,X+=(47-$&$-58)>>>8&-p+$-48+52,X+=(64-$&$-91)>>>8&-p+$-65+0,X+=(96-$&$-123)>>>8&-p+$-97+26,X},Z.prototype._getPaddingLength=function($){var X=0;if(this._paddingCharacter){for(var J=$.length-1;J>=0;J--){if($[J]!==this._paddingCharacter)break;X++}if($.length<4||X>2)throw Error("Base64Coder: incorrect padding")}return X},Z}();QZ.Coder=CX;var Z8=new CX;function W9(Z){return Z8.encode(Z)}QZ.encode=W9;function w9(Z){return Z8.decode(Z)}QZ.decode=w9;var P4=function(Z){U9($,Z);function $(){return Z!==null&&Z.apply(this,arguments)||this}return $.prototype._encodeByte=function(X){var J=X;return J+=65,J+=25-X>>>8&6,J+=51-X>>>8&-75,J+=61-X>>>8&-13,J+=62-X>>>8&49,String.fromCharCode(J)},$.prototype._decodeChar=function(X){var J=p;return J+=(44-X&X-46)>>>8&-p+X-45+62,J+=(94-X&X-96)>>>8&-p+X-95+63,J+=(47-X&X-58)>>>8&-p+X-48+52,J+=(64-X&X-91)>>>8&-p+X-65+0,J+=(96-X&X-123)>>>8&-p+X-97+26,J},$}(CX);QZ.URLSafeCoder=P4;var I4=new P4;function q9(Z){return I4.encode(Z)}QZ.encodeURLSafe=q9;function O9(Z){return I4.decode(Z)}QZ.decodeURLSafe=O9;QZ.encodedLength=function(Z){return Z8.encodedLength(Z)};QZ.maxDecodedLength=function(Z){return Z8.maxDecodedLength(Z)};QZ.decodedLength=function(Z){return Z8.decodedLength(Z)}});var f4=Y$((y4,K$)=>{(function(Z,$){var X={};$(X);var J=X.default;for(var z in X)J[z]=X[z];if(typeof K$==="object"&&typeof K$.exports==="object")K$.exports=J;else if(typeof define==="function"&&define.amd)define(function(){return J});else Z.sha256=J})(y4,function(Z){Z.__esModule=!0,Z.digestLength=32,Z.blockSize=64;var $=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function X(U,N,C,B,L){var D,A,F,h,y,P,l,b,d,g,c,GZ,_Z;while(L>=64){D=N[0],A=N[1],F=N[2],h=N[3],y=N[4],P=N[5],l=N[6],b=N[7];for(g=0;g<16;g++)c=B+g*4,U[g]=(C[c]&255)<<24|(C[c+1]&255)<<16|(C[c+2]&255)<<8|C[c+3]&255;for(g=16;g<64;g++)d=U[g-2],GZ=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,d=U[g-15],_Z=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,U[g]=(GZ+U[g-7]|0)+(_Z+U[g-16]|0);for(g=0;g<64;g++)GZ=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&P^~y&l)|0)+(b+($[g]+U[g]|0)|0)|0,_Z=((D>>>2|D<<30)^(D>>>13|D<<19)^(D>>>22|D<<10))+(D&A^D&F^A&F)|0,b=l,l=P,P=y,y=h+GZ|0,h=F,F=A,A=D,D=GZ+_Z|0;N[0]+=D,N[1]+=A,N[2]+=F,N[3]+=h,N[4]+=y,N[5]+=P,N[6]+=l,N[7]+=b,B+=64,L-=64}return B}var J=function(){function U(){this.digestLength=Z.digestLength,this.blockSize=Z.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return U.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},U.prototype.clean=function(){for(var N=0;N<this.buffer.length;N++)this.buffer[N]=0;for(var N=0;N<this.temp.length;N++)this.temp[N]=0;this.reset()},U.prototype.update=function(N,C){if(C===void 0)C=N.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var B=0;if(this.bytesHashed+=C,this.bufferLength>0){while(this.bufferLength<64&&C>0)this.buffer[this.bufferLength++]=N[B++],C--;if(this.bufferLength===64)X(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(C>=64)B=X(this.temp,this.state,N,B,C),C%=64;while(C>0)this.buffer[this.bufferLength++]=N[B++],C--;return this},U.prototype.finish=function(N){if(!this.finished){var C=this.bytesHashed,B=this.bufferLength,L=C/536870912|0,D=C<<3,A=C%64<56?64:128;this.buffer[B]=128;for(var F=B+1;F<A-8;F++)this.buffer[F]=0;this.buffer[A-8]=L>>>24&255,this.buffer[A-7]=L>>>16&255,this.buffer[A-6]=L>>>8&255,this.buffer[A-5]=L>>>0&255,this.buffer[A-4]=D>>>24&255,this.buffer[A-3]=D>>>16&255,this.buffer[A-2]=D>>>8&255,this.buffer[A-1]=D>>>0&255,X(this.temp,this.state,this.buffer,0,A),this.finished=!0}for(var F=0;F<8;F++)N[F*4+0]=this.state[F]>>>24&255,N[F*4+1]=this.state[F]>>>16&255,N[F*4+2]=this.state[F]>>>8&255,N[F*4+3]=this.state[F]>>>0&255;return this},U.prototype.digest=function(){var N=new Uint8Array(this.digestLength);return this.finish(N),N},U.prototype._saveState=function(N){for(var C=0;C<this.state.length;C++)N[C]=this.state[C]},U.prototype._restoreState=function(N,C){for(var B=0;B<this.state.length;B++)this.state[B]=N[B];this.bytesHashed=C,this.finished=!1,this.bufferLength=0},U}();Z.Hash=J;var z=function(){function U(N){this.inner=new J,this.outer=new J,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var C=new Uint8Array(this.blockSize);if(N.length>this.blockSize)new J().update(N).finish(C).clean();else for(var B=0;B<N.length;B++)C[B]=N[B];for(var B=0;B<C.length;B++)C[B]^=54;this.inner.update(C);for(var B=0;B<C.length;B++)C[B]^=106;this.outer.update(C),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var B=0;B<C.length;B++)C[B]=0}return U.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},U.prototype.clean=function(){for(var N=0;N<this.istate.length;N++)this.ostate[N]=this.istate[N]=0;this.inner.clean(),this.outer.clean()},U.prototype.update=function(N){return this.inner.update(N),this},U.prototype.finish=function(N){if(this.outer.finished)this.outer.finish(N);else this.inner.finish(N),this.outer.update(N,this.digestLength).finish(N);return this},U.prototype.digest=function(){var N=new Uint8Array(this.digestLength);return this.finish(N),N},U}();Z.HMAC=z;function Y(U){var N=new J().update(U),C=N.digest();return N.clean(),C}Z.hash=Y,Z.default=Y;function V(U,N){var C=new z(U).update(N),B=C.digest();return C.clean(),B}Z.hmac=V;function Q(U,N,C,B){var L=B[0];if(L===0)throw Error("hkdf: cannot expand more");if(N.reset(),L>1)N.update(U);if(C)N.update(C);N.update(B),N.finish(U),B[0]++}var W=new Uint8Array(Z.digestLength);function O(U,N,C,B){if(N===void 0)N=W;if(B===void 0)B=32;var L=new Uint8Array([1]),D=V(N,U),A=new z(D),F=new Uint8Array(A.digestLength),h=F.length,y=new Uint8Array(B);for(var P=0;P<B;P++){if(h===F.length)Q(F,A,C,L),h=0;y[P]=F[h++]}return A.clean(),F.fill(0),L.fill(0),y}Z.hkdf=O;function x(U,N,C,B){var L=new z(U),D=L.digestLength,A=new Uint8Array(4),F=new Uint8Array(D),h=new Uint8Array(D),y=new Uint8Array(B);for(var P=0;P*D<B;P++){var l=P+1;A[0]=l>>>24&255,A[1]=l>>>16&255,A[2]=l>>>8&255,A[3]=l>>>0&255,L.reset(),L.update(N),L.update(A),L.finish(h);for(var b=0;b<D;b++)F[b]=h[b];for(var b=2;b<=C;b++){L.reset(),L.update(h).finish(h);for(var d=0;d<D;d++)F[d]^=h[d]}for(var b=0;b<D&&P*D+b<B;b++)y[P*D+b]=F[b]}for(var P=0;P<D;P++)F[P]=h[P]=0;for(var P=0;P<4;P++)A[P]=0;return L.clean(),y}Z.pbkdf2=x})});var v4=Y$((g4)=>{Object.defineProperty(g4,"__esModule",{value:!0});g4.Webhook=g4.WebhookVerificationError=void 0;var M9=R4(),b4=k4(),C9=f4(),h4=300;class xX extends Error{constructor(Z){super(Z);Object.setPrototypeOf(this,xX.prototype),this.name="ExtendableError",this.stack=Error(Z).stack}}class RZ extends xX{constructor(Z){super(Z);Object.setPrototypeOf(this,RZ.prototype),this.name="WebhookVerificationError"}}g4.WebhookVerificationError=RZ;class $8{constructor(Z,$){if(!Z)throw Error("Secret can't be empty.");if(($===null||$===void 0?void 0:$.format)==="raw")if(Z instanceof Uint8Array)this.key=Z;else this.key=Uint8Array.from(Z,(X)=>X.charCodeAt(0));else{if(typeof Z!=="string")throw Error("Expected secret to be of type string");if(Z.startsWith($8.prefix))Z=Z.substring($8.prefix.length);this.key=b4.decode(Z)}}verify(Z,$){let X={};for(let U of Object.keys($))X[U.toLowerCase()]=$[U];let J=X["webhook-id"],z=X["webhook-signature"],Y=X["webhook-timestamp"];if(!z||!J||!Y)throw new RZ("Missing required headers");let V=this.verifyTimestamp(Y),W=this.sign(J,V,Z).split(",")[1],O=z.split(" "),x=new globalThis.TextEncoder;for(let U of O){let[N,C]=U.split(",");if(N!=="v1")continue;if((0,M9.timingSafeEqual)(x.encode(C),x.encode(W)))return JSON.parse(Z.toString())}throw new RZ("No matching signature found")}sign(Z,$,X){if(typeof X==="string");else if(X.constructor.name==="Buffer")X=X.toString();else throw Error("Expected payload to be of type string or Buffer.");let J=new TextEncoder,z=Math.floor($.getTime()/1000),Y=J.encode(`${Z}.${z}.${X}`);return`v1,${b4.encode(C9.hmac(this.key,Y))}`}verifyTimestamp(Z){let $=Math.floor(Date.now()/1000),X=parseInt(Z,10);if(isNaN(X))throw new RZ("Invalid Signature Headers");if($-X>h4)throw new RZ("Message timestamp too old");if(X>$+h4)throw new RZ("Message timestamp too new");return new Date(X*1000)}}g4.Webhook=$8;$8.prefix="whsec_"});var m4,X8;var HX=M(()=>{I();m4=H9(v4(),1);X8=class X8 extends T{unwrap(Z,{headers:$,key:X}){if($!==void 0){let J=X===void 0?this._client.webhookKey:X;if(J===null)throw Error("Webhook key must not be null in order to unwrap");new m4.Webhook(J).verify(Z,$)}return JSON.parse(Z)}}});var J8;var BX=M(()=>{I();f();E();_();J8=class J8 extends T{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/agents/${Z}/versions?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var G0;var FX=M(()=>{I();BX();BX();f();E();_();G0=class G0 extends T{constructor(){super(...arguments);this.versions=new J8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/agents?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J,...z}=$??{};return this._client.get(q`/v1/agents/${Z}?beta=true`,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/agents/${Z}?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/agents?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/agents/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};G0.Versions=J8});function dZ(Z,$){if(!Z)return()=>{};if(Z.aborted)return $.abort(),()=>{};let X=()=>$.abort();return Z.addEventListener("abort",X),()=>Z.removeEventListener("abort",X)}var Q$=()=>{};function PZ(Z,$){return Z instanceof v&&Z.status===$}function c4(Z){return Z instanceof v&&typeof Z.status==="number"&&Z.status>=400&&Z.status<500}function IZ(Z){return c4(Z)&&!PZ(Z,408)&&!PZ(Z,409)&&!PZ(Z,429)}function u4(Z,$,X){return Math.min($*2**Z,X)}function TX(Z,$){return Z+Math.random()*($-Z)}function d4(Z){return Z*(1-Math.random()*0.25)}var z8=M(()=>{u()});function V$(Z,{authToken:$,helper:X}){if(!$)throw new H(`copyClientForHelper: expected a non-empty authToken but received ${JSON.stringify($)}`);let J=Z,z=J._options.defaultHeaders,Y=J._authState?.extraHeaders,V=Y?Object.fromEntries(Object.entries(Y).filter(([W])=>{let O=W.toLowerCase();return O!=="authorization"&&O!=="x-api-key"})):void 0,Q=G([V,z,{"x-stainless-helper":X}]);return Z.withOptions({apiKey:null,authToken:$,baseURL:Z.baseURL,credentials:void 0,defaultHeaders:Q})}var DX=M(()=>{u();E()});function S9(Z){return u4(Z,A9,L9)}function j9(){let $=globalThis.process?.env?.HOSTNAME;return $?`${$}-${$0()}`:$0()}var N0,G$,UZ,N$,U$,W$,Y8,K8,U0,D9=999,A9=1000,L9=60000,pZ;var w$=M(()=>{XZ();u();jZ();X0();g8();Q$();E();z8();DX();z8();pZ=class pZ{constructor(Z){N0.set(this,void 0),G$.set(this,!1),UZ.set(this,void 0),N$.set(this,void 0),U$.set(this,void 0),W$.set(this,void 0),Y8.set(this,void 0),K8.set(this,void 0),U0.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.workerId=Z.workerId??j9(),w(this,N0,V$(Z.client,{authToken:Z.environmentKey,helper:"environments-work-poller"}),"f"),w(this,U$,Z.autoStop??!0,"f"),w(this,W$,Z.drain??!1,"f"),w(this,Y8,Z.blockMs===void 0?D9:Z.blockMs,"f"),w(this,K8,Z.reclaimOlderThanMs??null,"f"),w(this,U0,Z.requestOptions,"f"),w(this,UZ,new AbortController,"f"),w(this,N$,dZ(Z.signal,K(this,UZ,"f")),"f")}get signal(){return K(this,UZ,"f").signal}abort(){K(this,UZ,"f").abort()}async*[(N0=new WeakMap,G$=new WeakMap,UZ=new WeakMap,N$=new WeakMap,U$=new WeakMap,W$=new WeakMap,Y8=new WeakMap,K8=new WeakMap,U0=new WeakMap,Symbol.asyncIterator)](){if(K(this,G$,"f"))throw new H("Cannot iterate over a consumed WorkPoller");w(this,G$,!0,"f");let Z=k(this.client);Z.info("poller starting",{component:"work-poller",environment_id:this.environmentId});try{let $=0;while(!K(this,UZ,"f").signal.aborted){let X;try{X=await K(this,N0,"f").beta.environments.work.poll(this.environmentId,{"Anthropic-Worker-ID":this.workerId,...K(this,Y8,"f")!==null?{block_ms:K(this,Y8,"f")}:{},...K(this,K8,"f")!==null?{reclaim_older_than_ms:K(this,K8,"f")}:{}},{headers:G([K(this,U0,"f")?.headers]),signal:K(this,UZ,"f").signal})}catch(J){if(K(this,UZ,"f").signal.aborted)return;if(IZ(J))throw Z.error("poll failed permanently, stopping poller",{error:String(J)}),J;let z=d4(S9($));Z.warn("poll failed, backing off",{error:String(J),backoff_ms:z}),$++,await qZ(z,K(this,UZ,"f").signal);continue}if($=0,X==null){if(K(this,W$,"f"))return;await qZ(TX(1000,3000),K(this,UZ,"f").signal);continue}Z.info("claimed work",{component:"work-poller",environment_id:this.environmentId,work_id:X.id,work_type:X.data.type});try{await K(this,N0,"f").beta.environments.work.ack(X.id,{environment_id:X.environment_id},{headers:G([K(this,U0,"f")?.headers]),signal:K(this,UZ,"f").signal})}catch(J){Z.error("ack failed",{work_id:X.id,error:String(J)});continue}try{yield X}finally{if(K(this,U$,"f"))try{await K(this,N0,"f").beta.environments.work.stop(X.id,{environment_id:X.environment_id},{headers:G([K(this,U0,"f")?.headers])})}catch(J){if(!PZ(J,409))Z.warn("stop failed",{work_id:X.id,error:String(J)})}}}}finally{K(this,N$,"f").call(this)}}}});class AX{constructor(){W0.set(this,[]),kZ.set(this,[]),w0.set(this,!1)}push(Z){if(K(this,w0,"f"))return!1;let $=K(this,kZ,"f").shift();if($)$({done:!1,value:Z});else K(this,W0,"f").push(Z);return!0}close(){if(K(this,w0,"f"))return;w(this,w0,!0,"f");while(K(this,kZ,"f").length>0)K(this,kZ,"f").shift()({done:!0,value:void 0})}next(Z){if(K(this,W0,"f").length>0)return Promise.resolve({done:!1,value:K(this,W0,"f").shift()});if(K(this,w0,"f")||Z?.aborted)return Promise.resolve({done:!0,value:void 0});return new Promise(($)=>{let X=(z)=>{Z?.removeEventListener("abort",J),$(z)},J=()=>{let z=K(this,kZ,"f").indexOf(X);if(z>=0)K(this,kZ,"f").splice(z,1);$({done:!0,value:void 0})};K(this,kZ,"f").push(X),Z?.addEventListener("abort",J,{once:!0})})}tryShift(){return K(this,W0,"f").shift()}}var W0,kZ,w0;var p4=M(()=>{XZ();W0=new WeakMap,kZ=new WeakMap,w0=new WeakMap});function LX(Z){return"name"in Z?Z.name:Z.mcp_server_name}function E9(Z){return Z instanceof SZ?Z.content:`Error: ${Z instanceof Error?Z.message:String(Z)}`}async function l4(Z,$,X){try{let J=Z.parse?Z.parse($):$;return{content:await Z.run(J,X),isError:!1}}catch(J){return{content:E9(J),isError:!0}}}var i4=M(()=>{v0()});function e4(Z){return Z.type==="session.status_idle"&&Z.stop_reason?.type==="end_turn"}function f9(Z,$,X){if(Z.type==="agent.custom_tool_use")return{type:"user.custom_tool_result",custom_tool_use_id:Z.id,is_error:$,content:X};return{type:"user.tool_result",tool_use_id:Z.id,is_error:$,content:X}}function b9(Z){if(typeof Z==="string")return[{type:"text",text:Z||"(no output)"}];let $=Z.map((X)=>{if(X.type==="text")return{type:"text",text:X.text||"(no output)"};if(X.type==="image"||X.type==="document")return X;if(X.type==="search_result")return{type:"search_result",source:X.source,title:X.title,content:X.content.map((J)=>({type:"text",text:J.text})),citations:{enabled:X.citations?.enabled??!1}};return{type:"text",text:JSON.stringify(X)}});return $.length>0?$:[{type:"text",text:"(no output)"}]}var n,q$,r,O$,V8,C$,e,q0,HZ,lZ,TZ,G8,O0,M$,Z6,n4,a4,r4,SX,Q8,jX,o4,$6,R9="SessionToolRunner",t4=500,P9=1e4,I9=120000,k9=30000,s4=3,y9=60000,iZ;var x$=M(()=>{XZ();u();jZ();X0();z8();Q$();p4();E();i4();iZ=class iZ{constructor(Z,$){n.add(this),q$.set(this,!1),r.set(this,void 0),O$.set(this,void 0),V8.set(this,void 0),C$.set(this,void 0),e.set(this,void 0),q0.set(this,new Set),HZ.set(this,new Set),lZ.set(this,new AX),TZ.set(this,0),G8.set(this,null),O0.set(this,void 0),this.client=$.client,this.sessionId=Z,this.tools=$.tools,this.maxIdleMs=$.maxIdleMs??y9,w(this,e,k($.client),"f"),w(this,C$,new Map($.tools.map((X)=>[LX(X),X])),"f"),w(this,r,new AbortController,"f"),w(this,O$,dZ($.signal,K(this,r,"f")),"f"),w(this,V8,$.requestOptions,"f")}get signal(){return K(this,r,"f").signal}abort(){K(this,r,"f").abort()}async*[(q$=new WeakMap,r=new WeakMap,O$=new WeakMap,V8=new WeakMap,C$=new WeakMap,e=new WeakMap,q0=new WeakMap,HZ=new WeakMap,lZ=new WeakMap,TZ=new WeakMap,G8=new WeakMap,O0=new WeakMap,n=new WeakSet,Symbol.asyncIterator)](){if(K(this,q$,"f"))throw new H("Cannot iterate over a consumed SessionToolRunner");w(this,q$,!0,"f"),K(this,e,"f").info("session tool runner starting",{component:"session-tool-runner",session_id:this.sessionId});let Z=K(this,n,"m",Z6).call(this).catch(($)=>{if(!K(this,r,"f").signal.aborted)K(this,e,"f").error("stream loop failed",{error:String($)});K(this,r,"f").abort()});try{while(!0){let X=await K(this,lZ,"f").next(K(this,r,"f").signal);if(X.done)break;yield X.value}await Z;let $;while(($=K(this,lZ,"f").tryShift())!==void 0)yield $}finally{K(this,r,"f").abort(),K(this,n,"m",Q8).call(this),await Z;try{await K(this,n,"m",$6).call(this)}catch($){K(this,e,"f").warn("drain failed",{error:String($)})}K(this,lZ,"f").close();for(let $ of this.tools)try{await $.close?.()}catch(X){K(this,e,"f").warn("tool.close failed",{tool:LX($),error:String(X)})}K(this,O$,"f").call(this)}}};M$=function(){return{...K(this,V8,"f"),headers:G([{"x-stainless-helper":R9},K(this,V8,"f")?.headers]),signal:K(this,r,"f").signal}},Z6=async function(){let $=K(this,r,"f"),X=t4;while(!$.signal.aborted){try{let J=await this.client.beta.sessions.events.stream(this.sessionId,{},K(this,n,"m",M$).call(this));await K(this,n,"m",n4).call(this);for await(let z of J)if(X=t4,await K(this,n,"m",r4).call(this,z))return}catch(J){if($.signal.throwIfAborted(),IZ(J))throw K(this,e,"f").error("permanent stream failure, shutting down",{error:String(J)}),$.abort(),J;K(this,e,"f").warn("stream disconnected, reconnecting",{error:String(J),backoff_ms:X})}$.signal.throwIfAborted(),await qZ(X,$.signal),X=Math.min(X*2,P9)}},n4=async function(){let $=K(this,r,"f"),X=[],J=!1;try{for await(let Y of this.client.beta.sessions.events.list(this.sessionId,{limit:1000},K(this,n,"m",M$).call(this)))K(this,n,"m",a4).call(this,Y,X),J=e4(Y)}catch(Y){$.signal.throwIfAborted(),K(this,e,"f").warn("reconcile list failed",{error:String(Y)});for(let V of X)K(this,q0,"f").delete(V.id);return}let z=X.filter((Y)=>!K(this,HZ,"f").has(Y.id));if(J&&z.length===0)K(this,n,"m",SX).call(this);else K(this,n,"m",Q8).call(this);for(let Y of z)await K(this,n,"m",jX).call(this,Y)},a4=function($,X){if($.type==="agent.tool_use"||$.type==="agent.custom_tool_use"){if(K(this,q0,"f").add($.id),!K(this,HZ,"f").has($.id))X.push($)}else if($.type==="user.tool_result")K(this,HZ,"f").add($.tool_use_id);else if($.type==="user.custom_tool_result")K(this,HZ,"f").add($.custom_tool_use_id)},r4=async function($){if(e4($))K(this,n,"m",SX).call(this);else K(this,n,"m",Q8).call(this);switch($.type){case"agent.tool_use":case"agent.custom_tool_use":if(!K(this,q0,"f").has($.id))K(this,q0,"f").add($.id),await K(this,n,"m",jX).call(this,$);return!1;case"user.tool_result":return K(this,HZ,"f").add($.tool_use_id),!1;case"user.custom_tool_result":return K(this,HZ,"f").add($.custom_tool_use_id),!1;case"session.status_terminated":case"session.deleted":return K(this,e,"f").info("session terminated",{component:"session-tool-runner",session_id:this.sessionId}),K(this,r,"f").abort(),!0;default:return!1}},SX=function(){if(K(this,n,"m",Q8).call(this),this.maxIdleMs<=0)return;w(this,O0,setTimeout(()=>{K(this,e,"f").info("session idle after end_turn; stopping",{component:"session-tool-runner",session_id:this.sessionId,max_idle_ms:this.maxIdleMs}),K(this,r,"f").abort()},this.maxIdleMs),"f")},Q8=function(){if(K(this,O0,"f")!==void 0)clearTimeout(K(this,O0,"f")),w(this,O0,void 0,"f")},jX=async function($){var X,J;if(K(this,HZ,"f").has($.id))return;K(this,e,"f").info("executing tool",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),w(this,TZ,(X=K(this,TZ,"f"),X++,X),"f");try{let z=K(this,C$,"f").get($.name);if(!z){K(this,e,"f").info("tool not owned by this runner; leaving the tool_use_id pending for its owner",{component:"session-tool-runner",session_id:this.sessionId,tool:$.name,tool_use_id:$.id}),K(this,lZ,"f").push({event:$,toolUseId:$.id,name:$.name,isError:!1,posted:!1});return}let Y,V,Q=new AbortController,W=dZ(K(this,r,"f").signal,Q),O=setTimeout(()=>Q.abort(),I9);try{let N=await l4(z,$.input,{toolUse:$,toolUseBlock:$,signal:Q.signal});Y=N.content,V=N.isError}finally{clearTimeout(O),W()}let x=f9($,V,b9(Y)),U=await K(this,n,"m",o4).call(this,x,$.id);K(this,lZ,"f").push({event:$,result:x,toolUseId:$.id,name:$.name,isError:V,posted:U})}finally{if(w(this,TZ,(J=K(this,TZ,"f"),J--,J),"f"),K(this,TZ,"f")===0)K(this,G8,"f")?.call(this)}},o4=async function($,X){let J=K(this,r,"f"),z;for(let Y=0;Y<s4;Y++){J.signal.throwIfAborted();try{return await this.client.beta.sessions.events.send(this.sessionId,{events:[$]},K(this,n,"m",M$).call(this)),K(this,HZ,"f").add(X),!0}catch(V){if(z=V,IZ(V))break;if(Y<s4-1)await qZ((Y+1)*1000,J.signal)}}return K(this,e,"f").error("failed to send tool result",{tool_use_id:X,error:String(z)}),!1},$6=async function(){if(K(this,TZ,"f")===0)return;if(await Promise.race([new Promise(($)=>w(this,G8,$,"f")),qZ(k9)]),w(this,G8,null,"f"),K(this,TZ,"f")>0)K(this,e,"f").warn("drain timeout exceeded")}});class U8{constructor(Z){H$.add(this),N8.set(this,void 0),this.client=Z.client,this.environmentId=Z.environmentId,this.environmentKey=Z.environmentKey,this.tools=Z.tools,this.workdir=Z.workdir??process.cwd(),this.unrestrictedPaths=Z.unrestrictedPaths,this.maxFileBytes=Z.maxFileBytes,this.maxIdleMs=Z.maxIdleMs,this.workerId=Z.workerId,this.requestOptions=Z.requestOptions,w(this,N8,Z.signal,"f")}async run(Z){let{environmentId:$,environmentKey:X}=this;if($===void 0||X===void 0)throw new H("EnvironmentWorker.run: environmentId and environmentKey are required to poll for work");let J=Z??K(this,N8,"f"),z=new pZ({client:this.client,environmentId:$,environmentKey:X,...this.workerId!==void 0?{workerId:this.workerId}:{},...J?{signal:J}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},autoStop:!1});for await(let Y of z)await K(this,H$,"m",EX).call(this,Y,X,z.signal)}async handleItem(Z){let $=Z?.workId??S("ANTHROPIC_WORK_ID"),X=Z?.environmentId??S("ANTHROPIC_ENVIRONMENT_ID"),J=Z?.sessionId??S("ANTHROPIC_SESSION_ID"),z=Z?.environmentKey??this.environmentKey??S("ANTHROPIC_ENVIRONMENT_KEY");if(!$)throw new H("handleItem: workId is required — pass it or set ANTHROPIC_WORK_ID");if(!X)throw new H("handleItem: environmentId is required — pass it or set ANTHROPIC_ENVIRONMENT_ID");if(!J)throw new H("handleItem: sessionId is required — pass it or set ANTHROPIC_SESSION_ID");if(!z)throw new H("handleItem: environmentKey is required — pass it, construct the worker with it, or set ANTHROPIC_ENVIRONMENT_KEY");let Y={id:$,environment_id:X,data:{type:"session",id:J}};await K(this,H$,"m",EX).call(this,Y,z,Z?.signal??K(this,N8,"f"))}}async function g9(Z,$,X,J){try{await Z.beta.environments.work.stop($.id,{environment_id:$.environment_id,force:!0},{...J,headers:G([J?.headers])})}catch(z){if(!PZ(z,409))X.error("force-stop on exit failed",{work_id:$.id,error:String(z)})}}async function _9(Z,$,X,J,z){let Y=X6,V=h9,Q=async()=>{try{let W=await Z.beta.environments.work.heartbeat($.id,{environment_id:$.environment_id,expected_last_heartbeat:V},{...z,headers:G([z?.headers]),signal:X.signal});if(V=W.last_heartbeat,W.ttl_seconds>0)Y=Math.max(1000,Math.min(W.ttl_seconds*1000/2,X6));if(W.state==="stopping"||W.state==="stopped")J.info("heartbeat signals shutdown",{work_id:$.id,state:W.state}),X.abort();if(!W.lease_extended)J.warn("lease not extended, shutting down",{work_id:$.id}),X.abort()}catch(W){if(X.signal.throwIfAborted(),IZ(W))throw J.error("permanent heartbeat failure",{work_id:$.id,error:String(W)}),X.abort(),W;J.warn("transient heartbeat failure",{work_id:$.id,error:String(W)})}};await Q();while(!X.signal.aborted)await qZ(Y,X.signal),X.signal.throwIfAborted(),await Q()}var H$,N8,EX,X6=30000,h9="NO_HEARTBEAT";var RX=M(()=>{XZ();u();jZ();p0();X0();z8();Q$();E();x$();w$();DX();N8=new WeakMap,H$=new WeakSet,EX=async function($,X,J){let z=k(this.client),Y=V$(this.client,{authToken:X,helper:"environments-worker"}),V=$.data.id,Q={workdir:this.workdir,client:this.client,sessionId:V,...this.unrestrictedPaths!==void 0?{unrestrictedPaths:this.unrestrictedPaths}:{},...this.maxFileBytes!==void 0?{maxFileBytes:this.maxFileBytes}:{}},W=await import("./node-0.6.2-40bknjza.mjs"),O=async()=>{};try{O=await W.setupSkills(Q)}catch(B){z.warn("skill setup failed",{session_id:V,work_id:$.id,error:String(B)})}let x=typeof this.tools==="function"?this.tools(Q):this.tools??W.betaAgentToolset20260401(Q),U=new AbortController,N=dZ(J,U),C=_9(Y,$,U,z,this.requestOptions).catch((B)=>{if(!U.signal.aborted)z.error("heartbeat loop failed",{work_id:$.id,error:String(B)});U.abort()});try{let B=new iZ(V,{client:Y,tools:x,...this.maxIdleMs!==void 0?{maxIdleMs:this.maxIdleMs}:{},...this.requestOptions!==void 0?{requestOptions:this.requestOptions}:{},signal:U.signal});for await(let L of B);}finally{U.abort(),N(),await C,await O().catch((B)=>{z.warn("skill cleanup failed",{session_id:V,work_id:$.id,error:String(B)})}),await g9(Y,$,z,this.requestOptions)}}});var nZ;var PX=M(()=>{I();f();E();_();w$();RX();w$();RX();nZ=class nZ extends T{retrieve(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.get(q`/v1/environments/${J}/work/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{environment_id:J,betas:z,...Y}=$;return this._client.post(q`/v1/environments/${J}/work/${Z}?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/environments/${Z}/work?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}ack(Z,$,X){let{environment_id:J,betas:z}=$;return this._client.post(q`/v1/environments/${J}/work/${Z}/ack?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}heartbeat(Z,$,X){let{environment_id:J,desired_ttl_seconds:z,expected_last_heartbeat:Y,betas:V}=$;return this._client.post(q`/v1/environments/${J}/work/${Z}/heartbeat?beta=true`,{query:{desired_ttl_seconds:z,expected_last_heartbeat:Y},...X,headers:G([{"anthropic-beta":[...V??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poll(Z,$={},X){let{betas:J,"Anthropic-Worker-ID":z,...Y}=$??{};return this._client.get(q`/v1/environments/${Z}/work/poll?beta=true`,{query:Y,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString(),...z!=null?{"Anthropic-Worker-ID":z}:void 0},X?.headers])})}stats(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/environments/${Z}/work/stats?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stop(Z,$,X){let{environment_id:J,betas:z,...Y}=$;return this._client.post(q`/v1/environments/${J}/work/${Z}/stop?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}poller(Z){return new pZ({...Z,client:this._client})}worker(Z){return new U8({...Z,client:this._client})}};nZ.WorkPoller=pZ;nZ.EnvironmentWorker=U8});var M0;var IX=M(()=>{I();PX();PX();f();E();_();M0=class M0 extends T{constructor(){super(...arguments);this.work=new nZ(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/environments?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/environments/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/environments/${Z}?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/environments?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/environments/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/environments/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};M0.Work=nZ});var W8;var kX=M(()=>{I();f();E();_();W8=class W8 extends T{create(Z,$,X){let{view:J,betas:z,...Y}=$;return this._client.post(q`/v1/memory_stores/${Z}/memories?beta=true`,{query:{view:J},body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Y}=$;return this._client.get(q`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{memory_store_id:J,view:z,betas:Y,...V}=$;return this._client.post(q`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{view:z},body:V,...X,headers:G([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/memory_stores/${Z}/memories?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{memory_store_id:J,expected_content_sha256:z,betas:Y}=$;return this._client.delete(q`/v1/memory_stores/${J}/memories/${Z}?beta=true`,{query:{expected_content_sha256:z},...X,headers:G([{"anthropic-beta":[...Y??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var w8;var yX=M(()=>{I();f();E();_();w8=class w8 extends T{retrieve(Z,$,X){let{memory_store_id:J,betas:z,...Y}=$;return this._client.get(q`/v1/memory_stores/${J}/memory_versions/${Z}?beta=true`,{query:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/memory_stores/${Z}/memory_versions?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}redact(Z,$,X){let{memory_store_id:J,betas:z}=$;return this._client.post(q`/v1/memory_stores/${J}/memory_versions/${Z}/redact?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var aZ;var fX=M(()=>{I();kX();kX();yX();yX();f();E();_();aZ=class aZ extends T{constructor(){super(...arguments);this.memories=new W8(this._client),this.memoryVersions=new w8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/memory_stores?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/memory_stores/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/memory_stores/${Z}?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/memory_stores?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/memory_stores/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/memory_stores/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};aZ.Memories=W8;aZ.MemoryVersions=w8});var C0=M(()=>{u()});var x0;var bX=M(()=>{u();J0();JX();x0=class x0{constructor(Z,$){this.iterator=Z,this.controller=$}async*decoder(){let Z=new EZ;for await(let $ of this.iterator)for(let X of Z.decode($))yield JSON.parse(X);for(let $ of Z.flush())yield JSON.parse($)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(Z,$){if(!Z.body){if($.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new H("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new H("Attempted to iterate over a response with no body")}return new x0(u0(Z.body),$)}}});var q8;var hX=M(()=>{I();f();E();bX();C0();_();q8=class q8 extends T{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/messages/batches?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/messages/batches/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/messages/batches?beta=true",MZ,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"message-batches-2024-09-24"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/messages/batches/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}cancel(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/messages/batches/${Z}/cancel?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"message-batches-2024-09-24"].toString()},X?.headers])})}async results(Z,$={},X){let J=await this.retrieve(Z);if(!J.results_url)throw new H(`No batch \`results_url\`; Has it finished processing? ${J.processing_status} - ${J.id}`);let{betas:z}=$??{};return this._client.get(J.results_url,{...X,headers:G([{"anthropic-beta":[...z??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},X?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((Y,V)=>x0.fromResponse(V.response,V.controller))}}});var B$;var gX=M(()=>{B$={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192}});function J6(Z){return Z?.output_format??Z?.output_config?.format}function _X(Z,$,X){let J=J6($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text"){let Y=Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(Y,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return z}),parsed_output:null};return vX(Z,$,X)}function vX(Z,$,X){let J=null,z=Z.content.map((Y)=>{if(Y.type==="text"){let V=l9($,Y.text);if(J===null)J=V;let Q=Object.defineProperty({...Y},"parsed_output",{value:V,enumerable:!1});return Object.defineProperty(Q,"parsed",{get(){return X.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),V},enumerable:!1})}return Y});return{...Z,content:z,parsed_output:J}}function l9(Z,$){let X=J6(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new H(`Failed to parse structured output: ${J}`)}}var mX=M(()=>{u()});var i9=(Z)=>{let $=0,X=[];while($<Z.length){let J=Z[$];if(J==="\\"){$++;continue}if(J==="{"){X.push({type:"brace",value:"{"}),$++;continue}if(J==="}"){X.push({type:"brace",value:"}"}),$++;continue}if(J==="["){X.push({type:"paren",value:"["}),$++;continue}if(J==="]"){X.push({type:"paren",value:"]"}),$++;continue}if(J===":"){X.push({type:"separator",value:":"}),$++;continue}if(J===","){X.push({type:"delimiter",value:","}),$++;continue}if(J==='"'){let Q="",W=!1;J=Z[++$];while(J!=='"'){if($===Z.length){W=!0;break}if(J==="\\"){if($++,$===Z.length){W=!0;break}Q+=J+Z[$],J=Z[++$]}else Q+=J,J=Z[++$]}if(J=Z[++$],!W)X.push({type:"string",value:Q});continue}if(J&&/\s/.test(J)){$++;continue}let Y=/[0-9]/;if(J&&Y.test(J)||J==="-"||J==="."){let Q="";if(J==="-")Q+=J,J=Z[++$];while(J&&Y.test(J)||J===".")Q+=J,J=Z[++$];X.push({type:"number",value:Q});continue}let V=/[a-z]/i;if(J&&V.test(J)){let Q="";while(J&&V.test(J)){if($===Z.length)break;Q+=J,J=Z[++$]}if(Q=="true"||Q=="false"||Q==="null")X.push({type:"name",value:Q});else{$++;continue}continue}$++}return X},H0=(Z)=>{if(Z.length===0)return Z;let $=Z[Z.length-1];switch($.type){case"separator":return Z=Z.slice(0,Z.length-1),H0(Z);break;case"number":let X=$.value[$.value.length-1];if(X==="."||X==="-")return Z=Z.slice(0,Z.length-1),H0(Z);case"string":let J=Z[Z.length-2];if(J?.type==="delimiter")return Z=Z.slice(0,Z.length-1),H0(Z);else if(J?.type==="brace"&&J.value==="{")return Z=Z.slice(0,Z.length-1),H0(Z);break;case"delimiter":return Z=Z.slice(0,Z.length-1),H0(Z);break}return Z},n9=(Z)=>{let $=[];if(Z.map((X)=>{if(X.type==="brace")if(X.value==="{")$.push("}");else $.splice($.lastIndexOf("}"),1);if(X.type==="paren")if(X.value==="[")$.push("]");else $.splice($.lastIndexOf("]"),1)}),$.length>0)$.reverse().map((X)=>{if(X==="}")Z.push({type:"brace",value:"}"});else if(X==="]")Z.push({type:"paren",value:"]"})});return Z},a9=(Z)=>{let $="";return Z.map((X)=>{switch(X.type){case"string":$+='"'+X.value+'"';break;default:$+=X.value;break}}),$},F$=(Z)=>JSON.parse(a9(n9(H0(i9(Z)))));var cX=()=>{};var uX=M(()=>{zX()});function Q6(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"||Z.type==="mcp_tool_use"}function V6(Z){}var WZ,yZ,B0,O8,T$,M8,C8,D$,x8,DZ,H8,A$,L$,rZ,S$,j$,B8,dX,z6,E$,pX,lX,iX,Y6,K6="__json_buf",F8;var G6=M(()=>{XZ();cX();C0();Z0();uX();mX();F8=class F8{constructor(Z,$){WZ.add(this),this.messages=[],this.receivedMessages=[],yZ.set(this,void 0),B0.set(this,null),this.controller=new AbortController,O8.set(this,void 0),T$.set(this,()=>{}),M8.set(this,()=>{}),C8.set(this,void 0),D$.set(this,()=>{}),x8.set(this,()=>{}),DZ.set(this,{}),H8.set(this,!1),A$.set(this,!1),L$.set(this,!1),rZ.set(this,!1),S$.set(this,void 0),j$.set(this,void 0),B8.set(this,void 0),E$.set(this,(X)=>{if(w(this,A$,!0,"f"),BZ(X))X=new t;if(X instanceof t)return w(this,L$,!0,"f"),this._emit("abort",X);if(X instanceof H)return this._emit("error",X);if(X instanceof Error){let J=new H(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new H(String(X)))}),w(this,O8,new Promise((X,J)=>{w(this,T$,X,"f"),w(this,M8,J,"f")}),"f"),w(this,C8,new Promise((X,J)=>{w(this,D$,X,"f"),w(this,x8,J,"f")}),"f"),K(this,O8,"f").catch(()=>{}),K(this,C8,"f").catch(()=>{}),w(this,B0,Z,"f"),w(this,B8,$?.logger??console,"f")}get response(){return K(this,S$,"f")}get request_id(){return K(this,j$,"f")}async withResponse(){w(this,rZ,!0,"f");let Z=await K(this,O8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id")}}static fromReadableStream(Z){let $=new F8(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new F8($,{logger:J});for(let Y of $.messages)z._addMessageParam(Y);return w(z,B0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,"X-Stainless-Helper-Method":"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},K(this,E$,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{K(this,WZ,"m",pX).call(this);let{response:Y,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Y);for await(let Q of V)K(this,WZ,"m",lX).call(this,Q);if(V.controller.signal?.aborted)throw new t;K(this,WZ,"m",iX).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;w(this,S$,Z,"f"),w(this,j$,Z?.headers.get("request-id"),"f"),K(this,T$,"f").call(this,Z),this._emit("connect")}get ended(){return K(this,H8,"f")}get errored(){return K(this,A$,"f")}get aborted(){return K(this,L$,"f")}abort(){this.controller.abort()}on(Z,$){return(K(this,DZ,"f")[Z]||(K(this,DZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=K(this,DZ,"f")[Z];if(!X)return this;let J=X.findIndex((z)=>z.listener===$);if(J>=0)X.splice(J,1);return this}once(Z,$){return(K(this,DZ,"f")[Z]||(K(this,DZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(w(this,rZ,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){w(this,rZ,!0,"f"),await K(this,C8,"f")}get currentMessage(){return K(this,yZ,"f")}async finalMessage(){return await this.done(),K(this,WZ,"m",dX).call(this)}async finalText(){return await this.done(),K(this,WZ,"m",z6).call(this)}_emit(Z,...$){if(K(this,H8,"f"))return;if(Z==="end")w(this,H8,!0,"f"),K(this,D$,"f").call(this);let X=K(this,DZ,"f")[Z];if(X)K(this,DZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!K(this,rZ,"f")&&!X?.length)Promise.reject(J);K(this,M8,"f").call(this,J),K(this,x8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!K(this,rZ,"f")&&!X?.length)Promise.reject(J);K(this,M8,"f").call(this,J),K(this,x8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",K(this,WZ,"m",dX).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{K(this,WZ,"m",pX).call(this),this._connected(null);let z=KZ.fromReadableStream(Z,this.controller);for await(let Y of z)K(this,WZ,"m",lX).call(this,Y);if(z.controller.signal?.aborted)throw new t;K(this,WZ,"m",iX).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(yZ=new WeakMap,B0=new WeakMap,O8=new WeakMap,T$=new WeakMap,M8=new WeakMap,C8=new WeakMap,D$=new WeakMap,x8=new WeakMap,DZ=new WeakMap,H8=new WeakMap,A$=new WeakMap,L$=new WeakMap,rZ=new WeakMap,S$=new WeakMap,j$=new WeakMap,B8=new WeakMap,E$=new WeakMap,WZ=new WeakSet,dX=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},z6=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((X)=>X.type==="text").map((X)=>X.text);if($.length===0)throw new H("stream ended without producing a content block with type=text");return $.join(" ")},pX=function(){if(this.ended)return;w(this,yZ,void 0,"f")},lX=function($){if(this.ended)return;let X=K(this,WZ,"m",Y6).call(this,$);switch(this._emit("streamEvent",$,X),$.type){case"content_block_delta":{let J=X.content.at(-1);switch($.delta.type){case"text_delta":{if(J.type==="text")this._emit("text",$.delta.text,J.text||"");break}case"citations_delta":{if(J.type==="text")this._emit("citation",$.delta.citation,J.citations??[]);break}case"input_json_delta":{if(Q6(J)&&J.input)this._emit("inputJson",$.delta.partial_json,J.input);break}case"thinking_delta":{if(J.type==="thinking")this._emit("thinking",$.delta.thinking,J.thinking);break}case"signature_delta":{if(J.type==="thinking")this._emit("signature",J.signature);break}case"compaction_delta":{if(J.type==="compaction"&&J.content)this._emit("compaction",J.content);break}default:V6($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(_X(X,K(this,B0,"f"),{logger:K(this,B8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{w(this,yZ,X,"f");break}case"content_block_start":case"message_delta":break}},iX=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=K(this,yZ,"f");if(!$)throw new H("request ended without sending any chunks");return w(this,yZ,void 0,"f"),_X($,K(this,B0,"f"),{logger:K(this,B8,"f")})},Y6=function($){let X=K(this,yZ,"f");if($.type==="message_start"){if(X)throw new H(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new H(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.container=$.delta.container,X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,X.usage.output_tokens=$.usage.output_tokens,X.context_management=$.context_management,$.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;if($.usage.iterations!=null)X.usage.iterations=$.usage.iterations;return X;case"content_block_start":return X.content.push($.content_block),X;case"content_block_delta":{let J=X.content.at($.index);switch($.delta.type){case"text_delta":{if(J?.type==="text")X.content[$.index]={...J,text:(J.text||"")+$.delta.text};break}case"citations_delta":{if(J?.type==="text")X.content[$.index]={...J,citations:[...J.citations??[],$.delta.citation]};break}case"input_json_delta":{if(J&&Q6(J)){let z=J[K6]||"";z+=$.delta.partial_json;let Y={...J};if(Object.defineProperty(Y,K6,{value:z,enumerable:!1,writable:!0}),z)try{Y.input=F$(z)}catch(V){let Q=new H(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${V}. JSON: ${z}`);K(this,E$,"f").call(this,Q)}X.content[$.index]=Y}break}case"thinking_delta":{if(J?.type==="thinking")X.content[$.index]={...J,thinking:J.thinking+$.delta.thinking};break}case"signature_delta":{if(J?.type==="thinking")X.content[$.index]={...J,signature:$.delta.signature};break}case"compaction_delta":{if(J?.type==="compaction")X.content[$.index]={...J,content:(J.content||"")+$.delta.content,encrypted_content:$.delta.encrypted_content};break}default:V6($.delta)}return X}case"content_block_stop":return X}},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,Y)=>$.push({resolve:z,reject:Y})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new KZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var N6=1e5,U6=`You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:
|
|
10
|
+
1. Task Overview
|
|
11
|
+
The user's core request and success criteria
|
|
12
|
+
Any clarifications or constraints they specified
|
|
13
|
+
2. Current State
|
|
14
|
+
What has been completed so far
|
|
15
|
+
Files created, modified, or analyzed (with paths if relevant)
|
|
16
|
+
Key outputs or artifacts produced
|
|
17
|
+
3. Important Discoveries
|
|
18
|
+
Technical constraints or requirements uncovered
|
|
19
|
+
Decisions made and their rationale
|
|
20
|
+
Errors encountered and how they were resolved
|
|
21
|
+
What approaches were tried that didn't work (and why)
|
|
22
|
+
4. Next Steps
|
|
23
|
+
Specific actions needed to complete the task
|
|
24
|
+
Any blockers or open questions to resolve
|
|
25
|
+
Priority order if multiple steps remain
|
|
26
|
+
5. Context to Preserve
|
|
27
|
+
User preferences or style requirements
|
|
28
|
+
Domain-specific details that aren't obvious
|
|
29
|
+
Any promises made to the user
|
|
30
|
+
Be concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.
|
|
31
|
+
Wrap your summary in <summary></summary> tags.`;var W6=()=>{};async function r9(Z,$=Z.messages.at(-1),X){if(!$||$.role!=="assistant"||!$.content||typeof $.content==="string")return null;let J=$.content.filter((Y)=>Y.type==="tool_use");if(J.length===0)return null;return{role:"user",content:await Promise.all(J.map(async(Y)=>{let V=Z.tools.find((Q)=>("name"in Q?Q.name:Q.mcp_server_name)===Y.name);if(!V||!("run"in V))return{type:"tool_result",tool_use_id:Y.id,content:`Error: Tool '${Y.name}' not found`,is_error:!0};try{let Q=Y.input;if("parse"in V&&V.parse)Q=V.parse(Q);let W=await V.run(Q,{toolUse:Y,toolUseBlock:Y,signal:X?.signal});return{type:"tool_result",tool_use_id:Y.id,content:W}}catch(Q){return{type:"tool_result",tool_use_id:Y.id,content:Q instanceof SZ?Q.content:`Error: ${Q instanceof Error?Q.message:String(Q)}`,is_error:!0}}}))}}var T8,F0,oZ,a,$Z,VZ,AZ,fZ,D8,w6,nX,A8;var aX=M(()=>{XZ();v0();u();E();T1();W6();o0();A8=class A8{constructor(Z,$,X){T8.add(this),this.client=Z,F0.set(this,!1),oZ.set(this,!1),a.set(this,void 0),$Z.set(this,void 0),VZ.set(this,void 0),AZ.set(this,void 0),fZ.set(this,void 0),D8.set(this,0),w(this,a,{params:{...$,messages:structuredClone($.messages)}},"f");let z=["BetaToolRunner",...wX($.tools,$.messages)].join(", ");if(w(this,$Z,{...X,headers:G([{"x-stainless-helper":z},X?.headers])},"f"),w(this,fZ,g$(),"f"),$.compactionControl?.enabled)console.warn('Anthropic: The `compactionControl` parameter is deprecated and will be removed in a future version. Use server-side compaction instead by passing `edits: [{ type: "compact_20260112" }]` in the params passed to `toolRunner()`. See https://platform.claude.com/docs/en/build-with-claude/compaction')}async*[(F0=new WeakMap,oZ=new WeakMap,a=new WeakMap,$Z=new WeakMap,VZ=new WeakMap,AZ=new WeakMap,fZ=new WeakMap,D8=new WeakMap,T8=new WeakSet,w6=async function(){let $=K(this,a,"f").params.compactionControl;if(!$||!$.enabled)return!1;let X=0;if(K(this,VZ,"f")!==void 0)try{let W=await K(this,VZ,"f");X=W.usage.input_tokens+(W.usage.cache_creation_input_tokens??0)+(W.usage.cache_read_input_tokens??0)+W.usage.output_tokens}catch{return!1}let J=$.contextTokenThreshold??N6;if(X<J)return!1;let z=$.model??K(this,a,"f").params.model,Y=$.summaryPrompt??U6,V=K(this,a,"f").params.messages;if(V[V.length-1].role==="assistant"){let W=V[V.length-1];if(Array.isArray(W.content)){let O=W.content.filter((x)=>x.type!=="tool_use");if(O.length===0)V.pop();else W.content=O}}let Q=await this.client.beta.messages.create({model:z,messages:[...V,{role:"user",content:[{type:"text",text:Y}]}],max_tokens:K(this,a,"f").params.max_tokens},{signal:K(this,$Z,"f").signal,headers:G([K(this,$Z,"f").headers,{"x-stainless-helper":"compaction"}])});if(Q.content[0]?.type!=="text")throw new H("Expected text response for compaction");return K(this,a,"f").params.messages=[{role:"user",content:Q.content}],!0},Symbol.asyncIterator)](){var Z;if(K(this,F0,"f"))throw new H("Cannot iterate over a consumed stream");w(this,F0,!0,"f"),w(this,oZ,!0,"f"),w(this,AZ,void 0,"f");try{while(!0){let $;try{if(K(this,a,"f").params.max_iterations&&K(this,D8,"f")>=K(this,a,"f").params.max_iterations)break;w(this,oZ,!1,"f"),w(this,AZ,void 0,"f"),w(this,D8,(Z=K(this,D8,"f"),Z++,Z),"f"),w(this,VZ,void 0,"f");let{max_iterations:X,compactionControl:J,...z}=K(this,a,"f").params;if(z.stream)$=this.client.beta.messages.stream({...z},K(this,$Z,"f")),w(this,VZ,$.finalMessage(),"f"),K(this,VZ,"f").catch(()=>{}),yield $;else w(this,VZ,this.client.beta.messages.create({...z,stream:!1},K(this,$Z,"f")),"f"),yield K(this,VZ,"f");if(!await K(this,T8,"m",w6).call(this)){if(!K(this,oZ,"f")){let{role:Q,content:W}=await K(this,VZ,"f");K(this,a,"f").params.messages.push({role:Q,content:W})}let V=await K(this,T8,"m",nX).call(this,K(this,a,"f").params.messages.at(-1));if(V)K(this,a,"f").params.messages.push(V);else if(!K(this,oZ,"f"))break}}finally{if($)$.abort()}}if(!K(this,VZ,"f"))throw new H("ToolRunner concluded without a message from the server");K(this,fZ,"f").resolve(await K(this,VZ,"f"))}catch($){throw w(this,F0,!1,"f"),K(this,fZ,"f").promise.catch(()=>{}),K(this,fZ,"f").reject($),w(this,fZ,g$(),"f"),$}}setMessagesParams(Z){if(typeof Z==="function")K(this,a,"f").params=Z(K(this,a,"f").params);else K(this,a,"f").params=Z;w(this,oZ,!0,"f"),w(this,AZ,void 0,"f")}setRequestOptions(Z){if(typeof Z==="function")w(this,$Z,Z(K(this,$Z,"f")),"f");else w(this,$Z,{...K(this,$Z,"f"),...Z},"f")}async generateToolResponse(Z=K(this,$Z,"f").signal){let $=await K(this,VZ,"f")??this.params.messages.at(-1);if(!$)return null;return K(this,T8,"m",nX).call(this,$,Z)}done(){return K(this,fZ,"f").promise}async runUntilDone(){if(!K(this,F0,"f"))for await(let Z of this);return this.done()}get params(){return K(this,a,"f").params}pushMessages(...Z){this.setMessagesParams(($)=>({...$,messages:[...$.messages,...Z]}))}then(Z,$){return this.runUntilDone().then(Z,$)}};nX=async function($,X=K(this,$Z,"f").signal){if(K(this,AZ,"f")!==void 0)return K(this,AZ,"f");return w(this,AZ,r9(K(this,a,"f").params,$,{...K(this,$Z,"f"),signal:X}),"f"),K(this,AZ,"f")}});function O6(Z){if(!Z.output_format)return Z;if(Z.output_config?.format)throw new H("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:$,...X}=Z;return{...X,output_config:{...Z.output_config,format:$}}}var q6,o9,bZ;var rX=M(()=>{C0();hX();I();gX();E();o0();mX();G6();aX();v0();hX();aX();v0();q6={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026"},o9=["claude-mythos-preview","claude-opus-4-6"];bZ=class bZ extends T{constructor(){super(...arguments);this.batches=new q8(this._client)}create(Z,$){let X=O6(Z),{betas:J,...z}=X;if(z.model in q6)console.warn(`The model '${z.model}' is deprecated and will reach end-of-life on ${q6[z.model]}
|
|
32
|
+
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(o9.includes(z.model)&&z.thinking&&z.thinking.type==="enabled")console.warn(`Using Claude with ${z.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let Y=this._client._options.timeout;if(!z.stream&&Y==null){let Q=B$[z.model]??void 0;Y=this._client.calculateNonstreamingTimeout(z.max_tokens,Q)}let V=z$(z.tools,z.messages);return this._client.post("/v1/messages?beta=true",{body:z,timeout:Y??600000,...$,headers:G([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},V,$?.headers]),stream:X.stream??!1})}parse(Z,$){return $={...$,headers:G([{"anthropic-beta":[...Z.betas??[],"structured-outputs-2025-12-15"].toString()},$?.headers])},this.create(Z,$).then((X)=>vX(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return F8.createMessage(this,Z,$)}countTokens(Z,$){let X=O6(Z),{betas:J,...z}=X;return this._client.post("/v1/messages/count_tokens?beta=true",{body:z,...$,headers:G([{"anthropic-beta":[...J??[],"token-counting-2024-11-01"].toString()},$?.headers])})}toolRunner(Z,$){return new A8(this._client,Z,$)}};bZ.Batches=q8;bZ.BetaToolRunner=A8;bZ.ToolError=SZ});var T0;var oX=M(()=>{I();f();E();_();x$();x$();T0=class T0 extends T{list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/sessions/${Z}/events?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}send(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/sessions/${Z}/events?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/sessions/${Z}/events/stream?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}toolRunner(Z,$){return new iZ(Z,{...$,client:this._client})}};T0.SessionToolRunner=iZ});var L8;var tX=M(()=>{I();f();E();_();L8=class L8 extends T{retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(q`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{session_id:J,betas:z,...Y}=$;return this._client.post(q`/v1/sessions/${J}/resources/${Z}?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/sessions/${Z}/resources?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{session_id:J,betas:z}=$;return this._client.delete(q`/v1/sessions/${J}/resources/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}add(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/sessions/${Z}/resources?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var S8;var sX=M(()=>{I();f();E();_();S8=class S8 extends T{list(Z,$,X){let{session_id:J,betas:z,...Y}=$;return this._client.getAPIList(q`/v1/sessions/${J}/threads/${Z}/events?beta=true`,j,{query:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}stream(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(q`/v1/sessions/${J}/threads/${Z}/stream?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers]),stream:!0})}}});var D0;var eX=M(()=>{I();sX();sX();f();E();_();D0=class D0 extends T{constructor(){super(...arguments);this.events=new S8(this._client)}retrieve(Z,$,X){let{session_id:J,betas:z}=$;return this._client.get(q`/v1/sessions/${J}/threads/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/sessions/${Z}/threads?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{session_id:J,betas:z}=$;return this._client.post(q`/v1/sessions/${J}/threads/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};D0.Events=S8});var hZ;var Z1=M(()=>{I();oX();oX();tX();tX();eX();eX();f();E();_();hZ=class hZ extends T{constructor(){super(...arguments);this.events=new T0(this._client),this.resources=new L8(this._client),this.threads=new D0(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/sessions?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/sessions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/sessions/${Z}?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/sessions?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/sessions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/sessions/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};hZ.Events=T0;hZ.Resources=L8;hZ.Threads=D0});var j8;var $1=M(()=>{I();f();E();V0();_();j8=class j8 extends T{create(Z,$={},X){let{betas:J,...z}=$??{};return this._client.post(q`/v1/skills/${Z}/versions?beta=true`,Q0({body:z,...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])},this._client,!1))}retrieve(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(q`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/skills/${Z}/versions?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}delete(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.delete(q`/v1/skills/${J}/versions/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString()},X?.headers])})}download(Z,$,X){let{skill_id:J,betas:z}=$;return this._client.get(q`/v1/skills/${J}/versions/${Z}/content?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"skills-2025-10-02"].toString(),Accept:"application/binary"},X?.headers]),__binaryResponse:!0})}}});var A0;var X1=M(()=>{I();$1();$1();f();E();V0();_();A0=class A0 extends T{constructor(){super(...arguments);this.versions=new j8(this._client)}create(Z={},$){let{betas:X,...J}=Z??{};return this._client.post("/v1/skills?beta=true",Q0({body:J,...$,headers:G([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])},this._client,!1))}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/skills/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/skills?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"skills-2025-10-02"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/skills/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"skills-2025-10-02"].toString()},X?.headers])})}};A0.Versions=j8});var E8;var J1=M(()=>{I();f();E();_();E8=class E8 extends T{create(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/vaults/${Z}/credentials?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}retrieve(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.get(q`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{vault_id:J,betas:z,...Y}=$;return this._client.post(q`/v1/vaults/${J}/credentials/${Z}?beta=true`,{body:Y,...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z,$={},X){let{betas:J,...z}=$??{};return this._client.getAPIList(q`/v1/vaults/${Z}/credentials?beta=true`,j,{query:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}delete(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.delete(q`/v1/vaults/${J}/credentials/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(q`/v1/vaults/${J}/credentials/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}mcpOAuthValidate(Z,$,X){let{vault_id:J,betas:z}=$;return this._client.post(q`/v1/vaults/${J}/credentials/${Z}/mcp_oauth_validate?beta=true`,{...X,headers:G([{"anthropic-beta":[...z??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}}});var L0;var z1=M(()=>{I();J1();J1();f();E();_();L0=class L0 extends T{constructor(){super(...arguments);this.credentials=new E8(this._client)}create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/vaults?beta=true",{body:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/vaults/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}update(Z,$,X){let{betas:J,...z}=$;return this._client.post(q`/v1/vaults/${Z}?beta=true`,{body:z,...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/vaults?beta=true",j,{query:J,...$,headers:G([{"anthropic-beta":[...X??[],"managed-agents-2026-04-01"].toString()},$?.headers])})}delete(Z,$={},X){let{betas:J}=$??{};return this._client.delete(q`/v1/vaults/${Z}?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}archive(Z,$={},X){let{betas:J}=$??{};return this._client.post(q`/v1/vaults/${Z}/archive?beta=true`,{...X,headers:G([{"anthropic-beta":[...J??[],"managed-agents-2026-04-01"].toString()},X?.headers])})}};L0.Credentials=E8});var o;var Y1=M(()=>{I();qX();qX();OX();OX();MX();MX();HX();HX();FX();FX();IX();IX();fX();fX();rX();rX();Z1();Z1();X1();X1();z1();z1();o=class o extends T{constructor(){super(...arguments);this.models=new s0(this._client),this.messages=new bZ(this._client),this.agents=new G0(this._client),this.environments=new M0(this._client),this.sessions=new hZ(this._client),this.vaults=new L0(this._client),this.memoryStores=new aZ(this._client),this.files=new t0(this._client),this.skills=new A0(this._client),this.webhooks=new X8(this._client),this.userProfiles=new e0(this._client)}};o.Models=s0;o.Messages=bZ;o.Agents=G0;o.Environments=M0;o.Sessions=hZ;o.Vaults=L0;o.MemoryStores=aZ;o.Files=t0;o.Skills=A0;o.Webhooks=X8;o.UserProfiles=e0});var S0;var K1=M(()=>{I();E();S0=class S0 extends T{create(Z,$){let{betas:X,...J}=Z;return this._client.post("/v1/complete",{body:J,timeout:this._client._options.timeout??600000,...$,headers:G([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers]),stream:Z.stream??!1})}}});function M6(Z){return Z?.output_config?.format}function Q1(Z,$,X){let J=M6($);if(!$||!("parse"in(J??{})))return{...Z,content:Z.content.map((z)=>{if(z.type==="text")return Object.defineProperty({...z},"parsed_output",{value:null,enumerable:!1});return z}),parsed_output:null};return V1(Z,$,X)}function V1(Z,$,X){let J=null,z=Z.content.map((Y)=>{if(Y.type==="text"){let V=Q5($,Y.text);if(J===null)J=V;return Object.defineProperty({...Y},"parsed_output",{value:V,enumerable:!1})}return Y});return{...Z,content:z,parsed_output:J}}function Q5(Z,$){let X=M6(Z);if(X?.type!=="json_schema")return null;try{if("parse"in X)return X.parse($);return JSON.parse($)}catch(J){throw new H(`Failed to parse structured output: ${J}`)}}var G1=M(()=>{u()});function B6(Z){return Z.type==="tool_use"||Z.type==="server_tool_use"}function F6(Z){}var wZ,gZ,j0,R8,R$,P8,I8,P$,k8,LZ,y8,I$,k$,tZ,y$,f$,f8,N1,C6,U1,W1,w1,q1,x6,H6="__json_buf",b8;var T6=M(()=>{XZ();Z0();C0();uX();cX();G1();b8=class b8{constructor(Z,$){wZ.add(this),this.messages=[],this.receivedMessages=[],gZ.set(this,void 0),j0.set(this,null),this.controller=new AbortController,R8.set(this,void 0),R$.set(this,()=>{}),P8.set(this,()=>{}),I8.set(this,void 0),P$.set(this,()=>{}),k8.set(this,()=>{}),LZ.set(this,{}),y8.set(this,!1),I$.set(this,!1),k$.set(this,!1),tZ.set(this,!1),y$.set(this,void 0),f$.set(this,void 0),f8.set(this,void 0),U1.set(this,(X)=>{if(w(this,I$,!0,"f"),BZ(X))X=new t;if(X instanceof t)return w(this,k$,!0,"f"),this._emit("abort",X);if(X instanceof H)return this._emit("error",X);if(X instanceof Error){let J=new H(X.message);return J.cause=X,this._emit("error",J)}return this._emit("error",new H(String(X)))}),w(this,R8,new Promise((X,J)=>{w(this,R$,X,"f"),w(this,P8,J,"f")}),"f"),w(this,I8,new Promise((X,J)=>{w(this,P$,X,"f"),w(this,k8,J,"f")}),"f"),K(this,R8,"f").catch(()=>{}),K(this,I8,"f").catch(()=>{}),w(this,j0,Z,"f"),w(this,f8,$?.logger??console,"f")}get response(){return K(this,y$,"f")}get request_id(){return K(this,f$,"f")}async withResponse(){w(this,tZ,!0,"f");let Z=await K(this,R8,"f");if(!Z)throw Error("Could not resolve a `Response` object");return{data:this,response:Z,request_id:Z.headers.get("request-id")}}static fromReadableStream(Z){let $=new b8(null);return $._run(()=>$._fromReadableStream(Z)),$}static createMessage(Z,$,X,{logger:J}={}){let z=new b8($,{logger:J});for(let Y of $.messages)z._addMessageParam(Y);return w(z,j0,{...$,stream:!0},"f"),z._run(()=>z._createMessage(Z,{...$,stream:!0},{...X,headers:{...X?.headers,"X-Stainless-Helper-Method":"stream"}})),z}_run(Z){Z().then(()=>{this._emitFinal(),this._emit("end")},K(this,U1,"f"))}_addMessageParam(Z){this.messages.push(Z)}_addMessage(Z,$=!0){if(this.receivedMessages.push(Z),$)this._emit("message",Z)}async _createMessage(Z,$,X){let J=X?.signal,z;if(J){if(J.aborted)this.controller.abort();z=this.controller.abort.bind(this.controller),J.addEventListener("abort",z)}try{K(this,wZ,"m",W1).call(this);let{response:Y,data:V}=await Z.create({...$,stream:!0},{...X,signal:this.controller.signal}).withResponse();this._connected(Y);for await(let Q of V)K(this,wZ,"m",w1).call(this,Q);if(V.controller.signal?.aborted)throw new t;K(this,wZ,"m",q1).call(this)}finally{if(J&&z)J.removeEventListener("abort",z)}}_connected(Z){if(this.ended)return;w(this,y$,Z,"f"),w(this,f$,Z?.headers.get("request-id"),"f"),K(this,R$,"f").call(this,Z),this._emit("connect")}get ended(){return K(this,y8,"f")}get errored(){return K(this,I$,"f")}get aborted(){return K(this,k$,"f")}abort(){this.controller.abort()}on(Z,$){return(K(this,LZ,"f")[Z]||(K(this,LZ,"f")[Z]=[])).push({listener:$}),this}off(Z,$){let X=K(this,LZ,"f")[Z];if(!X)return this;let J=X.findIndex((z)=>z.listener===$);if(J>=0)X.splice(J,1);return this}once(Z,$){return(K(this,LZ,"f")[Z]||(K(this,LZ,"f")[Z]=[])).push({listener:$,once:!0}),this}emitted(Z){return new Promise(($,X)=>{if(w(this,tZ,!0,"f"),Z!=="error")this.once("error",X);this.once(Z,$)})}async done(){w(this,tZ,!0,"f"),await K(this,I8,"f")}get currentMessage(){return K(this,gZ,"f")}async finalMessage(){return await this.done(),K(this,wZ,"m",N1).call(this)}async finalText(){return await this.done(),K(this,wZ,"m",C6).call(this)}_emit(Z,...$){if(K(this,y8,"f"))return;if(Z==="end")w(this,y8,!0,"f"),K(this,P$,"f").call(this);let X=K(this,LZ,"f")[Z];if(X)K(this,LZ,"f")[Z]=X.filter((J)=>!J.once),X.forEach(({listener:J})=>J(...$));if(Z==="abort"){let J=$[0];if(!K(this,tZ,"f")&&!X?.length)Promise.reject(J);K(this,P8,"f").call(this,J),K(this,k8,"f").call(this,J),this._emit("end");return}if(Z==="error"){let J=$[0];if(!K(this,tZ,"f")&&!X?.length)Promise.reject(J);K(this,P8,"f").call(this,J),K(this,k8,"f").call(this,J),this._emit("end")}}_emitFinal(){if(this.receivedMessages.at(-1))this._emit("finalMessage",K(this,wZ,"m",N1).call(this))}async _fromReadableStream(Z,$){let X=$?.signal,J;if(X){if(X.aborted)this.controller.abort();J=this.controller.abort.bind(this.controller),X.addEventListener("abort",J)}try{K(this,wZ,"m",W1).call(this),this._connected(null);let z=KZ.fromReadableStream(Z,this.controller);for await(let Y of z)K(this,wZ,"m",w1).call(this,Y);if(z.controller.signal?.aborted)throw new t;K(this,wZ,"m",q1).call(this)}finally{if(X&&J)X.removeEventListener("abort",J)}}[(gZ=new WeakMap,j0=new WeakMap,R8=new WeakMap,R$=new WeakMap,P8=new WeakMap,I8=new WeakMap,P$=new WeakMap,k8=new WeakMap,LZ=new WeakMap,y8=new WeakMap,I$=new WeakMap,k$=new WeakMap,tZ=new WeakMap,y$=new WeakMap,f$=new WeakMap,f8=new WeakMap,U1=new WeakMap,wZ=new WeakSet,N1=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},C6=function(){if(this.receivedMessages.length===0)throw new H("stream ended without producing a Message with role=assistant");let $=this.receivedMessages.at(-1).content.filter((X)=>X.type==="text").map((X)=>X.text);if($.length===0)throw new H("stream ended without producing a content block with type=text");return $.join(" ")},W1=function(){if(this.ended)return;w(this,gZ,void 0,"f")},w1=function($){if(this.ended)return;let X=K(this,wZ,"m",x6).call(this,$);switch(this._emit("streamEvent",$,X),$.type){case"content_block_delta":{let J=X.content.at(-1);switch($.delta.type){case"text_delta":{if(J.type==="text")this._emit("text",$.delta.text,J.text||"");break}case"citations_delta":{if(J.type==="text")this._emit("citation",$.delta.citation,J.citations??[]);break}case"input_json_delta":{if(B6(J)&&J.input)this._emit("inputJson",$.delta.partial_json,J.input);break}case"thinking_delta":{if(J.type==="thinking")this._emit("thinking",$.delta.thinking,J.thinking);break}case"signature_delta":{if(J.type==="thinking")this._emit("signature",J.signature);break}default:F6($.delta)}break}case"message_stop":{this._addMessageParam(X),this._addMessage(Q1(X,K(this,j0,"f"),{logger:K(this,f8,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",X.content.at(-1));break}case"message_start":{w(this,gZ,X,"f");break}case"content_block_start":case"message_delta":break}},q1=function(){if(this.ended)throw new H("stream has ended, this shouldn't happen");let $=K(this,gZ,"f");if(!$)throw new H("request ended without sending any chunks");return w(this,gZ,void 0,"f"),Q1($,K(this,j0,"f"),{logger:K(this,f8,"f")})},x6=function($){let X=K(this,gZ,"f");if($.type==="message_start"){if(X)throw new H(`Unexpected event order, got ${$.type} before receiving "message_stop"`);return $.message}if(!X)throw new H(`Unexpected event order, got ${$.type} before "message_start"`);switch($.type){case"message_stop":return X;case"message_delta":if(X.stop_reason=$.delta.stop_reason,X.stop_sequence=$.delta.stop_sequence,$.delta.stop_details!=null)X.stop_details=$.delta.stop_details;if(X.usage.output_tokens=$.usage.output_tokens,$.usage.input_tokens!=null)X.usage.input_tokens=$.usage.input_tokens;if($.usage.cache_creation_input_tokens!=null)X.usage.cache_creation_input_tokens=$.usage.cache_creation_input_tokens;if($.usage.cache_read_input_tokens!=null)X.usage.cache_read_input_tokens=$.usage.cache_read_input_tokens;if($.usage.server_tool_use!=null)X.usage.server_tool_use=$.usage.server_tool_use;return X;case"content_block_start":return X.content.push({...$.content_block}),X;case"content_block_delta":{let J=X.content.at($.index);switch($.delta.type){case"text_delta":{if(J?.type==="text")X.content[$.index]={...J,text:(J.text||"")+$.delta.text};break}case"citations_delta":{if(J?.type==="text")X.content[$.index]={...J,citations:[...J.citations??[],$.delta.citation]};break}case"input_json_delta":{if(J&&B6(J)){let z=J[H6]||"";z+=$.delta.partial_json;let Y={...J};if(Object.defineProperty(Y,H6,{value:z,enumerable:!1,writable:!0}),z)Y.input=F$(z);X.content[$.index]=Y}break}case"thinking_delta":{if(J?.type==="thinking")X.content[$.index]={...J,thinking:J.thinking+$.delta.thinking};break}case"signature_delta":{if(J?.type==="thinking")X.content[$.index]={...J,signature:$.delta.signature};break}default:F6($.delta)}return X}case"content_block_stop":return X}},Symbol.asyncIterator)](){let Z=[],$=[],X=!1;return this.on("streamEvent",(J)=>{let z=$.shift();if(z)z.resolve(J);else Z.push(J)}),this.on("end",()=>{X=!0;for(let J of $)J.resolve(void 0);$.length=0}),this.on("abort",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),this.on("error",(J)=>{X=!0;for(let z of $)z.reject(J);$.length=0}),{next:async()=>{if(!Z.length){if(X)return{value:void 0,done:!0};return new Promise((z,Y)=>$.push({resolve:z,reject:Y})).then((z)=>z?{value:z,done:!1}:{value:void 0,done:!0})}return{value:Z.shift(),done:!1}},return:async()=>{return this.abort(),{value:void 0,done:!0}}}}toReadableStream(){return new KZ(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}});var h8;var O1=M(()=>{I();f();E();bX();C0();_();h8=class h8 extends T{create(Z,$){return this._client.post("/v1/messages/batches",{body:Z,...$})}retrieve(Z,$){return this._client.get(q`/v1/messages/batches/${Z}`,$)}list(Z={},$){return this._client.getAPIList("/v1/messages/batches",MZ,{query:Z,...$})}delete(Z,$){return this._client.delete(q`/v1/messages/batches/${Z}`,$)}cancel(Z,$){return this._client.post(q`/v1/messages/batches/${Z}/cancel`,$)}async results(Z,$){let X=await this.retrieve(Z);if(!X.results_url)throw new H(`No batch \`results_url\`; Has it finished processing? ${X.processing_status} - ${X.id}`);return this._client.get(X.results_url,{...$,headers:G([{Accept:"application/binary"},$?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((J,z)=>x0.fromResponse(z.response,z.controller))}}});var sZ,D6,G5;var M1=M(()=>{I();E();o0();T6();G1();O1();O1();gX();sZ=class sZ extends T{constructor(){super(...arguments);this.batches=new h8(this._client)}create(Z,$){if(Z.model in D6)console.warn(`The model '${Z.model}' is deprecated and will reach end-of-life on ${D6[Z.model]}
|
|
33
|
+
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);if(G5.includes(Z.model)&&Z.thinking&&Z.thinking.type==="enabled")console.warn(`Using Claude with ${Z.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let X=this._client._options.timeout;if(!Z.stream&&X==null){let z=B$[Z.model]??void 0;X=this._client.calculateNonstreamingTimeout(Z.max_tokens,z)}let J=z$(Z.tools,Z.messages);return this._client.post("/v1/messages",{body:Z,timeout:X??600000,...$,headers:G([J,$?.headers]),stream:Z.stream??!1})}parse(Z,$){return this.create(Z,$).then((X)=>V1(X,Z,{logger:this._client.logger??console}))}stream(Z,$){return b8.createMessage(this,Z,$,{logger:this._client.logger??console})}countTokens(Z,$){return this._client.post("/v1/messages/count_tokens",{body:Z,...$})}};D6={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026","claude-opus-4-0":"June 15th, 2026","claude-opus-4-20250514":"June 15th, 2026","claude-sonnet-4-0":"June 15th, 2026","claude-sonnet-4-20250514":"June 15th, 2026"},G5=["claude-mythos-preview","claude-opus-4-6"];sZ.Batches=h8});var E0;var C1=M(()=>{I();f();E();_();E0=class E0 extends T{retrieve(Z,$={},X){let{betas:J}=$??{};return this._client.get(q`/v1/models/${Z}`,{...X,headers:G([{...J?.toString()!=null?{"anthropic-beta":J?.toString()}:void 0},X?.headers])})}list(Z={},$){let{betas:X,...J}=Z??{};return this._client.getAPIList("/v1/models",MZ,{query:J,...$,headers:G([{...X?.toString()!=null?{"anthropic-beta":X?.toString()}:void 0},$?.headers])})}}});var A6=M(()=>{Y1();K1();M1();C1();F4()});class m{get credentials(){return this._authState.provider}constructor({baseURL:Z=S("ANTHROPIC_BASE_URL"),apiKey:$,authToken:X,webhookKey:J=S("ANTHROPIC_WEBHOOK_SIGNING_KEY")??null,...z}={}){if(x1.add(this),this._requestAuthFlags=new WeakMap,b$.set(this,void 0),$===void 0)$=z.profile!=null?null:S("ANTHROPIC_API_KEY")??null;if(X===void 0)X=z.profile!=null?null:S("ANTHROPIC_AUTH_TOKEN")??null;if(z.profile!=null&&(z.credentials!=null||z.config!=null))throw TypeError("Pass at most one of `profile`, `credentials`, or `config`.");let Y={apiKey:$,authToken:X,webhookKey:J,...z,baseURL:Z||"https://api.anthropic.com"};if(!Y.dangerouslyAllowBrowser&&R1())throw new H(`It looks like you're running in a browser-like environment.
|
|
34
|
+
|
|
35
|
+
This is disabled by default, as it risks exposing your secret API credentials to attackers.
|
|
36
|
+
If you understand the risks and have appropriate mitigations in place,
|
|
37
|
+
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
|
|
38
|
+
|
|
39
|
+
new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
40
|
+
`);this.baseURL=Y.baseURL,this._baseURLIsExplicit=z.__baseURLIsExplicit??!!Z,this.timeout=Y.timeout??H1.DEFAULT_TIMEOUT,this.logger=Y.logger??console;let V="warn";this.logLevel=V,this.logLevel=s$(Y.logLevel,"ClientOptions.logLevel",this)??s$(S("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??V,this.fetchOptions=Y.fetchOptions,this.maxRetries=Y.maxRetries??2,this.fetch=Y.fetch??P1(),w(this,b$,k1,"f");let Q=S("ANTHROPIC_CUSTOM_HEADERS");if(Q){let O={};for(let x of Q.split(`
|
|
41
|
+
`)){let U=x.indexOf(":");if(U>=0)O[x.substring(0,U).trim()]=x.substring(U+1).trim()}Y.defaultHeaders={...O,...Y.defaultHeaders}}let W=z.__auth;if(delete Y.__auth,delete Y.__baseURLIsExplicit,this._options=Y,this.apiKey=typeof $==="string"?$:null,this.authToken=X,this.webhookKey=J,W){if(this._authState=W,!this._baseURLIsExplicit&&W.baseURL)this.baseURL=W.baseURL}else if(this._authState={provider:null,tokenCache:null,resolution:null,error:null,extraHeaders:{}},this.apiKey==null&&this.authToken==null){let O=Y.credentials??null;if(O)this._authState.provider=O,this._authState.tokenCache=this._makeTokenCache(O);else if(Y.config!=null){let x=XX(Y.config,this._credentialResolverOptions());this._authState.provider=x.provider,this._authState.tokenCache=this._makeTokenCache(x.provider),this._authState.extraHeaders=x.extraHeaders,this._applyCredentialBaseURL(x.baseURL)}else if(Y.profile!=null)this._authState.resolution=this._resolveDefaultCredentials(Y.profile);else this._authState.resolution=this._resolveDefaultCredentials()}}_applyCredentialBaseURL(Z){if(!Z)return;let $=Z.replace(/\/+$/,"");if(this._authState.baseURL=$,!this._baseURLIsExplicit)this.baseURL=$}_credentialResolverOptions(){return{baseURL:this.baseURL,fetch:this.fetch,userAgent:this.getUserAgent(),onCacheWriteError:(Z)=>{k(this).debug("credential cache write failed (best-effort)",Z)},onSafetyWarning:(Z)=>{k(this).warn(Z)}}}_makeTokenCache(Z){return new o$(Z,($)=>{k(this).debug("advisory token refresh failed; serving cached token",$)})}withOptions(Z){let $="credentials"in Z||"config"in Z||"profile"in Z,X="apiKey"in Z||"authToken"in Z||$,J={...this._options,...this._baseURLIsExplicit?{baseURL:this.baseURL}:{},maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,webhookKey:this.webhookKey,credentials:this.credentials,...$?{credentials:void 0,config:void 0,profile:void 0}:{},...Z,__auth:X?void 0:this._authState,__baseURLIsExplicit:"baseURL"in Z?!0:this._baseURLIsExplicit};return new this.constructor(J)}async _resolveDefaultCredentials(Z){try{let $=await q4(this._credentialResolverOptions(),Z);if($)this._authState.provider=$.provider,this._authState.tokenCache=this._makeTokenCache($.provider),this._authState.extraHeaders=$.extraHeaders,this._applyCredentialBaseURL($.baseURL);else if(Z!=null)throw new H(`Profile "${Z}" could not be resolved (no <config_dir>/configs/${Z}.json found).`)}catch($){this._authState.error=$}finally{this._authState.resolution=null}}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:Z,nulls:$}){if(Z.get("x-api-key")||Z.get("authorization"))return;if(this._authState.error)throw this._authState.error;if(this._authState.tokenCache||this._authState.resolution)return;if(this.apiKey&&Z.get("x-api-key"))return;if($.has("x-api-key"))return;if(this.authToken&&Z.get("authorization"))return;if($.has("authorization"))return;throw Error('Could not resolve authentication method. Expected one of apiKey, authToken, credentials, config, or profile to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}_authFlags(Z){let $=this._requestAuthFlags.get(Z);if(!$)$={usedTokenCache:!1,didRefreshFor401:!1},this._requestAuthFlags.set(Z,$);return $}async authHeaders(Z){if(this._authState.resolution)await this._authState.resolution;if(this._authState.error)return;if(this._authState.tokenCache&&this.apiKey==null){let $=await this._authState.tokenCache.getToken();return this._authFlags(Z).usedTokenCache=!0,G([{Authorization:`Bearer ${$}`}])}return G([await this.apiKeyAuth(Z),await this.bearerAuth(Z)])}async apiKeyAuth(Z){if(this.apiKey==null)return;return G([{"X-Api-Key":this.apiKey}])}async bearerAuth(Z){if(this.authToken==null)return;return G([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(Z){return p1(Z)}getUserAgent(){return`${this.constructor.name}/JS ${NZ}`}defaultIdempotencyKey(){return`stainless-node-retry-${$0()}`}makeStatusError(Z,$,X,J){return v.generate(Z,$,X,J)}buildURL(Z,$,X){let J=!K(this,x1,"m",L6).call(this)&&X||this.baseURL,z=D1(Z)?new URL(Z):new URL(J+(J.endsWith("/")&&Z.startsWith("/")?Z.slice(1):Z)),Y=this.defaultQuery(),V=Object.fromEntries(z.searchParams);if(!v$(Y)||!v$(V))$={...V,...Y,...$};if(typeof $==="object"&&$&&!Array.isArray($))z.search=this.stringifyQuery($);return z.toString()}_calculateNonstreamingTimeout(Z){if(3600*Z/128000>600)throw new H("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 600000}async prepareOptions(Z){}async prepareRequest(Z,{url:$,options:X}){if(this._authState.tokenCache&&this.apiKey==null){let J=Z.headers instanceof Headers?Z.headers:new Headers(Z.headers);for(let[Y,V]of Object.entries(this._authState.extraHeaders))if(!J.has(Y))J.set(Y,V);if(!J.get("anthropic-beta")?.split(",").map((Y)=>Y.trim())?.includes(mZ))J.append("anthropic-beta",mZ);Z.headers=J}}get(Z,$){return this.methodRequest("get",Z,$)}post(Z,$){return this.methodRequest("post",Z,$)}patch(Z,$){return this.methodRequest("patch",Z,$)}put(Z,$){return this.methodRequest("put",Z,$)}delete(Z,$){return this.methodRequest("delete",Z,$)}methodRequest(Z,$,X){return this.request(Promise.resolve(X).then((J)=>{return{method:Z,path:$,...J}}))}request(Z,$=null){return new cZ(this,this.makeRequest(Z,$,void 0))}async makeRequest(Z,$,X){let J=await Z,z=J.maxRetries??this.maxRetries;if($==null)$=z,this._requestAuthFlags.delete(J);await this.prepareOptions(J);let{req:Y,url:V,timeout:Q}=await this.buildRequest(J,{retryCount:z-$});await this.prepareRequest(Y,{url:V,options:J});let W="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),O=X===void 0?"":`, retryOf: ${X}`,x=Date.now();if(k(this).debug(`[${W}] sending request`,FZ({retryOfRequestLogID:X,method:J.method,url:V,options:J,headers:Y.headers})),J.signal?.aborted)throw new t;let U=new AbortController,N=await this.fetchWithTimeout(V,Y,Q,U).catch(R0),C=Date.now();if(N instanceof globalThis.Error){let D=`retrying, ${$} attempts remaining`;if(J.signal?.aborted)throw new t;let A=BZ(N)||/timed? ?out/i.test(String(N)+("cause"in N?String(N.cause):""));if($)return k(this).info(`[${W}] connection ${A?"timed out":"failed"} - ${D}`),k(this).debug(`[${W}] connection ${A?"timed out":"failed"} (${D})`,FZ({retryOfRequestLogID:X,url:V,durationMs:C-x,message:N.message})),this.retryRequest(J,$,X??W);if(k(this).info(`[${W}] connection ${A?"timed out":"failed"} - error; no more retries left`),k(this).debug(`[${W}] connection ${A?"timed out":"failed"} (error; no more retries left)`,FZ({retryOfRequestLogID:X,url:V,durationMs:C-x,message:N.message})),A)throw new P0;throw new vZ({cause:N})}let B=[...N.headers.entries()].filter(([D])=>D==="request-id").map(([D,A])=>", "+D+": "+JSON.stringify(A)).join(""),L=`[${W}${O}${B}] ${Y.method} ${V} ${N.ok?"succeeded":"failed"} with status ${N.status} in ${C-x}ms`;if(!N.ok){let D=await this.shouldRetry(N,J);if($&&D){let l=`retrying, ${$} attempts remaining`;return await I1(N.body),k(this).info(`${L} - ${l}`),k(this).debug(`[${W}] response error (${l})`,FZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,durationMs:C-x})),this.retryRequest(J,$,X??W,N.headers)}let A=D?"error; no more retries left":"error; not retryable";k(this).info(`${L} - ${A}`);let F=await N.text().catch((l)=>R0(l).message),h=v8(F),y=h?void 0:F;throw k(this).debug(`[${W}] response error (${A})`,FZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,message:y,durationMs:Date.now()-x})),this.makeStatusError(N.status,h,y,N.headers)}return k(this).info(L),k(this).debug(`[${W}] response start`,FZ({retryOfRequestLogID:X,url:N.url,status:N.status,headers:N.headers,durationMs:C-x})),{response:N,options:J,controller:U,requestLogID:W,retryOfRequestLogID:X,startTime:x}}getAPIList(Z,$,X){return this.requestAPIList($,X&&"then"in X?X.then((J)=>({method:"get",path:Z,...J})):{method:"get",path:Z,...X})}requestAPIList(Z,$){let X=this.makeRequest($,null,void 0);return new $$(this,X,Z)}async fetchWithTimeout(Z,$,X,J){let{signal:z,method:Y,...V}=$||{},Q=this._makeAbort(J);if(z)z.addEventListener("abort",Q,{once:!0});let W=setTimeout(Q,X),O=globalThis.ReadableStream&&V.body instanceof globalThis.ReadableStream||typeof V.body==="object"&&V.body!==null&&Symbol.asyncIterator in V.body,x={signal:J.signal,...O?{duplex:"half"}:{},method:"GET",...V};if(Y)x.method=Y.toUpperCase();try{return await this.fetch.call(void 0,Z,x)}finally{clearTimeout(W)}}async shouldRetry(Z,$){let X=this._authFlags($);if(Z.status===401&&this._authState.tokenCache&&X.usedTokenCache&&!X.didRefreshFor401)return X.didRefreshFor401=!0,this._authState.tokenCache.invalidate(),!0;let J=Z.headers.get("x-should-retry");if(J==="true")return!0;if(J==="false")return!1;if(Z.status===408)return!0;if(Z.status===409)return!0;if(Z.status===429)return!0;if(Z.status>=500)return!0;return!1}async retryRequest(Z,$,X,J){let z,Y=J?.get("retry-after-ms");if(Y){let Q=parseFloat(Y);if(!Number.isNaN(Q))z=Q}let V=J?.get("retry-after");if(V&&!z){let Q=parseFloat(V);if(!Number.isNaN(Q))z=Q*1000;else z=Date.parse(V)-Date.now()}if(z===void 0){let Q=Z.maxRetries??this.maxRetries;z=this.calculateDefaultRetryTimeoutMillis($,Q)}return await qZ(z),this.makeRequest(Z,$-1,X)}calculateDefaultRetryTimeoutMillis(Z,$){let z=$-Z,Y=Math.min(0.5*Math.pow(2,z),8),V=1-Math.random()*0.25;return Y*V*1000}calculateNonstreamingTimeout(Z,$){if(3600000*Z/128000>600000||$!=null&&Z>$)throw new H("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 600000}async buildRequest(Z,{retryCount:$=0}={}){let X={...Z},{method:J,path:z,query:Y,defaultBaseURL:V}=X;if(this._authState.resolution)await this._authState.resolution;if(!this._baseURLIsExplicit&&this._authState.baseURL&&this.baseURL!==this._authState.baseURL)this.baseURL=this._authState.baseURL;let Q=this.buildURL(z,Y,V);if("timeout"in X)L1("timeout",X.timeout);X.timeout=X.timeout??this.timeout;let{bodyHeaders:W,body:O}=this.buildBody({options:X}),x=await this.buildHeaders({options:Z,method:J,bodyHeaders:W,retryCount:$});return{req:{method:J,headers:x,...X.signal&&{signal:X.signal},...globalThis.ReadableStream&&O instanceof globalThis.ReadableStream&&{duplex:"half"},...O&&{body:O},...this.fetchOptions??{},...X.fetchOptions??{}},url:Q,timeout:X.timeout}}async buildHeaders({options:Z,method:$,bodyHeaders:X,retryCount:J}){let z={};if(this.idempotencyHeader&&$!=="get"){if(!Z.idempotencyKey)Z.idempotencyKey=this.defaultIdempotencyKey();z[this.idempotencyHeader]=Z.idempotencyKey}let Y=G([z,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(J),...Z.timeout?{"X-Stainless-Timeout":String(Math.trunc(Z.timeout/1000))}:{},...c0(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(Z),this._options.defaultHeaders,X,Z.headers]);return this.validateHeaders(Y),Y.values}_makeAbort(Z){return()=>Z.abort()}buildBody({options:{body:Z,headers:$}}){if(!Z)return{bodyHeaders:void 0,body:void 0};let X=G([$]);if(ArrayBuffer.isView(Z)||Z instanceof ArrayBuffer||Z instanceof DataView||typeof Z==="string"&&X.values.has("content-type")||globalThis.Blob&&Z instanceof globalThis.Blob||Z instanceof FormData||Z instanceof URLSearchParams||globalThis.ReadableStream&&Z instanceof globalThis.ReadableStream)return{bodyHeaders:void 0,body:Z};else if(typeof Z==="object"&&((Symbol.asyncIterator in Z)||(Symbol.iterator in Z)&&("next"in Z)&&typeof Z.next==="function"))return{bodyHeaders:void 0,body:c8(Z)};else if(typeof Z==="object"&&X.values.get("content-type")==="application/x-www-form-urlencoded")return{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(Z)};else return K(this,b$,"f").call(this,{body:Z,headers:X})}}var x1,H1,b$,L6,S6="\\n\\nHuman:",j6="\\n\\nAssistant:",eZ;var B1=M(()=>{XZ();g8();CZ();X0();Z0();m8();J0();y1();a$();m0();u();Y0();t1();O4();f();WX();A6();e8();K1();C1();Y1();M1();m8();E();p0();jZ();CZ();H1=m,b$=new WeakMap,x1=new WeakSet,L6=function(){return this.baseURL!=="https://api.anthropic.com"};m.Anthropic=H1;m.HUMAN_PROMPT=S6;m.AI_PROMPT=j6;m.DEFAULT_TIMEOUT=600000;m.AnthropicError=H;m.APIError=v;m.APIConnectionError=vZ;m.APIConnectionTimeoutError=P0;m.APIUserAbortError=t;m.NotFoundError=f0;m.ConflictError=b0;m.RateLimitError=g0;m.BadRequestError=I0;m.AuthenticationError=k0;m.InternalServerError=_0;m.PermissionDeniedError=y0;m.UnprocessableEntityError=h0;m.toFile=X$;eZ=class eZ extends m{constructor(){super(...arguments);this.completions=new S0(this),this.messages=new sZ(this),this.models=new E0(this),this.beta=new o(this)}};eZ.Completions=S0;eZ.Messages=sZ;eZ.Models=E0;eZ.Beta=o});var U5=M(()=>{B1();WX();e8();B1();f();u()});
|
|
42
|
+
export{w as Zna,K as _na,XZ as $na,H as aoa,v as boa,t as coa,vZ as doa,P0 as eoa,k0 as foa,f0 as goa,u as hoa,k as ioa,jZ as joa,J4 as koa,SZ as loa,v0 as moa,g$ as noa,T1 as ooa,C0 as poa,eZ as qoa,U5 as roa};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{coa as K,roa as Y}from"./cli-0.6.2-0cpmb5wg.mjs";import{hpa as X}from"./cli-0.6.2-3rgtxc9f.mjs";function T(j){return j instanceof Q||j instanceof K||j instanceof Error&&j.name==="AbortError"}function D(j,z){return j instanceof Error&&j.message===z}function U(j){return j instanceof Error?j:Error(String(j))}function B(j){return j instanceof Error?j.message:String(j)}function V(j){if(j&&typeof j==="object"&&"code"in j&&typeof j.code==="string")return j.code;return}function O(j){return V(j)==="ENOENT"}function P(j){if(j&&typeof j==="object"&&"path"in j&&typeof j.path==="string")return j.path;return}function R(j,z=5){if(!(j instanceof Error))return String(j);if(!j.stack)return j.message;let G=j.stack.split(`
|
|
2
|
+
`),H=G[0]??j.message,J=G.slice(1).filter((W)=>W.trim().startsWith("at "));if(J.length<=z)return j.stack;return[H,...J.slice(0,z)].join(`
|
|
3
|
+
`)}function b(j){let z=V(j);return z==="ENOENT"||z==="EACCES"||z==="EPERM"||z==="ENOTDIR"||z==="ELOOP"}function N(j){let z=B(j);if(!j||typeof j!=="object"||!("isAxiosError"in j)||!j.isAxiosError)return{kind:"other",message:z};let G=j,H=G.response?.status;if(H===401||H===403)return{kind:"auth",status:H,message:z};if(G.code==="ECONNABORTED")return{kind:"timeout",status:H,message:z};if(G.code==="ECONNREFUSED"||G.code==="ENOTFOUND")return{kind:"network",status:H,message:z};return{kind:"http",status:H,message:z}}var Z,_,Q,$,q,v,w;var I=X(()=>{Y();Z=class Z extends Error{constructor(j,z){super(j,z);this.name=this.constructor.name}};_=class _ extends Error{};Q=class Q extends Error{constructor(j){super(j);this.name="AbortError"}};$=class $ extends Error{filePath;defaultConfig;constructor(j,z,G){super(j);this.name="ConfigParseError",this.filePath=z,this.defaultConfig=G}};q=class q extends Error{stdout;stderr;code;interrupted;constructor(j,z,G,H){super("Shell command failed");this.stdout=j;this.stderr=z;this.code=G;this.interrupted=H;this.name="ShellError"}};v=class v extends Error{formattedMessage;constructor(j,z){super(j);this.formattedMessage=z;this.name="TeleportOperationError"}};w=class w extends Error{telemetryMessage;constructor(j,z){super(j);this.name="TelemetrySafeError",this.telemetryMessage=z??j}}});
|
|
4
|
+
export{Z as oha,_ as pha,Q as qha,T as rha,$ as sha,q as tha,v as uha,w as vha,D as wha,U as xha,B as yha,V as zha,O as Aha,P as Bha,R as Cha,b as Dha,N as Eha,I as Fha};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$S as k,aT as f,qT as u}from"./cli-0.6.2-40pc2aj2.mjs";import{iU as C,uU as d}from"./cli-0.6.2-yjbsdf10.mjs";import{L0 as A,N0 as F}from"./cli-0.6.2-1b9hx344.mjs";import{h1 as q,m1 as i}from"./cli-0.6.2-ea8z1e2e.mjs";import{a5 as W,d5 as _,k5 as j,l5 as w,q5 as I}from"./cli-0.6.2-1wj8sm5y.mjs";import{Ada as V,Ida as U}from"./cli-0.6.2-hhjx89cr.mjs";import{aga as M,bga as v}from"./cli-0.6.2-qec7nrgw.mjs";import{Jga as X,Kga as R,Oga as p,eha as J,hha as x}from"./cli-0.6.2-g6c6hjc6.mjs";import{Fha as T,yha as P}from"./cli-0.6.2-0f9sh5z8.mjs";import{ipa as O}from"./cli-0.6.2-3rgtxc9f.mjs";x();U();F();v();x();T();U();_();I();p();import{randomUUID as E}from"crypto";var h=2000,y=5,S=30000,Y=3,c=new Set([4003]);function D(B){if(typeof B!=="object"||B===null||!("type"in B))return!1;return typeof B.type==="string"}class L{sessionId;orgUuid;getAccessToken;callbacks;ws=null;state="closed";reconnectAttempts=0;sessionNotFoundRetries=0;pingInterval=null;reconnectTimer=null;constructor(B,z,Q,H){this.sessionId=B;this.orgUuid=z;this.getAccessToken=Q;this.callbacks=H}async connect(){if(this.state==="connecting"){J("[SessionsWebSocket] Already connecting");return}this.state="connecting";let z=`${M().BASE_API_URL.replace("https://","wss://")}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;J(`[SessionsWebSocket] Connecting to ${z}`);let H={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":"2023-06-01"};if(typeof Bun<"u"){let $=new globalThis.WebSocket(z,{headers:H,proxy:w(z),tls:W()||void 0});this.ws=$,$.addEventListener("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),$.addEventListener("message",(Z)=>{let K=typeof Z.data==="string"?Z.data:String(Z.data);this.handleMessage(K)}),$.addEventListener("error",()=>{let Z=Error("[SessionsWebSocket] WebSocket error");V(Z),this.callbacks.onError?.(Z)}),$.addEventListener("close",(Z)=>{J(`[SessionsWebSocket] Closed: code=${Z.code} reason=${Z.reason}`),this.handleClose(Z.code)}),$.addEventListener("pong",()=>{J("[SessionsWebSocket] Pong received")})}else{let{default:$}=await import("./wrapper-0.6.2-wwg8e756.mjs"),Z=new $(z,{headers:H,agent:j(z),...W()});this.ws=Z,Z.on("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),Z.on("message",(K)=>{this.handleMessage(K.toString())}),Z.on("error",(K)=>{V(Error(`[SessionsWebSocket] Error: ${K.message}`)),this.callbacks.onError?.(K)}),Z.on("close",(K,G)=>{J(`[SessionsWebSocket] Closed: code=${K} reason=${G.toString()}`),this.handleClose(K)}),Z.on("pong",()=>{J("[SessionsWebSocket] Pong received")})}}handleMessage(B){try{let z=R(B);if(D(z))this.callbacks.onMessage(z);else J(`[SessionsWebSocket] Ignoring message type: ${typeof z==="object"&&z!==null&&"type"in z?String(z.type):"unknown"}`)}catch(z){V(Error(`[SessionsWebSocket] Failed to parse message: ${P(z)}`))}}handleClose(B){if(this.stopPingInterval(),this.state==="closed")return;this.ws=null;let z=this.state;if(this.state="closed",c.has(B)){J(`[SessionsWebSocket] Permanent close code ${B}, not reconnecting`),this.callbacks.onClose?.();return}if(B===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>Y){J(`[SessionsWebSocket] 4001 retry budget exhausted (${Y}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(h*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${Y}`);return}if(z==="connected"&&this.reconnectAttempts<y)this.reconnectAttempts++,this.scheduleReconnect(h,`attempt ${this.reconnectAttempts}/${y}`);else J("[SessionsWebSocket] Not reconnecting"),this.callbacks.onClose?.()}scheduleReconnect(B,z){this.callbacks.onReconnecting?.(),J(`[SessionsWebSocket] Scheduling reconnect (${z}) in ${B}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},B)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state==="connected")try{this.ws.ping?.()}catch{}},S)}stopPingInterval(){if(this.pingInterval)clearInterval(this.pingInterval),this.pingInterval=null}sendControlResponse(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}J("[SessionsWebSocket] Sending control response"),this.ws.send(X(B))}sendControlRequest(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}let z={type:"control_request",request_id:E(),request:B};J(`[SessionsWebSocket] Sending control request: ${B.subtype}`),this.ws.send(X(z))}isConnected(){return this.state==="connected"}close(){if(J("[SessionsWebSocket] Closing connection"),this.state="closed",this.stopPingInterval(),this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(this.ws)this.ws.close(),this.ws=null}reconnect(){J("[SessionsWebSocket] Force reconnecting"),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}}function N(B){return B.type!=="control_request"&&B.type!=="control_response"&&B.type!=="control_cancel_request"}class b{config;callbacks;websocket=null;pendingPermissionRequests=new Map;constructor(B,z){this.config=B;this.callbacks=z}connect(){J(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`);let B={onMessage:(z)=>this.handleMessage(z),onConnected:()=>{J("[RemoteSessionManager] Connected"),this.callbacks.onConnected?.()},onClose:()=>{J("[RemoteSessionManager] Disconnected"),this.callbacks.onDisconnected?.()},onReconnecting:()=>{J("[RemoteSessionManager] Reconnecting"),this.callbacks.onReconnecting?.()},onError:(z)=>{V(z),this.callbacks.onError?.(z)}};this.websocket=new L(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,B),this.websocket.connect()}handleMessage(B){if(B.type==="control_request"){this.handleControlRequest(B);return}if(B.type==="control_cancel_request"){let{request_id:z}=B,Q=this.pendingPermissionRequests.get(z);J(`[RemoteSessionManager] Permission request cancelled: ${z}`),this.pendingPermissionRequests.delete(z),this.callbacks.onPermissionCancelled?.(z,Q?.tool_use_id);return}if(B.type==="control_response"){J("[RemoteSessionManager] Received control response");return}if(N(B))this.callbacks.onMessage(B)}handleControlRequest(B){let{request_id:z,request:Q}=B;if(Q.subtype==="can_use_tool")J(`[RemoteSessionManager] Permission request for tool: ${Q.tool_name}`),this.pendingPermissionRequests.set(z,Q),this.callbacks.onPermissionRequest(Q,z);else{J(`[RemoteSessionManager] Unsupported control request subtype: ${Q.subtype}`);let H={type:"control_response",response:{subtype:"error",request_id:z,error:`Unsupported control request subtype: ${Q.subtype}`}};this.websocket?.sendControlResponse(H)}}async sendMessage(B,z){J(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let Q=await A(this.config.sessionId,B,z);if(!Q)V(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`));return Q}respondToPermissionRequest(B,z){if(!this.pendingPermissionRequests.get(B)){V(Error(`[RemoteSessionManager] No pending permission request with ID: ${B}`));return}this.pendingPermissionRequests.delete(B);let H={type:"control_response",response:{subtype:"success",request_id:B,response:{behavior:z.behavior,...z.behavior==="allow"?{updatedInput:z.updatedInput}:{message:z.message}}}};J(`[RemoteSessionManager] Sending permission response: ${z.behavior}`),this.websocket?.sendControlResponse(H)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){J("[RemoteSessionManager] Sending interrupt signal"),this.websocket?.sendControlRequest({subtype:"interrupt"})}getSessionId(){return this.config.sessionId}disconnect(){J("[RemoteSessionManager] Disconnecting"),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){J("[RemoteSessionManager] Reconnecting WebSocket"),this.websocket?.reconnect()}}function $z(B,z,Q,H=!1,$=!1){return{sessionId:B,getAccessToken:z,orgUuid:Q,hasInitialPrompt:H,viewerOnly:$}}x();U();d();u();function Xz(){let B=C();if(!B?.teamName||!B?.agentName){J("[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)");return}let{teamName:z,agentId:Q,agentName:H}=B,$=f(z);if(!$){V(Error(`[computeInitialTeamContext] Could not read team file for ${z}`));return}let Z=k(z),K=!Q;return J(`[Reconnection] Computed initial team context for ${K?"leader":`teammate ${H}`} in team ${z}`),{teamName:z,teamFilePath:Z,leadAgentId:$.leadAgentId,selfAgentId:Q,selfAgentName:H,isLeader:K,teammates:{}}}function Wz(B,z,Q){let H=f(z);if(!H){V(Error(`[initializeTeammateContextFromSession] Could not read team file for ${z} (agent: ${Q})`));return}let $=H.members.find((G)=>G.name===Q);if(!$)J(`[Reconnection] Member ${Q} not found in team ${z} - may have been removed`);let Z=$?.agentId,K=k(z);B((G)=>({...G,teamContext:{teamName:z,teamFilePath:K,leadAgentId:H.leadAgentId,selfAgentId:Z,selfAgentName:Q,isLeader:!1,teammates:{}}})),J(`[Reconnection] Initialized agent context from session for ${Q} in team ${z}`)}i();var m={"claude-3-opus":{modelName:"Claude 3 Opus",retirementDates:{firstParty:"January 5, 2026",bedrock:"January 15, 2026",vertex:"January 5, 2026",foundry:"January 5, 2026"}},"claude-3-7-sonnet":{modelName:"Claude 3.7 Sonnet",retirementDates:{firstParty:"February 19, 2026",bedrock:"April 28, 2026",vertex:"May 11, 2026",foundry:"February 19, 2026"}},"claude-3-5-haiku":{modelName:"Claude 3.5 Haiku",retirementDates:{firstParty:"February 19, 2026",bedrock:null,vertex:null,foundry:null}}};function l(B){let z=B.toLowerCase(),Q=q();for(let[H,$]of Object.entries(m)){let Z=$.retirementDates[Q];if(!z.includes(H)||!Z)continue;return{isDeprecated:!0,modelName:$.modelName,retirementDate:Z}}return{isDeprecated:!1}}function Lz(B){if(!B)return null;let z=l(B);if(!z.isDeprecated)return null;return`⚠ ${z.modelName} will be retired on ${z.retirementDate}. Consider switching to a newer model.`}
|
|
2
|
+
export{b as Ma,$z as Na,Xz as Oa,Wz as Pa,Lz as Qa};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{DM as f,EM as L,OM as r,RA as K,TA as I,UA as _,WA as p,WO as i,_z as P,eA as b,kA as j,tv as T}from"./cli-0.6.2-4p9wa0p6.mjs";import{uT as A,vT as n}from"./cli-0.6.2-y8g2xkqa.mjs";import{cga as E,ega as C}from"./cli-0.6.2-vqt5hqzr.mjs";import{Sga as M,Wga as m,eha as Z,hga as F,hha as u,jga as S}from"./cli-0.6.2-g6c6hjc6.mjs";import{ana as v,vja as Y,wja as k,yna as c}from"./cli-0.6.2-42d88f3r.mjs";n();c();r();C();p();P();S();u();m();i();k();import*as H from"path";var d=1000,o=500,l=300,e=2000,h=typeof Bun<"u",x=null,y=null,Q=new Set,B=!1,D=!1,V=!1,X=null,W=Y(),U=null;async function t(){if(B||D)return;if(B=!0,!V)V=!0,_(()=>{f(),W.emit()});let q=await a();if(q.length===0)return;Z(`Watching for changes in skill/command directories: ${q.join(", ")}...`),x=A.watch(q,{persistent:!1,ignoreInitial:!0,depth:2,awaitWriteFinish:{stabilityThreshold:U?.stabilityThreshold??d,pollInterval:U?.pollInterval??o},ignored:(w,z)=>{if(z&&!z.isFile()&&!z.isDirectory())return!0;return w.split(H.sep).some((J)=>J===".git")},ignorePermissionErrors:!0,usePolling:h,interval:U?.chokidarInterval??e,atomic:!0}),x.on("add",$),x.on("change",$),x.on("unlink",$),X=F(async()=>{await g()})}function g(){if(D=!0,X)X(),X=null;let q=Promise.resolve();if(x)q=x.close(),x=null;if(y)clearTimeout(y),y=null;return Q.clear(),W.clear(),q}var s=W.subscribe;async function a(){let q=M(),w=[],z=K("userSettings","skills");if(z)try{await q.stat(z),w.push(z)}catch{}let J=K("userSettings","commands");if(J)try{await q.stat(J),w.push(J)}catch{}let N=K("projectSettings","skills");if(N)try{let G=H.resolve(N);await q.stat(G),w.push(G)}catch{}let O=K("projectSettings","commands");if(O)try{let G=H.resolve(O);await q.stat(G),w.push(G)}catch{}for(let G of v()){let R=H.join(G,".claudin","skills");try{await q.stat(R),w.push(R)}catch{}}return w}function $(q){Z(`Detected skill change: ${q}`),E("tengu_skill_file_changed",{source:"chokidar"}),qq(q)}function qq(q){if(Q.add(q),y)clearTimeout(y);y=setTimeout(async()=>{y=null;let w=[...Q];Q.clear();let z=await j("skills",w[0]);if(b(z)){Z(`ConfigChange hook blocked skill reload (${w.length} paths)`);return}I(),L(),T(),W.emit()},U?.reloadDebounce??l)}async function wq(q){if(x)await x.close(),x=null;if(y)clearTimeout(y),y=null;Q.clear(),W.clear(),B=!1,D=!1,U=q??null}var Zq={initialize:t,dispose:g,subscribe:s,resetForTesting:wq};
|
|
2
|
+
export{Zq as mb};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{sN as x,vN as B}from"./cli-0.6.2-4p9wa0p6.mjs";import{hpa as z}from"./cli-0.6.2-3rgtxc9f.mjs";function H(q){if(!q)return 0;return q.activeAgents.filter((b)=>b.source!=="built-in").reduce((b,w)=>{let y=`${w.agentType}: ${w.whenToUse}`;return b+x(y)},0)}var G=15000;var A=z(()=>{B()});
|
|
2
|
+
export{G as Ff,H as Gf,A as Hf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{I1 as j,L1 as I,S3 as b,T3 as c,Y4 as d,y4 as f}from"./cli-0.6.2-ea8z1e2e.mjs";import{m7 as F,n7 as D}from"./cli-0.6.2-wbg54yyk.mjs";import{Ada as y,Ida as T}from"./cli-0.6.2-hhjx89cr.mjs";import{Oea as $,Pea as R,Qea as _,Rea as E}from"./cli-0.6.2-r4p904h3.mjs";import{aga as q,bga as m}from"./cli-0.6.2-qec7nrgw.mjs";import{Jga as M,Oga as U,eha as W,hha as z}from"./cli-0.6.2-g6c6hjc6.mjs";import{Fha as O,xha as k,yha as Y}from"./cli-0.6.2-0f9sh5z8.mjs";import{Koa as h,soa as X}from"./cli-0.6.2-xnn1c5kd.mjs";import{hpa as A}from"./cli-0.6.2-3rgtxc9f.mjs";import{randomUUID as l}from"crypto";function p(J){if(!X.isAxiosError(J))return!1;if(!J.response)return!0;if(J.response.status>=500)return!0;return!1}async function u(J,B){let N;for(let K=0;K<=x;K++)try{return await X.get(J,B)}catch(Q){if(N=Q,!p(Q))throw Q;if(K>=x)throw W(`Teleport request failed after ${K+1} attempts: ${Y(Q)}`),Q;let V=S[K]??2000;W(`Teleport request failed (attempt ${K+1}/${x+1}), retrying in ${V}ms: ${Y(Q)}`),await b(V)}throw N}async function C(){let J=f()?.accessToken;if(J===void 0)throw Error("Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.");let B=await j();if(!B)throw Error("Unable to get organization UUID");return{accessToken:J,orgUUID:B}}async function NJ(){let{accessToken:J,orgUUID:B}=await C(),N=`${q().BASE_API_URL}/v1/sessions`;try{let K={...L(J),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":B},Q=await u(N,{headers:K});if(Q.status!==200)throw Error(`Failed to fetch code sessions: ${Q.statusText}`);return Q.data.data.map((Z)=>{let v=Z.session_context.sources.find((G)=>G.type==="git_repository"),H=null;if(v?.url){let G=F(v.url);if(G){let[w,P]=G.split("/");if(w&&P)H={name:P,owner:{login:w},default_branch:v.revision||void 0}}}return{id:Z.id,title:Z.title||"Untitled",description:"",status:Z.session_status,repo:H,turns:[],created_at:Z.created_at,updated_at:Z.updated_at}})}catch(K){let Q=k(K);throw y(Q),K}}function L(J){return{Authorization:`Bearer ${J}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"}}async function WJ(J){let{accessToken:B,orgUUID:N}=await C(),K=`${q().BASE_API_URL}/v1/sessions/${J}`,Q={...L(B),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":N},V=await X.get(K,{headers:Q,timeout:15000,validateStatus:(Z)=>Z<500});if(V.status!==200){let v=V.data?.error?.message;if(V.status===404)throw Error(`Session not found: ${J}`);if(V.status===401)throw Error("Session expired. Please run /login to sign in again.");throw Error(v||`Failed to fetch session: ${V.status} ${V.statusText}`)}return V.data}function GJ(J){return J.session_context.outcomes?.find((N)=>N.type==="git_repository")?.git_info?.branches[0]}async function vJ(J,B,N){try{let{accessToken:K,orgUUID:Q}=await C(),V=`${q().BASE_API_URL}/v1/sessions/${J}/events`,Z={...L(K),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":Q},H={events:[{uuid:N?.uuid??l(),session_id:J,type:"user",parent_tool_use_id:null,message:{role:"user",content:B}}]};W(`[sendEventToRemoteSession] Sending event to session ${J}`);let G=await X.post(V,H,{headers:Z,validateStatus:(w)=>w<500,timeout:30000});if(G.status===200||G.status===201)return W(`[sendEventToRemoteSession] Successfully sent event to session ${J}`),!0;return W(`[sendEventToRemoteSession] Failed with status ${G.status}: ${M(G.data)}`),!1}catch(K){return W(`[sendEventToRemoteSession] Error: ${Y(K)}`),!1}}async function XJ(J,B){try{let{accessToken:N,orgUUID:K}=await C(),Q=`${q().BASE_API_URL}/v1/sessions/${J}`,V={...L(N),"anthropic-beta":"ccr-byoc-2025-07-29","x-organization-uuid":K};W(`[updateSessionTitle] Updating title for session ${J}: "${B}"`);let Z=await X.patch(Q,{title:B},{headers:V,validateStatus:(v)=>v<500});if(Z.status===200)return W(`[updateSessionTitle] Successfully updated title for session ${J}`),!0;return W(`[updateSessionTitle] Failed with status ${Z.status}: ${M(Z.data)}`),!1}catch(N){return W(`[updateSessionTitle] Error: ${Y(N)}`),!1}}var S,x,$J="ccr-byoc-2025-07-29",BJ;var g=A(()=>{h();m();I();R();d();z();D();O();E();T();c();U();S=[2000,4000,8000,16000],x=S.length;BJ=_(()=>$.object({id:$.string(),title:$.string(),description:$.string(),status:$.enum(["idle","working","waiting","completed","archived","cancelled","rejected"]),repo:$.object({name:$.string(),owner:$.object({login:$.string()}),default_branch:$.string().optional()}).nullable(),turns:$.array($.string()),created_at:$.string(),updated_at:$.string()}))});
|
|
2
|
+
export{$J as C0,p as D0,u as E0,BJ as F0,C as G0,NJ as H0,L as I0,WJ as J0,GJ as K0,vJ as L0,XJ as M0,g as N0};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Up as Eq,Vp as v,Wp as zJ,bq as XJ,dm as oq,dq as GJ,em as jJ,fx as kJ,gE as KJ,gx as _J,hq as cq,iE as vJ,iq as Vq,lq as YJ,lu as Cq,mq as pq,mu as wJ,ou as MJ,pm as qJ,qm as hJ,rm as JJ,sm as OJ,tm as QJ,um as FJ}from"./cli-0.6.2-4p9wa0p6.mjs";import{YU as tq,ZU as VJ}from"./cli-0.6.2-4py7r63v.mjs";import{mW as eq,nW as mJ,vW as ZJ,wW as gJ}from"./cli-0.6.2-vfdaj8xa.mjs";import{RW as CJ,RY as TJ,kY as H,mY as Y}from"./cli-0.6.2-4r69ge5f.mjs";import{o0 as lq,p0 as X,q0 as K,r0 as rq}from"./cli-0.6.2-jrpted0b.mjs";import{s0 as DJ}from"./cli-0.6.2-d3y2w089.mjs";import{$2 as S,B2 as NJ,D4 as HJ,E3 as rJ,Y4 as uJ,Z2 as mq,h2 as jq,i2 as fq,i3 as g,k2 as yq,l3 as Dq,p3 as yJ,w2 as sq,z3 as UJ}from"./cli-0.6.2-ea8z1e2e.mjs";import{B_ as _q,C_ as vq,D_ as Rq,E_ as Sq,Eaa as aq,F_ as xq,Gaa as iq,P_ as RJ,Taa as LJ}from"./cli-0.6.2-hhjx89cr.mjs";import{cga as $q,ega as bJ}from"./cli-0.6.2-vqt5hqzr.mjs";import{dpa as dq,hpa as bq}from"./cli-0.6.2-3rgtxc9f.mjs";function iJ(J,q){if(!v(q))return;let Z=cq(q,J);return`${Lq(Z)} ${Z} · /effort`}function Lq(J){if(Eq(J))return xq;switch(J){case"low":return _q;case"medium":return vq;case"high":return Rq;case"max":return Sq;default:return Rq}}var nq=bq(()=>{RJ();pq()});function BQ(J){let q=hq.c(82),{initial:Z,sessionModel:z,onSelect:G,onCancel:w,isStandaloneCommand:W,showFastModeNotice:Yq,headerText:WJ,skipSettingsWrite:wq}=J,kq=wJ(),E=tq(),B=Z===null?x:Z,[A,BJ]=Gq.useState(B),AJ=Cq(cJ),[P,IJ]=Gq.useState(!1),R=Cq(EJ),c;if(q[0]!==R)c=R!==void 0?Vq(R):void 0,q[0]=R,q[1]=c;else c=q[1];let[b,Oq]=Gq.useState(c),Kq=AJ??!1,p;if(q[2]!==Kq)p=kJ(Kq),q[2]=Kq,q[3]=p;else p=q[3];let M=p,Uq;q:{if(Z!==null&&!M.some((Q)=>{if(Q.value===Z)return!0;if(Q.value===null)return!1;try{return S(g(String(Q.value)))===S(g(Z))}catch{return!1}})){let Q;if(q[4]!==Z)Q=Dq(Z),q[4]=Z,q[5]=Q;else Q=q[5];let k;if(q[6]!==Z||q[7]!==Q)k={value:Z,label:Q,description:"Current model"},q[6]=Z,q[7]=Q,q[8]=k;else k=q[8];let L;if(q[9]!==M||q[10]!==k)L=[...M,k],q[9]=M,q[10]=k,q[11]=L;else L=q[11];Uq=L;break q}Uq=M}let Hq=Uq,n;if(q[12]!==Hq)n=Hq.map(xJ),q[12]=Hq,q[13]=n;else n=q[13];let U=n,r;if(q[14]!==B||q[15]!==U)r=U.find((Q)=>{if(Q.value===B)return!0;if(B===x||Q.value===null)return!1;try{return S(g(String(Q.value)))===S(g(String(B)))}catch{return!1}})?.value??U[0]?.value??void 0,q[14]=B,q[15]=U,q[16]=r;else r=q[16];let Wq=r,u=Math.min(10,U.length),d=Math.max(0,U.length-u),$;if(q[17]!==A||q[18]!==U)$=U.find((Q)=>Q.value===A)?.label,q[17]=A,q[18]=U,q[19]=$;else $=q[19];let a=$,I,i;if(q[20]!==A){let Q=Tq(A);I=Q?v(Q):!1,i=Q?zJ(Q):!1,q[20]=A,q[21]=I,q[22]=i}else I=q[21],i=q[22];let f=i,s;if(q[23]!==A)s=Nq(A),q[23]=A,q[24]=s;else s=q[24];let N=s,_=b==="max"&&!f?"high":b,l;if(q[25]!==R||q[26]!==P)l=(Q)=>{if(BJ(Q),!P&&R===void 0)Oq(Nq(Q))},q[25]=R,q[26]=P,q[27]=l;else l=q[27];let Bq=l,o;if(q[28]!==N||q[29]!==I||q[30]!==f)o=(Q)=>{if(!I)return;Oq((k)=>pJ(k??N,Q,f)),IJ(!0)},q[28]=N,q[29]=I,q[30]=f,q[31]=o;else o=q[31];let e=o,t;if(q[32]!==e)t={"modelPicker:decreaseEffort":()=>e("left"),"modelPicker:increaseEffort":()=>e("right")},q[32]=e,q[33]=t;else t=q[33];let qq;if(q[34]===Symbol.for("react.memo_cache_sentinel"))qq={context:"ModelPicker"},q[34]=qq;else qq=q[34];eq(t,qq);let Jq;if(q[35]!==b||q[36]!==P||q[37]!==G||q[38]!==kq||q[39]!==wq)Jq=function(k){if($q("tengu_model_command_menu_effort",{effort:b}),!wq){let gq=GJ(b,Nq(k),aq("userSettings")?.effortLevel,P),Mq=XJ(gq);if(Mq!==void 0)iq("userSettings",{effortLevel:Mq});kq((PJ)=>({...PJ,effortValue:gq}))}let L=Tq(k),Fq=P&&L&&v(L)?b:void 0;if(k===x){G(null,Fq);return}G(k,Fq)},q[35]=b,q[36]=P,q[37]=G,q[38]=kq,q[39]=wq,q[40]=Jq;else Jq=q[40];let Aq=Jq,Qq;if(q[41]===Symbol.for("react.memo_cache_sentinel"))Qq=X(Y,{color:"remember",bold:!0,children:"Select model"}),q[41]=Qq;else Qq=q[41];let Iq=WJ??"Switch between Claude models. Applies to this session and future Claude Code sessions. For other/previous model names, specify with --model.",y;if(q[42]!==Iq)y=X(Y,{dimColor:!0,children:Iq}),q[42]=Iq,q[43]=y;else y=q[43];let D;if(q[44]!==z)D=z&&K(Y,{dimColor:!0,children:["Currently using ",Dq(z)," for this session (set by plan mode). Selecting a model will undo this."]}),q[44]=z,q[45]=D;else D=q[45];let C;if(q[46]!==y||q[47]!==D)C=K(H,{marginBottom:1,flexDirection:"column",children:[Qq,y,D]}),q[46]=y,q[47]=D,q[48]=C;else C=q[48];let Pq=w??SJ,T;if(q[49]!==Bq||q[50]!==Aq||q[51]!==Wq||q[52]!==B||q[53]!==U||q[54]!==Pq||q[55]!==u)T=X(H,{flexDirection:"column",children:X(KJ,{defaultValue:B,defaultFocusValue:Wq,options:U,onChange:Aq,onFocus:Bq,onCancel:Pq,visibleOptionCount:u})}),q[49]=Bq,q[50]=Aq,q[51]=Wq,q[52]=B,q[53]=U,q[54]=Pq,q[55]=u,q[56]=T;else T=q[56];let j;if(q[57]!==d)j=d>0&&X(H,{paddingLeft:3,children:K(Y,{dimColor:!0,children:["and ",d," more…"]})}),q[57]=d,q[58]=j;else j=q[58];let m;if(q[59]!==T||q[60]!==j)m=K(H,{flexDirection:"column",marginBottom:1,children:[T,j]}),q[59]=T,q[60]=j,q[61]=m;else m=q[61];let V;if(q[62]!==_||q[63]!==N||q[64]!==a||q[65]!==I)V=X(H,{marginBottom:1,flexDirection:"column",children:I?K(Y,{dimColor:!0,children:[X(uq,{effort:_})," ",oq(_)," effort",_===N?" (default)":""," ",X(Y,{color:"subtle",children:"← → to adjust"})]}):K(Y,{color:"subtle",children:[X(uq,{effort:void 0})," Effort not supported",a?` for ${a}`:""]})}),q[62]=_,q[63]=N,q[64]=a,q[65]=I,q[66]=V;else V=q[66];let h;if(q[67]!==Yq)h=jq()?Yq?X(H,{marginBottom:1,children:K(Y,{dimColor:!0,children:["Fast mode is ",X(Y,{bold:!0,children:"ON"})," and available with"," ",yq," only (/fast). Switching to other models turn off fast mode."]})}):fq()&&!sq()?X(H,{marginBottom:1,children:K(Y,{dimColor:!0,children:["Use ",X(Y,{bold:!0,children:"/fast"})," to turn on Fast mode (",yq," only)."]})}):null:null,q[67]=Yq,q[68]=h;else h=q[68];let O;if(q[69]!==C||q[70]!==m||q[71]!==V||q[72]!==h)O=K(H,{flexDirection:"column",children:[C,m,V,h]}),q[69]=C,q[70]=m,q[71]=V,q[72]=h,q[73]=O;else O=q[73];let F;if(q[74]!==E||q[75]!==W)F=W&&X(Y,{dimColor:!0,italic:!0,children:E.pending?K(lq,{children:["Press ",E.keyName," again to exit"]}):K(QJ,{children:[X(qJ,{shortcut:"Enter",action:"confirm"}),X(JJ,{action:"select:cancel",context:"Select",fallback:"Esc",description:"exit"})]})}),q[74]=E,q[75]=W,q[76]=F;else F=q[76];let Zq;if(q[77]!==O||q[78]!==F)Zq=K(H,{flexDirection:"column",children:[O,F]}),q[77]=O,q[78]=F,q[79]=Zq;else Zq=q[79];let zq=Zq;if(!W)return zq;let Xq;if(q[80]!==zq)Xq=X(ZJ,{color:"permission",children:zq}),q[80]=zq,q[81]=Xq;else Xq=q[81];return Xq}function SJ(){}function xJ(J){return{...J,value:J.value===null?x:J.value}}function EJ(J){return J.effortValue}function cJ(J){return jq()?J.fastMode:!1}function Tq(J){if(!J)return;return J===x?mq():g(J)}function uq(J){let q=hq.c(5),{effort:Z}=J,z=Z?"claude":"subtle",G=Z??"low",w;if(q[0]!==G)w=Lq(G),q[0]=G,q[1]=w;else w=q[1];let W;if(q[2]!==z||q[3]!==w)W=X(Y,{color:z,children:w}),q[2]=z,q[3]=w,q[4]=W;else W=q[4];return W}function pJ(J,q,Z){let z=Z?["low","medium","high","max"]:["low","medium","high"],G=z.indexOf(J),w=G!==-1?G:z.indexOf("high");if(q==="right")return z[(w+1)%z.length];else return z[(w-1+z.length)%z.length]}function Nq(J){let q=Tq(J)??mq(),Z=YJ(q);return Z!==void 0?Vq(Z):"high"}var hq,Gq,x="__NO_PREFERENCE__";var nJ=bq(()=>{jJ();VJ();bJ();NJ();TJ();mJ();MJ();pq();yJ();_J();LJ();OJ();vJ();FJ();hJ();gJ();nq();rq();hq=dq(CJ(),1),Gq=dq(DJ(),1)});function bQ(J,q,Z){if(!HJ())return!1;if(q)return!0;if(J===null||!UJ(J))return!1;let z=J.toLowerCase().replace(/\[1m\]$/,"").trim(),G=z==="opus"||z.includes("opus-4-6")||z.includes("opus-4-7"),w=z==="sonnet"||z.includes("sonnet-4-6");if(G&&Z)return!1;return G||w}var dJ=bq(()=>{uJ();rJ()});
|
|
2
|
+
export{iJ as lg,Lq as mg,nq as ng,BQ as og,nJ as pg,bQ as qg,dJ as rg};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{q as j,r as v}from"./cli-0.6.2-dv8abe56.mjs";import{gg as C}from"./cli-0.6.2-tqq6q5x7.mjs";import{KR as S,LR as b}from"./cli-0.6.2-zftyh47j.mjs";import{LZ as R,NZ as E}from"./cli-0.6.2-3mpd0wjn.mjs";import{Nea as Z,Pea as U,Qea as w,Rea as z}from"./cli-0.6.2-r4p904h3.mjs";import{_ea as L,lfa as I}from"./cli-0.6.2-9w9nmx9s.mjs";import{Jga as D,Kga as T,Oga as u,eha as M,hha as l}from"./cli-0.6.2-g6c6hjc6.mjs";import{Fha as p,yha as f}from"./cli-0.6.2-0f9sh5z8.mjs";import{Koa as h,soa as k}from"./cli-0.6.2-xnn1c5kd.mjs";U();I();z();E();C();var F={init_retry_max_attempts:3,init_retry_base_delay_ms:500,init_retry_jitter_fraction:0.25,init_retry_max_delay_ms:4000,http_timeout_ms:1e4,uuid_dedup_buffer_size:2000,heartbeat_interval_ms:20000,heartbeat_jitter_fraction:0.1,token_refresh_buffer_ms:300000,teardown_archive_timeout_ms:1500,connect_timeout_ms:15000,min_version:"0.0.0",should_show_app_upgrade_message:!1},m=w(()=>Z.object({init_retry_max_attempts:Z.number().int().min(1).max(10).default(3),init_retry_base_delay_ms:Z.number().int().min(100).default(500),init_retry_jitter_fraction:Z.number().min(0).max(1).default(0.25),init_retry_max_delay_ms:Z.number().int().min(500).default(4000),http_timeout_ms:Z.number().int().min(2000).default(1e4),uuid_dedup_buffer_size:Z.number().int().min(100).max(50000).default(2000),heartbeat_interval_ms:Z.number().int().min(5000).max(30000).default(20000),heartbeat_jitter_fraction:Z.number().min(0).max(0.5).default(0.1),token_refresh_buffer_ms:Z.number().int().min(30000).max(1800000).default(300000),teardown_archive_timeout_ms:Z.number().int().min(500).max(2000).default(1500),connect_timeout_ms:Z.number().int().min(5000).max(60000).default(15000),min_version:Z.string().refine((J)=>{try{return R(J,"0.0.0"),!0}catch{return!1}}).default("0.0.0"),should_show_app_upgrade_message:Z.boolean().default(!1)}));async function y(){let J=await L("tengu_bridge_repl_v2_config",F),K=m().safeParse(J);return K.success?K.data:F}async function o(){let J=await y();if(J.min_version&&R("99.0.0",J.min_version))return`Your version of Claudin (99.0.0) is too old for Remote Control.
|
|
2
|
+
Version ${J.min_version} or higher is required. Run \`claudin update\` to update.`;return null}h();u();function JJ(J){let K=Buffer.from(J,"base64url").toString("utf-8"),X=T(K);if(!X||typeof X!=="object"||!("version"in X)||X.version!==1)throw Error(`Unsupported work secret version: ${X&&typeof X==="object"&&"version"in X?X.version:"unknown"}`);let Y=X;if(typeof Y.session_ingress_token!=="string"||Y.session_ingress_token.length===0)throw Error("Invalid work secret: missing or empty session_ingress_token");if(typeof Y.api_base_url!=="string")throw Error("Invalid work secret: missing api_base_url");return X}function KJ(J,K){let X=new URL(J).hostname,Y=X==="localhost"||X==="127.0.0.1",x=Y?"ws":"wss",H=Y?"v2":"v1",P=J.replace(/^https?:\/\//,"").replace(/\/+$/,"");return`${x}://${P}/${H}/session_ingress/ws/${K}`}function QJ(J,K){if(J===K)return!0;let X=J.slice(J.lastIndexOf("_")+1),Y=K.slice(K.lastIndexOf("_")+1);return X.length>=4&&X===Y}function XJ(J,K){return`${J.replace(/\/+$/,"")}/v1/code/sessions/${K}`}async function B(J,K){let X=await k.post(`${J}/worker/register`,{},{headers:{Authorization:`Bearer ${K}`,"Content-Type":"application/json","anthropic-version":"2023-06-01"},timeout:1e4}),Y=X.data?.worker_epoch,x=typeof Y==="string"?Number(Y):Y;if(typeof x!=="number"||!Number.isFinite(x)||!Number.isSafeInteger(x))throw Error(`registerWorker: invalid worker_epoch in response: ${D(X.data)}`);return x}l();p();b();function WJ(J){return{write:(K)=>J.write(K),writeBatch:(K)=>J.writeBatch(K),close:()=>J.close(),isConnectedStatus:()=>J.isConnectedStatus(),getStateLabel:()=>J.getStateLabel(),setOnData:(K)=>J.setOnData(K),setOnClose:(K)=>J.setOnClose(K),setOnConnect:(K)=>J.setOnConnect(K),connect:()=>void J.connect(),getLastSequenceNum:()=>0,get droppedBatchCount(){return J.droppedBatchCount},reportState:()=>{},reportMetadata:()=>{},reportDelivery:()=>{},flush:()=>Promise.resolve()}}async function HJ(J){let{sessionUrl:K,ingressToken:X,sessionId:Y,initialSequenceNum:x,getAuthToken:H}=J,P;if(H)P=()=>{let Q=H();if(!Q)return{};return{Authorization:`Bearer ${Q}`}};else S(X);let O=J.epoch??await B(K,X);M(`[bridge:repl] CCR v2: worker sessionId=${Y} epoch=${O}${J.epoch!==void 0?" (from /bridge)":" (via registerWorker)"}`);let V=new URL(K);V.pathname=V.pathname.replace(/\/$/,"")+"/worker/events/stream";let q=new v(V,{},Y,void 0,x,P),G,$=new j(q,new URL(K),{getAuthHeaders:P,heartbeatIntervalMs:J.heartbeatIntervalMs,heartbeatJitterFraction:J.heartbeatJitterFraction,onEpochMismatch:()=>{M("[bridge:repl] CCR v2: epoch superseded (409) — closing for poll-loop recovery");try{$.close(),q.close(),G?.(4090)}catch(Q){M(`[bridge:repl] CCR v2: error during epoch-mismatch cleanup: ${f(Q)}`,{level:"error"})}throw Error("epoch superseded")}});q.setOnEvent((Q)=>{$.reportDelivery(Q.event_id,"received"),$.reportDelivery(Q.event_id,"processed")});let _,N=!1,A=!1;return{write(Q){return $.writeEvent(Q)},async writeBatch(Q){for(let W of Q){if(A)break;await $.writeEvent(W)}},close(){A=!0,$.close(),q.close()},isConnectedStatus(){return N},getStateLabel(){if(q.isClosedStatus())return"closed";if(q.isConnectedStatus())return N?"connected":"init";return"connecting"},setOnData(Q){q.setOnData(Q)},setOnClose(Q){G=Q,q.setOnClose((W)=>{$.close(),Q(W??4092)})},setOnConnect(Q){_=Q},getLastSequenceNum(){return q.getLastSequenceNum()},droppedBatchCount:0,reportState(Q){$.reportState(Q)},reportMetadata(Q){$.reportMetadata(Q)},reportDelivery(Q,W){$.reportDelivery(Q,W)},flush(){return $.flush()},connect(){if(!J.outboundOnly)q.connect();$.initialize(O).then(()=>{N=!0,M(`[bridge:repl] v2 transport ready for writes (epoch=${O}, sse=${q.isConnectedStatus()?"open":"opening"})`),_?.()},(Q)=>{M(`[bridge:repl] CCR v2 initialize failed: ${f(Q)}`,{level:"error"}),$.close(),q.close(),G?.(4091)})}}}class g{_active=!1;_pending=[];get active(){return this._active}get pendingCount(){return this._pending.length}start(){this._active=!0}end(){return this._active=!1,this._pending.splice(0)}enqueue(...J){if(!this._active)return!1;return this._pending.push(...J),!0}drop(){this._active=!1;let J=this._pending.length;return this._pending.length=0,J}deactivate(){this._active=!1}}
|
|
3
|
+
export{y as a,o as b,JJ as c,KJ as d,QJ as e,XJ as f,WJ as g,HJ as h,g as i};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{u5 as S}from"./cli-0.6.2-5jempndm.mjs";import{Sga as E,Wga as o,eha as $,hha as d}from"./cli-0.6.2-g6c6hjc6.mjs";import{Kha as u,Lha as BG,Vha as r}from"./cli-0.6.2-gqbd9ax6.mjs";import{Xna as q,Yna as f}from"./cli-0.6.2-wryj4wnr.mjs";import{Koa as LG,soa as B}from"./cli-0.6.2-xnn1c5kd.mjs";import{Ooa as YG}from"./cli-0.6.2-dbw96fj0.mjs";import{dpa as QG,hpa as F,ipa as FG}from"./cli-0.6.2-3rgtxc9f.mjs";function CG(){H.cache.clear?.(),$("Cleared CA certificates cache")}var H;var l=F(()=>{f();d();r();o();H=q(()=>{let G=u("--use-system-ca")||u("--use-openssl-ca"),J=process.env.NODE_EXTRA_CA_CERTS;if($(`CA certs: useSystemCA=${G}, extraCertsPath=${J}`),!G&&!J)return;let K=FG("tls"),Q=[];if(G){let Y=K.getCACertificates,Z=Y?.("system");if(Z&&Z.length>0)Q.push(...Z),$(`CA certs: Loaded ${Q.length} system CA certificates (--use-system-ca)`);else if(!Y&&!J){$("CA certs: --use-system-ca set but system CA API unavailable, deferring to runtime");return}else Q.push(...K.rootCertificates),$(`CA certs: Loaded ${Q.length} bundled root certificates as base (--use-system-ca fallback)`)}else Q.push(...K.rootCertificates),$(`CA certs: Loaded ${Q.length} bundled root certificates as base`);if(J)try{let Y=E().readFileSync(J,{encoding:"utf8"});Q.push(Y),$(`CA certs: Appended extra certificates from NODE_EXTRA_CA_CERTS (${J})`)}catch(Y){$(`CA certs: Failed to read NODE_EXTRA_CA_CERTS file (${J}): ${Y}`,{level:"error"})}return Q.length>0?Q:void 0})});import{Agent as NG}from"https";function lG(){let G=j(),J=H();if(!G&&!J)return;return{...G,...J&&{ca:J}}}function O(){let G=j(),J=H();if(!G&&!J)return{};let K={...G,...J&&{ca:J}};if(typeof Bun<"u")return{tls:K};return $("TLS: Created undici agent with custom certificates"),{dispatcher:new(S()).Agent({connect:{cert:K.cert,key:K.key,passphrase:K.passphrase,...K.ca&&{ca:K.ca}},pipelining:1})}}function cG(){j.cache.clear?.(),D.cache.clear?.(),$("Cleared mTLS configuration cache")}function gG(){if(!j())return;if(process.env.NODE_EXTRA_CA_CERTS)$("NODE_EXTRA_CA_CERTS detected - Node.js will automatically append to built-in CAs")}var j,D;var t=F(()=>{f();l();d();o();j=q(()=>{let G={};if(process.env.CLAUDE_CODE_CLIENT_CERT)try{G.cert=E().readFileSync(process.env.CLAUDE_CODE_CLIENT_CERT,{encoding:"utf8"}),$("mTLS: Loaded client certificate from CLAUDE_CODE_CLIENT_CERT")}catch(J){$(`mTLS: Failed to load client certificate: ${J}`,{level:"error"})}if(process.env.CLAUDE_CODE_CLIENT_KEY)try{G.key=E().readFileSync(process.env.CLAUDE_CODE_CLIENT_KEY,{encoding:"utf8"}),$("mTLS: Loaded client key from CLAUDE_CODE_CLIENT_KEY")}catch(J){$(`mTLS: Failed to load client key: ${J}`,{level:"error"})}if(process.env.CLAUDE_CODE_CLIENT_KEY_PASSPHRASE)G.passphrase=process.env.CLAUDE_CODE_CLIENT_KEY_PASSPHRASE,$("mTLS: Using client key passphrase");if(Object.keys(G).length===0)return;return G}),D=q(()=>{let G=j(),J=H();if(!G&&!J)return;let K={...G,...J&&{ca:J},keepAlive:!0};return $("mTLS: Creating HTTPS agent with custom certificates"),new NG(K)})});var e=()=>{};import*as GG from"net";import*as JG from"http";import{Agent as TG}from"https";var V,c;var KG=F(()=>{e();V=Symbol("AgentBaseInternalState");c=class c extends JG.Agent{constructor(G){super(G);this[V]={}}isSecureEndpoint(G){if(G){if(typeof G.secureEndpoint==="boolean")return G.secureEndpoint;if(typeof G.protocol==="string")return G.protocol==="https:"}let{stack:J}=Error();if(typeof J!=="string")return!1;return J.split(`
|
|
2
|
+
`).some((K)=>K.indexOf("(https.js:")!==-1||K.indexOf("node:https:")!==-1)}incrementSockets(G){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;if(!this.sockets[G])this.sockets[G]=[];let J=new GG.Socket({writable:!1});return this.sockets[G].push(J),this.totalSocketCount++,J}decrementSockets(G,J){if(!this.sockets[G]||J===null)return;let K=this.sockets[G],Q=K.indexOf(J);if(Q!==-1){if(K.splice(Q,1),this.totalSocketCount--,K.length===0)delete this.sockets[G]}}getName(G){if(this.isSecureEndpoint(G))return TG.prototype.getName.call(this,G);return super.getName(G)}createSocket(G,J,K){let Q={...J,secureEndpoint:this.isSecureEndpoint(J)},Y=this.getName(Q),Z=this.incrementSockets(Y);Promise.resolve().then(()=>this.connect(G,Q)).then((w)=>{if(this.decrementSockets(Y,Z),typeof w.addRequest==="function")try{return w.addRequest(G,Q)}catch(W){return K(W)}this[V].currentSocket=w,super.createSocket(G,J,K)},(w)=>{this.decrementSockets(Y,Z),K(w)})}createConnection(){let G=this[V].currentSocket;if(this[V].currentSocket=void 0,!G)throw Error("No socket was returned in the `connect()` function");return G}get defaultPort(){return this[V].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(G){if(this[V])this[V].defaultPort=G}get protocol(){return this[V].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(G){if(this[V])this[V].protocol=G}}});function $G(G){return new Promise((J,K)=>{let Q=0,Y=[];function Z(){let z=G.read();if(z)h(z);else G.once("readable",Z)}function w(){G.removeListener("end",W),G.removeListener("error",M),G.removeListener("readable",Z)}function W(){w(),b("onend"),K(Error("Proxy connection ended before receiving CONNECT response"))}function M(z){w(),b("onerror %o",z),K(z)}function h(z){Y.push(z),Q+=z.length;let X=Buffer.concat(Y,Q),i=X.indexOf(`\r
|
|
3
|
+
\r
|
|
4
|
+
`);if(i===-1){b("have not received end of HTTP headers yet..."),Z();return}let n=X.slice(0,i).toString("ascii").split(`\r
|
|
5
|
+
`),C=n.shift();if(!C)return G.destroy(),K(Error("No header received from proxy CONNECT response"));let s=C.split(" "),UG=+s[1],_G=s.slice(2).join(" "),T={};for(let I of n){if(!I)continue;let x=I.indexOf(":");if(x===-1)return G.destroy(),K(Error(`Invalid header from proxy CONNECT response: "${I}"`));let m=I.slice(0,x).toLowerCase(),y=I.slice(x+1).trimStart(),R=T[m];if(typeof R==="string")T[m]=[R,y];else if(Array.isArray(R))R.push(y);else T[m]=y}b("got proxy server response: %o %o",C,T),w(),J({connect:{statusCode:UG,statusText:_G,headers:T},buffered:X})}G.on("error",M),G.on("end",W),Z()})}var ZG,b;var WG=F(()=>{ZG=QG(YG(),1),b=ZG.default("https-proxy-agent:parse-proxy-response")});import*as U from"net";import*as g from"tls";import IG from"assert";import{URL as EG}from"url";function SG(G){G.resume()}function XG(G,...J){let K={},Q;for(Q in G)if(!J.includes(Q))K[Q]=G[Q];return K}var zG,L,wG=(G)=>{if(G.servername===void 0&&G.host&&!U.isIP(G.host))return{...G,servername:G.host};return G},A;var VG=F(()=>{KG();WG();zG=QG(YG(),1),L=zG.default("https-proxy-agent");A=class A extends c{constructor(G,J){super(J);this.options={path:void 0},this.proxy=typeof G==="string"?new EG(G):G,this.proxyHeaders=J?.headers??{},L("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let K=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),Q=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...J?XG(J,"headers"):null,host:K,port:Q}}async connect(G,J){let{proxy:K}=this;if(!J.host)throw TypeError('No "host" provided');let Q;if(K.protocol==="https:")L("Creating `tls.Socket`: %o",this.connectOpts),Q=g.connect(wG(this.connectOpts));else L("Creating `net.Socket`: %o",this.connectOpts),Q=U.connect(this.connectOpts);let Y=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders},Z=U.isIPv6(J.host)?`[${J.host}]`:J.host,w=`CONNECT ${Z}:${J.port} HTTP/1.1\r
|
|
6
|
+
`;if(K.username||K.password){let X=`${decodeURIComponent(K.username)}:${decodeURIComponent(K.password)}`;Y["Proxy-Authorization"]=`Basic ${Buffer.from(X).toString("base64")}`}if(Y.Host=`${Z}:${J.port}`,!Y["Proxy-Connection"])Y["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let X of Object.keys(Y))w+=`${X}: ${Y[X]}\r
|
|
7
|
+
`;let W=$G(Q);Q.write(`${w}\r
|
|
8
|
+
`);let{connect:M,buffered:h}=await W;if(G.emit("proxyConnect",M),this.emit("proxyConnect",M,G),M.statusCode===200){if(G.once("socket",SG),J.secureEndpoint)return L("Upgrading socket connection to TLS"),g.connect({...XG(wG(J),"host","path","port"),socket:Q});return Q}Q.destroy();let z=new U.Socket({writable:!1});return z.readable=!0,G.once("socket",(X)=>{L("Replaying proxy buffer for failed request"),IG(X.listenerCount("data")>0),X.push(h),X.push(null)}),z}};A.protocols=["http","https"]});function XJ(G){a.set(G,!0),MG(G)}function MG(G){jG.cache.delete?.(G)}function zJ(G){qG.set(G,!0),MG(G)}function RG(G){return qG.get(G)===!0}function DG(G){switch(G.family){case 0:case 4:case 6:return G.family;case"IPv6":return 6;case"IPv4":case void 0:return 4;default:throw Error(`Unsupported address family: ${G.family}`)}}function N(G=process.env){return G.https_proxy||G.HTTPS_PROXY||G.http_proxy||G.HTTP_PROXY}function OG(G=process.env){return G.no_proxy||G.NO_PROXY}function P(G,J=OG()){if(!J)return!1;if(J==="*")return!0;try{let K=new URL(G),Q=K.hostname.toLowerCase(),Y=K.port||(K.protocol==="https:"||K.protocol==="wss:"?"443":"80"),Z=`${Q}:${Y}`;return J.split(/[,\s]+/).filter(Boolean).some((W)=>{if(W=W.toLowerCase().trim(),W.includes(":"))return Z===W;if(W.startsWith(".")){let M=W;return Q===W.substring(1)||Q.endsWith(M)}return Q===W})}catch{return!1}}function v(G,J={}){let K=j(),Q=H(),Y={...K&&{cert:K.cert,key:K.key,passphrase:K.passphrase},...Q&&{ca:Q}};if(BG(process.env.CLAUDE_CODE_PROXY_RESOLVES_HOSTS))Y.lookup=(Z,w,W)=>{W(null,Z,DG(w))};return new A(G,{...Y,...J})}function VJ(G={}){let J=N(),K=D(),Q=B.create({proxy:!1});if(!J){if(K)Q.defaults.httpsAgent=K;return Q}let Y=v(J,G);return Q.interceptors.request.use((Z)=>{if(Z.url&&P(Z.url))Z.httpsAgent=K,Z.httpAgent=K;else Z.httpsAgent=Y,Z.httpAgent=Y;return Z}),Q}function BJ(G){let J=N();if(!J)return;if(P(G))return;return v(J)}function MJ(G){let J=N();if(!J)return;if(P(G))return;return J}function qJ(G){let J=G?.provider&&a.get(G.provider)?{keepalive:!1}:{};if(G?.forAnthropicAPI){let Y=process.env.ANTHROPIC_UNIX_SOCKET;if(Y&&typeof Bun<"u")return{...J,unix:Y}}let K=N();if(K){if(typeof Bun<"u")return{...J,proxy:K,...O()};return{...J,dispatcher:p(K)}}let Q=O();if(G?.provider&&!Q.dispatcher)return{...J,...Q,dispatcher:jG(G.provider)};return{...J,...Q}}function HJ(){let G=N(),J=D();if(k!==void 0)B.interceptors.request.eject(k),k=void 0;if(B.defaults.proxy=void 0,B.defaults.httpAgent=void 0,B.defaults.httpsAgent=void 0,G){B.defaults.proxy=!1;let K=v(G);k=B.interceptors.request.use((Q)=>{if(Q.url&&P(Q.url))if(J)Q.httpsAgent=J,Q.httpAgent=J;else delete Q.httpsAgent,delete Q.httpAgent;else Q.httpsAgent=K,Q.httpAgent=K;return Q}),S().setGlobalDispatcher(p(G))}else if(J){B.defaults.httpsAgent=J;let K=O();if(K.dispatcher)S().setGlobalDispatcher(K.dispatcher)}}async function jJ(){let G=N();if(!G)return{};let[{NodeHttpHandler:J},{defaultProvider:K}]=await Promise.all([import("./index-0.6.2-tftj6wdh.mjs"),import("./index-0.6.2-h37g7n0s.mjs")]),Q=v(G),Y=new J({httpAgent:Q,httpsAgent:Q});return{requestHandler:Y,credentials:K({clientConfig:{requestHandler:Y}})}}function UJ(){p.cache.clear?.(),$("Cleared proxy agent cache")}var a,qG,p,_,HG,bG,jG,k;var AG=F(()=>{LG();VG();f();l();d();r();t();a=new Map;qG=new Map;p=q((G)=>{let J=S(),K=j(),Q=H(),Y={httpProxy:G,httpsProxy:G,noProxy:process.env.NO_PROXY||process.env.no_proxy};if(K||Q){let Z={...K&&{cert:K.cert,key:K.key,passphrase:K.passphrase},...Q&&{ca:Q}};Y.connect=Z,Y.requestTls=Z}return new J.EnvHttpProxyAgent(Y)}),_={connections:12,keepAliveTimeout:30000,pipelining:1},HG={firstParty:{..._,allowH2:!0},openai:{..._,allowH2:!0},gemini:{..._,allowH2:!0},mistral:{..._,allowH2:!0},github:{..._,allowH2:!0},codex:{..._,allowH2:!0},"nvidia-nim":{..._,allowH2:!0},minimax:{..._,allowH2:!0}},bG=HG.openai,jG=q((G)=>{let J=S(),K=HG[G]??bG,Q={...K,allowH2:K.allowH2&&!RG(G),keepAliveTimeout:a.get(G)?100:K.keepAliveTimeout};return new J.Agent(Q)})});
|
|
9
|
+
export{CG as Z4,l as _4,j as $4,lG as a5,cG as b5,gG as c5,t as d5,XJ as e5,zJ as f5,RG as g5,N as h5,P as i5,VJ as j5,BJ as k5,MJ as l5,qJ as m5,HJ as n5,jJ as o5,UJ as p5,AG as q5};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A0 as V,B0 as D,z0 as N}from"./cli-0.6.2-4a5t390f.mjs";import{A4 as $,D4 as B,Y4 as x,Z3 as Z,h1 as Y,m1 as _,y4 as J}from"./cli-0.6.2-ea8z1e2e.mjs";import{Xfa as Q,bga as P}from"./cli-0.6.2-qec7nrgw.mjs";import{Koa as R,soa as X}from"./cli-0.6.2-xnn1c5kd.mjs";import{hpa as W}from"./cli-0.6.2-3rgtxc9f.mjs";function E(){let z=process.env.CLAUDE_AGENT_SDK_VERSION?`, agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`:"",F=process.env.CLAUDE_AGENT_SDK_CLIENT_APP?`, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`:"";return`claude-cli/99.0.0 (${process.env.CLAUDE_CODE_ENTRYPOINT??"cli"}${z}${F})`}function I(){let z=[];if(process.env.CLAUDE_CODE_ENTRYPOINT)z.push(process.env.CLAUDE_CODE_ENTRYPOINT);if(process.env.CLAUDE_AGENT_SDK_VERSION)z.push(`agent-sdk/${process.env.CLAUDE_AGENT_SDK_VERSION}`);if(process.env.CLAUDE_AGENT_SDK_CLIENT_APP)z.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);return`claude-code/99.0.0${z.length>0?` (${z.join(", ")})`:""}`}function w(){if(Y()==="firstParty")return`Claude-User (${N()}; +https://support.anthropic.com/)`;return`Claudin-User (${V()})`}function C(){if(B()){let F=J();if(!F?.accessToken)return{headers:{},error:"No OAuth token available"};return{headers:{Authorization:`Bearer ${F.accessToken}`,"anthropic-beta":Q}}}let z=Z();if(!z)return{headers:{},error:"No API key available"};return{headers:{"x-api-key":z}}}async function O(z,F){try{return await z()}catch(G){if(!X.isAxiosError(G))throw G;let L=G.response?.status;if(!(L===401||F?.also403Revoked&&L===403&&typeof G.response?.data==="string"&&G.response.data.includes("OAuth token has been revoked")))throw G;let M=J()?.accessToken;if(!M)throw G;return await $(M),await z()}}var H=W(()=>{R();P();x();_();D()});
|
|
2
|
+
export{E as t0,I as u0,w as v0,C as w0,O as x0,H as y0};
|