@readmagic/workmate 0.0.1
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/AddWorkspaceDirectory-BSLHrjbt.js +1 -0
- package/dist/chunks/App-DY5O6IKw.js +1 -0
- package/dist/chunks/ApproveApiKey-BEzfC6r3.js +1 -0
- package/dist/chunks/ApproveApiKey-DfAPwDix.js +1 -0
- package/dist/chunks/AssistantSessionChooser-Ce3PraaD.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-Dvhcgahe.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-B68V1bCq.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BV7HHcgL.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CTWhpIm8.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-CU5fCPKq.js +1 -0
- package/dist/chunks/DesktopHandoff-BRbU4is4.js +1 -0
- package/dist/chunks/Dialog-vfLXEPed.js +1 -0
- package/dist/chunks/DiffDialog-CBluIK-x.js +6 -0
- package/dist/chunks/Doctor-B0CRtxi2.js +1 -0
- package/dist/chunks/Doctor-WxNv49HC.js +3 -0
- package/dist/chunks/ExitFlow-CRPgptCN.js +2 -0
- package/dist/chunks/Feedback-CEtzaLr3.js +2 -0
- package/dist/chunks/Grove--kttLxvs.js +11 -0
- package/dist/chunks/Grove-CelgLWH4.js +1 -0
- package/dist/chunks/HybridTransport-BgV5_7Az.js +4 -0
- package/dist/chunks/InvalidConfigDialog-DCGwXW_p.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-jTwsdXWr.js +1 -0
- package/dist/chunks/ListItem-vfLXEPed.js +1 -0
- package/dist/chunks/MCPConnectionManager-BX0LMz9J.js +1 -0
- package/dist/chunks/McpParsingWarnings-WQrWJeWP.js +1 -0
- package/dist/chunks/MessageSelector-_UZB8cGb.js +3 -0
- package/dist/chunks/Messages-jCoW_1Rr.js +11 -0
- package/dist/chunks/Onboarding-BoIVNCgc.js +1 -0
- package/dist/chunks/OverageCreditUpsell-1FCN8bH3.js +1 -0
- package/dist/chunks/PermissionDialog-0ya1CU5k.js +1 -0
- package/dist/chunks/PluginSettings-BD9JLV9-.js +17 -0
- package/dist/chunks/PressEnterToContinue-Dl9Hg9Mf.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-CrGST0Cq.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-B2TDpbpw.js +1 -0
- package/dist/chunks/QueryEngine-D2HUnwmU.js +1 -0
- package/dist/chunks/REPL-BV4WyYMg.js +142 -0
- package/dist/chunks/REPL-DcpN3MRC.js +1 -0
- package/dist/chunks/RemoteCallout-DS_EV6Fh.js +1 -0
- package/dist/chunks/RemoteSessionManager-Tx1N2uVL.js +2 -0
- package/dist/chunks/ResumeConversation-Cw3vP4G8.js +1 -0
- package/dist/chunks/SSETransport-BXiEBMpb.js +4 -0
- package/dist/chunks/SearchBox-vfLXEPed.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-D3VOFq9R.js +1 -0
- package/dist/chunks/Settings-ns6mRsDc.js +2 -0
- package/dist/chunks/TeleportProgress-CcDzMC5L.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-DZbxl4sD.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-EowJO5nm.js +1 -0
- package/dist/chunks/ThemePicker-BYbChJpu.js +1 -0
- package/dist/chunks/TrustDialog-DA3YTk_k.js +1 -0
- package/dist/chunks/TungstenTool-Cb7gJvq4.js +1 -0
- package/dist/chunks/TungstenTool-CxMQVCuF.js +1 -0
- package/dist/chunks/ValidationErrorsList-Cx-hoRwG.js +2 -0
- package/dist/chunks/WelcomeV2-BTfttGcv.js +1 -0
- package/dist/chunks/add-dir-CWt69NAZ.js +1 -0
- package/dist/chunks/agentDisplay-CQ4mZWFH.js +1 -0
- package/dist/chunks/agents-C6jzKOit.js +2 -0
- package/dist/chunks/agents-D4clhuCl.js +103 -0
- package/dist/chunks/ajv-5vMo9UcX.js +8 -0
- package/dist/chunks/allErrors-HMPqE0jK.js +1 -0
- package/dist/chunks/analytics-BotDBGh0.js +1 -0
- package/dist/chunks/ant-9Z5bppVC.js +1 -0
- package/dist/chunks/api-L2IgleTV.js +1 -0
- package/dist/chunks/api-TgV7fl9V.js +1 -0
- package/dist/chunks/asciicast-DYbkzGCN.js +1 -0
- package/dist/chunks/asciicast-n-BBfgDq.js +4 -0
- package/dist/chunks/assistant-BA9_Mo9U.js +1 -0
- package/dist/chunks/assistant-BiNOSla3.js +1 -0
- package/dist/chunks/assistant-YvbVKjVh.js +1 -0
- package/dist/chunks/attributionHooks-CUAoGkU6.js +1 -0
- package/dist/chunks/attributionTrailer-oKKrF3z8.js +1 -0
- package/dist/chunks/auth-CEig4Gxp.js +1 -0
- package/dist/chunks/auth-CbGDlhyO.js +1 -0
- package/dist/chunks/auth-DHyCIxCk.js +15 -0
- package/dist/chunks/autoMode-Db4QrgFr.js +45 -0
- package/dist/chunks/autoModeDenials-BxNzGJdR.js +1 -0
- package/dist/chunks/autonomy-BkAMA7du.js +1 -0
- package/dist/chunks/autonomy-D4Vy-RPQ.js +15 -0
- package/dist/chunks/autonomyPanel-EjfO8jvg.js +1 -0
- package/dist/chunks/axios-BHBm_hhU.js +1 -0
- package/dist/chunks/axios-DaWTGg7G.js +16 -0
- package/dist/chunks/backgroundHousekeeping-BNEKWHhH.js +1 -0
- package/dist/chunks/backgroundHousekeeping-hDDE8mJC.js +17 -0
- package/dist/chunks/banner-hD6wZygx.js +2 -0
- package/dist/chunks/base64-js-0wLHn8zB.js +1 -0
- package/dist/chunks/bedrockClient-DxE_mHFI.js +15 -0
- package/dist/chunks/bg-BzG63WOm.js +1 -0
- package/dist/chunks/bg-DQ0Q3Qv-.js +9 -0
- package/dist/chunks/branch-CeQ9IyZk.js +3 -0
- package/dist/chunks/break-cache-Bd0clV2N.js +8 -0
- package/dist/chunks/bridge-yerAiaK2.js +2 -0
- package/dist/chunks/bridgeConfig-CCtXe8ak.js +1 -0
- package/dist/chunks/bridgeConfig-D5dB38xD.js +1 -0
- package/dist/chunks/bridgeEnabled--F-6TUi4.js +1 -0
- package/dist/chunks/bridgeEnabled-DKX8-T_H.js +1 -0
- package/dist/chunks/bridgeMain--R1HFbOv.js +68 -0
- package/dist/chunks/bridgeMain-d06JByZn.js +1 -0
- package/dist/chunks/bridgeMessaging-CqbLTDcx.js +1 -0
- package/dist/chunks/bridgePointer-W_jdQ8zf.js +1 -0
- package/dist/chunks/browser-Bd7GeBH1.js +1 -0
- package/dist/chunks/btw-CVGRmL9a.js +1 -0
- package/dist/chunks/bundledMode--fG1S62b.js +1 -0
- package/dist/chunks/caches-BtmAri4e.js +3 -0
- package/dist/chunks/caches-BuTIAOtY.js +1 -0
- package/dist/chunks/capacityWake-CV_x9H8j.js +1 -0
- package/dist/chunks/ccrClient-HqMi5Kfu.js +1 -0
- package/dist/chunks/checksum-DgbnMdM-.js +1 -0
- package/dist/chunks/classPrivateFieldSet2-D4U5K-I3.js +1 -0
- package/dist/chunks/classPrivateMethodInitSpec-BXQD0Vh4.js +1 -0
- package/dist/chunks/claudeDesktop-aUMx06RK.js +1 -0
- package/dist/chunks/clear-C6nRzIQE.js +1 -0
- package/dist/chunks/cliLaunch-2AUoMnqx.js +1 -0
- package/dist/chunks/client-BeET1hnC.js +1 -0
- package/dist/chunks/client-DchQnIJD.js +36 -0
- package/dist/chunks/client-DvAL7lY8.js +8 -0
- package/dist/chunks/color-DXI_4ibU.js +1 -0
- package/dist/chunks/color-convert-p91EwGT7.js +1 -0
- package/dist/chunks/commands-VjcG4qFq.js +1 -0
- package/dist/chunks/commitAttribution-Cm40fdNU.js +2 -0
- package/dist/chunks/commitAttribution-Lb3qUlAR.js +1 -0
- package/dist/chunks/compact-DPTVpJ4D.js +2 -0
- package/dist/chunks/completionCache-BQaLkB4d.js +4 -0
- package/dist/chunks/completionCache-CW8lKIgy.js +1 -0
- package/dist/chunks/config-0cRberzR.js +1 -0
- package/dist/chunks/config-BSXLgwpD.js +1 -0
- package/dist/chunks/config-BrxKpHpR.js +1 -0
- package/dist/chunks/config-C7YHKCPV.js +3 -0
- package/dist/chunks/config-CLmFk-5V.js +1 -0
- package/dist/chunks/connectHeadless-CqRoEtrg.js +1 -0
- package/dist/chunks/context-C_cKrBUn.js +1 -0
- package/dist/chunks/context-noninteractive-DnH6Q9Lu.js +54 -0
- package/dist/chunks/context-noninteractive-rUZ3ydmJ.js +1 -0
- package/dist/chunks/controlMessageCompat-IFu4Gc1y.js +1 -0
- package/dist/chunks/conversation-GJxfkr6M.js +1 -0
- package/dist/chunks/conversation-oK3aFzqO.js +1 -0
- package/dist/chunks/createSSHSession--bWmmIk9.js +6 -0
- package/dist/chunks/createSession-DIr4sUp6.js +1 -0
- package/dist/chunks/createSession-DM4acqaC.js +1 -0
- package/dist/chunks/cron-3LntnnhJ.js +1 -0
- package/dist/chunks/crossProjectResume-DKrtjTpm.js +40 -0
- package/dist/chunks/cwd-BuJhkTrc.js +1 -0
- package/dist/chunks/cwd-D-tY2NKc.js +1 -0
- package/dist/chunks/daemon-B9lBPdBJ.js +2 -0
- package/dist/chunks/dangerousBackend-DwcP0P08.js +1 -0
- package/dist/chunks/datadog-ByS7LGGa.js +1 -0
- package/dist/chunks/datadog-DNCsyfSO.js +1 -0
- package/dist/chunks/debug-DzZUT2Wv.js +1 -0
- package/dist/chunks/debug-IKW-jE7K.js +39 -0
- package/dist/chunks/debugUtils-D2981c0Z.js +1 -0
- package/dist/chunks/defineProperty-C-QyHrDq.js +1 -0
- package/dist/chunks/desktop-B5cvrcOQ.js +1 -0
- package/dist/chunks/detached-rfIUyc-B.js +5 -0
- package/dist/chunks/detect-libc-CxbBtWJu.js +1 -0
- package/dist/chunks/detectRepository-6nw-Aw3v.js +1 -0
- package/dist/chunks/detectRepository-ReZ0Fz8Z.js +1 -0
- package/dist/chunks/diff-cXAp9cNN.js +1 -0
- package/dist/chunks/directoryCompletion-DBM2o5kx.js +1 -0
- package/dist/chunks/dist-CXlEpGqr.js +20 -0
- package/dist/chunks/dist-DESLAofA.js +1 -0
- package/dist/chunks/dist-DIee4wq1.js +29 -0
- package/dist/chunks/dist-Dopnn8wS.js +5 -0
- package/dist/chunks/dist-es-5t7v8oaj.js +1 -0
- package/dist/chunks/dist-es-BF6bR-Ik.js +2 -0
- package/dist/chunks/dist-es-BIjDeceU.js +1 -0
- package/dist/chunks/dist-es-BOPBJQo3.js +1 -0
- package/dist/chunks/dist-es-Bfr4TzQe.js +3 -0
- package/dist/chunks/dist-es-Byxccz_-.js +1 -0
- package/dist/chunks/dist-es-C-OjW2Ao.js +1 -0
- package/dist/chunks/dist-es-C3reqy7X.js +1 -0
- package/dist/chunks/dist-es-C7vygWzp.js +1 -0
- package/dist/chunks/dist-es-CEk66gUu.js +1 -0
- package/dist/chunks/dist-es-CIULjvtA2.js +1 -0
- package/dist/chunks/dist-es-CMtO44xC.js +1 -0
- package/dist/chunks/dist-es-CQMt6zRM.js +1 -0
- package/dist/chunks/dist-es-CYPVg66r.js +9 -0
- package/dist/chunks/dist-es-Cd_AeqMK.js +6 -0
- package/dist/chunks/dist-es-Cgsa8pb82.js +1 -0
- package/dist/chunks/dist-es-Cwru7c2B2.js +1 -0
- package/dist/chunks/dist-es-D1Y8zSMI.js +1 -0
- package/dist/chunks/dist-es-D1wHe_zh.js +1 -0
- package/dist/chunks/dist-es-DKFm0FJ7.js +1 -0
- package/dist/chunks/dist-es-DKIwwJME.js +1 -0
- package/dist/chunks/dist-es-DNFTCbrP.js +1 -0
- package/dist/chunks/dist-es-DXIR5NLi2.js +1 -0
- package/dist/chunks/dist-es-DelBIxNM.js +1 -0
- package/dist/chunks/dist-es-DmdZmEJ-.js +1 -0
- package/dist/chunks/dist-es-Gt_DpXlP.js +1 -0
- package/dist/chunks/dist-es-gUzZ_7Vf.js +1 -0
- package/dist/chunks/dist-es-kj-F5A132.js +1 -0
- package/dist/chunks/dist-es-yHGBqhBe.js +1 -0
- package/dist/chunks/doctor-CTMHXZvQ.js +1 -0
- package/dist/chunks/earlyInput-BTC_Wucv.js +2 -0
- package/dist/chunks/earlyInput-xcoTbKQn.js +1 -0
- package/dist/chunks/effort-Br8KKHdx.js +9 -0
- package/dist/chunks/entry-4lIRMrLI.js +14 -0
- package/dist/chunks/envLessBridgeConfig-CGuIxFzJ.js +1 -0
- package/dist/chunks/envLessBridgeConfig-D_Jg4fJy.js +1 -0
- package/dist/chunks/envUtils-DSxRz_kt.js +1 -0
- package/dist/chunks/esm-BYnFh4pG.js +1 -0
- package/dist/chunks/esm-Bx6rTxIs.js +1 -0
- package/dist/chunks/esm-C367Cyo-.js +1 -0
- package/dist/chunks/esm-C8Zkk1Ux.js +1 -0
- package/dist/chunks/esm-CGx9qY3q.js +56 -0
- package/dist/chunks/esm-CXM9jqO_.js +1 -0
- package/dist/chunks/esm-CXczu_-W.js +1 -0
- package/dist/chunks/esm-CXt5K8Xt.js +1 -0
- package/dist/chunks/esm-Cb-L4oAk.js +1 -0
- package/dist/chunks/esm-D6ZZCdtk.js +1 -0
- package/dist/chunks/esm-DhRjocaU.js +1 -0
- package/dist/chunks/esm-DklLYEuz.js +1 -0
- package/dist/chunks/esm-IYgGg4wR.js +1 -0
- package/dist/chunks/esm-lWlUmoUA.js +1 -0
- package/dist/chunks/esm-lyfry1WB.js +10 -0
- package/dist/chunks/esm-wGnzjq4Z.js +1 -0
- package/dist/chunks/event-streams-C0Zy0Uqv.js +1 -0
- package/dist/chunks/event-streams-DoqJmjFN.js +1 -0
- package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +1 -0
- package/dist/chunks/execAsync-Bv2yxuGe.js +1 -0
- package/dist/chunks/execFileNoThrow-COKYqVQj.js +34 -0
- package/dist/chunks/execSyncWrapper-DZJ3tNWF.js +1 -0
- package/dist/chunks/exit-BOhGfSlm.js +2 -0
- package/dist/chunks/exit-Z9oWrqE4.js +1 -0
- package/dist/chunks/extra-usage-BS4aVOt5.js +1 -0
- package/dist/chunks/extra-usage-DtAIhW74.js +1 -0
- package/dist/chunks/extra-usage-core-CdL1ltqq.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-DxxRI0Yx.js +1 -0
- package/dist/chunks/extraUsage-BYZdi44Y.js +1 -0
- package/dist/chunks/extractMemories-C4f9JWuI.js +1 -0
- package/dist/chunks/fast-B0OB4x7K.js +1 -0
- package/dist/chunks/fast-DKqiojzf.js +1 -0
- package/dist/chunks/featureCheck-CrJeuheQ.js +1 -0
- package/dist/chunks/featureCheck-HslM03dr.js +1 -0
- package/dist/chunks/feedback-yB19xph5.js +1 -0
- package/dist/chunks/figures-5ThXQEtq.js +1 -0
- package/dist/chunks/file-D1cN3LMK.js +12 -0
- package/dist/chunks/fileStateCache-DDW5toIs.js +1 -0
- package/dist/chunks/files-DAzGtmzz.js +2 -0
- package/dist/chunks/firstPartyEventLogger-CdUpe6Lh.js +1 -0
- package/dist/chunks/firstPartyEventLogger-hU-LPkje.js +5 -0
- package/dist/chunks/flushGate-ZFr8yv7F.js +1 -0
- package/dist/chunks/foundry-sdk-BdeF2aBu.js +1 -0
- package/dist/chunks/fpsMetrics-Cf_hdtiJ.js +1 -0
- package/dist/chunks/from-CgDRRLiX.js +4 -0
- package/dist/chunks/gemini-DqAv8_GY.js +1 -0
- package/dist/chunks/generateRecap-lO2PDlx8.js +1 -0
- package/dist/chunks/generateSessionName-48veu5dv.js +1 -0
- package/dist/chunks/genericProcessUtils-F1Qcb1sO.js +23 -0
- package/dist/chunks/getMachineId-bsd-Cut1kHoA.js +1 -0
- package/dist/chunks/getMachineId-darwin-CsRhaP3y.js +2 -0
- package/dist/chunks/getMachineId-linux-Bd7UBNRQ.js +1 -0
- package/dist/chunks/getMachineId-unsupported-vFGP8E_8.js +1 -0
- package/dist/chunks/getMachineId-win-DamF2CH_.js +1 -0
- package/dist/chunks/git-BE_FiJZp.js +1 -0
- package/dist/chunks/git-tyaWOgRL.js +6 -0
- package/dist/chunks/githubRepoPathMapping-BlR0BphY.js +1 -0
- package/dist/chunks/goal-Bn8Kz2Dp.js +3 -0
- package/dist/chunks/graceful-fs-DDVg0cja.js +2 -0
- package/dist/chunks/grok-DhnO_KDC.js +1 -0
- package/dist/chunks/grove-DotW04-v.js +7 -0
- package/dist/chunks/hash-Tu-My5Vp.js +1 -0
- package/dist/chunks/heapdump-DkZSKNbp.js +5 -0
- package/dist/chunks/help-DU_BcZtU.js +1 -0
- package/dist/chunks/hooks-BTMWE5Qx.js +79 -0
- package/dist/chunks/hooks-DONAb_nq.js +1 -0
- package/dist/chunks/hostGuard-Dh296c6q.js +1 -0
- package/dist/chunks/inboundAttachments-BcEgi49j.js +1 -0
- package/dist/chunks/inboundAttachments-DVs3_m48.js +1 -0
- package/dist/chunks/index.min-D75yiGLN.js +1 -0
- package/dist/chunks/initReplBridge-D0Xec8S-.js +1 -0
- package/dist/chunks/install-BkfXeXpv.js +1 -0
- package/dist/chunks/instinctParser-Dt-lqnDe.js +1 -0
- package/dist/chunks/instrumentation-H0XRS1yG.js +21 -0
- package/dist/chunks/intl-cKc-V6Mq.js +1 -0
- package/dist/chunks/isObject-C6qM3WEW.js +1 -0
- package/dist/chunks/isSymbol-BO6cdPI7.js +1 -0
- package/dist/chunks/job-DKtLkF8V.js +2 -0
- package/dist/chunks/json-bigint-bonnP-Hz.js +8 -0
- package/dist/chunks/jsx-runtime-Bb4Xn-E0.js +1 -0
- package/dist/chunks/jws-BscXOT9I.js +3 -0
- package/dist/chunks/jwtUtils-C-ojmb8W.js +1 -0
- package/dist/chunks/keybindings-ez51eHHp.js +2 -0
- package/dist/chunks/language-BuRSO2sR.js +1 -0
- package/dist/chunks/language-Da4KNbjm.js +1 -0
- package/dist/chunks/launchAgentsPlatform-BQyPdrHp.js +1 -0
- package/dist/chunks/launchCommand-1qkTCKpf.js +1 -0
- package/dist/chunks/launchLocalMemory-CWHAj7CX.js +3 -0
- package/dist/chunks/launchLocalVault-D8iJdtsP.js +3 -0
- package/dist/chunks/launchMemoryStores-W7jWG2uH.js +1 -0
- package/dist/chunks/launchOnboarding-q__LaLy1.js +8 -0
- package/dist/chunks/launchSchedule-BWi9F5vh.js +1 -0
- package/dist/chunks/launchSkillStore-4wd4MQBc.js +1 -0
- package/dist/chunks/launchTeleport-BlCf2QM_.js +3 -0
- package/dist/chunks/launchVault-C7u7LZV7.js +1 -0
- package/dist/chunks/lazySchema-uxlVVNM1.js +1 -0
- package/dist/chunks/lib-BSzUGQb_.js +2 -0
- package/dist/chunks/lib-BlVGipXx.js +14 -0
- package/dist/chunks/lib-rQZENxQg.js +8 -0
- package/dist/chunks/loadAgentsDir-Dgd-fzNt.js +1 -0
- package/dist/chunks/loadAgentsDir-nzr38hai.js +3990 -0
- package/dist/chunks/loadPluginHooks-z1-zvBLw.js +1 -0
- package/dist/chunks/loadSso-DSxfVpgX.js +1 -0
- package/dist/chunks/localSearch-B-L_ldos.js +1 -0
- package/dist/chunks/localSearch-D-FprOMr.js +1 -0
- package/dist/chunks/lockfile-D5-j7HOZ.js +1 -0
- package/dist/chunks/log-B3eB4EFv.js +1 -0
- package/dist/chunks/logoV2Utils-RQ160dI2.js +1 -0
- package/dist/chunks/magicDocs-BqZ0GewA.js +57 -0
- package/dist/chunks/main-DeFMhaFE.js +31 -0
- package/dist/chunks/main-y7LJ5qUc.js +1243 -0
- package/dist/chunks/mappers-CWykjGfP.js +1 -0
- package/dist/chunks/mcp-CSFPAfaW.js +2 -0
- package/dist/chunks/mcp-DBwT4pa9.js +6 -0
- package/dist/chunks/mcp-DvZTaHZE.js +1 -0
- package/dist/chunks/memoize-BK3gG5ob.js +1 -0
- package/dist/chunks/memoize-BO31Ws9Q.js +1 -0
- package/dist/chunks/memory-DcpPpYN0.js +1 -0
- package/dist/chunks/metadata-BRLJvh61.js +1 -0
- package/dist/chunks/modalContext-DFjKLCB6.js +1 -0
- package/dist/chunks/mode-BkViT_0o.js +2 -0
- package/dist/chunks/model--z4Di9QO.js +1 -0
- package/dist/chunks/model-CZktWw6o.js +1 -0
- package/dist/chunks/model-DfFA3qMO.js +1 -0
- package/dist/chunks/multipart-parser-DDLYsngd.js +2 -0
- package/dist/chunks/nativeInstaller-GcIk7G2Y.js +1 -0
- package/dist/chunks/oauth-BqJqV-2M.js +1 -0
- package/dist/chunks/oauth-C8X_p8Gc.js +1 -0
- package/dist/chunks/observationStore-DzCdXq8U.js +4 -0
- package/dist/chunks/onChangeAppState-DwGVi-BC.js +1 -0
- package/dist/chunks/open-BtQHzzL9.js +1 -0
- package/dist/chunks/openai-B2wxZDQx.js +10 -0
- package/dist/chunks/openaiShared-G2-w4gJt.js +1 -0
- package/dist/chunks/output-style-BM3qAHLA.js +1 -0
- package/dist/chunks/overageCreditGrant-CjK49axw.js +1 -0
- package/dist/chunks/p-map-B1EeBuI8.js +1 -0
- package/dist/chunks/p-map-HKDr3iDo.js +1 -0
- package/dist/chunks/package-BC0bllK8.js +1 -0
- package/dist/chunks/panel-B-nrcHpm.js +1 -0
- package/dist/chunks/panel-R4ue6pSW.js +1 -0
- package/dist/chunks/panelCall-I_fbgub5.js +1 -0
- package/dist/chunks/parseConnectUrl-BiyKR5-x.js +1 -0
- package/dist/chunks/parser-BlM_Fk4J.js +1 -0
- package/dist/chunks/parser-CQrasoUB.js +1 -0
- package/dist/chunks/partition-CxRF7T-f.js +1 -0
- package/dist/chunks/passes-U_h-hNu-.js +1 -0
- package/dist/chunks/path-BCSE0S-c.js +1 -0
- package/dist/chunks/permissions-B8epy16o.js +3 -0
- package/dist/chunks/permissions-CeYKbtSC.js +1 -0
- package/dist/chunks/permissions-Cn_6f8CB.js +1 -0
- package/dist/chunks/pidLock-CBJDnBG_.js +3 -0
- package/dist/chunks/pipeTransport-D3Qx9v1V.js +1 -0
- package/dist/chunks/plan-BAhStVci.js +1 -0
- package/dist/chunks/platform-EtecGacO.js +2 -0
- package/dist/chunks/plist-Bzo2VMe9.js +6 -0
- package/dist/chunks/plugin-D9huNnv6.js +1 -0
- package/dist/chunks/pluginAutoupdate-BfmyxR5g.js +1 -0
- package/dist/chunks/pluginBlocklist-03sZaZa6.js +1 -0
- package/dist/chunks/pluginCliCommands-P2Ndi1r1.js +1 -0
- package/dist/chunks/pluginFlagging-BVy7Xv_0.js +1 -0
- package/dist/chunks/pluginOperations-Cz37qcjF.js +2 -0
- package/dist/chunks/pluginStartupCheck-BqUwHcMD.js +1 -0
- package/dist/chunks/pluginStartupCheck-w24D-wwk.js +1 -0
- package/dist/chunks/plugins-B0hiIN4q.js +4 -0
- package/dist/chunks/policyLimits-Dem-XJ_h.js +1 -0
- package/dist/chunks/pollConfig-C2Ac8WMU.js +1 -0
- package/dist/chunks/poller-CpLBoB-N.js +1 -0
- package/dist/chunks/poor-CfbMKZNJ.js +1 -0
- package/dist/chunks/poorMode-Bsw2V-V_.js +1 -0
- package/dist/chunks/poorMode-jvImnkty.js +1 -0
- package/dist/chunks/postCommitAttribution-DoSP9wZD.js +1 -0
- package/dist/chunks/print-ozjC0Mhg.js +23 -0
- package/dist/chunks/privacy-settings-DeGoBRrZ.js +1 -0
- package/dist/chunks/process-CNfq37LF.js +1 -0
- package/dist/chunks/process-gEbdy6uY.js +1 -0
- package/dist/chunks/processBashCommand-loWZ8MSE.js +1 -0
- package/dist/chunks/processSlashCommand-BdouajZb.js +5 -0
- package/dist/chunks/projectContext-BaDZBAoK.js +1 -0
- package/dist/chunks/projectContext-D9MDwJUF.js +1 -0
- package/dist/chunks/prompt-Bef63FhB.js +132 -0
- package/dist/chunks/prompt-C7wd1H_i.js +1 -0
- package/dist/chunks/prompt-DIoNqZvO.js +1 -0
- package/dist/chunks/promptEditor-foiayhdY.js +4 -0
- package/dist/chunks/protocolHandler-BsiB1oW_.js +13 -0
- package/dist/chunks/protocols-CCsohXid.js +18 -0
- package/dist/chunks/protocols-CnYQjBlj.js +2 -0
- package/dist/chunks/proxy-Cn2YwITp.js +99 -0
- package/dist/chunks/rate-limit-options-DTJPDcTr.js +1 -0
- package/dist/chunks/rcDebugLog-BUuD-X1D.js +11 -0
- package/dist/chunks/reconciler-DqXTmV3J.js +4 -0
- package/dist/chunks/referral-DP_GshTS.js +1 -0
- package/dist/chunks/refresh-CNzXPAFw.js +1 -0
- package/dist/chunks/registerProtocol-CjxlFsKw.js +36 -0
- package/dist/chunks/release-notes-BxgK8zWO.js +4 -0
- package/dist/chunks/releaseNotes-CbSktIJW.js +2 -0
- package/dist/chunks/reload-plugins-CDu6yU5-.js +1 -0
- package/dist/chunks/remote-env-B4HnhISc.js +1 -0
- package/dist/chunks/remoteBridgeCore-D-wG5jau.js +1 -0
- package/dist/chunks/remoteManagedSettings-B7gt0VAX.js +1 -0
- package/dist/chunks/rename-DlbMb24l.js +1 -0
- package/dist/chunks/renderOptions-5kWQpVr2.js +1 -0
- package/dist/chunks/resume-BB5iBogS.js +2 -0
- package/dist/chunks/rewind-D12hCfZD.js +1 -0
- package/dist/chunks/ripgrep-BQgJ02F9.js +1 -0
- package/dist/chunks/ripgrep-BvDwiKJ3.js +5 -0
- package/dist/chunks/rollback-BPWRKlIZ.js +11 -0
- package/dist/chunks/rolldown-runtime-DaDcL9Zw.js +1 -0
- package/dist/chunks/runtimeObserver-BNH2WGE3.js +1 -0
- package/dist/chunks/runtimeObserver-Ci-5gvYg.js +10 -0
- package/dist/chunks/sandbox-adapter-Coe1GDAE.js +1 -0
- package/dist/chunks/sandbox-toggle-B2Yk4y2V.js +1 -0
- package/dist/chunks/sanitization-DV-94a9Z.js +1 -0
- package/dist/chunks/satisfies-DQJHNtpQ.js +1 -0
- package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +1 -0
- package/dist/chunks/searchExtraTools-BnWZ9roi.js +1 -0
- package/dist/chunks/semver-BMRJYn3q.js +1 -0
- package/dist/chunks/semver-DQo45qGo.js +1 -0
- package/dist/chunks/serde-f76bObzR.js +4 -0
- package/dist/chunks/server-LdbAb0sV.js +1 -0
- package/dist/chunks/serverBanner-BdExKFHT.js +1 -0
- package/dist/chunks/serverLog-BFmvyJ93.js +1 -0
- package/dist/chunks/session-Bmx7L3Mt.js +2 -0
- package/dist/chunks/sessionDataUploader-CaCjwsA2.js +1 -0
- package/dist/chunks/sessionDiscovery-DcEAr5vJ.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-BhdOmW9o.js +1 -0
- package/dist/chunks/sessionManager-CPa049BO.js +1 -0
- package/dist/chunks/sessionMemory-Bsg2unYX.js +1 -0
- package/dist/chunks/sessionMemory-CIbCojm-.js +1 -0
- package/dist/chunks/sessionMemoryUtils-Cjb57wtC.js +1 -0
- package/dist/chunks/sessionObserver-CRU1qWnP.js +1 -0
- package/dist/chunks/sessionObserver-DQwHsDrM.js +20 -0
- package/dist/chunks/sessionStorage-BxDN8qRc.js +1 -0
- package/dist/chunks/sessionStoragePortable-Cx6JQ5Ye.js +3 -0
- package/dist/chunks/sessionTitle-B8jcexkQ.js +14 -0
- package/dist/chunks/sessionTracing-BuLsL6qA.js +11 -0
- package/dist/chunks/settings-5PQdphqC.js +19 -0
- package/dist/chunks/settingsSync-BDeuErb5.js +1 -0
- package/dist/chunks/setup-BKEnSLR9.js +3 -0
- package/dist/chunks/shadowedRuleDetection-7Z8ezTKF.js +1 -0
- package/dist/chunks/shellQuote-fB02N16J.js +4 -0
- package/dist/chunks/sideQuestion-CYdNATPW.js +20 -0
- package/dist/chunks/signin-CPaEtsnK.js +1 -0
- package/dist/chunks/sink-DjKoYMsA.js +1 -0
- package/dist/chunks/sink-iYxWapbU.js +1 -0
- package/dist/chunks/sinks-GryGVRT8.js +2 -0
- package/dist/chunks/sinks-jfaIjsRJ.js +1 -0
- package/dist/chunks/skill-learning-E8tQed-Q.js +5 -0
- package/dist/chunks/skillChangeDetector-A8SAuyo9.js +1 -0
- package/dist/chunks/skillGapStore-B5rl12bV.js +1 -0
- package/dist/chunks/skillGapStore-CjJrxxjk.js +5 -0
- package/dist/chunks/skillGenerator-BDR_z3-X.js +8 -0
- package/dist/chunks/skillLearning-BQtfFE0g.js +1 -0
- package/dist/chunks/skillLearning-C8ihdryM.js +1 -0
- package/dist/chunks/skillPanel-yR8Oi-mO.js +28 -0
- package/dist/chunks/skillSearchPanel-DUQQUCUS.js +21 -0
- package/dist/chunks/skills-NAZQ3j-t.js +1 -0
- package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +1 -0
- package/dist/chunks/src-CDCSSo0U2.js +53 -0
- package/dist/chunks/src-CHw1lvBc.js +3 -0
- package/dist/chunks/src-CST_jFnT.js +1 -0
- package/dist/chunks/src-CgZmCiiH.js +2 -0
- package/dist/chunks/src-CiJCsqUl.js +9 -0
- package/dist/chunks/src-D06Xyj4g.js +2 -0
- package/dist/chunks/src-DCUgdrYl.js +5 -0
- package/dist/chunks/src-DLz3FZm1.js +1 -0
- package/dist/chunks/src-DPUAq5Ty.js +1 -0
- package/dist/chunks/src-DQOX_xI1.js +1 -0
- package/dist/chunks/src-Dt5IJd3C.js +1 -0
- package/dist/chunks/src-Dvp6-vB7.js +19 -0
- package/dist/chunks/src-PM8NIIu_.js +1 -0
- package/dist/chunks/src-l6_O0K-a.js +1 -0
- package/dist/chunks/src-xRRBgNzF.js +25 -0
- package/dist/chunks/sso-oidc-DFJ7SBvI.js +1 -0
- package/dist/chunks/startupProfiler-B0m6crkd.js +1 -0
- package/dist/chunks/startupProfiler-DxRQteII.js +3 -0
- package/dist/chunks/state-4KQ3kaqz.js +1 -0
- package/dist/chunks/state-53JDbNQM.js +1 -0
- package/dist/chunks/state-Cn_m2NOf.js +1 -0
- package/dist/chunks/staticRender-BIxpgNUq.js +1 -0
- package/dist/chunks/stats-h4yu84Q-.js +1 -0
- package/dist/chunks/status-BbdeubJG.js +1 -0
- package/dist/chunks/status-is_Bg_IB.js +2 -0
- package/dist/chunks/statusNoticeHelpers-CQ7CUugR.js +1 -0
- package/dist/chunks/stdio-4S7b8Uhx.js +1 -0
- package/dist/chunks/stdio-W_Kokrkh.js +3 -0
- package/dist/chunks/stickers-qJoNhPk4.js +1 -0
- package/dist/chunks/store-Z8rTjDHe.js +1 -0
- package/dist/chunks/stringUtils-CvXbHQRH.js +4 -0
- package/dist/chunks/sts-C2Gf2WYN.js +1 -0
- package/dist/chunks/subprocessEnv-BSQSomcK.js +1 -0
- package/dist/chunks/subprocessEnv-vrwzMgKn.js +1 -0
- package/dist/chunks/supports-color-uJ1LqA-P.js +1 -0
- package/dist/chunks/systemPromptSections-CgpggIYX.js +1 -0
- package/dist/chunks/systemPromptSections-IePG5K8r.js +1 -0
- package/dist/chunks/systemTheme-Ceakddth.js +1 -0
- package/dist/chunks/tag-i3HZ4lhj.js +11 -0
- package/dist/chunks/tasks-HzsYNTZ1.js +1 -0
- package/dist/chunks/teleport-hN3cAbYC.js +1 -0
- package/dist/chunks/templateJobs-CIv_ysje.js +12 -0
- package/dist/chunks/terminalSetup-C0PF87iu.js +33 -0
- package/dist/chunks/terminalSetup-CxniwSF-.js +1 -0
- package/dist/chunks/theme-BKIHX_Dx.js +1 -0
- package/dist/chunks/thinkback-BA4cMz4D.js +1 -0
- package/dist/chunks/thinkback-mT-8FIT-.js +1 -0
- package/dist/chunks/thinkback-play-Cfk49mvF.js +1 -0
- package/dist/chunks/tmux-CbsW-VDJ.js +1 -0
- package/dist/chunks/toolEventObserver-8FQtxeVv.js +1 -0
- package/dist/chunks/toolEventObserver-B1xvyKdE.js +1 -0
- package/dist/chunks/toolPool-CHVDZqh7.js +1 -0
- package/dist/chunks/trustedDevice-BYCh1ff7.js +1 -0
- package/dist/chunks/trustedDevice-DnIWErCt.js +1 -0
- package/dist/chunks/tui-fTa_pzdA.js +6 -0
- package/dist/chunks/types-BUyOCzUt.js +1 -0
- package/dist/chunks/types-Czs-_G1S.js +3 -0
- package/dist/chunks/types-a7X-tJpJ.js +17 -0
- package/dist/chunks/udsClient-Cg9bBD0p.js +1 -0
- package/dist/chunks/ultrareviewCommand-DCFRZsKp.js +3 -0
- package/dist/chunks/undercover-B-kKUWtK.js +1 -0
- package/dist/chunks/undercover-CsLPQb-a.js +31 -0
- package/dist/chunks/up-dO5BcPaq.js +12 -0
- package/dist/chunks/updateCCB-CfUnkOLT.js +11 -0
- package/dist/chunks/upgrade-CngUwvY4.js +1 -0
- package/dist/chunks/upgrade-kpttjebY.js +1 -0
- package/dist/chunks/upload-DDhQqV8n.js +1 -0
- package/dist/chunks/upstreamproxy-CvcjNY7J.js +11 -0
- package/dist/chunks/usage-CJ5w0907.js +1 -0
- package/dist/chunks/usage-eZRwLa77.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-yAroCqu4.js +1 -0
- package/dist/chunks/useMainLoopModel-BNFW-g8E.js +1 -0
- package/dist/chunks/useManagePlugins-CTtPaQRP.js +1 -0
- package/dist/chunks/useMergedTools-CZJffsmf.js +1 -0
- package/dist/chunks/useSearchInput-C-CqUK6w.js +1 -0
- package/dist/chunks/useSettingsErrors-BWlJCgYF.js +1 -0
- package/dist/chunks/util-DJV0joAW.js +1 -0
- package/dist/chunks/v4-jw6qOKwQ.js +65 -0
- package/dist/chunks/validatePlugin-CRmpIGLV.js +1 -0
- package/dist/chunks/vertex-sdk-DjXcZ2J7.js +9 -0
- package/dist/chunks/vim-n8-UT5w-.js +1 -0
- package/dist/chunks/which-BBCjXfI2.js +1 -0
- package/dist/chunks/windowsPaths-D6T_3XaU.js +1 -0
- package/dist/chunks/windowsPaths-DUKTzBck.js +1 -0
- package/dist/chunks/workSecret-C_lv0dRh.js +1 -0
- package/dist/chunks/workerRegistry-BdHi7_sN.js +1 -0
- package/dist/chunks/worktree-YDeHMlHZ.js +1 -0
- package/dist/chunks/worktreeModeEnabled-BFOYTTTr.js +1 -0
- package/dist/chunks/worktreeModeEnabled-D68iEHpC.js +1 -0
- package/dist/chunks/wrapper-K8ZapJVu.js +6 -0
- package/dist/chunks/xdg-DcF9ejUM.js +1 -0
- package/dist/chunks/zod-CuNujUwx.js +1 -0
- package/dist/cli-bun.js +2 -0
- package/dist/cli-node.js +2 -0
- package/dist/cli.js +2 -0
- package/dist/vendor/ripgrep/x64-linux/rg +0 -0
- package/package.json +218 -0
- package/scripts/postinstall.cjs +389 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import{n as e,r as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./memoize-BK3gG5ob.js";import{l as i,n as a,o}from"./envUtils-DSxRz_kt.js";import{n as s,t as c}from"./defineProperty-C-QyHrDq.js";import{en as l,ht as u}from"./state-4KQ3kaqz.js";import{a as ee,n as d}from"./process-gEbdy6uY.js";import{homedir as f}from"os";import*as p from"path";import{dirname as te,join as ne,resolve as re}from"path";import*as m from"fs";import{closeSync as ie,fsyncSync as ae,openSync as oe,writeFileSync as se}from"fs";import{appendFile as ce,mkdir as le,open as ue,readFile as de,readdir as fe,rename as pe,rm as me,rmdir as he,stat as ge,symlink as _e,unlink as ve}from"fs/promises";function ye({writeFn:e,flushIntervalMs:t=1e3,maxBufferSize:n=100,maxBufferBytes:r=1/0,immediateMode:i=!1}){let a=[],o=0,s=null,c=null;function l(){s&&(clearTimeout(s),s=null)}function u(){c&&(e(c.join(``)),c=null),a.length!==0&&(e(a.join(``)),a=[],o=0,l())}function ee(){s||(s=setTimeout(u,t))}function d(){if(c){c.push(...a),a=[],o=0,l();return}let t=a;a=[],o=0,l(),c=t,setImmediate(()=>{let t=c;c=null,t&&e(t.join(``))})}return{write(t){if(i){e(t);return}a.push(t),o+=t.length,ee(),(a.length>=n||o>=r)&&d()},flush:u,dispose(){u()}}}var be=e((()=>{}));function xe(e){return Ce.add(e),()=>Ce.delete(e)}async function Se(){await Promise.all(Array.from(Ce).map(e=>e()))}var Ce,we=e((()=>{Ce=new Set}));function Te(e){let t=[],n=e.match(/^MCP server ["']([^"']+)["']/);if(n&&n[1])t.push(`mcp`),t.push(n[1].toLowerCase());else{let n=e.match(/^([^:[]+):/);n&&n[1]&&t.push(n[1].trim().toLowerCase())}let r=e.match(/^\[([^\]]+)]/);r&&r[1]&&t.push(r[1].trim().toLowerCase()),e.toLowerCase().includes(`1p event:`)&&t.push(`1p`);let i=e.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);if(i&&i[1]){let e=i[1].trim().toLowerCase();e.length<30&&!e.includes(` `)&&t.push(e)}return Array.from(new Set(t))}function Ee(e,t){return t?e.length===0?!1:t.isExclusive?!e.some(e=>t.exclude.includes(e)):e.some(e=>t.include.includes(e)):!0}function De(e,t){return!t||Ee(Te(e),t)}var Oe,ke=e((()=>{r(),Oe=n(e=>{if(!e||e.trim()===``)return null;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);if(t.length===0)return null;let n=t.some(e=>e.startsWith(`!`)),r=t.some(e=>!e.startsWith(`!`));if(n&&r)return null;let i=t.map(e=>e.replace(/^!/,``).toLowerCase());return{include:n?[]:i,exclude:n?i:[],isExclusive:n}})}));function h(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}function g(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}var _=e((()=>{})),Ae,je=e((()=>{Ae=function(){let{crypto:e}=globalThis;if(e?.randomUUID)return Ae=e.randomUUID.bind(e),e.randomUUID();let t=new Uint8Array(1),n=e?()=>e.getRandomValues(t)[0]:()=>Math.random()*255&255;return`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,e=>(e^n()&15>>e/4).toString(16))}}));function Me(e){return typeof e==`object`&&!!e&&(`name`in e&&e.name===`AbortError`||`message`in e&&String(e.message).includes(`FetchRequestCanceledException`))}var Ne,Pe=e((()=>{Ne=e=>{if(e instanceof Error)return e;if(typeof e==`object`&&e){try{if(Object.prototype.toString.call(e)===`[object Error]`){let t=Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return Error(JSON.stringify(e))}catch{}}return Error(e)}})),v,y,b,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,x=e((()=>{Pe(),v=class extends Error{},y=class e extends v{constructor(t,n,r,i,a){super(`${e.makeMessage(t,n,r)}`),this.status=t,this.headers=i,this.requestID=i?.get(`request-id`),this.error=n,this.type=a??null}static makeMessage(e,t,n){let r=t?.message?typeof t.message==`string`?t.message:JSON.stringify(t.message):t?JSON.stringify(t):n;return e&&r?`${e} ${r}`:e?`${e} status code (no body)`:r||`(no status code or body)`}static generate(t,n,r,i){if(!t||!i)return new Fe({message:r,cause:Ne(n)});let a=n,o=a?.error?.type;return t===400?new Le(t,a,r,i,o):t===401?new Re(t,a,r,i,o):t===403?new ze(t,a,r,i,o):t===404?new Be(t,a,r,i,o):t===409?new Ve(t,a,r,i,o):t===422?new He(t,a,r,i,o):t===429?new Ue(t,a,r,i,o):t>=500?new We(t,a,r,i,o):new e(t,a,r,i,o)}},b=class extends y{constructor({message:e}={}){super(void 0,void 0,e||`Request was aborted.`,void 0)}},Fe=class extends y{constructor({message:e,cause:t}){super(void 0,void 0,e||`Connection error.`,void 0),t&&(this.cause=t)}},Ie=class extends Fe{constructor({message:e}={}){super({message:e??`Request timed out.`})}},Le=class extends y{},Re=class extends y{},ze=class extends y{},Be=class extends y{},Ve=class extends y{},He=class extends y{},Ue=class extends y{},We=class extends y{}}));function Ge(e){return typeof e==`object`?e??{}:{}}function Ke(e){if(!e)return!0;for(let t in e)return!1;return!0}function qe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Je,Ye,Xe,Ze,Qe,$e,et=e((()=>{x(),Je=/^[a-z][a-z0-9+.-]*:/i,Ye=e=>Je.test(e),Xe=e=>(Xe=Array.isArray,Xe(e)),Ze=Xe,Qe=(e,t)=>{if(typeof t!=`number`||!Number.isInteger(t))throw new v(`${e} must be an integer`);if(t<0)throw new v(`${e} must be a positive integer`);return t},$e=e=>{try{return JSON.parse(e)}catch{return}}})),tt,nt=e((()=>{tt=e=>new Promise(t=>setTimeout(t,e))})),S,rt=e((()=>{S=`0.81.0`}));function it(){return typeof Deno<`u`&&Deno.build!=null?`deno`:typeof EdgeRuntime<`u`?`edge`:Object.prototype.toString.call(globalThis.process===void 0?0:globalThis.process)===`[object process]`?`node`:`unknown`}function at(){if(typeof navigator>`u`||!navigator)return null;for(let{key:e,pattern:t}of[{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/}]){let n=t.exec(navigator.userAgent);if(n)return{browser:e,version:`${n[1]||0}.${n[2]||0}.${n[3]||0}`}}return null}var ot,st,ct,lt,ut,dt,ft=e((()=>{rt(),ot=()=>typeof window<`u`&&window.document!==void 0&&typeof navigator<`u`,st=()=>{let e=it();if(e===`deno`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":lt(Deno.build.os),"X-Stainless-Arch":ct(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":S,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":`edge`,"X-Stainless-Runtime-Version":globalThis.process.version};if(e===`node`)return{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":lt(globalThis.process.platform??`unknown`),"X-Stainless-Arch":ct(globalThis.process.arch??`unknown`),"X-Stainless-Runtime":`node`,"X-Stainless-Runtime-Version":globalThis.process.version??`unknown`};let t=at();return t?{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`unknown`,"X-Stainless-Runtime":`browser:${t.browser}`,"X-Stainless-Runtime-Version":t.version}:{"X-Stainless-Lang":`js`,"X-Stainless-Package-Version":S,"X-Stainless-OS":`Unknown`,"X-Stainless-Arch":`unknown`,"X-Stainless-Runtime":`unknown`,"X-Stainless-Runtime-Version":`unknown`}},ct=e=>e===`x32`?`x32`:e===`x86_64`||e===`x64`?`x64`:e===`arm`?`arm`:e===`aarch64`||e===`arm64`?`arm64`:e?`other:${e}`:`unknown`,lt=e=>(e=e.toLowerCase(),e.includes(`ios`)?`iOS`:e===`android`?`Android`:e===`darwin`?`MacOS`:e===`win32`?`Windows`:e===`freebsd`?`FreeBSD`:e===`openbsd`?`OpenBSD`:e===`linux`?`Linux`:e?`Other:${e}`:`Unknown`),dt=()=>ut??(ut=st())}));function pt(){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 mt(...e){let t=globalThis.ReadableStream;if(t===void 0)throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function ht(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return mt({start(){},async pull(e){let{done:n,value:r}=await t.next();n?e.close():e.enqueue(r)},async cancel(){await t.return?.()}})}function gt(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){let e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function _t(e){if(typeof e!=`object`||!e)return;if(e[Symbol.asyncIterator]){await e[Symbol.asyncIterator]().return?.();return}let t=e.getReader(),n=t.cancel();t.releaseLock(),await n}var vt=e((()=>{})),yt,bt=e((()=>{yt=({headers:e,body:t})=>({bodyHeaders:{"content-type":`application/json`},body:JSON.stringify(t)})}));function xt(e){return Object.entries(e).filter(([e,t])=>t!==void 0).map(([e,t])=>{if(typeof t==`string`||typeof t==`number`||typeof t==`boolean`)return`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(t===null)return`${encodeURIComponent(e)}=`;throw new v(`Cannot stringify type ${typeof t}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join(`&`)}var St=e((()=>{x()}));function Ct(e){let t=0;for(let n of e)t+=n.length;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function wt(e){let t;return(Et??(t=new globalThis.TextEncoder,Et=t.encode.bind(t)))(e)}function Tt(e){let t;return(Dt??(t=new globalThis.TextDecoder,Dt=t.decode.bind(t)))(e)}var Et,Dt,Ot=e((()=>{}));function kt(e,t){for(let n=t??0;n<e.length;n++){if(e[n]===10)return{preceding:n,index:n+1,carriage:!1};if(e[n]===13)return{preceding:n,index:n+1,carriage:!0}}return null}function At(e){for(let t=0;t<e.length-1;t++){if(e[t]===10&&e[t+1]===10||e[t]===13&&e[t+1]===13)return t+2;if(e[t]===13&&e[t+1]===10&&t+3<e.length&&e[t+2]===13&&e[t+3]===10)return t+4}return-1}var C,w,T,jt=e((()=>{_(),Ot(),T=class{constructor(){C.set(this,void 0),w.set(this,void 0),h(this,C,new Uint8Array,`f`),h(this,w,null,`f`)}decode(e){if(e==null)return[];let t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e==`string`?wt(e):e;h(this,C,Ct([g(this,C,`f`),t]),`f`);let n=[],r;for(;(r=kt(g(this,C,`f`),g(this,w,`f`)))!=null;){if(r.carriage&&g(this,w,`f`)==null){h(this,w,r.index,`f`);continue}if(g(this,w,`f`)!=null&&(r.index!==g(this,w,`f`)+1||r.carriage)){n.push(Tt(g(this,C,`f`).subarray(0,g(this,w,`f`)-1))),h(this,C,g(this,C,`f`).subarray(g(this,w,`f`)),`f`),h(this,w,null,`f`);continue}let e=g(this,w,`f`)===null?r.preceding:r.preceding-1,t=Tt(g(this,C,`f`).subarray(0,e));n.push(t),h(this,C,g(this,C,`f`).subarray(r.index),`f`),h(this,w,null,`f`)}return n}flush(){return g(this,C,`f`).length?this.decode(`
|
|
2
|
+
`):[]}},C=new WeakMap,w=new WeakMap,T.NEWLINE_CHARS=new Set([`
|
|
3
|
+
`,`\r`]),T.NEWLINE_REGEXP=/\r\n|[\n\r]/g}));function Mt(){}function Nt(e,t,n){return!t||Pt[e]>Pt[n]?Mt:t[e].bind(t)}function E(e){let t=e.logger,n=e.logLevel??`off`;if(!t)return It;let r=Lt.get(t);if(r&&r[0]===n)return r[1];let i={error:Nt(`error`,t,n),warn:Nt(`warn`,t,n),info:Nt(`info`,t,n),debug:Nt(`debug`,t,n)};return Lt.set(t,[n,i]),i}var Pt,Ft,It,Lt,D,Rt=e((()=>{et(),Pt={off:0,error:200,warn:300,info:400,debug:500},Ft=(e,t,n)=>{if(e){if(qe(Pt,e))return e;E(n).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(Pt))}`)}},It={error:Mt,warn:Mt,info:Mt,debug:Mt},Lt=new WeakMap,D=e=>(e.options&&(e.options={...e.options},delete e.options.headers),e.headers&&(e.headers=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([e,t])=>[e,e.toLowerCase()===`x-api-key`||e.toLowerCase()===`authorization`||e.toLowerCase()===`cookie`||e.toLowerCase()===`set-cookie`?`***`:t]))),`retryOfRequestLogID`in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e)}));async function*zt(e,t){if(!e.body)throw t.abort(),globalThis.navigator!==void 0&&globalThis.navigator.product===`ReactNative`?new v(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`):new v(`Attempted to iterate over a response with no body`);let n=new Ut,r=new T,i=gt(e.body);for await(let e of Bt(i))for(let t of r.decode(e)){let e=n.decode(t);e&&(yield e)}for(let e of r.flush()){let t=n.decode(e);t&&(yield t)}}async function*Bt(e){let t=new Uint8Array;for await(let n of e){if(n==null)continue;let e=n instanceof ArrayBuffer?new Uint8Array(n):typeof n==`string`?wt(n):n,r=new Uint8Array(t.length+e.length);r.set(t),r.set(e,t.length),t=r;let i;for(;(i=At(t))!==-1;)yield t.slice(0,i),t=t.slice(i)}t.length>0&&(yield t)}function Vt(e,t){let n=e.indexOf(t);return n===-1?[e,``,``]:[e.substring(0,n),t,e.substring(n+t.length)]}var Ht,O,Ut,Wt=e((()=>{_(),x(),vt(),jt(),Pe(),et(),Ot(),Rt(),O=class e{constructor(e,t,n){this.iterator=e,Ht.set(this,void 0),this.controller=t,h(this,Ht,n,`f`)}static fromSSEResponse(t,n,r){let i=!1,a=r?E(r):console;async function*o(){if(i)throw new v("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let e=!1;try{for await(let e of zt(t,n)){if(e.event===`completion`)try{yield JSON.parse(e.data)}catch(t){throw a.error(`Could not parse message into JSON:`,e.data),a.error(`From chunk:`,e.raw),t}if(e.event===`message_start`||e.event===`message_delta`||e.event===`message_stop`||e.event===`content_block_start`||e.event===`content_block_delta`||e.event===`content_block_stop`)try{yield JSON.parse(e.data)}catch(t){throw a.error(`Could not parse message into JSON:`,e.data),a.error(`From chunk:`,e.raw),t}if(e.event!==`ping`&&e.event===`error`){let n=$e(e.data)??e.data,r=n?.error?.type;throw new y(void 0,n,void 0,t.headers,r)}}e=!0}catch(e){if(Me(e))return;throw e}finally{e||n.abort()}}return new e(o,n,r)}static fromReadableStream(t,n,r){let i=!1;async function*a(){let e=new T,n=gt(t);for await(let t of n)for(let n of e.decode(t))yield n;for(let t of e.flush())yield t}async function*o(){if(i)throw new v("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let e=!1;try{for await(let t of a())e||t&&(yield JSON.parse(t));e=!0}catch(e){if(Me(e))return;throw e}finally{e||n.abort()}}return new e(o,n,r)}[(Ht=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let t=[],n=[],r=this.iterator(),i=e=>({next:()=>{if(e.length===0){let e=r.next();t.push(e),n.push(e)}return e.shift()}});return[new e(()=>i(t),this.controller,g(this,Ht,`f`)),new e(()=>i(n),this.controller,g(this,Ht,`f`))]}toReadableStream(){let e=this,t;return mt({async start(){t=e[Symbol.asyncIterator]()},async pull(e){try{let{value:n,done:r}=await t.next();if(r)return e.close();let i=wt(JSON.stringify(n)+`
|
|
4
|
+
`);e.enqueue(i)}catch(t){e.error(t)}},async cancel(){await t.return?.()}})}},Ut=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith(`\r`)&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let e={event:this.event,data:this.data.join(`
|
|
5
|
+
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],e}if(this.chunks.push(e),e.startsWith(`:`))return null;let[t,n,r]=Vt(e,`:`);return r.startsWith(` `)&&(r=r.substring(1)),t===`event`?this.event=r:t===`data`&&this.data.push(r),null}}}));async function Gt(e,t){let{response:n,requestLogID:r,retryOfRequestLogID:i,startTime:a}=t,o=await(async()=>{if(t.options.stream)return E(e).debug(`response`,n.status,n.url,n.headers,n.body),t.options.__streamClass?t.options.__streamClass.fromSSEResponse(n,t.controller):O.fromSSEResponse(n,t.controller);if(n.status===204)return null;if(t.options.__binaryResponse)return n;let r=n.headers.get(`content-type`)?.split(`;`)[0]?.trim();return r?.includes(`application/json`)||r?.endsWith(`+json`)?n.headers.get(`content-length`)===`0`?void 0:Kt(await n.json(),n):await n.text()})();return E(e).debug(`[${r}] response parsed`,D({retryOfRequestLogID:i,url:n.url,status:n.status,body:o,durationMs:Date.now()-a})),o}function Kt(e,t){return!e||typeof e!=`object`||Array.isArray(e)?e:Object.defineProperty(e,"_request_id",{value:t.headers.get(`request-id`),enumerable:!1})}var qt=e((()=>{Wt(),Rt()})),Jt,Yt,Xt=e((()=>{_(),qt(),Yt=class e extends Promise{constructor(e,t,n=Gt){super(e=>{e(null)}),this.responsePromise=t,this.parseResponse=n,Jt.set(this,void 0),h(this,Jt,e,`f`)}_thenUnwrap(t){return new e(g(this,Jt,`f`),this.responsePromise,async(e,n)=>Kt(t(await this.parseResponse(e,n),n),n.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,t]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:t,request_id:t.headers.get(`request-id`)}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(g(this,Jt,`f`),e))),this.parsedPromise}then(e,t){return this.parse().then(e,t)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}},Jt=new WeakMap})),Zt,Qt,$t,en,tn,k=e((()=>{_(),x(),qt(),Xt(),et(),Qt=class{constructor(e,t,n,r){Zt.set(this,void 0),h(this,Zt,e,`f`),this.options=r,this.response=t,this.body=n}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new v("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await g(this,Zt,`f`).requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(Zt=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let t of e.getPaginatedItems())yield t}},$t=class extends Yt{constructor(e,t,n){super(e,t,async(e,t)=>new n(e,t.response,await Gt(e,t),t.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let t of e)yield t}},en=class extends Qt{constructor(e,t,n,r){super(e,t,n,r),this.data=n.data||[],this.has_more=n.has_more||!1,this.first_id=n.first_id||null,this.last_id=n.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more!==!1&&super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let e=this.first_id;return e?{...this.options,query:{...Ge(this.options.query),before_id:e}}:null}let e=this.last_id;return e?{...this.options,query:{...Ge(this.options.query),after_id:e}}:null}},tn=class extends Qt{constructor(e,t,n,r){super(e,t,n,r),this.data=n.data||[],this.has_more=n.has_more||!1,this.next_page=n.next_page||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more!==!1&&super.hasNextPage()}nextPageRequestOptions(){let e=this.next_page;return e?{...this.options,query:{...Ge(this.options.query),page:e}}:null}}}));function nn(e,t,n){return on(),new File(e,t??`unknown_file`,n)}function rn(e,t){let n=typeof e==`object`&&!!e&&(`name`in e&&e.name&&String(e.name)||`url`in e&&e.url&&String(e.url)||`filename`in e&&e.filename&&String(e.filename)||`path`in e&&e.path&&String(e.path))||``;return t?n.split(/[\\/]/).pop()||void 0:n}function an(e){let t=typeof e==`function`?e:e.fetch,n=ln.get(t);if(n)return n;let r=(async()=>{try{let e=`Response`in t?t.Response:(await t(`data:,`)).constructor,n=new FormData;return n.toString()!==await new e(n).text()}catch{return!0}})();return ln.set(t,r),r}var on,sn,cn,ln,un,dn,fn,pn=e((()=>{vt(),on=()=>{if(typeof File>`u`){let{process:e}=globalThis,t=typeof e?.versions?.node==`string`&&parseInt(e.versions.node.split(`.`))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+(t?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":``))}},sn=e=>typeof e==`object`&&!!e&&typeof e[Symbol.asyncIterator]==`function`,cn=async(e,t,n=!0)=>({...e,body:await un(e.body,t,n)}),ln=new WeakMap,un=async(e,t,n=!0)=>{if(!await an(t))throw TypeError(`The provided fetch function does not support file uploads with the current global FormData class.`);let r=new FormData;return await Promise.all(Object.entries(e||{}).map(([e,t])=>fn(r,e,t,n))),r},dn=e=>e instanceof Blob&&`name`in e,fn=async(e,t,n,r)=>{if(n!==void 0){if(n==null)throw TypeError(`Received null for "${t}"; to pass null in FormData, you must use the string 'null'`);if(typeof n==`string`||typeof n==`number`||typeof n==`boolean`)e.append(t,String(n));else if(n instanceof Response){let i={},a=n.headers.get(`Content-Type`);a&&(i={type:a}),e.append(t,nn([await n.blob()],rn(n,r),i))}else if(sn(n))e.append(t,nn([await new Response(ht(n)).blob()],rn(n,r)));else if(dn(n))e.append(t,nn([n],rn(n,r),{type:n.type}));else if(Array.isArray(n))await Promise.all(n.map(n=>fn(e,t+`[]`,n,r)));else if(typeof n==`object`)await Promise.all(Object.entries(n).map(([n,i])=>fn(e,`${t}[${n}]`,i,r)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${n} instead`)}}}));async function mn(e,t,n){if(on(),e=await e,t||(t=rn(e,!0)),vn(e))return e instanceof File&&t==null&&n==null?e:nn([await e.arrayBuffer()],t??e.name,{type:e.type,lastModified:e.lastModified,...n});if(yn(e)){let r=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()),nn(await hn(r),t,n)}let r=await hn(e);if(!n?.type){let e=r.find(e=>typeof e==`object`&&`type`in e&&e.type);typeof e==`string`&&(n={...n,type:e})}return nn(r,t,n)}async function hn(e){let t=[];if(typeof e==`string`||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(_n(e))t.push(e instanceof Blob?e:await e.arrayBuffer());else if(sn(e))for await(let n of e)t.push(...await hn(n));else{let t=e?.constructor?.name;throw Error(`Unexpected data type: ${typeof e}${t?`; constructor: ${t}`:``}${gn(e)}`)}return t}function gn(e){return typeof e!=`object`||!e?``:`; props: [${Object.getOwnPropertyNames(e).map(e=>`"${e}"`).join(`, `)}]`}var _n,vn,yn,bn=e((()=>{pn(),_n=e=>typeof e==`object`&&!!e&&typeof e.size==`number`&&typeof e.type==`string`&&typeof e.text==`function`&&typeof e.slice==`function`&&typeof e.arrayBuffer==`function`,vn=e=>typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.lastModified==`number`&&_n(e),yn=e=>typeof e==`object`&&!!e&&typeof e.url==`string`&&typeof e.blob==`function`})),xn=e((()=>{bn()})),Sn=e((()=>{})),A,j=e((()=>{A=class{constructor(e){this._client=e}}}));function*Cn(e){if(!e)return;if(wn in e){let{values:t,nulls:n}=e;yield*t.entries();for(let e of n)yield[e,null];return}let t=!1,n;e instanceof Headers?n=e.entries():Ze(e)?n=e:(t=!0,n=Object.entries(e??{}));for(let e of n){let n=e[0];if(typeof n!=`string`)throw TypeError(`expected header name to be a string`);let r=Ze(e[1])?e[1]:[e[1]],i=!1;for(let e of r)e!==void 0&&(t&&!i&&(i=!0,yield[n,null]),yield[n,e])}}var wn,M,N=e((()=>{et(),wn=Symbol.for(`brand.privateNullableHeaders`),M=e=>{let t=new Headers,n=new Set;for(let r of e){let e=new Set;for(let[i,a]of Cn(r)){let r=i.toLowerCase();e.has(r)||(t.delete(i),e.add(r)),a===null?(t.delete(i),n.add(r)):(t.append(i,a),n.delete(r))}}return{[wn]:!0,values:t,nulls:n}}}));function Tn(e){return typeof e==`object`&&!!e&&kn in e}function En(e,t){let n=new Set;if(e)for(let t of e)Tn(t)&&n.add(t[kn]);if(t){for(let e of t)if(Tn(e)&&n.add(e[kn]),Array.isArray(e.content))for(let t of e.content)Tn(t)&&n.add(t[kn])}return Array.from(n)}function Dn(e,t){let n=En(e,t);return n.length===0?{}:{"x-stainless-helper":n.join(`, `)}}function On(e){return Tn(e)?{"x-stainless-helper":e[kn]}:{}}var kn,An=e((()=>{kn=Symbol(`anthropic.sdk.stainlessHelper`)}));function jn(e){return e.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var Mn,Nn,P,F=e((()=>{x(),Mn=Object.freeze(Object.create(null)),Nn=(e=jn)=>function(t,...n){if(t.length===1)return t[0];let r=!1,i=[],a=t.reduce((t,a,o)=>{/[?#]/.test(a)&&(r=!0);let s=n[o],c=(r?encodeURIComponent:e)(``+s);return o!==n.length&&(s==null||typeof s==`object`&&s.toString===Object.getPrototypeOf(Object.getPrototypeOf(s.hasOwnProperty??Mn)??Mn)?.toString)&&(c=s+``,i.push({start:t.length+a.length,length:c.length,error:`Value of type ${Object.prototype.toString.call(s).slice(8,-1)} is not a valid path parameter`})),t+a+(o===n.length?``:c)},``),o=a.split(/[?#]/,1)[0],s=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,c;for(;(c=s.exec(o))!==null;)i.push({start:c.index,length:c[0].length,error:`Value "${c[0]}" can\'t be safely passed as a path parameter`});if(i.sort((e,t)=>e.start-t.start),i.length>0){let e=0,t=i.reduce((t,n)=>{let r=` `.repeat(n.start-e),i=`^`.repeat(n.length);return e=n.start+n.length,t+r+i},``);throw new v(`Path parameters result in path with invalid segments:\n${i.map(e=>e.error).join(`
|
|
6
|
+
`)}\n${a}\n${t}`)}return a},P=Nn(jn)})),Pn,Fn=e((()=>{j(),k(),N(),An(),pn(),F(),Pn=class extends A{list(e={},t){let{betas:n,...r}=e??{};return this._client.getAPIList(`/v1/files`,en,{query:r,...t,headers:M([{"anthropic-beta":[...n??[],`files-api-2025-04-14`].toString()},t?.headers])})}delete(e,t={},n){let{betas:r}=t??{};return this._client.delete(P`/v1/files/${e}`,{...n,headers:M([{"anthropic-beta":[...r??[],`files-api-2025-04-14`].toString()},n?.headers])})}download(e,t={},n){let{betas:r}=t??{};return this._client.get(P`/v1/files/${e}/content`,{...n,headers:M([{"anthropic-beta":[...r??[],`files-api-2025-04-14`].toString(),Accept:`application/binary`},n?.headers]),__binaryResponse:!0})}retrieveMetadata(e,t={},n){let{betas:r}=t??{};return this._client.get(P`/v1/files/${e}`,{...n,headers:M([{"anthropic-beta":[...r??[],`files-api-2025-04-14`].toString()},n?.headers])})}upload(e,t){let{betas:n,...r}=e;return this._client.post(`/v1/files`,cn({body:r,...t,headers:M([{"anthropic-beta":[...n??[],`files-api-2025-04-14`].toString()},On(r.file),t?.headers])},this._client))}}})),In,Ln=e((()=>{j(),k(),N(),F(),In=class extends A{retrieve(e,t={},n){let{betas:r}=t??{};return this._client.get(P`/v1/models/${e}?beta=true`,{...n,headers:M([{...r?.toString()==null?void 0:{"anthropic-beta":r?.toString()}},n?.headers])})}list(e={},t){let{betas:n,...r}=e??{};return this._client.getAPIList(`/v1/models?beta=true`,en,{query:r,...t,headers:M([{...n?.toString()==null?void 0:{"anthropic-beta":n?.toString()}},t?.headers])})}}})),Rn=e((()=>{x()})),zn,Bn=e((()=>{zn={"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 Vn(e){return e?.output_format??e?.output_config?.format}function Hn(e,t,n){let r=Vn(t);return!t||!(`parse`in(r??{}))?{...e,content:e.content.map(e=>{if(e.type===`text`){let t=Object.defineProperty({...e},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(t,"parsed",{get(){return n.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return e}),parsed_output:null}:Un(e,t,n)}function Un(e,t,n){let r=null,i=e.content.map(e=>{if(e.type===`text`){let i=Wn(t,e.text);r===null&&(r=i);let a=Object.defineProperty({...e},"parsed_output",{value:i,enumerable:!1});return Object.defineProperty(a,"parsed",{get(){return n.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),i},enumerable:!1})}return e});return{...e,content:i,parsed_output:r}}function Wn(e,t){let n=Vn(e);if(n?.type!==`json_schema`)return null;try{return`parse`in n?n.parse(t):JSON.parse(t)}catch(e){throw new v(`Failed to parse structured output: ${e}`)}}var Gn=e((()=>{x()})),Kn,qn,Jn,Yn,Xn,Zn=e((()=>{Kn=e=>{let t=0,n=[];for(;t<e.length;){let r=e[t];if(r===`\\`){t++;continue}if(r===`{`){n.push({type:`brace`,value:`{`}),t++;continue}if(r===`}`){n.push({type:`brace`,value:`}`}),t++;continue}if(r===`[`){n.push({type:`paren`,value:`[`}),t++;continue}if(r===`]`){n.push({type:`paren`,value:`]`}),t++;continue}if(r===`:`){n.push({type:`separator`,value:`:`}),t++;continue}if(r===`,`){n.push({type:`delimiter`,value:`,`}),t++;continue}if(r===`"`){let i=``,a=!1;for(r=e[++t];r!==`"`;){if(t===e.length){a=!0;break}if(r===`\\`){if(t++,t===e.length){a=!0;break}i+=r+e[t],r=e[++t]}else i+=r,r=e[++t]}r=e[++t],a||n.push({type:`string`,value:i});continue}if(r&&/\s/.test(r)){t++;continue}let i=/[0-9]/;if(r&&i.test(r)||r===`-`||r===`.`){let a=``;for(r===`-`&&(a+=r,r=e[++t]);r&&i.test(r)||r===`.`;)a+=r,r=e[++t];n.push({type:`number`,value:a});continue}let a=/[a-z]/i;if(r&&a.test(r)){let i=``;for(;r&&a.test(r)&&t!==e.length;)i+=r,r=e[++t];if(i==`true`||i==`false`||i===`null`)n.push({type:`name`,value:i});else{t++;continue}continue}t++}return n},qn=e=>{if(e.length===0)return e;let t=e[e.length-1];switch(t.type){case`separator`:return e=e.slice(0,e.length-1),qn(e);case`number`:let n=t.value[t.value.length-1];if(n===`.`||n===`-`)return e=e.slice(0,e.length-1),qn(e);case`string`:let r=e[e.length-2];if(r?.type===`delimiter`||r?.type===`brace`&&r.value===`{`)return e=e.slice(0,e.length-1),qn(e);break;case`delimiter`:return e=e.slice(0,e.length-1),qn(e)}return e},Jn=e=>{let t=[];return e.map(e=>{e.type===`brace`&&(e.value===`{`?t.push(`}`):t.splice(t.lastIndexOf(`}`),1)),e.type===`paren`&&(e.value===`[`?t.push(`]`):t.splice(t.lastIndexOf(`]`),1))}),t.length>0&&t.reverse().map(t=>{t===`}`?e.push({type:`brace`,value:`}`}):t===`]`&&e.push({type:`paren`,value:`]`})}),e},Yn=e=>{let t=``;return e.map(e=>{switch(e.type){case`string`:t+=`"`+e.value+`"`;break;default:t+=e.value;break}}),t},Xn=e=>JSON.parse(Yn(Jn(qn(Kn(e)))))})),Qn=e((()=>{Wt()}));function $n(e){return e.type===`tool_use`||e.type===`server_tool_use`||e.type===`mcp_tool_use`}var I,L,er,tr,nr,rr,ir,ar,or,R,sr,cr,lr,z,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr=e((()=>{_(),Zn(),Rn(),Pe(),Qn(),Gn(),br=`__json_buf`,xr=class e{constructor(e,t){I.add(this),this.messages=[],this.receivedMessages=[],L.set(this,void 0),er.set(this,null),this.controller=new AbortController,tr.set(this,void 0),nr.set(this,()=>{}),rr.set(this,()=>{}),ir.set(this,void 0),ar.set(this,()=>{}),or.set(this,()=>{}),R.set(this,{}),sr.set(this,!1),cr.set(this,!1),lr.set(this,!1),z.set(this,!1),ur.set(this,void 0),dr.set(this,void 0),fr.set(this,void 0),hr.set(this,e=>{if(h(this,cr,!0,`f`),Me(e)&&(e=new b),e instanceof b)return h(this,lr,!0,`f`),this._emit(`abort`,e);if(e instanceof v)return this._emit(`error`,e);if(e instanceof Error){let t=new v(e.message);return t.cause=e,this._emit(`error`,t)}return this._emit(`error`,new v(String(e)))}),h(this,tr,new Promise((e,t)=>{h(this,nr,e,`f`),h(this,rr,t,`f`)}),`f`),h(this,ir,new Promise((e,t)=>{h(this,ar,e,`f`),h(this,or,t,`f`)}),`f`),g(this,tr,`f`).catch(()=>{}),g(this,ir,`f`).catch(()=>{}),h(this,er,e,`f`),h(this,fr,t?.logger??console,`f`)}get response(){return g(this,ur,`f`)}get request_id(){return g(this,dr,`f`)}async withResponse(){h(this,z,!0,`f`);let e=await g(this,tr,`f`);if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get(`request-id`)}}static fromReadableStream(t){let n=new e(null);return n._run(()=>n._fromReadableStream(t)),n}static createMessage(t,n,r,{logger:i}={}){let a=new e(n,{logger:i});for(let e of n.messages)a._addMessageParam(e);return h(a,er,{...n,stream:!0},`f`),a._run(()=>a._createMessage(t,{...n,stream:!0},{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":`stream`}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit(`end`)},g(this,hr,`f`))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit(`message`,e)}async _createMessage(e,t,n){let r=n?.signal,i;r&&(r.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),r.addEventListener(`abort`,i));try{g(this,I,`m`,gr).call(this);let{response:r,data:i}=await e.create({...t,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(r);for await(let e of i)g(this,I,`m`,_r).call(this,e);if(i.controller.signal?.aborted)throw new b;g(this,I,`m`,vr).call(this)}finally{r&&i&&r.removeEventListener(`abort`,i)}}_connected(e){this.ended||(h(this,ur,e,`f`),h(this,dr,e?.headers.get(`request-id`),`f`),g(this,nr,`f`).call(this,e),this._emit(`connect`))}get ended(){return g(this,sr,`f`)}get errored(){return g(this,cr,`f`)}get aborted(){return g(this,lr,`f`)}abort(){this.controller.abort()}on(e,t){return(g(this,R,`f`)[e]||(g(this,R,`f`)[e]=[])).push({listener:t}),this}off(e,t){let n=g(this,R,`f`)[e];if(!n)return this;let r=n.findIndex(e=>e.listener===t);return r>=0&&n.splice(r,1),this}once(e,t){return(g(this,R,`f`)[e]||(g(this,R,`f`)[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,n)=>{h(this,z,!0,`f`),e!==`error`&&this.once(`error`,n),this.once(e,t)})}async done(){h(this,z,!0,`f`),await g(this,ir,`f`)}get currentMessage(){return g(this,L,`f`)}async finalMessage(){return await this.done(),g(this,I,`m`,pr).call(this)}async finalText(){return await this.done(),g(this,I,`m`,mr).call(this)}_emit(e,...t){if(g(this,sr,`f`))return;e===`end`&&(h(this,sr,!0,`f`),g(this,ar,`f`).call(this));let n=g(this,R,`f`)[e];if(n&&(g(this,R,`f`)[e]=n.filter(e=>!e.once),n.forEach(({listener:e})=>e(...t))),e===`abort`){let e=t[0];!g(this,z,`f`)&&!n?.length&&Promise.reject(e),g(this,rr,`f`).call(this,e),g(this,or,`f`).call(this,e),this._emit(`end`);return}if(e===`error`){let e=t[0];!g(this,z,`f`)&&!n?.length&&Promise.reject(e),g(this,rr,`f`).call(this,e),g(this,or,`f`).call(this,e),this._emit(`end`)}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit(`finalMessage`,g(this,I,`m`,pr).call(this))}async _fromReadableStream(e,t){let n=t?.signal,r;n&&(n.aborted&&this.controller.abort(),r=this.controller.abort.bind(this.controller),n.addEventListener(`abort`,r));try{g(this,I,`m`,gr).call(this),this._connected(null);let t=O.fromReadableStream(e,this.controller);for await(let e of t)g(this,I,`m`,_r).call(this,e);if(t.controller.signal?.aborted)throw new b;g(this,I,`m`,vr).call(this)}finally{n&&r&&n.removeEventListener(`abort`,r)}}[(L=new WeakMap,er=new WeakMap,tr=new WeakMap,nr=new WeakMap,rr=new WeakMap,ir=new WeakMap,ar=new WeakMap,or=new WeakMap,R=new WeakMap,sr=new WeakMap,cr=new WeakMap,lr=new WeakMap,z=new WeakMap,ur=new WeakMap,dr=new WeakMap,fr=new WeakMap,hr=new WeakMap,I=new WeakSet,pr=function(){if(this.receivedMessages.length===0)throw new v(`stream ended without producing a Message with role=assistant`);return this.receivedMessages.at(-1)},mr=function(){if(this.receivedMessages.length===0)throw new v(`stream ended without producing a Message with role=assistant`);let e=this.receivedMessages.at(-1).content.filter(e=>e.type===`text`).map(e=>e.text);if(e.length===0)throw new v(`stream ended without producing a content block with type=text`);return e.join(` `)},gr=function(){this.ended||h(this,L,void 0,`f`)},_r=function(e){if(this.ended)return;let t=g(this,I,`m`,yr).call(this,e);switch(this._emit(`streamEvent`,e,t),e.type){case`content_block_delta`:{let n=t.content.at(-1);switch(e.delta.type){case`text_delta`:n.type===`text`&&this._emit(`text`,e.delta.text,n.text||``);break;case`citations_delta`:n.type===`text`&&this._emit(`citation`,e.delta.citation,n.citations??[]);break;case`input_json_delta`:$n(n)&&n.input&&this._emit(`inputJson`,e.delta.partial_json,n.input);break;case`thinking_delta`:n.type===`thinking`&&this._emit(`thinking`,e.delta.thinking,n.thinking);break;case`signature_delta`:n.type===`thinking`&&this._emit(`signature`,n.signature);break;case`compaction_delta`:n.type===`compaction`&&n.content&&this._emit(`compaction`,n.content);break;default:e.delta}break}case`message_stop`:this._addMessageParam(t),this._addMessage(Hn(t,g(this,er,`f`),{logger:g(this,fr,`f`)}),!0);break;case`content_block_stop`:this._emit(`contentBlock`,t.content.at(-1));break;case`message_start`:h(this,L,t,`f`);break;case`content_block_start`:case`message_delta`:break}},vr=function(){if(this.ended)throw new v(`stream has ended, this shouldn't happen`);let e=g(this,L,`f`);if(!e)throw new v(`request ended without sending any chunks`);return h(this,L,void 0,`f`),Hn(e,g(this,er,`f`),{logger:g(this,fr,`f`)})},yr=function(e){let t=g(this,L,`f`);if(e.type===`message_start`){if(t)throw new v(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!t)throw new v(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case`message_stop`:return t;case`message_delta`:return t.container=e.delta.container,t.stop_reason=e.delta.stop_reason,t.stop_sequence=e.delta.stop_sequence,t.usage.output_tokens=e.usage.output_tokens,t.context_management=e.context_management,e.usage.input_tokens!=null&&(t.usage.input_tokens=e.usage.input_tokens),e.usage.cache_creation_input_tokens!=null&&(t.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),e.usage.cache_read_input_tokens!=null&&(t.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),e.usage.server_tool_use!=null&&(t.usage.server_tool_use=e.usage.server_tool_use),e.usage.iterations!=null&&(t.usage.iterations=e.usage.iterations),t;case`content_block_start`:return t.content.push(e.content_block),t;case`content_block_delta`:{let n=t.content.at(e.index);switch(e.delta.type){case`text_delta`:n?.type===`text`&&(t.content[e.index]={...n,text:(n.text||``)+e.delta.text});break;case`citations_delta`:n?.type===`text`&&(t.content[e.index]={...n,citations:[...n.citations??[],e.delta.citation]});break;case`input_json_delta`:if(n&&$n(n)){let r=n[br]||``;r+=e.delta.partial_json;let i={...n};if(Object.defineProperty(i,br,{value:r,enumerable:!1,writable:!0}),r)try{i.input=Xn(r)}catch(e){let t=new v(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${e}. JSON: ${r}`);g(this,hr,`f`).call(this,t)}t.content[e.index]=i}break;case`thinking_delta`:n?.type===`thinking`&&(t.content[e.index]={...n,thinking:n.thinking+e.delta.thinking});break;case`signature_delta`:n?.type===`thinking`&&(t.content[e.index]={...n,signature:e.delta.signature});break;case`compaction_delta`:n?.type===`compaction`&&(t.content[e.index]={...n,content:(n.content||``)+e.delta.content});break;default:e.delta}return t}case`content_block_stop`:return t}},Symbol.asyncIterator)](){let e=[],t=[],n=!1;return this.on(`streamEvent`,n=>{let r=t.shift();r?r.resolve(n):e.push(n)}),this.on(`end`,()=>{n=!0;for(let e of t)e.resolve(void 0);t.length=0}),this.on(`abort`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),this.on(`error`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((e,n)=>t.push({resolve:e,reject:n})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new O(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}})),Cr,wr=e((()=>{Cr=class extends Error{constructor(e){let t=typeof e==`string`?e:e.map(e=>e.type===`text`?e.text:`[${e.type}]`).join(` `);super(t),this.name=`ToolError`,this.content=e}}})),Tr,Er=e((()=>{Tr=`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:
|
|
7
|
+
1. Task Overview
|
|
8
|
+
The user's core request and success criteria
|
|
9
|
+
Any clarifications or constraints they specified
|
|
10
|
+
2. Current State
|
|
11
|
+
What has been completed so far
|
|
12
|
+
Files created, modified, or analyzed (with paths if relevant)
|
|
13
|
+
Key outputs or artifacts produced
|
|
14
|
+
3. Important Discoveries
|
|
15
|
+
Technical constraints or requirements uncovered
|
|
16
|
+
Decisions made and their rationale
|
|
17
|
+
Errors encountered and how they were resolved
|
|
18
|
+
What approaches were tried that didn't work (and why)
|
|
19
|
+
4. Next Steps
|
|
20
|
+
Specific actions needed to complete the task
|
|
21
|
+
Any blockers or open questions to resolve
|
|
22
|
+
Priority order if multiple steps remain
|
|
23
|
+
5. Context to Preserve
|
|
24
|
+
User preferences or style requirements
|
|
25
|
+
Domain-specific details that aren't obvious
|
|
26
|
+
Any promises made to the user
|
|
27
|
+
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.
|
|
28
|
+
Wrap your summary in <summary></summary> tags.`}));function Dr(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}async function Or(e,t=e.messages.at(-1)){if(!t||t.role!==`assistant`||!t.content||typeof t.content==`string`)return null;let n=t.content.filter(e=>e.type===`tool_use`);return n.length===0?null:{role:`user`,content:await Promise.all(n.map(async t=>{let n=e.tools.find(e=>(`name`in e?e.name:e.mcp_server_name)===t.name);if(!n||!(`run`in n))return{type:`tool_result`,tool_use_id:t.id,content:`Error: Tool '${t.name}' not found`,is_error:!0};try{let e=t.input;`parse`in n&&n.parse&&(e=n.parse(e));let r=await n.run(e);return{type:`tool_result`,tool_use_id:t.id,content:r}}catch(e){return{type:`tool_result`,tool_use_id:t.id,content:e instanceof Cr?e.content:`Error: ${e instanceof Error?e.message:String(e)}`,is_error:!0}}}))}}var kr,Ar,B,V,jr,H,U,W,Mr,Nr,Pr,Fr,Ir=e((()=>{_(),wr(),x(),N(),Er(),An(),Fr=class{constructor(e,t,n){kr.add(this),this.client=e,Ar.set(this,!1),B.set(this,!1),V.set(this,void 0),jr.set(this,void 0),H.set(this,void 0),U.set(this,void 0),W.set(this,void 0),Mr.set(this,0),h(this,V,{params:{...t,messages:structuredClone(t.messages)}},`f`);let r=[`BetaToolRunner`,...En(t.tools,t.messages)].join(`, `);h(this,jr,{...n,headers:M([{"x-stainless-helper":r},n?.headers])},`f`),h(this,W,Dr(),`f`)}async*[(Ar=new WeakMap,B=new WeakMap,V=new WeakMap,jr=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,Mr=new WeakMap,kr=new WeakSet,Nr=async function(){let e=g(this,V,`f`).params.compactionControl;if(!e||!e.enabled)return!1;let t=0;if(g(this,H,`f`)!==void 0)try{let e=await g(this,H,`f`);t=e.usage.input_tokens+(e.usage.cache_creation_input_tokens??0)+(e.usage.cache_read_input_tokens??0)+e.usage.output_tokens}catch{return!1}let n=e.contextTokenThreshold??1e5;if(t<n)return!1;let r=e.model??g(this,V,`f`).params.model,i=e.summaryPrompt??Tr,a=g(this,V,`f`).params.messages;if(a[a.length-1].role===`assistant`){let e=a[a.length-1];if(Array.isArray(e.content)){let t=e.content.filter(e=>e.type!==`tool_use`);t.length===0?a.pop():e.content=t}}let o=await this.client.beta.messages.create({model:r,messages:[...a,{role:`user`,content:[{type:`text`,text:i}]}],max_tokens:g(this,V,`f`).params.max_tokens},{headers:{"x-stainless-helper":`compaction`}});if(o.content[0]?.type!==`text`)throw new v(`Expected text response for compaction`);return g(this,V,`f`).params.messages=[{role:`user`,content:o.content}],!0},Symbol.asyncIterator)](){var e;if(g(this,Ar,`f`))throw new v(`Cannot iterate over a consumed stream`);h(this,Ar,!0,`f`),h(this,B,!0,`f`),h(this,U,void 0,`f`);try{for(;;){let t;try{if(g(this,V,`f`).params.max_iterations&&g(this,Mr,`f`)>=g(this,V,`f`).params.max_iterations)break;h(this,B,!1,`f`),h(this,U,void 0,`f`),h(this,Mr,(e=g(this,Mr,`f`),e++,e),`f`),h(this,H,void 0,`f`);let{max_iterations:n,compactionControl:r,...i}=g(this,V,`f`).params;if(i.stream?(t=this.client.beta.messages.stream({...i},g(this,jr,`f`)),h(this,H,t.finalMessage(),`f`),g(this,H,`f`).catch(()=>{}),yield t):(h(this,H,this.client.beta.messages.create({...i,stream:!1},g(this,jr,`f`)),`f`),yield g(this,H,`f`)),!await g(this,kr,`m`,Nr).call(this)){if(!g(this,B,`f`)){let{role:e,content:t}=await g(this,H,`f`);g(this,V,`f`).params.messages.push({role:e,content:t})}let e=await g(this,kr,`m`,Pr).call(this,g(this,V,`f`).params.messages.at(-1));if(e)g(this,V,`f`).params.messages.push(e);else if(!g(this,B,`f`))break}}finally{t&&t.abort()}}if(!g(this,H,`f`))throw new v(`ToolRunner concluded without a message from the server`);g(this,W,`f`).resolve(await g(this,H,`f`))}catch(e){throw h(this,Ar,!1,`f`),g(this,W,`f`).promise.catch(()=>{}),g(this,W,`f`).reject(e),h(this,W,Dr(),`f`),e}}setMessagesParams(e){typeof e==`function`?g(this,V,`f`).params=e(g(this,V,`f`).params):g(this,V,`f`).params=e,h(this,B,!0,`f`),h(this,U,void 0,`f`)}async generateToolResponse(){let e=await g(this,H,`f`)??this.params.messages.at(-1);return e?g(this,kr,`m`,Pr).call(this,e):null}done(){return g(this,W,`f`).promise}async runUntilDone(){if(!g(this,Ar,`f`))for await(let e of this);return this.done()}get params(){return g(this,V,`f`).params}pushMessages(...e){this.setMessagesParams(t=>({...t,messages:[...t.messages,...e]}))}then(e,t){return this.runUntilDone().then(e,t)}},Pr=async function(e){return g(this,U,`f`)===void 0&&h(this,U,Or(g(this,V,`f`).params,e),`f`),g(this,U,`f`)}})),Lr,Rr=e((()=>{x(),vt(),jt(),Lr=class e{constructor(e,t){this.iterator=e,this.controller=t}async*decoder(){let e=new T;for await(let t of this.iterator)for(let n of e.decode(t))yield JSON.parse(n);for(let t of e.flush())yield JSON.parse(t)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(t,n){if(!t.body)throw n.abort(),globalThis.navigator!==void 0&&globalThis.navigator.product===`ReactNative`?new v(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`):new v(`Attempted to iterate over a response with no body`);return new e(gt(t.body),n)}}})),zr,Br=e((()=>{j(),k(),N(),Rr(),Rn(),F(),zr=class extends A{create(e,t){let{betas:n,...r}=e;return this._client.post(`/v1/messages/batches?beta=true`,{body:r,...t,headers:M([{"anthropic-beta":[...n??[],`message-batches-2024-09-24`].toString()},t?.headers])})}retrieve(e,t={},n){let{betas:r}=t??{};return this._client.get(P`/v1/messages/batches/${e}?beta=true`,{...n,headers:M([{"anthropic-beta":[...r??[],`message-batches-2024-09-24`].toString()},n?.headers])})}list(e={},t){let{betas:n,...r}=e??{};return this._client.getAPIList(`/v1/messages/batches?beta=true`,en,{query:r,...t,headers:M([{"anthropic-beta":[...n??[],`message-batches-2024-09-24`].toString()},t?.headers])})}delete(e,t={},n){let{betas:r}=t??{};return this._client.delete(P`/v1/messages/batches/${e}?beta=true`,{...n,headers:M([{"anthropic-beta":[...r??[],`message-batches-2024-09-24`].toString()},n?.headers])})}cancel(e,t={},n){let{betas:r}=t??{};return this._client.post(P`/v1/messages/batches/${e}/cancel?beta=true`,{...n,headers:M([{"anthropic-beta":[...r??[],`message-batches-2024-09-24`].toString()},n?.headers])})}async results(e,t={},n){let r=await this.retrieve(e);if(!r.results_url)throw new v(`No batch \`results_url\`; Has it finished processing? ${r.processing_status} - ${r.id}`);let{betas:i}=t??{};return this._client.get(r.results_url,{...n,headers:M([{"anthropic-beta":[...i??[],`message-batches-2024-09-24`].toString(),Accept:`application/binary`},n?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((e,t)=>Lr.fromResponse(t.response,t.controller))}}}));function Vr(e){if(!e.output_format)return e;if(e.output_config?.format)throw new v(`Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).`);let{output_format:t,...n}=e;return{...n,output_config:{...e.output_config,format:t}}}var Hr,Ur,Wr,Gr=e((()=>{Rn(),j(),Bn(),N(),An(),Gn(),Sr(),Ir(),wr(),Br(),Hr={"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`},Ur=[`claude-opus-4-6`],Wr=class extends A{constructor(){super(...arguments),this.batches=new zr(this._client)}create(e,t){let n=Vr(e),{betas:r,...i}=n;i.model in Hr&&console.warn(`The model '${i.model}' is deprecated and will reach end-of-life on ${Hr[i.model]}\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),i.model in Ur&&i.thinking&&i.thinking.type===`enabled`&&console.warn(`Using Claude with ${i.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 a=this._client._options.timeout;if(!i.stream&&a==null){let e=zn[i.model]??void 0;a=this._client.calculateNonstreamingTimeout(i.max_tokens,e)}let o=Dn(i.tools,i.messages);return this._client.post(`/v1/messages?beta=true`,{body:i,timeout:a??6e5,...t,headers:M([{...r?.toString()==null?void 0:{"anthropic-beta":r?.toString()}},o,t?.headers]),stream:n.stream??!1})}parse(e,t){return t={...t,headers:M([{"anthropic-beta":[...e.betas??[],`structured-outputs-2025-12-15`].toString()},t?.headers])},this.create(e,t).then(t=>Un(t,e,{logger:this._client.logger??console}))}stream(e,t){return xr.createMessage(this,e,t)}countTokens(e,t){let{betas:n,...r}=Vr(e);return this._client.post(`/v1/messages/count_tokens?beta=true`,{body:r,...t,headers:M([{"anthropic-beta":[...n??[],`token-counting-2024-11-01`].toString()},t?.headers])})}toolRunner(e,t){return new Fr(this._client,e,t)}},Wr.Batches=zr,Wr.BetaToolRunner=Fr,Wr.ToolError=Cr})),Kr,qr=e((()=>{j(),k(),N(),pn(),F(),Kr=class extends A{create(e,t={},n){let{betas:r,...i}=t??{};return this._client.post(P`/v1/skills/${e}/versions?beta=true`,cn({body:i,...n,headers:M([{"anthropic-beta":[...r??[],`skills-2025-10-02`].toString()},n?.headers])},this._client))}retrieve(e,t,n){let{skill_id:r,betas:i}=t;return this._client.get(P`/v1/skills/${r}/versions/${e}?beta=true`,{...n,headers:M([{"anthropic-beta":[...i??[],`skills-2025-10-02`].toString()},n?.headers])})}list(e,t={},n){let{betas:r,...i}=t??{};return this._client.getAPIList(P`/v1/skills/${e}/versions?beta=true`,tn,{query:i,...n,headers:M([{"anthropic-beta":[...r??[],`skills-2025-10-02`].toString()},n?.headers])})}delete(e,t,n){let{skill_id:r,betas:i}=t;return this._client.delete(P`/v1/skills/${r}/versions/${e}?beta=true`,{...n,headers:M([{"anthropic-beta":[...i??[],`skills-2025-10-02`].toString()},n?.headers])})}}})),Jr,Yr=e((()=>{j(),qr(),k(),N(),pn(),F(),Jr=class extends A{constructor(){super(...arguments),this.versions=new Kr(this._client)}create(e={},t){let{betas:n,...r}=e??{};return this._client.post(`/v1/skills?beta=true`,cn({body:r,...t,headers:M([{"anthropic-beta":[...n??[],`skills-2025-10-02`].toString()},t?.headers])},this._client,!1))}retrieve(e,t={},n){let{betas:r}=t??{};return this._client.get(P`/v1/skills/${e}?beta=true`,{...n,headers:M([{"anthropic-beta":[...r??[],`skills-2025-10-02`].toString()},n?.headers])})}list(e={},t){let{betas:n,...r}=e??{};return this._client.getAPIList(`/v1/skills?beta=true`,tn,{query:r,...t,headers:M([{"anthropic-beta":[...n??[],`skills-2025-10-02`].toString()},t?.headers])})}delete(e,t={},n){let{betas:r}=t??{};return this._client.delete(P`/v1/skills/${e}?beta=true`,{...n,headers:M([{"anthropic-beta":[...r??[],`skills-2025-10-02`].toString()},n?.headers])})}},Jr.Versions=Kr})),G,Xr=e((()=>{j(),Fn(),Ln(),Gr(),Yr(),G=class extends A{constructor(){super(...arguments),this.models=new In(this._client),this.messages=new Wr(this._client),this.files=new Pn(this._client),this.skills=new Jr(this._client)}},G.Models=In,G.Messages=Wr,G.Files=Pn,G.Skills=Jr})),Zr,Qr=e((()=>{j(),N(),Zr=class extends A{create(e,t){let{betas:n,...r}=e;return this._client.post(`/v1/complete`,{body:r,timeout:this._client._options.timeout??6e5,...t,headers:M([{...n?.toString()==null?void 0:{"anthropic-beta":n?.toString()}},t?.headers]),stream:e.stream??!1})}}}));function $r(e){return e?.output_config?.format}function ei(e,t,n){let r=$r(t);return!t||!(`parse`in(r??{}))?{...e,content:e.content.map(e=>e.type===`text`?Object.defineProperty({...e},"parsed_output",{value:null,enumerable:!1}):e),parsed_output:null}:ti(e,t,n)}function ti(e,t,n){let r=null,i=e.content.map(e=>{if(e.type===`text`){let n=ni(t,e.text);return r===null&&(r=n),Object.defineProperty({...e},"parsed_output",{value:n,enumerable:!1})}return e});return{...e,content:i,parsed_output:r}}function ni(e,t){let n=$r(e);if(n?.type!==`json_schema`)return null;try{return`parse`in n?n.parse(t):JSON.parse(t)}catch(e){throw new v(`Failed to parse structured output: ${e}`)}}var ri=e((()=>{x()}));function ii(e){return e.type===`tool_use`||e.type===`server_tool_use`}var K,q,ai,oi,si,ci,li,ui,di,J,fi,pi,mi,Y,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di=e((()=>{_(),Pe(),Rn(),Qn(),Zn(),ri(),Ti=`__json_buf`,Ei=class e{constructor(e,t){K.add(this),this.messages=[],this.receivedMessages=[],q.set(this,void 0),ai.set(this,null),this.controller=new AbortController,oi.set(this,void 0),si.set(this,()=>{}),ci.set(this,()=>{}),li.set(this,void 0),ui.set(this,()=>{}),di.set(this,()=>{}),J.set(this,{}),fi.set(this,!1),pi.set(this,!1),mi.set(this,!1),Y.set(this,!1),hi.set(this,void 0),gi.set(this,void 0),_i.set(this,void 0),bi.set(this,e=>{if(h(this,pi,!0,`f`),Me(e)&&(e=new b),e instanceof b)return h(this,mi,!0,`f`),this._emit(`abort`,e);if(e instanceof v)return this._emit(`error`,e);if(e instanceof Error){let t=new v(e.message);return t.cause=e,this._emit(`error`,t)}return this._emit(`error`,new v(String(e)))}),h(this,oi,new Promise((e,t)=>{h(this,si,e,`f`),h(this,ci,t,`f`)}),`f`),h(this,li,new Promise((e,t)=>{h(this,ui,e,`f`),h(this,di,t,`f`)}),`f`),g(this,oi,`f`).catch(()=>{}),g(this,li,`f`).catch(()=>{}),h(this,ai,e,`f`),h(this,_i,t?.logger??console,`f`)}get response(){return g(this,hi,`f`)}get request_id(){return g(this,gi,`f`)}async withResponse(){h(this,Y,!0,`f`);let e=await g(this,oi,`f`);if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get(`request-id`)}}static fromReadableStream(t){let n=new e(null);return n._run(()=>n._fromReadableStream(t)),n}static createMessage(t,n,r,{logger:i}={}){let a=new e(n,{logger:i});for(let e of n.messages)a._addMessageParam(e);return h(a,ai,{...n,stream:!0},`f`),a._run(()=>a._createMessage(t,{...n,stream:!0},{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":`stream`}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit(`end`)},g(this,bi,`f`))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit(`message`,e)}async _createMessage(e,t,n){let r=n?.signal,i;r&&(r.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),r.addEventListener(`abort`,i));try{g(this,K,`m`,xi).call(this);let{response:r,data:i}=await e.create({...t,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(r);for await(let e of i)g(this,K,`m`,Si).call(this,e);if(i.controller.signal?.aborted)throw new b;g(this,K,`m`,Ci).call(this)}finally{r&&i&&r.removeEventListener(`abort`,i)}}_connected(e){this.ended||(h(this,hi,e,`f`),h(this,gi,e?.headers.get(`request-id`),`f`),g(this,si,`f`).call(this,e),this._emit(`connect`))}get ended(){return g(this,fi,`f`)}get errored(){return g(this,pi,`f`)}get aborted(){return g(this,mi,`f`)}abort(){this.controller.abort()}on(e,t){return(g(this,J,`f`)[e]||(g(this,J,`f`)[e]=[])).push({listener:t}),this}off(e,t){let n=g(this,J,`f`)[e];if(!n)return this;let r=n.findIndex(e=>e.listener===t);return r>=0&&n.splice(r,1),this}once(e,t){return(g(this,J,`f`)[e]||(g(this,J,`f`)[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,n)=>{h(this,Y,!0,`f`),e!==`error`&&this.once(`error`,n),this.once(e,t)})}async done(){h(this,Y,!0,`f`),await g(this,li,`f`)}get currentMessage(){return g(this,q,`f`)}async finalMessage(){return await this.done(),g(this,K,`m`,vi).call(this)}async finalText(){return await this.done(),g(this,K,`m`,yi).call(this)}_emit(e,...t){if(g(this,fi,`f`))return;e===`end`&&(h(this,fi,!0,`f`),g(this,ui,`f`).call(this));let n=g(this,J,`f`)[e];if(n&&(g(this,J,`f`)[e]=n.filter(e=>!e.once),n.forEach(({listener:e})=>e(...t))),e===`abort`){let e=t[0];!g(this,Y,`f`)&&!n?.length&&Promise.reject(e),g(this,ci,`f`).call(this,e),g(this,di,`f`).call(this,e),this._emit(`end`);return}if(e===`error`){let e=t[0];!g(this,Y,`f`)&&!n?.length&&Promise.reject(e),g(this,ci,`f`).call(this,e),g(this,di,`f`).call(this,e),this._emit(`end`)}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit(`finalMessage`,g(this,K,`m`,vi).call(this))}async _fromReadableStream(e,t){let n=t?.signal,r;n&&(n.aborted&&this.controller.abort(),r=this.controller.abort.bind(this.controller),n.addEventListener(`abort`,r));try{g(this,K,`m`,xi).call(this),this._connected(null);let t=O.fromReadableStream(e,this.controller);for await(let e of t)g(this,K,`m`,Si).call(this,e);if(t.controller.signal?.aborted)throw new b;g(this,K,`m`,Ci).call(this)}finally{n&&r&&n.removeEventListener(`abort`,r)}}[(q=new WeakMap,ai=new WeakMap,oi=new WeakMap,si=new WeakMap,ci=new WeakMap,li=new WeakMap,ui=new WeakMap,di=new WeakMap,J=new WeakMap,fi=new WeakMap,pi=new WeakMap,mi=new WeakMap,Y=new WeakMap,hi=new WeakMap,gi=new WeakMap,_i=new WeakMap,bi=new WeakMap,K=new WeakSet,vi=function(){if(this.receivedMessages.length===0)throw new v(`stream ended without producing a Message with role=assistant`);return this.receivedMessages.at(-1)},yi=function(){if(this.receivedMessages.length===0)throw new v(`stream ended without producing a Message with role=assistant`);let e=this.receivedMessages.at(-1).content.filter(e=>e.type===`text`).map(e=>e.text);if(e.length===0)throw new v(`stream ended without producing a content block with type=text`);return e.join(` `)},xi=function(){this.ended||h(this,q,void 0,`f`)},Si=function(e){if(this.ended)return;let t=g(this,K,`m`,wi).call(this,e);switch(this._emit(`streamEvent`,e,t),e.type){case`content_block_delta`:{let n=t.content.at(-1);switch(e.delta.type){case`text_delta`:n.type===`text`&&this._emit(`text`,e.delta.text,n.text||``);break;case`citations_delta`:n.type===`text`&&this._emit(`citation`,e.delta.citation,n.citations??[]);break;case`input_json_delta`:ii(n)&&n.input&&this._emit(`inputJson`,e.delta.partial_json,n.input);break;case`thinking_delta`:n.type===`thinking`&&this._emit(`thinking`,e.delta.thinking,n.thinking);break;case`signature_delta`:n.type===`thinking`&&this._emit(`signature`,n.signature);break;default:e.delta}break}case`message_stop`:this._addMessageParam(t),this._addMessage(ei(t,g(this,ai,`f`),{logger:g(this,_i,`f`)}),!0);break;case`content_block_stop`:this._emit(`contentBlock`,t.content.at(-1));break;case`message_start`:h(this,q,t,`f`);break;case`content_block_start`:case`message_delta`:break}},Ci=function(){if(this.ended)throw new v(`stream has ended, this shouldn't happen`);let e=g(this,q,`f`);if(!e)throw new v(`request ended without sending any chunks`);return h(this,q,void 0,`f`),ei(e,g(this,ai,`f`),{logger:g(this,_i,`f`)})},wi=function(e){let t=g(this,q,`f`);if(e.type===`message_start`){if(t)throw new v(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!t)throw new v(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case`message_stop`:return t;case`message_delta`:return t.stop_reason=e.delta.stop_reason,t.stop_sequence=e.delta.stop_sequence,t.usage.output_tokens=e.usage.output_tokens,e.usage.input_tokens!=null&&(t.usage.input_tokens=e.usage.input_tokens),e.usage.cache_creation_input_tokens!=null&&(t.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),e.usage.cache_read_input_tokens!=null&&(t.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),e.usage.server_tool_use!=null&&(t.usage.server_tool_use=e.usage.server_tool_use),t;case`content_block_start`:return t.content.push({...e.content_block}),t;case`content_block_delta`:{let n=t.content.at(e.index);switch(e.delta.type){case`text_delta`:n?.type===`text`&&(t.content[e.index]={...n,text:(n.text||``)+e.delta.text});break;case`citations_delta`:n?.type===`text`&&(t.content[e.index]={...n,citations:[...n.citations??[],e.delta.citation]});break;case`input_json_delta`:if(n&&ii(n)){let r=n[Ti]||``;r+=e.delta.partial_json;let i={...n};Object.defineProperty(i,Ti,{value:r,enumerable:!1,writable:!0}),r&&(i.input=Xn(r)),t.content[e.index]=i}break;case`thinking_delta`:n?.type===`thinking`&&(t.content[e.index]={...n,thinking:n.thinking+e.delta.thinking});break;case`signature_delta`:n?.type===`thinking`&&(t.content[e.index]={...n,signature:e.delta.signature});break;default:e.delta}return t}case`content_block_stop`:return t}},Symbol.asyncIterator)](){let e=[],t=[],n=!1;return this.on(`streamEvent`,n=>{let r=t.shift();r?r.resolve(n):e.push(n)}),this.on(`end`,()=>{n=!0;for(let e of t)e.resolve(void 0);t.length=0}),this.on(`abort`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),this.on(`error`,e=>{n=!0;for(let n of t)n.reject(e);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((e,n)=>t.push({resolve:e,reject:n})).then(e=>e?{value:e,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new O(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}}})),Oi,ki=e((()=>{j(),k(),N(),Rr(),Rn(),F(),Oi=class extends A{create(e,t){return this._client.post(`/v1/messages/batches`,{body:e,...t})}retrieve(e,t){return this._client.get(P`/v1/messages/batches/${e}`,t)}list(e={},t){return this._client.getAPIList(`/v1/messages/batches`,en,{query:e,...t})}delete(e,t){return this._client.delete(P`/v1/messages/batches/${e}`,t)}cancel(e,t){return this._client.post(P`/v1/messages/batches/${e}/cancel`,t)}async results(e,t){let n=await this.retrieve(e);if(!n.results_url)throw new v(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);return this._client.get(n.results_url,{...t,headers:M([{Accept:`application/binary`},t?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((e,t)=>Lr.fromResponse(t.response,t.controller))}}})),Ai,ji,Mi,Ni=e((()=>{j(),N(),An(),Di(),ri(),ki(),Bn(),Ai=class extends A{constructor(){super(...arguments),this.batches=new Oi(this._client)}create(e,t){e.model in ji&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${ji[e.model]}\nPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),e.model in Mi&&e.thinking&&e.thinking.type===`enabled`&&console.warn(`Using Claude with ${e.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 n=this._client._options.timeout;if(!e.stream&&n==null){let t=zn[e.model]??void 0;n=this._client.calculateNonstreamingTimeout(e.max_tokens,t)}let r=Dn(e.tools,e.messages);return this._client.post(`/v1/messages`,{body:e,timeout:n??6e5,...t,headers:M([r,t?.headers]),stream:e.stream??!1})}parse(e,t){return this.create(e,t).then(t=>ti(t,e,{logger:this._client.logger??console}))}stream(e,t){return Ei.createMessage(this,e,t,{logger:this._client.logger??console})}countTokens(e,t){return this._client.post(`/v1/messages/count_tokens`,{body:e,...t})}},ji={"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`},Mi=[`claude-opus-4-6`],Ai.Batches=Oi})),Pi,Fi=e((()=>{j(),k(),N(),F(),Pi=class extends A{retrieve(e,t={},n){let{betas:r}=t??{};return this._client.get(P`/v1/models/${e}`,{...n,headers:M([{...r?.toString()==null?void 0:{"anthropic-beta":r?.toString()}},n?.headers])})}list(e={},t){let{betas:n,...r}=e??{};return this._client.getAPIList(`/v1/models`,en,{query:r,...t,headers:M([{...n?.toString()==null?void 0:{"anthropic-beta":n?.toString()}},t?.headers])})}}})),Ii=e((()=>{Sn(),Xr(),Qr(),Ni(),Fi()})),Li,Ri=e((()=>{Li=e=>{if(globalThis.process!==void 0)return globalThis.process.env?.[e]?.trim()??void 0;if(globalThis.Deno!==void 0)return globalThis.Deno.env?.get?.(e)?.trim()}})),zi,Bi,Vi,Hi,Ui,Wi,X,Gi,Ki=e((()=>{_(),je(),et(),nt(),Pe(),ft(),vt(),bt(),St(),rt(),x(),k(),xn(),Ii(),Xt(),Qr(),Fi(),Xr(),Ni(),N(),Ri(),Rt(),Ui=`\\n\\nHuman:`,Wi=`\\n\\nAssistant:`,X=class{constructor({baseURL:e=Li(`ANTHROPIC_BASE_URL`),apiKey:t=Li(`ANTHROPIC_API_KEY`)??null,authToken:n=Li(`ANTHROPIC_AUTH_TOKEN`)??null,...r}={}){zi.add(this),Vi.set(this,void 0);let i={apiKey:t,authToken:n,...r,baseURL:e||`https://api.anthropic.com`};if(!i.dangerouslyAllowBrowser&&ot())throw new v(`It looks like you're running in a browser-like environment.
|
|
29
|
+
|
|
30
|
+
This is disabled by default, as it risks exposing your secret API credentials to attackers.
|
|
31
|
+
If you understand the risks and have appropriate mitigations in place,
|
|
32
|
+
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
|
|
33
|
+
|
|
34
|
+
new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
35
|
+
`);this.baseURL=i.baseURL,this.timeout=i.timeout??Bi.DEFAULT_TIMEOUT,this.logger=i.logger??console;let a=`warn`;this.logLevel=a,this.logLevel=Ft(i.logLevel,`ClientOptions.logLevel`,this)??Ft(Li(`ANTHROPIC_LOG`),`process.env['ANTHROPIC_LOG']`,this)??a,this.fetchOptions=i.fetchOptions,this.maxRetries=i.maxRetries??2,this.fetch=i.fetch??pt(),h(this,Vi,yt,`f`),this._options=i,this.apiKey=typeof t==`string`?t:null,this.authToken=n}withOptions(e){return new this.constructor({...this._options,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,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:t}){if(!(e.get(`x-api-key`)||e.get(`authorization`))&&!(this.apiKey&&e.get(`x-api-key`))&&!t.has(`x-api-key`)&&!(this.authToken&&e.get(`authorization`))&&!t.has(`authorization`))throw Error(`Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted`)}async authHeaders(e){return M([await this.apiKeyAuth(e),await this.bearerAuth(e)])}async apiKeyAuth(e){if(this.apiKey!=null)return M([{"X-Api-Key":this.apiKey}])}async bearerAuth(e){if(this.authToken!=null)return M([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return xt(e)}getUserAgent(){return`${this.constructor.name}/JS ${S}`}defaultIdempotencyKey(){return`stainless-node-retry-${Ae()}`}makeStatusError(e,t,n,r){return y.generate(e,t,n,r)}buildURL(e,t,n){let r=!g(this,zi,`m`,Hi).call(this)&&n||this.baseURL,i=Ye(e)?new URL(e):new URL(r+(r.endsWith(`/`)&&e.startsWith(`/`)?e.slice(1):e)),a=this.defaultQuery(),o=Object.fromEntries(i.searchParams);return(!Ke(a)||!Ke(o))&&(t={...o,...a,...t}),typeof t==`object`&&t&&!Array.isArray(t)&&(i.search=this.stringifyQuery(t)),i.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new v(`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 600*1e3}async prepareOptions(e){}async prepareRequest(e,{url:t,options:n}){}get(e,t){return this.methodRequest(`get`,e,t)}post(e,t){return this.methodRequest(`post`,e,t)}patch(e,t){return this.methodRequest(`patch`,e,t)}put(e,t){return this.methodRequest(`put`,e,t)}delete(e,t){return this.methodRequest(`delete`,e,t)}methodRequest(e,t,n){return this.request(Promise.resolve(n).then(n=>({method:e,path:t,...n})))}request(e,t=null){return new Yt(this,this.makeRequest(e,t,void 0))}async makeRequest(e,t,n){let r=await e,i=r.maxRetries??this.maxRetries;t??(t=i),await this.prepareOptions(r);let{req:a,url:o,timeout:s}=await this.buildRequest(r,{retryCount:i-t});await this.prepareRequest(a,{url:o,options:r});let c=`log_`+(Math.random()*(1<<24)|0).toString(16).padStart(6,`0`),l=n===void 0?``:`, retryOf: ${n}`,u=Date.now();if(E(this).debug(`[${c}] sending request`,D({retryOfRequestLogID:n,method:r.method,url:o,options:r,headers:a.headers})),r.signal?.aborted)throw new b;let ee=new AbortController,d=await this.fetchWithTimeout(o,a,s,ee).catch(Ne),f=Date.now();if(d instanceof globalThis.Error){let e=`retrying, ${t} attempts remaining`;if(r.signal?.aborted)throw new b;let i=Me(d)||/timed? ?out/i.test(String(d)+(`cause`in d?String(d.cause):``));if(t)return E(this).info(`[${c}] connection ${i?`timed out`:`failed`} - ${e}`),E(this).debug(`[${c}] connection ${i?`timed out`:`failed`} (${e})`,D({retryOfRequestLogID:n,url:o,durationMs:f-u,message:d.message})),this.retryRequest(r,t,n??c);throw E(this).info(`[${c}] connection ${i?`timed out`:`failed`} - error; no more retries left`),E(this).debug(`[${c}] connection ${i?`timed out`:`failed`} (error; no more retries left)`,D({retryOfRequestLogID:n,url:o,durationMs:f-u,message:d.message})),i?new Ie:new Fe({cause:d})}let p=`[${c}${l}${[...d.headers.entries()].filter(([e])=>e===`request-id`).map(([e,t])=>`, `+e+`: `+JSON.stringify(t)).join(``)}] ${a.method} ${o} ${d.ok?`succeeded`:`failed`} with status ${d.status} in ${f-u}ms`;if(!d.ok){let e=await this.shouldRetry(d);if(t&&e){let e=`retrying, ${t} attempts remaining`;return await _t(d.body),E(this).info(`${p} - ${e}`),E(this).debug(`[${c}] response error (${e})`,D({retryOfRequestLogID:n,url:d.url,status:d.status,headers:d.headers,durationMs:f-u})),this.retryRequest(r,t,n??c,d.headers)}let i=e?`error; no more retries left`:`error; not retryable`;E(this).info(`${p} - ${i}`);let a=await d.text().catch(e=>Ne(e).message),o=$e(a),s=o?void 0:a;throw E(this).debug(`[${c}] response error (${i})`,D({retryOfRequestLogID:n,url:d.url,status:d.status,headers:d.headers,message:s,durationMs:Date.now()-u})),this.makeStatusError(d.status,o,s,d.headers)}return E(this).info(p),E(this).debug(`[${c}] response start`,D({retryOfRequestLogID:n,url:d.url,status:d.status,headers:d.headers,durationMs:f-u})),{response:d,options:r,controller:ee,requestLogID:c,retryOfRequestLogID:n,startTime:u}}getAPIList(e,t,n){return this.requestAPIList(t,n&&`then`in n?n.then(t=>({method:`get`,path:e,...t})):{method:`get`,path:e,...n})}requestAPIList(e,t){let n=this.makeRequest(t,null,void 0);return new $t(this,n,e)}async fetchWithTimeout(e,t,n,r){let{signal:i,method:a,...o}=t||{},s=this._makeAbort(r);i&&i.addEventListener(`abort`,s,{once:!0});let c=setTimeout(s,n),l=globalThis.ReadableStream&&o.body instanceof globalThis.ReadableStream||typeof o.body==`object`&&o.body!==null&&Symbol.asyncIterator in o.body,u={signal:r.signal,...l?{duplex:`half`}:{},method:`GET`,...o};a&&(u.method=a.toUpperCase());try{return await this.fetch.call(void 0,e,u)}finally{clearTimeout(c)}}async shouldRetry(e){let t=e.headers.get(`x-should-retry`);return t===`true`?!0:t===`false`?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,t,n,r){let i,a=r?.get(`retry-after-ms`);if(a){let e=parseFloat(a);Number.isNaN(e)||(i=e)}let o=r?.get(`retry-after`);if(o&&!i){let e=parseFloat(o);i=Number.isNaN(e)?Date.parse(o)-Date.now():e*1e3}if(i===void 0){let n=e.maxRetries??this.maxRetries;i=this.calculateDefaultRetryTimeoutMillis(t,n)}return await tt(i),this.makeRequest(e,t-1,n)}calculateDefaultRetryTimeoutMillis(e,t){let n=t-e;return Math.min(.5*2**n,8)*(1-Math.random()*.25)*1e3}calculateNonstreamingTimeout(e,t){let n=600*1e3;if(36e5*e/128e3>n||t!=null&&e>t)throw new v(`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 n}async buildRequest(e,{retryCount:t=0}={}){let n={...e},{method:r,path:i,query:a,defaultBaseURL:o}=n,s=this.buildURL(i,a,o);`timeout`in n&&Qe(`timeout`,n.timeout),n.timeout=n.timeout??this.timeout;let{bodyHeaders:c,body:l}=this.buildBody({options:n});return{req:{method:r,headers:await this.buildHeaders({options:e,method:r,bodyHeaders:c,retryCount:t}),...n.signal&&{signal:n.signal},...globalThis.ReadableStream&&l instanceof globalThis.ReadableStream&&{duplex:`half`},...l&&{body:l},...this.fetchOptions??{},...n.fetchOptions??{}},url:s,timeout:n.timeout}}async buildHeaders({options:e,method:t,bodyHeaders:n,retryCount:r}){let i={};this.idempotencyHeader&&t!==`get`&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),i[this.idempotencyHeader]=e.idempotencyKey);let a=M([i,{Accept:`application/json`,"User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(r),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...dt(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":`true`}:void 0,"anthropic-version":`2023-06-01`},await this.authHeaders(e),this._options.defaultHeaders,n,e.headers]);return this.validateHeaders(a),a.values}_makeAbort(e){return()=>e.abort()}buildBody({options:{body:e,headers:t}}){if(!e)return{bodyHeaders:void 0,body:void 0};let n=M([t]);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||typeof e==`string`&&n.values.has(`content-type`)||globalThis.Blob&&e instanceof globalThis.Blob||e instanceof FormData||e instanceof URLSearchParams||globalThis.ReadableStream&&e instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:e}:typeof e==`object`&&(Symbol.asyncIterator in e||Symbol.iterator in e&&`next`in e&&typeof e.next==`function`)?{bodyHeaders:void 0,body:ht(e)}:typeof e==`object`&&n.values.get(`content-type`)===`application/x-www-form-urlencoded`?{bodyHeaders:{"content-type":`application/x-www-form-urlencoded`},body:this.stringifyQuery(e)}:g(this,Vi,`f`).call(this,{body:e,headers:n})}},Bi=X,Vi=new WeakMap,zi=new WeakSet,Hi=function(){return this.baseURL!==`https://api.anthropic.com`},X.Anthropic=Bi,X.HUMAN_PROMPT=Ui,X.AI_PROMPT=Wi,X.DEFAULT_TIMEOUT=6e5,X.AnthropicError=v,X.APIError=y,X.APIConnectionError=Fe,X.APIConnectionTimeoutError=Ie,X.APIUserAbortError=b,X.NotFoundError=Be,X.ConflictError=Ve,X.RateLimitError=Ue,X.BadRequestError=Le,X.AuthenticationError=Re,X.InternalServerError=We,X.PermissionDeniedError=ze,X.UnprocessableEntityError=He,X.toFile=mn,Gi=class extends X{constructor(){super(...arguments),this.completions=new Zr(this),this.messages=new Ai(this),this.models=new Pi(this),this.beta=new G(this)}},Gi.Completions=Zr,Gi.Messages=Ai,Gi.Models=Pi,Gi.Beta=G})),qi=e((()=>{Ki(),xn(),Xt(),k(),x()}));function Ji(e){return e instanceof oa||e instanceof b||e instanceof Error&&e.name===`AbortError`}function Yi(e,t){return e instanceof Error&&e.message===t}function Xi(e){return e instanceof Error?e:Error(String(e))}function Zi(e){return e instanceof Error?e.message:String(e)}function Qi(e){if(e&&typeof e==`object`&&`code`in e&&typeof e.code==`string`)return e.code}function $i(e){return Qi(e)===`ENOENT`}function ea(e){if(e&&typeof e==`object`&&`path`in e&&typeof e.path==`string`)return e.path}function ta(e,t=5){if(!(e instanceof Error))return String(e);if(!e.stack)return e.message;let n=e.stack.split(`
|
|
36
|
+
`),r=n[0]??e.message,i=n.slice(1).filter(e=>e.trim().startsWith(`at `));return i.length<=t?e.stack:[r,...i.slice(0,t)].join(`
|
|
37
|
+
`)}function na(e){let t=Qi(e);return t===`ENOENT`||t===`EACCES`||t===`EPERM`||t===`ENOTDIR`||t===`ELOOP`}function ra(e){let t=Zi(e);if(!e||typeof e!=`object`||!(`isAxiosError`in e)||!e.isAxiosError)return{kind:`other`,message:t};let n=e,r=n.response?.status;return r===401||r===403?{kind:`auth`,status:r,message:t}:n.code===`ECONNABORTED`?{kind:`timeout`,status:r,message:t}:n.code===`ECONNREFUSED`||n.code===`ENOTFOUND`?{kind:`network`,status:r,message:t}:{kind:`http`,status:r,message:t}}var ia,aa,oa,sa,ca,la,ua,da=e((()=>{qi(),s(),ia=class extends Error{constructor(e){super(e),this.name=this.constructor.name}},aa=class extends Error{},oa=class extends Error{constructor(e){super(e),this.name=`AbortError`}},sa=class extends Error{constructor(e,t,n){super(e),c(this,`filePath`,void 0),c(this,`defaultConfig`,void 0),this.name=`ConfigParseError`,this.filePath=t,this.defaultConfig=n}},ca=class extends Error{constructor(e,t,n,r){super(`Shell command failed`),c(this,`stdout`,void 0),c(this,`stderr`,void 0),c(this,`code`,void 0),c(this,`interrupted`,void 0),this.stdout=e,this.stderr=t,this.code=n,this.interrupted=r,this.name=`ShellError`}},la=class extends Error{constructor(e,t){super(e),c(this,`formattedMessage`,void 0),this.formattedMessage=t,this.name=`TeleportOperationError`}},ua=class extends Error{constructor(e,t){super(e),c(this,`telemetryMessage`,void 0),this.name=`TelemetrySafeError`,this.telemetryMessage=t??e}}}));function fa(){return ga}function pa(e,t,n){return Z`JSON.stringify(${e})`,JSON.stringify(e,t,n)}function ma(e,t){return Z`structuredClone(${e})`,structuredClone(e,t)}function ha(e,t,n){if(Z`fs.writeFileSync(${e}, ${t})`,typeof n==`object`&&n&&`flush`in n&&n.flush===!0){let r=typeof n==`object`&&`encoding`in n?n.encoding:void 0,i=typeof n==`object`&&`mode`in n?n.mode:void 0,a;try{a=oe(e,`w`,i),se(a,t,{encoding:r??void 0}),ae(a)}finally{a!==void 0&&ie(a)}}else se(e,t,n)}var ga,Z,_a,va=e((()=>{l(),$a(),(()=>{let e=process.env.CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS;if(e!==void 0){let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t}return process.env.USER_TYPE===`ant`?300:1/0})(),ga={[Symbol.dispose](){}},Z=fa,_a=(e,t)=>(Z`JSON.parse(${e})`,t===void 0?JSON.parse(e):JSON.parse(e,t))}));function ya(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}var ba=e((()=>{}));function xa(e,t){if(t.startsWith(`//`)||t.startsWith(`\\\\`))return{resolvedPath:t,isSymlink:!1,isCanonical:!1};try{let n=e.lstatSync(t);if(n.isFIFO()||n.isSocket()||n.isCharacterDevice()||n.isBlockDevice())return{resolvedPath:t,isSymlink:!1,isCanonical:!1};let r=e.realpathSync(t);return{resolvedPath:r,isSymlink:r!==t,isCanonical:!0}}catch{return{resolvedPath:t,isSymlink:!1,isCanonical:!1}}}function Sa(e,t,n){let{resolvedPath:r}=xa(e,t);return n.has(r)?!0:(n.add(r),!1)}function Ca(e,t){let n=t,r=[];for(;n!==p.dirname(n);){let t;try{t=e.lstatSync(n)}catch{r.unshift(p.basename(n)),n=p.dirname(n);continue}if(t.isSymbolicLink())try{let t=e.realpathSync(n);return r.length===0?t:p.join(t,...r)}catch{let t=e.readlinkSync(n),i=p.isAbsolute(t)?t:p.resolve(p.dirname(n),t);return r.length===0?i:p.join(i,...r)}try{let t=e.realpathSync(n);if(t!==n)return r.length===0?t:p.join(t,...r)}catch{}return}}function wa(e){let t=e;t===`~`?t=f().normalize(`NFC`):t.startsWith(`~/`)&&(t=p.join(f().normalize(`NFC`),t.slice(2)));let n=new Set,r=Ta();if(n.add(t),t.startsWith(`//`)||t.startsWith(`\\\\`))return Array.from(n);try{let e=t,i=new Set;for(let a=0;a<40&&!i.has(e);a++){if(i.add(e),!r.existsSync(e)){if(e===t){let e=Ca(r,t);e!==void 0&&n.add(e)}break}let a=r.lstatSync(e);if(a.isFIFO()||a.isSocket()||a.isCharacterDevice()||a.isBlockDevice()||!a.isSymbolicLink())break;let o=r.readlinkSync(e),s=p.isAbsolute(o)?o:p.resolve(p.dirname(e),o);n.add(s),e=s}}catch{}let{resolvedPath:i,isSymlink:a}=xa(r,t);return a&&i!==t&&n.add(i),Array.from(n)}function Ta(){return Aa}async function Ea(e,t,n){try{var r=ya();let i=r.a(await ue(e,`r`)),a=(await i.stat()).size;if(a<=t)return null;let o=Math.min(a-t,n),s=Buffer.allocUnsafe(o),c=0;for(;c<o;){let{bytesRead:e}=await i.read(s,c,o-c,t+c);if(e===0)break;c+=e}return{content:s.toString(`utf8`,0,c),bytesRead:c,bytesTotal:a}}catch(e){r.e=e}finally{await r.d()}}async function Da(e,t){try{var n=ya();let r=n.a(await ue(e,`r`)),i=(await r.stat()).size;if(i===0)return{content:``,bytesRead:0,bytesTotal:0};let a=Math.max(0,i-t),o=i-a,s=Buffer.allocUnsafe(o),c=0;for(;c<o;){let{bytesRead:e}=await r.read(s,c,o-c,a+c);if(e===0)break;c+=e}return{content:s.toString(`utf8`,0,c),bytesRead:c,bytesTotal:i}}catch(e){n.e=e}finally{await n.d()}}async function*Oa(e){let t=1024*4,n=await ue(e,`r`);try{let e=(await n.stat()).size,r=Buffer.alloc(0),i=Buffer.alloc(t);for(;e>0;){let a=Math.min(t,e);e-=a,await n.read(i,0,a,e);let o=Buffer.concat([i.subarray(0,a),r]),s=o.indexOf(10);if(s===-1){r=o;continue}r=Buffer.from(o.subarray(0,s));let c=o.toString(`utf8`,s+1).split(`
|
|
38
|
+
`);for(let e=c.length-1;e>=0;e--){let t=c[e];t&&(yield t)}}r.length>0&&(yield r.toString(`utf8`))}finally{await n.close()}}var ka,Aa,ja=e((()=>{da(),va(),ba(),ka={cwd(){return process.cwd()},existsSync(e){return Z`fs.existsSync(${e})`,m.existsSync(e)},async stat(e){return ge(e)},async readdir(e){return fe(e,{withFileTypes:!0})},async unlink(e){return ve(e)},async rmdir(e){return he(e)},async rm(e,t){return me(e,t)},async mkdir(e,t){try{await le(e,{recursive:!0,...t})}catch(e){if(Qi(e)!==`EEXIST`)throw e}},async readFile(e,t){return de(e,{encoding:t.encoding})},async rename(e,t){return pe(e,t)},statSync(e){return Z`fs.statSync(${e})`,m.statSync(e)},lstatSync(e){return Z`fs.lstatSync(${e})`,m.lstatSync(e)},readFileSync(e,t){return Z`fs.readFileSync(${e})`,m.readFileSync(e,{encoding:t.encoding})},readFileBytesSync(e){return Z`fs.readFileBytesSync(${e})`,m.readFileSync(e)},readSync(e,t){Z`fs.readSync(${e}, ${t.length} bytes)`;let n;try{n=m.openSync(e,`r`);let r=Buffer.alloc(t.length);return{buffer:r,bytesRead:m.readSync(n,r,0,t.length,0)}}finally{n&&m.closeSync(n)}},appendFileSync(e,t,n){if(Z`fs.appendFileSync(${e}, ${t.length} chars)`,n?.mode!==void 0)try{let r=m.openSync(e,`ax`,n.mode);try{m.appendFileSync(r,t)}finally{m.closeSync(r)}return}catch(e){if(Qi(e)!==`EEXIST`)throw e}m.appendFileSync(e,t)},copyFileSync(e,t){Z`fs.copyFileSync(${e} → ${t})`,m.copyFileSync(e,t)},unlinkSync(e){Z`fs.unlinkSync(${e})`,m.unlinkSync(e)},renameSync(e,t){Z`fs.renameSync(${e} → ${t})`,m.renameSync(e,t)},linkSync(e,t){Z`fs.linkSync(${e} → ${t})`,m.linkSync(e,t)},symlinkSync(e,t,n){Z`fs.symlinkSync(${e} → ${t})`,m.symlinkSync(e,t,n)},readlinkSync(e){return Z`fs.readlinkSync(${e})`,m.readlinkSync(e)},realpathSync(e){return Z`fs.realpathSync(${e})`,m.realpathSync(e).normalize(`NFC`)},mkdirSync(e,t){Z`fs.mkdirSync(${e})`;let n={recursive:!0};t?.mode!==void 0&&(n.mode=t.mode);try{m.mkdirSync(e,n)}catch(e){if(Qi(e)!==`EEXIST`)throw e}},readdirSync(e){return Z`fs.readdirSync(${e})`,m.readdirSync(e,{withFileTypes:!0})},readdirStringSync(e){return Z`fs.readdirStringSync(${e})`,m.readdirSync(e)},isDirEmptySync(e){return Z`fs.isDirEmptySync(${e})`,this.readdirSync(e).length===0},rmdirSync(e){Z`fs.rmdirSync(${e})`,m.rmdirSync(e)},rmSync(e,t){Z`fs.rmSync(${e})`,m.rmSync(e,t)},createWriteStream(e){return m.createWriteStream(e)},async readFileBytes(e,t){if(t===void 0)return de(e);let n=await ue(e,`r`);try{let{size:e}=await n.stat(),r=Math.min(e,t),i=Buffer.allocUnsafe(r),a=0;for(;a<r;){let{bytesRead:e}=await n.read(i,a,r-a,a);if(e===0)break;a+=e}return a<r?i.subarray(0,a):i}finally{await n.close()}}},Aa=ka})),Ma=t({enableDebugLogging:()=>Na,flushDebugLogs:()=>Ba,getDebugFilePath:()=>Ya,getDebugFilter:()=>qa,getDebugLogPath:()=>Ha,getHasFormattedOutput:()=>Ia,getMinDebugLogLevel:()=>Ga,isDebugMode:()=>Q,isDebugToStdErr:()=>Ja,logAntError:()=>Ua,logForDebugging:()=>Va,setHasFormattedOutput:()=>Fa});function Na(){let e=Q()||process.env.USER_TYPE===`ant`;return Ka=!0,Q.cache.clear?.(),e}function Pa(e){return process.env.USER_TYPE!==`ant`&&!Q()||typeof process>`u`||process.versions===void 0||process.versions.node===void 0?!1:De(e,qa())}function Fa(e){Xa=e}function Ia(){return Xa}async function La(e,t,n,r){e&&await le(t,{recursive:!0}).catch(()=>{}),await ce(n,r),Qa()}function Ra(){}function za(){if(!$){let e=null;$=ye({writeFn:t=>{let n=Ha(),r=te(n),i=e!==r;if(e=r,Q()){if(i)try{Ta().mkdirSync(r)}catch{}try{Ta().appendFileSync(n,t)}catch{try{Ta().mkdirSync(r),Ta().appendFileSync(n,t)}catch{}}Qa();return}Za=Za.then(La.bind(null,i,r,n,t)).catch(Ra)},flushIntervalMs:1e3,maxBufferSize:100,immediateMode:Q()}),xe(async()=>{$?.dispose(),await Za})}return $}async function Ba(){$?.flush(),await Za}function Va(e,{level:t}={level:`debug`}){if(Wa[t]<Wa[Ga()]||!Pa(e))return;Xa&&e.includes(`
|
|
39
|
+
`)&&(e=pa(e));let n=`${new Date().toISOString()} [${t.toUpperCase()}] ${e.trim()}\n`;if(Ja()){ee(n);return}za().write(n)}function Ha(){return Ya()??(process.env.CLAUDE_CODE_DEBUG_LOGS_DIR?re(process.env.CLAUDE_CODE_DEBUG_LOGS_DIR):null)??ne(a(),`debug`,`${u()}.txt`)}function Ua(e,t){process.env.USER_TYPE===`ant`&&t instanceof Error&&t.stack&&Va(`[ANT-ONLY] ${e} stack trace:\n${t.stack}`,{level:`error`})}var Wa,Ga,Ka,Q,qa,Ja,Ya,Xa,$,Za,Qa,$a=e((()=>{r(),l(),be(),we(),ke(),o(),ja(),d(),va(),Wa={verbose:0,debug:1,info:2,warn:3,error:4},Ga=n(()=>{let e=process.env.CLAUDE_CODE_DEBUG_LOG_LEVEL?.toLowerCase().trim();return e&&Object.hasOwn(Wa,e)?e:`debug`}),Ka=!1,Q=n(()=>Ka||i(process.env.DEBUG)||i(process.env.DEBUG_SDK)||process.argv.includes(`--debug`)||process.argv.includes(`-d`)||Ja()||process.argv.some(e=>e.startsWith(`--debug=`))||Ya()!==null),qa=n(()=>{let e=process.argv.find(e=>e.startsWith(`--debug=`));return e?Oe(e.substring(8)):null}),Ja=n(()=>process.argv.includes(`--debug-to-stderr`)),Ya=n(()=>{for(let e=0;e<process.argv.length;e++){let t=process.argv[e];if(t.startsWith(`--debug-file=`))return re(t.substring(13));if(t===`--debug-file`&&e+1<process.argv.length)return re(process.argv[e+1])}return null}),Xa=!1,$=null,Za=Promise.resolve(),Qa=n(async()=>{try{let e=Ha(),t=ne(te(e),`latest`);await ve(t).catch(()=>{}),await _e(e,t)}catch{}})}));export{Fe as $,ha as A,Qi as B,ya as C,_a as D,va as E,ca as F,$i as G,Yi as H,ua as I,Xi as J,na as K,la as L,ia as M,sa as N,pa as O,aa as P,Rn as Q,ra as R,Da as S,ma as T,da as U,ea as V,Ji as W,Gi as X,qi as Y,Ki as Z,ja as _,qa as a,x as at,Oa as b,Ga as c,Se as ct,Ja as d,Ie as et,Ua as f,wa as g,Ta as h,Ya as i,Be as it,oa as j,Z as k,$a as l,ye as lt,Fa as m,Na as n,b as nt,Ha as o,we as ot,Va as p,ta as q,Ba as r,Re as rt,Ia as s,xe as st,Ma as t,y as tt,Q as u,be as ut,Sa as v,ba as w,xa as x,Ea as y,Zi as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./rolldown-runtime-DaDcL9Zw.js";import{E as n,O as r,U as i,l as a,p as o,z as s}from"./debug-IKW-jE7K.js";import{n as c,r as l}from"./analytics-BotDBGh0.js";var u=t({setCseShimGate:()=>d,toCompatSessionId:()=>f,toInfraSessionId:()=>p});function d(e){m=e}function f(e){return!e.startsWith(`cse_`)||m&&!m()?e:`session_`+e.slice(4)}function p(e){return e.startsWith(`session_`)?`cse_`+e.slice(8):e}var m,h=e((()=>{}));function g(e){return e.replace(w,(e,t,n)=>n.length<T?`"${t}":"[REDACTED]"`:`"${t}":"${`${n.slice(0,8)}...${n.slice(-4)}`}"`)}function _(e){let t=e.replace(/\n/g,`\\n`);return t.length<=C?t:t.slice(0,C)+`... (${t.length} chars)`}function v(e){let t=g(typeof e==`string`?e:r(e));return t.length<=C?t:t.slice(0,C)+`... (${t.length} chars)`}function y(e){let t=s(e);if(e&&typeof e==`object`&&`response`in e){let n=e.response;if(n?.data&&typeof n.data==`object`){let e=n.data,r=typeof e.message==`string`?e.message:typeof e.error==`object`&&e.error&&`message`in e.error&&typeof e.error.message==`string`?e.error.message:void 0;if(r)return`${t}: ${r}`}}return t}function b(e){if(e&&typeof e==`object`&&`response`in e&&e.response&&typeof e.response.status==`number`)return e.response.status}function x(e){if(!(!e||typeof e!=`object`)){if(`message`in e&&typeof e.message==`string`)return e.message;if(`error`in e&&e.error!==null&&typeof e.error==`object`&&`message`in e.error&&typeof e.error.message==`string`)return e.error.message}}function S(e,t,n){t&&o(t),l(`tengu_bridge_repl_skipped`,{reason:e,...n!==void 0&&{v2:n}})}var C,w,T,E=e((()=>{c(),a(),i(),n(),C=2e3,w=RegExp(`"(${[`session_ingress_token`,`environment_secret`,`access_token`,`secret`,`token`].join(`|`)})"\\s*:\\s*"([^"]*)"`,`g`),T=16}));export{b as a,h as c,f as d,p as f,x as i,u as l,_ as n,E as o,y as r,S as s,v as t,d as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}var n=e((()=>{}));function r(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}var i=e((()=>{n()}));function a(e){var n=r(e,`string`);return t(n)==`symbol`?n:n+``}var o=e((()=>{n(),i()}));function s(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=e((()=>{o()}));export{n as i,c as n,t as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as t}from"./src-CDCSSo0U2.js";import{t as n}from"./jsx-runtime-Bb4Xn-E0.js";import{n as r,t as i}from"./DesktopHandoff-BRbU4is4.js";async function a(e){return(0,o.jsx)(i,{onDone:e})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./defineProperty-C-QyHrDq.js";import{i as r,o as i,t as a}from"./cliLaunch-2AUoMnqx.js";import{dirname as o}from"path";import{closeSync as s,createReadStream as c,mkdirSync as l,openSync as u,readSync as d,statSync as f,unwatchFile as p,watchFile as m}from"fs";import{createInterface as h}from"readline";async function g(e){let t=0;try{if(t=f(e).size,t>0){let n=h({input:c(e,{start:0,end:t-1})});for await(let e of n)process.stdout.write(e+`
|
|
2
|
+
`)}}catch{}return console.log(`
|
|
3
|
+
[tail] Watching for new output... (Ctrl+C to detach)
|
|
4
|
+
`),new Promise(n=>{let r=()=>{p(e),process.removeListener(`SIGINT`,r),console.log(`
|
|
5
|
+
[tail] Detached from session.`),n()};process.on(`SIGINT`,r),m(e,{interval:300},()=>{try{let n=f(e);if(n.size<=t)return;let r=u(e,`r`);try{let e=Buffer.alloc(n.size-t);d(r,e,0,e.length,t),process.stdout.write(e),t=n.size}finally{s(r)}}catch{}})})}var _=e((()=>{})),v;e((()=>{r(),_(),t(),v=class{constructor(){n(this,`name`,`detached`),n(this,`supportsInteractiveInput`,!1)}async available(){return!0}async start(e){l(o(e.logPath),{recursive:!0});let t=u(e.logPath,`a`),n=i(a(e.args,{env:{...e.env,CLAUDE_CODE_SESSION_KIND:`bg`,CLAUDE_CODE_SESSION_NAME:e.sessionName,CLAUDE_CODE_SESSION_LOG:e.logPath}}),{detached:!0,stdio:[`ignore`,t,t],cwd:e.cwd});return n.unref(),s(t),{pid:n.pid??0,sessionName:e.sessionName,logPath:e.logPath,engineUsed:`detached`}}async attach(e){if(!e.logPath)throw Error(`Session ${e.sessionId} has no log path.`);await g(e.logPath)}}}))();export{v as DetachedEngine};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./rolldown-runtime-DaDcL9Zw.js";var n=t(((e,t)=>{var n=()=>process.platform===`linux`,r=null;t.exports={isLinux:n,getReport:()=>{if(!r)if(n()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,r=process.report.getReport(),process.report.excludeNetwork=e}else r={};return r}}})),r=t(((t,n)=>{var r=e(`fs`),i=`/usr/bin/ldd`,a=`/proc/self/exe`,o=2048;n.exports={LDD_PATH:i,SELF_PATH:a,readFileSync:e=>{let t=r.openSync(e,`r`),n=Buffer.alloc(o),i=r.readSync(t,n,0,o,0);return r.close(t,()=>{}),n.subarray(0,i)},readFile:e=>new Promise((t,n)=>{r.open(e,`r`,(e,i)=>{if(e)n(e);else{let e=Buffer.alloc(o);r.read(i,e,0,o,0,(n,a)=>{t(e.subarray(0,a)),r.close(i,()=>{})})}})})}})),i=t(((e,t)=>{t.exports={interpreterPath:e=>{if(e.length<64||e.readUInt32BE(0)!==2135247942||e.readUInt8(4)!==2||e.readUInt8(5)!==1)return null;let t=e.readUInt32LE(32),n=e.readUInt16LE(54),r=e.readUInt16LE(56);for(let i=0;i<r;i++){let r=t+i*n;if(e.readUInt32LE(r)===3){let t=e.readUInt32LE(r+8),n=e.readUInt32LE(r+32);return e.subarray(t,t+n).toString().replace(/\0.*$/g,``)}}return null}}})),a=t(((t,a)=>{var o=e(`child_process`),{isLinux:s,getReport:c}=n(),{LDD_PATH:l,SELF_PATH:u,readFile:d,readFileSync:f}=r(),{interpreterPath:p}=i(),m,h,g,_=`getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true`,v=``,y=()=>v||new Promise(e=>{o.exec(_,(t,n)=>{v=t?` `:n,e(v)})}),b=()=>{if(!v)try{v=o.execSync(_,{encoding:`utf8`})}catch{v=` `}return v},x=`glibc`,S=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,C=`musl`,w=e=>e.includes(`libc.musl-`)||e.includes(`ld-musl-`),T=()=>{let e=c();return e.header&&e.header.glibcVersionRuntime?x:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(w)?C:null},E=e=>{let[t,n]=e.split(/[\r\n]+/);return t&&t.includes(x)?x:n&&n.includes(C)?C:null},D=e=>{if(e){if(e.includes(`/ld-musl-`))return C;if(e.includes(`/ld-linux-`))return x}return null},O=e=>(e=e.toString(),e.includes(`musl`)?C:e.includes(`GNU C Library`)?x:null),k=async()=>{if(h!==void 0)return h;h=null;try{h=O(await d(l))}catch{}return h},A=()=>{if(h!==void 0)return h;h=null;try{h=O(f(l))}catch{}return h},j=async()=>{if(m!==void 0)return m;m=null;try{m=D(p(await d(u)))}catch{}return m},M=()=>{if(m!==void 0)return m;m=null;try{m=D(p(f(u)))}catch{}return m},N=async()=>{let e=null;return s()&&(e=await j(),e||(e=await k(),e||(e=T()),e||(e=E(await y())))),e},P=()=>{let e=null;return s()&&(e=M(),e||(e=A(),e||(e=T()),e||(e=E(b())))),e},F=async()=>s()&&await N()!==x,I=()=>s()&&P()!==x,L=async()=>{if(g!==void 0)return g;g=null;try{let e=(await d(l)).match(S);e&&(g=e[1])}catch{}return g},R=()=>{if(g!==void 0)return g;g=null;try{let e=f(l).match(S);e&&(g=e[1])}catch{}return g},z=()=>{let e=c();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},B=e=>e.trim().split(/\s+/)[1],V=e=>{let[t,n,r]=e.split(/[\r\n]+/);return t&&t.includes(x)?B(t):n&&r&&n.includes(C)?B(r):null};a.exports={GLIBC:x,MUSL:C,family:N,familySync:P,isNonGlibcLinux:F,isNonGlibcLinuxSync:I,version:async()=>{let e=null;return s()&&(e=await L(),e||(e=z()),e||(e=V(await y()))),e},versionSync:()=>{let e=null;return s()&&(e=R(),e||(e=z()),e||(e=V(b()))),e}}}));export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,o as n}from"./detectRepository-ReZ0Fz8Z.js";t();export{e as parseGitHubRepository,n as parseGitRemote};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./cwd-BuJhkTrc.js";import{l as r,p as i}from"./debug-IKW-jE7K.js";import{_ as a,p as o}from"./git-tyaWOgRL.js";function s(){p.clear()}async function c(){let e=await l();return!e||e.host!==`github.com`?null:`${e.owner}/${e.name}`}async function l(){let e=n();if(p.has(e))return p.get(e)??null;try{let t=await o();if(i(`Git remote URL: ${t}`),!t)return i(`No git remote URL found`),p.set(e,null),null;let n=u(t);return i(`Parsed repository: ${n?`${n.host}/${n.owner}/${n.name}`:null} from URL: ${t}`),p.set(e,n),n}catch(t){return i(`Error detecting repository: ${t}`),p.set(e,null),null}}function u(e){let t=e.trim(),n=t.match(/^git@([^:]+):([^/]+)\/([^/]+?)(?:\.git)?$/);if(n?.[1]&&n[2]&&n[3])return f(n[1])?{host:n[1],owner:n[2],name:n[3]}:null;let r=t.match(/^(https?|ssh|git):\/\/(?:[^@]+@)?([^/:]+(?::\d+)?)\/([^/]+)\/([^/]+?)(?:\.git)?$/);if(r?.[1]&&r[2]&&r[3]&&r[4]){let e=r[1],t=r[2],n=t.split(`:`)[0]??``;return f(n)?{host:e===`https`||e===`http`?t:n,owner:r[3],name:r[4]}:null}return null}function d(e){let t=e.trim(),n=u(t);if(n)return n.host===`github.com`?`${n.owner}/${n.name}`:null;if(!t.includes(`://`)&&!t.includes(`@`)&&t.includes(`/`)){let e=t.split(`/`);if(e.length===2&&e[0]&&e[1]){let t=e[1].replace(/\.git$/,``);return`${e[0]}/${t}`}}return i(`Could not parse repository from: ${t}`),null}function f(e){if(!e.includes(`.`))return!1;let t=e.split(`.`).pop();return t?/^[a-zA-Z]+$/.test(t):!1}var p,m=e((()=>{t(),r(),a(),p=new Map}));export{d as a,m as i,c as n,u as o,l as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{t}from"./jsx-runtime-Bb4Xn-E0.js";var n,r;e((()=>{n=t(),r=async(e,t)=>{let{DiffDialog:r}=await import(`./DiffDialog-CBluIK-x.js`);return(0,n.jsx)(r,{messages:t.messages,onDone:e})}}))();export{r as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./cwd-BuJhkTrc.js";import{_ as r,h as i}from"./debug-IKW-jE7K.js";import{o as a,s as o}from"./log-B3eB4EFv.js";import{n as s,t as c}from"./index.min-D75yiGLN.js";import{i as l,n as u}from"./path-BCSE0S-c.js";import{basename as d,dirname as f,join as p,sep as m}from"path";function h(e,t){if(!e)return{directory:t||n(),prefix:``};let r=u(e,t);return e.endsWith(`/`)||e.endsWith(m)?{directory:r,prefix:``}:{directory:f(r),prefix:d(e)}}async function g(e){let t=C.get(e);if(t)return t;try{let t=(await i().readdir(e)).filter(e=>e.isDirectory()&&!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:`directory`})).slice(0,100);return C.set(e,t),t}catch(e){return o(e),[]}}async function _(e,t={}){let{basePath:r=n(),maxResults:i=10}=t,{directory:a,prefix:o}=h(e,r),s=await g(a),c=o.toLowerCase();return s.filter(e=>e.name.toLowerCase().startsWith(c)).slice(0,i).map(e=>({id:e.path,displayText:e.name+`/`,description:`directory`,metadata:{type:`directory`}}))}function v(e){return e.startsWith(`~/`)||e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`)||e===`~`||e===`.`||e===`..`}async function y(e,t=!1){let n=`${e}:${t}`,r=w.get(n);if(r)return r;try{let r=(await i().readdir(e)).filter(e=>t||!e.name.startsWith(`.`)).map(t=>({name:t.name,path:p(e,t.name),type:t.isDirectory()?`directory`:`file`})).sort((e,t)=>e.type===`directory`&&t.type!==`directory`?-1:e.type!==`directory`&&t.type===`directory`?1:e.name.localeCompare(t.name)).slice(0,100);return w.set(n,r),r}catch(e){return o(e),[]}}async function b(e,t={}){let{basePath:r=n(),maxResults:i=10,includeFiles:a=!0,includeHidden:o=!1}=t,{directory:s,prefix:c}=h(e,r),l=await y(s,o),u=c.toLowerCase(),d=l.filter(e=>!a&&e.type===`file`?!1:e.name.toLowerCase().startsWith(u)).slice(0,i),f=e.includes(`/`)||e.includes(m),p=``;if(f){let t=e.lastIndexOf(`/`),n=e.lastIndexOf(m),r=Math.max(t,n);p=e.substring(0,r+1)}return(p.startsWith(`./`)||p.startsWith(`.`+m))&&(p=p.slice(2)),d.map(e=>{let t=p+e.name;return{id:t,displayText:e.type===`directory`?t+`/`:t,metadata:{type:e.type}}})}var x,S,C,w,T=e((()=>{s(),t(),r(),a(),l(),x=500,S=300*1e3,C=new c({max:x,ttl:S}),w=new c({max:x,ttl:S})}));export{v as i,b as n,T as r,_ as t};
|